|
| 1 | +error: borrow of a named constant with interior mutability |
| 2 | + --> tests/ui/borrow_interior_mutable_const.rs:28:17 |
| 3 | + | |
| 4 | +LL | let _ = &C; |
| 5 | + | ^^ |
| 6 | + | |
| 7 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 8 | +note: the lint level is defined here |
| 9 | + --> tests/ui/borrow_interior_mutable_const.rs:1:9 |
| 10 | + | |
| 11 | +LL | #![deny(clippy::borrow_interior_mutable_const)] |
| 12 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 13 | + |
| 14 | +error: borrow of a named constant with interior mutability |
| 15 | + --> tests/ui/borrow_interior_mutable_const.rs:30:17 |
| 16 | + | |
| 17 | +LL | let _ = C.get(); |
| 18 | + | ^ |
| 19 | + | |
| 20 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 21 | + = note: there is a compiler inserted borrow here |
| 22 | + |
| 23 | +error: borrow of a named constant with interior mutability |
| 24 | + --> tests/ui/borrow_interior_mutable_const.rs:35:17 |
| 25 | + | |
| 26 | +LL | let _ = &C; |
| 27 | + | ^^ |
| 28 | + | |
| 29 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 30 | + |
| 31 | +error: borrow of a named constant with interior mutability |
| 32 | + --> tests/ui/borrow_interior_mutable_const.rs:36:17 |
| 33 | + | |
| 34 | +LL | let _ = &mut C; |
| 35 | + | ^^^^^^ |
| 36 | + | |
| 37 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 38 | + |
| 39 | +error: borrow of a named constant with interior mutability |
| 40 | + --> tests/ui/borrow_interior_mutable_const.rs:40:9 |
| 41 | + | |
| 42 | +LL | C.swap(&local) |
| 43 | + | ^ |
| 44 | + | |
| 45 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 46 | + = note: there is a compiler inserted borrow here |
| 47 | + |
| 48 | +error: borrow of a named constant with interior mutability |
| 49 | + --> tests/ui/borrow_interior_mutable_const.rs:45:17 |
| 50 | + | |
| 51 | +LL | let _ = &C; |
| 52 | + | ^^ |
| 53 | + | |
| 54 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 55 | + |
| 56 | +error: borrow of a named constant with interior mutability |
| 57 | + --> tests/ui/borrow_interior_mutable_const.rs:46:17 |
| 58 | + | |
| 59 | +LL | let _ = &C[0]; |
| 60 | + | ^^^^^ |
| 61 | + | |
| 62 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 63 | + |
| 64 | +error: borrow of a named constant with interior mutability |
| 65 | + --> tests/ui/borrow_interior_mutable_const.rs:47:17 |
| 66 | + | |
| 67 | +LL | let _ = &C[0].0; |
| 68 | + | ^^^^^^^ |
| 69 | + | |
| 70 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 71 | + |
| 72 | +error: borrow of a named constant with interior mutability |
| 73 | + --> tests/ui/borrow_interior_mutable_const.rs:48:9 |
| 74 | + | |
| 75 | +LL | C[0].0.set(1); |
| 76 | + | ^^^^^^ |
| 77 | + | |
| 78 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 79 | + = note: there is a compiler inserted borrow here |
| 80 | + |
| 81 | +error: borrow of a named constant with interior mutability |
| 82 | + --> tests/ui/borrow_interior_mutable_const.rs:63:17 |
| 83 | + | |
| 84 | +LL | let _ = &S::C; |
| 85 | + | ^^^^^ |
| 86 | + | |
| 87 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 88 | + |
| 89 | +error: borrow of a named constant with interior mutability |
| 90 | + --> tests/ui/borrow_interior_mutable_const.rs:64:17 |
| 91 | + | |
| 92 | +LL | let _ = &S::C.0; |
| 93 | + | ^^^^^^^ |
| 94 | + | |
| 95 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 96 | + |
| 97 | +error: borrow of a named constant with interior mutability |
| 98 | + --> tests/ui/borrow_interior_mutable_const.rs:65:9 |
| 99 | + | |
| 100 | +LL | S::C.set(1); |
| 101 | + | ^^^^ |
| 102 | + | |
| 103 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 104 | + = note: there is a compiler inserted call to `Deref::deref` here |
| 105 | + |
| 106 | +error: borrow of a named constant with interior mutability |
| 107 | + --> tests/ui/borrow_interior_mutable_const.rs:66:18 |
| 108 | + | |
| 109 | +LL | let _ = &*S::C; |
| 110 | + | ^^^^^ |
| 111 | + | |
| 112 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 113 | + = note: this deref expression is a call to `Deref::deref` |
| 114 | + |
| 115 | +error: borrow of a named constant with interior mutability |
| 116 | + --> tests/ui/borrow_interior_mutable_const.rs:67:9 |
| 117 | + | |
| 118 | +LL | (*S::C).set(1); |
| 119 | + | ^^^^^^^ |
| 120 | + | |
| 121 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 122 | + = note: this deref expression is a call to `Deref::deref` |
| 123 | + |
| 124 | +error: borrow of a named constant with interior mutability |
| 125 | + --> tests/ui/borrow_interior_mutable_const.rs:78:17 |
| 126 | + | |
| 127 | +LL | let _ = &CELL; |
| 128 | + | ^^^^^ |
| 129 | + | |
| 130 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 131 | + |
| 132 | +error: borrow of a named constant with interior mutability |
| 133 | + --> tests/ui/borrow_interior_mutable_const.rs:102:25 |
| 134 | + | |
| 135 | +LL | let _ = &Self::C; |
| 136 | + | ^^^^^^^^ |
| 137 | + | |
| 138 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 139 | + |
| 140 | +error: borrow of a named constant with interior mutability |
| 141 | + --> tests/ui/borrow_interior_mutable_const.rs:105:25 |
| 142 | + | |
| 143 | +LL | let _ = &Self::C.cell; |
| 144 | + | ^^^^^^^^^^^^^ |
| 145 | + | |
| 146 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 147 | + |
| 148 | +error: borrow of a named constant with interior mutability |
| 149 | + --> tests/ui/borrow_interior_mutable_const.rs:106:25 |
| 150 | + | |
| 151 | +LL | let _ = &Self::C.cell.0; |
| 152 | + | ^^^^^^^^^^^^^^^ |
| 153 | + | |
| 154 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 155 | + |
| 156 | +error: borrow of a named constant with interior mutability |
| 157 | + --> tests/ui/borrow_interior_mutable_const.rs:107:17 |
| 158 | + | |
| 159 | +LL | Self::C.cell.0.set(T::DEFAULT); |
| 160 | + | ^^^^^^^^^^^^^^ |
| 161 | + | |
| 162 | + = help: this lint can be silenced by assigning the value to a local variable before borrowing |
| 163 | + = note: there is a compiler inserted borrow here |
| 164 | + |
| 165 | +error: aborting due to 19 previous errors |
| 166 | + |
0 commit comments