]> git.lizzy.rs Git - rust.git/blob - src/test/ui/typeck/typeck_type_placeholder_lifetime_2.rs
Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-Simulacrum
[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 generic argument but 2 generic arguments were supplied
11 }