-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diagnostics: correct generic bounds with doubled colon
Fixes #95208
- Loading branch information
Showing
8 changed files
with
93 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// run-rustfix | ||
|
||
#[allow(unused)] | ||
struct Struct<T>(T); | ||
|
||
impl<T: Iterator> Struct<T> where <T as std:: iter::Iterator>::Item: std::fmt::Display { | ||
//~^ ERROR expected `:` followed by trait or lifetime | ||
//~| HELP use single colon | ||
} | ||
|
||
fn main() {} |
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 @@ | ||
// run-rustfix | ||
|
||
#[allow(unused)] | ||
struct Struct<T>(T); | ||
|
||
impl<T: Iterator> Struct<T> where <T as std:: iter::Iterator>::Item:: std::fmt::Display { | ||
//~^ ERROR expected `:` followed by trait or lifetime | ||
//~| HELP use single colon | ||
} | ||
|
||
fn main() {} |
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,10 @@ | ||
error: expected `:` followed by trait or lifetime | ||
--> $DIR/issue-95208-ignore-qself.rs:6:88 | ||
| | ||
LL | impl<T: Iterator> Struct<T> where <T as std:: iter::Iterator>::Item:: std::fmt::Display { | ||
| --- ^ | ||
| | | ||
| help: use single colon: `:` | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// run-rustfix | ||
|
||
#[allow(unused)] | ||
struct Struct<T>(T); | ||
|
||
impl<T> Struct<T> where T: std::fmt::Display { | ||
//~^ ERROR expected `:` followed by trait or lifetime | ||
//~| HELP use single colon | ||
} | ||
|
||
fn main() {} |
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 @@ | ||
// run-rustfix | ||
|
||
#[allow(unused)] | ||
struct Struct<T>(T); | ||
|
||
impl<T> Struct<T> where T:: std::fmt::Display { | ||
//~^ ERROR expected `:` followed by trait or lifetime | ||
//~| HELP use single colon | ||
} | ||
|
||
fn main() {} |
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,10 @@ | ||
error: expected `:` followed by trait or lifetime | ||
--> $DIR/issue-95208.rs:6:46 | ||
| | ||
LL | impl<T> Struct<T> where T:: std::fmt::Display { | ||
| --- ^ | ||
| | | ||
| help: use single colon: `:` | ||
|
||
error: aborting due to previous error | ||
|