Skip to content

Commit 936e9b8

Browse files
Apply suggestion from @Urgau
shorthand is always `crate`, `self`, or `super`. Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
1 parent 0345b89 commit 936e9b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • compiler/rustc_ast_pretty/src/pprust/state

compiler/rustc_ast_pretty/src/pprust/state/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ impl<'a> State<'a> {
489489
match &impl_restriction.kind {
490490
ast::RestrictionKind::Restricted { path, shorthand, .. } => {
491491
let path = Self::to_string(|s| s.print_path(path, false, 0));
492-
if *shorthand && (path == "crate" || path == "self" || path == "super") {
492+
if *shorthand {
493493
self.word_nbsp(format!("impl({path})"))
494494
} else {
495495
self.word_nbsp(format!("impl(in {path})"))

0 commit comments

Comments
 (0)