Repository navigation
Rollup of 5 pull requests - #165591
Closed
Zalathar wants to merge 18 commits into
Closed
Rollup of 5 pull requests#165591Zalathar wants to merge 18 commits into
Zalathar wants to merge 18 commits into
Conversation
…s of `Type::is_doc_subtype_of`
Corresponding libc PR: rust-lang/libc#5555 pollfd has some extra internal fields on NuttX, so we use mem::zeroed() to initialze.
rfc 3791 says crate attributes from the command line apply before the attributes in the crate root. ordering-cli checks that several -Zcrate-attr flags apply in command line order. ordering-source records the current behaviour where the command line deny overrides the source warn, which is the wrong way round.
cmdline attributes were pushed after the attributes parsed from source, so a -Zcrate-attr lint level overrode the same lint set in the crate root. rfc 3791 says they apply before the source attributes. they are now inserted at the front of the crate attributes in command line order.
…i-obk Introduce OptimizationObjective and fix the entry shim's size attributes ~~The MIR inliner's 2 => arm allow-lists `More | Aggressive` by hand. `s/z` also derive MIR level 2, so the pass never runs there. I could not find why in the source or the history — the gate predates the tiered match and read `mir_opt_level() >= 3`, which `s/z` never satisfied either, and `Size/SizeMin` simply were not among the entries considered when the match was written. There is no revert or regression behind it. Dumping every MIR pass at all four levels, the pass sets at `2/3` and at `s/z` differ by exactly one name: Inline. So I enabled it through `PassPolicy::size_only()` and measured.~~ ~~The general situation is as follows:~~ ~~For the `.text` section in `rlib` files, I tested 24 crates; the results were −3.59% (17/24) for `os` and −5.78% (16/24) for `oz`. Additional test data includes:~~ ~~76-crate sample, Σ stripped: −0.08% (`os`), −0.13% (`oz`)~~ ~~22 apps, Σ stripped: −0.09% (`os`), −0.07% (`oz`)~~ ~~22 apps, on-disk bytes: −0.40% (7/22) (`os`), −0.74% (11/22) for (`oz`)~~ ~~22 apps, Σ .text: +0.18% (`os`), +0.84% (`oz`)~~ ~~Is enabling MIR inlining at `s/z` the right direction, given that it clearly shrinks libraries and application binaries on disk while growing application `.text`?~~ *Update*: as @oli-obk asked, the refactoring is now its own commit. The MIR inliner change will move out to another PR. The measurements above are why I still think it is worth doing, but it does not belong in this PR. When I Split it out I found that LLVM 23 no longer has `Os/Oz` as pipeline levels, they both build the `O2` pipeline now, and what marks a function as size-optimized is the `optsize/minsize` attribute on it. So at `-Copt-level=s/z` there is no longer any setting rustc hands to LLVM that says "this is a size build", it is entirely per-function. It exposed a gap that the C entry shim and `__rust_try` have no item behind them and never go through the per-item attribute path, so they were the only definitions in a size build that LLVM optimized for speed. They now get the same attributes as everything else. The refactoring itself gives size-versus-speed a name and moves the sites that are really asking "what is this build optimizing for" onto it. The ones that are asking "how hard" — the linker and pipeline level tables, where `s` and `z` map to different strings, still match on `OptLevel`. `CodeGenOptSize` was already being discarded at its only call site, so it is gone. There are codegen tests for each knob that now reads the objective, at `2`, `s` and `z`.
Implement `bit` and `set_bit` for integral types. Tracking issue: rust-lang#147702 This PR implements the `bit` and `set_bit` methods for integral types: ```rust impl /* uN, iN, usize, isize */ { pub const fn bit(self, index: u32) -> bool; pub const fn set_bit(self, index: u32, value: bool) -> Self; } ```
…kruppe nuttx: use updated pollfd definition This goes together with this libc PR: rust-lang/libc#5555
…=Urgau [rustdoc] Render `Deref` methods on aliased items Fixes rust-lang#134868. Fixes rust-lang#24686. The biggest issue was to make it work only for the matching aliased type generics. Luckily for me, it was already done in `write_shared.rs` (where we generate the JS file containing the impls that we then put into the generated web pages, which makes me wonder why we don't put that directly into the page by default, but debate for another day...). r? @lolbinarycat
…i-obk apply `-Zcrate-attr` attributes before the crate attributes part of rust-lang#138287. `-Zcrate-attr` attributes were appended after the source crate attrs so `-Zcrate-attr=deny(unused)` overrode a source `#![warn(unused)]`. rfc 3791 says they apply first. this inserts them at the front in command line order and adds two ordering tests. the edition and position tests landed separately in rust-lang#165429 so i dropped mine. r? oli-obk
Member
Author
|
Rollup of everything not yet rolled up. @bors r+ rollup=never p=5 force |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 7, 2026
Rollup of 5 pull requests Successful merges: - #164784 (Introduce OptimizationObjective and fix the entry shim's size attributes) - #147696 (Implement `bit` and `set_bit` for integral types.) - #163202 (nuttx: use updated pollfd definition) - #163571 ([rustdoc] Render `Deref` methods on aliased items) - #165482 (apply `-Zcrate-attr` attributes before the crate attributes)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for c89ca38 failed: CI. Failed job:
|
Contributor
|
PR #163571, 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:
bitandset_bitfor integral types. #147696 (Implementbitandset_bitfor integral types.)Derefmethods on aliased items #163571 ([rustdoc] RenderDerefmethods on aliased items)-Zcrate-attrattributes before the crate attributes #165482 (apply-Zcrate-attrattributes before the crate attributes)r? @ghost
Create a similar rollup