Stream: t-compiler/rust-analyzer

Topic: fluff


Laurențiu (Oct 13 2020 at 17:29, on Zulip):
error[E0308]: mismatched types
  --> crates/ide/src/doc_links.rs:77:14
   |
77 |         Some(&mut cb),
   |              ^^^^^^^ one type is more general than the other
   |
   = note: expected type `FnOnce<(BrokenLink<'_>,)>`
              found type `FnOnce<(BrokenLink<'_>,)>`

Hmm..

bjorn3 (Oct 13 2020 at 17:45, on Zulip):

-Zverbose outputs the internal representation lifetime instead of '_. This may help debugging.

Lukas Wirth (Oct 13 2020 at 17:47, on Zulip):

This is one of rust's errors I wish that would get some more love, always a bit confusing when encountering that one.

Laurențiu (Oct 13 2020 at 17:53, on Zulip):

I didn't even have to specify a lifetime, just to add a type annotation for the argument.

Laurențiu (Oct 13 2020 at 17:55, on Zulip):

But yeah, Option<&'a mut dyn FnMut(BrokenLink<'_>) -> Option<(CowStr<'a>, CowStr<'a>)>> is a bit gnarly

Last update: Jul 28 2021 at 05:00UTC