E1012#
Unreachable code. This usually happens when a return
statement is followed by
more code. The return
statement will exit the function immediately, so any
code after it will not be executed.
Erroneous example#
fn main {
return
println("Hello, World!")
}
Suggestion#
Remove the unreachable code, or move it before the return
statement if you
want the code to be executed.
fn main {
println("Hello, World!")
return
}