Skip to content

More accurate spans, season 3 #11599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2014
Merged

Conversation

sanxiyn
Copy link
Member

@sanxiyn sanxiyn commented Jan 16, 2014

No description provided.

@sanxiyn
Copy link
Member Author

sanxiyn commented Jan 16, 2014

Given

fn f(_: &int) {}
fn g(x: int) -> int { x }
fn main() {
    let v = ~[0];
    f(~g(0));
    f(~v[0]);
}

Before:

span.rs:5     f(~g(0));
                ^~~~~~
span.rs:6     f(~v[0]);
                ^~~~

After:

span.rs:5     f(~g(0));
                ^~~~~
span.rs:6     f(~v[0]);
                ^~~~~

That is, ExprCall had one token more, and ExprIndex had one token less.

@brson
Copy link
Contributor

brson commented Jan 16, 2014

Way to pay attention to detail, @sanxiyn!

@bors bors closed this Jan 16, 2014
@bors bors merged commit 1f5dc55 into rust-lang:master Jan 16, 2014
@sanxiyn sanxiyn deleted the accurate-span-3 branch January 17, 2014 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants