Closed
Conversation
Previously, `self.props.compile_flags.windows(2)` would return an empty iterator in the case where `self.props.compile_flags` was 1 or 0 length. This created incorrectness where tests like `tests/mir-opt/pre-codegen/copy_and_clone.rs` would pass when they should fail.
`IntoQueryParam` is a trait that lets query callers be a bit sloppy with the passed-in key. - Types similar to `DefId` will be auto-converted to `DefId`. Likewise for `LocalDefId`. - Reference types will be auto-derefed. The auto-conversion is genuinely useful; the auto-derefing much less so. In practice it's only used for passing `&DefId` to queries that accept `DefId`, which is an anti-pattern because `DefId` is marked with `#[rustc_pass_by_value]`. This commit removes the auto-deref impl and makes the necessary sigil adjustments. (I generally avoid using `*` to deref manually at call sites, preferring to deref via `&` in patterns or via `*` in match expressions. Mostly because that way a single deref often covers multiple call sites.)
Same as 147495, just keeping it up-to-date.
…lignment from a vtable
…-ref-P, r=oli-obk Remove `impl IntoQueryParam<P> for &'a P`. `IntoQueryParam` is a trait that lets query callers be a bit sloppy with the passed-in key. - Types similar to `DefId` will be auto-converted to `DefId`. Likewise for `LocalDefId`. - Reference types will be auto-derefed. The auto-conversion is genuinely useful; the auto-derefing much less so. In practice it's only used for passing `&DefId` to queries that accept `DefId`, which is an anti-pattern because `DefId` is marked with `#[rustc_pass_by_value]`. This commit removes the auto-deref impl and makes the necessary sigil adjustments. (I generally avoid using `*` to deref manually at call sites, preferring to deref via `&` in patterns or via `*` in match expressions. Mostly because that way a single deref often covers multiple call sites.) r? @cjgillot
…r=mati865 Tighten the `!range` bounds on alignments in vtables Right now we're only telling LLVM that they're non-zero, but alignments must be powers of two so can't be more than `isize::MAX+1`. And we actually never emit anything beyond LLVM's limit of 2²⁹, so outside of 16-bit targets the limit is that. (Pulled out from rust-lang#152867 which is starting to have too much in it.)
… r=jhpratt Stabilize `str_as_str` - Tracking issue: rust-lang#130366 - Needs FCP - `ByteStr` methods remain gated behind `bstr` feature gate (rust-lang#134915) Closes rust-lang#130366
Remove two more flaky assertions from `oneshot` tests These elapsed-time-upper-bound assertions are inherently flaky in CI, because CI runners will sometimes starve individual threads for a surprisingly long time, so the assertions can fail even if nothing went wrong. Similar changes for other flaky `oneshot` tests: - rust-lang#152145 - rust-lang#152648 Example flaky failure: - rust-lang#152747 (comment)
…al-sv-init, r=mati865
Error on attempt to construct scalable vector type
If you attempt to construct a scalable vector type rust will ICE.
E.g.:
```rust
#[rustc_scalable_vector(4)]
#[allow(non_camel_case_types)]
struct svint32_t(i32);
fn main() {
let foo = svint32_t(1);
// This will ICE
}
```
This PR adds a check that will emit an error if you attempt to use a SV constructor and a test to ensure it works.
…on-flag-check, r=clubby789,jieyouxu Improve runtest revision redundant cfg check While attempting to ingest rust-lang#148034 via ferrocene/ferrocene#2172 we noticed a test failure, as we add some `compile_flags` to tests. We saw a failure looking like this: ``` Testing stage1 with compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu) running 2 tests 2026-02-20T20:21:28.846102Z ERROR compiletest::runtest: redundant cfg argument `copy` is already created by the revision [mir-opt] tests/mir-opt/pre-codegen/copy_and_clone.rs#COPY ... F . ``` While my Rust checkout passed: ``` Testing stage1 with compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu) running 2 tests .. test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 381 filtered out; finished in 107.10ms ``` This caused me to add some debugging statements. Ferrocene: ``` 2026-02-20T21:05:39.808427Z ERROR compiletest::runtest: "copy": does ["--edition=2015", "--cfg=copy"] contain `"--cfg=copy"` or `["--cfg", "copy"]`? true 2026-02-20T21:05:39.808427Z ERROR compiletest::runtest: "clone": does ["--edition=2015"] contain `"--cfg=clone"` or `["--cfg", "clone"]`? false 2026-02-20T21:05:39.808435Z ERROR compiletest::runtest: redundant cfg argument `copy` is already created by the revision ``` Rust: ``` 2026-02-20T21:04:18.493158Z ERROR compiletest::runtest: "copy": does ["--cfg=copy"] contain `"--cfg=copy"` or `["--cfg", "copy"]`? false 2026-02-20T21:04:18.493158Z ERROR compiletest::runtest: "clone": does [] contain `"--cfg=clone"` or `["--cfg", "clone"]`? false ``` I noticed while reviewing the related functionality that there is a call to `.windows(2)` in the relevant check for redundant cfgs: https://github.com/rust-lang/rust/blob/0376d43d443cba463a0b6a6ec9140ea17d7b7130/src/tools/compiletest/src/runtest.rs#L507-L511 Noting: https://github.com/rust-lang/rust/blob/0376d43d443cba463a0b6a6ec9140ea17d7b7130/library/core/src/slice/mod.rs#L1064-L1066 Because of this, the revision check was getting an empty iterator when `self.props.compile_flags` was length 0 or 1. This fix adjusts the check to handle such cases. I went ahead and fixed the relevant test (4b3cd9b) that was impacted by this. I do not suspect there are others, at least within the scope that Ferrocene tests, as we have not previously seen this failure.
…-ld, r=jieyouxu Update wasm-component-ld Same as rust-lang#147495, just keeping it up-to-date.
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
PR #152879, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
impl IntoQueryParam<P> for &'a P. #152879 (Removeimpl IntoQueryParam<P> for &'a P.)!rangebounds on alignments in vtables #152929 (Tighten the!rangebounds on alignments in vtables)str_as_str#151603 (Stabilizestr_as_str)oneshottests #152878 (Remove two more flaky assertions fromoneshottests)r? @ghost
Create a similar rollup