implement is_accessible_span
This commit is contained in:
parent
17355a3b9f
commit
12d11e9a35
9 changed files with 16 additions and 16 deletions
|
@ -432,7 +432,7 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
|
|||
"`let` bindings require an \"irrefutable pattern\", like a `struct` or \
|
||||
an `enum` with only one variant",
|
||||
);
|
||||
if self.tcx.sess.source_map().span_to_snippet(span).is_ok() {
|
||||
if self.tcx.sess.source_map().is_accessible_span(span) {
|
||||
let semi_span = span.shrink_to_hi().with_lo(span.hi() - BytePos(1));
|
||||
let start_span = span.shrink_to_lo();
|
||||
let end_span = semi_span.shrink_to_lo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue