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: Encountered error SignatureMismatch #129214

Closed
matthiaskrgr opened this issue Aug 17, 2024 · 2 comments · Fixed by #133365
Closed

ICE: Encountered error SignatureMismatch #129214

matthiaskrgr opened this issue Aug 17, 2024 · 2 comments · Fixed by #133365
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

//@ run-pass

trait to_str {}

trait map<T> {
    fn map<U, F>(&self, f: F) -> Vec<U>
    where
        F: FnMut(&Box<usize>) -> U;
}
impl<T> map<T> for Vec<T> {
    fn map<U, F>(&self, mut f: F) -> Vec<U>
    where
        F: FnMut(&T) -> U,
    {
        let mut r = Vec::new();
        for i in self {
            r.push(f(i));
        }
        r
    }
}

fn foo<U, T: map<U>>(x: T) -> Vec<String> {
    x.map(|_e| "hi".to_string())
}

pub fn main() {
    assert_eq!(foo(vec![1]), ["hi".to_string()]);
}
original code

original:

//@ run-pass
#![repr(align=8)]



trait to_str {
    fn to_string_(&self) -> String;
}
impl to_str for isize {
    fn to_string_(&self) -> String { self.to_string() }
}
impl to_str for String {
    fn to_string_(&self) -> String { self.clone() }
}
impl to_str for () {
    fn to_string_(&self) -> String { "()".to_string() }
}

trait map<T> {
    fn map<U, F>(&self, f: F) -> Vec<U> where F: FnMut(&Box<usize>) -> U;
}
impl<T> map<T> for Vec<T> {
    fn map<U, F>(&self, mut f: F) -> Vec<U> where F: FnMut(&T) -> U {
        let mut r = Vec::new();
        for i in self {
            r.push(f(i));
        }
        r
    }
}

fn foo<U, T: map<U>>(x: T) -> Vec<String> {
    x.map(|_e| "hi".to_string() )
}
fn bar<U:to_str,T:map<U>>(x: T) -> Vec<String> {
    x.map(|_e| _e.to_string_() )
}

pub fn main() {
    assert_eq!(foo(vec![1]), ["hi".to_string()]);
    assert_eq!(bar::<isize, Vec<isize> >(vec![4, 5]), ["4".to_string(), "5".to_string()]);
    assert_eq!(bar::<String, Vec<String> >(vec!["x".to_string(), "y".to_string()]),
               ["x".to_string(), "y".to_string()]);
    assert_eq!(bar::<(), Vec<()>>(vec![()]), ["()".to_string()]);
}

Version information

rustc 1.82.0-nightly (0f26ee4fd 2024-08-17)
binary: rustc
commit-hash: 0f26ee4fd95a1c046582dfb18892f520788e2c2c
commit-date: 2024-08-17
host: x86_64-unknown-linux-gnu
release: 1.82.0-nightly
LLVM version: 19.1.0

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zvalidate-mir -Copt-level=3 --crate-type=lib

Program output

warning: trait `to_str` should have an upper camel case name
 --> /tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:3:7
  |
3 | trait to_str {}
  |       ^^^^^^ help: convert the identifier to upper camel case: `ToStr`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

warning: trait `map` should have an upper camel case name
 --> /tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:5:7
  |
