From a5092f827b98b1be2201c782cf974a1e45073687 Mon Sep 17 00:00:00 2001 From: kadiwa Date: Sun, 3 Mar 2024 15:48:30 +0100 Subject: [PATCH] C-FEATURE: better conditional `no_std` --- src/naming.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/naming.md b/src/naming.md index 9741312..b1bb332 100644 --- a/src/naming.md +++ b/src/naming.md @@ -284,8 +284,10 @@ std = [] ```rust // In lib.rs +#![no_std] -#![cfg_attr(not(feature = "std"), no_std)] +#[cfg(feature = "std")] +extern crate std; ``` Do not call the feature `use-std` or `with-std` or any creative name that is not