File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55#![ feature( rustc_private) ]
66#![ feature( box_patterns) ]
7- #![ feature( if_let_guard) ]
87#![ feature( never_type) ]
98#![ feature( try_blocks) ]
109// Used in monomorphize collector
Original file line number Diff line number Diff line change @@ -267,19 +267,18 @@ where
267267 // impl_item_refs may be empty if drop fn is not implemented in 'impl AsyncDrop for ...'
268268 // (#140974).
269269 // Such code will report error, so just generate sync drop here and return
270- let Some ( drop_fn_def_id) = tcx
271- . associated_item_def_ids ( drop_trait)
272- . first ( )
273- . and_then ( |def_id| {
274- if tcx. def_kind ( def_id) == DefKind :: AssocFn
275- && tcx. check_args_compatible ( * def_id, trait_args)
276- {
277- Some ( def_id)
278- } else {
279- None
280- }
281- } )
282- . copied ( )
270+ let Some ( drop_fn_def_id) =
271+ tcx. associated_item_def_ids ( drop_trait)
272+ . first ( )
273+ . and_then ( |& def_id| {
274+ if tcx. def_kind ( def_id) == DefKind :: AssocFn
275+ && tcx. check_args_compatible ( def_id, trait_args)
276+ {
277+ Some ( def_id)
278+ } else {
279+ None
280+ }
281+ } )
283282 else {
284283 tcx. dcx ( ) . span_delayed_bug (
285284 self . elaborator . body ( ) . span ,
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ fn custom_coerce_unsize_info<'tcx>(
8282 Ok ( traits:: ImplSource :: UserDefined ( traits:: ImplSourceUserDefinedData {
8383 impl_def_id,
8484 ..
85- } ) ) => Ok ( tcx. coerce_unsized_info ( impl_def_id) ?. custom_kind . unwrap ( ) ) ,
85+ } ) ) => Ok ( tcx. coerce_unsized_info ( * impl_def_id) ?. custom_kind . unwrap ( ) ) ,
8686 impl_source => {
8787 bug ! ( "invalid `CoerceUnsized` impl_source: {:?}" , impl_source) ;
8888 }
You can’t perform that action at this time.
0 commit comments