File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed
Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -653,19 +653,16 @@ impl<'db> InferenceResult<'db> {
653653 }
654654 pub fn type_of_expr_with_adjust ( & self , id : ExprId ) -> Option < Ty < ' db > > {
655655 match self . expr_adjustments . get ( & id) . and_then ( |adjustments| {
656- adjustments
657- . iter ( )
658- . filter ( |adj| {
659- // https://github.com/rust-lang/rust/blob/67819923ac8ea353aaa775303f4c3aacbf41d010/compiler/rustc_mir_build/src/thir/cx/expr.rs#L140
660- !matches ! (
661- adj,
662- Adjustment {
663- kind: Adjust :: NeverToAny ,
664- target,
665- } if target. is_never( )
666- )
667- } )
668- . next_back ( )
656+ adjustments. iter ( ) . rfind ( |adj| {
657+ // https://github.com/rust-lang/rust/blob/67819923ac8ea353aaa775303f4c3aacbf41d010/compiler/rustc_mir_build/src/thir/cx/expr.rs#L140
658+ !matches ! (
659+ adj,
660+ Adjustment {
661+ kind: Adjust :: NeverToAny ,
662+ target,
663+ } if target. is_never( )
664+ )
665+ } )
669666 } ) {
670667 Some ( adjustment) => Some ( adjustment. target ) ,
671668 None => self . type_of_expr . get ( id) . copied ( ) ,
Original file line number Diff line number Diff line change @@ -36,10 +36,6 @@ pub struct ObligationCause {
3636}
3737
3838impl ObligationCause {
39- #[ expect(
40- clippy:: new_without_default,
41- reason = "`new` is temporary, eventually we will provide span etc. here"
42- ) ]
4339 #[ inline]
4440 pub fn new ( ) -> ObligationCause {
4541 ObligationCause { _private : ( ) }
You can’t perform that action at this time.
0 commit comments