diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-01-31 23:38:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-31 23:38:53 +0100 |
| commit | fe44f3bdd082eb04a1e42212e613a7c84c018f00 (patch) | |
| tree | 618f7838585584cc40d12f68ce3650d39a7e9d3f /compiler/rustc_session | |
| parent | f0e4a1c9cb7890576b22b740867608af43dac714 (diff) | |
| parent | ef6b583a80495ccbfd378eb19ebec3d633036790 (diff) | |
| download | rust-fe44f3bdd082eb04a1e42212e613a7c84c018f00.tar.gz rust-fe44f3bdd082eb04a1e42212e613a7c84c018f00.zip | |
Rollup merge of #107508 - WaffleLapkin:uneq'15, r=oli-obk
`Edition` micro refactor r? ``@oli-obk``
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 91d23f1041f..3b2cd1864c5 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -918,23 +918,24 @@ impl Session { ret } + /// Is this edition 2015? pub fn rust_2015(&self) -> bool { - self.edition() == Edition::Edition2015 + self.edition().rust_2015() } /// Are we allowed to use features from the Rust 2018 edition? pub fn rust_2018(&self) -> bool { - self.edition() >= Edition::Edition2018 + self.edition().rust_2018() } /// Are we allowed to use features from the Rust 2021 edition? pub fn rust_2021(&self) -> bool { - self.edition() >= Edition::Edition2021 + self.edition().rust_2021() } /// Are we allowed to use features from the Rust 2024 edition? pub fn rust_2024(&self) -> bool { - self.edition() >= Edition::Edition2024 + self.edition().rust_2024() } /// Returns `true` if we cannot skip the PLT for shared library calls. |
