Skip to content

Commit 0d5c875

Browse files
committed
Fix a bad hint
1 parent da97c7e commit 0d5c875

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_hir_typeck/src/demand.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
11961196
let hir::Node::Expr(parent_expr) = self.tcx.parent_hir_node(expr.hir_id) else {
11971197
return;
11981198
};
1199+
if parent_expr.span.desugaring_kind().is_some() {
1200+
return;
1201+
}
11991202
enum CallableKind {
12001203
Function,
12011204
Method,

0 commit comments

Comments
 (0)