]> git.proxmox.com Git - rustc.git/blob - tests/ui/derived-errors/issue-30580.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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() {}