Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rollup of 9 pull requests #103419

Closed
wants to merge 21 commits into from
Closed

Conversation

notriddle
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 21 commits October 21, 2022 14:57
These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.
It was added to the CSS in d8de2b4, but
was never actually used in that PR.
… r=cjgillot

Introduce `subst_iter` and `subst_iter_copied` on `EarlyBinder`

Makes working with bounds lists a bit easier, which I seem to do a lot.

Specifically, means that we don't need to do `.transpose_iter().map(|(pred, _)| *pred)` every time we want to iterate through an `EarlyBinder<&'tcx [(Predicate, Span)]>` (and even then, still have to call `subst` later), which was a very awkward idiom imo.
…r=compiler-errors

Escape string literals when fixing overlong char literal

Fixes rust-lang#103323

``@rustbot`` label +A-diagnostics +A-suggestion-diagnostics
…ck, r=oli-obk

Handle return-position `impl Trait` in traits properly in `register_hidden_type`

The bounds that we get by calling `bound_explicit_item_bounds` from an RPITIT have projections, not opaques, but when we're *registering* an opaque, we want to treat it like an opaque.

Coincidentally fixes rust-lang#102688 as well, which makes sense, since that was failing because we were inferring an opaque type to be equal to itself (opaque cycle error => "cannot resolve opaque type").

Fixes rust-lang#103352

r? ``@oli-obk``
…guity-bug, r=oli-obk

Delay ambiguity span bug in normalize query iff not rustdoc

Oli and I decided that the compiler debt of adding another usage of `tcx.sess.opts.actually_rustdoc` is fine, because we don't really want to add more complexity to the normalize query, and moving rustdoc to use fulfill normalization (`fully_normalize`, i.e. not use the normalize query) is unnecessary overhead given that it's skipping binders and stuff.

r? oli-obk

Fixes rust-lang#102827
Fixes rust-lang#103181
…omcc

Truncate thread names on Linux and Apple targets

These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.

r? ``@thomcc``
…tion, r=GuillaumeGomez

rustdoc: remove unused CSS class `.result-description`

It was added to the CSS in d8de2b4, but was never actually used in that PR.
…ect, r=fee1-dead

Change `unknown_lint` applicability to `MaybeIncorrect`

This small PR changes the applicability of `unknown_lint` to `MaybeIncorrect`, because the suggested lint might not be the correct one.

Here is one example where the current applicability causes a problem. Clippy has a set of internal lints guarded by a feature called `internal`. If the feature is not enabled, then the internal lints are "unknown." In that case, running `cargo clippy --fix ...` on `clippy_utils` causes lines such as the followig
https://github.com/rust-lang/rust/blob/26c96e341639102afacbbcad0dc18ad0ac71ab18/src/tools/clippy/clippy_utils/src/paths.rs#L51-L52
to be changed to
```rust
 #[expect(clippy::invalid_regex)] // internal lints do not know about all external crates
 pub const FUTURES_IO_ASYNCREADEXT: [&str; 3] = ["futures_util", "io", "AsyncReadExt"];
```
which is not correct.
…leanup, r=notriddle

Use functions for headings rustdoc GUI test

r? ``@notriddle``
…, r=thomcc

Fix typo in docs of `String::leak`.

I introduced a typo in rust-lang#103280, this PR fixes it.

See rust-lang#103280 (comment)
@rustbot rustbot added 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 22, 2022
@notriddle
Copy link
Contributor Author

@bors r+ p=9

@bors
Copy link
Contributor

bors commented Oct 22, 2022

📌 Commit cbfc235 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 22, 2022
@bors
Copy link
Contributor

bors commented Oct 23, 2022

⌛ Testing commit cbfc235 with merge 23dc278c4f7131ff30dc15fd83697294ba0b2647...

@bors
Copy link
Contributor

bors commented Oct 23, 2022

💔 Test failed - checks-actions

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

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] collectionstests test:true 54.945
[RUSTC-TIMING] collectionsbenches test:true 57.447
[RUSTC-TIMING] coretests test:true 72.482
[RUSTC-TIMING] alloc test:true 76.843
error: linking with `/musl-i686/bin/musl-gcc` failed: exit status: 1
  |
  = note: "/musl-i686/bin/musl-gcc" "-m32" "-Wl,-melf_i386" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained/crt1.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained/crti.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained/crtbegin.o" "/tmp/rustcfzX52S/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/std-3cb0c7abf4cd635d.std.ec347a75-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/std-3cb0c7abf4cd635d.2z8w14nksqh53ys6.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps" "-L" "/musl-i686/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/build/compiler_builtins-4390b203de454cf1/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/librand-64510f6dfa6caa4e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/librand_chacha-334787772533efc7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/libppv_lite86-9172238d6609ea87.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/librand_core-15bd185a5e4e3baa.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/libgetrandom-ac0f65e6e57ffffd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libtest-5d94b077f956f87d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libgetopts-3cd265f7532bf83c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libunicode_width-efaca8eaed5d74c5.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/librustc_std_workspace_std-afba45ef43273c82.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libstd-a48ad3cfb0ed4785.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/libpanic_unwind-d143910d1b998849.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libobject-aa6646a97912c237.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libmemchr-6a71f97884751d94.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libaddr2line-5888838356b6a498.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libgimli-1eeaa850020b3915.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/librustc_demangle-cf827ef5ff7b68b7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libstd_detect-bdd71cc6406e27c7.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libcfg_if-0186ff389b770ddc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libhashbrown-1e6fb9154eeeeb58.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libminiz_oxide-16f46ee2d9be5c63.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libadler-e507e8cfb8809cc8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/librustc_std_workspace_alloc-85f7ac48865291fd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libunwind-e3bdf81736c3d85f.rlib" "-lunwind" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/libcfg_if-58eaa72ec84cdb13.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/liblibc-3c24be04afd2b12b.rlib" "-lc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/liballoc-1a15fedca93e3a1b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/librustc_std_workspace_core-6ca2f4ada9976318.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/libcore-4e89f6dae500b25b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/libcompiler_builtins-7ea8860c044142d5.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-nostartfiles" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/std-3cb0c7abf4cd635d" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained/crtend.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/i686-unknown-linux-musl/lib/self-contained/crtn.o"
  = note: /usr/bin/ld: /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/i686-unknown-linux-musl/release/deps/std-3cb0c7abf4cd635d.std.ec347a75-cgu.0.rcgu.o: in function `std::thread::tests::test_named_thread_truncation::{{closure}}':
          /rustc/23dc278c4f7131ff30dc15fd83697294ba0b2647/library/std/src/thread/tests.rs:56: undefined reference to `pthread_getname_np'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
[RUSTC-TIMING] std test:true 218.272
error: could not compile `std` due to previous error
Build completed unsuccessfully in 0:27:16

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants