summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/obfuscated_if_else.stderr
blob: e4180c288693f9e22e2cd442e2ee74dcf0aa3c4b (plain)
1
2
3
4
5
6
7
8
9
10
error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
  --> $DIR/obfuscated_if_else.rs:6:5
   |
LL |     true.then_some("a").unwrap_or("b");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { "a" } else { "b" }`
   |
   = note: `-D clippy::obfuscated-if-else` implied by `-D warnings`

error: aborting due to previous error