Skip to content

Commit d636bbd

Browse files
committed
Generate docs for no_std too
1 parent a84ea20 commit d636bbd

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.travis.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ script:
1818
travis-cargo --skip 1.6.0 build &&
1919
travis-cargo --skip 1.6.0 test &&
2020
travis-cargo build -- --features=no_std &&
21-
travis-cargo test -- --features=no_std &&
22-
travis-cargo --only stable doc
21+
travis-cargo test -- --features=no_std
2322
2423
after_success:
25-
- travis-cargo --only stable doc-upload
24+
- |
25+
if [ "$TRAVIS_RUST_VERSION" == "stable ]; then
26+
travis-cargo doc -- --features=no_std &&
27+
mv target/doc target/doc_no_std &&
28+
travis-cargo doc &&
29+
mv target/doc_no_std target/doc/no_std &&
30+
travis-cargo doc-upload
31+
fi
2632
2733
env:
2834
global:

src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
//! A library that provides ASCII-only string and character types, equivalent to the `char`, `str` and
1212
//! `String` types in the standard library.
1313
//!
14-
//! # Using ascii without libstd
15-
//!
16-
//! Most of `AsciiChar` and `AsciiStr` can be used without `std` by enabling the feature `no_std`. The
17-
//! owned string type `AsciiString` and the conversion trait `IntoAsciiString` as well as all methods
18-
//! referring to these types aren't available without `std`.
14+
#![cfg_attr(not(feature = "no_std"), doc="[The documentation for `#[no_std]` mode is here](https://tomprogrammer.github.io/rust-ascii/no_std/ascii/index.html).")]
15+
#![cfg_attr(feature = "no_std", doc="This is the documentation for `#[no_std]` mode.")]
1916
//!
2017
//! # Requirements
2118
//!

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy