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

make #[unwind] attribute specify expectations more clearly #48380

Merged
merged 2 commits into from
Mar 1, 2018

Conversation

nikomatsakis
Copy link
Contributor

You can now choose between the following:

  • #[unwind(allowed)]
  • #[unwind(aborts)]

Per #48251, the default is #[unwind(allowed)], though
I think we should change this eventually.

@nikomatsakis
Copy link
Contributor Author

r? @alexcrichton

@rust-highfive
Copy link
Collaborator

r? @michaelwoerister

(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 Feb 20, 2018
@nikomatsakis nikomatsakis force-pushed the issue-48251-master branch 2 times, most recently from a6cfafc to 175619a Compare February 20, 2018 18:58
Aborts,
}

/// Determine what `#[inline]` attribute is present in `attrs`, if any.
Copy link
Member

Choose a reason for hiding this comment

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

s/inline/unwind/

@nikomatsakis nikomatsakis force-pushed the issue-48251-master branch 2 times, most recently from d8287cf to 2dadb12 Compare February 21, 2018 00:11
You can now choose between the following:

- `#[unwind(allowed)]`
- `#[unwind(aborts)]`

Per rust-lang#48251, the default is `#[unwind(allowed)]`, though
I think we should change this eventually.
@nikomatsakis
Copy link
Contributor Author

See FCP on the stable PR

@alexcrichton
Copy link
Member

@bors: r+

Thanks @nikomatsakis! I hope that soon this won't be necessary in the sense that users won't have to decorate apis with attributes in an on-demand fashion, but this is all unstable anyway so seems like a fine interim solution!

@bors
Copy link
Contributor

bors commented Feb 26, 2018

📋 Looks like this PR is still in progress, ignoring approval

@nikomatsakis nikomatsakis changed the title [WIP] make #[unwind] attribute specify expectations more clearly make #[unwind] attribute specify expectations more clearly Feb 27, 2018
@nikomatsakis
Copy link
Contributor Author

@bors r=acrichto

@bors
Copy link
Contributor

bors commented Feb 27, 2018

📌 Commit 566c6ac has been approved by acrichto

@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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 28, 2018
bors added a commit that referenced this pull request Feb 28, 2018
Rollup of 10 pull requests

- Successful merges: #48355, #48359, #48380, #48419, #48420, #48461, #48522, #48570, #48572, #48603
- Failed merges:
@bors bors merged commit 566c6ac into rust-lang:master Mar 1, 2018
@RalfJung
Copy link
Member

Even with this PR, the logic in codegen_fn_attrs (in librustc_typeck/collect.rs) and codegen still treat the mere presence of any unwind attribute as an indicator to not mark the function as nounwind. So, #[unwind(aborts)] is not marked nounwind. Is that really the desired behavior?

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.

None yet

7 participants