Permalink
Browse files

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

…nder #[legacy_exports];
  • Loading branch information...
1 parent 60443d4 commit dffe188991325b4e803fdd0da7c1563ce0fa27f4 @graydon graydon committed Sep 22, 2012
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;
@@ -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
@@ -5,6 +5,7 @@
#[no_core];
#[legacy_modes];
+#[legacy_exports];
#[allow(vecs_implicitly_copyable)];
#[allow(non_camel_case_types)];
View
@@ -1,3 +1,5 @@
+#[legacy_exports];
+
use io::WriterUtil;
use syntax::{ast, ast_util, fold, visit, codemap};
View
@@ -15,13 +15,15 @@ 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);
}
#[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
@@ -10,6 +10,7 @@ use intrinsic::TyDesc;
export ptr_eq, raw;
mod raw {
+ #[legacy_exports];
struct BoxHeaderRepr {
ref_count: uint,
View
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;
}
Oops, something went wrong.

0 comments on commit dffe188

Please sign in to comment.