11error: 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:9 :1
33 |
44LL | fn opt_u8(a: &Option<u8>) {}
55 | ^^^^^^^^^^^^^-----------^^^^
@@ -10,26 +10,26 @@ LL | fn opt_u8(a: &Option<u8>) {}
1010 = help: to override `-D warnings` add `#[allow(clippy::ref_option)]`
1111
1212error: 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:11 :1
1414 |
1515LL | fn opt_gen<T>(a: &Option<T>) {}
1616 | ^^^^^^^^^^^^^^^^^----------^^^^
1717 | |
1818 | help: change this to: `Option<&T>`
1919
2020error: 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:13 :1
2222 |
2323LL | fn opt_string(a: &std::option::Option<String>) {}
2424 | ^^^^^^^^^^^^^^^^^----------------------------^^^^
2525 | |
2626 | help: change this to: `std::option::Option<&String>`
2727
2828error: 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:15 :1
3030 |
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>`
3333 | _|
3434 | |
3535LL | |
@@ -38,10 +38,10 @@ LL | | }
3838 | |_^
3939
4040error: 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:19 :1
4242 |
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>`
4545 | _|
4646 | |
4747LL | |
@@ -50,7 +50,7 @@ LL | | }
5050 | |_^
5151
5252error: 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:23 :1
5454 |
5555LL | fn mult_string(a: &Option<String>, b: &Option<Vec<u8>>) {}
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -62,7 +62,7 @@ LL + fn mult_string(a: Option<&String>, b: Option<&Vec<u8>>) {}
6262 |
6363
6464error: 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:25 :1
6666 |
6767LL | fn ret_box<'a>() -> &'a Option<Box<u8>> {
6868 | ^ ------------------- help: change this to: `Option<&'a Box<u8>>`
@@ -74,15 +74,15 @@ LL | | }
7474 | |_^
7575
7676error: 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:30 :1
7878 |
7979LL | pub fn pub_opt_string(a: &Option<String>) {}
8080 | ^^^^^^^^^^^^^^^^^^^^^^^^^---------------^^^^
8181 | |
8282 | help: change this to: `Option<&String>`
8383
8484error: 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:32 :1
8686 |
8787LL | pub fn pub_mult_string(a: &Option<String>, b: &Option<Vec<u8>>) {}
8888 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -94,47 +94,15 @@ LL + pub fn pub_mult_string(a: Option<&String>, b: Option<&Vec<u8>>) {}
9494 |
9595
9696error: 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:38:5
13098 |
13199LL | pub fn pub_opt_params(&self, a: &Option<()>) {}
132100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^
133101 | |
134102 | help: change this to: `Option<&()>`
135103
136104error: 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:40 :5
138106 |
139107LL | pub fn pub_opt_ret(&self) -> &Option<String> {
140108 | ^ --------------- help: change this to: `Option<&String>`
@@ -146,15 +114,15 @@ LL | | }
146114 | |_____^
147115
148116error: 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:45 :5
150118 |
151119LL | fn private_opt_params(&self, a: &Option<()>) {}
152120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^
153121 | |
154122 | help: change this to: `Option<&()>`
155123
156124error: 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:47 :5
158126 |
159127LL | fn private_opt_ret(&self) -> &Option<String> {
160128 | ^ --------------- help: change this to: `Option<&String>`
@@ -165,5 +133,5 @@ LL | | panic!()
165133LL | | }
166134 | |_____^
167135
168- error: aborting due to 17 previous errors
136+ error: aborting due to 13 previous errors
169137
0 commit comments