about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-04handle dry runs in `dist::CodegenBackend`Rémy Rakic-0/+4
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-11-04Ensure the rustc-codegen-cranelift-preview component is never emptybjorn3-0/+7
Either generate it with the actual codegen backend dylib or omit it entirely when the cranelift backend is disabled for this build.
2023-11-04pass `CODEGEN_BACKENDS` to dockerRémy Rakic-0/+1
2023-11-04add sanity check for compiler crate docsonur-ozkan-0/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04Ensure compiler crate paths are generated before linkingonur-ozkan-11/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04Auto merge of #117566 - weihanglo:update-cargo, r=weihanglobors-1/+0
Update cargo 8 commits in b4d18d4bd3db6d872892f6c87c51a02999b80802..65e297d1ec0dee1a74800efe600b8dc163bcf5db 2023-10-31 18:19:10 +0000 to 2023-11-03 20:56:31 +0000 - fix(cli): Clarify --test is for targets, not test functions (rust-lang/cargo#12915) - Updating "features" documentation to add a note about the new limit on number of features (rust-lang/cargo#12913) - fix: merge `trim-paths` from different profiles (rust-lang/cargo#12908) - Add regression test for issue 6915: features and transitive dev deps (rust-lang/cargo#12907) - chore(deps): update rust crate gix to 0.55.2 (rust-lang/cargo#12906) - chore(deps): update compatible (rust-lang/cargo#12905) - docs(ref): Fix open-semver-range issue link (rust-lang/cargo#12904) - docs(ref): Highlight commands to answer dep resolution questions (rust-lang/cargo#12903) r? ghost
2023-11-04Auto merge of #117564 - TaKO8Ki:rollup-lkqhpqc, r=TaKO8Kibors-644/+756
Rollup of 3 pull requests Successful merges: - #117343 (Cleanup `rustc_mir_build/../check_match.rs`) - #117550 (Use `filter_map` in `try_par_for_each_in`) - #117554 (consts: remove dead code around `i1` constant values) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-04Update cargoWeihang Lo-1/+0
Remove license exception of `byteyarn` as it is no longer used
2023-11-04Rollup merge of #117554 - durin42:llvm-delete-dead-zext-code, r=nikicTakayuki Maeda-10/+1
consts: remove dead code around `i1` constant values `LLVMConstZext` recently got deleted, and it turns out (thanks to `@nikic` for knowing!) that this is dead code. Tests all pass for me without this logic, and per nikic: > We always generate constants in "relocatable bag of bytes" > representation, so you're never going to get a plain bool. So this should be a safe thing to do. r? `@nikic` `@rustbot` label: +llvm-main
2023-11-04Rollup merge of #117550 - cuviper:try_par_for_each_in, r=est31Takayuki Maeda-7/+6
Use `filter_map` in `try_par_for_each_in` This simplifies the expression, especially for the rayon part, and also lets us drop the `E: Copy` constraint.
2023-11-04Rollup merge of #117343 - Nadrieril:cleanup_check_match, r=davidtwcoTakayuki Maeda-627/+749
Cleanup `rustc_mir_build/../check_match.rs` The file had become pretty unwieldy, with a fair amount of duplication. As a bonus, I discovered that we weren't running some pattern checks in if-let chains. I recommend looking commit-by-commit. The last commit is a whim, I think it makes more sense that way but I don't hold this opinion strongly.
2023-11-04Auto merge of #115274 - bjorn3:tidy_improvements, r=davidtwcobors-82/+275
Run tidy license checker on more workspaces The license checker didn't run on several workspaces before this PR. The same applied to the "external package sources" check. There were also two missing lockfiles which I have added now.
2023-11-04Auto merge of #117540 - ↵bors-82/+76
matthiaskrgr:baby_dont_clone_me_dont_clone_me_no_more, r=est31 clone less
2023-11-03Auto merge of #116412 - nnethercote:rm-plugin-support, r=bjorn3bors-1712/+57
Remove support for compiler plugins. They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597. r? `@ghost`
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-1712/+57
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-11-04Update rust-lang/book.Nicholas Nethercote-0/+0
To 5b6c1ceaa62ecbd6caef08df39b33b3938e99deb, for this commit: - Prepare for removal of compiler plugin support. (rust-lang/book#3764)
2023-11-03Auto merge of #115333 - joshlf:patch-5, r=RalfJungbors-9/+15
Guarantee representation of None in NPO This allows users to soundly transmute zeroes into `Option` types subject to the null pointer optimization (NPO). It unblocks https://github.com/google/zerocopy/issues/293.
2023-11-03consts: remove dead code around `i1` constant valuesAugie Fackler-10/+1
`LLVMConstZext` recently got deleted, and it turns out (thanks to @nikic for knowing!) that this is dead code. Tests all pass for me without this logic, and per nikic: > We always generate constants in "relocatable bag of bytes" > representation, so you're never going to get a plain bool. So this should be a safe thing to do. r? @nikic @rustbot label: +llvm-main
2023-11-03Tweak spans for "adt defined here" noteNadrieril-174/+183
2023-11-03Accumulate let chains alongside the visitNadrieril-76/+78
2023-11-03Use `filter_map` in `try_par_for_each_in`Josh Stone-7/+6
This simplifies the expression, especially for the rayon part, and also lets us drop the `E: Copy` constraint.
2023-11-03Auto merge of #117507 - nnethercote:rustc_span, r=Nilstriebbors-274/+188
`rustc_span` cleanups Just some things I found while looking over this crate. r? `@oli-obk`
2023-11-03Auto merge of #117538 - matthiaskrgr:rollup-63u77xb, r=matthiaskrgrbors-3586/+4952
Rollup of 5 pull requests Successful merges: - #117434 (delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`) - #117505 (Fix incorrect trait bound restriction suggestion) - #117520 (Clippy subtree update) - #117523 (oli-obk is on vacation) - #117533 (Revert "bootstrap: do not purge docs on CI environment") r? `@ghost` `@rustbot` modify labels: rollup
2023-11-03clone lessMatthias Krüger-82/+76
2023-11-03Rollup merge of #117533 - onur-ozkan:revert-117471, r=onur-ozkanMatthias Krüger-7/+1
Revert "bootstrap: do not purge docs on CI environment" This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7. ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1791609163, https://github.com/rust-lang/rust/pull/117471#issuecomment-1791937529
2023-11-03Rollup merge of #117523 - compiler-errors:oli-vacation, r=compiler-errorsMatthias Krüger-1/+1
oli-obk is on vacation `@oli-obk` is away and asked me to put him in the vacation list 😸
2023-11-03Rollup merge of #117520 - flip1995:clippyup, r=ManishearthMatthias Krüger-3578/+4902
Clippy subtree update r? `@Manishearth`
2023-11-03Rollup merge of #117505 - estebank:issue-117501, r=TaKO8KiMatthias Krüger-0/+44
Fix incorrect trait bound restriction suggestion Suggest ``` error[E0308]: mismatched types --> $DIR/restrict-assoc-type-of-generic-bound.rs:9:12 | LL | pub fn foo<A: MyTrait, B>(a: A) -> B { | - - expected `B` because of return type | | | expected this type parameter LL | return a.bar(); | ^^^^^^^ expected type parameter `B`, found associated type | = note: expected type parameter `B` found associated type `<A as MyTrait>::T` help: consider further restricting this bound | LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B { | +++++++ ``` instead of ``` error[E0308]: mismatched types --> $DIR/restrict-assoc-type-of-generic-bound.rs:9:12 | LL | pub fn foo<A: MyTrait, B>(a: A) -> B { | - - expected `B` because of return type | | | expected this type parameter LL | return a.bar(); | ^^^^^^^ expected type parameter `B`, found associated type | = note: expected type parameter `B` found associated type `<A as MyTrait>::T` help: consider further restricting this bound | LL | pub fn foo<A: MyTrait + <T = B>, B>(a: A) -> B { | +++++++++ ``` Fix #117501.
2023-11-03Rollup merge of #117434 - BugenZhao:box-error-provide, r=cuviperMatthias Krüger-0/+4
delegate `<Box<E> as Error>::provide` to `<E as Error>::provide` Fix #117432.
2023-11-03Auto merge of #117535 - RalfJung:revert-cranelift, r=onur-ozkanbors-12/+0
Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum" This reverts commit 1dfb6b162be402d8ca37e8aad4f58898b44e3a15, reversing changes made to bcb5798dd890a691644af9d371f3bd7fcc465584. That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs. Fixes https://github.com/rust-lang/rust/issues/117430
2023-11-03Auto merge of #117510 - elichai:patch-3, r=cuviperbors-0/+1
Add track_caller to transmute_copy Currently if `size_of::<Src>() < size_of::<Dst>()` you will see the following error: ```rust thread 'test' panicked at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/mem/mod.rs:1056:5: cannot transmute_copy if Dst is larger than Src ``` This fixes it so it will show the invocation location
2023-11-03Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum"Ralf Jung-12/+0
This reverts commit 1dfb6b162be402d8ca37e8aad4f58898b44e3a15, reversing changes made to bcb5798dd890a691644af9d371f3bd7fcc465584. That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs.
2023-11-03Revert "bootstrap: do not purge docs on CI environment"onur-ozkan-7/+1
This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7.
2023-11-03Auto merge of #116439 - compiler-errors:on-unimplemented, r=davidtwcobors-154/+169
Pretty print `Fn` traits in `rustc_on_unimplemented` I don't think that users really ever should need to think about `Fn*` traits' tupled args for a simple trait error. r? diagnostics
2023-11-03Auto merge of #117508 - nnethercote:symbols-FxIndexSet, r=cuviperbors-21/+12
Use `FxIndexSet` in the symbol interner. It makes the code a little nicer. r? `@ghost`
2023-11-03Auto merge of #117313 - GuillaumeGomez:cg_gcc-tests, r=onur-ozkanbors-16/+231
Run part of `rustc_codegen_gcc`'s tests in CI Thanks to #112701 and `@bjorn3,` it made this much easier. Also cc `@antoyo.` r? `@bjorn3`
2023-11-03Auto merge of #117131 - compiler-errors:projection-oops, r=lcnrbors-143/+204
Add all RPITITs when augmenting param-env with GAT bounds in `check_type_bounds` When checking that associated type definitions actually satisfy their associated type bounds in `check_type_bounds`, we construct a "`normalize_param_env`" which adds a projection predicate that allows us to assume that we can project the GAT to the definition we're checking. For example, in: ```rust type Foo { type Bar: Display = i32; } ``` We would add `<Self as Foo>::Bar = i32` as a projection predicate when checking that `i32: Display` holds. That `normalize_param_env` was, for some reason, only being used to normalize the predicate before it was registered. This is sketchy, because a nested obligation may require the GAT bound to hold, and also the projection cache is broken and doesn't differentiate projection cache keys that differ by param-envs 😿. This `normalize_param_env` is also not sufficient when we have nested RPITITs and default trait methods, since we need to be able to assume we can normalize both the RPITIT and all of its child RPITITs to sufficiently prove all of its bounds. This is the cause of #117104, which only starts to fail for RPITITs that are nested 3 and above due to the projection-cache bug above.[^1] ## First fix Use the `normalize_param_env` everywhere in `check_type_bounds`. This is reflected in a test I've constructed that fixes a GAT-only failure. ## Second fix For RPITITs, install projection predicates for each RPITIT in the same function in `check_type_bounds`. This fixes #117104. not sure who to request, so... r? `@lcnr` hehe feel free to reassign :3 [^1]: The projection cache bug specifically occurs because we try normalizing the `assumed_wf_types` with the non-normalization param-env. This causes us to insert a projection cache entry that keeps the outermost RPITIT rigid, and it trivially satisifes all its own bounds. Super sketchy![^2] [^2]: I haven't actually gone and fixed the projection cache bug because it's only marginally related, but I could, and it should no longer be triggered here.
2023-11-03Set some environment variables value only if ENABLE_GCC_CODEGEN is setGuillaume Gomez-6/+17
2023-11-02Auto merge of #117134 - lcnr:dropck_outlives-coroutine, r=compiler-errorsbors-59/+110
dropck_outlives check whether generator witness needs_drop see https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.23116242.3A.20Code.20no.20longer.20compiles.20after.20-Zdrop-tracking-mir.20.E2.80.A6/near/398311627 for an explanation. Fixes #116242 (or well, the repro by `@jamuraa` in https://github.com/rust-lang/rust/issues/116242#issuecomment-1739802047). I did not add a regression test as it depends on other crates. We do have 1 test going from fail to pass, showing the intended behavior. r? types
2023-11-02Pretty print Fn traits in rustc_on_unimplementedMichael Goulet-154/+169
2023-11-02Add all RPITITs when augmenting param-env with GAT bounds in check_type_boundsMichael Goulet-77/+114
2023-11-02Use the normalizing param-env always in check_type_boundsMichael Goulet-143/+167
2023-11-03Use `FxIndexSet` in the symbol interner.Nicholas Nethercote-21/+12
It makes the code a little nicer. As part of this, the interner's `Default` impl is removed and `prefill` is used in a test instead.
2023-11-02Add comment explaining why the ENABLE_GCC_CODEGEN env variable is neededGuillaume Gomez-2/+8
2023-11-02Fix invalid enabling of gcc backend in `run.sh`Guillaume Gomez-3/+3
2023-11-02Rename `SKIP_CODEGEN_TESTS` into `ENABLE_GCC_CODEGEN`Guillaume Gomez-6/+6
2023-11-02Don't include GCC backend if SKIP_CODEGEN_TESTS is not enabledGuillaume Gomez-2/+7
2023-11-02Run codegen tests outside if not llvm-15Guillaume Gomez-3/+15
2023-11-02Add FIXME header for two comments in cg_gcc and cg_clif boostrap typesGuillaume Gomez-2/+2
2023-11-02Remove `libc` dependency in cg_gcc alloc_system exampleGuillaume Gomez-4/+14