Quantcast
Viewing latest article 3
Browse Latest Browse All 5

Consuming, borrowing and type inference

I think ‘consuming’ ought to be inferred here from the return type (similarly if it were bound to a variable with that explicit type annotation).

I’m not sure if that inference was part of the corresponding SE proposal, but it should be a source-compatible addition if today it’s defaulting to ‘borrowing’, the weakest ownership kind.

Read full topic


Viewing latest article 3
Browse Latest Browse All 5

Trending Articles