rust/src
Matthias Krüger eb8114bad7
Rollup merge of #128277 - RalfJung:offset_from_wildcard, r=oli-obk
miri: fix offset_from behavior on wildcard pointers

offset_from wouldn't behave correctly when the "end" pointer was a wildcard pointer (result of an int2ptr cast) just at the end of the allocation. Fix that by expressing the "same allocation" check in terms of two `check_ptr_access_signed` instead of something specific to offset_from, which is both more canonical and works better with wildcard pointers.

The second commit just improves diagnostics: I wanted the "pointer is dangling (has no provenance)" message to say how many bytes of memory it expected to see (since if it were 0 bytes, this would actually be legal, so it's good to tell the user that it's not 0 bytes). And then I was annoying that the error looks so different for when you deref a dangling pointer vs an out-of-bounds pointer so I made them more similar.

Fixes https://github.com/rust-lang/miri/issues/3767
2024-07-29 11:42:34 +02:00
..
bootstrap ignore crates if running unit tests 2024-07-29 10:43:37 +03:00
ci Reformat use declarations. 2024-07-29 08:26:52 +10:00
doc Rollup merge of #128215 - ehuss:update-reference, r=Kobzol 2024-07-28 13:42:19 +02:00
etc Rewrite test-float-parse in Rust 2024-07-20 11:39:34 -05:00
librustdoc Reformat use declarations. 2024-07-29 08:26:52 +10:00
llvm-project@c54cff0e6e Update LLVM submodule 2024-07-05 22:06:57 +08:00
rustdoc-json-types Rollup merge of #127290 - its-the-shrimp:document_rustdoc_json_types, r=aDotInTheVoid 2024-07-29 07:11:14 +02:00
tools Rollup merge of #128277 - RalfJung:offset_from_wildcard, r=oli-obk 2024-07-29 11:42:34 +02:00
README.md
stage0 bump stage0 compiler 2024-06-11 15:10:03 +02:00
version Bump to 1.82 2024-07-20 10:30:39 -04: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.