Skip to content

Commit

Permalink
bless some nll tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Aug 6, 2021
1 parent 238d974 commit 7af445d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
Expand Up @@ -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> {
| ^^^^^^^^^^^^^^^
Expand Down
Expand Up @@ -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: 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
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.

0 comments on commit 7af445d

Please sign in to comment.