summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/type-alias-impl-trait/generic_underconstrained.rs')
-rw-r--r--src/test/ui/type-alias-impl-trait/generic_underconstrained.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs
new file mode 100644
index 000000000..d87a25aad
--- /dev/null
+++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs
@@ -0,0 +1,12 @@
+#![feature(type_alias_impl_trait)]
+
+fn main() {}
+
+trait Trait {}
+type Underconstrained<T: Trait> = impl Send;
+
+// no `Trait` bound
+fn underconstrain<T>(_: T) -> Underconstrained<T> {
+ //~^ ERROR the trait bound `T: Trait`
+ unimplemented!()
+}