1
Fork 0

Rollup merge of #112232 - fee1-dead-contrib:match-eq-const-msg, r=b-naber

Better error for non const `PartialEq` call generated by `match`

Resolves #90237
This commit is contained in:
Michael Goulet 2023-06-19 17:53:33 -07:00 committed by GitHub
commit 31d1fbf8d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 211 additions and 100 deletions

View file

@ -654,7 +654,7 @@ where
destination: unit_temp,
target: Some(succ),
unwind: unwind.into_action(),
from_hir_call: true,
call_source: CallSource::Misc,
fn_span: self.source_info.span,
},
source_info: self.source_info,

View file

@ -502,15 +502,7 @@ impl Direction for Forward {
propagate(target, exit_state);
}
Call {
unwind,
destination,
target,
func: _,
args: _,
from_hir_call: _,
fn_span: _,
} => {
Call { unwind, destination, target, func: _, args: _, call_source: _, fn_span: _ } => {
if let UnwindAction::Cleanup(unwind) = unwind {
propagate(unwind, exit_state);
}

View file

@ -40,7 +40,7 @@ fn mock_body<'tcx>() -> mir::Body<'tcx> {
destination: dummy_place.clone(),
target: Some(mir::START_BLOCK),
unwind: mir::UnwindAction::Continue,
from_hir_call: false,
call_source: mir::CallSource::Misc,
fn_span: DUMMY_SP,
},
);
@ -54,7 +54,7 @@ fn mock_body<'tcx>() -> mir::Body<'tcx> {
destination: dummy_place.clone(),
target: Some(mir::START_BLOCK),
unwind: mir::UnwindAction::Continue,
from_hir_call: false,
call_source: mir::CallSource::Misc,
fn_span: DUMMY_SP,
},
);

View file

@ -399,7 +399,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
destination,
target,
unwind: _,
from_hir_call: _,
call_source: _,
fn_span: _,
} => {
self.gather_operand(func);