-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
dyn AsyncFn
generates many independent errors
#132713
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-objects
Area: trait objects, vtable layout
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
F-async_closure
`#![feature(async_closure)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
cramertj
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Nov 6, 2024
fmease
added
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
F-async_closure
`#![feature(async_closure)]`
A-trait-objects
Area: trait objects, vtable layout
labels
Nov 7, 2024
Note: this issue generalizes somewhat to other GAT-containing traits, for example: trait Super {
type Assoc<'a>;
}
trait Child: Super {}
fn take_dyn(_: &dyn Child) {} reports
|
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Nov 23, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Nov 23, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Nov 26, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Nov 26, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Nov 27, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
cramertj
added a commit
to cramertj/rust
that referenced
this issue
Dec 2, 2024
This CL makes a number of small changes to dyn compatibility errors: - "object safety" has been renamed to "dyn-compatibility" throughout - "Convert to enum" suggestions are no longer generated when there exists a type-generic impl of the trait or an impl for `dyn OtherTrait` - Several error messages are reorganized for user readability Additionally, the dyn compatibility error creation code has been split out into functions. cc rust-lang#132713 cc rust-lang#133267
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-objects
Area: trait objects, vtable layout
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
F-async_closure
`#![feature(async_closure)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The current error output spits out four related issues where only one is needed. Additionally, none provides quite the right context, and all reference implementation details of
AsyncFn
that users may not be concerned with.Rust Version
2024-11-05 nightly
The text was updated successfully, but these errors were encountered: