-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
690e037
commit e93982a
Showing
3 changed files
with
21 additions
and
10 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
25 changes: 17 additions & 8 deletions
25
src/test/ui/impl-trait/impl-fn-predefined-lifetimes.stderr
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,15 +1,24 @@ | ||
error[E0700]: hidden type for `impl Debug` captures lifetime that does not appear in bounds | ||
--> $DIR/impl-fn-predefined-lifetimes.rs:4:35 | ||
error: concrete type differs from previous defining opaque type use | ||
--> $DIR/impl-fn-predefined-lifetimes.rs:7:9 | ||
| | ||
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) { | ||
| ^^^^^^^^^^^^^^^ | ||
LL | |x| x | ||
| ^ expected `impl Debug + '_`, got `&u8` | ||
| | ||
note: hidden type `&'<empty> u8` captures lifetime smaller than the function body | ||
note: previous use here | ||
--> $DIR/impl-fn-predefined-lifetimes.rs:7:5 | ||
| | ||
LL | |x| x | ||
| ^^^^^ | ||
|
||
error[E0720]: cannot resolve opaque type | ||
--> $DIR/impl-fn-predefined-lifetimes.rs:4:35 | ||
| | ||
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) { | ||
| ^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^^^ recursive opaque type | ||
... | ||
LL | |x| x | ||
| ----- returning here with type `[closure@$DIR/impl-fn-predefined-lifetimes.rs:7:5: 7:8]` | ||
|
||
error: aborting due to previous error | ||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0700`. | ||
For more information about this error, try `rustc --explain E0720`. |