diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs new file mode 100644 index 000000000..f70ecbc37 --- /dev/null +++ b/src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs @@ -0,0 +1,15 @@ +#![feature(const_trait_impl)] + +#[const_trait] +pub trait Tr { + fn a(&self) {} + + fn b(&self) { + ().a() + //~^ ERROR the trait bound + } +} + +impl Tr for () {} + +fn main() {} |