-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 7 pull requests #121804
Rollup of 7 pull requests #121804
Commits on Feb 9, 2024
-
As Windows 10 requires certain features like CMPXCHG16B and a few oth…
…ers and Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature (as CPUs that meet the Windows 10 64-bit requirement also support SSE3. See https://walbourn.github.io/directxmath-sse3-and-ssse3/ )
Configuration menu - View commit details
-
Copy full SHA for d51e703 - Browse repository at this point
Copy the full SHA d51e703View commit details -
Update x86_64_pc_windows_msvc.rs
Fixed a bug where adding CMPXCHG16B would fail due to different names in Rustc and LLVM
Configuration menu - View commit details
-
Copy full SHA for d6766e2 - Browse repository at this point
Copy the full SHA d6766e2View commit details -
Update x86_64_pc_windows_msvc.rs
As CMPXCHG16B is supported, I updated the max atomic width to 128-bits from 64-bits
Configuration menu - View commit details
-
Copy full SHA for fcb06f7 - Browse repository at this point
Copy the full SHA fcb06f7View commit details -
Update x86_64_uwp_windows_gnu.rs
Updated x86_64-uwp-windows-gnu to use CMPXCHG16B and SSE3
Configuration menu - View commit details
-
Copy full SHA for abeac8f - Browse repository at this point
Copy the full SHA abeac8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c6dda7 - Browse repository at this point
Copy the full SHA 1c6dda7View commit details
Commits on Feb 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 376c7b9 - Browse repository at this point
Copy the full SHA 376c7b9View commit details
Commits on Feb 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2d25c3b - Browse repository at this point
Copy the full SHA 2d25c3bView commit details
Commits on Feb 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2fc091f - Browse repository at this point
Copy the full SHA 2fc091fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad4c4f4 - Browse repository at this point
Copy the full SHA ad4c4f4View commit details
Commits on Feb 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 205319d - Browse repository at this point
Copy the full SHA 205319dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c6960e - Browse repository at this point
Copy the full SHA 7c6960eView commit details
Commits on Feb 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for be01e28 - Browse repository at this point
Copy the full SHA be01e28View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab06037 - Browse repository at this point
Copy the full SHA ab06037View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f7f067 - Browse repository at this point
Copy the full SHA 4f7f067View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea38166 - Browse repository at this point
Copy the full SHA ea38166View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39441e4 - Browse repository at this point
Copy the full SHA 39441e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c918893 - Browse repository at this point
Copy the full SHA c918893View commit details
Commits on Feb 29, 2024
-
Don't cancel stashed
OpaqueHiddenTypeMismatch
errors.This gives one extra error message on one test, but is necessary to fix bigger problems caused by the cancellation of stashed errors. (Note: why not just avoid stashing altogether? Because that resulted in additional output changes.)
Configuration menu - View commit details
-
Copy full SHA for c4ec196 - Browse repository at this point
Copy the full SHA c4ec196View commit details -
Don't cancel stashed
TraitMissingMethod
errors.This gives one extra error message on two tests, but is necessary to fix bigger problems caused by the cancellation of stashed errors. (Note: why not just avoid stashing altogether? Because that resulted in additional output changes.)
Configuration menu - View commit details
-
Copy full SHA for ec25d6d - Browse repository at this point
Copy the full SHA ec25d6dView commit details -
Overhaul how stashed diagnostics work, again.
Stashed errors used to be counted as errors, but could then be cancelled, leading to `ErrorGuaranteed` soundness holes. rust-lang#120828 changed that, closing the soundness hole. But it introduced other difficulties because you sometimes have to account for pending stashed errors when making decisions about whether errors have occured/will occur and it's easy to overlook these. This commit aims for a middle ground. - Stashed errors (not warnings) are counted immediately as emitted errors, avoiding the possibility of forgetting to consider them. - The ability to cancel (or downgrade) stashed errors is eliminated, by disallowing the use of `steal_diagnostic` with errors, and introducing the more restrictive methods `try_steal_{modify,replace}_and_emit_err` that can be used instead. Other things: - `DiagnosticBuilder::stash` and `DiagCtxt::stash_diagnostic` now both return `Option<ErrorGuaranteed>`, which enables the removal of two `delayed_bug` calls and one `Ty::new_error_with_message` call. This is possible because we store error guarantees in `DiagCtxt::stashed_diagnostics`. - Storing the guarantees also saves us having to maintain a counter. - Calls to the `stashed_err_count` method are no longer necessary alongside calls to `has_errors`, which is a nice simplification, and eliminates two more `span_delayed_bug` calls and one FIXME comment. - Tests are added for three of the four fixed PRs mentioned below. - `issue-121108.rs`'s output improved slightly, omitting a non-useful error message. Fixes rust-lang#121451. Fixes rust-lang#121477. Fixes rust-lang#121504. Fixes rust-lang#121508.
Configuration menu - View commit details
-
Copy full SHA for 260ae70 - Browse repository at this point
Copy the full SHA 260ae70View commit details -
Mark some once-again-unreachable paths as unreachable.
This undoes the changes from rust-lang#121482 and rust-lang#121586, now that stashed errors will trigger more early aborts.
Configuration menu - View commit details
-
Copy full SHA for b4e9f93 - Browse repository at this point
Copy the full SHA b4e9f93View commit details -
Stop miri if delayed bugs are present.
Seems wise, since it shouldn't proceed in that case.
Configuration menu - View commit details
-
Copy full SHA for 9aff357 - Browse repository at this point
Copy the full SHA 9aff357View commit details -
Reinstate
emit_stashed_diagnostics
inDiagCtxtInner::drop
.I removed it in rust-lang#121206 because I thought thought it wasn't necessary. But then I had to add an `emit_stashed_diagnostics` call elsewhere in rustfmt to avoid the assertion failure (which took two attempts to get right, rust-lang#121487 and rust-lang#121615), and now there's an assertion failure in clippy as well (rust-lang/rust-clippy#12364). So this commit just reinstates the call in `DiagCtxtInner::drop`. It also reverts the rustfmt changes from rust-lang#121487 and rust-lang#121615, though it keeps the tests added for those PRs.
Configuration menu - View commit details
-
Copy full SHA for 82961c0 - Browse repository at this point
Copy the full SHA 82961c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1f0163 - Browse repository at this point
Copy the full SHA c1f0163View commit details -
Simplify
UnusedExterns
lifetimes.In practice, 'a and 'b and 'c are always the same. This change makes `UnusedExterns` more like `ArtifactNotification`, which uses a single lifetime 'a in multiple ways.
Configuration menu - View commit details
-
Copy full SHA for 869bd03 - Browse repository at this point
Copy the full SHA 869bd03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c3f15c - Browse repository at this point
Copy the full SHA 3c3f15cView commit details -
Remove unnecessary
diagnostic_width
call.This `HumanEmitter` is only created to test if it supports colour. The diagnostic width isn't relevant.
Configuration menu - View commit details
-
Copy full SHA for 805e50e - Browse repository at this point
Copy the full SHA 805e50eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca5b79d - Browse repository at this point
Copy the full SHA ca5b79dView commit details -
Inline and remove
DiagCtxt::with_tty_emitter
It only has two call sites, and one of those doesn't set the source map.
Configuration menu - View commit details
-
Copy full SHA for f9eef38 - Browse repository at this point
Copy the full SHA f9eef38View commit details -
Rename
DiagCtxt::with_emitter
asDiagCtxt::new
.Because it's now the only constructor.
Configuration menu - View commit details
-
Copy full SHA for 880c1c5 - Browse repository at this point
Copy the full SHA 880c1c5View commit details -
Merge HumanEmitter::{new,create}.
They have the same signature, and the former just calls the latter.
Configuration menu - View commit details
-
Copy full SHA for d372741 - Browse repository at this point
Copy the full SHA d372741View commit details -
Inline and remove
HumanReadableErrorType::new_emitter
.And likewise with `ColorConfig::suggests_using_colors`. They both have a single call site. And note that `BufWriter::supports_color()` always returns false, which enables a small bit of constant folding along the way.
Configuration menu - View commit details
-
Copy full SHA for 437325b - Browse repository at this point
Copy the full SHA 437325bView commit details -
Inline and remove
HumanEmitter::stderr
.Because `HumanEmitter::new` is enough, in conjunction with the (renamed) `stderr_destination` function.
Configuration menu - View commit details
-
Copy full SHA for 067d7c3 - Browse repository at this point
Copy the full SHA 067d7c3View commit details -
Inline and remove
JsonEmitter::{basic,stderr}
.They are so similar to `JsonEmitter::new` it's not worth having separate functions, it makes the code harder to read.
Configuration menu - View commit details
-
Copy full SHA for 2999d8d - Browse repository at this point
Copy the full SHA 2999d8dView commit details -
Make
JsonEmitter
more likeHumanEmitter
.Use `derive(Setters)` to derive setters, and then change `JsonEmitter::new` to only have the arguments that are always used.
Configuration menu - View commit details
-
Copy full SHA for 9ff4487 - Browse repository at this point
Copy the full SHA 9ff4487View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58f4505 - Browse repository at this point
Copy the full SHA 58f4505View commit details -
Configuration menu - View commit details
-
Copy full SHA for 607bf65 - Browse repository at this point
Copy the full SHA 607bf65View commit details -
Rollup merge of rust-lang#120820 - CKingX:cpu-base-minimum, r=petroch…
…enkov,ChrisDenton Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics (in nightly) in Windows x64 As Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature. Windows 10 requires CMPXCHG16B, LAHF/SAHF, and PrefetchW as stated in the requirements [here](https://download.microsoft.com/download/c/1/5/c150e1ca-4a55-4a7e-94c5-bfc8c2e785c5/Windows%2010%20Minimum%20Hardware%20Requirements.pdf). Furthermore, CPUs that meet these requirements also have SSE3 ([see](https://walbourn.github.io/directxmath-sse3-and-ssse3/))
Configuration menu - View commit details
-
Copy full SHA for 36bd9ef - Browse repository at this point
Copy the full SHA 36bd9efView commit details -
Rollup merge of rust-lang#121000 - Nadrieril:keep_all_fields, r=compi…
…ler-errors pattern_analysis: rework how we hide empty private fields Consider this: ```rust mod foo { pub struct Bar { pub a: bool, b: !, } } fn match_a_bar(bar: foo::Bar) -> bool { match bar { Bar { a, .. } => a, } } ``` Because the field `b` is private, matches outside the module are not allowed to observe the fact that `Bar` is empty. In particular `match bar {}` is valid within the module `foo` but an error outside (assuming `exhaustive_patterns`). We currently handle this by hiding the field `b` when it's both private and empty. This means that the pattern `Bar { a, .. }` is lowered to `Bar(a, _)` if we're inside of `foo` and to `Bar(a)` outside. This involves a bit of a dance to keep field indices straight. But most importantly this makes pattern lowering depend on the module. In this PR, I instead do nothing special when lowering. Only during analysis do we track whether a place must be skipped. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for 9df7f26 - Browse repository at this point
Copy the full SHA 9df7f26View commit details -
Rollup merge of rust-lang#121376 - Nadrieril:mir-half-ranges, r=pnkfelix
Skip unnecessary comparison with half-open range patterns This is the last remaining detail in the implementation of half-open range patterns. Until now, a half-open range pattern like `10..` was converted to `10..T::MAX` before lowering to MIR, which generated an extra pointless comparison. With this PR we don't generate it.
Configuration menu - View commit details
-
Copy full SHA for 2e0a26a - Browse repository at this point
Copy the full SHA 2e0a26aView commit details -
Rollup merge of rust-lang#121596 - ChrisDenton:tls, r=joboet
Use volatile access instead of `#[used]` for `on_tls_callback` The first commit adds a volatile load of `p_thread_callback` when registering a dtor so that the compiler knows if the callback is used or not. I don't believe the added volatile instruction is otherwise significant in the context. In my testing using the volatile load allowed the compiler to correctly reason about whether `on_tls_callback` is used or not, allowing it to be omitted entirely in some cases. Admittedly it usually is used due to `Thread` but that can be avoided (e.g. in DLLs or with custom entry points that avoid the offending APIs). Ideally this would be something the compiler could help a bit more with so we didn't have to use tricks like `#[used]` or volatile. But alas. I also used this as an opportunity to clean up the `unused` lints which I don't think serve a purpose any more. The second commit removes the volatile load of `_tls_used` with `#cfg[target_thread_local]` because `#[thread_local]` already implies it. And if it ever didn't then `#[thread_local]` would be broken when there aren't any dtors.
Configuration menu - View commit details
-
Copy full SHA for eea8cee - Browse repository at this point
Copy the full SHA eea8ceeView commit details -
Rollup merge of rust-lang#121669 - nnethercote:count-stashed-errs-aga…
…in, r=estebank Count stashed errors again Stashed diagnostics are such a pain. Their "might be emitted, might not" semantics messes with lots of things. rust-lang#120828 and rust-lang#121206 made some big changes to how they work, improving some things, but still leaving some problems, as seen by the issues caused by rust-lang#121206. This PR aims to fix all of them by restricting them in a way that eliminates the "might be emitted, might not" semantics while still allowing 98% of their benefit. Details in the individual commit logs. r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for a5945b5 - Browse repository at this point
Copy the full SHA a5945b5View commit details -
Rollup merge of rust-lang#121783 - nnethercote:emitter-cleanups, r=ol…
…i-obk Emitter cleanups Some cleanups I made when reading emitter code. In particular, `HumanEmitter` and `JsonEmitter` have gone from three constructors to one. r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 0e9f02d - Browse repository at this point
Copy the full SHA 0e9f02dView commit details