]> git.lizzy.rs Git - rust.git/commitdiff
librustc: Stop reexporting the standard modules from prelude.
authorPatrick Walton <pcwalton@mimiga.net>
Sat, 25 May 2013 02:35:29 +0000 (19:35 -0700)
committerPatrick Walton <pcwalton@mimiga.net>
Thu, 30 May 2013 02:04:53 +0000 (19:04 -0700)
598 files changed:
doc/rust.md
doc/tutorial-ffi.md
doc/tutorial-tasks.md
doc/tutorial.md
src/compiletest/compiletest.rc
src/compiletest/errors.rs
src/compiletest/header.rs
src/compiletest/procsrv.rs
src/compiletest/runtest.rs
src/compiletest/util.rs
src/libextra/arc.rs
src/libextra/base64.rs
src/libextra/bitv.rs
src/libextra/c_vec.rs
src/libextra/comm.rs
src/libextra/deque.rs
src/libextra/dlist.rs
src/libextra/fileinput.rs
src/libextra/flate.rs
src/libextra/flatpipes.rs
src/libextra/json.rs
src/libextra/list.rs
src/libextra/net_tcp.rs
src/libextra/num/bigint.rs
src/libextra/num/rational.rs
src/libextra/par.rs
src/libextra/priority_queue.rs
src/libextra/rc.rs
src/libextra/rl.rs
src/libextra/rope.rs
src/libextra/serialize.rs
src/libextra/smallintmap.rs
src/libextra/sort.rs
src/libextra/std.rc
src/libextra/sync.rs
src/libextra/task_pool.rs
src/libextra/tempfile.rs
src/libextra/test.rs
src/libextra/time.rs
src/libextra/timer.rs
src/libextra/treemap.rs
src/libextra/uv_global_loop.rs
src/libextra/uv_iotask.rs
src/libextra/uv_ll.rs
src/libextra/workcache.rs
src/libfuzzer/fuzzer.rc
src/librust/rust.rc
src/librustc/back/link.rs
src/librustc/back/rpath.rs
src/librustc/front/config.rs
src/librustc/front/intrinsic_inject.rs
src/librustc/front/std_inject.rs
src/librustc/front/test.rs
src/librustc/lib/llvm.rs
src/librustc/metadata/creader.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/loader.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans/restrictions.rs
src/librustc/middle/borrowck/mod.rs
src/librustc/middle/borrowck/move_data.rs
src/librustc/middle/check_match.rs
src/librustc/middle/const_eval.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/effect.rs
src/librustc/middle/freevars.rs
src/librustc/middle/kind.rs
src/librustc/middle/lint.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/moves.rs
src/librustc/middle/resolve.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/asm.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/build.rs
src/librustc/middle/trans/cabi_mips.rs
src/librustc/middle/trans/callee.rs
src/librustc/middle/trans/closure.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/consts.rs
src/librustc/middle/trans/controlflow.rs
src/librustc/middle/trans/datum.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/trans/expr.rs
src/librustc/middle/trans/foreign.rs
src/librustc/middle/trans/glue.rs
src/librustc/middle/trans/inline.rs
src/librustc/middle/trans/meth.rs
src/librustc/middle/trans/monomorphize.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/astconv.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/method.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/regionck.rs
src/librustc/middle/typeck/check/vtable.rs
src/librustc/middle/typeck/coherence.rs
src/librustc/middle/typeck/collect.rs
src/librustc/middle/typeck/infer/combine.rs
src/librustc/middle/typeck/infer/mod.rs
src/librustc/middle/typeck/infer/resolve.rs
src/librustc/middle/typeck/infer/to_str.rs
src/librustc/middle/typeck/mod.rs
src/librustc/middle/typeck/rscope.rs
src/librustc/rustc.rc
src/librustc/util/common.rs
src/librustc/util/enum_set.rs
src/librustc/util/ppaux.rs
src/librustdoc/astsrv.rs
src/librustdoc/attr_parser.rs
src/librustdoc/attr_pass.rs
src/librustdoc/config.rs
src/librustdoc/desc_to_brief_pass.rs
src/librustdoc/doc.rs
src/librustdoc/extract.rs
src/librustdoc/fold.rs
src/librustdoc/markdown_index_pass.rs
src/librustdoc/markdown_pass.rs
src/librustdoc/markdown_writer.rs
src/librustdoc/page_pass.rs
src/librustdoc/pass.rs
src/librustdoc/rustdoc.rc
src/librustdoc/sectionalize_pass.rs
src/librustdoc/text_pass.rs
src/librustdoc/tystr_pass.rs
src/librustdoc/unindent_pass.rs
src/librusti/rusti.rc
src/librusti/wrapper.rs
src/librustpkg/path_util.rs
src/librustpkg/rustpkg.rc
src/librustpkg/tests.rs
src/librustpkg/util.rs
src/libstd/at_vec.rs
src/libstd/cell.rs
src/libstd/condition.rs
src/libstd/core.rc
src/libstd/hash.rs
src/libstd/iter.rs
src/libstd/iterator.rs
src/libstd/local_data.rs
src/libstd/num/f32.rs
src/libstd/num/f64.rs
src/libstd/num/float.rs
src/libstd/num/int_macros.rs
src/libstd/num/uint_macros.rs
src/libstd/os.rs
src/libstd/prelude.rs
src/libstd/ptr.rs
src/libstd/rand.rs
src/libstd/rand/distributions.rs
src/libstd/rt/io/flate.rs
src/libstd/rt/io/mem.rs
src/libstd/rt/task.rs
src/libstd/rt/uv/uvll.rs
src/libstd/run.rs
src/libstd/task/mod.rs
src/libstd/task/spawn.rs
src/libstd/trie.rs
src/libstd/unstable/mod.rs
src/libstd/unstable/sync.rs
src/libstd/util.rs
src/libsyntax/abi.rs
src/libsyntax/ast_map.rs
src/libsyntax/ast_util.rs
src/libsyntax/attr.rs
src/libsyntax/codemap.rs
src/libsyntax/diagnostic.rs
src/libsyntax/ext/asm.rs
src/libsyntax/ext/base.rs
src/libsyntax/ext/deriving/decodable.rs
src/libsyntax/ext/deriving/generic.rs
src/libsyntax/ext/deriving/iter_bytes.rs
src/libsyntax/ext/deriving/mod.rs
src/libsyntax/ext/deriving/rand.rs
src/libsyntax/ext/env.rs
src/libsyntax/ext/expand.rs
src/libsyntax/ext/fmt.rs
src/libsyntax/ext/log_syntax.rs
src/libsyntax/ext/pipes/ast_builder.rs
src/libsyntax/ext/pipes/liveness.rs
src/libsyntax/ext/pipes/pipec.rs
src/libsyntax/ext/quote.rs
src/libsyntax/ext/source_util.rs
src/libsyntax/ext/trace_macros.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/ext/tt/macro_rules.rs
src/libsyntax/ext/tt/transcribe.rs
src/libsyntax/fold.rs
src/libsyntax/parse/comments.rs
src/libsyntax/parse/lexer.rs
src/libsyntax/parse/obsolete.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pp.rs
src/libsyntax/print/pprust.rs
src/libsyntax/syntax.rc
src/test/auxiliary/anon-extern-mod-cross-crate-1.rs
src/test/auxiliary/cci_capture_clause.rs
src/test/auxiliary/cci_class_5.rs
src/test/auxiliary/explicit_self_xcrate.rs
src/test/auxiliary/extern-crosscrate-source.rs
src/test/auxiliary/foreign_lib.rs
src/test/auxiliary/issue-3012-1.rs
src/test/auxiliary/moves_based_on_type_lib.rs
src/test/auxiliary/static-methods-crate.rs
src/test/bench/core-map.rs
src/test/bench/core-set.rs
src/test/bench/core-std.rs
src/test/bench/core-uint-to-str.rs
src/test/bench/graph500-bfs.rs
src/test/bench/msgsend-pipes-shared.rs
src/test/bench/msgsend-pipes.rs
src/test/bench/msgsend-ring-mutex-arcs.rs
src/test/bench/msgsend-ring-pipes.rs
src/test/bench/msgsend-ring-rw-arcs.rs
src/test/bench/noise.rs
src/test/bench/pingpong.rs
src/test/bench/shootout-ackermann.rs
src/test/bench/shootout-chameneos-redux.rs
src/test/bench/shootout-fannkuch-redux.rs
src/test/bench/shootout-fasta-redux.rs
src/test/bench/shootout-fasta.rs
src/test/bench/shootout-fibo.rs
src/test/bench/shootout-k-nucleotide-pipes.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-nbody.rs
src/test/bench/shootout-pfib.rs
src/test/bench/shootout-spectralnorm.rs
src/test/bench/std-smallintmap.rs
src/test/bench/sudoku.rs
src/test/bench/task-perf-alloc-unwind.rs
src/test/bench/task-perf-jargon-metal-smoke.rs
src/test/bench/task-perf-linked-failure.rs
src/test/bench/task-perf-one-million.rs
src/test/bench/task-perf-spawnalot.rs
src/test/compile-fail/assign-to-method.rs
src/test/compile-fail/bind-by-move-no-guards.rs
src/test/compile-fail/block-arg-as-stmt-with-value.rs
src/test/compile-fail/block-must-not-have-result-for.rs
src/test/compile-fail/borrowck-auto-mut-ref-to-immut-var.rs
src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
src/test/compile-fail/borrowck-loan-local-as-both-mut-and-imm.rs
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
src/test/compile-fail/borrowck-ref-into-rvalue.rs
src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs
src/test/compile-fail/by-move-pattern-binding.rs
src/test/compile-fail/class-cast-to-trait.rs
src/test/compile-fail/class-missing-self.rs
src/test/compile-fail/die-not-static.rs
src/test/compile-fail/drop-on-non-struct.rs
src/test/compile-fail/explicit-call-to-dtor.rs
src/test/compile-fail/explicit-call-to-supertrait-dtor.rs
src/test/compile-fail/foreign-unsafe-fn.rs [deleted file]
src/test/compile-fail/issue-2151.rs
src/test/compile-fail/issue-2548.rs
src/test/compile-fail/issue-2817-2.rs
src/test/compile-fail/issue-2817.rs
src/test/compile-fail/issue-3044.rs
src/test/compile-fail/issue-3096-2.rs
src/test/compile-fail/issue-3344.rs
src/test/compile-fail/issue-3651.rs
src/test/compile-fail/issue-3820.rs
src/test/compile-fail/issue-3953.rs
src/test/compile-fail/issue-4335.rs
src/test/compile-fail/issue-511.rs
src/test/compile-fail/kindck-implicit-close-over-mut-var.rs
src/test/compile-fail/lint-default-methods.rs
src/test/compile-fail/lint-unused-imports.rs
src/test/compile-fail/lint-unused-unsafe.rs
src/test/compile-fail/liveness-issue-2163.rs
src/test/compile-fail/match-vec-unreachable.rs
src/test/compile-fail/moves-based-on-type-block-bad.rs
src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs
src/test/compile-fail/moves-based-on-type-exprs.rs
src/test/compile-fail/moves-based-on-type-move-out-of-closure-env-issue-1965.rs
src/test/compile-fail/mutable-class-fields-2.rs
src/test/compile-fail/mutable-class-fields.rs
src/test/compile-fail/no-capture-arc.rs
src/test/compile-fail/no-reuse-move-arc.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/non-copyable-void.rs
src/test/compile-fail/noncopyable-match-pattern.rs
src/test/compile-fail/packed-struct-generic-transmute.rs
src/test/compile-fail/packed-struct-transmute.rs
src/test/compile-fail/private-method.rs
src/test/compile-fail/refutable-pattern-in-fn-arg.rs
src/test/compile-fail/regions-addr-of-upvar-self.rs
src/test/compile-fail/repeat-to-run-dtor-twice.rs
src/test/compile-fail/spawn-non-nil-fn.rs
src/test/compile-fail/tuple-struct-nonexhaustive.rs
src/test/compile-fail/unique-object-noncopyable.rs
src/test/compile-fail/unsendable-class.rs
src/test/compile-fail/unsupported-cast.rs
src/test/compile-fail/use-after-move-based-on-type.rs
src/test/compile-fail/use-after-move-self-based-on-type.rs
src/test/compile-fail/use-after-move-self.rs
src/test/run-fail/bug-2470-bounds-check-overflow.rs
src/test/run-fail/extern-fail.rs
src/test/run-fail/for-each-loop-fail.rs
src/test/run-fail/issue-2156.rs
src/test/run-fail/linked-failure.rs
src/test/run-fail/linked-failure2.rs
src/test/run-fail/linked-failure3.rs
src/test/run-fail/linked-failure4.rs
src/test/run-fail/match-wildcards.rs
src/test/run-fail/morestack2.rs
src/test/run-fail/morestack3.rs
src/test/run-fail/morestack4.rs
src/test/run-fail/result-get-fail.rs
src/test/run-fail/rt-set-exit-status-fail.rs
src/test/run-fail/rt-set-exit-status-fail2.rs
src/test/run-fail/rt-set-exit-status.rs
src/test/run-fail/small-negative-indexing.rs
src/test/run-fail/spawnfail.rs
src/test/run-fail/task-comm-recv-block.rs
src/test/run-fail/task-spawn-barefn.rs
src/test/run-fail/unwind-box-res.rs
src/test/run-pass/anon-extern-mod-cross-crate-2.rs
src/test/run-pass/anon-extern-mod.rs
src/test/run-pass/anon-trait-static-method.rs
src/test/run-pass/anon_trait_static_method_exe.rs
src/test/run-pass/assignability-trait.rs
src/test/run-pass/auto-encode.rs
src/test/run-pass/auto-loop.rs
src/test/run-pass/auto-ref-bounded-ty-param.rs
src/test/run-pass/auto-ref.rs
src/test/run-pass/bare-static-string.rs
src/test/run-pass/binops.rs
src/test/run-pass/block-arg-can-be-followed-by-binop.rs
src/test/run-pass/block-arg-can-be-followed-by-block-arg.rs
src/test/run-pass/block-arg-can-be-followed-by-call.rs
src/test/run-pass/block-arg-in-parentheses.rs
src/test/run-pass/block-arg.rs
src/test/run-pass/block-vec-map_zip.rs
src/test/run-pass/borrowck-borrow-from-expr-block.rs
src/test/run-pass/borrowck-mut-uniq.rs
src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
src/test/run-pass/borrowck-preserve-box-in-discr.rs
src/test/run-pass/borrowck-preserve-box-in-field.rs
src/test/run-pass/borrowck-preserve-box-in-pat.rs
src/test/run-pass/borrowck-preserve-box-in-uniq.rs
src/test/run-pass/borrowck-preserve-box.rs
src/test/run-pass/borrowck-preserve-expl-deref.rs
src/test/run-pass/borrowck-wg-borrow-mut-to-imm-3.rs
src/test/run-pass/borrowck-wg-borrow-mut-to-imm.rs
src/test/run-pass/borrowck-wg-simple.rs
src/test/run-pass/boxed-trait-with-vstore.rs
src/test/run-pass/break.rs
src/test/run-pass/c-stack-as-value.rs
src/test/run-pass/c-stack-returning-int64.rs
src/test/run-pass/cap-clause-move.rs
src/test/run-pass/capture_nil.rs
src/test/run-pass/cast-region-to-uint.rs
src/test/run-pass/cci_impl_exe.rs
src/test/run-pass/cci_iter_exe.rs
src/test/run-pass/cci_no_inline_exe.rs
src/test/run-pass/child-outlives-parent.rs
src/test/run-pass/class-cast-to-trait-multiple-types.rs
src/test/run-pass/class-impl-very-parameterized-trait.rs
src/test/run-pass/class-implement-trait-cross-crate.rs
src/test/run-pass/class-implement-traits.rs
src/test/run-pass/classes-cross-crate.rs
src/test/run-pass/classes.rs
src/test/run-pass/cleanup-copy-mode.rs
src/test/run-pass/coerce-reborrow-mut-vec-arg.rs
src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs
src/test/run-pass/comm.rs
src/test/run-pass/const-cast-ptr-int.rs
src/test/run-pass/const-cast.rs
src/test/run-pass/const-fields-and-indexing.rs
src/test/run-pass/const-rec-and-tup.rs
src/test/run-pass/const-region-ptrs-noncopy.rs
src/test/run-pass/const-region-ptrs.rs
src/test/run-pass/const-str-ptr.rs
src/test/run-pass/const-struct.rs
src/test/run-pass/const-vecs-and-slices.rs
src/test/run-pass/core-export-f64-sqrt.rs
src/test/run-pass/core-run-destroy.rs
src/test/run-pass/default-method-simple.rs
src/test/run-pass/deriving-rand.rs
src/test/run-pass/deriving-to-str.rs
src/test/run-pass/drop-trait-generic.rs
src/test/run-pass/drop-trait.rs
src/test/run-pass/early-vtbl-resolution.rs
src/test/run-pass/empty-tag.rs
src/test/run-pass/enum-alignment.rs
src/test/run-pass/exec-env.rs
src/test/run-pass/export-unexported-dep.rs
src/test/run-pass/expr-if-struct.rs
src/test/run-pass/expr-match-struct.rs
src/test/run-pass/extern-call-deep.rs
src/test/run-pass/extern-call-deep2.rs
src/test/run-pass/extern-call-scrub.rs
src/test/run-pass/extern-call.rs
src/test/run-pass/extern-mod-syntax.rs
src/test/run-pass/extern-pub.rs
src/test/run-pass/extern-stress.rs
src/test/run-pass/extern-yield.rs
src/test/run-pass/fixed_length_vec_glue.rs
src/test/run-pass/float-literal-inference.rs
src/test/run-pass/fn-pattern-expected-type-2.rs
src/test/run-pass/for-destruct.rs
src/test/run-pass/foreign-call-no-runtime.rs
src/test/run-pass/foreign-dupe.rs
src/test/run-pass/foreign-fn-linkname.rs
src/test/run-pass/foreign-no-abi.rs
src/test/run-pass/functional-struct-update.rs
src/test/run-pass/generic-newtype-struct.rs
src/test/run-pass/getopts_ref.rs
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/hello.rs
src/test/run-pass/impl-privacy-xc-2.rs
src/test/run-pass/import-glob-crate.rs
src/test/run-pass/instantiable.rs
src/test/run-pass/intrinsics-math.rs
src/test/run-pass/invoke-external-foreign.rs
src/test/run-pass/issue-1251.rs
src/test/run-pass/issue-1696.rs
src/test/run-pass/issue-2611.rs
src/test/run-pass/issue-2718.rs
src/test/run-pass/issue-2804.rs
src/test/run-pass/issue-2895.rs
src/test/run-pass/issue-2904.rs
src/test/run-pass/issue-2989.rs
src/test/run-pass/issue-3012-2.rs
src/test/run-pass/issue-3168.rs
src/test/run-pass/issue-3176.rs
src/test/run-pass/issue-3211.rs
src/test/run-pass/issue-3389.rs
src/test/run-pass/issue-3424.rs
src/test/run-pass/issue-3447.rs
src/test/run-pass/issue-3556.rs
src/test/run-pass/issue-3563-3.rs
src/test/run-pass/issue-3609.rs
src/test/run-pass/issue-3702.rs
src/test/run-pass/issue-3753.rs
src/test/run-pass/issue-3847.rs
src/test/run-pass/issue-3888-2.rs
src/test/run-pass/issue-4333.rs
src/test/run-pass/issue-4401.rs
src/test/run-pass/issue-4448.rs
src/test/run-pass/issue-5572.rs
src/test/run-pass/issue-5741.rs
src/test/run-pass/item-attributes.rs
src/test/run-pass/iter-all.rs
src/test/run-pass/iter-any.rs
src/test/run-pass/iter-contains.rs
src/test/run-pass/iter-count.rs
src/test/run-pass/iter-eachi.rs
src/test/run-pass/iter-filter-to-vec.rs
src/test/run-pass/iter-flat-map-to-vec.rs
src/test/run-pass/iter-foldl.rs
src/test/run-pass/iter-map-to-vec.rs
src/test/run-pass/iter-min-max.rs
src/test/run-pass/iter-to-vec.rs
src/test/run-pass/ivec-tag.rs
src/test/run-pass/let-assignability.rs
src/test/run-pass/linear-for-loop.rs
src/test/run-pass/log-str.rs
src/test/run-pass/lots-a-fail.rs
src/test/run-pass/match-ref-binding-in-guard-3256.rs
src/test/run-pass/match-with-ret-arm.rs
src/test/run-pass/max-min-classes.rs
src/test/run-pass/monad.rs
src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs
src/test/run-pass/morestack5.rs
src/test/run-pass/morestack6.rs
src/test/run-pass/move-3-unique.rs
src/test/run-pass/move-3.rs
src/test/run-pass/move-self.rs
src/test/run-pass/moves-based-on-type-capture-clause.rs
src/test/run-pass/multibyte.rs
src/test/run-pass/mutability-inherits-through-fixed-length-vec.rs
src/test/run-pass/mutable-alias-vec.rs
src/test/run-pass/new-impl-syntax.rs
src/test/run-pass/newtype.rs
src/test/run-pass/nullable-pointer-size.rs
src/test/run-pass/operator-overloading.rs
src/test/run-pass/option-ext.rs
src/test/run-pass/packed-struct-generic-layout.rs
src/test/run-pass/packed-struct-generic-size.rs
src/test/run-pass/packed-struct-layout.rs
src/test/run-pass/packed-struct-size-xc.rs
src/test/run-pass/packed-struct-size.rs
src/test/run-pass/packed-struct-vec.rs
src/test/run-pass/packed-tuple-struct-layout.rs
src/test/run-pass/packed-tuple-struct-size.rs
src/test/run-pass/pattern-bound-var-in-for-each.rs
src/test/run-pass/pattern-in-closure.rs
src/test/run-pass/pipe-bank-proto.rs
src/test/run-pass/pipe-detect-term.rs
src/test/run-pass/pipe-pingpong-bounded.rs
src/test/run-pass/pipe-pingpong-proto.rs
src/test/run-pass/pipe-select.rs
src/test/run-pass/pipe-sleep.rs
src/test/run-pass/placement-new-arena.rs
src/test/run-pass/platform_thread.rs
src/test/run-pass/private-method.rs
src/test/run-pass/rcvr-borrowed-to-slice.rs
src/test/run-pass/rec-align-u32.rs
src/test/run-pass/rec-align-u64.rs
src/test/run-pass/reflect-visit-data.rs
src/test/run-pass/regions-infer-borrow-scope-addr-of.rs
src/test/run-pass/regions-mock-trans.rs
src/test/run-pass/resource-cycle.rs
src/test/run-pass/resource-cycle2.rs
src/test/run-pass/resource-cycle3.rs
src/test/run-pass/ret-break-cont-in-block.rs
src/test/run-pass/rt-sched-1.rs
src/test/run-pass/send-iloop.rs
src/test/run-pass/send-resource.rs
src/test/run-pass/sendable-class.rs
src/test/run-pass/sendfn-generic-fn.rs
src/test/run-pass/sendfn-spawn-with-fn-arg.rs
src/test/run-pass/shebang.rs
src/test/run-pass/spawn-fn.rs
src/test/run-pass/spawn-types.rs
src/test/run-pass/spawn.rs
src/test/run-pass/spawn2.rs
src/test/run-pass/stable-addr-of.rs
src/test/run-pass/stat.rs
src/test/run-pass/static-impl.rs
src/test/run-pass/static-method-test.rs
src/test/run-pass/static-method-xcrate.rs
src/test/run-pass/string-self-append.rs
src/test/run-pass/struct-order-of-eval-1.rs
src/test/run-pass/struct-order-of-eval-2.rs
src/test/run-pass/struct-pattern-matching.rs
src/test/run-pass/structured-compare.rs
src/test/run-pass/supported-cast.rs
src/test/run-pass/swap-2.rs
src/test/run-pass/swap-overlapping.rs
src/test/run-pass/tag-disr-val-shape.rs
src/test/run-pass/tag-variant-disr-val.rs
src/test/run-pass/tag.rs
src/test/run-pass/task-comm-0.rs
src/test/run-pass/task-comm-1.rs
src/test/run-pass/task-comm-10.rs
src/test/run-pass/task-comm-11.rs
src/test/run-pass/task-comm-12.rs
src/test/run-pass/task-comm-13.rs
src/test/run-pass/task-comm-14.rs
src/test/run-pass/task-comm-15.rs
src/test/run-pass/task-comm-16.rs
src/test/run-pass/task-comm-17.rs
src/test/run-pass/task-comm-3.rs
src/test/run-pass/task-comm-4.rs
src/test/run-pass/task-comm-5.rs
src/test/run-pass/task-comm-6.rs
src/test/run-pass/task-comm-7.rs
src/test/run-pass/task-comm-9.rs
src/test/run-pass/task-comm-chan-nil.rs
src/test/run-pass/task-killjoin-rsrc.rs
src/test/run-pass/task-killjoin.rs
src/test/run-pass/task-life-0.rs
src/test/run-pass/task-spawn-move-and-copy.rs
src/test/run-pass/terminate-in-initializer.rs
src/test/run-pass/test-ignore-cfg.rs
src/test/run-pass/threads.rs
src/test/run-pass/trait-generic.rs
src/test/run-pass/trait-inheritance-num2.rs
src/test/run-pass/trait-inheritance-num3.rs
src/test/run-pass/trait-inheritance-self-in-supertype.rs
src/test/run-pass/trait-inheritance-self.rs
src/test/run-pass/trait-region-pointer-simple.rs
src/test/run-pass/trait-static-method-overwriting.rs
src/test/run-pass/trivial-message.rs
src/test/run-pass/tuple-struct-construct.rs
src/test/run-pass/tuple-struct-destructuring.rs
src/test/run-pass/tuple-struct-matching.rs
src/test/run-pass/type-use-i1-versus-i8.rs
src/test/run-pass/unify-return-ty.rs
src/test/run-pass/uniq-cc-generic.rs
src/test/run-pass/unique-copy-box.rs
src/test/run-pass/unique-send-2.rs
src/test/run-pass/unit-like-struct.rs
src/test/run-pass/unwind-box.rs
src/test/run-pass/unwind-resource.rs
src/test/run-pass/unwind-resource2.rs
src/test/run-pass/unwind-unique.rs
src/test/run-pass/utf8.rs
src/test/run-pass/utf8_chars.rs
src/test/run-pass/utf8_idents.rs
src/test/run-pass/vec-each2_mut.rs
src/test/run-pass/vec-fixed-length.rs
src/test/run-pass/vec-matching-legal-tail-element-borrow.rs
src/test/run-pass/vec-slice.rs
src/test/run-pass/writealias.rs
src/test/run-pass/yield.rs
src/test/run-pass/yield1.rs
src/test/run-pass/yield2.rs
src/test/run-pass/zip-same-length.rs

index 719750ea7ca068ad29a9805139e878b2916efcb7..9d96cc1dd98d25fbfcced636dd9fc944c6d497ef 100644 (file)
@@ -1840,6 +1840,7 @@ is bounds-checked at run-time. When the check fails, it will put the
 task in a _failing state_.
 
 ~~~~
+# use std::task;
 # do task::spawn_unlinked {
 
 ([1, 2, 3, 4])[0];
@@ -2168,7 +2169,7 @@ fn ten_times(f: &fn(int)) {
     }
 }
 
-ten_times(|j| io::println(fmt!("hello, %d", j)));
+ten_times(|j| println(fmt!("hello, %d", j)));
 
 ~~~~
 
@@ -2189,7 +2190,7 @@ An example:
 let mut i = 0;
 
 while i < 10 {
-    io::println("hello\n");
+    println("hello\n");
     i = i + 1;
 }
 ~~~~
