diff options
| author | Alexis Bourget <alexis.bourget@gmail.com> | 2021-08-10 02:00:25 +0200 |
|---|---|---|
| committer | Alexis Bourget <alexis.bourget@gmail.com> | 2021-12-13 21:36:35 +0100 |
| commit | 7bc8577d99d521ea600ede94f2a8ed3bcd6eb4fb (patch) | |
| tree | 20ddaf12b4665a22b5a53d5b77e4ab80ee335476 /compiler/rustc_parse/src/parser | |
| parent | 5cf96e70f49badf4a3085e80658a85e19ca4edda (diff) | |
| download | rust-7bc8577d99d521ea600ede94f2a8ed3bcd6eb4fb.tar.gz rust-7bc8577d99d521ea600ede94f2a8ed3bcd6eb4fb.zip | |
Fix broken span and related tests
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index ece0e6da331..46da8ead549 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -1987,7 +1987,7 @@ impl<'a> Parser<'a> { // There was no explicit visibility if matches!(orig_vis.kind, VisibilityKind::Inherited) { err.span_suggestion( - sp, + sp_start.to(self.prev_token.span), &format!("visibility `{}` must come before `{}`", vs, snippet), format!("{} {}", vs, snippet), Applicability::MachineApplicable, |