5 | trait map<T> {
  |       ^^^ help: convert the identifier to upper camel case: `Map`

error[E0276]: impl has stricter requirements than trait
  --> /tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:13:12
   |
6  | /     fn map<U, F>(&self, f: F) -> Vec<U>
7  | |     where
8  | |         F: FnMut(&Box<usize>) -> U;
   | |___________________________________- definition of `map` from trait
...
13 |           F: FnMut(&T) -> U,
   |              ^^^^^^^^^^^^^^ impl has extra requirement `for<'a> F: FnMut(&'a T)`

error[E0276]: impl has stricter requirements than trait
  --> /tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:13:25
   |
6  | /     fn map<U, F>(&self, f: F) -> Vec<U>
7  | |     where
8  | |         F: FnMut(&Box<usize>) -> U;
   | |___________________________________- definition of `map` from trait
...
13 |           F: FnMut(&T) -> U,
   |                           ^ impl has extra requirement `for<'a> F: FnOnce(&'a T)`

error: internal compiler error: compiler/rustc_traits/src/codegen.rs:44:13: Encountered error `SignatureMismatch(SignatureMismatchData { found_trait_ref: <{closure@/tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:24:11: 24:15} as std::ops::FnMut<(&std::boxed::Box<usize>,)>>, expected_trait_ref: <{closure@/tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:24:11: 24:15} as std::ops::FnMut<(&i32,)>>, terr: Sorts(ExpectedFound { expected: i32, found: std::boxed::Box<usize, std::alloc::Global> }) })` selecting `<{closure@/tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:24:11: 24:15} as std::ops::FnMut<(&i32,)>>` during codegen

thread 'rustc' panicked at compiler/rustc_traits/src/codegen.rs:44:13:
Box<dyn Any>
stack backtrace:
   0:     0x7d4a373c429d - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hce35dec2bed7e8e1
   1:     0x7d4a37c05297 - core::fmt::write::haaf8a728f3019c12
   2:     0x7d4a38ebbd91 - std::io::Write::write_fmt::hb0dc5188703aea0d
   3:     0x7d4a373c697b - std::panicking::default_hook::{{closure}}::h35c501ae74c82675
   4:     0x7d4a373c65ee - std::panicking::default_hook::hc1ddd62643c4c855
   5:     0x7d4a36558729 - std[54b021f941472252]::panicking::update_hook::<alloc[8840b3d3a55bb7af]::boxed::Box<rustc_driver_impl[ec4d44b725e7aa11]::install_ice_hook::{closure#0}>>::{closure#0}
   6:     0x7d4a373c7297 - std::panicking::rust_panic_with_hook::h7960ad04eaeb646d
   7:     0x7d4a36593111 - std[54b021f941472252]::panicking::begin_panic::<rustc_errors[2e519a482e3c741a]::ExplicitBug>::{closure#0}
   8:     0x7d4a36586156 - std[54b021f941472252]::sys::backtrace::__rust_end_short_backtrace::<std[54b021f941472252]::panicking::begin_panic<rustc_errors[2e519a482e3c741a]::ExplicitBug>::{closure#0}, !>
   9:     0x7d4a36581536 - std[54b021f941472252]::panicking::begin_panic::<rustc_errors[2e519a482e3c741a]::ExplicitBug>
  10:     0x7d4a3659c0f1 - <rustc_errors[2e519a482e3c741a]::diagnostic::BugAbort as rustc_errors[2e519a482e3c741a]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  11:     0x7d4a36b5f6c4 - rustc_middle[10ec7aec7d9fdda3]::util::bug::opt_span_bug_fmt::<rustc_span[a5a4c6b08f7cf6f]::span_encoding::Span>::{closure#0}
  12:     0x7d4a36b452da - rustc_middle[10ec7aec7d9fdda3]::ty::context::tls::with_opt::<rustc_middle[10ec7aec7d9fdda3]::util::bug::opt_span_bug_fmt<rustc_span[a5a4c6b08f7cf6f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  13:     0x7d4a36b4516b - rustc_middle[10ec7aec7d9fdda3]::ty::context::tls::with_context_opt::<rustc_middle[10ec7aec7d9fdda3]::ty::context::tls::with_opt<rustc_middle[10ec7aec7d9fdda3]::util::bug::opt_span_bug_fmt<rustc_span[a5a4c6b08f7cf6f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  14:     0x7d4a34650ac0 - rustc_middle[10ec7aec7d9fdda3]::util::bug::bug_fmt
  15:     0x7d4a34628187 - rustc_traits[87fc0fd8b38a9555]::codegen::codegen_select_candidate
  16:     0x7d4a381ef9f7 - rustc_query_impl[69287ea093d06d1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69287ea093d06d1d]::query_impl::codegen_select_candidate::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 16usize]>>
  17:     0x7d4a381efd23 - rustc_query_system[1449707d44461b06]::query::plumbing::try_execute_query::<rustc_query_impl[69287ea093d06d1d]::DynamicConfig<rustc_query_system[1449707d44461b06]::query::caches::DefaultCache<(rustc_middle[10ec7aec7d9fdda3]::ty::ParamEnv, rustc_type_ir[40aaada2a0110c33]::predicate::TraitRef<rustc_middle[10ec7aec7d9fdda3]::ty::context::TyCtxt>), rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[69287ea093d06d1d]::plumbing::QueryCtxt, false>
  18:     0x7d4a381ef99d - rustc_query_impl[69287ea093d06d1d]::query_impl::codegen_select_candidate::get_query_non_incr::__rust_end_short_backtrace
  19:     0x7d4a3514619c - rustc_ty_utils[6c9943a590e2da67]::instance::resolve_instance_raw
  20:     0x7d4a383965e9 - rustc_query_impl[69287ea093d06d1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69287ea093d06d1d]::query_impl::resolve_instance_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 32usize]>>
  21:     0x7d4a38396929 - rustc_query_system[1449707d44461b06]::query::plumbing::try_execute_query::<rustc_query_impl[69287ea093d06d1d]::DynamicConfig<rustc_query_system[1449707d44461b06]::query::caches::DefaultCache<rustc_middle[10ec7aec7d9fdda3]::ty::ParamEnvAnd<(rustc_span[a5a4c6b08f7cf6f]::def_id::DefId, &rustc_middle[10ec7aec7d9fdda3]::ty::list::RawList<(), rustc_middle[10ec7aec7d9fdda3]::ty::generic_args::GenericArg>)>, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 32usize]>>, false, false, false>, rustc_query_impl[69287ea093d06d1d]::plumbing::QueryCtxt, false>
  22:     0x7d4a38396564 - rustc_query_impl[69287ea093d06d1d]::query_impl::resolve_instance_raw::get_query_non_incr::__rust_end_short_backtrace
  23:     0x7d4a37c3b2d3 - <rustc_middle[10ec7aec7d9fdda3]::ty::instance::Instance>::try_resolve
  24:     0x7d4a38ba52e9 - rustc_mir_transform[c8fa74b5a51f9a1a]::inline::cycle::mir_callgraph_reachable::process
  25:     0x7d4a38ba5a30 - rustc_mir_transform[c8fa74b5a51f9a1a]::inline::cycle::mir_callgraph_reachable::process
  26:     0x7d4a38ba4b14 - rustc_mir_transform[c8fa74b5a51f9a1a]::inline::cycle::mir_callgraph_reachable
  27:     0x7d4a38ba49a9 - rustc_query_impl[69287ea093d06d1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69287ea093d06d1d]::query_impl::mir_callgraph_reachable::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 1usize]>>
  28:     0x7d4a38ba496b - <rustc_query_impl[69287ea093d06d1d]::query_impl::mir_callgraph_reachable::dynamic_query::{closure#2} as core[5070cb7ec77c977]::ops::function::FnOnce<(rustc_middle[10ec7aec7d9fdda3]::ty::context::TyCtxt, (rustc_middle[10ec7aec7d9fdda3]::ty::instance::Instance, rustc_span[a5a4c6b08f7cf6f]::def_id::LocalDefId))>>::call_once
  29:     0x7d4a3838c719 - rustc_query_system[1449707d44461b06]::query::plumbing::try_execute_query::<rustc_query_impl[69287ea093d06d1d]::DynamicConfig<rustc_query_system[1449707d44461b06]::query::caches::DefaultCache<(rustc_middle[10ec7aec7d9fdda3]::ty::instance::Instance, rustc_span[a5a4c6b08f7cf6f]::def_id::LocalDefId), rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[69287ea093d06d1d]::plumbing::QueryCtxt, false>
  30:     0x7d4a3838c44c - rustc_query_impl[69287ea093d06d1d]::query_impl::mir_callgraph_reachable::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7d4a385faf85 - <rustc_mir_transform[c8fa74b5a51f9a1a]::inline::Inliner>::try_inlining
  32:     0x7d4a385f8820 - <rustc_mir_transform[c8fa74b5a51f9a1a]::inline::Inliner>::process_blocks
  33:     0x7d4a385f7ce6 - <rustc_mir_transform[c8fa74b5a51f9a1a]::inline::Inline as rustc_middle[10ec7aec7d9fdda3]::mir::MirPass>::run_pass
  34:     0x7d4a37c02151 - rustc_mir_transform[c8fa74b5a51f9a1a]::pass_manager::run_passes_inner
  35:     0x7d4a38605a37 - rustc_mir_transform[c8fa74b5a51f9a1a]::optimized_mir
  36:     0x7d4a3862925d - rustc_query_impl[69287ea093d06d1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69287ea093d06d1d]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 8usize]>>
  37:     0x7d4a37c25ea7 - rustc_query_system[1449707d44461b06]::query::plumbing::try_execute_query::<rustc_query_impl[69287ea093d06d1d]::DynamicConfig<rustc_query_system[1449707d44461b06]::query::caches::DefIdCache<rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[69287ea093d06d1d]::plumbing::QueryCtxt, false>
  38:     0x7d4a37c2545f - rustc_query_impl[69287ea093d06d1d]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7d4a347845c4 - <rustc_middle[10ec7aec7d9fdda3]::ty::context::TyCtxt>::instance_mir
  40:     0x7d4a38386406 - rustc_interface[f40e7651e6b02ea1]::passes::run_required_analyses
  41:     0x7d4a3875c49e - rustc_interface[f40e7651e6b02ea1]::passes::analysis
  42:     0x7d4a3875c471 - rustc_query_impl[69287ea093d06d1d]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[69287ea093d06d1d]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 1usize]>>
  43:     0x7d4a38b867ee - rustc_query_system[1449707d44461b06]::query::plumbing::try_execute_query::<rustc_query_impl[69287ea093d06d1d]::DynamicConfig<rustc_query_system[1449707d44461b06]::query::caches::SingleCache<rustc_middle[10ec7aec7d9fdda3]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[69287ea093d06d1d]::plumbing::QueryCtxt, false>
  44:     0x7d4a38b8654f - rustc_query_impl[69287ea093d06d1d]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  45:     0x7d4a389d38ea - rustc_interface[f40e7651e6b02ea1]::interface::run_compiler::<core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>, rustc_driver_impl[ec4d44b725e7aa11]::run_compiler::{closure#0}>::{closure#1}
  46:     0x7d4a389b3210 - std[54b021f941472252]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[f40e7651e6b02ea1]::util::run_in_thread_with_globals<rustc_interface[f40e7651e6b02ea1]::util::run_in_thread_pool_with_globals<rustc_interface[f40e7651e6b02ea1]::interface::run_compiler<core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>, rustc_driver_impl[ec4d44b725e7aa11]::run_compiler::{closure#0}>::{closure#1}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>::{closure#0}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>
  47:     0x7d4a389b387a - <<std[54b021f941472252]::thread::Builder>::spawn_unchecked_<rustc_interface[f40e7651e6b02ea1]::util::run_in_thread_with_globals<rustc_interface[f40e7651e6b02ea1]::util::run_in_thread_pool_with_globals<rustc_interface[f40e7651e6b02ea1]::interface::run_compiler<core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>, rustc_driver_impl[ec4d44b725e7aa11]::run_compiler::{closure#0}>::{closure#1}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>::{closure#0}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[5070cb7ec77c977]::result::Result<(), rustc_span[a5a4c6b08f7cf6f]::ErrorGuaranteed>>::{closure#1} as core[5070cb7ec77c977]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  48:     0x7d4a389b3beb - std::sys::pal::unix::thread::Thread::new::thread_start::he8fde62ed04f9a93
  49:     0x7d4a3a11039d - <unknown>
  50:     0x7d4a3a19549c - <unknown>
  51:                0x0 - <unknown>

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: please make sure that you have updated to the latest nightly

note: rustc 1.82.0-nightly (0f26ee4fd 2024-08-17) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z validate-mir -C opt-level=3 --crate-type lib -Z dump-mir-dir=dir

query stack during panic:
#0 [codegen_select_candidate] computing candidate for `<{closure@/tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:24:11: 24:15} as core::ops::function::FnMut<(&i32,)>>`
#1 [resolve_instance_raw] resolving instance `<{closure@/tmp/icemaker_global_tempdir.CTvLxe24vLkE/rustc_testrunner_tmpdir_reporting.sonlNjO1Rab2/mvce.rs:24:11: 24:15} as core::ops::function::FnMut<(&i32,)>>::call_mut`
end of query stack
error: aborting due to 3 previous errors; 2 warnings emitted

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

@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. labels Aug 17, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 17, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 20, 2024
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Aug 25, 2024
@cushionbadak
Copy link

I found a really weird situation with this example. IT DOES NOT ICE if you save the reduced-code example file name as 129214_modified_1.rs and compile it with

rustc -Zvalidate-mir -Copt-level=3 --crate-type=lib 129214_modified_1.rs

However, it'll ICE when the file name is 129214.rs or 129214_modified_.rs.

I rechecked this with three different machines, one WSL-environment and two MacOS environment.

Meta

rustc --version --verbose:

rustc 1.83.0-nightly (0ee7cb5e3 2024-09-10)
binary: rustc
commit-hash: 0ee7cb5e3633502d9a90a85c3c367eccd59a0aba
commit-date: 2024-09-10
host: x86_64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0

(be sure to use 2024-09-10 version to reproduce)

Error output

Output

warning: trait `to_str` should have an upper camel case name
 --> 129214_modified_1.rs:3:7
  |
3 | trait to_str {}
  |       ^^^^^^ help: convert the identifier to upper camel case: `ToStr`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

warning: trait `map` should have an upper camel case name
 --> 129214_modified_1.rs:5:7
  |
5 | trait map<T> {
  |       ^^^ help: convert the identifier to upper camel case: `Map`

error[E0276]: impl has stricter requirements than trait
  --> 129214_modified_1.rs:13:12
   |
6  | /     fn map<U, F>(&self, f: F) -> Vec<U>
7  | |     where
8  | |         F: FnMut(&Box<usize>) -> U;
   | |___________________________________- definition of `map` from trait
...
13 |           F: FnMut(&T) -> U,
   |              ^^^^^^^^^^^^^^ impl has extra requirement `for<'a> F: FnMut(&'a T)`

error[E0276]: impl has stricter requirements than trait
  --> 129214_modified_1.rs:13:25
   |
6  | /     fn map<U, F>(&self, f: F) -> Vec<U>
7  | |     where
8  | |         F: FnMut(&Box<usize>) -> U;
   | |___________________________________- definition of `map` from trait
...
13 |           F: FnMut(&T) -> U,
   |                           ^ impl has extra requirement `for<'a> F: FnOnce(&'a T)`

error: aborting due to 2 previous errors; 2 warnings emitted

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

@Manishearth
Copy link
Member

We're also hitting this in unicode-org/icu4x#5531

bors added a commit to rust-lang-ci/rust that referenced this issue Nov 26, 2024
…=lcnr

Make `compare_impl_item` into a query

Turns `compare_impl_item` into a query (generalizing the existing query for `compare_impl_const`), and uses that in `Instance::resolve` to fail resolution when an implementation is incompatible with the trait it comes from.

Fixes rust-lang#119701
Fixes rust-lang#121127
Fixes rust-lang#121411
Fixes rust-lang#129075
Fixes rust-lang#129127
Fixes rust-lang#129214
Fixes rust-lang#131294
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 27, 2024
…=lcnr

Make `compare_impl_item` into a query

Turns `compare_impl_item` into a query (generalizing the existing query for `compare_impl_const`), and uses that in `Instance::resolve` to fail resolution when an implementation is incompatible with the trait it comes from.

Fixes rust-lang#119701
Fixes rust-lang#121127
Fixes rust-lang#121411
Fixes rust-lang#129075
Fixes rust-lang#129127
Fixes rust-lang#129214
Fixes rust-lang#131294
@bors bors closed this as completed in 4af7fa7 Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants