implement is_accessible_span
This commit is contained in:
parent
17355a3b9f
commit
12d11e9a35
9 changed files with 16 additions and 16 deletions
|
@ -1558,7 +1558,7 @@ pub fn add_elided_lifetime_in_path_suggestion(
|
|||
insertion_span: Span,
|
||||
) {
|
||||
diag.span_label(path_span, format!("expected lifetime parameter{}", pluralize!(n)));
|
||||
if source_map.span_to_snippet(insertion_span).is_err() {
|
||||
if !source_map.is_accessible_span(insertion_span) {
|
||||
// Do not try to suggest anything if generated by a proc-macro.
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue