]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/foreign-item-const-parameter.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / test / ui / const-generics / foreign-item-const-parameter.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 extern "C" {
8     fn foo<const X: usize>(); //~ ERROR foreign items may not have const parameters
9
10     fn bar<T, const X: usize>(_: T); //~ ERROR foreign items may not have type or const parameters
11 }
12
13 fn main() {}