You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#139908 - Zalathar:no-ascription, r=jieyouxu
parser: Remove old diagnostic notes for type ascription syntax
Type ascription syntax was removed by rust-lang#109128 in 2023, so “remove this again in a few months” is long overdue.
Happily, this also reduces the amount of parser diagnostic code that cares whether the compiler is unstable.
---
See also the recent rust-lang#138898, which removed some other related dead code but declined to touch the diagnostics.
It's possible that some of these parser tests are no longer useful at all, but I haven't investigated them for this PR.
parse_transpose_dyn_or_impl = `for<...>` expected after `{$kw}`, not before
807
807
.suggestion = move `{$kw}` before the `for<...>`
808
808
809
-
parse_type_ascription_removed =
810
-
if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/generics/single-colon-path-not-const-generics.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | a: Vec<foo::bar:A>,
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/suggestions/struct-field-type-including-single-colon.stderr
-2
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | a: foo:A,
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
8
7
help: use a double colon instead
9
8
|
10
9
LL | a: foo::A,
@@ -16,7 +15,6 @@ error: path separator must be a double colon
16
15
LL | b: foo::bar:B,
17
16
| ^
18
17
|
19
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/suggestions/type-ascription-instead-of-method.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | let _ = Box:new("foo".to_string());
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/suggestions/type-ascription-instead-of-path.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | std:io::stdin();
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/suggestions/type-ascription-instead-of-variant.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | let _ = Option:Some("");
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/type/ascription/issue-47666.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | let _ = Option:Some(vec![0, 1]);
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/type/ascription/issue-60933.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: path separator must be a double colon
4
4
LL | let _: usize = std::mem:size_of::<u32>();
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/type/type-ascription-instead-of-statement-end.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: statements are terminated with a semicolon
4
4
LL | println!("test"):
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
Copy file name to clipboardExpand all lines: tests/ui/type/type-ascription-with-fn-call.stderr
-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ error: statements are terminated with a semicolon
4
4
LL | f() :
5
5
| ^
6
6
|
7
-
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
0 commit comments