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
Automated pull from upstream master
#74
Commits on Oct 26, 2023
-
Merge pull request #371 from rust-lang/sync_from_rust_2023_10_25
Sync from rust 2023/10/25
Configuration menu - View commit details
-
Copy full SHA for e4fe941 - Browse repository at this point
Copy the full SHA e4fe941View commit details -
Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-…
…update_cg_gcc_2023-10-25
Configuration menu - View commit details
-
Copy full SHA for c797ccc - Browse repository at this point
Copy the full SHA c797cccView commit details -
Auto merge of #117249 - matthiaskrgr:rollup-h4og5rv, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #116968 (Invalid `?` suggestion on mismatched `Ok(T)`) - #117032 (Enable cg_clif tests for riscv64gc) - #117106 (When expecting closure argument but finding block provide suggestion) - #117114 (Improve `stringify.rs` test) - #117188 (Avoid repeated interning of `env!("CFG_RELEASE")`) - #117243 (Explain implementation of mem::replace) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for dab7156 - Browse repository at this point
Copy the full SHA dab7156View commit details -
Suggest assoc fn
new
when trying to build tuple struct with private…… fields Fix #22488.
Configuration menu - View commit details
-
Copy full SHA for 87dc85d - Browse repository at this point
Copy the full SHA 87dc85dView commit details -
Documentation and error message improvements related to PassMode::Dir…
…ect assert Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 4d33876 - Browse repository at this point
Copy the full SHA 4d33876View commit details -
Configuration menu - View commit details
-
Copy full SHA for e81a5c6 - Browse repository at this point
Copy the full SHA e81a5c6View commit details
Commits on Oct 27, 2023
-
Auto merge of #113183 - estebank:redundant-sized-errors, r=davidtwco
Only emit one error per unsized binding, instead of one per usage Fix #56607.
Configuration menu - View commit details
-
Copy full SHA for aa91057 - Browse repository at this point
Copy the full SHA aa91057View commit details -
Refactor some
char
,u8
ascii functions to be branchlessDecompose singular `matches!` with or-patterns to individual `matches!` statements to enable branchless code output. The following functions were changed: - `is_ascii_alphanumeric` - `is_ascii_hexdigit` - `is_ascii_punctuation` Add codegen tests Co-authored-by: George Bateman <george.bateman16@gmail.com> Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 465ffc9 - Browse repository at this point
Copy the full SHA 465ffc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7debe3 - Browse repository at this point
Copy the full SHA b7debe3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a82920 - Browse repository at this point
Copy the full SHA 0a82920View commit details -
Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov
Allow target specs to use an LLD flavor, and self-contained linking components This PR allows: - target specs to use an LLD linker-flavor: this is needed to switch `x86_64-unknown-linux-gnu` to using LLD, and is currently not possible because the current flavor json serialization fails to roundtrip on the modern linker-flavors. This can e.g. be seen in rust-lang/rust#115622 (comment) which explains where an `Lld::Yes` is ultimately deserialized into an `Lld::No`. - target specs to declare self-contained linking components: this is needed to switch `x86_64-unknown-linux-gnu` to using `rust-lld` - adds an end-to-end test of a custom target json simulating `x86_64-unknown-linux-gnu` being switched to using `rust-lld` - disables codegen backends from participating because they don't support `-Zgcc-ld=lld` which is the basis of mcp510. r? `@petrochenkov:` if the approach discussed rust-lang/rust#115622 (comment) and on zulip would work for you: basically, see if we can emit only modern linker flavors in the json specs, but accept both old and new flavors while reading them, to fix the roundtrip issue. The backwards compatible `LinkSelfContainedDefault` variants are still serialized and deserialized in `crt-objects-fallback`, while the spec equivalent of e.g. `-Clink-self-contained=+linker` is serialized into a different json object (with future-proofing to incorporate `crt-objects-fallback` in the future). --- I've been test-driving this in rust-lang/rust#113382 to test actually switching `x86_64-unknown-linux-gnu` to `rust-lld` (and fix what needs to be fixed in CI, bootstrap, etc), and it seems to work fine.
Configuration menu - View commit details
-
Copy full SHA for 31ffe48 - Browse repository at this point
Copy the full SHA 31ffe48View commit details -
Configuration menu - View commit details
-
Copy full SHA for beecd93 - Browse repository at this point
Copy the full SHA beecd93View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5070e3 - Browse repository at this point
Copy the full SHA d5070e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fa2e71 - Browse repository at this point
Copy the full SHA 3fa2e71View commit details -
Specialize ZeroSized constants
ZeroSized constants can be represented as `mir::Const::Val` even if their layout is not yet known. In those cases, CrateItem::body() was crashing when trying to convert a `ConstValue::ZeroSized` into its stable counterpart `ConstantKind::Allocated`. Instead, we now map `ConstValue::ZeroSized` into a new variant: `ConstantKind::ZeroSized`.
Configuration menu - View commit details
-
Copy full SHA for 613e618 - Browse repository at this point
Copy the full SHA 613e618View commit details -
Auto merge of #117260 - okaneco:ascii_branchless, r=thomcc
Refactor some `char`, `u8` ASCII functions to be branchless Extract conditions in singular `matches!` with or-patterns to individual `matches!` statements which enables branchless code output. The following functions were changed: - `is_ascii_alphanumeric` - `is_ascii_hexdigit` - `is_ascii_punctuation` Added codegen tests --- Continued from rust-lang/rust#103024. Based on the comment from `@scottmcm` rust-lang/rust#103024 (review). The unmodified `is_ascii_*` functions didn't seem to benefit from extracting the conditions. I've never written a codegen test before, but I tried to check that no branches were emitted.
Configuration menu - View commit details
-
Copy full SHA for 707d8c3 - Browse repository at this point
Copy the full SHA 707d8c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b3f7f4d - Browse repository at this point
Copy the full SHA b3f7f4dView commit details -
Don't provide
rust-demangler
to run-make testsThe demangler was only needed by coverage tests, but those tests were migrated into their own custom test mode in #112300. This avoids having to build the demangler just for run-make tests. It will still be built as needed by run-coverage tests or for other purposes.
Configuration menu - View commit details
-
Copy full SHA for be0d73a - Browse repository at this point
Copy the full SHA be0d73aView commit details -
For run-coverage tests, build
rust-demangler
with the stage 0 compilerThis avoids useless rebuilds of the demangler when modifying the compiler.
Configuration menu - View commit details
-
Copy full SHA for 36c3f90 - Browse repository at this point
Copy the full SHA 36c3f90View commit details -
i586_unknown_netbsd.rs: fix formatting.
This hopefully fixes the CI run after integration of this target.
Configuration menu - View commit details
-
Copy full SHA for 893e726 - Browse repository at this point
Copy the full SHA 893e726View commit details -
Auto merge of #116205 - WaffleLapkin:stabilize_pointer_byte_offsets, …
…r=dtolnay Stabilize `[const_]pointer_byte_offsets` Closes #96283 Awaiting FCP completion: rust-lang/rust#96283 (comment) r? libs-api
Configuration menu - View commit details
-
Copy full SHA for 54e57e6 - Browse repository at this point
Copy the full SHA 54e57e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72d5f4b - Browse repository at this point
Copy the full SHA 72d5f4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f04e2d - Browse repository at this point
Copy the full SHA 0f04e2dView commit details -
Link to correct issue in PassMode::Direct ptx-kernel exception
Kjetil Kjeka committedOct 27, 2023 Configuration menu - View commit details
-
Copy full SHA for bb45c81 - Browse repository at this point
Copy the full SHA bb45c81View commit details -
Rollup merge of #114998 - meysam81:meysam/feat/add-cargo-pgo-to-docs,…
… r=ehuss feat(docs): add cargo-pgo to PGO documentation 📝 fixes #114995
Configuration menu - View commit details
-
Copy full SHA for 8d67c32 - Browse repository at this point
Copy the full SHA 8d67c32View commit details -
Rollup merge of #116868 - estebank:suggestion, r=petrochenkov
Tweak suggestion span for outer attr and point at item following invalid inner attr After: ``` error: `unix_sigpipe` attribute cannot be used at crate level --> $DIR/unix_sigpipe-crate.rs:2:1 | LL | #![unix_sigpipe = "inherit"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | fn main() {} | ------------ the inner attribute doesn't annotate this function | help: perhaps you meant to use an outer attribute | LL - #![unix_sigpipe = "inherit"] LL + #[unix_sigpipe = "inherit"] | ``` Before: ``` error: `unix_sigpipe` attribute cannot be used at crate level --> $DIR/unix_sigpipe-crate.rs:2:1 | LL | #![unix_sigpipe = "inherit"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: perhaps you meant to use an outer attribute | LL | #[unix_sigpipe = "inherit"] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` CC #89566.
Configuration menu - View commit details
-
Copy full SHA for a69fb48 - Browse repository at this point
Copy the full SHA a69fb48View commit details -
Rollup merge of #117240 - trueNAHO:docs-std-iter-Iterator-collect-int…
…o-fix-typo, r=the8472 Fix documentation typo in std::iter::Iterator::collect_into
Configuration menu - View commit details
-
Copy full SHA for 203292e - Browse repository at this point
Copy the full SHA 203292eView commit details -
Rollup merge of #117241 - compiler-errors:auto-trait-leak-cycle, r=ol…
…i-obk Stash and cancel cycle errors for auto trait leakage in opaques We don't need to emit a traditional cycle error when we have a selection error that explains what's going on but in more detail. We may want to augment this error to actually point out the cycle, now that the cycle error is not being emitted. We could do that by storing the set of opaques that was in the `CyclePlaceholder` that gets returned from `type_of_opaque`. r? `@oli-obk` cc `@estebank` #117235
Configuration menu - View commit details
-
Copy full SHA for 5459333 - Browse repository at this point
Copy the full SHA 5459333View commit details -
Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk
Create a new ConstantKind variant (ZeroSized) for StableMIR ZeroSized constants can be represented as `mir::Const::Val` even if their layout is not yet known. In those cases, CrateItem::body() was crashing when trying to convert a `ConstValue::ZeroSized` into its stable counterpart `ConstantKind::Allocated`. Instead, we now map `ConstValue::ZeroSized` into a new variant: `ConstantKind::ZeroSized`. **Note:** I didn't add any new test here since we already have covering tests in our project repository which I manually confirmed that will fix the issue.
Configuration menu - View commit details
-
Copy full SHA for 3374480 - Browse repository at this point
Copy the full SHA 3374480View commit details -
Rollup merge of #117266 - RalfJung:cast-not-transmute, r=thomcc
replace transmute by raw pointer cast Now that rust-lang/rust#113257 is fixed we can finally do this. :)
Configuration menu - View commit details
-
Copy full SHA for 2fdac63 - Browse repository at this point
Copy the full SHA 2fdac63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84a1a68 - Browse repository at this point
Copy the full SHA 84a1a68View commit details -
Auto merge of #117272 - matthiaskrgr:rollup-upg122z, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #114998 (feat(docs): add cargo-pgo to PGO documentation 📝) - #116868 (Tweak suggestion span for outer attr and point at item following invalid inner attr) - #117240 (Fix documentation typo in std::iter::Iterator::collect_into) - #117241 (Stash and cancel cycle errors for auto trait leakage in opaques) - #117262 (Create a new ConstantKind variant (ZeroSized) for StableMIR) - #117266 (replace transmute by raw pointer cast) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 95f6a01 - Browse repository at this point
Copy the full SHA 95f6a01View commit details -
Allows
#[diagnostic::on_unimplemented]
attributes to have multiplenotes This commit extends the `#[diagnostic::on_unimplemented]` (and `#[rustc_on_unimplemented]`) attributes to allow multiple `note` options. This enables emitting multiple notes for custom error messages. For now I've opted to not change any of the existing usages of `#[rustc_on_unimplemented]` and just updated the relevant compile tests.
Configuration menu - View commit details
-
Copy full SHA for 160b179 - Browse repository at this point
Copy the full SHA 160b179View commit details -
Configuration menu - View commit details
-
Copy full SHA for a58327d - Browse repository at this point
Copy the full SHA a58327dView commit details -
Configuration menu - View commit details
-
Copy full SHA for add9943 - Browse repository at this point
Copy the full SHA add9943View commit details -
Update Cranelift to 0.101.2 and disable host-arch feature of cranelif…
…t-codegen This ensures that cg_clif can be built for targets that aren't natively supported by Cranelift. It will not be possible to compile for the host in this case, but cross-compilation will still be possible. We won't distribute cg_clif as rustup component for any targets that aren't natively supported by Cranelift, but will still build it if codegen-backends lists "cranelift".
Configuration menu - View commit details
-
Copy full SHA for 344752a - Browse repository at this point
Copy the full SHA 344752aView commit details -
Update Cranelift to 0.101.2 and disable host-arch feature of cranelif…
…t-codegen This ensures that cg_clif can be built for targets that aren't natively supported by Cranelift. It will not be possible to compile for the host in this case, but cross-compilation will still be possible. We won't distribute cg_clif as rustup component for any targets that aren't natively supported by Cranelift, but will still build it if codegen-backends lists "cranelift".
Configuration menu - View commit details
-
Copy full SHA for 1e39bbf - Browse repository at this point
Copy the full SHA 1e39bbfView commit details -
Update target-lexicon to 0.12.12
This adds support for loongarch and a bunch of other targets
Configuration menu - View commit details
-
Copy full SHA for d89582c - Browse repository at this point
Copy the full SHA d89582cView commit details -
Update target-lexicon to 0.12.12
This adds support for loongarch and a bunch of other targets
Configuration menu - View commit details
-
Copy full SHA for 1cb7bdb - Browse repository at this point
Copy the full SHA 1cb7bdbView commit details -
Auto merge of #116858 - estebank:issue-22488, r=petrochenkov
Suggest assoc fn `new` when trying to build tuple struct with private fields Fix #22488.
Configuration menu - View commit details
-
Copy full SHA for 6888929 - Browse repository at this point
Copy the full SHA 6888929View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6214943 - Browse repository at this point
Copy the full SHA 6214943View commit details -
Configuration menu - View commit details
-
Copy full SHA for 998a816 - Browse repository at this point
Copy the full SHA 998a816View commit details -
Configuration menu - View commit details
-
Copy full SHA for c892b28 - Browse repository at this point
Copy the full SHA c892b28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 638d2d6 - Browse repository at this point
Copy the full SHA 638d2d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e5b367 - Browse repository at this point
Copy the full SHA 2e5b367View commit details -
Configuration menu - View commit details
-
Copy full SHA for cece90c - Browse repository at this point
Copy the full SHA cece90cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ac25fa - Browse repository at this point
Copy the full SHA 4ac25faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6223744 - Browse repository at this point
Copy the full SHA 6223744View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb90c4b - Browse repository at this point
Copy the full SHA bb90c4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8bfd08 - Browse repository at this point
Copy the full SHA b8bfd08View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccb36a6 - Browse repository at this point
Copy the full SHA ccb36a6View commit details -
Auto merge of #116751 - Nadrieril:lint-overlap-per-column, r=davidtwco
Lint overlapping ranges as a separate pass This reworks the [`overlapping_range_endpoints`](https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint_defs/builtin/static.OVERLAPPING_RANGE_ENDPOINTS.html) lint. My motivations are: - It was annoying to have this lint entangled with the exhaustiveness algorithm, especially wrt librarification; - This makes the lint behave consistently. Here's the consistency story. Take the following matches: ```rust match (0u8, true) { (0..=10, true) => {} (10..20, true) => {} (10..20, false) => {} _ => {} } match (true, 0u8) { (true, 0..=10) => {} (true, 10..20) => {} (false, 10..20) => {} _ => {} } ``` There are two semantically consistent options: option 1 we lint all overlaps between the ranges, option 2 we only lint the overlaps that could actually occur (i.e. the ones with `true`). Option 1 is what this PR does. Option 2 is possible but would require the exhaustiveness algorithm to track more things for the sake of the lint. The status quo is that we're inconsistent between the two. Option 1 generates more false postives, but I prefer it from a maintainer's perspective. I do think the difference is minimal; cases where the difference is observable seem rare. This PR adds a separate pass, so this will have a perf impact. Let's see how bad, it looked ok locally.
Configuration menu - View commit details
-
Copy full SHA for 9d6d5d4 - Browse repository at this point
Copy the full SHA 9d6d5d4View commit details -
fix miri target information for Test step
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Configuration menu - View commit details
-
Copy full SHA for b915fc8 - Browse repository at this point
Copy the full SHA b915fc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb66d10 - Browse repository at this point
Copy the full SHA eb66d10View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb10fa3 - Browse repository at this point
Copy the full SHA eb10fa3View commit details -
Auto merge of #117166 - oli-obk:mir_const_qualif_perf, r=petrochenkov
Only call `mir_const_qualif` if absolutely necessary Pull the perf change out of rust-lang/rust#113617 This should not have any impact on behaviour (if it does, we'll see an ICE)
Configuration menu - View commit details
-
Copy full SHA for 10143e7 - Browse repository at this point
Copy the full SHA 10143e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ef5897 - Browse repository at this point
Copy the full SHA 2ef5897View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7449478 - Browse repository at this point
Copy the full SHA 7449478View commit details -
When encountering sealed traits, point types that implement it
``` error[E0277]: the trait bound `S: d::Hidden` is not satisfied --> $DIR/sealed-trait-local.rs:53:20 | LL | impl c::Sealed for S {} | ^ the trait `d::Hidden` is not implemented for `S` | note: required by a bound in `c::Sealed` --> $DIR/sealed-trait-local.rs:17:23 | LL | pub trait Sealed: self::d::Hidden { | ^^^^^^^^^^^^^^^ required by this bound in `Sealed` = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `c::d::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it = help: the following types implement the trait: - c::X - c::Y ``` The last `help` is new.
Configuration menu - View commit details
-
Copy full SHA for 6dbad23 - Browse repository at this point
Copy the full SHA 6dbad23View commit details -
Rollup merge of #116834 - nnethercote:rustc_symbol_mangling, r=davidtwco
Remove `rustc_symbol_mangling/messages.ftl`. It contains a single message that (a) doesn't contain any natural language, and (b) is only used in tests. r? `@davidtwco`
Configuration menu - View commit details
-
Copy full SHA for df8852a - Browse repository at this point
Copy the full SHA df8852aView commit details -
Rollup merge of #117212 - clubby789:fix-ternary-recover, r=compiler-e…
…rrors Properly restore snapshot when failing to recover parsing ternary If the recovery parsed an expression, then failed to eat a `:`, it would return `false` without restoring the snapshot. Fix this by always restoring the snapshot when returning `false`. Draft for now because I'd like to try and improve this recovery further. Fixes #117208
Configuration menu - View commit details
-
Copy full SHA for b229537 - Browse repository at this point
Copy the full SHA b229537View commit details -
Rollup merge of #117246 - estebank:issue-117209, r=petrochenkov
Fix ICE: Restrict param constraint suggestion When encountering an associated item with a type param that could be constrained, do not look at the parent item if the type param comes from the associated item. Fix #117209, fix #89868.
Configuration menu - View commit details
-
Copy full SHA for a77f743 - Browse repository at this point
Copy the full SHA a77f743View commit details -
Rollup merge of #117247 - kjetilkjeka:nvptx_direct_passmode_exception…
…, r=workingjubilee,RalfJung NVPTX: Allow PassMode::Direct for ptx kernels for now Upgrading the nvptx toolchain to the newest nightly makes it hit the assert that links to rust-lang/rust#115666 It seems like most targets get around this by using `PassMode::Indirect`. That is impossible for the kernel as it's not a normal call, but instead the arguments are copied from CPU to GPU and the passed pointer would be invalid when it reached the GPU. I also made an experiment with `PassMode::Cast` but at least the most simple version of this broke the assembly API tests. I added fixing the pass mode in my unofficial tracking issue list (I do not have the necessary permissions to update to official one). rust-lang/rust#38788 (comment) Since the ptx_abi is currently unstable and have been working with `PassMode::Direct` for more than a year now, the steps above is hopefully sufficient to enable it as an exception until I can prioritize to fix it. I'm currently looking at steps to enable the CI for nvptx64 again and would prefer to finish that first.
Configuration menu - View commit details
-
Copy full SHA for c3d56be - Browse repository at this point
Copy the full SHA c3d56beView commit details -
Rollup merge of #117270 - jhpratt:hide-print-internals, r=ChrisDenton
Hide internal methods from documentation The two methods here are perma-unstable and only made public for technical reasons. There is no reason to show them in documentation. `@rustbot` label +A-docs
Configuration menu - View commit details
-
Copy full SHA for 60b071f - Browse repository at this point
Copy the full SHA 60b071fView commit details -
Rollup merge of #117281 - RalfJung:thread-safety, r=thomcc
std::thread : add SAFETY comment I forgot to add this in rust-lang/rust#117266.
Configuration menu - View commit details
-
Copy full SHA for f9d62a8 - Browse repository at this point
Copy the full SHA f9d62a8View commit details -
Rollup merge of #117287 - onur-ozkan:fix-miri-target-info, r=RalfJung
fix miri target information for Test step self-explanatory r? RalfJung
Configuration menu - View commit details
-
Copy full SHA for b9015da - Browse repository at this point
Copy the full SHA b9015daView commit details -
Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for 24be433 - Browse repository at this point
Copy the full SHA 24be433View commit details -
Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung
Allow partially moved values in match This PR attempts to unify the behaviour between `let _ = PLACE`, `let _: TY = PLACE;` and `match PLACE { _ => {} }`. The logical conclusion is that the `match` version should not check for uninitialised places nor check that borrows are still live. The `match PLACE {}` case is handled by keeping a `FakeRead` in the unreachable fallback case to verify that `PLACE` has a legal value. Schematically, `match PLACE { arms }` in surface rust becomes in MIR: ```rust PlaceMention(PLACE) match PLACE { // Decision tree for the explicit arms arms, // An extra fallback arm _ => { FakeRead(ForMatchedPlace, PLACE); unreachable } } ``` `match *borrow { _ => {} }` continues to check that `*borrow` is live, but does not read the value. `match *borrow {}` both checks that `*borrow` is live, and fake-reads the value. Continuation of ~rust-lang/rust#102256 ~rust-lang/rust#104844 Fixes rust-lang/rust#99180 rust-lang/rust#53114
Configuration menu - View commit details
-
Copy full SHA for 59bb950 - Browse repository at this point
Copy the full SHA 59bb950View commit details -
Explicitly mark which targets to distribute cg_clif for in CI
This avoids needlessly building cg_clif for other targets and makes it easier for the dist code to determine if it should distribute cg_clif as component.
Configuration menu - View commit details
-
Copy full SHA for aaa4e54 - Browse repository at this point
Copy the full SHA aaa4e54View commit details -
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a65d99d - Browse repository at this point
Copy the full SHA a65d99dView commit details -
Merge pull request #375 from GuillaumeGomez/fix-build-scripts
Make build scripts work with rust bootstrap
Configuration menu - View commit details
-
Copy full SHA for 09ce29d - Browse repository at this point
Copy the full SHA 09ce29dView commit details -
Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into subtree-…
…update_cg_gcc_2023-10-25
Configuration menu - View commit details
-
Copy full SHA for f0aaf2f - Browse repository at this point
Copy the full SHA f0aaf2fView commit details -
Auto merge of #117294 - matthiaskrgr:rollup-xylsec7, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #116834 (Remove `rustc_symbol_mangling/messages.ftl`.) - #117212 (Properly restore snapshot when failing to recover parsing ternary) - #117246 (Fix ICE: Restrict param constraint suggestion) - #117247 (NVPTX: Allow PassMode::Direct for ptx kernels for now) - #117270 (Hide internal methods from documentation) - #117281 (std::thread : add SAFETY comment) - #117287 (fix miri target information for Test step) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 2f1bd07 - Browse repository at this point
Copy the full SHA 2f1bd07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98c469c - Browse repository at this point
Copy the full SHA 98c469cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3feec48 - Browse repository at this point
Copy the full SHA 3feec48View commit details -
Streamline
rustc_interface
tests.In `test_edition_parsing`, change the `build_session_options_and_crate_config` call to `build_session_options`, because the config isn't used. That leaves a single call site for `build_session_options_and_crate_config`, so just inline and remove it.
Configuration menu - View commit details
-
Copy full SHA for 2142d01 - Browse repository at this point
Copy the full SHA 2142d01View commit details -
Change
CrateConfig
fromFxIndexSet
toFxHashSet
.Because its order doesn't matter. This is well demonstrated by `to_crate_config`, which creates a `CrateConfig` from an `FxHashSet`.
Configuration menu - View commit details
-
Copy full SHA for 32986d8 - Browse repository at this point
Copy the full SHA 32986d8View commit details -
In `parse_cfg`, we now construct a `FxHashSet<String>` directly instead of constructing a `FxHashSet<Symbol>` and then immediately converting it to a `FxHashSet<String>`(!) (The type names made this behaviour non-obvious. The next commit will make the type names clearer.)
Configuration menu - View commit details
-
Copy full SHA for 75e415b - Browse repository at this point
Copy the full SHA 75e415bView commit details -
`parse_cfgspecs` and `parse_check_cfg` run very early, before the main interner is running. They each use a short-lived interner and convert all interned symbols to strings in their output data structures. Once the main interner starts up, these data structures get converted into new data structures that are identical except with the strings converted to symbols. All is not obvious from the current code, which is a mess, particularly with inconsistent naming that obscures the parallel string/symbol data structures. This commit clean things up a lot. - The existing `CheckCfg` type is generic, allowing both `CheckCfg<String>` and `CheckCfg<Symbol>` forms. This is really useful, but it defaults to `String`. The commit removes the default so we have to use `CheckCfg<String>` and `CheckCfg<Symbol>` explicitly, which makes things clearer. - Introduces `Cfg`, which is generic over `String` and `Symbol`, similar to `CheckCfg`. - Renames some things. - `parse_cfgspecs` -> `parse_cfg` - `CfgSpecs` -> `Cfg<String>`, plus it's used in more places, rather than the underlying `FxHashSet` type. - `CrateConfig` -> `Cfg<Symbol>`. - `CrateCheckConfig` -> `CheckCfg<Symbol>` - Adds some comments explaining the string-to-symbol conversions. - `to_crate_check_config`, which converts `CheckCfg<String>` to `CheckCfg<Symbol>`, is inlined and removed and combined with the overly-general `CheckCfg::map_data` to produce `CheckCfg::<String>::intern`. - `build_configuration` now does the `Cfg<String>`-to-`Cfg<Symbol>` conversion, so callers don't need to, which removes the need for `to_crate_config`. The diff for two of the fields in `Config` is a good example of the improved clarity: ``` - pub crate_cfg: FxHashSet<(String, Option<String>)>, - pub crate_check_cfg: CheckCfg, + pub crate_cfg: Cfg<String>, + pub crate_check_cfg: CheckCfg<String>, ``` Compare that with the diff for the corresponding fields in `ParseSess`, and the relationship to `Config` is much clearer than before: ``` - pub config: CrateConfig, - pub check_config: CrateCheckConfig, + pub config: Cfg<Symbol>, + pub check_config: CheckCfg<Symbol>, ```
Configuration menu - View commit details
-
Copy full SHA for 5e54997 - Browse repository at this point
Copy the full SHA 5e54997View commit details -
Change
Cfg<T>
to anFxIndexSet
.Despite what I claimed in an earlier commit, the ordering does matter to some degree. Using `FxIndexSet` prevents changes to the error message order in `tests/ui/check-cfg/mix.rs`.
Configuration menu - View commit details
-
Copy full SHA for 5438004 - Browse repository at this point
Copy the full SHA 5438004View commit details -
Configuration menu - View commit details
-
Copy full SHA for 975b98b - Browse repository at this point
Copy the full SHA 975b98bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 230dd5b - Browse repository at this point
Copy the full SHA 230dd5bView commit details -
Auto merge of #116471 - notriddle:notriddle/js-trait-alias, r=Guillau…
…meGomez rustdoc: use JS to inline target type impl docs into alias Preview docs: - https://notriddle.com/rustdoc-html-demo-5/js-trait-alias/std/io/type.Result.html - https://notriddle.com/rustdoc-html-demo-5/js-trait-alias-compiler/rustc_middle/ty/type.PolyTraitRef.html This pull request also includes a bug fix for trait alias inlining across crates. This means more documentation is generated, and is why ripgrep runs slower (it's a thin wrapper on top of the `grep` crate, so 5% of its docs are now the Result type). - Before, built with rustdoc 1.75.0-nightly (aa1a71e 2023-10-26), Result type alias method docs are missing: http://notriddle.com/rustdoc-html-demo-5/ripgrep-js-nightly/rg/type.Result.html - After, built with this branch, all the methods on Result are shown: http://notriddle.com/rustdoc-html-demo-5/ripgrep-js-trait-alias/rg/type.Result.html *Review note: This is mostly just reverting rust-lang/rust#115201. The last commit has the new work in it.* Fixes #115718 This is an attempt to balance three problems, each of which would be violated by a simpler implementation: - A type alias should show all the `impl` blocks for the target type, and vice versa, if they're applicable. If nothing was done, and rustdoc continues to match them up in HIR, this would not work. - Copying the target type's docs into its aliases' HTML pages directly causes far too much redundant HTML text to be generated when a crate has large numbers of methods and large numbers of type aliases. - Using JavaScript exclusively for type alias impl docs would be a functional regression, and could make some docs very hard to find for non-JS readers. - Making sure that only applicable docs are show in the resulting page requires a type checkers. Do not reimplement the type checker in JavaScript. So, to make it work, rustdoc stashes these type-alias-inlined docs in a JSONP "database-lite". The file is generated in `write_shared.rs`, included in a `<script>` tag added in `print_item.rs`, and `main.js` takes care of patching the additional docs into the DOM. The format of `trait.impl` and `type.impl` JS files are superficially similar. Each line, except the JSONP wrapper itself, belongs to a crate, and they are otherwise separate (rustdoc should be idempotent). The "meat" of the file is HTML strings, so the frontend code is very simple. Links are relative to the doc root, though, so the frontend needs to fix that up, and inlined docs can reuse these files. However, there are a few differences, caused by the sophisticated features that type aliases have. Consider this crate graph: ```text --------------------------------- | crate A: struct Foo<T> | | type Bar = Foo<i32> | | impl X for Foo<i8> | | impl Y for Foo<i32> | --------------------------------- | ---------------------------------- | crate B: type Baz = A::Foo<i8> | | type Xyy = A::Foo<i8> | | impl Z for Xyy | ---------------------------------- ``` The type.impl/A/struct.Foo.js JS file has a structure kinda like this: ```js JSONP({ "A": [["impl Y for Foo<i32>", "Y", "A::Bar"]], "B": [["impl X for Foo<i8>", "X", "B::Baz", "B::Xyy"], ["impl Z for Xyy", "Z", "B::Baz"]], }); ``` When the type.impl file is loaded, only the current crate's docs are actually used. The main reason to bundle them together is that there's enough duplication in them for DEFLATE to remove the redundancy. The contents of a crate are a list of impl blocks, themselves represented as lists. The first item in the sublist is the HTML block, the second item is the name of the trait (which goes in the sidebar), and all others are the names of type aliases that successfully match. This way: - There's no need to generate these files for types that have no aliases in the current crate. If a dependent crate makes a type alias, it'll take care of generating its own docs. - There's no need to reimplement parts of the type checker in JavaScript. The Rust backend does the checking, and includes its results in the file. - Docs defined directly on the type alias are dropped directly in the HTML by `render_assoc_items`, and are accessible without JavaScript. The JSONP file will not list impl items that are known to be part of the main HTML file already. [JSONP]: https://en.wikipedia.org/wiki/JSONP
Configuration menu - View commit details
-
Copy full SHA for 6f349cd - Browse repository at this point
Copy the full SHA 6f349cdView commit details
Commits on Oct 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fe00cfe - Browse repository at this point
Copy the full SHA fe00cfeView commit details -
Auto merge of #117197 - Zalathar:demangler, r=onur-ozkan
Avoid unnecessary builds/rebuilds of `rust-demangler` This is a combination of two loosely-related changes: - Don't build `rust-demangler` as a dependency of `tests/run-make`, because after #112300 none of the remaining run-make tests actually use it. (If future run-make tests ever do need the demangler, it'll be easy to add it back.) - For `tests/run-coverage`, build the demangler with the stage 0 compiler instead of the current-stage compiler. This avoids having to uselessly rebuild the demangler after modifying and rebuilding the compiler itself.
Configuration menu - View commit details
-
Copy full SHA for c6eb61a - Browse repository at this point
Copy the full SHA c6eb61aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 167c0c1 - Browse repository at this point
Copy the full SHA 167c0c1View commit details -
Auto merge of #117302 - weihanglo:update-cargo, r=weihanglo
Update cargo 8 commits in df3509237935f9418351b77803df7bc05c009b3d..708383d620e183a9ece69b8fe930c411d83dee27 2023-10-24 23:09:01 +0000 to 2023-10-27 21:09:26 +0000 - feat(doc): Print the generated docs links (rust-lang/cargo#12859) - feat(toml): Allow version-less manifests (rust-lang/cargo#12786) - Remove outdated option to `-Zcheck-cfg` warnings (rust-lang/cargo#12884) - Remove duplicate binaries during install (rust-lang/cargo#12868) - refactor(shell): Write at once rather than in fragments (rust-lang/cargo#12880) - docs(ref): Link to docs.rs metadata table (rust-lang/cargo#12879) - docs(contrib): Describe how to add a new package (rust-lang/cargo#12878) - move up looking at index summary enum (rust-lang/cargo#12749) r? ghost
Configuration menu - View commit details
-
Copy full SHA for 20952db - Browse repository at this point
Copy the full SHA 20952dbView commit details -
Auto merge of #117253 - antoyo:subtree-update_cg_gcc_2023-10-25, r=bj…
…orn3,GuillaumeGomez subtree update cg_gcc 2023/10/25
Configuration menu - View commit details
-
Copy full SHA for 17659c7 - Browse repository at this point
Copy the full SHA 17659c7View commit details -
Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwco
Remove -Zdep-tasks. This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
Configuration menu - View commit details
-
Copy full SHA for 975d042 - Browse repository at this point
Copy the full SHA 975d042View commit details -
Rollup merge of #116739 - Milo123459:milo/short-paths, r=estebank
Make `E0277` use short paths Fixes #116616
Configuration menu - View commit details
-
Copy full SHA for 471e33f - Browse repository at this point
Copy the full SHA 471e33fView commit details -
Rollup merge of #116816 - ChrisDenton:api.rs, r=workingjubilee
Create `windows/api.rs` for safer FFI FFI is inherently unsafe. For memory safety we need to assert that some contract is being upheld on both sides of the FFI, though of course we can only ever check our side. In Rust, `unsafe` blocks are used to assert safety and `// SAFETY` comments describing why it is safe. Currently in sys/windows we have a lot of this unsafety spread all over the place, with variations on the same unsafe patterns repeated. And because of the repitition and frequency, we're a bit lax with the safety comments. This PR aims to fix this and to make FFI safety more auditable by creating an `api` module with the goal of centralising and consolidating this unsafety. It contains thin wrappers around the Windows API that make most functions safe to call or, if that's not possible, then at least safer. Note that its goal is *only* to address safety. It does not stray far from the Windows API and intentionally does not attempt to make higher lever wrappers around, for example, file handles. This is better left to the existing modules. The windows/api.rs file has a top level comment to help future contributors understand the intent of the module and the design decisions made. I chose two functions as a first tentative step towards the above goal: - [`GetLastError`](https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) is trivially safe. There's no reason to wrap it in an `unsafe` block every time. So I simply created a safe `get_last_error` wrapper. - [`SetFileInformationByHandle`](https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfileinformationbyhandle) is more complex. It essentially takes a generic type but over a C API which necessitates some amount of ceremony. Rather than implementing similar unsafe patterns in multiple places, I provide a safe `set_file_information_by_handle` that takes a Rusty generic type and handles converting that to the form required by the C FFI. r? libs
Configuration menu - View commit details
-
Copy full SHA for d87b5e4 - Browse repository at this point
Copy the full SHA d87b5e4View commit details -
Rollup merge of #116945 - estebank:sealed-trait-impls, r=petrochenkov
When encountering sealed traits, point types that implement it ``` error[E0277]: the trait bound `S: d::Hidden` is not satisfied --> $DIR/sealed-trait-local.rs:53:20 | LL | impl c::Sealed for S {} | ^ the trait `d::Hidden` is not implemented for `S` | note: required by a bound in `c::Sealed` --> $DIR/sealed-trait-local.rs:17:23 | LL | pub trait Sealed: self::d::Hidden { | ^^^^^^^^^^^^^^^ required by this bound in `Sealed` = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `c::d::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it = help: the following types implement the trait: - c::X - c::Y ``` The last `help` is new.
Configuration menu - View commit details
-
Copy full SHA for 9f631d0 - Browse repository at this point
Copy the full SHA 9f631d0View commit details -
Rollup merge of #117025 - Urgau:cleanup-improve-check-cfg-impl, r=pet…
…rochenkov Cleanup and improve `--check-cfg` implementation This PR removes some indentation in the code, as well as preventing some bugs/misusages and fix a nit in the doc. r? ```@petrochenkov``` (maybe)
Configuration menu - View commit details
-
Copy full SHA for 87a564d - Browse repository at this point
Copy the full SHA 87a564dView commit details -
Rollup merge of #117256 - dtolnay:currentversion, r=compiler-errors
Parse rustc version at compile time This PR eliminates a couple awkward codepaths where it was not clear how the compiler should proceed if its own version number is incomprehensible. https://github.com/rust-lang/rust/blob/dab715641e96a61a534587fda9de1128b75b34dc/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs#L385 https://github.com/rust-lang/rust/blob/dab715641e96a61a534587fda9de1128b75b34dc/compiler/rustc_attr/src/builtin.rs#L630 We can guarantee that every compiled rustc comes with a working version number, so the ICE codepaths above shouldn't need to be written.
Configuration menu - View commit details
-
Copy full SHA for 1db8c9d - Browse repository at this point
Copy the full SHA 1db8c9dView commit details -
Rollup merge of #117268 - nnethercote:rustc_interface, r=oli-obk
`rustc_interface` cleanups Particularly in and around `--cfg` and `--check-cfg` handling. r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 48a3865 - Browse repository at this point
Copy the full SHA 48a3865View commit details -
Rollup merge of #117277 - RalfJung:too-big-with-padding, r=oli-obk
fix failure to detect a too-big-type after adding padding Fixes rust-lang/rust#117265
Configuration menu - View commit details
-
Copy full SHA for 09fd68d - Browse repository at this point
Copy the full SHA 09fd68dView commit details -
Auto merge of #117309 - workingjubilee:rollup-zqb1dun, r=workingjubilee
Rollup of 8 pull requests Successful merges: - #116534 (Remove -Zdep-tasks.) - #116739 (Make `E0277` use short paths) - #116816 (Create `windows/api.rs` for safer FFI) - #116945 (When encountering sealed traits, point types that implement it) - #117025 (Cleanup and improve `--check-cfg` implementation) - #117256 (Parse rustc version at compile time) - #117268 (`rustc_interface` cleanups) - #117277 (fix failure to detect a too-big-type after adding padding) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 615d0f2 - Browse repository at this point
Copy the full SHA 615d0f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64678d4 - Browse repository at this point
Copy the full SHA 64678d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b329c69 - Browse repository at this point
Copy the full SHA b329c69View commit details -
Auto merge of #116609 - eduardosm:bump-stdarch, r=workingjubilee
Bump stdarch submodule and remove special handling for LLVM intrinsics that are no longer needed Bumps stdarch to pull rust-lang/stdarch#1477, which reimplemented some functions with portable SIMD intrinsics instead of arch specific LLVM intrinsics. Handling of those LLVM intrinsics is removed from cranelift codegen and miri. cc `@RalfJung` `@bjorn3`
Configuration menu - View commit details
-
Copy full SHA for 3089c31 - Browse repository at this point
Copy the full SHA 3089c31View commit details -
Auto merge of #116609 - eduardosm:bump-stdarch, r=workingjubilee
Bump stdarch submodule and remove special handling for LLVM intrinsics that are no longer needed Bumps stdarch to pull rust-lang/stdarch#1477, which reimplemented some functions with portable SIMD intrinsics instead of arch specific LLVM intrinsics. Handling of those LLVM intrinsics is removed from cranelift codegen and miri. cc `@RalfJung` `@bjorn3`
Configuration menu - View commit details
-
Copy full SHA for 9e20870 - Browse repository at this point
Copy the full SHA 9e20870View commit details -
i586_unknown_netbsd.rs: drop "-m32" flag insertion to gcc.
This triggers a consistency check in rust (that all linker flavours must have identical arguments), and on NetBSD/i386, the 32-bitness is implicitly chosen through the chosen toolchain, and appears to not be required. So drop it, and also drop the imports of the now-no-longer-used identifiers.
Configuration menu - View commit details
-
Copy full SHA for a510288 - Browse repository at this point
Copy the full SHA a510288View commit details -
Auto merge of #117038 - saethlin:inline-range-methods, r=workingjubilee
Add #[inline] to some recalcitrant ops::range methods Fixes rust-lang/rust#116861
Configuration menu - View commit details
-
Copy full SHA for 7314873 - Browse repository at this point
Copy the full SHA 7314873View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9ddad3 - Browse repository at this point
Copy the full SHA d9ddad3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dd7568 - Browse repository at this point
Copy the full SHA 4dd7568View commit details -
Configuration menu - View commit details
-
Copy full SHA for 351d532 - Browse repository at this point
Copy the full SHA 351d532View commit details -
Configuration menu - View commit details
-
Copy full SHA for 04fa124 - Browse repository at this point
Copy the full SHA 04fa124View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7985af - Browse repository at this point
Copy the full SHA f7985afView commit details -
Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simula…
…crum Distribute cg_clif as rustup component on the nightly channel This makes it possible to use cg_clif using: ```bash $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly $ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build ``` cc rust-lang/compiler-team#405. r? `@Mark-Simulacrum`
Configuration menu - View commit details
-
Copy full SHA for 6a66ca2 - Browse repository at this point
Copy the full SHA 6a66ca2View commit details -
Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simula…
…crum Distribute cg_clif as rustup component on the nightly channel This makes it possible to use cg_clif using: ```bash $ rustup component add rustc-codegen-cranelift-preview --toolchain nightly $ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build ``` cc rust-lang/compiler-team#405. r? `@Mark-Simulacrum`
Configuration menu - View commit details
-
Copy full SHA for da1ed4d - Browse repository at this point
Copy the full SHA da1ed4dView commit details -
change default output mode of
BootstrapCommand
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Configuration menu - View commit details
-
Copy full SHA for 3bb0c94 - Browse repository at this point
Copy the full SHA 3bb0c94View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5fa36f - Browse repository at this point
Copy the full SHA f5fa36fView commit details -
set
BootstrapCommand
output mode for submodulesSigned-off-by: onur-ozkan <work@onurozkan.dev>
Configuration menu - View commit details
-
Copy full SHA for 236f6ba - Browse repository at this point
Copy the full SHA 236f6baView commit details -
Auto merge of #117123 - Zalathar:bad-counter-ids, r=petrochenkov
coverage: Consistently remove unused counter IDs from expressions/mappings If some coverage counters were removed by MIR optimizations, we need to take care not to refer to those counter IDs in coverage mappings, and instead replace them with a constant zero value. If we don't, `llvm-cov` might see a too-large counter ID and silently discard the entire function from its coverage reports. Fixes #117012.
Configuration menu - View commit details
-
Copy full SHA for 6b78377 - Browse repository at this point
Copy the full SHA 6b78377View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56643ec - Browse repository at this point
Copy the full SHA 56643ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dada60 - Browse repository at this point
Copy the full SHA 4dada60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e2bbfe - Browse repository at this point
Copy the full SHA 4e2bbfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 794bf8a - Browse repository at this point
Copy the full SHA 794bf8aView commit details -
Ensure the rustc-codegen-cranelift-preview component is never empty
Either generate it with the actual codegen backend dylib or omit it entirely when the cranelift backend is disabled for this build.
Configuration menu - View commit details
-
Copy full SHA for aefd7ac - Browse repository at this point
Copy the full SHA aefd7acView commit details -
Auto merge of #116240 - dtolnay:constdiscriminant, r=thomcc
Const stabilize mem::discriminant Tracking issue: #69821. This PR is a rebase of rust-lang/rust#103893 to resolve conflicts in library/core/src/lib.rs (against #102470 and #110393).
Configuration menu - View commit details
-
Copy full SHA for 7cc36de - Browse repository at this point
Copy the full SHA 7cc36deView commit details -
Auto merge of #117149 - nnethercote:tidy-alphabetical-unit-tests, r=N…
…ilstrieb tidy: add unit tests for alphabetical checks I discovered there aren't any tests while working on #117068. r? `@Nilstrieb`
Configuration menu - View commit details
-
Copy full SHA for e5cfc55 - Browse repository at this point
Copy the full SHA e5cfc55View commit details
Commits on Oct 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 552abdc - Browse repository at this point
Copy the full SHA 552abdcView commit details -
Auto merge of #116447 - oli-obk:gen_fn, r=compiler-errors
Implement `gen` blocks in the 2024 edition Coroutines tracking issue rust-lang/rust#43122 `gen` block tracking issue rust-lang/rust#117078 This PR implements `gen` blocks that implement `Iterator`. Most of the logic with `async` blocks is shared, and thus I renamed various types that were referring to `async` specifically. An example usage of `gen` blocks is ```rust fn foo() -> impl Iterator<Item = i32> { gen { yield 42; for i in 5..18 { if i.is_even() { continue } yield i * 2; } } } ``` The limitations (to be resolved) of the implementation are listed in the tracking issue
Configuration menu - View commit details
-
Copy full SHA for 2cad938 - Browse repository at this point
Copy the full SHA 2cad938View commit details -
Rollup merge of #115773 - simlay:arch64-apple-tvos-sim-for-rustc, r=t…
…homcc tvOS simulator support on Apple Silicon for rustc Closes or is a subtask of #115692. # Tier 3 Target Policy At this tier, the Rust project provides no official support for a target, so we place minimal requirements on the introduction of targets. > * A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) See [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md) > * Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. > * Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. > * If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo. This naming scheme matches `$ARCH-$VENDOR-$OS-$ABI` (I think `sim` is the ABI here) which is matches the iOS apple silicon simulator (`aarch64-apple-ios-sim`). [There is some discussion about renaming some apple simulator targets](rust-lang/rust#115692 (comment)) to match the `-sim` suffix but that is outside the scope of this PR. > * Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. > > * The target must not introduce license incompatibilities. > * Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). > * The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. > * Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. > * "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. This contribution is fully available under the standard Rust license with no additional legal restrictions whatsoever. This PR does not introduce any new dependency less permissive than the Rust license policy. The new targets do not depend on proprietary libraries. > * Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. This new target implements as much of the standard library as the other tvOS targets do. > * The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. I have added the target to the other tvOS targets in [`src/doc/rustc/src/platform-support/apple-tvos.md`](https://github.com/rust-lang/rust/blob/4ab4d48ee59968d8d519ccda5e12c9d200cc092f/src/doc/rustc/src/platform-support/apple-tvos.md) > * Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. > * This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. > * Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ``@)`` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. > * Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. > * Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. > * In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. I acknowledge these requirements and intend to ensure that they are met. This target does not touch any existing tier 2 or tier 1 targets and should not break any other targets.
Configuration menu - View commit details
-
Copy full SHA for 09c56f8 - Browse repository at this point
Copy the full SHA 09c56f8View commit details -
Rollup merge of #117162 - c410-f3r:try, r=workingjubilee
Remove `cfg_match` from the prelude Fixes #117057 cc #115585
Configuration menu - View commit details
-
Copy full SHA for 61cd3d0 - Browse repository at this point
Copy the full SHA 61cd3d0View commit details -
Rollup merge of #117311 - RalfJung:unpretty-thir-help, r=petrochenkov
-Zunpretty help: add missing possible values `-Zunpretty` accepts "thir-tree" and "thir-flat", but that was not shown in `-Zhelp`.
Configuration menu - View commit details
-
Copy full SHA for 10c9c7c - Browse repository at this point
Copy the full SHA 10c9c7cView commit details -
Rollup merge of #117316 - Coekjan:const-binary-heap-constructor, r=dt…
…olnay Mark constructor of `BinaryHeap` as const fn #112353
Configuration menu - View commit details
-
Copy full SHA for 2dd37d4 - Browse repository at this point
Copy the full SHA 2dd37d4View commit details -
Rollup merge of #117319 - RalfJung:target-feature-inline-comment, r=t…
…miasko explain why we don't inline when target features differ Follow-up to rust-lang/rust#117141 r? ``@tmiasko``
Configuration menu - View commit details
-
Copy full SHA for f907d0e - Browse repository at this point
Copy the full SHA f907d0eView commit details -
Rollup merge of #117170 - he32:netbsd-i586, r=bjorn3
Add support for i586-unknown-netbsd as target. This restricts instructions to those offered by Pentium, to support e.g. AMD Geode. There is already an entry for this target in the NetBSD platform support page at src/doc/rustc/src/platform-support/netbsd.md ...so this should forestall its removal. Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.
Configuration menu - View commit details
-
Copy full SHA for 78b04b5 - Browse repository at this point
Copy the full SHA 78b04b5View commit details -
Rollup merge of #117259 - dtolnay:macho, r=Nilstrieb
Declare rustc_target's dependency on object/macho Without this, `cargo check` fails in crates that depend on rustc_target. <details> <summary>`cargo check` diagnostics</summary> ```console Checking rustc_target v0.0.0 error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:176:17 | 176 | object::macho::PLATFORM_MACOS => Some((13, 1)), | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:177:17 | 177 | object::macho::PLATFORM_IOS | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:178:19 | 178 | | object::macho::PLATFORM_IOSSIMULATOR | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:179:19 | 179 | | object::macho::PLATFORM_TVOS | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:180:19 | 180 | | object::macho::PLATFORM_TVOSSIMULATOR | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:181:19 | 181 | | object::macho::PLATFORM_MACCATALYST => Some((16, 2)), | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:182:17 | 182 | object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)), | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:182:51 | 182 | object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)), | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:189:33 | 189 | ("macos", _) => object::macho::PLATFORM_MACOS, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:190:38 | 190 | ("ios", "macabi") => object::macho::PLATFORM_MACCATALYST, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:191:35 | 191 | ("ios", "sim") => object::macho::PLATFORM_IOSSIMULATOR, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:192:31 | 192 | ("ios", _) => object::macho::PLATFORM_IOS, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:193:39 | 193 | ("watchos", "sim") => object::macho::PLATFORM_WATCHOSSIMULATOR, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:194:35 | 194 | ("watchos", _) => object::macho::PLATFORM_WATCHOS, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:195:36 | 195 | ("tvos", "sim") => object::macho::PLATFORM_TVOSSIMULATOR, | ^^^^^ could not find `macho` in `object` error[E0433]: failed to resolve: could not find `macho` in `object` --> compiler/rustc_target/src/spec/apple_base.rs:196:32 | 196 | ("tvos", _) => object::macho::PLATFORM_TVOS, | ^^^^^ could not find `macho` in `object` ``` </details> `rustc_target` unconditionally contains its `spec` module (i.e. there is no `#[cfg]` on the `mod spec;`). The `spec/mod.rs` also does not start with `#![cfg]`. https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/lib.rs#L37 Similarly, the `spec` module unconditionally contains `apple_base`. https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/spec/mod.rs#L62 And, `apple_base` unconditionally refers to `object::macho`. https://github.com/rust-lang/rust/blob/aa91057796695679e95329947d9f497cb5bdc5da/compiler/rustc_target/src/spec/apple_base.rs#L176 So I figure there is no way `object::macho` isn't needed by rustc. `object::macho` only exists if the `object` crate's "macho" feature is enabled. https://github.com/gimli-rs/object/blob/0.32.0/src/lib.rs#L111-L112
Configuration menu - View commit details
-
Copy full SHA for 577f86d - Browse repository at this point
Copy the full SHA 577f86dView commit details -
Rollup merge of #117322 - onur-ozkan:fix-suppressed-outputs, r=Kobzol
change default output mode of `BootstrapCommand` `SuppressOnSuccess` on `BootstrapCommand` is a problematic default mode as it affects the logs during the bootstrapping (as shown in the screenshot below). The default behavior should be to print everything unless we explicitly modify the behavior within build steps. ![image](https://github.com/rust-lang/rust/assets/39852038/8dbaaeb2-0656-4ff9-8e48-1ac0734a913f) Fixes #117315 cc `@Kobzol`
Configuration menu - View commit details
-
Copy full SHA for 771b255 - Browse repository at this point
Copy the full SHA 771b255View commit details -
Rollup merge of #117325 - Nilstrieb:pretty-macros, r=compiler-errors
Small ty::print cleanups
Configuration menu - View commit details
-
Copy full SHA for 505bc85 - Browse repository at this point
Copy the full SHA 505bc85View commit details -
Auto merge of #117335 - workingjubilee:rollup-jsomm41, r=workingjubilee
Rollup of 5 pull requests Successful merges: - #115773 (tvOS simulator support on Apple Silicon for rustc) - #117162 (Remove `cfg_match` from the prelude) - #117311 (-Zunpretty help: add missing possible values) - #117316 (Mark constructor of `BinaryHeap` as const fn) - #117319 (explain why we don't inline when target features differ) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 2106b63 - Browse repository at this point
Copy the full SHA 2106b63View commit details -
Don't use LFS64 symbols on musl
Simplify #[cfg] blocks fmt don't try to use the more appropriate direntry on musl
Configuration menu - View commit details
-
Copy full SHA for 7a504cc - Browse repository at this point
Copy the full SHA 7a504ccView commit details -
Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubilee
Rollup of 4 pull requests Successful merges: - #117170 (Add support for i586-unknown-netbsd as target.) - #117259 (Declare rustc_target's dependency on object/macho) - #117322 (change default output mode of `BootstrapCommand`) - #117325 (Small ty::print cleanups) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for bbcc169 - Browse repository at this point
Copy the full SHA bbcc169View commit details -
rustdoc: Use
ThinVec
inGenericParamDefKind
This should hopefully reduce memory usage and improve performance since these vectors are often empty (and `GenericParamDefKind` is constructed *a lot*).
Configuration menu - View commit details
-
Copy full SHA for 3784adc - Browse repository at this point
Copy the full SHA 3784adcView commit details -
Rollup merge of #115968 - git-bruh:master, r=workingjubilee
Don't use LFS64 symbols on musl Supersedes #106246 ~~Note to packagers: If your distro's musl package has already been updated, then you won't be able to build a newer version of rust until a new rust release is made with these changes merged (which can be used to bootstrap). I'm using a super hacky method to bypass this by creating a stub library with LFS64 symbols and building a patched rust, so the symbols satisfy the build requirements while the final compiler build has no references to LFS64 symbols, example: https://codeberg.org/kiss-community/repo/pulls/160/files~~ Doesn't seem to be necessary with new rustup nightly builds, likely due to updates to vendored crates cc ```@alyssais```
Configuration menu - View commit details
-
Copy full SHA for e9c7ebe - Browse repository at this point
Copy the full SHA e9c7ebeView commit details -
Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-S…
…imulacrum add bootstrap flag `--skip-stage0-validation` This change introduces the `--skip-stage0-validation` flag, which permits the use of any desired version of the stage0 compiler without verifying its version. Additionally, stage0 compiler validation check is reverted(#115103) to its default enabled state. Helps to #115065 r? Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 20debcd - Browse repository at this point
Copy the full SHA 20debcdView commit details -
Rollup merge of #117082 - fortanix:raoul/fix_closure_inherit_target_f…
…eature_sgx, r=Mark-Simulacrum Fix closure-inherit-target-feature test for SGX platform PR #116078 adds the `closure-inherit-target-feature.rs` test that checks the generated assembly code for closures. These checks explicitly check the presence of `ret` instructions. This is incompatible with the SGX target as it explicitly rewrites all `ret` instructions to mitigate LVI vulnerabilities of certain processors. This PR simply ignores these tests for the SGX platform. cc: ```@jethrogb```
Configuration menu - View commit details
-
Copy full SHA for 2b98ecd - Browse repository at this point
Copy the full SHA 2b98ecdView commit details -
Rollup merge of #117312 - RalfJung:memcpy-assumptions, r=Mark-Simulacrum
memcpy assumptions: link to source showing that GCC makes the same assumption I finally stumbled upon a source showing that GCC also generates overlapping `memcpy`. So if we're linking major C compilers making such assumptions here, let's have both clang and GCC.
Configuration menu - View commit details
-
Copy full SHA for 7201240 - Browse repository at this point
Copy the full SHA 7201240View commit details -
Rollup merge of #117337 - camelid:genparamdefkind-thinvec, r=Guillaum…
…eGomez rustdoc: Use `ThinVec` in `GenericParamDefKind` This should hopefully reduce memory usage and improve performance since these vectors are often empty (and `GenericParamDefKind` is constructed *a lot*).
Configuration menu - View commit details
-
Copy full SHA for 8b461d0 - Browse repository at this point
Copy the full SHA 8b461d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82b447a - Browse repository at this point
Copy the full SHA 82b447aView commit details -
Auto merge of #117354 - GuillaumeGomez:rollup-k9xtq0g, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - #115968 (Don't use LFS64 symbols on musl) - #117043 (add bootstrap flag `--skip-stage0-validation`) - #117082 (Fix closure-inherit-target-feature test for SGX platform) - #117312 (memcpy assumptions: link to source showing that GCC makes the same assumption) - #117337 (rustdoc: Use `ThinVec` in `GenericParamDefKind`) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 160fd3c - Browse repository at this point
Copy the full SHA 160fd3cView commit details -
handle dry runs in
dist::CodegenBackend
self.number_of_times_dry_runs_have_caused_issues += 1;
Configuration menu - View commit details
-
Copy full SHA for f656acc - Browse repository at this point
Copy the full SHA f656accView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e7364a - Browse repository at this point
Copy the full SHA 2e7364aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e6c313 - Browse repository at this point
Copy the full SHA 5e6c313View commit details -
Auto merge of #116270 - cjgillot:gvn-aggregate, r=oli-obk,RalfJung
See through aggregates in GVN This PR is extracted from rust-lang/rust#111344 The first 2 commit are cleanups to avoid repeated work. I propose to stop removing useless assignments as part of this pass, and let a later `SimplifyLocals` do it. This makes tests easier to read (among others). The next 3 commits add a constant folding mechanism to the GVN pass, presented in rust-lang/rust#116012. ~This pass is designed to only use global allocations, to avoid any risk of accidental modification of the stored state.~ The following commits implement opportunistic simplifications, in particular: - projections of aggregates: `MyStruct { x: a }.x` gets replaced by `a`, works with enums too; - projections of arrays: `[a, b][0]` becomes `a`; - projections of repeat expressions: `[a; N][x]` becomes `a`; - transform arrays of equal operands into a repeat rvalue. Fixes rust-lang/miri#3090 r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 83c9732 - Browse repository at this point
Copy the full SHA 83c9732View commit details -
Use the LLVM rustc backend as external assembler
The LLVM backend is generally available, while the gnu assembler is not on Windows and many other platforms by default.
Configuration menu - View commit details
-
Copy full SHA for 827a6d8 - Browse repository at this point
Copy the full SHA 827a6d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1e7051 - Browse repository at this point
Copy the full SHA b1e7051View commit details -
Stabilize inline asm usage on all platforms
But exclude sym operands for now as they are somewhat broken.
Configuration menu - View commit details
-
Copy full SHA for 35453ac - Browse repository at this point
Copy the full SHA 35453acView commit details -
Auto merge of #116889 - MU001999:master, r=petrochenkov
Eat close paren if capture_cfg to avoid unbalanced parens Fixes #116781
Configuration menu - View commit details
-
Copy full SHA for 88ae8c9 - Browse repository at this point
Copy the full SHA 88ae8c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for e53b18f - Browse repository at this point
Copy the full SHA e53b18fView commit details -
Auto merge of #116733 - compiler-errors:alias-liveness-but-this-time-…
…sound, r=aliemjay Consider alias bounds when computing liveness in NLL (but this time sound hopefully) This is a revival of #116040, except removing the changes to opaque lifetime captures check to make sure that we're not triggering any unsoundness due to the lack of general existential regions and the currently-existing `ReErased` hack we use instead. r? `@aliemjay` -- I appreciate you pointing out the unsoundenss in the previous iteration of this PR, and I'd like to hear that you're happy with this iteration of this PR before this goes back into FCP :> Fixes #116794 as well --- (mostly copied from #116040 and reworked slightly) # Background Right now, liveness analysis in NLL is a bit simplistic. It simply walks through all of the regions of a type and marks them as being live at points. This is problematic in the case of aliases, since it requires that we mark **all** of the regions in their args[^1] as live, leading to bugs like #42940. In reality, we may be able to deduce that fewer regions are allowed to be present in the projected type (or "hidden type" for opaques) via item bounds or where clauses, and therefore ideally, we should be able to soundly require fewer regions to be live in the alias. For example: ```rust trait Captures<'a> {} impl<T> Captures<'_> for T {} fn capture<'o>(_: &'o mut ()) -> impl Sized + Captures<'o> + 'static {} fn test_two_mut(mut x: ()) { let _f1 = capture(&mut x); let _f2 = capture(&mut x); //~^ ERROR cannot borrow `x` as mutable more than once at a time } ``` In the example above, we should be able to deduce from the `'static` bound on `capture`'s opaque that even though `'o` is a captured region, it *can never* show up in the opaque's hidden type, and can soundly be ignored for liveness purposes. # The Fix We apply a simple version of RFC 1214's `OutlivesProjectionEnv` and `OutlivesProjectionTraitDef` rules to NLL's `make_all_regions_live` computation. Specifically, when we encounter an alias type, we: 1. Look for a unique outlives bound in the param-env or item bounds for that alias. If there is more than one unique region, bail, unless any of the outlives bound's regions is `'static`, and in that case, prefer `'static`. If we find such a unique region, we can mark that outlives region as live and skip walking through the args of the opaque. 2. Otherwise, walk through the alias's args recursively, as we do today. ## Limitation: Multiple choices This approach has some limitations. Firstly, since liveness doesn't use the same type-test logic as outlives bounds do, we can't really try several options when we're faced with a choice. If we encounter two unique outlives regions in the param-env or bounds, we simply fall back to walking the opaque via its args. I expect this to be mostly mitigated by the special treatment of `'static`, and can be fixed in a forwards-compatible by a more sophisticated analysis in the future. ## Limitation: Opaque hidden types Secondly, we do not employ any of these rules when considering whether the regions captured by a hidden type are valid. That causes this code (cc #42940) to fail: ```rust trait Captures<'a> {} impl<T> Captures<'_> for T {} fn a() -> impl Sized + 'static { b(&vec![]) } fn b<'o>(_: &'o Vec<i32>) -> impl Sized + Captures<'o> + 'static {} ``` We need to have existential regions to avoid [unsoundness](rust-lang/rust#116040 (comment)) when an opaque captures a region which is not represented in its own substs but which outlives a region that does. ## Read more Context: rust-lang/rust#115822 (comment) (for the liveness case) More context: rust-lang/rust#42940 (comment) (for the opaque capture case, which this does not fix) [^1]: except for bivariant region args in opaques, which will become less relevant when we move onto edition 2024 capture semantics for opaques.
Configuration menu - View commit details
-
Copy full SHA for ec2b311 - Browse repository at this point
Copy the full SHA ec2b311View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69c6aa5 - Browse repository at this point
Copy the full SHA 69c6aa5View commit details -
Merge pull request #1403 from rust-lang/use_llvm_backend_as_assembler
Support and stabilize inline asm on all platforms
Configuration menu - View commit details
-
Copy full SHA for 9436eae - Browse repository at this point
Copy the full SHA 9436eaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e281e6f - Browse repository at this point
Copy the full SHA e281e6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for dde5880 - Browse repository at this point
Copy the full SHA dde5880View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9b21bb - Browse repository at this point
Copy the full SHA a9b21bbView commit details -
Auto merge of #117089 - wesleywiser:update_backtrace, r=Mark-Simulacrum
Update backtrace submodule This pulls in a few notable changes (see the [complete list](rust-lang/backtrace-rs@99faef8...e9da96e) for details): - rust-lang/backtrace-rs#508 - rust-lang/backtrace-rs#566 - rust-lang/backtrace-rs#569 - Fixes #116403 by no longer using `dbghelp.dll` during backtrace capture.
Configuration menu - View commit details
-
Copy full SHA for 608e968 - Browse repository at this point
Copy the full SHA 608e968View commit details -
Remove
memoffset
dependency fromrustc_query_impl
.The comment explains it's for `unstable_offset_of`, but `offset_of` is now stable.
Configuration menu - View commit details
-
Copy full SHA for 28e60de - Browse repository at this point
Copy the full SHA 28e60deView commit details -
Configuration menu - View commit details
-
Copy full SHA for c561325 - Browse repository at this point
Copy the full SHA c561325View commit details -
- Sort dependencies and features sections. - Add `tidy` markers to the sorted sections so they stay sorted. - Remove empty `[lib`] sections. - Remove "See more keys..." comments. Excluded files: - rustc_codegen_{cranelift,gcc}, because they're external. - rustc_lexer, because it has external use. - stable_mir, because it has external use.
Configuration menu - View commit details
-
Copy full SHA for 8ff624a - Browse repository at this point
Copy the full SHA 8ff624aView commit details -
On object safety error, mention new enum as alternative
When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead. Account for object unsafe `impl Trait on dyn Trait {}`. Make a distinction between public and sealed traits. Fix #80194.
Configuration menu - View commit details
-
Copy full SHA for 8c04999 - Browse repository at this point
Copy the full SHA 8c04999View commit details
Commits on Oct 30, 2023
-
Auto merge of #117332 - saethlin:panic-immediate-abort, r=workingjubilee
Increase the reach of panic_immediate_abort I wanted to use/abuse this recently as part of another project, and I was surprised how many panic-related things were left in my binaries if I built a large crate with the feature enabled along with LTO. These changes get all the panic-related symbols that I could find out of my set of locally installed Rust utilities.
Configuration menu - View commit details
-
Copy full SHA for bcb5798 - Browse repository at this point
Copy the full SHA bcb5798View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d69eb1 - Browse repository at this point
Copy the full SHA 6d69eb1View commit details -
coverage: Inline the "recursive" worker methods for assigning counters
Now that we don't manually pass around indent levels, there's no need for these worker methods to exist separately from their main callers.
Configuration menu - View commit details
-
Copy full SHA for 2f1be08 - Browse repository at this point
Copy the full SHA 2f1be08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 10c4734 - Browse repository at this point
Copy the full SHA 10c4734View commit details -
Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum
pass `CODEGEN_BACKENDS` to docker The backends to build are now defined in the `CODEGEN_BACKENDS` env var. It's correctly set in CI, but wasn't passed to docker, hence cg_clif wasn't actually built in #81746. r? `@Kobzol:` I locally tried `CODEGEN_BACKENDS="cranelift" DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux` and this change was enough for `ci/run.sh` to read the env var. So I'll try as-is and we'll see.
Configuration menu - View commit details
-
Copy full SHA for 1dfb6b1 - Browse repository at this point
Copy the full SHA 1dfb6b1View commit details -
Delay parsing of
--cfg
and--check-cfg
options.By storing the unparsed values in `Config` and then parsing them within `run_compiler`, the parsing functions can use the main symbol interner, and not create their own short-lived interners. This change also eliminates the need for one `EarlyErrorHandler` in rustdoc, because parsing errors can be reported by another, slightly later `EarlyErrorHandler`.
Configuration menu - View commit details
-
Copy full SHA for 678e01a - Browse repository at this point
Copy the full SHA 678e01aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcff79 - Browse repository at this point
Copy the full SHA bfcff79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e4ac98 - Browse repository at this point
Copy the full SHA 8e4ac98View commit details -
Make
Cfg
andCheckCfg
non-generic.They now only ever contains symbols.
Configuration menu - View commit details
-
Copy full SHA for 5c6a12c - Browse repository at this point
Copy the full SHA 5c6a12cView commit details -
Auto merge of #116485 - coastalwhite:stabilize-riscv-target-features,…
… r=Amanieu Stabilize Ratified RISC-V Target Features Stabilization PR for the ratified RISC-V target features. This stabilizes some of the target features tracked by #44839. This is also a part of #114544 and eventually needed for the RISC-V part of rust-lang/rfcs#3268. There is a similar PR for the the stdarch crate which can be found at rust-lang/stdarch#1476. This was briefly discussed on Zulip (https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704). Specifically, this PR stabilizes the: * Atomic Instructions (A) on v2.0 * Compressed Instructions (C) on v2.0 * ~Double-Precision Floating-Point (D) on v2.2~ * ~Embedded Base (E) (Given as `RV32E` / `RV64E`) on v2.0~ * ~Single-Precision Floating-Point (F) on v2.2~ * Integer Multiplication and Division (M) on v2.0 * ~Vector Operations (V) on v1.0~ * Bit Manipulations (B) on v1.0 listed as `zba`, `zbc`, `zbs` * Scalar Cryptography (Zk) v1.0.1 listed as `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`, `zbkb`, `zbkc` `zkbx` * ~Double-Precision Floating-Point in Integer Register (Zdinx) on v1.0~ * ~Half-Precision Floating-Point (Zfh) on v1.0~ * ~Minimal Half-Precision Floating-Point (Zfhmin) on v1.0~ * ~Single-Precision Floating-Point in Integer Register (Zfinx) on v1.0~ * ~Half-Precision Floating-Point in Integer Register (Zhinx) on v1.0~ * ~Minimal Half-Precision Floating-Point in Integer Register (Zhinxmin) on v1.0~ r? `@Amanieu`
Configuration menu - View commit details
-
Copy full SHA for 91bbdd9 - Browse repository at this point
Copy the full SHA 91bbdd9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 371f972 - Browse repository at this point
Copy the full SHA 371f972View commit details -
It was added in 51938c6, a commit with a 7,720 line diff and a one line commit message. Even then the comment was incorrect; there was a removed a `build_output_filenames` call with a `&[]` argument in rustdoc, but the commit removed that call. In such a large commit, it's easy for small errors to occur.
Configuration menu - View commit details
-
Copy full SHA for 85e56e8 - Browse repository at this point
Copy the full SHA 85e56e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a60d643 - Browse repository at this point
Copy the full SHA a60d643View commit details -
Using `find` and `any` from `std` makes the code shorter and clearer.
Configuration menu - View commit details
-
Copy full SHA for 95b0088 - Browse repository at this point
Copy the full SHA 95b0088View commit details -
Use ImageDataType for allocation type
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 441068b - Browse repository at this point
Copy the full SHA 441068bView commit details -
Fail typeck for illegal break-with-value
This is fixes the issue wherein typeck was succeeding for break-with-value at illegal locations such as inside `while`, `while let` and `for` loops which eventually caused an ICE during MIR interpetation for const eval. Now we fail typeck for such code which prevents faulty MIR from being generated and interpreted, thus fixing the ICE.
Configuration menu - View commit details
-
Copy full SHA for 0c8bdd0 - Browse repository at this point
Copy the full SHA 0c8bdd0View commit details -
bootstrap: bump fd-lock, clap and windows.
this also updates target-sensitive dependencies like rustix and libc.
Configuration menu - View commit details
-
Copy full SHA for 2409ea3 - Browse repository at this point
Copy the full SHA 2409ea3View commit details -
Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present. Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
Configuration menu - View commit details
-
Copy full SHA for 4b14048 - Browse repository at this point
Copy the full SHA 4b14048View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f7e506 - Browse repository at this point
Copy the full SHA 3f7e506View commit details -
Streamline
collect_crate_types
.- The early return can be right at the top. - The control flow is simplified with `if let`. - The `collect` isn't necessary. - The "Unconditionally" comment is erroneously duplicated from `check_attr_crate_type`, and can be removed.
Configuration menu - View commit details
-
Copy full SHA for be8fd8b - Browse repository at this point
Copy the full SHA be8fd8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90862f6 - Browse repository at this point
Copy the full SHA 90862f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c381ec - Browse repository at this point
Copy the full SHA 0c381ecView commit details -
Rollup merge of #117147 - DaniPopes:pphir-fn-variadic, r=compiler-errors
Print variadic argument pattern in HIR pretty printer Variadic argument name/pattern was ignored during HIR pretty printing. Could not figure out why it only works on normal functions (`va2`) and not in foreign ones (`va1`).
Configuration menu - View commit details
-
Copy full SHA for 2915707 - Browse repository at this point
Copy the full SHA 2915707View commit details -
Rollup merge of #117177 - Ayush1325:uefi-alloc-type, r=workingjubilee
Use ImageDataType for allocation type Suggested at #100499 cc `@dvdhrm` cc `@nicholasbishop`
Configuration menu - View commit details
-
Copy full SHA for 098bb37 - Browse repository at this point
Copy the full SHA 098bb37View commit details -
Rollup merge of #117205 - weiznich:multiple_notes_for_on_unimplemente…
…d, r=compiler-errors Allows `#[diagnostic::on_unimplemented]` attributes to have multiple notes This commit extends the `#[diagnostic::on_unimplemented]` (and `#[rustc_on_unimplemented]`) attributes to allow multiple `note` options. This enables emitting multiple notes for custom error messages. For now I've opted to not change any of the existing usages of `#[rustc_on_unimplemented]` and just updated the relevant compile tests. r? `@compiler-errors` I'm happy to adjust any of the existing changed location to emit the old error message if that's desired.
Configuration menu - View commit details
-
Copy full SHA for 5eb76fa - Browse repository at this point
Copy the full SHA 5eb76faView commit details -
Rollup merge of #117350 - Zalathar:counters-indent, r=oli-obk
coverage: Replace manual debug indents with nested tracing spans in `counters` Instead of indenting these debug messages manually, we can get `#[instrument]` to do a better job of it for us, giving us some nice little simplifications.
Configuration menu - View commit details
-
Copy full SHA for 9a8d800 - Browse repository at this point
Copy the full SHA 9a8d800View commit details -
Rollup merge of #117365 - bjorn3:sync_cg_clif-2023-10-29, r=oli-obk
Stabilize inline asm usage with rustc_codegen_cranelift Previously using inline asm with the cg_clif version built as part of rustc would return an error that inline asm support is unstable. Recently I implemented everything that remained for full support of inline asm with the exception of sym operands (which remain marked as unstable for cg_clif). As such I think it is time to declare the inline asm support of cg_clif stable. `@rustbot` label +A-codegen +A-cranelift +T-compiler
Configuration menu - View commit details
-
Copy full SHA for fd5ffab - Browse repository at this point
Copy the full SHA fd5ffabView commit details -
Rollup merge of #117371 - compiler-errors:unique-params, r=oli-obk
Ignore RPIT duplicated lifetimes in `opaque_types_defined_by` An RPIT's or TAIT's own generics are kinda useless -- so just ignore them. For TAITs, they will always be empty, and for RPITs, they're always duplicated lifetimes. Fixes #115013.
Configuration menu - View commit details
-
Copy full SHA for 12eb539 - Browse repository at this point
Copy the full SHA 12eb539View commit details -
Rollup merge of #117382 - gurry:114529-ice-const-eval, r=oli-obk
Fail typeck for illegal break-with-value This is fixes the issue wherein typeck was succeeding for break-with-value exprs at illegal locations such as inside `while`, `while let` and `for` loops which eventually caused an ICE during MIR interpretation for const eval. Now we fail typeck for such code which prevents faulty MIR from being generated and interpreted, thus fixing the ICE. Fixes #114529
Configuration menu - View commit details
-
Copy full SHA for 4f4b38c - Browse repository at this point
Copy the full SHA 4f4b38cView commit details -
Rollup merge of #117385 - RalfJung:deduce_param_attrs, r=oli-obk
deduce_param_attrs: explain a read-only case This takes the discussion [here](https://github.com/rust-lang/rust/pull/111517/files#r1243443625) and adds it as comment in the code. Cc `@lukas-code`
Configuration menu - View commit details
-
Copy full SHA for 288ab16 - Browse repository at this point
Copy the full SHA 288ab16View commit details -
Configuration menu - View commit details
-
Copy full SHA for b48adef - Browse repository at this point
Copy the full SHA b48adefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 745c600 - Browse repository at this point
Copy the full SHA 745c600View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc926f7 - Browse repository at this point
Copy the full SHA bc926f7View commit details -
Auto merge of #117387 - fmease:rollup-5958nsf, r=fmease
Rollup of 8 pull requests Successful merges: - #117147 (Print variadic argument pattern in HIR pretty printer) - #117177 (Use ImageDataType for allocation type) - #117205 (Allows `#[diagnostic::on_unimplemented]` attributes to have multiple) - #117350 (coverage: Replace manual debug indents with nested tracing spans in `counters`) - #117365 (Stabilize inline asm usage with rustc_codegen_cranelift) - #117371 (Ignore RPIT duplicated lifetimes in `opaque_types_defined_by`) - #117382 (Fail typeck for illegal break-with-value) - #117385 (deduce_param_attrs: explain a read-only case) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for e324cf0 - Browse repository at this point
Copy the full SHA e324cf0View commit details -
Auto merge of #116939 - chenx97:bootstrap-fd-lock, r=onur-ozkan
bootstrap: bump fd-lock, clap and windows This update is proposed as an effort to update target-sensitive dependencies like `libc` and `rustix`. Since the Cargo.toml file is modified to prevent downgrading, cargo will update the dependencies automatically when you build the binary.
Configuration menu - View commit details
-
Copy full SHA for 6d1fc53 - Browse repository at this point
Copy the full SHA 6d1fc53View commit details -
Fix missing leading space in suggestion
For a local pattern with no space between `let` and `(` e.g.: let(_a) = 3; we were previously suggesting this illegal code: let_a =3; After this change the suggestion will instead be: let _a =3; (Note the space after `let`)
Configuration menu - View commit details
-
Copy full SHA for a2486db - Browse repository at this point
Copy the full SHA a2486dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 82f34fd - Browse repository at this point
Copy the full SHA 82f34fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 972ee01 - Browse repository at this point
Copy the full SHA 972ee01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d03e13 - Browse repository at this point
Copy the full SHA 8d03e13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 251021c - Browse repository at this point
Copy the full SHA 251021cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 43ff2a7 - Browse repository at this point
Copy the full SHA 43ff2a7View commit details -
Fix bad-c-variadic error being emitted multiple times
If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once.
Configuration menu - View commit details
-
Copy full SHA for 8508e65 - Browse repository at this point
Copy the full SHA 8508e65View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5e836c - Browse repository at this point
Copy the full SHA d5e836cView commit details -
Explicitly reject const C-variadic functions
Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic".
Configuration menu - View commit details
-
Copy full SHA for f91b5ce - Browse repository at this point
Copy the full SHA f91b5ceView commit details -
Auto merge of #117267 - RalfJung:miri-tests, r=Mark-Simulacrum
update which targets we test Miri on I hope this doesn't cost too much time; running only the "pass" tests should be reasonably fast (1-2 minutes on my system). Fixes rust-lang/rust#117167
Configuration menu - View commit details
-
Copy full SHA for e6e931d - Browse repository at this point
Copy the full SHA e6e931dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58a80c8 - Browse repository at this point
Copy the full SHA 58a80c8View commit details -
Poison check_well_formed if method receivers are invalid to prevent t…
…ypeck from running on it
Configuration menu - View commit details
-
Copy full SHA for ff3a818 - Browse repository at this point
Copy the full SHA ff3a818View commit details -
Configuration menu - View commit details
-
Copy full SHA for 224ddf8 - Browse repository at this point
Copy the full SHA 224ddf8View commit details -
Rollup merge of #112463 - fmease:rustdoc-elide-x-crate-def-gen-args, …
…r=GuillaumeGomez rustdoc: elide cross-crate default generic arguments Elide cross-crate generic arguments if they coincide with their default. TL;DR: Most notably, no more `Box<…, Global>` in `std`'s docs, just `Box<…>` from now on. Fixes #80379. Also helps with #44306. Follow-up to #103885, #107637. r? ``@ghost``
Configuration menu - View commit details
-
Copy full SHA for b9dce53 - Browse repository at this point
Copy the full SHA b9dce53View commit details -
Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiser
Clean up `compiler/rustc*/Cargo.toml` Mostly by sorting dependencies, plus some other minor things. r? ``@wesleywiser``
Configuration menu - View commit details
-
Copy full SHA for 824e367 - Browse repository at this point
Copy the full SHA 824e367View commit details -
Rollup merge of #117132 - estebank:issue-80194, r=petrochenkov
On object safety error, mention new enum as alternative When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead. Fix #80194.
Configuration menu - View commit details
-
Copy full SHA for 95de91b - Browse repository at this point
Copy the full SHA 95de91bView commit details -
Rollup merge of #117317 - RalfJung:track-caller, r=oli-obk
share some track_caller logic between interpret and codegen Also move the code that implements the track_caller intrinsics out of the core interpreter engine -- it's just a helper creating a const-allocation, doesn't need to be part of the interpreter core.
Configuration menu - View commit details
-
Copy full SHA for 73100d8 - Browse repository at this point
Copy the full SHA 73100d8View commit details -
Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obk
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
Configuration menu - View commit details
-
Copy full SHA for 99b032f - Browse repository at this point
Copy the full SHA 99b032fView commit details -
Rollup merge of #117357 - tmiasko:terminate, r=wesleywiser
Rename a few remaining references to abort terminator Follow up to e3f2edc
Configuration menu - View commit details
-
Copy full SHA for 5ac999f - Browse repository at this point
Copy the full SHA 5ac999fView commit details -
Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-err…
…ors, r=oli-obk C-variadic error improvements A couple improvements for c-variadic errors: 1. Fix the bad-c-variadic error being emitted multiple times. If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once rather than once per `...`. 2. Explicitly reject `const` C-variadic functions. Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic". This also addresses one of the concerns in rust-lang/rust#44930: "Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn."
Configuration menu - View commit details
-
Copy full SHA for 784f04b - Browse repository at this point
Copy the full SHA 784f04bView commit details -
Rollup merge of #117376 - nnethercote:rustc_interface-more, r=oli-obk
More `rustc_interface` cleanups In particular, following up #117268 with more improvement to `--cfg`/`--check-cfg` handling. r? ``@oli-obk``
Configuration menu - View commit details
-
Copy full SHA for d96bdbe - Browse repository at this point
Copy the full SHA d96bdbeView commit details -
Rollup merge of #117383 - onur-ozkan:fix-x-install, r=albertlarsan68
improve and fix `x install` Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present. Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`. Fixes #117203
Configuration menu - View commit details
-
Copy full SHA for c994bdb - Browse repository at this point
Copy the full SHA c994bdbView commit details -
Rollup merge of #117390 - chenyukang:yukang-fix-117284-unused-macro, …
…r=estebank Fix unused variables lint issue for args in macro Fixes #117284 r? ````@estebank````
Configuration menu - View commit details
-
Copy full SHA for 02d32d2 - Browse repository at this point
Copy the full SHA 02d32d2View commit details -
Rollup merge of #117395 - gurry:117380-wrong-parent-sugg, r=Nilstrieb
Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes #117380
Configuration menu - View commit details
-
Copy full SHA for 9e4ab9f - Browse repository at this point
Copy the full SHA 9e4ab9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 162443b - Browse repository at this point
Copy the full SHA 162443bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 455cf5a - Browse repository at this point
Copy the full SHA 455cf5aView commit details -
Auto merge of #117405 - GuillaumeGomez:rollup-i3jxtwh, r=GuillaumeGomez
Rollup of 11 pull requests Successful merges: - #112463 (rustdoc: elide cross-crate default generic arguments) - #117068 (Clean up `compiler/rustc*/Cargo.toml`) - #117132 (On object safety error, mention new enum as alternative) - #117317 (share some track_caller logic between interpret and codegen) - #117356 (Add support for mipsel-unknown-netbsd, 32-bit LE mips.) - #117357 (Rename a few remaining references to abort terminator) - #117370 (C-variadic error improvements) - #117376 (More `rustc_interface` cleanups) - #117383 (improve and fix `x install`) - #117390 (Fix unused variables lint issue for args in macro) - #117395 (Fix missing leading space in suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 236ac91 - Browse repository at this point
Copy the full SHA 236ac91View commit details -
Configuration menu - View commit details
-
Copy full SHA for c91f60e - Browse repository at this point
Copy the full SHA c91f60eView commit details -
Rollup merge of #116862 - estebank:issue-57457, r=oli-obk
Detect when trait is implemented for type and suggest importing it Fix #57457.
Configuration menu - View commit details
-
Copy full SHA for c299595 - Browse repository at this point
Copy the full SHA c299595View commit details -
Rollup merge of #117389 - oli-obk:gen_fn, r=compiler-errors
Some diagnostics improvements of `gen` blocks These are leftovers from rust-lang/rust#116447
Configuration menu - View commit details
-
Copy full SHA for 86259e7 - Browse repository at this point
Copy the full SHA 86259e7View commit details -
Rollup merge of #117396 - oli-obk:privacy_visitor_types, r=compiler-e…
…rrors Don't treat closures/coroutine types as part of the public API Fixes a regression from rust-lang/rust#117076 r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for e648f47 - Browse repository at this point
Copy the full SHA e648f47View commit details -
Rollup merge of #117398 - Nadrieril:fix-117378, r=compiler-errors
Correctly handle nested or-patterns in exhaustiveness I had assumed nested or-patterns were flattened, and they mostly are but not always. Fixes rust-lang/rust#117378
Configuration menu - View commit details
-
Copy full SHA for 342483c - Browse repository at this point
Copy the full SHA 342483cView commit details -
Rollup merge of #117403 - oli-obk:the_gift_that_keeps_on_giving_11684…
…9, r=compiler-errors Poison check_well_formed if method receivers are invalid to prevent typeck from running on it fixes #117379 Though if some code invokes typeck without having first invoked `check_well_formed` then we'll encounter this ICE again. This can happen in const and const fn bodies if they are evaluated due to other `check_well_formed` checks or similar
Configuration menu - View commit details
-
Copy full SHA for 24c6b6c - Browse repository at this point
Copy the full SHA 24c6b6cView commit details -
Rollup merge of #117411 - oli-obk:query_merge_immobile_game, r=compil…
…er-errors,Nilstrieb Improve some diagnostics around `?Trait` bounds * uses better spans * clarifies a message that was only talking about generic params, but applies to `dyn ?Trait` and `impl ?Trait` as well
Configuration menu - View commit details
-
Copy full SHA for 3e95c6a - Browse repository at this point
Copy the full SHA 3e95c6aView commit details -
Rollup merge of #117414 - compiler-errors:tait-forevert, r=oli-obk
Don't normalize to an un-revealed opaque when we hit the recursion limit Currently, we will normalize `Opaque := Option<&Opaque>` to something like `Option<&Option<&Option<&...Opaque>>>`, hitting a limit and bottoming out in an unnormalized opaque after the recursion limit gets hit. Unfortunately, during `layout_of`, we'll simply recurse and try again if the type normalizes to something different than the type: https://github.com/rust-lang/rust/blob/e6e931dda5fffbae0fd87c5b1af753cc95556880/compiler/rustc_ty_utils/src/layout.rs#L58-L60 That means then we'll try to normalize `Option<&Option<&Option<&...Opaque>>>` again, substituting `Opaque` into itself even deeper. Eventually this will get to the point that we're just stack-overflowing on a really deep type before even hitting an opaque again. To fix this, we just bottom out into `ty::Error` instead of the unrevealed opaque type. Fixes #117412 r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for c5aec96 - Browse repository at this point
Copy the full SHA c5aec96View commit details -
Auto merge of #117415 - matthiaskrgr:rollup-jr2p1t2, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #116862 (Detect when trait is implemented for type and suggest importing it) - #117389 (Some diagnostics improvements of `gen` blocks) - #117396 (Don't treat closures/coroutine types as part of the public API) - #117398 (Correctly handle nested or-patterns in exhaustiveness) - #117403 (Poison check_well_formed if method receivers are invalid to prevent typeck from running on it) - #117411 (Improve some diagnostics around `?Trait` bounds) - #117414 (Don't normalize to an un-revealed opaque when we hit the recursion limit) r? `@ghost` `@rustbot` modify labels: rollup
Configuration menu - View commit details
-
Copy full SHA for 31bc7e2 - Browse repository at this point
Copy the full SHA 31bc7e2View commit details -
Detect object safety errors when assoc type is missing
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
Configuration menu - View commit details
-
Copy full SHA for 17a6ae2 - Browse repository at this point
Copy the full SHA 17a6ae2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c55772 - Browse repository at this point
Copy the full SHA 8c55772View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8a8ba9 - Browse repository at this point
Copy the full SHA b8a8ba9View commit details -
Auto merge of #116405 - estebank:issue-103155, r=davidtwco
Detect object safety errors when assoc type is missing When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
Configuration menu - View commit details
-
Copy full SHA for a395214 - Browse repository at this point
Copy the full SHA a395214View commit details
Commits on Oct 31, 2023
-
Auto merge of #117363 - saethlin:cross-crate-inline-when-inline, r=tm…
…iasko Enable cross-crate-inlining when MIR inlining is enabled This would make rust-lang/rust#117355 generally less obscure, and also seems like a good idea, even if for some reason someone wants MIR opts but no codegen opts.
Configuration menu - View commit details
-
Copy full SHA for 650991d - Browse repository at this point
Copy the full SHA 650991dView commit details -
remove excluded files from upstream
This commit is generated by `ferrocene/tools/pull-upstream/pull.sh`. The list of excluded files is defined in `.gitattributes`.
Configuration menu - View commit details
-
Copy full SHA for 2a97b14 - Browse repository at this point
Copy the full SHA 2a97b14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5280890 - Browse repository at this point
Copy the full SHA 5280890View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9692b7e - Browse repository at this point
Copy the full SHA 9692b7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d896e90 - Browse repository at this point
Copy the full SHA d896e90View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1af48ab - Browse repository at this point
Copy the full SHA 1af48abView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9c5176 - Browse repository at this point
Copy the full SHA d9c5176View commit details -
Configuration menu - View commit details
-
Copy full SHA for a39884b - Browse repository at this point
Copy the full SHA a39884bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cc629e - Browse repository at this point
Copy the full SHA 2cc629eView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc5e876 - Browse repository at this point
Copy the full SHA dc5e876View commit details -
these are actually auto-generated
$ ./x run generate-completions Would have saved time by avoiding doing 9692b7e manually
Configuration menu - View commit details
-
Copy full SHA for 76733dd - Browse repository at this point
Copy the full SHA 76733ddView commit details -
bless output of a newly-annotated test
Should of been part of a39884b
Configuration menu - View commit details
-
Copy full SHA for 31d5f2a - Browse repository at this point
Copy the full SHA 31d5f2aView commit details