Deriving: Include bound generic params for extracted type parameters in where clause

This commit is contained in:
Audun Halland 2021-09-29 00:46:29 +02:00
parent 8f8092cc32
commit f0e99827f8
2 changed files with 54 additions and 10 deletions

View file

@ -0,0 +1,14 @@
// check-pass
#![feature(generic_associated_types)]
trait CallWithShim: Sized {
type Shim<'s>
where
Self: 's;
}
#[derive(Clone)]
struct ShimMethod<T: CallWithShim + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::Shim<'s>));
pub fn main() {}