Erase regions of type in offset_of!
This commit is contained in:
parent
b652d9a0fd
commit
35cf5726e3
@ -481,9 +481,10 @@ pub(crate) fn as_rvalue(
|
|||||||
}))))
|
}))))
|
||||||
}
|
}
|
||||||
|
|
||||||
ExprKind::OffsetOf { container, fields } => {
|
ExprKind::OffsetOf { container, fields } => block.and(Rvalue::NullaryOp(
|
||||||
block.and(Rvalue::NullaryOp(NullOp::OffsetOf(fields), container))
|
NullOp::OffsetOf(fields),
|
||||||
}
|
this.tcx.erase_regions(container),
|
||||||
|
)),
|
||||||
|
|
||||||
ExprKind::Literal { .. }
|
ExprKind::Literal { .. }
|
||||||
| ExprKind::NamedConst { .. }
|
| ExprKind::NamedConst { .. }
|
||||||
|
@ -12,6 +12,11 @@ fn main() {
|
|||||||
offset_of!(S, f.,); //~ ERROR expected identifier
|
offset_of!(S, f.,); //~ ERROR expected identifier
|
||||||
offset_of!(S, f..); //~ ERROR no rules expected the token
|
offset_of!(S, f..); //~ ERROR no rules expected the token
|
||||||
offset_of!(S, f..,); //~ ERROR no rules expected the token
|
offset_of!(S, f..,); //~ ERROR no rules expected the token
|
||||||
|
offset_of!(Lt<'static>, bar); // issue #111657
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct S { f: u8, }
|
struct S { f: u8, }
|
||||||
|
struct Lt<'a> {
|
||||||
|
bar: &'a (),
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user