Uh oh!
There was an error while loading. Please reload this page.
Validate that naked functions are never inlined - #87652
Conversation
rust-highfive
commented
Jul 31, 2021
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
The tracking issue says that this should be an error, but it's a warning in this PR. Is this just a transitional lint to avoid breaking nightly code? If so, seems reasonable to me.
There was a problem hiding this comment.
@josephlr There's a bunch of these lints that should be errors according to the RFC. I wanted to get them all in as warnings first and then file a follow-up which switches the relevant ones to errors. This allows us to reason about them as an entire set.
oli-obk
commented
Aug 2, 2021
r? @Amanieu |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Reject all uses of the inline attribute on naked functions. rust-lang/rfcs#2774rust-lang/rfcs#2972
Amanieu
commented
Aug 3, 2021
@bors r+ |
bors
commented
Aug 3, 2021
📌 Commit 157e0a0 has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#87645 (Properly find owner of closure in THIR unsafeck) - rust-lang#87646 (Fix a parser ICE on invalid `fn` body) - rust-lang#87652 (Validate that naked functions are never inlined) - rust-lang#87685 (Write docs for SyncOnceCell From and Default impl) - rust-lang#87693 (Add `aarch64-apple-ios-sim` as a possible target to the manifest) - rust-lang#87708 (Add convenience method for handling ipv4-mapped addresses by canonicalizing them) - rust-lang#87711 (Correct typo) - rust-lang#87716 (Allow generic SIMD array element type) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This matches the behavior of the merged PR implementing this criteria. rust-lang/rust#87652
Transition unsupported naked functions future incompatibility lint into an error: * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 rust-lang#79653. Change into an error fixes a soundness issue described in rust-lang#32489. * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 rust-lang#87652.
…nctions, r=Amanieu Reject unsupported naked functions Transition unsupported naked functions future incompatibility lint into an error: * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 rust-lang#79653. Change into an error fixes a soundness issue described in rust-lang#32489. * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 rust-lang#87652. Closesrust-lang#32490. Closesrust-lang#32489. r? `@Amanieu` `@npmccallum` `@joshtriplett`
…nctions, r=Amanieu Reject unsupported naked functions Transition unsupported naked functions future incompatibility lint into an error: * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 rust-lang#79653. Change into an error fixes a soundness issue described in rust-lang#32489. * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 rust-lang#87652. Closesrust-lang#32490. Closesrust-lang#32489. r? ``@Amanieu`` ``@npmccallum`` ``@joshtriplett``
…nctions, r=Amanieu Reject unsupported naked functions Transition unsupported naked functions future incompatibility lint into an error: * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 rust-lang#79653. Change into an error fixes a soundness issue described in rust-lang#32489. * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 rust-lang#87652. Closesrust-lang#32490. Closesrust-lang#32489. r? ```@Amanieu``` ```@npmccallum``` ```@joshtriplett```
Reject all uses of the inline attribute on naked functions.
rust-lang/rfcs#2774
rust-lang/rfcs#2972
cc @joshtriplett@tmiasko@Amanieu