Skip to content

Commit 44db252

Browse files
committed
Rebase and fix nits
1 parent 272d4a2 commit 44db252

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/librustc_resolve/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ impl<'a, 'cl> Resolver<'a, 'cl> {
475475
return def;
476476
}
477477

478-
if *&path[0].as_str() == "test" {
478+
if kind == MacroKind::Attr && *&path[0].as_str() == "test" {
479479
return Ok(self.macro_prelude.get(&path[0].name).unwrap().def())
480480
}
481481

src/libsyntax/test.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,14 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
121121

122122
let mut item = i.into_inner();
123123
if is_test_case(&item) {
124-
debug!("this is a test function");
124+
debug!("this is a test item");
125125

126126
let test = Test {
127127
span: item.span,
128128
path: self.cx.path.clone(),
129129
};
130130
self.cx.test_cases.push(test);
131131
self.tests.push(item.ident);
132-
133-
// Ensure this item is capable of being reexported
134-
item.vis = respan(item.vis.span, ast::VisibilityKind::Public);
135132
}
136133

137134
// We don't want to recurse into anything other than mods, since

src/libsyntax_ext/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ syntax = { path = "../libsyntax" }
1616
syntax_pos = { path = "../libsyntax_pos" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }
1818
rustc_target = { path = "../librustc_target" }
19-
log = "0.4"
19+
log = "0.4"

0 commit comments

Comments
 (0)