this post was submitted on 11 Dec 2025
32 points (100.0% liked)

Rust

7566 readers
7 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] 0xDEADBEEFCAFE@programming.dev 8 points 1 day ago (1 children)

shouldn’t Rust enforce returning from function

How do you enforce returning from exit or a function with a loop that never terminates?

[–] thingsiplay@beehaw.org 1 points 1 day ago (1 children)

If it never terminates, then it means it runs forever.

Right, so you can't "enforce" a return from the function.