Repository navigation
Use core::ptr in implicit_provenance_casts help for no_std crates - #166287
rust-bors[bot] merged 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
45ef1e3 to
432bf56
Compare
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
The int-to-ptr help message hardcoded `std::ptr::with_exposed_provenance`, which is misleading in `no_std` crates where only `core::ptr` is available. This commit uses `std_or_core` to pick the right crate path, falling back to `core` in `no_core` crates. The documentation link in both the int-to-ptr and ptr-to-int notes now also points at the matching crate's docs.
432bf56 to
4599931
Compare
|
@bors r+ rollup |
…casts-no-std, r=folkertdev Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates The int-to-ptr help message hardcoded `std::ptr::with_exposed_provenance`, which is misleading in `no_std` crates where only `core::ptr` is available. This commit uses `std_or_core` to pick the right crate path, falling back to `core` in `no_core` crates. The documentation link in both the int-to-ptr and ptr-to-int notes now also points at the matching crate's docs.
…uwer Rollup of 14 pull requests Successful merges: - #166266 (miri subtree update) - #164878 (Don't require `extern "llvm-intrinsic"` return structs to be `#[repr(packed)]`) - #165008 (Support `NonNull` pointers as `asm!` input operands) - #165892 (`rustc_builtin_macros` cleanup, part 10) - #165930 (Add red-green mark when dumping dep graph. Show DefIds if available) - #166280 (std: also mark doctests with skip_unsupported_miri_tests) - #166295 (use `cfg!(overflow_checks)` in `overflow_checks` intrinsic instead of `cfg!(debug_assertions)`) - #165618 (Implement RangeIntersect on core::range types) - #166012 (Added more queries to AdtDef in rustc_public to check for rust language types) - #166142 (Lower to `hir::Param`s for extern functions) - #166259 (fmt: Improve `Debug` for `FormattingOptions`) - #166269 (libcore: Revert some comment changes) - #166287 (Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates) - #166306 (bootstrap: Stop passing `-Ztrim-paths` to cargo now that it's stable in beta)
…casts-no-std, r=folkertdev Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates The int-to-ptr help message hardcoded `std::ptr::with_exposed_provenance`, which is misleading in `no_std` crates where only `core::ptr` is available. This commit uses `std_or_core` to pick the right crate path, falling back to `core` in `no_core` crates. The documentation link in both the int-to-ptr and ptr-to-int notes now also points at the matching crate's docs.
…uwer Rollup of 13 pull requests Successful merges: - #166266 (miri subtree update) - #155216 (match: Use an aggregate equality comparison for constant array/slice patterns) - #166142 (Lower to `hir::Param`s for extern functions) - #163315 (s390x: replace -Ctarget-feature=+backchain with -Cforce-frame-pointers) - #165238 (make conflicting_repr_hints a hard error) - #165366 (Add lint against duplicate parameter names in fns without body) - #166269 (libcore: Revert some comment changes) - #166287 (Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates) - #166306 (bootstrap: Stop passing `-Ztrim-paths` to cargo now that it's stable in beta) - #166309 (Add `#[must_use]` to `Ip*Addr::as_octets` methods) - #166315 (rustc_diagnostic_item macros added on some iter functions) - #166331 (Include Build IDs in VEX V5 executables) - #166349 (compiletest: Remove some old special-case code paths)
Rollup merge of #166287 - bardiharborow:implicit-provenance-casts-no-std, r=folkertdev Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates The int-to-ptr help message hardcoded `std::ptr::with_exposed_provenance`, which is misleading in `no_std` crates where only `core::ptr` is available. This commit uses `std_or_core` to pick the right crate path, falling back to `core` in `no_core` crates. The documentation link in both the int-to-ptr and ptr-to-int notes now also points at the matching crate's docs.
…uwer Rollup of 13 pull requests Successful merges: - rust-lang/rust#166266 (miri subtree update) - rust-lang/rust#155216 (match: Use an aggregate equality comparison for constant array/slice patterns) - rust-lang/rust#166142 (Lower to `hir::Param`s for extern functions) - rust-lang/rust#163315 (s390x: replace -Ctarget-feature=+backchain with -Cforce-frame-pointers) - rust-lang/rust#165238 (make conflicting_repr_hints a hard error) - rust-lang/rust#165366 (Add lint against duplicate parameter names in fns without body) - rust-lang/rust#166269 (libcore: Revert some comment changes) - rust-lang/rust#166287 (Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates) - rust-lang/rust#166306 (bootstrap: Stop passing `-Ztrim-paths` to cargo now that it's stable in beta) - rust-lang/rust#166309 (Add `#[must_use]` to `Ip*Addr::as_octets` methods) - rust-lang/rust#166315 (rustc_diagnostic_item macros added on some iter functions) - rust-lang/rust#166331 (Include Build IDs in VEX V5 executables) - rust-lang/rust#166349 (compiletest: Remove some old special-case code paths)
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (e3cc43e): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Artifact size: 406.41 MiB -> 405.70 MiB (-0.18%) |
|
@rustbot label: +perf-regression-triaged |
…uwer Rollup of 13 pull requests Successful merges: - rust-lang/rust#166266 (miri subtree update) - rust-lang/rust#155216 (match: Use an aggregate equality comparison for constant array/slice patterns) - rust-lang/rust#166142 (Lower to `hir::Param`s for extern functions) - rust-lang/rust#163315 (s390x: replace -Ctarget-feature=+backchain with -Cforce-frame-pointers) - rust-lang/rust#165238 (make conflicting_repr_hints a hard error) - rust-lang/rust#165366 (Add lint against duplicate parameter names in fns without body) - rust-lang/rust#166269 (libcore: Revert some comment changes) - rust-lang/rust#166287 (Use `core::ptr` in `implicit_provenance_casts` help for `no_std` crates) - rust-lang/rust#166306 (bootstrap: Stop passing `-Ztrim-paths` to cargo now that it's stable in beta) - rust-lang/rust#166309 (Add `#[must_use]` to `Ip*Addr::as_octets` methods) - rust-lang/rust#166315 (rustc_diagnostic_item macros added on some iter functions) - rust-lang/rust#166331 (Include Build IDs in VEX V5 executables) - rust-lang/rust#166349 (compiletest: Remove some old special-case code paths)
The int-to-ptr help message hardcoded
std::ptr::with_exposed_provenance, which is misleading inno_stdcrates where onlycore::ptris available.This commit uses
std_or_coreto pick the right crate path, falling back tocoreinno_corecrates. The documentation link in both the int-to-ptr and ptr-to-int notes now also points at the matching crate's docs.@rustbot label +A-lints +A-diagnostics +T-compiler +D-papercut