-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compiler Unexpectedly Panicked, call function with wrong number of arguments #47706
Comments
I also hit this, but my test-case was "apply this patch to servo", so I'm glad you had a reduced test-case already, thanks! |
Stable: rustc 1.23.0 (766bd11 2018-01-01)
Beta: rustc 1.24.0-beta.8 (ed9751a 2018-01-23)
|
cc @rust-lang/infra -- any chance we could bisect this down to a PR? |
triage: P-high Regression. Should be an easy fix. |
Bisecting between b65f0be...a0dcecf. Script: #!/bin/sh
$RUSTC_RELATIVE 1.rs 2>&1 | grep FnLike Bisection result: $ target/release/bisect --preserve --test test.sh --start b65f0bedd2f22d9661ecb7092f07746dc2ccfb0d --end a0dcecff90c45ad5d4eb60859e22bb3f1b03842a
INFO:rust_sysroot: Getting commits from the git checkout in b65f0bedd2f22d9661ecb7092f07746dc2ccfb0d...a0dcecff90c45ad5d4eb60859e22bb3f1b03842a
INFO:rust_sysroot: Received 93 commits
Searching in 93 commits; about 7 steps
thread 'rustc' panicked at 'non-FnLike node found: NodeImplItem(ImplItem { id: NodeId(13), name: new, hir_id: HirId { owner: DefIndex(0:5), local_id: ItemLocalId(0) }, vis: Public, defaultness: Final, attrs: [], generics: Generics { params: [], where_clause: WhereClause { id: NodeId(14), predicates: [] }, span: 1.rs:1:1: 1:1 }, node: Method(MethodSig { unsafety: Normal, constness: NotConst, abi: Rust, decl: FnDecl { inputs: [type(Option<i32>), type(())], output: Return(type(Foo)), variadic: false, has_implicit_self: false } }, BodyId { node_id: NodeId(40) }), span: 1.rs:6:5: 8:6 })', librustc/traits/error_reporting.rs:837:13
thread 'rustc' panicked at 'non-FnLike node found: NodeImplItem(ImplItem { id: NodeId(13), name: new, hir_id: HirId { owner: DefIndex(0:5), local_id: ItemLocalId(0) }, vis: Public, defaultness: Final, attrs: [], generics: Generics { params: [], where_clause: WhereClause { id: NodeId(14), predicates: [] }, span: 1.rs:1:1: 1:1 }, node: Method(MethodSig { unsafety: Normal, constness: NotConst, abi: Rust, decl: FnDecl { inputs: [type(Option<i32>), type(())], output: Return(type(Foo)), variadic: false, has_implicit_self: false } }, BodyId { node_id: NodeId(40) }), span: 1.rs:6:5: 8:6 })', librustc/traits/error_reporting.rs:837:13
searched commits b65f0bedd2f22d9661ecb7092f07746dc2ccfb0d through a0dcecff90c45ad5d4eb60859e22bb3f1b03842a
regression in 76; Some(Commit { sha: "8d3e93beae9562f8b32b7f82c3824389f6ac5bad", date: 2018-01-21T06:32:03Z, summary: "Auto merge of #47622 - GuillaumeGomez:rollup, r=GuillaumeGomez" }) |
Confirmed, panic introduced in that PR. Will submit for review once local test run completes. Sorry about this, I failed to account for Fix: #47747. I've kept the |
@estebank ICE still occurs with trait T {
fn f(&self, _: ()) {
None::<()>.map(Self::f);
}
} Stack Trace
|
Fix regression: account for trait methods in arg count mismatch error Fixed rust-lang#47706 (rust-lang#47706 (comment)) Original PR rust-lang#47747 missed methods on trait definitions. This edit was done in GitHub. I think I got the signature of the variant right, going by the ICE debug output and the other cases above.
@estebank ICE still occurs with
Stack trace:
This is on |
Avoid ICE in arg mistmatch error for tuple variants Fix rust-lang#47706.
Avoid ICE in arg mistmatch error for tuple variants Fix rust-lang#47706.
First of all, this only happens on nightly
I tried to make the code as simple as possible, so it might look like something no sane person would write
This is what i get as output
The text was updated successfully, but these errors were encountered: