Skip to content

LLVM assertion when creating region pointer for bare self value #5280

Closed
@jdm

Description

@jdm
type FontTableTag = u32;

trait FontTableTagConversions {
  fn tag_to_str(self);
}

impl FontTableTagConversions for FontTableTag {
  fn tag_to_str(self) {
    &self;
  }
}

fn main() {
    5.tag_to_str();
}

rustc: /run/media/jdm/ssd/rust/src/llvm/lib/VMCore/Instructions.cpp:2383: static llvm::CastInst* llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion S->getType()->isPointerTy() && "Invalid cast"' failed.`

Metadata

Metadata

Assignees

Labels

A-lifetimesArea: Lifetimes / regionsA-trait-systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions