Skip to content

nightly ICE (but not 1.19.0): unexpected panic at 'assertion failed: !infcx.is_in_snapshot()', /checkout/src/librustc/traits/fulfill.rs:178:8  #43923

Closed
@zhendongsu

Description

@zhendongsu
$ 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] }; 
} 
$ 

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions