about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs
new file mode 100644
index 00000000000..33d3487030e
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+pub fn main() {}
+
+pub trait Iced {
+    fn get(&self) -> &impl Sized;
+}
+
+/// Impl causes ICE
+impl Iced for () {
+    fn get(&self) -> &impl Sized {
+        &()
+    }
+}