We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a407d60 commit 5cbed75Copy full SHA for 5cbed75
src/test/ui/liveness/liveness-dead.rs
@@ -36,4 +36,22 @@ fn f6() {
36
}
37
38
39
+fn f7(x: i32) {
40
+ match x {
41
+ n if n > 22 => {} // no error
42
+ _ => {}
43
+ }
44
+}
45
+
46
+fn f8(x: Option<i32>) -> i32 {
47
48
+ None => 0,
49
+ Some(mut n) => {
50
+ //~^ ERROR: value assigned to `n` is never read
51
+ n = 42;
52
+ n
53
54
55
56
57
fn main() {}
0 commit comments