]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/unwrap_or.stderr
New upstream version 1.26.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / unwrap_or.stderr
1 error: use of `unwrap_or` followed by a function call
2 --> $DIR/unwrap_or.rs:4:47
3 |
4 4 | let s = Some(String::from("test string")).unwrap_or("Fail".to_string()).len();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "Fail".to_string())`
6 |
7 = note: `-D or-fun-call` implied by `-D warnings`
8
9 error: use of `unwrap_or` followed by a function call
10 --> $DIR/unwrap_or.rs:9:10
11 |
12 9 | .unwrap_or("Fail".to_string())
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "Fail".to_string())`
14
15 error: aborting due to 2 previous errors
16