https://bugs.kde.org/show_bug.cgi?id=475252

--- Comment #2 from Hugues Morisset <morisset.hug...@gmail.com> ---
Sorry, here a simple example

```
async fn main() -> Result<(), dyn std::error::Error> {
    std::thread::sleep(std::time::Duration::from_secs(2))
}
```

I get 
```
[rustc] (E0308) mismatched types
expected enum Result&lt;(), (dyn std::error::Error + 'static)&gt;
found unit type ()
[main.rs:1] expected Result&lt;(), (dyn std::error::Error + 'static)&gt;
because of return type
[main.rs:2] try adding an expression at the end of the block: ;   Ok(())
```

I tried removing the async keyword, and the tooltip displays correctly then.
```
[rust-analyzer] (E0308) expected Result<(), dyn Error>, found ()
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to