error[E0463]: can't find crate for `error_lib`
 --> src/lib.rs:1:1
  |
1 | extern crate error_lib;
  | ^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

thread 'rustc' panicked at 'aborting due to `-Z treat-err-as-bug=1`', compiler/rustc_errors/src/lib.rs:1705:30
stack backtrace:
   0: rust_begin_unwind
             at /Users/yukang/rust/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /Users/yukang/rust/library/core/src/panicking.rs:64:14
   2: <rustc_errors::HandlerInner>::panic_if_treat_err_as_bug
             at /Users/yukang/rust/compiler/rustc_errors/src/lib.rs:1705:30
   3: <rustc_errors::HandlerInner>::emit_diagnostic::{closure#2}
   4: rustc_interface::callbacks::track_diagnostic::{closure#0}::{closure#0}
             at /Users/yukang/rust/compiler/rustc_interface/src/callbacks.rs:41:53
   5: rustc_middle::ty::context::tls::tlv::with_tlv::<rustc_interface::callbacks::track_diagnostic::{closure#0}::{closure#0}, ()>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:94:9
   6: rustc_middle::ty::context::tls::enter_context::<rustc_interface::callbacks::track_diagnostic::{closure#0}::{closure#0}, ()>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:114:5
   7: rustc_interface::callbacks::track_diagnostic::{closure#0}
             at /Users/yukang/rust/compiler/rustc_interface/src/callbacks.rs:41:20
   8: rustc_middle::ty::context::tls::with_context_opt::<rustc_interface::callbacks::track_diagnostic::{closure#0}, ()>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:131:18
   9: rustc_interface::callbacks::track_diagnostic
             at /Users/yukang/rust/compiler/rustc_interface/src/callbacks.rs:31:5
  10: <rustc_errors::HandlerInner>::emit_diagnostic
             at /Users/yukang/rust/compiler/rustc_errors/src/lib.rs:1370:9
  11: <rustc_errors::Handler>::emit_diagnostic
             at /Users/yukang/rust/compiler/rustc_errors/src/lib.rs:1121:9
  12: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
             at /Users/yukang/rust/compiler/rustc_errors/src/diagnostic_builder.rs:169:28
  13: <rustc_session::parse::ParseSess>::emit_err::<rustc_metadata::errors::CannotFindCrate>
             at /Users/yukang/rust/compiler/rustc_session/src/parse.rs:346:9
  14: <rustc_session::session::Session>::emit_err::<rustc_metadata::errors::CannotFindCrate>
             at /Users/yukang/rust/compiler/rustc_session/src/session.rs:507:9
  15: <rustc_metadata::locator::CrateError>::report
             at /Users/yukang/rust/compiler/rustc_metadata/src/locator.rs:1113:21
  16: <rustc_metadata::creader::CrateLoader>::resolve_crate
             at /Users/yukang/rust/compiler/rustc_metadata/src/creader.rs:530:17
  17: <rustc_metadata::creader::CrateLoader>::process_extern_crate
             at /Users/yukang/rust/compiler/rustc_metadata/src/creader.rs:1009:28
  18: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_extern_crate::{closure#0}
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:859:17
  19: <rustc_resolve::Resolver>::crate_loader::<core::option::Option<rustc_span::def_id::CrateNum>, <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_extern_crate::{closure#0}>
             at /Users/yukang/rust/compiler/rustc_resolve/src/lib.rs:1440:9
  20: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_extern_crate
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:858:28
  21: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>::build_reduced_graph_for_item
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:680:17
  22: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:1357:17
  23: rustc_ast::visit::walk_crate::<rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor>
             at /Users/yukang/rust/compiler/rustc_ast/src/visit.rs:266:5
  24: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_crate
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:1553:13
  25: <rustc_resolve::Resolver>::build_reduced_graph
             at /Users/yukang/rust/compiler/rustc_resolve/src/build_reduced_graph.rs:204:9
  26: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
             at /Users/yukang/rust/compiler/rustc_resolve/src/macros.rs:189:40
  27: <rustc_expand::expand::MacroExpander>::collect_invocations
             at /Users/yukang/rust/compiler/rustc_expand/src/expand.rs:586:13
  28: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
             at /Users/yukang/rust/compiler/rustc_expand/src/expand.rs:415:13
  29: <rustc_expand::expand::MacroExpander>::expand_crate
             at /Users/yukang/rust/compiler/rustc_expand/src/expand.rs:402:21
  30: rustc_interface::passes::configure_and_expand::{closure#1}::{closure#1}
             at /Users/yukang/rust/compiler/rustc_interface/src/passes.rs:239:50
  31: <rustc_data_structures::profiling::VerboseTimingGuard>::run::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}::{closure#1}>
             at /Users/yukang/rust/compiler/rustc_data_structures/src/profiling.rs:723:9
  32: <rustc_session::session::Session>::time::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}::{closure#1}>
             at /Users/yukang/rust/compiler/rustc_session/src/utils.rs:10:9
  33: rustc_interface::passes::configure_and_expand::{closure#1}
             at /Users/yukang/rust/compiler/rustc_interface/src/passes.rs:239:21
  34: <rustc_data_structures::profiling::VerboseTimingGuard>::run::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}>
             at /Users/yukang/rust/compiler/rustc_data_structures/src/profiling.rs:723:9
  35: <rustc_session::session::Session>::time::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}>
             at /Users/yukang/rust/compiler/rustc_session/src/utils.rs:10:9
  36: rustc_interface::passes::configure_and_expand
             at /Users/yukang/rust/compiler/rustc_interface/src/passes.rs:191:13
  37: rustc_interface::passes::resolver_for_lowering
             at /Users/yukang/rust/compiler/rustc_interface/src/passes.rs:562:17
  38: <rustc_query_impl::queries::resolver_for_lowering as rustc_query_system::query::config::QueryConfig<rustc_query_impl::plumbing::QueryCtxt>>::compute
             at /Users/yukang/rust/compiler/rustc_query_impl/src/plumbing.rs:511:21
  39: rustc_query_system::query::plumbing::execute_job::<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}
             at /Users/yukang/rust/compiler/rustc_query_system/src/query/plumbing.rs:424:76
  40: rustc_middle::ty::context::tls::tlv::with_tlv::<rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:94:9
  41: rustc_middle::ty::context::tls::enter_context::<rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:114:5
  42: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query::<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}
             at /Users/yukang/rust/compiler/rustc_query_impl/src/plumbing.rs:127:13
  43: rustc_middle::ty::context::tls::with_related_context::<<rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:164:9
  44: rustc_middle::ty::context::tls::with_context::<rustc_middle::ty::context::tls::with_related_context<<rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:142:36
  45: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_context<rustc_middle::ty::context::tls::with_related_context<<rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:131:18
  46: rustc_middle::ty::context::tls::with_context::<rustc_middle::ty::context::tls::with_related_context<<rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:142:5
  47: rustc_middle::ty::context::tls::with_related_context::<<rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>>
             at /Users/yukang/rust/compiler/rustc_middle/src/ty/context/tls.rs:155:5
  48: <rustc_query_impl::plumbing::QueryCtxt as rustc_query_system::query::QueryContext>::start_query::<&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, rustc_query_system::query::plumbing::execute_job<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>
             at /Users/yukang/rust/compiler/rustc_query_impl/src/plumbing.rs:112:9
  49: rustc_query_system::query::plumbing::execute_job::<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>
             at /Users/yukang/rust/compiler/rustc_query_system/src/query/plumbing.rs:424:22
  50: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>
             at /Users/yukang/rust/compiler/rustc_query_system/src/query/plumbing.rs:367:44
  51: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}
             at /Users/yukang/rust/compiler/rustc_query_system/src/query/plumbing.rs:769:36
  52: stacker::maybe_grow::<(&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, core::option::Option<rustc_query_system::dep_graph::graph::DepNodeIndex>), rustc_query_system::query::plumbing::get_query<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>
             at /Users/yukang/.cargo/registry/src/github.com-1ecc6299db9ec823/stacker-0.1.15/src/lib.rs:55:9
  53: rustc_data_structures::stack::ensure_sufficient_stack::<(&rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::rc::Rc<rustc_ast::ast::Crate>)>, core::option::Option<rustc_query_system::dep_graph::graph::DepNodeIndex>), rustc_query_system::query::plumbing::get_query<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>::{closure#0}>
             at /Users/yukang/rust/compiler/rustc_data_structures/src/stack.rs:17:5
  54: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::resolver_for_lowering, rustc_query_impl::plumbing::QueryCtxt>
             at /Users/yukang/rust/compiler/rustc_query_system/src/query/plumbing.rs:769:9
  55: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::resolver_for_lowering::{closure#0}::{closure#0}
             at /Users/yukang/rust/compiler/rustc_query_impl/src/plumbing.rs:783:21
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.70.0-dev running on aarch64-apple-darwin

note: compiler flags: -Z treat-err-as-bug=1

query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
