Skip to content
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

Merged
merged 28 commits into from
Oct 5, 2024
Merged

Conversation

workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

randomPoison and others added 28 commits September 16, 2024 15:47
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)
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.
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself PG-exploit-mitigations Project group: Exploit mitigations labels Oct 4, 2024
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 4, 2024
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Oct 4, 2024

📌 Commit 4778893 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2024
@bors
Copy link
Contributor

bors commented Oct 4, 2024

⌛ Testing commit 4778893 with merge bece740...

@bors
Copy link
Contributor

bors commented Oct 5, 2024

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing bece740 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 5, 2024
@bors bors merged commit bece740 into rust-lang:master Oct 5, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 5, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#130453 Add x86_64-unknown-trusty as tier 3 target 653301a568fec4ac1769ce803afffca7da2e6ceb (link)
#130518 Stabilize the map/value methods on ControlFlow 7b4d39def8e8b495305e7f180e85b75dcd98880b (link)
#131116 Increase Stack Size for AIX 5e5fe82cdc5309f27ac65f029a670c7a78ac8b4b (link)
#131171 Fix target_env in avr-unknown-gnu-atmega328 f7ad591f39dd0bf0d81bff51211cbc8db39ff8d6 (link)
#131174 Fix target_abi in sparc-unknown-none-elf 6feba49d0f4b7bf7daf982316f26c7436d4a298e (link)
#131177 Stabilize 5 const_mut_refs-dependent API 78312b9a8178a3782d461e5414b8da0c54a6ffb5 (link)
#131238 Remove mw from triagebot.toml c2c470f772c977ed952c78290de57de53ff38fdc (link)
#131240 Fix typo in csky-unknown-linux-gnuabiv2.md f879263c6975902ab28ab617c872ad63ff56c728 (link)
#131257 [rustdoc] Fix list margins f50bb7edfa66fd3db2340df9b40b873f63f2d577 (link)
#131264 Fix some pub(crate) that were undetected bc of `#[instrum… 6f7d2065f4847f55fb142497f766b552d866a68d (link)

previous master: 14f303bc14

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bece740): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 6
All ❌✅ (primary) - - 0

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [1.3%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results (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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.6%, -2.6%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 771.36s -> 771.548s (0.02%)
Artifact size: 342.03 MiB -> 342.01 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.