about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_allocator/expand.rs6
-rw-r--r--src/libsyntax/parse/mod.rs4
-rw-r--r--src/libsyntax_pos/lib.rs2
-rw-r--r--src/test/ui/error-codes/E0449.stderr10
4 files changed, 12 insertions, 10 deletions
diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs
index 26a7f50b997..c088458c355 100644
--- a/src/librustc_allocator/expand.rs
+++ b/src/librustc_allocator/expand.rs
@@ -97,7 +97,11 @@ impl<'a> Folder for ExpandAllocatorDirectives<'a> {
         ]);
         let mut items = vec![
             f.cx.item_extern_crate(f.span, f.alloc),
-            f.cx.item_use_simple(f.span, respan(f.span.empty(), VisibilityKind::Inherited), super_path),
+            f.cx.item_use_simple(
+                f.span,
+                respan(f.span.empty(), VisibilityKind::Inherited),
+                super_path,
+            ),
         ];
         for method in ALLOCATOR_METHODS {
             items.push(f.allocator_fn(method));
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index d2ae9904143..06eb64e157c 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -664,7 +664,7 @@ pub fn integer_lit(s: &str, suffix: Option<Symbol>, diag: Option<(Span, &Handler
 mod tests {
     use super::*;
     use syntax_pos::{self, Span, BytePos, Pos, NO_EXPANSION};
-    use codemap::Spanned;
+    use codemap::{respan, Spanned};
     use ast::{self, Ident, PatKind};
     use abi::Abi;
     use attr::first_attr_value_str_by_name;
@@ -932,7 +932,7 @@ mod tests {
                                         span: sp(15,21),
                                         recovered: false,
                                     })),
-                            vis: codemap::respan(sp(0, 0), ast::VisibilityKind::Inherited),
+                            vis: respan(sp(0, 0), ast::VisibilityKind::Inherited),
                             span: sp(0,21)})));
     }
 
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index f9e01b630ae..0f6dbc39e21 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -219,7 +219,7 @@ impl Span {
     /// Returns a new span representing an empty span at the beginning of this span
     #[inline]
     pub fn empty(self) -> Span {
-        span.with_hi(self.lo())
+        self.with_hi(self.lo())
     }
 
     /// Returns `self` if `self` is not the dummy span, and `other` otherwise.
diff --git a/src/test/ui/error-codes/E0449.stderr b/src/test/ui/error-codes/E0449.stderr
index 2270167303a..3587319ed0c 100644
--- a/src/test/ui/error-codes/E0449.stderr
+++ b/src/test/ui/error-codes/E0449.stderr
@@ -2,23 +2,21 @@ error[E0449]: unnecessary visibility qualifier
   --> $DIR/E0449.rs:17:1
    |
 17 | pub impl Bar {} //~ ERROR E0449
-   | ^^^^^^^^^^^^^^^ `pub` not needed here
+   | ^^^ `pub` not needed here
    |
    = note: place qualifiers on individual impl items instead
 
 error[E0449]: unnecessary visibility qualifier
   --> $DIR/E0449.rs:19:1
    |
-19 | / pub impl Foo for Bar { //~ ERROR E0449
-20 | |     pub fn foo() {} //~ ERROR E0449
-21 | | }
-   | |_^ `pub` not needed here
+19 | pub impl Foo for Bar { //~ ERROR E0449
+   | ^^^ `pub` not needed here
 
 error[E0449]: unnecessary visibility qualifier
   --> $DIR/E0449.rs:20:5
    |
 20 |     pub fn foo() {} //~ ERROR E0449
-   |     ^^^^^^^^^^^^^^^ `pub` not needed here
+   |     ^^^ `pub` not needed here
 
 error: aborting due to 3 previous errors