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