Skip to content

Old school errors not showing labels as notes #35330

Description

@sophiajt

Originally, we had intended that old school errors would treat most labels as notes just so we would have similar information between the two formats. With the latest refactor, this seems to have been removed.

This may or may not be related: https://gist.github.com/trixnz/ad11e68687529e164427df8f8eb63116

error[E0507]: cannot move out of borrowed content
  --> src/test/compile-fail/borrowck/borrowck-move-out-of-vec-tail.rs:30:17
   |
30 |                 &[Foo { string: a },
   |                 ^               - hint: to prevent move, use `ref a` or `ref mut a`
   |                 |
   |                 cannot move out of borrowed content
...
34 |                   Foo { string: b }] => {
   |                                 - ...and here (use `ref b` or `ref mut b`)

error: aborting due to previous error

Same error after unset RUST_NEW_ERROR_FORMAT

jturner-23759:rust jturner$ rustc src/test/compile-fail/borrowck/borrowck-move-out-of-vec-tail.rs 
src/test/compile-fail/borrowck/borrowck-move-out-of-vec-tail.rs:30:17: 34:37 error: cannot move out of borrowed content [E0507]
src/test/compile-fail/borrowck/borrowck-move-out-of-vec-tail.rs:30                 &[Foo { string: a },
                                                                                   ^               ^
src/test/compile-fail/borrowck/borrowck-move-out-of-vec-tail.rs:30:17: 34:37 help: run `rustc --explain E0507` to see a detailed explanation
error: aborting due to previous error 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lints

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions