Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9072281
Deprecate the `ptr_to_from_bits` feature
scottmcm Apr 2, 2022
4d37d1f
Refer to the `exposed` versions of the methods instead
scottmcm Apr 3, 2022
f613bd6
Make the one-liner more descriptive
dns2utf8 Sep 10, 2022
df5d035
mark sys_common::once::generic::Once::new const-stable
krasimirgg Oct 18, 2022
cdb6907
Update compiler_builtins to 0.1.84
nicholasbishop Nov 18, 2022
eafe61d
dist-various-2: Use clang for the UEFI targets
nicholasbishop Nov 20, 2022
a1e5fea
Move macro_rules diagnostics to diagnostics module
Noratrieb Nov 20, 2022
3fe37b8
Add get_many_mut methods to slice
Kimundi Mar 28, 2021
01a2a54
test-various: Use clang for the UEFI test
nicholasbishop Nov 20, 2022
9f4b4e4
constify remaining layout methods
CraftSpider Sep 23, 2022
414e84a
Add stability for alignment
CraftSpider Oct 17, 2022
6f2dcac
Update with derive_const
CraftSpider Nov 12, 2022
7972b8a
Add derive_const feature
CraftSpider Nov 13, 2022
a5fecc6
Fix issue number
CraftSpider Nov 13, 2022
0791187
Use ? instead of match
CraftSpider Nov 13, 2022
6054608
dist: Ensure UEFI rlibs are all COFF
nicholasbishop Nov 20, 2022
8998711
Only one feature gate needed
CraftSpider Nov 20, 2022
a9e92be
Bump ptr_to_from_bits deprecation to Rust 1.67
dtolnay Nov 21, 2022
6d943af
Rustc_deprecated attribute superseded by deprecated
dtolnay Nov 21, 2022
70cee5a
Touch up Box<T> one-liner
dtolnay Nov 21, 2022
1dd515f
Rollup merge of #83608 - Kimundi:index_many, r=Mark-Simulacrum
Manishearth Nov 22, 2022
81ea610
Rollup merge of #95583 - scottmcm:deprecate-ptr-to-from-bits, r=dtolnay
Manishearth Nov 22, 2022
2f8dbe3
Rollup merge of #101655 - dns2utf8:box_docs, r=dtolnay
Manishearth Nov 22, 2022
1625435
Rollup merge of #102207 - CraftSpider:const-layout, r=scottmcm
Manishearth Nov 22, 2022
3683c43
Rollup merge of #103193 - krasimirgg:sysonce, r=Amanieu
Manishearth Nov 22, 2022
952d385
Rollup merge of #104622 - nicholasbishop:bishop-uefi-clang, r=Mark-Si…
Manishearth Nov 22, 2022
9043dfd
Rollup merge of #104638 - Nilstrieb:macro-diagnostics, r=compiler-errors
Manishearth Nov 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Deprecate the ptr_to_from_bits feature
The strict provenance APIs are a better version of these, and things like `.addr()` work for the "that cast looks sketchy" case even if the full strict provenance stuff never happens.  So I think it's fine to move away from these, and encourage the others instead.
  • Loading branch information
scottmcm committed Apr 2, 2022
commit 90722811c8818b1ce4c7819dac41f22837fa98c6
5 changes: 5 additions & 0 deletions library/core/src/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl<T: ?Sized> *const T {
/// assert_eq!(p1.to_bits() - p0.to_bits(), 4);
/// ```
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
#[rustc_deprecated(since = "1.62", reason = "replaced by the `addr` method")]
pub fn to_bits(self) -> usize
where
T: Sized,
Expand All @@ -140,6 +141,10 @@ impl<T: ?Sized> *const T {
/// assert_eq!(<*const u8>::from_bits(1), dangling);
/// ```
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
#[rustc_deprecated(
since = "1.62",
reason = "replaced by the `with_addr` method or the `ptr::invalid` function"
)]
#[allow(fuzzy_provenance_casts)] // this is an unstable and semi-deprecated cast function
pub fn from_bits(bits: usize) -> Self
where
Expand Down
5 changes: 5 additions & 0 deletions library/core/src/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ impl<T: ?Sized> *mut T {
/// assert_eq!(p1.to_bits() - p0.to_bits(), 4);
/// ```
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
#[rustc_deprecated(since = "1.62", reason = "replaced by the `addr` method")]
pub fn to_bits(self) -> usize
where
T: Sized,
Expand All @@ -146,6 +147,10 @@ impl<T: ?Sized> *mut T {
/// assert_eq!(<*mut u8>::from_bits(1), dangling);
/// ```
#[unstable(feature = "ptr_to_from_bits", issue = "91126")]
#[rustc_deprecated(
since = "1.62",
reason = "replaced by the `with_addr` method or the `ptr::invalid_mut` function"
)]
#[allow(fuzzy_provenance_casts)] // this is an unstable and semi-deprecated cast function
pub fn from_bits(bits: usize) -> Self
where
Expand Down