summary refs log tree commit diff
path: root/src/test/ui/consts/const_fn_trait_bound.rs
blob: b1ef820d827b4b24fff5a6285550f80185f2a993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// gate-test-const_fn_trait_bound

// revisions: stock gated

#![feature(rustc_attrs)]
#![cfg_attr(gated, feature(const_fn_trait_bound))]

const fn test1<T: std::ops::Add>() {}
//[stock]~^ trait bounds
const fn test2(_x: &dyn Send) {}
//[stock]~^ trait bounds
const fn test3() -> &'static dyn Send { loop {} }
//[stock]~^ trait bounds


#[rustc_error]
fn main() {} //[gated]~ fatal error triggered by #[rustc_error]