Skip to content

Commit 5ace5b6

Browse files
committed
Fix up tests and typos
1 parent 6cf6f0f commit 5ace5b6

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

src/librustc_allocator/expand.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ impl<'a> Folder for ExpandAllocatorDirectives<'a> {
9797
]);
9898
let mut items = vec![
9999
f.cx.item_extern_crate(f.span, f.alloc),
100-
f.cx.item_use_simple(f.span, respan(f.span.empty(), VisibilityKind::Inherited), super_path),
100+
f.cx.item_use_simple(
101+
f.span,
102+
respan(f.span.empty(), VisibilityKind::Inherited),
103+
super_path,
104+
),
101105
];
102106
for method in ALLOCATOR_METHODS {
103107
items.push(f.allocator_fn(method));

src/libsyntax/parse/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ pub fn integer_lit(s: &str, suffix: Option<Symbol>, diag: Option<(Span, &Handler
664664
mod tests {
665665
use super::*;
666666
use syntax_pos::{self, Span, BytePos, Pos, NO_EXPANSION};
667-
use codemap::Spanned;
667+
use codemap::{respan, Spanned};
668668
use ast::{self, Ident, PatKind};
669669
use abi::Abi;
670670
use attr::first_attr_value_str_by_name;
@@ -932,7 +932,7 @@ mod tests {
932932
span: sp(15,21),
933933
recovered: false,
934934
})),
935-
vis: codemap::respan(sp(0, 0), ast::VisibilityKind::Inherited),
935+
vis: respan(sp(0, 0), ast::VisibilityKind::Inherited),
936936
span: sp(0,21)})));
937937
}
938938

src/libsyntax_pos/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl Span {
219219
/// Returns a new span representing an empty span at the beginning of this span
220220
#[inline]
221221
pub fn empty(self) -> Span {
222-
span.with_hi(self.lo())
222+
self.with_hi(self.lo())
223223
}
224224

225225
/// Returns `self` if `self` is not the dummy span, and `other` otherwise.

src/test/ui/error-codes/E0449.stderr

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,21 @@ error[E0449]: unnecessary visibility qualifier
22
--> $DIR/E0449.rs:17:1
33
|
44
17 | pub impl Bar {} //~ ERROR E0449
5-
| ^^^^^^^^^^^^^^^ `pub` not needed here
5+
| ^^^ `pub` not needed here
66
|
77
= note: place qualifiers on individual impl items instead
88

99
error[E0449]: unnecessary visibility qualifier
1010
--> $DIR/E0449.rs:19:1
1111
|
12-
19 | / pub impl Foo for Bar { //~ ERROR E0449
13-
20 | | pub fn foo() {} //~ ERROR E0449
14-
21 | | }
15-
| |_^ `pub` not needed here
12+
19 | pub impl Foo for Bar { //~ ERROR E0449
13+
| ^^^ `pub` not needed here
1614

1715
error[E0449]: unnecessary visibility qualifier
1816
--> $DIR/E0449.rs:20:5
1917
|
2018
20 | pub fn foo() {} //~ ERROR E0449
21-
| ^^^^^^^^^^^^^^^ `pub` not needed here
19+
| ^^^ `pub` not needed here
2220

2321
error: aborting due to 3 previous errors
2422

0 commit comments

Comments
 (0)