You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking issue for the cast method of raw pointers #60602
impl<T: ?Sized>*mutT{/// Cast to a pointer to a different type#[inline]pubconstfncast<U>(self) -> *mutU{selfas_}}impl<T: ?Sized>*constT{/// Cast to a pointer to a different type#[inline]pubconstfncast<U>(self) -> *constU{selfas_}}
Like with NonNull::cast, the input pointed type does not need to be Sized but the output pointed type does, because we wouldn’t know what appropriate pointer metadata (slice length, trait object vtable, …) to insert. The actual requirement is that the pointer is thin, but Sized is the closest approximation we have (until we add something like T: ptr::Pointee<Metadata=()>).
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
Getting this issue when executing: cargo install cargo-generate
More detail:
Compiling backtrace v0.3.44
error[E0658]: use of unstable library feature 'ptr_cast'
--> C:\Users\jack_\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.44\src\backtrace\dbghelp.rs:110:74
|
110 | RtlLookupFunctionEntry(addr, &mut base, ptr::null_mut()).cast()
| ^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/60602
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: Could not compile `backtrace`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-generate v0.5.0`, intermediate artifacts can be found at `C:\Users\jack_\AppData\Local\Temp\cargo-installM3JL39`
Caused by:
build failed
Activity
SimonSapin commentedon Jul 3, 2019
Let’s?
@rfcbot fcp merge
rfcbot commentedon Jul 3, 2019
Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
rfcbot commentedon Jul 3, 2019
🔔 This is now entering its final comment period, as per the review above. 🔔
rfcbot commentedon Jul 13, 2019
The final comment period, with a disposition to merge, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
The RFC will be merged soon.
Stabilize <*mut _>::cast and <*const _>::cast
Rollup merge of rust-lang#62713 - SimonSapin:cast, r=Centril
jpryne commentedon Mar 3, 2020
Getting this issue when executing:
cargo install cargo-generateMore detail:
sfackler commentedon Mar 3, 2020
Your Rust installation is out of date.
Makefile: do not compile rust/download_web with old toolchain, again
Raise minimum tested toolchain to rust 1.38