Confusing suggestions for error[E0599]: cannot write into String
#139051
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
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.
Code
Current output
Desired output
Rationale and extra context
The second suggestion in the error message is confusing. The content at line 688 of the file
rustlib/src/rust\library\core\src\macros\mod.rs
is$dst.write_fmt($crate::format_args_nl!($($arg)*))
, which does not correspond to the definition of thewrite_str
method.Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: