error[E0308]: mismatched types --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:32:8 | 32 | fn bench_binary() -> String { | ^^^^^^^^^^^^ expected struct `iai_callgrind::Command`, found struct `String` | = note: expected fn pointer `fn() -> iai_callgrind::Command` found fn item `fn() -> String {test_when_wrong_return_type_in_signature::bench_binary::bench_binary}` error[E0308]: mismatched types --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:41:8 | 41 | fn bench_binary() -> std::process::Command { | ^^^^^^^^^^^^ expected struct `iai_callgrind::Command`, found struct `std::process::Command` | = note: expected fn pointer `fn() -> iai_callgrind::Command` found fn item `fn() -> std::process::Command {test_when_wrong_return_type_in_signature_with_equal_name::bench_binary::bench_binary}` error[E0277]: the trait bound `InternalBinaryBenchmarkConfig: From<&str>` is not satisfied --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:4:33 | 4 | #[binary_benchmark(config = "string")] | ----------------------------^^^^^^^^-- | | | | | the trait `From<&str>` is not implemented for `InternalBinaryBenchmarkConfig` | required by a bound introduced by this call | = help: the following other types implement trait `From`: > > > = note: required for `&str` to implement `Into` error[E0308]: mismatched types --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:15:9 | 14 | fn bench_binary() -> iai_callgrind::Command { | ---------------------- expected `iai_callgrind::Command` because of return type 15 | iai_callgrind::Command::new("some").arg("some_arg") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `iai_callgrind::Command`, found `&mut iai_callgrind::Command` | help: call `Into::into` on this expression to convert `&mut iai_callgrind::Command` into `iai_callgrind::Command` | 15 | iai_callgrind::Command::new("some").arg("some_arg").into() | +++++++ error[E0308]: mismatched types --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:24:9 | 23 | fn bench_binary() -> iai_callgrind::Command { | ---------------------- expected `iai_callgrind::Command` because of return type 24 | std::process::Command::new("some") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `iai_callgrind::Command`, found struct `std::process::Command` | = note: struct `std::process::Command` and struct `iai_callgrind::Command` have similar names, but are actually distinct types note: struct `std::process::Command` is defined in crate `std` --> $RUST/std/src/process.rs | | pub struct Command { | ^^^^^^^^^^^^^^^^^^ note: struct `iai_callgrind::Command` is defined in crate `iai_callgrind` --> src/bin_bench.rs | | pub struct Command(internal::InternalCommand); | ^^^^^^^^^^^^^^^^^^ error[E0425]: cannot find function `does_not_exist` in this scope --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:49:32 | 49 | #[binary_benchmark(setup = does_not_exist())] | ^^^^^^^^^^^^^^ not found in this scope error[E0061]: this function takes 1 argument but 0 arguments were supplied --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:60:32 | 60 | #[binary_benchmark(setup = setup)] | ^^^^^-- an argument of type `usize` is missing | note: function defined here --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:58:8 | 58 | fn setup(_arg: usize) {} | ^^^^^ ----------- help: provide the argument | 60 | #[binary_benchmark(setup = setup)](/* usize */) | +++++++++++++ error[E0425]: cannot find function `does_not_exist` in this scope --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:69:35 | 69 | #[binary_benchmark(teardown = does_not_exist())] | ^^^^^^^^^^^^^^ not found in this scope error[E0061]: this function takes 1 argument but 0 arguments were supplied --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:80:35 | 80 | #[binary_benchmark(teardown = teardown)] | ^^^^^^^^-- an argument of type `usize` is missing | note: function defined here --> tests/ui/test_binary_benchmark_attribute_when_invalid.rs:78:8 | 78 | fn teardown(_arg: usize) {} | ^^^^^^^^ ----------- help: provide the argument | 80 | #[binary_benchmark(teardown = teardown)](/* usize */) | +++++++++++++