Skip to content
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

"Old school" error mode is now missing information first/second borrow #33543

Closed
sophiajt opened this issue May 10, 2016 · 3 comments
Closed
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@sophiajt
Copy link
Contributor

sophiajt commented May 10, 2016

From #33240 (comment):

Using nightly (rustc 1.10.0-nightly (e0fd34b 2016-05-09)) on this snippet https://is.gd/jP3UYZ has less helpful error messages than stable when not using RUST_NEW_ERROR_FORMAT? E.g.

x.rs:4:15: 4:16 error: cannot borrow `a` as mutable more than once at a time [E0499]
x.rs:4  let c = &mut a;
                     ^
x.rs:4  let b = &mut a;
                     ^
x.rs:4 }
       ^

Third, tabs seem to be broken on the old error messages? I'm pretty sure they used to work E.g.

src/main.rs:79:35: 79:53 error: failed to resolve. Use of undeclared type or module `mem` [E0433]
src/main.rs:79          Moveable { v: Box::new(unsafe { mem::uninitialized() }) }
                                                 ^~~~~~~~~~~~~~~~~~
@sophiajt sophiajt self-assigned this May 10, 2016
@sophiajt sophiajt mentioned this issue May 10, 2016
10 tasks
@sanxiyn
Copy link
Member

sanxiyn commented May 11, 2016

span_label is not handled in old format.

@nagisa
Copy link
Member

nagisa commented May 11, 2016

NOTE: I added the code block formatting to the original report.

@nagisa nagisa added the A-diagnostics Area: Messages for errors, warnings, and lints label May 11, 2016
bors added a commit that referenced this issue May 19, 2016
Fix for old school error issues, improvements to new school

This PR:
* Fixes some old school error issues, specifically #33559, #33543, #33366
* Improves wording borrowck errors with match patterns
* De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here"
* Rollup of #33392 (which should help fix #33390)

r? @nikomatsakis
@sophiajt
Copy link
Contributor Author

This should be fixed with #33688

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

No branches or pull requests

3 participants