mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Add additional test
This commit is contained in:
parent
bf38111ac1
commit
ea2f8b346b
@ -0,0 +1,11 @@
|
||||
// issue: 114146
|
||||
|
||||
#![feature(return_position_impl_trait_in_trait)]
|
||||
|
||||
trait Foo {
|
||||
fn bar<'other: 'a>() -> impl Sized + 'a {}
|
||||
//~^ ERROR use of undeclared lifetime name `'a`
|
||||
//~| ERROR use of undeclared lifetime name `'a`
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -0,0 +1,33 @@
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/bad-item-bound-within-rpitit-2.rs:6:20
|
||||
|
|
||||
LL | fn bar<'other: 'a>() -> impl Sized + 'a {}
|
||||
| ^^ undeclared lifetime
|
||||
|
|
||||
help: consider introducing lifetime `'a` here
|
||||
|
|
||||
LL | fn bar<'a, 'other: 'a>() -> impl Sized + 'a {}
|
||||
| +++
|
||||
help: consider introducing lifetime `'a` here
|
||||
|
|
||||
LL | trait Foo<'a> {
|
||||
| ++++
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/bad-item-bound-within-rpitit-2.rs:6:42
|
||||
|
|
||||
LL | fn bar<'other: 'a>() -> impl Sized + 'a {}
|
||||
| ^^ undeclared lifetime
|
||||
|
|
||||
help: consider introducing lifetime `'a` here
|
||||
|
|
||||
LL | fn bar<'a, 'other: 'a>() -> impl Sized + 'a {}
|
||||
| +++
|
||||
help: consider introducing lifetime `'a` here
|
||||
|
|
||||
LL | trait Foo<'a> {
|
||||
| ++++
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0261`.
|
Loading…
Reference in New Issue
Block a user