Call to function broken by unrelated constraint on generic function containing the call #125274
Labels
A-typesystem
Area: The type system
C-bug
Category: This is a bug.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I'm a bit new to Rust; sorry if the following is just my misunderstanding.
I tried this code (play):
I expected to see the compiler accept this code. Instead, I get this error:
The Playground shows this happening on nightly too.
The error message suggests it thinks
call_me()
should be passed a&U
, but&U
has nothing to do withcall_me()
or the&String
it's being passed.Thank you very much for all work on Rust.
The text was updated successfully, but these errors were encountered: