1
1
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
2
- --> tests/ui/ref_option/ref_option.rs:8:1
2
+ --> tests/ui-toml /ref_option/ref_option.rs:8:1
3
3
|
4
4
LL | fn opt_u8(a: &Option<u8>) {}
5
5
| ^^^^^^^^^^^^^-----------^^^^
@@ -10,26 +10,26 @@ LL | fn opt_u8(a: &Option<u8>) {}
10
10
= help: to override `-D warnings` add `#[allow(clippy::ref_option)]`
11
11
12
12
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
13
- --> tests/ui/ref_option/ref_option.rs:10:1
13
+ --> tests/ui-toml /ref_option/ref_option.rs:10:1
14
14
|
15
15
LL | fn opt_gen<T>(a: &Option<T>) {}
16
16
| ^^^^^^^^^^^^^^^^^----------^^^^
17
17
| |
18
18
| help: change this to: `Option<&T>`
19
19
20
20
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
21
- --> tests/ui/ref_option/ref_option.rs:12:1
21
+ --> tests/ui-toml /ref_option/ref_option.rs:12:1
22
22
|
23
23
LL | fn opt_string(a: &std::option::Option<String>) {}
24
24
| ^^^^^^^^^^^^^^^^^----------------------------^^^^
25
25
| |
26
26
| help: change this to: `std::option::Option<&String>`
27
27
28
28
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
29
- --> tests/ui/ref_option/ref_option.rs:14:1
29
+ --> tests/ui-toml /ref_option/ref_option.rs:14:1
30
30
|
31
- LL | fn ret_string <'a>(p: &'a str) -> &'a Option<u8> {
32
- | ^ -------------- help: change this to: `Option<&'a u8>`
31
+ LL | fn ret_u8 <'a>(p: &'a str) -> &'a Option<u8> {
32
+ | ^ -------------- help: change this to: `Option<&'a u8>`
33
33
| _|
34
34
| |
35
35
LL | |
@@ -38,10 +38,10 @@ LL | | }
38
38
| |_^
39
39
40
40
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
41
- --> tests/ui/ref_option/ref_option.rs:18:1
41
+ --> tests/ui-toml /ref_option/ref_option.rs:18:1
42
42
|
43
- LL | fn ret_string_static () -> &'static Option<u8> {
44
- | ^ ------------------- help: change this to: `Option<&'static u8>`
43
+ LL | fn ret_u8_static () -> &'static Option<u8> {
44
+ | ^ ------------------- help: change this to: `Option<&'static u8>`
45
45
| _|
46
46
| |
47
47
LL | |
@@ -50,7 +50,7 @@ LL | | }
50
50
| |_^
51
51
52
52
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
53
- --> tests/ui/ref_option/ref_option.rs:22:1
53
+ --> tests/ui-toml /ref_option/ref_option.rs:22:1
54
54
|
55
55
LL | fn mult_string(a: &Option<String>, b: &Option<Vec<u8>>) {}
56
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -62,7 +62,7 @@ LL + fn mult_string(a: Option<&String>, b: Option<&Vec<u8>>) {}
62
62
|
63
63
64
64
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
65
- --> tests/ui/ref_option/ref_option.rs:24:1
65
+ --> tests/ui-toml /ref_option/ref_option.rs:24:1
66
66
|
67
67
LL | fn ret_box<'a>() -> &'a Option<Box<u8>> {
68
68
| ^ ------------------- help: change this to: `Option<&'a Box<u8>>`
@@ -74,15 +74,15 @@ LL | | }
74
74
| |_^
75
75
76
76
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
77
- --> tests/ui/ref_option/ref_option.rs:29:1
77
+ --> tests/ui-toml /ref_option/ref_option.rs:29:1
78
78
|
79
79
LL | pub fn pub_opt_string(a: &Option<String>) {}
80
80
| ^^^^^^^^^^^^^^^^^^^^^^^^^---------------^^^^
81
81
| |
82
82
| help: change this to: `Option<&String>`
83
83
84
84
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
85
- --> tests/ui/ref_option/ref_option.rs:31:1
85
+ --> tests/ui-toml /ref_option/ref_option.rs:31:1
86
86
|
87
87
LL | pub fn pub_mult_string(a: &Option<String>, b: &Option<Vec<u8>>) {}
88
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -94,47 +94,15 @@ LL + pub fn pub_mult_string(a: Option<&String>, b: Option<&Vec<u8>>) {}
94
94
|
95
95
96
96
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
97
- --> tests/ui/ref_option/ref_option.rs:35:5
98
- |
99
- LL | fn pub_trait_opt(&self, a: &Option<Vec<u8>>);
100
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------^^
101
- | |
102
- | help: change this to: `Option<&Vec<u8>>`
103
-
104
- error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
105
- --> tests/ui/ref_option/ref_option.rs:37:5
106
- |
107
- LL | fn pub_trait_ret(&self) -> &Option<Vec<u8>>;
108
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------^
109
- | |
110
- | help: change this to: `Option<&Vec<u8>>`
111
-
112
- error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
113
- --> tests/ui/ref_option/ref_option.rs:42:5
114
- |
115
- LL | fn trait_opt(&self, a: &Option<String>);
116
- | ^^^^^^^^^^^^^^^^^^^^^^^---------------^^
117
- | |
118
- | help: change this to: `Option<&String>`
119
-
120
- error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
121
- --> tests/ui/ref_option/ref_option.rs:44:5
122
- |
123
- LL | fn trait_ret(&self) -> &Option<String>;
124
- | ^^^^^^^^^^^^^^^^^^^^^^^---------------^
125
- | |
126
- | help: change this to: `Option<&String>`
127
-
128
- error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
129
- --> tests/ui/ref_option/ref_option.rs:51:5
97
+ --> tests/ui-toml/ref_option/ref_option.rs:37:5
130
98
|
131
99
LL | pub fn pub_opt_params(&self, a: &Option<()>) {}
132
100
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^
133
101
| |
134
102
| help: change this to: `Option<&()>`
135
103
136
104
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
137
- --> tests/ui/ref_option/ref_option.rs:53 :5
105
+ --> tests/ui-toml /ref_option/ref_option.rs:39 :5
138
106
|
139
107
LL | pub fn pub_opt_ret(&self) -> &Option<String> {
140
108
| ^ --------------- help: change this to: `Option<&String>`
@@ -146,15 +114,15 @@ LL | | }
146
114
| |_____^
147
115
148
116
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
149
- --> tests/ui/ref_option/ref_option.rs:58 :5
117
+ --> tests/ui-toml /ref_option/ref_option.rs:44 :5
150
118
|
151
119
LL | fn private_opt_params(&self, a: &Option<()>) {}
152
120
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^
153
121
| |
154
122
| help: change this to: `Option<&()>`
155
123
156
124
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
157
- --> tests/ui/ref_option/ref_option.rs:60 :5
125
+ --> tests/ui-toml /ref_option/ref_option.rs:46 :5
158
126
|
159
127
LL | fn private_opt_ret(&self) -> &Option<String> {
160
128
| ^ --------------- help: change this to: `Option<&String>`
@@ -165,5 +133,5 @@ LL | | panic!()
165
133
LL | | }
166
134
| |_____^
167
135
168
- error: aborting due to 17 previous errors
136
+ error: aborting due to 13 previous errors
169
137
0 commit comments