summary refs log tree commit diff
path: root/tests/ui/polymorphization/promoted-function-1.rs
blob: 8c2ed6212493c7a03ceb0119f3965bfb73a90b43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ build-fail
//@ compile-flags: -Zpolymorphize=on
#![crate_type = "lib"]
#![feature(rustc_attrs)]

fn foo<'a>(_: &'a ()) {}

#[rustc_polymorphize_error]
pub fn test<T>() {
    //~^ ERROR item has unused generic parameters
    foo(&());
}