Closed
Description
Example: (Difference is 'a
paramter in the bar
signature)
trait Bar<'a> {}
trait Foo<'a> {
fn bar<'a, T: Bar<'a>>(self) -> &'a str;
}
impl<'a> Foo<'a> for &'a str {
fn bar<T: Bar<'a>>(self) -> &'a str { fail!() }
}
fn main() {
}
<anon>:1:1: 1:1 error: internal compiler error: Type parameter out of range when substituting in region 'a (root type=fn(Self) -> 'astr) (space=FnSpace, index=0)
<anon>:1 trait Bar<'a> {}
^
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>', /build/rust-git/src/rust/src/libsyntax/ast_util.rs:784
playpen: application terminated with error code 101