Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Install new pub/priv/export rules as defaults, old rules accessible u…

…nder #[legacy_exports];
  • Loading branch information...
commit dffe188991325b4e803fdd0da7c1563ce0fa27f4 1 parent 60443d4
@graydon graydon authored
Showing with 1,174 additions and 120 deletions.
  1. +2 −1  doc/rust.md
  2. +6 −2 doc/tutorial-ffi.md
  3. +2 −0  doc/tutorial.md
  4. +2 −0  src/cargo/cargo.rc
  5. +2 −0  src/cargo/cargo.rs
  6. +7 −0 src/compiletest/compiletest.rc
  7. +1 −0  src/fuzzer/fuzzer.rc
  8. +2 −0  src/fuzzer/fuzzer.rs
  9. +6 −1 src/libcore/at_vec.rs
  10. +1 −0  src/libcore/box.rs
  11. +2 −0  src/libcore/cast.rs
  12. +1 −0  src/libcore/cleanup.rs
  13. +8 −0 src/libcore/cmath.rs
  14. +6 −2 src/libcore/cmp.rs
  15. +2 −0  src/libcore/comm.rs
  16. +84 −0 src/libcore/core.rc
  17. +4 −0 src/libcore/core.rs
  18. +1 −0  src/libcore/dlist.rs
  19. +4 −0 src/libcore/extfmt.rs
  20. +1 −0  src/libcore/f32.rs
  21. +1 −0  src/libcore/f64.rs
  22. +1 −0  src/libcore/flate.rs
  23. +1 −0  src/libcore/float.rs
  24. +1 −0  src/libcore/future.rs
  25. +1 −0  src/libcore/gc.rs
  26. +3 −0  src/libcore/io.rs
  27. +167 −41 src/libcore/libc.rs
  28. +1 −0  src/libcore/logging.rs
  29. +11 −0 src/libcore/os.rs
  30. +2 −0  src/libcore/path.rs
  31. +4 −0 src/libcore/pipes.rs
  32. +2 −0  src/libcore/private.rs
  33. +2 −0  src/libcore/ptr.rs
  34. +2 −0  src/libcore/rand.rs
  35. +1 −0  src/libcore/result.rs
  36. +1 −0  src/libcore/rt.rs
  37. +2 −0  src/libcore/run.rs
  38. +2 −0  src/libcore/send_map.rs
  39. +2 −0  src/libcore/stackwalk.rs
  40. +5 −1 src/libcore/str.rs
  41. +2 −0  src/libcore/sys.rs
  42. +1 −0  src/libcore/task.rs
  43. +1 −0  src/libcore/to_str.rs
  44. +2 −0  src/libcore/unicode.rs
  45. +1 −0  src/libcore/util.rs
  46. +8 −1 src/libcore/vec.rs
  47. +1 −0  src/libstd/arc.rs
  48. +2 −0  src/libstd/arena.rs
  49. +1 −0  src/libstd/base64.rs
  50. +1 −0  src/libstd/bitv.rs
  51. +1 −0  src/libstd/c_vec.rs
  52. +1 −0  src/libstd/comm.rs
  53. +1 −0  src/libstd/dbg.rs
  54. +1 −0  src/libstd/deque.rs
  55. +1 −0  src/libstd/getopts.rs
  56. +1 −0  src/libstd/json.rs
  57. +1 −0  src/libstd/list.rs
  58. +3 −0  src/libstd/map.rs
  59. +3 −0  src/libstd/net_ip.rs
  60. +5 −0 src/libstd/net_tcp.rs
  61. +1 −0  src/libstd/net_url.rs
  62. +7 −0 src/libstd/rope.rs
  63. +1 −0  src/libstd/sha1.rs
  64. +3 −0  src/libstd/sort.rs
  65. +42 −0 src/libstd/std.rc
  66. +1 −0  src/libstd/sync.rs
  67. +2 −0  src/libstd/test.rs
  68. +2 −0  src/libstd/time.rs
  69. +1 −0  src/libstd/timer.rs
  70. +1 −0  src/libstd/treemap.rs
  71. +3 −0  src/libstd/unicode.rs
  72. +2 −0  src/libstd/uv_global_loop.rs
  73. +1 −0  src/libstd/uv_iotask.rs
  74. +11 −0 src/libstd/uv_ll.rs
  75. +1 −0  src/libsyntax/ext/auto_serialize.rs
  76. +1 −0  src/libsyntax/ext/pipes/ast_builder.rs
  77. +2 −1  src/libsyntax/ext/pipes/pipec.rs
  78. +1 −0  src/libsyntax/parse/token.rs
  79. +52 −18 src/libsyntax/print/pprust.rs
  80. +52 −0 src/libsyntax/syntax.rc
  81. +3 −0  src/rustc/back/link.rs
  82. +1 −0  src/rustc/back/rpath.rs
  83. +1 −0  src/rustc/driver/driver.rs
  84. +1 −0  src/rustc/driver/session.rs
  85. +2 −0  src/rustc/front/intrinsic.rs
  86. +1 −0  src/rustc/front/test.rs
  87. +1 −0  src/rustc/lib/llvm.rs
  88. +6 −0 src/rustc/metadata.rs
  89. +1 −0  src/rustc/middle/lang_items.rs
  90. +69 −21 src/rustc/middle/resolve.rs
  91. +104 −0 src/rustc/rustc.rc
  92. +1 −0  src/rustdoc/attr_parser.rs
  93. +1 −0  src/rustdoc/attr_pass.rs
  94. +1 −0  src/rustdoc/config.rs
  95. +2 −0  src/rustdoc/demo.rs
  96. +1 −0  src/rustdoc/desc_to_brief_pass.rs
  97. +3 −1 src/rustdoc/extract.rs
  98. +1 −0  src/rustdoc/markdown_index_pass.rs
  99. +5 −2 src/rustdoc/markdown_pass.rs
  100. +1 −0  src/rustdoc/markdown_writer.rs
  101. +1 −0  src/rustdoc/page_pass.rs
  102. +1 −0  src/rustdoc/prune_hidden_pass.rs
  103. +28 −1 src/rustdoc/rustdoc.rc
  104. +11 −5 src/rustdoc/sectionalize_pass.rs
  105. +2 −1  src/rustdoc/sort_item_type_pass.rs
  106. +1 −0  src/rustdoc/text_pass.rs
  107. +3 −1 src/rustdoc/trim_pass.rs
  108. +1 −0  src/rustdoc/tystr_pass.rs
  109. +1 −0  src/test/auxiliary/cci_class.rs
  110. +1 −0  src/test/auxiliary/cci_class_2.rs
  111. +1 −0  src/test/auxiliary/cci_class_3.rs
  112. +1 −0  src/test/auxiliary/cci_class_4.rs
  113. +1 −0  src/test/auxiliary/cci_class_5.rs
  114. +1 −0  src/test/auxiliary/cci_class_6.rs
  115. +1 −0  src/test/auxiliary/cci_class_cast.rs
  116. +1 −0  src/test/auxiliary/cci_class_trait.rs
  117. +1 −0  src/test/auxiliary/cci_intrinsic.rs
  118. +2 −0  src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
  119. +2 −0  src/test/auxiliary/crateresolve7x.rs
  120. +1 −0  src/test/auxiliary/extern-crosscrate-source.rs
  121. +1 −0  src/test/auxiliary/foreign_lib.rs
  122. +1 −0  src/test/auxiliary/issue-3012-1.rs
  123. +1 −0  src/test/auxiliary/issue_2316_b.rs
  124. +1 −0  src/test/auxiliary/noexporttypelib.rs
  125. +1 −1  src/test/auxiliary/static-methods-crate.rs
  126. +2 −0  src/test/auxiliary/test_comm.rs
  127. +3 −0  src/test/bench/shootout-nbody.rs
  128. +1 −0  src/test/bench/task-perf-word-count-generic.rs
  129. +2 −1  src/test/compile-fail/attr-bad-meta.rs
  130. +2 −1  src/test/compile-fail/bad-expr-path.rs
  131. +3 −1 src/test/compile-fail/bad-expr-path2.rs
  132. +1 −0  src/test/compile-fail/crateresolve2.rs
  133. +1 −0  src/test/compile-fail/empty-linkname.rs
  134. +1 −0  src/test/compile-fail/empty-linkname2.rs
  135. +1 −0  src/test/compile-fail/export-fully-qualified.rs
  136. +1 −0  src/test/compile-fail/export-import.rs
  137. +1 −0  src/test/compile-fail/export-tag-variant.rs
  138. +1 −0  src/test/compile-fail/export.rs
  139. +2 −0  src/test/compile-fail/export2.rs
  140. +1 −0  src/test/compile-fail/foreign-unsafe-fn-called.rs
  141. +1 −0  src/test/compile-fail/foreign-unsafe-fn.rs
  142. +2 −0  src/test/compile-fail/fully-qualified-type-name2.rs
  143. +1 −0  src/test/compile-fail/import-from-missing.rs
  144. +1 −0  src/test/compile-fail/import-from-rename.rs
  145. +1 −0  src/test/compile-fail/import-glob-0.rs
  146. +3 −0  src/test/compile-fail/import-glob-circular.rs
  147. +1 −0  src/test/compile-fail/import-glob-export.rs
  148. +1 −0  src/test/compile-fail/import-glob-rename.rs
  149. +2 −0  src/test/compile-fail/import-loop-2.rs
  150. +1 −0  src/test/compile-fail/import-loop.rs
  151. +1 −0  src/test/compile-fail/import.rs
  152. +3 −1 src/test/compile-fail/import2.rs
  153. +4 −2 src/test/compile-fail/import4.rs
  154. +1 −0  src/test/compile-fail/issue-1193.rs
  155. +1 −0  src/test/compile-fail/issue-1655.rs
  156. +1 −0  src/test/compile-fail/issue-2123.rs
  157. +1 −0  src/test/compile-fail/issue-2718-a.rs
  158. +2 −0  src/test/compile-fail/issue-2766-a.rs
  159. +1 −0  src/test/compile-fail/issue-2848.rs
  160. +1 −0  src/test/compile-fail/issue-2937.rs
  161. +2 −0  src/test/compile-fail/issue-3099-b.rs
  162. +1 −0  src/test/compile-fail/keyword.rs
  163. +2 −1  src/test/compile-fail/nolink-with-link-args.rs
  164. +1 −0  src/test/compile-fail/private-impl-method.rs
  165. +1 −0  src/test/compile-fail/private-item-simple.rs
  166. +1 −0  src/test/compile-fail/private-method.rs
  167. +1 −0  src/test/compile-fail/private-struct-field-ctor.rs
  168. +1 −0  src/test/compile-fail/private-struct-field-pattern.rs
  169. +1 −0  src/test/compile-fail/private-struct-field.rs
  170. +1 −0  src/test/compile-fail/private-variant.rs
  171. +2 −0  src/test/compile-fail/redundant-link-args.rs
  172. +1 −0  src/test/compile-fail/regions-glb-free-free.rs
  173. +3 −0  src/test/compile-fail/unused-imports-warn.rs
  174. +1 −0  src/test/compile-fail/warn-ctypes-err-attr.rs
  175. +1 −0  src/test/compile-fail/warn-ctypes.rs
  176. +1 −0  src/test/compile-fail/warn-foreign-int-types.rs
  177. +1 −0  src/test/run-fail/extern-fail.rs
  178. +1 −0  src/test/run-fail/morestack2.rs
  179. +1 −0  src/test/run-fail/run-unexported-tests.rs
  180. +1 −0  src/test/run-pass/alt-path.rs
  181. +1 −0  src/test/run-pass/attr-before-view-item2.rs
  182. +1 −0  src/test/run-pass/binops.rs
  183. +1 −0  src/test/run-pass/box-annihilator-shared.rs
  184. +1 −0  src/test/run-pass/box-annihilator-unique-vec.rs
  185. +1 −0  src/test/run-pass/box-annihilator-unique.rs
  186. +1 −0  src/test/run-pass/c-stack-as-value.rs
  187. +1 −0  src/test/run-pass/c-stack-returning-int64.rs
  188. +1 −0  src/test/run-pass/class-exports.rs
  189. +6 −0 src/test/run-pass/companionmod.rc
  190. +1 −0  src/test/run-pass/companionmod.rs
  191. +9 −1 src/test/run-pass/conditional-compile.rs
  192. +1 −0  src/test/run-pass/crate-attributes-src/foo.rs
  193. +2 −0  src/test/run-pass/crate-attributes.rc
  194. +3 −0  src/test/run-pass/crateresolve2.rs
  195. +2 −0  src/test/run-pass/crateresolve3.rs
  196. +2 −0  src/test/run-pass/crateresolve4.rs
  197. +1 −0  src/test/run-pass/export-abstract-tag.rs
  198. +2 −0  src/test/run-pass/export-glob-imports-target.rs
  199. +2 −0  src/test/run-pass/export-glob.rs
  200. +1 −0  src/test/run-pass/export-multi.rs
  201. +2 −0  src/test/run-pass/export-non-interference2.rs
  202. +2 −0  src/test/run-pass/export-non-interference3.rs
  203. +1 −0  src/test/run-pass/export-tag-variant.rs
  204. +1 −0  src/test/run-pass/export-unexported-dep.rs
  205. +2 −0  src/test/run-pass/expr-scope.rs
  206. +1 −0  src/test/run-pass/extern-call-deep.rs
  207. +1 −0  src/test/run-pass/extern-call-deep2.rs
  208. +1 −0  src/test/run-pass/extern-call-scrub.rs
  209. +1 −0  src/test/run-pass/extern-call.rs
  210. +1 −0  src/test/run-pass/extern-stress.rs
  211. +1 −0  src/test/run-pass/extern-yield.rs
  212. +2 −0  src/test/run-pass/foreign-dupe.rs
  213. +1 −0  src/test/run-pass/foreign-fn-linkname.rs
  214. +1 −0  src/test/run-pass/foreign-lib-path.rs
  215. +1 −0  src/test/run-pass/foreign-mod-unused-const.rs
  216. +1 −0  src/test/run-pass/foreign-no-abi.rs
  217. +1 −0  src/test/run-pass/foreign-struct.rs
  218. +7 −3 src/test/run-pass/foreign2.rs
  219. +1 −0  src/test/run-pass/generic-fn-twice.rs
  220. +3 −0  src/test/run-pass/global-scope.rs
  221. +1 −0  src/test/run-pass/hashmap-memory.rs
  222. +2 −0  src/test/run-pass/import-from-foreign.rs
  223. +1 −0  src/test/run-pass/import-from.rs
  224. +7 −0 src/test/run-pass/import-glob-0.rs
  225. +6 −0 src/test/run-pass/import-glob-1.rs
  226. +2 −0  src/test/run-pass/import-trailing-comma.rs
  227. +2 −0  src/test/run-pass/import.rs
  228. +1 −0  src/test/run-pass/import2.rs
  229. +2 −0  src/test/run-pass/import3.rs
  230. +1 −0  src/test/run-pass/import4.rs
  231. +2 −0  src/test/run-pass/import5.rs
  232. +3 −0  src/test/run-pass/import6.rs
  233. +6 −1 src/test/run-pass/import7.rs
  234. +1 −0  src/test/run-pass/import8.rs
  235. +2 −0  src/test/run-pass/inner-module.rs
  236. +3 −0  src/test/run-pass/intrinsic-alignment.rs
  237. +1 −0  src/test/run-pass/intrinsic-atomics.rs
  238. +1 −0  src/test/run-pass/intrinsic-frame-address.rs
  239. +1 −0  src/test/run-pass/intrinsic-move-val.rs
  240. +1 −0  src/test/run-pass/issue-1251.rs
  241. +4 −0 src/test/run-pass/issue-1866.rs
  242. +1 −0  src/test/run-pass/issue-2214.rs
  243. +5 −0 src/test/run-pass/issue-2718.rs
  244. +1 −0  src/test/run-pass/issue-2904.rs
  245. +1 −0  src/test/run-pass/issue-506.rs
  246. +31 −6 src/test/run-pass/item-attributes.rs
  247. +2 −0  src/test/run-pass/item-name-overload.rs
  248. +1 −0  src/test/run-pass/keyword-changes-2012-07-31.rs
  249. +1 −0  src/test/run-pass/mod-inside-fn.rs
  250. +1 −0  src/test/run-pass/mod-view-items.rs
  251. +9 −0 src/test/run-pass/module-polymorphism.rc
  252. +10 −0 src/test/run-pass/module-polymorphism2.rc
  253. +4 −0 src/test/run-pass/module-polymorphism3.rc
  254. +6 −0 src/test/run-pass/module-polymorphism4.rc
  255. +1 −0  src/test/run-pass/morestack-address.rs
  256. +1 −0  src/test/run-pass/morestack6.rs
  257. +3 −0  src/test/run-pass/multi.rc
  258. +1 −0  src/test/run-pass/nil-decl-in-foreign.rs
  259. +1 −0  src/test/run-pass/path.rs
  260. +4 −0 src/test/run-pass/pipe-pingpong-bounded.rs
  261. +1 −0  src/test/run-pass/pipe-pingpong-proto.rs
  262. +3 −0  src/test/run-pass/rec-align-u32.rs
  263. +6 −0 src/test/run-pass/rec-align-u64.rs
  264. +1 −0  src/test/run-pass/rt-sched-1.rs
  265. +4 −0 src/test/run-pass/self-shadowing-import.rs
  266. +2 −0  src/test/run-pass/static-impl.rs
  267. +1 −0  src/test/run-pass/static-method-xcrate.rs
  268. +1 −0  src/test/run-pass/struct-return.rs
  269. +4 −1 src/test/run-pass/syntax-extension-source-utils.rs
  270. +1 −0  src/test/run-pass/tag-exports.rs
  271. +3 −0  src/test/run-pass/trait-mix.rc
  272. +2 −0  src/test/run-pass/type-in-nested-module.rs
  273. +2 −0  src/test/run-pass/use-import-export.rs
  274. +2 −0  src/test/run-pass/use-mod.rs
  275. +1 −0  src/test/run-pass/use.rs
  276. +1 −0  src/test/run-pass/warn-ctypes-inhibit.rs
  277. +1 −0  src/test/run-pass/x86stdcall2.rs
