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

Panic while documenting generated code #56296

Closed
kinnison opened this issue Nov 27, 2018 · 14 comments
Closed

Panic while documenting generated code #56296

kinnison opened this issue Nov 27, 2018 · 14 comments
Labels
A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls 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

@kinnison
Copy link
Contributor

While working on a project which involves generated code from the prost project and the tower-grpc project, I encountered an ICE while running cargo doc --all in my codebase

You can find the code at:

https://gitlab.com/kinnison/cassava.git

The commit I encountered the error on is 8cafdb0fcf6346aea6aae80c29cf73a059a4b7a4 which is (at time of filing) the tip commit on temporary/for-rustdoc-report

To reproduce, run cargo doc --all at the top level.

Meta

rustc --version --verbose:

rustc 1.31.0-beta.19 (42053f9f0 2018-11-26)
binary: rustc
commit-hash: 42053f9f07c91cbaad78afe459851a435b346673
commit-date: 2018-11-26
host: x86_64-unknown-linux-gnu
release: 1.31.0-beta.19
LLVM version: 8.0

Backtrace:

 Documenting cassava-protos v0.1.0 (/home/dsilvers/dev-git/cassava/cassava-protos)                                                                                                                                  
thread '<unnamed>' panicked at 'Unable to fulfill trait DefId(2/0:825 ~ core[6761]::marker[0]::Send[0]) for 'google::bytestream::server::byte_stream::ResponseBody<T>': [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<<T as google::bytestream::server::ByteStream>::ReadStream as std::marker::Send>)),depth=6),Unimplemented)]', librustc/traits/auto_trait.rs:218:17
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:480                                                                                                                                                                             
   5: std::panicking::continue_panic_fmt                                                                                                                                                                            
             at libstd/panicking.rs:390                                                                                                                                                                             
   6: std::panicking::begin_panic_fmt                                                                                                                                                                               
             at libstd/panicking.rs:345                                                                                                                                                                             
   7: rustc::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics::{{closure}}::{{closure}}                                                                                                                
             at /rustc/42053f9f07c91cbaad78afe459851a435b346673/src/<::std::macros::panic macros>:8                                                                                                                 
   8: rustc::ty::context::tls::with_context::{{closure}}                                                                                                                                                            
             at libcore/result.rs:774                                                                                                                                                                               
             at librustc/traits/auto_trait.rs:217                                                                                                                                                                   
             at librustc/infer/mod.rs:526                                                                                                                                                                           
             at librustc/ty/context.rs:1681                                                                                                                                                                         
             at librustc/ty/context.rs:2045                                                                                                                                                                         
             at librustc/ty/context.rs:1984                                                                                                                                                                         
             at librustc/ty/context.rs:2044                                                                                                                                                                         
             at librustc/ty/context.rs:1680                                                                                                                                                                         
             at librustc/ty/context.rs:2145                                                                                                                                                                         
             at librustc/ty/context.rs:2129                                                                                                                                                                         
   9: rustc::ty::context::GlobalCtxt::enter_local                                                                                                                                                                   
             at librustc/ty/context.rs:2120                                                                                                                                                                         
             at librustc/ty/context.rs:2129                                                                                                                                                                         
             at librustc/ty/context.rs:2140                                                                                                                                                                         
             at librustc/ty/context.rs:1673                                                                                                                                                                         
  10: rustc::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics                                                                                                                                          
             at librustc/infer/mod.rs:525                                                                                                                                                                           
             at librustc/traits/auto_trait.rs:133                                                                                                                                                                   
  11: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impl_for                                                                                                                                          
             at librustdoc/clean/auto_trait.rs:200                                                                                                                                                                  
             at librustdoc/clean/auto_trait.rs:123                                                                                                                                                                  
  12: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impls                                                                                                                                             
             at librustdoc/clean/auto_trait.rs:76                                                                                                                                                                   
             at libcore/option.rs:632                                                                                                                                                                               
             at librustdoc/clean/auto_trait.rs:73                                                                                                                                                                   
  13: rustdoc::clean::def_ctor::get_def_from_node_id                                                                                                                                                                
             at librustdoc/clean/auto_trait.rs:41                                                                                                                                                                   
             at librustdoc/clean/def_ctor.rs:59                                                                                                                                                                     
  14: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item                                                                                
             at librustdoc/clean/auto_trait.rs:39                                                                                                                                                                   
             at librustdoc/clean/mod.rs:3353                                                                                                                                                                        
             at librustdoc/passes/collect_trait_impls.rs:170                                                                                                                                                        
  15: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                               
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at libcore/iter/mod.rs:1572                                                                                                                                                                            
             at liballoc/vec.rs:1908                                                                                                                                                                                
             at liballoc/vec.rs:1805                                                                                                                                                                                
             at liballoc/vec.rs:1800                                                                                                                                                                                
  16: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                    
             at liballoc/vec.rs:1700                                                                                                                                                                                
             at libcore/iter/iterator.rs:1476                                                                                                                                                                       
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at librustdoc/fold.rs:37                                                                                                                                                                               
  17: <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                                                                                                                                                        
  18: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                               
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at libcore/iter/mod.rs:1572                                                                                                                                                                            
             at liballoc/vec.rs:1908                                                                                                                                                                                
             at liballoc/vec.rs:1805                                                                                                                                                                                
             at liballoc/vec.rs:1800                                                                                                                                                                                
  19: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                    
             at liballoc/vec.rs:1700                                                                                                                                                                                
             at libcore/iter/iterator.rs:1476                                                                                                                                                                       
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at librustdoc/fold.rs:37                                                                                                                                                                               
  20: <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                                                                                                                                                        
  21: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                               
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at libcore/iter/mod.rs:1572                                                                                                                                                                            
             at liballoc/vec.rs:1908                                                                                                                                                                                
             at liballoc/vec.rs:1805                                                                                                                                                                                
             at liballoc/vec.rs:1800                                                                                                                                                                                
  22: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                    
             at liballoc/vec.rs:1700                                                                                                                                                                                
             at libcore/iter/iterator.rs:1476                                                                                                                                                                       
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at librustdoc/fold.rs:37                                                                                                                                                                               
  23: <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                                                                                                                                                        
  24: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                               
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at libcore/iter/mod.rs:1572                                                                                                                                                                            
             at liballoc/vec.rs:1908                                                                                                                                                                                
             at liballoc/vec.rs:1805                                                                                                                                                                                
             at liballoc/vec.rs:1800                                                                                                                                                                                
  25: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                    
             at liballoc/vec.rs:1700                                                                                                                                                                                
             at libcore/iter/iterator.rs:1476                                                                                                                                                                       
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at librustdoc/fold.rs:37                                                                                                                                                                               
  26: <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                                                                                                                                                        
  27: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter                                                                                                                                               
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at libcore/iter/mod.rs:1572                                                                                                                                                                            
             at liballoc/vec.rs:1908                                                                                                                                                                                
             at liballoc/vec.rs:1805                                                                                                                                                                                
             at liballoc/vec.rs:1800                                                                                                                                                                                
  28: rustdoc::fold::DocFolder::fold_inner_recur                                                                                                                                                                    
             at liballoc/vec.rs:1700                                                                                                                                                                                
             at libcore/iter/iterator.rs:1476                                                                                                                                                                       
             at librustdoc/fold.rs:110                                                                                                                                                                              
             at librustdoc/fold.rs:37                                                                                                                                                                               
  29: <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                                                                                                                                                        
  30: 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                                                                                                                                                         
  31: rustdoc::core::run_core::{{closure}}::{{closure}}                                                                                                                                                             
             at librustdoc/core.rs:618                                                                                                                                                                              
  32: rustc::ty::context::tls::enter_context                                                                                                                                                                        
             at librustc_driver/driver.rs:1355                                                                                                                                                                      
             at librustc/ty/context.rs:2077                                                                                                                                                                         
             at librustc/ty/context.rs:2045                                                                                                                                                                         
             at librustc/ty/context.rs:1984                                                                                                                                                                         
             at librustc/ty/context.rs:2044                                                                                                                                                                         
  33: <std::thread::local::LocalKey<T>>::with                                                                                                                                                                       
             at librustc/ty/context.rs:2076                                                                                                                                                                         
             at librustc/ty/context.rs:2034                                                                                                                                                                         
             at libstd/thread/local.rs:300                                                                                                                                                                          
             at libstd/thread/local.rs:254                                                                                                                                                                          
             at librustc/ty/context.rs:2026                                                                                                                                                                         
             at libstd/thread/local.rs:300                                                                                                                                                                          
             at libstd/thread/local.rs:254                                                                                                                                                                          
  34: rustc::ty::context::TyCtxt::create_and_enter                                                                                                                                                                  
             at librustc/ty/context.rs:2018                                                                                                                                                                         
             at librustc/ty/context.rs:2056                                                                                                                                                                         
             at librustc/ty/context.rs:1247                                                                                                                                                                         
  35: rustc_driver::driver::phase_3_run_analysis_passes                                                                                                                                                             
             at librustc_driver/driver.rs:1263                                                                                                                                                                      
  36: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                               
             at librustdoc/core.rs:500                                                                                                                                                                              
             at librustc_driver/driver.rs:76                                                                                                                                                                        
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
  37: rustdoc::core::run_core                                                                                                                                                                                       
             at librustc_driver/driver.rs:75                                                                                                                                                                        
             at librustdoc/core.rs:407                                                                                                                                                                              
  38: <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                                                                                                                     
  39: syntax::with_globals                                                                                                                                                                                          
             at libsyntax/lib.rs:105                                                                                                                                                                                
  40: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                                                                                                                               
             at librustdoc/lib.rs:716                                                                                                                                                                               
             at librustc_driver/lib.rs:1632                                                                                                                                                                         
             at libstd/panic.rs:313                                                                                                                                                                                 
  41: std::panicking::try::do_call                                                                                                                                                                                  
             at libstd/panicking.rs:310                                                                                                                                                                             
  42: __rust_maybe_catch_panic                                                                                                                                                                                      
             at libpanic_unwind/lib.rs:102                                                                                                                                                                          
  43: rustc_driver::monitor                                                                                                                                                                                         
             at libstd/panicking.rs:289                                                                                                                                                                             
             at libstd/panic.rs:392                                                                                                                                                                                 
             at librustc_driver/lib.rs:1546                                                                                                                                                                         
             at librustc_driver/lib.rs:1557                                                                                                                                                                         
             at librustc_driver/lib.rs:1631                                                                                                                                                                         
  44: rustdoc::rust_input                                                                                                                                                                                           
             at librustdoc/lib.rs:716                                                                                                                                                                               
  45: rustdoc::main_args                                                                                                                                                                                            
             at librustdoc/lib.rs:613                                                                                                                                                                               
             at librustdoc/lib.rs:568                                                                                                                                                                               
  46: <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                                                                                                                     
  47: syntax::with_globals                                                                                                                                                                                          
             at libsyntax/lib.rs:105                                                                                                                                                                                
  48: std::panicking::try::do_call                                                                                                                                                                                  
             at libstd/thread/mod.rs:409                                                                                                                                                                            
             at libstd/panic.rs:313                                                                                                                                                                                 
             at libstd/panicking.rs:310                                                                                                                                                                             
  49: __rust_maybe_catch_panic                                                                                                                                                                                      
             at libpanic_unwind/lib.rs:102                                                                                                                                                                          
  50: <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                                                                                                                                                                               
  51: std::sys_common::thread::start_thread                                                                                                                                                                         
             at liballoc/boxed.rs:682                                                                                                                                                                               
             at libstd/sys_common/thread.rs:24                                                                                                                                                                      
  52: std::sys::unix::thread::Thread::new::thread_start                                                                                                                                                             
             at libstd/sys/unix/thread.rs:90                                                                                                                                                                        
  53: start_thread                                                                                                                                                                                                  
  54: __clone                                                                                                                                                                                                       
                                                                                                                                                                                                                    
error: internal compiler error: unexpected panic                                                                                                                                                                    
                                                                                                                                                                                                                    
note: the compiler unexpectedly panicked. this is a bug.                                                                                                                                                            
                                                                                                                                                                                                                    
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports                                                                                                   
                                                                                                                                                                                                                    
note: rustc 1.31.0-beta.19 (42053f9f0 2018-11-26) running on x86_64-unknown-linux-gnu                                                                                                                               
                                                                                                                                                                                                                    
error: Could not document `cassava-protos`.                                                                                                                                                                         

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-name cassava_protos cassava-protos/src/lib.rs --color always -o /home/dsilvers/dev-git/cassava/target/doc -L dependency=/home/dsilvers/dev-git/cassava/target/debug/deps --extern bytes=/home/dsilvers/dev-git/cassava/target/debug/deps/libbytes-fb189858a5e8e25e.rmeta --extern env_logger=/home/dsilvers/dev-git/cassava/target/debug/deps/libenv_logger-f4b7820618054712.rmeta --extern futures=/home/dsilvers/dev-git/cassava/target/debug/deps/libfutures-dd2213545753c5d5.rmeta --extern http=/home/dsilvers/dev-git/cassava/target/debug/deps/libhttp-e56aa44cd2fbc704.rmeta --extern log=/home/dsilvers/dev-git/cassava/target/debug/deps/liblog-9f5f677bea8cf460.rmeta --extern prost=/home/dsilvers/dev-git/cassava/target/debug/deps/libprost-73ed3ea3ed54066c.rmeta --extern prost_derive=/home/dsilvers/dev-git/cassava/target/debug/deps/libprost_derive-1cbabcb4af8696d1.so --extern prost_types=/home/dsilvers/dev-git/cassava/target/debug/deps/libprost_types-de72d1aaf495dca6.rmeta --extern tokio_core=/home/dsilvers/dev-git/cassava/target/debug/deps/libtokio_core-7a425f1be4ea0a3d.rmeta --extern tower_grpc=/home/dsilvers/dev-git/cassava/target/debug/deps/libtower_grpc-af6e31f62f6f7d6f.rmeta --extern tower_h2=/home/dsilvers/dev-git/cassava/target/debug/deps/libtower_h2-24fd330c8c6ca434.rmeta --extern tower_http=/home/dsilvers/dev-git/cassava/target/debug/deps/libtower_http-11f3e43b41e1b276.rmeta --extern tower_service=/home/dsilvers/dev-git/cassava/target/debug/deps/libtower_service-f89120a37703e3b9.rmeta` (exit code: 1)
@kinnison
Copy link
Contributor Author

It may be worth noting that if I wind the crates back to the 2015 edition and try with current stable, I get a similar error:

thread '<unnamed>' panicked at 'Unable to fulfill trait DefId(2/0:819 ~ core[fa6e]::marker[0]::Send[0]) for 'build::bazel::remote::execution::v2::server::execution::ResponseBody<T>': [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<<T as build::bazel::remote::execution::v2::server::Execution>::ExecuteStream as std::marker::Send>)),depth=6),Unimplemented), FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<<T as build::bazel::remote::execution::v2::server::Execution>::WaitExecutionStream as std::marker::Send>)),depth=6),Unimplemented)]', librustc/traits/auto_trait.rs:218:17
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.                                                                                                                             
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:481                                                                                                                                                                             
   5: std::panicking::continue_panic_fmt                                                                                                                                                                            
             at libstd/panicking.rs:391                                                                                                                                                                             
   6: std::panicking::begin_panic_fmt                                                                                                                                                                               
             at libstd/panicking.rs:346                                                                                                                                                                             
   7: rustc::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics::{{closure}}::{{closure}}                                                                                                                
             at /rustc/1433507eba7d1a114e4c6f27ae0e1a74f60f20de/src/<::std::macros::panic macros>:8                                                                                                                 
   8: rustc::ty::context::tls::with_context::{{closure}}                                                                                                                                                            
             at libcore/result.rs:774                                                                                                                                                                               
             at librustc/traits/auto_trait.rs:217                                                                                                                                                                   
             at librustc/infer/mod.rs:472                                                                                                                                                                           
             at librustc/ty/context.rs:1608                                                                                                                                                                         
             at librustc/ty/context.rs:1954                                                                                                                                                                         
             at librustc/ty/context.rs:1893                                                                                                                                                                         
             at librustc/ty/context.rs:1953                                                                                                                                                                         
             at librustc/ty/context.rs:1607                                                                                                                                                                         
             at librustc/ty/context.rs:2054                                                                                                                                                                         
             at librustc/ty/context.rs:2038                                                                                                                                                                         
   9: rustc::infer::InferCtxtBuilder::enter                                                                                                                                                                         
             at librustc/ty/context.rs:2029                                                                                                                                                                         
             at librustc/ty/context.rs:2038                                                                                                                                                                         
             at librustc/ty/context.rs:2049                                                                                                                                                                         
             at librustc/ty/context.rs:1600                                                                                                                                                                         
             at librustc/infer/mod.rs:471                                                                                                                                                                           
  10: rustc::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics                                                                                                                                          
             at librustc/traits/auto_trait.rs:133                                                                                                                                                                   
  11: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impl_for                                                                                                                                          
             at librustdoc/clean/auto_trait.rs:200                                                                                                                                                                  
             at librustdoc/clean/auto_trait.rs:123                                                                                                                                                                  
  12: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impls                                                                                                                                             
             at librustdoc/clean/auto_trait.rs:76                                                                                                                                                                   
             at libcore/option.rs:622                                                                                                                                                                               
             at librustdoc/clean/auto_trait.rs:73                                                                                                                                                                   
  13: rustdoc::clean::def_ctor::get_def_from_node_id                                                                                                                                                                
             at librustdoc/clean/auto_trait.rs:41                                                                                                                                                                   
             at librustdoc/clean/def_ctor.rs:59                                                                                                                                                                     
  14: <rustdoc::doctree::Struct as rustdoc::clean::Clean<alloc::vec::Vec<rustdoc::clean::Item>>>::clean                                                                                                             
             at librustdoc/clean/auto_trait.rs:39                                                                                                                                                                   
             at librustdoc/clean/mod.rs:3371                                                                                                                                                                        
             at librustdoc/clean/mod.rs:2822                                                                                                                                                                        
  15: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:582                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at libcore/iter/mod.rs:2686                                                                                                                                                                            
             at libcore/iter/mod.rs:2523                                                                                                                                                                            
             at liballoc/vec.rs:1980                                                                                                                                                                                
             at liballoc/vec.rs:1877                                                                                                                                                                                
  16: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:582                                                                                                                                                                         
  17: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  18: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  19: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  20: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  21: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  22: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  23: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  24: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  25: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  26: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  27: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  28: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  29: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend                                                                                                                                             
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
             at libcore/ops/function.rs:286                                                                                                                                                                         
             at libcore/option.rs:414                                                                                                                                                                               
             at libcore/iter/mod.rs:1394                                                                                                                                                                            
             at liballoc/vec.rs:1903                                                                                                                                                                                
  30: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean                                                                                                                              
             at liballoc/vec.rs:1841                                                                                                                                                                                
             at librustdoc/clean/mod.rs:587                                                                                                                                                                         
  31: <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx, 'rcx, 'cstore> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean                                                                                          
             at librustdoc/clean/mod.rs:166                                                                                                                                                                         
  32: rustdoc::core::run_core::{{closure}}::{{closure}}                                                                                                                                                             
             at librustdoc/core.rs:532                                                                                                                                                                              
  33: rustc::ty::context::tls::enter_context                                                                                                                                                                        
             at librustc_driver/driver.rs:1352                                                                                                                                                                      
             at librustc/ty/context.rs:1986                                                                                                                                                                         
             at librustc/ty/context.rs:1954                                                                                                                                                                         
             at librustc/ty/context.rs:1893                                                                                                                                                                         
             at librustc/ty/context.rs:1953                                                                                                                                                                         
  34: <std::thread::local::LocalKey<T>>::with                                                                                                                                                                       
             at librustc/ty/context.rs:1985                                                                                                                                                                         
             at librustc/ty/context.rs:1943                                                                                                                                                                         
             at libstd/thread/local.rs:294                                                                                                                                                                          
             at libstd/thread/local.rs:248                                                                                                                                                                          
             at librustc/ty/context.rs:1935                                                                                                                                                                         
             at libstd/thread/local.rs:294                                                                                                                                                                          
             at libstd/thread/local.rs:248                                                                                                                                                                          
  35: rustc::ty::context::TyCtxt::create_and_enter                                                                                                                                                                  
             at librustc/ty/context.rs:1927                                                                                                                                                                         
             at librustc/ty/context.rs:1965                                                                                                                                                                         
             at librustc/ty/context.rs:1271                                                                                                                                                                         
  36: rustc_driver::driver::phase_3_run_analysis_passes                                                                                                                                                             
             at librustc_driver/driver.rs:1260                                                                                                                                                                      
  37: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                               
             at librustdoc/core.rs:477                                                                                                                                                                              
             at librustc_driver/driver.rs:76                                                                                                                                                                        
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
  38: rustdoc::core::run_core                                                                                                                                                                                       
             at librustc_driver/driver.rs:75                                                                                                                                                                        
             at librustdoc/core.rs:389                                                                                                                                                                              
  39: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                               
             at librustdoc/lib.rs:707                                                                                                                                                                               
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
             at libsyntax/lib.rs:108                                                                                                                                                                                
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
  40: syntax::with_globals                                                                                                                                                                                          
             at libsyntax/lib.rs:107                                                                                                                                                                                
  41: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                                                                                                                               
             at librustdoc/lib.rs:703                                                                                                                                                                               
             at librustc_driver/lib.rs:1660                                                                                                                                                                         
             at libstd/panic.rs:313                                                                                                                                                                                 
  42: std::panicking::try::do_call                                                                                                                                                                                  
             at libstd/panicking.rs:310                                                                                                                                                                             
  43: __rust_maybe_catch_panic                                                                                                                                                                                      
             at libpanic_unwind/lib.rs:103                                                                                                                                                                          
  44: rustc_driver::monitor                                                                                                                                                                                         
             at libstd/panicking.rs:289                                                                                                                                                                             
             at libstd/panic.rs:392                                                                                                                                                                                 
             at librustc_driver/lib.rs:1574                                                                                                                                                                         
             at librustc_driver/lib.rs:1585                                                                                                                                                                         
             at librustc_driver/lib.rs:1659                                                                                                                                                                         
  45: rustdoc::rust_input                                                                                                                                                                                           
             at librustdoc/lib.rs:703                                                                                                                                                                               
  46: rustdoc::main_args                                                                                                                                                                                            
             at librustdoc/lib.rs:606                                                                                                                                                                               
             at librustdoc/lib.rs:561                                                                                                                                                                               
  47: <scoped_tls::ScopedKey<T>>::set                                                                                                                                                                               
             at librustdoc/lib.rs:114                                                                                                                                                                               
             at libcore/option.rs:414                                                                                                                                                                               
             at librustdoc/lib.rs:114                                                                                                                                                                               
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
             at libsyntax/lib.rs:108                                                                                                                                                                                
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155                                                                                                                     
                                                                                                                                                                                                                    
error: internal compiler error: unexpected panic                                                                                                                                                                    
                                                                                                                                                                                                                    
note: the compiler unexpectedly panicked. this is a bug.                                                                                                                                                            
                                                                                                                                                                                                                    
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports                                                                                                   
                                                                                                                                                                                                                    
note: rustc 1.30.1 (1433507eb 2018-11-07) running on x86_64-unknown-linux-gnu                                                                                                                                       

@kinnison
Copy link
Contributor Author

Aaand the same with current nightly:

rustc 1.32.0-nightly (400c2bc5e 2018-11-27)
binary: rustc
commit-hash: 400c2bc5ed292f77c49693320f4eda37bb375e90
commit-date: 2018-11-27
host: x86_64-unknown-linux-gnu
release: 1.32.0-nightly
LLVM version: 8.0

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Nov 28, 2018
@GuillaumeGomez
Copy link
Member

cc @nikomatsakis

@Aaron1011
Copy link
Member

I'd like to work on this.

@kinnison
Copy link
Contributor Author

I'd like to work on this.

If you can solve it @Aaron1011 I'd be super-grateful, it's currently a blocker for me on my project :(

@kinnison
Copy link
Contributor Author

Hey @Aaron1011 do you think this is at all related to #54705 ?

@kinnison
Copy link
Contributor Author

kinnison commented Dec 5, 2018

For anyone interested, note: rustc 1.32.0-beta-1 (eb53c1039 2018-12-05) running on x86_64-linux-gnu fails similarly:

thread '<unnamed>' panicked at 'Unable to fulfill trait DefId(2/0:836 ~ core[8894]::marker[0]::Send[0]) for 'google::bytestream::server::byte_stream::ResponseBody<T>': [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<<T as google::bytestream::server::ByteStream>::ReadStream as std::marker::Send>)),depth=6),Unimplemented)]', src/librustc/traits/auto_trait.rs:218:17

@Aaron1011
Copy link
Member

@kinnison: This appears to be separate from #54705. I'm working on a refactor of the auto trait finder logic that should solve this issue.

@kinnison
Copy link
Contributor Author

kinnison commented Dec 6, 2018

@Aaron1011 Cool, when you have something you want testing, let me know. I'm prepared to run up a local toolchain if you want a second opinion on the fix :-)

@QuietMisdreavus QuietMisdreavus added the A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls label Dec 6, 2018
@Aaron1011
Copy link
Member

In an unexpected turn of events, #56838 appears to also resolve this issue!

@kinnison
Copy link
Contributor Author

Cool. I look forward to being able to test this. I'm still a little too green with the compiler codebase to try setting up a non-"release" compiler (counting nightly here) for building my personal projects.

@kinnison
Copy link
Contributor Author

I've confirmed that #56838 fixes my issue and requested on that PR that the fix be backported to 1.32, but I have no idea how much weight my request might carry.

@kinnison
Copy link
Contributor Author

kinnison commented Jan 5, 2019

I can confirm that Beta as of today (1.32.0-beta.11 (e64fee6 2019-01-04) definitely resolves this issue for me. Thank you for your efforts @Aaron1011 and I'll mark this closed as soon as 1.32 is released unless that's not the correct process?

@Mark-Simulacrum
Copy link
Member

We generally close immediately upon the fix landing and don't wait for a stable release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls 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

5 participants