Skip to content

Commit

Permalink
Auto merge of rust-lang#109128 - chenyukang:yukang/remove-type-ascrip…
Browse files Browse the repository at this point in the history
…tion, r=estebank

Remove type ascription from parser and diagnostics

Mostly based on rust-lang#106826

Part of rust-lang#101728

r? `@estebank`
  • Loading branch information
bors committed May 2, 2023
2 parents 4351e50 + 9d20134 commit ae213e2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 54 deletions.
10 changes: 0 additions & 10 deletions tests/source/type-ascription.rs

This file was deleted.

8 changes: 2 additions & 6 deletions tests/target/configs/format_macro_bodies/true.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// rustfmt-format_macro_bodies: true

macro_rules! foo {
($a: ident : $b: ty) => {
$a(42): $b;
};
($a: ident $b: ident $c: ident) => {
$a = $b + $c;
};
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}
8 changes: 2 additions & 6 deletions tests/target/configs/format_macro_matchers/false.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// rustfmt-format_macro_matchers: false

macro_rules! foo {
($a: ident : $b: ty) => {
$a(42): $b;
};
($a: ident $b: ident $c: ident) => {
$a = $b + $c;
};
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}
8 changes: 2 additions & 6 deletions tests/target/configs/format_macro_matchers/true.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// rustfmt-format_macro_matchers: true

macro_rules! foo {
($a:ident : $b:ty) => {
$a(42): $b;
};
($a:ident $b:ident $c:ident) => {
$a = $b + $c;
};
($a: ident : $b: ty) => { $a(42): $b; };
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
}
22 changes: 9 additions & 13 deletions tests/target/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fn main() {
20, 21, 22);

// #1092
chain!(input, a: take!(max_size), || []);
chain!(input, a:take!(max_size), || []);

// #2727
foo!("bar");
Expand Down Expand Up @@ -156,17 +156,13 @@ fn issue1178() {
}

fn issue1739() {
sql_function!(
add_rss_item,
add_rss_item_t,
(
a: types::Integer,
b: types::Timestamptz,
c: types::Text,
d: types::Text,
e: types::Text
)
);
sql_function!(add_rss_item,
add_rss_item_t,
(a: types::Integer,
b: types::Timestamptz,
c: types::Text,
d: types::Text,
e: types::Text));

w.slice_mut(s![
..,
Expand Down Expand Up @@ -232,7 +228,7 @@ fn issue_3174() {
"debugMessage": debug.message,
})
} else {
json!({ "errorKind": format!("{:?}", error.err_kind()) })
json!({"errorKind": format!("{:?}", error.err_kind())})
};
}

Expand Down
12 changes: 0 additions & 12 deletions tests/target/type-ascription.rs

This file was deleted.

2 changes: 1 addition & 1 deletion tests/target/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn issue3117() {
fn issue3139() {
assert_eq!(
to_json_value(&None::<i32>).unwrap(),
json!({ "test": None::<i32> })
json!( { "test": None :: <i32> } )
);
}

Expand Down

0 comments on commit ae213e2

Please sign in to comment.