Skip to content

ICE when missing module specifier #16709

Closed
@cgaebel

Description

@cgaebel

The following code causes rustc to ICE:

use std::ptr;
use std::raw;

fn main() {
  unsafe {
    let nil: *const u8 = ptr::null();
    let slice: raw::Slice<u8> =
      Slice {
        data: nil,
        len:  0,
      };
  }
}

whereas this will compile just fine:

use std::ptr;
use std::raw;

fn main() {
  unsafe {
    let nil: *const u8 = ptr::null();
    let slice: raw::Slice<u8> =
      raw::Slice {
        data: nil,
        len:  0,
      };
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions