Skip to content

ICE compiling rustbook #20644

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

Closed
nikomatsakis opened this issue Jan 6, 2015 · 0 comments · Fixed by #20645
Closed

ICE compiling rustbook #20644

nikomatsakis opened this issue Jan 6, 2015 · 0 comments · Fixed by #20645
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nikomatsakis
Copy link
Contributor

@steveklabnik's changes to rust-book encountered an ICE. I reduced it to this:

// A reduced version of the rustbook ice. The problem this encountered
// had to do with trans ignoring binders.

#![feature(slicing_syntax)]
#![feature(associated_types)]
#![feature(macro_rules)]

use std::iter;
use std::os;
use std::io::File;

#[allow(unused)]
pub fn parse_summary<R: Reader>(_: R, _: &Path) {
     let path_from_root = Path::new("");
     Path::new(iter::repeat("../")
               .take(path_from_root.components().count() - 1)
               .collect::<String>());
 }

fn main() {
    let cwd = os::getcwd().unwrap();
    let src = cwd.clone();
    let summary = File::open(&src.join("SUMMARY.md"));
    let _ = parse_summary(summary, &src);
}
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Jan 6, 2015
…ed out to be that were being very loose with bound regions in trans (we were basically just ignoring and flattening binders). Since binders are significant to subtyping and hence to trait selection, this can cause a lot of problems. So this patch makes us treat them more strictly -- for example, we propagate binders, and avoid skipping past the `Binder` by writing `foo.0`.

Fixes rust-lang#20644.
@kmcallister kmcallister added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants