Closed
Description
Currently, if I have a function like this:
fn hello(world: &World) {}
I can call it like this:
hello(~World{})
But not like this:
hello(World{})
// I would have to do
hello(&World{})
According to @alexcrichton, this is because the first example automatically coerces the ~World into a &~World, but the second example does not.
The lack of symmetry here is somewhat confusing, and makes it hard to understand (at least at first), how exactly borrowed pointers work with different callers.
Metadata
Metadata
Assignees
Labels
No labels