Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
insideable opened this issue Oct 3, 2014 · 2 comments
Closed

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

insideable opened this issue Oct 3, 2014 · 2 comments
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@insideable
Copy link

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)
@insideable
Copy link
Author

Simplified example with same result:

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

fn main() {}

@huonw huonw added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ A-DSTs Area: Dynamically-sized types (DSTs) labels Oct 3, 2014
bkoropoff added a commit to bkoropoff/rust that referenced this issue Oct 4, 2014
bkoropoff added a commit to bkoropoff/rust that referenced this issue Oct 5, 2014
@ghost
Copy link

ghost commented Oct 11, 2014

Fixed in #17762. Closing.

@ghost ghost closed this as completed Oct 11, 2014
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
fix: Errors on method call inferences with elided lifetimes

Fixes rust-lang#17734

Currently, we are matching non-lifetime(type or const) generic arg to liftime argument position while building substs for method calling when there are elided lifetimes.
This mismatch just make a subst for error lifetime and while this alone is not much a trouble, it also makes the mismatched type or const generic arg cannot be used in its proper place and this makes type inference failure
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DSTs Area: Dynamically-sized types (DSTs) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants