diff options
Diffstat (limited to 'tests/ui/traits/unconstrained-projection-normalization-2.rs')
| -rw-r--r-- | tests/ui/traits/unconstrained-projection-normalization-2.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/traits/unconstrained-projection-normalization-2.rs b/tests/ui/traits/unconstrained-projection-normalization-2.rs new file mode 100644 index 00000000000..085e9e4a61a --- /dev/null +++ b/tests/ui/traits/unconstrained-projection-normalization-2.rs @@ -0,0 +1,17 @@ +// Make sure we don't ICE in `normalize_erasing_regions` when normalizing +// an associated type in an impl with unconstrained non-lifetime params. +// (This time in a function signature) + +struct Thing; + +pub trait Every { + type Assoc; +} +impl<T: ?Sized> Every for Thing { +//~^ ERROR the type parameter `T` is not constrained + type Assoc = T; +} + +fn foo(_: <Thing as Every>::Assoc) {} + +fn main() {} |
