Auto merge of #113099 - bvanjoi:fix-112713-2, r=petrochenkov
fix(resolve): update the ambiguity glob binding as warning recursively Fixes #47525 Fixes #56593, but `issue-56593-2.rs` is not fixed to ensure backward compatibility. Fixes #98467 Fixes #105235 Fixes #112713 This PR had added a field called `warn_ambiguous` in `NameBinding` which is only for back compatibly reason and used for lint. More details: https://github.com/rust-lang/rust/pull/112743 r? `@petrochenkov`
This commit is contained in:
commit
2dc661037d
66 changed files with 1534 additions and 57 deletions
|
@ -1871,6 +1871,22 @@ pub fn add_elided_lifetime_in_path_suggestion(
|
|||
});
|
||||
}
|
||||
|
||||
pub fn report_ambiguity_error<'a, G: EmissionGuarantee>(
|
||||
db: &mut DiagnosticBuilder<'a, G>,
|
||||
ambiguity: rustc_lint_defs::AmbiguityErrorDiag,
|
||||
) {
|
||||
db.span_label(ambiguity.label_span, ambiguity.label_msg);
|
||||
db.note(ambiguity.note_msg);
|
||||
db.span_note(ambiguity.b1_span, ambiguity.b1_note_msg);
|
||||
for help_msg in ambiguity.b1_help_msgs {
|
||||
db.help(help_msg);
|
||||
}
|
||||
db.span_note(ambiguity.b2_span, ambiguity.b2_note_msg);
|
||||
for help_msg in ambiguity.b2_help_msgs {
|
||||
db.help(help_msg);
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Hash, Debug)]
|
||||
pub enum TerminalUrl {
|
||||
No,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue