about summary refs log tree commit diff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorKamal Marhubi <kamal@marhubi.com>2016-05-01 23:01:46 -0400
committerKamal Marhubi <kamal@marhubi.com>2016-05-01 23:06:58 -0400
commitfd38acb86fa991f1272013d565992f2f68d76a5f (patch)
tree051832778b18b35cfba0b1c0a9021ad12463062a /src/utils.rs
parent5092eec081cf83ec653efbdeff587f60e4d0ac73 (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.rs7
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!(),
     }
 }