summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs')
-rw-r--r--src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs b/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
new file mode 100644
index 000000000..3413db6a6
--- /dev/null
+++ b/src/test/ui/traits/false-ambiguity-where-clause-builtin-bound.rs
@@ -0,0 +1,16 @@
+// run-pass
+// Test that we do not error out because of a (False) ambiguity
+// between the builtin rules for Sized and the where clause. Issue
+// #20959.
+
+// pretty-expanded FIXME #23616
+
+fn foo<K>(x: Option<K>)
+ where Option<K> : Sized
+{
+ let _y = x;
+}
+
+fn main() {
+ foo(Some(22));
+}