Implement references VarDebugInfo.
This commit is contained in:
parent
1c36f50b3e
commit
2ec0071913
20 changed files with 439 additions and 361 deletions
|
@ -448,7 +448,15 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
|
|||
};
|
||||
match debuginfo.value {
|
||||
VarDebugInfoContents::Const(_) => {}
|
||||
VarDebugInfoContents::Place(place) => check_place(place),
|
||||
VarDebugInfoContents::Place(place) => {
|
||||
check_place(place);
|
||||
if debuginfo.references != 0 && place.projection.last() == Some(&PlaceElem::Deref) {
|
||||
self.fail(
|
||||
START_BLOCK.start_location(),
|
||||
format!("debuginfo {:?}, has both ref and deref", debuginfo),
|
||||
);
|
||||
}
|
||||
}
|
||||
VarDebugInfoContents::Composite { ty, ref fragments } => {
|
||||
for f in fragments {
|
||||
check_place(f.contents);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue