Open
Description
So this code produces a warning about the &*input
expression being unreachable:
enum Void { };
fn process(input: *const Void) {
let _input = &*input;
}
warning: unreachable expression
I can imagine this needs to "only" be a warning so someone can write some really janky macro code that very carefully ensures the expression isn't ever evaluated. Even if that's the case, I would appreciate that this get its own error-code, or just stronger language to indicate to the user that they are doing something Very Bad. In particular I believe evaluating this expr is Undefined Behaviour.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Type systemCategory: An issue proposing an enhancement or a PR with one.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language teamRelevant to the types team, which will review and decide on the PR/issue.