Fix nits
This commit is contained in:
parent
62f9962eaf
commit
a86173766c
2 changed files with 4 additions and 7 deletions
|
@ -333,7 +333,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
||||||
leading_ellipsis,
|
leading_ellipsis,
|
||||||
);
|
);
|
||||||
|
|
||||||
let diag = TraitPlaceholderMismatch {
|
self.tcx().sess.create_err(TraitPlaceholderMismatch {
|
||||||
span,
|
span,
|
||||||
satisfy_span,
|
satisfy_span,
|
||||||
where_span,
|
where_span,
|
||||||
|
@ -341,9 +341,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
||||||
def_id,
|
def_id,
|
||||||
trait_def_id: self.tcx().def_path_str(trait_def_id),
|
trait_def_id: self.tcx().def_path_str(trait_def_id),
|
||||||
actual_impl_expl_notes,
|
actual_impl_expl_notes,
|
||||||
};
|
})
|
||||||
|
|
||||||
self.tcx().sess.create_err(diag)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add notes with details about the expected and actual trait refs, with attention to cases
|
/// Add notes with details about the expected and actual trait refs, with attention to cases
|
||||||
|
|
|
@ -63,7 +63,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||||
AssocItemContainer::ImplContainer => (false, String::new()),
|
AssocItemContainer::ImplContainer => (false, String::new()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let diag = ButCallingIntroduces {
|
let mut err = self.tcx().sess.create_err(ButCallingIntroduces {
|
||||||
param_ty_span: param.param_ty_span,
|
param_ty_span: param.param_ty_span,
|
||||||
cause_span: cause.span,
|
cause_span: cause.span,
|
||||||
has_param_name: simple_ident.is_some(),
|
has_param_name: simple_ident.is_some(),
|
||||||
|
@ -73,8 +73,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||||
assoc_item: ctxt.assoc_item.name,
|
assoc_item: ctxt.assoc_item.name,
|
||||||
has_impl_path,
|
has_impl_path,
|
||||||
impl_path,
|
impl_path,
|
||||||
};
|
});
|
||||||
let mut err = self.tcx().sess.create_err(diag);
|
|
||||||
if self.find_impl_on_dyn_trait(&mut err, param.param_ty, &ctxt) {
|
if self.find_impl_on_dyn_trait(&mut err, param.param_ty, &ctxt) {
|
||||||
let reported = err.emit();
|
let reported = err.emit();
|
||||||
return Some(reported);
|
return Some(reported);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue