Skip to content

Commit 8f75c6e

Browse files
committed
tests: fix fallout of merging ast::ViewItem into ast::Item.
1 parent 67bfb8b commit 8f75c6e

File tree

5 files changed

+11
-45
lines changed

5 files changed

+11
-45
lines changed

src/libsyntax/parse/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,25 +1109,25 @@ mod test {
11091109

11101110
#[test] fn parse_use() {
11111111
let use_s = "use foo::bar::baz;";
1112-
let vitem = string_to_item(use_s.to_string());
1113-
let vitem_s = item_to_string(&vitem);
1112+
let vitem = string_to_item(use_s.to_string()).unwrap();
1113+
let vitem_s = item_to_string(&*vitem);
11141114
assert_eq!(&vitem_s[], use_s);
11151115

11161116
let use_s = "use foo::bar as baz;";
1117-
let vitem = string_to_item(use_s.to_string());
1118-
let vitem_s = item_to_string(&vitem);
1117+
let vitem = string_to_item(use_s.to_string()).unwrap();
1118+
let vitem_s = item_to_string(&*vitem);
11191119
assert_eq!(&vitem_s[], use_s);
11201120
}
11211121

11221122
#[test] fn parse_extern_crate() {
11231123
let ex_s = "extern crate foo;";
1124-
let vitem = string_to_item(ex_s.to_string());
1125-
let vitem_s = item_to_string(&vitem);
1124+
let vitem = string_to_item(ex_s.to_string()).unwrap();
1125+
let vitem_s = item_to_string(&*vitem);
11261126
assert_eq!(&vitem_s[], ex_s);
11271127

11281128
let ex_s = "extern crate \"foo\" as bar;";
1129-
let vitem = string_to_item(ex_s.to_string());
1130-
let vitem_s = item_to_string(&vitem);
1129+
let vitem = string_to_item(ex_s.to_string()).unwrap();
1130+
let vitem_s = item_to_string(&*vitem);
11311131
assert_eq!(&vitem_s[], ex_s);
11321132
}
11331133

src/test/compile-fail-fulldeps/gated-plugin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
// aux-build:macro_crate_test.rs
1212
// ignore-stage1
1313

14-
#[plugin] #[no_link]
14+
#[plugin] #[no_link] extern crate macro_crate_test;
1515
//~^ ERROR compiler plugins are experimental and possibly buggy
16-
extern crate macro_crate_test;
1716

1817
fn main() {}

src/test/compile-fail/issue-9957.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/test/compile-fail/unnecessary-private.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
fn main() {
12+
pub use std::uint; //~ ERROR: visibility has no effect
1213
pub struct A; //~ ERROR: visibility has no effect
1314
pub enum B {} //~ ERROR: visibility has no effect
1415
pub trait C { //~ ERROR: visibility has no effect

src/test/compile-fail/view-items-at-top.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)