Rollup merge of #93751 - eholk:issue-93648-drop-tracking-projection, r=tmiasko
Drop tracking: track borrows of projections Previous efforts to ignore partially consumed values meant we were also not considering borrows of a projection. This led to cases where we'd miss borrowed types which MIR expected to be there, leading to ICEs. This PR also includes the `-Zdrop-tracking` flag from #93313. If that PR lands first, I'll rebase to drop the commit from this one. Fixes #93648
This commit is contained in:
commit
a07eed99f6
6 changed files with 33 additions and 19 deletions
12
src/test/ui/async-await/issue-93648.rs
Normal file
12
src/test/ui/async-await/issue-93648.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// edition:2021
|
||||
// build-pass
|
||||
// compile-flags: -Zdrop-tracking
|
||||
|
||||
fn main() {
|
||||
let _ = async {
|
||||
let mut s = (String::new(),);
|
||||
s.0.push_str("abc");
|
||||
std::mem::drop(s);
|
||||
async {}.await;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue