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: encode_symbol: id not found #3588

Closed
eholk opened this issue Sep 25, 2012 · 4 comments
Closed

ICE: encode_symbol: id not found #3588

eholk opened this issue Sep 25, 2012 · 4 comments
Labels
A-metadata Area: Crate metadata I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@eholk
Copy link
Contributor

eholk commented Sep 25, 2012

While trying to combine the ReaderUtil iface in io.rs with the traitless impl on ReaderUtil, I've been running into an ICE. I've reduced the test case down to the following:

trait Reader {
}

trait ReaderUtil {
    fn read_chars(n: uint) -> ~[char];
}

impl<T: Reader> T : ReaderUtil {
    fn read_chars(_n: uint) -> ~[char] {
        // returns the (consumed offset, n_req), appends characters to &chars
        fn chars_from_bytes() -> (uint, uint) {
            (0, 0)
        }
        ~[]
    }
}

It seems to be the nested chars_from_bytes that's causing problems...

@eholk
Copy link
Contributor Author

eholk commented Sep 25, 2012

Ah, as in #2766, adding <T: Reader> to the inner function makes it work. An ICE doesn't seem like the right error here though.

@nikomatsakis
Copy link
Contributor

Ah, as in #2766 #2766, adding
|<T: Reader>| to the inner function makes it work. An ICE doesn't seem
like the right error here though.

Indeed. :)

@nikomatsakis
Copy link
Contributor

Unlike #2766, this function doesn't use the type parameter T. Weird.

@graydon
Copy link
Contributor

graydon commented Mar 21, 2013

works on trunk

@graydon graydon closed this as completed Mar 21, 2013
RalfJung pushed a commit to RalfJung/rust that referenced this issue May 11, 2024
Allow test targets to be set via CLI args

Fixes rust-lang#3584

I'm not a pro shell script reader as I am a Windows user, but we shall see if the CI script broke.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metadata Area: Crate metadata I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants