]> git.lizzy.rs Git - rust.git/commitdiff
Fix tidy
authorManish Goregaokar <manishsmail@gmail.com>
Wed, 3 Jan 2018 06:03:04 +0000 (11:33 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Mon, 22 Jan 2018 09:54:29 +0000 (15:24 +0530)
src/librustc_resolve/lib.rs
src/librustdoc/clean/mod.rs

index 07c940612b16cac6f302393c9df4b338b684db6b..6b7ad8394601904e91d041416f73247a7b5389c7 100644 (file)
@@ -1440,7 +1440,8 @@ impl<'a> Resolver<'a> {
     /// isn't something that can be returned because it can't be made to live that long,
     /// and also it's a private type. Fortunately rustdoc doesn't need to know the error,
     /// just that an error occured.
-    pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool) -> Result<hir::Path, ()> {
+    pub fn resolve_str_path_error(&mut self, span: Span, path_str: &str, is_value: bool)
+        -> Result<hir::Path, ()> {
         use std::iter;
         let mut errored = false;
 
index dcf12ed8180e84a0db01554810d97c53e0dbf3ff..59a797b55d0626d3577891347143156280b17562 100644 (file)
@@ -834,8 +834,9 @@ fn clean(&self, cx: &DocContext) -> Attributes {
                 let path = {
                     let is_value;
                     let path_str = if let Some(prefix) =
-                        ["struct", "enum", "type", "trait", "union"].iter()
-                                                                    .find(|p| link.starts_with(**p)) {
+                        ["struct", "enum", "type",
+                         "trait", "union"].iter()
+                                          .find(|p| link.starts_with(**p)) {
                         is_value = Some(false);
                         link.trim_left_matches(prefix).trim()
                     } else if let Some(prefix) =
@@ -857,7 +858,8 @@ fn clean(&self, cx: &DocContext) -> Attributes {
                     // avoid resolving things (i.e. regular links) which aren't like paths
                     // FIXME(Manishearth) given that most links have slashes in them might be worth
                     // doing a check for slashes first
-                    if path_str.contains(|ch: char| !(ch.is_alphanumeric() || ch == ':' || ch == '_')) {
+                    if path_str.contains(|ch: char| !(ch.is_alphanumeric() ||
+                                                      ch == ':' || ch == '_')) {
                         continue;
                     }
 
@@ -867,7 +869,8 @@ fn clean(&self, cx: &DocContext) -> Attributes {
                         if let Some(id) = cx.mod_ids.borrow().last() {
                             cx.resolver.borrow_mut()
                                        .with_scope(*id, |resolver| {
-                                            resolver.resolve_str_path_error(DUMMY_SP, &path_str, is_val)
+                                            resolver.resolve_str_path_error(DUMMY_SP,
+                                                                            &path_str, is_val)
                                         })
                         } else {
                             // FIXME(Manishearth) this branch doesn't seem to ever be hit, really