Use ensure
when the result of the query is not needed beyond its Result
ness
This commit is contained in:
parent
870a01a30e
commit
aa6f45eb79
2 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ pub fn check_legal_trait_for_method_call(
|
||||||
};
|
};
|
||||||
return Err(tcx.dcx().emit_err(errors::ExplicitDestructorCall { span, sugg }));
|
return Err(tcx.dcx().emit_err(errors::ExplicitDestructorCall { span, sugg }));
|
||||||
}
|
}
|
||||||
tcx.coherent_trait(trait_id)
|
tcx.ensure().coherent_trait(trait_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -446,7 +446,7 @@ fn report_conflicting_impls<'tcx>(
|
||||||
match used_to_be_allowed {
|
match used_to_be_allowed {
|
||||||
None => {
|
None => {
|
||||||
let reported = if overlap.with_impl.is_local()
|
let reported = if overlap.with_impl.is_local()
|
||||||
|| tcx.orphan_check_impl(impl_def_id).is_ok()
|
|| tcx.ensure().orphan_check_impl(impl_def_id).is_ok()
|
||||||
{
|
{
|
||||||
let mut err = tcx.dcx().struct_span_err(impl_span, msg);
|
let mut err = tcx.dcx().struct_span_err(impl_span, msg);
|
||||||
err.code(E0119);
|
err.code(E0119);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue