about summary refs log tree commit diff
path: root/tests/ui/lazy-type-alias/unconstrained-params-in-impl.rs
blob: d58938b30701c386529992acbfc0ac8ae95cdfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

impl<T> NotInjective<T> {} //~ ERROR the type parameter `T` is not constrained

type NotInjective<T: ?Sized> = Local<<T as Discard>::Out>;
struct Local<T>(T);

trait Discard { type Out; }
impl<T: ?Sized> Discard for T { type Out = (); }

fn main() {}