Skip to content

Commit a5092f8

Browse files
authored
C-FEATURE: better conditional no_std
1 parent e0e515b commit a5092f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/naming.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,10 @@ std = []
284284

285285
```rust
286286
// In lib.rs
287+
#![no_std]
287288

288-
#![cfg_attr(not(feature = "std"), no_std)]
289+
#[cfg(feature = "std")]
290+
extern crate std;
289291
```
290292

291293
Do not call the feature `use-std` or `with-std` or any creative name that is not

0 commit comments

Comments
 (0)