diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-09-21 18:10:45 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-09-21 18:11:43 -0700 |
| commit | dffe188991325b4e803fdd0da7c1563ce0fa27f4 (patch) | |
| tree | e8f65929b804a38550dc9fdcf24021e6a7920304 /src/test | |
| parent | 60443d48881bfbc7a305e807390e74b327f100b8 (diff) | |
| download | rust-dffe188991325b4e803fdd0da7c1563ce0fa27f4.tar.gz rust-dffe188991325b4e803fdd0da7c1563ce0fa27f4.zip | |
Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports];
Diffstat (limited to 'src/test')
169 files changed, 339 insertions, 20 deletions
diff --git a/src/test/auxiliary/cci_class.rs b/src/test/auxiliary/cci_class.rs index b08f8def5ad..8f4055cd415 100644 --- a/src/test/auxiliary/cci_class.rs +++ b/src/test/auxiliary/cci_class.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/auxiliary/cci_class_2.rs b/src/test/auxiliary/cci_class_2.rs index bfbf58ddd11..e572f41322c 100644 --- a/src/test/auxiliary/cci_class_2.rs +++ b/src/test/auxiliary/cci_class_2.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/auxiliary/cci_class_3.rs b/src/test/auxiliary/cci_class_3.rs index a16c6b4c3a9..79583a6134c 100644 --- a/src/test/auxiliary/cci_class_3.rs +++ b/src/test/auxiliary/cci_class_3.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/auxiliary/cci_class_4.rs b/src/test/auxiliary/cci_class_4.rs index 32da73d14e4..57c6f2f4b52 100644 --- a/src/test/auxiliary/cci_class_4.rs +++ b/src/test/auxiliary/cci_class_4.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/auxiliary/cci_class_5.rs b/src/test/auxiliary/cci_class_5.rs index f2c34722bd2..94451ba4c4b 100644 --- a/src/test/auxiliary/cci_class_5.rs +++ b/src/test/auxiliary/cci_class_5.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat { priv { diff --git a/src/test/auxiliary/cci_class_6.rs b/src/test/auxiliary/cci_class_6.rs index 0d41bccfd33..72262781222 100644 --- a/src/test/auxiliary/cci_class_6.rs +++ b/src/test/auxiliary/cci_class_6.rs @@ -1,4 +1,5 @@ mod kitties { + #[legacy_exports]; struct cat<U> { priv mut info : ~[U], diff --git a/src/test/auxiliary/cci_class_cast.rs b/src/test/auxiliary/cci_class_cast.rs index 2471c9f4ccf..550dfb6886a 100644 --- a/src/test/auxiliary/cci_class_cast.rs +++ b/src/test/auxiliary/cci_class_cast.rs @@ -2,6 +2,7 @@ use to_str::*; use to_str::ToStr; mod kitty { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/auxiliary/cci_class_trait.rs b/src/test/auxiliary/cci_class_trait.rs index 94535f0a2c0..78e6af4c8c7 100644 --- a/src/test/auxiliary/cci_class_trait.rs +++ b/src/test/auxiliary/cci_class_trait.rs @@ -1,4 +1,5 @@ mod animals { + #[legacy_exports]; trait noisy { fn speak(); diff --git a/src/test/auxiliary/cci_intrinsic.rs b/src/test/auxiliary/cci_intrinsic.rs index b75462b3c4a..767f5d4ad68 100644 --- a/src/test/auxiliary/cci_intrinsic.rs +++ b/src/test/auxiliary/cci_intrinsic.rs @@ -1,5 +1,6 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn atomic_xchg(dst: &mut int, src: int) -> int; fn atomic_xchg_acq(dst: &mut int, src: int) -> int; fn atomic_xchg_rel(dst: &mut int, src: int) -> int; diff --git a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs b/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs index e9becef99b5..9ab96f45a34 100644 --- a/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs +++ b/src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs @@ -5,6 +5,7 @@ export rust; use name_pool::add; mod name_pool { + #[legacy_exports]; type name_pool = (); @@ -19,6 +20,7 @@ mod name_pool { } mod rust { + #[legacy_exports]; import name_pool::add; // FIXME #3155: this is a hack diff --git a/src/test/auxiliary/crateresolve7x.rs b/src/test/auxiliary/crateresolve7x.rs index 45a41581b3a..520a207345f 100644 --- a/src/test/auxiliary/crateresolve7x.rs +++ b/src/test/auxiliary/crateresolve7x.rs @@ -4,11 +4,13 @@ // These both have the same version but differ in other metadata mod a { + #[legacy_exports]; extern mod cr_1 (name = "crateresolve_calories", vers = "0.1", calories="100"); fn f() -> int { cr_1::f() } } mod b { + #[legacy_exports]; extern mod cr_2 (name = "crateresolve_calories", vers = "0.1", calories="200"); fn f() -> int { cr_2::f() } } diff --git a/src/test/auxiliary/extern-crosscrate-source.rs b/src/test/auxiliary/extern-crosscrate-source.rs index f42d65c2436..80bf51f31e1 100644 --- a/src/test/auxiliary/extern-crosscrate-source.rs +++ b/src/test/auxiliary/extern-crosscrate-source.rs @@ -4,6 +4,7 @@ #[crate_type = "lib"]; extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/auxiliary/foreign_lib.rs b/src/test/auxiliary/foreign_lib.rs index c33ced59fec..6ea28255421 100644 --- a/src/test/auxiliary/foreign_lib.rs +++ b/src/test/auxiliary/foreign_lib.rs @@ -1,5 +1,6 @@ #[link(name="foreign_lib", vers="0.0")]; extern mod rustrt { + #[legacy_exports]; fn last_os_error() -> ~str; } \ No newline at end of file diff --git a/src/test/auxiliary/issue-3012-1.rs b/src/test/auxiliary/issue-3012-1.rs index 258f681a9c6..a9d371321f8 100644 --- a/src/test/auxiliary/issue-3012-1.rs +++ b/src/test/auxiliary/issue-3012-1.rs @@ -2,6 +2,7 @@ #[crate_type = "lib"]; mod socket { + #[legacy_exports]; export socket_handle; diff --git a/src/test/auxiliary/issue_2316_b.rs b/src/test/auxiliary/issue_2316_b.rs index 0e3057cbc78..d30028e44cf 100644 --- a/src/test/auxiliary/issue_2316_b.rs +++ b/src/test/auxiliary/issue_2316_b.rs @@ -1,6 +1,7 @@ extern mod issue_2316_a; mod cloth { + #[legacy_exports]; use issue_2316_a::*; diff --git a/src/test/auxiliary/noexporttypelib.rs b/src/test/auxiliary/noexporttypelib.rs index ef4dcdfbdda..f97a645ca8f 100644 --- a/src/test/auxiliary/noexporttypelib.rs +++ b/src/test/auxiliary/noexporttypelib.rs @@ -1,3 +1,4 @@ +#[legacy_exports]; export foo; type oint = Option<int>; fn foo() -> oint { Some(3) } diff --git a/src/test/auxiliary/static-methods-crate.rs b/src/test/auxiliary/static-methods-crate.rs index cd011227c84..159a1e1b8ba 100644 --- a/src/test/auxiliary/static-methods-crate.rs +++ b/src/test/auxiliary/static-methods-crate.rs @@ -2,7 +2,7 @@ vers = "0.1")]; #[crate_type = "lib"]; - +#[legacy_exports]; export read, readMaybe; trait read { diff --git a/src/test/auxiliary/test_comm.rs b/src/test/auxiliary/test_comm.rs index fed01e6a30e..7e5474df906 100644 --- a/src/test/auxiliary/test_comm.rs +++ b/src/test/auxiliary/test_comm.rs @@ -91,6 +91,7 @@ type port_id = int; #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; fn new_port(unit_sz: libc::size_t) -> *rust_port; fn del_port(po: *rust_port); @@ -104,6 +105,7 @@ extern mod rustrt { #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn init<T>() -> T; } diff --git a/src/test/bench/shootout-nbody.rs b/src/test/bench/shootout-nbody.rs index 15b103ca99c..129c1ad5a8e 100644 --- a/src/test/bench/shootout-nbody.rs +++ b/src/test/bench/shootout-nbody.rs @@ -10,6 +10,7 @@ extern mod std; // an llvm intrinsic. #[nolink] extern mod libc { + #[legacy_exports]; fn sqrt(n: float) -> float; } @@ -30,6 +31,7 @@ fn main(args: ~[~str]) { } mod NBodySystem { + #[legacy_exports]; fn make() -> ~[Body::props] { let bodies: ~[Body::props] = @@ -128,6 +130,7 @@ mod NBodySystem { } mod Body { + #[legacy_exports]; const PI: float = 3.141592653589793; const SOLAR_MASS: float = 39.478417604357432; diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs index b7d6e4769a0..95155a8d283 100644 --- a/src/test/bench/task-perf-word-count-generic.rs +++ b/src/test/bench/task-perf-word-count-generic.rs @@ -109,6 +109,7 @@ fn box<T>(+x: T) -> box<T> { } mod map_reduce { + #[legacy_exports]; export putter; export getter; export mapper; diff --git a/src/test/compile-fail/attr-bad-meta.rs b/src/test/compile-fail/attr-bad-meta.rs index 6b074d736cd..6d7ffae620c 100644 --- a/src/test/compile-fail/attr-bad-meta.rs +++ b/src/test/compile-fail/attr-bad-meta.rs @@ -2,4 +2,5 @@ // asterisk is bogus #[attr*] -mod m { } +mod m { + #[legacy_exports]; } diff --git a/src/test/compile-fail/bad-expr-path.rs b/src/test/compile-fail/bad-expr-path.rs index 62fc81649ff..e38ca8443bc 100644 --- a/src/test/compile-fail/bad-expr-path.rs +++ b/src/test/compile-fail/bad-expr-path.rs @@ -1,5 +1,6 @@ // error-pattern: unresolved name: m1::a -mod m1 { } +mod m1 { + #[legacy_exports]; } fn main(args: ~[str]) { log(debug, m1::a); } diff --git a/src/test/compile-fail/bad-expr-path2.rs b/src/test/compile-fail/bad-expr-path2.rs index fe2501b29f7..a7f23df1c66 100644 --- a/src/test/compile-fail/bad-expr-path2.rs +++ b/src/test/compile-fail/bad-expr-path2.rs @@ -1,7 +1,9 @@ // error-pattern: unresolved name: m1::a mod m1 { - mod a { } + #[legacy_exports]; + mod a { + #[legacy_exports]; } } fn main(args: ~[str]) { log(debug, m1::a); } diff --git a/src/test/compile-fail/crateresolve2.rs b/src/test/compile-fail/crateresolve2.rs index 9f23d30fdde..91b2c95b8a7 100644 --- a/src/test/compile-fail/crateresolve2.rs +++ b/src/test/compile-fail/crateresolve2.rs @@ -6,6 +6,7 @@ extern mod crateresolve2(vers = "0.1"); mod m { + #[legacy_exports]; extern mod crateresolve2(vers = "0.2"); } diff --git a/src/test/compile-fail/empty-linkname.rs b/src/test/compile-fail/empty-linkname.rs index 0b6cd08d6bc..c9f2775329c 100644 --- a/src/test/compile-fail/empty-linkname.rs +++ b/src/test/compile-fail/empty-linkname.rs @@ -2,4 +2,5 @@ #[link_name = ""] extern mod foo { + #[legacy_exports]; } diff --git a/src/test/compile-fail/empty-linkname2.rs b/src/test/compile-fail/empty-linkname2.rs index 2c87c7308e2..faf283ef4a1 100644 --- a/src/test/compile-fail/empty-linkname2.rs +++ b/src/test/compile-fail/empty-linkname2.rs @@ -4,4 +4,5 @@ #[link_name = ""] #[nolink] extern mod foo { + #[legacy_exports]; } diff --git a/src/test/compile-fail/export-fully-qualified.rs b/src/test/compile-fail/export-fully-qualified.rs index 30075a1cadb..5a711ff95bd 100644 --- a/src/test/compile-fail/export-fully-qualified.rs +++ b/src/test/compile-fail/export-fully-qualified.rs @@ -5,6 +5,7 @@ // want to change eventually. mod foo { + #[legacy_exports]; export bar; diff --git a/src/test/compile-fail/export-import.rs b/src/test/compile-fail/export-import.rs index 6c9f8d15698..c6a9d3c0528 100644 --- a/src/test/compile-fail/export-import.rs +++ b/src/test/compile-fail/export-import.rs @@ -3,6 +3,7 @@ use m::unexported; mod m { + #[legacy_exports]; export exported; fn exported() { } diff --git a/src/test/compile-fail/export-tag-variant.rs b/src/test/compile-fail/export-tag-variant.rs index 7f0d7a90d38..ceedf719dd3 100644 --- a/src/test/compile-fail/export-tag-variant.rs +++ b/src/test/compile-fail/export-tag-variant.rs @@ -1,6 +1,7 @@ // error-pattern: unresolved name mod foo { + #[legacy_exports]; export x; fn x() { } diff --git a/src/test/compile-fail/export.rs b/src/test/compile-fail/export.rs index bda344587d9..69485a0ead5 100644 --- a/src/test/compile-fail/export.rs +++ b/src/test/compile-fail/export.rs @@ -1,5 +1,6 @@ // error-pattern: unresolved name mod foo { + #[legacy_exports]; export x; fn x(y: int) { log(debug, y); } fn z(y: int) { log(debug, y); } diff --git a/src/test/compile-fail/export2.rs b/src/test/compile-fail/export2.rs index cc2fcf31e9e..b1912397f4c 100644 --- a/src/test/compile-fail/export2.rs +++ b/src/test/compile-fail/export2.rs @@ -1,12 +1,14 @@ // error-pattern: unresolved name mod foo { + #[legacy_exports]; export x; fn x() { bar::x(); } } mod bar { + #[legacy_exports]; export y; fn x() { debug!("x"); } diff --git a/src/test/compile-fail/foreign-unsafe-fn-called.rs b/src/test/compile-fail/foreign-unsafe-fn-called.rs index c5c80d3a852..db1d3195eec 100644 --- a/src/test/compile-fail/foreign-unsafe-fn-called.rs +++ b/src/test/compile-fail/foreign-unsafe-fn-called.rs @@ -2,6 +2,7 @@ #[abi = "cdecl"] extern mod test { + #[legacy_exports]; unsafe fn free(); } diff --git a/src/test/compile-fail/foreign-unsafe-fn.rs b/src/test/compile-fail/foreign-unsafe-fn.rs index f0619e107bd..03c16199843 100644 --- a/src/test/compile-fail/foreign-unsafe-fn.rs +++ b/src/test/compile-fail/foreign-unsafe-fn.rs @@ -2,6 +2,7 @@ #[abi = "cdecl"] extern mod test { + #[legacy_exports]; unsafe fn free(); } diff --git a/src/test/compile-fail/fully-qualified-type-name2.rs b/src/test/compile-fail/fully-qualified-type-name2.rs index 12125422a94..454e7012d37 100644 --- a/src/test/compile-fail/fully-qualified-type-name2.rs +++ b/src/test/compile-fail/fully-qualified-type-name2.rs @@ -1,10 +1,12 @@ // Test that we use fully-qualified type names in error messages. mod x { + #[legacy_exports]; enum foo { } } mod y { + #[legacy_exports]; enum foo { } } diff --git a/src/test/compile-fail/import-from-missing.rs b/src/test/compile-fail/import-from-missing.rs index bd3a35ad280..9b408100eee 100644 --- a/src/test/compile-fail/import-from-missing.rs +++ b/src/test/compile-fail/import-from-missing.rs @@ -3,6 +3,7 @@ use spam::{ham, eggs}; mod spam { + #[legacy_exports]; fn ham() { } } diff --git a/src/test/compile-fail/import-from-rename.rs b/src/test/compile-fail/import-from-rename.rs index c72d9fda4e5..bbcb6e47882 100644 --- a/src/test/compile-fail/import-from-rename.rs +++ b/src/test/compile-fail/import-from-rename.rs @@ -3,6 +3,7 @@ use baz = foo::{bar}; mod foo { + #[legacy_exports]; fn bar() {} } diff --git a/src/test/compile-fail/import-glob-0.rs b/src/test/compile-fail/import-glob-0.rs index e9b485e4c6c..7ce73b7787f 100644 --- a/src/test/compile-fail/import-glob-0.rs +++ b/src/test/compile-fail/import-glob-0.rs @@ -3,6 +3,7 @@ use module_of_many_things::*; mod module_of_many_things { + #[legacy_exports]; export f1; export f2; export f4; diff --git a/src/test/compile-fail/import-glob-circular.rs b/src/test/compile-fail/import-glob-circular.rs index a3847c989d1..091b1e783b7 100644 --- a/src/test/compile-fail/import-glob-circular.rs +++ b/src/test/compile-fail/import-glob-circular.rs @@ -1,6 +1,7 @@ // error-pattern: unresolved mod circ1 { + #[legacy_exports]; use circ1::*; export f1; export f2; @@ -10,6 +11,7 @@ mod circ1 { } mod circ2 { + #[legacy_exports]; use circ2::*; export f1; export f2; @@ -19,6 +21,7 @@ mod circ2 { } mod test { + #[legacy_exports]; use circ1::*; fn test() { f1066(); } diff --git a/src/test/compile-fail/import-glob-export.rs b/src/test/compile-fail/import-glob-export.rs index 067caab3542..4e62df3cc00 100644 --- a/src/test/compile-fail/import-glob-export.rs +++ b/src/test/compile-fail/import-glob-export.rs @@ -4,6 +4,7 @@ use m1::*; mod m1 { + #[legacy_exports]; export f1; fn f1() { } fn f2() { } diff --git a/src/test/compile-fail/import-glob-rename.rs b/src/test/compile-fail/import-glob-rename.rs index 3fd927d7e64..24fe3fd74b9 100644 --- a/src/test/compile-fail/import-glob-rename.rs +++ b/src/test/compile-fail/import-glob-rename.rs @@ -3,6 +3,7 @@ use baz = foo::*; mod foo { + #[legacy_exports]; fn bar() {} } diff --git a/src/test/compile-fail/import-loop-2.rs b/src/test/compile-fail/import-loop-2.rs index 7cedd8a9c41..6a4d31c2ef3 100644 --- a/src/test/compile-fail/import-loop-2.rs +++ b/src/test/compile-fail/import-loop-2.rs @@ -1,11 +1,13 @@ // error-pattern:import mod a { + #[legacy_exports]; import b::x; export x; } mod b { + #[legacy_exports]; import a::x; export x; diff --git a/src/test/compile-fail/import-loop.rs b/src/test/compile-fail/import-loop.rs index 0b263f23087..11745f302bf 100644 --- a/src/test/compile-fail/import-loop.rs +++ b/src/test/compile-fail/import-loop.rs @@ -3,6 +3,7 @@ use y::x; mod y { + #[legacy_exports]; import x; export x; } diff --git a/src/test/compile-fail/import.rs b/src/test/compile-fail/import.rs index 14f23dec5f3..6863d2b1a7a 100644 --- a/src/test/compile-fail/import.rs +++ b/src/test/compile-fail/import.rs @@ -3,6 +3,7 @@ use zed::bar; use zed::baz; mod zed { + #[legacy_exports]; fn bar() { debug!("bar"); } } fn main(args: ~[str]) { bar(); } diff --git a/src/test/compile-fail/import2.rs b/src/test/compile-fail/import2.rs index ab9ea6b26df..7b1f258a9db 100644 --- a/src/test/compile-fail/import2.rs +++ b/src/test/compile-fail/import2.rs @@ -1,7 +1,9 @@ // error-pattern: unresolved use baz::zed::bar; -mod baz { } +mod baz { + #[legacy_exports]; } mod zed { + #[legacy_exports]; fn bar() { debug!("bar3"); } } fn main(args: ~[str]) { bar(); } diff --git a/src/test/compile-fail/import4.rs b/src/test/compile-fail/import4.rs index 6717434273f..22068f1badf 100644 --- a/src/test/compile-fail/import4.rs +++ b/src/test/compile-fail/import4.rs @@ -1,6 +1,8 @@ // error-pattern: import -mod a { import foo = b::foo; export foo; } -mod b { import foo = a::foo; export foo; } +mod a { + #[legacy_exports]; import foo = b::foo; export foo; } +mod b { + #[legacy_exports]; import foo = a::foo; export foo; } fn main(args: ~[str]) { debug!("loop"); } diff --git a/src/test/compile-fail/issue-1193.rs b/src/test/compile-fail/issue-1193.rs index e9a5d91c9d2..ba21c995adb 100644 --- a/src/test/compile-fail/issue-1193.rs +++ b/src/test/compile-fail/issue-1193.rs @@ -1,5 +1,6 @@ // error-pattern: pattern variable conflicts mod foo { + #[legacy_exports]; type t = u8; const a : t = 0u8; diff --git a/src/test/compile-fail/issue-1655.rs b/src/test/compile-fail/issue-1655.rs index bfaca3155f8..91a3c3f25c0 100644 --- a/src/test/compile-fail/issue-1655.rs +++ b/src/test/compile-fail/issue-1655.rs @@ -1,5 +1,6 @@ // error-pattern:expected item mod blade_runner { + #[legacy_exports]; #~[doc( brief = "Blade Runner is probably the best movie ever", desc = "I like that in the world of Blade Runner it is always diff --git a/src/test/compile-fail/issue-2123.rs b/src/test/compile-fail/issue-2123.rs index 843fd2b14eb..4912433c2ad 100644 --- a/src/test/compile-fail/issue-2123.rs +++ b/src/test/compile-fail/issue-2123.rs @@ -3,6 +3,7 @@ use x = m::f; mod m { + #[legacy_exports]; } fn main() { diff --git a/src/test/compile-fail/issue-2718-a.rs b/src/test/compile-fail/issue-2718-a.rs index b857af4e2f3..fa519453ca2 100644 --- a/src/test/compile-fail/issue-2718-a.rs +++ b/src/test/compile-fail/issue-2718-a.rs @@ -4,6 +4,7 @@ struct send_packet<T: Copy> { mod pingpong { + #[legacy_exports]; type ping = send_packet<pong>; enum pong = send_packet<ping>; //~ ERROR illegal recursive enum type; wrap the inner value in a box to make it representable } diff --git a/src/test/compile-fail/issue-2766-a.rs b/src/test/compile-fail/issue-2766-a.rs index 78225ba15ec..28042e77a5e 100644 --- a/src/test/compile-fail/issue-2766-a.rs +++ b/src/test/compile-fail/issue-2766-a.rs @@ -1,6 +1,8 @@ mod stream { + #[legacy_exports]; enum stream<T: Send> { send(T, server::stream<T>), } mod server { + #[legacy_exports]; impl<T: Send> stream<T> { fn recv() -> extern fn(+stream<T>) -> stream::stream<T> { // resolve really should report just one error here. diff --git a/src/test/compile-fail/issue-2848.rs b/src/test/compile-fail/issue-2848.rs index b091dc71357..689b8240140 100644 --- a/src/test/compile-fail/issue-2848.rs +++ b/src/test/compile-fail/issue-2848.rs @@ -1,4 +1,5 @@ mod bar { + #[legacy_exports]; enum foo { alpha, beta, diff --git a/src/test/compile-fail/issue-2937.rs b/src/test/compile-fail/issue-2937.rs index c923d1d2dbe..85ba4c2eabf 100644 --- a/src/test/compile-fail/issue-2937.rs +++ b/src/test/compile-fail/issue-2937.rs @@ -2,6 +2,7 @@ use x = m::f; mod m { + #[legacy_exports]; } fn main() { diff --git a/src/test/compile-fail/issue-3099-b.rs b/src/test/compile-fail/issue-3099-b.rs index 307c629d51f..997bb9e2557 100644 --- a/src/test/compile-fail/issue-3099-b.rs +++ b/src/test/compile-fail/issue-3099-b.rs @@ -1,5 +1,7 @@ +#[legacy_exports] mod a {} +#[legacy_exports] mod a {} //~ ERROR Duplicate definition of module a fn main() {} diff --git a/src/test/compile-fail/keyword.rs b/src/test/compile-fail/keyword.rs index 02d0b089199..e39046fa9f7 100644 --- a/src/test/compile-fail/keyword.rs +++ b/src/test/compile-fail/keyword.rs @@ -1,3 +1,4 @@ +#[legacy_exports] mod break { //~^ ERROR found `break` in ident position } \ No newline at end of file diff --git a/src/test/compile-fail/nolink-with-link-args.rs b/src/test/compile-fail/nolink-with-link-args.rs index 713c8033a0e..d17aed4d5a7 100644 --- a/src/test/compile-fail/nolink-with-link-args.rs +++ b/src/test/compile-fail/nolink-with-link-args.rs @@ -6,6 +6,7 @@ the compiler output. */ #[link_args = "aFdEfSeVEEE"] #[nolink] -extern mod m1 { } +extern mod m1 { + #[legacy_exports]; } fn main() { } \ No newline at end of file diff --git a/src/test/compile-fail/private-impl-method.rs b/src/test/compile-fail/private-impl-method.rs index 2d6047b3647..a94bc37e132 100644 --- a/src/test/compile-fail/private-impl-method.rs +++ b/src/test/compile-fail/private-impl-method.rs @@ -1,4 +1,5 @@ mod a { + #[legacy_exports]; struct Foo { x: int } diff --git a/src/test/compile-fail/private-item-simple.rs b/src/test/compile-fail/private-item-simple.rs index 305899799fd..b39c51c1846 100644 --- a/src/test/compile-fail/private-item-simple.rs +++ b/src/test/compile-fail/private-item-simple.rs @@ -1,4 +1,5 @@ mod a { + #[legacy_exports]; priv fn f() {} } diff --git a/src/test/compile-fail/private-method.rs b/src/test/compile-fail/private-method.rs index 0f489a7dc76..0b4dd71da64 100644 --- a/src/test/compile-fail/private-method.rs +++ b/src/test/compile-fail/private-method.rs @@ -1,6 +1,7 @@ // error-pattern:method `nap` is private mod kitties { + #[legacy_exports]; struct cat { priv mut meows : uint, diff --git a/src/test/compile-fail/private-struct-field-ctor.rs b/src/test/compile-fail/private-struct-field-ctor.rs index 6d075cbd7ad..a766a7ed66a 100644 --- a/src/test/compile-fail/private-struct-field-ctor.rs +++ b/src/test/compile-fail/private-struct-field-ctor.rs @@ -1,4 +1,5 @@ mod a { + #[legacy_exports]; struct Foo { priv x: int } diff --git a/src/test/compile-fail/private-struct-field-pattern.rs b/src/test/compile-fail/private-struct-field-pattern.rs index cc3ebc92172..4ab5934c287 100644 --- a/src/test/compile-fail/private-struct-field-pattern.rs +++ b/src/test/compile-fail/private-struct-field-pattern.rs @@ -1,6 +1,7 @@ use a::Foo; mod a { + #[legacy_exports]; struct Foo { priv x: int } diff --git a/src/test/compile-fail/private-struct-field.rs b/src/test/compile-fail/private-struct-field.rs index 5dffdfa4fd1..1ec9ffcd306 100644 --- a/src/test/compile-fail/private-struct-field.rs +++ b/src/test/compile-fail/private-struct-field.rs @@ -1,4 +1,5 @@ mod cat { + #[legacy_exports]; struct Cat { priv meows: uint } diff --git a/src/test/compile-fail/private-variant.rs b/src/test/compile-fail/private-variant.rs index 2b31b550e24..12d2ee401ef 100644 --- a/src/test/compile-fail/private-variant.rs +++ b/src/test/compile-fail/private-variant.rs @@ -1,4 +1,5 @@ mod a { + #[legacy_exports]; enum Waffle { Belgian, Brussels, diff --git a/src/test/compile-fail/redundant-link-args.rs b/src/test/compile-fail/redundant-link-args.rs index 6a316886fe0..88d0e4a53ee 100644 --- a/src/test/compile-fail/redundant-link-args.rs +++ b/src/test/compile-fail/redundant-link-args.rs @@ -9,9 +9,11 @@ #[link_name= "m"] #[link_args="-foo"] // this could have been elided. extern mod m1 { + #[legacy_exports]; } #[link_name= "m"] #[link_args="-bar"] // this is the actual error trigger. extern mod m2 { + #[legacy_exports]; } diff --git a/src/test/compile-fail/regions-glb-free-free.rs b/src/test/compile-fail/regions-glb-free-free.rs index d7f6d42c74e..223665381da 100644 --- a/src/test/compile-fail/regions-glb-free-free.rs +++ b/src/test/compile-fail/regions-glb-free-free.rs @@ -1,4 +1,5 @@ mod argparse { + #[legacy_exports]; extern mod std; use either::{Either, Left, Right}; diff --git a/src/test/compile-fail/unused-imports-warn.rs b/src/test/compile-fail/unused-imports-warn.rs index da1fb692c06..24f423400aa 100644 --- a/src/test/compile-fail/unused-imports-warn.rs +++ b/src/test/compile-fail/unused-imports-warn.rs @@ -3,12 +3,15 @@ use cal = bar::c::cc; mod foo { + #[legacy_exports]; type point = {x: int, y: int}; type square = {p: point, h: uint, w: uint}; } mod bar { + #[legacy_exports]; mod c { + #[legacy_exports]; use foo::point; use foo::square; fn cc(p: point) -> str { return 2 * (p.x + p.y); } diff --git a/src/test/compile-fail/warn-ctypes-err-attr.rs b/src/test/compile-fail/warn-ctypes-err-attr.rs index de2849a78de..8c8bcd58a4f 100644 --- a/src/test/compile-fail/warn-ctypes-err-attr.rs +++ b/src/test/compile-fail/warn-ctypes-err-attr.rs @@ -3,6 +3,7 @@ #[nolink] extern mod libc { + #[legacy_exports]; fn malloc(size: int) -> *u8; } diff --git a/src/test/compile-fail/warn-ctypes.rs b/src/test/compile-fail/warn-ctypes.rs index 1bf05b4c190..76b18e7094c 100644 --- a/src/test/compile-fail/warn-ctypes.rs +++ b/src/test/compile-fail/warn-ctypes.rs @@ -2,6 +2,7 @@ // error-pattern:found rust type #[nolink] extern mod libc { + #[legacy_exports]; fn malloc(size: int) -> *u8; } diff --git a/src/test/compile-fail/warn-foreign-int-types.rs b/src/test/compile-fail/warn-foreign-int-types.rs index 4ff7d0edf05..8322a25543e 100644 --- a/src/test/compile-fail/warn-foreign-int-types.rs +++ b/src/test/compile-fail/warn-foreign-int-types.rs @@ -1,5 +1,6 @@ //error-pattern:libc::c_int or libc::c_long should be used extern mod xx { + #[legacy_exports]; fn strlen(str: *u8) -> uint; fn foo(x: int, y: uint); } diff --git a/src/test/run-fail/extern-fail.rs b/src/test/run-fail/extern-fail.rs index 71343c6751e..405cd5fdb84 100644 --- a/src/test/run-fail/extern-fail.rs +++ b/src/test/run-fail/extern-fail.rs @@ -3,6 +3,7 @@ // Instead the failure will be delivered after the callbacks return. extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-fail/morestack2.rs b/src/test/run-fail/morestack2.rs index 83499baf0d0..d0b6f727b64 100644 --- a/src/test/run-fail/morestack2.rs +++ b/src/test/run-fail/morestack2.rs @@ -8,6 +8,7 @@ extern mod std; extern mod rustrt { + #[legacy_exports]; fn last_os_error() -> ~str; } diff --git a/src/test/run-fail/run-unexported-tests.rs b/src/test/run-fail/run-unexported-tests.rs index 5991f0921ea..59da245d114 100644 --- a/src/test/run-fail/run-unexported-tests.rs +++ b/src/test/run-fail/run-unexported-tests.rs @@ -4,6 +4,7 @@ extern mod std; mod m { + #[legacy_exports]; export exported; fn exported() { } diff --git a/src/test/run-pass/alt-path.rs b/src/test/run-pass/alt-path.rs index cd8b21fc248..5c6ef554bb6 100644 --- a/src/test/run-pass/alt-path.rs +++ b/src/test/run-pass/alt-path.rs @@ -1,6 +1,7 @@ mod m1 { + #[legacy_exports]; enum foo { foo1, foo2, } } diff --git a/src/test/run-pass/attr-before-view-item2.rs b/src/test/run-pass/attr-before-view-item2.rs index e34bcd1ed44..94747db0a8a 100644 --- a/src/test/run-pass/attr-before-view-item2.rs +++ b/src/test/run-pass/attr-before-view-item2.rs @@ -1,6 +1,7 @@ // error-pattern:expected item mod m { + #[legacy_exports]; #[foo = "bar"] extern mod std; } diff --git a/src/test/run-pass/binops.rs b/src/test/run-pass/binops.rs index bd541e818ad..0cc828132c9 100644 --- a/src/test/run-pass/binops.rs +++ b/src/test/run-pass/binops.rs @@ -73,6 +73,7 @@ fn test_ptr() unsafe { #[abi = "cdecl"] #[nolink] extern mod test { + #[legacy_exports]; fn rust_get_sched_id() -> libc::intptr_t; fn get_task_id() -> libc::intptr_t; } diff --git a/src/test/run-pass/box-annihilator-shared.rs b/src/test/run-pass/box-annihilator-shared.rs index 768a828d7a2..5786b334af7 100644 --- a/src/test/run-pass/box-annihilator-shared.rs +++ b/src/test/run-pass/box-annihilator-shared.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_annihilate_box(ptr: *uint); } diff --git a/src/test/run-pass/box-annihilator-unique-vec.rs b/src/test/run-pass/box-annihilator-unique-vec.rs index a01240b01f4..45449cc6382 100644 --- a/src/test/run-pass/box-annihilator-unique-vec.rs +++ b/src/test/run-pass/box-annihilator-unique-vec.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_annihilate_box(ptr: *uint); } diff --git a/src/test/run-pass/box-annihilator-unique.rs b/src/test/run-pass/box-annihilator-unique.rs index 0198b5b1646..a2d11654f9a 100644 --- a/src/test/run-pass/box-annihilator-unique.rs +++ b/src/test/run-pass/box-annihilator-unique.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_annihilate_box(ptr: *uint); } diff --git a/src/test/run-pass/c-stack-as-value.rs b/src/test/run-pass/c-stack-as-value.rs index 8164913d0f7..1046a0e78a2 100644 --- a/src/test/run-pass/c-stack-as-value.rs +++ b/src/test/run-pass/c-stack-as-value.rs @@ -1,5 +1,6 @@ #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; fn get_task_id() -> libc::intptr_t; } diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index 81c26f90486..e812e23bdea 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -3,6 +3,7 @@ extern mod std; #[abi = "cdecl"] #[nolink] extern mod libc { + #[legacy_exports]; fn atol(x: *u8) -> int; fn atoll(x: *u8) -> i64; } diff --git a/src/test/run-pass/class-exports.rs b/src/test/run-pass/class-exports.rs index ef036811976..58543158b07 100644 --- a/src/test/run-pass/class-exports.rs +++ b/src/test/run-pass/class-exports.rs @@ -4,6 +4,7 @@ use kitty::*; mod kitty { + #[legacy_exports]; export cat; struct cat { meows: uint, diff --git a/src/test/run-pass/companionmod.rc b/src/test/run-pass/companionmod.rc index f2547991d0c..8736345c982 100644 --- a/src/test/run-pass/companionmod.rc +++ b/src/test/run-pass/companionmod.rc @@ -1,13 +1,19 @@ // xfail-win32 don't understand what's wrong // Test that crates and directory modules can contain code +#[legacy_exports]; #[path = "companionmod-src"] mod a { + #[legacy_exports]; mod b { + #[legacy_exports]; + #[legacy_exports] mod x; } #[path = "d"] mod c { + #[legacy_exports]; + #[legacy_exports] mod x; } } diff --git a/src/test/run-pass/companionmod.rs b/src/test/run-pass/companionmod.rs index 99c21e06d3a..ff15fe58056 100644 --- a/src/test/run-pass/companionmod.rs +++ b/src/test/run-pass/companionmod.rs @@ -1,6 +1,7 @@ // This isn't really xfailed; it's used by the companionmod.rc test // xfail-test +#[legacy_exports]; fn main() { assert a::b::g() == ~"ralph"; assert a::c::g() == ~"nelson"; diff --git a/src/test/run-pass/conditional-compile.rs b/src/test/run-pass/conditional-compile.rs index e0e0a3ef374..bc97114b581 100644 --- a/src/test/run-pass/conditional-compile.rs +++ b/src/test/run-pass/conditional-compile.rs @@ -6,13 +6,15 @@ const b: bool = true; #[cfg(bogus)] #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; // This symbol doesn't exist and would be a link error if this // module was translated fn bogus(); } #[abi = "cdecl"] -extern mod rustrt { } +extern mod rustrt { + #[legacy_exports]; } #[cfg(bogus)] type t = int; @@ -48,12 +50,14 @@ fn r(i:int) -> r { #[cfg(bogus)] mod m { + #[legacy_exports]; // This needs to parse but would fail in typeck. Since it's not in // the current config it should not be typechecked. fn bogus() { return 0; } } mod m { + #[legacy_exports]; // Submodules have slightly different code paths than the top-level // module, so let's make sure this jazz works here as well @@ -91,8 +95,10 @@ fn test_in_fn_ctxt() { } mod test_foreign_items { + #[legacy_exports]; #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; #[cfg(bogus)] fn rust_getcwd() -> ~str; fn rust_getcwd() -> ~str; @@ -100,10 +106,12 @@ mod test_foreign_items { } mod test_use_statements { + #[legacy_exports]; #[cfg(bogus)] use flippity_foo; extern mod rustrt { + #[legacy_exports]; #[cfg(bogus)] use flippity_foo; } diff --git a/src/test/run-pass/crate-attributes-src/foo.rs b/src/test/run-pass/crate-attributes-src/foo.rs index 5ab36dfe00d..7086ebf2ea8 100644 --- a/src/test/run-pass/crate-attributes-src/foo.rs +++ b/src/test/run-pass/crate-attributes-src/foo.rs @@ -1,4 +1,5 @@ // These are attributes of the foo module +#[legacy_exports]; #[attr1 = "val"]; #[attr2 = "val"]; diff --git a/src/test/run-pass/crate-attributes.rc b/src/test/run-pass/crate-attributes.rc index 36304011a8c..2ee41913f40 100644 --- a/src/test/run-pass/crate-attributes.rc +++ b/src/test/run-pass/crate-attributes.rc @@ -4,8 +4,10 @@ #[attr1] #[path = "crate-attributes-src"] mod m { + #[legacy_exports]; #[attr_inner]; #[attr2] + #[legacy_exports] mod foo; } diff --git a/src/test/run-pass/crateresolve2.rs b/src/test/run-pass/crateresolve2.rs index c05254a80ab..cd1aad3e63f 100644 --- a/src/test/run-pass/crateresolve2.rs +++ b/src/test/run-pass/crateresolve2.rs @@ -4,16 +4,19 @@ // aux-build:crateresolve2-3.rs mod a { + #[legacy_exports]; extern mod crateresolve2(vers = "0.1"); fn f() { assert crateresolve2::f() == 10; } } mod b { + #[legacy_exports]; extern mod crateresolve2(vers = "0.2"); fn f() { assert crateresolve2::f() == 20; } } mod c { + #[legacy_exports]; extern mod crateresolve2(vers = "0.3"); fn f() { assert crateresolve2::f() == 30; } } diff --git a/src/test/run-pass/crateresolve3.rs b/src/test/run-pass/crateresolve3.rs index 57b8c1bfed8..db7a36e35bf 100644 --- a/src/test/run-pass/crateresolve3.rs +++ b/src/test/run-pass/crateresolve3.rs @@ -6,11 +6,13 @@ // as long as no name collision on invoked functions. mod a { + #[legacy_exports]; extern mod crateresolve3(vers = "0.1"); fn f() { assert crateresolve3::f() == 10; } } mod b { + #[legacy_exports]; extern mod crateresolve3(vers = "0.2"); fn f() { assert crateresolve3::g() == 20; } } diff --git a/src/test/run-pass/crateresolve4.rs b/src/test/run-pass/crateresolve4.rs index 28512dc0bdb..24764b4ba83 100644 --- a/src/test/run-pass/crateresolve4.rs +++ b/src/test/run-pass/crateresolve4.rs @@ -5,11 +5,13 @@ // aux-build:crateresolve4b-2.rs mod a { + #[legacy_exports]; extern mod crateresolve4b(vers = "0.1"); fn f() { assert crateresolve4b::f() == 20; } } mod b { + #[legacy_exports]; extern mod crateresolve4b(vers = "0.2"); fn f() { assert crateresolve4b::g() == 10; } } diff --git a/src/test/run-pass/export-abstract-tag.rs b/src/test/run-pass/export-abstract-tag.rs index eb76676ece6..b482f64ec8a 100644 --- a/src/test/run-pass/export-abstract-tag.rs +++ b/src/test/run-pass/export-abstract-tag.rs @@ -2,6 +2,7 @@ // sort of ADT. mod foo { + #[legacy_exports]; export t; export f; diff --git a/src/test/run-pass/export-glob-imports-target.rs b/src/test/run-pass/export-glob-imports-target.rs index 915393f05e1..500d74c1b87 100644 --- a/src/test/run-pass/export-glob-imports-target.rs +++ b/src/test/run-pass/export-glob-imports-target.rs @@ -4,8 +4,10 @@ // Modified to not use export since it's going away. --pcw mod foo { + #[legacy_exports]; use bar::*; mod bar { + #[legacy_exports]; const a : int = 10; } fn zum() { diff --git a/src/test/run-pass/export-glob.rs b/src/test/run-pass/export-glob.rs index 666bc7ef3ac..3f3ecb68250 100644 --- a/src/test/run-pass/export-glob.rs +++ b/src/test/run-pass/export-glob.rs @@ -4,9 +4,11 @@ // Modified to not use export since it's going away. --pcw mod foo { + #[legacy_exports]; use bar::*; export a; mod bar { + #[legacy_exports]; const a : int = 10; } } diff --git a/src/test/run-pass/export-multi.rs b/src/test/run-pass/export-multi.rs index 70af1a3bcaa..5e978df0017 100644 --- a/src/test/run-pass/export-multi.rs +++ b/src/test/run-pass/export-multi.rs @@ -2,6 +2,7 @@ use m::f; use m::g; mod m { + #[legacy_exports]; export f, g; fn f() { } diff --git a/src/test/run-pass/export-non-interference2.rs b/src/test/run-pass/export-non-interference2.rs index 206f8f239e0..345a7dec5ea 100644 --- a/src/test/run-pass/export-non-interference2.rs +++ b/src/test/run-pass/export-non-interference2.rs @@ -1,8 +1,10 @@ mod foo { + #[legacy_exports]; export bar; mod bar { + #[legacy_exports]; fn y() { x(); } } diff --git a/src/test/run-pass/export-non-interference3.rs b/src/test/run-pass/export-non-interference3.rs index 41cc6bd7d23..a0c9f35fa72 100644 --- a/src/test/run-pass/export-non-interference3.rs +++ b/src/test/run-pass/export-non-interference3.rs @@ -1,10 +1,12 @@ mod foo { + #[legacy_exports]; export x; fn x() { bar::x(); } } mod bar { + #[legacy_exports]; export x; fn x() { debug!("x"); } diff --git a/src/test/run-pass/export-tag-variant.rs b/src/test/run-pass/export-tag-variant.rs index ccdb235164c..c8d0267a73f 100644 --- a/src/test/run-pass/export-tag-variant.rs +++ b/src/test/run-pass/export-tag-variant.rs @@ -1,6 +1,7 @@ // Export the enum variants, without the enum mod foo { + #[legacy_exports]; export t1; enum t { t1, } } diff --git a/src/test/run-pass/export-unexported-dep.rs b/src/test/run-pass/export-unexported-dep.rs index 1d0e64dc366..65cbb7e30ee 100644 --- a/src/test/run-pass/export-unexported-dep.rs +++ b/src/test/run-pass/export-unexported-dep.rs @@ -2,6 +2,7 @@ // that are not exported, allowing for a sort of poor-man's ADT mod foo { + #[legacy_exports]; export f; export g; diff --git a/src/test/run-pass/expr-scope.rs b/src/test/run-pass/expr-scope.rs index d974b1ec5a9..e0e79788acd 100644 --- a/src/test/run-pass/expr-scope.rs +++ b/src/test/run-pass/expr-scope.rs @@ -1,5 +1,7 @@ // Regression test for issue #762 // xfail-fast +#[legacy_exports]; + fn f() { } fn main() { return ::f(); } diff --git a/src/test/run-pass/extern-call-deep.rs b/src/test/run-pass/extern-call-deep.rs index 05404032a73..e275bcedf38 100644 --- a/src/test/run-pass/extern-call-deep.rs +++ b/src/test/run-pass/extern-call-deep.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs index 23a34a45d8d..aae46660b31 100644 --- a/src/test/run-pass/extern-call-deep2.rs +++ b/src/test/run-pass/extern-call-deep2.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/extern-call-scrub.rs b/src/test/run-pass/extern-call-scrub.rs index 49e55cca1c8..58677d18c1f 100644 --- a/src/test/run-pass/extern-call-scrub.rs +++ b/src/test/run-pass/extern-call-scrub.rs @@ -3,6 +3,7 @@ // directions extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/extern-call.rs b/src/test/run-pass/extern-call.rs index 6f8cfc28860..5fb62e7c185 100644 --- a/src/test/run-pass/extern-call.rs +++ b/src/test/run-pass/extern-call.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/extern-stress.rs b/src/test/run-pass/extern-stress.rs index dc3ac7001e1..ef2ab539d05 100644 --- a/src/test/run-pass/extern-stress.rs +++ b/src/test/run-pass/extern-stress.rs @@ -2,6 +2,7 @@ // while holding onto C stacks extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/extern-yield.rs b/src/test/run-pass/extern-yield.rs index eff78a6f0ad..890bb90a35e 100644 --- a/src/test/run-pass/extern-yield.rs +++ b/src/test/run-pass/extern-yield.rs @@ -1,4 +1,5 @@ extern mod rustrt { + #[legacy_exports]; fn rust_dbg_call(cb: *u8, data: libc::uintptr_t) -> libc::uintptr_t; } diff --git a/src/test/run-pass/foreign-dupe.rs b/src/test/run-pass/foreign-dupe.rs index b780e95f544..24077785f4a 100644 --- a/src/test/run-pass/foreign-dupe.rs +++ b/src/test/run-pass/foreign-dupe.rs @@ -4,12 +4,14 @@ #[abi = "cdecl"] #[link_name = "rustrt"] extern mod rustrt1 { + #[legacy_exports]; fn last_os_error() -> ~str; } #[abi = "cdecl"] #[link_name = "rustrt"] extern mod rustrt2 { + #[legacy_exports]; fn last_os_error() -> ~str; } diff --git a/src/test/run-pass/foreign-fn-linkname.rs b/src/test/run-pass/foreign-fn-linkname.rs index 22b35eca9f2..b55eb9445cf 100644 --- a/src/test/run-pass/foreign-fn-linkname.rs +++ b/src/test/run-pass/foreign-fn-linkname.rs @@ -4,6 +4,7 @@ extern mod std; #[nolink] #[abi = "cdecl"] extern mod libc { + #[legacy_exports]; #[link_name = "strlen"] fn my_strlen(str: *u8) -> uint; } diff --git a/src/test/run-pass/foreign-lib-path.rs b/src/test/run-pass/foreign-lib-path.rs index 99bf3c714f9..b777e6f9a70 100644 --- a/src/test/run-pass/foreign-lib-path.rs +++ b/src/test/run-pass/foreign-lib-path.rs @@ -6,6 +6,7 @@ // wouthout providing a -L argument to the compiler, and that // will also be found successfully at runtime. extern mod WHATGOESHERE { + #[legacy_exports]; fn IDONTKNOW() -> u32; } diff --git a/src/test/run-pass/foreign-mod-unused-const.rs b/src/test/run-pass/foreign-mod-unused-const.rs index 0c52a3e34af..a8cb2d2eae2 100644 --- a/src/test/run-pass/foreign-mod-unused-const.rs +++ b/src/test/run-pass/foreign-mod-unused-const.rs @@ -1,5 +1,6 @@ #[nolink] extern mod foo { + #[legacy_exports]; const errno: int; } diff --git a/src/test/run-pass/foreign-no-abi.rs b/src/test/run-pass/foreign-no-abi.rs index 8d9e7c50ac6..5a5641f7e1f 100644 --- a/src/test/run-pass/foreign-no-abi.rs +++ b/src/test/run-pass/foreign-no-abi.rs @@ -1,6 +1,7 @@ // ABI is cdecl by default extern mod rustrt { + #[legacy_exports]; fn get_task_id() -> libc::intptr_t; } diff --git a/src/test/run-pass/foreign-struct.rs b/src/test/run-pass/foreign-struct.rs index f88f47dd981..d9389eb6ac9 100644 --- a/src/test/run-pass/foreign-struct.rs +++ b/src/test/run-pass/foreign-struct.rs @@ -5,6 +5,7 @@ enum void { } #[nolink] extern mod bindgen { + #[legacy_exports]; fn printf(++v: void); } diff --git a/src/test/run-pass/foreign2.rs b/src/test/run-pass/foreign2.rs index 9d1ad60cc92..a2678225658 100644 --- a/src/test/run-pass/foreign2.rs +++ b/src/test/run-pass/foreign2.rs @@ -1,20 +1,24 @@ #[abi = "cdecl"] #[nolink] -extern mod bar { } +extern mod bar { + #[legacy_exports]; } #[abi = "cdecl"] #[nolink] -extern mod zed { } +extern mod zed { + #[legacy_exports]; } #[abi = "cdecl"] #[nolink] extern mod libc { + #[legacy_exports]; fn write(fd: int, buf: *u8, count: core::libc::size_t) -> core::libc::ssize_t; } #[abi = "cdecl"] #[nolink] -extern mod baz { } +extern mod baz { + #[legacy_exports]; } fn main(args: ~[~str]) { } diff --git a/src/test/run-pass/generic-fn-twice.rs b/src/test/run-pass/generic-fn-twice.rs index ae972fbd0d0..bd2bb3cff63 100644 --- a/src/test/run-pass/generic-fn-twice.rs +++ b/src/test/run-pass/generic-fn-twice.rs @@ -3,6 +3,7 @@ // -*- rust -*- mod foomod { + #[legacy_exports]; fn foo<T>() { } } diff --git a/src/test/run-pass/global-scope.rs b/src/test/run-pass/global-scope.rs index 89181c15691..66b86465cc4 100644 --- a/src/test/run-pass/global-scope.rs +++ b/src/test/run-pass/global-scope.rs @@ -1,8 +1,11 @@ // xfail-fast +#[legacy_exports]; + fn f() -> int { return 1; } mod foo { + #[legacy_exports]; fn f() -> int { return 2; } fn g() { assert (f() == 2); assert (::f() == 1); } } diff --git a/src/test/run-pass/hashmap-memory.rs b/src/test/run-pass/hashmap-memory.rs index 9e0727471e2..24163cfa566 100644 --- a/src/test/run-pass/hashmap-memory.rs +++ b/src/test/run-pass/hashmap-memory.rs @@ -18,6 +18,7 @@ use comm::recv; fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); } mod map_reduce { + #[legacy_exports]; export putter; export mapper; export map_reduce; diff --git a/src/test/run-pass/import-from-foreign.rs b/src/test/run-pass/import-from-foreign.rs index 9b71b0862dd..e9eec1c6a2a 100644 --- a/src/test/run-pass/import-from-foreign.rs +++ b/src/test/run-pass/import-from-foreign.rs @@ -1,10 +1,12 @@ mod spam { + #[legacy_exports]; fn ham() { } fn eggs() { } } #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; use spam::{ham, eggs}; export ham; export eggs; diff --git a/src/test/run-pass/import-from.rs b/src/test/run-pass/import-from.rs index 5892a729c68..814f31bc011 100644 --- a/src/test/run-pass/import-from.rs +++ b/src/test/run-pass/import-from.rs @@ -1,6 +1,7 @@ use spam::{ham, eggs}; mod spam { + #[legacy_exports]; fn ham() { } fn eggs() { } } diff --git a/src/test/run-pass/import-glob-0.rs b/src/test/run-pass/import-glob-0.rs index d9f0cd4181c..9ba29123388 100644 --- a/src/test/run-pass/import-glob-0.rs +++ b/src/test/run-pass/import-glob-0.rs @@ -2,6 +2,7 @@ use module_of_many_things::*; use dug::too::greedily::and::too::deep::*; mod module_of_many_things { + #[legacy_exports]; export f1; export f2; export f4; @@ -12,11 +13,17 @@ mod module_of_many_things { } mod dug { + #[legacy_exports]; mod too { + #[legacy_exports]; mod greedily { + #[legacy_exports]; mod and { + #[legacy_exports]; mod too { + #[legacy_exports]; mod deep { + #[legacy_exports]; fn nameless_fear() { debug!("Boo!"); } fn also_redstone() { debug!("Whatever."); } } diff --git a/src/test/run-pass/import-glob-1.rs b/src/test/run-pass/import-glob-1.rs index 49bbc7d5881..5039a7344df 100644 --- a/src/test/run-pass/import-glob-1.rs +++ b/src/test/run-pass/import-glob-1.rs @@ -1,8 +1,10 @@ use a1::b1::word_traveler; mod a1 { + #[legacy_exports]; // mod b1 { + #[legacy_exports]; // use a2::b1::*; // <-\ @@ -10,6 +12,7 @@ mod a1 { } // | mod b2 { + #[legacy_exports]; // | use a2::b2::*; // <-\ -\ | @@ -19,10 +22,12 @@ mod a1 { // | | | // | | | mod a2 { + #[legacy_exports]; // | | | #[abi = "cdecl"] #[nolink] extern mod b1 { + #[legacy_exports]; // | | | use a1::b2::*; // | <-/ -/ @@ -30,6 +35,7 @@ mod a2 { } // | mod b2 { + #[legacy_exports]; // | fn word_traveler() { // | debug!("ahoy!"); // -/ diff --git a/src/test/run-pass/import-trailing-comma.rs b/src/test/run-pass/import-trailing-comma.rs index 0a27ccc24a2..2e4e29c2d71 100644 --- a/src/test/run-pass/import-trailing-comma.rs +++ b/src/test/run-pass/import-trailing-comma.rs @@ -1,7 +1,9 @@ use foo::bar::{baz, quux,}; mod foo { + #[legacy_exports]; mod bar { + #[legacy_exports]; fn baz() { } fn quux() { } } diff --git a/src/test/run-pass/import.rs b/src/test/run-pass/import.rs index b0ee5439370..3a2b8996c4d 100644 --- a/src/test/run-pass/import.rs +++ b/src/test/run-pass/import.rs @@ -1,8 +1,10 @@ mod foo { + #[legacy_exports]; fn x(y: int) { log(debug, y); } } mod bar { + #[legacy_exports]; use foo::x; use z = foo::x; fn thing() { x(10); z(10); } diff --git a/src/test/run-pass/import2.rs b/src/test/run-pass/import2.rs index ab9d5222734..1cb58ffb911 100644 --- a/src/test/run-pass/import2.rs +++ b/src/test/run-pass/import2.rs @@ -2,6 +2,7 @@ use zed::bar; mod zed { + #[legacy_exports]; fn bar() { debug!("bar"); } } diff --git a/src/test/run-pass/import3.rs b/src/test/run-pass/import3.rs index 2c208593d1e..3fd1fecd607 100644 --- a/src/test/run-pass/import3.rs +++ b/src/test/run-pass/import3.rs @@ -3,7 +3,9 @@ use baz::zed; use zed::bar; mod baz { + #[legacy_exports]; mod zed { + #[legacy_exports]; fn bar() { debug!("bar2"); } } } diff --git a/src/test/run-pass/import4.rs b/src/test/run-pass/import4.rs index 49ec8babe24..4a9f78a069b 100644 --- a/src/test/run-pass/import4.rs +++ b/src/test/run-pass/import4.rs @@ -2,6 +2,7 @@ use zed::bar; mod zed { + #[legacy_exports]; fn bar() { debug!("bar"); } } diff --git a/src/test/run-pass/import5.rs b/src/test/run-pass/import5.rs index 3fab08badb9..5a00df6833d 100644 --- a/src/test/run-pass/import5.rs +++ b/src/test/run-pass/import5.rs @@ -1,8 +1,10 @@ use foo::bar; mod foo { + #[legacy_exports]; use zed::bar; export bar; mod zed { + #[legacy_exports]; fn bar() { debug!("foo"); } } } diff --git a/src/test/run-pass/import6.rs b/src/test/run-pass/import6.rs index 800429857e8..ee1cd582099 100644 --- a/src/test/run-pass/import6.rs +++ b/src/test/run-pass/import6.rs @@ -1,11 +1,14 @@ use foo::zed; use bar::baz; mod foo { + #[legacy_exports]; mod zed { + #[legacy_exports]; fn baz() { debug!("baz"); } } } mod bar { + #[legacy_exports]; use zed::baz; export baz; } diff --git a/src/test/run-pass/import7.rs b/src/test/run-pass/import7.rs index 5f2e8caaa79..e1a0235b030 100644 --- a/src/test/run-pass/import7.rs +++ b/src/test/run-pass/import7.rs @@ -1,15 +1,20 @@ use foo::zed; use bar::baz; mod foo { + #[legacy_exports]; mod zed { + #[legacy_exports]; fn baz() { debug!("baz"); } } } mod bar { + #[legacy_exports]; use zed::baz; export baz; mod foo { - mod zed { } + #[legacy_exports]; + mod zed { + #[legacy_exports]; } } } fn main(args: ~[~str]) { baz(); } diff --git a/src/test/run-pass/import8.rs b/src/test/run-pass/import8.rs index 8e51fb8c1b1..51d99da4302 100644 --- a/src/test/run-pass/import8.rs +++ b/src/test/run-pass/import8.rs @@ -3,6 +3,7 @@ use foo::x; use z = foo::x; mod foo { + #[legacy_exports]; fn x(y: int) { log(debug, y); } } diff --git a/src/test/run-pass/inner-module.rs b/src/test/run-pass/inner-module.rs index 65d9ce269de..f65a66db559 100644 --- a/src/test/run-pass/inner-module.rs +++ b/src/test/run-pass/inner-module.rs @@ -3,7 +3,9 @@ // -*- rust -*- mod inner { + #[legacy_exports]; mod inner2 { + #[legacy_exports]; fn hello() { debug!("hello, modular world"); } } fn hello() { inner2::hello(); } diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index d379693de8c..ad46eec8882 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -2,6 +2,7 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn pref_align_of<T>() -> uint; fn min_align_of<T>() -> uint; } @@ -10,6 +11,7 @@ extern mod rusti { #[cfg(target_os = "macos")] #[cfg(target_os = "freebsd")] mod m { + #[legacy_exports]; #[cfg(target_arch = "x86")] fn main() { assert rusti::pref_align_of::<u64>() == 8u; @@ -25,6 +27,7 @@ mod m { #[cfg(target_os = "win32")] mod m { + #[legacy_exports]; #[cfg(target_arch = "x86")] fn main() { assert rusti::pref_align_of::<u64>() == 8u; diff --git a/src/test/run-pass/intrinsic-atomics.rs b/src/test/run-pass/intrinsic-atomics.rs index 512e0edbec9..2629afa4909 100644 --- a/src/test/run-pass/intrinsic-atomics.rs +++ b/src/test/run-pass/intrinsic-atomics.rs @@ -1,5 +1,6 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn atomic_xchg(dst: &mut int, src: int) -> int; fn atomic_xchg_acq(dst: &mut int, src: int) -> int; fn atomic_xchg_rel(dst: &mut int, src: int) -> int; diff --git a/src/test/run-pass/intrinsic-frame-address.rs b/src/test/run-pass/intrinsic-frame-address.rs index 25ee6424913..ba28c5ea8a6 100644 --- a/src/test/run-pass/intrinsic-frame-address.rs +++ b/src/test/run-pass/intrinsic-frame-address.rs @@ -2,6 +2,7 @@ #[legacy_modes]; #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn frame_address(f: fn(*u8)); } diff --git a/src/test/run-pass/intrinsic-move-val.rs b/src/test/run-pass/intrinsic-move-val.rs index 80dcf2a4199..b7f2115f45d 100644 --- a/src/test/run-pass/intrinsic-move-val.rs +++ b/src/test/run-pass/intrinsic-move-val.rs @@ -1,5 +1,6 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn move_val_init<T>(&dst: T, -src: T); fn move_val<T>(&dst: T, -src: T); } diff --git a/src/test/run-pass/issue-1251.rs b/src/test/run-pass/issue-1251.rs index ae38bdf4a75..0417c18b844 100644 --- a/src/test/run-pass/issue-1251.rs +++ b/src/test/run-pass/issue-1251.rs @@ -1,6 +1,7 @@ #[link(name = "get_task_id")]; extern mod rustrt { + #[legacy_exports]; fn get_task_id() -> libc::intptr_t; } diff --git a/src/test/run-pass/issue-1866.rs b/src/test/run-pass/issue-1866.rs index c7219fbc2d9..b6435a8ff20 100644 --- a/src/test/run-pass/issue-1866.rs +++ b/src/test/run-pass/issue-1866.rs @@ -1,14 +1,18 @@ // xfail-test mod a { + #[legacy_exports]; type rust_task = uint; extern mod rustrt { + #[legacy_exports]; fn rust_task_is_unwinding(rt: *rust_task) -> bool; } } mod b { + #[legacy_exports]; type rust_task = bool; extern mod rustrt { + #[legacy_exports]; fn rust_task_is_unwinding(rt: *rust_task) -> bool; } } diff --git a/src/test/run-pass/issue-2214.rs b/src/test/run-pass/issue-2214.rs index 82678c1c081..11437f6cf45 100644 --- a/src/test/run-pass/issue-2214.rs +++ b/src/test/run-pass/issue-2214.rs @@ -12,6 +12,7 @@ fn lgamma(n: c_double, value: &mut int) -> c_double { #[link_name = "m"] #[abi = "cdecl"] extern mod m { + #[legacy_exports]; #[cfg(unix)] #[link_name="lgamma_r"] fn lgamma(n: c_double, sign: &mut c_int) -> c_double; diff --git a/src/test/run-pass/issue-2718.rs b/src/test/run-pass/issue-2718.rs index 3122985d6b5..6da4349ba5f 100644 --- a/src/test/run-pass/issue-2718.rs +++ b/src/test/run-pass/issue-2718.rs @@ -1,4 +1,5 @@ mod pipes { + #[legacy_exports]; use cast::{forget, transmute}; enum state { @@ -32,6 +33,7 @@ mod pipes { #[abi = "rust-intrinsic"] mod rusti { + #[legacy_exports]; fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail; } fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail; } fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail; } @@ -193,6 +195,7 @@ mod pipes { } mod pingpong { + #[legacy_exports]; enum ping = pipes::send_packet<pong>; enum pong = pipes::send_packet<ping>; @@ -219,6 +222,7 @@ mod pingpong { } mod client { + #[legacy_exports]; type ping = pipes::send_packet<pingpong::ping>; type pong = pipes::recv_packet<pingpong::pong>; @@ -239,6 +243,7 @@ mod pingpong { } mod server { + #[legacy_exports]; type ping = pipes::recv_packet<pingpong::ping>; type pong = pipes::send_packet<pingpong::pong>; diff --git a/src/test/run-pass/issue-2904.rs b/src/test/run-pass/issue-2904.rs index 71ba9b65cef..704e8f79fb1 100644 --- a/src/test/run-pass/issue-2904.rs +++ b/src/test/run-pass/issue-2904.rs @@ -61,6 +61,7 @@ fn read_board_grid<rdr: Owned io::Reader>(+in: rdr) -> ~[~[square]] { } mod test { + #[legacy_exports]; #[test] fn trivial_to_str() { assert lambda.to_str() == "\\" diff --git a/src/test/run-pass/issue-506.rs b/src/test/run-pass/issue-506.rs index 730efcc9f34..93669c44896 100644 --- a/src/test/run-pass/issue-506.rs +++ b/src/test/run-pass/issue-506.rs @@ -8,6 +8,7 @@ extern mod std; #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; fn rust_dbg_do_nothing(); } diff --git a/src/test/run-pass/item-attributes.rs b/src/test/run-pass/item-attributes.rs index 07f824f7ae6..a3451da6f9a 100644 --- a/src/test/run-pass/item-attributes.rs +++ b/src/test/run-pass/item-attributes.rs @@ -15,9 +15,11 @@ // These are are attributes of the following mod #[attr1 = "val"] #[attr2 = "val"] -mod test_first_item_in_file_mod { } +mod test_first_item_in_file_mod { + #[legacy_exports]; } mod test_single_attr_outer { + #[legacy_exports]; #[attr = "val"] const x: int = 10; @@ -26,14 +28,17 @@ mod test_single_attr_outer { fn f() { } #[attr = "val"] - mod mod1 { } + mod mod1 { + #[legacy_exports]; } #[attr = "val"] #[abi = "cdecl"] - extern mod rustrt { } + extern mod rustrt { + #[legacy_exports]; } } mod test_multi_attr_outer { + #[legacy_exports]; #[attr1 = "val"] #[attr2 = "val"] @@ -45,12 +50,14 @@ mod test_multi_attr_outer { #[attr1 = "val"] #[attr2 = "val"] - mod mod1 { } + mod mod1 { + #[legacy_exports]; } #[attr1 = "val"] #[attr2 = "val"] #[abi = "cdecl"] - extern mod rustrt { } + extern mod rustrt { + #[legacy_exports]; } #[attr1 = "val"] #[attr2 = "val"] @@ -58,6 +65,7 @@ mod test_multi_attr_outer { } mod test_stmt_single_attr_outer { + #[legacy_exports]; fn f() { @@ -70,17 +78,20 @@ mod test_stmt_single_attr_outer { /* FIXME: Issue #493 #[attr = "val"] mod mod1 { + #[legacy_exports]; } #[attr = "val"] #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; } */ } } mod test_stmt_multi_attr_outer { + #[legacy_exports]; fn f() { @@ -96,28 +107,34 @@ mod test_stmt_multi_attr_outer { #[attr1 = "val"] #[attr2 = "val"] mod mod1 { + #[legacy_exports]; } #[attr1 = "val"] #[attr2 = "val"] #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; } */ } } mod test_attr_inner { + #[legacy_exports]; mod m { + #[legacy_exports]; // This is an attribute of mod m #[attr = "val"]; } } mod test_attr_inner_then_outer { + #[legacy_exports]; mod m { + #[legacy_exports]; // This is an attribute of mod m #[attr = "val"]; // This is an attribute of fn f @@ -127,7 +144,9 @@ mod test_attr_inner_then_outer { } mod test_attr_inner_then_outer_multi { + #[legacy_exports]; mod m { + #[legacy_exports]; // This is an attribute of mod m #[attr1 = "val"]; #[attr2 = "val"]; @@ -139,6 +158,7 @@ mod test_attr_inner_then_outer_multi { } mod test_distinguish_syntax_ext { + #[legacy_exports]; extern mod std; @@ -150,6 +170,7 @@ mod test_distinguish_syntax_ext { } mod test_other_forms { + #[legacy_exports]; #[attr] #[attr(word)] #[attr(attr(word))] @@ -158,8 +179,10 @@ mod test_other_forms { } mod test_foreign_items { + #[legacy_exports]; #[abi = "cdecl"] extern mod rustrt { + #[legacy_exports]; #[attr]; #[attr] @@ -168,6 +191,7 @@ mod test_foreign_items { } mod test_literals { + #[legacy_exports]; #[str = "s"]; #[char = 'c']; #[int = 100]; @@ -177,7 +201,8 @@ mod test_literals { #[mach_float = 1.0f32]; #[nil = ()]; #[bool = true]; - mod m { } + mod m { + #[legacy_exports]; } } fn test_fn_inner() { diff --git a/src/test/run-pass/item-name-overload.rs b/src/test/run-pass/item-name-overload.rs index 02930d65cfa..d05419d155c 100644 --- a/src/test/run-pass/item-name-overload.rs +++ b/src/test/run-pass/item-name-overload.rs @@ -3,10 +3,12 @@ // -*- rust -*- mod foo { + #[legacy_exports]; fn baz() { } } mod bar { + #[legacy_exports]; fn baz() { } } diff --git a/src/test/run-pass/keyword-changes-2012-07-31.rs b/src/test/run-pass/keyword-changes-2012-07-31.rs index 95ac37c66b7..48c78c959ce 100644 --- a/src/test/run-pass/keyword-changes-2012-07-31.rs +++ b/src/test/run-pass/keyword-changes-2012-07-31.rs @@ -6,6 +6,7 @@ fn main() { } mod foo { + #[legacy_exports]; } fn bar() -> int { diff --git a/src/test/run-pass/mod-inside-fn.rs b/src/test/run-pass/mod-inside-fn.rs index 96c7101cdc3..9f13966eefb 100644 --- a/src/test/run-pass/mod-inside-fn.rs +++ b/src/test/run-pass/mod-inside-fn.rs @@ -1,5 +1,6 @@ fn f() -> int { mod m { + #[legacy_exports]; fn g() -> int { 720 } } diff --git a/src/test/run-pass/mod-view-items.rs b/src/test/run-pass/mod-view-items.rs index cb99d211baf..c849fc01b66 100644 --- a/src/test/run-pass/mod-view-items.rs +++ b/src/test/run-pass/mod-view-items.rs @@ -5,6 +5,7 @@ // begin failing. mod m { + #[legacy_exports]; use core::vec; fn f() -> ~[int] { vec::from_elem(1u, 0) } } diff --git a/src/test/run-pass/module-polymorphism.rc b/src/test/run-pass/module-polymorphism.rc index 938a594ccae..bce2d80e045 100644 --- a/src/test/run-pass/module-polymorphism.rc +++ b/src/test/run-pass/module-polymorphism.rc @@ -1,42 +1,51 @@ #[path = "module-polymorphism-files"] mod my_float { + #[legacy_exports]; // The type of the float use inst::T; // Define T as float #[path = "inst_float.rs"] + #[legacy_exports] mod inst; // Add in the implementation from a single source file #[path = "template.rs"] + #[legacy_exports] mod template; } #[path = "module-polymorphism-files"] mod my_f64 { + #[legacy_exports]; use inst::T; // Define T as f64 #[path = "inst_f64.rs"] + #[legacy_exports] mod inst; // Use the implementation for the same source file! #[path = "template.rs"] + #[legacy_exports] mod template; } #[path = "module-polymorphism-files"] mod my_f32 { + #[legacy_exports]; use inst::T; #[path = "inst_f32.rs"] + #[legacy_exports] mod inst; #[path = "template.rs"] + #[legacy_exports] mod template; } diff --git a/src/test/run-pass/module-polymorphism2.rc b/src/test/run-pass/module-polymorphism2.rc index 0c25f454625..49cd60fc0a9 100644 --- a/src/test/run-pass/module-polymorphism2.rc +++ b/src/test/run-pass/module-polymorphism2.rc @@ -1,8 +1,10 @@ #[path = "module-polymorphism2-files"] mod mystd { + #[legacy_exports]; #[path = "float-template"] mod float { + #[legacy_exports]; // The type of the float use inst::T; @@ -12,16 +14,19 @@ mod mystd { // Define T as float #[path = "inst_float.rs"] + #[legacy_exports] mod inst; // Add in the implementation from a single source file #[path = "template.rs"] + #[legacy_exports] mod template; } #[path = "float-template"] mod f64 { + #[legacy_exports]; use inst::T; @@ -31,16 +36,19 @@ mod mystd { // Define T as f64 #[path = "inst_f64.rs"] + #[legacy_exports] mod inst; // Use the implementation for the same source file! #[path = "template.rs"] + #[legacy_exports] mod template; } #[path = "float-template"] mod f32 { + #[legacy_exports]; use inst::T; // Unfortunate @@ -48,9 +56,11 @@ mod mystd { export plus; #[path = "inst_f32.rs"] + #[legacy_exports] mod inst; #[path = "template.rs"] + #[legacy_exports] mod template; } diff --git a/src/test/run-pass/module-polymorphism3.rc b/src/test/run-pass/module-polymorphism3.rc index 3b3a5133b52..27d9753d9d5 100644 --- a/src/test/run-pass/module-polymorphism3.rc +++ b/src/test/run-pass/module-polymorphism3.rc @@ -3,10 +3,12 @@ #[path = "module-polymorphism3-files"] mod mystd { + #[legacy_exports]; // The template is specified in float-template.rs #[path = "float-template"] mod float { + #[legacy_exports]; // The type of the float use inst::T; @@ -18,6 +20,7 @@ mod mystd { // Use the same template #[path = "float-template"] mod f64 { + #[legacy_exports]; use inst::T; @@ -28,6 +31,7 @@ mod mystd { #[path = "float-template"] mod f32 { + #[legacy_exports]; use inst::T; #[path = "inst_f32.rs"] diff --git a/src/test/run-pass/module-polymorphism4.rc b/src/test/run-pass/module-polymorphism4.rc index 6218948b814..4cb7acf8f03 100644 --- a/src/test/run-pass/module-polymorphism4.rc +++ b/src/test/run-pass/module-polymorphism4.rc @@ -1,26 +1,32 @@ #[path = "module-polymorphism4-files"] mod cat { + #[legacy_exports]; use inst::*; #[path = "cat.rs"] + #[legacy_exports] mod inst; #[path = "trait_.rs"] + #[legacy_exports] mod trait_; } #[path = "module-polymorphism4-files"] mod dog { + #[legacy_exports]; use inst::*; #[path = "dog.rs"] + #[legacy_exports] mod inst; #[path = "trait_.rs"] + #[legacy_exports] mod trait_; } diff --git a/src/test/run-pass/morestack-address.rs b/src/test/run-pass/morestack-address.rs index 7f0adcf0920..5779bd356e9 100644 --- a/src/test/run-pass/morestack-address.rs +++ b/src/test/run-pass/morestack-address.rs @@ -1,6 +1,7 @@ #[nolink] #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn morestack_addr() -> *(); } diff --git a/src/test/run-pass/morestack6.rs b/src/test/run-pass/morestack6.rs index deca22de643..0d44e264688 100644 --- a/src/test/run-pass/morestack6.rs +++ b/src/test/run-pass/morestack6.rs @@ -2,6 +2,7 @@ // external symbols as close to the red zone as possible. extern mod rustrt { + #[legacy_exports]; fn debug_get_stk_seg() -> *u8; fn rust_get_sched_id() -> libc::intptr_t; diff --git a/src/test/run-pass/multi.rc b/src/test/run-pass/multi.rc index 7a89ac915ce..61c81030bba 100644 --- a/src/test/run-pass/multi.rc +++ b/src/test/run-pass/multi.rc @@ -1,8 +1,11 @@ #[path = "multi-src"] mod multi { + #[legacy_exports]; // implicitly #[path = "foo.rs"] + #[legacy_exports] mod foo; #[path = "bar.rs"] + #[legacy_exports] mod bar; } diff --git a/src/test/run-pass/nil-decl-in-foreign.rs b/src/test/run-pass/nil-decl-in-foreign.rs index b35b81b11e2..5711e6df555 100644 --- a/src/test/run-pass/nil-decl-in-foreign.rs +++ b/src/test/run-pass/nil-decl-in-foreign.rs @@ -1,6 +1,7 @@ // Issue #901 #[nolink] extern mod libc { + #[legacy_exports]; fn printf(x: ()); } fn main() { } \ No newline at end of file diff --git a/src/test/run-pass/path.rs b/src/test/run-pass/path.rs index 345f93f760d..47440d2fa5b 100644 --- a/src/test/run-pass/path.rs +++ b/src/test/run-pass/path.rs @@ -1,6 +1,7 @@ mod foo { + #[legacy_exports]; fn bar(offset: uint) { } } diff --git a/src/test/run-pass/pipe-pingpong-bounded.rs b/src/test/run-pass/pipe-pingpong-bounded.rs index 2c8359991de..f9f091131ab 100644 --- a/src/test/run-pass/pipe-pingpong-bounded.rs +++ b/src/test/run-pass/pipe-pingpong-bounded.rs @@ -7,6 +7,7 @@ // This was generated initially by the pipe compiler, but it's been // modified in hopefully straightforward ways. mod pingpong { + #[legacy_exports]; use pipes::*; type packets = { @@ -33,6 +34,7 @@ mod pingpong { enum ping = server::pong; enum pong = client::ping; mod client { + #[legacy_exports]; fn ping(+pipe: ping) -> pong { { let b = pipe.reuse_buffer(); @@ -49,6 +51,7 @@ mod pingpong { pingpong::packets>; } mod server { + #[legacy_exports]; type ping = pipes::RecvPacketBuffered<pingpong::ping, pingpong::packets>; fn pong(+pipe: pong) -> ping { @@ -67,6 +70,7 @@ mod pingpong { } mod test { + #[legacy_exports]; use pipes::recv; use pingpong::{ping, pong}; diff --git a/src/test/run-pass/pipe-pingpong-proto.rs b/src/test/run-pass/pipe-pingpong-proto.rs index 7d70e2bdb68..7af00e8dbf2 100644 --- a/src/test/run-pass/pipe-pingpong-proto.rs +++ b/src/test/run-pass/pipe-pingpong-proto.rs @@ -13,6 +13,7 @@ proto! pingpong ( ) mod test { + #[legacy_exports]; use pipes::recv; use pingpong::{ping, pong}; diff --git a/src/test/run-pass/rec-align-u32.rs b/src/test/run-pass/rec-align-u32.rs index 29fd81df9bc..93ef8e755f4 100644 --- a/src/test/run-pass/rec-align-u32.rs +++ b/src/test/run-pass/rec-align-u32.rs @@ -3,6 +3,7 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn pref_align_of<T>() -> uint; fn min_align_of<T>() -> uint; } @@ -22,12 +23,14 @@ type outer = { #[cfg(target_arch = "x86")] mod m { + #[legacy_exports]; fn align() -> uint { 4u } fn size() -> uint { 8u } } #[cfg(target_arch = "x86_64")] mod m { + #[legacy_exports]; fn align() -> uint { 4u } fn size() -> uint { 8u } } diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index d4c9028b900..24400b8d340 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -3,6 +3,7 @@ #[abi = "rust-intrinsic"] extern mod rusti { + #[legacy_exports]; fn pref_align_of<T>() -> uint; fn min_align_of<T>() -> uint; } @@ -24,14 +25,17 @@ type outer = { #[cfg(target_os = "macos")] #[cfg(target_os = "freebsd")] mod m { + #[legacy_exports]; #[cfg(target_arch = "x86")] mod m { + #[legacy_exports]; fn align() -> uint { 4u } fn size() -> uint { 12u } } #[cfg(target_arch = "x86_64")] mod m { + #[legacy_exports]; fn align() -> uint { 8u } fn size() -> uint { 16u } } @@ -39,8 +43,10 @@ mod m { #[cfg(target_os = "win32")] mod m { + #[legacy_exports]; #[cfg(target_arch = "x86")] mod m { + #[legacy_exports]; fn align() -> uint { 8u } fn size() -> uint { 16u } } diff --git a/src/test/run-pass/rt-sched-1.rs b/src/test/run-pass/rt-sched-1.rs index b96fd5edd92..9604dff64d7 100644 --- a/src/test/run-pass/rt-sched-1.rs +++ b/src/test/run-pass/rt-sched-1.rs @@ -9,6 +9,7 @@ type task = *libc::c_void; type closure = *libc::c_void; extern mod rustrt { + #[legacy_exports]; fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id; fn rust_get_sched_id() -> sched_id; fn rust_new_task_in_sched(id: sched_id) -> task_id; diff --git a/src/test/run-pass/self-shadowing-import.rs b/src/test/run-pass/self-shadowing-import.rs index 0fec03d6b9b..1c343557122 100644 --- a/src/test/run-pass/self-shadowing-import.rs +++ b/src/test/run-pass/self-shadowing-import.rs @@ -1,12 +1,16 @@ mod a { + #[legacy_exports]; mod b { + #[legacy_exports]; mod a { + #[legacy_exports]; fn foo() -> int { return 1; } } } } mod c { + #[legacy_exports]; use a::b::a; fn bar() { assert (a::foo() == 1); } } diff --git a/src/test/run-pass/static-impl.rs b/src/test/run-pass/static-impl.rs index 750d13b87e2..469de185968 100644 --- a/src/test/run-pass/static-impl.rs +++ b/src/test/run-pass/static-impl.rs @@ -8,10 +8,12 @@ trait plus { } mod a { + #[legacy_exports]; impl uint: plus { fn plus() -> int { self as int + 20 } } } mod b { + #[legacy_exports]; impl ~str: plus { fn plus() -> int { 200 } } } diff --git a/src/test/run-pass/static-method-xcrate.rs b/src/test/run-pass/static-method-xcrate.rs index e178a3a1304..398440ebf7f 100644 --- a/src/test/run-pass/static-method-xcrate.rs +++ b/src/test/run-pass/static-method-xcrate.rs @@ -1,5 +1,6 @@ // xfail-fast // aux-build:static-methods-crate.rs +#[legacy_exports]; extern mod static_methods_crate; use static_methods_crate::read; diff --git a/src/test/run-pass/struct-return.rs b/src/test/run-pass/struct-return.rs index 3b3a3eae624..c72be6f8a22 100644 --- a/src/test/run-pass/struct-return.rs +++ b/src/test/run-pass/struct-return.rs @@ -3,6 +3,7 @@ type floats = { a: f64, b: u8, c: f64 }; #[nolink] extern mod rustrt { + #[legacy_exports]; fn debug_abi_1(++q: quad) -> quad; fn debug_abi_2(++f: floats) -> floats; } diff --git a/src/test/run-pass/syntax-extension-source-utils.rs b/src/test/run-pass/syntax-extension-source-utils.rs index f20427dec88..1704047a48f 100644 --- a/src/test/run-pass/syntax-extension-source-utils.rs +++ b/src/test/run-pass/syntax-extension-source-utils.rs @@ -1,14 +1,17 @@ // This test is brittle! // xfail-pretty - the pretty tests lose path information, breaking #include +#[legacy_exports]; mod m1 { + #[legacy_exports]; mod m2 { + #[legacy_exports]; fn where_am_i() -> ~str { module_path!() } } } fn main() { - assert(line!() == 11u); + assert(line!() == 14u); assert(col!() == 11u); assert(file!().ends_with(~"syntax-extension-source-utils.rs")); assert(stringify!((2*3) + 5) == ~"2 * 3 + 5"); diff --git a/src/test/run-pass/tag-exports.rs b/src/test/run-pass/tag-exports.rs index 3c4d05b675f..8191ecfc5ea 100644 --- a/src/test/run-pass/tag-exports.rs +++ b/src/test/run-pass/tag-exports.rs @@ -1,6 +1,7 @@ use alder::*; mod alder { + #[legacy_exports]; export burnside; export couch; export everett; diff --git a/src/test/run-pass/trait-mix.rc b/src/test/run-pass/trait-mix.rc index 1366f08f38d..818f41de262 100644 --- a/src/test/run-pass/trait-mix.rc +++ b/src/test/run-pass/trait-mix.rc @@ -1,5 +1,8 @@ mod trait_mix { + #[legacy_exports]; #[path = "trait-mix.rs"] + #[legacy_exports] mod trait_mix; + #[legacy_exports] mod u_trait_mix; } diff --git a/src/test/run-pass/type-in-nested-module.rs b/src/test/run-pass/type-in-nested-module.rs index 059f22ba15c..fe31c261ad7 100644 --- a/src/test/run-pass/type-in-nested-module.rs +++ b/src/test/run-pass/type-in-nested-module.rs @@ -1,7 +1,9 @@ mod a { + #[legacy_exports]; mod b { + #[legacy_exports]; type t = int; fn foo() { let x: t = 10; } diff --git a/src/test/run-pass/use-import-export.rs b/src/test/run-pass/use-import-export.rs index 798bcb8c84f..630d9fc2323 100644 --- a/src/test/run-pass/use-import-export.rs +++ b/src/test/run-pass/use-import-export.rs @@ -1,10 +1,12 @@ mod foo { + #[legacy_exports]; fn x() -> int { return 1; } } mod bar { + #[legacy_exports]; fn y() -> int { return 1; } } diff --git a/src/test/run-pass/use-mod.rs b/src/test/run-pass/use-mod.rs index fcb50bd3436..13964081e47 100644 --- a/src/test/run-pass/use-mod.rs +++ b/src/test/run-pass/use-mod.rs @@ -1,7 +1,9 @@ use mod a::b; mod a { + #[legacy_exports]; mod b { + #[legacy_exports]; fn f() {} } } diff --git a/src/test/run-pass/use.rs b/src/test/run-pass/use.rs index 8d2357cca73..10c9fcae8e7 100644 --- a/src/test/run-pass/use.rs +++ b/src/test/run-pass/use.rs @@ -7,6 +7,7 @@ extern mod bar(name = "core", vers = "0.4"); use core::str; use x = zed::str; mod baz { + #[legacy_exports]; use bar::str; use x = core::str; } diff --git a/src/test/run-pass/warn-ctypes-inhibit.rs b/src/test/run-pass/warn-ctypes-inhibit.rs index 48cddf5661c..d6a7dd9993e 100644 --- a/src/test/run-pass/warn-ctypes-inhibit.rs +++ b/src/test/run-pass/warn-ctypes-inhibit.rs @@ -4,6 +4,7 @@ #[nolink] extern mod libc { + #[legacy_exports]; fn malloc(size: int) -> *u8; } diff --git a/src/test/run-pass/x86stdcall2.rs b/src/test/run-pass/x86stdcall2.rs index 423bafae452..deaec65dac7 100644 --- a/src/test/run-pass/x86stdcall2.rs +++ b/src/test/run-pass/x86stdcall2.rs @@ -7,6 +7,7 @@ type BOOL = u8; #[cfg(target_os = "win32")] #[abi = "stdcall"] extern mod kernel32 { + #[legacy_exports]; fn GetProcessHeap() -> HANDLE; fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID; fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL; |
