Skip to content

Incorrect label messages for missing unsafe blocks #35789

Closed
@petrochenkov

Description

@petrochenkov

Label message always mention "unsafe call", even when nothing is actually called.
It should duplicate the main message instead, or use some paraphrase of it.

fn main() {
    *(0 as *const u8);
}
error[E0133]: dereference of raw pointer requires unsafe function or block
 --> <anon>:2:5
  |
2 |     *(0 as *const u8);
  |     ^^^^^^^^^^^^^^^^^ unsafe call requires unsafe function or block

error: aborting due to previous error

cc #35565 @wdv4758h @jonathandturner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions