Clarify that the status of &!
is undecided
This commit is contained in:
parent
1ead4761e9
commit
2ad780eaf0
@ -289,7 +289,8 @@ fn lower_pattern(
|
||||
fn is_known_valid_scrutinee(&self, scrutinee: &Expr<'tcx>) -> bool {
|
||||
use ExprKind::*;
|
||||
match &scrutinee.kind {
|
||||
// Both pointers and references can validly point to a place with invalid data.
|
||||
// Pointers can validly point to a place with invalid data. It is undecided whether
|
||||
// references can too, so we conservatively assume they can.
|
||||
Deref { .. } => false,
|
||||
// Inherit validity of the parent place, unless the parent is an union.
|
||||
Field { lhs, .. } => {
|
||||
|
Loading…
Reference in New Issue
Block a user