Skip to content

Commit

Permalink
Remove stabilized alloc feature gate.
Browse files Browse the repository at this point in the history
The feature got stabilized in rustc v1.36 and it is therefore possible
to remove the feature gate and compile the crate with `alloc` feature
enabled with the stable toolchain.

... fixes rust-bakery#1038
  • Loading branch information
0ndorio authored and Geal committed Apr 8, 2020
1 parent 7e21806 commit 78a5b83
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust:
- nightly
- beta
- stable
- 1.31.0
- 1.36.0

env:
matrix:
Expand All @@ -20,12 +20,18 @@ before_script:

matrix:
include:
- rust: stable
env: FEATURES=''
- rust: stable
env: FEATURES='--no-default-features'
- rust: stable
env: FEATURES='--no-default-features --features "alloc"'
- rust: nightly
env: FEATURES=''
- rust: nightly
env: FEATURES='--no-default-features'
- rust: nightly
env: FEATURES='--no-default-features --features "alloc"'
- rust: stable
env: FEATURES=''
- rust: nightly
env: DOC_FEATURES='--features "std lexical regexp regexp_macros" --no-default-features'
before_script:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

### Thanks

### Changed

- the minimal Rust version is now 1.36
- stabilized the `alloc` feature

### Added

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build Status](https://travis-ci.org/Geal/nom.svg?branch=master)](https://travis-ci.org/Geal/nom)
[![Coverage Status](https://coveralls.io/repos/Geal/nom/badge.svg?branch=master)](https://coveralls.io/r/Geal/nom?branch=master)
[![Crates.io Version](https://img.shields.io/crates/v/nom.svg)](https://crates.io/crates/nom)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.31.0+-lightgray.svg)](#rust-version-requirements)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.36.0+-lightgray.svg)](#rust-version-requirements)

nom is a parser combinators library written in Rust. Its goal is to provide tools
to build safe parsers without compromising the speed or memory consumption. To
Expand Down Expand Up @@ -188,7 +188,7 @@ Some benchmarks are available on [Github](https://github.com/Geal/nom_benchmarks

## Rust version requirements

The 5.0 series of nom requires **Rustc version 1.31 or greater**.
The 5.0 series of nom requires **Rustc version 1.36 or greater**.

Travis CI always has a build with a pinned version of Rustc matching the oldest supported Rust release.
The current policy is that this will only be updated in the next major nom release.
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@
//! assert_eq!(alpha0_complete("abcd"), Ok(("", "abcd")));
//! ```
//! **Going further:** read the [guides](https://github.com/Geal/nom/tree/master/doc)!
#![cfg_attr(all(not(feature = "std"), feature = "alloc"), feature(alloc))]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "cargo-clippy", allow(doc_markdown))]
#![cfg_attr(nightly, feature(test))]
Expand Down

0 comments on commit 78a5b83

Please sign in to comment.