]> git.lizzy.rs Git - rust.git/blob - src/test/ui/derived-errors/issue-30580.rs
Rollup merge of #98640 - cuviper:stable-rust-analyzer, r=Mark-Simulacrum
[rust.git] / src / test / ui / derived-errors / issue-30580.rs
1 // Test that we do not see uninformative region-related errors
2 // when we get some basic type-checking failure. See #30580.
3
4 pub struct Foo { a: u32 }
5 pub struct Pass<'a, 'tcx: 'a>(&'a mut &'a (), &'a &'tcx ());
6
7 impl<'a, 'tcx> Pass<'a, 'tcx>
8 {
9     pub fn tcx(&self) -> &'a &'tcx () { self.1 }
10     fn lol(&mut self, b: &Foo)
11     {
12         b.c; //~ ERROR no field `c` on type `&Foo`
13         self.tcx();
14     }
15 }
16
17 fn main() {}