@@ -2335,6 +2336,7 @@ for v.each |e| {
 An example of a for loop over a series of integers:
 
 ~~~~
+# use std::uint;
 # fn bar(b:uint) { }
 for uint::range(0, 256) |i| {
     bar(i);
@@ -2798,6 +2800,7 @@ the vtable pointer for the `T` implementation of `R`, and the pointer value of `
 An example of an object type:
 
 ~~~~~~~~
+# use std::int;
 trait Printable {
   fn to_str(&self) -> ~str;
 }
@@ -2807,7 +2810,7 @@ impl Printable for int {
 }
 
 fn print(a: @Printable) {
-   io::println(a.to_str());
+   println(a.to_str());
 }
 
 fn main() {
index 33a8cd230bb2f295db1e5c87c9df02164f353520..88f2f374cf5dd721d76e0dff7bd77fb13db360d9 100644 (file)
@@ -149,7 +149,9 @@ A type with the same functionality as owned boxes can be implemented by
 wrapping `malloc` and `free`:
 
 ~~~~
+use std::cast;
 use std::libc::{c_void, size_t, malloc, free};
+use std::ptr;
 use std::unstable::intrinsics;
 use std::util;
 
index 8c574e539febfbe736facfcfd0084257943cba36..2f150755fc2d9c5ebd50129e8ccf16d1d0b04df9 100644 (file)
@@ -120,6 +120,7 @@ should interleave the output in vaguely random order.
 ~~~
 # use std::io::print;
 # use std::task::spawn;
+# use std::int;
 
 for int::range(0, 20) |child_task_number| {
     do spawn {
@@ -236,6 +237,7 @@ Instead we can use a `SharedChan`, a type that allows a single
 ~~~
 # use std::task::spawn;
 # use std::comm::{stream, SharedChan};
+# use std::uint;
 
 let (port, chan) = stream();
 let chan = SharedChan::new(chan);
@@ -269,6 +271,7 @@ might look like the example below.
 ~~~
 # use std::task::spawn;
 # use std::comm::stream;
+# use std::vec;
 
 // Create a vector of ports, one for each child task
 let ports = do vec::from_fn(3) |init_val| {
@@ -310,6 +313,8 @@ the future needs to be mutable so that it can save the result for next time `get
 Here is another example showing how futures allow you to background computations. The workload will
 be distributed on the available cores.
 ~~~
+# use std::vec;
+# use std::uint;
 fn partial_sum(start: uint) -> f64 {
     let mut local_sum = 0f64;
     for uint::range(start*100000, (start+1)*100000) |num| {
@@ -343,6 +348,9 @@ acts as a reference to the shared data and only this reference is shared and clo
 Here is a small example showing how to use ARCs. We wish to run concurrently several computations on
 a single large vector of floats. Each task needs the full vector to perform its duty.
 ~~~
+# use std::vec;
+# use std::uint;
+# use std::rand;
 use extra::arc::ARC;
 
 fn pnorm(nums: &~[float], p: uint) -> float {
@@ -350,7 +358,7 @@ fn pnorm(nums: &~[float], p: uint) -> float {
 }
 
 fn main() {
-    let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
+    let numbers = vec::from_fn(1000000, |_| rand::random::<float>());
     println(fmt!("Inf-norm = %?",  numbers.max()));
 
     let numbers_arc = ARC(numbers);
@@ -373,12 +381,16 @@ at the power given as argument and takes the inverse power of this value). The A
 created by the line
 ~~~
 # use extra::arc::ARC;
-# let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
+# use std::vec;
+# use std::rand;
+# let numbers = vec::from_fn(1000000, |_| rand::random::<float>());
 let numbers_arc=ARC(numbers);
 ~~~
 and a clone of it is sent to each task
 ~~~
 # use extra::arc::ARC;
+# use std::vec;
+# use std::rand;
 # let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
 # let numbers_arc = ARC(numbers);
 # let (port, chan)  = stream();
@@ -389,6 +401,8 @@ copying only the wrapper and not its contents.
 Each task recovers the underlying data by
 ~~~
 # use extra::arc::ARC;
+# use std::vec;
+# use std::rand;
 # let numbers=vec::from_fn(1000000, |_| rand::random::<float>());
 # let numbers_arc=ARC(numbers);
 # let (port, chan)  = stream();
@@ -416,6 +430,7 @@ of all tasks are intertwined: if one fails, so do all the others.
 
 ~~~
 # use std::task::spawn;
+# use std::task;
 # fn do_some_work() { loop { task::yield() } }
 # do task::try {
 // Create a child task that fails
@@ -437,6 +452,7 @@ field (representing a successful result) or an `Err` result (representing
 termination with an error).
 
 ~~~
+# use std::task;
 # fn some_condition() -> bool { false }
 # fn calculate_result() -> int { 0 }
 let result: Result<int, ()> = do task::try {
@@ -479,6 +495,7 @@ By default, task failure is _bidirectionally linked_, which means that if
 either task fails, it kills the other one.
 
 ~~~
+# use std::task;
 # fn sleep_forever() { loop { task::yield() } }
 # do task::try {
 do spawn {
@@ -501,6 +518,7 @@ before returning. Hence:
 ~~~
 # use std::comm::{stream, Chan, Port};
 # use std::task::{spawn, try};
+# use std::task;
 # fn sleep_forever() { loop { task::yield() } }
 # do task::try {
 let (receiver, sender): (Port<int>, Chan<int>) = stream();
@@ -528,6 +546,7 @@ Supervised task failure propagates across multiple generations even if
 an intermediate generation has already exited:
 
 ~~~
+# use std::task;
 # fn sleep_forever() { loop { task::yield() } }
 # fn wait_for_a_while() { for 1000.times { task::yield() } }
 # do task::try::<int> {
@@ -546,6 +565,7 @@ Finally, tasks can be configured to not propagate failure to each
 other at all, using `task::spawn_unlinked` for _isolated failure_.
 
 ~~~
+# use std::task;
 # fn random() -> uint { 100 }
 # fn sleep_for(i: uint) { for i.times { task::yield() } }
 # do task::try::<()> {
@@ -574,6 +594,7 @@ Here is the function that implements the child task:
 
 ~~~~
 # use extra::comm::DuplexStream;
+# use std::uint;
 fn stringifier(channel: &DuplexStream<~str, uint>) {
     let mut value: uint;
     loop {
@@ -596,6 +617,7 @@ Here is the code for the parent task:
 
 ~~~~
 # use std::task::spawn;
+# use std::uint;
 # use extra::comm::DuplexStream;
 # fn stringifier(channel: &DuplexStream<~str, uint>) {
 #     let mut value: uint;
index 91a41cb9b85aefc5bb2532408766c51d29568d4b..14a0c6fdcfe270eefbc045abf9e757a94edeb0e0 100644 (file)
@@ -502,6 +502,7 @@ types.
 > items.
 
 ~~~~
+# use std::float;
 fn angle(vector: (float, float)) -> float {
     let pi = float::consts::pi;
     match vector {
@@ -556,6 +557,7 @@ while cake_amount > 0 {
 `loop` denotes an infinite loop, and is the preferred way of writing `while true`:
 
 ~~~~
+# use std::int;
 let mut x = 5;
 loop {
     x += x - 3;
@@ -699,6 +701,7 @@ get at their contents. All variant constructors can be used as
 patterns, as in this definition of `area`:
 
 ~~~~
+# use std::float;
 # struct Point {x: float, y: float}
 # enum Shape { Circle(Point, float), Rectangle(Point, Point) }
 fn area(sh: Shape) -> float {
@@ -1829,6 +1832,7 @@ vector consisting of the result of applying `function` to each element
 of `vector`:
 
 ~~~~
+# use std::vec;
 fn map<T, U>(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] {
     let mut accumulator = ~[];
     for vec::each(vector) |element| {
@@ -2026,6 +2030,7 @@ themselves contain type parameters. A trait for generalized sequence
 types might look like the following:
 
 ~~~~
+# use std::vec;
 trait Seq<T> {
     fn len(&self) -> uint;
     fn iter(&self, b: &fn(v: &T));
index e009839ba97a141d74111bd1c74a642daac48808..1ac6c215d27a51b280dce35f218f2c543cbb1ede 100644 (file)
 #[no_std];
 
 extern mod core(name = "std", vers = "0.7-pre");
-extern mod std(name = "extra", vers = "0.7-pre");
+extern mod extra(name = "extra", vers = "0.7-pre");
 
 use core::prelude::*;
 use core::*;
 
-use std::getopts;
-use std::test;
+use extra::getopts;
+use extra::test;
 
 use core::result::{Ok, Err};
 
@@ -42,6 +42,13 @@ pub mod runtest;
 pub mod common;
 pub mod errors;
 
+mod std {
+    pub use core::cmp;
+    pub use core::str;
+    pub use core::sys;
+    pub use core::unstable;
+}
+
 pub fn main() {
     let args = os::args();
     let config = parse_config(args);
index 297ec9ee21e28b7e71a098672d9609769c7f2434..728548caf77c1a435d17322102a6fed8d39740eb 100644 (file)
@@ -10,6 +10,9 @@
 
 use core::prelude::*;
 
+use core::io;
+use core::str;
+
 pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
 
 // Load any test directives embedded in the file
index cc4320248cdffa4af1eece10cb00182040d55c06..2bfc92bc70416c8de753524ef2cf7410c0728111 100644 (file)
 
 use core::prelude::*;
 
-use common;
 use common::config;
+use common;
+
+use core::io;
+use core::os;
+use core::str;
 
 pub struct TestProps {
     // Lines that should be expected, in order, on standard out
index a059f97daab7cac05b62b4ec3f57230202cf9dcd..57a6dc8037e021bc2c0e768aee60dc8734f66301 100644 (file)
 
 use core::prelude::*;
 
+use core::comm;
+use core::io;
+use core::libc::c_int;
+use core::os;
 use core::run;
+use core::str;
+use core::task;
 
 #[cfg(target_os = "win32")]
 fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
index c1586a1b350fa6e9bc1799dc1f9eea701af153a5..4db1fa6d0a0b537878166c3f338e6a9e5d39c863 100644 (file)
 use util;
 use util::logv;
 
+use core::io;
+use core::os;
+use core::str;
+use core::uint;
+use core::vec;
+
 pub fn run(config: config, testfile: ~str) {
     if config.verbose {
         // We're going to be dumping a lot of info. Start on a new line.
index e9b09e8aee8959a718cae076d1d91a4aafb0f9ac..26a62f8a5b22456c58687e690b22dd3265209411 100644 (file)
@@ -12,6 +12,7 @@
 
 use common::config;
 
+use core::io;
 use core::os::getenv;
 
 pub fn make_new_path(path: &str) -> ~str {
index e120f3dd033c67c5c2627b0989277ba24a7ab22d..e73b49044d42110ecf93601ecd5d3703f7f73091 100644 (file)
@@ -510,9 +510,13 @@ fn read<U>(&self, blk: &fn(x: &T) -> U) -> U {
 #[cfg(test)]
 mod tests {
     use core::prelude::*;
-    use core::cell::Cell;
+
     use arc::*;
 
+    use core::cell::Cell;
+    use core::comm;
+    use core::task;
+
     #[test]
     fn manually_share_arc() {
         let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
@@ -541,59 +545,65 @@ fn manually_share_arc() {
 
     #[test]
     fn test_mutex_arc_condvar() {
-        let arc = ~MutexARC(false);
-        let arc2 = ~arc.clone();
-        let (p,c) = comm::oneshot();
-        let (c,p) = (Cell(c), Cell(p));
-        do task::spawn || {
-            // wait until parent gets in
-            comm::recv_one(p.take());
-            do arc2.access_cond |state, cond| {
-                *state = true;
-                cond.signal();
+        unsafe {
+            let arc = ~MutexARC(false);
+            let arc2 = ~arc.clone();
+            let (p,c) = comm::oneshot();
+            let (c,p) = (Cell(c), Cell(p));
+            do task::spawn || {
+                // wait until parent gets in
+                comm::recv_one(p.take());
+                do arc2.access_cond |state, cond| {
+                    *state = true;
+                    cond.signal();
+                }
             }
-        }
-        do arc.access_cond |state, cond| {
-            comm::send_one(c.take(), ());
-            assert!(!*state);
-            while !*state {
-                cond.wait();
+            do arc.access_cond |state, cond| {
+                comm::send_one(c.take(), ());
+                assert!(!*state);
+                while !*state {
+                    cond.wait();
+                }
             }
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
     fn test_arc_condvar_poison() {
-        let arc = ~MutexARC(1);
-        let arc2 = ~arc.clone();
-        let (p, c) = comm::stream();
-
-        do task::spawn_unlinked || {
-            let _ = p.recv();
-            do arc2.access_cond |one, cond| {
-                cond.signal();
-                // Parent should fail when it wakes up.
-                assert_eq!(*one, 0);
+        unsafe {
+            let arc = ~MutexARC(1);
+            let arc2 = ~arc.clone();
+            let (p, c) = comm::stream();
+
+            do task::spawn_unlinked || {
+                let _ = p.recv();
+                do arc2.access_cond |one, cond| {
+                    cond.signal();
+                    // Parent should fail when it wakes up.
+                    assert_eq!(*one, 0);
+                }
             }
-        }
 
-        do arc.access_cond |one, cond| {
-            c.send(());
-            while *one == 1 {
-                cond.wait();
+            do arc.access_cond |one, cond| {
+                c.send(());
+                while *one == 1 {
+                    cond.wait();
+                }
             }
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
     fn test_mutex_arc_poison() {
-        let arc = ~MutexARC(1);
-        let arc2 = ~arc.clone();
-        do task::try || {
-            do arc2.access |one| {
-                assert_eq!(*one, 2);
+        unsafe {
+            let arc = ~MutexARC(1);
+            let arc2 = ~arc.clone();
+            do task::try || {
+                do arc2.access |one| {
+                    assert_eq!(*one, 2);
+                }
+            };
+            do arc.access |one| {
+                assert_eq!(*one, 1);
             }
-        };
-        do arc.access |one| {
-            assert_eq!(*one, 1);
         }
     }
     #[test] #[should_fail] #[ignore(cfg(windows))]
index 7829eb50a68dd7c089211055a36e60849d4c4eae..373bebeec71ce0ae70d0c924ff6d80516ff126d6 100644 (file)
@@ -12,6 +12,9 @@
 
 use core::prelude::*;
 
+use core::str;
+use core::vec;
+
 pub trait ToBase64 {
     fn to_base64(&self) -> ~str;
 }
index 1a6e42d2fbba9938386b267365c452aabf3ce3f2..afd82d425891b3b63dea6c301d4dbdeea751219a 100644 (file)
 
 use core::prelude::*;
 
+use core::cmp;
+use core::ops;
+use core::uint;
+use core::vec::from_elem;
+use core::vec;
+
 struct SmallBitv {
     /// only the lowest nbits of this value are used. the rest is undefined.
     bits: uint
index a8e71433ff8b549532a4c122e8ab44f9dcf9bb39..7cc7b659ed9dd9f38b53718c807b48f54ac72c91 100644 (file)
@@ -38,6 +38,9 @@
 
 use core::prelude::*;
 
+use core::option;
+use core::ptr;
+
 /**
  * The type representing a foreign chunk of memory
  *
index 095da6570fd00da920f7e2ca55a01e945915ee21..1ef61926c92002e3e8c2fd2de0d8030cf9d3a432 100644 (file)
@@ -18,6 +18,7 @@
 
 use core::comm::{GenericChan, GenericSmartChan, GenericPort};
 use core::comm::{Chan, Port, Selectable, Peekable};
+use core::comm;
 use core::pipes;
 
 /// An extension of `pipes::stream` that allows both sending and receiving.
index ad3b6ab3df4023b7b564a65c29817ba691f8797e..ccb52fa038c1288839af1c7b09c45b417adea58f 100644 (file)
@@ -12,7 +12,9 @@
 
 use core::prelude::*;
 
+use core::uint;
 use core::util::replace;
+use core::vec;
 
 static initial_capacity: uint = 32u; // 2^5
 
index d3da13dde987a05aef4e548487a8bf2a69450593..fc6cdb102a0ef2bfacf9d327797a50a40c8cac0a 100644 (file)
@@ -21,6 +21,8 @@
 use core::prelude::*;
 
 use core::managed;
+use core::old_iter;
+use core::vec;
 
 pub type DListLink<T> = Option<@mut DListNode<T>>;
 
@@ -538,6 +540,9 @@ mod tests {
 
     use super::*;
 
+    use core::old_iter;
+    use core::vec;
+
     #[test]
     fn test_dlist_concat() {
         let a = from_vec([1,2]);
index 42dde4ab890c82d54989a24571aafaa00712beb4..e6f3fba6b157fcfb3a4749403b5a9469d0aa3abb 100644 (file)
 
 use core::prelude::*;
 
+use core::io::ReaderUtil;
+use core::io;
+use core::os;
+use core::vec;
+
 /**
 A summary of the internal state of a `FileInput` object. `line_num`
 and `line_num_file` represent the number of lines read in total and in
@@ -407,6 +412,11 @@ mod test {
 
     use super::{FileInput, pathify, input_vec, input_vec_state};
 
+    use core::io;
+    use core::str;
+    use core::uint;
+    use core::vec;
+
     fn make_file(path : &Path, contents: &[~str]) {
         let file = io::file_writer(path, [io::Create, io::Truncate]).get();
 
index d184e67ab29f8d67ebc00905e87ac4dc8a5de598..e24c80b4463c3dd085857757769c9525ac93ddd6 100644 (file)
@@ -16,8 +16,9 @@
 
 use core::prelude::*;
 
-use core::libc;
 use core::libc::{c_void, size_t, c_int};
+use core::libc;
+use core::vec;
 
 pub mod rustrt {
     use core::libc::{c_int, c_void, size_t};
index 8cb94abcd38c02a3a6759ba6e2937a7a39c278e4..955da13c7b38b867e01de44e0ccda467e6f24476 100644 (file)
@@ -345,11 +345,11 @@ pub mod flatteners {
 
     use core::cast;
     use core::io::{Writer, Reader, ReaderUtil};
+    use core::io;
     use core::ptr;
     use core::sys::size_of;
     use core::vec;
 
-
     // FIXME #4074: Copy + Owned != POD
     pub struct PodUnflattener<T> {
         bogus: ()
@@ -511,8 +511,10 @@ pub mod bytepipes {
 
     use flatpipes::{ByteChan, BytePort};
 
-    use core::io::{Writer, Reader, ReaderUtil};
     use core::comm::{Port, Chan};
+    use core::comm;
+    use core::io::{Writer, Reader, ReaderUtil};
+    use core::vec;
 
     pub struct ReaderBytePort<R> {
         reader: R
@@ -646,7 +648,12 @@ mod test {
     use flatpipes::{BytePort, FlatChan, FlatPort};
     use net::tcp::TcpSocketBuf;
 
+    use core::comm;
+    use core::int;
     use core::io::BytesWriter;
+    use core::result;
+    use core::sys;
+    use core::task;
 
     #[test]
     #[ignore(reason = "ebml failure")]
@@ -873,6 +880,11 @@ mod broken_protocol {
         use flatpipes::pod;
         use io_util::BufReader;
 
+        use core::comm;
+        use core::io;
+        use core::sys;
+        use core::task;
+
         type PortLoader<P> =
             ~fn(~[u8]) -> FlatPort<int, PodUnflattener<int>, P>;
 
index 15823d6806249efa0c47b39a1a2e9bf5877dde9c..c3ef346dba3ba484c5ea2eab3e71cc88c2baffb8 100644 (file)
 
 use core::prelude::*;
 
-use core::io::{WriterUtil, ReaderUtil};
+use core::char;
+use core::float;
 use core::hashmap::HashMap;
+use core::io::{WriterUtil, ReaderUtil};
+use core::io;
+use core::str;
+use core::to_str;
+use core::vec;
 
 use serialize::Encodable;
 use serialize;
@@ -1332,6 +1338,8 @@ mod tests {
     use super::*;
 
     use core::hashmap::HashMap;
+    use core::io;
+    use core::result;
 
     use std::serialize::Decodable;
 
index 0cde57d5ad762aa6bc46d60170e46115e3a87e98..6f2c8447ecac890f0c29346709ea444e715a4304 100644 (file)
@@ -8,10 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! A standard linked list
+//! A standard, garbage-collected linked list.
 
 use core::prelude::*;
 
+use core::vec;
+
 #[deriving(Eq)]
 pub enum List<T> {
     Cons(T, @List<T>),
index aaa10fe562a8a6db685e94efab9ccf90999095f2..8dff9b330a5b013cb21fe33e762cc9ddb4082a78 100644 (file)
@@ -1451,6 +1451,10 @@ mod test {
 
     use core::cell::Cell;
     use core::comm::{stream, SharedChan};
+    use core::io;
+    use core::result;
+    use core::str;
+    use core::task;
 
     // FIXME don't run on fbsd or linux 32 bit (#2064)
     #[cfg(target_os="win32")]
index 7ff8c25d95ff05eb1361cbba153f77929cb398a8..0151c300a4a2abe2209df7b5ec7bad1fc17c96bd 100644 (file)
 use core::prelude::*;
 
 use core::cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
+use core::int;
 use core::num::{IntConvertible, Zero, One, ToStrRadix, FromStrRadix, Orderable};
+use core::str;
+use core::uint;
+use core::vec;
 
 /**
 A BigDigit is a BigUint's composing element.
@@ -1148,8 +1152,13 @@ mod biguint_tests {
     use core::prelude::*;
 
     use super::*;
-    use core::num::{IntConvertible, Zero, One, FromStrRadix};
+
     use core::cmp::{Less, Equal, Greater};
+    use core::int;
+    use core::num::{IntConvertible, Zero, One, FromStrRadix};
+    use core::str;
+    use core::uint;
+    use core::vec;
 
     #[test]
     fn test_from_slice() {
@@ -1616,8 +1625,12 @@ mod bigint_tests {
     use core::prelude::*;
 
     use super::*;
+
     use core::cmp::{Less, Equal, Greater};
+    use core::int;
     use core::num::{IntConvertible, Zero, One, FromStrRadix};
+    use core::uint;
+    use core::vec;
 
     #[test]
     fn test_from_biguint() {
index de114a35e36be8d5f7cc74e36c5c839ce158692d..b33d113161c36cb5ca42cd208d7c2da954b26b85 100644 (file)
 
 use core::prelude::*;
 
-use core::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
+use core::cmp;
 use core::from_str::FromStr;
+use core::num::{Zero,One,ToStrRadix,FromStrRadix,Round};
+use core::str;
+use core::vec;
 use super::bigint::BigInt;
 
 /// Represents the ratio between 2 numbers.
index 52e7d517d6e2c73a195532158062a52a7d0a461f..49696a5fa25c74135d6f5262ca6949650f8d384f 100644 (file)
 
 use core::prelude::*;
 
+use core::cast;
+use core::ptr;
+use core::sys;
+use core::uint;
+use core::vec;
 use future_spawn = future::spawn;
 
 /**
index 4b84e2aa8c931f42ba157a8adcd234a2fa2525cc..9345c24675091d02d559b381aaeba293fbbd2de2 100644 (file)
@@ -15,6 +15,7 @@
 use core::old_iter::BaseIter;
 use core::unstable::intrinsics::{move_val_init, init};
 use core::util::{replace, swap};
+use core::vec;
 
 pub struct PriorityQueue<T> {
     priv data: ~[T],
index a1a14c31b28e2f07c177dde9dc97fb9acfcfd629..73f98a3b19c59e0c3ee0cd64434d356d6be243bb 100644 (file)
 
 use core::prelude::*;
 
+use core::cast;
 use core::libc::{c_void, size_t, malloc, free};
+use core::ptr;
+use core::sys;
 use core::unstable::intrinsics;
 use core::util;
 
index 4157442413991ef7f08a6bfcd099101710567789..040adcc443d92a5d2a4cf2cc7961e8a74d885c50 100644 (file)
@@ -14,6 +14,8 @@
 use core::prelude::*;
 
 use core::libc::{c_char, c_int};
+use core::local_data;
+use core::str;
 
 pub mod rustrt {
     use core::libc::{c_char, c_int};
index 4efe131c7cb062ad6e0e8a8e36f6c9da0ed13132..566bbfd6df6a333e2189e6c2c4ef4e703e177772 100644 (file)
 
 use core::prelude::*;
 
+use core::str;
+use core::uint;
+use core::vec;
+
 /// The type of ropes.
 pub type Rope = node::Root;
 
@@ -556,6 +560,11 @@ pub mod node {
 
     use rope::node;
 
+    use core::cast;
+    use core::str;
+    use core::uint;
+    use core::vec;
+
     /// Implementation of type `rope`
     pub enum Root {
         /// An empty rope
@@ -1137,6 +1146,8 @@ pub mod leaf_iterator {
 
         use rope::node::{Concat, Leaf, Node, height};
 
+        use core::vec;
+
         pub struct T {
             stack: ~[@Node],
             stackpos: int,
@@ -1176,6 +1187,8 @@ pub fn next(it: &mut T) -> Option<Leaf> {
     pub mod char_iterator {
         use core::prelude::*;
 
+        use core::str;
+
         use rope::node::{Leaf, Node};
         use rope::node::leaf_iterator;
 
@@ -1258,9 +1271,14 @@ pub fn get_next_char_in_leaf(it: &mut T) -> Option<char> {
 
 #[cfg(test)]
 mod tests {
-    use rope::*;
     use core::prelude::*;
 
+    use rope::*;
+
+    use core::str;
+    use core::uint;
+    use core::vec;
+
     //Utility function, used for sanity check
     fn rope_to_string(r: Rope) -> ~str {
         match (r) {
index 749e9d5dc611b595dd69166f9d54a4472bf4f43c..d20aed69240d2d82fbaf0f9a10e3b6e2e62507ec 100644 (file)
 
 use core::prelude::*;
 
+use core::at_vec;
 use core::hashmap::{HashMap, HashSet};
 use core::trie::{TrieMap, TrieSet};
+use core::uint;
+use core::vec;
 use deque::Deque;
 use dlist::DList;
 use treemap::{TreeMap, TreeSet};
index a3c02b2366d2a250386c776c7a9cbbb6fce8ec04..a85f113b68fb4dd1d4e867e881ba7826e29e1fb3 100644 (file)
 
 use core::prelude::*;
 
+use core::cmp;
 use core::container::{Container, Mutable, Map, Set};
 use core::old_iter::BaseIter;
 use core::old_iter;
-use core::option::{Some, None};
+use core::uint;
 use core::util::replace;
+use core::vec;
 
 pub struct SmallIntMap<T> {
     priv v: ~[Option<T>],
@@ -285,6 +287,11 @@ mod tests {
 
     use super::SmallIntMap;
 
+    use core::local_data;
+    use core::rand;
+    use core::uint;
+    use core::vec;
+
     #[test]
     fn test_find_mut() {
         let mut m = SmallIntMap::new();
@@ -380,6 +387,8 @@ mod test_set {
 
     use super::SmallIntSet;
 
+    use core::vec;
+
     #[test]
     fn test_disjoint() {
         let mut xs = SmallIntSet::new();
index 3039fa46f0623f4ef14588dbcb99a98b1e98575b..b3118dd37e12ef90905ceb08030fc855f2e88afc 100644 (file)
 use core::prelude::*;
 
 use core::cmp::{Eq, Ord};
+use core::uint;
+use core::util::swap;
 use core::vec::len;
 use core::vec;
-use core::util::swap;
 
 type Le<'self, T> = &'self fn(v1: &T, v2: &T) -> bool;
 
@@ -926,7 +927,12 @@ mod test_tim_sort {
     use core::prelude::*;
 
     use sort::tim_sort;
+
+    use core::local_data;
     use core::rand::RngUtil;
+    use core::rand;
+    use core::uint;
+    use core::vec;
 
     struct CVal {
         val: float,
@@ -1019,7 +1025,12 @@ mod big_tests {
     use core::prelude::*;
 
     use sort::*;
+
+    use core::local_data;
     use core::rand::RngUtil;
+    use core::rand;
+    use core::uint;
+    use core::vec;
 
     #[test]
     fn test_unique() {
index 6166e65f4f70fc97945d776c8cd2e31eea142aa2..8c03701f513104fc478f7ad88b7921cc81d5f2cc 100644 (file)
@@ -133,6 +133,9 @@ pub mod std {
     pub use core::condition;
     pub use core::cmp;
     pub use core::sys;
+    pub use core::unstable;
+    pub use core::str;
+    pub use core::os;
 }
 #[doc(hidden)]
 pub mod extra {
index beea3b6f52b4d0c8ef19b4b65ee9ab7a93ed49d1..5a1982d830d650ce2293af2975d5cf35ad79eac8 100644 (file)
 
 use core::prelude::*;
 
-use core::unstable::sync::{Exclusive, exclusive};
+use core::comm;
 use core::ptr;
 use core::task;
+use core::unstable::sync::{Exclusive, exclusive};
 use core::util;
 
 /****************************************************************************
@@ -728,6 +729,8 @@ mod tests {
 
     use core::cast;
     use core::cell::Cell;
+    use core::comm;
+    use core::ptr;
     use core::result;
     use core::task;
     use core::vec;
index 926045a6b5250b49e3447c3ec2f69867cb9305eb..eba4f0d1b75c06f6236fee680b41353044db7598 100644 (file)
@@ -14,6 +14,7 @@
 use core::prelude::*;
 
 use core::comm::Chan;
+use core::comm;
 use core::task::SchedMode;
 use core::task;
 use core::vec;
@@ -101,6 +102,6 @@ fn test_task_pool() {
     };
     let mut pool = TaskPool::new(4, Some(SingleThreaded), f);
     for 8.times {
-        pool.execute(|i| io::println(fmt!("Hello from thread %u!", *i)));
+        pool.execute(|i| println(fmt!("Hello from thread %u!", *i)));
     }
 }
index 7f073d0decb0a5ae51c294afb7e3f93187747a6c..c514631e787fb8c0f15e397a4e587fe6e89043a9 100644 (file)
@@ -12,7 +12,9 @@
 
 use core::prelude::*;
 
+use core::os;
 use core::rand::RngUtil;
+use core::rand;
 
 pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option<Path> {
     let mut r = rand::rng();
@@ -30,7 +32,10 @@ mod tests {
     use core::prelude::*;
 
     use tempfile::mkdtemp;
+    use tempfile;
+
     use core::os;
+    use core::str;
 
     #[test]
     fn test_mkdtemp() {
index ba2ee3c352ef5c23a9f2465b9394163f352dc41c..59c6a12e036431591dd83a6d8e29ebe499b0390f 100644 (file)
 use sort;
 use term;
 
-use core::to_str::ToStr;
 use core::comm::{stream, SharedChan};
+use core::either;
+use core::io;
+use core::num;
+use core::option;
+use core::result;
+use core::str;
+use core::task;
+use core::to_str::ToStr;
+use core::u64;
+use core::uint;
+use core::vec;
 
 pub mod rustrt {
     use core::libc::size_t;
@@ -601,10 +611,14 @@ fn calc_result(desc: &TestDesc, task_succeeded: bool) -> TestResult {
 pub mod bench {
     use core::prelude::*;
 
-    use time::precise_time_ns;
-    use test::{BenchHarness, BenchSamples};
-    use stats::Stats;
+    use core::num;
     use core::rand::RngUtil;
+    use core::rand;
+    use core::u64;
+    use core::vec;
+    use stats::Stats;
+    use test::{BenchHarness, BenchSamples};
+    use time::precise_time_ns;
 
     pub impl BenchHarness {
 
index d5a8cd78249bf1f2862bba633dc0c0851accc31a..93fbf6a405431496b3b1b314c87fb768349afbb7 100644 (file)
 
 use core::prelude::*;
 
+use core::i32;
+use core::int;
+use core::io;
+use core::str;
+
 static NSEC_PER_SEC: i32 = 1_000_000_000_i32;
 
 pub mod rustrt {
index 75caf1a4829e08c08010a2ae76e5264095aa4122..4f662613b00afdbd07f848054d4dc4fc99256dc5 100644 (file)
@@ -19,6 +19,7 @@
 use core::cast::transmute;
 use core::cast;
 use core::comm::{stream, Chan, SharedChan, Port, select2i};
+use core::either;
 use core::libc::c_void;
 use core::libc;
 
@@ -179,9 +180,12 @@ mod test {
 
     use timer::*;
     use uv;
+
     use core::cell::Cell;
-    use core::rand::RngUtil;
     use core::pipes::{stream, SharedChan};
+    use core::rand::RngUtil;
+    use core::rand;
+    use core::task;
 
     #[test]
     fn test_gl_timer_simple_sleep_test() {
index 5551431b551fc0aa098decc50e93a38e8bbfd4ec..a05c532c92f6e23175ef7e746bef3cf2d9cb2d9f 100644 (file)
@@ -15,6 +15,7 @@
 use core::prelude::*;
 
 use core::iterator::*;
+use core::uint;
 use core::util::{swap, replace};
 
 // This is implemented as an AA tree, which is a simplified variation of
@@ -701,9 +702,13 @@ fn heir_swap<K: TotalOrd, V>(node: &mut ~TreeNode<K, V>,
 mod test_treemap {
     use core::prelude::*;
 
-    use core::iterator::*;
     use super::*;
+
+    use core::iterator::*;
     use core::rand::RngUtil;
+    use core::rand;
+    use core::str;
+    use core::vec;
 
     #[test]
     fn find_empty() {
@@ -1021,8 +1026,11 @@ fn test_lazy_iterator() {
 mod test_set {
     use core::prelude::*;
     use core::iterator::*;
+
     use super::*;
 
+    use core::vec;
+
     #[test]
     fn test_clear() {
         let mut s = TreeSet::new();
index ae59f91cf83d241d65265c09d5c95e2932a9162d..8752f675a8d275fe78be095c06a3521a7a4dd994 100644 (file)
@@ -16,7 +16,9 @@
 use uv_iotask::{IoTask, spawn_iotask};
 
 use core::comm::Chan;
+use core::libc;
 use core::option::{Some, None};
+use core::str;
 use core::task::task;
 use core::unstable::global::{global_data_clone_create, global_data_clone};
 use core::unstable::weak_task::weaken_task;
index ff726c1464c38dfc0e7f2daa0703a1eec1a3e508..6cf753b801620b9b56142fee569697c8db01af5d 100644 (file)
@@ -22,6 +22,7 @@
 use core::comm::{stream, Port, Chan, SharedChan};
 use core::libc::c_void;
 use core::libc;
+use core::task;
 
 /// Used to abstract-away direct interaction with a libuv loop.
 pub struct IoTask {
@@ -223,6 +224,8 @@ struct AhData {
 
 #[cfg(test)]
 fn impl_uv_iotask_async(iotask: &IoTask) {
+    use core::ptr;
+
     let async_handle = ll::async_t();
     let ah_ptr: *ll::uv_async_t = &async_handle;
     let (exit_po, exit_ch) = stream::<()>();
index 5be8dd514de43df07a39b5f115cc9db481f10e7c..d5f7cb12e4f0bf3df37a261d38b60b16ad3e8df9 100644 (file)
 
 use core::prelude::*;
 
-use core::libc::size_t;
-use core::libc::c_void;
+use core::libc::{c_void, size_t};
+use core::libc;
 use core::ptr::to_unsafe_ptr;
+use core::ptr;
+use core::str;
+use core::vec;
 
 pub type uv_handle_t = c_void;
 pub type uv_loop_t = c_void;
@@ -1225,9 +1228,17 @@ pub unsafe fn addrinfo_as_sockaddr_in6(input: *addrinfo) -> *sockaddr_in6 {
 #[cfg(test)]
 mod test {
     use core::prelude::*;
-    use core::comm::{SharedChan, stream, GenericChan, GenericPort};
+
     use super::*;
 
+    use core::comm::{SharedChan, stream, GenericChan, GenericPort};
+    use core::libc;
+    use core::result;
+    use core::str;
+    use core::sys;
+    use core::task;
+    use core::vec;
+
     enum tcp_read_data {
         tcp_read_eof,
         tcp_read_more(~[u8]),
index 9df9ffd9465c2b1355e56c20df7bd8e63215b1d2..798cf1ba55d6f8ee2e9040fd77eff614b2483b1d 100644 (file)
@@ -21,7 +21,9 @@
 use core::either::{Either, Left, Right};
 use core::hashmap::HashMap;
 use core::io;
+use core::result;
 use core::run;
+use core::task;
 use core::to_bytes;
 use core::util::replace;
 
index 0107517ff3f3dc7d64bc09e1767b45d8390df4dc..9280be146f9c1f0dc43fa69b26c20c0c8adf8eda 100644 (file)
@@ -28,7 +28,16 @@ extern mod extra(name = "extra", vers = "0.7-pre");
 extern mod syntax(vers = "0.7-pre");
 
 use std::prelude::*;
+
+use std::int;
+use std::io;
+use std::option;
+use std::os;
+use std::result;
 use std::run;
+use std::str;
+use std::uint;
+use std::vec;
 
 use syntax::diagnostic;
 use syntax::parse::token::ident_interner;
index 00925a5700ada3d6730f6878f8478a6850ac1e66..ff766417c2ace0f2293e36226d31458e6fc13624 100644 (file)
@@ -31,8 +31,18 @@ extern mod rustc;
 
 use core::prelude::*;
 
+use core::io;
+use core::os;
 use core::run;
 use core::libc::exit;
+use core::str;
+
+// For bootstrapping.
+mod std {
+    pub use core::os;
+    pub use core::str;
+    pub use core::unstable;
+}
 
 enum ValidUsage {
     Valid(int), Invalid
index c3847ee4f15c35d6faa32a845de6698892301041..785b79f66b9d172226ca8bc63df7bd761bf0d208 100644 (file)
 use middle::ty;
 use util::ppaux;
 
+use core::char;
 use core::hash::Streaming;
 use core::hash;
 use core::libc::{c_int, c_uint};
 use core::os::consts::{macos, freebsd, linux, android, win32};
+use core::os;
+use core::ptr;
 use core::rt::io::Writer;
 use core::run;
+use core::str;
+use core::vec;
 use syntax::ast;
 use syntax::ast_map::{path, path_mod, path_name};
 use syntax::attr;
@@ -100,7 +105,12 @@ pub mod jit {
     use lib::llvm::{ModuleRef, PassManagerRef};
     use metadata::cstore;
 
+    use core::cast;
+    use core::char;
     use core::libc::c_int;
+    use core::os;
+    use core::ptr;
+    use core::str;
 
     pub mod rusti {
         #[nolink]
@@ -188,6 +198,7 @@ pub mod write {
     use core::libc::{c_int, c_uint};
     use core::path::Path;
     use core::run;
+    use core::str;
 
     pub fn is_object_or_assembly_or_exe(ot: output_type) -> bool {
         if ot == output_type_assembly || ot == output_type_object ||
index 8695d0c79efc0ad3b99f7b1862dae90c44396bab..16d10d0a35e6e36db36c9b24e06470c03f08a188 100644 (file)
 use metadata::cstore;
 use metadata::filesearch;
 
-use core::util;
 use core::hashmap::HashSet;
+use core::os;
+use core::uint;
+use core::util;
+use core::vec;
 
 fn not_win32(os: session::os) -> bool {
   match os {
@@ -210,6 +213,13 @@ pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {
 mod test {
     use core::prelude::*;
 
+    use core::os;
+    use core::str;
+
+    // FIXME(#2119): the outer attribute should be #[cfg(unix, test)], then
+    // these redundant #[cfg(test)] blocks can be removed
+    #[cfg(test)]
+    #[cfg(test)]
     use back::rpath::{get_absolute_rpath, get_install_prefix_rpath};
     use back::rpath::{get_relative_to, get_rpath_relative_to_output};
     use back::rpath::{minimize_rpaths, rpaths_to_flags};
index b295e7524cfbeda9e180791ba3bd7a8316a96c6f..f7ce376ca28e9e152d14da9ddb9066e90124f12d 100644 (file)
@@ -10,6 +10,8 @@
 
 use core::prelude::*;
 
+use core::option;
+use core::vec;
 use syntax::{ast, fold, attr};
 
 type in_cfg_pred = @fn(attrs: ~[ast::attribute]) -> bool;
index 7a8a2a7eb9799c8690d4e5d7b3da9a5fa2437eb7..2cdfd17c169a08213aa2bf69e133614d6ca4f2af 100644 (file)
@@ -10,6 +10,7 @@
 
 use core::prelude::*;
 
+use core::vec;
 use driver::session::Session;
 use syntax::parse;
 use syntax::ast;
index c8135abf334399801f7a8efe53dade02cfb1c583..a05dfc446ec423fbfbe2e7b17525cc349fa88f35 100644 (file)
 
 use driver::session::Session;
 
+use core::vec;
 use syntax::ast;
 use syntax::attr;
-use syntax::codemap;
 use syntax::codemap::dummy_sp;
+use syntax::codemap;
 use syntax::fold;
 
 static STD_VERSION: &'static str = "0.7-pre";
index e41f26aab083a2acc6b65b3a5b7deee107e27d3b..08a19577308914ad20c1d1dfe89a5284536a0c7f 100644 (file)
@@ -15,6 +15,7 @@
 use driver::session;
 use front::config;
 
+use core::vec;
 use syntax::ast_util::*;
 use syntax::attr;
 use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan};
@@ -309,7 +310,7 @@ fn mk_test_module(cx: &TestCtxt) -> @ast::item {
     let mainfn = (quote_item!(
         pub fn main() {
             #[main];
-            extra::test::test_main_static(::os::args(), tests);
+            extra::test::test_main_static(::std::os::args(), tests);
         }
     )).get();
 
index a12a8be3b11654978755c12cf622197704225d42..49a682e68f19bbee720b7a330d5405d91de437d8 100644 (file)
 
 use core::hashmap::HashMap;
 use core::libc::{c_uint, c_ushort};
+use core::option;
+use core::ptr;
+use core::str;
+use core::vec;
 
 pub type Opcode = u32;
 pub type Bool = c_uint;
index d189ddf9533f6cbd91dc1d944bdcb104484d380d..2c9b3c3a4efd62f096b202949794eac93b6861da 100644 (file)
@@ -18,6 +18,7 @@
 use metadata::loader;
 
 use core::hashmap::HashMap;
+use core::vec;
 use syntax::attr;
 use syntax::codemap::{span, dummy_sp};
 use syntax::diagnostic::span_handler;
index 57d6c46d9f38b25055ffe39e99bacab6eac9d61e..2a2419b0e30d71439b6d24b351763c5491c82923 100644 (file)
@@ -18,6 +18,7 @@
 use metadata;
 use middle::{ty, resolve};
 
+use core::vec;
 use reader = extra::ebml::reader;
 use syntax::ast;
 use syntax::ast_map;
index 6cc211e0e99aba7905ae9531dce8421d1971d035..6cc01cb90b8be9fe39390291a1e335eb57ed1a3a 100644 (file)
@@ -18,6 +18,7 @@
 use metadata::decoder;
 
 use core::hashmap::HashMap;
+use core::vec;
 use extra;
 use syntax::ast;
 use syntax::parse::token::ident_interner;
index 5467c50c7b8358d6daad9ef43ee3818ead9e896b..a488d39d1875625438639526701e15575f0deada 100644 (file)
 use middle;
 use util::ppaux::ty_to_str;
 
-use extra::flate;
 use core::hash::HashUtil;
 use core::hashmap::HashMap;
+use core::int;
+use core::io;
+use core::str;
+use core::uint;
+use core::vec;
+use extra::flate;
 use extra::serialize::Encodable;
 use extra;
 use syntax::abi::AbiSet;
 use syntax::ast_util::*;
 use syntax::attr;
 use syntax::diagnostic::span_handler;
-use syntax::parse::token::special_idents;
-use syntax::{ast_util, visit};
 use syntax::opt_vec::OptVec;
 use syntax::opt_vec;
+use syntax::parse::token::special_idents;
+use syntax::{ast_util, visit};
 use syntax;
 use writer = extra::ebml::writer;
 
index 0d9b16d31171c1023ce845abdb7140a72fb0023e..4dbcd21e8f3d5db594ddc85bf5460ca1e427d770 100644 (file)
 
 use core::prelude::*;
 
+use core::option;
+use core::os;
+use core::result;
+use core::str;
+
 // A module for searching for libraries
 // FIXME (#2658): I'm not happy how this module turned out. Should
 // probably just be folded into cstore.
index 94060ab327181bd2eba77b7076e9e6ba9db33e02..5c64bd43943512dd1bbd837584a58cb1f73fd4cb 100644 (file)
 use syntax::print::pprust;
 use syntax::{ast, attr};
 
-use extra::flate;
+use core::cast;
+use core::io;
+use core::option;
 use core::os::consts::{macos, freebsd, linux, android, win32};
+use core::ptr;
+use core::str;
+use core::uint;
+use core::vec;
+use extra::flate;
 
 pub enum os {
     os_macos,
index a726ca4bd52a64201cadc22f7cdcdf01f0da9cfe..f26a52cd8cd333503aad8f1c3ba6b569b7ec8bd4 100644 (file)
@@ -18,6 +18,9 @@
 
 use middle::ty;
 
+use core::str;
+use core::uint;
+use core::vec;
 use syntax::abi::AbiSet;
 use syntax::abi;
 use syntax::ast;
index 3ebcf72e48548ec3afcf4f77a6f0e5baeb41f307..276b78d2e12d0e5d17ac69c69403de96bbfa0f1c 100644 (file)
@@ -25,6 +25,9 @@
 use middle;
 use util::ppaux::ty_to_str;
 
+use core::at_vec;
+use core::str;
+use core::uint;
 use extra::ebml::reader;
 use extra::ebml;
 use extra::serialize;
index 183771956eae0116aaae96eefeabeabab7985c59..1801585900b645c8bd8732c6474aecec12047e4e 100644 (file)
 
 use core::prelude::*;
 
-use middle::moves;
-use middle::borrowck::*;
+use core::hashmap::HashSet;
+use core::uint;
 use mc = middle::mem_categorization;
+use middle::borrowck::*;
+use middle::moves;
 use middle::ty;
-use util::ppaux::Repr;
-use core::hashmap::HashSet;
 use syntax::ast::{m_mutbl, m_imm, m_const};
 use syntax::ast;
 use syntax::ast_util;
-use syntax::visit;
 use syntax::codemap::span;
+use syntax::visit;
+use util::ppaux::Repr;
 
 struct CheckLoanCtxt<'self> {
     bccx: @BorrowckCtxt,
index 82a3b145e1d5da3bfe36537179232c2472d05e63..6bd32f04ce5b9c9ed542ee7dacd42e1b95d45f05 100644 (file)
@@ -12,6 +12,7 @@
 
 use core::prelude::*;
 
+use core::vec;
 use middle::borrowck::*;
 use mc = middle::mem_categorization;
 use middle::ty;
index 1babf08aa705caeeec53233dd19b45843bfaddcd..066d0189fcb1073fe844dbbc6762d439e5c8a4dc 100644 (file)
@@ -23,8 +23,9 @@
 
 use core::hashmap::{HashSet, HashMap};
 use core::io;
-use core::result::{Result};
 use core::ops::{BitOr, BitAnd};
+use core::result::{Result};
+use core::str;
 use syntax::ast;
 use syntax::ast_map;
 use syntax::visit;
index 91962f17d596f1259cdeaa94ebec794a7310651c..2443c19ac97c5ef320e91909012ae1dc3ecca0c5 100644 (file)
@@ -16,7 +16,9 @@
 */
 
 use core::prelude::*;
+
 use core::hashmap::{HashMap, HashSet};
+use core::uint;
 use middle::borrowck::*;
 use middle::dataflow::DataFlowContext;
 use middle::dataflow::DataFlowOperator;
index 748ae83a60c570e32b25192641fe6af68bf6fdd9..58c5ce6f2b51b5d7a2e695fbfc34ad23700f7558 100644 (file)
@@ -19,6 +19,8 @@
 use middle::moves;
 use util::ppaux::ty_to_str;
 
+use core::uint;
+use core::vec;
 use extra::sort;
 use syntax::ast::*;
 use syntax::ast_util::{unguarded_pat, walk_pat};
index 448ca4ab52398d862deeb9f17a978a6cccef58c8..d68bbf8cdb316d16d502bfde6c134b0586d2aaef 100644 (file)
@@ -18,7 +18,9 @@
 use syntax::{ast, ast_map, ast_util, visit};
 use syntax::ast::*;
 
+use core::float;
 use core::hashmap::{HashMap, HashSet};
+use core::vec;
 
 //
 // This pass classifies expressions by their constant-ness.
index e0806359c5d092a656b54456b6f439980a043653..cd60279873aae335ca8a02b8007cae05db320b32 100644 (file)
 use core::prelude::*;
 
 use core::cast;
+use core::io;
+use core::str;
 use core::uint;
+use core::vec;
 use syntax::ast;
 use syntax::ast_util;
 use syntax::ast_util::id_range;
index d2f0a5580ef6eaf282eada9c77a789aeb4214a12..d809e653f69d82a794536bfe9aa86c3e9a91e7ab 100644 (file)
@@ -73,15 +73,17 @@ pub fn check_crate(tcx: ty::ctxt,
 
     let visitor = visit::mk_vt(@visit::Visitor {
         visit_fn: |fn_kind, fn_decl, block, span, node_id, _, visitor| {
-            let is_unsafe_fn = match *fn_kind {
-                fk_item_fn(_, _, purity, _) => purity == unsafe_fn,
-                fk_method(_, _, method) => method.purity == unsafe_fn,
-                _ => false,
+            let (is_item_fn, is_unsafe_fn) = match *fn_kind {
+                fk_item_fn(_, _, purity, _) => (true, purity == unsafe_fn),
+                fk_method(_, _, method) => (true, method.purity == unsafe_fn),
+                _ => (false, false),
             };
 
             let old_unsafe_context = context.unsafe_context;
             if is_unsafe_fn {
                 context.unsafe_context = UnsafeFn
+            } else if is_item_fn {
+                context.unsafe_context = SafeContext
             }
 
             visit::visit_fn(fn_kind,
@@ -97,7 +99,8 @@ pub fn check_crate(tcx: ty::ctxt,
 
         visit_block: |block, _, visitor| {
             let old_unsafe_context = context.unsafe_context;
-            if block.node.rules == unsafe_blk {
+            if block.node.rules == unsafe_blk &&
+                    context.unsafe_context == SafeContext {
                 context.unsafe_context = UnsafeBlock(block.node.id)
             }
 
index 9dffd09e5481f53335cbf5bb6662b8193e8ebe4b..7a57f78d60bb98a15c41fe1d772a1006a300b403 100644 (file)
@@ -17,6 +17,7 @@
 use middle::ty;
 
 use core::hashmap::HashMap;
+use core::vec;
 use syntax::codemap::span;
 use syntax::{ast, ast_util, visit};
 
index a03191e2c4dae21cad560fa9a56a29657bbad272..b988a88a9019c29f38cdfd92c817d1c380de4d2f 100644 (file)
@@ -18,6 +18,7 @@
 use util::ppaux::{Repr, ty_to_str};
 use util::ppaux::UserString;
 
+use core::vec;
 use syntax::ast::*;
 use syntax::attr::attrs_contains_name;
 use syntax::codemap::span;
index 96ccb2999ae15fab74d040203a4e3beba3c6d419..56c024f12ae086543b7f3dcdafa7a88af6274aa2 100644 (file)
 use middle::pat_util;
 use util::ppaux::{ty_to_str};
 
+use core::char;
+use core::cmp;
 use core::hashmap::HashMap;
+use core::i16;
+use core::i32;
+use core::i64;
+use core::i8;
+use core::str;
+use core::u16;
+use core::u32;
+use core::u64;
+use core::u8;
+use core::vec;
 use extra::smallintmap::SmallIntMap;
 use syntax::attr;
 use syntax::codemap::span;
index 4897d6c87dec191e3935b5c1f0ad0d7bdee11f22..ee7b21638b24089c8b5e458e2811204efa3d7905 100644 (file)
 
 use core::cast::transmute;
 use core::hashmap::HashMap;
+use core::io;
+use core::old_iter;
+use core::to_str;
+use core::uint;
+use core::vec;
 use syntax::ast::*;
 use syntax::codemap::span;
 use syntax::parse::token::special_idents;
index 0d335559747249d48500e00d170fe16b7645f3ff..3a14a6816289e17c1fb04506d26058309a1a6965 100644 (file)
@@ -53,6 +53,7 @@
 use util::ppaux::{ty_to_str, region_to_str, Repr};
 use util::common::indenter;
 
+use core::uint;
 use syntax::ast::{m_imm, m_const, m_mutbl};
 use syntax::ast;
 use syntax::codemap::span;
index abec56d32d79edbd783d2e645304b8a183691987..c58ebcd1ee4bbbac5e48da4f4de01a257bf37760 100644 (file)
@@ -136,6 +136,7 @@ struct Foo { a: int, b: ~int }
 use util::ppaux::Repr;
 use util::common::indenter;
 
+use core::at_vec;
 use core::hashmap::{HashSet, HashMap};
 use syntax::ast::*;
 use syntax::ast_util;
index 979d04e18c3408c957ff14e60992b6b207a1f2ef..fa17fa04ed82096b459a5b2eaafb219c763298fb 100644 (file)
 use syntax::visit::{visit_mod, visit_ty, vt};
 use syntax::opt_vec::OptVec;
 
-use core::option::Some;
 use core::str::each_split_str;
+use core::str;
+use core::uint;
+use core::vec;
 use core::hashmap::{HashMap, HashSet};
 use core::util;
 
index 9365a698a7e140a05d2a5cadb72b30b878fe21e5..ca7ce9c02d162fb80d2228e8053776b54ef73c2e 100644 (file)
 use util::common::indenter;
 
 use core::hashmap::HashMap;
+use core::vec;
 use syntax::ast;
 use syntax::ast::ident;
 use syntax::ast_util::path_to_ident;
index fad5dc73c1a120ba838dc1b0e81787eb24995f52..bfcd6b16857b898d57a1786d30e66baf769b1498 100644 (file)
@@ -20,6 +20,7 @@
 use middle::trans::common::*;
 use middle::ty;
 
+use core::str;
 use syntax::ast;
 
 // Take an inline assembly expression and splat it out via LLVM
index 678446023d14fb9665c0fbe7119039bef8531770..a36eb39c049faadcbb410f4ea2a0be59e75b480e 100644 (file)
 
 use core::hash;
 use core::hashmap::{HashMap, HashSet};
+use core::int;
+use core::io;
 use core::libc::c_uint;
+use core::str;
+use core::uint;
+use core::vec;
 use extra::time;
 use syntax::ast::ident;
 use syntax::ast_map::{path, path_elt_to_str, path_name};
index 7079c11e7d0d25c34b8ddc6eb7f3774f4fa91f06..a77e27bf0fe41a888eb5cb8a966b57f26ad8c7c8 100644 (file)
 use middle::trans::machine::llalign_of_min;
 use syntax::codemap::span;
 
+use core::cast;
 use core::hashmap::HashMap;
 use core::libc::{c_uint, c_ulonglong, c_char};
+use core::str;
+use core::vec;
 
 pub fn terminate(cx: block, _: &str) {
     cx.terminated = true;
index 2282952ab88b2f8827b750206c56763ac1891c15..c9fb01905fb2f00f4c37109f7be13c7098a3e92a 100644 (file)
@@ -11,6 +11,9 @@
 use core::prelude::*;
 
 use core::libc::c_uint;
+use core::ptr;
+use core::uint;
+use core::vec;
 use lib::llvm::{llvm, TypeRef, Integer, Pointer, Float, Double};
 use lib::llvm::{Struct, Array, Attribute};
 use lib::llvm::{StructRetAttribute};
index b710f33d6abb238139addf5ca345d00a680f7beb..1e6e31e4277f47c70dad582c03c829054a859fb3 100644 (file)
@@ -43,6 +43,7 @@
 use middle::typeck;
 use util::ppaux::Repr;
 
+use core::vec;
 use syntax::ast;
 use syntax::ast_map;
 use syntax::visit;
index 335dd47b78b1fc0cce4158ed5c6e79de1cc2218c..fa3e6eeb0b6a10a921c7ad1e398011c525373ba9 100644 (file)
@@ -26,6 +26,8 @@
 use middle::ty;
 use util::ppaux::ty_to_str;
 
+use core::str;
+use core::vec;
 use syntax::ast;
 use syntax::ast_map::path_name;
 use syntax::ast_util;
index ad5dadaf8701d994d0fdb629a4bd03332e522ad8..d148dbd2183b9366bbaf2813f2d9d2f1e74159e2 100644 (file)
 use util::ppaux::{Repr};
 
 use core::cast::transmute;
+use core::cast;
 use core::hash;
 use core::hashmap::{HashMap, HashSet};
 use core::libc::{c_uint, c_longlong, c_ulonglong};
+use core::ptr;
+use core::str;
 use core::to_bytes;
 use core::vec::raw::to_ptr;
+use core::vec;
 use syntax::ast::ident;
 use syntax::ast_map::{path, path_elt};
 use syntax::codemap::span;
index 97ccb6d7908a4f75aad12b01de6462bf957e18f7..d47fc184cf3c983fde3d43125be478cb499233c4 100644 (file)
@@ -31,6 +31,7 @@
 use util::ppaux::{Repr, ty_to_str};
 
 use core::libc::c_uint;
+use core::str;
 use syntax::{ast, ast_util, ast_map};
 
 pub fn const_lit(cx: @CrateContext, e: @ast::expr, lit: ast::lit)
index efe23aee9e6bf574492c1be8f7694c19cce82eb3..5ef4376e8117c25e52bfc9a13d63b9576c9cb39b 100644 (file)
@@ -24,6 +24,8 @@
 use util::common::indenter;
 use util::ppaux;
 
+use core::str;
+use core::vec;
 use syntax::ast;
 use syntax::ast::ident;
 use syntax::ast_map::path_mod;
index 6be5dbe1beb6ce853946de69cd1dbe7a2a5fd885..c8b9e3f8f0e199222dffe35caab6397faddf4f52 100644 (file)
 use util::ppaux::ty_to_str;
 
 use core::to_bytes;
+use core::uint;
 use syntax::ast;
 use syntax::codemap::span;
 use syntax::parse::token::special_idents;
index 979559ad48109948f0674d5264d45f8148db6c40..c1661b80cf865ced493e2f8cba4c89ef29429033 100644 (file)
 use middle::ty;
 use util::ppaux::ty_to_str;
 
+use core::cast;
 use core::hashmap::HashMap;
 use core::libc;
+use core::option;
+use core::ptr;
+use core::str;
+use core::sys;
+use core::vec;
 use syntax::codemap::span;
 use syntax::parse::token::ident_interner;
 use syntax::{ast, codemap, ast_util, ast_map};
index d581d8043f8e42df427add2673c21aedc0865dad..99860e60c6b8ded66a8ca06a17bd043d585616c2 100644 (file)
 
 use core::cast::transmute;
 use core::hashmap::HashMap;
+use core::vec;
 use syntax::print::pprust::{expr_to_str};
 use syntax::ast;
 use syntax::codemap;
index 63356a135d059e328310b6d61f0d926d46dbf487..a7a8cd088d2b0d26d14c0ea403c5dc5c4774ecad 100644 (file)
@@ -34,6 +34,9 @@
 use middle::ty::FnSig;
 use util::ppaux::ty_to_str;
 
+use core::str;
+use core::uint;
+use core::vec;
 use syntax::codemap::span;
 use syntax::{ast, ast_util};
 use syntax::{attr, ast_map};
index 405e5e36de799ba4d04537a7d94912ef9a6ce795..013a40c95c54d06196e3e992d656b6509fdfd6a1 100644 (file)
 use util::ppaux;
 use util::ppaux::ty_to_short_str;
 
+use core::io;
 use core::libc::c_uint;
+use core::str;
+use core::vec;
 use extra::time;
 use syntax::ast;
 
index aa4bb775323c7247f6772a2ff257a6cb07059055..1f9bdcb5abb21857c204a96749977b5d79ecd028 100644 (file)
@@ -19,6 +19,7 @@
 use middle::ty;
 use util::ppaux::ty_to_str;
 
+use core::vec;
 use syntax::ast;
 use syntax::ast_map::path_name;
 use syntax::ast_util::local_def;
index 381c257f6511cdd16150799432baabddd8710fcb..1e43a3c502bae407310e139158c223874bf27eef 100644 (file)
@@ -31,6 +31,8 @@
 use util::common::indenter;
 use util::ppaux::Repr;
 
+use core::str;
+use core::vec;
 use syntax::ast_map::{path, path_mod, path_name};
 use syntax::ast_util;
 use syntax::{ast, ast_map};
index 1b3150f14b208d5d0dddb7809b7783b79a0c449c..7e29d3bd33a823ec3accdc6a8831069470d2d5db 100644 (file)
@@ -32,6 +32,7 @@
 use middle::typeck;
 use util::ppaux::Repr;
 
+use core::vec;
 use syntax::ast;
 use syntax::ast_map;
 use syntax::ast_map::path_name;
index e17fe63af764b0b960725757a72ff5a88b044292..8815259b3cc7b9c5258966b1caf8195b8effb427 100644 (file)
 use util::common::{indenter};
 use util::enum_set::{EnumSet, CLike};
 
+use core::cast;
+use core::cmp;
+use core::hashmap::{HashMap, HashSet};
+use core::iter;
+use core::ops;
 use core::ptr::to_unsafe_ptr;
 use core::to_bytes;
-use core::hashmap::{HashMap, HashSet};
+use core::u32;
+use core::uint;
+use core::vec;
+use extra::smallintmap::SmallIntMap;
 use syntax::ast::*;
 use syntax::ast_util::is_local;
 use syntax::ast_util;
index 5cc2b0dceddc1f1bf0bc8927792c699216314d51..390ba2dc0de530ffb7f4f6d7b5ac446fd56b90aa 100644 (file)
@@ -63,6 +63,8 @@
 use middle::typeck::rscope::RegionParamNames;
 use middle::typeck::lookup_def_tcx;
 
+use core::result;
+use core::vec;
 use syntax::abi::AbiSet;
 use syntax::{ast, ast_util};
 use syntax::codemap::span;
index 8edae63cea92649bee448116095a1b8b708e3e4b..e469856f08fa6598c50bc5a53345f05e8d6e22a3 100644 (file)
@@ -19,6 +19,7 @@
 use middle::typeck::require_same_types;
 
 use core::hashmap::{HashMap, HashSet};
+use core::vec;
 use syntax::ast;
 use syntax::ast_util;
 use syntax::codemap::span;
index 68deb900886fbc7a65f040e854e3bf1d798a3439..1b7368b3dbfbe8c8327979d85a0e89210a29eacf 100644 (file)
@@ -96,6 +96,9 @@ trait `ToStr` imported, and I call `to_str()` on a value of type `T`,
 use util::common::indenter;
 
 use core::hashmap::HashSet;
+use core::result;
+use core::uint;
+use core::vec;
 use extra::list::Nil;
 use syntax::ast::{def_id, sty_value, sty_region, sty_box};
 use syntax::ast::{sty_uniq, sty_static, node_id};
index f25d451363bd3d12c8d9b8b3c43186173e83f523..7ba759e63ee1d86449e0341da156bde9a4711cff 100644 (file)
 
 use core::cast::transmute;
 use core::hashmap::HashMap;
+use core::result;
+use core::str;
 use core::util::replace;
+use core::vec;
 use extra::list::Nil;
 use syntax::abi::AbiSet;
 use syntax::ast::{provided, required};
index 642022c5b8ff984f5d6170ab1ca797ce4db70192..13b9c59e2d9cc597014f9743983a9571b459f70d 100644 (file)
 use middle::typeck::check::regionmanip::relate_nested_regions;
 use middle::typeck::infer::resolve_and_force_all_but_regions;
 use middle::typeck::infer::resolve_type;
-use util::ppaux::{note_and_explain_region, ty_to_str,
-                  region_to_str};
+use util::ppaux::{note_and_explain_region, ty_to_str, region_to_str};
 use middle::pat_util;
 
+use core::result;
+use core::uint;
 use syntax::ast::{ManagedSigil, OwnedSigil, BorrowedSigil};
 use syntax::ast::{def_arg, def_binding, def_local, def_self, def_upvar};
 use syntax::ast;
@@ -789,6 +790,8 @@ pub mod guarantor {
     use syntax::codemap::span;
     use util::ppaux::{ty_to_str};
 
+    use core::uint;
+
     pub fn for_addr_of(rcx: @mut Rcx, expr: @ast::expr, base: @ast::expr) {
         /*!
          * Computes the guarantor for an expression `&base` and then
index 67d7b064115eeea5be47caf6cea71d3e35a56b0f..37497e9a2bb2d1b33282509737246dd8542ce3f0 100644 (file)
@@ -26,6 +26,8 @@
 use util::ppaux;
 
 use core::hashmap::HashSet;
+use core::result;
+use core::uint;
 use syntax::ast;
 use syntax::ast_util;
 use syntax::codemap::span;
index 14a4034c6bb3430ae05692763b86a56503108c24..f9aa01c09564c655d25d1da7049817b9a4e77889 100644 (file)
 use syntax::visit::{visit_mod};
 use util::ppaux::ty_to_str;
 
-use core::result::Ok;
 use core::hashmap::{HashMap, HashSet};
+use core::old_iter;
+use core::result::Ok;
 use core::uint;
+use core::vec;
 
 pub struct UniversalQuantificationResult {
     monotype: t,
index b3b59c2fc9ee1db7c6f67f8c1c635e412a37ec44..a2c1211c5c46ecdf988472c2a0ef042ac9d8a07e 100644 (file)
@@ -47,6 +47,8 @@
 use util::ppaux;
 use util::ppaux::UserString;
 
+use core::result;
+use core::vec;
 use syntax::abi::AbiSet;
 use syntax::ast::{RegionTyParamBound, TraitTyParamBound};
 use syntax::ast;
index d07752ee20a19fb8e8845c966757be272ad12e37..f0fe48918073edaadf5964d2dac8259c4725e2c7 100644 (file)
@@ -68,6 +68,7 @@
 use util::common::indent;
 
 use core::result::{iter_vec2, map_vec2};
+use core::vec;
 use syntax::ast::{Onceness, purity};
 use syntax::ast;
 use syntax::opt_vec;
index f2371e927b82fef9a615971db2991d4dcb20b8a8..6a1fd05baf74531fcd319a99eb0da65a09dca9a4 100644 (file)
@@ -267,6 +267,8 @@ fn bar() {
 use util::common::indent;
 use util::ppaux::{bound_region_to_str, ty_to_str, trait_ref_to_str};
 
+use core::result;
+use core::vec;
 use extra::list::Nil;
 use extra::smallintmap::SmallIntMap;
 use syntax::ast::{m_imm, m_mutbl};
index 217d9716f7dd560b327a541581c991d7af89d407..ea0bdc68ac2533526a0d38db624547b50b59fcf9 100644 (file)
@@ -58,6 +58,7 @@
 use util::common::{indent, indenter};
 use util::ppaux::ty_to_str;
 
+use core::vec;
 use syntax::ast;
 
 pub static resolve_nested_tvar: uint = 0b0000000001;
index 888339b707d277a8d83787a2602bd24dfafd2078..ef3b837e98a16829099ebee687cf1191a8e13cb0 100644 (file)
@@ -18,6 +18,8 @@
 use middle::typeck::infer::unify::{Redirect, Root, VarValue};
 use util::ppaux::{mt_to_str, ty_to_str, trait_ref_to_str};
 
+use core::str;
+use core::uint;
 use syntax::ast;
 
 pub trait InferStr {
index b75654e7251b71fe8b7e8e4e6c840423ef65be2b..5cb4928d51486b760bcfb02fb336566cf50112d0 100644 (file)
@@ -59,6 +59,7 @@
 use util::ppaux;
 
 use core::hashmap::HashMap;
+use core::result;
 use extra::list::List;
 use extra::list;
 use syntax::codemap::span;
index 1f787e14f189e3e2d0041b2939d2a1b262856aa1..709d631de117a99e341ad29c1012e866308dec54 100644 (file)
@@ -12,6 +12,7 @@
 
 use middle::ty;
 
+use core::result;
 use syntax::ast;
 use syntax::codemap::span;
 use syntax::opt_vec::OptVec;
index 019ca2a0ed51934a3ebc760175cdcd5a03b9dda2..07056a10f3a94dfb83e59afa6aa294327173315d 100644 (file)
@@ -34,6 +34,12 @@ extern mod std(name = "extra", vers = "0.7-pre");
 #[cfg(not(stage0))]
 extern mod std(name = "std", vers = "0.7-pre");
 
+// For bootstrapping purposes.
+#[cfg(stage0)]
+pub use core::str;
+#[cfg(stage0)]
+pub use core::unstable;
+
 use core::prelude::*;
 
 use driver::driver::{host_triple, optgroups, early_error};
@@ -44,6 +50,13 @@ use driver::driver::{compile_input};
 use driver::session;
 use middle::lint;
 
+use core::io;
+use core::os;
+use core::result;
+use core::str;
+use core::task;
+use core::uint;
+use core::vec;
 use extra::getopts::{groups, opt_present};
 use extra::getopts;
 use syntax::codemap;
@@ -148,6 +161,18 @@ pub mod lib {
     pub mod llvm;
 }
 
+// A curious inner module that allows ::std::foo to be available in here for
+// macros.
+mod std {
+    pub use core::cmp;
+    pub use core::os;
+    pub use core::str;
+    pub use core::sys;
+    pub use core::to_bytes;
+    pub use core::unstable;
+    pub use extra::serialize;
+}
+
 pub fn version(argv0: &str) {
     let mut vers = ~"unknown version";
     let env_vers = env!("CFG_VERSION");
index cbf1d0df09f689245e2f52a3ddb9da4d3ceb388d..a44c409aa33b585792f5c3484bf3248c71634829 100644 (file)
@@ -15,6 +15,8 @@
 use syntax::visit;
 
 use core::hashmap::HashSet;
+use core::io;
+use core::str;
 use extra;
 
 pub fn time<T>(do_it: bool, what: ~str, thunk: &fn() -> T) -> T {
index 6534a7ba9b0885977052590b527a409936f6a60a..4e9b7cf00a0bd843e620789e06020047d9effe9b 100644 (file)
@@ -98,6 +98,7 @@ fn bitand(&self, e: &EnumSet<E>) -> EnumSet<E> {
 mod test {
     use core::prelude::*;
 
+    use core::cast;
     use core::iter;
 
     use util::enum_set::*;
index 8694c0e356eb182582af5a46553695fe8c0a7d04..dcf631f0f7b7f40a64c90475dbfde2b7968d6760 100644 (file)
@@ -31,6 +31,9 @@
 use syntax::print::pprust;
 use syntax::{ast, ast_util};
 
+use core::str;
+use core::vec;
+
 /// Produces a string suitable for debugging output.
 pub trait Repr {
     fn repr(&self, tcx: ctxt) -> ~str;
index 21ce70e7f5f6e2ff5595df1aa3b71a235b705af2..23810748b436fbf99240579aa171454415d50070 100644 (file)
@@ -23,6 +23,8 @@
 
 use core::cell::Cell;
 use core::comm::{stream, SharedChan, Port};
+use core::task;
+use core::vec;
 use rustc::driver::driver;
 use rustc::driver::session::Session;
 use rustc::driver::session::{basic_options, options};
index 717b49dfe26f702ac8a367392109d6fb3562c12b..d2d9ec7d79bd85e0a4cc9203ea9f2b52bfcf07d9 100644 (file)
@@ -17,6 +17,7 @@
 
 use core::prelude::*;
 
+use core::str;
 use syntax::ast;
 use syntax::attr;
 
index 1e6d6d7bd89c7fba7faba82650a678893354ae64..a1dad7d17f8e8d2b9afe7b2c7a2c372c136a6d3d 100644 (file)
@@ -27,6 +27,7 @@
 use fold;
 use pass::Pass;
 
+use core::vec;
 use syntax::ast;
 use syntax::ast_map;
 
index 603ce0de67d933a583372874be646017b8c838ac..4beb8583bae7b5c15212ed85c4f780e0fb53720d 100644 (file)
 use core::prelude::*;
 
 use core::cell::Cell;
-use core::run;
-use core::run::ProcessOutput;
+use core::os;
 use core::result::Result;
+use core::result;
+use core::run::ProcessOutput;
+use core::run;
+use core::vec;
 use extra::getopts;
 
 /// The type of document to output
@@ -243,7 +246,9 @@ pub fn maybe_find_pandoc(
 #[cfg(test)]
 mod test {
     use core::prelude::*;
+
     use config::*;
+    use core::result;
     use core::run::ProcessOutput;
 
     fn parse_config(args: &[~str]) -> Result<Config, ~str> {
index 972299d35f0a748eb79a31b0c4eb973461327062..7a3ab259b1d97abcd3ce08fe5c56f0b0857ee376 100644 (file)
@@ -24,7 +24,9 @@
 use fold;
 use pass::Pass;
 
+use core::str;
 use core::util;
+use core::vec;
 
 pub fn mk_pass() -> Pass {
     Pass {
index b383a41a91c8dc68b9ac616f6a6dbe4ec04e30b9..2d5f60e714b5082511c9697d7d534ca9498c063f 100644 (file)
@@ -14,6 +14,8 @@
 
 use doc;
 
+use core::vec;
+
 pub type AstId = int;
 
 #[deriving(Eq)]
index 3ef907d819d68dc82c21e9b4c2195e0391011919..3303a79d1b284551753ee579af10b64ff40cc9a3 100644 (file)
@@ -16,6 +16,8 @@
 use doc::ItemUtils;
 use doc;
 
+use core::local_data::local_data_get;
+use core::vec;
 use syntax::ast;
 use syntax::parse::token::{ident_interner};
 use syntax::parse::token;
index 5bd394215a994112579e81ac83326e6482dcaac4..bd999b637c28bac3c415ce510916291597fcda63 100644 (file)
@@ -14,6 +14,8 @@
 #[cfg(test)] use extract;
 #[cfg(test)] use parse;
 
+use core::vec;
+
 pub struct Fold<T> {
     ctxt: T,
     fold_doc: FoldDoc<T>,
index 289aa33f67c37cd4a6dda7a605c814a9abad56c6..87a73f5c9d3e013628e5d9832374def2d279acd0 100644 (file)
@@ -22,6 +22,8 @@
 use markdown_writer;
 use pass::Pass;
 
+use core::str;
+
 pub fn mk_pass(config: config::Config) -> Pass {
     Pass {
         name: ~"markdown_index",
index a3ad8d8d04de3413bad36958debf7d431f163f35..d34aa7c9955d537ea7904f3fdaf884faf93a5c23 100644 (file)
@@ -23,6 +23,8 @@
 use sort_pass;
 
 use core::cell::Cell;
+use core::str;
+use core::vec;
 use syntax;
 
 pub fn mk_pass(writer_factory: WriterFactory) -> Pass {
@@ -539,6 +541,8 @@ mod test {
     use tystr_pass;
     use unindent_pass;
 
+    use core::str;
+
     fn render(source: ~str) -> ~str {
         let (srv, doc) = create_doc_srv(source);
         let markdown = write_markdown_str_srv(srv, doc);
index 973326b10dce8bfa11a5ae20bce4b5bb04c6f9cd..86b51dfabf04edbb1edbcf19fadbbaa9b617a0a7 100644 (file)
 use doc::ItemUtils;
 use doc;
 
-use core::run;
 use core::comm::*;
+use core::comm;
+use core::io;
+use core::libc;
+use core::os;
+use core::result;
+use core::run;
+use core::str;
+use core::task;
 use extra::future;
 
 pub enum WriteInstr {
index 581bc742eb9034546a168640395774586928cae1..29a6765f16d537700284d1b423e68f6272386ecf 100644 (file)
@@ -27,6 +27,7 @@
 use util::NominalOp;
 
 use core::comm::*;
+use core::task;
 use syntax::ast;
 
 #[cfg(test)] use doc::PageUtils;
index 95998ba13584533b64d25c0360f00c32eab49d3f..8a51339c89669451cbceb3064849e7fb614d1409 100644 (file)
@@ -10,6 +10,8 @@
 
 use core::prelude::*;
 
+use core::vec;
+
 use astsrv;
 use doc;
 use time;
index d4a25f6eb8bcccf81b6591cc312ea2cc329a0cbb..7ed5d5f5516308dab8d770c580941c5ef2ab2f93 100644 (file)
@@ -66,6 +66,15 @@ pub mod escape_pass;
 pub mod prune_private_pass;
 pub mod util;
 
+mod std {
+    pub use core::clone;
+    pub use core::cmp;
+    pub use core::os;
+    pub use core::str;
+    pub use core::sys;
+    pub use core::unstable;
+}
+
 pub fn main() {
     let args = os::args();
 
index ed069b5ed56033bd9c0bc751ad3df7fcfe6a0766..1a475879fc10bf4cf8ab2ccc5f318bf7dc58a65a 100644 (file)
@@ -19,6 +19,8 @@
 use fold;
 use pass::Pass;
 
+use core::str;
+
 pub fn mk_pass() -> Pass {
     Pass {
         name: ~"sectionalize",
@@ -170,6 +172,9 @@ mod test {
     use extract;
     use sectionalize_pass::run;
 
+    use core::str;
+    use core::vec;
+
     fn mk_doc(source: ~str) -> doc::Doc {
         do astsrv::from_str(copy source) |srv| {
             let doc = extract::from_srv(srv.clone(), ~"");
index 61f66c43521a8937c5dbf3c876ee1eb66347f7c0..7e5444af05ceddb1af18d9845655ee81a0297fd0 100644 (file)
@@ -149,6 +149,8 @@ mod test {
     use sectionalize_pass;
     use text_pass::mk_pass;
 
+    use core::str;
+
     fn mk_doc(source: ~str) -> doc::Doc {
         do astsrv::from_str(copy source) |srv| {
             let doc = extract::from_srv(srv.clone(), ~"");
index 716784c51c513db9cec00664094ac254ad28b539..57a45d3dcc26b15489c176bfdfdcafc6a748081c 100644 (file)
@@ -21,6 +21,7 @@
 use fold;
 use pass::Pass;
 
+use core::vec;
 use syntax::ast;
 use syntax::print::pprust;
 use syntax::ast_map;
index ef34de113cfc55b78037d55b32b63fe8f1311698..e78edf1fbf3d63774ddcddb5b57dc35c62612065 100644 (file)
 
 use core::prelude::*;
 
+use core::str;
+use core::task;
+use core::uint;
+use core::vec;
 use pass::Pass;
 use text_pass;
 
index 9486d9d1ffcd309ecdb01793e2ea35b317921272..d17379a2193b5f702f505592585ed63235764e36 100644 (file)
@@ -223,7 +223,7 @@ fn compile_crate(src_filename: ~str, binary: ~str) -> Option<bool> {
             None => { },
         }
         if (should_compile) {
-            io::println(fmt!("compiling %s...", src_filename));
+            println(fmt!("compiling %s...", src_filename));
             driver::compile_upto(sess, cfg, &input, driver::cu_everything,
                                  Some(outputs));
             true
@@ -271,7 +271,7 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
             //rl::clear();
         }
         ~"help" => {
-            io::println(
+            println(
                 ~":{\\n ..lines.. \\n:}\\n - execute multiline command\n" +
                 ":load <crate> ... - \
                   loads given crates as dynamic libraries\n" +
@@ -305,9 +305,9 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
                 }
             }
             if loaded_crates.is_empty() {
-                io::println("no crates loaded");
+                println("no crates loaded");
             } else {
-                io::println(fmt!("crates loaded: %s",
+                println(fmt!("crates loaded: %s",
                                  str::connect(loaded_crates, ", ")));
             }
         }
@@ -328,7 +328,7 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
             }
             action = action_run_line(multiline_cmd);
         }
-        _ => io::println(~"unknown cmd: " + cmd)
+        _ => println(~"unknown cmd: " + cmd)
     }
     return action;
 }
@@ -394,9 +394,9 @@ pub fn main() {
 
     // only print this stuff if the user is actually typing into rusti
     if istty {
-        io::println("WARNING: The Rust REPL is experimental and may be");
-        io::println("unstable. If you encounter problems, please use the");
-        io::println("compiler instead. Type :help for help.");
+        println("WARNING: The Rust REPL is experimental and may be");
+        println("unstable. If you encounter problems, please use the");
+        println("compiler instead. Type :help for help.");
 
         unsafe {
             do rl::complete |line, suggest| {
@@ -416,7 +416,7 @@ pub fn main() {
             Some(line) => {
                 if line.is_empty() {
                     if istty {
-                        io::println("()");
+                        println("()");
                     }
                     loop;
                 }
index 9c3026f0915cde12c1cc978d9d21f5ff9440d7da..664e5e3b246397a72b36e2b9f1fef4bac03a550c 100644 (file)
@@ -26,5 +26,5 @@
 extern mod std;
 
 fn print<T>(result: T) {
-    io::println(fmt!("%?", result));
+    println(fmt!("%?", result));
 }
index 700b3338a3a22faee149ecf4d4d72a3f934e1692..2fca04196293647de3ad99087e3f3d2243bdffdd 100644 (file)
 // rustpkg utilities having to do with paths and directories
 
 use core::prelude::*;
+
 pub use util::{PkgId, RemotePath, LocalPath};
+pub use util::{normalize, OutputType, Main, Lib, Bench, Test};
 use core::libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR};
 use core::os::mkdir_recursive;
-pub use util::{normalize, OutputType, Main, Lib, Bench, Test};
+use core::os;
 
 /// Returns the value of RUST_PATH, as a list
 /// of Paths. In general this should be read from the
index ae4bfc6bc4b5e9669a87ce8151d8e25b6aa61014..6b560541e52bc62527648d3a2d1d0abbeb1c3ca7 100644 (file)
@@ -21,7 +21,7 @@
 #[no_std];
 
 extern mod core(name = "std");
-extern mod std(name = "extra");
+extern mod extra(name = "extra");
 
 extern mod rustc;
 extern mod syntax;
@@ -32,7 +32,7 @@ pub use core::path::Path;
 use core::hashmap::HashMap;
 use rustc::driver::{driver, session};
 use rustc::metadata::filesearch;
-use std::{getopts};
+use extra::{getopts};
 use syntax::{ast, diagnostic};
 use util::*;
 use path_util::{build_pkg_id_in_workspace, pkgid_src_in_workspace, u_rwx};
@@ -51,6 +51,15 @@ mod workspace;
 
 pub mod usage;
 
+mod std {
+    pub use core::cmp;
+    pub use core::condition;
+    pub use core::os;
+    pub use core::str;
+    pub use core::sys;
+    pub use core::unstable;
+}
+
 /// A PkgScript represents user-supplied custom logic for
 /// special build hooks. This only exists for packages with
 /// an explicit package script.
index 6a69eb71eaf7f2c2648be227738b680ba3796dd2..9499430ef4c20a6ca87aa035f9240a378fd5104c 100644 (file)
 
 use context::Ctx;
 use core::hashmap::HashMap;
+use core::io;
+use core::os;
 use core::prelude::*;
-use std::tempfile::mkdtemp;
+use core::result;
+use extra::tempfile::mkdtemp;
 use util::{PkgId, default_version};
 use path_util::{target_executable_in_workspace, target_library_in_workspace,
                target_test_in_workspace, target_bench_in_workspace,
index 80533b2d3b1c63ecb919f6799c4e5a4125b6c38d..8019b3b8afb00494b012cd9c8ed09015353d29cc 100644 (file)
@@ -15,9 +15,9 @@
 use core::rt::io::Writer;
 use rustc::driver::{driver, session};
 use rustc::metadata::filesearch;
-use std::getopts::groups::getopts;
-use std::semver;
-use std::term;
+use extra::getopts::groups::getopts;
+use extra::semver;
+use extra::term;
 use syntax::ast_util::*;
 use syntax::codemap::{dummy_sp, spanned, dummy_spanned};
 use syntax::ext::base::ExtCtxt;
index 7a41c278fa36c56ea7a1e7fd1214b85acb2a8deb..e3d3642d6c7e958b7b473130d287609501fe6b88 100644 (file)
@@ -282,6 +282,8 @@ mod test {
     use super::*;
     use prelude::*;
 
+    use uint;
+
     #[test]
     fn test() {
         // Some code that could use that, then:
index d1fa9e697bf62ec2f1a49d42834ae76b030c9649..b80d3ae68f890b0913258ac6332a8bdd6f624d5c 100644 (file)
@@ -11,6 +11,7 @@
 //! A mutable, nullable memory location
 
 use cast::transmute_mut;
+use cmp;
 use prelude::*;
 use util::replace;
 
index baa6722b1936e507f22b3f281ab3150eee5fcd25..94b32b6af4c77819c0e78bd1ce892bb6fef8e090 100644 (file)
@@ -10,8 +10,9 @@
 
 /*! Condition handling */
 
-use prelude::*;
 use local_data::{local_data_pop, local_data_set};
+use local_data;
+use prelude::*;
 
 // helper for transmutation, shown below.
 type RustClosure = (int, int);
index 3d5f0fb849356e4e6c0aab6ee3f195b842f92228..85397cbe777996dbc5ba1e5a467097acf1e816d8 100644 (file)
@@ -224,5 +224,8 @@ mod std {
     pub use kinds;
     pub use sys;
     pub use pipes;
+    pub use unstable;
+    pub use str;
+    pub use os;
 }
 
index 7eb2054a35d4c070c46dd210b3cd7042b753f0dc..9828ff4e31742c10f6ffe0588483a7730dbf1e45 100644 (file)
@@ -387,6 +387,8 @@ mod tests {
     use super::*;
     use prelude::*;
 
+    use uint;
+
     #[test]
     fn test_siphash() {
         let vecs : [[u8, ..8], ..64] = [
index 800ce9f05dc75bfca6e9542fd4cf36f44ca7be86..5847034d02601334356e9461852ae7c15327a117 100644 (file)
@@ -257,6 +257,9 @@ mod tests {
     use super::*;
     use prelude::*;
 
+    use int;
+    use uint;
+
     #[test]
     fn test_to_vec() {
         let xs = ~[1, 2, 3];
index a5679e6dbff204d3d76b470f30c1fd2294d0aed5..69bb1b0b766cf1026c754069f1a7208f6dbff329 100644 (file)
 
 */
 
-use prelude::*;
+use cmp;
+use iter;
 use num::{Zero, One};
+use num;
+use prelude::*;
 
 pub trait Iterator<A> {
     /// Advance the iterator and return the next value. Return `None` when the end is reached.
@@ -506,6 +509,9 @@ mod tests {
     use super::*;
     use prelude::*;
 
+    use iter;
+    use uint;
+
     #[test]
     fn test_counter_to_vec() {
         let mut it = Counter::new(0, 5).take(10);
index 2cbf8b9f05ef8e9f29a6020a39549616b1e02996..6227f9ad3888e82ab1d3a5d172e36d8306907bba 100644 (file)
@@ -27,7 +27,9 @@
 */
 
 use prelude::*;
+
 use task::local_data_priv::{local_get, local_pop, local_modify, local_set, Handle};
+use task;
 
 /**
  * Indexes a task-local data slot. The function's code pointer is used for
index b578084268aff3a67e0cca2cbb2a6f80c57ae3b4..64737c47f295d67748448aa9c8bc5504591a8600 100644 (file)
@@ -13,7 +13,9 @@
 use libc::c_int;
 use num::{Zero, One, strconv};
 use num::{FPCategory, FPNaN, FPInfinite , FPZero, FPSubnormal, FPNormal};
+use num;
 use prelude::*;
+use to_str;
 
 pub use cmath::c_float_targ_consts::*;
 
@@ -958,9 +960,12 @@ fn from_str_radix(val: &str, rdx: uint) -> Option<f32> {
 #[cfg(test)]
 mod tests {
     use f32::*;
-    use num::*;
     use prelude::*;
 
+    use num::*;
+    use num;
+    use sys;
+
     #[test]
     fn test_num() {
         num::test_num(10f32, 2f32);
index bca730c574817c4f979cd9e1f426d2ff8fa1be3a..f01d45bbd1db491978739e19690e9ca9ce1babbb 100644 (file)
@@ -13,7 +13,9 @@
 use libc::c_int;
 use num::{Zero, One, strconv};
 use num::{FPCategory, FPNaN, FPInfinite , FPZero, FPSubnormal, FPNormal};
+use num;
 use prelude::*;
+use to_str;
 
 pub use cmath::c_double_targ_consts::*;
 pub use cmp::{min, max};
@@ -999,9 +1001,12 @@ fn from_str_radix(val: &str, rdx: uint) -> Option<f64> {
 #[cfg(test)]
 mod tests {
     use f64::*;
-    use num::*;
     use prelude::*;
 
+    use num::*;
+    use num;
+    use sys;
+
     #[test]
     fn test_num() {
         num::test_num(10f64, 2f64);
index acc5e5a6f39a20d6d33f074cba6c2c1f2235d5b3..30de95b484669d6eb2fbc8571ef99f79d51b3f61 100644 (file)
 
 // PORT this must match in width according to architecture
 
+use f64;
 use libc::c_int;
 use num::{Zero, One, strconv};
 use num::FPCategory;
+use num;
 use prelude::*;
+use to_str;
 
 pub use f64::{add, sub, mul, div, rem, lt, le, eq, ne, ge, gt};
 pub use f64::{acos, asin, atan2, cbrt, ceil, copysign, cosh, floor};
@@ -43,7 +46,7 @@
 pub mod consts {
     // FIXME (requires Issue #1433 to fix): replace with mathematical
     // staticants from cmath.
-    /// Archimedes' staticant
+    /// Archimedes' constant
     pub static pi: float = 3.14159265358979323846264338327950288;
 
     /// pi/2.0
@@ -945,10 +948,13 @@ fn next_after(&self, other: float) -> float {
 
 #[cfg(test)]
 mod tests {
-    use num::*;
     use super::*;
     use prelude::*;
 
+    use num::*;
+    use num;
+    use sys;
+
     #[test]
     fn test_num() {
         num::test_num(10f, 2f);
index 27e872003ecbc87bb014fb9e2476e32e6a42bbad..778e741ff3be359dd59c4e7e85422abb3892a9f7 100644 (file)
@@ -557,6 +557,13 @@ mod tests {
     use super::*;
     use prelude::*;
 
+    use i16;
+    use i32;
+    use i64;
+    use i8;
+    use num;
+    use sys;
+
     #[test]
     fn test_num() {
         num::test_num(10 as $T, 2 as $T);
index e6267bfe9e17e3b8d0147d4990677dd35f8c9c8a..f16b4f4a740b1b2a65dd1e471becd990e95b3ca6 100644 (file)
@@ -402,6 +402,14 @@ mod tests {
     use super::*;
     use prelude::*;
 
+    use num;
+    use sys;
+    use u16;
+    use u32;
+    use u64;
+    use u8;
+    use uint;
+
     #[test]
     fn test_num() {
         num::test_num(10 as $T, 2 as $T);
index 9c8c2dbe4d71c56aeda9697e6e55758f9b1fe306..c1b5c159a24cd6fd8ab2f80e45b0651983e5ea26 100644 (file)
 use libc;
 use libc::{c_char, c_void, c_int, size_t};
 use libc::{mode_t, FILE};
+use local_data;
 use option;
 use option::{Some, None};
+use os;
 use prelude::*;
 use ptr;
 use str;
index 58d0c40efa070db218f04f8e8f96cc5e0a1f9c65..07864ce419e628ae9be5a543279b0cb0a57fe603 100644 (file)
@@ -10,8 +10,7 @@
 
 //! The Rust prelude. Imported into every module by default.
 
-/* Reexported core operators */
-
+// Reexported core operators
 pub use either::{Either, Left, Right};
 pub use kinds::{Const, Copy, Owned};
 pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
 pub use option::{Option, Some, None};
 pub use result::{Result, Ok, Err};
 
-/* Reexported functions */
-
+// Reexported functions
 pub use io::{print, println};
 
-/* Reexported types and traits */
-
+// Reexported types and traits
 pub use clone::{Clone, DeepClone};
 pub use cmp::{Eq, ApproxEq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater, Equiv};
 pub use char::Char;
 pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
 pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
 
-/* Reexported runtime types */
+// Reexported runtime types
 pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};
 pub use task::spawn;
 
-/* Reexported modules */
-
-pub use at_vec;
-pub use bool;
-pub use cast;
-pub use char;
-pub use cmp;
-pub use either;
-pub use f32;
-pub use f64;
-pub use float;
-pub use i16;
-pub use i32;
-pub use i64;
-pub use i8;
-pub use int;
-pub use io;
-pub use iter;
-pub use old_iter;
-pub use libc;
-pub use local_data;
-pub use num;
-pub use ops;
-pub use option;
-pub use os;
-pub use path;
-pub use comm;
-pub use unstable;
-pub use ptr;
-pub use rand;
-pub use result;
-pub use str;
-pub use sys;
-pub use task;
-pub use to_str;
-pub use u16;
-pub use u32;
-pub use u64;
-pub use u8;
-pub use uint;
-pub use vec;
index 38d7095a3663d2f8f16bf5fce3ac63deaaf8c0bb..65375e410a67fbb176ee59a0a5ecafc5b30124fa 100644 (file)
@@ -430,6 +430,11 @@ pub mod ptr_tests {
     use super::*;
     use prelude::*;
 
+    use cast;
+    use libc;
+    use str;
+    use vec;
+
     #[test]
     fn test() {
         unsafe {
@@ -522,18 +527,19 @@ fn test_is_null() {
 
     #[test]
     fn test_to_option() {
-        let p: *int = null();
-        // FIXME (#6641): Usage of unsafe methods in safe code doesn't cause an error.
-        assert_eq!(p.to_option(), None);
+        unsafe {
+            let p: *int = null();
+            assert_eq!(p.to_option(), None);
 
-        let q: *int = &2;
-        assert_eq!(q.to_option().unwrap(), &2);     // FIXME (#6641)
+            let q: *int = &2;
+            assert_eq!(q.to_option().unwrap(), &2);
 
-        let p: *mut int = mut_null();
-        assert_eq!(p.to_option(), None);            // FIXME (#6641)
+            let p: *mut int = mut_null();
+            assert_eq!(p.to_option(), None);
 
-        let q: *mut int = &mut 2;
-        assert_eq!(q.to_option().unwrap(), &2);     // FIXME (#6641)
+            let q: *mut int = &mut 2;
+            assert_eq!(q.to_option().unwrap(), &2);
+        }
     }
 
     #[test]
index 2bcc9c8bba20213afcd8494cf9108d2243d2db53..2c8681ef2883a1b5d73753c438c6c37f2124e4da 100644 (file)
@@ -40,10 +40,13 @@ fn main () {
 ~~~
 */
 
-
+use cast;
+use cmp;
 use int;
+use local_data;
 use prelude::*;
 use str;
+use sys;
 use u32;
 use uint;
 use util;
index 72cff5111e76291e46be9ca60b7b03d682972302..a66e35f68df7dba2d699833c1579b8e4a4659f21 100644 (file)
@@ -20,6 +20,7 @@
 // Generating Random Variables"], but more robust. If one wanted, one
 // could implement VIZIGNOR the ZIGNOR paper for more speed.
 
+use f64;
 use prelude::*;
 use rand::{Rng,Rand};
 
index db2683dc85d837fd88a6c36629a21fe3e552c78d..0a9e0b1e38f23268f2d852002813505b6ef3dfd2 100644 (file)
@@ -100,6 +100,8 @@ mod test {
     use super::super::mem::*;
     use super::super::Decorator;
 
+    use str;
+
     #[test]
     #[ignore]
     fn smoke_test() {
index b2701c1fdc392b9df56b88bf6e90bf73d9116713..bd9cff76e57630754591785c8e1208bb7c541047 100644 (file)
 //! * Should probably have something like this for strings.
 //! * Should they implement Closable? Would take extra state.
 
+use cmp::min;
 use prelude::*;
 use super::*;
-use cmp::min;
+use vec;
 
 /// Writes to an owned, growable byte vector
 pub struct MemWriter {
index cf4967b12b304f5f5950d36f8e277a3a8f216307..12c683120c8da688b05138e5726ec62ea26e0ad4 100644 (file)
 //! local storage, and logging. Even a 'freestanding' Rust would likely want
 //! to implement this.
 
-use prelude::*;
-use libc::{c_void, uintptr_t};
 use cast::transmute;
+use libc::{c_void, uintptr_t};
+use ptr;
+use prelude::*;
 use rt::local::Local;
-use super::local_heap::LocalHeap;
 use rt::logging::StdErrLogger;
+use super::local_heap::LocalHeap;
+use super::sched::Scheduler;
 
 pub struct Task {
     heap: LocalHeap,
index ddc9040d730915da8e2b8e58910355e65da5e5d9..6263fd47df67405236155b3db0d217200bd40eee 100644 (file)
 
 use libc::{size_t, c_int, c_uint, c_void, c_char, uintptr_t};
 use libc::{malloc, free};
+use libc;
 use prelude::*;
+use ptr;
+use str;
+use vec;
 
 pub static UNKNOWN: c_int = -1;
 pub static OK: c_int = 0;
index 3cdc5dcca072348e9322abe68bae1282cbeaace1..7c73aca3af93270655855618c6f866612cb77971 100644 (file)
 //! Process spawning.
 
 use cast;
+use comm::{stream, SharedChan, GenericChan, GenericPort};
+use int;
 use io;
-use libc;
 use libc::{pid_t, c_void, c_int};
-use comm::{stream, SharedChan, GenericChan, GenericPort};
+use libc;
 use option::{Some, None};
 use os;
 use prelude::*;
@@ -463,6 +464,9 @@ fn spawn_process_os(prog: &str, args: &[~str],
     };
     use libc::funcs::extra::msvcrt::get_osfhandle;
 
+    use sys;
+    use uint;
+
     unsafe {
 
         let mut si = zeroed_startupinfo();
@@ -574,6 +578,8 @@ fn zeroed_process_information() -> libc::types::os::arch::extra::PROCESS_INFORMA
 #[cfg(windows)]
 pub fn make_command_line(prog: &str, args: &[~str]) -> ~str {
 
+    use uint;
+
     let mut cmd = ~"";
     append_arg(&mut cmd, prog);
     for args.each |arg| {
index f24d2327358bebcb3d4864cf6450926e1ef69fb6..9c9a91f9548565c19a3d93cb10c852b5e069078d 100644 (file)
  * ~~~
  */
 
+use prelude::*;
+
+use cast;
 use cell::Cell;
 use cmp::Eq;
-use result::Result;
 use comm::{stream, Chan, GenericChan, GenericPort, Port};
-use prelude::*;
+use comm;
+use ptr;
+use result::Result;
 use result;
+use rt::{context, OldTaskContext};
 use task::rt::{task_id, sched_id};
-use util;
-use util::replace;
+use task;
 use unstable::finally::Finally;
-use rt::{context, OldTaskContext};
+use util::replace;
+use util;
 
 #[cfg(test)] use comm::SharedChan;
 
index 56b1fb43ff1c07ee2d2e893e768f3e273f2b0a4e..0b345b88d626196219454945807c5a1074b3f391 100644 (file)
 
 #[doc(hidden)];
 
+use prelude::*;
+
 use cast::transmute;
 use cast;
 use cell::Cell;
 use container::Map;
 use comm::{Chan, GenericChan};
-use prelude::*;
+use comm;
 use ptr;
 use hashmap::HashSet;
 use task::local_data_priv::{local_get, local_set, OldHandle};
@@ -87,6 +89,7 @@
 use task::{Success, TaskOpts, TaskResult, ThreadPerCore, ThreadPerTask};
 use task::{ExistingScheduler, SchedulerHandle};
 use task::unkillable;
+use task;
 use uint;
 use util;
 use unstable::sync::{Exclusive, exclusive};
index 13b892e700e1babf558226e1209dee8da97527a3..1490841b7e6510794b984126d383055ebb8160c5 100644 (file)
 
 //! An ordered map and set for integer keys implemented as a radix trie
 
+use local_data;
+use os;
 use prelude::*;
+use uint;
 use util::{swap, replace};
+use vec;
 
 // FIXME: #5244: need to manually update the TrieNode constructor
 static SHIFT: uint = 4;
index afdc22a1c63e9c537bad3ddf13fc7895b23fb7a6..1f73aa02b017b84df2a6a852aeabf4de7f50a4ae 100644 (file)
 
 #[doc(hidden)];
 
-use libc;
 use comm::{GenericChan, GenericPort};
+use comm;
+use libc;
 use prelude::*;
+use ptr;
 use task;
 
 pub mod at_exit;
index 734368c70c4a0342426a29a0228f043d5c2ea438..bee317a0b930e805665e308a2c28d0c0d9dce2df 100644 (file)
@@ -214,48 +214,52 @@ mod tests {
 
     #[test]
     fn exclusive_arc() {
-        let mut futures = ~[];
+        unsafe {
+            let mut futures = ~[];
 
-        let num_tasks = 10;
-        let count = 10;
+            let num_tasks = 10;
+            let count = 10;
 
-        let total = exclusive(~0);
+            let total = exclusive(~0);
 
-        for uint::range(0, num_tasks) |_i| {
-            let total = total.clone();
-            let (port, chan) = comm::stream();
-            futures.push(port);
+            for uint::range(0, num_tasks) |_i| {
+                let total = total.clone();
+                let (port, chan) = comm::stream();
+                futures.push(port);
 
-            do task::spawn || {
-                for uint::range(0, count) |_i| {
-                    do total.with |count| {
-                        **count += 1;
+                do task::spawn || {
+                    for uint::range(0, count) |_i| {
+                        do total.with |count| {
+                            **count += 1;
+                        }
                     }
+                    chan.send(());
                 }
-                chan.send(());
-            }
-        };
+            };
 
-        for futures.each |f| { f.recv() }
+            for futures.each |f| { f.recv() }
 
-        do total.with |total| {
-            assert!(**total == num_tasks * count)
-        };
+            do total.with |total| {
+                assert!(**total == num_tasks * count)
+            };
+        }
     }
 
     #[test] #[should_fail] #[ignore(cfg(windows))]
     fn exclusive_poison() {
-        // Tests that if one task fails inside of an exclusive, subsequent
-        // accesses will also fail.
-        let x = exclusive(1);
-        let x2 = x.clone();
-        do task::try || {
-            do x2.with |one| {
-                assert_eq!(*one, 2);
+        unsafe {
+            // Tests that if one task fails inside of an exclusive, subsequent
+            // accesses will also fail.
+            let x = exclusive(1);
+            let x2 = x.clone();
+            do task::try || {
+                do x2.with |one| {
+                    assert_eq!(*one, 2);
+                }
+            };
+            do x.with |one| {
+                assert_eq!(*one, 1);
             }
-        };
-        do x.with |one| {
-            assert_eq!(*one, 1);
         }
     }
 }
index 9e7f18f446d08056ac23cd276cd71d55e1a848ae..5539881a6481f00778bb9ff3930dae864ecc8da4 100644 (file)
@@ -8,12 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/*!
-
-Miscellaneous helpers for common patterns.
-
-*/
+//! Miscellaneous helpers for common patterns.
 
+use cast;
+use local_data;
+use ptr;
 use prelude::*;
 use unstable::intrinsics;
 
index 2d4bc9a8c49fa043bdaee6422271f112f8145f34..2b8d8cb3d31dbcf25b7b48ec2a61b3fec19a45ab 100644 (file)
@@ -10,6 +10,7 @@
 
 use core::prelude::*;
 
+use core::str;
 use core::to_bytes;
 
 #[deriving(Eq)]
index e3ef56541b8fbaaa1c8e67dcca8d0630b7a58e08..48c2df5a894e6025e7b2f91a61d18487d3b8a533 100644 (file)
 use visit;
 use syntax::parse::token::special_idents;
 
+use core::cmp;
 use core::hashmap::HashMap;
+use core::str;
+use core::vec;
 
 pub enum path_elt {
     path_mod(ident),
index ba56d544880683ddfd54abb1bb19eb59089532ba..c8cac4ba2d77b81e95374d5dc0ed7c2945a1d673 100644 (file)
 use ast;
 use ast_util;
 use codemap::{span, spanned};
+use opt_vec;
 use parse::token;
 use visit;
-use opt_vec;
-use core::hashmap::HashMap;
 
+use core::hashmap::HashMap;
+use core::int;
+use core::option;
+use core::str;
 use core::to_bytes;
 
 pub fn path_name_i(idents: &[ident], intr: @token::ident_interner) -> ~str {
index 6ac743d3844d25099af102ce175cbcb7fa6f6039..2da64563159ed72f7a4ff3c689409d90e1ec9793 100644 (file)
@@ -20,6 +20,7 @@
 use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
 
 use core::hashmap::HashSet;
+use core::vec;
 use extra;
 
 /* Constructors */
index 42117e3b73cf349864af6c7e1441f1ec9f583c78..aedf30127ad49f8220415aae652dc7eb67b43d7c 100644 (file)
 
 use core::prelude::*;
 
+use core::cmp;
+use core::str;
 use core::to_bytes;
+use core::uint;
 use extra::serialize::{Encodable, Decodable, Encoder, Decoder};
 
 pub trait Pos {
index 0057579c9b7ee5a0ad6e44acde6f753000f84412..76ede098ac34dbed32ba8e312a5e0e4ac1b91d34 100644 (file)
 use codemap::{Pos, span};
 use codemap;
 
+use core::io;
+use core::str;
+use core::uint;
+use core::vec;
 use extra::term;
 
 pub type Emitter = @fn(cmsp: Option<(@codemap::CodeMap, span)>,
index 05ac87adcc53b9bfc696e1ca8f315a7a969cb838..874c10fae5fce14f4fe587017a74988f36751759 100644 (file)
@@ -21,6 +21,9 @@
 use parse;
 use parse::token;
 
+use core::str;
+use core::vec;
+
 enum State {
     Asm,
     Outputs,
index 311636ee7c14884c504103453d015b3e5d4cfd14..a9b12c16b31181259539d4ac4b8776a17e1b1bc5 100644 (file)
@@ -20,6 +20,7 @@
 use parse::token;
 
 use core::hashmap::HashMap;
+use core::vec;
 
 // new-style macro! tt code:
 //
index d1f1c4187d52e525b69edd70acfb4a8cc1b1357f..4ae4533956e95a93640c31457aea89d124ffb7c3 100644 (file)
 
 use core::prelude::*;
 
-use ast;
 use ast::*;
+use ast;
+use ast_util;
+use codemap::{span, spanned};
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
 use ext::deriving::*;
-use codemap::{span, spanned};
-use ast_util;
 use opt_vec;
 
+use core::uint;
+
 pub fn expand_deriving_decodable(
     cx: @ExtCtxt,
     span: span,
index e250f970e62f50724f2a8d16c2990151fdb9924c..d4b3488cc4f9fbce92f67037fca8771fd6ae899a 100644 (file)
@@ -173,6 +173,9 @@ fn eq(&self, other: &int) -> bool {
 use codemap::{span,respan};
 use opt_vec;
 
+use core::uint;
+use core::vec;
+
 pub use self::ty::*;
 mod ty;
 
index 401b91227fc0d94cc60a7ece4040c96e8e56c864..64ce6dfbc196808a71979c782010fd13055308f6 100644 (file)
@@ -16,6 +16,8 @@
 use ext::build::AstBuilder;
 use ext::deriving::generic::*;
 
+use core::vec;
+
 pub fn expand_deriving_iter_bytes(cx: @ExtCtxt,
                                   span: span,
                                   mitem: @meta_item,
index 3159b6db0af39c7f710d90ee45d5b478af7548bb..796ccd304ff868cca16c0ea8e15fcf320c21d93a 100644 (file)
@@ -28,6 +28,9 @@
 use parse::token::special_idents::clownshoes_extensions;
 use opt_vec;
 
+use core::uint;
+use core::vec;
+
 pub mod clone;
 pub mod iter_bytes;
 pub mod encodable;
index d62e4972fd1fdfbbc878b4970186e8d2838f081b..b2e039786ad7ebce083f22317caee3fbe0f6baf6 100644 (file)
@@ -17,6 +17,8 @@
 use ext::build::{AstBuilder, Duplicate};
 use ext::deriving::generic::*;
 
+use core::vec;
+
 pub fn expand_deriving_rand(cx: @ExtCtxt,
                             span: span,
                             mitem: @meta_item,
index 3e5fb939f62411372a21848d211b153c06c00a4e..4d074b4d0e644addeecf6ba5bfe188bb4aaf819d 100644 (file)
@@ -22,6 +22,8 @@
 use ext::base;
 use ext::build::AstBuilder;
 
+use core::os;
+
 pub fn expand_syntax_ext(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
     -> base::MacResult {
 
index 7fa235fc334b82aa8ef0bb383f6f6026e8b88b51..89ed9b7294d3f8c9dba34dff91ff3453cc880345 100644 (file)
@@ -24,6 +24,8 @@
 use parse;
 use parse::{parse_item_from_source_str};
 
+use core::vec;
+
 pub fn expand_expr(extsbox: @mut SyntaxEnv,
                    cx: @ExtCtxt,
                    e: &expr_,
index 2efed5780b47cc3ad14bfc36c75ec22d782bec2b..65b29ecaa91f7162b444797fbf1cdf6376929551 100644 (file)
@@ -22,7 +22,9 @@
 use ext::base;
 use ext::build::AstBuilder;
 
+use core::option;
 use core::unstable::extfmt::ct::*;
+use core::vec;
 
 pub fn expand_syntax_ext(cx: @ExtCtxt, sp: span, tts: &[ast::token_tree])
     -> base::MacResult {
@@ -52,8 +54,11 @@ fn pieces_to_expr(cx: @ExtCtxt, sp: span,
    -> @ast::expr {
     fn make_path_vec(cx: @ExtCtxt, ident: &str) -> ~[ast::ident] {
         let intr = cx.parse_sess().interner;
-        return ~[intr.intern("unstable"), intr.intern("extfmt"),
-                 intr.intern("rt"), intr.intern(ident)];
+        return ~[intr.intern("std"),
+                 intr.intern("unstable"),
+                 intr.intern("extfmt"),
+                 intr.intern("rt"),
+                 intr.intern(ident)];
     }
     fn make_rt_path_expr(cx: @ExtCtxt, sp: span, nm: &str) -> @ast::expr {
         let path = make_path_vec(cx, nm);
@@ -252,6 +257,7 @@ fn log_conv(c: &Conv) {
     /* 'ident' is the local buffer building up the result of fmt! */
     let ident = cx.parse_sess().interner.intern("__fmtbuf");
     let buf = || cx.expr_ident(fmt_sp, ident);
+    let core_ident = cx.parse_sess().interner.intern("std");
     let str_ident = cx.parse_sess().interner.intern("str");
     let push_ident = cx.parse_sess().interner.intern("push_str");
     let mut stms = ~[];
@@ -273,7 +279,9 @@ fn log_conv(c: &Conv) {
                 } else {
                     let args = ~[cx.expr_mut_addr_of(fmt_sp, buf()), cx.expr_str(fmt_sp, s)];
                     let call = cx.expr_call_global(fmt_sp,
-                                                   ~[str_ident, push_ident],
+                                                   ~[core_ident,
+                                                     str_ident,
+                                                     push_ident],
                                                    args);
                     stms.push(cx.stmt_expr(call));
                 }
index 423ade835a07523370dfb7899a6222efc04d6a19..95cf4a18ab4fbabf427fbcc2c17dceb3ec400283 100644 (file)
@@ -16,6 +16,9 @@
 use ext::base;
 use print;
 
+use core::io;
+use core::vec;
+
 pub fn expand_syntax_ext(cx: @ExtCtxt,
                          sp: codemap::span,
                          tt: &[ast::token_tree])
index da59059a0cc4104b45c1bd51cad63eb4901a6613..37d5e0206cb02e5628db3e6d2415b635c919b546 100644 (file)
@@ -19,6 +19,9 @@
 use ast;
 use codemap::span;
 
+use core::str;
+use core::vec;
+
 // Transitional reexports so qquote can find the paths it is looking for
 mod syntax {
     pub use ext;
index f1f5a7f12b2682a03c9bf9e6eabeae30f2ae8801..43bcb68b8e08f7e38703f1d384990fcee0e380e9 100644 (file)
@@ -42,6 +42,7 @@
 use ext::base::ExtCtxt;
 use ext::pipes::proto::{protocol_};
 
+use core::str;
 use extra::bitv::Bitv;
 
 pub fn analyze(proto: @mut protocol_, _cx: @ExtCtxt) {
index e55ecbc29bca2e020d4f79d29714e61f25476cd1..db0efdd7b0fff6f7ee634d572a74157e07949046 100644 (file)
@@ -23,6 +23,9 @@
 use opt_vec;
 use opt_vec::OptVec;
 
+use core::str;
+use core::vec;
+
 pub trait gen_send {
     fn gen_send(&mut self, cx: @ExtCtxt, try: bool) -> @ast::item;
     fn to_ty(&mut self, cx: @ExtCtxt) -> @ast::Ty;
index 9a5645a5b0cab96ac14d5a9bf34fefd22d849877..9182b99bf301ef64464901cff9073369cc4cb871 100644 (file)
@@ -19,6 +19,8 @@
 use parse::token;
 use parse;
 
+use core::vec;
+
 /**
 *
 * Quasiquoting works via token trees.
index 73b84c2a5ab9a5963e441e0f4ef7138eb618e966..8a60b239b8904d616fd49e68489eaf5922cca3b0 100644 (file)
 use parse;
 use print::pprust;
 
+use core::io;
+use core::result;
+use core::str;
+use core::vec;
+
 // These macros all relate to the file system; they either return
 // the column/row/filename of the expression, or they include
 // a given file into the current one.
index f899004de5c5fd32698fc9440cfd69f2b749bd4d..111e176d4c5ca6d3c5c66e4715d4fa8ffcc4789c 100644 (file)
@@ -18,6 +18,8 @@
 use parse::parser::Parser;
 use parse::token::keywords;
 
+use core::vec;
+
 pub fn expand_trace_macros(cx: @ExtCtxt,
                            sp: span,
                            tt: &[ast::token_tree])
index be79722373bda1fbb8737c9208a17ef5ecfb2da0..183bc2a77c502e17e4b5b2f875c43a01a5f0e52c 100644 (file)
@@ -23,6 +23,9 @@
 use parse::token;
 
 use core::hashmap::HashMap;
+use core::str;
+use core::uint;
+use core::vec;
 
 /* This is an Earley-like parser, without support for in-grammar nonterminals,
 only by calling out to the main rust parser for named nonterminals (which it
index 04ac311579fed1f0df8bf84133d475c17e6c1862..261943132b32e544665a2ccba83c9434872843a6 100644 (file)
@@ -26,6 +26,7 @@
 use print;
 
 use core::io;
+use core::vec;
 
 pub fn add_new_extension(cx: @ExtCtxt,
                          sp: span,
index 3e63360fbec6900e3936f05754aef69c978d57ca..cac963727e3dc1e776e5ce1ee6a64cdd33a87d6c 100644 (file)
@@ -19,6 +19,8 @@
 use parse::lexer::TokenAndSpan;
 
 use core::hashmap::HashMap;
+use core::option;
+use core::vec;
 
 ///an unzipping of `token_tree`s
 struct TtFrame {
index 0d863c736edcb3b977ba6a6c5620da1f9e2bfcc6..27a10c36eadd36c2ca7966334c58b22ae35751a7 100644 (file)
@@ -15,6 +15,8 @@
 use codemap::{span, spanned};
 use opt_vec::OptVec;
 
+use core::vec;
+
 pub trait ast_fold {
     fn fold_crate(@self, &crate) -> crate;
     fn fold_view_item(@self, @view_item) -> @view_item;
index 3fa0fa3b0f06cf66038de0cacc36898424284aa3..001a693d1aed413f2c5d9e77eda7d19c26f2e501 100644 (file)
 use parse::token;
 use parse;
 
+use core::io;
+use core::str;
+use core::uint;
+
 #[deriving(Eq)]
 pub enum cmnt_style {
     isolated, // No code on either side of each line of the comment
index eabe664d8ef6244f6193c5c29b8c47697d292074..4a9ef2faa549e9f6d19bd041da0bd3c5851ce00d 100644 (file)
 use ext::tt::transcribe::{dup_tt_reader};
 use parse::token;
 
+use core::char;
+use core::either;
+use core::str;
+use core::u64;
+
 pub use ext::tt::transcribe::{TtReader, new_tt_reader};
 
 pub trait reader {
index 9a8001386abd84a757ac0eed0e80a26e132f0d3f..085d24d7e68b156aa46de5df8d2dda6ea573e2aa 100644 (file)
@@ -26,6 +26,7 @@
 use parse::token::{keywords, Token};
 use parse::token;
 
+use core::str;
 use core::to_bytes;
 
 /// The specific types of unsupported syntax
index de93bb3712ba19af0cc71febc0cd366fc5d45220..27dfc2c0a46d1708f137af0ff962ce4c7da8f746 100644 (file)
 use opt_vec;
 use opt_vec::OptVec;
 
+use core::char;
 use core::either::Either;
 use core::either;
 use core::hashmap::HashSet;
+use core::str;
 use core::vec;
 
 #[deriving(Eq)]
index a4b3783f22d2e43896625b5423f3ab146b6aa1e3..b1a385ada0734efd82ff3623e5c28aefab92bb6f 100644 (file)
 use util::interner::StrInterner;
 use util::interner;
 
+use core::cast;
+use core::char;
 use core::cmp::Equiv;
+use core::hashmap::HashSet;
+use core::local_data;
+use core::str;
 use core::to_bytes;
+use core::vec;
 
 #[deriving(Encodable, Decodable, Eq)]
 pub enum binop {
index d3b5c751e695dbaef73f8c88c376a5ecf795fb30..11830dc3c2908d9960f8b4196e2edf2ad33f473b 100644 (file)
@@ -63,6 +63,9 @@
 
 use core::prelude::*;
 
+use core::io;
+use core::vec;
+
 #[deriving(Eq)]
 pub enum breaks { consistent, inconsistent, }
 
index 5f814cc3576d2fe1a32cccf7a7169ea2b4254465..6a32e5352959e2baaf5dfed6c248ab95862f4813 100644 (file)
 use print::pp;
 use print::pprust;
 
+use core::char;
+use core::io;
+use core::str;
+use core::u64;
+use core::uint;
+use core::vec;
+
 // The @ps is stored here to prevent recursive type.
 pub enum ann_node<'self> {
     node_block(@ps, &'self ast::blk),
index cb1c2269c1e0accefd959ea6dc24a7a0fc33b741..78fbcab213c81d62ed56da7f31b34bd181a882de 100644 (file)
@@ -35,6 +35,12 @@ extern mod std(name = "extra");
 #[cfg(not(stage0))]
 extern mod std(name = "std");
 
+// For bootstrapping purposes.
+#[cfg(stage0)]
+pub use core::str;
+#[cfg(stage0)]
+pub use core::unstable;
+
 use core::prelude::*;
 
 pub mod util {
index bccbb8173aad1d388606aa0b48604f06cee49ca0..77f257ea4f52c32037c3f444b852de4bf843eacf 100644 (file)
        vers = "0.1")];
 
 #[crate_type = "lib"];
+
+use std::libc;
+
 extern {
-  fn rust_get_argc() -> libc::c_int;
+    pub fn rust_get_argc() -> libc::c_int;
 }
+
index 13cc27e0e278501e1791248b16f2bba943bf0c50..e58b28aa3ded1fd9e1ea845d2c3cdd608639f22f 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::comm::*;
+use std::task;
 
 pub fn foo<T:Owned + Copy>(x: T) -> Port<T> {
     let (p, c) = stream();
index c04cdbcab1adbd24b25b3f6a298f75d8da4508c5..10dedc12399d11f2580774250881ea564ef8003a 100644 (file)
@@ -9,6 +9,8 @@
 // except according to those terms.
 
 pub mod kitties {
+    use std::uint;
+
     pub struct cat {
         priv meows : uint,
         how_hungry : int,
index 058cb53f9186b73880d6bbea765518309de40811..be65cadcc7f803a611a73cf774b23a3637afe873 100644 (file)
@@ -20,6 +20,6 @@ pub struct Bar {
 impl Foo for Bar {
     #[inline(always)]
     fn f(&self) {
-        io::println((*self).x);
+        println((*self).x);
     }
 }
index 3c81c787a09a2155187677da3815f479b759f3b2..ba9091ce0e5bf5b3df0dd215e9a333f807eb7b12 100644 (file)
 
 #[crate_type = "lib"];
 
+use std::libc;
+
 pub mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index fe5b9e45593e387a735739173df7a0250d44124b..f8b2c2f458afbd0484905204ec26aa48b03ab0b5 100644 (file)
@@ -11,6 +11,8 @@
 #[link(name="foreign_lib", vers="0.0")];
 
 pub mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_get_argc() -> libc::c_int;
     }
index 36343d42b7589390871ceb8c4e4d3305f3d0f6d1..ce40afff3ae3d3c7754f139bb8060302c43b5990 100644 (file)
@@ -12,6 +12,8 @@
 #[crate_type = "lib"];
 
 pub mod socket {
+    use std::libc;
+
     pub struct socket_handle {
         sockfd: libc::c_int,
     }
index 857593a84d2c01f342286357470bd0b0ea53a583..b3a9b3e1ee9ac66e583179093ea5012578d9f25e 100644 (file)
@@ -16,7 +16,7 @@ pub struct S {
 
 impl Drop for S {
     fn finalize(&self) {
-        io::println("goodbye");
+        println("goodbye");
     }
 }
 
index 2ecd318db3c9261dc3bf1fa189d6849a56a0abe9..b5b338531294929104e2f46b5076d53dac0ac146 100644 (file)
@@ -13,6 +13,8 @@
 
 #[crate_type = "lib"];
 
+use std::int;
+
 pub trait read {
     fn readMaybe(s: ~str) -> Option<Self>;
 }
index 7904041ea3cb3911088476821085a3f9132bdfaf..fd1110abb224a00f1a6ca055e424ff3908d221a5 100644 (file)
 
 extern mod extra;
 
-use std::io;
 use extra::time;
 use extra::treemap::TreeMap;
 use std::hashmap::{HashMap, HashSet};
-use std::trie::TrieMap;
+use std::io;
+use std::os;
 use std::rand::Rng;
+use std::trie::TrieMap;
+use std::uint;
+use std::vec;
 
 fn timed(label: &str, f: &fn()) {
     let start = time::precise_time_s();
index 86215e609eea24b5cfc5250a5f7ca2ad19414382..5281c1b863c6ae80a7ddf357fb5b59c89d523d64 100644 (file)
@@ -9,9 +9,14 @@
 // except according to those terms.
 
 extern mod extra;
-use std::hashmap::HashSet;
+
 use extra::bitv::BitvSet;
 use extra::treemap::TreeSet;
+use std::hashmap::HashSet;
+use std::io;
+use std::os;
+use std::rand;
+use std::uint;
 
 struct Results {
     sequential_ints: float,
index 024d4a0289779a544c388b0b5374a2041e121505..287daf68effbef8080bde5e180adc529ef9e0c3e 100644 (file)
 extern mod extra;
 
 use extra::time::precise_time_s;
+use std::int;
+use std::io;
+use std::os;
 use std::rand::RngUtil;
+use std::rand;
+use std::result;
+use std::uint;
 use std::util;
+use std::vec;
 
 macro_rules! bench (
     ($id:ident) => (maybe_run_test(argv, stringify!($id).to_owned(), $id))
index c637fcbaf50f43e3cdc9443bc67d8de79e4d381e..cbf73d5c0594f4f98a7bb9e882ea328d4dd01bef 100644 (file)
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::os;
+use std::uint;
+
 fn main() {
     let args = os::args();
     let args = if os::getenv(~"RUST_BENCH").is_some() {
index 06c8d0c145bf438e7451a31a162d1b4f13a9d305..38cc31273430222cbb50f276bc8fc935a3d51fff 100644 (file)
 use extra::par;
 use std::hashmap::HashSet;
 use std::int::abs;
+use std::io;
+use std::os;
 use std::rand::RngUtil;
+use std::rand;
+use std::uint;
+use std::vec;
 
 type node_id = i64;
 type graph = ~[~[node_id]];
index e041f60705758bbbc7eeefcc5d8989c7f0934094..9fbc1d4590de4a80269be7d86767fc49b004ba89 100644 (file)
 // version.
 
 extern mod extra;
-use std::io::Writer;
-use std::io::WriterUtil;
 
 use std::comm::{Port, Chan, SharedChan};
+use std::comm;
+use std::io::{Writer, WriterUtil};
+use std::io;
+use std::os;
+use std::task;
+use std::ptr;
+use std::uint;
+use std::vec;
 
 macro_rules! move_out (
     { $x:expr } => { unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } }
index a854de0a828f7bd14b8e491e532e1e7b83997f06..2663bb266706d6529e482dc1c2d185d3d29e8bfa 100644 (file)
 // I *think* it's the same, more or less.
 
 extern mod extra;
-use std::io::Writer;
-use std::io::WriterUtil;
 
 use std::comm::{Port, PortSet, Chan, stream};
+use std::io::{Writer, WriterUtil};
+use std::io;
+use std::os;
+use std::ptr;
+use std::task;
+use std::uint;
+use std::vec;
 
 macro_rules! move_out (
     { $x:expr } => { unsafe { let y = *ptr::to_unsafe_ptr(&($x)); y } }
index ffca59e3e8fd4c27fe328db8afd85ee1fe5d8104..3d3a6a68beb39f483f646300f1372c339b47c003 100644 (file)
 // This also serves as a pipes test, because ARCs are implemented with pipes.
 
 extern mod extra;
-use extra::time;
+
 use extra::arc;
 use extra::future;
+use extra::time;
 use std::cell::Cell;
+use std::io;
+use std::os;
+use std::uint;
+use std::vec;
 
 // A poor man's pipe.
 type pipe = arc::MutexARC<~[uint]>;
 
 fn send(p: &pipe, msg: uint) {
-    do p.access_cond |state, cond| {
-        state.push(msg);
-        cond.signal();
+    unsafe {
+        do p.access_cond |state, cond| {
+            state.push(msg);
+            cond.signal();
+        }
     }
 }
 fn recv(p: &pipe) -> uint {
-    do p.access_cond |state, cond| {
-        while vec::is_empty(*state) {
-            cond.wait();
+    unsafe {
+        do p.access_cond |state, cond| {
+            while vec::is_empty(*state) {
+                cond.wait();
+            }
+            state.pop()
         }
-        state.pop()
     }
 }
 
index 7b6e94fa10b3e3b38c8d040cb4934d0751aa2dbb..21753f5f33191fc41f4c23327f9ea81544db7e7d 100644 (file)
 
 extern mod extra;
 
+use extra::future;
+use extra::time;
 use std::cell::Cell;
+use std::io;
+use std::os;
 use std::pipes::recv;
+use std::ptr;
+use std::uint;
 use std::util;
-use extra::time;
-use extra::future;
 
 proto! ring (
     num:send {
index 78f7c02a40bbda5922d068fb468d65f9ad251539..46ca59f2d31592730d2f33337d51fa156db037b6 100644 (file)
 
 extern mod extra;
 
-use std::cell::Cell;
-use extra::time;
 use extra::arc;
 use extra::future;
+use extra::time;
+use std::cell::Cell;
+use std::io;
+use std::os;
+use std::uint;
+use std::vec;
 
 // A poor man's pipe.
 type pipe = arc::RWARC<~[uint]>;
index cf1eae3d37b07c52e50c3e64cee7389b94f07ff3..8f39ae62f9e39a56c888747052e4bd369dc783f4 100644 (file)
@@ -1,6 +1,10 @@
 // Perlin noise benchmark from https://gist.github.com/1170424
 
+use std::f32;
+use std::float;
+use std::int;
 use std::rand::{Rng, RngUtil};
+use std::rand;
 
 struct Vec2 {
     x: f32,
index 970a970feb1598bc6be0b852e3b31423d7e3d718..382de68ba5776216d020f27008fbf3599eadd31c 100644 (file)
 
 extern mod extra;
 
+use extra::time::precise_time_s;
 use std::cell::Cell;
+use std::io;
+use std::os;
 use std::pipes::*;
-use extra::time::precise_time_s;
+use std::task;
 
 proto! pingpong (
     ping: send {
index 4a81130567927b0ee674edcc4039cc0da53d2e1c..51fec4dbfe8b685d8ed117b869e89078f79a0b54 100644 (file)
 
 extern mod extra;
 
+use std::int;
+use std::io;
+use std::os;
+
 fn ack(m: int, n: int) -> int {
     if m == 0 {
         return n + 1
index 0ccb9a16adae65cf7c47562a39c25bbd6e338b03..58b8a9cd47bb0e7eeec98ac26131e11e2c97ad3e 100644 (file)
 // chameneos
 
 extern mod extra;
+
 use extra::sort;
 use std::cell::Cell;
 use std::comm::*;
+use std::io;
+use std::option;
+use std::os;
+use std::task;
+use std::uint;
+use std::vec;
 
 fn print_complements() {
     let all = ~[Blue, Red, Yellow];
index a65bfe228b2d5892535c31a9c8e4d09f5d039ea1..1dd346a28135bbbb0bc07a961e6a83c11544ec1f 100644 (file)
@@ -1,6 +1,8 @@
 use std::from_str::FromStr;
 use std::i32::range;
+use std::os;
 use std::vec::MutableVector;
+use std::vec;
 
 fn max(a: i32, b: i32) -> i32 {
     if a > b {
index 840f6fdb17bdc52d2e149d8209f8d91247e8eee0..9ea58d9970d62289fefe0c5839e5dc63685d4b27 100644 (file)
@@ -1,8 +1,11 @@
 use std::cast::transmute;
 use std::from_str::FromStr;
 use std::libc::{FILE, STDOUT_FILENO, c_int, fdopen, fputc, fputs, fwrite, size_t};
+use std::os;
+use std::str;
 use std::uint::{min, range};
 use std::vec::bytes::copy_memory;
+use std::vec;
 
 static LINE_LEN: uint = 60;
 static LOOKUP_SIZE: uint = 4 * 1024;
index f3de8bf01e9a22fb8c0a91956fee57a406605d9f..78a37f06bb93ddbbbad8fa65a3dcfed5db452f4f 100644 (file)
  * http://shootout.alioth.debian.org/
  */
 extern mod extra;
+
+use std::int;
+use std::io;
+use std::option;
+use std::os;
 use std::rand::Rng;
+use std::rand;
+use std::result;
+use std::str;
+use std::uint;
+use std::vec;
 
 fn LINE_LENGTH() -> uint { return 60u; }
 
index cfb8e0fe7c9eb042e576f601d324623ebb85f076..a1bb0e9e6d8d5e35de42b1b6d88ed60a19f752fd 100644 (file)
 
 extern mod extra;
 
+use std::int;
+use std::io;
+use std::os;
+
 fn fib(n: int) -> int {
     if n < 2 {
         return 1;
index e0ffd3e4133d9d0288ec0e820b4e604b9ffe598a..e403ba6e73decc6fa3a76de484ab24785b73a157 100644 (file)
 // multi tasking k-nucleotide
 
 extern mod extra;
+
 use extra::sort;
+use std::cmp::Ord;
+use std::comm::{stream, Port, Chan};
+use std::comm;
 use std::hashmap::HashMap;
 use std::io::ReaderUtil;
-use std::comm::{stream, Port, Chan};
-use std::cmp::Ord;
+use std::io;
+use std::option;
+use std::os;
+use std::result;
+use std::str;
+use std::task;
 use std::util;
+use std::vec;
 
 // given a map, print a sorted version of it
 fn sort_and_fmt(mm: &HashMap<~[u8], uint>, total: uint) -> ~str {
index d4c3862fd7ea07f879dc621f82b86b23ee369fdd..69eff07093b7442e250134b343f06d0e29782794 100644 (file)
@@ -2,6 +2,7 @@
 use std::from_str::FromStr;
 use std::i32::range;
 use std::libc::{STDOUT_FILENO, c_int, fdopen, fputc};
+use std::os;
 
 static ITER: uint = 50;
 static LIMIT: f64 = 2.0;
index a226d50dc27ae0ea226cfdffbb80cdad0cd57ce7..744e3041c8fc16f307ac54916b60be09d9883855 100644 (file)
@@ -1,5 +1,8 @@
+use std::f64;
 use std::from_str::FromStr;
+use std::os;
 use std::uint::range;
+use std::vec;
 
 static PI: f64 = 3.141592653589793;
 static SOLAR_MASS: f64 = 4.0 * PI * PI;
index e201438a6ef76d64132233a384c10027d0a3fc6e..0a093d87a1586dbe55f8abf90f94bea809043ad0 100644 (file)
 extern mod extra;
 
 use extra::{time, getopts};
-use std::int::range;
 use std::comm::*;
+use std::int::range;
 use std::io::WriterUtil;
-
+use std::io;
+use std::os;
 use std::result::{Ok, Err};
+use std::str;
+use std::task;
+use std::u64;
+use std::uint;
+use std::vec;
 
 fn fib(n: int) -> int {
     fn pfib(c: &Chan<int>, n: int) {
index a3beee7c90df7b4353fa1817bdcd18cd72c82e81..77aaa2782d87e3beac0fb018b1d06418ad0f22df 100644 (file)
@@ -1,5 +1,8 @@
+use std::f64;
 use std::from_str::FromStr;
 use std::iter::ExtendedMutableIter;
+use std::os;
+use std::vec;
 
 #[inline]
 fn A(i: i32, j: i32) -> i32 {
index f1cd05e1d9e92a298891fa524680690c4ad09e62..23ac68315e3a002b2c2e769d75a9add66ef287cd 100644 (file)
 // Microbenchmark for the smallintmap library
 
 extern mod extra;
+
 use extra::smallintmap::SmallIntMap;
 use std::io::WriterUtil;
+use std::io;
+use std::os;
+use std::uint;
 
 fn append_sequential(min: uint, max: uint, map: &mut SmallIntMap<uint>) {
     for uint::range(min, max) |i| {
index e3f02684bb06c7aa7a0801cc55255b3a44cf0e7e..dbce9d60af7faaa1ba2c1187cafdc9e84c9a885e 100644 (file)
 
 use std::io::{ReaderUtil, WriterUtil};
 use std::io;
+use std::os;
+use std::str;
+use std::u8;
+use std::uint;
 use std::unstable::intrinsics::cttz16;
+use std::vec;
 
 // Computes a single solution to a given 9x9 sudoku
 //
@@ -167,10 +172,10 @@ fn next(&self) -> u8 {
         let val = **self & heads;
         if (0u16 == val) {
             return 0u8;
-        }
-        else
-        {
-            return cttz16(val as i16) as u8;
+        } else {
+            unsafe {
+                return cttz16(val as i16) as u8;
+            }
         }
     }
 
index a6d94c753548d795118dd2e3ed2893b53f070d09..a0363bd568ae915d8848db17a74bcc77cf94f08d 100644 (file)
@@ -14,6 +14,8 @@
 
 use extra::list::{List, Cons, Nil};
 use extra::time::precise_time_s;
+use std::os;
+use std::task;
 
 enum UniqueList {
     ULNil, ULCons(~UniqueList)
index 4600cf46892fe46a7450337bdde0ef3d31199601..78923c8cc968817ea7ab6f0f43b1b268099fb68b 100644 (file)
 // The filename is a song reference; google it in quotes.
 
 use std::cell::Cell;
+use std::comm;
+use std::os;
+use std::task;
+use std::uint;
 
 fn child_generation(gens_left: uint, c: comm::Chan<()>) {
     // This used to be O(n^2) in the number of generations that ever existed.
index b8cba98c6fb0b6df8ee29f9a477242016f2aef51..514b85c6ae05f97739c55376d56e31c2d8bc8b22 100644 (file)
 // Doesn't return until all such tasks are ready, but doesn't block forever itself.
 
 use std::comm::*;
+use std::os;
+use std::result;
+use std::task;
+use std::uint;
 
 fn grandchild_group(num_tasks: uint) {
     let (po, ch) = stream();
index 56e981b735d0d3880857625c9f85428faeac6a8f..e1a5253444f8889fd888b198559b3641ac289436 100644 (file)
 // Test for concurrent tasks
 
 use std::comm::*;
+use std::os;
+use std::task;
+use std::uint;
+use std::vec;
 
 fn calc(children: uint, parent_wait_chan: &Chan<Chan<Chan<int>>>) {
 
index e6da898a03493a9ca547318b8c68b31f62ec8e80..1a8fc7e098ddb94ceeb54df573f3cb652a76ddfa 100644 (file)
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::os;
+use std::task;
+use std::uint;
+
 fn f(n: uint) {
     let mut i = 0u;
     while i < n {
index 4993846f44559817dc13de9fd5cd085cde1cbded..55a358a32e200ba9f3055b4da2f7adb32f27f7e4 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
 
   how_hungry : int,
 }
index ffc160ac1111828b8601cc9fb69555aecb0d210a..348781d74977e79710b52ee6563fd2d088f4f233 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::comm;
+
 fn main() {
     let (p,c) = comm::stream();
     let x = Some(p);
index 73a53d6cc988c9da33fa45db8ff4c4a6d1af734f..dc90dfb2cadde77af41860fdada39a16697a45ff 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
 
 fn compute1() -> float {
     let v = ~[0f, 1f, 2f, 3f];
index d1e001f722c3fbaea03baa9c38923756bdf64cfa..778309122cba1252fe696b75ab52b47a29a02416 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn main() {
     for vec::each(~[0]) |_i| {  //~ ERROR A for-loop body must return (), but
         true
index 2ba5d0473cc62d37d26ae8630c7d2b7de77bc403..b9758e669e07ee1ed63d902228cd105fdf954f98 100644 (file)
@@ -10,6 +10,8 @@
 
 // Tests that auto-ref can't create mutable aliases to immutable memory.
 
+use std::io;
+
 struct Foo {
     x: int
 }
index 50dd815d4930234c55a9714011caef2a0f9201ee..1e74e91a82196f97bc8cd60bbde08afa877632f9 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 fn borrow(v: &int, f: &fn(x: &int)) {
     f(v);
 }
index 9ea4fe8aef416af66fb42e0595a2931262b8529e..01ca3cd1c282f457aa7427f88c1a2aa7dfa5e3e3 100644 (file)
@@ -22,7 +22,7 @@ fn f(x: &mut Either<int,float>, y: &Either<int,float>) -> int {
 
     fn g() {
         let mut x: Either<int,float> = Left(3);
-        io::println(f(&mut x, &x).to_str()); //~ ERROR cannot borrow
+        println(f(&mut x, &x).to_str()); //~ ERROR cannot borrow
     }
 
     fn h() {
index 061a6c553e4b0ffccbdd730133e4a1660b000e2a..443bcc921837c53325e4dac951ab615b6d72c13a 100644 (file)
@@ -13,7 +13,7 @@ struct Point {
     y: int,
 }
 
-impl ops::Add<int,int> for Point {
+impl Add<int,int> for Point {
     fn add(&self, z: &int) -> int {
         self.x + self.y + (*z)
     }
index 7026f06c2b7bb50a0fb892c4ebedcfe3ba0a6ab8..cb56e929754da1ccf77669eb819f65065e54372b 100644 (file)
@@ -16,5 +16,5 @@ fn main() {
         },
         None => { fail!() }
     }
-    io::println(*msg);
+    println(*msg);
 }
index 6f669e67ec7dd183a12bf2882fb5046ebe723ed5..c02a0b4cfafd5c4068e675873286f945c76eec2b 100644 (file)
@@ -9,5 +9,5 @@ fn a() -> &int {
 
 fn main() {
     let fifth = a();
-    io::println(fmt!("%d", *fifth));
+    println(fmt!("%d", *fifth));
 }
index dc42e28ec2523d5708f67bf8f965c6902d741825..8c0cf68c164b12901c8589dc11e3ceee17688ed0 100644 (file)
@@ -17,6 +17,6 @@ fn main() {
     };
     match &s.x {
         &Foo => {}
-        &Bar(ref identifier) => io::println(*identifier)
+        &Bar(ref identifier) => println(*identifier)
     };
 }
index 0662736545166c013b7dcd0edaf2b08fcc111155..8df9650d9507700f943485b9cceef9be7487748d 100644 (file)
@@ -13,9 +13,9 @@ trait noisy {
 }
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
 
-  mut how_hungry : int,
+  how_hungry : int,
   name : ~str,
 }
 
index b78b065d028f58e5e37449c8c3dcf64f6f9db181..4d1c22dfabe81f1122fb110b596e98d1eaf6f6a8 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
 }
 
 priv impl cat {
index d33c591d8c87f650d6758ff7f469708ab661e42f..c7f5e27181837905d0231079cc75ee5f88c476f2 100644 (file)
@@ -1,3 +1,5 @@
+use std::str;
+
 fn main() {
     let v = ~"test";
     let sslice = str::slice(v, 0, v.len());
index b2f87686ac6644e2177b336f7dc742fc8dfc9ef1..5e422d267538ba2d5ee7021f15baf5c04b4d6584 100644 (file)
@@ -13,7 +13,7 @@
 impl Drop for Foo {   //~ ERROR the Drop trait may only be implemented
 //~^ ERROR cannot provide an extension implementation
     fn finalize(&self) {
-        io::println("kaboom");
+        println("kaboom");
     }
 }
 
index 24fedaaabe3a0315120580b36883307cab0fd25b..ce2942c3146c4144e76e9d6a721e464c0037a306 100644 (file)
@@ -14,7 +14,7 @@ struct Foo {
 
 impl Drop for Foo {
     fn finalize(&self) {
-        io::println("kaboom");
+        println("kaboom");
     }
 }
 
index fd49889a3f796d2dfeb87a52a4e87caabf8c5571..1a5eb696fa2e710e02afdd1e0e19caceb7a32af7 100644 (file)
@@ -18,7 +18,7 @@ trait Bar : Drop {
 
 impl Drop for Foo {
     fn finalize(&self) {
-        io::println("kaboom");
+        println("kaboom");
     }
 }
 
diff --git a/src/test/compile-fail/foreign-unsafe-fn.rs b/src/test/compile-fail/foreign-unsafe-fn.rs
deleted file mode 100644 (file)
index fce269a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- rust -*-
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-mod test {
-    #[abi = "cdecl"]
-    pub extern {
-        pub unsafe fn free();
-    }
-}
-
-fn main() {
-    let x = test::free;
-    //~^ ERROR call to unsafe function requires unsafe function or block
-}
index bb6d47a47622b10e94af9b3a44c0aceb8fd17295..8f4bbe4eabc74baa20b8fdea943eb0c7794f9553 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn main() {
     for vec::each(fail!()) |i| {
         let _ = i * 2; //~ ERROR the type of this value must be known
index fdaf1f562c8df3fe55b746665f0dfd0c2d1dd0af..2f69000844060849e95e3ce903beae258978f9ca 100644 (file)
@@ -20,7 +20,7 @@ struct foo {
 impl Drop for foo {
     fn finalize(&self) {
         unsafe {
-            io::println("Goodbye, World!");
+            println("Goodbye, World!");
             *self.x += 1;
         }
     }
index 17b0d88a6a827712fda6a2bb7f11cc0cae4bdb83..166f7e048df1cd0db977aa6ea0982bc8f86cac8c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 fn not_bool(f: &fn(int) -> ~str) -> bool {}
 
 fn main() {
index 77585d15b6b3ebbcd8d7c79f73590472d0d836cd..49516831904be60c98535dcd2f2deb0eb8280800 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 fn uuid() -> uint { fail!(); }
 
 fn from_str(s: ~str) -> uint { fail!(); }
index 06fb18d7e4777f44fbebfcdc90fdc390d6342e44..4cac844bdea703b7d5909a93337cb72498030a5a 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn main() {
     let needlesArr: ~[char] = ~['a', 'f'];
     do vec::foldr(needlesArr) |x, y| {
index eb58cf3e13b36f47766466b0e8e670d6179c541a..5f3af86545462ddfd8bbfd413952a80ae825d73a 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 enum bottom { }
 
 fn main() {
index e931a8fa7e144fce3e4b2c475106c4224ca1fa24..ac5b469c56e20eb5c1484045582dcf3178dcab2f 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 struct thing(uint);
-impl cmp::Ord for thing { //~ ERROR missing method `gt`
+impl Ord for thing { //~ ERROR missing method `gt`
     fn lt(&self, other: &thing) -> bool { **self < **other }
     fn le(&self, other: &thing) -> bool { **self < **other }
     fn ge(&self, other: &thing) -> bool { **self < **other }
index 8d704859fe57453cea89fb547a83aa3b27883088..7e65d8ab82d9b4dbb0f3b26474d31198c5ad0921 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 fn main() {
     for task::spawn { return true; } //~ ERROR A `for` loop iterator should expect a closure that
                                      //~^ ERROR expected `for` closure to return `bool`
index 2bd11b5111adf41dfd5e682ca266b5c76ccae5cb..8fafd04d1e2a52b1da8d3da1e42e48fbcaf8c4b2 100644 (file)
@@ -22,5 +22,5 @@ fn main() {
     let u = Thing {x: 2};
     let _v = u.mul(&3); // This is ok
     let w = u * 3; //~ ERROR binary operation * cannot be applied to type `Thing`
-    io::println(fmt!("%i", w.x));
+    println(fmt!("%i", w.x));
 }
index fc8e456f56b42ee5e5acad65c420d78b7e9d3dfc..e3af6ce78e2c9be2e13f054642702b88a3d3ac9b 100644 (file)
@@ -31,8 +31,8 @@ fn ne(&self, other: &Lol) -> bool { **self == **other }
 
 fn main() {
     if Lol(2) == Lol(4) {
-        io::println("2 == 4");
+        println("2 == 4");
     } else {
-        io::println("2 != 4");
+        println("2 != 4");
     }
 }
index 5f907b35e412f8e976c6b0b1f62a6cf3073d0a27..ffa11e592608de38fa6e24a445102278e6d65c4f 100644 (file)
@@ -14,5 +14,5 @@ fn f<'r, T>(v: &'r T) -> &'r fn()->T { id::<&'r fn()->T>(|| *v) } //~ ERROR cann
 
 fn main() {
     let v = &5;
-    io::println(fmt!("%d", f(v)()));
+    println(fmt!("%d", f(v)()));
 }
index a053424b30d51be6ac811c29e3957ffec768495d..ed2eede76c6700a87abd7cd4450cb6689ecc0384 100644 (file)
 use std::cmp::Eq;
 
 fn f<T:Eq>(o: &mut Option<T>) {
-    assert!(*o == option::None);
+    assert!(*o == None);
 }
 
 fn main() {
-    f::<int>(&mut option::None);
+    f::<int>(&mut None);
     //~^ ERROR cannot borrow
 }
index c2732d383ab5bd80d9346dd4dc4ea2c0beabc6af..b21063361abccde11087c924df2f7956142b0ba7 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 fn user(_i: int) {}
 
 fn foo() {
index 89b99fcebca5d16a1b790db3dadc2a695a564a35..23befde7559c726dd17637d83df031c0d90645b5 100644 (file)
@@ -1,7 +1,7 @@
 #[forbid(default_methods)];
 
 trait Foo { //~ ERROR default methods are experimental
-    fn bar(&self) { io::println("hi"); }
+    fn bar(&self) { println("hi"); }
 }
 
 fn main() {}
index 201b2e9b989530e44b7cf5f333f3f4adcf503858..4a748cc56700a33166c9d7b6c54e7673c959bbe9 100644 (file)
@@ -12,6 +12,8 @@
 
 use cal = bar::c::cc;
 
+use std::io;
+
 use std::either::Right;        //~ ERROR unused import
 
 use std::util::*;              // shouldn't get errors for not using
index 465e5548f679c9a2bb8fc3552751725615c42891..1b5aabb953713943251606cb3a38fede9a90ed10 100644 (file)
@@ -27,8 +27,8 @@ unsafe fn bad3() { unsafe {} }           //~ ERROR: unnecessary `unsafe` block
 fn bad4() { unsafe { do callback {} } }  //~ ERROR: unnecessary `unsafe` block
 unsafe fn bad5() { unsafe { unsf() } }   //~ ERROR: unnecessary `unsafe` block
 fn bad6() {
-    unsafe {                             //~ ERROR: unnecessary `unsafe` block
-        unsafe {                         // don't put the warning here
+    unsafe {                             // don't put the warning here
+        unsafe {                         //~ ERROR: unnecessary `unsafe` block
             unsf()
         }
     }
index 914b7d9d677ad1cdd83d3948e189e9bdd8cc9d77..ec4f3f9a3fdbacc2b531207fed867f236e68424b 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn main() {
     let a: ~[int] = ~[];
     vec::each(a, |_| -> bool {
index 2719d84b2dd2595e76154c585ec48b0f66d14379..3930e7d219201f0410f60c85861908f9d06ed0f4 100644 (file)
@@ -7,7 +7,7 @@ fn main() {
     }
 
     match [~"foo", ~"bar", ~"baz"] {
-        [a, _, _, .._] => { io::println(a); }
+        [a, _, _, .._] => { println(a); }
         [~"foo", ~"bar", ~"baz", ~"foo", ~"bar"] => { } //~ ERROR unreachable pattern
         _ => { }
     }
index ca58097b555e1d5a777939af64a1904d5774a2f1..11c4d078208eee242dd32127bfc77a5a97c4b1a1 100644 (file)
@@ -18,7 +18,7 @@ fn main() {
         do f(&s) |hellothere| {
             match hellothere.x {
                 ~Foo(_) => {}
-                ~Bar(x) => io::println(x.to_str()), //~ ERROR cannot move out
+                ~Bar(x) => println(x.to_str()), //~ ERROR cannot move out
                 ~Baz => {}
             }
         }
index 6dce011ddc8960aa91cada6c5e99dcdc57cfe6b6..706ab051ca1a0ca8bf6aa91c0e0fc5cbe8687167 100644 (file)
@@ -1,7 +1,9 @@
+use std::task;
+
 fn main() {
     let x = ~"Hello world!";
     do task::spawn {
-        io::println(x);
+        println(x);
     }
-    io::println(x); //~ ERROR use of moved value
+    println(x); //~ ERROR use of moved value
 }
index 40ee37fae78a82d434be6c582805ccdc1bfc6a75..d39b2e06e69f6b75aefd52d5e8e14a778d81b682 100644 (file)
@@ -1,6 +1,8 @@
 // Tests that references to move-by-default values trigger moves when
 // they occur as part of various kinds of expressions.
 
+use std::vec;
+
 struct Foo<A> { f: A }
 fn guard(_s: ~str) -> bool {fail!()}
 fn touch<A>(_a: &A) {}
index ecd58d485a89dc11b6ceb78cb11bae9029e725a9..e25ba0f39f2e81ee1f73c4c477d9849fa7b763a5 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 fn test(_x: ~uint) {}
 
 fn main() {
index f5d24b316414e69e0b13e545fc2b5880bc7ccf51..7d41481354fa6ff3dfcd80108ac1531cd568d0ac 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
 
   how_hungry : int,
 }
index 8bebec7134cc36ff626c109e687e7654269d68c1..a88156a4b477d66cb1e311c50448bb870f22c047 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 struct cat {
-  priv mut meows : uint,
+  priv meows : uint,
   how_hungry : int,
 }
 
index 2a83e479e873c7beba86de815aacb6417f25a1f7..b036071fd879488db5f81fc38a656852dc2ac3ad 100644 (file)
@@ -13,6 +13,8 @@
 extern mod extra;
 use extra::arc;
 
+use std::task;
+
 fn main() {
     let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
     let arc_v = arc::ARC(v);
index c9e5144557acceead68bd17148f5b5f338445ec7..28f3ea7af9f8c83de42f98ea6e426d6d68b5932a 100644 (file)
@@ -11,6 +11,8 @@
 extern mod extra;
 use extra::arc;
 
+use std::task;
+
 fn main() {
     let v = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
     let arc_v = arc::ARC(v);
index 951103bfbe36948f458f5f18ca6a4284eaa791ec..9847efd2dd58bffe855f1b22f428825a9b4a9def 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::cell::Cell;
+use std::task;
 
 struct Port<T>(@T);
 
index b89e22582bb3acfe27b7624cf1eedd52860758e8..f979f8273a04e9886d57aac0b88973b11a16cdc2 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 fn main() {
     let x : *~[int] = &~[1,2,3];
     let y : *libc::c_void = x as *libc::c_void;
index 155b398148339bdb0c46e6e4f7400624b18def5c..a7c8950486c05ed66556169f3090af43396781ee 100644 (file)
@@ -8,12 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::unstable;
+
 fn main() {
-    let x = Some(unstable::sync::exclusive(false));
-    match x {
-        Some(copy z) => { //~ ERROR copying a value of non-copyable type
-            do z.with |b| { assert!(!*b); }
+    unsafe {
+        let x = Some(unstable::sync::exclusive(false));
+        match x {
+            Some(copy z) => { //~ ERROR copying a value of non-copyable type
+                do z.with |b| { assert!(!*b); }
+            }
+            None => fail!()
         }
-        None => fail!()
     }
 }
index c03261816ef31fe279566662b07bdba18e49e389..3b9b17e051d6f62941130f1676f5614f7f23913a 100644 (file)
@@ -15,6 +15,8 @@
 
 // error-pattern: transmute called on types with different size
 
+use std::cast;
+
 #[packed]
 struct Foo<T,S> {
     bar: T,
index cad78f9e5d1f580292afb14960ea166e88890da4..bf62bab8b408fcf8032e2d3f8b4feb5fcde2041b 100644 (file)
@@ -15,6 +15,8 @@
 
 // error-pattern: transmute called on types with different size
 
+use std::cast;
+
 #[packed]
 struct Foo {
     bar: u8,
index 0d84bc2fc605c040713fb9f05efb67f65241327a..800bb1c5703948fd2fe1d09d048c860c8ede51ef 100644 (file)
 // error-pattern:method `nap` is private
 
 mod kitties {
+    use std::uint;
+
     pub struct cat {
-        priv mut meows : uint,
+        priv meows : uint,
 
         how_hungry : int,
     }
index 957925709e179da65800a0b9bbffa6b53dcd17f7..524deed20f243c43764449d45e0744175a968b3e 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn main() {
-    let f = |3: int| io::println("hello");  //~ ERROR refutable pattern
+    let f = |3: int| println("hello");  //~ ERROR refutable pattern
     f(4);
 }
index b9a9e2f38f5aa2299ba990187a033a011e5982d6..1c7235743eaa8de75b79c37eafe920c1572e6dcd 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 struct dog {
     food: uint,
 }
index e1e1e2313f42a7f94eda36f197f3fe5399c06c3a..0dd12822dfae54479222b87d5054fa0de803ae8d 100644 (file)
@@ -18,7 +18,7 @@ struct Foo {
 
 impl Drop for Foo {
     fn finalize(&self) {
-        io::println("Goodbye!");
+        println("Goodbye!");
     }
 }
 
index 9dbef3692574b46842b3c0d247b99fa972c4d653..8db2c686f30ac7d36873f5c79537dbc15d910fa8 100644 (file)
@@ -12,4 +12,6 @@
 
 extern mod extra;
 
+use std::task;
+
 fn main() { task::spawn(|| -> int { 10 }); }
index de28a06ababcba40b70ed578b6caa8482740d263..785eeb24784fa71416829353e6df0ac6315bb457 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     let x = Foo(1, 2);
     match x {   //~ ERROR non-exhaustive
-        Foo(1, b) => io::println(fmt!("%d", b)),
-        Foo(2, b) => io::println(fmt!("%d", b))
+        Foo(1, b) => println(fmt!("%d", b)),
+        Foo(2, b) => println(fmt!("%d", b))
     }
 }
index 95945b0b5baa49598c52604eed56e18b4329334e..3844dab726e682587ef72706ed90fee479862600 100644 (file)
@@ -22,7 +22,7 @@ fn finalize(&self) {}
 
 impl Foo for Bar {
     fn f(&self) {
-        io::println("hi");
+        println("hi");
     }
 }
 
index 3eebc4647c28be86d9e0474a0be42d136a3ab2e1..58de0926f7c6611b8e603a32d6b0a381b6f24c99 100644 (file)
@@ -11,6 +11,8 @@
 // Test that a class with an unsendable field can't be
 // sent
 
+use std::comm;
+
 struct foo {
   i: int,
   j: @~str,
index 3af012a6c3fcfb7e7c7713bc33e047941ea01826..da8f69d7eae2d05d7f7dbb8933c8b897cf02bccb 100644 (file)
@@ -10,6 +10,8 @@
 
 // error-pattern:unsupported cast
 
+use std::libc;
+
 fn main() {
   debug!(1.0 as *libc::FILE); // Can't cast float to foreign.
 }
index 3d176bb339d83134466bdb1644afa868c2f3c54e..e8802e6e5cb6857ceaa74f042870f9741a620f82 100644 (file)
@@ -11,5 +11,5 @@
 fn main() {
     let x = ~"Hello!";
     let _y = x;
-    io::println(x); //~ ERROR use of moved value
+    println(x); //~ ERROR use of moved value
 }
index da8e0c9f2b697cad84ce5fa58e2b6d5e9167649f..e4e5802fafb6f8a80e7ec08085a7c7c5ef3625fb 100644 (file)
@@ -17,5 +17,5 @@ fn bar(self) {}
 
 fn main() {
     let x = S { x: 1 };
-    io::println(x.foo().to_str());
+    println(x.foo().to_str());
 }
index 37db40d14365eca8bfb4f9b1cc5fd301cdfae1b0..4750a5fbd2ddcd471abf57f612d4d27eeffc4ff7 100644 (file)
@@ -13,5 +13,5 @@ fn bar(self) {}
 
 fn main() {
     let x = S { x: ~1 };
-    io::println(x.foo().to_str());
+    println(x.foo().to_str());
 }
index 6a6402c6a5eea15bd6cbb502b06a3eca64e22d69..bd7d86d72953146ec307b07a6b6c51556661589f 100644 (file)
@@ -10,6 +10,9 @@
 
 // error-pattern:index out of bounds
 
+use std::sys;
+use std::vec;
+
 fn main() {
 
     // This should cause a bounds-check failure, but may not if we do our
index 15cc8a488673a9213a78603bacc9064ea31c05e0..2be41d3bed00fa482445c635b7bc14759dd40642 100644 (file)
 // Testing that runtime failure doesn't cause callbacks to abort abnormally.
 // Instead the failure will be delivered after the callbacks return.
 
+use std::libc;
 use std::old_iter;
+use std::task;
 
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                           -> libc::uintptr_t;
index 06422244af95841571f6c265ecb86fbe7d6d4537..97ca36cf4487c23ba3ad882462804b64050a74c2 100644 (file)
@@ -10,4 +10,7 @@
 
 // error-pattern:moop
 extern mod extra;
+
+use std::uint;
+
 fn main() { for uint::range(0u, 10u) |_i| { fail!("moop"); } }
index de0b903b53c02dbd5148da8da48ca216a11a0c46..0e0bd81d659ace57deac2dfb339674e283d0e0a2 100644 (file)
@@ -11,7 +11,9 @@
 // error-pattern:explicit failure
 // Don't double free the string
 extern mod extra;
+
 use std::io::ReaderUtil;
+use std::io;
 
 fn main() {
     do io::with_str_reader(~"") |rdr| {
index 6a87e202d13828a928b0b8d5934c8ba094ec497a..41a9d7ddcea1fc47445b0ee846783ac6e3488ebb 100644 (file)
@@ -13,6 +13,9 @@
 // error-pattern:1 == 2
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 fn child() { assert!((1 == 2)); }
 
 fn main() {
index 9f09c16ed6a571054688a9799dad9cef13f1cf78..0269e3959868d9d899a1683ac45a30ebb9f5c43e 100644 (file)
@@ -12,6 +12,9 @@
 
 // error-pattern:fail
 
+use std::comm;
+use std::task;
+
 fn child() { fail!(); }
 
 fn main() {
index 4b09cb75324c04bbd98bdd82e8a2f36ed1c0cea2..1203f74322febe0e0e5b6c9796916f15a69c0d9a 100644 (file)
@@ -12,6 +12,9 @@
 
 // error-pattern:fail
 
+use std::comm;
+use std::task;
+
 fn grandchild() { fail!("grandchild dies"); }
 
 fn child() {
index 3dc87e190a5d858ce4abad87fd4cb032d2efd139..766b43f211f46c52372376fed0b9c251cf8ad95c 100644 (file)
@@ -11,6 +11,9 @@
 
 // error-pattern:1 == 2
 
+use std::comm;
+use std::task;
+
 fn child() { assert!((1 == 2)); }
 
 fn parent() {
index 306357b00013e3f140de4191f7d7ce7b7a412051..22613f45b3bc42932aabebbcddf2d2ea464857b5 100644 (file)
@@ -10,9 +10,9 @@
 
 // error-pattern:squirrelcupcake
 fn cmp() -> int {
-    match (option::Some('a'), option::None::<char>) {
-        (option::Some(_), _) => { fail!("squirrelcupcake"); }
-        (_, option::Some(_)) => { fail!(); }
+    match (Some('a'), None::<char>) {
+        (Some(_), _) => { fail!("squirrelcupcake"); }
+        (_, Some(_)) => { fail!(); }
         _                    => { fail!("wat"); }
     }
 }
index f829767edf19d21035032e9c97866fb8b4aad7ad..d03433d58725533a8a3c01ce056f97c46b5601dd 100644 (file)
 
 extern mod extra;
 
+use std::libc;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_get_argc() -> libc::c_int;
     }
index 6ab064f382738d2d3e0233fefb22d3d3ba8ff135..d2e17d285617237578c747f5d2c915c10b33a57e 100644 (file)
@@ -14,6 +14,8 @@
 
 extern mod extra;
 
+use std::task;
+
 fn getbig_and_fail(i: int) {
     let _r = and_then_get_big_again(5);
     if i != 0 {
index e07c799710848c9fa1d99e434dce5722d221b879..c4f7de49555642bca9aca0292fb59cc7163f6cc9 100644 (file)
@@ -14,6 +14,8 @@
 
 extern mod extra;
 
+use std::task;
+
 fn getbig_and_fail(i: int) {
     let r = and_then_get_big_again(5);
     if i != 0 {
index 1e4e7685e270c918797857688bfe01ff3d472def..cb9cce3249f011046196ecb429389472ec53b987 100644 (file)
@@ -9,6 +9,9 @@
 // except according to those terms.
 
 // error-pattern:get called on error result: ~"kitty"
+
+use std::result;
+
 fn main() {
   error!(result::get(&result::Err::<int,~str>(~"kitty")));
 }
index f6e9602470f331653a5b64c9d82b4263dbafb299..6b5c2b554a4db1f411a7814bad7c45203d2bde33 100644 (file)
@@ -10,6 +10,8 @@
 
 // error-pattern:whatever
 
+use std::os;
+
 fn main() {
     error!(~"whatever");
     // Setting the exit status only works when the scheduler terminates
index bf33b10cc61085353b9987b2014a116414016457..3d0341d01f4b0d38baf1475cd3ff4d0d98b05e9d 100644 (file)
@@ -10,6 +10,9 @@
 
 // error-pattern:whatever
 
+use std::os;
+use std::task;
+
 struct r {
   x:int,
 }
index 2cff4ff09dfb83c985dd277b55e7f0f81400600a..4f71cdc67e9c2071c883f4725c712302e37ae861 100644 (file)
@@ -10,6 +10,8 @@
 
 // error-pattern:whatever
 
+use std::os;
+
 fn main() {
     error!(~"whatever");
     // 101 is the code the runtime uses on task failure and the value
index 87df00fcce58736421c9d5096bc574777fef5561..ee58f76fc99ee2a2e61dc4da3207bb8428292cef 100644 (file)
@@ -9,6 +9,9 @@
 // except according to those terms.
 
 // error-pattern:index out of bounds: the len is 1024 but the index is -1
+
+use std::vec;
+
 fn main() {
     let v = vec::from_fn(1024u, {|n| n});
     // this should trip a bounds check
index fc4977308ae14104124d513ec2ce66aef7d59e72..de085a6f3addbc925639d524de97784e861b7788 100644 (file)
@@ -12,6 +12,8 @@
 // error-pattern:explicit
 extern mod extra;
 
+use std::task;
+
 // We don't want to see any invalid reads
 fn main() {
     fn f() {
index ca411872b61c7f60dcd50d30fb6f2dd0d9dc339b..8302b96ca3ef7395e09cf41e099724a891d5192d 100644 (file)
@@ -10,6 +10,9 @@
 
 // error-pattern:goodfail
 
+use std::comm;
+use std::task;
+
 fn goodfail() {
     task::yield();
     fail!("goodfail");
index 11c9de6e14f450659d586fdc27f87c6decfcdac3..2456f968c3c10dbe22b52750f3f25113abe7c7de 100644 (file)
@@ -10,6 +10,9 @@
 
 // error-pattern:Ensure that the child task runs by failing
 
+use std::str;
+use std::task;
+
 fn main() {
     // the purpose of this test is to make sure that task::spawn()
     // works when provided with a bare function:
index d5d54ade4443a991819b1d4b97ce358ef0a58b8b..a1e1ee433bb6d466413ec3ad5ae89bd56b12220c 100644 (file)
@@ -10,6 +10,8 @@
 
 // error-pattern:fail
 
+use std::cast;
+
 fn failfn() {
     fail!();
 }
index ed57b32b3d9e557dc7ad3b3f77fa18e0585bdfce..4eeb85469de3cdb6373691d390e089344c6961e5 100644 (file)
@@ -15,5 +15,7 @@
 use anonexternmod::*;
 
 pub fn main() {
-  rust_get_argc();
+    unsafe {
+        rust_get_argc();
+    }
 }
index 6e73022fad2e150c7814c5ab23537ce41f63e363..8e03a6393b4333fd70431c5976ae43554042035c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 #[abi = "cdecl"]
 #[link_name = "rustrt"]
 extern {
index 91bbbf5c0a0df567e7db0670f8a78baf5a5afdb6..10462fa4abb22efb0987c8d2d396a7873014ace9 100644 (file)
@@ -20,5 +20,5 @@ fn new() -> Foo {
 
 pub fn main() {
     let x = Foo::new();
-    io::println(x.x.to_str());
+    println(x.x.to_str());
 }
index 1baeca00083fd660a49fc1697e2d464581ed09de..5780a4e97aed62567b8d7a719e7255f267b5c106 100644 (file)
@@ -16,5 +16,5 @@
 
 pub fn main() {
     let x = Foo::new();
-    io::println(x.x.to_str());
+    println(x.x.to_str());
 }
index 64e1e20e4ba2960e4c234bd394f2397d53c6e2f1..5d2341ae42d3ffad2458d28a0c1d54946b4f36de 100644 (file)
@@ -12,6 +12,8 @@
 // making method calls, but only if there aren't any matches without
 // it.
 
+use std::vec;
+
 trait iterable<A> {
     fn iterate(&self, blk: &fn(x: &A) -> bool) -> bool;
 }
index 0c2f24b5bf75be7a0fd2f82688a7eeaf2f46c3cc..eebd4d51fb66ed6002f428519c790ff775778685 100644 (file)
@@ -20,7 +20,9 @@
 use EBReader = extra::ebml::reader;
 use EBWriter = extra::ebml::writer;
 use std::cmp::Eq;
+use std::cmp;
 use std::io::Writer;
+use std::io;
 use extra::ebml;
 use extra::serialize::{Decodable, Encodable};
 use extra::time;
index dbcbb77efa39e91399451c9a32d980eae38a3d6d..f148c509d4d0f7eb4d5b49eb20dd3179579c760e 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     let mut sum = 0;
     for vec::each(~[1, 2, 3, 4, 5]) |x| {
index 08c936f2bb66eb6549fa50556d8f2a6a70d24618..bb01c27fa0d5c17490774cd27fadf6b52d4a090a 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
+
 trait Foo {
     fn f(&self);
 }
index ee250b972190c1251ba126d1aa2c19f7747f11da..7171b0ee86c4bc212c16e161575222ff93709209 100644 (file)
@@ -18,7 +18,7 @@ trait Stuff {
 
 impl Stuff for Foo {
     fn printme(&self) {
-        io::println(fmt!("%d", self.x));
+        println(fmt!("%d", self.x));
     }
 }
 
index 6208a9c3cc3e4d7c126ac6f8f82168fb2b52ba1f..9b2855d269d73f045bfb16187d50b53ef56f49c0 100644 (file)
@@ -10,5 +10,5 @@
 
 pub fn main() {
     let x: &'static str = "foo";
-    io::println(x);
+    println(x);
 }
index a7e910538c947e7bf054a7198aefa256dc1dcf45..1c73bf6cc3637b46a2e7282be5e6a1a2a8f1dafa 100644 (file)
@@ -10,6 +10,8 @@
 
 // Binop corner cases
 
+use std::libc;
+
 fn test_nil() {
     assert_eq!((), ());
     assert!((!(() != ())));
@@ -80,6 +82,8 @@ fn test_ptr() {
 }
 
 mod test {
+    use std::libc;
+
     #[abi = "cdecl"]
     #[nolink]
     pub extern {
index d10bcaa216a67ff8aa047e8882178e20da07c62b..73b436e7476f0dd82c9dd73e0139214789373f71 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     let v = ~[-1f, 0f, 1f, 2f, 3f];
 
index 194fa297361f98789c54fafd5ede89a716d60644..7894bf938487fe0d31c80603a1f77eaeea56fd30 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     fn f(i: &fn() -> uint) -> uint { i() }
     let v = ~[-1f, 0f, 1f, 2f, 3f];
index 5243eae30ca6384cafb61ac834468df6630e4fda..5fb6de1987895edb7fcfc1f1244fa02c7c747a07 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     fn f(i: uint) -> uint { i }
     let v = ~[-1f, 0f, 1f, 2f, 3f];
index ea189de562a8bed50e5b67cf27835eb8559bc892..ec211a3a1442138d8b57b967ebc700e8aed54fb3 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn w_semi(v: ~[int]) -> int {
     // the semicolon causes compiler not to
     // complain about the ignored return value:
index de29ec99167f95d6d6bf29e758b6bf5c279bd758..906a3629f3a0a6ffb8d20b6a201eb8c589a4d574 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 // Check usage and precedence of block arguments in expressions:
 pub fn main() {
     let v = ~[-1f, 0f, 1f, 2f, 3f];
index 4c37000113cf7e68801fa8dbe9f3bf5dc417c8ad..739dbab4d3af4f25e7e7d3abfc0f118df07c3bcd 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern mod extra;
+use std::vec;
 
 pub fn main() {
     let v =
index 5149c87c4908e978a8c5f279e1ba1d9ab6d216cf..b10f152abe04ab4ed147ec220d4801da8dae101e 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 fn borrow(x: &int, f: &fn(x: &int)) {
     f(x)
 }
index fa5ae98450726b3097f71c985b19138d005e4419..1b43e98cc170f0ead6270231142f619d812e33a4 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
 use std::util;
 
 struct Ints {sum: ~int, values: ~[int]}
index 4b5d73f597e3fd2c7e2db618933a58a5c11a8f73..d63ebf7d24d417fbe120b966d4de3708228db4eb 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn want_slice(v: &[int]) -> int {
     let mut sum = 0;
     for vec::each(v) |i| { sum += *i; }
index 5a94e2f5cd03efa522ff11d94083dc97db4cc917..8434651dbbf9b9b894569ba46cbb602aad48056d 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 struct F { f: ~int }
 
 pub fn main() {
index f86471fd20904f3617c50c36588c72a6c4e3c759..93ceeef37b3756234cabb8ea2fc84a4df88bb594 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 fn borrow(x: &int, f: &fn(x: &int)) {
     let before = *x;
     f(x);
index 17f9dcb627d69fa88a6c9a8c77f3d86e3a185220..1323ac0df5eab73441a364c597e62927349b9bc2 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 struct F { f: ~int }
 
 pub fn main() {
index 25bc5c0c982d9a52bc6d3ef7497ba1b9e58cec64..dcecf77335a14e0177311a03d116bef7c8d36983 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 fn borrow(x: &int, f: &fn(x: &int)) {
     let before = *x;
     f(x);
index 5f4d907e96289f8d6e8f83fc95ee285c0a936d98..8bd8049ea1dac7c7b6c7ba83b2108194781e5ca3 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 fn borrow(x: &int, f: &fn(x: &int)) {
     let before = *x;
     f(x);
index ac1463caddf9fe8c0f9291e75dbc2923609136f7..6e683c79875d7f68fc64edba87daef124162519f 100644 (file)
@@ -10,6 +10,8 @@
 
 // exec-env:RUST_POISON_ON_FREE=1
 
+use std::ptr;
+
 fn borrow(x: &int, f: &fn(x: &int)) {
     let before = *x;
     f(x);
index 0699df703c6a3b23b34f9d1d23d75a8fb56102f0..212bc62a98afcc390c5854296210215a497fb8f5 100644 (file)
@@ -5,7 +5,7 @@ struct Wizard {
 pub impl Wizard {
     fn cast(&mut self) {
         for self.spells.each |&spell| {
-            io::println(spell);
+            println(spell);
         }
     }
 }
index dea4ec4959b0068bac2449e9284a66c9088090b4..3b18a8649eeeaac16d91727ded6bed6306ba45c6 100644 (file)
@@ -1,5 +1,5 @@
 fn g(x: &Option<int>) {
-    io::println(x.get().to_str());
+    println(x.get().to_str());
 }
 
 fn f(x: &mut Option<int>) {
index f28b0e4c4ec13f80c8d63e13e84e14fec2927003..c07962e10aa93bdb9ac28947cbe2cc29b34e9576 100644 (file)
@@ -1,5 +1,5 @@
 fn f(x: &int) {
-    io::println(x.to_str());
+    println(x.to_str());
 }
 
 pub fn main() {
index 1313a17f81db08b27caf4a373deb9384fa3d7d0d..1d901d42742c1f5da6fa4e0b41eb87d588edf800 100644 (file)
@@ -14,7 +14,7 @@ trait Foo {
 
 impl Foo for int {
     fn foo(@self) {
-        io::println("Hello world!");
+        println("Hello world!");
     }
 }
 
index da362c8194d7c9ef190144e57e3e3fc6167d1d44..2edb270762cc35e8306de93b5983457a786cb004 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     let mut i = 0;
     while i < 20 { i += 1; if i == 10 { break; } }
index 661aa7a90b1e831274744ff58c953632bae108e8..0a482c745bacf7bd9cabeb40309e722d27e54793 100644 (file)
@@ -8,7 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 mod rustrt {
+    use std::libc;
+
     #[abi = "cdecl"]
     pub extern {
         pub fn get_task_id() -> libc::intptr_t;
index 647c42cf891cb94dd3345b5e449a92302e502f3a..4553257df31a5614a5aea36267d5296cbe378e16 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern mod extra;
+use std::str;
 
 mod libc {
     #[abi = "cdecl"]
index 19939650633556291a2d5ec9f97f9134e2ad30fc..aadd6a724940b25d2b834aa75978fd671f0f938d 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 pub fn main() {
     let x = ~1;
     let y = ptr::to_unsafe_ptr(&(*x)) as uint;
index c9a1c031e84d0b924717fbe9000fea749419de77..6182ec79a3ba92281b2a105039abadf08e6e252f 100644 (file)
@@ -25,6 +25,7 @@
 // irrelevant).
 
 use std::comm::*;
+use std::task;
 
 fn foo(x: ()) -> Port<()> {
     let (p, c) = stream::<()>();
index 81fa3d6538c44b46dcb4187e31786afb00ad10ca..714cbe6bfa19382da59e78398629f2acefb638b5 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 pub fn main() {
     let x = 3;
     debug!("&x=%x", ptr::to_uint(&x));
index db25b36aa6169ee33972750c1d0c602adcec19a7..43d9db391d9ebaca6680ca330f2e46e9ec0a0b9f 100644 (file)
@@ -19,7 +19,7 @@ pub fn main() {
     //debug!("%?", bt0);
 
     do 3u.to(10u) |i| {
-        io::print(fmt!("%u\n", i));
+        print(fmt!("%u\n", i));
 
         //let bt1 = sys::frame_address();
         //debug!("%?", bt1);
index cb713adcb28fccd6bdb180bc6db12895a2bb35a2..f9a2d78692998c531341a05a385f860dd8f25ed9 100644 (file)
@@ -17,7 +17,7 @@ pub fn main() {
     //let bt0 = sys::rusti::frame_address(1u32);
     //debug!("%?", bt0);
     do cci_iter_lib::iter(~[1, 2, 3]) |i| {
-        io::print(fmt!("%d", *i));
+        print(fmt!("%d", *i));
         //assert!(bt0 == sys::rusti::frame_address(2u32));
     }
 }
index a1c2666b2e5170fdbafe73b990f6d77b97be63ac..92d0e23589bc0fe2c1a2b847e747ddf194a16640 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
     //let bt0 = sys::frame_address();
     //debug!("%?", bt0);
     do iter(~[1u, 2u, 3u]) |i| {
-        io::print(fmt!("%u\n", i));
+        print(fmt!("%u\n", i));
 
         //let bt1 = sys::frame_address();
         //debug!("%?", bt1);
index de933b53a18b0ba8f833a25315323b7ced41e2e6..9232547dd8bd58996f4fe12d7717d7810181d6dc 100644 (file)
@@ -10,7 +10,7 @@
 
 // Reported as issue #126, child leaks the string.
 
-extern mod extra;
+use std::task;
 
 fn child2(s: ~str) { }
 
index 051c09fac537e755a8dba748805118de92e85aea..c41a8c2b284bd1b7ea09a34864f8d05a92377e0c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 trait noisy {
   fn speak(&self) -> int;
 }
index a73af840fe4e45d86fcaab5707d08257fd7666f6..b8ea3bec21a65dc6a6c879a61643a170ca897703 100644 (file)
 
 // xfail-fast
 
+use std::cmp;
 use std::container::{Container, Mutable, Map};
+use std::int;
 use std::old_iter::BaseIter;
+use std::uint;
 
 enum cat_type { tuxedo, tabby, tortoiseshell }
 
index 226dbe535fa131e952fcef31eb3e93bc80021af0..724f9a0f7b11e4b59f6d658c6b0f3b2fd10b149d 100644 (file)
@@ -13,6 +13,8 @@
 extern mod cci_class_trait;
 use cci_class_trait::animals::*;
 
+use std::uint;
+
 struct cat {
   priv meows: uint,
 
index 1c0a09d52cfc81c75d74c524c92b9116ad554b1e..d8ba7320b95bd491108c545e3b42d500d03a9440 100644 (file)
@@ -10,6 +10,8 @@
 
 // xfail-fast
 
+use std::uint;
+
 trait noisy {
   fn speak(&mut self);
 }
index 6a8a47990b8446286df076349ba00175299eb274..0af433bd655b44d684901a03a403c9595d94d8fe 100644 (file)
@@ -13,6 +13,8 @@
 extern mod cci_class_4;
 use cci_class_4::kitties::*;
 
+use std::uint;
+
 pub fn main() {
     let mut nyan = cat(0u, 2, ~"nyan");
     nyan.eat();
index 523469041416a5e3ce2139111112388f496637b8..e3f9b651083494e67d01516e64b839edd4f1b514 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 struct cat {
     priv meows : uint,
 
index cb378da13ea603fd09d3b8332ebe44276edab6ff..2446e9057c2e7ccd27dd78ad05c15537f527574a 100644 (file)
@@ -9,6 +9,10 @@
 // except according to those terms.
 
 // xfail-win32
+
+use std::result;
+use std::task;
+
 fn adder(x: @int, y: @int) -> int { return *x + *y; }
 fn failer() -> @int { fail!(); }
 pub fn main() {
index 18a28722c7017416988e294a95f4770357f77852..3d216c1885f6ee17df136898ac3efe3feb699dee 100644 (file)
@@ -1,3 +1,5 @@
+use std::vec;
+
 trait Reverser {
     fn reverse(&self);
 }
index aa787328c412b7357118c7842e21ac3d3890ee71..d62ed77fdab32e46cc8e861edb915b7e091fc666 100644 (file)
@@ -1,3 +1,5 @@
+use std::vec;
+
 trait Reverser {
     fn reverse(self);
 }
index c307cf809b66dbb4797532af2b7e642b009b3d67..b0bdfd598fb7937d691ab709af9a4068fc429a82 100644 (file)
@@ -10,6 +10,7 @@
 // except according to those terms.
 
 use std::comm::*;
+use std::task;
 
 pub fn main() {
     let (p, ch) = stream();
index 3dc94936304794e2e5f36cf84bbfc93daea8bd6f..88ab70f596adf60c46fee3925e952ac54bbd37b5 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 static a: *u8 = 0 as *u8;
 
 pub fn main() {
index 1c8e92b91cd1bbf3378a34205a9f00384c457db7..280fe44c3da3eafcf1852c0d64e6e705988cb046 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 extern fn foo() {}
 
 static x: *u8 = foo;
index ccc7b486d1ea220e75759692edc6704263d31bc3..990e5e6721915e7282ea12d7379ca8dfd793eafe 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
+
 static x : [int, ..4] = [1,2,3,4];
 static p : int = x[2];
 static y : &'static [int] = &[1,2,3,4];
index acb7fa2f0f4751576961a00d7a6da2cb016a1a68..31b806bf41a1b29d271d14609cae6feef7bdf0d5 100644 (file)
@@ -21,5 +21,5 @@ struct AnotherPair { x: (i64, i64), y: Pair }
 pub fn main() {
     let (p, _) = y.x;
     assert_eq!(p, - 1085102592571150096);
-    io::println(fmt!("0x%x", p as uint));
+    println(fmt!("0x%x", p as uint));
 }
index 14397569ad97f45367ecac98024560708f18d3b4..3eaf733d784c0ec6bca7d6940940afdc15b3bdcc 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 type Big = [u64, ..8];
 struct Pair<'self> { a: int, b: &'self Big }
 static x: &'static Big = &([13, 14, 10, 13, 11, 14, 14, 15]);
index 12712844c8a69900a036316b4ff79e4aac3578b4..cdc71292ae069762d8f9b4351b0d5a32d59543a4 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
 
 struct Pair<'self> { a: int, b: &'self int }
 
index 48eb4d6ce59b932e868fe9c02a1447e484570666..2f0cd3c611f620afc8be3bb106e67be3e6b5ae9b 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::str;
+
 static a: [u8, ..3] = ['h' as u8, 'i' as u8, 0 as u8];
 static c: &'static [u8, ..3] = &a;
 static b: *u8 = c as *u8;
index 24542f549228958088ebbb18bb46d1e31b2ebb09..8a93a3e4c1ccbc86992c928e8e675773eb9c0aae 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cmp;
+use std::io;
 
 struct foo { a: int, b: int, c: int }
 
index 134ee58042571b7aaa352b5d6152ddbe9e6fa310..0aee53a4ed2d2efbc32b458fdef5d4452b996010 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
+
 static x : [int, ..4] = [1,2,3,4];
 static y : &'static [int] = &[1,2,3,4];
 
index 7e00d7efbe23b18276f1e9e80dfeb0efb2e896be..3a683bc7cb92c37b2cbbfbf9122d389f96517b85 100644 (file)
 
 // Regression test that f64 exports things properly
 
+use std::f64;
+use std::float;
+
 pub fn main() {
 
     let digits: uint = 10 as uint;
 
-    ::std::io::println(float::to_str_digits(f64::sqrt(42.0f64) as float, digits));
+    println(float::to_str_digits(f64::sqrt(42.0f64) as float, digits));
 }
index a80d9661aa20e01159acfb2c37a8ff0dd3e28403..81cdb926e5f963effdd4a177eb77ea763f0efcc3 100644 (file)
 // memory, which makes for some *confusing* logs. That's why these are here
 // instead of in std.
 
-use std::run;
+use std::libc;
+use std::os;
 use std::run::*;
+use std::run;
+use std::str;
 
 #[test]
 fn test_destroy_once() {
index 3f44f3f1ef88c49182068b54c79e7e067acaf8cd..378852d81503fc1960254c7d8963b80048d64f3b 100644 (file)
@@ -12,7 +12,7 @@
 
 trait Foo {
     fn f(&self) {
-        io::println("Hello!");
+        println("Hello!");
         self.g();
     }
     fn g(&self);
@@ -24,7 +24,7 @@ struct A {
 
 impl Foo for A {
     fn g(&self) {
-        io::println("Goodbye!");
+        println("Goodbye!");
     }
 }
 
index dd4664e7446fb9a98d1bc055a8a25a287de5d411..193bb1628ef56aec43f77fdd250a378c6e533de5 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::rand;
+
 #[deriving(Rand)]
 struct A;
 
@@ -36,4 +38,4 @@ fn main() {
         rand::random::<C>();
         rand::random::<D>();
     }
-}
\ No newline at end of file
+}
index 4b98f9a73c58627e1041201ccdf2b565645852db..fcf0a009d9b24633a549f5a9488e86131352f731 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::rand;
+
 #[deriving(Rand,ToStr)]
 struct A;
 
@@ -42,4 +44,4 @@ macro_rules! t(
         t!(C);
         t!(D);
     }
-}
\ No newline at end of file
+}
index 6c565604fceecd83f19427aa81897f638fa33f0e..894c387b036fa786b9f9dcfee9161197b2922cb9 100644 (file)
@@ -15,7 +15,7 @@ struct S<T> {
 #[unsafe_destructor]
 impl<T> ::std::ops::Drop for S<T> {
     fn finalize(&self) {
-        io::println("bye");
+        println("bye");
     }
 }
 
index b516c6f6de4bde3739a018832f97f9525ebee579..258a0f88ab52adca6e4078da2972c1ea5a5b4bb5 100644 (file)
@@ -14,7 +14,7 @@ struct Foo {
 
 impl Drop for Foo {
     fn finalize(&self) {
-        io::println("bye");
+        println("bye");
     }
 }
 
index 58b192e839b385b7735138dd345091e9ed9d9a7b..57f4a41fee94b71ab4a83871bac4daa2bd33ffe0 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
 
 trait thing<A> {
     fn foo(&self) -> Option<A>;
index a8822e9a3fcfd1c791807642d191162806706aa7..7b9046318ab43ecd7886aa324f615af59296dc18 100644 (file)
@@ -10,7 +10,7 @@
 
 enum chan { chan_t, }
 
-impl cmp::Eq for chan {
+impl Eq for chan {
     fn eq(&self, other: &chan) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index cf92515e01028f455fa1bdf9f3062eaac976ce2a..19a6365a2e4c50de3ddc960a8740f05af4458a4a 100644 (file)
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cast;
+use std::ptr;
+use std::sys;
+
 fn addr_of<T>(ptr: &T) -> uint {
     let ptr = ptr::to_unsafe_ptr(ptr);
     unsafe { ptr as uint }
index 2043a170aba75438cf1c26ea0b902256a11394dc..2437946a1f094540b210d0c27c532d3aa67217f9 100644 (file)
@@ -11,6 +11,8 @@
 // xfail-fast (exec-env not supported in fast mode)
 // exec-env:TEST_EXEC_ENV=22
 
+use std::os;
+
 pub fn main() {
     assert_eq!(os::getenv(~"TEST_EXEC_ENV"), Some(~"22"));
 }
index ba2a7c6104abaedd55c3fd03ecfc69010a83a646..004761479f3792c8334f461d8169a47a43d0718a 100644 (file)
@@ -15,7 +15,7 @@ mod foo {
     // not exported
     enum t { t1, t2, }
 
-    impl cmp::Eq for t {
+    impl Eq for t {
         fn eq(&self, other: &t) -> bool {
             ((*self) as uint) == ((*other) as uint)
         }
index 13479bb80dc7d01de03d2e63d76bceace61344e6..00e0fe1f5822ec5f7e6b7be8da6d83f2cb5b6a55 100644 (file)
@@ -24,7 +24,7 @@ fn test_rec() {
 
 enum mood { happy, sad, }
 
-impl cmp::Eq for mood {
+impl Eq for mood {
     fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 57483d96e8bbdd80454570c2241e53f218ebc7f9..7cfcc38f8dd3104eb55806acb9e9757a19cf3971 100644 (file)
@@ -23,7 +23,7 @@ fn test_rec() {
 
 enum mood { happy, sad, }
 
-impl cmp::Eq for mood {
+impl Eq for mood {
     fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 6831048bee41d3d9fd2821fccaa8bea54a5aae9e..9a50c2ceb02c2733a331162f2f1635643c1cb031 100644 (file)
@@ -8,7 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index 4c5d4218b1fce456febced41931a06f3735edcaf..c4ccf645be4f4f0b56b89496f73e643fea7ad55b 100644 (file)
@@ -8,7 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index 5c4d594476ff378b3262c3bf60358e62ec2d48e4..e0f352a81efa00c3c1b298cefd42529caf210797 100644 (file)
 // make sure the stack pointers are maintained properly in both
 // directions
 
+use std::libc;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index ec335cf8a82b8d503d0a26b2d58193fcfaf4b442..4c36090015b896a3c80e4c28a472c330521f3d13 100644 (file)
@@ -8,7 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index 0db61fc8cd506c1448a4a0ae769d6b4075a3ac77..b78f607792b8fb5ff97a99af212ecbb623b97f80 100644 (file)
@@ -14,5 +14,5 @@
 use extra::json::Object;
 
 pub fn main() {
-    io::println("Hello world!");
+    println("Hello world!");
 }
index 1cd709ee91b9d5d5aebf7e1f54853cbad0a41bcb..29b0457fc0507bd8841af65a0e0ecb034d449642 100644 (file)
@@ -1,3 +1,7 @@
+use std::libc;
+use std::sys;
+use std::vec;
+
 extern {
     pub unsafe fn vec_reserve_shared_actual(t: *sys::TypeDesc,
                                             v: **vec::raw::VecRepr,
index 4257f2b2435f558380e13e29c442d36d844c0645..9da4dffffc21409d199b8720ce472e30995b56e6 100644 (file)
 // This creates a bunch of yielding tasks that run concurrently
 // while holding onto C stacks
 
+use std::libc;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index b0c44030a17249b2c926f446be60fe0db0ffe76e..75e259a38c130e53f9a709e5e75806c1667d1fd6 100644 (file)
@@ -8,7 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
                              -> libc::uintptr_t;
index eef898a05ed762b6fd81aabe2714967391ad497b..d026f041250b50dc34b2980870b5044927c5492c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 struct Struc { a: u8, b: [int, ..3], c: int }
 
 pub fn main() {
index a5246eef0b0edac9b161c328242c785ecd6dd4fc..d2c872c05345a70e36190ebdc0e594fbe3ec39f7 100644 (file)
@@ -14,9 +14,9 @@ struct S {
 
 pub fn main() {
     let x: f32 = 4.0;
-    io::println(x.to_str());
+    println(x.to_str());
     let y: float = 64.0;
-    io::println(y.to_str());
+    println(y.to_str());
     let z = S { z: 1.0 };
-    io::println(z.z.to_str());
+    println(z.z.to_str());
 }
index 501bd81d5589c95d06bc06b6865ca99f9e96d76f..ee1e73110243ee2fe395c87e244d686ae72d1744 100644 (file)
@@ -11,7 +11,7 @@
 pub fn main() {
     let v : &[(int,int)] = &[ (1, 2), (3, 4), (5, 6) ];
     for v.each |&(x, y)| {
-        io::println(y.to_str());
-        io::println(x.to_str());
+        println(y.to_str());
+        println(x.to_str());
     }
 }
index bbcb7d589233037300c210e473a6a3aa231d9d6f..4926dbd0086705fe00846c6d14bb662b823fe3df 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 struct Pair { x: int, y: int }
 
 pub fn main() {
index 6ff8b24ab833658ad4a79ae3e71516af6d2475f0..e9bf17a037ae552fe169956f58478897c03c2a7b 100644 (file)
@@ -1,3 +1,5 @@
+use std::cast;
+use std::libc;
 use std::unstable::run_in_bare_thread;
 
 extern {
index fe1d5e1200d3c41198e5dc25ae6667d193cdf8ba..200610e0dfe8dd698af6d606bd6d80bd13edf332 100644 (file)
@@ -12,6 +12,8 @@
 // calling pin_task and that's having wierd side-effects.
 
 mod rustrt1 {
+    use std::libc;
+
     #[abi = "cdecl"]
     #[link_name = "rustrt"]
     pub extern {
@@ -20,6 +22,8 @@ mod rustrt1 {
 }
 
 mod rustrt2 {
+    use std::libc;
+
     #[abi = "cdecl"]
     #[link_name = "rustrt"]
     pub extern {
index 15e14e3abe5a82aa1e28aabf95a0ccc56b1165c8..27b0c903791082c62641a73cfacce9c7a6d52683 100644 (file)
 
 extern mod extra;
 
+use std::libc;
+use std::str;
+use std::vec;
+
 mod libc {
     #[nolink]
     #[abi = "cdecl"]
index 67959be866ed401976a9e828c30c873a440ecd4a..76ce56258448320a974e3a02263df74c3ed184b1 100644 (file)
@@ -11,6 +11,8 @@
 // ABI is cdecl by default
 
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn get_task_id() -> libc::intptr_t;
     }
index 297b5e78a921c175d97da6e4115860606be1f44a..6d95f6b23ab351f018299acfdbd3196736c65c1c 100644 (file)
@@ -16,5 +16,5 @@ struct Foo {
 pub fn main() {
     let a = Foo { x: 1, y: 2 };
     let c = Foo { x: 4, .. a};
-    io::println(fmt!("%?", c));
+    println(fmt!("%?", c));
 }
index cf4279d67b84d4d617d41aa9eaa48229786ee1b5..541f9460bc0f164e094929a40a21892a3d4b0dc8 100644 (file)
@@ -2,5 +2,5 @@
 
 pub fn main() {
     let s = S(2i);
-    io::println(s.to_str());
+    println(s.to_str());
 }
index 5abef9e5f89130184ca9b64fad9f9b3b710fe671..3be685c63896a00a914dd09e35a879728e34b686 100644 (file)
@@ -19,9 +19,9 @@ pub fn main() {
     let opts = ~[optopt(~"b")];
 
     match getopts(args, opts) {
-        result::Ok(ref m)  =>
+        Ok(ref m)  =>
             assert!(!opt_present(m, "b")),
-        result::Err(ref f) => fail!(fail_str(copy *f))
+        Err(ref f) => fail!(fail_str(copy *f))
     };
 
 }
index fb82e93047da873af6df4978c81a0b3db3546eac..e73170313324873f91ff32450d2afd5addd4ed86 100644 (file)
 pub fn map(filename: ~str, emit: map_reduce::putter) { emit(filename, ~"1"); }
 
 mod map_reduce {
-    use std::hashmap::HashMap;
     use std::comm::*;
+    use std::hashmap::HashMap;
+    use std::str;
+    use std::task;
 
     pub type putter = @fn(~str, ~str);
 
index 84d525dd0e68031fd6e688f262b80f509a2301e8..93f6c3db2559f071f611ab7981fa41e81decd612 100644 (file)
@@ -9,7 +9,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 pub fn main() {
-    io::println("hello, world");
+    println("hello, world");
 }
index 74d9a34e1618ced8c99d8a4a8e90d2dee36d5e1a..b3e4a4e6711fdb54c99b659e7640cb73c87baede 100644 (file)
@@ -6,5 +6,5 @@
 pub fn main() {
     let fish1 = impl_privacy_xc_2::Fish { x: 1 };
     let fish2 = impl_privacy_xc_2::Fish { x: 2 };
-    io::println(if fish1.eq(&fish2) { "yes" } else { "no " });
+    println(if fish1.eq(&fish2) { "yes" } else { "no " });
 }
index 0e95ee25c4243122ba0097f42a953e3f3aeff559..b036a57e19cb0eee46133eadbf03fc571face5a0 100644 (file)
@@ -16,6 +16,6 @@
 
 pub fn main() {
     let mut v = from_elem(0u, 0);
-    v = vec::append(v, ~[4, 2]);
+    v = append(v, ~[4, 2]);
     assert_eq!(reversed(v), ~[2, 4]);
 }
index 2173bae85e1e1866a28923f9ade2c523b67bda25..5415a6ad25812903c8f2f84b6de01da461389b57 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
 
 // check that we do not report a type like this as uninstantiable,
 // even though it would be if the nxt field had type @foo:
index c73df8209e8b94114faa55b3e4becab47b44fa83..b7e449a1117df9e44436d6f3205e1f563922ef2d 100644 (file)
@@ -10,6 +10,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::f64;
+
 mod rusti {
     #[abi = "rust-intrinsic"]
     pub extern "rust-intrinsic" {
@@ -50,6 +52,9 @@ pub fn main() {
     unsafe {
         use rusti::*;
 
+        use std::f32;
+        use std::f64;
+
         assert!((sqrtf32(64f32).approx_eq(&8f32)));
         assert!((sqrtf64(64f64).approx_eq(&8f64)));
 
index 69fce9e541e06e49e02e9e74812b661813548cba..15f08ca23e7c9f8072e4c3b5820d13a64d1d1d17 100644 (file)
@@ -18,5 +18,7 @@
 extern mod foreign_lib;
 
 pub fn main() {
-    let foo = foreign_lib::rustrt::rust_get_argc();
+    unsafe {
+        let foo = foreign_lib::rustrt::rust_get_argc();
+    }
 }
index c14dd625a8e82cdfb7bf8ec95bfbcc8166e48a84..886ea53c299658cbd9d2362ad278c890dcd0b7e0 100644 (file)
@@ -11,6 +11,8 @@
 #[link(name = "get_task_id")];
 
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn get_task_id() -> libc::intptr_t;
     }
index d531217e550b6cfa8879d70a164cdfaaf07b432e..62088e013be1ea118532a17489530ea0f92ba4d4 100644 (file)
@@ -11,6 +11,7 @@
 // except according to those terms.
 
 use std::hashmap::HashMap;
+use std::str;
 
 pub fn main() {
     let mut m = HashMap::new();
index 3d4bed4b62fc7f7fcd9003e7771e4bc657497031..d7508bca41e1fa6b7506f40d7dcff99f991ee151 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::old_iter::BaseIter;
+use std::old_iter;
 
 trait FlatMapToVec<A> {
   fn flat_map_to_vec<B, IB:BaseIter<B>>(&self, op: &fn(&A) -> IB) -> ~[B];
index 48599b2a5383b3f738e4aa46b7d2a806da049764..4dad60225dd904ab0efe5673f64be49d9e763813 100644 (file)
 
 // tjc: I don't know why
 pub mod pipes {
-    use std::util;
     use std::cast::{forget, transmute};
+    use std::cast;
+    use std::task;
+    use std::util;
 
     pub struct Stuff<T> {
         state: state,
index bb2dbb9fe21ffe1c966eb0d0fcfe1a46967b63eb..d42d0b5aac0a01b48fdf72b621db57d72e58f484 100644 (file)
 // except according to those terms.
 
 extern mod extra;
-use std::hashmap::HashMap;
+
 use extra::json;
+use std::hashmap::HashMap;
+use std::option;
 
 enum object {
     bool_value(bool),
index 780ea2dc2c9401fb3f348f8ba8b6ba589b483ee8..e6b3f9f6f359d95199c6924585a269d94a2bb156 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 struct Cat {
     x: int
 }
index 1cb8a74e5a4fe27e0667cc69e50e23ac2c583078..7670a7eee7c07336a7eccbd84d857902725421fb 100644 (file)
@@ -15,6 +15,9 @@
 extern mod extra;
 
 use std::io::ReaderUtil;
+use std::io;
+use std::str;
+use std::to_str;
 
 enum square {
     bot,
index 8ef67840ba3cfa98c20532c8b9f8d8fcce1c219f..c13821bddf16b5dcd178025d68b9ebd714127e68 100644 (file)
 
 extern mod extra;
 
+use std::io;
+use std::uint;
+use std::vec;
+
 trait methods {
     fn to_bytes(&self) -> ~[u8];
 }
index ef115c5c02ca6c38365e0892c8f154ba76e5ee46..7d478bbabebbab24f8c44cb5766d1dbe10aff03c 100644 (file)
@@ -11,7 +11,9 @@
 // xfail-fast
 // aux-build:issue-3012-1.rs
 extern mod socketlib;
+
 use socketlib::socket;
+use std::libc;
 
 pub fn main() {
     let fd: libc::c_int = 1 as libc::c_int;
index d4eb0793dac5336b48fc778583acba84a11ba865..fbe66708e476ddccda7cf880ab57bfee901ac010 100644 (file)
@@ -10,6 +10,9 @@
 
 // xfail-fast
 
+use std::comm;
+use std::task;
+
 pub fn main() {
     let (p,c) = comm::stream();
     do task::try || {
index 54094a0c008a3f2a86cbfd1e6ecd114fc3798d37..96648a2706b6d0fb93e7b977ff9b174b5a96c403 100644 (file)
@@ -11,6 +11,8 @@
 // xfail-fast
 
 use std::comm::{Select2, Selectable};
+use std::comm;
+use std::task;
 
 pub fn main() {
     let (p,c) = comm::stream();
index 360df3259196571efd3ad3d58c39f430b0be0baa..c7b0823296c67a454ff764a0ffd59345b17cd3d5 100644 (file)
@@ -4,5 +4,5 @@ pub fn main() {
         x += 1;
     }
     assert_eq!(x, 4096);
-    io::println(fmt!("x = %u", x));
+    println(fmt!("x = %u", x));
 }
index 6203f14f10f2e0f2abf3e1f2969e9200787f657f..d9919b1695d75548ed362abae5562cd7d4164633 100644 (file)
@@ -15,7 +15,7 @@ struct trie_node {
 
 fn print_str_vector(vector: ~[~str]) {
     for vector.each() |string| {
-        io::println(*string);
+        println(*string);
     }
 }
 
index a6eb5097b36fcb9f1747a89b58e68e13805dfb53..a40d1cf1c6ef15398b3b53f193d2794194cebd28 100644 (file)
 
 // rustc --test ignores2.rs && ./ignores2
 extern mod extra;
+
 use std::path::{Path};
+use std::path;
+use std::result;
 
 type rsrc_loader = ~fn(path: &Path) -> result::Result<~str, ~str>;
 
index 191259e5a57e2076a0b13efad62ae75553826b25..20355238e3ebbd371ce2b3f35e9ba71523c71a93 100644 (file)
@@ -17,7 +17,7 @@ pub impl<'self, T> list<'self, T>{
     fn addEnd(&mut self, element: &'self T) {
         let newList = list {
             element: element,
-            next: option::None
+            next: None
         };
 
         self.next = Some(@mut newList);
@@ -28,7 +28,7 @@ pub fn main() {
     let s = @"str";
     let ls = list {
         element: &s,
-        next: option::None
+        next: None
     };
-    io::println(*ls.element);
+    println(*ls.element);
 }
index ca67f1dae431beb7588cbdf6345ebae0c773eb29..6709ef761a44cd95b134f7a9fd39c2a6242bb715 100644 (file)
@@ -9,7 +9,9 @@
 // except according to those terms.
 
 extern mod extra;
+
 use std::io::WriterUtil;
+use std::io;
 
 enum Token {
         Text(@~str),
index bfdf4aa053dafd5d1f18276ed1875cbebcb40423..10d448b7952f82e4e7cf41b35c0e12fc3ce4d672 100644 (file)
 
 // Extern mod controls linkage. Use controls the visibility of names to modules that are
 // already linked in. Using WriterUtil allows us to use the write_line method.
+use std::int;
 use std::io::WriterUtil;
+use std::io;
+use std::str;
+use std::vec;
 
 // Represents a position on a canvas.
 struct Point {
index a1aced7b5df0ad773247b9e9053786f57724bed4..ab62d9c41425b946b9bd7effbffbf1d1ce122714 100644 (file)
@@ -1,6 +1,8 @@
 extern mod extra;
 
 use std::comm::Chan;
+use std::task;
+use std::uint;
 
 type RingBuffer = ~[float];
 type SamplesFn = ~fn(samples: &RingBuffer);
index 7c2f8cf98cb8a297f0f5906ae012b7b911d8a984..7d65d6e984c4bf563c324339e35fb09c4affcbb3 100644 (file)
@@ -14,7 +14,7 @@ trait Text {
   }
 
   fn to_string(t: @Text) {
-    io::println(t.to_str());
+    println(t.to_str());
   }
 
 }
index 948ff1afd81c36adb6bd440c6e261106b5e9cf4c..825a49e91b08efc1c2038f68bfd42183a3c1b94b 100644 (file)
@@ -12,6 +12,8 @@
 // Issue Name: pub method preceeded by attribute can't be parsed
 // Abstract: Visibility parsing failed when compiler parsing
 
+use std::float;
+
 struct Point {
     x: float,
     y: float
@@ -33,5 +35,5 @@ pub fn area(&self, sh: Shape) -> float {
 
 pub fn main(){
     let s = Circle(Point { x: 1f, y: 2f }, 3f);
-    io::println(fmt!("%f", s.area(s)));
+    println(fmt!("%f", s.area(s)));
 }
index 4d1b042661c322f2b9277e4ae91e1de4814f0321..b5f41dd1630e0cf71b2bcbf0cac2268e6a16014c 100644 (file)
@@ -18,5 +18,5 @@ pub fn main() {
         buildings::Tower { height: h } => { h }
     };
 
-    io::println(h.to_str());
+    println(h.to_str());
 }
index 2992d9a4ac837d2ae2c6fb03a67f3e37774a3ccc..60c5062443514f3fbc5e8172aacefda9311a19c5 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn vec_peek<'r, T>(v: &'r [T]) -> &'r [T] {
 // This doesn't work, and should.
 //    v.slice(1, 5)
index 159ba4bb2559e1f712c176ab1444d1cc673dae70..98280271bdea6fe97d57079daedda69a202b9e9a 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
+
 fn main() {
     let stdout = &io::stdout() as &io::WriterUtil;
     stdout.write_line("Hello!");
index 73faa9845e771ea1c13c798039efd7f87ef81be9..d0d211c109c852218af93b8252ee903ab38cb219 100644 (file)
@@ -4,5 +4,5 @@ pub fn main() {
         count += 1;
     }
     assert_eq!(count, 999_999);
-    io::println(fmt!("%u", count));
+    println(fmt!("%u", count));
 }
index e1ec65bc10ff0f2db61fd581e5cd936845234cca..212406f9a205f3513945684bb65192bba1ec3151 100644 (file)
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::comm;
+use std::task;
+
 pub fn main() {
     let (port, chan) = comm::stream::<&'static str>();
 
index d0db5e5cb3ce467113d7b89364741237ea010ea7..064413dd93cb5dc9be6e676579f5768faf7a09cd 100644 (file)
@@ -1,3 +1,3 @@
-fn foo<T: ::cmp::Eq>(t: T) { }
+fn foo<T: ::std::cmp::Eq>(t: T) { }
 
 fn main() { }
index b80e37a425b4339761741c1aca17d26940cc8cba..d6d09cb0510224872b20c973ab98a9cf0709fc52 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::io;
+
 fn main() {
     return;
     while io::stdin().read_line() != ~"quit" { };
index 5a1d54c48b5d2519cd8ebece7d96e5921626994b..de11ce2bdf2cd54ccbf234cbe5eb921f3c2ea960 100644 (file)
@@ -167,6 +167,8 @@ pub fn f() { }
 
 mod test_foreign_items {
     pub mod rustrt {
+        use std::libc;
+
         #[abi = "cdecl"]
         pub extern {
             #[attr];
index b21ddc656c93c99a39bddf699c3efa39411c04ed..b3177d1f84f2cc6222a3d86083fbcdc00707bec4 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn is_even(x: &uint) -> bool { (*x % 2) == 0 }
 
 pub fn main() {
index 657c8d7c624591223baf61aaf9e45ad643e1efc0..08a89f8dd226133ad3f54c0dc87a9f27d31d9acd 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn is_even(x: &uint) -> bool { (*x % 2) == 0 }
 
 pub fn main() {
index 5d5db170efe42d66e7f5907bee9bd1e5a37032cc..5034102c7307c43e8385f36206d04c63dc4dd38c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 pub fn main() {
     assert_eq!([].contains(&22u), false);
     assert_eq!([1u, 3u].contains(&22u), false);
index 3f717195fbc4bbca7da5d8e50ec3967dd208073f..3f867e49bd43e594dc1bd3c29565b79ac42fa44c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 pub fn main() {
     assert_eq!([].count(&22u), 0u);
     assert_eq!([1u, 3u].count(&22u), 0u);
index 781f02230c01be766c94a93a7b1fe087e3a43c08..0740f2cb8e46e10047a456314a87fc3d46ade32d 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 pub fn main() {
     let mut c = 0u;
     for [1u, 2u, 3u, 4u, 5u].eachi |i, v| {
index 0bb7cd1c4dd3649a61cad8d28422f18778bf0749..2b254765c763fe4d2d8b899ba426d8ff33ccbc7b 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn is_even(x: &uint) -> bool { (*x % 2) == 0 }
 
 pub fn main() {
index af23905fe76eab4dd22f360f7c368e991ee02f1b..b0b61aaa816c5a019bd3229a2ebb28881540ffde 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn repeat(x: &uint) -> ~[uint] { ~[*x, *x] }
 
 fn incd_if_even(x: &uint) -> Option<uint> {
index f40abe0c56c1bb274b8d5aab4a6bc2ca30569e70..7e5890b3e3a3306624fe9baaa75647a14ab75fbb 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn add(x: &float, y: &uint) -> float { *x + ((*y) as float) }
 
 pub fn main() {
index e9fd68d10f1b9a654ef58f6737ac3402f2735d29..706f0c5c150e1e5658231eb339d7e6232b68a5e4 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn inc(x: &uint) -> uint { *x + 1 }
 
 pub fn main() {
index 6ce24aedf13e1dc50b9f02f3950f9ca7e400b242..9020976029d25700b46299a3eaac517680739ab9 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 fn is_even(x: uint) -> bool { (x % 2u) == 0u }
 
 pub fn main() {
index b7f2ac77074a2b62eb5cdc0f026bf77d7847e2b7..317b608963790e3edfa5082b604c1dd0187ec76e 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::old_iter;
+
 pub fn main() {
     assert_eq!([1u, 3u].to_vec(), ~[1u, 3u]);
     let e: ~[uint] = ~[];
index 5b1102a1917b58c83e5ecbcd74c3dd56b615c41d..8d87ff400614cb847249307f5600465708cc5070 100644 (file)
@@ -1,4 +1,5 @@
 use std::comm::*;
+use std::task;
 
 fn producer(c: &Chan<~[u8]>) {
     c.send(
index 0afc3ee87e0f47edcf9e1b62dfc9bc1e13d88380..2a341474872c32b12ec90860aa92141b1109d1df 100644 (file)
@@ -11,7 +11,7 @@
 fn f() {
     let a = ~"hello";
     let b: &str = a;
-    io::println(b);
+    println(b);
 }
 
 pub fn main() {
index c9f768d7606eee1d88d08f98f0563da37996c337..7ab915a96284f89d3ab1e94fef544badabc18b89 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
+use std::str;
 
 pub fn main() {
     let x = ~[1, 2, 3];
index d45602d9ed1ffd2579457b3101bff03b7b3ef83f..fc48f4aea0c1e8ea38f594d5092abb11550bbe84 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 pub fn main() {
     let act = sys::log_str(&~[1, 2, 3]);
     assert_eq!(~"~[1, 2, 3]", act);
index 4eb0cd81bc32010631fd2da6cb0fe437ac0a6fdf..04486a83455bd8e348e95d0bf6749170a17cf47e 100644 (file)
@@ -11,6 +11,9 @@
 // xfail-win32 leaks
 extern mod extra;
 
+use std::task;
+use std::uint;
+
 fn die() {
     fail!();
 }
index ed7a631637433b7196a47229fd4f065f62e5444e..a199a75de56cbe90ff309e3d38643761ac2214d5 100644 (file)
@@ -8,12 +8,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::unstable;
+
 pub fn main() {
-    let x = Some(unstable::sync::exclusive(true));
-    match x {
-        Some(ref z) if z.with(|b| *b) => {
-            do z.with |b| { assert!(*b); }
-        },
-        _ => fail!()
+    unsafe {
+        let x = Some(unstable::sync::exclusive(true));
+        match x {
+            Some(ref z) if z.with(|b| *b) => {
+                do z.with |b| { assert!(*b); }
+            },
+            _ => fail!()
+        }
     }
 }
index f46521f1d55171d36fa3e750973fd715653c5454..fb85064bfdee56e7fbc557a2e58eba43f47aa74c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 pub fn main() {
     // sometimes we have had trouble finding
     // the right type for f, as we unified
index d986d7e676a127918bc81b94eeb56db8bc3669da..87e80568c32232912fbca7303d4941434d6693c4 100644 (file)
@@ -35,5 +35,5 @@ fn Foo(x: int, y: int) -> Foo {
 
 pub fn main() {
     let foo = Foo(3, 20);
-    io::println(fmt!("%d %d", foo.sum(), foo.product()));
+    println(fmt!("%d %d", foo.sum(), foo.product()));
 }
index 6803eb1c6d78af698477f7dc50462ee26b614949..69545238db4033f1abddf887c9584a45d98100af 100644 (file)
@@ -10,6 +10,8 @@
 
 // xfail-fast
 
+use std::int;
+
 trait vec_monad<A> {
     fn bind<B:Copy>(&self, f: &fn(&A) -> ~[B]) -> ~[B];
 }
index efbf9302117ff956d0fb9ffafc3ac84c75f527ee..eb3c1e4cd27cc5ebf823d0ea72e3a5f084775163 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::io;
+
 trait Serializer {
 }
 
index 492196ed7f0d5e922f763447f68eba7380e1c0c0..7f947e332c0796b55ebdf4d71fc0ea7765ac2acf 100644 (file)
@@ -12,6 +12,8 @@
 
 extern mod extra;
 
+use std::task;
+
 fn getbig(i: int) {
     if i != 0 {
         getbig(i - 1);
index 79c66ba72b0c7b8971a5def6cb0040f49aaaab9f..1dc8503aeb22adea73d2083aabf79cffeb0a7818 100644 (file)
 // This test attempts to force the dynamic linker to resolve
 // external symbols as close to the red zone as possible.
 
+use std::rand;
+use std::task;
+
 mod rustrt {
+    use std::libc;
+
     pub extern {
         pub fn debug_get_stk_seg() -> *u8;
 
index 7b71fc4f86ecb4d1ed4afa60ec2781f3d4fa52ed..1df2e3a382d5d08bf791f7c627d80fc57b95fa9c 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::uint;
+
 struct Triple { x: int, y: int, z: int }
 
 fn test(x: bool, foo: ~Triple) -> int {
index 64519034ebe7ae4a240a697edfdcad5265256f53..a52f34c54db4558fe0570c120a35bae8156ae748 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::uint;
+
 struct Triple { x: int, y: int, z: int }
 
 fn test(x: bool, foo: @Triple) -> int {
index 4ed1faf65b628149cbf4d21a177ca480961bb1b3..61ece52453e3a1ca27ef72a0c9ee60ef34e85a08 100644 (file)
@@ -8,7 +8,7 @@ fn foo(self) {
     }
 
     fn bar(self) {
-        io::println(self.x);
+        println(self.x);
     }
 }
 
index 26d4773d961aa6855dd2dfbb7721de690582ea08..349be13e3232a71787648bca5c41e833593b5569 100644 (file)
@@ -1,6 +1,8 @@
+use std::task;
+
 pub fn main() {
     let x = ~"Hello world!";
     do task::spawn {
-        io::println(x);
+        println(x);
     }
 }
index 7cb959b3437cccbd2080d4a962f482880cc19e9d..417662b65c6f10c89796eb89a70f7d602b2d5045 100644 (file)
@@ -10,5 +10,5 @@
 
 // Test that multibyte characters don't crash the compiler
 fn main() {
-    io::println("마이너스 사인이 없으면");
+    println("마이너스 사인이 없으면");
 }
index aef857f36ee068bc74d369be4b0fa401d0447131..0b4f92f1d7ca9ebe9403980ec5a54a97f88f0ef1 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 fn test1() {
     let mut ints = [0, ..32];
     ints[0] += 1;
index b058df7fc7a0f81e0650c60551f1e24562949aac..91f4fdb01f638fbc6ea66f5130e830bdc9542eac 100644 (file)
@@ -8,11 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
 // -*- rust -*-
 extern mod extra;
 
+use std::vec;
+
 fn grow(v: &mut ~[int]) { *v += ~[1]; }
 
 pub fn main() {
index 2603353f0cff8a2c2ace9b8663c6e10f5bf671cf..71c13ecb9a30289c1f2300f8ed6d08886a7d948d 100644 (file)
@@ -20,6 +20,6 @@ fn to_str(&self) -> ~str {
 }
 
 pub fn main() {
-    io::println(Thingy { x: 1, y: 2 }.to_str());
-    io::println(PolymorphicThingy { x: Thingy { x: 1, y: 2 } }.to_str());
+    println(Thingy { x: 1, y: 2 }.to_str());
+    println(PolymorphicThingy { x: Thingy { x: 1, y: 2 } }.to_str());
 }
index 6d36357ccfa1353eb71732125b99d66d7779a135..d26210e9a4c1ccd15b4cf5782cb69c09d80354e8 100644 (file)
@@ -16,6 +16,6 @@ struct Mytype {compute: extern fn(mytype) -> int, val: int}
 
 pub fn main() {
     let myval = mytype(Mytype{compute: compute, val: 30});
-    io::println(fmt!("%d", compute(myval)));
+    println(fmt!("%d", compute(myval)));
     assert_eq!((myval.compute)(myval), 50);
 }
index 1e8ddc2905e5433bd981f7e15b3c738e48d2cfd8..704fd4eafba2fca22a7f97308c8e60decc6c69ab 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 enum E<T> { Thing(int, T), Nothing((), ((), ()), [i8, ..0]) }
 struct S<T>(int, T);
 
index b54e3188dae4c3de0a365c9fb25f5d1964e1d53e..e75af5729d5c2c36e6622b82f8c7f7d2259c6e11 100644 (file)
@@ -10,6 +10,9 @@
 
 // xfail-fast
 
+use std::cmp;
+use std::ops;
+
 struct Point {
     x: int,
     y: int
index 63114da9d9db7582503c4373c3d17571292b124c..7355bde61f3a6175ceec076beb4301daf9f10e2a 100644 (file)
@@ -8,11 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::str;
+
 pub fn main() {
     let thing = ~"{{ f }}";
     let f = str::find_str(thing, ~"{{");
 
     if f.is_none() {
-        io::println(~"None!");
+        println(~"None!");
     }
 }
index fd6e3b670f5ab85f749b86d81a537521f17c76a8..18b3cf2f91e9a494e37068742e9b792088c03840 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cast;
+
 #[packed]
 struct S<T, S> {
     a: T,
index a5c4d5385a297a0c2449f829e29918d3c24182d7..98e922c3288dda369e276ce2cdf9b14b7954b0b7 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 #[packed]
 struct S<T, S> {
     a: T,
index 8d27e55e191a4b87630c7a9dd198c8a782239306..ea51bbcea32d492862593b16ca56891b78a4ee0c 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cast;
+
 #[packed]
 struct S4 {
     a: u8,
index ddfc2b17aa70625ef96fdf4edc56e6f0f464b2b5..19f6046c7d69384459d28ec9058b481348a53c35 100644 (file)
@@ -3,6 +3,8 @@
 
 extern mod packed;
 
+use std::sys;
+
 fn main() {
     assert_eq!(sys::size_of::<packed::S>(), 5);
 }
index 372fe3d37f69d347b8f4e888e27a0a52b430dc87..6dcb1f04a4d5e43e4da56669694f171df0a7943d 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 #[packed]
 struct S4 {
     a: u8,
index b1ac29b7721a8d2e81f962fffdefe31d403afb18..1f3d4c26bd23ab643714e1dada94ced16294b303 100644 (file)
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+use std::uint;
+
 #[packed]
 #[deriving(Eq)]
 struct Foo {
index 9c2fe621a321ac13457e683c5dd30296e99653e7..3691f475098200a60dfda4a46eddf9df63c9a50e 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cast;
+
 #[packed]
 struct S4(u8,[u8, .. 3]);
 
index 23faa2eb0adc9d47d484681c50ca45a5ace18a09..c8f2dda61dbe2e766c71a543fb2059add4334ca9 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 #[packed]
 struct S4(u8,[u8, .. 3]);
 
index a2630c398032fb279d528520d21dcfe01becc35e..5a0f9ed6eb46f4442194eea3930f56815f9e3db5 100644 (file)
@@ -12,6 +12,8 @@
 // pattern-bound var is an upvar (when translating
 // the for-each body)
 
+use std::uint;
+
 fn foo(src: uint) {
 
     match Some(src) {
index 08c749235c2c8f47599afa82d9da8736fc7640bc..bee3583c6a496f1e90b291e6dd1c16975ac1530a 100644 (file)
@@ -14,8 +14,8 @@ struct Foo {
 }
 
 pub fn main() {
-    let f = |(x, _): (int, int)| io::println((x + 1).to_str());
-    let g = |Foo { x: x, y: y }: Foo| io::println((x + 1).to_str());
+    let f = |(x, _): (int, int)| println((x + 1).to_str());
+    let g = |Foo { x: x, y: y }: Foo| println((x + 1).to_str());
     f((2, 3));
     g(Foo { x: 1, y: 2 });
 }
index 83031b4670450afd115d03e91700b4d223922944..d723fa3220945b34a214d468f8939a5232a30b45 100644 (file)
@@ -17,6 +17,7 @@
 
 use std::pipes;
 use std::pipes::try_recv;
+use std::ptr;
 
 pub type username = ~str;
 pub type password = ~str;
@@ -81,7 +82,7 @@ fn client_follow(bank: bank::client::login) {
     let bank = client::withdrawal(bank, 50.00);
     switch(bank, follow! (
         money(m) -> _next {
-            io::println(~"Yay! I got money!");
+            println(~"Yay! I got money!");
         }
         insufficient_funds -> _next {
             fail!("someone stole my money")
@@ -105,7 +106,7 @@ fn bank_client(bank: bank::client::login) {
     let bank = client::withdrawal(bank, 50.00);
     match try_recv(bank) {
       Some(money(*)) => {
-        io::println(~"Yay! I got money!");
+        println(~"Yay! I got money!");
       }
       Some(insufficient_funds(_)) => {
         fail!("someone stole my money")
index d922eef5dbb1d9e3835e5e5a100131d9e1fa833f..ae846217318a2b2f2c437db1b314de6338e59549 100644 (file)
@@ -20,6 +20,7 @@
 
 use std::cell::Cell;
 use std::pipes::{try_recv, recv};
+use std::task;
 
 proto! oneshot (
     waiting:send {
index b4c92dc0614bbdbb18236a90906374c5a98f4038..d36289f33c8f8cd8dbd7dad92aa0caf4e331992b 100644 (file)
@@ -15,6 +15,7 @@
 // protocols.
 
 use std::cell::Cell;
+use std::task;
 
 // This was generated initially by the pipe compiler, but it's been
 // modified in hopefully straightforward ways.
index 95502b14c53147d1827bd1823cf9d069c739f101..18cb4059307765ea7121206ddd4f6134b7e79698 100644 (file)
@@ -14,6 +14,7 @@
 
 use std::cell::Cell;
 use std::option;
+use std::task;
 
 proto! pingpong (
     ping:send {
index a386c3a2e05e0032ad64a5501ee0c62346a0d816..309092b14b58ff6624738651e96cf3ac62936440 100644 (file)
@@ -18,8 +18,9 @@
 use extra::uv;
 
 use std::cell::Cell;
-use std::pipes;
 use std::pipes::*;
+use std::pipes;
+use std::task;
 
 proto! oneshot (
     waiting:send {
@@ -110,8 +111,8 @@ fn test_select2() {
     stream::client::send(ac, 42);
 
     match pipes::select2(ap, bp) {
-      either::Left(*) => { }
-      either::Right(*) => { fail!() }
+      Left(*) => { }
+      Right(*) => { fail!() }
     }
 
     stream::client::send(bc, ~"abc");
@@ -124,8 +125,8 @@ fn test_select2() {
     stream::client::send(bc, ~"abc");
 
     match pipes::select2(ap, bp) {
-      either::Left(*) => { fail!() }
-      either::Right(*) => { }
+      Left(*) => { fail!() }
+      Right(*) => { }
     }
 
     stream::client::send(ac, 42);
index 674ad5f340563c52dae9f39b600a3807e1704008..97fefde6cff8f72d51c7a68f2e602094f70d607f 100644 (file)
 // except according to those terms.
 
 extern mod extra;
+
 use extra::timer::sleep;
 use extra::uv;
 use std::cell::Cell;
-use std::pipes;
 use std::pipes::*;
+use std::pipes;
+use std::task;
 
 proto! oneshot (
     waiting:send {
index 1dafbca22f72d66b4c3182f8a892ef42cc1009eb..839f40fe67f57c2d185a235bbbcdf52911929497 100644 (file)
@@ -17,6 +17,6 @@ pub fn main() {
     let mut arena = arena::Arena();
     let p = &mut arena;
     let x = p.alloc(|| 4u);
-    io::print(fmt!("%u", *x));
+    print(fmt!("%u", *x));
     assert_eq!(*x, 4u);
 }
index 774f2470b3cd33be6718433bd150e792f0596104..ea39d00edf7167c3ff39de45b0eb325b06f49a5a 100644 (file)
@@ -12,6 +12,8 @@
 // The OS main scheduler should continue to be available and not terminate
 // while it is not in use.
 
+use std::task;
+
 pub fn main() {
     run(100);
 }
index 1fab77cb5c8672d01ca59b506ded367e1faffc14..2b811a69db0bf79c176b862d7a7b1acd51968b8d 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
+
 struct cat {
     priv meows : uint,
 
index 188dca2f03937628b26356fee0d540e4cef81661..5eaf12f6a5182ef04b541036b8fbb7df2dd0a869 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 trait sum {
     fn sum(self) -> int;
 }
index 202f6a4ac642687863285395959e1deeecfbb429..475b9153fdc910ed43b6201905a4b1aa4749b111 100644 (file)
@@ -10,6 +10,8 @@
 
 // Issue #2303
 
+use std::sys;
+
 mod rusti {
     #[abi = "rust-intrinsic"]
     pub extern "rust-intrinsic" {
index 49092c26c9534e03c571a14d0909c927cc371eee..8c67b971243f3e3e0b28b270008fc2d7b28cb4a8 100644 (file)
@@ -10,6 +10,8 @@
 
 // Issue #2303
 
+use std::sys;
+
 mod rusti {
     #[abi = "rust-intrinsic"]
     pub extern "rust-intrinsic" {
index 9663beb279e5bd167338fee87063ce861e8ae022..387e21fb9d6394d0352225fbce8fa74dc486f4be 100644 (file)
 // xfail-fast
 
 use std::bool;
+use std::int;
 use std::libc::c_void;
+use std::ptr;
+use std::sys;
 use std::vec::UnboxedVecRepr;
 use intrinsic::{TyDesc, get_tydesc, visit_tydesc, TyVisitor, Opaque};
 
@@ -654,7 +657,7 @@ pub fn main() {
         visit_tydesc(td, v);
 
         for (u.vals.clone()).each |s| {
-            io::println(fmt!("val: %s", *s));
+            println(fmt!("val: %s", *s));
         }
         error!("%?", u.vals.clone());
         assert!(u.vals == ~[
index 33d147c22b612cf02a139faad1e38a9cf641e32a..702b64881abe1834b14b78403102ac1b690eb661 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::uint;
 use std::util;
 
 pub fn main() {
index 0ea6f852a897ca8e7659dc98950772e6e6dbfdbe..56000d7471d59ee06b179d7996d39a13e7f29723 100644 (file)
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::cast;
+use std::libc;
+use std::sys;
+
 struct arena(());
 
 struct Bcx<'self> {
index f498553834a1eeebf2fe4379e3f5089254c1d9d3..3ce5ea66781f20a08060ecf748a4d5c08f7171da 100644 (file)
@@ -10,6 +10,8 @@
 
 // Don't leak the unique pointers
 
+use std::cast;
+
 struct r {
   v: *int,
 }
index 2a59d4d2190d18d27d88c87fe110a2995a41dbda..0f031424ad4ac43fa0e56f832a8c9889ce82055d 100644 (file)
@@ -10,6 +10,8 @@
 
 // Don't leak the unique pointers
 
+use std::cast;
+
 struct U {
     a: int,
     b: int,
index ef713724778625f8ded20c6977a87d8de4a779f1..f3ca932778a88474cee65423fc6265cb64b2ab28 100644 (file)
@@ -12,6 +12,8 @@
 
 // Don't leak the unique pointers
 
+use std::cast;
+
 struct U {
     a: int,
     b: int,
index 9a547bd4bdf4654c70d35898a3ed3a0dfecb93d9..d9d4b332f5f91c986bec11342c921bfbfc9b23ad 100644 (file)
@@ -11,6 +11,7 @@
 // xfail-fast
 
 use std::cmp::Eq;
+use std::vec;
 
 fn iter<T>(v: ~[T], it: &fn(&T) -> bool) -> bool {
     let mut i = 0u, l = v.len();
index a60b24987c85b5c233432218f8ea0290107d12c6..d1767235a2bfdae84cdb6a9646a4c7c949e99ba1 100644 (file)
@@ -10,7 +10,9 @@
 
 // Tests of the runtime's scheduler interface
 
+use std::cast;
 use std::comm::*;
+use std::libc;
 
 pub type sched_id = int;
 pub type task_id = *libc::c_void;
@@ -21,6 +23,8 @@
 mod rustrt {
     use super::{closure, sched_id, task, task_id};
 
+    use std::libc;
+
     pub extern {
         pub fn rust_new_sched(num_threads: libc::uintptr_t) -> sched_id;
         pub fn rust_get_sched_id() -> sched_id;
index ed0a5263035bf91b45b840676663e170e26feb59..4977082e7ed12a3e983c7837c9d786efab654c19 100644 (file)
 // xfail-win32
 extern mod extra;
 
+use std::comm;
+use std::task;
+use std::uint;
+
 fn die() {
     fail!();
 }
index 17789e0b50942aa24e57b88a5edbdf7e4a9fb3f4..a2cee0082b5e7ce6d0ca3d0a62e05b85140c5b8d 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::comm::*;
+use std::task;
 
 struct test {
   f: int,
index 8ef0173dbd32758141af9871ffdbb4dd3e0b873f..6b262966277c5c76133ded21fc18c5f826a42be8 100644 (file)
@@ -10,6 +10,8 @@
 
 // Test that a class with only sendable fields can be sent
 
+use std::comm;
+
 struct foo {
   i: int,
   j: char,
index 2351540baa93fedd93db963efd8237c235ab4658..31a1e7bded7bf17192a126fe1b0eae39c3cce1b7 100644 (file)
@@ -10,6 +10,8 @@
 
 // xfail-fast
 
+use std::task;
+
 pub fn main() { test05(); }
 
 struct Pair<A,B> { a: A, b: B }
index 19e853199273eecabecb863b96e8cfc0cd59e926..d9f491297ea0028e06a93ccb042670d04d4fe66b 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::cell::Cell;
+use std::task;
 
 pub fn main() { test05(); }
 
index f47faca52c06e598b344625195b07aac15b24ae5..94760ce36b57fe44217e8e740298d19f0fc217e6 100644 (file)
@@ -11,4 +11,4 @@
 
 // pp-exact
 
-pub fn main() { io::println("Hello World"); }
+pub fn main() { println("Hello World"); }
index 37501a61066d37513f56406d49ccab555ccb5a2b..e3e39b9d5b5b8e0eaf09672f7b64c9bffc22cd47 100644 (file)
@@ -9,6 +9,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
 
 fn x(s: ~str, n: int) {
     debug!(s);
index 58b7b8c09a5a0896c14752966161297f688f37f4..f448d74c4bd5b52ca1045e939552e07ed431593b 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 use std::comm::*;
+use std::task;
 
 type ctx = Chan<int>;
 
index fef00549fa7710f8116291d5879f7aa2c8c01be0..dff73aa7b8e9894221c27ba32bc26fc7f7b1cc73 100644 (file)
@@ -9,9 +9,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 extern mod extra;
 
+use std::task;
 
 pub fn main() {
     task::spawn(|| child(10) );
index cb35f0828f241ae0804ee25eaa660e9aba92cfdd..61ed7053456ca4e6f7ba0e0958ec33bd7cb6b766 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 pub fn main() { task::spawn(|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }
 
 fn child(args: (int, int, int, int, int, int, int, int, int)) {
index 9008e9452dbc5412e194072fe5af3a166c7dd6ca..dc68777e033b0f91659bc9495c765aa023fa39cf 100644 (file)
@@ -10,6 +10,8 @@
 
 // Issue #2040
 
+use std::ptr;
+
 pub fn main() {
     let foo = 1;
     assert_eq!(ptr::to_unsafe_ptr(&foo), ptr::to_unsafe_ptr(&foo));
index f9216135038a8057f1ba2a07294a86c82863f0a8..a3774d58ee7865a628dddf15b711a06ad83c3ec0 100644 (file)
 // xfail-fast
 
 extern mod extra;
-use std::io::WriterUtil;
+
 use extra::tempfile;
+use std::io::WriterUtil;
+use std::io;
+use std::os;
+use std::uint;
 
 pub fn main() {
     let dir = tempfile::mkdtemp(&Path("."), "").unwrap();
index e96ab30f037d024020bbafaf8a9f7affba73443d..46457f667aed4e2795d201693b50fb3c9149a153 100644 (file)
@@ -10,6 +10,9 @@
 
 // xfail-fast
 
+use std::uint;
+use std::vec;
+
 pub trait plus {
     fn plus(&self) -> int;
 }
index 3ae8768e41e3209805695cf97c8f50a87afdacc0..4dde143f686be0ef25e08f45715e53371b5d9b69 100644 (file)
 
 // xfail-fast
 
+use std::at_vec;
+use std::uint;
+use std::vec;
+
 // A trait for objects that can be used to do an if-then-else
 // (No actual need for this to be static, but it is a simple test.)
 trait bool_like {
index 946c86ab298c6edcac46b1079bcab646d2fcd820..6697daa28b650deeb50dc7697884ca9140cba5ee 100644 (file)
@@ -12,6 +12,7 @@
 // aux-build:static-methods-crate.rs
 
 extern mod static_methods_crate;
+
 use static_methods_crate::read;
 
 pub fn main() {
index 6fe383a64a21aa8b050c503df7e86657c8f67926..f02600bb137c0060f99ef03e24cfd20b2ceeca7d 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::str;
+
 pub fn main() {
     // Make sure we properly handle repeated self-appends.
     let mut a: ~str = ~"A";
index 884459cf069f45ae62a52a808fd062c046778973..cfa0401e5b942209da7588d567fc6a098d88ee06 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::str;
+
 struct S { f0: ~str, f1: int }
 
 pub fn main() {
index 419c4ac3942f8c49ba670f68e49ceb33fc1a980a..f58e5bab3febfb521df48bd0fe7d655d3b02c741 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::str;
+
 struct S { f0: ~str, f1: ~str }
 
 pub fn main() {
index 1bda2d2412d2a96e253b00f824de118471c0df7e..68fa137397525321f0cdad4fae049841c213f05d 100644 (file)
@@ -16,6 +16,6 @@ struct Foo {
 pub fn main() {
     let a = Foo { x: 1, y: 2 };
     match a {
-        Foo { x: x, y: y } => io::println(fmt!("yes, %d, %d", x, y))
+        Foo { x: x, y: y } => println(fmt!("yes, %d, %d", x, y))
     }
 }
index d03bc594bb42dc3d272876f5e47e2ddc6d7b43d0..c67a72e90c9e15a6c52a7b9b7c38086450dc4a6f 100644 (file)
@@ -12,7 +12,7 @@
 
 enum foo { large, small, }
 
-impl cmp::Eq for foo {
+impl Eq for foo {
     fn eq(&self, other: &foo) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 791f493b5ccc98b50e2c0dd2fcd4bc0182c432e9..36e41242f8f7516a07e3e32ca4297b8fbbaed870 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::libc;
+
 pub fn main() {
   let f = 1 as *libc::FILE;
   debug!(f as int);
index 52092b994f96ffbeab1b43eecbc42984d955cfba..cf3a465d812defe59e522b4a9541556ce70f1899 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::util;
+use std::vec;
 
 pub fn main() {
     let mut a: ~[int] = ~[0, 1, 2, 3, 4, 5, 6];
index 1f1b121d362a7dd81aa1d1086b72a61b05eec3f5..d1d84137334082fd379eee56345677608a8070f3 100644 (file)
@@ -10,6 +10,7 @@
 
 // Issue #5041 - avoid overlapping memcpy when src and dest of a swap are the same
 
+use std::ptr;
 use std::util;
 
 pub fn main() {
index a562b79e4fd06e151e56ce53608272dff6bf5d46..d1dec9c44e0f2472080068fccb0791f8faabac69 100644 (file)
@@ -18,7 +18,7 @@ enum color {
 
 pub fn main() {
     let act = fmt!("%?", red);
-    io::println(act);
+    println(act);
     assert_eq!(~"red", act);
     assert_eq!(~"green", fmt!("%?", green));
     assert_eq!(~"white", fmt!("%?", white));
index d1e26a9c50c4a05837e18d57e3e45d504adb5a8e..a6252bf5f38d917d662b4cdbf86d239b10b7b654 100644 (file)
@@ -19,7 +19,7 @@ enum color {
     orange = 8 >> 1
 }
 
-impl cmp::Eq for color {
+impl Eq for color {
     fn eq(&self, other: &color) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 626e0938aedca3312024916ffce5ff1c244c84e0..ff251a70f655707ff0fad7e95dae350bd8620c57 100644 (file)
@@ -8,13 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-
-
 // -*- rust -*-
+
 enum colour { red(int, int), green, }
 
-impl cmp::Eq for colour {
+impl Eq for colour {
     fn eq(&self, other: &colour) -> bool {
         match *self {
             red(a0, b0) => {
index 90812f9a7f868f20a3b16daa90cdf0a933d4b822..686cafb0119081caa1fe30e1e2901d3b9e5d4bd0 100644 (file)
@@ -14,6 +14,8 @@
 
 use std::comm::Chan;
 use std::comm::Port;
+use std::comm;
+use std::task;
 
 pub fn main() { test05(); }
 
index b8e314c4c6e31b12c31b0edb649f7d0c2b929244..4d34e3bae3289d18bed15f16f4ba0039a7172b82 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 pub fn main() { test00(); }
 
 fn start() { debug!("Started / Finished task."); }
index b4b9592329b51de90268d4a77f307a1d2671a9fa..15fbf8c07b80ca17bed40ab4332c6433c44b8cf6 100644 (file)
@@ -12,6 +12,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 fn start(c: &comm::Chan<comm::Chan<~str>>) {
     let (p, ch) = comm::stream();
     c.send(ch);
index 2c6baf91862cb60b0c6a5cc58fc74a484ce087eb..8931531d5445ea504ceea1f6d773a98fca79fdde 100644 (file)
@@ -12,6 +12,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 fn start(c: &comm::Chan<comm::Chan<int>>) {
     let (p, ch) = comm::stream();
     c.send(ch);
index 9ecbbaeaee2e422a4ee3f33dea144726ffeb5292..a241e9a49a73f817cd27d2084b9a8ceb9c6b640f 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::task;
+
 pub fn main() { test00(); }
 
 fn start(task_number: int) { debug!("Started / Finished task."); }
index f10aa46ae6e374caefb600aa217c9989b145f517..b625b0557a7cf3084b83e13362b273160e65c203 100644 (file)
@@ -12,6 +12,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 fn start(c: &comm::Chan<int>, start: int, number_of_messages: int) {
     let mut i: int = 0;
     while i < number_of_messages { c.send(start + i); i += 1; }
index 8b4855deaa5631b1ba49bd42204ef067d56e60de..a637d951757012dbd53a50d9863ca801c5c38a2c 100644 (file)
@@ -10,6 +10,9 @@
 
 // xfail-fast
 
+use std::comm;
+use std::task;
+
 pub fn main() {
     let po = comm::PortSet::new();
 
index 3941f8466660645f08116816c7cb16f1bc3b2f84..95f8e62523b3f05326eaac7f2b4c5413546cb035 100644 (file)
@@ -13,6 +13,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 fn start(c: &comm::Chan<int>, i0: int) {
     let mut i = i0;
     while i > 0 {
index c9e8ae3ab7981768eb7501116d82f49dea5b9855..d5a4b1a72c90789458b16eeee2d211e12d0d18d1 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::comm;
+use std::cmp;
 
 // Tests of ports and channels on various types
 fn test_rec() {
index 25bddc7fe944e3c8d02574271169379664120986..47e0a710a125c462f8ed1ead7c8af23e93cd3b16 100644 (file)
@@ -14,6 +14,8 @@
 
 extern mod extra;
 
+use std::task;
+
 fn f() {
 }
 
index faa1d8a69b1a660759d57e362be0e69a4952b517..dd8168ff947b7914797638cfc1a1b9d2501bdbf8 100644 (file)
 // xfail-fast
 
 extern mod extra;
+
 use std::comm::Chan;
+use std::comm;
+use std::task;
 
 pub fn main() { debug!("===== WITHOUT THREADS ====="); test00(); }
 
index a1afefed2ee0f4dd879d49e640cf65474531c76d..2033092d2ce19925bbdee2f30934c878d3da1aef 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::comm;
+
 pub fn main() { test00(); }
 
 fn test00() {
index 22ca343ff17d7ec0ad94223cf7446089551ad9f0..472a7d7e3da7df81620685bdc3410af78ea302a4 100644 (file)
@@ -10,6 +10,8 @@
 
 extern mod extra;
 
+use std::comm;
+
 pub fn main() { test00(); }
 
 fn test00() {
index 16d6f53ad86e0f44b54a164078207fbcf7c8cefb..db6234857d62dc7bcf98fd3561cf3cf6837e3e30 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 use std::comm::Chan;
+use std::comm;
 
 pub fn main() { test00(); }
 
index 3cc1127fbbf6659534e454d82ad295fbbdeef2ac..2ec3ff2408953d0a4c78ba222b056411b7c62e01 100644 (file)
@@ -12,6 +12,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 pub fn main() { test00(); }
 
 fn test00_start(c: &comm::Chan<int>, start: int, number_of_messages: int) {
index 41e91097d2730c2c1582cbd4222ecc60349a4f3a..d520949fb2258b638c7406abcea70a815e794c7c 100644 (file)
@@ -12,6 +12,9 @@
 
 extern mod extra;
 
+use std::comm;
+use std::task;
+
 pub fn main() { test00(); }
 
 fn test00_start(c: &comm::Chan<int>, number_of_messages: int) {
index 64b587eff9a0180aede2d4d763962d1abeb1292e..8010089f3c6e7e2bfb9534f44354e90a05a6a31f 100644 (file)
@@ -12,6 +12,8 @@
 
 extern mod extra;
 
+use std::comm;
+
 // rustboot can't transmit nils across channels because they don't have
 // any size, but rustc currently can because they do have size. Whether
 // or not this is desirable I don't know, but here's a regression test.
index 4b89ddc4a6c0bfed65109c7772f5b37ff07f08e5..6d35a9228b0c637e404b957b1dc5d6bf3ca879c1 100644 (file)
@@ -15,6 +15,8 @@
 
 use std::cell::Cell;
 use std::comm::*;
+use std::ptr;
+use std::task;
 
 struct notify {
     ch: Chan<bool>, v: @mut bool,
index 73c069e560cd08dd59a6d328373421360dc3051a..c94e00251d28a64f03b0936a0734fecf47fcfde5 100644 (file)
@@ -15,6 +15,8 @@
 // task will kill the supervising task, waking it up. The supervising task no
 // longer needs to be wakened when the supervised task exits.
 
+use std::task;
+
 fn supervised() {
     // Yield to make sure the supervisor joins before we fail. This is
     // currently not needed because the supervisor runs first, but I can
index 0ec62ff85410b46cb66d5e2922c8e7b6c1151899..370971bd7b9019984f3d6e52b0e2f95fff47d967 100644 (file)
@@ -9,6 +9,9 @@
 // except according to those terms.
 
 extern mod extra;
+
+use std::task;
+
 pub fn main() {
     task::spawn(|| child(~"Hello") );
 }
index 3e17c5d992ce24e5914ee5a9e8debc5c97f39bfd..f3a105e08527e1029e1fa75ad4579720a1f856f5 100644 (file)
@@ -9,6 +9,8 @@
 // except according to those terms.
 
 use std::comm::*;
+use std::ptr;
+use std::task;
 
 pub fn main() {
     let (p, ch) = stream::<uint>();
index 0e1bf1e90622dff1986c338f4183429975a146e2..6d34f7a970198d83e9c025b7b2d6932a5f0d3c58 100644 (file)
@@ -14,6 +14,8 @@
 
 extern mod extra;
 
+use std::task;
+
 fn test_break() { loop { let x: @int = break; } }
 
 fn test_cont() { let mut i = 0; while i < 1 { i += 1; let x: @int = loop; } }
index 536dd78bba1f253248448a3ba4a2bfe055396eb2..d8b12437dfa327a2ebaf7b311c03794809bb758c 100644 (file)
@@ -13,6 +13,8 @@
 
 extern mod extra;
 
+use std::vec;
+
 #[test]
 #[ignore(cfg(ignorecfg))]
 fn shouldignore() {
index 47b49513a60cbabcd4571ab38fa7f8de7e561808..8922ff91cfd0e72285409b162cce1700f3f63899 100644 (file)
@@ -9,9 +9,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
 extern mod extra;
 
+use std::task;
+
 pub fn main() {
     let mut i = 10;
     while i > 0 { task::spawn({let i = i; || child(i)}); i = i - 1; }
index fedf6e25ec399a2e9ab77b7aab15a92a7eb16a35..3aa30aab7c2675de562ccfec11b3f4a7f7298a39 100644 (file)
@@ -10,6 +10,8 @@
 
 // xfail-fast
 
+use std::int;
+
 trait to_str {
     fn to_str(&self) -> ~str;
 }
index ff9c792af29b167058491bcecf2387a0ef5df8e9..bc1583a08780a29626d11c108365ddabc8b27c9b 100644 (file)
@@ -99,7 +99,7 @@ impl FloatExt for f64 {}
 impl FloatExt for float {}
 
 
-fn test_float_ext<T:FloatExt>(n: T) { io::println(fmt!("%?", n < n)) }
+fn test_float_ext<T:FloatExt>(n: T) { println(fmt!("%?", n < n)) }
 
 pub fn main() {
     test_float_ext(1f32);
index 98fa6a5ebf1d6aa1cb3a04e17628be76d4dc5b3d..e0285a7b598315e1e860413a26f2a33caec4640d 100644 (file)
@@ -16,7 +16,7 @@ pub trait NumExt: Eq + Ord + Num + NumCast {}
 impl NumExt for f32 {}
 
 fn num_eq_one<T:NumExt>(n: T) {
-    io::println(fmt!("%?", n == NumCast::from(1)))
+    println(fmt!("%?", n == NumCast::from(1)))
 }
 
 pub fn main() {
index 8105cf23d800433ed135bf9960e08aaea4fd3f97..f28f8cadfd98c81695c955ba50a1d10a8068fb2d 100644 (file)
@@ -1,5 +1,8 @@
 // Test for issue #4183: use of Self in supertraits.
 
+use std::f32;
+use std::f64;
+
 pub static FUZZY_EPSILON: float = 0.1;
 
 pub trait FuzzyEq<Eps> {
@@ -58,4 +61,4 @@ pub fn main() {
     assert!(compare::<f64>(6.19));
     assert!(!compare::<f64>(7.28318530717958647692528676655900576));
     assert!(!compare::<f64>(6.18));
-}
\ No newline at end of file
+}
index 5eb87b7a96b8be9ce74e545ea4b777ede0507ea5..75b71c673a9cb2d875521dc0bc5886166f0db299 100644 (file)
@@ -12,7 +12,7 @@ struct S {
 
 impl Foo<S> for S {
     fn f(&self, x: &S) {
-        io::println(x.x.to_str());
+        println(x.x.to_str());
     }
 }
 
index 7162420dbc3fc107f442b8a5afa2895208d52d01..0b54ccbbd47ce7bdac9d99476d649b1f254f65f9 100644 (file)
@@ -18,7 +18,7 @@ struct A {
 
 impl Foo for A {
     fn f(&self) -> int {
-        io::println(~"Today's number is " + self.x.to_str());
+        println(~"Today's number is " + self.x.to_str());
         return self.x;
     }
 }
index 86ebc5356ebdc4156879977efeee7bca1fdc8110..1f5c33e2bc0973b39194de1947ea8718542af101 100644 (file)
@@ -11,6 +11,8 @@
 // except according to those terms.
 
 mod base {
+    use std::io;
+
     pub trait HasNew<T> {
         fn new() -> T;
     }
@@ -21,7 +23,7 @@ pub struct Foo {
 
     impl ::base::HasNew<Foo> for Foo {
         fn new() -> Foo {
-            unsafe { io::println("Foo"); }
+            unsafe { println("Foo"); }
             Foo { dummy: () }
         }
     }
index 059d7ea5f70c02801d6eab2ffe1ce30a9040243e..2e0cc7e5a579060b04b09407d62c4d3ffeb3eebc 100644 (file)
@@ -12,6 +12,9 @@
   This is about the simplest program that can successfully send a
   message.
  */
+
+use std::comm;
+
 pub fn main() {
     let (po, ch) = comm::stream();
     ch.send(42);
index c5ea3e14d39247ff88bf99dadd8075585d5b7400..20be5df3242e734e564a814c99d13f9d4dc2b457 100644 (file)
@@ -12,5 +12,5 @@
 
 pub fn main() {
     let x = Foo(1, 2);
-    io::println(fmt!("%?", x));
+    println(fmt!("%?", x));
 }
index c7dc132f3b74ba6b6be849c63e09500942f7e71e..4a1258264f8d1d85836d480c4f4ecfe71a26e8ff 100644 (file)
@@ -13,7 +13,7 @@
 pub fn main() {
     let x = Foo(1, 2);
     let Foo(y, z) = x;
-    io::println(fmt!("%d %d", y, z));
+    println(fmt!("%d %d", y, z));
     assert_eq!(y, 1);
     assert_eq!(z, 2);
 }
index 037f847629cbe19a475116661c6810fb40daafa0..261b913b1d2c83cdf8b5fee7f23834f8a05300cd 100644 (file)
@@ -16,7 +16,7 @@ pub fn main() {
         Foo(a, b) => {
             assert_eq!(a, 1);
             assert_eq!(b, 2);
-            io::println(fmt!("%d %d", a, b));
+            println(fmt!("%d %d", a, b));
         }
     }
 }
index d180f6c726043fdd3a6b2e222cf71d6740ed44fc..88b4fffc5a5785bfa076420419d7404cbd79fac0 100644 (file)
@@ -8,8 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::unstable;
+
 pub fn main() {
-    let mut x: bool = false;
-    // this line breaks it
-    unstable::intrinsics::move_val_init(&mut x, false);
+    unsafe {
+        let mut x: bool = false;
+        // this line breaks it
+        unstable::intrinsics::move_val_init(&mut x, false);
+    }
 }
index 2f686d21b96b73d2112952d6bb2f3f7b5219807a..8bdce601b285c5581455fb7c1edbfc7ade3234b3 100644 (file)
@@ -13,6 +13,8 @@
 // in that type gets resolved.
 extern mod extra;
 
+use std::cast;
+
 fn null<T>() -> *T {
     unsafe {
         cast::transmute(0)
index 7327f4a3498e0c17be8fe8f73ff9f492ba8a0f4a..b54b3b52692ed03f5ce93111faec86ef12e663a0 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::ptr;
+
 enum maybe_pointy {
     none,
     p(@mut Pointy),
index 38a608c191bc54942b4d688c780126a99b960cb7..7634641a56e8f90a57b25bd822bcd385311cb8fe 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::sys;
+
 pub fn main() {
     unsafe {
         let i = ~@1;
index 3684a6ef7883dc096aff36d829d2d65f9440c847..a6bed9e2398e25067be55434c63fb2429d0bb9b9 100644 (file)
@@ -9,6 +9,8 @@
 // except according to those terms.
 
 use std::comm::*;
+use std::task;
+use std::uint;
 
 fn child(c: &SharedChan<~uint>, i: uint) {
     c.send(~i);
index 1b81015b029100cb1d696c1d1f32817408327c3c..82aeb08a7035f9e6d62a080c0a1fdcdcd2060980 100644 (file)
@@ -13,6 +13,6 @@
 pub fn main() {
     let x: Foo = Foo;
     match x {
-        Foo => { io::println("hi"); }
+        Foo => { println("hi"); }
     }
 }
index 5184ffb8d239e013fd0a6e08d4e19924537c04cb..2d0967a6fa36009660f577ac9322a2fa7a89f7dc 100644 (file)
@@ -11,6 +11,8 @@
 // xfail-win32
 extern mod extra;
 
+use std::task;
+
 fn f() {
     let a = @0;
     fail!();
index 012b12ea99e78a9995bb96232dcf8db5378fd4ac..4b71d79ccc4fb173bbb7db7c8ea23e264f82912a 100644 (file)
@@ -12,6 +12,7 @@
 extern mod extra;
 
 use std::comm::*;
+use std::task;
 
 struct complainer {
   c: SharedChan<bool>,
index 0d7c717cd36afb822190271ff2988cf904812fc1..b5a496eb206150bbc4b94783b655c92360d32fb5 100644 (file)
@@ -11,6 +11,8 @@
 // xfail-win32
 extern mod extra;
 
+use std::task;
+
 struct complainer {
   c: @int,
 }
index f5f5209fa5477dd254952b488d076a7167a852f8..ba75676298b4e96918c489c66169dc7ddf487d80 100644 (file)
@@ -11,6 +11,8 @@
 // xfail-win32
 extern mod extra;
 
+use std::task;
+
 fn f() {
     let a = ~0;
     fail!();
index aab51207a9f979a08794faf008aa006a8b5e444f..fd5bc07e0155019867fe2c80db051ea6c4918fea 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::str;
+
 pub fn main() {
     let yen: char = '¥'; // 0xa5
     let c_cedilla: char = 'ç'; // 0xe7
index 23dddf59925772b455a47cb4fe56920611c272db..2343949f049a6d8334aa674aee411126b51a2b45 100644 (file)
@@ -10,6 +10,9 @@
 
 extern mod extra;
 
+use std::str;
+use std::vec;
+
 pub fn main() {
     // Chars of 1, 2, 3, and 4 bytes
     let chs: ~[char] = ~['e', 'é', '€', 0x10000 as char];
index 4e86b6cc948cfdd5b8e73b4071e2518f3ae8f1b5..2e1bec53cee6cfdd311ae7f3427e767aa24ca69a 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::float;
+
 pub fn main() {
     let ε = 0.00001;
     let Π = 3.14;
index 05314f94c671224fffb60474f6307d101eee0743..73e0418993c41cf6bedae39c9e99d6d745c739d0 100644 (file)
@@ -9,6 +9,10 @@
 // except according to those terms.
 
 // -*- rust -*-
+
+use std::io;
+use std::vec;
+
 fn main(){
     let mut t1 = ~[];
     t1.push('a');
index 2c4add63e8b87a7ded9692e92ee20a9d0906b055..56adc6d259881714c51adcc4f70d0e239f6bdfee 100644 (file)
@@ -10,5 +10,5 @@
 
 pub fn main() {
     let x: [int, ..4] = [1, 2, 3, 4];
-    io::println(fmt!("%d", x[0]));
+    println(fmt!("%d", x[0]));
 }
index acd9a9664f78d084cdb6e12f2b1377440c8062d8..aae287deb8a1e56b85c3241daaa49bee3ae8ac81 100644 (file)
@@ -5,6 +5,6 @@ pub fn main() {
             [1, ..ref tail] => &tail[0],
             _ => ::std::util::unreachable()
         };
-        io::println(fmt!("%d", *el));
+        println(fmt!("%d", *el));
     }
 }
index 25ae7340bc1b8968c987cc3515145474f5bbaa4d..8448e4e0532c621043f4665d28678a3de255cdc6 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::vec;
+
 pub fn main() {
     let  v = ~[1,2,3,4,5];
     let v2 = vec::slice(v, 1, 3);
index 7e2229e78ea280d55de7c4c380b8ada702e2e972..8f990e070154ee0a8da9138724fd7d54dace5ccc 100644 (file)
@@ -9,15 +9,20 @@
 // except according to those terms.
 
 
+use std::unstable;
 
-
-// -*- rust -*-
 struct Point {x: int, y: int, z: int}
 
 fn f(p: &mut Point) { p.z = 13; }
 
 pub fn main() {
-    let mut x: Point = Point {x: 10, y: 11, z: 12};
-    f(&mut x);
-    assert_eq!(x.z, 13);
+    unsafe {
+        let x = Some(unstable::sync::exclusive(true));
+        match x {
+            Some(ref z) if z.with(|b| *b) => {
+                do z.with |b| { assert!(*b); }
+            },
+            _ => fail!()
+        }
+    }
 }
index 2d916abf0da698858680f1ab450909a583da6eff..8beaee83864dbcd74be06ccd3f1d1df0e398b6fd 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 pub fn main() {
     let mut result = None;
     let mut builder = task::task();
index f3ca5b1211899145af5c195a048f0cfcb976c35d..37ec8af7e57c8128607b4d2d4e10fbce2a4ed256 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 pub fn main() {
     let mut result = None;
     let mut builder = task::task();
index 83b60d1863e8aa6e0cc369bd7e74b711f3609e0a..a2b8ef0429d40523384c1f079f7df2a7f3d30136 100644 (file)
@@ -9,6 +9,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+use std::task;
+
 pub fn main() {
     let mut i: int = 0;
     while i < 100 { i = i + 1; error!(i); task::yield(); }
index bf45b2fc039d6e8a4a65752ae81fdad00ee0f37a..83759dd82e6a329c3f296d76f51b0e6433c20d00 100644 (file)
@@ -11,6 +11,8 @@
 // In this case, the code should compile and should
 // succeed at runtime
 
+use std::vec;
+
 fn enum_chars(start: u8, end: u8) -> ~[char] {
     assert!(start < end);
     let mut i = start;