Rollup merge of #102670 - lyming2007:issue-101866-fix, r=compiler-errors
follow-up fix about 101866 to print the self type. modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs modified: src/test/ui/error-codes/E0283.stderr modified: src/test/ui/error-codes/E0790.stderr modified: src/test/ui/traits/static-method-generic-inference.stderr modified: src/test/ui/type/issue-101866.stderr
This commit is contained in:
commit
8dea87d9f4
5 changed files with 16 additions and 16 deletions
|
@ -2265,7 +2265,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
|
|||
};
|
||||
let mut suggestions = vec![(
|
||||
trait_path_segment.ident.span.shrink_to_lo(),
|
||||
format!("<{} as ", self.tcx.def_path(impl_def_id).to_string_no_crate_verbose())
|
||||
format!("<{} as ", self.tcx.type_of(impl_def_id))
|
||||
)];
|
||||
if let Some(generic_arg) = trait_path_segment.args {
|
||||
let between_span = trait_path_segment.ident.span.between(generic_arg.span_ext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue