-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Output previous stable error messaging when using stable build. #65893
Output previous stable error messaging when using stable build. #65893
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
r? @Centril |
I forgot to undo the text change to the nightly feature error output which resulted in the majority of the test failures. At the time I was experimenting with building the compiler and figuring out how it came together. I removed that text to try and see a change in the compiler output with the local crate I was compiling and running. I just put that text back in there. I'd like to add in a test to ensure nightly vs stable error output. You think this is worth it at all @Centril ? It would make the promoting process to fully stable a little bit more involved. Not sure what your best practices are here. |
This is good; better actually! -- the old message only highlighted the
@estebank Do we have any way of forcing a compiler to believe it's a stable compiler for testing purposes via some command line flag or something? Otherwise I don't think we can test the difference. |
@Centril, sadly I don't think we do. You can change the target of your build to test locally, but I haven't seen any tests actually testing what things look in stable (although we do have stable/nightly output differences which we should test). |
88eaf05
to
f1aa8b2
Compare
Fixed the nit and squashed the commits. |
Thanks! @bors r+ rollup |
📌 Commit f1aa8b2 has been approved by |
…aging, r=Centril Output previous stable error messaging when using stable build. Fixes rust-lang#65254 As I had mentioned previously there I have the logic running right now however I'm not getting the exact same syntax highlighting as there was originally for this error. I'm currently getting the following: ``` error: expected expression, found statement (`let`) --> src/main.rs:2:14 | 2 | let x = (let y = 6); | ^^^^^^^^^ | = note: variable declaration using `let` is a statement ``` I'd like to get the following instead: ``` | let x = (let y = 6); | ^^^ ``` My current understanding is that the `span` being passed into `lower_expr_let` is coming from `lowering.rs`. I still don't know how the byte range is calculated for the erroneous syntax and need to look into it a bit more. In the meantime does anybody have any hints/tips regarding this??
Rollup of 9 pull requests Successful merges: - #65563 (Add long error explanation for E0587) - #65640 (Use heuristics to recover parsing of missing `;`) - #65643 (Correct handling of type flags with `ConstValue::Placeholder`) - #65825 (rustc: use IndexVec<DefIndex, T> instead of Vec<T>.) - #65858 (suggest `const_in_array_repeat_expression` flag) - #65877 (doc: introduce `once` in `iter::chain` document) - #65887 (doc: mention `get(_mut)` in Vec) - #65891 (self-profiling: Record something more useful for crate metadata generation event.) - #65893 (Output previous stable error messaging when using stable build.) Failed merges: r? @ghost
Fixes #65254
As I had mentioned previously there I have the logic running right now however I'm not getting the exact same syntax highlighting as there was originally for this error.
I'm currently getting the following:
I'd like to get the following instead:
My current understanding is that the
span
being passed intolower_expr_let
is coming fromlowering.rs
. I still don't know how the byte range is calculated for the erroneous syntax and need to look into it a bit more. In the meantime does anybody have any hints/tips regarding this??