Getting mismatched types error despite exactly the same types. Works when called from some areas of project, fails from other areas.
I tried this code:
https://github.com/AS207960/whois-email, function send_mail in client.rs, called from sender.rs line 161.
I expected to see this happen: Works as if called from main.rs line 101
Instead, this happened:
error[E0308]: mismatched types
--> src/main.rs:104:5
|
104 | tokio::task::spawn(async {
| ^^^^^^^^^^^^^^^^^^ one type is more general than the other
|
= note: expected type `std::ops::FnOnce<(&trust_dns_proto::rr::rdata::mx::MX,)>`
found type `std::ops::FnOnce<(&trust_dns_proto::rr::rdata::mx::MX,)>`
Meta
rustc --version --verbose:
rustc 1.44.0-nightly (dbf8b6bf1 2020-04-19)
binary: rustc
commit-hash: dbf8b6bf116c7bece2987ff4bd2792f008a6ee77
commit-date: 2020-04-19
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0
Getting mismatched types error despite exactly the same types. Works when called from some areas of project, fails from other areas.
I tried this code:
https://github.com/AS207960/whois-email, function send_mail in client.rs, called from sender.rs line 161.
I expected to see this happen: Works as if called from main.rs line 101
Instead, this happened:
Meta
rustc --version --verbose: