diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 1c8a2ea575f..6b8c82fde71 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -899,6 +899,7 @@ impl Session { ret } + /// Is this edition 2015? pub fn rust_2015(&self) -> bool { self.edition().rust_2015() } diff --git a/compiler/rustc_span/src/edition.rs b/compiler/rustc_span/src/edition.rs index b43183916bc..db1cde985d3 100644 --- a/compiler/rustc_span/src/edition.rs +++ b/compiler/rustc_span/src/edition.rs @@ -76,6 +76,7 @@ impl Edition { } } + /// Is this edition 2015? pub fn rust_2015(&self) -> bool { *self == Edition::Edition2015 }