Open kristof-mattei opened 4 months ago
This is because Rust Analyzer isn't lowering async blocks into places when building mir https://github.com/rust-lang/rust-analyzer/blob/f2afcb874e7410121c366ae601660abe327e320b/crates/hir-ty/src/mir/lower.rs#L874
rust-analyzer version: rust-analyzer version: 0.3.2011-standalone [/home/kristof/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2011-linux-x64/server/rust-analyzer]
rustc version: rustc 1.79.0 (129f3b996 2024-06-10)
editor or extension: VSCode v1.90.2 (user setup) / Rust Analyzer extension: v0.3.2011
relevant settings:
"rust-analyzer.inlayHints.implicitDrops.enable": true,
repository link (if public, optional): https://github.com/kristof-mattei/async-no-implicit-drop.git
code snippet to reproduce:
When enabling
implicitDrops
, they aren't rendered inasync
functions. Note that having aDrop
function doesn't change the whetherdrop(drop_test)
is rendered or not, I just put it there to prove that it was actually dropped.Screenshot from Repo above in VSCode: