22 lines
849 B
Plaintext
22 lines
849 B
Plaintext
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
|
|
--> tests/ui/ref_option/ref_option_traits.rs:15:5
|
|
|
|
|
LL | fn trait_opt(&self, a: &Option<String>);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^---------------^^
|
|
| |
|
|
| help: change this to: `Option<&String>`
|
|
|
|
|
= note: `-D clippy::ref-option` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::ref_option)]`
|
|
|
|
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
|
|
--> tests/ui/ref_option/ref_option_traits.rs:16:5
|
|
|
|
|
LL | fn trait_ret(&self) -> &Option<String>;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^---------------^
|
|
| |
|
|
| help: change this to: `Option<&String>`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|