You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The temporary &() is deduced to have type &'a () because of the where clause. If this where clause is removed, the code compiles. For some reason the compiler cannot see that &() still implements Foo for other lifetimes because of this where clause.
Closing in favor of #38071, which may be a duplicate of #24066, but since we're uncertain not closing both--these two issues (this and #38071) are highly likely to be identical, though.
The following code fails to compile:
The temporary
&()
is deduced to have type&'a ()
because of the where clause. If this where clause is removed, the code compiles. For some reason the compiler cannot see that&()
still implementsFoo
for other lifetimes because of this where clause.n.b. this came from reducing this reddit post
https://www.reddit.com/r/rust/comments/5hm2b6/my_lifetime_snafu/
The text was updated successfully, but these errors were encountered: