Fix broken span and related tests
This commit is contained in:
parent
5cf96e70f4
commit
7bc8577d99
4 changed files with 17 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue