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 13 pull requests #137649

Closed
wants to merge 31 commits into from
Closed

Conversation

fmease
Copy link
Member

@fmease fmease commented Feb 26, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

usamoi and others added 30 commits February 21, 2025 19:38
The implementation of the `type_has_metadata` function is duplicated in
`rustc_codegen_ssa` and `rustc_monomorphize`, so move this to
`rustc_middle`.
`rustc_codegen_llvm` relied on `Deref` impls where `Deref::Target` was
or contained an extern type - in my experimental implementation of
rust-lang/rfcs#3729, this isn't possible as the `Target` associated
type's `?Sized` bound cannot be relaxed backwards compatibly (unless we
come up with some way of doing this).

In later pull requests with the rust-lang/rfcs#3729 implementation,
breakage like this could only occur for nightly users relying on the
`extern_types` feature.

Upstreaming this to avoid needing to keep carrying this patch locally,
and I think it'll necessarily need to change eventually.
In the standard library, the `Extend` impl for `Iterator` (specialised
with `TrustedLen`) has a parameter which is constrained by a projection
predicate. This projection predicate provides a value for an inference
variable but host effect evaluation wasn't resolving variables first.

Adding the extra resolve can the number of errors in some tests when they
gain host effect predicates, but this is not unexpected as calls to
`resolve_vars_if_possible` can cause more error tainting to happen.

Co-authored-by: Boxy <[email protected]>
Added to demonstrate change in output in following commit. Many more
interesting tests change with different output, missing errors, new
errors, etc related to this but they all depend on feature flags and
are much more complex than this.
Like trait predicates, the self type ought to be skipped here.
these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still
pass optimization level to llvm-bitcode-linker

optimization level is not passed to llbc, which should be a mistake
…ility, r=notriddle

fix(rustdoc): Fixed stability version in rustdoc

Tries to fix rust-lang#137141
Fixed by adding checks glob exports
…r-body, r=oli-obk

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473
tests: Add regression test for derive token invalidation (rust-lang#81099)

Closes rust-lang#81099.
…ts, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
…adata, r=fmease,bjorn3

ssa/mono: deduplicate `type_has_metadata`

The implementation of the `type_has_metadata` function is duplicated in `rustc_codegen_ssa` and `rustc_monomorphize`, so move this to `rustc_middle`.
…=lcnr

codegen_llvm: avoid `Deref` impls w/ extern type

`rustc_codegen_llvm` relied on `Deref` impls where `Deref::Target` was or contained an extern type - in my experimental implementation of rust-lang/rfcs#3729, this isn't possible as the `Target` associated type's `?Sized` bound cannot be relaxed backwards compatibly (unless we come up with some way of doing this).

In later pull requests with the rust-lang/rfcs#3729 implementation, breakage like this could only occur for nightly users relying on the `extern_types` feature.

Upstreaming this to avoid needing to keep carrying this patch locally, and I think it'll necessarily need to change eventually.
…, r=compiler-errors

trait_sel: resolve vars in host effects

In the standard library, the `Extend` impl for `Iterator` (specialised with `TrustedLen`) has a parameter which is constrained by a projection predicate. This projection predicate provides a value for an inference variable but - if the default bound is `const Sized` instead of `Sized` - host effect evaluation wasn't resolving variables first. Added a test that doesn't depend on a rust-lang/rfcs#3729 implementation.

Adding the extra resolve can the number of errors in some tests when they gain host effect predicates, but this is not unexpected as calls to `resolve_vars_if_possible` can cause more error tainting to happen.
Complete the list of resources used in rustdoc output

The Nanum Barun Gothic Font was missing in the list and should clearly be mentionned.

Arguably referencing the Rust logos is not really necessary as the file mentions "third party resources" but it doesn't hurt and should make things clearer for anybody who wants to publish their Rust doc.
…r=compiler-errors

hir_analysis: skip self type of host effect preds in variances_of

Discovered as part of an implementation of rust-lang/rfcs#3729 - w/out this then when introducing const trait bounds: many more interesting tests change with different output, missing errors, new errors, etc related to this but they all depend on feature flags and are much more complex than this test.

r? `@oli-obk`
…r-errors

fix attribute-related ICE when parsing macro on the rhs of a name-value attribute

r? `@oli-obk`

Closes: rust-lang#137589
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels Feb 26, 2025
@fmease
Copy link
Member Author

fmease commented Feb 26, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 26, 2025

📌 Commit 1b26ed6 has been approved by fmease

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 26, 2025
@bors
Copy link
Contributor

bors commented Feb 26, 2025

⌛ Testing commit 1b26ed6 with merge fa98c79f0cb5b288dd7721dc5865198134a2f24c...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
Rollup of 13 pull requests

Successful merges:

 - rust-lang#136576 (pass optimization level to llvm-bitcode-linker)
 - rust-lang#137320 (fix(rustdoc): Fixed stability version in rustdoc)
 - rust-lang#137502 (Don't include global asm in `mir_keys`, fix error body synthesis)
 - rust-lang#137529 (remove few unused args)
 - rust-lang#137544 (tests: Add regression test for derive token invalidation (rust-lang#81099))
 - rust-lang#137559 (run some tests on emscripten again)
 - rust-lang#137601 (ssa/mono: deduplicate `type_has_metadata`)
 - rust-lang#137603 (codegen_llvm: avoid `Deref` impls w/ extern type)
 - rust-lang#137604 (trait_sel: resolve vars in host effects)
 - rust-lang#137609 (Complete the list of resources used in rustdoc output)
 - rust-lang#137613 (hir_analysis: skip self type of host effect preds in variances_of)
 - rust-lang#137614 (fix doc in library/core/src/pin.rs)
 - rust-lang#137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/asm/fail-const-eval-issue-121099.rs ... ok
test [ui] tests/ui/asm/generic_const_simd_vec_len.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/empty_global_asm.rs ... ok
test [ui] tests/ui/asm/generic-const.rs ... ok
test [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#emit_mir ... ok
test [ui] tests/ui/asm/global-asm-with-lifetimes.rs ... ok
test [ui] tests/ui/asm/ice-bad-err-span-in-template-129503.rs ... ok
test [ui] tests/ui/asm/inline-asm-with-lifetimes.rs#bad ... ok
test [ui] tests/ui/asm/inline-asm-with-lifetimes.rs#bad ... ok
test [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument ... FAILED
test [ui] tests/ui/asm/inline-syntax.rs#arm_llvm_18 ... ignored, ignored when the LLVM version is between 19.0.0 and 99.0.0
test [ui] tests/ui/asm/inline-syntax.rs#x86_64 ... ok
test [ui] tests/ui/asm/invalid-const-operand.rs ... ok
test [ui] tests/ui/asm/inline-syntax.rs#arm ... ok
---
test [ui] tests/ui/zero-sized/zero-sized-tuple-struct.rs ... ok

failures:

---- [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument stdout ----
error in revision `instrument`: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "instrument" "--check-cfg" "cfg(test,FALSE,emit_mir,instrument,cfi)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-Cinstrument-coverage" "-Zno-profiler-runtime"
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   |
   = note:  "cc" "/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/rustchOsAJj/symbols.o" "<1 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-d16fc3ab99251824.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument/global-asm-isnt-really-a-mir-body" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: Undefined symbols for architecture arm64:
   = note: Undefined symbols for architecture arm64:
             "___llvm_profile_raw_version", referenced from:
           ld: symbol(s) not found for architecture arm64
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to 1 previous error
------------------------------------------




failures:
    [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument
test result: FAILED. 18310 passed; 1 failed; 312 ignored; 0 measured; 0 filtered out; finished in 558.59s

Some tests failed in compiletest suite=ui mode=ui host=aarch64-apple-darwin target=aarch64-apple-darwin
Build completed unsuccessfully in 0:39:32

@bors
Copy link
Contributor

bors commented Feb 26, 2025

💔 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 Feb 26, 2025
@fmease
Copy link
Member Author

fmease commented Feb 26, 2025

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2025
@fmease fmease closed this Feb 26, 2025
@fmease fmease deleted the rollup-59lpxdh branch February 26, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.