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
traitBar{}implBarforuint{};let(a, b) = (~5u as ~Bar, ~9u as ~Bar);let c:&Bar = a;let d:&Bar = b;
This doesn't:
traitBar{}implBarforuint{}fnmain(){let(a, b) = (~5u as ~Bar, ~9u as ~Bar);let(c, d):(&Bar,&Bar) = (a, b);}
error: mismatched types: expected `(&main::Bar<no-bounds>,&main::Bar<no-bounds>)` but found `(~main::Bar:Send,~main::Bar:Send)` (trait storage differs: expected & but found ~)
The text was updated successfully, but these errors were encountered:
This is not specific to trait coercions, but rather any coercion. We could make this work with mild effort. See also #8783, which is related in that it touches same parts of the compiler.
This works:
This doesn't:
The text was updated successfully, but these errors were encountered: