Closed
Description
$ rustc-nightly --version
rustc 1.21.0-nightly (f25c2283b 2017-08-15)
$
$ rustc-1.19.0 small.rs
error[E0282]: type annotations needed
--> small.rs:9:11
|
9 | let a = foo;
| - ^^^ cannot infer type for `T`
| |
| consider giving `a` a type
error: aborting due to previous error(s)
$
$ rustc-nightly small.rs
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.21.0-nightly (f25c2283b 2017-08-15) running on i686-unknown-linux-gnu
thread 'rustc' panicked at 'assertion failed: !infcx.is_in_snapshot()', /checkout/src/librustc/traits/fulfill.rs:178:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.
$
$ cat small.rs
struct A < T : ?Sized > { ptr : T }
fn foo < T : B > (x : &A < [T] >) {}
trait B {}
pub fn main ()
{
let a = foo;
let b = A { ptr : [a, a, a] };
}
$