]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/match_as_ref.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / match_as_ref.stderr
CommitLineData
f20569fa
XL
1error: use `as_ref()` instead
2 --> $DIR/match_as_ref.rs:8:33
3 |
4LL | let borrowed: Option<&()> = match owned {
5 | _________________________________^
6LL | | None => None,
7LL | | Some(ref v) => Some(v),
8LL | | };
9 | |_____^ help: try this: `owned.as_ref()`
10 |
11 = note: `-D clippy::match-as-ref` implied by `-D warnings`
12
13error: use `as_mut()` instead
14 --> $DIR/match_as_ref.rs:14:39
15 |
16LL | let borrow_mut: Option<&mut ()> = match mut_owned {
17 | _______________________________________^
18LL | | None => None,
19LL | | Some(ref mut v) => Some(v),
20LL | | };
21 | |_____^ help: try this: `mut_owned.as_mut()`
22
23error: use `as_ref()` instead
24 --> $DIR/match_as_ref.rs:30:13
25 |
26LL | / match self.source {
27LL | | Some(ref s) => Some(s),
28LL | | None => None,
29LL | | }
30 | |_____________^ help: try this: `self.source.as_ref().map(|x| x as _)`
31
32error: aborting due to 3 previous errors
33