]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs
Rollup merge of #94839 - TaKO8Ki:suggest-using-double-colon-for-struct-field-type...
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / default-method-body-is-const-body-checking.rs
1 #![feature(const_trait_impl)]
2
3 trait Tr {}
4 impl Tr for () {}
5
6 const fn foo<T>() where T: ~const Tr {}
7
8 pub trait Foo {
9     #[default_method_body_is_const]
10     fn foo() {
11         foo::<()>();
12         //~^ ERROR the trait bound `(): ~const Tr` is not satisfied
13     }
14 }
15
16 fn main() {}