about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-10-27Add gen blocks to ast and do some broken ast loweringOli Scherer-9/+9
2023-10-27Fix review commentsbjorn3-4/+2
2023-10-27Distribute cg_clif as a rustup componentbjorn3-31/+152
2023-10-27give some more help for the unusual data racesRalf Jung-29/+54
2023-10-27data-race: preserve structured access information longer, and don't ↵Ralf Jung-154/+196
upper-case access types
2023-10-27Auto merge of #117272 - matthiaskrgr:rollup-upg122z, r=matthiaskrgrbors-0/+23
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
2023-10-27add aarch64-apple-darwin to list of supported targetsRalf Jung-2/+3
2023-10-27Rollup merge of #114998 - meysam81:meysam/feat/add-cargo-pgo-to-docs, r=ehussMatthias KrĂĽger-0/+23
feat(docs): add cargo-pgo to PGO documentation 📝 fixes #114995
2023-10-27Auto merge of #116205 - WaffleLapkin:stabilize_pointer_byte_offsets, r=dtolnaybors-5/+0
Stabilize `[const_]pointer_byte_offsets` Closes #96283 Awaiting FCP completion: https://github.com/rust-lang/rust/issues/96283#issuecomment-1735835331 r? libs-api
2023-10-27For run-coverage tests, build `rust-demangler` with the stage 0 compilerZalathar-1/+3
This avoids useless rebuilds of the demangler when modifying the compiler.
2023-10-27Don't provide `rust-demangler` to run-make testsZalathar-5/+1
The 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.
2023-10-26Parse rustc version at compile timeDavid Tolnay-17/+11
2023-10-26Auto merge of #117249 - matthiaskrgr:rollup-h4og5rv, r=matthiaskrgrbors-1/+4
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
2023-10-26Rollup merge of #117032 - bjorn3:riscv64_enable_cg_clif_tests, r=petrochenkovMatthias KrĂĽger-1/+4
Enable cg_clif tests for riscv64gc Cranelift now has support for riscv64 on Linux.
2023-10-26Auto merge of #116581 - Kobzol:bootstrap-cmd-run, r=onur-ozkanbors-80/+158
Centralize command running in boostrap (part one) This PR tries to consolidate the various `run, try_run, run_quiet, run_quiet_delaying_failure, run_delaying_failure` etc. methods on `Builder`. This PR only touches command execution which doesn't produce output that would be later read by bootstrap, and it also only refactors spawning of commands that happens after a builder is created (commands executed during download & git submodule checkout are left as-is, for now). The `run_cmd` method is quite meaty, but I expect that it will be changing rapidly soon, so I considered it easy to kept everything in a single method, and only after things settle down a bit, then maybe again split it up a bit. I still kept the original shortcut methods like `run_quiet_delaying_failure`, but they now only delegate to `run_cmd`. I tried to keep the original behavior (or as close to it as possible) for all the various commands, but it is a giant mess, so there may be some deviations. Notably, `cmd.output()` is now always called, instead of just `status()`, which was called previously in some situations. Apart from the refactored methods, there is also `Config::try_run`, `check_run`, methods that run commands that produce output, oh my… that's left for follow-up PRs :) The driving goal of this (and following) refactors is to centralize command execution in bootstrap on a single place, to make command mocking feasible. r? `@onur-ozkan`
2023-10-26Allow ignoring the failure of command executionJakub Beránek-5/+18
2023-10-26Fix residual (never merged) check-cfg syntax in docUrgau-1/+1
2023-10-26Auto merge of #116983 - Urgau:prepare-bootstrap-for-new-check-cfg, r=Kobzolbors-9/+34
Prepare the `bootstrap` tool for the new check-cfg syntax This PR prepare the `bootstrap` tool for the [new check-cfg syntax](https://github.com/rust-lang/rust/pull/111072) as well as the according [changes to Cargo](https://github.com/rust-lang/cargo/pull/12845). ~~Note that while the new syntax can technically available on stage > 2, we actually cannot use it since we need a cargo version that supports the new syntax which won't happen until the next beta bump (if I understand everything correctly).~~ r? bootstrap
2023-10-26Auto merge of #117148 - dtolnay:sinceversion, r=cjgillotbors-24/+43
Store #[stable] attribute's `since` value in structured form Followup to https://github.com/rust-lang/rust/pull/116773#pullrequestreview-1680913901. Prior to this PR, if you wrote an improper `since` version in a `stable` attribute, such as `#[stable(feature = "foo", since = "wat.0")]`, rustc would emit a diagnostic saying **_'since' must be a Rust version number, such as "1.31.0"_** and then throw out the whole `stable` attribute as if it weren't there. This strategy had 2 problems, both fixed in this PR: 1. If there was also a `#[deprecated]` attribute on the same item, rustc would want to enforce that the stabilization version is older than the deprecation version. This involved reparsing the `stable` attribute's `since` version, with a diagnostic **_invalid stability version found_** if it failed to parse. Of course this diagnostic was unreachable because an invalid `since` version would have already caused the `stable` attribute to be thrown out. This PR deletes that unreachable diagnostic. 2. By throwing out the `stable` attribute when `since` is invalid, you'd end up with a second diagnostic saying **_function has missing stability attribute_** even though your function is not missing a stability attribute. This PR preserves the `stable` attribute even when `since` cannot be parsed, avoiding the misleading second diagnostic. Followups I plan to try next: - Do the same for the `since` value of `#[deprecated]`. - See whether it makes sense to also preserve `stable` and/or `unstable` attributes when they contain an invalid `feature`. What redundant/misleading diagnostics can this eliminate? What problems arise from not having a usable feature name for some API, in the situation that we're already failing compilation, so not concerned about anything that happens in downstream code?
2023-10-26Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiserbors-3/+5
Stop telling people to submit bugs for internal feature ICEs This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. I thought about several ways to do this but now used the explicit threading of an `Arc<AtomicBool>` through `Session`. This is not exactly incremental-safe, but this is fine, as this is set during macro expansion, which is pre-incremental, and also only affects the output of ICEs, at which point incremental correctness doesn't matter much anyways. See [MCP 620.](https://github.com/rust-lang/compiler-team/issues/596) ![image](https://github.com/rust-lang/rust/assets/48135649/be661f05-b78a-40a9-b01d-81ad2dbdb690)
2023-10-26Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiserbors-12/+27
Stop telling people to submit bugs for internal feature ICEs This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. I thought about several ways to do this but now used the explicit threading of an `Arc<AtomicBool>` through `Session`. This is not exactly incremental-safe, but this is fine, as this is set during macro expansion, which is pre-incremental, and also only affects the output of ICEs, at which point incremental correctness doesn't matter much anyways. See [MCP 620.](https://github.com/rust-lang/compiler-team/issues/596) ![image](https://github.com/rust-lang/rust/assets/48135649/be661f05-b78a-40a9-b01d-81ad2dbdb690)
2023-10-26Auto merge of #115872 - ferrocene:pa-remap-cargo-home, r=clubby789bors-1/+33
Remap Cargo dependencies to /rust/deps :warning: **This doesn't affect user-compiled programs, it only affects building the Rust compiler itself.** :warning: Right now, `rust.remap-debuginfo = true` doesn't completely remap all paths: while LLVM and rustc sources are properly remapped (respectively to `/rust/llvm` and `/rust/$commit`), Cargo dependencies still use absolute paths from the Cargo home. This never affected builds from CI much, because `CARGO_HOME=/cargo` in CI, so users see paths like this included in the precompiled binaries and libraries: ``` /cargo/registry/src/index.crates.io-6f17d22bba15001f/gimli-0.26.2/src/read/line.rs ``` Builds outside CI don't have remapping though, and it's confusing that the config flag doesn't fully do what it advertises. This PR fixes it by adding remapping for dependencies too. *All registries's* source directory are remapped to `/rust/deps`, to account for multiple registries being able to contain crates.io crates (sparse index vs git, and source replacement mirrors). This results in paths like this being included: ``` /rust/deps/gimli-0.26.2/src/read/line.rs ```
2023-10-25Stabilize `[const_]pointer_byte_offsets`Maybe Waffle-5/+0
2023-10-25Rollup merge of #117175 - oli-obk:gen_fn_split, r=compiler-errorsMatthias KrĂĽger-10/+10
Rename AsyncCoroutineKind to CoroutineSource pulled out of https://github.com/rust-lang/rust/pull/116447 Also refactors the printing infra of `CoroutineSource` to be ready for easily extending it with a `Gen` variant for `gen` blocks
2023-10-25Stop telling people to submit bugs for internal feature ICEsNilstrieb-3/+5
This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. See MCP 620.
2023-10-25Stop telling people to submit bugs for internal feature ICEsNilstrieb-12/+27
This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. See MCP 620.
2023-10-25generate beta manifests as pre-requisit rust-lang/rustup#1329Skgland-0/+23
<https://github.com/rust-lang/rustup/issues/1329#issuecomment-1134946736> mentioned this would be the next step
2023-10-25Auto merge of #117180 - matthiaskrgr:rollup-rxhl6ep, r=matthiaskrgrbors-5/+21
Rollup of 7 pull requests Successful merges: - #117111 (Remove support for alias `-Z instrument-coverage`) - #117141 (Require target features to match exactly during inlining) - #117152 (Fix unwrap suggestion for async fn) - #117154 (implement C ABI lowering for CSKY) - #117159 (Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed`) - #117163 (compiletest: Display compilation errors in mir-opt tests) - #117173 (Make `Iterator` a lang item) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-25Typo.Camille GILLOT-1/+1
2023-10-25Rollup merge of #117163 - tmiasko:compiletest-mir-opt, r=compiler-errorsMatthias KrĂĽger-1/+1
compiletest: Display compilation errors in mir-opt tests Previously when compilation failed the `check_mir_dump` would panic first, so we would never display the compiler output.
2023-10-25Rollup merge of #117159 - oli-obk:error_shenanigans, r=estebankMatthias KrĂĽger-2/+12
Work around the fact that `check_mod_type_wf` may spuriously return `ErrorGuaranteed` Even if that error is only emitted by `check_mod_item_types`. fixes https://github.com/rust-lang/rust/issues/117153 A cleaner refactoring would merge/chain these queries in ways that ensure we only actually get an `ErrorGuaranteed` if there was an error emitted.
2023-10-25Rollup merge of #117154 - Dirreke:csky-unknown-linux-gunabiv2, r=bjorn3Matthias KrĂĽger-2/+8
implement C ABI lowering for CSKY fix https://github.com/rust-lang/compiler-builtins/issues/551 ​Reference: [CSKY ABI Manual](https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1695027452256/T-HEAD_800_Series_ABI_Standards_Manual.pdf) ​ Reference: [Clang CSKY lowering code](https://github.com/llvm/llvm-project/blob/4a074f32a6914f2a8d7215d78758c24942dddc3d/clang/lib/CodeGen/Targets/CSKY.cpp#L76-L162) r? `@bjorn3`
2023-10-25Auto merge of #117172 - matthiaskrgr:rollup-s56bm2f, r=matthiaskrgrbors-1/+1
Rollup of 7 pull requests Successful merges: - #116801 (Add test for 113326) - #117133 (Merge `impl_wf_inference` (`check_mod_impl_wf`) check into coherence checking) - #117136 (Intern `LocalDefId` list from `opaque_types_defined_by` query) - #117150 (Update cargo) - #117158 (Update THIR unused_unsafe lint) - #117160 (Fix typo in test comment) - #117168 (Fix some coroutine sentences that don't make sense anymore.) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-25Rename `AsyncCoroutineKind` to `CoroutineSource`Oli Scherer-10/+10
similar to how we have `MatchSource`, it explains where the desugaring came from.
2023-10-25Rollup merge of #117168 - oli-obk:coroutine_cleanups, r=JohnTitorMatthias KrĂĽger-1/+1
Fix some coroutine sentences that don't make sense anymore. These happened during the `generator` -> `coroutine` rename. Found thanks to `@pthariensflame` for their thorough review of the `generator` -> `coroutine` rename https://github.com/rust-lang/rust/pull/116958#issuecomment-1777756937
2023-10-25Fix some coroutine sentences that don't make sense anymore.Oli Scherer-1/+1
These happened during the `generator` -> `coroutine` rename.
2023-10-25compiletest: Display compilation errors in mir-opt testsTomasz MiÄ…sko-1/+1
2023-10-25implement C ABI lowering for CSKYdirreke-2/+8
2023-10-25Work around the fact that `check_mod_type_wf` may spuriously return ↵Oli Scherer-2/+12
`ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types`
2023-10-25Auto merge of #3141 - rust-lang:rustup-2023-10-25, r=RalfJungbors-14/+21
Automatic Rustup
2023-10-25CLOCK_UPTIME_RAW exists on all macos targets, not just the ARM onesRalf Jung-9/+5
2023-10-25Do not merge fn pointer casts.Camille GILLOT-3/+2
2023-10-25Merge from rustcThe Miri Conjob Bot-4/+15
2023-10-25Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-10-25add some more gamma function testsRalf Jung-3/+2
2023-10-25Update profile-guided-optimization.mdMeysam-2/+3
2023-10-25Update src/doc/rustc/src/profile-guided-optimization.mdMeysam-1/+1
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
2023-10-25Update src/doc/rustc/src/profile-guided-optimization.mdMeysam-1/+1
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
2023-10-24Expose a non-Symbol way to access current rustc version stringDavid Tolnay-6/+5
2023-10-24Handle structured stable attribute 'since' version in clippyDavid Tolnay-12/+19