Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand dynamic drop tests for cases in #47949 #60729

Merged
merged 1 commit into from
Jun 1, 2019

Conversation

matthewjasper
Copy link
Contributor

Adds test cases for #47949

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 11, 2019
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, r=me, but can we tweak the comments?

let q = loop {
a.alloc();
let r = a.alloc();
break a.alloc_leaked(exceptions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have a FIXME here too -- something like


// FIXME(#XXX) we should not be leaking this, but we are

// Creates a `Ptr<'_>` and checks that the allocated value is leaked if the
// `failing_op` is in the list of exception.
//
// FIXME (#47949) We shouldn't need this, but we are sometimes leaking
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, I found this kind of confusing. Maybe something like this:

FIXME(#47949) -- Each use of this indicates a bug: basically, a value that winds up getting leaked but shouldn't be.

@nikomatsakis nikomatsakis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2019
@nikomatsakis
Copy link
Contributor

r=me -- @matthewjasper did you want to "FIXUP" that commit, thogh?

@matthewjasper
Copy link
Contributor Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented May 31, 2019

📌 Commit 6a9e68a has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 31, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 1, 2019
…komatsakis

Expand dynamic drop tests for cases in rust-lang#47949

Adds test cases for rust-lang#47949
bors added a commit that referenced this pull request Jun 1, 2019
Rollup of 8 pull requests

Successful merges:

 - #60729 (Expand dynamic drop tests for cases in #47949)
 - #61263 (Don't generate div inside header (h4/h3/h...) elements)
 - #61364 (Stabilize reverse_bits feature)
 - #61375 (Make "panic did not include expected string" message consistent)
 - #61387 (Remove ty::BrFresh and RegionConstraintCollector::new_bound)
 - #61389 (Remove GlobalArenas and use Arena instead)
 - #61391 (Doc comment fixes for `rustc::mir::interpret::InterpretCx`)
 - #61403 (Remove unnecessary `-Z continue-parse-after-error` from tests)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jun 1, 2019

⌛ Testing commit 6a9e68a with merge 885c7df...

@bors bors merged commit 6a9e68a into rust-lang:master Jun 1, 2019
@matthewjasper matthewjasper deleted the leak-after-into branch June 1, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants