Skip to content

parser: unsafe block should expect { as well #37158

Closed
@liigo

Description

@liigo
fn main() {
    unsafe // {
        std::mem::transmute::<f32, u32>(1.0);
    // }
}
error: expected one of `extern` or `fn`, found `std`
 --> <anon>:3:9
  |
3 |         std::mem::transmute::<f32, u32>(1.0);
  |         ^^^

error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions