]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs
Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen
[rust.git] / src / test / ui / typeck / typeck_type_placeholder_lifetime_1.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<_, _> = Foo { r: &5 };
10     //~^ ERROR this struct takes 1 generic argument but 2 generic arguments were supplied
11 }