]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs
Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'
[rust.git] / src / test / ui / typeck / typeck_type_placeholder_lifetime_2.rs
1 // This test checks that the `_` type placeholder does not react
2 // badly if put as a lifetime parameter.
3
4 struct Foo<'a, T:'a> {
5     r: &'a T
6 }
7
8 pub fn main() {
9     let c: Foo<_, usize> = Foo { r: &5 };
10     //~^ ERROR this struct takes 1 type argument but 2 type arguments were supplied
11 }