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

Add support for naked functions #32410

Merged
merged 3 commits into from
Mar 23, 2016
Merged

Add support for naked functions #32410

merged 3 commits into from
Mar 23, 2016

Conversation

ticki
Copy link
Contributor

@ticki ticki commented Mar 21, 2016

See rust-lang/rfcs#1201 (comment)

This PR adds #[naked] for marking naked functions.

@ticki
Copy link
Contributor Author

ticki commented Mar 21, 2016

The tests are stolen from @jackpot51's PR.

@durka
Copy link
Contributor

durka commented Mar 21, 2016

tidy failure

check: formatting
/home/travis/build/rust-lang/rust/src/test/codegen/naked-functions.rs:61: line longer than 100 chars
/home/travis/build/rust-lang/rust/src/libsyntax/feature_gate.rs:215: tab character

@ticki
Copy link
Contributor Author

ticki commented Mar 22, 2016

Fixed.

@ticki
Copy link
Contributor Author

ticki commented Mar 22, 2016

r? @eddyb

@@ -376,6 +379,9 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
// FIXME: #14406 these are processed in trans, which happens after the
// lint pass
("cold", Whitelisted, Ungated),
("naked", Whitelisted, Gated("naked_functions",
"the `#[naked]` attribute \
is an experimental feature")),
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test that the feature gating works, i.e. you get an error by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is fixed now.

@eddyb
Copy link
Member

eddyb commented Mar 22, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Mar 22, 2016

📌 Commit 4869417 has been approved by eddyb

@@ -212,6 +212,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
// rust runtime internal
("unwind_attributes", "1.4.0", None, Active),

// allow the use of `#[naked]` on functions.
("naked_functions", "1.9.0", None, Active),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be Some(32408)

@ticki
Copy link
Contributor Author

ticki commented Mar 22, 2016

When will this be merged?

@TimNN
Copy link
Contributor

TimNN commented Mar 22, 2016

@ticki You can see the queue of PRs to be tested & merged here: http://buildbot.rust-lang.org/homu/queue/rust

@eddyb
Copy link
Member

eddyb commented Mar 22, 2016

@ticki you might want to fix the nit @durka mentioned, but other than that it's waiting in the queue that @TimNN linked.

@bors
Copy link
Contributor

bors commented Mar 23, 2016

⌛ Testing commit 4869417 with merge 26cfc26...

bors added a commit that referenced this pull request Mar 23, 2016
Add support for naked functions

See rust-lang/rfcs#1201 (comment)

This PR adds `#[naked]` for marking naked functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants