resolve the conflict in compiler/rustc_session/src/parse.rs
Signed-off-by: codehorseman <cricis@yeah.net>
This commit is contained in:
parent
d8e564715e
commit
01dbfb3eb2
59 changed files with 86 additions and 86 deletions
|
@ -156,7 +156,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
|
|||
// temporary holding the static pointer to avoid duplicate errors
|
||||
// <https://github.com/rust-lang/rust/pull/78068#issuecomment-731753506>.
|
||||
if decl.internal && place.projection.first() == Some(&ProjectionElem::Deref) {
|
||||
// If the projection root is an artifical local that we introduced when
|
||||
// If the projection root is an artificial local that we introduced when
|
||||
// desugaring `static`, give a more specific error message
|
||||
// (avoid the general "raw pointer" clause below, that would only be confusing).
|
||||
if let Some(box LocalInfo::StaticRef { def_id, .. }) = decl.local_info {
|
||||
|
|
|
@ -60,7 +60,7 @@ fn find_optimization_oportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Consta
|
|||
}
|
||||
}
|
||||
|
||||
let mut eligable_locals = Vec::new();
|
||||
let mut eligible_locals = Vec::new();
|
||||
for (local, mutating_uses) in visitor.local_mutating_uses.drain_enumerated(..) {
|
||||
if mutating_uses != 1 || !locals_to_debuginfo.contains(local) {
|
||||
continue;
|
||||
|
@ -78,13 +78,13 @@ fn find_optimization_oportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Consta
|
|||
&bb.statements[location.statement_index].kind
|
||||
{
|
||||
if let Some(local) = p.as_local() {
|
||||
eligable_locals.push((local, *c));
|
||||
eligible_locals.push((local, *c));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eligable_locals
|
||||
eligible_locals
|
||||
}
|
||||
|
||||
impl Visitor<'_> for LocalUseVisitor {
|
||||
|
|
|
@ -359,7 +359,7 @@ fn verify_candidate_branch<'tcx>(
|
|||
if branch.statements.len() != 1 {
|
||||
return false;
|
||||
}
|
||||
// ...assign the descriminant of `place` in that statement
|
||||
// ...assign the discriminant of `place` in that statement
|
||||
let StatementKind::Assign(boxed) = &branch.statements[0].kind else {
|
||||
return false
|
||||
};
|
||||
|
|
|
@ -362,7 +362,7 @@ fn optimization_applies<'tcx>(
|
|||
return false;
|
||||
} else if last_assigned_to != opt_info.local_tmp_s1 {
|
||||
trace!(
|
||||
"NO: end of assignemnt chain does not match written enum temp: {:?} != {:?}",
|
||||
"NO: end of assignment chain does not match written enum temp: {:?} != {:?}",
|
||||
last_assigned_to,
|
||||
opt_info.local_tmp_s1
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue