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