]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.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-with-staged-api.rs
1 // check-pass
2
3 // This was an ICE, because the compiler ensures the
4 // function to be const when performing const checking,
5 // but functions marked with the attribute are not const
6 // *and* subject to const checking.
7
8 #![feature(staged_api)]
9 #![feature(const_trait_impl)]
10 #![stable(since = "1", feature = "foo")]
11
12 trait Tr {
13     #[default_method_body_is_const]
14     fn a() {}
15 }
16
17 fn main() {}