-
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 lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This example:
struct Foo {
b: Bar
}
fn main() {
unsafe {
let x: *const u32 = 0 as *const u32;
let y: *const Foo = x as *const Foo;
}
}
fn make<T>() -> T { panic!() }
gives me this error (in addition to legit errors about Bar
):
error: cannot cast thin pointer `*const u32` to fat pointer `*const Foo`
--> <anon>:8:29
8 |> let y: *const Foo = x as *const Foo;
|>
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.