-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Closed
Copy link
Labels
A-codegenArea: Code generationArea: Code generationA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
In debug builds it means "I think we can't get here, please fail!()
if we do", i.e. the same as the current unreachable!()
.
In release builds it means "I promise we can't get here, LLVM, you are free to do absolutely anything if we can", i.e. intrinsics::unreachable()
.
Improper use can totally break memory safety in release builds, so we should make it unsafe
-only even in debug builds. For the same reason I don't think the current unreachable!()
should change meaning to this. I don't have a great alternative name, which I think is the main obstacle with this ticket!
E-easy E-bikeshed :)
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.