Skip to content

Commit

Permalink
Merge pull request #278 from kadiwa4/patch-1
Browse files Browse the repository at this point in the history
C-FEATURE: improve the example for conditional `no_std`
  • Loading branch information
dtolnay authored Mar 10, 2024
2 parents e0e515b + a5092f8 commit 385ba00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 385ba00

Please sign in to comment.