11error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
2- --> tests/ui/ref_option_ref.rs:10 :23
2+ --> tests/ui/ref_option_ref.rs:9 :23
33 |
44LL | static REF_THRESHOLD: &Option<&i32> = &Some(&THRESHOLD);
55 | ^^^^^^^^^^^^^ help: try: `Option<&i32>`
@@ -8,61 +8,61 @@ LL | static REF_THRESHOLD: &Option<&i32> = &Some(&THRESHOLD);
88 = help: to override `-D warnings` add `#[allow(clippy::ref_option_ref)]`
99
1010error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
11- --> tests/ui/ref_option_ref.rs:14 :18
11+ --> tests/ui/ref_option_ref.rs:13 :18
1212 |
1313LL | const REF_CONST: &Option<&i32> = &Some(CONST_THRESHOLD);
1414 | ^^^^^^^^^^^^^ help: try: `Option<&i32>`
1515
1616error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
17- --> tests/ui/ref_option_ref.rs:17 :25
17+ --> tests/ui/ref_option_ref.rs:16 :25
1818 |
1919LL | type RefOptRefU32<'a> = &'a Option<&'a u32>;
2020 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
2121
2222error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
23- --> tests/ui/ref_option_ref.rs:20 :25
23+ --> tests/ui/ref_option_ref.rs:19 :25
2424 |
2525LL | type RefOptRef<'a, T> = &'a Option<&'a T>;
2626 | ^^^^^^^^^^^^^^^^^ help: try: `Option<&'a T>`
2727
2828error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
29- --> tests/ui/ref_option_ref.rs:23 :14
29+ --> tests/ui/ref_option_ref.rs:22 :14
3030 |
3131LL | fn foo(data: &Option<&u32>) {}
3232 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
3333
3434error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
35- --> tests/ui/ref_option_ref.rs:26 :23
35+ --> tests/ui/ref_option_ref.rs:25 :23
3636 |
3737LL | fn bar(data: &u32) -> &Option<&u32> {
3838 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
3939
4040error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
41- --> tests/ui/ref_option_ref.rs:33 :11
41+ --> tests/ui/ref_option_ref.rs:32 :11
4242 |
4343LL | data: &'a Option<&'a u32>,
4444 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
4545
4646error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
47- --> tests/ui/ref_option_ref.rs:37 :32
47+ --> tests/ui/ref_option_ref.rs:36 :32
4848 |
4949LL | struct StructTupleRef<'a>(u32, &'a Option<&'a u32>);
5050 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
5151
5252error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
53- --> tests/ui/ref_option_ref.rs:42 :14
53+ --> tests/ui/ref_option_ref.rs:41 :14
5454 |
5555LL | Variant2(&'a Option<&'a u32>),
5656 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
5757
5858error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
59- --> tests/ui/ref_option_ref.rs:52 :14
59+ --> tests/ui/ref_option_ref.rs:51 :14
6060 |
6161LL | type A = &'static Option<&'static Self>;
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'static Self>`
6363
6464error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
65- --> tests/ui/ref_option_ref.rs:59 :12
65+ --> tests/ui/ref_option_ref.rs:58 :12
6666 |
6767LL | let x: &Option<&u32> = &None;
6868 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
0 commit comments