-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 10 pull requests #131269
Rollup of 10 pull requests #131269
Conversation
And fix the stability attribute on the `pub use` in `core::ops`.
The target name itself contains GNU, we should set that in the environment as well.
Const-stabilizes: - `str::from_utf8_unchecked_mut`
Const-stabilizes: - `str::as_bytes_mut` - `str::as_mut_ptr`
Const-stabilizes: - `NonNull::as_mut`
Const-stabilizes: - `UnsafeCell::get_mut`
Const-stabilizes: - `slice::first_mut` - `slice::split_first_mut` - `slice::last_mut` - `slice::split_last_mut`
This was previously set to `target_abi = "elf"`, but `elf` is not used elsewhere as a target ABI (even though there's many targets that have it in their name).
Add x86_64-unknown-trusty as tier 3 target This PR adds a third target for the Trusty platform, `x86_64-unknown-trusty`. Please let me know if an MCP is required. rust-lang/compiler-team#582 was made when adding the first two targets, I can make another one for the new target as well if needed. # Target Tier Policy Acknowledgements > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) - Nicole LeGare (```@randomPoison)``` - Andrei Homescu (```@ahomescu)``` - Chris Wailes ([email protected]) - As a fallback [email protected] can be contacted Note that this does not reflect the maintainers currently listed in [`trusty.md`](https://github.com/rust-lang/rust/blob/c52c23b6f44cd19718721a5e3b2eeb169e9c96ff/src/doc/rustc/src/platform-support/trusty.md). rust-lang#130452 is currently open to update the list of maintainers in the documentation. > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. The new target `x86_64-unknown-trusty` follows the existing naming convention for similar targets. > Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. 👍 > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. There are no known legal issues or license incompatibilities. > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. 👍 > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. This PR only adds the target. `std` support is being worked on and will be added in a future PR. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. 👍 > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ```@)``` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. 👍 > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. 👍 > Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. (Having support in a fork of the backend is not sufficient, it must be upstream.) 👍
…ra, r=dtolnay Stabilize the `map`/`value` methods on `ControlFlow` And fix the stability attribute on the `pub use` in `core::ops`. libs-api in rust-lang#75744 (comment) seemed reasonably happy with naming for these, so let's try for an FCP. Summary: ```rust impl<B, C> ControlFlow<B, C> { pub fn break_value(self) -> Option<B>; pub fn map_break<T>(self, f: impl FnOnce(B) -> T) -> ControlFlow<T, C>; pub fn continue_value(self) -> Option<C>; pub fn map_continue<T>(self, f: impl FnOnce(C) -> T) -> ControlFlow<B, T>; } ``` Resolves rust-lang#75744 ``@rustbot`` label +needs-fcp +t-libs-api -t-libs --- Aside, in case it keeps someone else from going down the same dead end: I looked at the `{break,continue}_value` methods and tried to make them `const` as part of this, but that's disallowed because of not having `const Drop`, so put it back to not even unstably-const.
…enkov Increase Stack Size for AIX On AIX, there are limited support for tail call optimizations, so we need to set a larger stack size value. Fixes the following tests on AIX: ``` [ui] tests/ui/associated-consts/issue-93775.rs [ui] tests/ui/closures/deeply-nested_closures.rs [ui] tests/ui/issues/issue-74564-if-expr-stack-overflow.rs [ui] tests/ui/parser/survive-peano-lesson-queue.rs ```
…rochenkov Fix `target_env` in `avr-unknown-gnu-atmega328` The target name itself contains GNU, we should probably reflect that as `target_env = "gnu"` as well? Or from my reading of rust-lang#74941 (comment), perhaps not, but then that should probably be documented somewhere? There's no listed target maintainer, but the target was introduced in rust-lang#74941, so I'll ping the author of that: `@dylanmckay` Relatedly, I wonder _why_ the recommendation is to [create separate target triples for each AVR](https://github.com/Rahix/avr-hal/tree/main/avr-specs), when `-Ctarget-cpu=...` would suffice, perhaps you could also elaborate on that? Was it just because `-Ctarget-cpu=...` didn't exist back then? If so, now that it does, should we now change the target back to e.g. `avr-unknown-none-gnu`, and require the user to set `-Ctarget-cpu=...` instead?
…nkfelix Fix `target_abi` in `sparc-unknown-none-elf` This was previously set to `target_abi = "elf"`, but `elf` is not used elsewhere as a target ABI (even though there's many targets that have it in their name), so I've removed it. CC target maintainer ``@jonathanpallant,`` what do you think about this? ``@rustbot`` label O-SPARC
…-referees, r=tgross35 Stabilize 5 `const_mut_refs`-dependent API Since `const_mut_refs` and `const_refs_to_cell` have been stabilized, we now may create mutable references inside our library API. Thus we now stabilize the `const fn` version of these public library APIs which required such in their implementation: - const `NonNull::as_mut` rust-lang#91822 (comment) - const `slice::{first,last}_mut`: rust-lang#83570 (comment) - const `str::as_{mut_ptr,bytes_mut}`: rust-lang#130086 (comment) - const `str::from_utf8_unchecked_mut`: rust-lang#91005 (comment) - const `UnsafeCell::get_mut`: rust-lang#88836 (comment)
…aelwoerister Remove mw from triagebot.toml cc rust-lang/team#1565
Fix typo in csky-unknown-linux-gnuabiv2.md
…=notriddle [rustdoc] Fix list margins Fixes rust-lang#131106. Fixes rust-lang#131223. Follow-up of rust-lang#130933. This PR changes the display as follow: the margin between list items is reduced by half to ensure that they visually still seem part of the same list, while also being bigger than previously which improves display for list items with more than one paragragh. Paragraphs also get they bottom margin reduced to a little bit less than the list items bottom margin for two reasons: 1. The list items keep having the biggest bottom margin which makes it better for coherency. 2. The paragraphs are still visually separated but they don't "overcome" the list. | before | after | |-|-| | ![Screenshot from 2024-10-04 17-58-51](https://github.com/user-attachments/assets/3fdc1472-781e-435d-a0d7-012f43aa8fb8) | ![image](https://github.com/user-attachments/assets/0366313d-416f-4f04-b905-bb16c54f4528) | Can be tested [here](https://rustdoc.crud.net/imperio/fix-list-margins/doc/test_docs/long_list/index.html). r? ``@notriddle``
…ieyouxu Fix some `pub(crate)` that were undetected bc of `#[instrument]` Self-explanatory, minor clean up.
@bors r+ rollup=never p=10 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 14f303bc14 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (bece740): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (secondary 0.9%)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.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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 771.36s -> 771.548s (0.02%) |
Successful merges:
map
/value
methods onControlFlow
#130518 (Stabilize themap
/value
methods onControlFlow
)target_env
inavr-unknown-gnu-atmega328
#131171 (Fixtarget_env
inavr-unknown-gnu-atmega328
)target_abi
insparc-unknown-none-elf
#131174 (Fixtarget_abi
insparc-unknown-none-elf
)const_mut_refs
-dependent API #131177 ( Stabilize 5const_mut_refs
-dependent API)pub(crate)
that were undetected bc of#[instrument]
#131264 (Fix somepub(crate)
that were undetected bc of#[instrument]
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup