Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

riverbl and others added 29 commits January 18, 2024 20:38
Add `display` method to `OsStr` for lossy display of an `OsStr` which may contain invalid unicode.

Invalid Unicode sequences are replaced with `U+FFFD REPLACEMENT CHARACTER`.

This change also makes the `std::ffi::os_str` module public.
There is no error expected. It's simply the "regular" test for sig_ign.
So rename it.
The test is for the "bare" variant of the attribute that looks like this:

    #[unix_sigpipe]

which is not allowed, because it must look like this:

    #[unix_sigpipe = "sig_ign"]
The only difference between the files is the presence/absence of

    #![feature(unix_sigpipe)]

attribute. Avoid duplication by using revisions instead.
To make sure that

    #[unix_sigpipe = "x"]
    #[unix_sigpipe = "y"]

behaves like

    #[unix_sigpipe = "x"]
    #[unix_sigpipe = "x"]
Modified according to rust-lang/compiler-team#505.

By running test cases, I found that modifying the attribute's only_local tag sometimes causes some unintuitive error reports, so I tend to split it into multiple PRs and edit a small number of attributes each time to prevent too many changes at once. Prevent possible subsequent difficulties in locating problems.
Fixes typo (i.e., saniziter) in test file names.
It's a specialized form of the `UntranslatableDiagnostic` lint that is
deny-by-default.

Now that `UntranslatableDiagnostic` has been changed from
allow-by-default to deny-by-default, the trivial variant is no longer
needed.
Add `display` method to `OsStr`

Add `display` method to `OsStr` for lossy display of an `OsStr` which may contain invalid unicode.

Invalid Unicode sequences are replaced with `U+FFFD REPLACEMENT CHARACTER`.

This change also makes the `std::ffi::os_str` module public (see rust-lang/libs-team#326 (comment)).

- ACP: rust-lang/libs-team#326
- Tracking issue: rust-lang#120048
…, r=davidtwco

Fix issues in suggesting importing extern crate paths

Fixes rust-lang#121168

r? ``@petrochenkov``
…osticTrivial, r=davidtwco

Remove the `UntranslatableDiagnosticTrivial` lint.

It's a specialized form of the `UntranslatableDiagnostic` lint that is deny-by-default.

Now that `UntranslatableDiagnostic` has been changed from allow-by-default to deny-by-default, the trivial variant is no longer needed.

r? ``@davidtwco``
…r=davidtwco

unix_sigpipe: Simple fixes and improvements in tests

In rust-lang#120832 I included 5 preparatory commits.

It will take a while before discussions there and in rust-lang#62569 is settled, so here is a PR that splits out 4 of the commits that are easy to review, to get them out of the way.

r? ``@davidtwco`` who already approved these commits in rust-lang#120832 (but I have tweaked them a bit and rebased them since then).

For the convenience of my reviewer, here are the full commit messages of the commits:
<details>
<summary>Click to expand</summary>

```
commit 948b1d6 (HEAD -> unix_sigpipe-tests-fixes, origin/unix_sigpipe-tests-fixes)
Author: Martin Nordholts <[email protected]>
Date:   Fri Feb 9 07:57:27 2024 +0100

    tests: Add unix_sigpipe-different-duplicates.rs test variant

    To make sure that

        #[unix_sigpipe = "x"]
        #[unix_sigpipe = "y"]

    behaves like

        #[unix_sigpipe = "x"]
        #[unix_sigpipe = "x"]

commit d14f158
Author: Martin Nordholts <[email protected]>
Date:   Fri Feb 9 08:47:47 2024 +0100

    tests: Combine unix_sigpipe-not-used.rs and unix_sigpipe-only-feature.rs

    The only difference between the files is the presence/absence of

        #![feature(unix_sigpipe)]

    attribute. Avoid duplication by using revisions instead.

commit a1cb3db
Author: Martin Nordholts <[email protected]>
Date:   Fri Feb 9 06:44:56 2024 +0100

    tests: Rename unix_sigpipe.rs to unix_sigpipe-bare.rs for clarity

    The test is for the "bare" variant of the attribute that looks like this:

        #[unix_sigpipe]

    which is not allowed, because it must look like this:

        #[unix_sigpipe = "sig_ign"]

commit e060274
Author: Martin Nordholts <[email protected]>
Date:   Fri Feb 9 05:48:24 2024 +0100

    tests: Fix typo unix_sigpipe-error.rs -> unix_sigpipe-sig_ign.rs

    There is no error expected. It's simply the "regular" test for sig_ign.
    So rename it.
```

</details>

Tracking issue: rust-lang#97889
…06, r=GuillaumeGomez

Add test case for primitive links in alias js

Follow up rust-lang#121490

CC rust-lang#121106
…_20240226, r=lcnr

Changing some attributes to only_local.

Modified according to rust-lang/compiler-team#505.

By running test cases, I found that modifying the attribute's only_local tag sometimes causes some unintuitive error reports, so I tend to split it into multiple PRs and edit a small number of attributes each time to prevent too many changes at once. Prevent possible subsequent difficulties in locating problems.

r? ``@lcnr``
…to-def, r=notriddle

Fix link generation for foreign macro in jump to definition feature

The crate name is already added to the link so it shouldn't be added a second time for local foreign macros.

r? ``@notriddle``
…=lcnr

Adjust printing for RPITITs

1. Call RPITITs `{synthetic#N}` instead of `{opaque#N}`.
2. Fall back to printing the RPITIT like an opaque even when printed as an `AliasTy`, just like we do for `ty::Alias`.

You could argue that (2.) is misleading, but I believe it's more consistent than naming `{synthetic#N}`, which I assume approximately nobody knows where that def path name comes from.

r? lcnr
…time-as-unsupported, r=cuviper

handle unavailable creation time as `io::ErrorKind::Unsupported`
…-errors

Split rustc_type_ir to avoid rustc_ast from depending on it

unblocks rust-lang#121576

and resolves a FIXME in `rustc_ast`'s `Cargo.toml`

The new crate is tiny, but it will get bigger in rust-lang#121576
…ler-errors

CFI: Fix typo in test file names

Fixes typo (i.e., saniziter) in test file names.
…e, r=lcnr

Process alias-relate obligations in CoerceUnsized loop

After rust-lang#119106, we now emit `AliasRelate` goals when relating `?0` and `Alias<T, ..>` in the new solver. In the ad-hoc `CoerceUnsized` selection loop, we now may have `AliasRelate` goals which must be processed to constrain type variables which are mentioned in other goals.

---

For example, in the included test, we try to coerce `&<ManuallyDrop<T> as Deref>::Target` to `&dyn Foo`. This requires proving:
* 1 `&<ManuallyDrop<T> as Deref>::Target: CoerceUnsized<&dyn Foo>`
    * 2 `<ManuallyDrop<T> as Deref>::Target alias-relate ?0`
    * 3 `?0: Unsize<dyn Foo>`
        * 4 `?0: Foo`
        * 5 `?0: Sized`

If we don't process goal (2.) before processing goal (3.), then we hit ambiguity since `?0` is never constrained, and therefore we bail out, refusing to coerce the types. After processing (2.), we know `?0 := T`, and the rest of the goals can be processed normally.
@rustbot rustbot added the O-unix Operating system: Unix-like label Feb 28, 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 Feb 28, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented Feb 28, 2024

📌 Commit 1b08d1a has been approved by GuillaumeGomez

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 Feb 28, 2024
@bors
Copy link
Collaborator

bors commented Feb 28, 2024

⌛ Testing commit 1b08d1a with merge bf9c7a6...

@bors
Copy link
Collaborator

bors commented Feb 28, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing bf9c7a6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 28, 2024
@bors bors merged commit bf9c7a6 into rust-lang:master Feb 28, 2024
@rustbot rustbot added this to the 1.78.0 milestone Feb 28, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#120051 Add display method to OsStr 3144dcd2ed454ff5a0a6dbc799b956b4cdf05f1e (link)
#121226 Fix issues in suggesting importing extern crate paths eb455a14ad96b67223f2bd48f53cf8163abd1318 (link)
#121423 Remove the UntranslatableDiagnosticTrivial lint. bfc3fc64fb79d29cee12a2361a42d541ad8f1b6a (link)
#121527 unix_sigpipe: Simple fixes and improvements in tests 14b60fef332126dc28234eb498ef9f05043b42fd (link)
#121572 Add test case for primitive links in alias js 7778d30b79ca63cbdc430d1716b3460505d6c7bb (link)
#121661 Changing some attributes to only_local. 55a9dc326cd6569b4ce38f883d41803955c14a15 (link)
#121680 Fix link generation for foreign macro in jump to definition… e20f4d2b3e49032878a98c9571c686149660ccb6 (link)
#121686 Adjust printing for RPITITs 58864376a500d37a1b2e3ac91b2ad25750b98c9b (link)
#121691 handle unavailable creation time as `io::ErrorKind::Unsuppo… afee65fc44083f511cb406f104e207741f33a06e (link)
#121695 Split rustc_type_ir to avoid rustc_ast from depending on it 632d9907dea14d99c1a9fa7262b157b2ce74df0d (link)
#121698 CFI: Fix typo in test file names 4f246ec5b199fa1dd907c98ed657c93189916189 (link)
#121702 Process alias-relate obligations in CoerceUnsized loop 77def657f8cefc5117455ca3e93255da346dc5a3 (link)

previous master: d377991bad

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

@GuillaumeGomez GuillaumeGomez deleted the rollup-msrsrnk branch February 28, 2024 21:04
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bf9c7a6): 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)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) - - 0

Cycles

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

Binary size

Results

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.0% [0.0%, 0.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 5
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.0%] 9
All ❌✅ (primary) -0.1% [-0.4%, 0.0%] 6

Bootstrap: 651.442s -> 651.872s (0.07%)
Artifact size: 311.19 MiB -> 311.14 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like 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.