mir-borrowck: Panic when trying to print a field access on a non-box type that is neither Adt nor tuple
This commit is contained in:
parent
7bdf177c8f
commit
456e12ec38
1 changed files with 4 additions and 2 deletions
|
|
@ -1178,8 +1178,10 @@ impl<'c, 'b, 'a: 'b+'c, 'gcx, 'tcx: 'a> MirBorrowckCtxt<'c, 'b, 'a, 'gcx, 'tcx>
|
|||
format!("{}", field_index)
|
||||
},
|
||||
_ => {
|
||||
debug!("End-user description not implemented for field of type {:?}", ty.sty);
|
||||
format!("<ty>{}", field_index)
|
||||
// Might need a revision when the fields in trait RFC is implemented
|
||||
// (https://github.com/rust-lang/rfcs/pull/1546)
|
||||
bug!("Field access unsupported for non-box types that are neither Adt (struct, \
|
||||
enum, union) nor tuples");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue