Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply the same logic to ConcreteFailure errors
- Loading branch information
1 parent
77924de
commit 7bc3f55
Showing
6 changed files
with
69 additions
and
38 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 |
---|---|---|
@@ -1,34 +1,20 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/auto-trait-regions.rs:30:5 | ||
| | ||
LL | assert_foo(gen); | ||
| ^^^^^^^^^^ lifetime mismatch | ||
| | ||
= note: expected type `Foo` | ||
found type `Foo` | ||
= note: lifetime RePlaceholder(Placeholder { universe: U31, name: BrAnon(1) })... | ||
= note: ...does not necessarily outlive the static lifetime | ||
|
||
error[E0308]: mismatched types | ||
error: implementation of `Foo` is not general enough | ||
--> $DIR/auto-trait-regions.rs:30:5 | ||
| | ||
LL | assert_foo(gen); | ||
| ^^^^^^^^^^ lifetime mismatch | ||
| ^^^^^^^^^^ | ||
| | ||
= note: expected type `Foo` | ||
found type `Foo` | ||
= note: lifetime RePlaceholder(Placeholder { universe: U35, name: BrAnon(1) })... | ||
= note: ...does not necessarily outlive the static lifetime | ||
= note: `&'0 OnlyFooIfStaticRef` must implement `Foo` for any lifetime `'0` | ||
= note: but `&'1 OnlyFooIfStaticRef` only implements `Foo` for some lifetime `'1` | ||
|
||
error: implementation of `Foo` is not general enough | ||
--> $DIR/auto-trait-regions.rs:49:5 | ||
--> $DIR/auto-trait-regions.rs:48:5 | ||
| | ||
LL | assert_foo(gen); | ||
| ^^^^^^^^^^ | ||
| | ||
= note: `A<'0, '1>` must implement `Foo` for any two lifetimes `'0` and `'1` | ||
= note: but `A<'_, '2>` only implements `Foo` for some lifetime `'2` | ||
|
||
error: aborting due to 3 previous errors | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
error[E0308]: mismatched types | ||
error: implementation of `Bar` is not general enough | ||
--> $DIR/where-for-self-2.rs:21:5 | ||
| | ||
LL | foo(&X); //~ ERROR E0308 | ||
| ^^^ lifetime mismatch | ||
LL | foo(&X); //~ ERROR implementation of `Bar` is not general enough | ||
| ^^^ | ||
| | ||
= note: expected type `Bar` | ||
found type `Bar` | ||
= note: lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:10), 'a) })... | ||
= note: ...does not necessarily outlive the static lifetime | ||
= note: Due to a where-clause on `foo`, | ||
= note: `&'0 _` must implement `Bar` for any lifetime `'0` | ||
= note: but `&'1 u32` only implements `Bar` for some lifetime `'1` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |