Skip to content

Commit 385ba00

Browse files
authored
Merge pull request #278 from kadiwa4/patch-1
C-FEATURE: improve the example for conditional `no_std`
2 parents e0e515b + a5092f8 commit 385ba00

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)