diff options
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs')
-rw-r--r-- | tests/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs b/tests/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs deleted file mode 100644 index 140a06a73..000000000 --- a/tests/ui/rfc-2632-const-trait-impl/const-default-method-bodies.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![feature(const_trait_impl)] - -#[const_trait] -trait ConstDefaultFn: Sized { - fn b(self); - - fn a(self) { - self.b(); - } -} - -struct NonConstImpl; -struct ConstImpl; - -impl ConstDefaultFn for NonConstImpl { - fn b(self) {} -} - -impl const ConstDefaultFn for ConstImpl { - fn b(self) {} -} - -const fn test() { - NonConstImpl.a(); - //~^ ERROR the trait bound - ConstImpl.a(); -} - -fn main() {} |