]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const_fn_trait_bound.rs
1 // gate-test-const_fn_trait_bound
3 // revisions: stock gated
5 #![feature(rustc_attrs)]
6 #![cfg_attr(gated, feature(const_fn_trait_bound))]
8 const fn test1
<T
: std
::ops
::Add
>() {}
9 //[stock]~^ trait bounds
10 const fn test2(_x
: &dyn Send
) {}
11 //[stock]~^ trait bounds
12 const fn test3() -> &'
static dyn Send { loop {}
}
13 //[stock]~^ trait bounds
17 fn main() {}
//[gated]~ fatal error triggered by #[rustc_error]