rust/src
Stuart Cook 0225f8b09c
Rollup merge of #144706 - zachs18:fix-144661, r=RalfJung
Do not give function allocations alignment in consteval and Miri.

We do not yet have a (clear and T-lang approved) design for how `#[align(N)]` on functions should affect function pointers' addresses on various platforms, so for now do not give function pointers alignment in consteval and Miri.

----

Old summary:

Not a full solution to <https://github.com/rust-lang/rust/issues/144661>, but fixes the immediate issue by making function allocations all have alignment 1 in consteval, ignoring `#[rustc_align(N)]`, so the compiler doesn't know if any offset other than 0 is non-null.

A more "principlied" solution would probably be to make function pointers to `#[instruction_set(arm::t32)]` functions be at offset 1 of an align-`max(2, align attribute)` allocation instead of at offset 0 of their allocation during consteval, and on wasm to either disallow `#[align(N)]` where N > 1, or to pad the function table such that the function pointer of a `#[align(N)]` function is a multiple of `N` at runtime.
2025-08-04 11:24:39 +10:00
..
bootstrap Rollup merge of #144782 - jieyouxu:compiletest-selftests, r=Kobzol 2025-08-02 11:24:27 +02:00
build_helper integrate build_helper::npm into js checks and package.json usage 2025-07-19 14:56:42 -05:00
ci Rollup merge of #144053 - Kobzol:ci-remove-install-rust, r=marcoieni 2025-07-31 13:12:46 +02:00
doc Rollup merge of #144738 - bjorn3:remove_omit_gdb_pretty_printer_section, r=jieyouxu 2025-08-03 21:56:56 +02:00
etc update completions 2025-07-19 14:52:31 -05:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Rollup merge of #144766 - Berrysoft:patch-1, r=GuillaumeGomez 2025-08-02 11:24:26 +02:00
llvm-project@e8a2ffcf32 Update LLVM submodule 2025-07-17 19:53:13 +08:00
rustc-std-workspace
rustdoc-json-types rustdoc-json: Move #[macro_export] from Other to it's own variant 2025-07-30 19:57:32 +00:00
tools Rollup merge of #144706 - zachs18:fix-144661, r=RalfJung 2025-08-04 11:24:39 +10:00
README.md
stage0 Update stage0 to 1.89.0-beta.1 2025-07-01 10:54:33 -07:00
version bump version 2025-08-01 09:04:01 +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.