Skip to content

Fix E0191 suggestion for empty dyn trait args#155637

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
qaijuang:fix-e0191-empty-dyn-trait-suggestion
Apr 23, 2026
Merged

Fix E0191 suggestion for empty dyn trait args#155637
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
qaijuang:fix-e0191-empty-dyn-trait-suggestion

Conversation

@qaijuang
Copy link
Copy Markdown
Contributor

@qaijuang qaijuang commented Apr 22, 2026

Fixes #155578.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 22, 2026

HIR ty lowering was modified

cc @fmease

@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. labels Apr 22, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 22, 2026

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 72 candidates
  • Random selection from 18 candidates

@rust-log-analyzer

This comment has been minimized.

@fmease fmease assigned fmease and unassigned jackh726 Apr 22, 2026
Comment thread compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs Outdated
Comment thread tests/ui/traits/empty-dyn-trait-args-suggestion-issue-155578.rs Outdated
@asquared31415
Copy link
Copy Markdown
Contributor

I believe this issue also applies to non-dyn trait specifiers too, as in arg: impl Meow<> or in generic bounds. it's probably worth a test case for non-dyn too, just in case?

@fmease
Copy link
Copy Markdown
Member

fmease commented Apr 22, 2026

I'm not sure this is super warranted. This is a super niche issue that affects all trait refs.

@fmease fmease 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 Apr 22, 2026
@qaijuang qaijuang requested a review from fmease April 22, 2026 16:14
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 22, 2026
@qaijuang qaijuang requested a review from Kivooeo April 22, 2026 16:14
@fmease
Copy link
Copy Markdown
Member

fmease commented Apr 23, 2026

@bors squash

@rust-bors

This comment has been minimized.

* Fix E0191 suggestion for empty dyn trait args
* Fix tidy check
* address code nit
* fold test into existing E0191 test
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

🔨 4 commits were squashed into 4d2b607.

@rust-bors rust-bors Bot force-pushed the fix-e0191-empty-dyn-trait-suggestion branch from 8169ac4 to 4d2b607 Compare April 23, 2026 12:32
@fmease
Copy link
Copy Markdown
Member

fmease commented Apr 23, 2026

Thanks! @bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 23, 2026

📌 Commit 4d2b607 has been approved by fmease

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 Apr 23, 2026
@fmease
Copy link
Copy Markdown
Member

fmease commented Apr 23, 2026

@bors rollup

rust-bors Bot pushed a commit that referenced this pull request Apr 23, 2026
Rollup of 7 pull requests

Successful merges:

 - #155469 (Account for titlecase in casing lints)
 - #155644 (delegation: support self ty propagation for functions in free to trait reuse)
 - #154957 (Fix ICE when const closure appears inside a non-const trait method)
 - #155442 (Change keyword order for `impl` restrictions)
 - #155561 (Use singular wording for single _ placeholders in type suggestions)
 - #155637 (Fix E0191 suggestion for empty dyn trait args)
 - #155661 (Remove `AttributeLintKind` variants - part 6)
@rust-bors rust-bors Bot merged commit 8a4df77 into rust-lang:main Apr 23, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 23, 2026
@qaijuang qaijuang deleted the fix-e0191-empty-dyn-trait-suggestion branch April 24, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid Suggestion in "specify the associated type" help

7 participants