Skip to content

ICE: sequence_element_type called on non-sequence value: Box<str> #17734

Closed
@insideable

Description

@insideable

Code:

struct Foo {
    name: Box<str>
}

impl Foo {
    fn new(name: Box<str>) -> Foo {
        Foo { name: name }
    }
}

fn main() {}

Compilation fails with ICE:

error: internal compiler error: sequence_element_type called on non-sequence value: Box<str>
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /home/matrix/github/rust/src/libsyntax/diagnostic.rs:169
$ rustc -v
rustc 0.12.0-dev (9a2286d3a 2014-10-03 07:33:26 +0000)

Activity

insideable

insideable commented on Oct 3, 2014

@insideable
Author

Simplified example with same result:

fn f(s: Box<str>) -> Box<str> {
    s
}

fn main() {}
added
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
A-DSTsArea: Dynamically-sized types (DSTs)
on Oct 3, 2014
added a commit that references this issue on Oct 5, 2014

auto merge of #17762 : bkoropoff/rust/issue-17734, r=alexcrichton

ghost

ghost commented on Oct 11, 2014

@ghost

Fixed in #17762. Closing.

ghost closed this as completedon Oct 11, 2014
added a commit that references this issue on Aug 1, 2024

Auto merge of rust-lang#17747 - ShoyuVanilla:issue-17734, r=Veykril

9fb03f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)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

        Participants

        @insideable@huonw

        Issue actions

          ICE: sequence_element_type called on non-sequence value: Box<str> · Issue #17734 · rust-lang/rust