mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 13:43:04 +00:00
Merge pull request #2720 from tlively/pub-auto-trait
Fix position of auto in auto trait declaration
This commit is contained in:
commit
dab99b65f5
@ -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);
|
||||
|
||||
|
@ -95,3 +95,5 @@ trait FooBar = Foo
|
||||
|
||||
// #2637
|
||||
auto trait Example {}
|
||||
pub auto trait PubExample {}
|
||||
pub unsafe auto trait PubUnsafeExample {}
|
||||
|
@ -133,3 +133,5 @@ trait FooBar = Foo
|
||||
|
||||
// #2637
|
||||
auto trait Example {}
|
||||
pub auto trait PubExample {}
|
||||
pub unsafe auto trait PubUnsafeExample {}
|
||||
|
Loading…
Reference in New Issue
Block a user