Skip to content

Commit b4319c4

Browse files
committed
doc: bump minimum Rust version to 1.20.0
This also clarifies our policy on increasing the minimum Rust version required. In particular, we reserve the right to increase the minimum Rust version in minor version releases of regexes, but never in patch releases. We will default to a reasonably conservative interpretation of this policy, and not bump the minimum required Rust version lightly. If this policy turns out to be too aggressive, then we may alter it in the future to state that the minimum Rust version is fixed for all of regex 1.y.z, and can only be bumped on major regex version releases. See rust-lang#457
1 parent 4e3a107 commit b4319c4

File tree

5 files changed

+37
-46
lines changed

5 files changed

+37
-46
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dist: trusty
22
sudo: false
33
language: rust
44
rust:
5-
- 1.12.0
5+
- 1.20.0
66
- stable
77
- beta
88
- nightly

Diff for: README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ by [RE2](https://github.com/google/re2).
1111
[![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/regex?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/regex)
1212
[![Coverage Status](https://coveralls.io/repos/github/rust-lang/regex/badge.svg?branch=master)](https://coveralls.io/github/rust-lang/regex?branch=master)
1313
[![](http://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex)
14+
[![Rust](https://img.shields.io/badge/rust-1.20%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/regex)
1415

1516
### Documentation
1617

@@ -210,7 +211,22 @@ recommended for general use.
210211

211212
[Documentation `regex-syntax`.](https://docs.rs/regex-syntax)
212213

213-
# License
214+
215+
### Minimum Rust version policy
216+
217+
This crate's minimum supported `rustc` version is `1.20.0`.
218+
219+
The current **tentative** policy is that the minimum Rust version required to
220+
use this crate can be increased in minor version updates. For example, if
221+
regex 1.0.0 requires Rust 1.20.0, then regex 1.0.z for all values of `z` will
222+
also require Rust 1.20.0 or newer. However, regex 1.y for `y > 0` may require
223+
a newer minimum version of Rust.
224+
225+
In general, this crate will be conservative with respect to the minimum
226+
supported version of Rust.
227+
228+
229+
### License
214230

215231
This project is licensed under either of
216232

Diff for: ci/script.sh

-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ set -ex
88
cargo build --verbose
99
cargo doc --verbose
1010

11-
# If we're testing on an older version of Rust, then only check that we
12-
# can build the crate. This is because the dev dependencies might be updated
13-
# more frequently, and therefore might require a newer version of Rust.
14-
#
15-
# This isn't ideal. It's a compromise.
16-
if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
17-
exit
18-
fi
19-
2011
# Run tests. If we have nightly, then enable our nightly features.
2112
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
2213
cargo test --verbose --features unstable

Diff for: src/vector/avx2.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,13 @@ impl AVX2VectorBuilder {
5454
}
5555
}
5656

57-
// We define our union with a macro so that our code continues to compile on
58-
// Rust 1.12.
59-
macro_rules! defunion {
60-
() => {
61-
#[derive(Clone, Copy)]
62-
#[allow(non_camel_case_types)]
63-
pub union u8x32 {
64-
vector: __m256i,
65-
bytes: [u8; 32],
66-
}
67-
}
57+
#[derive(Clone, Copy)]
58+
#[allow(non_camel_case_types)]
59+
pub union u8x32 {
60+
vector: __m256i,
61+
bytes: [u8; 32],
6862
}
6963

70-
defunion!();
71-
7264
impl u8x32 {
7365
#[inline]
7466
unsafe fn splat(n: u8) -> u8x32 {

Diff for: src/vector/ssse3.rs

+14-22
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,22 @@ impl SSSE3VectorBuilder {
6666
}
6767
}
6868

69-
// We define our union with a macro so that our code continues to compile on
70-
// Rust 1.12.
71-
macro_rules! defunion {
72-
() => {
73-
/// A u8x16 is a 128-bit vector with 16 single-byte lanes.
74-
///
75-
/// It provides a safe API that uses only SSE2 or SSSE3 instructions.
76-
/// The only way for callers to construct a value of this type is
77-
/// through the SSSE3VectorBuilder type, and the only way to get a
78-
/// SSSE3VectorBuilder is if the `ssse3` target feature is enabled.
79-
///
80-
/// Note that generally speaking, all uses of this type should get
81-
/// inlined, otherwise you probably have a performance bug.
82-
#[derive(Clone, Copy)]
83-
#[allow(non_camel_case_types)]
84-
pub union u8x16 {
85-
vector: __m128i,
86-
bytes: [u8; 16],
87-
}
88-
}
69+
/// A u8x16 is a 128-bit vector with 16 single-byte lanes.
70+
///
71+
/// It provides a safe API that uses only SSE2 or SSSE3 instructions.
72+
/// The only way for callers to construct a value of this type is
73+
/// through the SSSE3VectorBuilder type, and the only way to get a
74+
/// SSSE3VectorBuilder is if the `ssse3` target feature is enabled.
75+
///
76+
/// Note that generally speaking, all uses of this type should get
77+
/// inlined, otherwise you probably have a performance bug.
78+
#[derive(Clone, Copy)]
79+
#[allow(non_camel_case_types)]
80+
pub union u8x16 {
81+
vector: __m128i,
82+
bytes: [u8; 16],
8983
}
9084

91-
defunion!();
92-
9385
impl u8x16 {
9486
#[inline]
9587
unsafe fn splat(n: u8) -> u8x16 {

0 commit comments

Comments
 (0)