Skip to content

Commit 5190abb

Browse files
committed
Fix unsafe auto trait pretty print.
It was being printed wrong as auto unsafe trait
1 parent ca26f01 commit 5190abb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/libsyntax/print/pprust.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1341,8 +1341,8 @@ impl<'a> State<'a> {
13411341
ast::ItemKind::Trait(is_auto, unsafety, ref generics, ref bounds, ref trait_items) => {
13421342
self.head("")?;
13431343
self.print_visibility(&item.vis)?;
1344-
self.print_is_auto(is_auto)?;
13451344
self.print_unsafety(unsafety)?;
1345+
self.print_is_auto(is_auto)?;
13461346
self.word_nbsp("trait")?;
13471347
self.print_ident(item.ident)?;
13481348
self.print_generics(generics)?;

src/test/pretty/auto-trait.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@
1414

1515
auto trait MyTrait { }
1616

17+
unsafe auto trait UnsafeMyTrait { }
18+
1719
pub fn main() { }

0 commit comments

Comments
 (0)