Inappropriate warning: unreachable expression
in println!
#57377
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
return
expression in call params ofprintln!
macro causes inappropriate warning message.I tried this code (ref: Playground):
I expected to print
^^^
against an entire statement:But, it was printed against an expression instead of a sentence:
Meta
rustc --version --verbose
: 1.31.1The text was updated successfully, but these errors were encountered: