-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 8 pull requests #141366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #141366
Conversation
8 and 16-bit integers are subject to upcasting in C, and hence are not reliably safe. users should perform their own casting and deal with the consequences
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This way after_crate_root_parsing and -Zpretty will see them.
…n, r=dtolnay docs: Specify that common sort functions sort in an ascending direction From [forum discussion](https://users.rust-lang.org/t/is-there-a-way-to-sort-a-slice-in-specifically-ascending-or-descending-order/128998?u=natr1x) it seems like the sorting direction can be expected to always be ascending (in terms of `cmp::Ordering`). If this is the case then it would be nice to have this stated in the documentation.
std: fix doctest and explain for `as_slices` and `as_mut_slices` in `VecDeque` Fixes rust-lang#141217 r? libs
…r=workingjubilee limit impls of `VaArgSafe` to just types that are actually safe tracking issue: rust-lang#44930 Retrieving 8- or 16-bit integer arguments from a `VaList` is not safe, because such types are subject to upcasting. See rust-lang#61275 (comment) for more detail. This PR also makes the instances of `VaArgSafe` visible in the documentation, and uses a private sealed trait to make sure users cannot create additional impls of `VaArgSafe`, which would almost certainly cause UB. r? `@workingjubilee`
…piler-errors incorrectly prefer builtin `dyn` impls :3 This makes rust-lang#57893 slightly more exploitable with the new solver. It's still strictly better than the old solver and the underlying unsoundness persists in the new one even without this preference. Properly fixing rust-lang#57893 is something we've been looking at more deeply recently and discussed at the [Types Meetup during the All-Hands](https://hackmd.io/rz-4ghMzTb2wXOkdLKHaHw#Dyn-traits). Whatever approach we'll end up deciding on will likely require a fairly long transition period and some significant further design work. This should not block `-Znext-solver`. fixes rust-lang/trait-system-refactor-initiative#183 r? `@compiler-errors` cc `@rust-lang/types`
…drieril Move -Zcrate-attr injection to just after crate root parsing This way `after_crate_root_parsing` and `-Zpretty` will see them.
…dy-expr, r=compiler-errors lower bodies' params to thir before the body's value Two motivations for this: - Lowering params first means errors from lowering the params are emitted before errors from lowering the body's expression. This comes up in [tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr](https://github.com/rust-lang/rust/compare/master...dianne:rust:thir-lower-params-before-body-expr?expand=1#diff-acac6ea10e991af0da91633e08b2739f9f9ca0c8f826401b6ba829914d0806f2), where both the params and expression encounter errors in translating consts to patterns. This change puts the errors in the order they appear in the source file. - Guard patterns (rust-lang#129967) contain expressions, so lowering params containing guard patterns may add more expressions to the THIR. However, there's a check for `-Zunpretty=thir-tree` that the final expression in the THIR corresponds to its value [(link)](https://github.com/rust-lang/rust/blob/c43786c9b7b8d8dcc3f9c604e0e3074c16ed69d3/compiler/rustc_mir_build/src/builder/mod.rs#L453-L455); lowering params last would break this. As an alternative way to get guard patterns to work, I think the pretty-printer could use the expression returned by `thir_body` and the check could be removed or changed (rust-lang#141357).
…ee-body-expr, r=compiler-errors `unpretty=thir-tree`: don't require the final expr to be the body's value Two motivations for this: - I couldn't find a comment motivating this hard-coding. I can imagine it might be easier to read `unpretty=thir-flat` output if the final expression in the THIR is always the body's value, but if that's the reason, that should be the justification in the source. I can also imagine it's meant to check that all expressions will be visited by the pretty-printer, but the existing check doesn't quite do that either. - Guard patterns (rust-lang#129967) contain expressions, so lowering params containing guard patterns may add more expressions to the THIR. Currently a body's params are lowered after its expression, so guard expressions in params would end up last, breaking this. As an alternative, the params could be lowered first (rust-lang#141356).
Document why we allow escaping bound vars in LTA norm r? lcnr followup from the const normalization PR. I think I now understand why free alias norm is funny about binders
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: bf64d66bd5 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing bf64d66 (parent) -> 5df0f72 (this PR) Test differencesShow 220 test diffsStage 1
Stage 2
Additionally, 216 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 5df0f729f5355cb3cd91f6bcff13566ae96dc220 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (5df0f72): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary 0.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.537s -> 776.959s (0.05%) |
Successful merges:
as_slices
andas_mut_slices
inVecDeque
#141230 (std: fix doctest and explain foras_slices
andas_mut_slices
inVecDeque
)VaArgSafe
to just types that are actually safe #141341 (limit impls ofVaArgSafe
to just types that are actually safe)dyn
impls :3 #141347 (incorrectly prefer builtindyn
impls :3)unpretty=thir-tree
: don't require the final expr to be the body's value #141357 (unpretty=thir-tree
: don't require the final expr to be the body's value)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup