Skip to content

Commit d2576f2

Browse files
committed
Auto merge of rust-lang#114905 - matthiaskrgr:rollup-uxhhr7p, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang#113115 (we are migrating to askama) - rust-lang#114784 (Improve `invalid_reference_casting` lint) - rust-lang#114822 (Improve code readability by moving fmt args directly into the string) - rust-lang#114878 (rustc book: make more pleasant to search) - rust-lang#114899 (Add missing Clone/Debug impls to SMIR Trait related tys) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c12f964 + 519694a commit d2576f2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/src/ptr/const_ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ impl<T: ?Sized> *const T {
5555
/// Casts to a pointer of another type.
5656
#[stable(feature = "ptr_cast", since = "1.38.0")]
5757
#[rustc_const_stable(feature = "const_ptr_cast", since = "1.38.0")]
58+
#[rustc_diagnostic_item = "const_ptr_cast"]
5859
#[inline(always)]
5960
pub const fn cast<U>(self) -> *const U {
6061
self as _

core/src/ptr/mut_ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ impl<T: ?Sized> *mut T {
112112
/// [`cast_mut`]: #method.cast_mut
113113
#[stable(feature = "ptr_const_cast", since = "1.65.0")]
114114
#[rustc_const_stable(feature = "ptr_const_cast", since = "1.65.0")]
115+
#[rustc_diagnostic_item = "ptr_cast_const"]
115116
#[inline(always)]
116117
pub const fn cast_const(self) -> *const T {
117118
self as _

0 commit comments

Comments
 (0)