Skip to content

Error spans for missing methods don't point at which method call it was #13709

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

Closed
larsbergstrom opened this issue Apr 23, 2014 · 2 comments · Fixed by #13713
Closed

Error spans for missing methods don't point at which method call it was #13709

larsbergstrom opened this issue Apr 23, 2014 · 2 comments · Fixed by #13713
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@larsbergstrom
Copy link
Contributor

The error span points at the start of the expression, rather than the subexpression associated with the method call. Probably not a common issue, but I'm sorting through several hundred errors like the one below during this Rust upgrade, and it certainly doesn't speed up the process when I have to figure out which get (or borrow) call it was in our often-lengthy chains of get/borrow calls.

/Users/larsberg/servo/src/components/main/layout/block.rs:1640:9: 1640:30 error: type `sync::arc::Arc<style::properties::ComputedValues>` does not implement any method in scope named `get`
/Users/larsberg/servo/src/components/main/layout/block.rs:1640         self.box_.style.get().Box.get().position
                                                                       ^~~~~~~~~~~~~~~~~~~~~
@alexcrichton
Copy link
Member

cc #9390

@edwardw
Copy link
Contributor

edwardw commented Apr 23, 2014

cc #13684

edwardw added a commit to edwardw/rust that referenced this issue Apr 23, 2014
Specifically, the method parameter cardinality mismatch or missing
method error message span now gets method itself exactly. It was the
whole expression.

Closes rust-lang#9390
Closes rust-lang#13684
Closes rust-lang#13709
bors added a commit that referenced this issue Apr 24, 2014
Specifically, the method parameter cardinality mismatch or missing
method error message span now gets method itself exactly. It was the
whole expression.

Closes #9390
Closes #13684
Closes #13709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants