Skip to content

Rollup of 4 pull requests#156584

Closed
JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-R7ZHoDX
Closed

Rollup of 4 pull requests#156584
JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-R7ZHoDX

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

aerooneqq and others added 8 commits May 14, 2026 10:53
…ream, r=petrochenkov

Implement pinned drop sugar

Implements `fn drop(&pin mut self)` as sugar for `Drop::pin_drop`.

The resolver recognizes `fn drop(&pin mut self)` syntactically in trait impls and performs lookup using the effective `pin_drop` name. AST lowering independently rechecks the syntactic sugar, validates that the resolved item belongs to the actual `Drop` lang trait, and emits HIR with ident `pin_drop` for accepted sugar. Existing type checking, Drop validation, drop glue, and direct-call checks remain unchanged.

Drop identity is checked during AST lowering through `tcx.lang_items().drop_trait()`, after resolver has performed the effective `pin_drop` lookup. The resolver does not need to know whether the trait is the actual `Drop` lang item, and it no longer passes marked impl item IDs to lowering.

This intentionally preserves the base pinned-drop behavior where `#[pin_v2]` types must use `pin_drop`, while non-`#[pin_v2]` types may still implement `pin_drop`.

r? @petrochenkov

## Related

rust-lang#144537
rust-lang#130494
Disable `main_needs_argc_argv` for Wasm

AFAIU this explains to the "Rust Runtime" that `main()` doesn't need `argc`/`argv`. Newer Wasm targets have explicitly disabled this, this PR changes it so that the base Wasm configuration affecting all Wasm targets disables this now.

This affects the following targets:
- `wasm32-unknown-unknown`
- `wasm32v1-none`
- `wasm64-unknown-unknown`

The only Wasm target where `main_needs_argc_argv` is still enabled is `wasm32-unknown-emscripten`. @hoodmane let me know and I can remove it there as well.

Credit goes to @Spxg for stumbling on this.

r? @alexcrichton
…, r=petrochenkov

delegation: emit error when self type is not specified and accessed

This PR adds error reporting when we create error self type if it was not specified. In most of the tests there were other errors, so this delayed bug was not triggered, but there are cases like `reuse Default::default;` (rust-lang#156388) which does not emit other errors and those delayed bugs are triggered.

Part of rust-lang#118212. Fixes rust-lang#156388.

r? @petrochenkov
…lean, r=Urgau

tests: extend remap-path-prefix-std to all stdlib rlibs

### problem:
the current `remap-path-prefix-std` run-make test validates path remapping for `libstd.rlib`, which leaves the rest of the distributed `stdlib` artifacts unchecked.

### fix:
generalizing the test to go over over all distributed `.rlib` files found in the target `sysroot libdir` instead of checking only the `libstd`.

### result:
improves reproducibility coverage for distributed `stdlib` artifacts.

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 14, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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. labels May 14, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 14, 2026

📌 Commit ba7e579 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 May 14, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 14, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #156452 (Implement pinned drop sugar)
 - #156571 (Disable `main_needs_argc_argv` for Wasm)
 - #156565 (delegation: emit error when self type is not specified and accessed)
 - #156570 (tests: extend remap-path-prefix-std to all stdlib rlibs)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

---- [run-make] tests/run-make/remap-path-prefix-std stdout ----
------rustc stdout------------------------------

------rustc stderr------------------------------
error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/run-make/remap-path-prefix-std/rmake.rs:58:25
   |
58 |           let completed = llvm_dwarfdump()
   |  _________________________^
59 | |             .input(&link_name)
60 | |             .run()
   | |__________________^ creates a temporary value which is freed while still in use
61 |               .assert_stdout_not_contains(source_root().to_string_lossy());
   |                                                                           - temporary value is freed at the end of this statement
...
64 |           if completed.stdout_utf8().contains("DW_TAG_compile_unit") {
   |              --------- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0716`.

------------------------------------------

error: run-make test failed: could not build `rmake.rs` recipe
status: exit status: 1
command: RUSTC_BOOTSTRAP="-1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/remap-path-prefix-std/rmake" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/deps" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/release/deps" "--extern" "run_make_support=/checkout/obj/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/librun_make_support.rlib" "--edition=2024" "/checkout/tests/run-make/remap-path-prefix-std/rmake.rs" "-Cprefer-dynamic" "-Dunused_must_use"
stdout: none
--- stderr -------------------------------
error[E0716]: temporary value dropped while borrowed
##[error]  --> /checkout/tests/run-make/remap-path-prefix-std/rmake.rs:58:25
   |
58 |           let completed = llvm_dwarfdump()
   |  _________________________^
59 | |             .input(&link_name)
60 | |             .run()
   | |__________________^ creates a temporary value which is freed while still in use
61 |               .assert_stdout_not_contains(source_root().to_string_lossy());
   |                                                                           - temporary value is freed at the end of this statement
...
64 |           if completed.stdout_utf8().contains("DW_TAG_compile_unit") {
   |              --------- borrow later used here
   |
   = note: consider using a `let` binding to create a longer lived value

error: aborting due to 1 previous error

@rust-bors rust-bors Bot 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 May 15, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 15, 2026

💔 Test for 6b506f0 failed: CI. Failed job:

@rust-bors rust-bors Bot 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 May 15, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 15, 2026

PR #156570, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants