Associated type fails to typecheck against a reference parameter to a function (but not a function pointer or closure) #79207
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-type-system
Area: Type system
C-bug
Category: This is a bug.
Rust
1.47.0-stable
and1.50.0-nightly (2020-11-18 8256379832b5ecb7f71e)
, both tested on the playground.The first three calls to
example
succeed, but the last two calls fail with this error:#76956 may be related.
The error does not occur if...
Fn(<&i32 as Example>::Ty)
bound is replaced withFn(&i32)
&i32
are replaced withi32
example
function is given a lifetime parameter which is otherwise ignored:The text was updated successfully, but these errors were encountered: