rust/tests/ui/polymorphization/promoted-function-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
238 B
Rust
Raw Normal View History

// 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(&());
}