Closed
Description
Code
src/main.rs:
mod m;
fn main() {
let s = m::S;
s.method();
}
src/m.rs:
pub struct S;
impl S {
fn method(&self) {}
}
Current output
error[E0624]: associated function `method` is private
--> src/main.rs:4:4
|
4 | s.method();
| ^^^^^^ private associated function
|
::: src/m.rs:3:9
|
3 | fn method(&self) {}
| ---------------- private associated function defined here
Desired output
error[E0624]: associated function `method` is private
--> src/main.rs:4:4
|
4 | s.method();
| ^^^^^^ private associated function
|
::: src/m.rs:3:3
|
3 | fn method(&self) {}
| ---------------- private associated function defined here
Rationale and extra context
for the error in main.rs
, rust gives the column number as a "character index" (i.e. the error is located at the 4th character in the line) which i think is the intended behavior, but for the reference to m.rs
, it seems to be treating a tab as 4 columns
Other cases
No response
Anything else?
No response