use crate::symbol::{Symbol, sym};
use std::fmt;
use std::str::FromStr;
-use crate::GLOBALS;
+
+use rustc_macros::HashStable_Generic;
/// The edition of the compiler (RFC 2052)
-#[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug, RustcEncodable, RustcDecodable, Eq)]
+#[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug,
+ RustcEncodable, RustcDecodable, Eq, HashStable_Generic)]
pub enum Edition {
// editions must be kept in order, oldest to newest
}
impl Edition {
- pub fn from_session() -> Edition {
- GLOBALS.with(|globals| globals.edition)
- }
-
pub fn lint_name(&self) -> &'static str {
match *self {
Edition::Edition2015 => "rust_2015_compatibility",