mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
bless some nll tests
This commit is contained in:
parent
238d974fc6
commit
7af445dc15
@ -19,7 +19,7 @@ LL | type WrongGeneric<T> = impl 'static;
|
|||||||
found opaque type `impl Sized`
|
found opaque type `impl Sized`
|
||||||
|
|
||||||
error[E0310]: the parameter type `T` may not live long enough
|
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> {
|
LL | fn wrong_generic<T>(t: T) -> WrongGeneric<T> {
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
@ -10,29 +10,5 @@ error: higher-ranked subtype error
|
|||||||
LL | |x| x
|
LL | |x| x
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error[E0308]: mismatched types
|
error: aborting due to 2 previous errors
|
||||||
--> $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: 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`.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user