diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/in-trait/placeholder-implied-bounds.rs | 14 |
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 000000000..33d348703 --- /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 { + &() + } +} |