bless some nll tests

This commit is contained in:
Oli Scherer 2021-08-06 11:06:34 +00:00
parent 238d974fc6
commit 7af445dc15
2 changed files with 2 additions and 26 deletions

View File

@ -19,7 +19,7 @@ LL | type WrongGeneric<T> = impl 'static;
found opaque type `impl Sized`
error[E0310]: the parameter type `T` may not live long enough
--> $DIR/generic_type_does_not_live_long_enough.rs:13:30
--> $DIR/generic_type_does_not_live_long_enough.rs:12:30
|
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
| ^^^^^^^^^^^^^^^

View File

@ -10,29 +10,5 @@ error: higher-ranked subtype error
LL | |x| x
| ^^^^^
error[E0308]: mismatched types
--> $DIR/issue-57611-trait-alias.rs:17:16
|
LL | type Bar = impl Baz<Self, Self>;
| ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
= note: expected type `for<'r> Fn<(&'r X,)>`
found type `Fn<(&'static X,)>`
note: this closure does not fulfill the lifetime requirements
--> $DIR/issue-57611-trait-alias.rs:21:9
|
LL | |x| x
| ^^^^^
error: aborting due to 2 previous errors
error: implementation of `FnOnce` is not general enough
--> $DIR/issue-57611-trait-alias.rs:17:16
|
LL | type Bar = impl Baz<Self, Self>;
| ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
= note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`...
= note: ...but it actually implements `FnOnce<(&'static X,)>`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0308`.