rust/tests/ui/rfcs
Matthias Krüger a13f40dae6
Rollup merge of #127853 - folkertdev:naked-function-error-messages, r=bjorn3
`#[naked]`: report incompatible attributes

tracking issue: https://github.com/rust-lang/rust/issues/90957

this is a re-implementation of https://github.com/rust-lang/rust/pull/93809 by ``@bstrie`` which was closed 2 years ago due to inactivity.

This PR takes some of the final comments into account, specifically providing a little more context in error messages, and using an allow list to determine which attributes are compatible with `#[naked]`.

Notable attributes that are incompatible with `#[naked]` are:

  * `#[inline]`
  * `#[track_caller]`
  * ~~`#[target_feature]`~~ (this is now allowed, see PR discussion)
  * `#[test]`, `#[ignore]`, `#[should_panic]`

These attributes just directly conflict with what `#[naked]` should do.

Naked functions are still important for systems programming, embedded, and operating systems, so I'd like to move them forward.
2024-07-28 08:57:16 +02:00
..
impl-trait
rfc-0000-never_patterns Explain why a given pattern is considered unreachable 2024-07-24 08:02:55 +02:00
rfc-0107-bind-by-move-pattern-guards Suggest .clone() in some move errors 2024-04-11 16:41:41 +00:00
rfc-1014-stdout-existential-crisis Remove libc from more tests 2024-04-17 08:36:49 -04:00
rfc-1445-restrict-constants-in-patterns const_to_pat: cleanup leftovers from when we had to deal with non-structural constants 2024-07-18 11:58:16 +02:00
rfc-1623-static properly fill a promoted's required_consts 2024-04-23 23:02:54 +02:00
rfc-1717-dllimport Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
rfc-1789-as-cell
rfc-1857-stabilize-drop-order
rfc-1937-termination-trait Remove some unnecessary allow(incomplete_features) 2024-03-11 19:42:04 +00:00
rfc-2005-default-binding-mode
rfc-2008-non-exhaustive Explain why a given pattern is considered unreachable 2024-07-24 08:02:55 +02:00
rfc-2027-object-safe-for-dispatch Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
rfc-2091-track-caller switch to an allowlist approach 2024-07-27 12:55:39 +02:00
rfc-2093-infer-outlives
rfc-2126-crate-paths
rfc-2126-extern-absolute-paths Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
rfc-2151-raw-identifiers
rfc-2175-or-if-while-let
rfc-2294-if-let-guard Explain why a given pattern is considered unreachable 2024-07-24 08:02:55 +02:00
rfc-2302-self-struct-ctor
rfc-2306-convert-id
rfc-2361-dbg-macro Suggest a borrow when using dbg 2024-07-16 02:48:47 +08:00
rfc-2396-target_feature-11 Use parenthetical notation for Fn traits 2024-05-29 22:26:54 +00:00
rfc-2421-unreserve-pure-offsetof-sizeof-alignof
rfc-2457-non-ascii-idents
rfc-2497-if-let-chains
rfc-2528-type-changing-struct-update Remove some unnecessary allow(incomplete_features) 2024-03-11 19:42:04 +00:00
rfc-2565-param-attrs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
rfc-2627-raw-dylib Fix ddltool-failed test 2024-07-24 21:06:24 +00:00
rfc-2632-const-trait-impl Rollup merge of #128171 - compiler-errors:arg-compat, r=oli-obk 2024-07-25 16:48:21 +02:00
rfc-3348-c-string-literals Replace ASCII control chars with Unicode Control Pictures 2024-07-18 19:23:42 +00:00
type-alias-impl-trait