Skip to content

Commit 45f2a1a

Browse files
committed
Document borrowck behaviour.
1 parent b34a8a2 commit 45f2a1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_borrowck/src/def_use.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
7272
PlaceContext::MutatingUse(MutatingUseContext::Drop) =>
7373
Some(DefUse::Drop),
7474

75+
// This statement exists to help unsafeck. It does not require the place to be live.
76+
PlaceContext::NonUse(NonUseContext::PlaceMention) => None,
7577
// Debug info is neither def nor use.
76-
PlaceContext::NonUse(NonUseContext::PlaceMention | NonUseContext::VarDebugInfo) => None,
78+
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
7779

7880
PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
7981
bug!("These statements are not allowed in this MIR phase")

0 commit comments

Comments
 (0)