1 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
2 --> $DIR/ref_option_ref.rs:10:23
4 LL | static REF_THRESHOLD: &Option<&i32> = &Some(&THRESHOLD);
5 | ^^^^^^^^^^^^^ help: try: `Option<&i32>`
7 = note: `-D clippy::ref-option-ref` implied by `-D warnings`
9 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
10 --> $DIR/ref_option_ref.rs:12:18
12 LL | const REF_CONST: &Option<&i32> = &Some(CONST_THRESHOLD);
13 | ^^^^^^^^^^^^^ help: try: `Option<&i32>`
15 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
16 --> $DIR/ref_option_ref.rs:14:25
18 LL | type RefOptRefU32<'a> = &'a Option<&'a u32>;
19 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
21 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
22 --> $DIR/ref_option_ref.rs:15:25
24 LL | type RefOptRef<'a, T> = &'a Option<&'a T>;
25 | ^^^^^^^^^^^^^^^^^ help: try: `Option<&'a T>`
27 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
28 --> $DIR/ref_option_ref.rs:17:14
30 LL | fn foo(data: &Option<&u32>) {}
31 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
33 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
34 --> $DIR/ref_option_ref.rs:19:23
36 LL | fn bar(data: &u32) -> &Option<&u32> {
37 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
39 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
40 --> $DIR/ref_option_ref.rs:24:11
42 LL | data: &'a Option<&'a u32>,
43 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
45 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
46 --> $DIR/ref_option_ref.rs:27:32
48 LL | struct StructTupleRef<'a>(u32, &'a Option<&'a u32>);
49 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
51 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
52 --> $DIR/ref_option_ref.rs:31:14
54 LL | Variant2(&'a Option<&'a u32>),
55 | ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
57 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
58 --> $DIR/ref_option_ref.rs:40:14
60 LL | type A = &'static Option<&'static Self>;
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'static Self>`
63 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
64 --> $DIR/ref_option_ref.rs:46:12
66 LL | let x: &Option<&u32> = &None;
67 | ^^^^^^^^^^^^^ help: try: `Option<&u32>`
69 error: aborting due to 11 previous errors