diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-12-02 03:59:25 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-12-04 00:30:27 +0300 |
| commit | d415844f5e82944dc1907ff4b66f9f74fcbaf6ff (patch) | |
| tree | ce900215b8ae0fc84cf1fd3d2676deb9a2fac71c /src/libsyntax_pos | |
| parent | 08f8faedd0e30f45762afbb8d4873f7041e7462c (diff) | |
syntax: Remove `#[non_exhaustive]` from `Edition`
`Edition` is not a public API, we want users to break when a new edition is added
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/edition.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax_pos/edition.rs b/src/libsyntax_pos/edition.rs index 5819cd7f480..d57078ce914 100644 --- a/src/libsyntax_pos/edition.rs +++ b/src/libsyntax_pos/edition.rs @@ -13,7 +13,6 @@ use std::str::FromStr; /// The edition of the compiler (RFC 2052) #[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug, RustcEncodable, RustcDecodable, Eq)] -#[non_exhaustive] pub enum Edition { // editions must be kept in order, oldest to newest diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index bc52a3e1c7c..074687fc726 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -17,7 +17,7 @@ use GLOBALS; use Span; -use edition::Edition; +use edition::{Edition, DEFAULT_EDITION}; use symbol::Symbol; use serialize::{Encodable, Decodable, Encoder, Decoder}; @@ -217,7 +217,7 @@ impl HygieneData { opaque_and_semitransparent: SyntaxContext(0), }], markings: FxHashMap::default(), - default_edition: Edition::Edition2015, + default_edition: DEFAULT_EDITION, } } |
