Skip to content

Instantly share code, notes, and snippets.

@spott
Last active December 24, 2015 20:19
Show Gist options
  • Select an option

  • Save spott/6857468 to your computer and use it in GitHub Desktop.

Select an option

Save spott/6857468 to your computer and use it in GitHub Desktop.
Small example:
task <unnamed> failed at 'assertion failed: rp.is_none()', /private/tmp/rust-h4RT/rust-0.8/src/librustc/middle/typeck/collect.rs:1108
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', /private/tmp/rust-h4RT/rust-0.8/src/librustc/rustc.rs:391
mod parser {
// type Parser a = String -> [(a, String)]
type Parser<'self, T> = &'self fn(&str) -> ~[(T, &str)];
pub fn result<T>( p : T ) -> Parser<'self, T> {
return |s| ~[(p, s)]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment