8 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -145,19 +145,19 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
145
145
let mut result = vec ! [ ] ;
146
146
if fps. is_empty ( ) {
147
147
debug ! ( "Unrestricted search for {:?} impls..." , trait_) ;
148
- self . for_trait_impls ( trait_, self_ty_fp, |impls| {
148
+ let _ = self . for_trait_impls ( trait_, self_ty_fp, |impls| {
149
149
result. extend ( impls. for_trait ( trait_) . map ( id_to_chalk) ) ;
150
150
ControlFlow :: Continue ( ( ) )
151
- } )
151
+ } ) ;
152
152
} else {
153
- self . for_trait_impls ( trait_, self_ty_fp, |impls| {
153
+ let _ = self . for_trait_impls ( trait_, self_ty_fp, |impls| {
154
154
result. extend (
155
155
fps. iter ( ) . flat_map ( move |fp| {
156
156
impls. for_trait_and_self_ty ( trait_, * fp) . map ( id_to_chalk)
157
157
} ) ,
158
158
) ;
159
159
ControlFlow :: Continue ( ( ) )
160
- } )
160
+ } ) ;
161
161
} ;
162
162
163
163
debug ! ( "impls_for_trait returned {} impls" , result. len( ) ) ;
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ pub fn dyn_compatibility_of_trait_query(
116
116
trait_ : TraitId ,
117
117
) -> Option < DynCompatibilityViolation > {
118
118
let mut res = None ;
119
- dyn_compatibility_of_trait_with_callback ( db, trait_, & mut |osv| {
119
+ let _ = dyn_compatibility_of_trait_with_callback ( db, trait_, & mut |osv| {
120
120
res = Some ( osv) ;
121
121
ControlFlow :: Break ( ( ) )
122
122
} ) ;
@@ -597,7 +597,7 @@ fn contains_illegal_impl_trait_in_trait(
597
597
598
598
let ret = sig. skip_binders ( ) . ret ( ) ;
599
599
let mut visitor = OpaqueTypeCollector ( FxHashSet :: default ( ) ) ;
600
- ret. visit_with ( visitor. as_dyn ( ) , DebruijnIndex :: INNERMOST ) ;
600
+ let _ = ret. visit_with ( visitor. as_dyn ( ) , DebruijnIndex :: INNERMOST ) ;
601
601
602
602
// Since we haven't implemented RPITIT in proper way like rustc yet,
603
603
// just check whether `ret` contains RPIT for now
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ fn check_dyn_compatibility<'a>(
53
53
continue ;
54
54
} ;
55
55
let mut osvs = FxHashSet :: default ( ) ;
56
- dyn_compatibility_with_callback ( & db, trait_id, & mut |osv| {
56
+ let _ = dyn_compatibility_with_callback ( & db, trait_id, & mut |osv| {
57
57
osvs. insert ( match osv {
58
58
DynCompatibilityViolation :: SizedSelf => SizedSelf ,
59
59
DynCompatibilityViolation :: SelfReferential => SelfReferential ,
Original file line number Diff line number Diff line change @@ -1143,7 +1143,7 @@ impl<'a> InferenceContext<'a> {
1143
1143
non_assocs : FxHashMap :: default ( ) ,
1144
1144
} ;
1145
1145
for ty in tait_candidates {
1146
- ty. visit_with ( collector. as_dyn ( ) , DebruijnIndex :: INNERMOST ) ;
1146
+ let _ = ty. visit_with ( collector. as_dyn ( ) , DebruijnIndex :: INNERMOST ) ;
1147
1147
}
1148
1148
1149
1149
// Non-assoc TAITs can be define-used everywhere as long as they are
Original file line number Diff line number Diff line change @@ -1037,7 +1037,7 @@ where
1037
1037
T : ?Sized + TypeVisitable < Interner > ,
1038
1038
{
1039
1039
let mut collector = PlaceholderCollector { db, placeholders : FxHashSet :: default ( ) } ;
1040
- value. visit_with ( & mut collector, DebruijnIndex :: INNERMOST ) ;
1040
+ let _ = value. visit_with ( & mut collector, DebruijnIndex :: INNERMOST ) ;
1041
1041
collector. placeholders . into_iter ( ) . collect ( )
1042
1042
}
1043
1043
Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ pub(crate) fn iterate_method_candidates<T>(
596
596
mut callback : impl FnMut ( ReceiverAdjustments , AssocItemId , bool ) -> Option < T > ,
597
597
) -> Option < T > {
598
598
let mut slot = None ;
599
- iterate_method_candidates_dyn (
599
+ let _ = iterate_method_candidates_dyn (
600
600
ty,
601
601
db,
602
602
env,
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ fn resolve_impl_trait_item(
260
260
// attributes here. Use path resolution directly instead.
261
261
//
262
262
// FIXME: resolve type aliases (which are not yielded by iterate_path_candidates)
263
- method_resolution:: iterate_path_candidates (
263
+ let _ = method_resolution:: iterate_path_candidates (
264
264
& canonical,
265
265
db,
266
266
environment,
Original file line number Diff line number Diff line change @@ -2879,7 +2879,7 @@ impl Trait {
2879
2879
db : & dyn HirDatabase ,
2880
2880
) -> Option < Vec < DynCompatibilityViolation > > {
2881
2881
let mut violations = vec ! [ ] ;
2882
- hir_ty:: dyn_compatibility:: dyn_compatibility_with_callback ( db, self . id , & mut |violation| {
2882
+ let _ = hir_ty:: dyn_compatibility:: dyn_compatibility_with_callback ( db, self . id , & mut |violation| {
2883
2883
violations. push ( violation) ;
2884
2884
ControlFlow :: Continue ( ( ) )
2885
2885
} ) ;
@@ -5461,7 +5461,7 @@ impl Type {
5461
5461
. generic_def ( )
5462
5462
. map_or_else ( || TraitEnvironment :: empty ( krate. id ) , |d| db. trait_environment ( d) ) ;
5463
5463
5464
- method_resolution:: iterate_method_candidates_dyn (
5464
+ let _ = method_resolution:: iterate_method_candidates_dyn (
5465
5465
& canonical,
5466
5466
db,
5467
5467
environment,
@@ -5548,7 +5548,7 @@ impl Type {
5548
5548
. generic_def ( )
5549
5549
. map_or_else ( || TraitEnvironment :: empty ( krate. id ) , |d| db. trait_environment ( d) ) ;
5550
5550
5551
- method_resolution:: iterate_path_candidates (
5551
+ let _ = method_resolution:: iterate_path_candidates (
5552
5552
& canonical,
5553
5553
db,
5554
5554
environment,
0 commit comments