2016-03-10 04:21:00 -06:00
|
|
|
// Test that we do not see uninformative region-related errors
|
|
|
|
// when we get some basic type-checking failure. See #30580.
|
|
|
|
|
2016-03-09 15:53:19 -06:00
|
|
|
pub struct Foo { a: u32 }
|
|
|
|
pub struct Pass<'a, 'tcx: 'a>(&'a mut &'a (), &'a &'tcx ());
|
|
|
|
|
|
|
|
impl<'a, 'tcx> Pass<'a, 'tcx>
|
|
|
|
{
|
|
|
|
pub fn tcx(&self) -> &'a &'tcx () { self.1 }
|
|
|
|
fn lol(&mut self, b: &Foo)
|
|
|
|
{
|
2016-09-28 04:27:23 -05:00
|
|
|
b.c; //~ ERROR no field `c` on type `&Foo`
|
2016-03-09 15:53:19 -06:00
|
|
|
self.tcx();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|