- unsizing coercions go through the CoerceUnsized goal and rustc's coercion proof-tree walk, replacing the structural unsize/dyn paths - recursive async fns without indirection report E0733 - lifetime uses in derives keyed per where predicate (no crash) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
537 B
Rust
15 lines
537 B
Rust
// A derive repeats one field type node under several where-predicates, each with its own
|
|
// `for<..>` binder (T::Shim<dyn for<'t> Fn(&'s mut T::Shim<..>)> and the inner T::Shim<..>):
|
|
// the lifetime uses are resolved per predicate.
|
|
trait CallWithShim2: Sized { type Shim<T: ?Sized>; }
|
|
trait Trait<'s, 't, 'u> {}
|
|
|
|
#[derive(Clone)]
|
|
struct ShimMethod3<T: CallWithShim2 + 'static>(
|
|
pub &'static dyn for<'s> Fn(
|
|
&'s mut T::Shim<dyn for<'t> Fn(&'s mut T::Shim<dyn for<'u> Trait<'s, 't, 'u>>)>,
|
|
),
|
|
);
|
|
|
|
#[test]
|
|
fn compiles() {}
|