2020-08-07 11:07:25 -05:00
|
|
|
// build-fail
|
|
|
|
// compile-flags:-Zpolymorphize=on
|
|
|
|
#![crate_type = "lib"]
|
2021-08-25 07:31:18 -05:00
|
|
|
#![feature(generic_const_exprs, rustc_attrs)]
|
|
|
|
//~^ WARN the feature `generic_const_exprs` is incomplete
|
2020-08-07 11:07:25 -05:00
|
|
|
|
|
|
|
#[rustc_polymorphize_error]
|
|
|
|
fn test<T>() {
|
|
|
|
//~^ ERROR item has unused generic parameters
|
|
|
|
let x = [0; 3 + 4];
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn caller() {
|
|
|
|
test::<String>();
|
|
|
|
test::<Vec<String>>();
|
|
|
|
}
|