Skip to content

Rollup of 8 pull requests#156605

Closed
JonathanBrouwer wants to merge 19 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-92DEEiV
Closed

Rollup of 8 pull requests#156605
JonathanBrouwer wants to merge 19 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-92DEEiV

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

aerooneqq and others added 19 commits May 14, 2026 10:53
actually run the temp_dir doctest

No idea why this currently doesn't get run.

That said, this might fail in Miri, so we may have to wait for rust-lang/miri#5029.
…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
…BoxyUwU

Make const param default test reproduce original ICE

As discussed in [comment](rust-lang#156325 (comment)).

ICE using old logic:
[old-logic-ice.txt](https://github.com/user-attachments/files/27797628/old-logic-ice.txt)

r? BoxyUwU
…utf8-pattern, r=ChrisDenton

Require UTF-8 in `Utf8Pattern::StringPattern`

Store `&str` instead, so the UTF-8 invariant is enforced at the API boundary.

Fixes rust-lang#156491
…, 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
…=mejrs

Test EII UI tests with prefer-dynamic

Tracking issue: rust-lang#125418

Remove `no-prefer-dynamic` from the EII UI tests now that rust-lang#153648 fixed exporting EII declaration aliases from dylibs.

Fixes rust-lang#151271.

Tested with:

```sh
python3 x.py test tests/ui/eii --force-rerun
```
…i-obk

Use DropCtxt::new_block and new_block_with_statements systematically.

Misc cleanups I found while staring at that code.
…xpansion, r=Urgau

Correctly handle associated items in rustdoc macro expansion

Fixes rust-lang#156075.

The bug was simply that it didn't cover associated items.

r? @Urgau
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 15, 2026
@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 15, 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 15, 2026

📌 Commit e0b3622 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 15, 2026
@rust-bors

This comment has been minimized.

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

Rollup of 8 pull requests

Successful merges:

 - #156493 (actually run the temp_dir doctest)
 - #156452 (Implement pinned drop sugar)
 - #156600 (Make const param default test reproduce original ICE)
 - #156556 (Require UTF-8 in `Utf8Pattern::StringPattern`)
 - #156565 (delegation: emit error when self type is not specified and accessed)
 - #156577 (Test EII UI tests with prefer-dynamic)
 - #156586 (Use DropCtxt::new_block and new_block_with_statements systematically.)
 - #156587 (Correctly handle associated items in rustdoc macro expansion)
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/eii/privacy1.rs stdout ----

error: auxiliary build of /Users/runner/work/rust/rust/tests/ui/eii/auxiliary/other_crate_privacy1.rs failed to compile: 
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/eii/auxiliary/other_crate_privacy1.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" "--check-cfg" "cfg(test,FALSE)" "--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/eii/privacy1/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   = note:  "cc" "-Wl,-exported_symbols_list" "-Wl,/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary/rustcIPnsf4/list" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary/rustcIPnsf4/symbols.o" "<1 object files omitted>" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary/rustcIPnsf4/rmeta.o" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-8c43308ae46e5a65.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" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy1/auxiliary/libother_crate_privacy1.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-install_name" "-Wl,@rpath/libother_crate_privacy1.dylib" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: Undefined symbols for architecture arm64:
             "__RNvCsj81Tf4FGpsq_20other_crate_privacy15decl1", referenced from:
                 __RNvCsj81Tf4FGpsq_20other_crate_privacy116local_call_decl1 in other_crate_privacy1.other_crate_privacy1.ded03afccf652a48-cgu.0.rcgu.o
           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
------------------------------------------

---- [ui] tests/ui/eii/privacy1.rs stdout end ----
---- [ui] tests/ui/eii/privacy2.rs stdout ----

error: auxiliary build of /Users/runner/work/rust/rust/tests/ui/eii/auxiliary/other_crate_privacy2.rs failed to compile: 
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/eii/auxiliary/other_crate_privacy2.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" "--check-cfg" "cfg(test,FALSE)" "--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/eii/privacy2/auxiliary" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   = note:  "cc" "-Wl,-exported_symbols_list" "-Wl,/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary/rustc5TTuJ4/list" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary/rustc5TTuJ4/symbols.o" "<1 object files omitted>" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary/rustc5TTuJ4/rmeta.o" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-8c43308ae46e5a65.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" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/eii/privacy2/auxiliary/libother_crate_privacy2.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-install_name" "-Wl,@rpath/libother_crate_privacy2.dylib" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: Undefined symbols for architecture arm64:
             "__RNvCs662nhQ4f7Uz_20other_crate_privacy25decl1", referenced from:
                 __RNvCs662nhQ4f7Uz_20other_crate_privacy216local_call_decl1 in other_crate_privacy2.other_crate_privacy2.47052527f62a53d9-cgu.0.rcgu.o
           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
------------------------------------------

@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 e08cfd9 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 #156577, 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

rollup A PR which is a rollup 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.