| ... | ... | @@ -237,13 +237,12 @@ pub const Symbol = struct { |
| 237 | 237 | }; |
| 238 | 238 | }; |
| 239 | 239 | |
| 240 | | /// Deprecated because it returns the optimization mode of the standard |
| 241 | | /// library, when the caller probably wants to use the optimization mode of |
| 242 | | /// their own module. |
| 243 | | pub const runtime_safety = switch (builtin.mode) { |
| 244 | | .debug, .safe => true, |
| 245 | | .fast, .small => false, |
| 246 | | }; |
| 240 | /// Deprecated in favor of `std.lang.Optimize.runtimeSafety`, to be removed after 0.18.0 |
| 241 | /// |
| 242 | /// Returns whether the standard library has safety checks enabled. Callsites |
| 243 | /// likely would rather know whether their own module's optimization mode |
| 244 | /// (found via `@import("builtin").optimize`) has safety checks enabled. |
| 245 | pub const runtime_safety = builtin.mode.runtimeSafety(); |
| 247 | 246 | |
| 248 | 247 | /// Whether we can unwind the stack on this target, allowing capturing and/or printing the current |
| 249 | 248 | /// stack trace. It is still legal to call `captureCurrentStackTrace`, `writeCurrentStackTrace`, and |