]> git.lizzy.rs Git - rust.git/blob - tests/ui/elide-errors-on-mismatched-tuple.rs
Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum
[rust.git] / tests / ui / elide-errors-on-mismatched-tuple.rs
1 // Hide irrelevant E0277 errors (#50333)
2
3 trait T {}
4
5 struct A;
6 impl T for A {}
7 impl A {
8     fn new() -> Self {
9         Self {}
10     }
11 }
12
13 fn main() {
14     let (a, b, c) = (A::new(), A::new()); // This tuple is 2 elements, should be three
15     //~^ ERROR mismatched types
16     let ts: Vec<&dyn T> = vec![&a, &b, &c];
17     // There is no E0277 error above, as `a`, `b` and `c` are `TyErr`
18 }