]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/ref_option_ref.stderr
Rollup merge of #76227 - CDirkx:const-poll, r=KodrAus
[rust.git] / src / tools / clippy / tests / ui / ref_option_ref.stderr
1 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
2   --> $DIR/ref_option_ref.rs:10:23
3    |
4 LL | static REF_THRESHOLD: &Option<&i32> = &Some(&THRESHOLD);
5    |                       ^^^^^^^^^^^^^ help: try: `Option<&i32>`
6    |
7    = note: `-D clippy::ref-option-ref` implied by `-D warnings`
8
9 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
10   --> $DIR/ref_option_ref.rs:12:18
11    |
12 LL | const REF_CONST: &Option<&i32> = &Some(&CONST_THRESHOLD);
13    |                  ^^^^^^^^^^^^^ help: try: `Option<&i32>`
14
15 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
16   --> $DIR/ref_option_ref.rs:14:25
17    |
18 LL | type RefOptRefU32<'a> = &'a Option<&'a u32>;
19    |                         ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
20
21 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
22   --> $DIR/ref_option_ref.rs:15:25
23    |
24 LL | type RefOptRef<'a, T> = &'a Option<&'a T>;
25    |                         ^^^^^^^^^^^^^^^^^ help: try: `Option<&'a T>`
26
27 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
28   --> $DIR/ref_option_ref.rs:17:14
29    |
30 LL | fn foo(data: &Option<&u32>) {}
31    |              ^^^^^^^^^^^^^ help: try: `Option<&u32>`
32
33 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
34   --> $DIR/ref_option_ref.rs:19:23
35    |
36 LL | fn bar(data: &u32) -> &Option<&u32> {
37    |                       ^^^^^^^^^^^^^ help: try: `Option<&u32>`
38
39 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
40   --> $DIR/ref_option_ref.rs:24:11
41    |
42 LL |     data: &'a Option<&'a u32>,
43    |           ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
44
45 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
46   --> $DIR/ref_option_ref.rs:27:32
47    |
48 LL | struct StructTupleRef<'a>(u32, &'a Option<&'a u32>);
49    |                                ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
50
51 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
52   --> $DIR/ref_option_ref.rs:31:14
53    |
54 LL |     Variant2(&'a Option<&'a u32>),
55    |              ^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'a u32>`
56
57 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
58   --> $DIR/ref_option_ref.rs:40:14
59    |
60 LL |     type A = &'static Option<&'static Self>;
61    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Option<&'static Self>`
62
63 error: since `&` implements the `Copy` trait, `&Option<&T>` can be simplified to `Option<&T>`
64   --> $DIR/ref_option_ref.rs:46:12
65    |
66 LL |     let x: &Option<&u32> = &None;
67    |            ^^^^^^^^^^^^^ help: try: `Option<&u32>`
68
69 error: aborting due to 11 previous errors
70