fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: binary comparison to literal `Option::None` 2 --> $DIR/partialeq_to_none.rs:14:8 3 | 4LL | if f != None { "yay" } else { "nay" } 5 | ^^^^^^^^^ help: use `Option::is_some()` instead: `f.is_some()` 6 | 7 = note: `-D clippy::partialeq-to-none` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::partialeq_to_none)]` 9 10error: binary comparison to literal `Option::None` 11 --> $DIR/partialeq_to_none.rs:44:13 12 | 13LL | let _ = x == None; 14 | ^^^^^^^^^ help: use `Option::is_none()` instead: `x.is_none()` 15 16error: binary comparison to literal `Option::None` 17 --> $DIR/partialeq_to_none.rs:45:13 18 | 19LL | let _ = x != None; 20 | ^^^^^^^^^ help: use `Option::is_some()` instead: `x.is_some()` 21 22error: binary comparison to literal `Option::None` 23 --> $DIR/partialeq_to_none.rs:46:13 24 | 25LL | let _ = None == x; 26 | ^^^^^^^^^ help: use `Option::is_none()` instead: `x.is_none()` 27 28error: binary comparison to literal `Option::None` 29 --> $DIR/partialeq_to_none.rs:47:13 30 | 31LL | let _ = None != x; 32 | ^^^^^^^^^ help: use `Option::is_some()` instead: `x.is_some()` 33 34error: binary comparison to literal `Option::None` 35 --> $DIR/partialeq_to_none.rs:49:8 36 | 37LL | if foobar() == None {} 38 | ^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `foobar().is_none()` 39 40error: binary comparison to literal `Option::None` 41 --> $DIR/partialeq_to_none.rs:51:8 42 | 43LL | if bar().ok() != None {} 44 | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `bar().ok().is_some()` 45 46error: binary comparison to literal `Option::None` 47 --> $DIR/partialeq_to_none.rs:53:13 48 | 49LL | let _ = Some(1 + 2) != None; 50 | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `Some(1 + 2).is_some()` 51 52error: binary comparison to literal `Option::None` 53 --> $DIR/partialeq_to_none.rs:55:13 54 | 55LL | let _ = { Some(0) } == None; 56 | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `{ Some(0) }.is_none()` 57 58error: binary comparison to literal `Option::None` 59 --> $DIR/partialeq_to_none.rs:57:13 60 | 61LL | let _ = { 62 | _____________^ 63LL | | /* 64LL | | This comment runs long 65LL | | */ 66LL | | Some(1) 67LL | | } != None; 68 | |_____________^ 69 | 70help: use `Option::is_some()` instead 71 | 72LL ~ let _ = { 73LL + /* 74LL + This comment runs long 75LL + */ 76LL + Some(1) 77LL ~ }.is_some(); 78 | 79 80error: binary comparison to literal `Option::None` 81 --> $DIR/partialeq_to_none.rs:67:13 82 | 83LL | let _ = optref() == &&None; 84 | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `optref().is_none()` 85 86error: binary comparison to literal `Option::None` 87 --> $DIR/partialeq_to_none.rs:68:13 88 | 89LL | let _ = &&None != optref(); 90 | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `optref().is_some()` 91 92error: binary comparison to literal `Option::None` 93 --> $DIR/partialeq_to_none.rs:69:13 94 | 95LL | let _ = **optref() == None; 96 | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `optref().is_none()` 97 98error: binary comparison to literal `Option::None` 99 --> $DIR/partialeq_to_none.rs:70:13 100 | 101LL | let _ = &None != *optref(); 102 | ^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `optref().is_some()` 103 104error: binary comparison to literal `Option::None` 105 --> $DIR/partialeq_to_none.rs:73:13 106 | 107LL | let _ = None != *x; 108 | ^^^^^^^^^^ help: use `Option::is_some()` instead: `(*x).is_some()` 109 110error: aborting due to 15 previous errors 111