]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/pattern_type_mismatch/syntax.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / pattern_type_mismatch / syntax.stderr
CommitLineData
f20569fa
XL
1error: type of pattern does not match the expression type
2 --> $DIR/syntax.rs:11:9
3 |
4LL | Some(_) => (),
5 | ^^^^^^^
6 |
f20569fa 7 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
2b03887a 8 = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings`
f20569fa
XL
9
10error: type of pattern does not match the expression type
11 --> $DIR/syntax.rs:30:12
12 |
13LL | if let Some(_) = ref_value {}
14 | ^^^^^^^
15 |
16 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
17
18error: type of pattern does not match the expression type
19 --> $DIR/syntax.rs:41:15
20 |
21LL | while let Some(_) = ref_value {
22 | ^^^^^^^
23 |
24 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
25
26error: type of pattern does not match the expression type
27 --> $DIR/syntax.rs:59:9
28 |
29LL | for (_a, _b) in slice.iter() {}
30 | ^^^^^^^^
31 |
32 = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
33
34error: type of pattern does not match the expression type
35 --> $DIR/syntax.rs:69:9
36 |
37LL | let (_n, _m) = ref_value;
38 | ^^^^^^^^
39 |
40 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
41
42error: type of pattern does not match the expression type
43 --> $DIR/syntax.rs:78:12
44 |
45LL | fn foo((_a, _b): &(i32, i32)) {}
46 | ^^^^^^^^
47 |
48 = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
49
50error: type of pattern does not match the expression type
51 --> $DIR/syntax.rs:92:10
52 |
53LL | foo(|(_a, _b)| ());
54 | ^^^^^^^^
55 |
56 = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
57
58error: type of pattern does not match the expression type
59 --> $DIR/syntax.rs:108:9
60 |
61LL | Some(_) => (),
62 | ^^^^^^^
63 |
64 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
65
66error: type of pattern does not match the expression type
67 --> $DIR/syntax.rs:128:17
68 |
69LL | Some(_) => (),
70 | ^^^^^^^
71...
72LL | matching_macro!(value);
c295e0f8 73 | ---------------------- in this macro invocation
f20569fa
XL
74 |
75 = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
17df50a5 76 = note: this error originates in the macro `matching_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
f20569fa
XL
77
78error: aborting due to 9 previous errors
79