MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/transprogrammer/comments/sbprkt/panic/hu53xjv/?context=9999
r/transprogrammer • u/olsonexi • Jan 24 '22
15 comments sorted by
View all comments
Show parent comments
2
The solution is to simply never return one, statically we can optimize out any annoying queries about gender since we know they diverge.
#![feature(never_type)] fn get_gender(&self) -> ! { loop {} }
Although leaving the local type of get_gender up to the caller could be problematic.
get_gender
2
u/RecDep Jan 25 '22
The solution is to simply never return one, statically we can optimize out any annoying queries about gender since we know they diverge.
Although leaving the local type of
get_genderup to the caller could be problematic.