forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#114300 - MU001999:fix/turbofish-pat, r=este…
…bank Suggests turbofish in patterns Fixes rust-lang#114112 r? ``@estebank``
- Loading branch information
Showing
17 changed files
with
125 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
enum E<T> { | ||
A(T) | ||
} | ||
|
||
fn main() { | ||
match E::<i32>::A(1) { | ||
E<i32>::A(v) => { //~ ERROR generic args in patterns require the turbofish syntax | ||
println!("{v:?}"); | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error: generic args in patterns require the turbofish syntax | ||
--> $DIR/issue-114112.rs:7:10 | ||
| | ||
LL | E<i32>::A(v) => { | ||
| ^ | ||
| | ||
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments | ||
| | ||
LL | E::<i32>::A(v) => { | ||
| ++ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
error: expected one of `:`, `;`, `=`, `@`, or `|`, found `<` | ||
error: generic args in patterns require the turbofish syntax | ||
--> $DIR/issue-22647.rs:2:15 | ||
| | ||
LL | let caller<F> = |f: F| | ||
| ^ expected one of `:`, `;`, `=`, `@`, or `|` | ||
| ^ | ||
| | ||
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments | ||
| | ||
LL | let caller::<F> = |f: F| | ||
| ++ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
error: expected one of `:`, `;`, `=`, `@`, or `|`, found `<` | ||
error: generic args in patterns require the turbofish syntax | ||
--> $DIR/issue-22712.rs:6:12 | ||
| | ||
LL | let Foo<Vec<u8>> | ||
| ^ expected one of `:`, `;`, `=`, `@`, or `|` | ||
| ^ | ||
| | ||
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments | ||
| | ||
LL | let Foo::<Vec<u8>> | ||
| ++ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
error: expected one of `=>`, `@`, `if`, or `|`, found `<` | ||
error: generic args in patterns require the turbofish syntax | ||
--> $DIR/pat-lt-bracket-3.rs:6:16 | ||
| | ||
LL | Foo<T>(x, y) => { | ||
| ^ expected one of `=>`, `@`, `if`, or `|` | ||
| ^ | ||
| | ||
help: use `::<...>` instead of `<...>` to specify lifetime, type, or const arguments | ||
| | ||
LL | Foo::<T>(x, y) => { | ||
| ++ | ||
|
||
error: aborting due to previous error | ||
|
Oops, something went wrong.