]>
Commit | Line | Data |
---|---|---|
cdc7bbd5 XL |
1 | // gate-test-const_fn_trait_bound |
2 | ||
3 | // revisions: stock gated | |
4 | ||
5 | #![feature(rustc_attrs)] | |
6 | #![cfg_attr(gated, feature(const_fn_trait_bound))] | |
7 | ||
8 | const fn test1<T: std::ops::Add>() {} | |
9 | //[stock]~^ trait bounds | |
10 | const fn test2(_x: &dyn Send) {} | |
c295e0f8 | 11 | //[stock]~^ trait objects in const fn are unstable |
cdc7bbd5 | 12 | const fn test3() -> &'static dyn Send { loop {} } |
c295e0f8 | 13 | //[stock]~^ trait objects in const fn are unstable |
cdc7bbd5 XL |
14 | |
15 | ||
16 | #[rustc_error] | |
17 | fn main() {} //[gated]~ fatal error triggered by #[rustc_error] |