summaryrefslogtreecommitdiffstats
path: root/tests/ui/polymorphization/promoted-function-2.rs
blob: d2d0f33681244a896768027c998c5939b517d64d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// build-fail
// compile-flags:-Zpolymorphize=on
#![crate_type = "lib"]
#![feature(generic_const_exprs, rustc_attrs)]
//~^ WARN the feature `generic_const_exprs` is incomplete

#[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>>();
}