diff options
Diffstat (limited to 'src/test/ui/associated-consts/mismatched_impl_ty_3.rs')
-rw-r--r-- | src/test/ui/associated-consts/mismatched_impl_ty_3.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/associated-consts/mismatched_impl_ty_3.rs b/src/test/ui/associated-consts/mismatched_impl_ty_3.rs new file mode 100644 index 000000000..17bcc8fe5 --- /dev/null +++ b/src/test/ui/associated-consts/mismatched_impl_ty_3.rs @@ -0,0 +1,11 @@ +// run-pass +trait Trait { + const ASSOC: for<'a, 'b> fn(&'a u32, &'b u32); +} +impl Trait for () { + const ASSOC: for<'a> fn(&'a u32, &'a u32) = |_, _| (); +} + +fn main() { + let _ = <() as Trait>::ASSOC; +} |