1
Fork 0

Rollup merge of #113765 - compiler-errors:at-least, r=oli-obk

Make it clearer that edition functions are `>=`, not `==`

r? `@Nilstrieb`

We could also perhaps derive `Ord` on `Edition` and use comparison operators.
This commit is contained in:
Dylan DPC 2023-07-19 22:37:07 +05:30 committed by GitHub
commit a47b7b013f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 46 additions and 42 deletions

View file

@ -1932,7 +1932,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
fn path_crate(mut self, cnum: CrateNum) -> Result<Self::Path, Self::Error> {
self.empty_path = true;
if cnum == LOCAL_CRATE {
if self.tcx.sess.rust_2018() {
if self.tcx.sess.at_least_rust_2018() {
// We add the `crate::` keyword on Rust 2018, only when desired.
if SHOULD_PREFIX_WITH_CRATE.with(|flag| flag.get()) {
write!(self, "{}", kw::Crate)?;