We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
expr_ty_adjusted_opt
expr_ty_adjusted
1 parent 2f8eeb2 commit 8833175Copy full SHA for 8833175
compiler/rustc_middle/src/ty/typeck_results.rs
@@ -383,7 +383,7 @@ impl<'tcx> TypeckResults<'tcx> {
383
}
384
385
pub fn expr_ty_adjusted_opt(&self, expr: &hir::Expr<'_>) -> Option<Ty<'tcx>> {
386
- self.expr_adjustments(expr).last().map(|adj| adj.target).or_else(|| self.expr_ty_opt(expr))
+ self.expr_adjustments(expr).last().map_or_else(|| self.expr_ty_opt(expr), |adj| adj.target)
387
388
389
pub fn is_method_call(&self, expr: &hir::Expr<'_>) -> bool {
0 commit comments