rust-lang / rust-lang/polonius
A bug from drop
Open
@ecstatic-morse is already working on this.
Since Aug 12, 2021.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
struct S;
impl S{
fn foo(&mut self){}
}
struct T<'a>(&'a S);
impl<'a> Drop for T<'a>{
fn drop(&mut self){}
}
fn main() {
let mut s=S;
let t=T(&s);
s.foo();
}
Inspired by https://github.com/rust-lang/rust/issues/70797
The Drop of T makes polonius failed.
It's related to eager drop: https://github.com/rust-lang/lang-team/issues/86
Is it a bug?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.