Skip to content

Conversation

@estebank
Copy link
Contributor

@estebank estebank commented Nov 4, 2025

Point at return type of async fns instead of their def Span.

Correctly provide suggestions when encountering async fn with a dyn Trait return type.

Correctly address type Alias = dyn Trait when fn foo() -> Alias { .. }.

Fix #147894.

@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 Nov 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 4, 2025

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

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

```
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
  --> $DIR/dyn-trait-type-alias-return-type.rs:4:11
   |
LL | fn f() -> T { loop {} }
   |           ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: this type alias is unsized
  --> $DIR/dyn-trait-type-alias-return-type.rs:1:1
   |
LL | type T = dyn core::fmt::Debug;
   | ^^^^^^
   = note: the return type of a function must have a statically known size
```
@rustbot
Copy link
Collaborator

rustbot commented Nov 5, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Nov 5, 2025
@rust-log-analyzer

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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.

rust compiler yields obviously broken suggestions around dyn/impl use when tickled right

4 participants