mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Fix nits
This commit is contained in:
parent
62f9962eaf
commit
a86173766c
@ -333,7 +333,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
||||
leading_ellipsis,
|
||||
);
|
||||
|
||||
let diag = TraitPlaceholderMismatch {
|
||||
self.tcx().sess.create_err(TraitPlaceholderMismatch {
|
||||
span,
|
||||
satisfy_span,
|
||||
where_span,
|
||||
@ -341,9 +341,7 @@ impl<'tcx> NiceRegionError<'_, 'tcx> {
|
||||
def_id,
|
||||
trait_def_id: self.tcx().def_path_str(trait_def_id),
|
||||
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
|
||||
|
@ -63,7 +63,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
AssocItemContainer::ImplContainer => (false, String::new()),
|
||||
};
|
||||
|
||||
let diag = ButCallingIntroduces {
|
||||
let mut err = self.tcx().sess.create_err(ButCallingIntroduces {
|
||||
param_ty_span: param.param_ty_span,
|
||||
cause_span: cause.span,
|
||||
has_param_name: simple_ident.is_some(),
|
||||
@ -73,8 +73,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
assoc_item: ctxt.assoc_item.name,
|
||||
has_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) {
|
||||
let reported = err.emit();
|
||||
return Some(reported);
|
||||
|
Loading…
Reference in New Issue
Block a user