mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Document borrowck behaviour.
This commit is contained in:
parent
b34a8a294d
commit
45f2a1af3b
@ -72,8 +72,10 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Drop) =>
|
||||
Some(DefUse::Drop),
|
||||
|
||||
// This statement exists to help unsafeck. It does not require the place to be live.
|
||||
PlaceContext::NonUse(NonUseContext::PlaceMention) => None,
|
||||
// Debug info is neither def nor use.
|
||||
PlaceContext::NonUse(NonUseContext::PlaceMention | NonUseContext::VarDebugInfo) => None,
|
||||
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
|
||||
|
||||
PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
|
||||
bug!("These statements are not allowed in this MIR phase")
|
||||
|
Loading…
Reference in New Issue
Block a user