]> git.lizzy.rs Git - rust.git/blob - src/test/ui/polymorphization/promoted-function-2.rs
Rollup merge of #87440 - twetzel59:fix-barrier-no-op, r=yaahc
[rust.git] / src / test / ui / polymorphization / promoted-function-2.rs
1 // build-fail
2 // compile-flags:-Zpolymorphize=on
3 #![crate_type = "lib"]
4 #![feature(generic_const_exprs, rustc_attrs)]
5 //~^ WARN the feature `generic_const_exprs` is incomplete
6
7 #[rustc_polymorphize_error]
8 fn test<T>() {
9     //~^ ERROR item has unused generic parameters
10     let x = [0; 3 + 4];
11 }
12
13 pub fn caller() {
14     test::<String>();
15     test::<Vec<String>>();
16 }