4

Github Suggest `return`ing tail expressions that match return type by estebank ·...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/81769
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Contributor

estebank commented on Feb 5

Some newcomers are confused by the behavior of tail expressions,
interpreting that "leaving out the ; makes it the return value".
To help them go in the right direction, suggest using return instead
when applicable.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK