| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
upper-case access types
|
|
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
|
|
|
|
feat(docs): add cargo-pgo to PGO documentation 📝
fixes #114995
|
|
Stabilize `[const_]pointer_byte_offsets`
Closes #96283
Awaiting FCP completion: https://github.com/rust-lang/rust/issues/96283#issuecomment-1735835331
r? libs-api
|
|
This avoids useless rebuilds of the demangler when modifying the compiler.
|
|
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.
|
|
|
|
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
|
|
Enable cg_clif tests for riscv64gc
Cranelift now has support for riscv64 on Linux.
|
|
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`
|
|
|
|
|
|
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
|
|
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?
|
|
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)

|
|
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)

|
|
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
```
|
|
|
|
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
|
|
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.
|
|
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.
|
|
<https://github.com/rust-lang/rustup/issues/1329#issuecomment-1134946736> mentioned this would be the next step
|
|
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
|
|
|
|
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.
|
|
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.
|
|
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`
|
|
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
|
|
similar to how we have `MatchSource`, it explains where the desugaring came from.
|
|
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
|
|
These happened during the `generator` -> `coroutine` rename.
|
|
|
|
|
|
`ErrorGuaranteed`, even if that error is only emitted by `check_modwitem_types`
|
|
Automatic Rustup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
|
|
Co-authored-by: Jakub Beránek <berykubik@gmail.com>
|
|
|
|
|