]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / default-method-body-is-const-same-trait-ck.rs
1 #![feature(const_fn_trait_bound)]
2 #![feature(const_trait_impl)]
3
4 pub trait Tr {
5     #[default_method_body_is_const]
6     fn a(&self) {}
7
8     #[default_method_body_is_const]
9     fn b(&self) {
10         ().a()
11         //~^ ERROR the trait bound
12         //~| ERROR cannot call
13     }
14 }
15
16 impl Tr for () {}
17
18 fn main() {}