View
3  doc/rust.md
@@ -875,7 +875,8 @@ declaration replaces the default export with the export specified.
An example of an export:
~~~~~~~~
-mod foo {
+pub mod foo {
+ #[legacy_exports];
export primary;
fn primary() {
View
8 doc/tutorial-ffi.md
@@ -123,7 +123,9 @@ null pointers.
The `sha1` function is the most obscure part of the program.
~~~~
-# mod crypto { fn SHA1(src: *u8, sz: uint, out: *u8) -> *u8 { out } }
+# pub mod crypto {
+# pub fn SHA1(src: *u8, sz: uint, out: *u8) -> *u8 { out }
+# }
# fn as_hex(data: ~[u8]) -> ~str { ~"hi" }
fn sha1(data: ~str) -> ~str {
unsafe {
@@ -166,7 +168,9 @@ Rust's safety mechanisms.
Let's look at our `sha1` function again.
~~~~
-# mod crypto { fn SHA1(src: *u8, sz: uint, out: *u8) -> *u8 { out } }
+# pub mod crypto {
+# pub fn SHA1(src: *u8, sz: uint, out: *u8) -> *u8 { out }
+# }
# fn as_hex(data: ~[u8]) -> ~str { ~"hi" }
# fn x(data: ~str) -> ~str {
# unsafe {
View
2  doc/tutorial.md
@@ -1820,6 +1820,7 @@ explicitly import it, you must refer to it by its long name,
`farm::chicken`.
~~~~
+#[legacy_exports]
mod farm {
fn chicken() -> ~str { ~"cluck cluck" }
fn cow() -> ~str { ~"mooo" }
@@ -2004,6 +2005,7 @@ Rust uses three different namespaces: one for modules, one for types,
and one for values. This means that this code is valid:
~~~~
+#[legacy_exports]
mod buffalo {
type buffalo = int;
fn buffalo<buffalo>(+buffalo: buffalo) -> buffalo { buffalo }
View
2  src/cargo/cargo.rc
@@ -17,6 +17,7 @@
#[crate_type = "bin"];
#[no_core];
+#[legacy_exports];
#[allow(vecs_implicitly_copyable,
non_implicitly_copyable_typarams)];
@@ -29,4 +30,5 @@ extern mod syntax(vers = "0.4");
use core::*;
+#[legacy_exports]
mod pgp;
View
2  src/cargo/cargo.rs
@@ -1,5 +1,7 @@
// cargo.rs - Rust package manager
+#[legacy_exports];
+
use syntax::{ast, codemap, parse, visit, attr};
use syntax::diagnostic::span_handler;
use codemap::span;
View
7 src/compiletest/compiletest.rc
@@ -1,6 +1,7 @@
#[crate_type = "bin"];
#[no_core];
+#[legacy_exports];
#[allow(vecs_implicitly_copyable)];
#[allow(non_camel_case_types)];
@@ -10,11 +11,17 @@ extern mod std(vers = "0.4");
use core::*;
+#[legacy_exports]
mod procsrv;
+#[legacy_exports]
mod util;
+#[legacy_exports]
mod header;
+#[legacy_exports]
mod runtest;
+#[legacy_exports]
mod common;
+#[legacy_exports]
mod errors;
// Local Variables:
View
1  src/fuzzer/fuzzer.rc
@@ -5,6 +5,7 @@
#[no_core];
#[legacy_modes];
+#[legacy_exports];
#[allow(vecs_implicitly_copyable)];
#[allow(non_camel_case_types)];
View
2  src/fuzzer/fuzzer.rs
@@ -1,3 +1,5 @@
+#[legacy_exports];
+
use io::WriterUtil;
use syntax::{ast, ast_util, fold, visit, codemap};
View
7 src/libcore/at_vec.rs
@@ -15,6 +15,7 @@ export traits;
#[abi = "cdecl"]
extern mod rustrt {
+ #[legacy_exports];
fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
++v: **vec::raw::VecRepr,
++n: libc::size_t);
@@ -22,6 +23,7 @@ extern mod rustrt {
#[abi = "rust-intrinsic"]
extern mod rusti {
+ #[legacy_exports];
fn move_val_init<T>(&dst: T, -src: T);
}
@@ -135,6 +137,7 @@ pure fn from_elem<T: Copy>(n_elts: uint, t: T) -> @[T] {
#[cfg(notest)]
mod traits {
+ #[legacy_exports];
#[cfg(stage0)]
impl<T: Copy> @[T]: Add<&[const T],@[T]> {
#[inline(always)]
@@ -153,9 +156,11 @@ mod traits {
}
#[cfg(test)]
-mod traits {}
+mod traits {
+ #[legacy_exports];}
mod raw {
+ #[legacy_exports];
type VecRepr = vec::raw::VecRepr;
type SliceRepr = vec::raw::SliceRepr;
View
1  src/libcore/box.rs
@@ -10,6 +10,7 @@ use intrinsic::TyDesc;
export ptr_eq, raw;
mod raw {
+ #[legacy_exports];
struct BoxHeaderRepr {
ref_count: uint,
View
2  src/libcore/cast.rs
@@ -8,6 +8,7 @@ export copy_lifetime, copy_lifetime_vec;
#[abi = "rust-intrinsic"]
extern mod rusti {
+ #[legacy_exports];
fn forget<T>(-x: T);
fn reinterpret_cast<T, U>(e: T) -> U;
}
@@ -97,6 +98,7 @@ unsafe fn copy_lifetime_vec<S,T>(_ptr: &a/[S], ptr: &T) -> &a/T {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
#[test]
fn test_reinterpret_cast() {
View
1  src/libcore/cleanup.rs
@@ -121,6 +121,7 @@ pub unsafe fn annihilate() {
/// Bindings to the runtime
extern mod rustrt {
+ #[legacy_exports];
#[rust_stack]
/*priv*/ fn rust_get_task() -> *c_void;
}
View
8 src/libcore/cmath.rs
@@ -23,6 +23,7 @@ use libc::c_double;
#[link_name = "m"]
#[abi = "cdecl"]
extern mod c_double {
+ #[legacy_exports];
// Alpabetically sorted by link_name
@@ -98,6 +99,7 @@ extern mod c_double {
#[link_name = "m"]
#[abi = "cdecl"]
extern mod c_float {
+ #[legacy_exports];
// Alpabetically sorted by link_name
@@ -166,6 +168,7 @@ extern mod c_float {
// FIXME obtain machine float/math constants automatically (Issue #1986)
mod c_float_targ_consts {
+ #[legacy_exports];
const radix: uint = 2u;
const mantissa_digits: uint = 24u;
const digits: uint = 6u;
@@ -181,6 +184,7 @@ mod c_float_targ_consts {
}
mod c_double_targ_consts {
+ #[legacy_exports];
const radix: uint = 2u;
const mantissa_digits: uint = 53u;
const digits: uint = 15u;
@@ -200,6 +204,7 @@ mod c_double_targ_consts {
FIXME use these once they can be parsed (see Issue #1433)
mod c_float_math_consts {
+ #[legacy_exports];
const pi: c_float = 0x1.921fb6p+1_f32;
const div_1_pi: c_float = 0x1.45f306p-2_f32;
const div_2_pi: c_float = 0x1.45f306p-1_f32;
@@ -216,6 +221,7 @@ mod c_float_math_consts {
}
mod c_double_math_consts {
+ #[legacy_exports];
const pi: c_double = 0x1.921fb54442d18p+1_f64;
const div_1_pi: c_double = 0x1.45f306dc9c883p-2_f64;
const div_2_pi: c_double = 0x1.45f306dc9c883p-1_f64;
@@ -232,6 +238,7 @@ mod c_double_math_consts {
}
mod c_float_targ_consts {
+ #[legacy_exports];
const radix: uint = 2u;
const mantissa_digits: uint = 24u;
const digits: uint = 6u;
@@ -245,6 +252,7 @@ mod c_float_targ_consts {
}
mod c_double_targ_consts {
+ #[legacy_exports];
const radix: uint = 2u;
const mantissa_digits: uint = 53u;
const digits: uint = 15u;
View
8 src/libcore/cmp.rs
@@ -24,6 +24,7 @@ export Eq;
// Awful hack to work around duplicate lang items in core test.
#[cfg(notest)]
mod nounittest {
+ #[legacy_exports];
/**
* Trait for values that can be compared for a sort-order.
*
@@ -75,10 +76,12 @@ mod nounittest {
}
#[cfg(test)]
-mod nounittest {}
+mod nounittest {
+ #[legacy_exports];}
#[cfg(test)]
mod unittest {
+ #[legacy_exports];
#[cfg(stage0)]
trait Ord {
pure fn lt(&&other: self) -> bool;
@@ -111,7 +114,8 @@ mod unittest {
}
#[cfg(notest)]
-mod unittest {}
+mod unittest {
+ #[legacy_exports];}
#[cfg(stage0)]
pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
View
2  src/libcore/comm.rs
@@ -275,6 +275,7 @@ type port_id = int;
#[abi = "cdecl"]
extern mod rustrt {
+ #[legacy_exports];
fn rust_port_id_send(target_port: port_id, data: *()) -> libc::uintptr_t;
fn new_port(unit_sz: libc::size_t) -> *rust_port;
@@ -297,6 +298,7 @@ extern mod rustrt {
#[abi = "rust-intrinsic"]
extern mod rusti {
+ #[legacy_exports];
fn init<T>() -> T;
}
View
84 src/libcore/core.rc
@@ -85,43 +85,54 @@ export private;
/// Operations and constants for `int`
#[path = "int-template"]
mod int {
+ #[legacy_exports];
use inst::{ pow };
export pow;
#[path = "int.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `i8`
#[path = "int-template"]
mod i8 {
+ #[legacy_exports];
#[path = "i8.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `i16`
#[path = "int-template"]
mod i16 {
+ #[legacy_exports];
#[path = "i16.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `i32`
#[path = "int-template"]
mod i32 {
+ #[legacy_exports];
#[path = "i32.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `i64`
#[path = "int-template"]
mod i64 {
+ #[legacy_exports];
#[path = "i64.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `uint`
#[path = "uint-template"]
mod uint {
+ #[legacy_exports];
use inst::{
div_ceil, div_round, div_floor, iterate,
next_power_of_two
@@ -130,135 +141,208 @@ mod uint {
next_power_of_two;
#[path = "uint.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `u8`
#[path = "uint-template"]
mod u8 {
+ #[legacy_exports];
use inst::is_ascii;
export is_ascii;
#[path = "u8.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `u16`
#[path = "uint-template"]
mod u16 {
+ #[legacy_exports];
#[path = "u16.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `u32`
#[path = "uint-template"]
mod u32 {
+ #[legacy_exports];
#[path = "u32.rs"]
+ #[legacy_exports]
mod inst;
}
/// Operations and constants for `u64`
#[path = "uint-template"]
mod u64 {
+ #[legacy_exports];
#[path = "u64.rs"]
+ #[legacy_exports]
mod inst;
}
+#[legacy_exports]
mod box;
+#[legacy_exports]
mod char;
+#[legacy_exports]
mod float;
+#[legacy_exports]
mod f32;
+#[legacy_exports]
mod f64;
+#[legacy_exports]
mod str;
+#[legacy_exports]
mod ptr;
+#[legacy_exports]
mod vec;
+#[legacy_exports]
mod at_vec;
+#[legacy_exports]
mod bool;
+#[legacy_exports]
mod tuple;
+#[legacy_exports]
mod unit;
+#[legacy_exports]
mod uniq;
// Ubiquitous-utility-type modules
#[cfg(notest)]
+#[legacy_exports]
mod ops;
+#[legacy_exports]
mod cmp;
+#[legacy_exports]
mod num;
+#[legacy_exports]
mod hash;
+#[legacy_exports]
mod either;
+#[legacy_exports]
mod iter;
+#[legacy_exports]
mod logging;
+#[legacy_exports]
mod option;
#[path="iter-trait"]
mod option_iter {
+ #[legacy_exports];
#[path = "option.rs"]
+ #[legacy_exports]
mod inst;
}
+#[legacy_exports]
mod result;
+#[legacy_exports]
mod to_str;
+#[legacy_exports]
mod to_bytes;
+#[legacy_exports]
mod from_str;
+#[legacy_exports]
mod util;
// Data structure modules
+#[legacy_exports]
mod dvec;
#[path="iter-trait"]
mod dvec_iter {
+ #[legacy_exports];
#[path = "dvec.rs"]
+ #[legacy_exports]
mod inst;
}
+#[legacy_exports]
mod dlist;
#[path="iter-trait"]
mod dlist_iter {
+ #[legacy_exports];
#[path ="dlist.rs"]
+ #[legacy_exports]
mod inst;
}
+#[legacy_exports]
mod send_map;
// Concurrency
+#[legacy_exports]
mod comm;
+#[legacy_exports]
mod task {
+ #[legacy_exports];
+ #[legacy_exports]
mod local_data;
+ #[legacy_exports]
mod local_data_priv;
+ #[legacy_exports]
mod spawn;
+ #[legacy_exports]
mod rt;
}
+#[legacy_exports]
mod future;
+#[legacy_exports]
mod pipes;
// Runtime and language-primitive support
+#[legacy_exports]
mod gc;
+#[legacy_exports]
mod io;
+#[legacy_exports]
mod libc;
+#[legacy_exports]
mod os;
+#[legacy_exports]
mod path;
+#[legacy_exports]
mod rand;
+#[legacy_exports]
mod run;
+#[legacy_exports]
mod sys;
+#[legacy_exports]
mod cast;
+#[legacy_exports]
mod mutable;
+#[legacy_exports]
mod flate;
+#[legacy_exports]
mod repr;
+#[legacy_exports]
mod cleanup;
+#[legacy_exports]
mod reflect;
// Modules supporting compiler-generated code
// Exported but not part of the public interface
+#[legacy_exports]
mod extfmt;
// The test harness links against core, so don't include runtime in tests.
#[cfg(notest)]
+#[legacy_exports]
mod rt;
// For internal use, not exported
+#[legacy_exports]
mod unicode;
+#[legacy_exports]
mod private;
+#[legacy_exports]
mod cmath;
+#[legacy_exports]
mod stackwalk;
// Local Variables:
View
4 src/libcore/core.rs
@@ -2,6 +2,8 @@
// Export various ubiquitous types, constructors, methods.
+#[legacy_exports];
+
use option::{Some, None};
use Option = option::Option;
use result::{Result, Ok, Err};
@@ -84,6 +86,7 @@ const debug : u32 = 3_u32;
// can be resolved within libcore.
#[doc(hidden)] // FIXME #3538
mod core {
+ #[legacy_exports];
const error : u32 = 0_u32;
const warn : u32 = 1_u32;
const info : u32 = 2_u32;
@@ -93,6 +96,7 @@ mod core {
// Similar to above. Some magic to make core testable.
#[cfg(test)]
mod std {
+ #[legacy_exports];
extern mod std(vers = "0.4");
use std::test;
}
View
1  src/libcore/dlist.rs
@@ -452,6 +452,7 @@ impl<T: Copy> DList<T> {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
#[test]
fn test_dlist_concat() {
let a = from_vec(~[1,2]);
View
4 src/libcore/extfmt.rs
@@ -42,6 +42,7 @@ use option::{Some, None};
// Functions used by the fmt extension at compile time
mod ct {
+ #[legacy_exports];
enum Signedness { Signed, Unsigned, }
enum Caseness { CaseUpper, CaseLower, }
enum Ty {
@@ -273,6 +274,7 @@ mod ct {
// conditions can be evaluated at compile-time. For now though it's cleaner to
// implement it 0this way, I think.
mod rt {
+ #[legacy_exports];
const flag_none : u32 = 0u32;
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
const flag_left_zero_pad : u32 = 0b00000000000000000000000000000010u32;
@@ -479,6 +481,7 @@ mod rt {
// XXX remove after snapshots
mod rt2 {
+ #[legacy_exports];
const flag_none : u32 = 0u32;
const flag_left_justify : u32 = 0b00000000000000000000000000000001u32;
const flag_left_zero_pad : u32 = 0b00000000000000000000000000000010u32;
@@ -685,6 +688,7 @@ mod rt2 {
#[cfg(test)]
mod test {
+ #[legacy_exports];
#[test]
fn fmt_slice() {
let s = "abc";
View
1  src/libcore/f32.rs
@@ -105,6 +105,7 @@ pure fn is_finite(x: f32) -> bool {
/* Module: consts */
mod consts {
+ #[legacy_exports];
// FIXME (requires Issue #1433 to fix): replace with mathematical
// constants from cmath.
View
1  src/libcore/f64.rs
@@ -132,6 +132,7 @@ pure fn is_finite(x: f64) -> bool {
/* Module: consts */
mod consts {
+ #[legacy_exports];
// FIXME (requires Issue #1433 to fix): replace with mathematical
// constants from cmath.
View
1  src/libcore/flate.rs
@@ -11,6 +11,7 @@ Simple compression
use libc::{c_void, size_t, c_int};
extern mod rustrt {
+ #[legacy_exports];
fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
src_buf_len: size_t,
View
1  src/libcore/float.rs
@@ -52,6 +52,7 @@ const neg_infinity: float = -1.0/0.0;
/* Module: consts */
mod consts {
+ #[legacy_exports];
// FIXME (requires Issue #1433 to fix): replace with mathematical
// constants from cmath.
View
1  src/libcore/future.rs
@@ -180,6 +180,7 @@ proto! future_pipe (
#[allow(non_implicitly_copyable_typarams)]
mod test {
+ #[legacy_exports];
#[test]
fn test_from_value() {
let f = from_value(~"snail");
View
1  src/libcore/gc.rs
@@ -47,6 +47,7 @@ struct StackSegment {
}
extern mod rustrt {
+ #[legacy_exports];
fn rust_annihilate_box(ptr: *Word);
#[rust_stack]
View
3  src/libcore/io.rs
@@ -17,6 +17,7 @@ type fd_t = c_int;
#[abi = "cdecl"]
extern mod rustrt {
+ #[legacy_exports];
fn rust_get_stdin() -> *libc::FILE;
fn rust_get_stdout() -> *libc::FILE;
fn rust_get_stderr() -> *libc::FILE;
@@ -781,6 +782,7 @@ fn read_whole_file(file: &Path) -> Result<~[u8], ~str> {
// fsync related
mod fsync {
+ #[legacy_exports];
enum Level {
// whatever fsync does on that platform
@@ -863,6 +865,7 @@ mod fsync {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
#[test]
fn test_simple() {
View
208 src/libcore/libc.rs
@@ -131,18 +131,22 @@ export access, chdir, close, dup, dup2, execv, execve, execvp, getcwd,
mod types {
+ #[legacy_exports];
// Types tend to vary *per architecture* so we pull their definitions out
// into this module.
// Standard types that are opaque or common, so are not per-target.
mod common {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
enum c_void {}
enum FILE {}
enum fpos_t {}
}
mod c99 {
+ #[legacy_exports];
type int8_t = i8;
type int16_t = i16;
type int32_t = i32;
@@ -153,21 +157,28 @@ mod types {
type uint64_t = u64;
}
mod posix88 {
+ #[legacy_exports];
enum DIR {}
enum dirent {}
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
}
// Standard types that are scalar but vary by OS and arch.
#[cfg(target_os = "linux")]
mod os {
+ #[legacy_exports];
#[cfg(target_arch = "x86")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -186,12 +197,14 @@ mod types {
type wchar_t = i32;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i32;
type dev_t = u64;
type ino_t = u32;
@@ -202,16 +215,22 @@ mod types {
type mode_t = u32;
type ssize_t = i32;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
}
}
#[cfg(target_arch = "x86_64")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -230,12 +249,14 @@ mod types {
type wchar_t = i32;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i64;
type dev_t = u64;
type ino_t = u64;
@@ -246,19 +267,26 @@ mod types {
type mode_t = u32;
type ssize_t = i64;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
}
}
}
#[cfg(target_os = "freebsd")]
mod os {
+ #[legacy_exports];
#[cfg(target_arch = "x86_64")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -277,12 +305,14 @@ mod types {
type wchar_t = i32;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i64;
type dev_t = u32;
type ino_t = u32;
@@ -293,19 +323,26 @@ mod types {
type mode_t = u16;
type ssize_t = i64;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
}
}
}
#[cfg(target_os = "win32")]
mod os {
+ #[legacy_exports];
#[cfg(target_arch = "x86")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -324,12 +361,14 @@ mod types {
type wchar_t = u16;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i32;
type dev_t = u32;
type ino_t = i16;
@@ -338,10 +377,14 @@ mod types {
type mode_t = u16;
type ssize_t = i32;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
type BOOL = c_int;
type BYTE = u8;
type CCHAR = c_char;
@@ -377,9 +420,12 @@ mod types {
#[cfg(target_os = "macos")]
mod os {
+ #[legacy_exports];
#[cfg(target_arch = "x86")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -398,12 +444,14 @@ mod types {
type wchar_t = i32;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i64;
type dev_t = i32;
type ino_t = u64;
@@ -414,16 +462,22 @@ mod types {
type mode_t = u16;
type ssize_t = i32;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
}
}
#[cfg(target_arch = "x86_64")]
mod arch {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
type c_char = i8;
type c_schar = i8;
type c_uchar = u8;
@@ -442,12 +496,14 @@ mod types {
type wchar_t = i32;
}
mod c99 {
+ #[legacy_exports];
type c_longlong = i64;
type c_ulonglong = u64;
type intptr_t = int;
type uintptr_t = uint;
}
mod posix88 {
+ #[legacy_exports];
type off_t = i64;
type dev_t = i32;
type ino_t = u64;
@@ -458,23 +514,30 @@ mod types {
type mode_t = u16;
type ssize_t = i64;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
}
}
}
}
mod consts {
+ #[legacy_exports];
// Consts tend to vary per OS so we pull their definitions out
// into this module.
#[cfg(target_os = "win32")]
mod os {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
const EXIT_FAILURE : int = 1;
const EXIT_SUCCESS : int = 0;
const RAND_MAX : int = 32767;
@@ -491,8 +554,10 @@ mod consts {
const L_tmpnam : uint = 16_u;
const TMP_MAX : uint = 32767_u;
}
- mod c99 { }
+ mod c99 {
+ #[legacy_exports]; }
mod posix88 {
+ #[legacy_exports];
const O_RDONLY : int = 0;
const O_WRONLY : int = 1;
const O_RDWR : int = 2;
@@ -521,10 +586,14 @@ mod consts {
const STDOUT_FILENO : int = 1;
const STDERR_FILENO : int = 2;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
const O_TEXT : int = 16384;
const O_BINARY : int = 32768;
const O_NOINHERIT: int = 128;
@@ -537,7 +606,9 @@ mod consts {
#[cfg(target_os = "linux")]
mod os {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
const EXIT_FAILURE : int = 1;
const EXIT_SUCCESS : int = 0;
const RAND_MAX : int = 2147483647;
@@ -554,8 +625,10 @@ mod consts {
const L_tmpnam : uint = 20_u;
const TMP_MAX : uint = 238328_u;
}
- mod c99 { }
+ mod c99 {
+ #[legacy_exports]; }
mod posix88 {
+ #[legacy_exports];
const O_RDONLY : int = 0;
const O_WRONLY : int = 1;
const O_RDWR : int = 2;
@@ -588,10 +661,14 @@ mod consts {
const F_TLOCK : int = 2;
const F_ULOCK : int = 0;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
const O_RSYNC : int = 1052672;
const O_DSYNC : int = 4096;
const O_SYNC : int = 1052672;
@@ -600,7 +677,9 @@ mod consts {
#[cfg(target_os = "freebsd")]
mod os {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
const EXIT_FAILURE : int = 1;
const EXIT_SUCCESS : int = 0;
const RAND_MAX : int = 2147483647;
@@ -617,8 +696,10 @@ mod consts {
const L_tmpnam : uint = 1024_u;
const TMP_MAX : uint = 308915776_u;
}
- mod c99 { }
+ mod c99 {
+ #[legacy_exports]; }
mod posix88 {
+ #[legacy_exports];
const O_RDONLY : int = 0;
const O_WRONLY : int = 1;
const O_RDWR : int = 2;
@@ -651,10 +732,14 @@ mod consts {
const F_TLOCK : int = 2;
const F_ULOCK : int = 0;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
const O_SYNC : int = 128;
const CTL_KERN: int = 1;
const KERN_PROC: int = 14;
@@ -664,7 +749,9 @@ mod consts {
#[cfg(target_os = "macos")]
mod os {
+ #[legacy_exports];
mod c95 {
+ #[legacy_exports];
const EXIT_FAILURE : int = 1;
const EXIT_SUCCESS : int = 0;
const RAND_MAX : int = 2147483647;
@@ -681,8 +768,10 @@ mod consts {
const L_tmpnam : uint = 1024_u;
const TMP_MAX : uint = 308915776_u;
}
- mod c99 { }
+ mod c99 {
+ #[legacy_exports]; }
mod posix88 {
+ #[legacy_exports];
const O_RDONLY : int = 0;
const O_WRONLY : int = 1;
const O_RDWR : int = 2;
@@ -715,10 +804,14 @@ mod consts {
const F_TLOCK : int = 2;
const F_ULOCK : int = 0;
}
- mod posix01 { }
- mod posix08 { }
- mod bsd44 { }
+ mod posix01 {
+ #[legacy_exports]; }
+ mod posix08 {
+ #[legacy_exports]; }
+ mod bsd44 {
+ #[legacy_exports]; }
mod extra {
+ #[legacy_exports];
const O_DSYNC : int = 4194304;
const O_SYNC : int = 128;
const F_FULLFSYNC : int = 51;
@@ -728,15 +821,18 @@ mod consts {
mod funcs {
+ #[legacy_exports];
// Thankfull most of c95 is universally available and does not vary by OS
// or anything. The same is not true of POSIX.
mod c95 {
+ #[legacy_exports];
#[nolink]
#[abi = "cdecl"]
extern mod ctype {
+ #[legacy_exports];
fn isalnum(c: c_int) -> c_int;
fn isalpha(c: c_int) -> c_int;
fn iscntrl(c: c_int) -> c_int;
@@ -755,6 +851,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod stdio {
+ #[legacy_exports];
fn fopen(filename: *c_char, mode: *c_char) -> *FILE;
fn freopen(filename: *c_char, mode: *c_char,
@@ -799,6 +896,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod stdlib {
+ #[legacy_exports];
fn abs(i: c_int) -> c_int;
fn labs(i: c_long) -> c_long;
// Omitted: div, ldiv (return type incomplete).
@@ -824,6 +922,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod string {
+ #[legacy_exports];
fn strcpy(dst: *c_char, src: *c_char) -> *c_char;
fn strncpy(dst: *c_char, src: *c_char, n: size_t) -> *c_char;
@@ -858,10 +957,12 @@ mod funcs {
#[cfg(target_os = "win32")]
mod posix88 {
+ #[legacy_exports];
#[nolink]
#[abi = "cdecl"]
extern mod stat {
+ #[legacy_exports];
#[link_name = "_chmod"]
fn chmod(path: *c_char, mode: c_int) -> c_int;
@@ -872,6 +973,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod stdio {
+ #[legacy_exports];
#[link_name = "_popen"]
fn popen(command: *c_char, mode: *c_char) -> *FILE;
@@ -888,6 +990,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod fcntl {
+ #[legacy_exports];
#[link_name = "_open"]
fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
@@ -898,12 +1001,14 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod dirent {
+ #[legacy_exports];
// Not supplied at all.
}
#[nolink]
#[abi = "cdecl"]
extern mod unistd {
+ #[legacy_exports];
#[link_name = "_access"]
fn access(path: *c_char, amode: c_int) -> c_int;
@@ -968,10 +1073,12 @@ mod funcs {
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
mod posix88 {
+ #[legacy_exports];
#[nolink]
#[abi = "cdecl"]
extern mod stat {
+ #[legacy_exports];
fn chmod(path: *c_char, mode: mode_t) -> c_int;
fn fchmod(fd: c_int, mode: mode_t) -> c_int;
fn mkdir(path: *c_char, mode: mode_t) -> c_int;
@@ -981,6 +1088,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod stdio {
+ #[legacy_exports];
fn popen(command: *c_char, mode: *c_char) -> *FILE;
fn pclose(stream: *FILE) -> c_int;
fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
@@ -990,6 +1098,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod fcntl {
+ #[legacy_exports];
fn open(path: *c_char, oflag: c_int, mode: c_int) -> c_int;
fn creat(path: *c_char, mode: mode_t) -> c_int;
fn fcntl(fd: c_int, cmd: c_int) -> c_int;
@@ -998,6 +1107,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod dirent {
+ #[legacy_exports];
fn opendir(dirname: *c_char) -> *DIR;
fn closedir(dirp: *DIR) -> c_int;
fn readdir(dirp: *DIR) -> *dirent;
@@ -1009,6 +1119,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod unistd {
+ #[legacy_exports];
fn access(path: *c_char, amode: c_int) -> c_int;
fn alarm(seconds: c_uint) -> c_uint;
fn chdir(dir: *c_char) -> c_int;
@@ -1058,10 +1169,12 @@ mod funcs {
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
mod posix01 {
+ #[legacy_exports];
#[nolink]
#[abi = "cdecl"]
extern mod unistd {
+ #[legacy_exports];
fn readlink(path: *c_char, buf: *mut c_char,
bufsz: size_t) -> ssize_t;
@@ -1079,6 +1192,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod wait {
+ #[legacy_exports];
fn waitpid(pid: pid_t, status: *mut c_int,
options: c_int) -> pid_t;
}
@@ -1086,8 +1200,10 @@ mod funcs {
#[cfg(target_os = "win32")]
mod posix01 {
+ #[legacy_exports];
#[nolink]
- extern mod unistd { }
+ extern mod unistd {
+ #[legacy_exports]; }
}
@@ -1096,8 +1212,10 @@ mod funcs {
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
mod posix08 {
+ #[legacy_exports];
#[nolink]
- extern mod unistd { }
+ extern mod unistd {
+ #[legacy_exports]; }
}
@@ -1106,6 +1224,7 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod bsd44 {
+ #[legacy_exports];
fn sysctl(name: *c_int, namelen: c_uint,
oldp: *mut c_void, oldlenp: *mut size_t,
@@ -1123,6 +1242,7 @@ mod funcs {
#[cfg(target_os = "linux")]
#[cfg(target_os = "win32")]
mod bsd44 {
+ #[legacy_exports];
}
@@ -1130,23 +1250,28 @@ mod funcs {
#[nolink]
#[abi = "cdecl"]
extern mod extra {
+ #[legacy_exports];
fn _NSGetExecutablePath(buf: *mut c_char,
bufsize: *mut u32) -> c_int;
}
#[cfg(target_os = "freebsd")]
- mod extra { }
+ mod extra {
+ #[legacy_exports]; }
#[cfg(target_os = "linux")]
- mod extra { }
+ mod extra {
+ #[legacy_exports]; }
#[cfg(target_os = "win32")]
mod extra {
+ #[legacy_exports];
use types::os::arch::extra::*;
#[abi = "stdcall"]
extern mod kernel32 {
+ #[legacy_exports];
fn GetEnvironmentVariableW(n: LPCWSTR,
v: LPWSTR,
nsize: DWORD) -> DWORD;
@@ -1171,6 +1296,7 @@ mod funcs {
#[abi = "cdecl"]
#[nolink]
extern mod msvcrt {
+ #[legacy_exports];
#[link_name = "_commit"]
fn commit(fd: c_int) -> c_int;
}
View
1  src/libcore/logging.rs
@@ -8,6 +8,7 @@ export console_on, console_off;
#[nolink]
extern mod rustrt {
+ #[legacy_exports];
fn rust_log_console_on();
fn rust_log_console_off();
}
View
11 src/libcore/os.rs
@@ -44,6 +44,7 @@ export walk_dir;
export as_c_charp, fill_charp_buf;
extern mod rustrt {
+ #[legacy_exports];
fn rust_getcwd() -> ~str;
fn rust_path_is_dir(path: *libc::c_char) -> c_int;
fn rust_path_exists(path: *libc::c_char) -> c_int;
@@ -78,6 +79,7 @@ fn fill_charp_buf(f: fn(*mut c_char, size_t) -> bool)
#[cfg(windows)]
mod win32 {
+ #[legacy_exports];
use dword = libc::types::os::arch::extra::DWORD;
fn fill_utf16_buf_and_decode(f: fn(*mut u16, dword) -> dword)
@@ -131,6 +133,7 @@ fn env() -> ~[(~str,~str)] {
}
mod global_env {
+ #[legacy_exports];
//! Internal module for serializing access to getenv/setenv
export getenv;
@@ -138,6 +141,7 @@ mod global_env {
export env;
extern mod rustrt {
+ #[legacy_exports];
fn rust_global_env_chan_ptr() -> *libc::uintptr_t;
}
@@ -204,7 +208,9 @@ mod global_env {
}
mod impl_ {
+ #[legacy_exports];
extern mod rustrt {
+ #[legacy_exports];
fn rust_env_pairs() -> ~[~str];
}
@@ -791,6 +797,7 @@ fn family() -> ~str { ~"windows" }
#[cfg(target_os = "macos")]
mod consts {
+ #[legacy_exports];
fn sysname() -> ~str { ~"macos" }
fn exe_suffix() -> ~str { ~"" }
fn dll_suffix() -> ~str { ~".dylib" }
@@ -798,6 +805,7 @@ mod consts {
#[cfg(target_os = "freebsd")]
mod consts {
+ #[legacy_exports];
fn sysname() -> ~str { ~"freebsd" }
fn exe_suffix() -> ~str { ~"" }
fn dll_suffix() -> ~str { ~".so" }
@@ -805,6 +813,7 @@ mod consts {
#[cfg(target_os = "linux")]
mod consts {
+ #[legacy_exports];
fn sysname() -> ~str { ~"linux" }
fn exe_suffix() -> ~str { ~"" }
fn dll_suffix() -> ~str { ~".so" }
@@ -812,6 +821,7 @@ mod consts {
#[cfg(target_os = "win32")]
mod consts {
+ #[legacy_exports];
fn sysname() -> ~str { ~"win32" }
fn exe_suffix() -> ~str { ~".exe" }
fn dll_suffix() -> ~str { ~".dll" }
@@ -829,6 +839,7 @@ fn arch() -> str { ~"arm" }
#[cfg(test)]
#[allow(non_implicitly_copyable_typarams)]
mod tests {
+ #[legacy_exports];
#[test]
fn last_os_error() {
View
2  src/libcore/path.rs
@@ -484,6 +484,7 @@ fn test_double_slash_collapsing()
}
mod posix {
+ #[legacy_exports];
#[cfg(test)]
fn mk(s: &str) -> PosixPath { from_str::<PosixPath>(s) }
@@ -574,6 +575,7 @@ mod posix {
// Various windows helpers, and tests for the impl.
mod windows {
+ #[legacy_exports];
#[inline(always)]
pure fn is_sep(u: u8) -> bool {
View
4 src/libcore/pipes.rs
@@ -268,6 +268,7 @@ fn entangle_buffer<T: Send, Tstart: Send>(
#[abi = "rust-intrinsic"]
#[doc(hidden)]
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;
@@ -308,6 +309,7 @@ type rust_task = libc::c_void;
#[doc(hidden)]
extern mod rustrt {
+ #[legacy_exports];
#[rust_stack]
fn rust_get_task() -> *rust_task;
#[rust_stack]
@@ -1224,6 +1226,7 @@ fn try_send_one<T: Send>(+chan: ChanOne<T>, +data: T)
}
mod rt {
+ #[legacy_exports];
// These are used to hide the option constructors from the
// compiler because their names are changing
fn make_some<T>(+val: T) -> Option<T> { Some(move val) }
@@ -1232,6 +1235,7 @@ mod rt {
#[cfg(test)]
mod test {
+ #[legacy_exports];
#[test]
fn test_select2() {
let (c1, p1) = pipes::stream();
View
2  src/libcore/private.rs
@@ -16,6 +16,7 @@ use task::TaskBuilder;
use task::atomically;
extern mod rustrt {
+ #[legacy_exports];
fn rust_task_weaken(ch: rust_port_id);
fn rust_task_unweaken(ch: rust_port_id);
@@ -558,6 +559,7 @@ fn unwrap_exclusive<T: Send>(+arc: Exclusive<T>) -> T {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
#[test]
fn exclusive_arc() {
View
2  src/libcore/ptr.rs
@@ -27,6 +27,7 @@ use libc::{c_void, size_t};
#[nolink]
#[abi = "cdecl"]
extern mod libc_ {
+ #[legacy_exports];
#[rust_stack]
fn memcpy(dest: *mut c_void, src: *const c_void,
n: libc::size_t) -> *c_void;
@@ -42,6 +43,7 @@ extern mod libc_ {
#[abi = "rust-intrinsic"]
extern mod rusti {
+ #[legacy_exports];
fn addr_of<T>(val: T) -> *T;
}
View
2  src/libcore/rand.rs
@@ -8,6 +8,7 @@ enum rctx {}
#[abi = "cdecl"]
extern mod rustrt {
+ #[legacy_exports];
fn rand_seed() -> ~[u8];
fn rand_new() -> *rctx;
fn rand_new_seeded(seed: ~[u8]) -> *rctx;
@@ -309,6 +310,7 @@ fn seeded_xorshift(x: u32, y: u32, z: u32, w: u32) -> Rng {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
#[test]
fn rng_seeded() {
View
1  src/libcore/result.rs
@@ -401,6 +401,7 @@ impl<T:Eq,U:Eq> Result<T,U> : Eq {
#[cfg(test)]
#[allow(non_implicitly_copyable_typarams)]
mod tests {
+ #[legacy_exports];
fn op1() -> result::Result<int, ~str> { result::Ok(666) }
fn op2(&&i: int) -> result::Result<uint, ~str> {
View
1  src/libcore/rt.rs
@@ -14,6 +14,7 @@ use gc::{cleanup_stack_for_failure, gc, Word};
type rust_task = c_void;
extern mod rustrt {
+ #[legacy_exports];
#[rust_stack]
fn rust_upcall_fail(expr: *c_char, file: *c_char, line: size_t);
View
2  src/libcore/run.rs
@@ -16,6 +16,7 @@ export waitpid;
#[abi = "cdecl"]
extern mod rustrt {
+ #[legacy_exports];
fn rust_run_program(argv: **libc::c_char, envp: *c_void,
dir: *libc::c_char,
in_fd: c_int, out_fd: c_int, err_fd: c_int)
@@ -401,6 +402,7 @@ fn waitpid(pid: pid_t) -> int {
#[cfg(test)]
mod tests {
+ #[legacy_exports];
use io::WriterUtil;
View
2 