Skip to content

Commit ae213e2

Browse files
committed
Auto merge of #109128 - chenyukang:yukang/remove-type-ascription, r=estebank
Remove type ascription from parser and diagnostics Mostly based on #106826 Part of #101728 r? `@estebank`
2 parents 4351e50 + 9d20134 commit ae213e2

File tree

7 files changed

+16
-54
lines changed

7 files changed

+16
-54
lines changed

tests/source/type-ascription.rs

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// rustfmt-format_macro_bodies: true
22

33
macro_rules! foo {
4-
($a: ident : $b: ty) => {
5-
$a(42): $b;
6-
};
7-
($a: ident $b: ident $c: ident) => {
8-
$a = $b + $c;
9-
};
4+
($a: ident : $b: ty) => { $a(42): $b; };
5+
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
106
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// rustfmt-format_macro_matchers: false
22

33
macro_rules! foo {
4-
($a: ident : $b: ty) => {
5-
$a(42): $b;
6-
};
7-
($a: ident $b: ident $c: ident) => {
8-
$a = $b + $c;
9-
};
4+
($a: ident : $b: ty) => { $a(42): $b; };
5+
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
106
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// rustfmt-format_macro_matchers: true
22

33
macro_rules! foo {
4-
($a:ident : $b:ty) => {
5-
$a(42): $b;
6-
};
7-
($a:ident $b:ident $c:ident) => {
8-
$a = $b + $c;
9-
};
4+
($a: ident : $b: ty) => { $a(42): $b; };
5+
($a: ident $b: ident $c: ident) => { $a=$b+$c; };
106
}

tests/target/macros.rs

+9-13
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn main() {
122122
20, 21, 22);
123123

124124
// #1092
125-
chain!(input, a: take!(max_size), || []);
125+
chain!(input, a:take!(max_size), || []);
126126

127127
// #2727
128128
foo!("bar");
@@ -156,17 +156,13 @@ fn issue1178() {
156156
}
157157

158158
fn issue1739() {
159-
sql_function!(
160-
add_rss_item,
161-
add_rss_item_t,
162-
(
163-
a: types::Integer,
164-
b: types::Timestamptz,
165-
c: types::Text,
166-
d: types::Text,
167-
e: types::Text
168-
)
169-
);
159+
sql_function!(add_rss_item,
160+
add_rss_item_t,
161+
(a: types::Integer,
162+
b: types::Timestamptz,
163+
c: types::Text,
164+
d: types::Text,
165+
e: types::Text));
170166

171167
w.slice_mut(s![
172168
..,
@@ -232,7 +228,7 @@ fn issue_3174() {
232228
"debugMessage": debug.message,
233229
})
234230
} else {
235-
json!({ "errorKind": format!("{:?}", error.err_kind()) })
231+
json!({"errorKind": format!("{:?}", error.err_kind())})
236232
};
237233
}
238234

tests/target/type-ascription.rs

-12
This file was deleted.

tests/target/type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fn issue3117() {
129129
fn issue3139() {
130130
assert_eq!(
131131
to_json_value(&None::<i32>).unwrap(),
132-
json!({ "test": None::<i32> })
132+
json!( { "test": None :: <i32> } )
133133
);
134134
}
135135

0 commit comments

Comments
 (0)