@@ -103,71 +103,71 @@ error: this expression borrows a value the compiler would automatically borrow
103103LL | let _ = (&x).0;
104104 | ^^^^ help: change this to: `x`
105105
106- error: this expression borrows a value the compiler would automatically borrow
107- --> tests/ui/needless_borrow.rs:111:22
108- |
109- LL | let _ = unsafe { (&*x).0 };
110- | ^^^^^ help: change this to: `(*x)`
111-
112106error: this expression creates a reference which is immediately dereferenced by the compiler
113- --> tests/ui/needless_borrow.rs:122 :5
107+ --> tests/ui/needless_borrow.rs:119 :5
114108 |
115109LL | (&&()).foo();
116110 | ^^^^^^ help: change this to: `(&())`
117111
118112error: this expression creates a reference which is immediately dereferenced by the compiler
119- --> tests/ui/needless_borrow.rs:132 :5
113+ --> tests/ui/needless_borrow.rs:129 :5
120114 |
121115LL | (&&5).foo();
122116 | ^^^^^ help: change this to: `(&5)`
123117
124118error: this expression creates a reference which is immediately dereferenced by the compiler
125- --> tests/ui/needless_borrow.rs:159 :23
119+ --> tests/ui/needless_borrow.rs:156 :23
126120 |
127121LL | let x: (&str,) = (&"",);
128122 | ^^^ help: change this to: `""`
129123
130124error: this expression borrows a value the compiler would automatically borrow
131- --> tests/ui/needless_borrow.rs:202 :13
125+ --> tests/ui/needless_borrow.rs:199 :13
132126 |
133127LL | (&self.f)()
134128 | ^^^^^^^^^ help: change this to: `(self.f)`
135129
136130error: this expression borrows a value the compiler would automatically borrow
137- --> tests/ui/needless_borrow.rs:212 :13
131+ --> tests/ui/needless_borrow.rs:209 :13
138132 |
139133LL | (&mut self.f)()
140134 | ^^^^^^^^^^^^^ help: change this to: `(self.f)`
141135
142136error: this expression borrows a value the compiler would automatically borrow
143- --> tests/ui/needless_borrow.rs:250 :22
137+ --> tests/ui/needless_borrow.rs:247 :22
144138 |
145139LL | let _ = &mut (&mut { x.u }).x;
146140 | ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`
147141
148142error: this expression borrows a value the compiler would automatically borrow
149- --> tests/ui/needless_borrow.rs:258 :22
143+ --> tests/ui/needless_borrow.rs:255 :22
150144 |
151145LL | let _ = &mut (&mut { x.u }).x;
152146 | ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`
153147
154148error: this expression borrows a value the compiler would automatically borrow
155- --> tests/ui/needless_borrow.rs:263 :22
149+ --> tests/ui/needless_borrow.rs:260 :22
156150 |
157151LL | let _ = &mut (&mut x.u).x;
158152 | ^^^^^^^^^^ help: change this to: `x.u`
159153
160154error: this expression borrows a value the compiler would automatically borrow
161- --> tests/ui/needless_borrow.rs:265 :22
155+ --> tests/ui/needless_borrow.rs:262 :22
162156 |
163157LL | let _ = &mut (&mut { x.u }).x;
164158 | ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`
165159
166160error: this expression creates a reference which is immediately dereferenced by the compiler
167- --> tests/ui/needless_borrow.rs:287 :23
161+ --> tests/ui/needless_borrow.rs:284 :23
168162 |
169163LL | option.unwrap_or((&x.0,));
170164 | ^^^^ help: change this to: `x.0`
171165
166+ error: this expression creates a reference which is immediately dereferenced by the compiler
167+ --> tests/ui/needless_borrow.rs:291:13
168+ |
169+ LL | let _ = (&slice).len();
170+ | ^^^^^^^^ help: change this to: `slice`
171+
172172error: aborting due to 28 previous errors
173173
0 commit comments