@@ -2800,40 +2800,21 @@ config RUST_OVERFLOW_CHECKS
28002800
28012801 If unsure, say Y.
28022802
2803- choice
2804- prompt "Build-time assertions"
2805- default RUST_BUILD_ASSERT_DENY
2803+ config RUST_BUILD_ASSERT_ALLOW
2804+ bool "Allow unoptimized build-time assertions"
28062805 depends on RUST
28072806 help
28082807 Controls how are `build_error!` and `build_assert!` handled during build.
28092808
28102809 If calls to them exist in the binary, it may indicate a violated invariant
28112810 or that the optimizer failed to verify the invariant during compilation.
2812- You can choose to abort compilation or ignore them during build and let the
2813- check be carried to runtime.
2814-
2815- If optimizations are turned off, you cannot select "Deny".
2816-
2817- If unsure, say "Deny".
2818-
2819- config RUST_BUILD_ASSERT_ALLOW
2820- bool "Allow"
2821- help
2822- Unoptimized calls to `build_error!` will be converted to `panic!`
2823- and checked at runtime.
2824-
2825- config RUST_BUILD_ASSERT_WARN
2826- bool "Warn"
2827- help
2828- Unoptimized calls to `build_error!` will be converted to `panic!`
2829- and checked at runtime, but warnings will be generated when building.
28302811
2831- config RUST_BUILD_ASSERT_DENY
2832- bool "Deny"
2833- help
2834- Unoptimized calls to `build_error!` will abort compilation .
2812+ This should not happen, thus by default the build is aborted. However,
2813+ as an escape hatch, you can choose Y here to ignore them during build
2814+ and let the check be carried at runtime (with `panic!` being called if
2815+ the check fails) .
28352816
2836- endchoice
2817+ If unsure, say N.
28372818
28382819config RUST_KERNEL_KUNIT_TEST
28392820 bool "KUnit test for the `kernel` crate" if !KUNIT_ALL_TESTS
0 commit comments