]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck_type_placeholder_lifetime_1.rs
Rollup merge of #86803 - xfix:remove-unnecessary-ampersand-from-command-args-calls...
[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 }