-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create AnnotationColumn struct to fix hard tab column numbers in errors
- Loading branch information
Showing
6 changed files
with
117 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// ignore-tidy-tab | ||
|
||
pub struct S; | ||
impl S { | ||
fn method(&self) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Test for #109537: ensure that column numbers are correctly generated when using hard tabs. | ||
// aux-build:tab_column_numbers.rs | ||
|
||
// ignore-tidy-tab | ||
|
||
extern crate tab_column_numbers; | ||
|
||
fn main() { | ||
let s = tab_column_numbers::S; | ||
s.method(); | ||
//~^ ERROR method `method` is private | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0624]: method `method` is private | ||
--> $DIR/tab-column-numbers.rs:10:4 | ||
| | ||
LL | s.method(); | ||
| ^^^^^^ private method | ||
| | ||
::: $DIR/auxiliary/tab_column_numbers.rs:5:3 | ||
| | ||
LL | fn method(&self) {} | ||
| ---------------- private method defined here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0624`. |