-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for trailing comma in removal suggestion
- Loading branch information
Showing
9 changed files
with
212 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// run-rustfix | ||
|
||
trait Baz {} | ||
impl Baz for () {} | ||
impl<T> Baz for (T,) {} | ||
|
||
trait Fiz {} | ||
impl Fiz for bool {} | ||
|
||
trait Grault { | ||
type A; | ||
type B; | ||
} | ||
|
||
impl Grault for () { | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
impl<T> Grault for (T,) | ||
//~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
where | ||
T: Grault, | ||
{ | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
fn main() { | ||
let _: <((),) as Grault>::A = (); | ||
} |
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,32 @@ | ||
// run-rustfix | ||
|
||
trait Baz {} | ||
impl Baz for () {} | ||
impl<T> Baz for (T,) {} | ||
|
||
trait Fiz {} | ||
impl Fiz for bool {} | ||
|
||
trait Grault { | ||
type A; | ||
type B; | ||
} | ||
|
||
impl Grault for () { | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
impl<T> Grault for (T,) | ||
//~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
where | ||
T: Grault, | ||
Self::A: Baz, | ||
{ | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
fn main() { | ||
let _: <((),) as Grault>::A = (); | ||
} |
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,31 @@ | ||
error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
--> $DIR/impl-wf-cycle-5.rs:20:1 | ||
| | ||
LL | / impl<T> Grault for (T,) | ||
LL | | | ||
LL | | where | ||
LL | | T: Grault, | ||
LL | | Self::A: Baz, | ||
| |_________________^ | ||
LL | { | ||
LL | type A = (); | ||
| ------ associated type `<(T,) as Grault>::A` is specified here | ||
| | ||
note: required for `(T,)` to implement `Grault` | ||
--> $DIR/impl-wf-cycle-5.rs:20:9 | ||
| | ||
LL | impl<T> Grault for (T,) | ||
| ^^^^^^ ^^^^ | ||
... | ||
LL | Self::A: Baz, | ||
| --- unsatisfied trait bound introduced here | ||
help: associated type for the current `impl` cannot be restricted in `where` clauses, remove this bound | ||
| | ||
LL - T: Grault, | ||
LL - Self::A: Baz, | ||
LL + T: Grault, | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0275`. |
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,31 @@ | ||
// run-rustfix | ||
|
||
trait Baz {} | ||
impl Baz for () {} | ||
impl<T> Baz for (T,) {} | ||
|
||
trait Fiz {} | ||
impl Fiz for bool {} | ||
|
||
trait Grault { | ||
type A; | ||
type B; | ||
} | ||
|
||
impl Grault for () { | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
impl<T: Grault> Grault for (T,) | ||
//~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
where | ||
|
||
{ | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
fn main() { | ||
let _: <((),) as Grault>::A = (); | ||
} |
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,31 @@ | ||
// run-rustfix | ||
|
||
trait Baz {} | ||
impl Baz for () {} | ||
impl<T> Baz for (T,) {} | ||
|
||
trait Fiz {} | ||
impl Fiz for bool {} | ||
|
||
trait Grault { | ||
type A; | ||
type B; | ||
} | ||
|
||
impl Grault for () { | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
impl<T: Grault> Grault for (T,) | ||
//~^ ERROR overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
where | ||
Self::A: Baz, | ||
{ | ||
type A = (); | ||
type B = bool; | ||
} | ||
|
||
fn main() { | ||
let _: <((),) as Grault>::A = (); | ||
} |
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,29 @@ | ||
error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _` | ||
--> $DIR/impl-wf-cycle-6.rs:20:1 | ||
| | ||
LL | / impl<T: Grault> Grault for (T,) | ||
LL | | | ||
LL | | where | ||
LL | | Self::A: Baz, | ||
| |_________________^ | ||
LL | { | ||
LL | type A = (); | ||
| ------ associated type `<(T,) as Grault>::A` is specified here | ||
| | ||
note: required for `(T,)` to implement `Grault` | ||
--> $DIR/impl-wf-cycle-6.rs:20:17 | ||
| | ||
LL | impl<T: Grault> Grault for (T,) | ||
| ^^^^^^ ^^^^ | ||
... | ||
LL | Self::A: Baz, | ||
| --- unsatisfied trait bound introduced here | ||
help: associated type for the current `impl` cannot be restricted in `where` clauses, remove this bound | ||
| | ||
LL - Self::A: Baz, | ||
LL + | ||
| | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0275`. |