diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs new file mode 100644 index 000000000..7b38c15af --- /dev/null +++ b/src/test/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs @@ -0,0 +1,14 @@ +#![feature(const_trait_impl)] + +trait Foo { + fn a(&self); +} +trait Bar: ~const Foo {} + +const fn foo<T: Bar>(x: &T) { + x.a(); + //~^ ERROR the trait bound + //~| ERROR cannot call +} + +fn main() {} |