-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edition
micro refactor
#107508
Edition
micro refactor
#107508
Conversation
@bors r+ rollup |
`Edition` micro refactor r? `@oli-obk`
/// 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() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, so rust_2015
is edition == 2015
, but rust_2018
is edition >= 2018
? That's a bit confusing IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could rename rust_2015
.. or rename all the subsequent ones to at_least_rust_2018
? idk
`Edition` micro refactor r? `@oli-obk`
…llaumeGomez Rollup of 12 pull requests Successful merges: - rust-lang#106898 (Include both md and yaml ICE ticket templates) - rust-lang#107331 (Clean up eslint annotations and remove unused JS function) - rust-lang#107348 (small refactor to new projection code) - rust-lang#107354 (rustdoc: update Source Serif 4 from 4.004 to 4.005) - rust-lang#107412 (avoid needless checks) - rust-lang#107467 (Improve enum checks) - rust-lang#107486 (Track bound types like bound regions) - rust-lang#107491 (rustdoc: remove unused CSS from `.setting-check`) - rust-lang#107508 (`Edition` micro refactor) - rust-lang#107525 (PointeeInfo is advisory only) - rust-lang#107527 (rustdoc: stop making unstable items transparent) - rust-lang#107535 (Replace unwrap with ? in TcpListener doc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Rename `rust_2015` → `is_rust_2015` r? `@compiler-errors` rust-lang#107508 (comment)
Rename `rust_2015` → `is_rust_2015` r? `@compiler-errors` rust-lang#107508 (comment)
Rename `rust_2015` → `is_rust_2015` r? ``@compiler-errors`` rust-lang#107508 (comment)
Rename `rust_2015` → `is_rust_2015` r? ```@compiler-errors``` rust-lang#107508 (comment)
r? @oli-obk