implement is_accessible_span
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user