Merge pull request #2720 from tlively/pub-auto-trait

Fix position of auto in auto trait declaration
This commit is contained in:
Nick Cameron 2018-05-19 11:31:59 +12:00 committed by GitHub
commit dab99b65f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -963,9 +963,9 @@ pub fn format_trait(context: &RewriteContext, item: &ast::Item, offset: Indent)
let mut result = String::with_capacity(128);
let header = format!(
"{}{}{}trait ",
format_auto(is_auto),
format_visibility(&item.vis),
format_unsafety(unsafety),
format_auto(is_auto),
);
result.push_str(&header);

View File

@ -95,3 +95,5 @@ trait FooBar = Foo
// #2637
auto trait Example {}
pub auto trait PubExample {}
pub unsafe auto trait PubUnsafeExample {}

View File

@ -133,3 +133,5 @@ trait FooBar = Foo
// #2637
auto trait Example {}
pub auto trait PubExample {}
pub unsafe auto trait PubUnsafeExample {}