rust/tests/ui/traits/lifetime-incomplete-prefer-sized-builtin-over-wc.next.stderr
David Wood d531a84e51
trait_sel: skip nominal_obligations for Sized
`nominal_obligations` calls `predicates_of` on a `Sized` obligation,
effectively elaborating the trait and making the well-formedness checking
machinery do a bunch of extra work checking a `MetaSized` obligation is
well-formed, but given that both `Sized` and `MetaSized` are built-ins,
if `Sized` is otherwise well-formed, so `MetaSized` will be.
2025-06-16 23:04:36 +00:00

12 lines
352 B
Plaintext

error: lifetime may not live long enough
--> $DIR/lifetime-incomplete-prefer-sized-builtin-over-wc.rs:20: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 1 previous error