| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Split Ty::is_empty method into is_never and is_uninhabited
|
|
Adds the `bang_type` feature gate. `!` in a non-return-type position now
relies on that feature.
|
|
These tests check for the old error messages "`return` in a function
declared as diverging" and "computation may converge in a function
declared as diverging". The first of these is now invalid as `return` is
permitted in functions that return `!`. The second of these is subsumed
by the "mismatched types" error.
|
|
Replace FnOutput with Ty
Replace FnConverging(ty) with ty
Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
|
|
|
|
[MIR] Add explicit SetDiscriminant StatementKind for deaggregating enums
cc #35186
To deaggregate enums, we need to be able to explicitly set the discriminant. This PR implements a new StatementKind that does that.
I think some of the places that have `panics!` now could maybe do something smarter.
|
|
Implement RFC 1506 "Clarify the relationships between various kinds of structs and variants"
cc https://github.com/rust-lang/rust/issues/35626
|
|
|
|
Hard errors are turned into feature gates
|
|
Err codes
r? @jonathandturner
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 23 pull requests
- Successful merges: #35279, #35331, #35358, #35375, #35445, #35448, #35482, #35486, #35505, #35528, #35530, #35532, #35536, #35537, #35541, #35552, #35554, #35555, #35557, #35562, #35565, #35569, #35576
- Failed merges: #35395, #35415, #35563
|
|
|
|
E0072 update error format
Part of #35233
Fixes #35506
r? @jonathandturner
The bonus for this issue currently seems to be impossible to do reliably, as the compiler seems to lack span information for item names alone, like `Foo` in `struct Foo { ... }`. It would be possible to hack something together by computing span offsets, but that seems like a solution that would be begging for trouble.
A proper solution to this would, of course, be to add span information to the right place (seems to be `rustc::hir::Item::name` but I may be wrong).
|
|
Update E0133 to new format
Part of #35233
Fix #35509
r? @jonathandturner
|
|
E0263 updated to new format.
Fixes #35518. Part of #35233.
r? @jonathandturner
|
|
E0128 update error format
Fixes #35508
Part of #35233
r? @jonathandturner
|
|
Update error message E0384 to new format
Part of #35233
Fixes #35184
r? @jonathandturner
|
|
Updated E0045 to new error format (no bonus)
Part of #35501
r? @jonathandturner
|
|
Update E0038 to the new error format
Part of #35233
Addresses #35500
"r? @jonathandturner
This doesn't compile yet, and I need help. In my naive solution, adding the span label makes our error message a mutable `errors::DiagnosticBuilder` pointer.
```bash
python src/bootstrap/bootstrap.py --step check-cfail E0038 --stage 1
```
```
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Compiling rustc v0.0.0 (file:///home/nash/code/rust/src/librustc)
src/librustc/traits/error_reporting.rs:735:9: 735:12 error: mismatched types [E0308]
src/librustc/traits/error_reporting.rs:735 err
^~~
src/librustc/traits/error_reporting.rs:735:9: 735:12 help: run `rustc --explain E0308` to see a detailed explanation
src/librustc/traits/error_reporting.rs:735:9: 735:12 note: expected type `core::option::Option<errors::DiagnosticBuilder<'tcx>>`
src/librustc/traits/error_reporting.rs:735:9: 735:12 note: found type `core::option::Option<&mut errors::DiagnosticBuilder<'_>>`
error: aborting due to previous error
error: Could not compile `rustc`.
To learn more, run the command again with --verbose.
command did not execute successfully: "/home/nash/code/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "-j" "4" "--target" "x86_64-unknown-linux-gnu" "--release" "--features" " jemalloc" "--manifest-path" "/home/nash/code/rust/src/rustc/Cargo.toml"
expected success, got: exit code: 101
```
|
|
Updated E0433 to new error message. (no bonus)
Part of #35345
r? @jonathandturner
|
|
Update E0008 and E0007 to new format
Part of #35233
A fix for #35496
r? @jonathandturner
|
|
Update Error Format for E0091 and E0092
Addresses [#35228](https://github.com/rust-lang/rust/issues/35228) and [#35229](https://github.com/rust-lang/rust/issues/35229) as part of [#35233](https://github.com/rust-lang/rust/issues/35233).
Please let me know if there are any issues; first time contributor.
r? @jonathandturner
|
|
Add test for issue #29053
This PR adds a test for #29053 (currently fails on stage 0, but works with stage 1, as it should).
Fixes #29053
|
|
Shrink span to variant discriminant expression for E0081
Part of #35233.
Extension of #35353.
Fixes #35224.
r? @jonathandturner
|
|
Update e0017 to new format
Updated `span_err!` to use `struct_span_err!` and provide a `span_label` that describes the error in context.
Updated the test to look for the `span_label`s that are provided now.
|
|
Update error format for E0326
Fixes #35335 as part of #35233
r? @jonathandturner
|
|
Update error format for E0130
Fixes #35256 as part of #35233
r? @jonathandturner
|
|
|
|
interface location
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rollup of 15 pull requests
- Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524
- Failed merges: #35395, #35415
|
|
|
|
Various improvements to the SVH
This fixes a few points for the SVH:
- incorporate resolve results into the SVH;
- don't include nested items.
r? @michaelwoerister
cc #32753 (not fully fixed I don't think)
|
|
We now incorporate the `def_map` and `trait_map`
results into the SVH.
|
|
|
|
|
|
r=jonathandturner
Turn on new errors and json mode
This PR is a big-switch, but on a well-worn path:
* Turns on new errors by default (and removes old skool)
* Moves json output from behind a flag
The RFC for new errors [landed](https://github.com/rust-lang/rfcs/pull/1644) and as part of that we wanted some bake time. It's now had a few weeks + all the time leading up to the RFC of people banging on it. We've also had [editors updating to the new format](https://github.com/saviorisdead/RustyCode/pull/159) and expect more to follow.
We also have an [issue on old skool](https://github.com/rust-lang/rust/issues/35330) that needs to be fixed as more errors are switched to the new style, but it seems silly to fix old skool errors when we fully intend to throw the switch in the near future.
This makes it lean towards "why not just throw the switch now, rather than waiting a couple more weeks?" I only know of vim that wanted to try to parse the new format but were not sure how, and I think we can reach out to them and work out something in the 8 weeks before this would appear in a stable release.
We've [hashed out](https://github.com/rust-lang/rust/issues/35330) stabilizing JSON output, and it seems like people are relatively happy making what we have v1 and then likely adding to it in the future. The idea is that we'd maintain backward compatibility and just add new fields as needed. We'll also work on a separate output format that'd be better suited for interactive tools like IDES (since JSON message can get a little long depending on the error).
This PR stabilizes JSON mode, allowing its use without `-Z unstable-options`
Combined, this gives editors two ways to support errors going forward: parsing the new error format or using the JSON mode. By moving JSON to stable, we can also add support to Cargo, which plugin authors tell us does help simplify their support story.
r? @nikomatsakis
cc @rust-lang/tools
Closes https://github.com/rust-lang/rust/issues/34826
|