]> git.lizzy.rs Git - rust.git/commitdiff
Whitespace fix again.
authorVitaly _Vi Shukela <vi0oss@gmail.com>
Mon, 17 Sep 2018 17:13:08 +0000 (20:13 +0300)
committerVitaly _Vi Shukela <vi0oss@gmail.com>
Mon, 17 Sep 2018 17:26:05 +0000 (20:26 +0300)
14 files changed:
src/librustc/infer/error_reporting/nice_region_error/named_anon_conflict.rs
src/librustc/session/mod.rs
src/librustc_borrowck/borrowck/mod.rs
src/librustc_errors/diagnostic.rs
src/librustc_passes/loops.rs
src/librustc_resolve/lib.rs
src/librustc_typeck/check/cast.rs
src/librustc_typeck/check/demand.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/op.rs
src/libsyntax/config.rs
src/libsyntax/ext/tt/macro_rules.rs
src/libsyntax/parse/parser.rs
src/libsyntax_ext/format.rs

index 05af9cffd45e3f45c99344b6047b8de8645adc46..dc0c2fdaf3ea4333e390433d9ac59d5e3b1f441b 100644 (file)
@@ -118,8 +118,8 @@ pub(super) fn try_report_named_anon_conflict(&self) -> Option<ErrorReported> {
             new_ty.to_string(),
             Applicability::Unspecified,
         )
-            .span_label(span, format!("lifetime `{}` required", named))
-            .emit();
+        .span_label(span, format!("lifetime `{}` required", named))
+        .emit();
         return Some(ErrorReported);
     }
 
index 0821e9c4b44b0e1cd44ee7c6d2980162d2882c02..baeec93eb06200861d3ebf11d37a4917ebf0815d 100644 (file)
@@ -433,11 +433,11 @@ fn diag_once<'a, 'b>(
                 DiagnosticBuilderMethod::SpanSuggestion(suggestion) => {
                     let span = span_maybe.expect("span_suggestion_* needs a span");
                     diag_builder.span_suggestion_with_applicability(
-                                                                    span,
-                                                                    message,
-                                                                    suggestion,
-                                                                    Applicability::Unspecified,
-                                                                    );
+                        span,
+                        message,
+                        suggestion,
+                        Applicability::Unspecified,
+                    );
                 }
             }
         }
index ed84e9a64f53ddfc2b5901a278381be5135160cf..8902c86c77f782a13bec90954786d4b0aff1114e 100644 (file)
@@ -868,19 +868,19 @@ fn report_bckerr(&self, err: &BckError<'a, 'tcx>) {
                                             db.note(fn_closure_msg);
                                         } else {
                                             db.span_suggestion_with_applicability(
-                                                                      sp,
-                                                                      msg,
-                                                                      suggestion,
-                                                                      Applicability::Unspecified,
-                                                                      );
+                                                sp,
+                                                msg,
+                                                suggestion,
+                                                Applicability::Unspecified,
+                                            );
                                         }
                                     } else {
                                         db.span_suggestion_with_applicability(
-                                                                      sp,
-                                                                      msg,
-                                                                      suggestion,
-                                                                      Applicability::Unspecified,
-                                                                      );
+                                            sp,
+                                            msg,
+                                            suggestion,
+                                            Applicability::Unspecified,
+                                        );
                                     }
                                 }
                                 _ => {
@@ -1344,13 +1344,13 @@ fn report_out_of_scope_escaping_closure_capture(&self,
                                                   capture_span,
                                                   Origin::Ast)
             .span_suggestion_with_applicability(
-                                         err.span,
-                                         &format!("to force the closure to take ownership of {} \
-                                                   (and any other referenced variables), \
-                                                   use the `move` keyword",
-                                                   cmt_path_or_string),
-                                         suggestion,
-                                         Applicability::MachineApplicable,
+                 err.span,
+                 &format!("to force the closure to take ownership of {} \
+                           (and any other referenced variables), \
+                           use the `move` keyword",
+                           cmt_path_or_string),
+                 suggestion,
+                 Applicability::MachineApplicable,
             )
             .emit();
         self.signal_error();
index f7e5e25c8370d5ac50281f88b16532a9f1948eab..2799f2cc81f5ab0648d078f0d19d6fdc387356ce 100644 (file)
@@ -307,9 +307,9 @@ pub fn multipart_suggestion(
         suggestion: Vec<(Span, String)>,
     ) -> &mut Self {
         self.multipart_suggestion_with_applicability(
-                                                 msg,
-                                                 suggestion,
-                                                 Applicability::Unspecified,
+            msg,
+            suggestion,
+            Applicability::Unspecified,
         )
     }
 
index 677345396c128cff0aa51b1ca96ba8fbb71d04d9..a87e86aee0cf0d395c8b87503d1903096c7f0d84 100644 (file)
@@ -142,12 +142,14 @@ fn visit_expr(&mut self, e: &'hir hir::Expr) {
                                             "can only break with a value inside \
                                             `loop` or breakable block")
                                 .span_suggestion_with_applicability(
-                                                 e.span,
-                                                 &format!("instead, use `break` on its own \
-                                                           without a value inside this `{}` loop",
-                                                          kind.name()),
-                                                 "break".to_string(),
-                                                 Applicability::MaybeIncorrect,
+                                    e.span,
+                                    &format!(
+                                        "instead, use `break` on its own \
+                                        without a value inside this `{}` loop",
+                                        kind.name()
+                                    ),
+                                    "break".to_string(),
+                                    Applicability::MaybeIncorrect,
                                 )
                                 .emit();
                         }
index 6820fd727dbed334b983f6e0ea2ed597de5ddd44..51062eae97a42fcfc5effc3ff439603662893a0a 100644 (file)
@@ -3300,11 +3300,11 @@ fn type_ascription_suggestion(&self,
                                        "expecting a type here because of type ascription");
                         if line_sp != line_base_sp {
                             err.span_suggestion_short_with_applicability(
-                                                      sp,
-                                                      "did you mean to use `;` here instead?",
-                                                      ";".to_string(),
-                                                      Applicability::MaybeIncorrect,
-                                                      );
+                                sp,
+                                "did you mean to use `;` here instead?",
+                                ";".to_string(),
+                                Applicability::MaybeIncorrect,
+                            );
                         }
                         break;
                     } else if snippet.trim().len() != 0  {
@@ -4829,8 +4829,12 @@ fn show_candidates(err: &mut DiagnosticBuilder,
             *candidate = format!("use {};\n{}", candidate, additional_newline);
         }
 
-        err.span_suggestions_with_applicability(span, &msg, path_strings,
-                                                Applicability::Unspecified);
+        err.span_suggestions_with_applicability(
+            span,
+            &msg,
+            path_strings,
+            Applicability::Unspecified,
+        );
     } else {
         let mut msg = msg;
         msg.push(':');
index 7fa50fd4f487e8e571a4a154b19cda815f755036..85641854e6e2d1d7275f9f12aa110c9b9791692c 100644 (file)
@@ -299,11 +299,12 @@ fn report_cast_error(&self, fcx: &FnCtxt<'a, 'gcx, 'tcx>, e: CastError) {
                 err.note("The type information given here is insufficient to check whether \
                           the pointer cast is valid");
                 if unknown_cast_to {
-                    err.span_suggestion_short_with_applicability(self.cast_span,
-                                              "consider giving more type information",
-                                              String::new(),
-                                              Applicability::Unspecified,
-                                              );
+                    err.span_suggestion_short_with_applicability(
+                        self.cast_span,
+                        "consider giving more type information",
+                        String::new(),
+                        Applicability::Unspecified,
+                    );
                 }
                 err.emit();
             }
@@ -329,11 +330,12 @@ fn report_cast_to_unsized_type(&self, fcx: &FnCtxt<'a, 'gcx, 'tcx>) {
                 if self.cast_ty.is_trait() {
                     match fcx.tcx.sess.source_map().span_to_snippet(self.cast_span) {
                         Ok(s) => {
-                            err.span_suggestion_with_applicability(self.cast_span,
-                                                "try casting to a reference instead",
-                                                format!("&{}{}", mtstr, s),
-                                                Applicability::MachineApplicable,
-                                                );
+                            err.span_suggestion_with_applicability(
+                                self.cast_span,
+                                "try casting to a reference instead",
+                                format!("&{}{}", mtstr, s),
+                                Applicability::MachineApplicable,
+                            );
                         }
                         Err(_) => {
                             span_help!(err, self.cast_span, "did you mean `&{}{}`?", mtstr, tstr)
@@ -350,11 +352,12 @@ fn report_cast_to_unsized_type(&self, fcx: &FnCtxt<'a, 'gcx, 'tcx>) {
             ty::Adt(def, ..) if def.is_box() => {
                 match fcx.tcx.sess.source_map().span_to_snippet(self.cast_span) {
                     Ok(s) => {
-                        err.span_suggestion_with_applicability(self.cast_span,
-                                            "try casting to a `Box` instead",
-                                            format!("Box<{}>", s),
-                                            Applicability::MachineApplicable,
-                                            );
+                        err.span_suggestion_with_applicability(
+                            self.cast_span,
+                            "try casting to a `Box` instead",
+                            format!("Box<{}>", s),
+                            Applicability::MachineApplicable,
+                        );
                     }
                     Err(_) => span_help!(err, self.cast_span, "did you mean `Box<{}>`?", tstr),
                 }
index b5b7f11be2ce1d630d5b2487ed98e21246a7b2cb..2f597161c32995e7228bef7a0bb4916f16d09ec1 100644 (file)
@@ -133,10 +133,10 @@ pub fn demand_coerce_diag(&self,
                 let suggestions = compatible_variants.iter()
                     .map(|v| format!("{}({})", v, expr_text)).collect::<Vec<_>>();
                 err.span_suggestions_with_applicability(
-                                                 expr.span,
-                                                 "try using a variant of the expected type",
-                                                 suggestions,
-                                                 Applicability::MaybeIncorrect,
+                     expr.span,
+                     "try using a variant of the expected type",
+                     suggestions,
+                     Applicability::MaybeIncorrect,
                 );
             }
         }
index dcec21c9eef3d1ed654fccd9f9d9c35fe3a92163..a5a4eaa8cb3f7adc0222294666fcc770894c71c1 100644 (file)
@@ -3349,11 +3349,11 @@ fn check_field(&self,
                         let msg = format!("`{}` is a native pointer; try dereferencing it", base);
                         let suggestion = format!("(*{}).{}", base, field);
                         err.span_suggestion_with_applicability(
-                                                               field.span,
-                                                               &msg,
-                                                               suggestion,
-                                                               Applicability::MaybeIncorrect,
-                                                               );
+                            field.span,
+                            &msg,
+                            suggestion,
+                            Applicability::MaybeIncorrect,
+                        );
                     }
                     _ => {}
                 }
@@ -4722,11 +4722,11 @@ pub fn suggest_ref_or_into(
     ) {
         if let Some((sp, msg, suggestion)) = self.check_ref(expr, found, expected) {
             err.span_suggestion_with_applicability(
-                                                   sp,
-                                                   msg,
-                                                   suggestion,
-                                                   Applicability::MachineApplicable,
-                                                   );
+                sp,
+                msg,
+                suggestion,
+                Applicability::MachineApplicable,
+            );
         } else if !self.check_for_cast(err, expr, found, expected) {
             let methods = self.get_conversion_methods(expr.span, expected, found);
             if let Ok(expr_text) = self.sess().source_map().span_to_snippet(expr.span) {
@@ -4757,11 +4757,11 @@ pub fn suggest_ref_or_into(
                     }) .collect::<Vec<_>>();
                 if !suggestions.is_empty() {
                     err.span_suggestions_with_applicability(
-                                                            expr.span,
-                                                            "try using a conversion method",
-                                                            suggestions,
-                                                            Applicability::MaybeIncorrect,
-                                                            );
+                        expr.span,
+                        "try using a conversion method",
+                        suggestions,
+                        Applicability::MaybeIncorrect,
+                    );
                 }
             }
         }
index 7b0cb7ba329960fcbd5da092814c191187516e4b..5969f288d732070ade1260148782dce99c3897fb 100644 (file)
@@ -445,10 +445,10 @@ fn check_str_addition(
                                    "`+` can't be used to concatenate two `&str` strings");
                     match source_map.span_to_snippet(lhs_expr.span) {
                         Ok(lstring) => err.span_suggestion_with_applicability(
-                                                           lhs_expr.span,
-                                                           msg,
-                                                           format!("{}.to_owned()", lstring),
-                                                           Applicability::MachineApplicable,
+                            lhs_expr.span,
+                            msg,
+                            format!("{}.to_owned()", lstring),
+                            Applicability::MachineApplicable,
                         ),
                         _ => err.help(msg),
                     };
@@ -466,12 +466,12 @@ fn check_str_addition(
                 ) {
                     (Ok(l), Ok(r), false) => {
                         err.multipart_suggestion_with_applicability(
-                                        msg,
-                                        vec![
-                                            (lhs_expr.span, format!("{}.to_owned()", l)),
-                                            (rhs_expr.span, format!("&{}", r)),
-                                        ],
-                                        Applicability::MachineApplicable,
+                            msg,
+                            vec![
+                                (lhs_expr.span, format!("{}.to_owned()", l)),
+                                (rhs_expr.span, format!("&{}", r)),
+                            ],
+                            Applicability::MachineApplicable,
                         );
                     }
                     _ => {
index df202fb6b6d177f0760b02abd1505283c97769ab..5d978b6b9e6623789db80d537d430b5ecda880fd 100644 (file)
@@ -125,10 +125,10 @@ pub fn in_cfg(&mut self, attrs: &[ast::Attribute]) -> bool {
                 let mut err = self.sess.span_diagnostic.struct_span_err(span, msg);
                 if !suggestion.is_empty() {
                     err.span_suggestion_with_applicability(
-                                                           span,
-                                                           "expected syntax is",
-                                                           suggestion.into(),
-                                                           Applicability::MaybeIncorrect,
+                        span,
+                        "expected syntax is",
+                        suggestion.into(),
+                        Applicability::MaybeIncorrect,
                     );
                 }
                 err.emit();
index bbe49d409ea288e79c8746a8ef6d7cd99f9cfc88..214bc9cffc4836ece1530718ef2c5730aa9a659e 100644 (file)
@@ -189,10 +189,10 @@ fn generic_extension<'cx>(cx: &'cx mut ExtCtxt,
                         err.note("you might be missing a comma");
                     } else {
                         err.span_suggestion_short_with_applicability(
-                                                comma_span,
-                                                "missing comma here",
-                                                ", ".to_string(),
-                                                Applicability::MachineApplicable,
+                            comma_span,
+                            "missing comma here",
+                            ", ".to_string(),
+                            Applicability::MachineApplicable,
                         );
                     }
                 }
index 18287189539019e979b8e3c06066f795981ccae7..6ec1ad969ee708de179210966587bbf46c6bc006 100644 (file)
@@ -3883,11 +3883,11 @@ fn parse_pat_fields(&mut self) -> PResult<'a, (Vec<source_map::Spanned<ast::Fiel
                     // If the struct looks otherwise well formed, recover and continue.
                     if let Some(sp) = comma_sp {
                         err.span_suggestion_short_with_applicability(
-                                                                 sp,
-                                                                 "remove this comma",
-                                                                 String::new(),
-                                                                 Applicability::MachineApplicable,
-                                                                 );
+                            sp,
+                            "remove this comma",
+                            String::new(),
+                            Applicability::MachineApplicable,
+                        );
                     }
                     err.emit();
                     break;
index 1adbbbe2446d50ac3b586a5058b6ecdc02b089bc..31e608de1f840d282eb777af314db5b3acfe097f 100644 (file)
@@ -997,9 +997,9 @@ macro_rules! check_foreign {
                     }
                     if suggestions.len() > 0 {
                         diag.multipart_suggestion_with_applicability(
-                                                    "format specifiers use curly braces",
-                                                    suggestions,
-                                                    Applicability::MachineApplicable,
+                            "format specifiers use curly braces",
+                            suggestions,
+                            Applicability::MachineApplicable,
                         );
                     }
                 }};