Skip to content

Suggestion: Don't lose trailing semicolons (and other context-relevant stuff) #1076

Closed
@killercup

Description

@killercup

Some suggestions for lines that end with ; do not currently end with a ;?

Just got this one in my rustfix demo:

Info: transmute from a pointer type (`*mut libc::c_void`) to a reference type (`&mut Box<for<'r, 'r> std::ops::FnMut(&'r menus::MenuItem, &'r windows::Window)>`)
      #[warn(transmute_ptr_to_ref)] on by default
  --> src/menus.rs:50:17-51:76
Suggestion - Replace:

    mem::transmute::<*mut c_void,
                     &mut Box<FnMut(&MenuItem, &Window)>>(data)(&menu_item, &window);

with:

    &mut *(data as *mut Box<for<'r, 'r> std::ops::FnMut(&'r menus::MenuItem, &'r windows::Window)>)

(note the missing semicolon in the suggestion).

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