Skip to content
Snippets Groups Projects
  1. Oct 15, 2024
  2. Aug 06, 2024
  3. Apr 16, 2024
  4. Aug 20, 2023
  5. Aug 07, 2023
  6. Apr 06, 2023
  7. Dec 04, 2022
    • Gary Guo's avatar
      rust: add `build_error` crate · ecaa6ddf
      Gary Guo authored
      
      The `build_error` crate provides a function `build_error` which
      will panic at compile-time if executed in const context and,
      by default, will cause a build error if not executed at compile
      time and the optimizer does not optimise away the call.
      
      The `CONFIG_RUST_BUILD_ASSERT_ALLOW` kernel option allows to
      relax the default build failure and convert it to a runtime
      check. If the runtime check fails, `panic!` will be called.
      
      Its functionality will be exposed to users as a couple macros in
      the `kernel` crate in the following patch, thus some documentation
      here refers to them for simplicity.
      
      Signed-off-by: default avatarGary Guo <gary@garyguo.net>
      Reviewed-by: default avatarWei Liu <wei.liu@kernel.org>
      [Reworded, adapted for upstream and applied latest changes]
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      ecaa6ddf
  8. Sep 28, 2022
Loading