Closed
Description
Code
#[lang = "fn"]
trait Fn {
fn call(export_name);
}
fn call_through_fn_trait() {
a()
}
Meta
rustc --version --verbose
:
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
Error output
error[E0573]: expected type, found built-in attribute `export_name`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:13
|
3 | fn call(export_name);
| ^^^^^^^^^^^ not a type
error[E0425]: cannot find function `a` in this scope
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:6:5
|
6 | a()
| ^ not found in this scope
error[E0658]: language items are subject to change
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | #[lang = "fn"]
| ^^^^^^^^^^^^^^
|
= help: add `#![feature(lang_items)]` to the crate attributes to enable
error[E0601]: `main` function not found in crate `perses_node_priority_with_dfs_delta_reduced_mutant`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | / #[lang = "fn"]
2 | | trait Fn {
3 | | fn call(export_name);
4 | | }
5 | | fn call_through_fn_trait() {
6 | | a()
7 | | }
| |_^ consider adding a `main` function to `perses_node_priority_with_dfs_delta_reduced_mutant.rs`
error[E0152]: found duplicate lang item `fn`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:1
|
2 | / trait Fn {
3 | | fn call(export_name);
4 | | }
| |_^
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
= note: first definition in `core` loaded from /home/cnsun/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-166dae07beec0398.rlib
= note: second definition in the local crate (`perses_node_priority_with_dfs_delta_reduced_mutant`)
error: internal compiler error: compiler/rustc_typeck/src/check/callee.rs:236:29: input to call/call_mut is not a ref?
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:6:5
|
6 | a()
| ^^^
thread 'rustc' panicked at 'Box<Any>', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `call_through_fn_trait`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0152, E0425, E0573, E0601, E0658.
For more information about an error, try `rustc --explain E0152`.
Backtrace
error[E0573]: expected type, found built-in attribute `export_name`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:3:13
|
3 | fn call(export_name);
| ^^^^^^^^^^^ not a type
error[E0425]: cannot find function `a` in this scope
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:6:5
|
6 | a()
| ^ not found in this scope
error[E0658]: language items are subject to change
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | #[lang = "fn"]
| ^^^^^^^^^^^^^^
|
= help: add `#![feature(lang_items)]` to the crate attributes to enable
error[E0601]: `main` function not found in crate `perses_node_priority_with_dfs_delta_reduced_mutant`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:1:1
|
1 | / #[lang = "fn"]
2 | | trait Fn {
3 | | fn call(export_name);
4 | | }
5 | | fn call_through_fn_trait() {
6 | | a()
7 | | }
| |_^ consider adding a `main` function to `perses_node_priority_with_dfs_delta_reduced_mutant.rs`
error[E0152]: found duplicate lang item `fn`
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:2:1
|
2 | / trait Fn {
3 | | fn call(export_name);
4 | | }
| |_^
|
= note: the lang item is first defined in crate `core` (which `std` depends on)
= note: first definition in `core` loaded from /home/cnsun/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-166dae07beec0398.rlib
= note: second definition in the local crate (`perses_node_priority_with_dfs_delta_reduced_mutant`)
error: internal compiler error: compiler/rustc_typeck/src/check/callee.rs:236:29: input to call/call_mut is not a ref?
--> perses_node_priority_with_dfs_delta_reduced_mutant.rs:6:5
|
6 | a()
| ^^^
thread 'rustc' panicked at 'Box<Any>', /rustc/07e0e2ec268c140e607e1ac7f49f145612d0f597/library/std/src/panic.rs:59:5
stack backtrace:
0: std::panicking::begin_panic
1: std::panic::panic_any
2: rustc_errors::HandlerInner::span_bug
3: rustc_errors::Handler::span_bug
4: rustc_middle::ty::context::tls::with_opt
5: rustc_middle::util::bug::opt_span_bug_fmt
6: rustc_middle::util::bug::span_bug_fmt
7: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::try_overloaded_call_traits
8: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
9: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
10: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
11: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
12: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
13: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
14: rustc_typeck::check::check::check_fn
15: rustc_infer::infer::InferCtxtBuilder::enter
16: rustc_typeck::check::typeck
17: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
18: rustc_query_system::query::plumbing::force_query_with_job
19: rustc_query_system::query::plumbing::get_query_impl
20: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
21: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
22: rustc_typeck::check::typeck_item_bodies
23: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
24: rustc_data_structures::stack::ensure_sufficient_stack
25: rustc_query_system::query::plumbing::force_query_with_job
26: rustc_query_system::query::plumbing::get_query_impl
27: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
28: rustc_session::utils::<impl rustc_session::session::Session>::time
29: rustc_typeck::check_crate
30: rustc_interface::passes::analysis
31: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
32: rustc_data_structures::stack::ensure_sufficient_stack
33: rustc_query_system::query::plumbing::force_query_with_job
34: rustc_query_system::query::plumbing::get_query_impl
35: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
36: rustc_interface::passes::QueryContext::enter
37: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
38: rustc_span::with_source_map
39: rustc_interface::interface::create_compiler_and_run
40: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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.53.0-nightly (07e0e2ec2 2021-03-24) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [typeck] type-checking `call_through_fn_trait`
#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 6 previous errors
Some errors have detailed explanations: E0152, E0425, E0573, E0601, E0658.
For more information about an error, try `rustc --explain E0152`.