Skip to content

"internal compiler error" during cargo doc #55001

Closed
@sapir

Description

@sapir

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions