about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-06-23 11:15:04 +0200
committerSamuel Tardieu <sam@rfc1149.net>2025-06-23 18:30:27 +0200
commit89f7a4301d8a547ee819dfefd95ac7d40005b8cc (patch)
treea651908cdcba4ecdfcc1163953f412367405b469 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent76118ec84ee5c1e865d10cd5d99c02878dd56ade (diff)
downloadrust-89f7a4301d8a547ee819dfefd95ac7d40005b8cc.tar.gz
rust-89f7a4301d8a547ee819dfefd95ac7d40005b8cc.zip
Properly check that an expression might be the one returned
The `TyCtxt::hir_get_fn_id_for_return_block()` function was too broad,
as it will return positively even when given part of an expression that can
be used as a return value. A new `potential_return_of_enclosing_body()`
utility function has been made to represent the fact that an expression
might be directly returned from its enclosing body.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions