Skip to content

ICE when returning a local unwrapped dvec inside an impl #2590

Closed
@erickt

Description

@erickt

This code should be rejected outright since I'm trying to move a dvec out of a record without consuming the record, but it's ICEing instead of a proper error message:

import dvec::dvec;

type parser = {
    tokens: dvec<int>,
};

impl parser for parser {
    fn parse() -> [mut int] {
        dvec::unwrap(self.tokens)
    }
}

Returns:

./mustache.rs:9:21: 9:25 error: internal compiler error: illegal reader (lnk_exit) for `vk_self`
./mustache.rs:9         dvec::unwrap(self.tokens)

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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions