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

ICE: no type for local variable #106030

Closed
matthiaskrgr opened this issue Dec 22, 2022 · 4 comments · Fixed by #106055
Closed

ICE: no type for local variable #106030

matthiaskrgr opened this issue Dec 22, 2022 · 4 comments · Fixed by #106055
Assignees
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

fn main() {
    unknown(1, |glyf| {
        let actual = glyf;
    });
}

Meta

rustc --version --verbose:

rustc 1.68.0-nightly (b569c9dc5 2022-12-21)
binary: rustc
commit-hash: b569c9dc57ee22b6ff94563af856909763dfa24b
commit-date: 2022-12-21
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

<output>
Backtrace

error[E0425]: cannot find function `unknown` in this scope
 --> ./src/tools/rustfmt/tests/target/issue_4031.rs:2:5
  |
2 |     unknown(1, |glyf| {
  |     ^^^^^^^ not found in this scope

error: internal compiler error: compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:133:13: no type for local variable local let actual = glyf; (hir_id=HirId { owner: OwnerId { def_id: DefId(0:3 ~ issue_4031[ae59]::main) }, local_id: 12 })
 --> ./src/tools/rustfmt/tests/target/issue_4031.rs:3:9
  |
3 |         let actual = glyf;
  |         ^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/compiler/rustc_errors/src/lib.rs:973:33
stack backtrace:
   0:     0x7f244b965a7a - std::backtrace_rs::backtrace::libunwind::trace::h99dd587050ba3e19
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f244b965a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h8b5df2b58b05da41
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f244b965a7a - std::sys_common::backtrace::_print_fmt::h1d345cbbcda56598
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f244b965a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd4402273fa33282a
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f244b9c87ae - core::fmt::write::h6c95fd68e30f1c06
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f244b955e45 - std::io::Write::write_fmt::ha72b55fc69892a78
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/io/mod.rs:1682:15
   6:     0x7f244b965845 - std::sys_common::backtrace::_print::hfacbef4ac726cf20
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f244b965845 - std::sys_common::backtrace::print::h249e5a7814647993
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f244b96858f - std::panicking::default_hook::{{closure}}::h1c72d3ce90cd0e69
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/panicking.rs:267:22
   9:     0x7f244b9682cb - std::panicking::default_hook::h5777cc883332a52f
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/panicking.rs:286:9
  10:     0x7f244ec68fe1 - rustc_driver[21537216b322d4ff]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f244b968dcd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h51db7b3e2de57a58
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/alloc/src/boxed.rs:2032:9
  12:     0x7f244b968dcd - std::panicking::rust_panic_with_hook::hb3543478dcc6699f
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/panicking.rs:692:13
  13:     0x7f244ee2b0c1 - std[f9cccb814d93c2f3]::panicking::begin_panic::<rustc_errors[828765d4ad99842e]::ExplicitBug>::{closure#0}
  14:     0x7f244ee29486 - std[f9cccb814d93c2f3]::sys_common::backtrace::__rust_end_short_backtrace::<std[f9cccb814d93c2f3]::panicking::begin_panic<rustc_errors[828765d4ad99842e]::ExplicitBug>::{closure#0}, !>
  15:     0x7f244eeae2b6 - std[f9cccb814d93c2f3]::panicking::begin_panic::<rustc_errors[828765d4ad99842e]::ExplicitBug>
  16:     0x7f244ee7cd16 - std[f9cccb814d93c2f3]::panic::panic_any::<rustc_errors[828765d4ad99842e]::ExplicitBug>
  17:     0x7f244ee79952 - <rustc_errors[828765d4ad99842e]::HandlerInner>::span_bug::<rustc_span[ce8a94135b1d42da]::span_encoding::Span, &alloc[ca57dcf3127c867d]::string::String>
  18:     0x7f244ee796f7 - <rustc_errors[828765d4ad99842e]::Handler>::span_bug::<rustc_span[ce8a94135b1d42da]::span_encoding::Span, &alloc[ca57dcf3127c867d]::string::String>
  19:     0x7f244ee69a09 - rustc_middle[4f2d4adbb9e9eeb3]::ty::context::tls::with_context_opt::<rustc_middle[4f2d4adbb9e9eeb3]::ty::context::tls::with_opt<rustc_middle[4f2d4adbb9e9eeb3]::util::bug::opt_span_bug_fmt<rustc_span[ce8a94135b1d42da]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  20:     0x7f244ee67d06 - rustc_middle[4f2d4adbb9e9eeb3]::util::bug::opt_span_bug_fmt::<rustc_span[ce8a94135b1d42da]::span_encoding::Span>
  21:     0x7f244d005954 - rustc_middle[4f2d4adbb9e9eeb3]::util::bug::span_bug_fmt::<rustc_span[ce8a94135b1d42da]::span_encoding::Span>
  22:     0x7f244d0a1f21 - <rustc_hir_typeck[74dcecb324806db1]::writeback::WritebackCx as rustc_hir[81173c52513d9611]::intravisit::Visitor>::visit_local
  23:     0x7f244d0975b3 - <rustc_hir_typeck[74dcecb324806db1]::writeback::WritebackCx as rustc_hir[81173c52513d9611]::intravisit::Visitor>::visit_expr
  24:     0x7f244d099136 - <rustc_hir_typeck[74dcecb324806db1]::writeback::WritebackCx as rustc_hir[81173c52513d9611]::intravisit::Visitor>::visit_expr
  25:     0x7f244d097334 - <rustc_hir_typeck[74dcecb324806db1]::writeback::WritebackCx as rustc_hir[81173c52513d9611]::intravisit::Visitor>::visit_expr
  26:     0x7f244d097593 - <rustc_hir_typeck[74dcecb324806db1]::writeback::WritebackCx as rustc_hir[81173c52513d9611]::intravisit::Visitor>::visit_expr
  27:     0x7f244d195324 - <rustc_hir_typeck[74dcecb324806db1]::fn_ctxt::FnCtxt>::resolve_type_vars_in_body
  28:     0x7f244d186159 - <rustc_hir_typeck[74dcecb324806db1]::inherited::InheritedBuilder>::enter::<rustc_hir_typeck[74dcecb324806db1]::typeck_with_fallback<rustc_hir_typeck[74dcecb324806db1]::typeck::{closure#0}>::{closure#0}::{closure#1}, &rustc_middle[4f2d4adbb9e9eeb3]::ty::typeck_results::TypeckResults>
  29:     0x7f244d1783f1 - rustc_hir_typeck[74dcecb324806db1]::typeck
  30:     0x7f244d1766d4 - rustc_query_system[c60be3de876a2c0c]::query::plumbing::try_execute_query::<rustc_query_impl[20e8f77b2b38c778]::plumbing::QueryCtxt, rustc_query_system[c60be3de876a2c0c]::query::caches::VecCache<rustc_span[ce8a94135b1d42da]::def_id::LocalDefId, &rustc_middle[4f2d4adbb9e9eeb3]::ty::typeck_results::TypeckResults>>
  31:     0x7f244e3d8815 - rustc_data_structures[411d6a5849f79f86]::sync::par_for_each_in::<&[rustc_span[ce8a94135b1d42da]::def_id::LocalDefId], <rustc_middle[4f2d4adbb9e9eeb3]::hir::map::Map>::par_body_owners<rustc_hir_typeck[74dcecb324806db1]::typeck_item_bodies::{closure#0}>::{closure#0}>
  32:     0x7f244e3d8553 - rustc_hir_typeck[74dcecb324806db1]::typeck_item_bodies
  33:     0x7f244e2cac07 - rustc_query_system[c60be3de876a2c0c]::query::plumbing::try_execute_query::<rustc_query_impl[20e8f77b2b38c778]::plumbing::QueryCtxt, rustc_query_system[c60be3de876a2c0c]::query::caches::DefaultCache<(), ()>>
  34:     0x7f244e2ca910 - rustc_query_system[c60be3de876a2c0c]::query::plumbing::get_query::<rustc_query_impl[20e8f77b2b38c778]::queries::typeck_item_bodies, rustc_query_impl[20e8f77b2b38c778]::plumbing::QueryCtxt>
  35:     0x7f244d1f9012 - <rustc_session[a68c546d2dd923a7]::session::Session>::time::<(), rustc_hir_analysis[28e1eb23c1f8d576]::check_crate::{closure#7}>
  36:     0x7f244d1f7f0c - rustc_hir_analysis[28e1eb23c1f8d576]::check_crate
  37:     0x7f244d1f7b2b - rustc_interface[1a3656a650d1b669]::passes::analysis
  38:     0x7f244e428447 - rustc_query_system[c60be3de876a2c0c]::query::plumbing::try_execute_query::<rustc_query_impl[20e8f77b2b38c778]::plumbing::QueryCtxt, rustc_query_system[c60be3de876a2c0c]::query::caches::DefaultCache<(), core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>>
  39:     0x7f244e428140 - rustc_query_system[c60be3de876a2c0c]::query::plumbing::get_query::<rustc_query_impl[20e8f77b2b38c778]::queries::analysis, rustc_query_impl[20e8f77b2b38c778]::plumbing::QueryCtxt>
  40:     0x7f244df02913 - <rustc_interface[1a3656a650d1b669]::passes::QueryContext>::enter::<rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}::{closure#2}::{closure#2}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>
  41:     0x7f244defecc3 - <rustc_interface[1a3656a650d1b669]::interface::Compiler>::enter::<rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}::{closure#2}, core[736eded8a5b048c3]::result::Result<core[736eded8a5b048c3]::option::Option<rustc_interface[1a3656a650d1b669]::queries::Linker>, rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>
  42:     0x7f244def9cd8 - rustc_span[ce8a94135b1d42da]::with_source_map::<core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>, rustc_interface[1a3656a650d1b669]::interface::run_compiler<core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>, rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  43:     0x7f244def97c5 - <scoped_tls[724bea1b4333bfff]::ScopedKey<rustc_span[ce8a94135b1d42da]::SessionGlobals>>::set::<rustc_interface[1a3656a650d1b669]::interface::run_compiler<core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>, rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}>::{closure#0}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>
  44:     0x7f244def8db2 - std[f9cccb814d93c2f3]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1a3656a650d1b669]::util::run_in_thread_pool_with_globals<rustc_interface[1a3656a650d1b669]::interface::run_compiler<core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>, rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}>::{closure#0}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>
  45:     0x7f244e524cfa - <<std[f9cccb814d93c2f3]::thread::Builder>::spawn_unchecked_<rustc_interface[1a3656a650d1b669]::util::run_in_thread_pool_with_globals<rustc_interface[1a3656a650d1b669]::interface::run_compiler<core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>, rustc_driver[21537216b322d4ff]::run_compiler::{closure#1}>::{closure#0}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[736eded8a5b048c3]::result::Result<(), rustc_errors[828765d4ad99842e]::ErrorGuaranteed>>::{closure#1} as core[736eded8a5b048c3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  46:     0x7f244b972dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7b6a51a690b552da
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/alloc/src/boxed.rs:2000:9
  47:     0x7f244b972dc3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h38e8e2f768a10b8d
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/alloc/src/boxed.rs:2000:9
  48:     0x7f244b972dc3 - std::sys::unix::thread::Thread::new::thread_start::h4a6baf72c021b4cc
                               at /rustc/b569c9dc57ee22b6ff94563af856909763dfa24b/library/std/src/sys/unix/thread.rs:108:17
  49:     0x7f244b7058fd - <unknown>
  50:     0x7f244b787a60 - <unknown>
  51:                0x0 - <unknown>

note: 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.68.0-nightly (b569c9dc5 2022-12-21) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0425`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue labels Dec 22, 2022
@matthiaskrgr
Copy link
Member Author

Regression in b569c9d / #105979

@matthiaskrgr
Copy link
Member Author

Perhaps #105973 ? 🤔 cc @oli-obk

@matthiaskrgr
Copy link
Member Author

list of files that reproduce the crash (rustc $file is eough)

 ./src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
 ./src/tools/clippy/clippy_lints/src/methods/unnecessary_filter_map.rs
 ./library/backtrace/src/symbolize/gimli/macho.rs
 ./compiler/rustc_middle/src/ty/error.rs
 ./compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/mod.rs
 ./compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/cpp_like.rs
 ./compiler/rustc_builtin_macros/src/deriving/cmp/ord.rs
 ./compiler/rustc_builtin_macros/src/deriving/cmp/partial_eq.rs
 ./compiler/rustc_builtin_macros/src/deriving/cmp/partial_ord.rs
 ./compiler/rustc_interface/src/callbacks.rs
 ./src/tools/clippy/clippy_lints/src/operators/misrefactored_assign_op.rs
 ./src/tools/rustfmt/tests/target/issue_4031.rs
 ./src/tools/clippy/clippy_lints/src/methods/seek_to_start_instead_of_rewind.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_int_to_float.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_int_to_char.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_num_to_bytes.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_int_to_bool.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_ptr_to_ref.rs
 ./src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
 ./src/tools/clippy/clippy_lints/src/operators/cmp_owned.rs
 ./src/tools/cargo/src/cargo/core/compiler/custom_build.rs
 ./src/tools/cargo/src/cargo/core/compiler/custom_build.rs
 ./compiler/rustc_trait_selection/src/traits/select/confirmation.rs
 ./src/tools/rustfmt/src/formatting.rs
 ./src/tools/miri/bench-cargo-miri/backtraces/src/main.rs
 ./src/tools/miri/bench-cargo-miri/backtraces/src/main.rs
 ./library/backtrace/src/symbolize/gimli.rs
 ./src/tools/clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs
 ./src/tools/rust-analyzer/crates/ide-assists/src/handlers/convert_bool_then.rs
 ./library/std/src/sys/itron/condvar.rs
 ./src/tools/rust-analyzer/crates/ide-assists/src/handlers/promote_local_to_const.rs
 ./src/tools/clippy/clippy_lints/src/matches/redundant_pattern_match.rs
 ./src/tools/clippy/clippy_lints/src/matches/match_bool.rs
 ./src/tools/tidy/src/alphabetical.rs
 ./src/tools/tidy/src/target_specific_tests.rs
 ./src/tools/tidy/src/bins.rs
 ./src/tools/tidy/src/features.rs
 ./src/tools/tidy/src/style.rs
 ./src/tools/tidy/src/edition.rs
 ./src/tools/tidy/src/errors.rs
 ./src/tools/tidy/src/pal.rs
 ./src/tools/tidy/src/error_codes_check.rs
 ./src/tools/tidy/src/ui_tests.rs
 ./src/tools/tidy/src/debug_artifacts.rs
 ./compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
 ./compiler/rustc_codegen_cranelift/src/intrinsics/llvm_aarch64.rs
 ./src/tools/clippy/clippy_lints/src/matches/match_wild_enum.rs
 ./src/tools/rust-analyzer/crates/ide-completion/src/tests.rs
 ./src/tools/rust-analyzer/crates/ide-completion/src/tests.rs
 ./compiler/rustc_ast/src/attr/mod.rs
 ./library/backtrace/examples/raw.rs
 ./library/backtrace/examples/raw.rs
 ./compiler/rustc_codegen_cranelift/src/driver/jit.rs
 ./compiler/rustc_mir_build/src/build/matches/mod.rs
 ./compiler/rustc_mir_build/src/build/matches/test.rs
 ./src/tools/rustfmt/tests/target/nested-visual-block.rs
 ./src/tools/rustfmt/tests/target/nested-visual-block.rs
 ./src/tools/clippy/clippy_lints/src/operators/float_cmp.rs
 ./src/tools/rust-analyzer/crates/ide/src/inlay_hints.rs
 ./src/tools/rust-analyzer/crates/ide/src/inlay_hints.rs
 ./compiler/rustc_ast_lowering/src/pat.rs
 ./src/tools/clippy/clippy_lints/src/operators/op_ref.rs
 ./src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_type_alias.rs
 ./src/tools/clippy/clippy_lints/src/loops/for_kv_map.rs
 ./src/tools/clippy/clippy_lints/src/methods/iter_overeager_cloned.rs
 ./src/tools/clippy/clippy_lints/src/matches/match_same_arms.rs
 ./src/tools/clippy/clippy_lints/src/methods/stable_sort_primitive.rs
 ./compiler/rustc_ty_utils/src/lib.rs
 ./src/tools/rust-analyzer/crates/project-model/src/build_scripts.rs
 ./src/tools/rust-analyzer/crates/flycheck/src/lib.rs
 ./compiler/rustc_ast_lowering/src/expr.rs
 ./src/tools/clippy/clippy_lints/src/unit_types/unit_arg.rs
 ./src/librustdoc/clean/types/tests.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_float_to_int.rs
 ./src/tools/clippy/clippy_lints/src/methods/clone_on_copy.rs
 ./src/tools/replace-version-placeholder/src/main.rs
 ./src/tools/replace-version-placeholder/src/main.rs
 ./src/tools/rust-installer/src/generator.rs
 ./library/backtrace/src/symbolize/gimli/elf.rs
 ./library/std/src/sync/mpmc/array.rs
 ./library/std/src/sync/mpmc/list.rs
 ./compiler/rustc_expand/src/tests.rs
 ./src/tools/tidy/src/unit_tests.rs
 ./src/tools/rust-analyzer/crates/ide-assists/src/handlers/expand_glob_import.rs
 ./src/tools/rust-analyzer/crates/ide-assists/src/handlers/expand_glob_import.rs
 ./src/tools/build-manifest/src/checksum.rs
 ./src/tools/cargo/crates/cargo-util/src/process_builder.rs
 ./library/std/src/sys/windows/path.rs
 ./src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/type_mismatch.rs
 ./src/tools/rust-analyzer/crates/ide-diagnostics/src/handlers/type_mismatch.rs
 ./src/tools/rust-analyzer/crates/ide/src/highlight_related.rs
 ./src/tools/clippy/clippy_lints/src/methods/unit_hash.rs
 ./src/tools/clippy/clippy_lints/src/operators/needless_bitwise_bool.rs
 ./compiler/rustc_middle/src/util/bug.rs
 ./src/tools/clippy/clippy_lints/src/methods/unnecessary_lazy_eval.rs
 ./src/tools/clippy/clippy_lints/src/methods/iter_skip_next.rs
 ./compiler/rustc_incremental/src/persist/save.rs
 ./src/tools/clippy/clippy_lints/src/types/redundant_allocation.rs
 ./compiler/rustc_infer/src/infer/opaque_types/table.rs
 ./src/tools/cargo/tests/testsuite/main.rs
 ./src/tools/clippy/clippy_lints/src/functions/must_use.rs
 ./compiler/rustc_hir_typeck/src/cast.rs
 ./src/tools/rustfmt/src/test/configuration_snippet.rs
 ./src/tools/cargo/tests/testsuite/git.rs
 ./src/tools/cargo/tests/testsuite/git.rs
 ./compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
 ./compiler/rustc_resolve/src/ident.rs
 ./compiler/rustc_resolve/src/ident.rs
 ./src/librustdoc/clean/utils.rs
 ./src/tools/clippy/clippy_lints/src/misc_early/zero_prefixed_literal.rs
 ./compiler/rustc_span/src/profiling.rs
 ./compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs
 ./compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
 ./src/tools/clippy/clippy_lints/src/transmute/useless_transmute.rs
 ./src/tools/rust-analyzer/crates/ide/src/runnables.rs
 ./src/tools/clippy/clippy_lints/src/unit_types/let_unit_value.rs
 ./compiler/rustc_parse/src/lexer/mod.rs
 ./src/tools/rustfmt/tests/target/issue-1681.rs
 ./src/tools/rustfmt/tests/target/issue-1681.rs
 ./src/tools/clippy/clippy_lints/src/operators/verbose_bit_mask.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmutes_expressible_as_ptr_casts.rs
 ./src/tools/clippy/clippy_lints/src/transmute/transmute_ptr_to_ptr.rs
 ./src/tools/clippy/clippy_lints/src/casts/as_underscore.rs
 ./src/tools/rustfmt/tests/source/issue-2896.rs
 ./src/tools/rustfmt/tests/target/issue-2896.rs
 ./src/tools/rustfmt/tests/source/issue-2896.rs
 ./src/tools/rustfmt/tests/target/issue-2896.rs
 ./src/tools/rustfmt/config_proc_macro/src/item_enum.rs
 ./compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs
 ./compiler/rustc_mir_build/src/thir/cx/expr.rs
 ./compiler/rustc_codegen_llvm/src/debuginfo/metadata/enums/native

@oli-obk
Copy link
Contributor

oli-obk commented Dec 22, 2022

I think we should change

span_bug!(span, "no type for local variable {}", self.tcx.hir().node_to_string(nid))
to a tcx.ty_error_with_message()

@JohnTitor JohnTitor self-assigned this Dec 22, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 22, 2022
Return `TyKind::Error` instead of `span_bug!`

r? `@oli-obk`
Fixes rust-lang#106030

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Dec 22, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 22, 2022
Return `TyKind::Error` instead of `span_bug!`

r? ``@oli-obk``
Fixes rust-lang#106030

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Nilstrieb added a commit to Nilstrieb/rust that referenced this issue Dec 23, 2022
…estebank

Check arg expressions properly on error in `confirm_builtin_call`

Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: rust-lang#105973 (comment)

Fixes rust-lang#106030
Fixes rust-lang#105244
@bors bors closed this as completed in de99a87 Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
4 participants