This file contains explanations of ICU4X-specific conventions on boilerplate (extra code/annotations) in source files.
In order to assert that library crates conform to the ICU4X style guide, the following annotation should be present in every lib.rs file. The annotations do the following:
no_stdDebug, and be non_exhaustive or annotated as exhaustiveIf the crate has no std feature:
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, doc)), no_std)]
#![cfg_attr(
not(test),
deny(
clippy::indexing_slicing,
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
)
)]
#![warn(missing_docs)]
Not all crates are yet able to be annotated in this way. Annotations may be omitted and added when able.
If the crate has an std feature, specify this in the first line:
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, doc)), no_std)]
#![cfg_attr(
not(test),
deny(
clippy::indexing_slicing,
clippy::unwrap_used,
clippy::expect_used,
clippy::panic,
)
)]
#![warn(missing_docs)]