Skip to content

Commit

Permalink
remove the nightly feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Feb 25, 2018
1 parent 87eabf9 commit ad10622
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ env:

matrix:
include:
- rust: nightly
env: FEATURES='--features "nightly"'
- rust: nightly
env: FEATURES='--no-default-features'
before_script:
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ include = [
[features]
alloc = []
std = ["alloc", "memchr/use_std"]
nightly = []
default = ["std"]
regexp = ["regex"]
regexp_macros = ["regexp", "lazy_static"]
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ to handle the breaking changes.**
There are a few compilation features:

* `std`: (activated by default) if disabled, nom can work in `no_std` builds
* `nightly`: enables helpful error messages if you use a nightly compiler
* `regexp`: enables regular expression parsers with the `regex` crate
* `regexp_macros`: enables regular expression parsers with the `regex` and `regex_macros` crates. Regular expressions can be defined at compile time, but it requires a nightly version of rustc
* `verbose-errors`: accumulate error codes and input positions as you backtrack through the parser tree. This gives you precise information about which part of the parser was affected by which part of the input
Expand Down
4 changes: 4 additions & 0 deletions doc/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### Using nightly to get better error messages

**warning**: this only applies to nom 3. nom 4 uses the
[compile_error](https://doc.rust-lang.org/std/macro.compile_error.html) macro
available since Rust 1.20

If you got the following error when compiling your nom parser:

```
Expand Down
4 changes: 2 additions & 2 deletions src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2003,10 +2003,10 @@ mod tests {
assert_eq!(g("點點點a"), Ok(("a", "點點點")));
}

#[cfg(feature = "nightly")]
#[cfg(nightly)]
use test::Bencher;

#[cfg(feature = "nightly")]
#[cfg(nightly)]
#[bench]
fn take_while_bench(b: &mut Bencher) {
use nom::is_alphabetic;
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,9 @@
#![cfg_attr(not(feature = "std"), feature(alloc))]
#![cfg_attr(all(not(feature = "std"), feature = "alloc"), feature(alloc))]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "nightly", feature(test))]
#![cfg_attr(feature = "nightly", feature(const_fn))]
#![cfg_attr(feature = "nightly", feature(plugin))]
//#![warn(missing_docs)]
#![cfg_attr(feature = "cargo-clippy", allow(doc_markdown))]
#![cfg_attr(nightly, feature(test))]

#[cfg(all(not(feature = "std"), feature = "alloc"))]
#[macro_use]
Expand All @@ -358,7 +356,7 @@ extern crate lazy_static;
extern crate memchr;
#[cfg(feature = "regexp")]
extern crate regex;
#[cfg(feature = "nightly")]
#[cfg(nightly)]
extern crate test;

#[cfg(not(feature = "std"))]
Expand Down
4 changes: 2 additions & 2 deletions src/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,10 +1235,10 @@ mod tests {
);
}

#[cfg(feature = "nightly")]
#[cfg(nightly)]
use test::Bencher;

#[cfg(feature = "nightly")]
#[cfg(nightly)]
#[bench]
fn many0_bench(b: &mut Bencher) {
named!(multi<&[u8],Vec<&[u8]> >, many0!(tag!("abcd")));
Expand Down

0 comments on commit ad10622

Please sign in to comment.