Skip to content

Commit

Permalink
Fix up tests and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
topecongiro committed Feb 17, 2018
1 parent b5099a7 commit 291c51b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/librustc_allocator/expand.rs
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/parse/mod.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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)})));
}

Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax_pos/lib.rs
Expand Up @@ -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.
Expand Down
10 changes: 4 additions & 6 deletions src/test/ui/error-codes/E0449.stderr
Expand Up @@ -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

0 comments on commit 291c51b

Please sign in to comment.