Skip to content

ICE when using placement new with non arena types #2854

Closed
@msullivan

Description

@msullivan

When code tries to use placement new with type that doesn't implement the proper arena methods, after printing out a reasonable diagnostic, rustc ICEs:

fn main() {
    new (7) 43;
}

produces

nubs/bogus_arena.rs:2:4: 2:15 error: no `alloc()` method found for type `<VI0>`
nubs/bogus_arena.rs:2     new (7) 43;
                          ^~~~~~~~~~~
error: internal compiler error: no type for node 4: unknown node (id=4) in fcx 7fed8813ecc0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions