| Age | Commit message (Collapse) | Author | Lines |
|
tests: Change ABIs in tests to more future-resilient ones
Eventually we're going to make these tests not work as they are currently written on HEAD, so change them now to get ahead of that.
r? aDotInTheVoid
|
|
r=compiler-errors
Make E0621 missing lifetime suggestion verbose
```
error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/42701_one_named_and_one_anonymous.rs:10:9
|
LL | &*x
| ^^^ lifetime `'a` required
|
help: add explicit lifetime `'a` to the type of `x`
|
LL | fn foo2<'a>(a: &'a Foo, x: &'a i32) -> &'a i32 {
| ++
```
Part of rust-lang/rust#141973.
|
|
Configure bootstrap backport nominations through triagebot
Following the discussion in [#t-infra/bootstrap > ✔ Have triagebot create backport nomination threads?](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.E2.9C.94.20Have.20triagebot.20create.20backport.20nomination.20threads.3F/with/521876500) where we noticed that bootstrap backport nominations were difficult to track, since:
- We don't really have a dedicated person / group of people checking for bootstrap backport nominations.
- We don't really have an establish way of handling bootstrap backports.
This PR configures triagebot to open backport nominations threads (indicated for bootstrap team if a given PR has the suitable team label, https://github.com/rust-lang/rust/labels/T-bootstrap) in [#t-infra/bootstrap/backports](https://rust-lang.zulipchat.com/#narrow/channel/507486-t-infra.2Fbootstrap.2Fbackports). The current configuration is such that **the whole bootstrap team will be pinged for bootstrap backport nominations**[^diverges].
### Steps
- [x] ~~Ping members who opt-in subscribe to backport channel, or ping the whole bootstrap team?~~
- Poll: [#t-infra/bootstrap > Have triagebot create backport nomination threads? @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Have.20triagebot.20create.20backport.20nomination.20threads.3F/near/522141337)
- Votes (as of 2025-06-10): 3 votes "no preference", 1 vote "in favor".
- [x] ~~(Best for follow-up) Maybe also document bootstrap team's backport process / decision process in Forge? It's a bit different from [compiler team's backport process](https://forge.rust-lang.org/compiler/backports.html) because we don't have weekly bootstrap triage meetings and thus don't have sync backport decisions.~~
- Tracked as follow-up in Forge: https://github.com/rust-lang/rust-forge/issues/889.
---
r? Kobzol
[^diverges]: Note that this configuration is similar to the types team backport nominations, but diverges from the compiler team.
|
|
Implement representation options to smir
Resolves rust-lang/project-stable-mir#89
|
|
Make root vars more stable
Never resolve a ty/ct vid to a higher vid as its root. This should make the optimization in rust-lang/rust#141500 more "stable" when there are a lot of vars flying around.
r? `@ghost`
|
|
Remove check_mod_loops query and run the checks per-body instead
This analysis is older than my first rustc contribution I believe. It was never querified. Ideally we'd merge it into the analysis happening within typeck anyway (typeck just uses span_delayed_bug instead of erroring), but I didn't want to do that within this PR that also moves things around and subtly changes diagnostic ordering.
|
|
Miri subtree update
r? `@ghost`
|
|
Rollup of 16 pull requests
Successful merges:
- rust-lang/rust#134442 (Specify the behavior of `file!`)
- rust-lang/rust#140372 (Exhaustively handle parsed attributes in CheckAttr)
- rust-lang/rust#140766 (Stabilize keylocker)
- rust-lang/rust#141642 (Note the version and PR of removed features when using it)
- rust-lang/rust#141818 (Don't create .msi installer for gnullvm hosts)
- rust-lang/rust#141909 (Add central execution context to bootstrap)
- rust-lang/rust#141992 (use `#[naked]` for `__rust_probestack`)
- rust-lang/rust#142101 (core::ptr: deduplicate more method docs)
- rust-lang/rust#142102 (docs: Small clarification on the usage of read_to_string and read_to_end trait methods)
- rust-lang/rust#142124 (Allow transmute casts in pre-runtime-MIR)
- rust-lang/rust#142240 (deduplicate the rest of AST walker functions)
- rust-lang/rust#142258 (platform-support.md: Mention specific Linux kernel version or later)
- rust-lang/rust#142262 (Mark `core::slice::memchr` as `#[doc(hidden)]`)
- rust-lang/rust#142271 (compiler: fn ptrs should hit different lints based on ABI)
- rust-lang/rust#142275 (rustdoc: Refractor `clean_ty_generics`)
- rust-lang/rust#142288 (const_eval: fix some outdated comments)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
const_eval: fix some outdated comments
r? ``@oli-obk``
|
|
rustdoc: Refractor `clean_ty_generics`
Refactoring towards rust-lang/rust#142226
[Zulip Discussion](https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/Why.20sometimes.20.60predicates_of.60.20.28vs.20.60explicit_predicates_.2E.2E.2E/near/523182529)
The old `clean_ty_generics` was almost always called with the same args, so rename it to `clean_ty_generics_inner`, and add a new wrapper that generates those args from a `DefId`. Having this be the main entrypoint to `clean_ty_generics` should make it easier to start calling `inferred_outlives_of` https://github.com/rust-lang/rust/pull/142264#discussion_r2136498360 (and is more readable even if we don't)
Also, replaces all calls in rustdoc to `tcx.predicates_of` to `tcx.explicit_predicates_of`, which lets us remove `filter_non_trait_generics`
r? ```@fmease```
|
|
r=RalfJung
compiler: fn ptrs should hit different lints based on ABI
I was looking closer at the code for linting on ABIs and realized a mistake was probably made during rebase or review. I think that for function pointers in the HIR, the lint that fires should probably depend on the ABI we encountered, e.g. if it's on the newly-deprecated set of ABIs or not. This will be slightly confusing for a little bit, but I think we can do more to reduce that confusion by switching `unsupported_fn_ptr_calling_conventions` to a hard error.
r? ``@RalfJung``
|
|
Mark `core::slice::memchr` as `#[doc(hidden)]`
It's purely internal, and not intended to be a public API, even on nightly. This stops it showing up and being misleading in rustdoc search.
It also mirrors the (also internal) `core::slice::sort` module.
|
|
teohhanhui:docs/platform-support-linux-kernel-version-or-later, r=workingjubilee
platform-support.md: Mention specific Linux kernel version or later
To be consistent with notes for other targets...
~~(Only made the change for `aarch64-unknown-linux-gnu` for now, as that's fairly certain after looking at the `git blame` just to be sure.)~~
|
|
deduplicate the rest of AST walker functions
After this, we can tidy things up and deduplicate the visitor traits themselves too.
Fixes rust-lang/rust#139825, apparently
r? ``@oli-obk``
|
|
Allow transmute casts in pre-runtime-MIR
r? ``@scottmcm``
cc ``@BoxyUwU``
turns out in https://github.com/rust-lang/rust/pull/138393 I erroneously used transmute casts in https://github.com/rust-lang/rust/blob/fd3da4bebdff63b7529483ff7025986ef16bf463/compiler/rustc_mir_build/src/builder/matches/test.rs#L209
I don't think they have any issues using them before runtime, we just checked for them because we didn't have code exercising those code paths
|
|
docs: Small clarification on the usage of read_to_string and read_to_end trait methods
Small clarification on the usage of read_to_string and read_to_end trait methods. The goal is to make it clear that these trait methods will become locked up if attempting to read to the end of stdin (which is a bit non-sensical unless the other end closes the pipe).
Fixes: rust-lang/rust#141714
|
|
r=workingjubilee
core::ptr: deduplicate more method docs
used `rg -Fxf library/core/src/ptr/{const,mut}_ptr.rs` to find duplicated doc comments, and `diff -u` after copying them to files to ensure they are actually identical.
`sed 's| */// *||'` was then used to translate the doc comments to plain markdown.
part of https://github.com/rust-lang/rust/issues/139190
|
|
use `#[naked]` for `__rust_probestack`
Let's see if this works now.
Previously this change was in https://github.com/rust-lang/compiler-builtins/pull/897, but we decided to wait until `compiler-builtins` was a subtree (and also `cfg(bootstrap)` is gone now).
r? ``@tgross35`` cc ``@bjorn3``
try-job: `dist-various*`
try-job: `test-various*`
|
|
Add central execution context to bootstrap
This PR continues the effort toward command centralization as outlined in https://github.com/rust-lang/rust/issues/126819. It introduces a centralized execution context through which all commands will be executed. Previously, centralization was limited to build methods; this PR extends it to the `config` module and updates the remaining methods accordingly.
Best reviewed commit by commit.
r? ``@Kobzol``
|
|
Don't create .msi installer for gnullvm hosts
WIX toolset works only on Windows hosts, but gnullvm doesn't have host toolchain yet. To get out of this loop, we will create a single release without MSI installer.
Split out from: https://github.com/rust-lang/rust/pull/140772
|
|
Note the version and PR of removed features when using it
Fixes rust-lang/rust#141619
I added the diagnostic information. Since all the current version information is present, it prints the version information anyway, as shown in tests/ui. And PR will not print if it is None, we can gradually add the PR links.
Split into two commits for easier review.
r? compiler
cc ``@jyn514`` Since you're on vocation in the review list, I can't r? you.
|
|
Stabilize keylocker
This PR stabilizes the feature flag `keylocker_x86` (tracking issue rust-lang/rust#134813).
# Public API
The 2 `x86` target features `kl` and `widekl`, and the associated intrinsics in stdarch.
These target features are very specialized, and are only used to signal the presence of the corresponding CPU instruction. They don't have any nontrivial interaction with the ABI (contrary to something like AVX), and serve the only purpose of enabling 11 stdarch intrinsics, all of which have been implemented and propagated to rustc via a stdarch submodule update.
Also, these were added way back in LLVM12, and as the minimum LLVM required for rustc is LLVM19, we are safe in that front too!
# Associated PRs
- rust-lang/rust#134814
- rust-lang/stdarch#1706
- rust-lang/rust#136831 (stdarch submodule update)
- rust-lang/stdarch#1795 (stabilizing the runtime detection and intrinsics)
- rust-lang/rust#141964 (stdarch submodule update for the stabilization of the runtime detection and intrinsics)
As all of the required tasks have been done (adding the target features to rustc, implementing their runtime detection in std_detect and implementing the associated intrinsics in core_arch), these target features can be stabilized now.
cc ````@rust-lang/lang````
cc ````@rust-lang/libs-api```` for the intrinsics and runtime detection
I don't think anyone else worked on this feature, so no one else to ping, maybe cc ````@Amanieu.```` I will send the reference pr soon.
|
|
Exhaustively handle parsed attributes in CheckAttr
This pr
- Deletes the unused `DiagnosticAttribute ` struct and variant
- Comments the `AttributeKind ` enum
- The match in `CheckAttrVisitor` is now exhaustive for `AttributeKind::Parsed`.
- Moved some checks around after that change
I did *not* thoroughly check that there's no duplicated logic between this pass and the attribute parsing but I think it's OK.
r? ````@jdonszelmann````
|
|
Specify the behavior of `file!`
This takes the current behavior of `file!` and documents it so it is safe to make assumptions about.
For example, Cargo could provide a `CARGO_RUSTC_CURRENT_DIR` as a base path for `file!`.
Example use cases
- Being able to look up test assets relative to the current file ([example](https://github.com/rust-lang/cargo/blob/b9026bf654d7fac283465e58b8b76742244ef07d/tests/testsuite/cargo_add/add_basic/mod.rs#L34))
- Inline snapshotting libraries being able to update Rust source code ([example](https://github.com/rust-lang/cargo/blob/b9026bf654d7fac283465e58b8b76742244ef07d/tests/testsuite/alt_registry.rs#L36-L45))
See rust-lang/cargo#3946 for more context.
T-libs-api discussed two solutions in rust-lang/libs-team#478
- `file_absolute!`:
- Has less meaning in other build tools like buck2
- Bakes in the assumption that a full path is available (e.g. with trim-paths)
- Specifying `file!`s behavior (this PR):
- Leaves it to the user to deal with trim-paths
- Even though `file!` is currently unspecified, changing it would likely have too large of an impact on the ecosystem at this time.
A future possibility is that rustc could have a flag that controls modifies the base path used for `file!`.
That seems purely additive with specifying the behavior and we do not want to block on it.
It would also likely be too disruptive for Cargo users (as mentioned). However, we tried to keep this in mind when specifying the behavior.
|
|
mir-opt: Do not create storage marks in EarlyOtherwiseBranch
Fixes #141212.
The first commit add `StorageDead` by creating new indirect BB that makes CFG more complicated, but I think it's better to just not create storage marks.
r? mir-opt
|
|
|
|
|
|
cache `param_env` canonicalization
BLocked on rust-lang/rust#141581
|
|
|
|
native_lib: skip to next .so if function was in dependency of the first
|
|
test_dup: ensure the FDs remain in sync even after dup'ing
|
|
|
|
|
|
float tests: test non-determinism for more operations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add SmallVec test
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
|
|
Automatic Rustup
|
|
|
|
Update cargo
18 commits in 64a12460708cf146e16cc61f28aba5dc2463bbb4..fc1518ef02b77327d70d4026b95ea719dd9b8c51
2025-05-30 18:25:08 +0000 to 2025-06-06 04:49:44 +0000
- fix: Make UI tests handle hyperlinks consistently (rust-lang/cargo#15640)
- Update "time out" to "timeout" (rust-lang/cargo#15637)
- fix(workspace): reload current manifest path member only (rust-lang/cargo#15633)
- Update dependencies (rust-lang/cargo#15635)
- fix(publish): Don't tell people to ctrl-c without knowing consequences (rust-lang/cargo#15632)
- refactor: clean up `clippy::perf` lint warnings (rust-lang/cargo#15631)
- fix(package): Skip registry check if its not needed (rust-lang/cargo#15629)
- Add --offline for comp (rust-lang/cargo#15623)
- cargo-credential-libsecret: load libsecret only once (rust-lang/cargo#15295)
- test(publish): Improvements in prep for `-Zpackage-workspace` stabilization (rust-lang/cargo#15628)
- fix(package): Allow packaging of self-cycles with -Zpackage-workspace (rust-lang/cargo#15626)
- docs: clarify `--all-features` not available for all commmands (rust-lang/cargo#15572)
- Remove double reference in Shell::print_json (rust-lang/cargo#15460)
- fix(trim-paths): remap all paths to `build.build-dir` (rust-lang/cargo#15614)
- test(trim-paths): enable more tests for windows-msvc (rust-lang/cargo#15621)
- fix(fingerprint): explicit reason rather than "stale; unknown reason" (rust-lang/cargo#15617)
- Fix cargo add overwriting symlinked Cargo.toml files (rust-lang/cargo#15281)
- chore(deps): update alpine docker tag to v3.22 (rust-lang/cargo#15616)
r? ghost
|
|
trait methods
|
|
|
|
|