-
Notifications
You must be signed in to change notification settings - Fork 13.3k
poor error message when casting from fat raw pointer to usize #27450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm sure it went in as a bug fix. cc @arielb1 |
This is indeed intentional: the spec at https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md has this relevant part: |
The old (1.1) cast code was a badly specified mess of if-s. It is rather badly behaved. |
Noted. Is this still a (minor) diagnostics issue, or I just don't
|
This may be a diagnostic issue. cc @steveklabnik |
playpen
This compiles on stable, but beta and nightly require an extra
as *const ()
in the middle to cast away the fat. The error message says to use a "raw pointer" which is misleading as*const Num
is already a raw pointer, it's just a fat one.Since this code compiles on stable, I'm not sure if it's also a regression or if I missed an RFC (to be fair, I miss a lot of RFCs).
The text was updated successfully, but these errors were encountered: