]> git.proxmox.com Git - rustc.git/blame - src/test/ui/polymorphization/promoted-function-2.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / polymorphization / promoted-function-2.rs
CommitLineData
3dfed10e
XL
1// build-fail
2// compile-flags:-Zpolymorphize=on
3#![crate_type = "lib"]
94222f64
XL
4#![feature(generic_const_exprs, rustc_attrs)]
5//~^ WARN the feature `generic_const_exprs` is incomplete
3dfed10e
XL
6
7#[rustc_polymorphize_error]
8fn test<T>() {
9 //~^ ERROR item has unused generic parameters
10 let x = [0; 3 + 4];
11}
12
13pub fn caller() {
14 test::<String>();
15 test::<Vec<String>>();
16}