E0726 makes invalid mid-keyword suggestion with proc-macro derived on struct #108256
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
and in
Cargo.toml
:I expected either:
cargo check
Instead, this error appeared:
I'm guessing the error being pointed to is in the procedural macro generated code, but that's not immediately clear as it points to my struct definition. This code compiles when I remove SortBy and its attribute.
Meta
rustc --version --verbose
:(Issue template requested a backtrace but
RUST_BACKTRACE=1 cargo build
did not produce additional output.)The text was updated successfully, but these errors were encountered: