-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
trait Num {}
impl Num for i32 {}
fn main() {
&0i32 as *const Num as usize;
}
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).
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.