-
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 8 pull requests #121415
Rollup of 8 pull requests #121415
Commits on Feb 20, 2024
-
triagebot: add queue notifications
Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for e5fa6ec - Browse repository at this point
Copy the full SHA e5fa6ecView commit details
Commits on Feb 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e134102 - Browse repository at this point
Copy the full SHA e134102View commit details -
Consistently refer to a test's
revision
instead ofcfg
Compiletest code sometimes refers to a test's revision as its `cfg`. This results in two different names for the same thing, one of which is ambiguous with other kinds of configuration (such as compiletest's own config). This patch replaces those occurrences of `cfg` with `revision`.
Configuration menu - View commit details
-
Copy full SHA for 99fb653 - Browse repository at this point
Copy the full SHA 99fb653View commit details -
Configuration menu - View commit details
-
Copy full SHA for 544d091 - Browse repository at this point
Copy the full SHA 544d091View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec91209 - Browse repository at this point
Copy the full SHA ec91209View commit details -
Configuration menu - View commit details
-
Copy full SHA for c40261d - Browse repository at this point
Copy the full SHA c40261dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a83b27 - Browse repository at this point
Copy the full SHA 3a83b27View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e0e5b1 - Browse repository at this point
Copy the full SHA 5e0e5b1View commit details -
Unify dylib loading between proc macros and codegen backends
As bonus this makes the errors when failing to load a proc macro more informative to match the backend loading errors. In addition it makes it slightly easier to patch rustc to work on platforms that don't support dynamic linking like wasm.
Configuration menu - View commit details
-
Copy full SHA for f25c90a - Browse repository at this point
Copy the full SHA f25c90aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a17211b - Browse repository at this point
Copy the full SHA a17211bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a233b16 - Browse repository at this point
Copy the full SHA a233b16View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8fbb70 - Browse repository at this point
Copy the full SHA f8fbb70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e16927 - Browse repository at this point
Copy the full SHA 1e16927View commit details -
Configuration menu - View commit details
-
Copy full SHA for 203b433 - Browse repository at this point
Copy the full SHA 203b433View commit details -
Remove
EarlyDiagCtxt::abort_if_errors
.Its one use isn't necessary, because it's not possible for errors to have been emitted at that point.
Configuration menu - View commit details
-
Copy full SHA for 9919c3d - Browse repository at this point
Copy the full SHA 9919c3dView commit details -
Adjust the
has_errors*
methods.Currently `has_errors` excludes lint errors. This commit changes it to include lint errors. The motivation for this is that for most places it doesn't matter whether lint errors are included or not. But there are multiple places where they must be includes, and only one place where they must not be included. So it makes sense for `has_errors` to do the thing that fits the most situations, and the new `has_errors_excluding_lint_errors` method in the one exceptional place. The same change is made for `err_count`. Annoyingly, this requires the introduction of `err_count_excluding_lint_errs` for one place, to preserve existing error printing behaviour. But I still think the change is worthwhile overall.
Configuration menu - View commit details
-
Copy full SHA for 46f4983 - Browse repository at this point
Copy the full SHA 46f4983View commit details -
Overhaul the handling of errors at the top-level.
Currently `emit_stashed_diagnostic` is called from four(!) different places: `print_error_count`, `DiagCtxtInner::drop`, `abort_if_errors`, and `compile_status`. And `flush_delayed` is called from two different places: `DiagCtxtInner::drop` and `Queries`. This is pretty gross! Each one should really be called from a single place, but there's a bunch of entanglements. This commit cleans up this mess. Specifically, it: - Removes all the existing calls to `emit_stashed_diagnostic`, and adds a single new call in `finish_diagnostics`. - Removes the early `flush_delayed` call in `codegen_and_build_linker`, replacing it with a simple early return if delayed bugs are present. - Changes `DiagCtxtInner::drop` and `DiagCtxtInner::flush_delayed` so they both assert that the stashed diagnostics are empty (i.e. processed beforehand). - Changes `interface::run_compiler` so that any errors emitted during `finish_diagnostics` (i.e. late-emitted stashed diagnostics) are counted and cannot be overlooked. This requires adding `ErrorGuaranteed` return values to several functions. - Removes the `stashed_err_count` call in `analysis`. This is possible now that we don't have to worry about calling `flush_delayed` early from `codegen_and_build_linker` when stashed diagnostics are pending. - Changes the `span_bug` case in `handle_tuple_field_pattern_match` to a `delayed_span_bug`, because it now can be reached due to the removal of the `stashed_err_count` call in `analysis`. - Slightly changes the expected output of three tests. If no errors are emitted but there are delayed bugs, the error count is no longer printed. This is because delayed bugs are now always printed after the error count is printed (or not printed, if the error count is zero). There is a lot going on in this commit. It's hard to break into smaller pieces because the existing code is very tangled. It took me a long time and a lot of effort to understand how the different pieces interact, and I think the new code is a lot simpler and easier to understand.
Configuration menu - View commit details
-
Copy full SHA for 72b172b - Browse repository at this point
Copy the full SHA 72b172bView commit details -
Inline and remove
Session::compile_status
.Because it's now simple enough that it doesn't provide much benefit.
Configuration menu - View commit details
-
Copy full SHA for c2512a1 - Browse repository at this point
Copy the full SHA c2512a1View commit details -
It currently is infallible and uses `abort_if_errors` and `FatalError.raise()` to signal errors. It's easy to instead return a `Result<_, ErrorGuaranteed>`, which is the more usual way of doing things.
Configuration menu - View commit details
-
Copy full SHA for 4400644 - Browse repository at this point
Copy the full SHA 4400644View commit details -
Replace unnecessary
abort_if_errors
.Replace `abort_if_errors` calls that are certain to abort -- because we emit an error immediately beforehand -- with `FatalErro.raise()`.
Configuration menu - View commit details
-
Copy full SHA for 4da67ff - Browse repository at this point
Copy the full SHA 4da67ffView commit details -
Inline and remove
abort_on_err
.It's clumsy and doesn't improve readability.
Configuration menu - View commit details
-
Copy full SHA for f16c226 - Browse repository at this point
Copy the full SHA f16c226View commit details -
Rollup merge of rust-lang#121206 - nnethercote:top-level-error-handli…
…ng, r=oli-obk Top level error handling The interactions between the following things are surprisingly complicated: - `emit_stashed_diagnostics`, - `flush_delayed`, - normal return vs `abort_if_errors`/`FatalError.raise()` unwinding in the call to the closure in `interface::run_compiler`. This PR disentangles it all. r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 5c89029 - Browse repository at this point
Copy the full SHA 5c89029View commit details -
Rollup merge of rust-lang#121261 - Zalathar:pending-dups, r=oli-obk
coverage: Remove `pending_dups` from the span refiner When extracting coverage spans from a function's MIR, we need to decide how to handle spans that are associated with more than one node (BCB) in the coverage control flow graph. The existing code for managing those duplicate spans is very subtle and difficult to modify. But by eagerly deduplicating those extracted spans in a much simpler way, we can remove a massive chunk of complexity from the span refiner. There is a tradeoff here, in that we no longer try to retain *all* nondominating BCBs that have the same span, only the last one in the (semi-arbitrary) dominance ordering. But in practice, this produces very little difference in our coverage tests, and the simplification is so significant that I think it's worthwhile. ``@rustbot`` label +A-code-coverage
Configuration menu - View commit details
-
Copy full SHA for 9949bbc - Browse repository at this point
Copy the full SHA 9949bbcView commit details -
Rollup merge of rust-lang#121336 - davidtwco:triagebot-notifications,…
… r=wesleywiser triagebot: add queue notifications This seems like it could be useful. r? ``@wesleywiser``
Configuration menu - View commit details
-
Copy full SHA for 7189985 - Browse repository at this point
Copy the full SHA 7189985View commit details -
Rollup merge of rust-lang#121373 - Zalathar:test-revision, r=oli-obk
Consistently refer to a test's `revision` instead of `cfg` Compiletest allows a test file to specify multiple “revisions” (`//@ revisions: foo bar`), with each revision running as a separate test, and having the ability to define revision-specific headers (`//`@[foo]` ignore-blah`) and revision-specific code (`#[cfg(foo)]`). The code that implements this feature sometimes uses the term “cfg” instead of “revision”. This results in two confusingly-different names for the same concept, one of which is ambiguous with other kinds of configuration (such as compiletest's own config). This PR replaces those occurrences of `cfg` with `revision`, so that one name is used consistently.
Configuration menu - View commit details
-
Copy full SHA for 084e232 - Browse repository at this point
Copy the full SHA 084e232View commit details -
Rollup merge of rust-lang#121391 - Nadrieril:fix-liveness, r=compiler…
…-errors never patterns: Fix liveness analysis in the presence of never patterns There's a bunch of code that only looks at the first alternative of an or-pattern, under the assumption that all alternatives have the same set of bindings. This is true except for never pattern alternatives (e.g. `Ok(x) | Err(!)`), so we skip these. I expect there's other code with this problem, I'll have to check that later. I don't have tests for this yet because mir lowering causes other issues; I'll have some in the next PR. r? ``@compiler-errors``
Configuration menu - View commit details
-
Copy full SHA for 60cb794 - Browse repository at this point
Copy the full SHA 60cb794View commit details -
Rollup merge of rust-lang#121392 - bjorn3:unify_dylib_loading, r=petr…
…ochenkov Unify dylib loading between proc macros and codegen backends As bonus this makes the errors when failing to load a proc macro more informative to match the backend loading errors. In addition it makes it slightly easier to patch rustc to work on platforms that don't support dynamic linking like wasm.
Configuration menu - View commit details
-
Copy full SHA for 64dbc3f - Browse repository at this point
Copy the full SHA 64dbc3fView commit details -
Rollup merge of rust-lang#121399 - psumbera:solaris-strip-debug, r=pe…
…trochenkov Solaris linker does not support --strip-debug Fixes rust-lang#121381
Configuration menu - View commit details
-
Copy full SHA for 8ab24c9 - Browse repository at this point
Copy the full SHA 8ab24c9View commit details -
Rollup merge of rust-lang#121406 - compiler-errors:tests, r=Nilstrieb
Add a couple tests Fixes rust-lang#119857 Fixes rust-lang#115497
Configuration menu - View commit details
-
Copy full SHA for 35650a4 - Browse repository at this point
Copy the full SHA 35650a4View commit details