diff options
| author | Kamal Marhubi <kamal@marhubi.com> | 2016-05-01 23:01:46 -0400 |
|---|---|---|
| committer | Kamal Marhubi <kamal@marhubi.com> | 2016-05-01 23:06:58 -0400 |
| commit | fd38acb86fa991f1272013d565992f2f68d76a5f (patch) | |
| tree | 051832778b18b35cfba0b1c0a9021ad12463062a /src/utils.rs | |
| parent | 5092eec081cf83ec653efbdeff587f60e4d0ac73 (diff) | |
deps: Update syntex_syntax to 0.31.0
Most of the churn on this bump comes from the `Visibility` enum changing
from
pub enum Visibility {
Public,
Inherited,
}
to
pub enum Visibility {
Public,
Crate,
Restricted { path: P<Path>, id: NodeId },
Inherited,
}
which require taking `Visibility` by reference in most places. The new
variants are not handled at this point.
Refs #970
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs index da690f1e8ea..e1f33832a3b 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -67,10 +67,13 @@ pub fn extra_offset(text: &str, offset: Indent) -> usize { } #[inline] -pub fn format_visibility(vis: Visibility) -> &'static str { - match vis { +pub fn format_visibility(vis: &Visibility) -> &'static str { + match *vis { Visibility::Public => "pub ", Visibility::Inherited => "", + // TODO(#970): Handle new visibility types. + Visibility::Crate => unimplemented!(), + Visibility::Restricted { .. } => unimplemented!(), } } |
