mirror of https://github.com/rust-lang/rust.git
28 lines
951 B
Plaintext
28 lines
951 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/lifetime-incomplete-prefer-sized-builtin-over-wc.rs:13:23
|
|
|
|
|
LL | (MyType<'a, T>,): Sized,
|
|
| ^^^^^ lifetime mismatch
|
|
|
|
|
= note: expected trait `<MyType<'a, T> as Sized>`
|
|
found trait `<MyType<'static, T> as Sized>`
|
|
note: the lifetime `'a` as defined here...
|
|
--> $DIR/lifetime-incomplete-prefer-sized-builtin-over-wc.rs:11:8
|
|
|
|
|
LL | fn foo<'a, T: ?Sized>()
|
|
| ^^
|
|
= note: ...does not necessarily outlive the static lifetime
|
|
|
|
error: lifetime may not live long enough
|
|
--> $DIR/lifetime-incomplete-prefer-sized-builtin-over-wc.rs:22:5
|
|
|
|
|
LL | fn foo<'a, T: ?Sized>()
|
|
| -- lifetime `'a` defined here
|
|
...
|
|
LL | is_sized::<(MyType<'a, T>,)>();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|