-
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.
- Loading branch information
Showing
56 changed files
with
864 additions
and
1,015 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
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,23 +1,53 @@ | ||
error[E0261]: use of undeclared lifetime name `'a` | ||
--> $DIR/issue-67510.rs:7:21 | ||
| | ||
LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {} | ||
| - ^^ undeclared lifetime | ||
| | | ||
| help: consider introducing lifetime `'a` here: `<'a>` | ||
LL | fn f(x: Box<dyn X<Y<'a> = &'a ()>>) {} | ||
| ^^ undeclared lifetime | ||
| | ||
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html | ||
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes | ||
help: consider introducing lifetime `'a` here | ||
| | ||
LL | fn f<'a>(x: Box<dyn X<Y<'a> = &'a ()>>) {} | ||
| ++++ | ||
help: consider making the bound lifetime-generic with a new `'a` lifetime | ||
| | ||
LL | fn f(x: Box<dyn for<'a> X<Y<'a> = &'a ()>>) {} | ||
| +++++++ | ||
|
||
error[E0261]: use of undeclared lifetime name `'a` | ||
--> $DIR/issue-67510.rs:7:26 | ||
--> $DIR/issue-67510.rs:7:28 | ||
| | ||
LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {} | ||
| - ^^ undeclared lifetime | ||
| | | ||
| help: consider introducing lifetime `'a` here: `<'a>` | ||
LL | fn f(x: Box<dyn X<Y<'a> = &'a ()>>) {} | ||
| ^^ undeclared lifetime | ||
| | ||
= note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html | ||
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes | ||
help: consider introducing lifetime `'a` here | ||
| | ||
LL | fn f<'a>(x: Box<dyn X<Y<'a> = &'a ()>>) {} | ||
| ++++ | ||
help: consider making the bound lifetime-generic with a new `'a` lifetime | ||
| | ||
LL | fn f(x: Box<dyn for<'a> X<Y<'a> = &'a ()>>) {} | ||
| +++++++ | ||
|
||
error[E0038]: the trait `X` cannot be made into an object | ||
--> $DIR/issue-67510.rs:7:13 | ||
| | ||
LL | fn f(x: Box<dyn X<Y<'a> = &'a ()>>) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | ||
| | ||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety> | ||
--> $DIR/issue-67510.rs:4:10 | ||
| | ||
LL | trait X { | ||
| - this trait cannot be made into an object... | ||
LL | type Y<'a>; | ||
| ^ ...because it contains the generic associated type `Y` | ||
= help: consider moving `Y` to another trait | ||
|
||
error: aborting due to 2 previous errors | ||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0261`. | ||
Some errors have detailed explanations: E0038, E0261. | ||
For more information about an error, try `rustc --explain E0038`. |
Oops, something went wrong.