summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-types-no-suitable-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/associated-types-no-suitable-bound.rs')
-rw-r--r--src/test/ui/associated-types/associated-types-no-suitable-bound.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/associated-types-no-suitable-bound.rs b/src/test/ui/associated-types/associated-types-no-suitable-bound.rs
new file mode 100644
index 000000000..d42460a4c
--- /dev/null
+++ b/src/test/ui/associated-types/associated-types-no-suitable-bound.rs
@@ -0,0 +1,16 @@
+trait Get {
+ type Value;
+ fn get(&self) -> <Self as Get>::Value;
+}
+
+struct Struct {
+ x: isize,
+}
+
+impl Struct {
+ fn uhoh<T>(foo: <T as Get>::Value) {}
+ //~^ ERROR the trait bound `T: Get` is not satisfied
+}
+
+fn main() {
+}