renamed Allocation::check_defined_and_ptr to Allocation::check_init_and_ptr
renamed Allocation::check_defined_and_ptr to Allocation::check_init_and_ptr
in src/librustc_middle/mir/interpret/allocation.rs
renamed Allocation::is_defined and Allocation::check_defined, fixed documentation
renamed Allocation::is_defined and Allocation::check_defined to is_init and check_init respectively.
Fixed documentation so it correctly refers to "initialization" instead of "defined"-ness
renamed Allocation::mark_definedness
renamed Allocation::mark_definedness to Allocation::mark_init
Renamed new_state parameter in Allocation::mark_init
Renamed new_state to is_init, as the latter is more descriptive.
renamed functions in AllocationDefinedness
renamed AllocationDefinedness::all_bytes_undef and AllocationDefinedness::mark_compressed_undef_range to no_bytes_init and mark_compressed_init_range respectively.
renamed AllocationDefinedness to InitMaskCompressed
renamed Immediate::to_scalar_or_undef
renamed to to_scalar_or_uninit
fixed comment references to "undef"
Changed comments referring to "undef" and "definedness" to "initialization" and "initialization state" in src/librustc_mir/interpret/memory.rs and src/librustc_middle/mir/interpret/allocation.rs
changed references to "undef" in comments and a variable
Changed some comments referring to "undef" to use "uninitialized" instead. Also changed a variable from "undef_end" to "uninit_end".
All changes were made within src/librustc_middle/mir/interpret/allocation.rs.
Changed more comments referring to undef
Changed comments to use "uninitialized" instead of "undef" in src/librustc_middle/mir/interpret/allocation.rs.
Renamed the function ScalarMaybeUninit::not_undef to ScalarMaybeUninit::check_init in the file src/librustc_middle/mir/interpret/value.rs, to reflect changes in terminology used.
Related issue rust-lang#71193
Rollup of 9 pull requests
Successful merges:
- #73783 (Detect when `'static` obligation might come from an `impl`)
- #73868 (Advertise correct stable version for const control flow)
- #74460 (rustdoc: Always warn when linking from public to private items)
- #74538 (Guard against non-monomorphized type_id intrinsic call)
- #74541 (Add the aarch64-apple-darwin target )
- #74600 (Enable perf try builder)
- #74618 (Do not ICE on assoc type with bad placeholder)
- #74631 (rustc_target: Add a target spec option for disabling `--eh-frame-hdr`)
- #74643 (build: Remove unnecessary `cargo:rerun-if-env-changed` annotations)
Failed merges:
r? @ghost
build: Remove unnecessary `cargo:rerun-if-env-changed` annotations
... and a couple of related cleanups.
rustc and cargo now track the majority of env var dependencies automatically (https://github.com/rust-lang/cargo/pull/8421), so the annotations are no longer necessary.
Enable perf try builder
This adds a dedicated branch for perf to use for CI, intended to allow perf to
enqueue builds without needing to use bors. bors is great, but bors requires an
open PR to work, and we want to invoke perf on closed PRs sometimes (in
particular, rollups).
Guard against non-monomorphized type_id intrinsic call
This PR checks whether the type is sufficient monomorphized when calling type_id or type_name intrinsics. If the type is not sufficiently monomorphized, e.g. used in a pattern, the code will be rejected.
Fixes#73976
rustdoc: Always warn when linking from public to private items
Change the logic such that linking from a public to a private item always triggers `intra_doc_link_resolution_failure`.
Previously, the warning was not emitted when `--document-private-items` is passed.
This came up during the discussion in https://github.com/rust-lang/rust/pull/74147#discussion_r452597901.
Change the logic such that linking from a public to a private item always
triggers intra_doc_link_resolution_failure. Previously, the warning was
not emitted when --document-private-items is passed.
Also don't rely anymore on the item's visibility, which would falsely trigger
the lint now that the check for --document-private-items is gone.
Disable polymorphisation
Fixes#74614.
This PR disables polymorphisation to fix the regression in #74614 after investigation into the issue makes it clear that the fix won't be trivial. ~~I'll file an issue shortly to replace #74614 with the findings so far.~~ #74636 has been filed to track the fix of the underlying regression.
r? @eddyb
Apply #66379 to `*mut T` `as_ref`
#66379 changed the documentation of `as_ref` on the type `*const T` and `as_mut` on the type `*mut T`, but it missed making that same change for `as_ref` on the type `*mut T`.
refactor and reword intra-doc link errors
This commit refactors intra-doc link error reporting to deduplicate code
and decouple error construction from the type of error. This greatly
improves flexibility at each error construction site, while reducing the
complexity of the diagnostic creation.
This commit also rewords the diagnostics for clarity and style:
- Diagnostics should not end in periods.
- It's unnecessary to say "ignoring it". Since this is a warning by
default, it's already clear that the link is ignored.
Stabilize control-flow-guard codegen option
This is the stabilization PR discussed in #68793. It converts the `-Z control-flow-guard` debugging option into a codegen option (`-C control-flow-guard`), and changes the associated tests.
This commit disables polymorphisation to resolve regressions related to
closures which inherit unused generic parameters and are then used in
casts or reflection.
Signed-off-by: David Wood <david@davidtw.co>
This commit changes the span and content of the "collection encountered
polymorphic constant" bug in monomorphization collection to point to the
use of the constant rather than the definition.
Signed-off-by: David Wood <david@davidtw.co>
Disable Azure Pipelines except for macOS
Following up on https://github.com/rust-lang/rust/pull/74565, this PR disables most of Azure Pipelines except for macOS auto builds, practically switching us to GitHub Actions 🎉
r? @Mark-Simulacrum
This adds a dedicated branch for perf to use for CI, intended to allow perf to
enqueue builds without needing to use bors. bors is great, but bors requires an
open PR to work, and we want to invoke perf on closed PRs sometimes (in
particular, rollups).
[AVR] Correctly set the pointer address space when constructing pointers to functions
NOTE: Pull request iterations:
* https://github.com/dylanmckay/rust/releases/tag/avr-use-correct-addrspace.0
* https://github.com/dylanmckay/rust/releases/tag/avr-use-correct-addrspace.1
* https://github.com/dylanmckay/rust/releases/tag/avr-use-correct-addrspace.2
This patch extends the existing `type_i8p` method so that it requires an
explicit address space to be specified. Before this patch, the
`type_i8p` method implcitily assumed the default address space, which is
not a safe transformation on all targets, namely AVR.
The Rust compiler already has support for tracking the "instruction
address space" on a per-target basis. This patch extends the code
generation routines so that an address space must always be specified.
In my estimation, around 15% of the callers of `type_i8p` produced
invalid code on AVR due to the loss of address space prior to LLVM final
code generation. This would lead to unavoidable assertion errors
relating to invalid bitcasts.
With this patch, the address space is always either 1) explicitly preserved
from the input type, or 2) explicitly set to the instruction address
space because the logic is dealing with functions which must be placed
there, or 3) explicitly set to the default address space 0 because the
logic can only operate on data space pointers and thus we keep the
existing semantics of assuming the default, "data" address space.
Fix rust-src component.
The rust-src component could not be installed by rustup because it included some symbolic links. #74520 added the backtrace directory which included some symlinks. Since the rust-src component doesn't need most of the files in the `backtrace` submodule, this changes it to only include the minimum necessary.
Tested with cargo's build-std that it can build from the resulting tarball.
Fixes#74577
Upload builds from GHA instead of Azure Pipelines
This PR does two things:
* Enables RLA comments on PRs (needed after the switch to GHA in RLA).
* Switches GitHub Actions as the CI authorized to upload non-macOS builds.
Note that Docker/LLVM caches will likely be busted.
r? @Mark-Simulacrum