]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/pattern_type_mismatch/syntax.stderr
Rollup merge of #78769 - est31:remove_lifetimes, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / pattern_type_mismatch / syntax.stderr
1 error: type of pattern does not match the expression type
2   --> $DIR/syntax.rs:11:9
3    |
4 LL |         Some(_) => (),
5    |         ^^^^^^^
6    |
7    = note: `-D clippy::pattern-type-mismatch` implied by `-D warnings`
8    = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
9
10 error: type of pattern does not match the expression type
11   --> $DIR/syntax.rs:30:12
12    |
13 LL |     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
18 error: type of pattern does not match the expression type
19   --> $DIR/syntax.rs:41:15
20    |
21 LL |     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
26 error: type of pattern does not match the expression type
27   --> $DIR/syntax.rs:59:9
28    |
29 LL |     for (_a, _b) in slice.iter() {}
30    |         ^^^^^^^^
31    |
32    = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
33
34 error: type of pattern does not match the expression type
35   --> $DIR/syntax.rs:69:9
36    |
37 LL |     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
42 error: type of pattern does not match the expression type
43   --> $DIR/syntax.rs:78:12
44    |
45 LL |     fn foo((_a, _b): &(i32, i32)) {}
46    |            ^^^^^^^^
47    |
48    = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
49
50 error: type of pattern does not match the expression type
51   --> $DIR/syntax.rs:92:10
52    |
53 LL |     foo(|(_a, _b)| ());
54    |          ^^^^^^^^
55    |
56    = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
57
58 error: type of pattern does not match the expression type
59   --> $DIR/syntax.rs:108:9
60    |
61 LL |         Some(_) => (),
62    |         ^^^^^^^
63    |
64    = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
65
66 error: type of pattern does not match the expression type
67   --> $DIR/syntax.rs:128:17
68    |
69 LL |                 Some(_) => (),
70    |                 ^^^^^^^
71 ...
72 LL |     matching_macro!(value);
73    |     ----------------------- in this macro invocation
74    |
75    = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
76    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
77
78 error: aborting due to 9 previous errors
79