rust/src
bors 1b3b8e7b02 Auto merge of #128651 - folkertdev:naked-asm-macro-v2, r=Amanieu
add `naked_asm!` macro for use in `#[naked]` functions

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

Adds the `core::arch::naked_asm` macro, to be used in `#[naked]` functions, but providing better error messages and a place to explain the restrictions on assembly in naked functions.

This PR does not yet require that the `naked_asm!` macro is used inside of `#[naked]` functions:

- the `asm!` macro can still be used in `#[naked]` functions currently, with the same restrictions and error messages as before.
- the `naked_asm!` macro can be used outside of `#[naked]` functions. It has not yet been decided whether that should be allowed long-term.

In this PR, the parsing code of `naked_asm!` now enforces the restrictions on assembly in naked functions, with the exception of checking that the `noreturn` option is specified. It also has not currently been decided if `noreturn` should be implicit or not.

This PR looks large because it touches a bunch of tests. The code changes are mostly straightforward I think: we now have 3 flavors of assembly macro, and that information must be propagated through the parsing code and error messages.

cc `@Lokathor`

r? `@Amanieu`
2024-10-06 21:51:18 +00:00
..
bootstrap Auto merge of #131320 - matthiaskrgr:rollup-tom15b3, r=matthiaskrgr 2024-10-06 11:43:07 +00:00
ci Rollup merge of #131230 - GuillaumeGomez:no-sandbox, r=notriddle 2024-10-04 15:42:55 +02:00
doc Add platform support doc for rv32e 2024-10-05 12:19:21 +03:00
etc bootstrap: Consolidate editor LSP setup 2024-10-03 15:22:44 +01:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Handle librustdoc cases of rustc::potential_query_instability lint 2024-10-06 10:39:03 +03:00
llvm-project@dd46457da7 Update to LLVM 19.1.1 2024-10-05 21:10:04 +08:00
rustdoc-json-types rustdoc: update ProcMacro docs section on helper attributes 2024-09-27 14:34:48 -04:00
tools various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
README.md
stage0 Bump stage0 2024-09-22 19:04:19 -04:00
version Bump to 1.83 2024-08-30 19:58:04 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.