Skip to content
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

"internal compiler error" during cargo doc #55001

Closed
sapir opened this issue Oct 11, 2018 · 8 comments
Closed

"internal compiler error" during cargo doc #55001

sapir opened this issue Oct 11, 2018 · 8 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sapir
Copy link
Contributor

sapir commented Oct 11, 2018

I ran cargo doc --open for the ggez crate and got an internal compiler error.

Output looks like this:

$ cargo doc --open
 Documenting unicode-xid v0.1.0                                                                                         
    Checking unicode-xid v0.1.0                                                                                         
    Checking either v1.5.0                                                                                              
 Documenting either v1.5.0                                                                                              
 Documenting nodrop v0.1.12                                                                                             
    Checking unicode-xid v0.0.4                                                                                         
 Documenting quote v0.3.15                                                                                              
    Checking nodrop v0.1.12                                                                                             
 Documenting unicode-xid v0.0.4                                                                                         
    Checking quote v0.3.15                                                                                              
 Documenting bitflags v1.0.4                                                                                            
    Checking cfg-if v0.1.5                                                                                              
 Documenting cfg-if v0.1.5                                                                                              
    Checking libc v0.2.43                                                                                               
    Checking bitflags v1.0.4                                                                                            
 Documenting void v1.0.2                                                                                                
 Documenting libc v0.2.43                                                                                               
 Documenting rand_core v0.3.0                                                                                           
    Checking void v1.0.2                                                                                                
    Checking rand_core v0.3.0                                                                                           
    Checking adler32 v1.0.3                                                                                             
    Checking byteorder v1.2.6                                                                                           
 Documenting byteorder v1.2.6                                                                                           
 Documenting adler32 v1.0.3                                                                                             
 Documenting rawpointer v0.1.0                                                                                          
 Documenting lazy_static v0.2.11                                                                                        
    Checking bitflags v0.7.0                                                                                            
 Documenting lzw v0.10.0                                                                                                
 Documenting rustc-demangle v0.1.9                                                                                      
    Checking linked-hash-map v0.5.1                                                                                     
 Documenting bitflags v0.7.0                                                                                            
    Checking color_quant v1.0.1                                                                                         
    Checking rustc-demangle v0.1.9                                                                                      
 Documenting linked-hash-map v0.5.1                                                                                     
    Checking rawpointer v0.1.0                                                                                          
    Checking lzw v0.10.0                                                                                                
 Documenting color_quant v1.0.1                                                                                         
 Documenting fnv v1.0.6                                                                                                 
 Documenting approx v0.1.1                                                                                              
    Checking fnv v1.0.6                                                                                                 
    Checking approx v0.1.1                                                                                              
    Checking lazy_static v0.2.11                                                                                        
 Documenting unicode-normalization v0.1.7                                                                               
    Checking xdg v2.1.0                                                                                                 
 Documenting hound v3.4.0                                                                                               
 Documenting claxon v0.3.2                                                                                              
    Checking unicode-normalization v0.1.7                                                                               
 Documenting podio v0.1.6                                                                                               
 Documenting xdg v2.1.0                                                                                                 
    Checking hound v3.4.0                                                                                               
    Checking podio v0.1.6                                                                                               
    Checking xi-unicode v0.1.0                                                                                          
    Checking claxon v0.3.2                                                                                              
 Documenting xi-unicode v0.1.0                                                                                          
    Checking itertools v0.5.10                                                                                          
    Checking synom v0.11.3                                                                                              
 Documenting itertools v0.5.10                                                                                          
    Checking arrayvec v0.4.7                                                                                            
 Documenting arrayvec v0.4.7                                                                                            
    Checking syn v0.10.8                                                                                                
    Checking log v0.4.5                                                                                                 
 Documenting syn v0.10.8                                                                                                
 Documenting synom v0.11.3                                                                                              
    Checking draw_state v0.8.0                                                                                          
 Documenting draw_state v0.8.0                                                                                          
 Documenting log v0.4.5                                                                                                 
    Checking rand v0.4.3                                                                                                
    Checking time v0.1.40                                                                                               
    Checking unreachable v1.0.0                                                                                         
 Documenting unreachable v1.0.0                                                                                         
    Checking inflate v0.4.3                                                                                             
    Checking rand_core v0.2.2                                                                                           
    Checking stb_truetype v0.2.4                                                                                        
    Checking ogg v0.4.1                                                                                                 
    Checking deflate v0.7.19                                                                                            
    Checking jpeg-decoder v0.1.15                                                                                       
 Documenting rand_core v0.2.2                                                                                           
 Documenting ogg v0.4.1                                                                                                 
 Documenting stb_truetype v0.2.4                                                                                        
 Documenting jpeg-decoder v0.1.15                                                                                       
 Documenting inflate v0.4.3                                                                                             
 Documenting deflate v0.7.19                                                                                            
 Documenting rand v0.4.3                                                                                                
 Documenting time v0.1.40                                                                                                                                                                                                                                            
    Checking gif v0.10.1                                                                                                                                                                                                                                             
 Documenting gif v0.10.1                                                                                                                                                                                                                                             
    Checking app_dirs2 v2.0.3                                                                                                                                                                                                                                        
 Documenting app_dirs2 v2.0.3                                                                                                                                                                                                                                        
    Checking num-traits v0.2.6                                                                                                                                                                                                                                       
 Documenting num-traits v0.2.6                                                                                                                                                                                                                                       
    Checking proc-macro2 v0.4.20                                                                                                                                                                                                                                     
 Documenting proc-macro2 v0.4.20                                                                                                                                                                                                                                     
    Checking syn v0.11.11                                                                                                                                                                                                                                            
 Documenting syn v0.11.11                                                                                                                                                                                                                                            
 Documenting derivative v1.0.0                                                                                                                                                                                                                                       
    Checking typenum v1.10.0                                                                                                                                                                                                                                         
 Documenting typenum v1.10.0                                                                                                                                                                                                                                         
    Checking msdos_time v0.1.6                                                                                                                                                                                                                                       
    Checking rand v0.3.22                                                                                                                                                                                                                                            
    Checking matrixmultiply v0.1.14                                                                                                                                                                                                                                  
 Documenting matrixmultiply v0.1.14                                                                                                                                                                                                                                  
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached                                                                                                                                                                     
                                                                                                                                                                                                                                                                     
thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:599:9                                                                                                                                                                                              
note: Run with `RUST_BACKTRACE=1` for a backtrace.                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                     
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.30.0-nightly (4141a4079 2018-09-25) running on x86_64-unknown-linux-gnu                                                                                                                                                                                
                                                                                                                                                                                                                                                                     
    Checking rand v0.5.5                                                                                                                                                                                                                                             
error: Could not document `typenum`.                                                                                                                                                                                                                                 

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /home/sapir/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow --color always -o /mnt/hd/home/sapir/dev/ggez/target/doc -L dependency=/mnt/hd/home/sapir/dev/ggez/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed

I ran again and still got the error, output:

$ cargo doc --open
 Documenting typenum v1.10.0                                                                                                                                                                                                                                         
 Documenting rand v0.3.22                                                                                                                                                                                                                                            
 Documenting msdos_time v0.1.6                                                                                                                                                                                                                                       
 Documenting rand v0.5.5                                                                                                                                                                                                                                             
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached                                                                                                                                                                     
                                                                                                                                                                                                                                                                     
thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:599:9                                                                                                                                                                                              
note: Run with `RUST_BACKTRACE=1` for a backtrace.                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                     
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.30.0-nightly (4141a4079 2018-09-25) running on x86_64-unknown-linux-gnu                                                                                                                                                                                
                                                                                                                                                                                                                                                                     
error: Could not document `typenum`.                                                                                                                                                                                                                                 

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /home/sapir/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow --color always -o /mnt/hd/home/sapir/dev/ggez/target/doc -L dependency=/mnt/hd/home/sapir/dev/ggez/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed                                                                                                                                                                                                                                                  

Third time with backtrace:

$ RUST_BACKTRACE=1 cargo doc --open
 Documenting typenum v1.10.0                                                                                                                                                                                                                                         
 Documenting serde v1.0.79                                                                                                                                                                                                                                           
    Checking serde v1.0.79                                                                                                                                                                                                                                           
    Checking lewton v0.5.2                                                                                                                                                                                                                                           
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached                                                                                                                                                                     
                                                                                                                                                                                                                                                                     
thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:599:9                                                                                                                                                                                              
 Documenting lewton v0.5.2                                                                                                                                                                                                                                           
stack backtrace:                                                                                                                                                                                                                                                     
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace                                                                                                                                                                                                      
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                                                                                                                                                                                        
   1: std::sys_common::backtrace::print                                                                                                                                                                                                                              
             at libstd/sys_common/backtrace.rs:71                                                                                                                                                                                                                    
             at libstd/sys_common/backtrace.rs:59                                                                                                                                                                                                                    
   2: std::panicking::default_hook::{{closure}}                                                                                                                                                                                                                      
             at libstd/panicking.rs:211                                                                                                                                                                                                                              
   3: std::panicking::default_hook                                                                                                                                                                                                                                   
             at libstd/panicking.rs:227                                                                                                                                                                                                                              
   4: std::panicking::rust_panic_with_hook                                                                                                                                                                                                                           
             at libstd/panicking.rs:477                                                                                                                                                                                                                              
   5: std::panicking::begin_panic                                                                                                                                                                                                                                    
   6: rustc_errors::Handler::bug                                                                                                                                                                                                                                     
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}                                                                                                                                                                                                                
   8: rustc::ty::context::tls::with_opt::{{closure}}                                                                                                                                                                                                                 
   9: rustc::ty::context::tls::with_context_opt                                                                                                                                                                                                                      
  10: rustc::ty::context::tls::with_opt                                                                                                                                                                                                                              
  11: rustc::util::bug::opt_span_bug_fmt                                                                                                                                                                                                                             
  12: rustc::util::bug::bug_fmt                                                                                                                                                                                                                                      
  13: rustc::traits::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::traits::SelectionError<'a>>::lift_to_tcx                                                                                                                                      
  14: rustc::ty::context::TyCtxt::lift_to_global                                                                                                                                                                                                                     
  15: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  16: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  17: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  18: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  19: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  20: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  21: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  22: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  23: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  24: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  25: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  26: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  27: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  28: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  29: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  30: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  31: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  32: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  33: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  34: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  35: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  36: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  37: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  38: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  39: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  40: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  41: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  42: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  43: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  44: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  45: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  46: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  47: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  48: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  49: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  50: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  51: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  52: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  53: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  54: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  55: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  56: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  57: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  58: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  59: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  60: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  61: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  62: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  63: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  64: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  65: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  66: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  67: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  68: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  69: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  70: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  71: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  72: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  73: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  74: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  75: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  76: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  77: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  78: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  79: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  80: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  81: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  82: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  83: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  84: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  85: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  86: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  87: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  88: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  89: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  90: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  91: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  92: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                            
  93: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  94: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  95: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  96: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  97: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  98: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  99: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
                                                                                                                                                                                                                                                                     
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.30.0-nightly (4141a4079 2018-09-25) running on x86_64-unknown-linux-gnu                                                                                                                                                                                
                                                                                                                                                                                                                                                                     
error: Could not document `typenum`.                                                                                                                                                                                                                                 

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /home/sapir/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow --color always -o /mnt/hd/home/sapir/dev/ggez/target/doc -L dependency=/mnt/hd/home/sapir/dev/ggez/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed                                                                                                                                                                                                                                                  

Meta

rustc --version --verbose:
rustc 1.30.0-nightly (4141a40 2018-09-25)

Backtrace: included in 3rd output above

Thanks!

@sapir
Copy link
Contributor Author

sapir commented Oct 11, 2018

Tried again after rustup update, got a different crash:

$ RUST_BACKTRACE=1 cargo doc --open
   Compiling num-traits v0.2.6                                                                                                                                                                                                                                       
   Compiling khronos_api v2.2.0                                                                                                                                                                                                                                      
   Compiling cfg-if v0.1.5                                                                                                                                                                                                                                           
   Compiling bitflags v1.0.4                                                                                                                                                                                                                                         
   Compiling num-integer v0.1.39                                                                                                                                                                                                                                     
   Compiling proc-macro2 v0.4.20                                                                                                                                                                                                                                     
 Documenting quote v0.3.15                                                                                                                                                                                                                                           
   Compiling unicode-xid v0.1.0                                                                                                                                                                                                                                      
   Compiling quote v0.3.15                                                                                                                                                                                                                                           
   Compiling num-iter v0.1.37                                                                                                                                                                                                                                        
    Checking either v1.5.0                                                                                                                                                                                                                                           
 Documenting either v1.5.0                                                                                                                                                                                                                                           
   Compiling unicode-xid v0.0.4                                                                                                                                                                                                                                      
    Checking nodrop v0.1.12                                                                                                                                                                                                                                          
   Compiling pkg-config v0.3.14                                                                                                                                                                                                                                      
   Compiling cc v1.0.25                                                                                                                                                                                                                                              
 Documenting unicode-xid v0.0.4                                                                                                                                                                                                                                      
 Documenting nodrop v0.1.12                                                                                                                                                                                                                                          
   Compiling version_check v0.1.5                                                                                                                                                                                                                                    
 Documenting unicode-xid v0.1.0                                                                                                                                                                                                                                      
 Documenting rand_core v0.3.0                                                                                                                                                                                                                                        
 Documenting bitflags v1.0.4                                                                                                                                                                                                                                         
    Checking void v1.0.2                                                                                                                                                                                                                                             
   Compiling typenum v1.10.0                                                                                                                                                                                                                                         
    Checking rand_core v0.3.0                                                                                                                                                                                                                                        
 Documenting libc v0.2.43                                                                                                                                                                                                                                            
 Documenting void v1.0.2                                                                                                                                                                                                                                             
 Documenting cfg-if v0.1.5                                                                                                                                                                                                                                           
    Checking libc v0.2.43                                                                                                                                                                                                                                            
    Checking byteorder v1.2.6                                                                                                                                                                                                                                        
 Documenting byteorder v1.2.6                                                                                                                                                                                                                                        
   Compiling num-derive v0.2.3                                                                                                                                                                                                                                       
 Documenting adler32 v1.0.3                                                                                                                                                                                                                                          
   Compiling serde v1.0.79                                                                                                                                                                                                                                           
    Checking adler32 v1.0.3                                                                                                                                                                                                                                          
   Compiling matrixmultiply v0.1.14                                                                                                                                                                                                                                  
    Checking lzw v0.10.0                                                                                                                                                                                                                                             
    Checking fnv v1.0.6                                                                                                                                                                                                                                              
    Checking rustc-demangle v0.1.9                                                                                                                                                                                                                                   
    Checking linked-hash-map v0.5.1                                                                                                                                                                                                                                  
 Documenting rawpointer v0.1.0                                                                                                                                                                                                                                       
    Checking lazy_static v0.2.11                                                                                                                                                                                                                                     
 Documenting color_quant v1.0.1                                                                                                                                                                                                                                      
 Documenting linked-hash-map v0.5.1                                                                                                                                                                                                                                  
 Documenting fnv v1.0.6                                                                                                                                                                                                                                              
    Checking color_quant v1.0.1                                                                                                                                                                                                                                      
 Documenting lzw v0.10.0                                                                                                                                                                                                                                             
 Documenting lazy_static v0.2.11                                                                                                                                                                                                                                     
 Documenting bitflags v0.7.0                                                                                                                                                                                                                                         
    Checking approx v0.1.1                                                                                                                                                                                                                                           
    Checking rawpointer v0.1.0                                                                                                                                                                                                                                       
    Checking bitflags v0.7.0                                                                                                                                                                                                                                         
 Documenting rustc-demangle v0.1.9                                                                                                                                                                                                                                   
 Documenting approx v0.1.1                                                                                                                                                                                                                                           
    Checking hound v3.4.0                                                                                                                                                                                                                                            
    Checking unicode-normalization v0.1.7                                                                                                                                                                                                                            
 Documenting hound v3.4.0                                                                                                                                                                                                                                            
    Checking xdg v2.1.0                                                                                                                                                                                                                                              
 Documenting xi-unicode v0.1.0                                                                                                                                                                                                                                       
 Documenting podio v0.1.6                                                                                                                                                                                                                                            
    Checking podio v0.1.6                                                                                                                                                                                                                                            
 Documenting xdg v2.1.0                                                                                                                                                                                                                                              
    Checking claxon v0.3.2                                                                                                                                                                                                                                           
    Checking xi-unicode v0.1.0                                                                                                                                                                                                                                       
 Documenting claxon v0.3.2                                                                                                                                                                                                                                           
 Documenting unicode-normalization v0.1.7                                                                                                                                                                                                                            
   Compiling log v0.4.5                                                                                                                                                                                                                                              
   Compiling sdl2-sys v0.31.0                                                                                                                                                                                                                                        
   Compiling xml-rs v0.7.0                                                                                                                                                                                                                                           
    Checking itertools v0.5.10                                                                                                                                                                                                                                       
    Checking arrayvec v0.4.7                                                                                                                                                                                                                                         
   Compiling syn v0.10.8                                                                                                                                                                                                                                             
   Compiling synom v0.11.3                                                                                                                                                                                                                                           
 Documenting itertools v0.5.10                                                                                                                                                                                                                                       
 Documenting syn v0.10.8                                                                                                                                                                                                                                             
 Documenting synom v0.11.3                                                                                                                                                                                                                                           
 Documenting arrayvec v0.4.7                                                                                                                                                                                                                                         
   Compiling alsa-sys v0.1.2                                                                                                                                                                                                                                         
   Compiling lazy_static v1.1.0                                                                                                                                                                                                                                      
   Compiling bzip2-sys v0.1.6                                                                                                                                                                                                                                        
   Compiling backtrace-sys v0.1.24                                                                                                                                                                                                                                   
    Checking draw_state v0.8.0                                                                                                                                                                                                                                       
    Checking unreachable v1.0.0                                                                                                                                                                                                                                      
 Documenting draw_state v0.8.0                                                                                                                                                                                                                                       
    Checking rand_core v0.2.2                                                                                                                                                                                                                                        
 Documenting rand_core v0.2.2                                                                                                                                                                                                                                        
 Documenting unreachable v1.0.0                                                                                                                                                                                                                                      
 Documenting log v0.4.5                                                                                                                                                                                                                                              
    Checking rand v0.4.3                                                                                                                                                                                                                                             
    Checking time v0.1.40                                                                                                                                                                                                                                            
    Checking stb_truetype v0.2.4                                                                                                                                                                                                                                     
    Checking ogg v0.4.1                                                                                                                                                                                                                                              
    Checking jpeg-decoder v0.1.15                                                                                                                                                                                                                                    
 Documenting ogg v0.4.1                                                                                                                                                                                                                                              
 Documenting stb_truetype v0.2.4                                                                                                                                                                                                                                     
 Documenting jpeg-decoder v0.1.15                                                                                                                                                                                                                                    
    Checking inflate v0.4.3                                                                                                                                                                                                                                          
    Checking deflate v0.7.19                                                                                                                                                                                                                                         
 Documenting inflate v0.4.3                                                                                                                                                                                                                                          
 Documenting deflate v0.7.19                                                                                                                                                                                                                                         
 Documenting rand v0.4.3                                                                                                                                                                                                                                             
 Documenting time v0.1.40                                                                                                                                                                                                                                            
    Checking gif v0.10.1                                                                                                                                                                                                                                             
 Documenting gif v0.10.1                                                                                                                                                                                                                                             
    Checking app_dirs2 v2.0.3                                                                                                                                                                                                                                        
 Documenting app_dirs2 v2.0.3                                                                                                                                                                                                                                        
 Documenting num-traits v0.2.6                                                                                                                                                                                                                                       
 Documenting proc-macro2 v0.4.20                                                                                                                                                                                                                                     
    Checking syn v0.11.11                                                                                                                                                                                                                                            
 Documenting syn v0.11.11                                                                                                                                                                                                                                            
   Compiling derivative v1.0.0                                                                                                                                                                                                                                       
 Documenting derivative v1.0.0                                                                                                                                                                                                                                       
 Documenting typenum v1.10.0                                                                                                                                                                                                                                         
    Checking rand v0.5.5                                                                                                                                                                                                                                             
 Documenting rand v0.5.5                                                                                                                                                                                                                                             
    Checking msdos_time v0.1.6                                                                                                                                                                                                                                       
    Checking rand v0.3.22                                                                                                                                                                                                                                            
    Checking lewton v0.5.2                                                                                                                                                                                                                                           
 Documenting lewton v0.5.2                                                                                                                                                                                                                                           
 Documenting serde v1.0.79                                                                                                                                                                                                                                           
 Documenting matrixmultiply v0.1.14                                                                                                                                                                                                                                  
 Documenting rand v0.3.22                                                                                                                                                                                                                                            
 Documenting msdos_time v0.1.6                                                                                                                                                                                                                                       
 Documenting sdl2-sys v0.31.0                                                                                                                                                                                                                                        
   Compiling gl_generator v0.9.0                                                                                                                                                                                                                                     
    Checking num-traits v0.1.43                                                                                                                                                                                                                                      
    Checking num-complex v0.1.43                                                                                                                                                                                                                                     
 Documenting num-traits v0.1.43                                                                                                                                                                                                                                      
 Documenting num-integer v0.1.39                                                                                                                                                                                                                                     
 Documenting num-complex v0.1.43                                                                                                                                                                                                                                     
    Checking quote v0.6.8                                                                                                                                                                                                                                            
 Documenting smart-default v0.2.0                                                                                                                                                                                                                                    
 Documenting quote v0.6.8                                                                                                                                                                                                                                            
 Documenting alsa-sys v0.1.2                                                                                                                                                                                                                                         
 Documenting lazy_static v1.1.0                                                                                                                                                                                                                                      
   Compiling smart-default v0.2.0                                                                                                                                                                                                                                    
 Documenting bzip2-sys v0.1.6                                                                                                                                                                                                                                        
 Documenting gfx_core v0.8.3                                                                                                                                                                                                                                         
    Checking gfx_core v0.8.3                                                                                                                                                                                                                                         
 Documenting backtrace-sys v0.1.24                                                                                                                                                                                                                                   
    Checking generic-array v0.8.3                                                                                                                                                                                                                                    
 Documenting generic-array v0.8.3                                                                                                                                                                                                                                    
    Checking twox-hash v1.1.1                                                                                                                                                                                                                                        
 Documenting twox-hash v1.1.1                                                                                                                                                                                                                                        
    Checking euclid v0.17.3                                                                                                                                                                                                                                          
    Checking ordered-float v0.5.2                                                                                                                                                                                                                                    
    Checking sid v0.5.2                                                                                                                                                                                                                                              
    Checking cgmath v0.14.1                                                                                                                                                                                                                                          
    Checking num-rational v0.1.42                                                                                                                                                                                                                                    
    Checking alga v0.5.4                                                                                                                                                                                                                                             
   Compiling gfx_gl v0.5.0                                                                                                                                                                                                                                           
 Documenting euclid v0.17.3                                                                                                                                                                                                                                          
 Documenting sid v0.5.2                                                                                                                                                                                                                                              
 Documenting ordered-float v0.5.2                                                                                                                                                                                                                                    
 Documenting cgmath v0.14.1                                                                                                                                                                                                                                          
 Documenting num-iter v0.1.37                                                                                                                                                                                                                                        
 Documenting num-rational v0.1.42                                                                                                                                                                                                                                    
 Documenting toml v0.4.8                                                                                                                                                                                                                                             
    Checking toml v0.4.8                                                                                                                                                                                                                                             
    Checking syn v0.15.9                                                                                                                                                                                                                                             
 Documenting alga v0.5.4                                                                                                                                                                                                                                             
    Checking cpal v0.8.2                                                                                                                                                                                                                                             
 Documenting syn v0.15.9                                                                                                                                                                                                                                             
 Documenting cpal v0.8.2                                                                                                                                                                                                                                             
    Checking bzip2 v0.3.3                                                                                                                                                                                                                                            
 Documenting bzip2 v0.3.3                                                                                                                                                                                                                                            
    Checking backtrace v0.3.9                                                                                                                                                                                                                                        
 Documenting backtrace v0.3.9                                                                                                                                                                                                                                        
    Checking lyon_geom v0.10.1                                                                                                                                                                                                                                       
    Checking rusttype v0.5.2                                                                                                                                                                                                                                         
    Checking num v0.1.42                                                                                                                                                                                                                                             
    Checking png v0.12.0                                                                                                                                                                                                                                             
    Checking nalgebra v0.14.4                                                                                                                                                                                                                                        
 Documenting lyon_geom v0.10.1                                                                                                                                                                                                                                       
 Documenting rusttype v0.5.2                                                                                                                                                                                                                                         
 Documenting num v0.1.42                                                                                                                                                                                                                                             
 Documenting png v0.12.0                                                                                                                                                                                                                                             
    Checking rodio v0.7.0                                                                                                                                                                                                                                            
 Documenting nalgebra v0.14.4                                                                                                                                                                                                                                        
    Checking gfx v0.17.1                                                                                                                                                                                                                                             
 Documenting gfx v0.17.1                                                                                                                                                                                                                                             
 Documenting rodio v0.7.0                                                                                                                                                                                                                                            
   Compiling serde_derive v1.0.79                                                                                                                                                                                                                                    
    Checking zip v0.3.3                                                                                                                                                                                                                                              
    Checking lyon_path v0.10.1                                                                                                                                                                                                                                       
 Documenting zip v0.3.3                                                                                                                                                                                                                                              
    Checking sdl2 v0.31.0                                                                                                                                                                                                                                            
 Documenting num-derive v0.2.3                                                                                                                                                                                                                                       
 Documenting serde_derive v1.0.79                                                                                                                                                                                                                                    
 Documenting lyon_path v0.10.1                                                                                                                                                                                                                                       
 Documenting sdl2 v0.31.0                                                                                                                                                                                                                                            
 Documenting gfx_gl v0.5.0                                                                                                                                                                                                                                           
    Checking gfx_glyph v0.10.2                                                                                                                                                                                                                                       
 Documenting gfx_glyph v0.10.2                                                                                                                                                                                                                                       
    Checking image v0.19.0                                                                                                                                                                                                                                           
    Checking lyon_tessellation v0.10.2                                                                                                                                                                                                                               
error: internal compiler error: librustc/traits/select.rs:2775: Where clause `Binder(<_ as core::dimension::DimName>)` was applicable to `Obligation(predicate=Binder(TraitPredicate(<core::dimension::U1 as core::dimension::DimName>)),depth=3)` but now is not    
                                                                                                                                                                                                                                                                     
thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:599:9                                                                                                                                                                                              
stack backtrace:                                                                                                                                                                                                                                                     
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace                                                                                                                                                                                                      
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                                                                                                                                                                                        
   1: std::sys_common::backtrace::print                                                                                                                                                                                                                              
             at libstd/sys_common/backtrace.rs:71                                                                                                                                                                                                                    
             at libstd/sys_common/backtrace.rs:59                                                                                                                                                                                                                    
   2: std::panicking::default_hook::{{closure}}                                                                                                                                                                                                                      
             at libstd/panicking.rs:211                                                                                                                                                                                                                              
   3: std::panicking::default_hook                                                                                                                                                                                                                                   
             at libstd/panicking.rs:227                                                                                                                                                                                                                              
   4: std::panicking::rust_panic_with_hook                                                                                                                                                                                                                           
             at libstd/panicking.rs:476                                                                                                                                                                                                                              
   5: std::panicking::begin_panic                                                                                                                                                                                                                                    
   6: rustc_errors::Handler::bug                                                                                                                                                                                                                                     
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}                                                                                                                                                                                                                
   8: rustc::ty::context::tls::with_opt::{{closure}}                                                                                                                                                                                                                 
   9: rustc::ty::context::tls::with_context_opt                                                                                                                                                                                                                      
  10: rustc::ty::context::tls::with_opt                                                                                                                                                                                                                              
  11: rustc::util::bug::opt_span_bug_fmt                                                                                                                                                                                                                             
  12: rustc::util::bug::bug_fmt                                                                                                                                                                                                                                      
  13: rustc::traits::select::SelectionContext::confirm_candidate                                                                                                                                                                                                     
  14: rustc::traits::select::SelectionContext::select                                                                                                                                                                                                                
  15: rustc::infer::InferCtxt::commit_if_ok                                                                                                                                                                                                                          
  16: rustc::traits::project::opt_normalize_projection_type                                                                                                                                                                                                          
  17: rustc::traits::project::normalize_projection_type                                                                                                                                                                                                              
  18: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty                                                                                                                                     
  19: <smallvec::SmallVec<A> as core::iter::traits::FromIterator<<A as smallvec::Array>::Item>>::from_iter                                                                                                                                                           
  20: rustc::ty::fold::TypeFoldable::fold_with                                                                                                                                                                                                                       
  21: rustc::ty::fold::TypeFoldable::fold_with                                                                                                                                                                                                                       
  22: rustc::traits::project::normalize_with_depth                                                                                                                                                                                                                   
  23: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once                                                                                                                                                                        
  24: <core::iter::FlatMap<I, U, F> as core::iter::iterator::Iterator>::next                                                                                                                                                                                         
  25: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  26: rustc::traits::select::SelectionContext::impl_or_trait_obligations                                                                                                                                                                                             
  27: rustc::traits::select::SelectionContext::vtable_impl                                                                                                                                                                                                           
  28: rustc::infer::InferCtxt::in_snapshot                                                                                                                                                                                                                           
  29: rustc::traits::select::SelectionContext::confirm_candidate                                                                                                                                                                                                     
  30: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  31: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  32: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  33: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  34: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  35: <&mut I as core::iter::iterator::Iterator>::next                                                                                                                                                                                                               
  36: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
  37: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                                                                                                    
  38: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  39: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                                                                                             
  40: rustc::traits::select::SelectionContext::select                                                                                                                                                                                                                
  41: rustc::infer::InferCtxt::commit_if_ok                                                                                                                                                                                                                          
  42: rustc::traits::project::opt_normalize_projection_type                                                                                                                                                                                                          
  43: rustc::traits::project::project_and_unify_type                                                                                                                                                                                                                 
  44: rustc::infer::InferCtxt::commit_if_ok                                                                                                                                                                                                                          
  45: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  46: rustc::infer::InferCtxt::probe                                                                                                                                                                                                                                 
  47: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                                                                                                        
  48: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                                                                                              
  49: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                                                                                                        
  50: rustc::traits::select::SelectionContext::evaluate_obligation_recursively                                                                                                                                                                                       
  51: rustc::ty::context::tls::with_related_context                                                                                                                                                                                                                  
  52: rustc::infer::InferCtxtBuilder::enter                                                                                                                                                                                                                          
  53: rustc_traits::evaluate_obligation::evaluate_obligation                                                                                                                                                                                                         
  54: rustc::ty::query::__query_compute::evaluate_obligation                                                                                                                                                                                                         
  55: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::evaluate_obligation<'tcx>>::compute                                                                                                                      
  56: rustc::dep_graph::graph::DepGraph::with_task_impl                                                                                                                                                                                                              
  57: rustc::ty::context::tls::with_related_context                                                                                                                                                                                                                  
  58: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job                                                                                                                                                            
  59: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query                                                                                                                                                                       
  60: rustc::traits::query::evaluate_obligation::<impl rustc::infer::InferCtxt<'cx, 'gcx, 'tcx>>::evaluate_obligation                                                                                                                                                
  61: rustc::ty::context::tls::with_context::{{closure}}                                                                                                                                                                                                             
             at librustdoc/clean/blanket_impl.rs:110                                                                                                                                                                                                                 
             at librustc/infer/mod.rs:508                                                                                                                                                                                                                            
             at librustc/ty/context.rs:1676                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2022                                                                                                                                                                                                                          
             at librustc/ty/context.rs:1961                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2021                                                                                                                                                                                                                          
             at librustc/ty/context.rs:1675                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2122                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2106                                                                                                                                                                                                                          
  62: rustc::ty::context::GlobalCtxt::enter_local                                                                                                                                                                                                                    
             at librustc/ty/context.rs:2097                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2106                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2117                                                                                                                                                                                                                          
             at librustc/ty/context.rs:1668                                                                                                                                                                                                                          
  63: rustdoc::clean::blanket_impl::BlanketImplFinder::get_blanket_impls::{{closure}}                                                                                                                                                                                
             at librustc/infer/mod.rs:507                                                                                                                                                                                                                            
             at librustdoc/clean/blanket_impl.rs:80                                                                                                                                                                                                                  
  64: rustc::ty::trait_def::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::for_each_relevant_impl                                                                                                                                                                
             at librustc/ty/trait_def.rs:106                                                                                                                                                                                                                         
  65: rustdoc::clean::blanket_impl::BlanketImplFinder::get_blanket_impls                                                                                                                                                                                             
             at librustdoc/clean/blanket_impl.rs:79                                                                                                                                                                                                                  
  66: rustdoc::clean::def_ctor::get_def_from_node_id                                                                                                                                                                                                                 
             at librustdoc/clean/blanket_impl.rs:42                                                                                                                                                                                                                  
             at librustdoc/clean/def_ctor.rs:59                                                                                                                                                                                                                      
  67: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item                                                                                                                                 
             at librustdoc/clean/blanket_impl.rs:40                                                                                                                                                                                                                  
             at librustdoc/clean/mod.rs:3368                                                                                                                                                                                                                         
             at librustdoc/passes/collect_trait_impls.rs:171                                                                                                                                                                                                         
  68: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
             at librustdoc/fold.rs:110                                                                                                                                                                                                                               
             at libcore/iter/mod.rs:1640                                                                                                                                                                                                                             
             at liballoc/vec.rs:1902                                                                                                                                                                                                                                 
             at liballoc/vec.rs:1799                                                                                                                                                                                                                                 
             at liballoc/vec.rs:1794                                                                                                                                                                                                                                 
  69: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                                                                     
             at liballoc/vec.rs:1694                                                                                                                                                                                                                                 
             at libcore/iter/iterator.rs:1415                                                                                                                                                                                                                        
             at librustdoc/fold.rs:110                                                                                                                                                                                                                               
             at librustdoc/fold.rs:37                                                                                                                                                                                                                                
  70: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item                                                                                                                                 
             at librustdoc/fold.rs:100                                                                                                                                                                                                                               
             at librustdoc/passes/collect_trait_impls.rs:178                                                                                                                                                                                                         
  71: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                                                                                
             at librustdoc/fold.rs:110                                                                                                                                                                                                                               
             at libcore/iter/mod.rs:1640                                                                                                                                                                                                                             
             at liballoc/vec.rs:1902                                                                                                                                                                                                                                 
             at liballoc/vec.rs:1799                                                                                                                                                                                                                                 
             at liballoc/vec.rs:1794                                                                                                                                                                                                                                 
  72: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                                                                     
             at liballoc/vec.rs:1694                                                                                                                                                                                                                                 
             at libcore/iter/iterator.rs:1415                                                                                                                                                                                                                        
             at librustdoc/fold.rs:110                                                                                                                                                                                                                               
             at librustdoc/fold.rs:37                                                                                                                                                                                                                                
  73: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item                                                                                                                                 
             at librustdoc/fold.rs:100                                                                                                                                                                                                                               
             at librustdoc/passes/collect_trait_impls.rs:178                                                                                                                                                                                                         
  74: rustdoc::passes::collect_trait_impls::collect_trait_impls                                                                                                                                                                                                      
             at librustdoc/fold.rs:115                                                                                                                                                                                                                               
             at libcore/option.rs:632                                                                                                                                                                                                                                
             at librustdoc/fold.rs:115                                                                                                                                                                                                                               
             at librustdoc/passes/collect_trait_impls.rs:26                                                                                                                                                                                                          
  75: rustdoc::core::run_core::{{closure}}::{{closure}}                                                                                                                                                                                                              
             at librustdoc/core.rs:611                                                                                                                                                                                                                               
  76: rustc::ty::context::tls::enter_context                                                                                                                                                                                                                         
             at librustc_driver/driver.rs:1351                                                                                                                                                                                                                       
             at librustc/ty/context.rs:2054                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2022                                                                                                                                                                                                                          
             at librustc/ty/context.rs:1961                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2021                                                                                                                                                                                                                          
  77: <std::thread::local::LocalKey<T>>::with                                                                                                                                                                                                                        
             at librustc/ty/context.rs:2053                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2011                                                                                                                                                                                                                          
             at libstd/thread/local.rs:294                                                                                                                                                                                                                           
             at libstd/thread/local.rs:248                                                                                                                                                                                                                           
             at librustc/ty/context.rs:2003                                                                                                                                                                                                                          
             at libstd/thread/local.rs:294                                                                                                                                                                                                                           
             at libstd/thread/local.rs:248                                                                                                                                                                                                                           
  78: rustc::ty::context::TyCtxt::create_and_enter                                                                                                                                                                                                                   
             at librustc/ty/context.rs:1995                                                                                                                                                                                                                          
             at librustc/ty/context.rs:2033                                                                                                                                                                                                                          
             at librustc/ty/context.rs:1249                                                                                                                                                                                                                          
  79: rustc_driver::driver::spawn_thread_pool                                                                                                                                                                                                                        
             at librustc_driver/driver.rs:1259                                                                                                                                                                                                                       
             at librustdoc/core.rs:493                                                                                                                                                                                                                               
             at librustc_driver/driver.rs:76                                                                                                                                                                                                                         
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                                                                      
             at librustc_driver/driver.rs:75                                                                                                                                                                                                                         
  80: rustdoc::core::run_core                                                                                                                                                                                                                                        
             at librustdoc/core.rs:403                                                                                                                                                                                                                               
  81: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                                                                                
             at librustdoc/lib.rs:720                                                                                                                                                                                                                                
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                                                                      
             at libsyntax/lib.rs:106                                                                                                                                                                                                                                 
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                                                                      
  82: syntax::with_globals                                                                                                                                                                                                                                           
             at libsyntax/lib.rs:105                                                                                                                                                                                                                                 
  83: std::panicking::try::do_call                                                                                                                                                                                                                                   
             at librustdoc/lib.rs:716                                                                                                                                                                                                                                
             at librustc_driver/lib.rs:1661                                                                                                                                                                                                                          
             at libstd/panic.rs:313                                                                                                                                                                                                                                  
             at libstd/panicking.rs:310                                                                                                                                                                                                                              
  84: __rust_maybe_catch_panic                                                                                                                                                                                                                                       
             at libpanic_unwind/lib.rs:102                                                                                                                                                                                                                           
  85: rustc_driver::monitor                                                                                                                                                                                                                                          
             at libstd/panicking.rs:289                                                                                                                                                                                                                              
             at libstd/panic.rs:392                                                                                                                                                                                                                                  
             at librustc_driver/lib.rs:1575                                                                                                                                                                                                                          
             at librustc_driver/lib.rs:1586                                                                                                                                                                                                                          
             at librustc_driver/lib.rs:1660                                                                                                                                                                                                                          
  86: rustdoc::rust_input                                                                                                                                                                                                                                            
             at librustdoc/lib.rs:716                                                                                                                                                                                                                                
  87: rustdoc::main_args                                                                                                                                                                                                                                             
             at librustdoc/lib.rs:613                                                                                                                                                                                                                                
             at librustdoc/lib.rs:568                                                                                                                                                                                                                                
  88: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                                                                                
             at librustdoc/lib.rs:115                                                                                                                                                                                                                                
             at libcore/option.rs:424                                                                                                                                                                                                                                
             at librustdoc/lib.rs:115                                                                                                                                                                                                                                
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                                                                      
             at libsyntax/lib.rs:106                                                                                                                                                                                                                                 
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                                                                      
  89: syntax::with_globals                                                                                                                                                                                                                                           
             at libsyntax/lib.rs:105                                                                                                                                                                                                                                 
  90: std::panicking::try::do_call                                                                                                                                                                                                                                   
             at libstd/thread/mod.rs:409                                                                                                                                                                                                                             
             at libstd/panic.rs:313                                                                                                                                                                                                                                  
             at libstd/panicking.rs:310                                                                                                                                                                                                                              
  91: __rust_maybe_catch_panic                                                                                                                                                                                                                                       
             at libpanic_unwind/lib.rs:102                                                                                                                                                                                                                           
  92: <F as alloc::boxed::FnBox<A>>::call_box                                                                                                                                                                                                                        
             at libstd/panicking.rs:289                                                                                                                                                                                                                              
             at libstd/panic.rs:392                                                                                                                                                                                                                                  
             at libstd/thread/mod.rs:408                                                                                                                                                                                                                             
             at liballoc/boxed.rs:672                                                                                                                                                                                                                                
  93: std::sys_common::thread::start_thread                                                                                                                                                                                                                          
             at liballoc/boxed.rs:682                                                                                                                                                                                                                                
             at libstd/sys_common/thread.rs:24                                                                                                                                                                                                                       
  94: std::sys::unix::thread::Thread::new::thread_start                                                                                                                                                                                                              
             at libstd/sys/unix/thread.rs:90                                                                                                                                                                                                                         
  95: start_thread                                                                                                                                                                                                                                                   
  96: __clone                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                     
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.31.0-nightly (5af0bb830 2018-10-10) running on x86_64-unknown-linux-gnu                                                                                                                                                                                
                                                                                                                                                                                                                                                                     
error: Could not document `nalgebra`.                                                                                                                                                                                                                                

Caused by:
  process didn't exit successfully: `rustdoc --crate-name nalgebra /home/sapir/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.14.4/src/lib.rs --cap-lints allow --color always -o /mnt/hd/home/sapir/dev/ggez/target/doc -L dependency=/mnt/hd/home/sapir/dev/ggez/target/debug/deps --extern alga=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libalga-8b01466885b6d8e2.rmeta --extern approx=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libapprox-9e18ba161cbcb5f0.rmeta --extern generic_array=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libgeneric_array-af07a994218575b5.rmeta --extern matrixmultiply=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libmatrixmultiply-2c355cd205e5e9ba.rmeta --extern num_complex=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libnum_complex-40f2d5c667f3859a.rmeta --extern num_traits=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libnum_traits-3f91d2f9aeeeb68a.rmeta --extern rand=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/librand-5ca946a4ab821b7e.rmeta --extern typenum=/mnt/hd/home/sapir/dev/ggez/target/debug/deps/libtypenum-1e6545622842d248.rmeta` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed                                                                                                                                                                                                                                                  

@zackmdavis zackmdavis added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Oct 12, 2018
@estebank estebank added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Oct 12, 2018
@Havvy Havvy added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools labels Oct 13, 2018
@atouminet
Copy link

I just got the same bug while trying to document my project. It seems to also affect the beta channel for me. Working as expected on stable.

@memoryruins
Copy link
Contributor

memoryruins commented Oct 15, 2018

@Armand-Touminet is your project using nalgebra?
cc #54744

@atouminet
Copy link

atouminet commented Oct 15, 2018

@memoryruins yes. The error message I get is very similar from sapirs's first post.
The ICE happens when documenting librustc/traits/structural_impls.rs:178.

@Aaron1011
Copy link
Member

I'd like to work on this.

@Aaron1011
Copy link
Member

I've minimized the issue to this code snippet:

pub struct DefaultAllocator;
pub struct Standard;
pub trait Rand {}

pub trait Distribution<T> {}
pub trait Allocator<N> {}

impl<T> Rand for T where Standard: Distribution<T> {}

impl<N> Distribution<Point<N>> for Standard 
where
DefaultAllocator: Allocator<N>,
Standard: Distribution<N> {
}


pub struct Point<N> 
where DefaultAllocator: Allocator<N>
{
    field: N
}

From what I've discovered so far, it seems that the unusual where clauses - which constrain two other types based on a type parameter - play an important role.

Aaron1011 added a commit to Aaron1011/rust that referenced this issue Oct 22, 2018
Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 23, 2018
…illaumeGomez

Fix Rustdoc ICE when checking blanket impls

Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
kennytm added a commit to kennytm/rust that referenced this issue Oct 24, 2018
…illaumeGomez

Fix Rustdoc ICE when checking blanket impls

Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
kennytm added a commit to kennytm/rust that referenced this issue Oct 26, 2018
…illaumeGomez

Fix Rustdoc ICE when checking blanket impls

Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
kennytm added a commit to kennytm/rust that referenced this issue Oct 26, 2018
…illaumeGomez

Fix Rustdoc ICE when checking blanket impls

Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
@atouminet
Copy link

I now get an ICE when compiling on stable after updating to rust 1.30.
This is a regression from stable to stable for me since as I said in my previous post, before the update, documenting worked fine on stable 1.29 and yielded an ICE on both beta and nightly.

bash-4.2$ RUST_BACKTRACE=1 cargo doc --open
 Documenting num_cpus v1.8.0                                                                                                                                                             
   Compiling lazy_static v1.1.0                                                                                                                                                          
 Documenting typenum v1.10.0                                                                                                                                                             
    Checking matrixmultiply v0.1.14                                                                                                                                                      
 Documenting matrixmultiply v0.1.14                                                                                                                                                      
 Documenting rand v0.5.5                                                                                                                                                                 
   Compiling rayon v1.0.2                                                                                                                                                                
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached                                                                                         
                                                                                                                                                                                         
thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:587:9                                                                                                                  
    Checking approx v0.3.0                                                                                                                                                               
    Checking num-complex v0.2.1                                                                                                                                                          
 Documenting approx v0.3.0                                                                                                                                                               
stack backtrace:                                                                                                                                                                         
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace                                                                                                                          
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49                                                                                                                            
   1: std::sys_common::backtrace::print                                                                                                                                                  
             at libstd/sys_common/backtrace.rs:71                                                                                                                                        
             at libstd/sys_common/backtrace.rs:59                                                                                                                                        
   2: std::panicking::default_hook::{{closure}}                                                                                                                                          
             at libstd/panicking.rs:211                                                                                                                                                  
   3: std::panicking::default_hook                                                                                                                                                       
             at libstd/panicking.rs:227                                                                                                                                                  
   4: std::panicking::rust_panic_with_hook                                                                                                                                               
             at libstd/panicking.rs:477                                                                                                                                                  
   5: std::panicking::begin_panic                                                                                                                                                        
   6: rustc_errors::Handler::bug                                                                                                                                                         
   7: rustc::util::bug::opt_span_bug_fmt::{{closure}}                                                                                                                                    
   8: rustc::ty::context::tls::with_opt::{{closure}}                                                                                                                                     
   9: rustc::ty::context::tls::with_context_opt                                                                                                                                          
  10: rustc::ty::context::tls::with_opt                                                                                                                                                  
  11: rustc::util::bug::opt_span_bug_fmt                                                                                                                                                 
  12: rustc::util::bug::bug_fmt                                                                                                                                                          
  13: rustc::traits::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::traits::SelectionError<'a>>::lift_to_tcx                                                          
  14: rustc::ty::context::TyCtxt::lift_to_global                                                                                                                                         
  15: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  16: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  17: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  18: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  19: rustc::infer::InferCtxt::probe                                                                                                                                                     
  20: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  21: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  22: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  23: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  24: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  25: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  26: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  27: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  28: rustc::infer::InferCtxt::probe                                                                                                                                                     
  29: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  30: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  31: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  32: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  33: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  34: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  35: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  36: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  37: rustc::infer::InferCtxt::probe                                                                                                                                                     
  38: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  39: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  40: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  41: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  42: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  43: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  44: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  45: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  46: rustc::infer::InferCtxt::probe                                                                                                                                                     
  47: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  48: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  49: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  50: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  51: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  52: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  53: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  54: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  55: rustc::infer::InferCtxt::probe                                                                                                                                                     
  56: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  57: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  58: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  59: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  60: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  61: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  62: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  63: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  64: rustc::infer::InferCtxt::probe                                                                                                                                                     
  65: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  66: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  67: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  68: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  69: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  70: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  71: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  72: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  73: rustc::infer::InferCtxt::probe                                                                                                                                                     
  74: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  75: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  76: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  77: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  78: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  79: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  80: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  81: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  82: rustc::infer::InferCtxt::probe                                                                                                                                                     
  83: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  84: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  85: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  86: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  87: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  88: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  89: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  90: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
  91: rustc::infer::InferCtxt::probe                                                                                                                                                     
  92: <&'a mut I as core::iter::iterator::Iterator>::next                                                                                                                                
  93: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                    
  94: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache                                                                                                        
  95: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  96: rustc::traits::select::SelectionContext::candidate_from_obligation                                                                                                                 
  97: rustc::traits::select::SelectionContext::evaluate_stack                                                                                                                            
  98: rustc::dep_graph::graph::DepGraph::with_anon_task                                                                                                                                  
  99: rustc::traits::select::SelectionContext::evaluate_predicate_recursively                                                                                                            
                                                                                                                                                                                         
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.30.0 (da5f414c2 2018-10-24) running on x86_64-unknown-linux-gnu                                                                                                            
                                                                                                                                                                                         
error: Could not document `typenum`.                                                                                                                                                     

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /ccc/home/cont001/ocre/toumineta/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow --color always -o /ccc/dsku/nfs-server/user/cont001/ocre/toumineta/Github/coupe/target/doc -L dependency=/ccc/dsku/nfs-server/user/cont001/ocre/toumineta/Github/coupe/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed  

@atouminet
Copy link

See also #52873

nikomatsakis pushed a commit to nikomatsakis/rust that referenced this issue Nov 20, 2018
Fixes rust-lang#55001, rust-lang#54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants