@@ -162,7 +162,7 @@ struct BoundLftPair {
162
162
}
163
163
164
164
impl BoundLftPair {
165
- fn new ( long_lft_sym : & Symbol , outlived_lft_sym : & Symbol ) -> Self {
165
+ fn new ( long_lft_sym : Symbol , outlived_lft_sym : Symbol ) -> Self {
166
166
BoundLftPair {
167
167
long_lft : long_lft_sym. to_ident_string ( ) ,
168
168
outlived_lft : outlived_lft_sym. to_ident_string ( ) ,
@@ -178,19 +178,13 @@ impl PartialEq for BoundLftPair {
178
178
fn eq ( & self , other : & Self ) -> bool {
179
179
self . long_lft . eq ( & other. long_lft ) && self . outlived_lft . eq ( & other. outlived_lft )
180
180
}
181
-
182
- fn ne ( & self , other : & Self ) -> bool {
183
- !self . eq ( other)
184
- }
185
181
}
186
182
187
183
impl Eq for BoundLftPair { }
188
184
189
185
impl PartialOrd for BoundLftPair {
190
186
fn partial_cmp ( & self , other : & BoundLftPair ) -> Option < Ordering > {
191
- self . long_lft
192
- . partial_cmp ( & other. long_lft )
193
- . or ( self . outlived_lft . partial_cmp ( & other. outlived_lft ) )
187
+ Some ( self . cmp ( other) )
194
188
}
195
189
}
196
190
@@ -215,7 +209,7 @@ fn get_declared_bounds(generics: &Generics<'_>) -> BTreeSet<BoundLftPair> {
215
209
let GenericBound :: Outlives ( outlived_lft) = * generic_bound else {
216
210
continue ;
217
211
} ;
218
- let declared_bound = BoundLftPair :: new ( & long_lft_sym, & outlived_lft. ident . name ) ;
212
+ let declared_bound = BoundLftPair :: new ( long_lft_sym, outlived_lft. ident . name ) ;
219
213
declared_bounds. insert ( declared_bound) ;
220
214
}
221
215
} ,
@@ -249,7 +243,7 @@ fn collect_nested_ref_implied_bounds(
249
243
if let Some ( ref_lft_sym) = ref_lft_sym_opt {
250
244
if let Some ( outlived_lft_sym) = outlived_lft_sym_opt {
251
245
// ref_lft_sym outlives outlived_lft_sym
252
- let bound_lft_pair = BoundLftPair :: new ( & ref_lft_sym, & outlived_lft_sym) ;
246
+ let bound_lft_pair = BoundLftPair :: new ( ref_lft_sym, outlived_lft_sym) ;
253
247
implied_bounds. insert ( bound_lft_pair) ;
254
248
}
255
249
// ref_lft_sym may be outlived by deeper refs
0 commit comments