-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Rollup of 6 pull requests #119237
Rollup of 6 pull requests #119237
Commits on Dec 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 6959818 - Browse repository at this point
Copy the full SHA 6959818View commit details -
Configuration menu - View commit details
-
Copy full SHA for f116bc6 - Browse repository at this point
Copy the full SHA f116bc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for b525f76 - Browse repository at this point
Copy the full SHA b525f76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8facfb2 - Browse repository at this point
Copy the full SHA 8facfb2View commit details
Commits on Dec 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7a246dd - Browse repository at this point
Copy the full SHA 7a246ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d36e3a - Browse repository at this point
Copy the full SHA 1d36e3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b487775 - Browse repository at this point
Copy the full SHA b487775View commit details -
Configuration menu - View commit details
-
Copy full SHA for 532080c - Browse repository at this point
Copy the full SHA 532080cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba430a3 - Browse repository at this point
Copy the full SHA ba430a3View commit details
Commits on Dec 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 8e34391 - Browse repository at this point
Copy the full SHA 8e34391View commit details -
Configuration menu - View commit details
-
Copy full SHA for acb6f17 - Browse repository at this point
Copy the full SHA acb6f17View commit details -
Configuration menu - View commit details
-
Copy full SHA for aaa3e76 - Browse repository at this point
Copy the full SHA aaa3e76View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6aa16c - Browse repository at this point
Copy the full SHA c6aa16cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f6af747 - Browse repository at this point
Copy the full SHA f6af747View commit details -
Clarify the situation with dummy patterns and
PatData
Use an explicit `Option` instead of requiring a `Default` bound
Configuration menu - View commit details
-
Copy full SHA for 5fccaee - Browse repository at this point
Copy the full SHA 5fccaeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0044505 - Browse repository at this point
Copy the full SHA 0044505View commit details
Commits on Dec 23, 2023
-
There is room for improvement on some of these, but something is better than nothing.
Configuration menu - View commit details
-
Copy full SHA for c8c1615 - Browse repository at this point
Copy the full SHA c8c1615View commit details -
We can just get the error level in the `match` and then use `DiagnosticBuilder::new`. This then means a number of `DiagCtxt` functions are no longer needed, because this was the one place that used them. Note: the commit changes the treatment of spans for `Expect`, which was different to all the other cases, but this has no apparent effect.
Configuration menu - View commit details
-
Copy full SHA for de303b8 - Browse repository at this point
Copy the full SHA de303b8View commit details -
Improve
use
items incompiler/rustc_errors/src/lib.rs
.There are a bunch of them about 400 lines down, which is weird and annoying. This commit moves them up and puts them in a more sensible order.
Configuration menu - View commit details
-
Copy full SHA for 1b36958 - Browse repository at this point
Copy the full SHA 1b36958View commit details -
Configuration menu - View commit details
-
Copy full SHA for aec78dd - Browse repository at this point
Copy the full SHA aec78ddView commit details -
`IntoDiagnostic` defaults to `G = ErrorGuaranteed`. Take advantage of this in one place that currently doesn't.
Configuration menu - View commit details
-
Copy full SHA for 6257f3b - Browse repository at this point
Copy the full SHA 6257f3bView commit details -
Give
DiagnosticBuilder
a default type.`IntoDiagnostic` defaults to `ErrorGuaranteed`, because errors are the most common diagnostic level. It makes sense to do likewise for the closely-related (and much more widely used) `DiagnosticBuilder` type, letting us write `DiagnosticBuilder<'a, ErrorGuaranteed>` as just `DiagnosticBuilder<'a>`. This cuts over 200 lines of code due to many multi-line things becoming single line things.
Configuration menu - View commit details
-
Copy full SHA for 757d6f6 - Browse repository at this point
Copy the full SHA 757d6f6View commit details -
- Take a `Vec` instead of an iterator, because that's all that is needed. - Do an early return for the "no bugs" case. - Use `enumerate` and an `i == 0` test to identify the first bug. Those changes mean the `no_bug` variable can be removed, which I found hard to read.
Configuration menu - View commit details
-
Copy full SHA for a108a3b - Browse repository at this point
Copy the full SHA a108a3bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f147af - Browse repository at this point
Copy the full SHA 6f147afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1502596 - Browse repository at this point
Copy the full SHA 1502596View commit details -
Remove
DiagCtxtInner::span_bug
.`DiagCtxt::span_bug` is different to the other `DiagCtxt::span_*` methods. This commit makes it the same, which requires changing `DiagCtxt::span_delayed_bug` to not do everything within the `inner.borrow_mut()`.
Configuration menu - View commit details
-
Copy full SHA for 1f08bfa - Browse repository at this point
Copy the full SHA 1f08bfaView commit details -
Rename
EarlyDiagCtxt
methods to matchDiagCtxt
.- `early_error_no_abort` -> `early_err` - `early_error` -> `early_fatal` - `early_struct_error` -> `early_struct_fatal`
Configuration menu - View commit details
-
Copy full SHA for 3a1b8e6 - Browse repository at this point
Copy the full SHA 3a1b8e6View commit details -
Remove
Diagnostic::new_with_code
.Its single use can be replaced with `Diagnostic::new_with_messages`.
Configuration menu - View commit details
-
Copy full SHA for d7a3b62 - Browse repository at this point
Copy the full SHA d7a3b62View commit details -
Lots of vectors of messages called `message` or `msg`. This commit pluralizes them. Note that `emit_message_default` and `emit_messages_default` both already existed, and both process a vector, so I renamed the former `emit_messages_default_inner` because it's called by the latter.
Configuration menu - View commit details
-
Copy full SHA for 824667f - Browse repository at this point
Copy the full SHA 824667fView commit details -
Remove
render_span
args fromDiagnostic::{sub,sub_with_highlight}
.They're always `None`.
Configuration menu - View commit details
-
Copy full SHA for 125337b - Browse repository at this point
Copy the full SHA 125337bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce0f703 - Browse repository at this point
Copy the full SHA ce0f703View commit details -
It has three variants, but only `LabelKind::Label` is ever used. This means `SingleLabelManySpans::kind` can also be removed.
Configuration menu - View commit details
-
Copy full SHA for 49040d0 - Browse repository at this point
Copy the full SHA 49040d0View commit details -
Take full advantage of a
use Level::*;
.Some of the `Level::` qualifiers in this file are omitted. This commit removes the remainder.
Configuration menu - View commit details
-
Copy full SHA for e0461f9 - Browse repository at this point
Copy the full SHA e0461f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3944301 - Browse repository at this point
Copy the full SHA 3944301View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81f50fd - Browse repository at this point
Copy the full SHA 81f50fdView commit details -
There are quite a few hand-written `IntoDiagnostic` impls.
Configuration menu - View commit details
-
Copy full SHA for 3db58e6 - Browse repository at this point
Copy the full SHA 3db58e6View commit details -
Remove all uses of
DiagnosticBuilder::forget_guarantee()
.There are only three. It's simpler to make the type `DiagnosticBuilder<'_, ()>` from the start, no matter the level, than to change the guarantee later.
Configuration menu - View commit details
-
Copy full SHA for 00e8485 - Browse repository at this point
Copy the full SHA 00e8485View commit details -
Remove
DiagnosticBuilder::forget_guarantee
.It's unused. And this means `DiagnosticBuilderInner` no longer needs to be separate from `DiagnosticBuilder`.
Configuration menu - View commit details
-
Copy full SHA for 2cd14bc - Browse repository at this point
Copy the full SHA 2cd14bcView commit details -
Rollup merge of rust-lang#119012 - workingjubilee:extract-enum-layout…
…-fn, r=b-naber Extract `layout_of_{struct,enum}` fn While writing rust-lang#118974 I noticed it was annoying to navigate a huge, several hundred line function, which handles many subcases, and make confident declarations about what part of the flow of execution the compiler would be in. To help with that, this breaks out `layout_of_struct_or_enum`'s fundamental logic into a pair of functions, one for each case. It changes essentially none of that logic, merely moves it around. Because "the layout of an ADT" feels like a somewhat nebulous subject, I chose to deliberately avoid any expansions to LayoutCalculator's public API, though such does feel like a possible logical next step. There are, indeed, many logical next steps. I'm not taking any of them here, yet, because this comparatively tiny refactor is a prerequisite for all of them.
Configuration menu - View commit details
-
Copy full SHA for aaff415 - Browse repository at this point
Copy the full SHA aaff415View commit details -
Rollup merge of rust-lang#119077 - tmiasko:lint, r=cjgillot
Separate MIR lints from validation Add a MIR lint pass, enabled with -Zlint-mir, which identifies undefined or likely erroneous behaviour. The initial implementation mostly migrates existing checks of this nature from MIR validator, where they did not belong (those checks have false positives and there is nothing inherently invalid about MIR with undefined behaviour). Fixes rust-lang#104736 Fixes rust-lang#104843 Fixes rust-lang#116079 Fixes rust-lang#116736 Fixes rust-lang#118990
Configuration menu - View commit details
-
Copy full SHA for 7dd0955 - Browse repository at this point
Copy the full SHA 7dd0955View commit details -
Rollup merge of rust-lang#119171 - nnethercote:cleanup-errors-4, r=co…
…mpiler-errors Cleanup error handlers: round 4 More `rustc_errors` cleanups. A sequel to rust-lang#118933. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for e0d7a72 - Browse repository at this point
Copy the full SHA e0d7a72View commit details -
Rollup merge of rust-lang#119198 - compiler-errors:desugaring, r=eholk
Split coroutine desugaring kind from source What a coroutine is desugared from (gen/async gen/async) should be separate from where it comes (fn/block/closure).
Configuration menu - View commit details
-
Copy full SHA for ae0a6e8 - Browse repository at this point
Copy the full SHA ae0a6e8View commit details -
Rollup merge of rust-lang#119222 - eholk:into-async-iterator, r=compi…
…ler-errors,dtolnay Add `IntoAsyncIterator` This introduces the `IntoAsyncIterator` trait and uses it in the desugaring of the unstable `for await` loop syntax. This is mostly added for symmetry with `Iterator` and `IntoIterator`. r? `@compiler-errors` cc `@rust-lang/libs-api,` `@rust-lang/wg-async`
Configuration menu - View commit details
-
Copy full SHA for eef023c - Browse repository at this point
Copy the full SHA eef023cView commit details -
Rollup merge of rust-lang#119230 - Nadrieril:librarify-even-further, …
…r=compiler-errors Exhaustiveness: clean up after librarification This cleans up some things that weren't done nicely by rust-lang#118842. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for 8c50e3e - Browse repository at this point
Copy the full SHA 8c50e3eView commit details