about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-11 12:16:20 +0000
committerbors <bors@rust-lang.org>2022-07-11 12:16:20 +0000
commit9fb32dc924653e35950f17c8d91793c9ca983d03 (patch)
tree0ffdaaeb8d72a455d04db05cf326c8c77386fbb3 /compiler/rustc_errors/src
parent7d1f57a757af4fe5d47a6f6d3167761ec61b7894 (diff)
parent21d6b1fc0e7f0bfd7296445b0ab2d29497b9929d (diff)
downloadrust-9fb32dc924653e35950f17c8d91793c9ca983d03.tar.gz
rust-9fb32dc924653e35950f17c8d91793c9ca983d03.zip
Auto merge of #99151 - Dylan-DPC:rollup-40aqkxy, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #98882 (explain doc comments in macros a bit)
 - #98907 (Deny float const params even when `adt_const_params` is enabled)
 - #99091 (Do not mention private types from other crates as impl candidates)
 - #99140 (Implement `SourceMap::is_span_accessible`)
 - #99147 (Mention similarly named associated type even if it's not clearly in supertrait)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index ffe4ecebb2e..e59a74e380a 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -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_span_accessible(insertion_span) {
         // Do not try to suggest anything if generated by a proc-macro.
         return;
     }