1
Fork 0

Use Edition methods a bit more

This commit is contained in:
Maybe Waffle 2023-01-31 09:50:56 +00:00
parent dc3e59cb3f
commit fd5774a4d7
5 changed files with 11 additions and 12 deletions

View file

@ -131,7 +131,7 @@ pub fn print_crate<'a>(
// Currently, in Rust 2018 we don't have `extern crate std;` at the crate
// root, so this is not needed, and actually breaks things.
if edition == Edition::Edition2015 {
if edition.rust_2015() {
// `#![no_std]`
let fake_attr = attr::mk_attr_word(g, ast::AttrStyle::Inner, sym::no_std, DUMMY_SP);
s.print_attribute(&fake_attr);