]> git.lizzy.rs Git - rust.git/commitdiff
Drop the '2' suffix from logging macros
authorAlex Crichton <alex@alexcrichton.com>
Mon, 21 Oct 2013 20:08:31 +0000 (13:08 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 22 Oct 2013 15:09:56 +0000 (08:09 -0700)
Who doesn't like a massive renaming?

726 files changed:
src/compiletest/compiletest.rs
src/compiletest/errors.rs
src/compiletest/header.rs
src/compiletest/runtest.rs
src/compiletest/util.rs
src/libextra/arc.rs
src/libextra/arena.rs
src/libextra/base64.rs
src/libextra/bitv.rs
src/libextra/comm.rs
src/libextra/crypto/cryptoutil.rs
src/libextra/dlist.rs
src/libextra/ebml.rs
src/libextra/fileinput.rs
src/libextra/flate.rs
src/libextra/future.rs
src/libextra/getopts.rs
src/libextra/json.rs
src/libextra/list.rs
src/libextra/num/bigint.rs
src/libextra/num/rational.rs
src/libextra/ringbuf.rs
src/libextra/semver.rs
src/libextra/smallintmap.rs
src/libextra/sort.rs
src/libextra/sync.rs
src/libextra/term.rs
src/libextra/terminfo/parm.rs
src/libextra/terminfo/parser/compiled.rs
src/libextra/test.rs
src/libextra/time.rs
src/libextra/treemap.rs
src/libextra/workcache.rs
src/librustc/back/link.rs
src/librustc/back/rpath.rs
src/librustc/driver/driver.rs
src/librustc/front/test.rs
src/librustc/metadata/creader.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/loader.rs
src/librustc/metadata/tydecode.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/gather_loans/lifetime.rs
src/librustc/middle/borrowck/gather_loans/mod.rs
src/librustc/middle/borrowck/mod.rs
src/librustc/middle/borrowck/move_data.rs
src/librustc/middle/cfg/construct.rs
src/librustc/middle/check_const.rs
src/librustc/middle/check_match.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/effect.rs
src/librustc/middle/freevars.rs
src/librustc/middle/graph.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/privacy.rs
src/librustc/middle/region.rs
src/librustc/middle/resolve.rs
src/librustc/middle/stack_check.rs
src/librustc/middle/trans/_match.rs
src/librustc/middle/trans/adt.rs
src/librustc/middle/trans/asm.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/build.rs
src/librustc/middle/trans/builder.rs
src/librustc/middle/trans/cabi_arm.rs
src/librustc/middle/trans/cabi_mips.rs
src/librustc/middle/trans/cabi_x86_64.rs
src/librustc/middle/trans/callee.rs
src/librustc/middle/trans/closure.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/context.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/intrinsic.rs
src/librustc/middle/trans/meth.rs
src/librustc/middle/trans/monomorphize.rs
src/librustc/middle/trans/reflect.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/trans/type_.rs
src/librustc/middle/trans/type_of.rs
src/librustc/middle/trans/write_guard.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/regionmanip.rs
src/librustc/middle/typeck/check/vtable.rs
src/librustc/middle/typeck/check/writeback.rs
src/librustc/middle/typeck/coherence.rs
src/librustc/middle/typeck/collect.rs
src/librustc/middle/typeck/infer/coercion.rs
src/librustc/middle/typeck/infer/combine.rs
src/librustc/middle/typeck/infer/glb.rs
src/librustc/middle/typeck/infer/lattice.rs
src/librustc/middle/typeck/infer/lub.rs
src/librustc/middle/typeck/infer/mod.rs
src/librustc/middle/typeck/infer/region_inference/mod.rs
src/librustc/middle/typeck/infer/resolve.rs
src/librustc/middle/typeck/infer/sub.rs
src/librustc/middle/typeck/infer/test.rs
src/librustc/middle/typeck/infer/unify.rs
src/librustc/middle/typeck/mod.rs
src/librustc/middle/typeck/rscope.rs
src/librustc/rustc.rs
src/librustc/util/common.rs
src/librustdoc/clean.rs
src/librustdoc/core.rs
src/librustdoc/html/render.rs
src/librustdoc/passes.rs
src/librustdoc/rustdoc.rs
src/librustdoc/visit_ast.rs
src/librustpkg/api.rs
src/librustpkg/context.rs
src/librustpkg/installed_packages.rs
src/librustpkg/package_source.rs
src/librustpkg/path_util.rs
src/librustpkg/rustpkg.rs
src/librustpkg/search.rs
src/librustpkg/source_control.rs
src/librustpkg/tests.rs
src/librustpkg/util.rs
src/librustpkg/version.rs
src/librustpkg/workcache_support.rs
src/librustpkg/workspace.rs
src/libstd/at_vec.rs
src/libstd/c_str.rs
src/libstd/cell.rs
src/libstd/char.rs
src/libstd/cleanup.rs
src/libstd/condition.rs
src/libstd/either.rs
src/libstd/hash.rs
src/libstd/hashmap.rs
src/libstd/io.rs
src/libstd/iter.rs
src/libstd/local_data.rs
src/libstd/num/f32.rs
src/libstd/num/f64.rs
src/libstd/num/strconv.rs
src/libstd/option.rs
src/libstd/os.rs
src/libstd/path/mod.rs
src/libstd/ptr.rs
src/libstd/rand/mod.rs
src/libstd/rand/reader.rs
src/libstd/repr.rs
src/libstd/result.rs
src/libstd/rt/args.rs
src/libstd/rt/comm.rs
src/libstd/rt/crate_map.rs
src/libstd/rt/io/comm_adapters.rs
src/libstd/rt/io/extensions.rs
src/libstd/rt/io/file.rs
src/libstd/rt/io/flate.rs
src/libstd/rt/io/mem.rs
src/libstd/rt/io/mod.rs
src/libstd/rt/io/native/file.rs
src/libstd/rt/io/native/process.rs
src/libstd/rt/io/net/tcp.rs
src/libstd/rt/io/net/udp.rs
src/libstd/rt/io/net/unix.rs
src/libstd/rt/io/pipe.rs
src/libstd/rt/kill.rs
src/libstd/rt/sched.rs
src/libstd/rt/task.rs
src/libstd/rt/test.rs
src/libstd/rt/uv/file.rs
src/libstd/rt/uv/net.rs
src/libstd/run.rs
src/libstd/select.rs
src/libstd/str.rs
src/libstd/task/mod.rs
src/libstd/task/spawn.rs
src/libstd/trie.rs
src/libstd/unstable/dynamic_lib.rs
src/libstd/unstable/finally.rs
src/libstd/unstable/sync.rs
src/libstd/vec.rs
src/libsyntax/abi.rs
src/libsyntax/ast.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/base.rs
src/libsyntax/ext/expand.rs
src/libsyntax/ext/quote.rs
src/libsyntax/ext/tt/macro_parser.rs
src/libsyntax/fold.rs
src/libsyntax/opt_vec.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/comments.rs
src/libsyntax/parse/lexer.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pp.rs
src/libsyntax/print/pprust.rs
src/test/auxiliary/cci_class_4.rs
src/test/auxiliary/cci_class_cast.rs
src/test/auxiliary/cci_nested_lib.rs
src/test/auxiliary/extern-crosscrate-source.rs
src/test/auxiliary/issue2378a.rs
src/test/auxiliary/issue_2723_a.rs
src/test/auxiliary/logging_right_crate.rs
src/test/auxiliary/static-methods-crate.rs
src/test/bench/core-std.rs
src/test/bench/core-uint-to-str.rs
src/test/bench/msgsend-pipes-shared.rs
src/test/bench/msgsend-pipes.rs
src/test/bench/shootout-chameneos-redux.rs
src/test/bench/shootout-pfib.rs
src/test/bench/shootout-threadring.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/compile-fail/asm-in-bad-modifier.rs
src/test/compile-fail/asm-out-assign-imm.rs
src/test/compile-fail/asm-out-no-modifier.rs
src/test/compile-fail/asm-out-read-uninit.rs
src/test/compile-fail/assign-imm-local-twice.rs
src/test/compile-fail/assign-to-method.rs
src/test/compile-fail/autoderef-full-lval.rs
src/test/compile-fail/bad-bang-ann.rs
src/test/compile-fail/bad-const-type.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-1.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-2.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-3.rs
src/test/compile-fail/bind-by-move-neither-can-live-while-the-other-survives-4.rs
src/test/compile-fail/bind-by-move-no-guards.rs
src/test/compile-fail/bind-by-move-no-sub-bindings.rs
src/test/compile-fail/block-arg-as-stmt-with-value.rs
src/test/compile-fail/block-coerce-no.rs
src/test/compile-fail/bogus-tag.rs
src/test/compile-fail/borrowck-anon-fields-variant.rs
src/test/compile-fail/borrowck-assign-comp-idx.rs
src/test/compile-fail/borrowck-autoref-3261.rs
src/test/compile-fail/borrowck-borrow-from-owned-ptr.rs
src/test/compile-fail/borrowck-borrow-from-stack-variable.rs
src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
src/test/compile-fail/borrowck-lend-flow-if.rs
src/test/compile-fail/borrowck-lend-flow-loop.rs
src/test/compile-fail/borrowck-lend-flow-match.rs
src/test/compile-fail/borrowck-lend-flow.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-move-out-of-vec-tail.rs
src/test/compile-fail/borrowck-mut-addr-of-imm-var.rs
src/test/compile-fail/borrowck-ref-into-rvalue.rs
src/test/compile-fail/borrowck-vec-pattern-element-loan.rs
src/test/compile-fail/borrowck-vec-pattern-nesting.rs
src/test/compile-fail/borrowck-vec-pattern-tail-element-loan.rs
src/test/compile-fail/class-cast-to-trait.rs
src/test/compile-fail/class-missing-self.rs
src/test/compile-fail/closure-that-fails.rs
src/test/compile-fail/copy-a-resource.rs
src/test/compile-fail/deref-non-pointer.rs
src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs
src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs
src/test/compile-fail/does-nothing.rs
src/test/compile-fail/export2.rs
src/test/compile-fail/fail-expr.rs
src/test/compile-fail/fail-simple.rs
src/test/compile-fail/fail-type-err.rs
src/test/compile-fail/if-without-else-result.rs
src/test/compile-fail/import-glob-0.rs
src/test/compile-fail/import-glob-circular.rs
src/test/compile-fail/import.rs
src/test/compile-fail/import2.rs
src/test/compile-fail/import3.rs
src/test/compile-fail/import4.rs
src/test/compile-fail/issue-1448-2.rs
src/test/compile-fail/issue-1476.rs
src/test/compile-fail/issue-2149.rs
src/test/compile-fail/issue-2150.rs
src/test/compile-fail/issue-2151.rs
src/test/compile-fail/issue-2281-part1.rs
src/test/compile-fail/issue-2330.rs
src/test/compile-fail/issue-2370-2.rs
src/test/compile-fail/issue-2370.rs
src/test/compile-fail/issue-2611-4.rs
src/test/compile-fail/issue-2611-5.rs
src/test/compile-fail/issue-2823.rs
src/test/compile-fail/issue-3021.rs
src/test/compile-fail/issue-3038.rs
src/test/compile-fail/issue-3099.rs
src/test/compile-fail/issue-3521-2.rs
src/test/compile-fail/issue-3521.rs
src/test/compile-fail/issue-3601.rs
src/test/compile-fail/issue-3668.rs
src/test/compile-fail/issue-6458-1.rs
src/test/compile-fail/lint-unused-unsafe.rs
src/test/compile-fail/liveness-and-init.rs
src/test/compile-fail/liveness-bad-bang-2.rs
src/test/compile-fail/liveness-block-unint.rs
src/test/compile-fail/liveness-break-uninit-2.rs
src/test/compile-fail/liveness-break-uninit.rs
src/test/compile-fail/liveness-closure-require-ret.rs
src/test/compile-fail/liveness-if-no-else.rs
src/test/compile-fail/liveness-if-with-else.rs
src/test/compile-fail/liveness-init-in-fn-expr.rs
src/test/compile-fail/liveness-move-in-loop.rs
src/test/compile-fail/liveness-move-in-while.rs
src/test/compile-fail/liveness-or-init.rs
src/test/compile-fail/liveness-uninit.rs
src/test/compile-fail/liveness-use-after-move.rs
src/test/compile-fail/liveness-use-after-send.rs
src/test/compile-fail/liveness-while-break.rs
src/test/compile-fail/match-join.rs
src/test/compile-fail/moves-based-on-type-exprs.rs
src/test/compile-fail/moves-based-on-type-match-bindings.rs
src/test/compile-fail/moves-based-on-type-no-recursive-stack-closure.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-exhaustive-match-nested.rs
src/test/compile-fail/noncopyable-class.rs
src/test/compile-fail/nonscalar-cast.rs
src/test/compile-fail/not-enough-arguments.rs
src/test/compile-fail/oversized-literal.rs
src/test/compile-fail/packed-struct-generic-transmute.rs
src/test/compile-fail/packed-struct-transmute.rs
src/test/compile-fail/pattern-tyvar-2.rs
src/test/compile-fail/pattern-tyvar.rs
src/test/compile-fail/pinned-deep-copy.rs
src/test/compile-fail/regions-addr-of-self.rs
src/test/compile-fail/regions-fn-subtyping.rs
src/test/compile-fail/regions-free-region-ordering-callee.rs
src/test/compile-fail/regions-freevar.rs
src/test/compile-fail/regions-ret-borrowed-1.rs
src/test/compile-fail/regions-ret-borrowed.rs
src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
src/test/compile-fail/tag-type-args.rs
src/test/compile-fail/unique-pinned-nocopy.rs
src/test/compile-fail/unique-vec-res.rs
src/test/compile-fail/unsupported-cast.rs
src/test/compile-fail/vec-field.rs
src/test/compile-fail/vec-res-add.rs
src/test/pretty/issue-929.rs
src/test/run-fail/args-fail.rs
src/test/run-fail/binop-fail-2.rs
src/test/run-fail/binop-fail-3.rs
src/test/run-fail/binop-fail.rs
src/test/run-fail/bug-2470-bounds-check-overflow.rs
src/test/run-fail/bug-811.rs
src/test/run-fail/die-macro-expr.rs
src/test/run-fail/die-macro-pure.rs
src/test/run-fail/die-macro.rs
src/test/run-fail/doublefail.rs
src/test/run-fail/explicit-fail-msg.rs
src/test/run-fail/explicit-fail.rs
src/test/run-fail/expr-fn-fail.rs
src/test/run-fail/expr-if-fail-fn.rs
src/test/run-fail/expr-if-fail.rs
src/test/run-fail/expr-match-fail-fn.rs
src/test/run-fail/expr-match-fail.rs
src/test/run-fail/extern-fail.rs
src/test/run-fail/fail-arg.rs
src/test/run-fail/fail-macro-explicit.rs
src/test/run-fail/fail-macro-fmt.rs
src/test/run-fail/fail-macro-owned.rs
src/test/run-fail/fail-macro-static.rs
src/test/run-fail/fail-main.rs
src/test/run-fail/fail-parens.rs
src/test/run-fail/fail-task-name-none.rs
src/test/run-fail/fail-task-name-owned.rs
src/test/run-fail/fail-task-name-send-str.rs
src/test/run-fail/fail-task-name-static.rs
src/test/run-fail/fmt-fail.rs
src/test/run-fail/for-each-loop-fail.rs
src/test/run-fail/if-check-fail.rs
src/test/run-fail/if-cond-bot.rs
src/test/run-fail/issue-2156.rs
src/test/run-fail/issue-2272.rs
src/test/run-fail/issue-2444.rs
src/test/run-fail/issue-3029.rs
src/test/run-fail/issue-948.rs
src/test/run-fail/linked-failure2.rs
src/test/run-fail/linked-failure3.rs
src/test/run-fail/match-bot-fail.rs
src/test/run-fail/match-disc-bot.rs
src/test/run-fail/match-wildcards.rs
src/test/run-fail/morestack1.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/rhs-type.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/run-unexported-tests.rs
src/test/run-fail/spawnfail.rs
src/test/run-fail/task-comm-recv-block.rs
src/test/run-fail/tls-exit-status.rs
src/test/run-fail/unique-fail.rs
src/test/run-fail/unwind-box-fn-unique.rs
src/test/run-fail/unwind-box-res.rs
src/test/run-fail/unwind-box-str.rs
src/test/run-fail/unwind-box-trait.rs
src/test/run-fail/unwind-box-unique-unique.rs
src/test/run-fail/unwind-box-unique.rs
src/test/run-fail/unwind-box-vec.rs
src/test/run-fail/unwind-box.rs
src/test/run-fail/unwind-fail.rs
src/test/run-fail/unwind-initializer-indirect.rs
src/test/run-fail/unwind-initializer.rs
src/test/run-fail/unwind-interleaved.rs
src/test/run-fail/unwind-iter.rs
src/test/run-fail/unwind-iter2.rs
src/test/run-fail/unwind-lambda.rs
src/test/run-fail/unwind-match.rs
src/test/run-fail/unwind-misc-1.rs
src/test/run-fail/unwind-move.rs
src/test/run-fail/unwind-nested.rs
src/test/run-fail/unwind-partial-box.rs
src/test/run-fail/unwind-partial-unique.rs
src/test/run-fail/unwind-partial-vec.rs
src/test/run-fail/unwind-rec.rs
src/test/run-fail/unwind-rec2.rs
src/test/run-fail/unwind-resource-fail.rs
src/test/run-fail/unwind-resource-fail2.rs
src/test/run-fail/unwind-resource-fail3.rs
src/test/run-fail/unwind-stacked.rs
src/test/run-fail/unwind-tup.rs
src/test/run-fail/unwind-tup2.rs
src/test/run-fail/unwind-uninitialized.rs
src/test/run-fail/unwind-unique.rs
src/test/run-fail/while-body-fails.rs
src/test/run-fail/while-fail.rs
src/test/run-pass/alignment-gep-tup-like-1.rs
src/test/run-pass/alignment-gep-tup-like-2.rs
src/test/run-pass/arith-0.rs
src/test/run-pass/arith-1.rs
src/test/run-pass/attr-main-2.rs
src/test/run-pass/auto-instantiate.rs
src/test/run-pass/binary-minus-without-space.rs
src/test/run-pass/bind-by-move.rs
src/test/run-pass/binops.rs
src/test/run-pass/bitwise.rs
src/test/run-pass/block-arg.rs
src/test/run-pass/block-explicit-types.rs
src/test/run-pass/block-iter-1.rs
src/test/run-pass/block-iter-2.rs
src/test/run-pass/borrowck-macro-interaction-issue-6304.rs
src/test/run-pass/borrowck-mut-uniq.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-cond-box.rs
src/test/run-pass/borrowck-preserve-expl-deref.rs
src/test/run-pass/borrowck-unary-move-2.rs
src/test/run-pass/box-inside-if.rs
src/test/run-pass/box-inside-if2.rs
src/test/run-pass/box-unbox.rs
src/test/run-pass/boxed-class-type-substitution.rs
src/test/run-pass/cast-region-to-uint.rs
src/test/run-pass/cci_borrow.rs
src/test/run-pass/class-attributes-1.rs
src/test/run-pass/class-attributes-2.rs
src/test/run-pass/class-cast-to-trait-cross-crate-2.rs
src/test/run-pass/class-cast-to-trait-multiple-types.rs
src/test/run-pass/class-cast-to-trait.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/class-separate-impl.rs
src/test/run-pass/classes.rs
src/test/run-pass/cleanup-copy-mode.rs
src/test/run-pass/close-over-big-then-small-data.rs
src/test/run-pass/comm.rs
src/test/run-pass/complex.rs
src/test/run-pass/conditional-debug-macro-off.rs
src/test/run-pass/conditional-debug-macro-on.rs
src/test/run-pass/const-big-enum.rs
src/test/run-pass/const-enum-byref-self.rs
src/test/run-pass/const-enum-byref.rs
src/test/run-pass/const-enum-ptr.rs
src/test/run-pass/const-enum-structlike.rs
src/test/run-pass/const-enum-vec-index.rs
src/test/run-pass/const-enum-vec-ptr.rs
src/test/run-pass/const-enum-vector.rs
src/test/run-pass/const-nullary-enum.rs
src/test/run-pass/const.rs
src/test/run-pass/core-rt-smoke.rs
src/test/run-pass/dead-code-one-arm-if.rs
src/test/run-pass/deref-lval.rs
src/test/run-pass/deriving-cmp-shortcircuit.rs
src/test/run-pass/die-macro.rs
src/test/run-pass/enum-alignment.rs
src/test/run-pass/enum-nullable-simplifycfg-misopt.rs
src/test/run-pass/estr-slice.rs
src/test/run-pass/evec-slice.rs
src/test/run-pass/export-non-interference2.rs
src/test/run-pass/export-non-interference3.rs
src/test/run-pass/expr-block-generic-box1.rs
src/test/run-pass/expr-block-generic-unique1.rs
src/test/run-pass/expr-if-fail-all.rs
src/test/run-pass/expr-if-fail.rs
src/test/run-pass/expr-match-box.rs
src/test/run-pass/expr-match-fail-all.rs
src/test/run-pass/expr-match-fail.rs
src/test/run-pass/expr-match-generic-box1.rs
src/test/run-pass/expr-match-generic-box2.rs
src/test/run-pass/expr-match-generic-unique1.rs
src/test/run-pass/expr-match-generic-unique2.rs
src/test/run-pass/expr-match-generic.rs
src/test/run-pass/expr-match-struct.rs
src/test/run-pass/expr-match-unique.rs
src/test/run-pass/extern-call-deep.rs
src/test/run-pass/extern-call-deep2.rs
src/test/run-pass/extern-call-indirect.rs
src/test/run-pass/extern-call-scrub.rs
src/test/run-pass/extern-crosscrate.rs
src/test/run-pass/extern-yield.rs
src/test/run-pass/fact.rs
src/test/run-pass/fat-arrow-match.rs
src/test/run-pass/float-signature.rs
src/test/run-pass/float.rs
src/test/run-pass/fn-bare-item.rs
src/test/run-pass/for-loop-fail.rs
src/test/run-pass/foreach-put-structured.rs
src/test/run-pass/foreach-simple-outer-slot.rs
src/test/run-pass/generic-alias-box.rs
src/test/run-pass/generic-alias-unique.rs
src/test/run-pass/generic-derived-type.rs
src/test/run-pass/generic-fn-box.rs
src/test/run-pass/generic-fn-unique.rs
src/test/run-pass/generic-fn.rs
src/test/run-pass/generic-tag-match.rs
src/test/run-pass/generic-tag-values.rs
src/test/run-pass/generic-temporary.rs
src/test/run-pass/generic-tup.rs
src/test/run-pass/getopts_ref.rs
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/if-bot.rs
src/test/run-pass/if-check.rs
src/test/run-pass/import-glob-0.rs
src/test/run-pass/import.rs
src/test/run-pass/import2.rs
src/test/run-pass/import3.rs
src/test/run-pass/import4.rs
src/test/run-pass/import5.rs
src/test/run-pass/import6.rs
src/test/run-pass/import7.rs
src/test/run-pass/import8.rs
src/test/run-pass/inner-module.rs
src/test/run-pass/integral-indexing.rs
src/test/run-pass/issue-1516.rs
src/test/run-pass/issue-1696.rs
src/test/run-pass/issue-2216.rs
src/test/run-pass/issue-2311-2.rs
src/test/run-pass/issue-2312.rs
src/test/run-pass/issue-2611-3.rs
src/test/run-pass/issue-2633.rs
src/test/run-pass/issue-2718.rs
src/test/run-pass/issue-2804-2.rs
src/test/run-pass/issue-2804.rs
src/test/run-pass/issue-2904.rs
src/test/run-pass/issue-2935.rs
src/test/run-pass/issue-3109.rs
src/test/run-pass/issue-3609.rs
src/test/run-pass/issue-3895.rs
src/test/run-pass/issue-4016.rs
src/test/run-pass/issue-5275.rs
src/test/run-pass/issue-6128.rs
src/test/run-pass/issue-6344-let.rs
src/test/run-pass/issue-6344-match.rs
src/test/run-pass/issue-7563.rs
src/test/run-pass/issue-8351-1.rs
src/test/run-pass/issue-8351-2.rs
src/test/run-pass/istr.rs
src/test/run-pass/iter-range.rs
src/test/run-pass/lambda-infer-unresolved.rs
src/test/run-pass/last-use-in-block.rs
src/test/run-pass/last-use-is-capture.rs
src/test/run-pass/lazy-and-or.rs
src/test/run-pass/lazy-init.rs
src/test/run-pass/linear-for-loop.rs
src/test/run-pass/liveness-loop-break.rs
src/test/run-pass/log-err-phi.rs
src/test/run-pass/log-linearized.rs
src/test/run-pass/log-poly.rs
src/test/run-pass/loop-break-cont.rs
src/test/run-pass/macro-interpolation.rs
src/test/run-pass/match-bot-2.rs
src/test/run-pass/match-bot.rs
src/test/run-pass/match-enum-struct-0.rs
src/test/run-pass/match-enum-struct-1.rs
src/test/run-pass/match-join.rs
src/test/run-pass/match-pattern-drop.rs
src/test/run-pass/match-pattern-lit.rs
src/test/run-pass/match-pattern-no-type-params.rs
src/test/run-pass/match-pipe-binding.rs
src/test/run-pass/match-range.rs
src/test/run-pass/match-ref-binding-in-guard-3256.rs
src/test/run-pass/match-str.rs
src/test/run-pass/match-struct-0.rs
src/test/run-pass/match-unique-bind.rs
src/test/run-pass/match-with-ret-arm.rs
src/test/run-pass/morestack-address.rs
src/test/run-pass/mutable-alias-vec.rs
src/test/run-pass/negative.rs
src/test/run-pass/nested-matchs.rs
src/test/run-pass/nested-pattern.rs
src/test/run-pass/nested-patterns.rs
src/test/run-pass/opeq.rs
src/test/run-pass/option-unwrap.rs
src/test/run-pass/over-constrained-vregs.rs
src/test/run-pass/overload-index-operator.rs
src/test/run-pass/paren-free.rs
src/test/run-pass/parse-fail.rs
src/test/run-pass/pass-by-copy.rs
src/test/run-pass/purity-infer.rs
src/test/run-pass/rcvr-borrowed-to-region.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/rec-auto.rs
src/test/run-pass/reflect-visit-data.rs
src/test/run-pass/reflect-visit-type.rs
src/test/run-pass/region-dependent-addr-of.rs
src/test/run-pass/region-return-interior-of-option.rs
src/test/run-pass/regions-addr-of-ret.rs
src/test/run-pass/regions-borrow-at.rs
src/test/run-pass/regions-bot.rs
src/test/run-pass/regions-self-impls.rs
src/test/run-pass/regions-self-in-enums.rs
src/test/run-pass/regions-simple.rs
src/test/run-pass/regions-static-closure.rs
src/test/run-pass/repeated-vector-syntax.rs
src/test/run-pass/resource-assign-is-not-copy.rs
src/test/run-pass/resource-cycle.rs
src/test/run-pass/resource-destruct.rs
src/test/run-pass/ret-bang.rs
src/test/run-pass/rt-start-main-thread.rs
src/test/run-pass/sendfn-generic-fn.rs
src/test/run-pass/sendfn-spawn-with-fn-arg.rs
src/test/run-pass/shadow.rs
src/test/run-pass/shape_intrinsic_tag_then_rec.rs
src/test/run-pass/simple-infer.rs
src/test/run-pass/simple-match-generic-tag.rs
src/test/run-pass/size-and-align.rs
src/test/run-pass/spawn-fn.rs
src/test/run-pass/spawn.rs
src/test/run-pass/spawn2.rs
src/test/run-pass/stat.rs
src/test/run-pass/str-append.rs
src/test/run-pass/str-concat.rs
src/test/run-pass/str-idx.rs
src/test/run-pass/string-self-append.rs
src/test/run-pass/struct-literal-dtor.rs
src/test/run-pass/struct-return.rs
src/test/run-pass/supported-cast.rs
src/test/run-pass/syntax-extension-cfg.rs
src/test/run-pass/tag-align-shape.rs
src/test/run-pass/tail-cps.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-12.rs
src/test/run-pass/task-comm-13.rs
src/test/run-pass/task-comm-14.rs
src/test/run-pass/task-comm-3.rs
src/test/run-pass/task-comm-4.rs
src/test/run-pass/task-comm-9.rs
src/test/run-pass/tempfile.rs
src/test/run-pass/terminate-in-initializer.rs
src/test/run-pass/test-runner-hides-main.rs
src/test/run-pass/threads.rs
src/test/run-pass/trivial-message.rs
src/test/run-pass/typeck-macro-interaction-issue-8852.rs
src/test/run-pass/typeclasses-eq-example-static.rs
src/test/run-pass/typeclasses-eq-example.rs
src/test/run-pass/unary-minus-suffix-inference.rs
src/test/run-pass/unique-copy-box.rs
src/test/run-pass/unique-decl.rs
src/test/run-pass/unique-in-tag.rs
src/test/run-pass/unique-log.rs
src/test/run-pass/unique-pat-3.rs
src/test/run-pass/unique-pat.rs
src/test/run-pass/unit-like-struct-drop-run.rs
src/test/run-pass/unreachable-code-1.rs
src/test/run-pass/unreachable-code.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/use-uninit-match.rs
src/test/run-pass/use-uninit-match2.rs
src/test/run-pass/utf8.rs
src/test/run-pass/vec-concat.rs
src/test/run-pass/vec-late-init.rs
src/test/run-pass/vec-matching-autoslice.rs
src/test/run-pass/vec-matching.rs
src/test/run-pass/vec-self-append.rs
src/test/run-pass/weird-exprs.rs
src/test/run-pass/while-cont.rs
src/test/run-pass/while-loop-constraints-2.rs
src/test/run-pass/while-with-break.rs
src/test/run-pass/while.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

index 362d2ba749d1c29bcf0ae1e93520bf9760e775b4..7f5a72e8a2c8cde5ff3c72f9e8949a8ac0aec747 100644 (file)
@@ -85,20 +85,20 @@ pub fn parse_config(args: ~[~str]) -> config {
         let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
         println(getopts::groups::usage(message, groups));
         println("");
-        fail2!()
+        fail!()
     }
 
     let matches =
         &match getopts::groups::getopts(args_, groups) {
           Ok(m) => m,
-          Err(f) => fail2!("{}", f.to_err_msg())
+          Err(f) => fail!("{}", f.to_err_msg())
         };
 
     if matches.opt_present("h") || matches.opt_present("help") {
         let message = format!("Usage: {} [OPTIONS]  [TESTNAME...]", argv0);
         println(getopts::groups::usage(message, groups));
         println("");
-        fail2!()
+        fail!()
     }
 
     fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
@@ -203,7 +203,7 @@ pub fn str_mode(s: ~str) -> mode {
       ~"pretty" => mode_pretty,
       ~"debug-info" => mode_debug_info,
       ~"codegen" => mode_codegen,
-      _ => fail2!("invalid mode")
+      _ => fail!("invalid mode")
     }
 }
 
@@ -226,7 +226,7 @@ pub fn run_tests(config: &config) {
     // For context, see #8904
     rt::test::prepare_for_lots_of_tests();
     let res = test::run_tests_console(&opts, tests);
-    if !res { fail2!("Some tests failed"); }
+    if !res { fail!("Some tests failed"); }
 }
 
 pub fn test_opts(config: &config) -> test::TestOpts {
@@ -244,13 +244,13 @@ pub fn test_opts(config: &config) -> test::TestOpts {
 }
 
 pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
-    debug2!("making tests from {}",
+    debug!("making tests from {}",
            config.src_base.display());
     let mut tests = ~[];
     let dirs = os::list_dir_path(&config.src_base);
     for file in dirs.iter() {
         let file = file.clone();
-        debug2!("inspecting file {}", file.display());
+        debug!("inspecting file {}", file.display());
         if is_test(config, &file) {
             let t = do make_test(config, &file) {
                 match config.mode {
index e49a9701460b0eff721ffe3ae9c4e595949cf2e3..0c94ec8ab8a833005a833289bc86340553da845f 100644 (file)
@@ -61,7 +61,7 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
     while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
     let msg = line.slice(idx, len).to_owned();
 
-    debug2!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
+    debug!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
 
     return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
                            msg: msg}];
index 541aa082f51667b861580ce00c4e05b37e109ba8..368c96ffe8542767944117fbc56320716769a271 100644 (file)
@@ -154,7 +154,7 @@ fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
               let end = strs.pop();
               (strs.pop(), end)
           }
-          n => fail2!("Expected 1 or 2 strings, not {}", n)
+          n => fail!("Expected 1 or 2 strings, not {}", n)
         }
     }
 }
@@ -183,7 +183,7 @@ fn parse_name_value_directive(line: &str,
         Some(colon) => {
             let value = line.slice(colon + keycolon.len(),
                                    line.len()).to_owned();
-            debug2!("{}: {}", directive,  value);
+            debug!("{}: {}", directive,  value);
             Some(value)
         }
         None => None
index 627a80ace691636e4b9d227e76f2ad314470ae12..d02b88ae74e5f8af60478b8e10051f9be4847d84 100644 (file)
@@ -63,9 +63,9 @@ pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {
         io::stdout().write_str("\n\n");
     }
     let testfile = Path::new(testfile);
-    debug2!("running {}", testfile.display());
+    debug!("running {}", testfile.display());
     let props = load_props(&testfile);
-    debug2!("loaded props");
+    debug!("loaded props");
     match config.mode {
       mode_compile_fail => run_cfail_test(&config, &props, &testfile),
       mode_run_fail => run_rfail_test(&config, &props, &testfile),
@@ -241,7 +241,7 @@ fn compare_source(expected: &str, actual: &str) {
 \n",
                      expected, actual);
             io::stdout().write_str(msg);
-            fail2!();
+            fail!();
         }
     }
 
@@ -289,7 +289,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
     let script_str = [~"set charset UTF-8",
                       cmds,
                       ~"quit\n"].connect("\n");
-    debug2!("script_str = {}", script_str);
+    debug!("script_str = {}", script_str);
     dump_output_file(config, testfile, script_str, "debugger.script");
 
     // run debugger script with gdb
@@ -348,10 +348,10 @@ fn check_error_patterns(props: &TestProps,
     let mut done = false;
     for line in ProcRes.stderr.line_iter() {
         if line.contains(*next_err_pat) {
-            debug2!("found error pattern {}", *next_err_pat);
+            debug!("found error pattern {}", *next_err_pat);
             next_err_idx += 1u;
             if next_err_idx == props.error_patterns.len() {
-                debug2!("found all error patterns");
+                debug!("found all error patterns");
                 done = true;
                 break;
             }
@@ -423,7 +423,7 @@ fn prefix_matches( line : &str, prefix : &str ) -> bool {
         let mut was_expected = false;
         for (i, ee) in expected_errors.iter().enumerate() {
             if !found_flags[i] {
-                debug2!("prefix={} ee.kind={} ee.msg={} line={}",
+                debug!("prefix={} ee.kind={} ee.msg={} line={}",
                        prefixes[i], ee.kind, ee.msg, line);
                 if (prefix_matches(line, prefixes[i]) &&
                     line.contains(ee.kind) &&
@@ -626,7 +626,7 @@ fn compose_and_run_compiler(
 fn ensure_dir(path: &Path) {
     if os::path_is_dir(path) { return; }
     if !os::make_dir(path, 0x1c0i32) {
-        fail2!("can't make dir {}", path.display());
+        fail!("can't make dir {}", path.display());
     }
 }
 
@@ -784,7 +784,7 @@ fn maybe_dump_to_stdout(config: &config, out: &str, err: &str) {
 
 fn error(err: ~str) { io::stdout().write_line(format!("\nerror: {}", err)); }
 
-fn fatal(err: ~str) -> ! { error(err); fail2!(); }
+fn fatal(err: ~str) -> ! { error(err); fail!(); }
 
 fn fatal_ProcRes(err: ~str, ProcRes: &ProcRes) -> ! {
     let msg =
@@ -802,7 +802,7 @@ fn fatal_ProcRes(err: ~str, ProcRes: &ProcRes) -> ! {
 \n",
              err, ProcRes.cmdline, ProcRes.stdout, ProcRes.stderr);
     io::stdout().write_str(msg);
-    fail2!();
+    fail!();
 }
 
 fn _arm_exec_compiled_test(config: &config, props: &TestProps,
index 59b8ba1c7ff30ef238e31927dd7ee0a3c306b3f7..04ef180299daf6d7500eda6c738a9c7ad347bd10 100644 (file)
@@ -29,7 +29,7 @@ pub fn get_os(triple: &str) -> &'static str {
             return os
         }
     }
-    fail2!("Cannot determine OS from triple");
+    fail!("Cannot determine OS from triple");
 }
 
 pub fn make_new_path(path: &str) -> ~str {
@@ -63,6 +63,6 @@ pub fn path_div() -> ~str { ~":" }
 pub fn path_div() -> ~str { ~";" }
 
 pub fn logv(config: &config, s: ~str) {
-    debug2!("{}", s);
+    debug!("{}", s);
     if config.verbose { io::println(s); }
 }
index d1e7534795b0d538d36cf6197638b594d2fbba09..66dad4721aa98bcf0ae078e223d5705ee919445c 100644 (file)
@@ -255,7 +255,7 @@ pub fn unwrap(self) -> T {
         let inner = x.unwrap();
         let MutexArcInner { failed: failed, data: data, _ } = inner;
         if failed {
-            fail2!("Can't unwrap poisoned MutexArc - another task failed inside!");
+            fail!("Can't unwrap poisoned MutexArc - another task failed inside!");
         }
         data
     }
@@ -300,9 +300,9 @@ pub fn access_cond<'x, 'c, U>(&self,
 fn check_poison(is_mutex: bool, failed: bool) {
     if failed {
         if is_mutex {
-            fail2!("Poisoned MutexArc - another task failed inside!");
+            fail!("Poisoned MutexArc - another task failed inside!");
         } else {
-            fail2!("Poisoned rw_arc - another task failed inside!");
+            fail!("Poisoned rw_arc - another task failed inside!");
         }
     }
 }
@@ -505,7 +505,7 @@ pub fn unwrap(self) -> T {
         let inner = x.unwrap();
         let RWArcInner { failed: failed, data: data, _ } = inner;
         if failed {
-            fail2!("Can't unwrap poisoned RWArc - another task failed inside!")
+            fail!("Can't unwrap poisoned RWArc - another task failed inside!")
         }
         data
     }
@@ -619,7 +619,7 @@ fn manually_share_arc() {
         assert_eq!(arc_v.get()[2], 3);
         assert_eq!(arc_v.get()[4], 5);
 
-        info2!("{:?}", arc_v);
+        info!("{:?}", arc_v);
     }
 
     #[test]
index 6c4e86d958e25ad494233a5a4d32c94a3e13283a..b684e0d429e316b94ecd92f14ec04441eb93de1d 100644 (file)
@@ -127,7 +127,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
 
         let start = round_up_to(after_tydesc, align);
 
-        //debug2!("freeing object: idx = {}, size = {}, align = {}, done = {}",
+        //debug!("freeing object: idx = {}, size = {}, align = {}, done = {}",
         //       start, size, align, is_done);
         if is_done {
             ((*tydesc).drop_glue)(ptr::offset(buf, start as int) as *i8);
@@ -176,7 +176,7 @@ fn alloc_pod_inner(&mut self, n_bytes: uint, align: uint) -> *u8 {
             }
             this.pod_head.fill = end;
 
-            //debug2!("idx = {}, size = {}, align = {}, fill = {}",
+            //debug!("idx = {}, size = {}, align = {}, fill = {}",
             //       start, n_bytes, align, head.fill);
 
             ptr::offset(vec::raw::to_ptr(this.pod_head.data), start as int)
@@ -232,7 +232,7 @@ fn alloc_nonpod_inner(&mut self, n_bytes: uint, align: uint)
             let head = transmute_mut_region(&mut self.head);
             head.fill = round_up_to(end, mem::pref_align_of::<*TyDesc>());
 
-            //debug2!("idx = {}, size = {}, align = {}, fill = {}",
+            //debug!("idx = {}, size = {}, align = {}, fill = {}",
             //       start, n_bytes, align, head.fill);
 
             let buf = vec::raw::to_ptr(self.head.data);
@@ -305,6 +305,6 @@ fn test_arena_destructors_fail() {
     // Now, fail while allocating
     do arena.alloc::<@int> {
         // Now fail.
-        fail2!();
+        fail!();
     };
 }
index 5d9c38c954304bbdd0f460aa6b2f5446f9347c0e..3960be46686983366860f8d8a86633a68573c9d5 100644 (file)
@@ -141,7 +141,7 @@ fn to_base64(&self, config: Config) -> ~str {
                     v.push('=' as u8);
                 }
             }
-            _ => fail2!("Algebra is broken, please alert the math police")
+            _ => fail!("Algebra is broken, please alert the math police")
         }
 
         unsafe {
index 4f8cd4d33088369873cdacad04336c84d61c2126..bf0fde807d3f4dfee005c8dd633073967ea2d228 100644 (file)
@@ -232,7 +232,7 @@ pub struct Bitv {
 }
 
 fn die() -> ! {
-    fail2!("Tried to do operation on bit vectors with different sizes");
+    fail!("Tried to do operation on bit vectors with different sizes");
 }
 
 impl Bitv {
@@ -1357,7 +1357,7 @@ fn test_small_clear() {
         let mut b = Bitv::new(14, true);
         b.clear();
         do b.ones |i| {
-            fail2!("found 1 at {:?}", i)
+            fail!("found 1 at {:?}", i)
         };
     }
 
@@ -1366,7 +1366,7 @@ fn test_big_clear() {
         let mut b = Bitv::new(140, true);
         b.clear();
         do b.ones |i| {
-            fail2!("found 1 at {:?}", i)
+            fail!("found 1 at {:?}", i)
         };
     }
 
index 4da8bc89ea622586cb890277a722ab662eeae5fe..4a3801827a21120f83ede468b37bca0e3b5ffc7b 100644 (file)
@@ -179,7 +179,7 @@ fn send_and_fail_and_try_recv() {
         let (port, chan) = rendezvous();
         do spawn_unlinked {
             chan.duplex_stream.send(()); // Can't access this field outside this module
-            fail2!()
+            fail!()
         }
         port.recv()
     }
@@ -189,7 +189,7 @@ fn try_send_and_recv_then_fail_before_ack() {
         let (port, chan) = rendezvous();
         do spawn_unlinked {
             port.duplex_stream.recv();
-            fail2!()
+            fail!()
         }
         chan.try_send(());
     }
@@ -200,7 +200,7 @@ fn send_and_recv_then_fail_before_ack() {
         let (port, chan) = rendezvous();
         do spawn_unlinked {
             port.duplex_stream.recv();
-            fail2!()
+            fail!()
         }
         chan.send(());
     }
index f4bc87ae76392fddd14e1b93599782c5f33c719c..97b82383d8432d2a9c420713f1f371a045a927e3 100644 (file)
@@ -109,23 +109,23 @@ fn to_bits(self) -> (u64, u64) {
     }
 }
 
-/// Adds the specified number of bytes to the bit count. fail2!() if this would cause numeric
+/// Adds the specified number of bytes to the bit count. fail!() if this would cause numeric
 /// overflow.
 pub fn add_bytes_to_bits<T: Int + CheckedAdd + ToBits>(bits: T, bytes: T) -> T {
     let (new_high_bits, new_low_bits) = bytes.to_bits();
 
     if new_high_bits > Zero::zero() {
-        fail2!("Numeric overflow occured.")
+        fail!("Numeric overflow occured.")
     }
 
     match bits.checked_add(&new_low_bits) {
         Some(x) => return x,
-        None => fail2!("Numeric overflow occured.")
+        None => fail!("Numeric overflow occured.")
     }
 }
 
 /// Adds the specified number of bytes to the bit count, which is a tuple where the first element is
-/// the high order value. fail2!() if this would cause numeric overflow.
+/// the high order value. fail!() if this would cause numeric overflow.
 pub fn add_bytes_to_bits_tuple
         <T: Int + Unsigned + CheckedAdd + ToBits>
         (bits: (T, T), bytes: T) -> (T, T) {
@@ -144,7 +144,7 @@ pub fn add_bytes_to_bits_tuple
             } else {
                 match hi.checked_add(&new_high_bits) {
                     Some(y) => return (y, x),
-                    None => fail2!("Numeric overflow occured.")
+                    None => fail!("Numeric overflow occured.")
                 }
             }
         },
@@ -152,7 +152,7 @@ pub fn add_bytes_to_bits_tuple
             let one: T = One::one();
             let z = match new_high_bits.checked_add(&one) {
                 Some(w) => w,
-                None => fail2!("Numeric overflow occured.")
+                None => fail!("Numeric overflow occured.")
             };
             match hi.checked_add(&z) {
                 // This re-executes the addition that was already performed earlier when overflow
@@ -163,7 +163,7 @@ pub fn add_bytes_to_bits_tuple
                 // be Unsigned - overflow is not defined for Signed types. This function could be
                 // implemented for signed types as well if that were needed.
                 Some(y) => return (y, low + new_low_bits),
-                None => fail2!("Numeric overflow occured.")
+                None => fail!("Numeric overflow occured.")
             }
         }
     }
index 6668e9871f4f7eb958b8ca7648cbbd8c4cc4fc03..f29cbd6ee5294cdb70f6662ca05d8249af914a24 100644 (file)
@@ -635,11 +635,11 @@ pub fn check_links<T>(list: &DList<T>) {
     loop {
         match (last_ptr, node_ptr.prev.resolve_immut()) {
             (None   , None      ) => {}
-            (None   , _         ) => fail2!("prev link for list_head"),
+            (None   , _         ) => fail!("prev link for list_head"),
             (Some(p), Some(pptr)) => {
                 assert_eq!(p as *Node<T>, pptr as *Node<T>);
             }
-            _ => fail2!("prev link is none, not good"),
+            _ => fail!("prev link is none, not good"),
         }
         match node_ptr.next {
             Some(ref next) => {
index 0792400e857e3df92664f15227b8c1886c363ee2..006ae3520c60b25696f50d104a886ba1008a1fa5 100644 (file)
@@ -138,7 +138,7 @@ fn vuint_at_slow(data: &[u8], start: uint) -> Res {
                         (data[start + 3u] as uint),
                     next: start + 4u};
         }
-        fail2!("vint too big");
+        fail!("vint too big");
     }
 
     #[cfg(target_arch = "x86")]
@@ -216,8 +216,8 @@ pub fn get_doc(d: Doc, tg: uint) -> Doc {
         match maybe_get_doc(d, tg) {
             Some(d) => d,
             None => {
-                error2!("failed to find block with tag {}", tg);
-                fail2!();
+                error!("failed to find block with tag {}", tg);
+                fail!();
             }
         }
     }
@@ -305,20 +305,20 @@ fn _check_label(&mut self, lbl: &str) {
                     self.pos = r_doc.end;
                     let str = r_doc.as_str_slice();
                     if lbl != str {
-                        fail2!("Expected label {} but found {}", lbl, str);
+                        fail!("Expected label {} but found {}", lbl, str);
                     }
                 }
             }
         }
 
         fn next_doc(&mut self, exp_tag: EbmlEncoderTag) -> Doc {
-            debug2!(". next_doc(exp_tag={:?})", exp_tag);
+            debug!(". next_doc(exp_tag={:?})", exp_tag);
             if self.pos >= self.parent.end {
-                fail2!("no more documents in current node!");
+                fail!("no more documents in current node!");
             }
             let TaggedDoc { tag: r_tag, doc: r_doc } =
                 doc_at(self.parent.data, self.pos);
-            debug2!("self.parent={}-{} self.pos={} r_tag={} r_doc={}-{}",
+            debug!("self.parent={}-{} self.pos={} r_tag={} r_doc={}-{}",
                    self.parent.start,
                    self.parent.end,
                    self.pos,
@@ -326,11 +326,11 @@ fn next_doc(&mut self, exp_tag: EbmlEncoderTag) -> Doc {
                    r_doc.start,
                    r_doc.end);
             if r_tag != (exp_tag as uint) {
-                fail2!("expected EBML doc with tag {:?} but found tag {:?}",
+                fail!("expected EBML doc with tag {:?} but found tag {:?}",
                        exp_tag, r_tag);
             }
             if r_doc.end > self.parent.end {
-                fail2!("invalid EBML, child extends to {:#x}, parent to {:#x}",
+                fail!("invalid EBML, child extends to {:#x}, parent to {:#x}",
                       r_doc.end, self.parent.end);
             }
             self.pos = r_doc.end;
@@ -352,7 +352,7 @@ fn push_doc<T>(&mut self, exp_tag: EbmlEncoderTag,
 
         fn _next_uint(&mut self, exp_tag: EbmlEncoderTag) -> uint {
             let r = doc_as_u32(self.next_doc(exp_tag));
-            debug2!("_next_uint exp_tag={:?} result={}", exp_tag, r);
+            debug!("_next_uint exp_tag={:?} result={}", exp_tag, r);
             r as uint
         }
     }
@@ -384,7 +384,7 @@ fn read_u8 (&mut self) -> u8  { doc_as_u8 (self.next_doc(EsU8 )) }
         fn read_uint(&mut self) -> uint {
             let v = doc_as_u64(self.next_doc(EsUint));
             if v > (::std::uint::max_value as u64) {
-                fail2!("uint {} too large for this architecture", v);
+                fail!("uint {} too large for this architecture", v);
             }
             v as uint
         }
@@ -404,8 +404,8 @@ fn read_i8 (&mut self) -> i8 {
         fn read_int(&mut self) -> int {
             let v = doc_as_u64(self.next_doc(EsInt)) as i64;
             if v > (int::max_value as i64) || v < (int::min_value as i64) {
-                debug2!("FIXME \\#6122: Removing this makes this function miscompile");
-                fail2!("int {} out of range for this architecture", v);
+                debug!("FIXME \\#6122: Removing this makes this function miscompile");
+                fail!("int {} out of range for this architecture", v);
             }
             v as int
         }
@@ -434,7 +434,7 @@ fn read_enum<T>(&mut self,
                         name: &str,
                         f: &fn(&mut Decoder) -> T)
                         -> T {
-            debug2!("read_enum({})", name);
+            debug!("read_enum({})", name);
             self._check_label(name);
 
             let doc = self.next_doc(EsEnum);
@@ -454,9 +454,9 @@ fn read_enum_variant<T>(&mut self,
                                 _: &[&str],
                                 f: &fn(&mut Decoder, uint) -> T)
                                 -> T {
-            debug2!("read_enum_variant()");
+            debug!("read_enum_variant()");
             let idx = self._next_uint(EsEnumVid);
-            debug2!("  idx={}", idx);
+            debug!("  idx={}", idx);
 
             let doc = self.next_doc(EsEnumBody);
 
@@ -474,7 +474,7 @@ fn read_enum_variant<T>(&mut self,
         fn read_enum_variant_arg<T>(&mut self,
                                     idx: uint,
                                     f: &fn(&mut Decoder) -> T) -> T {
-            debug2!("read_enum_variant_arg(idx={})", idx);
+            debug!("read_enum_variant_arg(idx={})", idx);
             f(self)
         }
 
@@ -482,9 +482,9 @@ fn read_enum_struct_variant<T>(&mut self,
                                        _: &[&str],
                                        f: &fn(&mut Decoder, uint) -> T)
                                        -> T {
-            debug2!("read_enum_struct_variant()");
+            debug!("read_enum_struct_variant()");
             let idx = self._next_uint(EsEnumVid);
-            debug2!("  idx={}", idx);
+            debug!("  idx={}", idx);
 
             let doc = self.next_doc(EsEnumBody);
 
@@ -504,7 +504,7 @@ fn read_enum_struct_variant_field<T>(&mut self,
                                              idx: uint,
                                              f: &fn(&mut Decoder) -> T)
                                              -> T {
-            debug2!("read_enum_struct_variant_arg(name={}, idx={})", name, idx);
+            debug!("read_enum_struct_variant_arg(name={}, idx={})", name, idx);
             f(self)
         }
 
@@ -513,7 +513,7 @@ fn read_struct<T>(&mut self,
                           _: uint,
                           f: &fn(&mut Decoder) -> T)
                           -> T {
-            debug2!("read_struct(name={})", name);
+            debug!("read_struct(name={})", name);
             f(self)
         }
 
@@ -522,19 +522,19 @@ fn read_struct_field<T>(&mut self,
                                 idx: uint,
                                 f: &fn(&mut Decoder) -> T)
                                 -> T {
-            debug2!("read_struct_field(name={}, idx={})", name, idx);
+            debug!("read_struct_field(name={}, idx={})", name, idx);
             self._check_label(name);
             f(self)
         }
 
         fn read_tuple<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-            debug2!("read_tuple()");
+            debug!("read_tuple()");
             self.read_seq(f)
         }
 
         fn read_tuple_arg<T>(&mut self, idx: uint, f: &fn(&mut Decoder) -> T)
                              -> T {
-            debug2!("read_tuple_arg(idx={})", idx);
+            debug!("read_tuple_arg(idx={})", idx);
             self.read_seq_elt(idx, f)
         }
 
@@ -542,7 +542,7 @@ fn read_tuple_struct<T>(&mut self,
                                 name: &str,
                                 f: &fn(&mut Decoder, uint) -> T)
                                 -> T {
-            debug2!("read_tuple_struct(name={})", name);
+            debug!("read_tuple_struct(name={})", name);
             self.read_tuple(f)
         }
 
@@ -550,43 +550,43 @@ fn read_tuple_struct_arg<T>(&mut self,
                                     idx: uint,
                                     f: &fn(&mut Decoder) -> T)
                                     -> T {
-            debug2!("read_tuple_struct_arg(idx={})", idx);
+            debug!("read_tuple_struct_arg(idx={})", idx);
             self.read_tuple_arg(idx, f)
         }
 
         fn read_option<T>(&mut self, f: &fn(&mut Decoder, bool) -> T) -> T {
-            debug2!("read_option()");
+            debug!("read_option()");
             do self.read_enum("Option") |this| {
                 do this.read_enum_variant(["None", "Some"]) |this, idx| {
                     match idx {
                         0 => f(this, false),
                         1 => f(this, true),
-                        _ => fail2!(),
+                        _ => fail!(),
                     }
                 }
             }
         }
 
         fn read_seq<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-            debug2!("read_seq()");
+            debug!("read_seq()");
             do self.push_doc(EsVec) |d| {
                 let len = d._next_uint(EsVecLen);
-                debug2!("  len={}", len);
+                debug!("  len={}", len);
                 f(d, len)
             }
         }
 
         fn read_seq_elt<T>(&mut self, idx: uint, f: &fn(&mut Decoder) -> T)
                            -> T {
-            debug2!("read_seq_elt(idx={})", idx);
+            debug!("read_seq_elt(idx={})", idx);
             self.push_doc(EsVecElt, f)
         }
 
         fn read_map<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-            debug2!("read_map()");
+            debug!("read_map()");
             do self.push_doc(EsMap) |d| {
                 let len = d._next_uint(EsMapLen);
-                debug2!("  len={}", len);
+                debug!("  len={}", len);
                 f(d, len)
             }
         }
@@ -595,7 +595,7 @@ fn read_map_elt_key<T>(&mut self,
                                idx: uint,
                                f: &fn(&mut Decoder) -> T)
                                -> T {
-            debug2!("read_map_elt_key(idx={})", idx);
+            debug!("read_map_elt_key(idx={})", idx);
             self.push_doc(EsMapKey, f)
         }
 
@@ -603,7 +603,7 @@ fn read_map_elt_val<T>(&mut self,
                                idx: uint,
                                f: &fn(&mut Decoder) -> T)
                                -> T {
-            debug2!("read_map_elt_val(idx={})", idx);
+            debug!("read_map_elt_val(idx={})", idx);
             self.push_doc(EsMapVal, f)
         }
     }
@@ -639,7 +639,7 @@ fn write_sized_vuint(w: @io::Writer, n: uint, size: uint) {
                             n as u8]),
             4u => w.write(&[0x10u8 | ((n >> 24_u) as u8), (n >> 16_u) as u8,
                             (n >> 8_u) as u8, n as u8]),
-            _ => fail2!("vint to write too big: {}", n)
+            _ => fail!("vint to write too big: {}", n)
         };
     }
 
@@ -648,7 +648,7 @@ fn write_vuint(w: @io::Writer, n: uint) {
         if n < 0x4000_u { write_sized_vuint(w, n, 2u); return; }
         if n < 0x200000_u { write_sized_vuint(w, n, 3u); return; }
         if n < 0x10000000_u { write_sized_vuint(w, n, 4u); return; }
-        fail2!("vint to write too big: {}", n);
+        fail!("vint to write too big: {}", n);
     }
 
     pub fn Encoder(w: @io::Writer) -> Encoder {
@@ -662,7 +662,7 @@ pub fn Encoder(w: @io::Writer) -> Encoder {
     // FIXME (#2741): Provide a function to write the standard ebml header.
     impl Encoder {
         pub fn start_tag(&mut self, tag_id: uint) {
-            debug2!("Start tag {}", tag_id);
+            debug!("Start tag {}", tag_id);
 
             // Write the enum ID:
             write_vuint(self.writer, tag_id);
@@ -681,7 +681,7 @@ pub fn end_tag(&mut self) {
             write_sized_vuint(self.writer, size, 4u);
             self.writer.seek(cur_pos as int, io::SeekSet);
 
-            debug2!("End tag (size = {})", size);
+            debug!("End tag (size = {})", size);
         }
 
         pub fn wr_tag(&mut self, tag_id: uint, blk: &fn()) {
@@ -745,12 +745,12 @@ pub fn wr_tagged_str(&mut self, tag_id: uint, v: &str) {
         }
 
         pub fn wr_bytes(&mut self, b: &[u8]) {
-            debug2!("Write {} bytes", b.len());
+            debug!("Write {} bytes", b.len());
             self.writer.write(b);
         }
 
         pub fn wr_str(&mut self, s: &str) {
-            debug2!("Write str: {}", s);
+            debug!("Write str: {}", s);
             self.writer.write(s.as_bytes());
         }
     }
@@ -969,7 +969,7 @@ mod tests {
     #[test]
     fn test_option_int() {
         fn test_v(v: Option<int>) {
-            debug2!("v == {:?}", v);
+            debug!("v == {:?}", v);
             let bytes = do io::with_bytes_writer |wr| {
                 let mut ebml_w = writer::Encoder(wr);
                 v.encode(&mut ebml_w)
@@ -977,7 +977,7 @@ fn test_v(v: Option<int>) {
             let ebml_doc = reader::Doc(@bytes);
             let mut deser = reader::Decoder(ebml_doc);
             let v1 = serialize::Decodable::decode(&mut deser);
-            debug2!("v1 == {:?}", v1);
+            debug!("v1 == {:?}", v1);
             assert_eq!(v, v1);
         }
 
index 8f176d5ccea131849600e02a411afb84abd1f949..fda88c583ce0fe71be9827d95128974cb1ac468e 100644 (file)
@@ -506,7 +506,7 @@ fn test_input_vec() {
             let contents =
                 vec::from_fn(3, |j| format!("{} {}", i, j));
             make_file(filename.get_ref(), contents);
-            debug2!("contents={:?}", contents);
+            debug!("contents={:?}", contents);
             all_lines.push_all(contents);
         }
 
@@ -555,7 +555,7 @@ fn test_empty_files() {
             let expected_path = match line {
                 "1" | "2" => filenames[0].clone(),
                 "3" | "4" => filenames[2].clone(),
-                _ => fail2!("unexpected line")
+                _ => fail!("unexpected line")
             };
             assert_eq!(state.current_path.clone(), expected_path);
             count += 1;
index a1dccf33f6ceed1064c6fceb4b68d348205695d5..9d6c2e8aa8207d0b4269ac8811c9c9280e5db283 100644 (file)
@@ -121,11 +121,11 @@ fn test_flate_round_trip() {
             do 2000.times {
                 input.push_all(r.choose(words));
             }
-            debug2!("de/inflate of {} bytes of random word-sequences",
+            debug!("de/inflate of {} bytes of random word-sequences",
                    input.len());
             let cmp = deflate_bytes(input);
             let out = inflate_bytes(cmp);
-            debug2!("{} bytes deflated to {} ({:.1f}% size)",
+            debug!("{} bytes deflated to {} ({:.1f}% size)",
                    input.len(), cmp.len(),
                    100.0 * ((cmp.len() as f64) / (input.len() as f64)));
             assert_eq!(input, out);
index 516a34f531283c14ca1df5f6019ec2d125a5fd13..fdb296e5f403b3d84693bd59158047257d146270 100644 (file)
@@ -57,7 +57,7 @@ pub fn unwrap(self) -> A {
         let state = replace(&mut this.state, Evaluating);
         match state {
             Forced(v) => v,
-            _ => fail2!( "Logic error." ),
+            _ => fail!( "Logic error." ),
         }
     }
 
@@ -69,10 +69,10 @@ pub fn get_ref<'a>(&'a mut self) -> &'a A {
         */
         match self.state {
             Forced(ref v) => return v,
-            Evaluating => fail2!("Recursive forcing of future!"),
+            Evaluating => fail!("Recursive forcing of future!"),
             Pending(_) => {
                 match replace(&mut self.state, Evaluating) {
-                    Forced(_) | Evaluating => fail2!("Logic error."),
+                    Forced(_) | Evaluating => fail!("Logic error."),
                     Pending(f) => {
                         self.state = Forced(f());
                         self.get_ref()
@@ -217,7 +217,7 @@ fn test_spawn_with() {
     #[test]
     #[should_fail]
     fn test_futurefail() {
-        let mut f = Future::spawn(|| fail2!());
+        let mut f = Future::spawn(|| fail!());
         let _x: ~str = f.get();
     }
 
index a997d49fdde9aef102070925355c3c5dc319cc10..a0ce29cd1b64468a64e431ca60e8af9abf00ac9d 100644 (file)
@@ -60,7 +60,7 @@
 //!     ];
 //!     let matches = match getopts(args.tail(), opts) {
 //!         Ok(m) => { m }
-//!         Err(f) => { fail2!(f.to_err_msg()) }
+//!         Err(f) => { fail!(f.to_err_msg()) }
 //!     };
 //!     if matches.opt_present("h") || matches.opt_present("help") {
 //!         print_usage(program, opts);
@@ -190,7 +190,7 @@ impl Matches {
     pub fn opt_vals(&self, nm: &str) -> ~[Optval] {
         match find_opt(self.opts, Name::from_str(nm)) {
             Some(id) => self.vals[id].clone(),
-            None => fail2!("No option '{}' defined", nm)
+            None => fail!("No option '{}' defined", nm)
         }
     }
 
@@ -556,7 +556,7 @@ pub fn long_to_short(&self) -> Opt {
             } = (*self).clone();
 
             match (short_name.len(), long_name.len()) {
-                (0,0) => fail2!("this long-format option was given no name"),
+                (0,0) => fail!("this long-format option was given no name"),
                 (0,_) => Opt {
                     name: Long((long_name)),
                     hasarg: hasarg,
@@ -582,7 +582,7 @@ pub fn long_to_short(&self) -> Opt {
                         }
                     ]
                 },
-                (_,_) => fail2!("something is wrong with the long-form opt")
+                (_,_) => fail!("something is wrong with the long-form opt")
             }
         }
     }
@@ -701,7 +701,7 @@ pub fn usage(brief: &str, opts: &[OptGroup]) -> ~str {
                     row.push_str(short_name);
                     row.push_char(' ');
                 }
-                _ => fail2!("the short name should only be 1 ascii char long"),
+                _ => fail!("the short name should only be 1 ascii char long"),
             }
 
             // long option
@@ -815,7 +815,7 @@ enum LengthLimit {
 
                 (B, Cr, UnderLim) => { B }
                 (B, Cr, OverLim)  if (i - last_start + 1) > lim
-                                => fail2!("word starting with {} longer than limit!",
+                                => fail!("word starting with {} longer than limit!",
                                         ss.slice(last_start, i + 1)),
                 (B, Cr, OverLim)  => { slice(); slice_start = last_start; B }
                 (B, Ws, UnderLim) => { last_end = i; C }
@@ -888,7 +888,7 @@ fn test_reqopt_long() {
             assert!(m.opt_present("test"));
             assert_eq!(m.opt_str("test").unwrap(), ~"20");
           }
-          _ => { fail2!("test_reqopt_long failed"); }
+          _ => { fail!("test_reqopt_long failed"); }
         }
     }
 
@@ -899,7 +899,7 @@ fn test_reqopt_long_missing() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -910,7 +910,7 @@ fn test_reqopt_long_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -921,7 +921,7 @@ fn test_reqopt_long_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -935,7 +935,7 @@ fn test_reqopt_short() {
             assert!(m.opt_present("t"));
             assert_eq!(m.opt_str("t").unwrap(), ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -946,7 +946,7 @@ fn test_reqopt_short_missing() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -957,7 +957,7 @@ fn test_reqopt_short_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -968,7 +968,7 @@ fn test_reqopt_short_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -984,7 +984,7 @@ fn test_optopt_long() {
             assert!(m.opt_present("test"));
             assert_eq!(m.opt_str("test").unwrap(), ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -995,7 +995,7 @@ fn test_optopt_long_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("test")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1006,7 +1006,7 @@ fn test_optopt_long_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1017,7 +1017,7 @@ fn test_optopt_long_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1031,7 +1031,7 @@ fn test_optopt_short() {
             assert!((m.opt_present("t")));
             assert_eq!(m.opt_str("t").unwrap(), ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1042,7 +1042,7 @@ fn test_optopt_short_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("t")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1053,7 +1053,7 @@ fn test_optopt_short_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1064,7 +1064,7 @@ fn test_optopt_short_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1077,7 +1077,7 @@ fn test_optflag_long() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(m.opt_present("test")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1088,7 +1088,7 @@ fn test_optflag_long_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("test")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1099,10 +1099,10 @@ fn test_optflag_long_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => {
-            error2!("{:?}", f.clone().to_err_msg());
+            error!("{:?}", f.clone().to_err_msg());
             check_fail_type(f, UnexpectedArgument_);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1113,7 +1113,7 @@ fn test_optflag_long_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1124,7 +1124,7 @@ fn test_optflag_short() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(m.opt_present("t")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1135,7 +1135,7 @@ fn test_optflag_short_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("t")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1150,7 +1150,7 @@ fn test_optflag_short_arg() {
 
             assert!(m.free[0] == ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1161,7 +1161,7 @@ fn test_optflag_short_multi() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, OptionDuplicated_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1175,7 +1175,7 @@ fn test_optflagmulti_short1() {
           Ok(ref m) => {
             assert_eq!(m.opt_count("v"), 1);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1188,7 +1188,7 @@ fn test_optflagmulti_short2a() {
           Ok(ref m) => {
             assert_eq!(m.opt_count("v"), 2);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1201,7 +1201,7 @@ fn test_optflagmulti_short2b() {
           Ok(ref m) => {
             assert_eq!(m.opt_count("v"), 2);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1214,7 +1214,7 @@ fn test_optflagmulti_long1() {
           Ok(ref m) => {
             assert_eq!(m.opt_count("verbose"), 1);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1227,7 +1227,7 @@ fn test_optflagmulti_long2() {
           Ok(ref m) => {
             assert_eq!(m.opt_count("verbose"), 2);
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1242,7 +1242,7 @@ fn test_optmulti_long() {
             assert!((m.opt_present("test")));
             assert_eq!(m.opt_str("test").unwrap(), ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1253,7 +1253,7 @@ fn test_optmulti_long_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("test")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1264,7 +1264,7 @@ fn test_optmulti_long_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1281,7 +1281,7 @@ fn test_optmulti_long_multi() {
               assert!(pair[0] == ~"20");
               assert!(pair[1] == ~"30");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1295,7 +1295,7 @@ fn test_optmulti_short() {
             assert!((m.opt_present("t")));
             assert_eq!(m.opt_str("t").unwrap(), ~"20");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1306,7 +1306,7 @@ fn test_optmulti_short_missing() {
         let rs = getopts(args, opts);
         match rs {
           Ok(ref m) => assert!(!m.opt_present("t")),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1317,7 +1317,7 @@ fn test_optmulti_short_no_arg() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, ArgumentMissing_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1334,7 +1334,7 @@ fn test_optmulti_short_multi() {
             assert!(pair[0] == ~"20");
             assert!(pair[1] == ~"30");
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1345,7 +1345,7 @@ fn test_unrecognized_option_long() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, UnrecognizedOption_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1356,7 +1356,7 @@ fn test_unrecognized_option_short() {
         let rs = getopts(args, opts);
         match rs {
           Err(f) => check_fail_type(f, UnrecognizedOption_),
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1388,7 +1388,7 @@ fn test_combined() {
             assert!(pair[1] == ~"-60 70");
             assert!((!m.opt_present("notpresent")));
           }
-          _ => fail2!()
+          _ => fail!()
         }
     }
 
@@ -1399,7 +1399,7 @@ fn test_multi() {
         let args_single = ~[~"-e", ~"foo"];
         let matches_single = &match getopts(args_single, opts) {
           result::Ok(m) => m,
-          result::Err(_) => fail2!()
+          result::Err(_) => fail!()
         };
         assert!(matches_single.opts_present([~"e"]));
         assert!(matches_single.opts_present([~"encrypt", ~"e"]));
@@ -1415,7 +1415,7 @@ fn test_multi() {
         let args_both = ~[~"-e", ~"foo", ~"--encrypt", ~"foo"];
         let matches_both = &match getopts(args_both, opts) {
           result::Ok(m) => m,
-          result::Err(_) => fail2!()
+          result::Err(_) => fail!()
         };
         assert!(matches_both.opts_present([~"e"]));
         assert!(matches_both.opts_present([~"encrypt"]));
@@ -1437,7 +1437,7 @@ fn test_nospace() {
         let opts = ~[optmulti("L"), optmulti("M")];
         let matches = &match getopts(args, opts) {
           result::Ok(m) => m,
-          result::Err(_) => fail2!()
+          result::Err(_) => fail!()
         };
         assert!(matches.opts_present([~"L"]));
         assert_eq!(matches.opts_str([~"L"]).unwrap(), ~"foo");
@@ -1580,8 +1580,8 @@ fn test_groups_usage() {
 
         let generated_usage = groups::usage("Usage: fruits", optgroups);
 
-        debug2!("expected: <<{}>>", expected);
-        debug2!("generated: <<{}>>", generated_usage);
+        debug!("expected: <<{}>>", expected);
+        debug!("generated: <<{}>>", generated_usage);
         assert_eq!(generated_usage, expected);
     }
 
@@ -1608,8 +1608,8 @@ fn test_groups_usage_description_wrapping() {
 
         let usage = groups::usage("Usage: fruits", optgroups);
 
-        debug2!("expected: <<{}>>", expected);
-        debug2!("generated: <<{}>>", usage);
+        debug!("expected: <<{}>>", expected);
+        debug!("generated: <<{}>>", usage);
         assert!(usage == expected)
     }
 
@@ -1635,8 +1635,8 @@ fn test_groups_usage_description_multibyte_handling() {
 
         let usage = groups::usage("Usage: fruits", optgroups);
 
-        debug2!("expected: <<{}>>", expected);
-        debug2!("generated: <<{}>>", usage);
+        debug!("expected: <<{}>>", expected);
+        debug!("generated: <<{}>>", usage);
         assert!(usage == expected)
     }
 }
index 1d8f3ffdc62aae3077b2ae3fe665e9f19315a9e1..e151568ad7f818c21cc2ad0850163ab9e31f622a 100644 (file)
@@ -880,10 +880,10 @@ pub fn Decoder(json: Json) -> Decoder {
 
 impl serialize::Decoder for Decoder {
     fn read_nil(&mut self) -> () {
-        debug2!("read_nil");
+        debug!("read_nil");
         match self.stack.pop() {
             Null => (),
-            value => fail2!("not a null: {:?}", value)
+            value => fail!("not a null: {:?}", value)
         }
     }
 
@@ -900,18 +900,18 @@ fn read_i8 (&mut self) -> i8  { self.read_f64() as i8 }
     fn read_int(&mut self) -> int { self.read_f64() as int }
 
     fn read_bool(&mut self) -> bool {
-        debug2!("read_bool");
+        debug!("read_bool");
         match self.stack.pop() {
             Boolean(b) => b,
-            value => fail2!("not a boolean: {:?}", value)
+            value => fail!("not a boolean: {:?}", value)
         }
     }
 
     fn read_f64(&mut self) -> f64 {
-        debug2!("read_f64");
+        debug!("read_f64");
         match self.stack.pop() {
             Number(f) => f,
-            value => fail2!("not a number: {:?}", value)
+            value => fail!("not a number: {:?}", value)
         }
     }
     fn read_f32(&mut self) -> f32 { self.read_f64() as f32 }
@@ -921,20 +921,20 @@ fn read_char(&mut self) -> char {
         let mut v = ~[];
         let s = self.read_str();
         for c in s.iter() { v.push(c) }
-        if v.len() != 1 { fail2!("string must have one character") }
+        if v.len() != 1 { fail!("string must have one character") }
         v[0]
     }
 
     fn read_str(&mut self) -> ~str {
-        debug2!("read_str");
+        debug!("read_str");
         match self.stack.pop() {
             String(s) => s,
-            json => fail2!("not a string: {:?}", json)
+            json => fail!("not a string: {:?}", json)
         }
     }
 
     fn read_enum<T>(&mut self, name: &str, f: &fn(&mut Decoder) -> T) -> T {
-        debug2!("read_enum({})", name);
+        debug!("read_enum({})", name);
         f(self)
     }
 
@@ -942,13 +942,13 @@ fn read_enum_variant<T>(&mut self,
                             names: &[&str],
                             f: &fn(&mut Decoder, uint) -> T)
                             -> T {
-        debug2!("read_enum_variant(names={:?})", names);
+        debug!("read_enum_variant(names={:?})", names);
         let name = match self.stack.pop() {
             String(s) => s,
             Object(o) => {
                 let n = match o.find(&~"variant").expect("invalidly encoded json") {
                     &String(ref s) => s.clone(),
-                    _ => fail2!("invalidly encoded json"),
+                    _ => fail!("invalidly encoded json"),
                 };
                 match o.find(&~"fields").expect("invalidly encoded json") {
                     &List(ref l) => {
@@ -956,15 +956,15 @@ fn read_enum_variant<T>(&mut self,
                             self.stack.push(field.clone());
                         }
                     },
-                    _ => fail2!("invalidly encoded json")
+                    _ => fail!("invalidly encoded json")
                 }
                 n
             }
-            ref json => fail2!("invalid variant: {:?}", *json),
+            ref json => fail!("invalid variant: {:?}", *json),
         };
         let idx = match names.iter().position(|n| str::eq_slice(*n, name)) {
             Some(idx) => idx,
-            None => fail2!("Unknown variant name: {}", name),
+            None => fail!("Unknown variant name: {}", name),
         };
         f(self, idx)
     }
@@ -973,7 +973,7 @@ fn read_enum_variant_arg<T>(&mut self,
                                 idx: uint,
                                 f: &fn(&mut Decoder) -> T)
                                 -> T {
-        debug2!("read_enum_variant_arg(idx={})", idx);
+        debug!("read_enum_variant_arg(idx={})", idx);
         f(self)
     }
 
@@ -981,7 +981,7 @@ fn read_enum_struct_variant<T>(&mut self,
                                    names: &[&str],
                                    f: &fn(&mut Decoder, uint) -> T)
                                    -> T {
-        debug2!("read_enum_struct_variant(names={:?})", names);
+        debug!("read_enum_struct_variant(names={:?})", names);
         self.read_enum_variant(names, f)
     }
 
@@ -991,7 +991,7 @@ fn read_enum_struct_variant_field<T>(&mut self,
                                          idx: uint,
                                          f: &fn(&mut Decoder) -> T)
                                          -> T {
-        debug2!("read_enum_struct_variant_field(name={}, idx={})", name, idx);
+        debug!("read_enum_struct_variant_field(name={}, idx={})", name, idx);
         self.read_enum_variant_arg(idx, f)
     }
 
@@ -1000,7 +1000,7 @@ fn read_struct<T>(&mut self,
                       len: uint,
                       f: &fn(&mut Decoder) -> T)
                       -> T {
-        debug2!("read_struct(name={}, len={})", name, len);
+        debug!("read_struct(name={}, len={})", name, len);
         let value = f(self);
         self.stack.pop();
         value
@@ -1011,12 +1011,12 @@ fn read_struct_field<T>(&mut self,
                             idx: uint,
                             f: &fn(&mut Decoder) -> T)
                             -> T {
-        debug2!("read_struct_field(name={}, idx={})", name, idx);
+        debug!("read_struct_field(name={}, idx={})", name, idx);
         match self.stack.pop() {
             Object(obj) => {
                 let mut obj = obj;
                 let value = match obj.pop(&name.to_owned()) {
-                    None => fail2!("no such field: {}", name),
+                    None => fail!("no such field: {}", name),
                     Some(json) => {
                         self.stack.push(json);
                         f(self)
@@ -1025,12 +1025,12 @@ fn read_struct_field<T>(&mut self,
                 self.stack.push(Object(obj));
                 value
             }
-            value => fail2!("not an object: {:?}", value)
+            value => fail!("not an object: {:?}", value)
         }
     }
 
     fn read_tuple<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-        debug2!("read_tuple()");
+        debug!("read_tuple()");
         self.read_seq(f)
     }
 
@@ -1038,7 +1038,7 @@ fn read_tuple_arg<T>(&mut self,
                          idx: uint,
                          f: &fn(&mut Decoder) -> T)
                          -> T {
-        debug2!("read_tuple_arg(idx={})", idx);
+        debug!("read_tuple_arg(idx={})", idx);
         self.read_seq_elt(idx, f)
     }
 
@@ -1046,7 +1046,7 @@ fn read_tuple_struct<T>(&mut self,
                             name: &str,
                             f: &fn(&mut Decoder, uint) -> T)
                             -> T {
-        debug2!("read_tuple_struct(name={})", name);
+        debug!("read_tuple_struct(name={})", name);
         self.read_tuple(f)
     }
 
@@ -1054,7 +1054,7 @@ fn read_tuple_struct_arg<T>(&mut self,
                                 idx: uint,
                                 f: &fn(&mut Decoder) -> T)
                                 -> T {
-        debug2!("read_tuple_struct_arg(idx={})", idx);
+        debug!("read_tuple_struct_arg(idx={})", idx);
         self.read_tuple_arg(idx, f)
     }
 
@@ -1066,7 +1066,7 @@ fn read_option<T>(&mut self, f: &fn(&mut Decoder, bool) -> T) -> T {
     }
 
     fn read_seq<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-        debug2!("read_seq()");
+        debug!("read_seq()");
         let len = match self.stack.pop() {
             List(list) => {
                 let len = list.len();
@@ -1075,18 +1075,18 @@ fn read_seq<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
                 }
                 len
             }
-            _ => fail2!("not a list"),
+            _ => fail!("not a list"),
         };
         f(self, len)
     }
 
     fn read_seq_elt<T>(&mut self, idx: uint, f: &fn(&mut Decoder) -> T) -> T {
-        debug2!("read_seq_elt(idx={})", idx);
+        debug!("read_seq_elt(idx={})", idx);
         f(self)
     }
 
     fn read_map<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
-        debug2!("read_map()");
+        debug!("read_map()");
         let len = match self.stack.pop() {
             Object(obj) => {
                 let len = obj.len();
@@ -1096,7 +1096,7 @@ fn read_map<T>(&mut self, f: &fn(&mut Decoder, uint) -> T) -> T {
                 }
                 len
             }
-            json => fail2!("not an object: {:?}", json),
+            json => fail!("not an object: {:?}", json),
         };
         f(self, len)
     }
@@ -1105,13 +1105,13 @@ fn read_map_elt_key<T>(&mut self,
                            idx: uint,
                            f: &fn(&mut Decoder) -> T)
                            -> T {
-        debug2!("read_map_elt_key(idx={})", idx);
+        debug!("read_map_elt_key(idx={})", idx);
         f(self)
     }
 
     fn read_map_elt_val<T>(&mut self, idx: uint, f: &fn(&mut Decoder) -> T)
                            -> T {
-        debug2!("read_map_elt_val(idx={})", idx);
+        debug!("read_map_elt_val(idx={})", idx);
         f(self)
     }
 }
index 1e494a179134b53ca9031fe4af92e22189efdc98..5eada3dfb1a4e5b1365bd3de45832174005194aa 100644 (file)
@@ -98,7 +98,7 @@ pub fn len<T>(ls: @List<T>) -> uint {
 pub fn tail<T>(ls: @List<T>) -> @List<T> {
     match *ls {
         Cons(_, tl) => return tl,
-        Nil => fail2!("list empty")
+        Nil => fail!("list empty")
     }
 }
 
@@ -107,7 +107,7 @@ pub fn head<T:Clone>(ls: @List<T>) -> T {
     match *ls {
       Cons(ref hd, _) => (*hd).clone(),
       // makes me sad
-      _ => fail2!("head invoked on empty list")
+      _ => fail!("head invoked on empty list")
     }
 }
 
index ed68f3162aa569cd0940db0ebdfc0c50aa5dbe48..cd5ccc14cafb1a52169503c54ae633779d4aafd2 100644 (file)
@@ -353,7 +353,7 @@ fn rem(&self, other: &BigUint) -> BigUint {
 
 impl Neg<BigUint> for BigUint {
     #[inline]
-    fn neg(&self) -> BigUint { fail2!() }
+    fn neg(&self) -> BigUint { fail!() }
 }
 
 impl Integer for BigUint {
@@ -375,7 +375,7 @@ fn mod_floor(&self, other: &BigUint) -> BigUint {
     }
 
     fn div_mod_floor(&self, other: &BigUint) -> (BigUint, BigUint) {
-        if other.is_zero() { fail2!() }
+        if other.is_zero() { fail!() }
         if self.is_zero() { return (Zero::zero(), Zero::zero()); }
         if *other == One::one() { return ((*self).clone(), Zero::zero()); }
 
@@ -824,7 +824,7 @@ fn get_radix_base(radix: uint) -> (uint, uint) {
         14 => (38416, 4),
         15 => (50625, 4),
         16 => (65536, 4),
-        _  => fail2!()
+        _  => fail!()
     }
 }
 
@@ -848,7 +848,7 @@ fn get_radix_base(radix: uint) -> (uint, uint) {
         14 => (1475789056, 8),
         15 => (2562890625, 8),
         16 => (4294967296, 8),
-        _  => fail2!()
+        _  => fail!()
     }
 }
 
@@ -1102,7 +1102,7 @@ fn div_rem(&self, other: &BigInt) -> (BigInt, BigInt) {
         let d = BigInt::from_biguint(Plus, d_ui);
         let r = BigInt::from_biguint(Plus, r_ui);
         match (self.sign, other.sign) {
-            (_,    Zero)   => fail2!(),
+            (_,    Zero)   => fail!(),
             (Plus, Plus)  | (Zero, Plus)  => ( d,  r),
             (Plus, Minus) | (Zero, Minus) => (-d,  r),
             (Minus, Plus)                 => (-d, -r),
@@ -1128,7 +1128,7 @@ fn div_mod_floor(&self, other: &BigInt) -> (BigInt, BigInt) {
         let d = BigInt::from_biguint(Plus, d_ui);
         let m = BigInt::from_biguint(Plus, m_ui);
         match (self.sign, other.sign) {
-            (_,    Zero)   => fail2!(),
+            (_,    Zero)   => fail!(),
             (Plus, Plus)  | (Zero, Plus)  => (d, m),
             (Plus, Minus) | (Zero, Minus) => if m.is_zero() {
                 (-d, Zero::zero())
@@ -1942,7 +1942,7 @@ fn to_str_pairs() -> ~[ (BigUint, ~[(uint, ~str)]) ] {
              ~"2" +
              str::from_chars(vec::from_elem(bits / 2 - 1, '0')) + "1"),
             (10, match bits {
-                32 => ~"8589934593", 16 => ~"131073", _ => fail2!()
+                32 => ~"8589934593", 16 => ~"131073", _ => fail!()
             }),
             (16,
              ~"2" +
@@ -1959,7 +1959,7 @@ fn to_str_pairs() -> ~[ (BigUint, ~[(uint, ~str)]) ] {
             (10, match bits {
                 32 => ~"55340232229718589441",
                 16 => ~"12885032961",
-                _ => fail2!()
+                _ => fail!()
             }),
             (16, ~"3" +
              str::from_chars(vec::from_elem(bits / 4 - 1, '0')) + "2" +
@@ -2014,7 +2014,7 @@ fn factor(n: uint) -> BigUint {
         fn check(n: uint, s: &str) {
             let n = factor(n);
             let ans = match FromStrRadix::from_str_radix(s, 10) {
-                Some(x) => x, None => fail2!()
+                Some(x) => x, None => fail!()
             };
             assert_eq!(n, ans);
         }
index a8dfdfbfd0018d8d118d014296ecbb6c890c29b8..abb802c06f3b2943bd50cb8781872f8cfc08b4c0 100644 (file)
@@ -50,7 +50,7 @@ pub fn new_raw(numer: T, denom: T) -> Ratio<T> {
     #[inline]
     pub fn new(numer: T, denom: T) -> Ratio<T> {
         if denom == Zero::zero() {
-            fail2!("denominator == 0");
+            fail!("denominator == 0");
         }
         let mut ret = Ratio::new_raw(numer, denom);
         ret.reduce();
index 5738faeca956b8d61beb99ba64b503cf0fc336d3..e7032db5a9195d05ef79664598da7571fcaa48a0 100644 (file)
@@ -127,7 +127,7 @@ pub fn with_capacity(n: uint) -> RingBuf<T> {
     pub fn get<'a>(&'a self, i: uint) -> &'a T {
         let idx = self.raw_index(i);
         match self.elts[idx] {
-            None => fail2!(),
+            None => fail!(),
             Some(ref v) => v
         }
     }
@@ -138,7 +138,7 @@ pub fn get<'a>(&'a self, i: uint) -> &'a T {
     pub fn get_mut<'a>(&'a mut self, i: uint) -> &'a mut T {
         let idx = self.raw_index(i);
         match self.elts[idx] {
-            None => fail2!(),
+            None => fail!(),
             Some(ref mut v) => v
         }
     }
@@ -373,21 +373,21 @@ fn test_simple() {
         assert_eq!(d.len(), 3u);
         d.push_back(137);
         assert_eq!(d.len(), 4u);
-        debug2!("{:?}", d.front());
+        debug!("{:?}", d.front());
         assert_eq!(*d.front().unwrap(), 42);
-        debug2!("{:?}", d.back());
+        debug!("{:?}", d.back());
         assert_eq!(*d.back().unwrap(), 137);
         let mut i = d.pop_front();
-        debug2!("{:?}", i);
+        debug!("{:?}", i);
         assert_eq!(i, Some(42));
         i = d.pop_back();
-        debug2!("{:?}", i);
+        debug!("{:?}", i);
         assert_eq!(i, Some(137));
         i = d.pop_back();
-        debug2!("{:?}", i);
+        debug!("{:?}", i);
         assert_eq!(i, Some(137));
         i = d.pop_back();
-        debug2!("{:?}", i);
+        debug!("{:?}", i);
         assert_eq!(i, Some(17));
         assert_eq!(d.len(), 0u);
         d.push_back(3);
@@ -398,10 +398,10 @@ fn test_simple() {
         assert_eq!(d.len(), 3u);
         d.push_front(1);
         assert_eq!(d.len(), 4u);
-        debug2!("{:?}", d.get(0));
-        debug2!("{:?}", d.get(1));
-        debug2!("{:?}", d.get(2));
-        debug2!("{:?}", d.get(3));
+        debug!("{:?}", d.get(0));
+        debug!("{:?}", d.get(1));
+        debug!("{:?}", d.get(2));
+        debug!("{:?}", d.get(3));
         assert_eq!(*d.get(0), 1);
         assert_eq!(*d.get(1), 2);
         assert_eq!(*d.get(2), 3);
index 8c7d656f5413b49aa7c08a5dc691b6e650be2e0d..e5ef9ee12d5a4b06228915c04ff081b57463cf95 100644 (file)
@@ -159,7 +159,7 @@ fn take_nonempty_prefix(rdr: @io::Reader,
     if buf.is_empty() {
         bad_parse::cond.raise(())
     }
-    debug2!("extracted nonempty prefix: {}", buf);
+    debug!("extracted nonempty prefix: {}", buf);
     (buf, ch)
 }
 
@@ -235,7 +235,7 @@ pub fn parse(s: &str) -> Option<Version> {
     }
     let s = s.trim();
     let mut bad = false;
-    do bad_parse::cond.trap(|_| { debug2!("bad"); bad = true }).inside {
+    do bad_parse::cond.trap(|_| { debug!("bad"); bad = true }).inside {
         do io::with_str_reader(s) |rdr| {
             let v = parse_reader(rdr);
             if bad || v.to_str() != s.to_owned() {
index 794b25c2e38e25a92bd14797ba5d7ea34c93059f..0ca0ff66039d859fbc1763d316c56f17b32fd3d5 100644 (file)
@@ -265,7 +265,7 @@ fn test_find_mut() {
         assert!(m.insert(5, 14));
         let new = 100;
         match m.find_mut(&5) {
-            None => fail2!(), Some(x) => *x = new
+            None => fail!(), Some(x) => *x = new
         }
         assert_eq!(m.find(&5), Some(&new));
     }
index e1230070836c0b9a5fd5840ad7ee0f397af8dc0a..d884f4f05c1763b0016db8b0e2e63c7aea63c308 100644 (file)
@@ -564,7 +564,7 @@ fn merge_lo(&mut self, array: &mut [T], base1: uint, len1: uint,
             shift_vec(array, dest, c2, len2);
             swap(&mut array[dest+len2], &mut tmp[c1]);
         } else if len1 == 0 {
-            fail2!("Comparison violates its contract!");
+            fail!("Comparison violates its contract!");
         } else {
             assert_eq!(len2, 0);
             assert!(len1 > 1);
@@ -683,7 +683,7 @@ fn merge_hi(&mut self, array: &mut [T], base1: uint, len1: uint,
             shift_vec(array, dest+1, c1+1, len1);
             swap(&mut array[dest], &mut tmp[c2]);
         } else if len2 == 0 {
-            fail2!("Comparison violates its contract!");
+            fail!("Comparison violates its contract!");
         } else {
             assert_eq!(len1, 0);
             assert!(len2 != 0);
@@ -790,7 +790,7 @@ fn leual(a: &int, b: &int) -> bool { *a <= *b }
         quick_sort::<int>(v1, leual);
         let mut i = 0u;
         while i < len {
-            // debug2!(v2[i]);
+            // debug!(v2[i]);
             assert_eq!(v2[i], v1[i]);
             i += 1;
         }
@@ -833,7 +833,7 @@ fn test_simple() {
         let immut_names = names;
 
         for (&a, &b) in expected.iter().zip(immut_names.iter()) {
-            debug2!("{} {}", a, b);
+            debug!("{} {}", a, b);
             assert_eq!(a, b);
         }
     }
@@ -851,7 +851,7 @@ pub fn le(a: &int, b: &int) -> bool { *a <= *b }
         let v3 = merge_sort::<int>(v1, f);
         let mut i = 0u;
         while i < len {
-            debug2!("{:?}", v3[i]);
+            debug!("{:?}", v3[i]);
             assert_eq!(v3[i], v2[i]);
             i += 1;
         }
@@ -922,7 +922,7 @@ impl Ord for CVal {
         fn lt(&self, other: &CVal) -> bool {
             let mut rng = rand::rng();
             if rng.gen::<f64>() > 0.995 {
-                fail2!("It's happening!!!");
+                fail!("It's happening!!!");
             }
             (*self).val < other.val
         }
@@ -936,7 +936,7 @@ fn check_sort(v1: &mut [int], v2: &mut [int]) {
         tim_sort::<int>(v1);
         let mut i = 0u;
         while i < len {
-            // debug2!(v2[i]);
+            // debug!(v2[i]);
             assert_eq!(v2[i], v1[i]);
             i += 1u;
         }
@@ -977,7 +977,7 @@ fn crash_test() {
         };
 
         tim_sort(arr);
-        fail2!("Guarantee the fail");
+        fail!("Guarantee the fail");
     }
 
     #[deriving(Clone)]
@@ -1045,7 +1045,7 @@ fn tabulate_unique(lo: uint, hi: uint) {
         fn isSorted<T:Ord>(arr: &[T]) {
             for i in range(0u, arr.len() - 1) {
                 if arr[i] > arr[i+1] {
-                    fail2!("Array not sorted");
+                    fail!("Array not sorted");
                 }
             }
         }
@@ -1116,7 +1116,7 @@ fn tabulate_managed(lo: uint, hi: uint) {
         fn isSorted<T:Ord>(arr: &[@T]) {
             for i in range(0u, arr.len() - 1) {
                 if arr[i] > arr[i+1] {
-                    fail2!("Array not sorted");
+                    fail!("Array not sorted");
                 }
             }
         }
index b5b182ea8c5809fe4678e580a88cbc44057fac7c..5a2c1e0998ca789b60bfd61936e4d13dfa0f0282 100644 (file)
@@ -309,9 +309,9 @@ fn check_cvar_bounds<U>(out_of_bounds: Option<uint>, id: uint, act: &str,
                         blk: &fn() -> U) -> U {
     match out_of_bounds {
         Some(0) =>
-            fail2!("{} with illegal ID {} - this lock has no condvars!", act, id),
+            fail!("{} with illegal ID {} - this lock has no condvars!", act, id),
         Some(length) =>
-            fail2!("{} with illegal ID {} - ID must be less than {}", act, id, length),
+            fail!("{} with illegal ID {} - ID must be less than {}", act, id, length),
         None => blk()
     }
 }
@@ -636,7 +636,7 @@ pub fn write_downgrade<U>(&self, blk: &fn(v: RWLockWriteMode) -> U) -> U {
     pub fn downgrade<'a>(&self, token: RWLockWriteMode<'a>)
                          -> RWLockReadMode<'a> {
         if !borrow::ref_eq(self, token.lock) {
-            fail2!("Can't downgrade() with a different rwlock's write_mode!");
+            fail!("Can't downgrade() with a different rwlock's write_mode!");
         }
         unsafe {
             do task::unkillable {
@@ -920,7 +920,7 @@ fn test_mutex_killed_simple() {
 
         let result: result::Result<(),()> = do task::try {
             do m2.lock {
-                fail2!();
+                fail!();
             }
         };
         assert!(result.is_err());
@@ -940,7 +940,7 @@ fn test_mutex_killed_cond() {
             do task::spawn || { // linked
                 let _ = p.recv(); // wait for sibling to get in the mutex
                 task::deschedule();
-                fail2!();
+                fail!();
             }
             do m2.lock_cond |cond| {
                 c.send(()); // tell sibling go ahead
@@ -978,9 +978,9 @@ fn test_mutex_killed_broadcast() {
                         do (|| {
                             cond.wait(); // block forever
                         }).finally {
-                            error2!("task unwinding and sending");
+                            error!("task unwinding and sending");
                             c.send(());
-                            error2!("task unwinding and done sending");
+                            error!("task unwinding and done sending");
                         }
                     }
                 }
@@ -990,7 +990,7 @@ fn test_mutex_killed_broadcast() {
             }
             do m2.lock { }
             c.send(sibling_convos); // let parent wait on all children
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
         // child task must have finished by the time try returns
@@ -1030,7 +1030,7 @@ fn test_mutex_different_conds() {
             let _ = p.recv();
             do m.lock_cond |cond| {
                 if !cond.signal_on(0) {
-                    fail2!(); // success; punt sibling awake.
+                    fail!(); // success; punt sibling awake.
                 }
             }
         };
@@ -1274,7 +1274,7 @@ fn rwlock_kill_helper(mode1: RWLockMode, mode2: RWLockMode) {
 
         let result: result::Result<(),()> = do task::try || {
             do lock_rwlock_in_mode(&x2, mode1) {
-                fail2!();
+                fail!();
             }
         };
         assert!(result.is_err());
@@ -1321,7 +1321,7 @@ fn test_rwlock_downgrade_cant_swap() {
             let mut xopt = Some(xwrite);
             do y.write_downgrade |_ywrite| {
                 y.downgrade(xopt.take_unwrap());
-                error2!("oops, y.downgrade(x) should have failed!");
+                error!("oops, y.downgrade(x) should have failed!");
             }
         }
     }
index 85975ba6347d572cf779fb58d80b9f59547c26ee..cebe0ba9aa659dfc00c06de425fdb69447d35b06 100644 (file)
@@ -147,7 +147,7 @@ pub fn fg(&self, color: color::Color) -> bool {
                 self.out.write(s.unwrap());
                 return true
             } else {
-                warn2!("{}", s.unwrap_err());
+                warn!("{}", s.unwrap_err());
             }
         }
         false
@@ -167,7 +167,7 @@ pub fn bg(&self, color: color::Color) -> bool {
                 self.out.write(s.unwrap());
                 return true
             } else {
-                warn2!("{}", s.unwrap_err());
+                warn!("{}", s.unwrap_err());
             }
         }
         false
@@ -188,7 +188,7 @@ pub fn attr(&self, attr: attr::Attr) -> bool {
                         self.out.write(s.unwrap());
                         return true
                     } else {
-                        warn2!("{}", s.unwrap_err());
+                        warn!("{}", s.unwrap_err());
                     }
                 }
                 false
@@ -226,11 +226,11 @@ pub fn reset(&self) {
         if s.is_ok() {
             self.out.write(s.unwrap());
         } else if self.num_colors > 0 {
-            warn2!("{}", s.unwrap_err());
+            warn!("{}", s.unwrap_err());
         } else {
-            // if we support attributes but not color, it would be nice to still warn2!()
+            // if we support attributes but not color, it would be nice to still warn!()
             // but it's not worth testing all known attributes just for this.
-            debug2!("{}", s.unwrap_err());
+            debug!("{}", s.unwrap_err());
         }
     }
 
index d7944bad5fa69290de8a13abdc70a3b0456a856a..d1a0a86334af4e3657aa1170352d4bf3d75c7732 100644 (file)
@@ -462,7 +462,7 @@ fn from_char(c: char) -> FormatOp {
             'x' => FormatHex,
             'X' => FormatHEX,
             's' => FormatString,
-            _ => fail2!("bad FormatOp char")
+            _ => fail!("bad FormatOp char")
         }
     }
     fn to_char(self) -> char {
index 0adf86ed931595d8e73284ccf5648e74c7594e51..bc24c8a6e306381663a249244e955c5749d32b6d 100644 (file)
@@ -190,26 +190,26 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
 
     assert!(names_bytes          > 0);
 
-    debug2!("names_bytes = {}", names_bytes);
-    debug2!("bools_bytes = {}", bools_bytes);
-    debug2!("numbers_count = {}", numbers_count);
-    debug2!("string_offsets_count = {}", string_offsets_count);
-    debug2!("string_table_bytes = {}", string_table_bytes);
+    debug!("names_bytes = {}", names_bytes);
+    debug!("bools_bytes = {}", bools_bytes);
+    debug!("numbers_count = {}", numbers_count);
+    debug!("string_offsets_count = {}", string_offsets_count);
+    debug!("string_table_bytes = {}", string_table_bytes);
 
     if (bools_bytes as uint) > boolnames.len() {
-        error2!("expected bools_bytes to be less than {} but found {}", boolnames.len(),
+        error!("expected bools_bytes to be less than {} but found {}", boolnames.len(),
                bools_bytes);
         return Err(~"incompatible file: more booleans than expected");
     }
 
     if (numbers_count as uint) > numnames.len() {
-        error2!("expected numbers_count to be less than {} but found {}", numnames.len(),
+        error!("expected numbers_count to be less than {} but found {}", numnames.len(),
                numbers_count);
         return Err(~"incompatible file: more numbers than expected");
     }
 
     if (string_offsets_count as uint) > stringnames.len() {
-        error2!("expected string_offsets_count to be less than {} but found {}", stringnames.len(),
+        error!("expected string_offsets_count to be less than {} but found {}", stringnames.len(),
                string_offsets_count);
         return Err(~"incompatible file: more string offsets than expected");
     }
@@ -219,26 +219,26 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
 
     file.read_byte(); // consume NUL
 
-    debug2!("term names: {:?}", term_names);
+    debug!("term names: {:?}", term_names);
 
     let mut bools_map = HashMap::new();
     if bools_bytes != 0 {
         for i in range(0, bools_bytes) {
             let b = file.read_byte();
             if b < 0 {
-                error2!("EOF reading bools after {} entries", i);
+                error!("EOF reading bools after {} entries", i);
                 return Err(~"error: expected more bools but hit EOF");
             } else if b == 1 {
-                debug2!("{} set", bnames[i]);
+                debug!("{} set", bnames[i]);
                 bools_map.insert(bnames[i].to_owned(), true);
             }
         }
     }
 
-    debug2!("bools: {:?}", bools_map);
+    debug!("bools: {:?}", bools_map);
 
     if (bools_bytes + names_bytes) % 2 == 1 {
-        debug2!("adjusting for padding between bools and numbers");
+        debug!("adjusting for padding between bools and numbers");
         file.read_byte(); // compensate for padding
     }
 
@@ -247,13 +247,13 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
         for i in range(0, numbers_count) {
             let n = file.read_le_u16();
             if n != 0xFFFF {
-                debug2!("{}\\#{}", nnames[i], n);
+                debug!("{}\\#{}", nnames[i], n);
                 numbers_map.insert(nnames[i].to_owned(), n);
             }
         }
     }
 
-    debug2!("numbers: {:?}", numbers_map);
+    debug!("numbers: {:?}", numbers_map);
 
     let mut string_map = HashMap::new();
 
@@ -263,12 +263,12 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
             string_offsets.push(file.read_le_u16());
         }
 
-        debug2!("offsets: {:?}", string_offsets);
+        debug!("offsets: {:?}", string_offsets);
 
         let string_table = file.read_bytes(string_table_bytes as uint);
 
         if string_table.len() != string_table_bytes as uint {
-            error2!("EOF reading string table after {} bytes, wanted {}", string_table.len(),
+            error!("EOF reading string table after {} bytes, wanted {}", string_table.len(),
                    string_table_bytes);
             return Err(~"error: hit EOF before end of string table");
         }
index 59eea6b4a134cef0801d141382fb80608f296808..1f8405dca949830b7eceece5cedc2d8f2232a976 100644 (file)
@@ -155,10 +155,10 @@ pub fn test_main(args: &[~str], tests: ~[TestDescAndFn]) {
     let opts =
         match parse_opts(args) {
             Some(Ok(o)) => o,
-            Some(Err(msg)) => fail2!("{}", msg),
+            Some(Err(msg)) => fail!("{}", msg),
             None => return
         };
-    if !run_tests_console(&opts, tests) { fail2!("Some tests failed"); }
+    if !run_tests_console(&opts, tests) { fail!("Some tests failed"); }
 }
 
 // A variant optimized for invocation with a static test vector.
@@ -178,7 +178,7 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
             TestDescAndFn { testfn: StaticBenchFn(f), desc: t.desc.clone() },
 
             _ => {
-                fail2!("non-static tests passed to test::test_main_static");
+                fail!("non-static tests passed to test::test_main_static");
             }
         }
     };
@@ -240,7 +240,7 @@ fn usage(binary: &str, helpstr: &str) {
     #[bench]       - Indicates a function is a benchmark to be run. This
                      function takes one argument (extra::test::BenchHarness).
     #[should_fail] - This function (also labeled with #[test]) will only pass if
-                     the code causes a failure (an assertion failure or fail2!)
+                     the code causes a failure (an assertion failure or fail!)
     #[ignore]      - When applied to a function which is already attributed as a
                      test, then the test runner will ignore these tests during
                      normal test runs. Running with --ignored will run these
@@ -358,7 +358,7 @@ pub fn new(opts: &TestOpts) -> ConsoleTestState {
                                                      io::Truncate]) {
                 result::Ok(w) => Some(w),
                 result::Err(ref s) => {
-                    fail2!("can't open output file: {}", *s)
+                    fail!("can't open output file: {}", *s)
                 }
             },
             None => None
@@ -607,7 +607,7 @@ pub fn fmt_bench_samples(bs: &BenchSamples) -> ~str {
 pub fn run_tests_console(opts: &TestOpts,
                          tests: ~[TestDescAndFn]) -> bool {
     fn callback(event: &TestEvent, st: &mut ConsoleTestState) {
-        debug2!("callback(event={:?})", event);
+        debug!("callback(event={:?})", event);
         match (*event).clone() {
             TeFiltered(ref filtered_tests) => st.write_run_start(filtered_tests.len()),
             TeWait(ref test, padding) => st.write_test_start(test, padding),
@@ -649,7 +649,7 @@ fn len_if_padded(t: &TestDescAndFn) -> uint {
     match tests.iter().max_by(|t|len_if_padded(*t)) {
         Some(t) => {
             let n = t.desc.name.to_str();
-            debug2!("Setting max_name_len from: {}", n);
+            debug!("Setting max_name_len from: {}", n);
             st.max_name_len = n.len();
         },
         None => {}
@@ -736,7 +736,7 @@ fn run_tests(opts: &TestOpts,
     // It's tempting to just spawn all the tests at once, but since we have
     // many tests that run in other processes we would be making a big mess.
     let concurrency = get_concurrency();
-    debug2!("using {} test tasks", concurrency);
+    debug!("using {} test tasks", concurrency);
 
     let mut remaining = filtered_tests;
     remaining.reverse();
@@ -783,7 +783,7 @@ fn get_concurrency() -> uint {
             let opt_n: Option<uint> = FromStr::from_str(s);
             match opt_n {
                 Some(n) if n > 0 => n,
-                _ => fail2!("RUST_TEST_TASKS is `{}`, should be a positive integer.", s)
+                _ => fail!("RUST_TEST_TASKS is `{}`, should be a positive integer.", s)
             }
         }
         None => {
@@ -1047,7 +1047,7 @@ pub fn ratchet(&self, p: &Path, pct: Option<f64>) -> (MetricDiff, bool) {
         };
 
         if ok {
-            debug2!("rewriting file '{:?}' with updated metrics", p);
+            debug!("rewriting file '{:?}' with updated metrics", p);
             self.save(p);
         }
         return (diff, ok)
@@ -1086,7 +1086,7 @@ pub fn ns_per_iter(&mut self) -> u64 {
 
     pub fn bench_n(&mut self, n: u64, f: &fn(&mut BenchHarness)) {
         self.iterations = n;
-        debug2!("running benchmark for {} iterations",
+        debug!("running benchmark for {} iterations",
                n as uint);
         f(self);
     }
@@ -1127,7 +1127,7 @@ pub fn auto_bench(&mut self, f: &fn(&mut BenchHarness)) -> stats::Summary {
             stats::winsorize(samples, 5.0);
             let summ5 = stats::Summary::new(samples);
 
-            debug2!("{} samples, median {}, MAD={}, MADP={}",
+            debug!("{} samples, median {}, MAD={}, MADP={}",
                    samples.len(),
                    summ.median as f64,
                    summ.median_abs_dev as f64,
@@ -1198,7 +1198,7 @@ mod tests {
 
     #[test]
     pub fn do_not_run_ignored_tests() {
-        fn f() { fail2!(); }
+        fn f() { fail!(); }
         let desc = TestDescAndFn {
             desc: TestDesc {
                 name: StaticTestName("whatever"),
@@ -1234,7 +1234,7 @@ fn f() { }
 
     #[test]
     fn test_should_fail() {
-        fn f() { fail2!(); }
+        fn f() { fail!(); }
         let desc = TestDescAndFn {
             desc: TestDesc {
                 name: StaticTestName("whatever"),
@@ -1273,7 +1273,7 @@ fn first_free_arg_should_be_a_filter() {
         let args = ~[~"progname", ~"filter"];
         let opts = match parse_opts(args) {
             Some(Ok(o)) => o,
-            _ => fail2!("Malformed arg in first_free_arg_should_be_a_filter")
+            _ => fail!("Malformed arg in first_free_arg_should_be_a_filter")
         };
         assert!("filter" == opts.filter.clone().unwrap());
     }
@@ -1283,7 +1283,7 @@ fn parse_ignored_flag() {
         let args = ~[~"progname", ~"filter", ~"--ignored"];
         let opts = match parse_opts(args) {
             Some(Ok(o)) => o,
-            _ => fail2!("Malformed arg in parse_ignored_flag")
+            _ => fail!("Malformed arg in parse_ignored_flag")
         };
         assert!((opts.run_ignored));
     }
index 9376e2258975233dab9c768537fb39e04be29335..ab701f1f982c81e6e20d92ddc152a01b5bb56029 100644 (file)
@@ -955,13 +955,13 @@ fn test_get_time() {
         static SOME_FUTURE_DATE: i64 = 1577836800i64; // 2020-01-01T00:00:00Z
 
         let tv1 = get_time();
-        debug2!("tv1={:?} sec + {:?} nsec", tv1.sec as uint, tv1.nsec as uint);
+        debug!("tv1={:?} sec + {:?} nsec", tv1.sec as uint, tv1.nsec as uint);
 
         assert!(tv1.sec > SOME_RECENT_DATE);
         assert!(tv1.nsec < 1000000000i32);
 
         let tv2 = get_time();
-        debug2!("tv2={:?} sec + {:?} nsec", tv2.sec as uint, tv2.nsec as uint);
+        debug!("tv2={:?} sec + {:?} nsec", tv2.sec as uint, tv2.nsec as uint);
 
         assert!(tv2.sec >= tv1.sec);
         assert!(tv2.sec < SOME_FUTURE_DATE);
@@ -975,16 +975,16 @@ fn test_precise_time() {
         let s0 = precise_time_s();
         let ns1 = precise_time_ns();
 
-        debug2!("s0={} sec", f64::to_str_digits(s0, 9u));
+        debug!("s0={} sec", f64::to_str_digits(s0, 9u));
         assert!(s0 > 0.);
         let ns0 = (s0 * 1000000000.) as u64;
-        debug2!("ns0={:?} ns", ns0);
+        debug!("ns0={:?} ns", ns0);
 
-        debug2!("ns1={:?} ns", ns0);
+        debug!("ns1={:?} ns", ns0);
         assert!(ns1 >= ns0);
 
         let ns2 = precise_time_ns();
-        debug2!("ns2={:?} ns", ns0);
+        debug!("ns2={:?} ns", ns0);
         assert!(ns2 >= ns1);
     }
 
@@ -1016,7 +1016,7 @@ fn test_at() {
         let time = Timespec::new(1234567890, 54321);
         let local = at(time);
 
-        error2!("time_at: {:?}", local);
+        error!("time_at: {:?}", local);
 
         assert!(local.tm_sec == 30_i32);
         assert!(local.tm_min == 31_i32);
@@ -1091,7 +1091,7 @@ fn test_strptime() {
             == Err(~"Invalid time"));
 
         match strptime("Fri Feb 13 15:31:30.01234 2009", format) {
-          Err(e) => fail2!(e),
+          Err(e) => fail!(e),
           Ok(ref tm) => {
             assert!(tm.tm_sec == 30_i32);
             assert!(tm.tm_min == 31_i32);
@@ -1111,7 +1111,7 @@ fn test_strptime() {
         fn test(s: &str, format: &str) -> bool {
             match strptime(s, format) {
               Ok(ref tm) => tm.strftime(format) == s.to_owned(),
-              Err(e) => fail2!(e)
+              Err(e) => fail!(e)
             }
         }
 
@@ -1237,7 +1237,7 @@ fn test_ctime() {
         let utc   = at_utc(time);
         let local = at(time);
 
-        error2!("test_ctime: {:?} {:?}", utc.ctime(), local.ctime());
+        error!("test_ctime: {:?} {:?}", utc.ctime(), local.ctime());
 
         assert_eq!(utc.ctime(), ~"Fri Feb 13 23:31:30 2009");
         assert_eq!(local.ctime(), ~"Fri Feb 13 15:31:30 2009");
index 432d854ad5469f471c1b302eeecfb6b2e2253eee..ad196b32fb2cafc84b3cf3631bda1ddf80a3504e 100644 (file)
@@ -831,7 +831,7 @@ fn heir_swap<K: TotalOrd, V>(node: &mut ~TreeNode<K, V>,
       }
     }
     return match node.take() {
-        Some(~TreeNode{value, _}) => Some(value), None => fail2!()
+        Some(~TreeNode{value, _}) => Some(value), None => fail!()
     };
 }
 
@@ -900,7 +900,7 @@ fn test_find_mut() {
         assert!(m.insert(5, 14));
         let new = 100;
         match m.find_mut(&5) {
-          None => fail2!(), Some(x) => *x = new
+          None => fail!(), Some(x) => *x = new
         }
         assert_eq!(m.find(&5), Some(&new));
     }
index a30951890d5928111950a1576cfc31e0a1369e37..3ee1025132315dccdbd72fe96b8adc62d3690bd9 100644 (file)
@@ -183,11 +183,11 @@ fn load(&mut self) {
         assert!(os::path_exists(&self.db_filename));
         let f = io::file_reader(&self.db_filename);
         match f {
-            Err(e) => fail2!("Couldn't load workcache database {}: {}",
+            Err(e) => fail!("Couldn't load workcache database {}: {}",
                             self.db_filename.display(), e.to_str()),
             Ok(r) =>
                 match json::from_reader(r) {
-                    Err(e) => fail2!("Couldn't parse workcache database (from file {}): {}",
+                    Err(e) => fail!("Couldn't parse workcache database (from file {}): {}",
                                     self.db_filename.display(), e.to_str()),
                     Ok(r) => {
                         let mut decoder = json::Decoder(r);
@@ -219,7 +219,7 @@ pub fn new() -> Logger {
     }
 
     pub fn info(&self, i: &str) {
-        info2!("workcache: {}", i);
+        info!("workcache: {}", i);
     }
 }
 
@@ -264,7 +264,7 @@ fn json_encode<T:Encodable<json::Encoder>>(t: &T) -> ~str {
 
 // FIXME(#5121)
 fn json_decode<T:Decodable<json::Decoder>>(s: &str) -> T {
-    debug2!("json decoding: {}", s);
+    debug!("json decoding: {}", s);
     do io::with_str_reader(s) |rdr| {
         let j = json::from_reader(rdr).unwrap();
         let mut decoder = json::Decoder(j);
@@ -321,7 +321,7 @@ pub fn discover_input(&mut self,
                           dependency_kind: &str,
                           dependency_name: &str,
                           dependency_val: &str) {
-        debug2!("Discovering input {} {} {}", dependency_kind, dependency_name, dependency_val);
+        debug!("Discovering input {} {} {}", dependency_kind, dependency_name, dependency_val);
         self.discovered_inputs.insert_work_key(WorkKey::new(dependency_kind, dependency_name),
                                  dependency_val.to_owned());
     }
@@ -329,7 +329,7 @@ pub fn discover_output(&mut self,
                            dependency_kind: &str,
                            dependency_name: &str,
                            dependency_val: &str) {
-        debug2!("Discovering output {} {} {}", dependency_kind, dependency_name, dependency_val);
+        debug!("Discovering output {} {} {}", dependency_kind, dependency_name, dependency_val);
         self.discovered_outputs.insert_work_key(WorkKey::new(dependency_kind, dependency_name),
                                  dependency_val.to_owned());
     }
@@ -368,7 +368,7 @@ pub fn lookup_declared_inputs(&self) -> ~[~str] {
 
 impl<'self> Prep<'self> {
     pub fn declare_input(&mut self, kind: &str, name: &str, val: &str) {
-        debug2!("Declaring input {} {} {}", kind, name, val);
+        debug!("Declaring input {} {} {}", kind, name, val);
         self.declared_inputs.insert_work_key(WorkKey::new(kind, name),
                                  val.to_owned());
     }
@@ -377,9 +377,9 @@ fn is_fresh(&self, cat: &str, kind: &str,
                 name: &str, val: &str) -> bool {
         let k = kind.to_owned();
         let f = self.ctxt.freshness.get().find(&k);
-        debug2!("freshness for: {}/{}/{}/{}", cat, kind, name, val)
+        debug!("freshness for: {}/{}/{}/{}", cat, kind, name, val)
         let fresh = match f {
-            None => fail2!("missing freshness-function for '{}'", kind),
+            None => fail!("missing freshness-function for '{}'", kind),
             Some(f) => (*f)(name, val)
         };
         do self.ctxt.logger.write |lg| {
@@ -418,7 +418,7 @@ fn exec_work<T:Send +
             &'self self, blk: ~fn(&mut Exec) -> T) -> Work<'self, T> {
         let mut bo = Some(blk);
 
-        debug2!("exec_work: looking up {} and {:?}", self.fn_name,
+        debug!("exec_work: looking up {} and {:?}", self.fn_name,
                self.declared_inputs);
         let cached = do self.ctxt.db.read |db| {
             db.prepare(self.fn_name, &self.declared_inputs)
@@ -429,14 +429,14 @@ fn exec_work<T:Send +
             if self.all_fresh("declared input",&self.declared_inputs) &&
                self.all_fresh("discovered input", disc_in) &&
                self.all_fresh("discovered output", disc_out) => {
-                debug2!("Cache hit!");
-                debug2!("Trying to decode: {:?} / {:?} / {}",
+                debug!("Cache hit!");
+                debug!("Trying to decode: {:?} / {:?} / {}",
                        disc_in, disc_out, *res);
                 Work::from_value(json_decode(*res))
             }
 
             _ => {
-                debug2!("Cache miss!");
+                debug!("Cache miss!");
                 let (port, chan) = oneshot();
                 let blk = bo.take_unwrap();
                 let chan = Cell::new(chan);
index 7c2856b75776af9b587822794a9b86d2140ab1a4..8bf3d5008db2fcfb82ce54ade5e29093ff0d6ca0 100644 (file)
@@ -129,13 +129,13 @@ pub fn exec(sess: Session,
             let cstore = sess.cstore;
             let r = cstore::get_used_crate_files(cstore);
             for cratepath in r.iter() {
-                debug2!("linking: {}", cratepath.display());
+                debug!("linking: {}", cratepath.display());
 
                 do cratepath.with_c_str |buf_t| {
                     if !llvm::LLVMRustLoadCrate(manager, buf_t) {
                         llvm_err(sess, ~"Could not link");
                     }
-                    debug2!("linked: {}", cratepath.display());
+                    debug!("linked: {}", cratepath.display());
                 }
             }
 
@@ -915,20 +915,20 @@ pub fn link_binary(sess: Session,
 
     let output = if *sess.building_library {
         let long_libname = output_dll_filename(sess.targ_cfg.os, lm);
-        debug2!("link_meta.name:  {}", lm.name);
-        debug2!("long_libname: {}", long_libname);
-        debug2!("out_filename: {}", out_filename.display());
+        debug!("link_meta.name:  {}", lm.name);
+        debug!("long_libname: {}", long_libname);
+        debug!("out_filename: {}", out_filename.display());
         let out_dirname = out_filename.dir_path();
-        debug2!("dirname(out_filename): {}", out_dirname.display());
+        debug!("dirname(out_filename): {}", out_dirname.display());
 
         out_filename.with_filename(long_libname)
     } else {
         out_filename.clone()
     };
 
-    debug2!("output: {}", output.display());
+    debug!("output: {}", output.display());
     let cc_args = link_args(sess, obj_filename, out_filename, lm);
-    debug2!("{} link args: {}", cc_prog, cc_args.connect(" "));
+    debug!("{} link args: {}", cc_prog, cc_args.connect(" "));
     if (sess.opts.debugging_opts & session::print_link_args) != 0 {
         io::println(format!("{} link args: {}", cc_prog, cc_args.connect(" ")));
     }
index faf8dd25186f28165c0168f98c6ec369f77e8cce..3d6a8350795b35e3af767456e71f9e4d581d66c2 100644 (file)
@@ -29,7 +29,7 @@ pub fn get_rpath_flags(sess: session::Session, out_filename: &Path)
         return ~[];
     }
 
-    debug2!("preparing the RPATH!");
+    debug!("preparing the RPATH!");
 
     let sysroot = sess.filesearch.sysroot();
     let output = out_filename;
@@ -60,13 +60,13 @@ fn get_rpaths(os: session::Os,
               output: &Path,
               libs: &[Path],
               target_triple: &str) -> ~[~str] {
-    debug2!("sysroot: {}", sysroot.display());
-    debug2!("output: {}", output.display());
-    debug2!("libs:");
+    debug!("sysroot: {}", sysroot.display());
+    debug!("output: {}", output.display());
+    debug!("libs:");
     for libpath in libs.iter() {
-        debug2!("    {}", libpath.display());
+        debug!("    {}", libpath.display());
     }
-    debug2!("target_triple: {}", target_triple);
+    debug!("target_triple: {}", target_triple);
 
     // Use relative paths to the libraries. Binaries can be moved
     // as long as they maintain the relative relationship to the
@@ -81,9 +81,9 @@ fn get_rpaths(os: session::Os,
     let fallback_rpaths = ~[get_install_prefix_rpath(target_triple)];
 
     fn log_rpaths(desc: &str, rpaths: &[~str]) {
-        debug2!("{} rpaths:", desc);
+        debug!("{} rpaths:", desc);
         for rpath in rpaths.iter() {
-            debug2!("    {}", *rpath);
+            debug!("    {}", *rpath);
         }
     }
 
@@ -188,7 +188,7 @@ fn test_prefix_rpath() {
         let res = get_install_prefix_rpath("triple");
         let mut d = Path::new(env!("CFG_PREFIX"));
         d.push("lib/rustc/triple/lib");
-        debug2!("test_prefix_path: {} vs. {}",
+        debug!("test_prefix_path: {} vs. {}",
                res,
                d.display());
         assert!(res.as_bytes().ends_with(d.as_vec()));
@@ -248,7 +248,7 @@ fn test_rpath_relative() {
     fn test_get_absolute_rpath() {
         let res = get_absolute_rpath(&Path::new("lib/libstd.so"));
         let lib = os::make_absolute(&Path::new("lib"));
-        debug2!("test_get_absolute_rpath: {} vs. {}",
+        debug!("test_get_absolute_rpath: {} vs. {}",
                res.to_str(), lib.display());
 
         // FIXME (#9639): This needs to handle non-utf8 paths
index 5ca81a91bfd0b36ba3751b84d8b462436971e215..67a59f24e2938885d893f2399c561d12fab509be 100644 (file)
@@ -394,7 +394,7 @@ pub fn phase_6_link_output(sess: Session,
 
 pub fn stop_after_phase_3(sess: Session) -> bool {
    if sess.opts.no_trans {
-        debug2!("invoked with --no-trans, returning early from compile_input");
+        debug!("invoked with --no-trans, returning early from compile_input");
         return true;
     }
     return false;
@@ -402,7 +402,7 @@ pub fn stop_after_phase_3(sess: Session) -> bool {
 
 pub fn stop_after_phase_1(sess: Session) -> bool {
     if sess.opts.parse_only {
-        debug2!("invoked with --parse-only, returning early from compile_input");
+        debug!("invoked with --parse-only, returning early from compile_input");
         return true;
     }
     return false;
@@ -410,17 +410,17 @@ pub fn stop_after_phase_1(sess: Session) -> bool {
 
 pub fn stop_after_phase_5(sess: Session) -> bool {
     if sess.opts.output_type != link::output_type_exe {
-        debug2!("not building executable, returning early from compile_input");
+        debug!("not building executable, returning early from compile_input");
         return true;
     }
 
     if sess.opts.is_static && *sess.building_library {
-        debug2!("building static library, returning early from compile_input");
+        debug!("building static library, returning early from compile_input");
         return true;
     }
 
     if sess.opts.jit {
-        debug2!("running JIT, returning early from compile_input");
+        debug!("running JIT, returning early from compile_input");
         return true;
     }
     return false;
@@ -1045,7 +1045,7 @@ pub fn build_output_filenames(input: &input,
 
 pub fn early_error(emitter: @diagnostic::Emitter, msg: &str) -> ! {
     emitter.emit(None, msg, diagnostic::fatal);
-    fail2!();
+    fail!();
 }
 
 pub fn list_metadata(sess: Session, path: &Path, out: @io::Writer) {
@@ -1070,7 +1070,7 @@ fn test_switch_implies_cfg_test() {
         let matches =
             &match getopts([~"--test"], optgroups()) {
               Ok(m) => m,
-              Err(f) => fail2!("test_switch_implies_cfg_test: {}", f.to_err_msg())
+              Err(f) => fail!("test_switch_implies_cfg_test: {}", f.to_err_msg())
             };
         let sessopts = build_session_options(
             @"rustc",
@@ -1091,7 +1091,7 @@ fn test_switch_implies_cfg_test_unless_cfg_test() {
             &match getopts([~"--test", ~"--cfg=test"], optgroups()) {
               Ok(m) => m,
               Err(f) => {
-                fail2!("test_switch_implies_cfg_test_unless_cfg_test: {}",
+                fail!("test_switch_implies_cfg_test_unless_cfg_test: {}",
                        f.to_err_msg());
               }
             };
index aad2228f66fda6a04126541f6514adebddc8e0c1..9541a03aff25e5326b603f3c268f11ff9e2c757d 100644 (file)
@@ -78,7 +78,7 @@ fn fold_crate(&self, c: ast::Crate) -> ast::Crate {
 
     fn fold_item(&self, i: @ast::item) -> Option<@ast::item> {
         self.cx.path.push(i.ident);
-        debug2!("current path: {}",
+        debug!("current path: {}",
                ast_util::path_name_i(self.cx.path.clone()));
 
         if is_test_fn(self.cx, i) || is_bench_fn(i) {
@@ -91,7 +91,7 @@ fn fold_item(&self, i: @ast::item) -> Option<@ast::item> {
                                      tests");
                 }
                 _ => {
-                    debug2!("this is a test function");
+                    debug!("this is a test function");
                     let test = Test {
                         span: i.span,
                         path: self.cx.path.clone(),
@@ -100,7 +100,7 @@ fn fold_item(&self, i: @ast::item) -> Option<@ast::item> {
                         should_fail: should_fail(i)
                     };
                     self.cx.testfns.push(test);
-                    // debug2!("have {} test/bench functions",
+                    // debug!("have {} test/bench functions",
                     //        cx.testfns.len());
                 }
             }
@@ -327,7 +327,7 @@ pub fn main() {
         span: dummy_sp(),
      };
 
-    debug2!("Synthetic test module:\n{}\n",
+    debug!("Synthetic test module:\n{}\n",
            pprust::item_to_str(@item.clone(), cx.sess.intr()));
 
     return @item;
@@ -381,7 +381,7 @@ fn is_extra(crate: &ast::Crate) -> bool {
 }
 
 fn mk_test_descs(cx: &TestCtxt) -> @ast::Expr {
-    debug2!("building test vector from {} tests", cx.testfns.len());
+    debug!("building test vector from {} tests", cx.testfns.len());
     let mut descs = ~[];
     for test in cx.testfns.iter() {
         descs.push(mk_test_desc_and_fn_rec(cx, test));
@@ -404,7 +404,7 @@ fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> @ast::Expr {
     let span = test.span;
     let path = test.path.clone();
 
-    debug2!("encoding {}", ast_util::path_name_i(path));
+    debug!("encoding {}", ast_util::path_name_i(path));
 
     let name_lit: ast::lit =
         nospan(ast::lit_str(ast_util::path_name_i(path).to_managed(), ast::CookedStr));
index 9700f68383ad7b26987dea9c00d7d1911b45f39c..f7b1955191abd5d6528e3426e7993eb4e596bd94 100644 (file)
@@ -74,11 +74,11 @@ struct cache_entry {
 }
 
 fn dump_crates(crate_cache: &[cache_entry]) {
-    debug2!("resolved crates:");
+    debug!("resolved crates:");
     for entry in crate_cache.iter() {
-        debug2!("cnum: {:?}", entry.cnum);
-        debug2!("span: {:?}", entry.span);
-        debug2!("hash: {:?}", entry.hash);
+        debug!("cnum: {:?}", entry.cnum);
+        debug!("span: {:?}", entry.span);
+        debug!("hash: {:?}", entry.hash);
     }
 }
 
@@ -155,7 +155,7 @@ fn visit_view_item(e: @mut Env, i: &ast::view_item) {
                   }
             }
           };
-          debug2!("resolving extern mod stmt. ident: {:?}, meta: {:?}",
+          debug!("resolving extern mod stmt. ident: {:?}, meta: {:?}",
                  ident, meta_items);
           let cnum = resolve_crate(e,
                                    ident,
@@ -321,7 +321,7 @@ fn resolve_crate(e: @mut Env,
 
 // Go through the crate metadata and load any crates that it references
 fn resolve_crate_deps(e: @mut Env, cdata: @~[u8]) -> cstore::cnum_map {
-    debug2!("resolving deps of external crate");
+    debug!("resolving deps of external crate");
     // The map from crate numbers in the crate we're resolving to local crate
     // numbers
     let mut cnum_map = HashMap::new();
@@ -330,18 +330,18 @@ fn resolve_crate_deps(e: @mut Env, cdata: @~[u8]) -> cstore::cnum_map {
         let extrn_cnum = dep.cnum;
         let cname_str = token::ident_to_str(&dep.name);
         let cmetas = metas_with(dep.vers, @"vers", ~[]);
-        debug2!("resolving dep crate {} ver: {} hash: {}",
+        debug!("resolving dep crate {} ver: {} hash: {}",
                cname_str, dep.vers, dep.hash);
         match existing_match(e,
                              metas_with_ident(cname_str, cmetas.clone()),
                              dep.hash) {
           Some(local_cnum) => {
-            debug2!("already have it");
+            debug!("already have it");
             // We've already seen this crate
             cnum_map.insert(extrn_cnum, local_cnum);
           }
           None => {
-            debug2!("need to load it");
+            debug!("need to load it");
             // This is a new one so we've got to load it
             // FIXME (#2404): Need better error reporting than just a bogus
             // span.
index 6def597b89fb3bc2bff41043a566b2e36f50454c..617051c217f506bc3dec9c7f5d8c9e443d5543c3 100644 (file)
@@ -210,17 +210,17 @@ pub fn get_field_type(tcx: ty::ctxt, class_id: ast::DefId,
     let cstore = tcx.cstore;
     let cdata = cstore::get_crate_data(cstore, class_id.crate);
     let all_items = reader::get_doc(reader::Doc(cdata.data), tag_items);
-    debug2!("Looking up {:?}", class_id);
+    debug!("Looking up {:?}", class_id);
     let class_doc = expect(tcx.diag,
                            decoder::maybe_find_item(class_id.node, all_items),
                            || format!("get_field_type: class ID {:?} not found",
                                    class_id) );
-    debug2!("looking up {:?} : {:?}", def, class_doc);
+    debug!("looking up {:?} : {:?}", def, class_doc);
     let the_field = expect(tcx.diag,
         decoder::maybe_find_item(def.node, class_doc),
         || format!("get_field_type: in class {:?}, field ID {:?} not found",
                  class_id, def) );
-    debug2!("got field data {:?}", the_field);
+    debug!("got field data {:?}", the_field);
     let ty = decoder::item_type(def, the_field, tcx, cdata);
     ty::ty_param_bounds_and_ty {
         generics: ty::Generics {type_param_defs: @~[],
index 226c19a5d5e46ba0dd5cc89ee70f29405995bb41..3c79ea2fe5e3f6aac41204a37b58f0a13cee66c9 100644 (file)
@@ -152,7 +152,7 @@ pub fn get_dep_hashes(cstore: &CStore) -> ~[@str] {
         let cdata = cstore::get_crate_data(cstore, cnum);
         let hash = decoder::get_crate_hash(cdata.data);
         let vers = decoder::get_crate_vers(cdata.data);
-        debug2!("Add hash[{}]: {} {}", cdata.name, vers, hash);
+        debug!("Add hash[{}]: {} {}", cdata.name, vers, hash);
         result.push(crate_hash {
             name: cdata.name,
             vers: vers,
@@ -164,9 +164,9 @@ pub fn get_dep_hashes(cstore: &CStore) -> ~[@str] {
         (a.name, a.vers, a.hash) <= (b.name, b.vers, b.hash)
     };
 
-    debug2!("sorted:");
+    debug!("sorted:");
     for x in sorted.iter() {
-        debug2!("  hash[{}]: {}", x.name, x.hash);
+        debug!("  hash[{}]: {}", x.name, x.hash);
     }
 
     sorted.map(|ch| ch.hash)
index cf34d129fec899f282dc912c5e28ce2058aeae56..aa1c4c1eb7ec6425f4ba047e5ccf274469bc34d9 100644 (file)
@@ -89,7 +89,7 @@ fn eq_item(bytes: &[u8], item_id: int) -> bool {
 
 fn find_item(item_id: int, items: ebml::Doc) -> ebml::Doc {
     match maybe_find_item(item_id, items) {
-       None => fail2!("lookup_item: id not found: {}", item_id),
+       None => fail!("lookup_item: id not found: {}", item_id),
        Some(d) => d
     }
 }
@@ -148,7 +148,7 @@ fn item_family(item: ebml::Doc) -> Family {
       'g' => PublicField,
       'j' => PrivateField,
       'N' => InheritedField,
-       c => fail2!("unexpected family char: {}", c)
+       c => fail!("unexpected family char: {}", c)
     }
 }
 
@@ -160,7 +160,7 @@ fn item_visibility(item: ebml::Doc) -> ast::visibility {
                 'y' => ast::public,
                 'n' => ast::private,
                 'i' => ast::inherited,
-                _ => fail2!("unknown visibility character")
+                _ => fail!("unknown visibility character")
             }
         }
     }
@@ -494,8 +494,8 @@ pub enum DefLike {
 pub fn def_like_to_def(def_like: DefLike) -> ast::Def {
     match def_like {
         DlDef(def) => return def,
-        DlImpl(*) => fail2!("found impl in def_like_to_def"),
-        DlField => fail2!("found field in def_like_to_def")
+        DlImpl(*) => fail!("found impl in def_like_to_def"),
+        DlField => fail!("found field in def_like_to_def")
     }
 }
 
@@ -550,13 +550,13 @@ fn process_item_and_pop_name(&mut self,
         let def_like = item_to_def_like(doc, def_id, self.cdata.cnum);
         match def_like {
             DlDef(def) => {
-                debug2!("(iterating over each item of a module) processing \
+                debug!("(iterating over each item of a module) processing \
                         `{}` (def {:?})",
                        *self.path_builder,
                        def);
             }
             _ => {
-                debug2!("(iterating over each item of a module) processing \
+                debug!("(iterating over each item of a module) processing \
                         `{}` ({}:{})",
                        *self.path_builder,
                        def_id.crate,
@@ -631,7 +631,7 @@ fn each_child_of_module_or_crate(&mut self, item_doc: ebml::Doc) -> bool {
                 reader::get_doc(root, tag_items)
             };
 
-            debug2!("(iterating over each item of a module) looking up item \
+            debug!("(iterating over each item of a module) looking up item \
                     {}:{} in `{}`, crate {}",
                    child_def_id.crate,
                    child_def_id.node,
@@ -644,7 +644,7 @@ fn each_child_of_module_or_crate(&mut self, item_doc: ebml::Doc) -> bool {
                 Some(child_item_doc) => {
                     // Push the name.
                     let child_name = item_name(self.intr, child_item_doc);
-                    debug2!("(iterating over each item of a module) pushing \
+                    debug!("(iterating over each item of a module) pushing \
                             name `{}` onto `{}`",
                            token::ident_to_str(&child_name),
                            *self.path_builder);
@@ -682,7 +682,7 @@ fn each_child_of_module_or_crate(&mut self, item_doc: ebml::Doc) -> bool {
             let name = name_doc.as_str_slice();
 
             // Push the name.
-            debug2!("(iterating over each item of a module) pushing \
+            debug!("(iterating over each item of a module) pushing \
                     reexported name `{}` onto `{}` (crate {}, orig {}, \
                     in crate {})",
                    name,
@@ -900,7 +900,7 @@ pub fn maybe_get_item_ast(cdata: Cmd, tcx: ty::ctxt,
                           id: ast::NodeId,
                           decode_inlined_item: decode_inlined_item)
                        -> csearch::found_ast {
-    debug2!("Looking up item: {}", id);
+    debug!("Looking up item: {}", id);
     let item_doc = lookup_item(id, cdata.data);
     let path = {
         let item_path = item_path(item_doc);
@@ -965,7 +965,7 @@ fn get_mutability(ch: u8) -> ast::Mutability {
         match ch as char {
             'i' => ast::MutImmutable,
             'm' => ast::MutMutable,
-            _ => fail2!("unknown mutability character: `{}`", ch as char),
+            _ => fail!("unknown mutability character: `{}`", ch as char),
         }
     }
 
@@ -983,7 +983,7 @@ fn get_mutability(ch: u8) -> ast::Mutability {
             return ast::sty_region(None, get_mutability(string[1]));
         }
         _ => {
-            fail2!("unknown self type code: `{}`", explicit_self_kind as char);
+            fail!("unknown self type code: `{}`", explicit_self_kind as char);
         }
     }
 }
@@ -1164,7 +1164,7 @@ pub fn get_static_methods_if_impl(intr: @ident_interner,
                 match item_family(impl_method_doc) {
                     StaticMethod => purity = ast::impure_fn,
                     UnsafeStaticMethod => purity = ast::unsafe_fn,
-                    _ => fail2!()
+                    _ => fail!()
                 }
 
                 static_impl_methods.push(StaticMethodInfo {
@@ -1200,7 +1200,7 @@ fn struct_field_family_to_visibility(family: Family) -> ast::visibility {
       PublicField => ast::public,
       PrivateField => ast::private,
       InheritedField => ast::inherited,
-      _ => fail2!()
+      _ => fail!()
     }
 }
 
@@ -1266,7 +1266,7 @@ fn describe_def(items: ebml::Doc, id: ast::DefId) -> ~str {
     if id.crate != ast::LOCAL_CRATE { return ~"external"; }
     let it = match maybe_find_item(id.node, items) {
         Some(it) => it,
-        None => fail2!("describe_def: item not found {:?}", id)
+        None => fail!("describe_def: item not found {:?}", id)
     };
     return item_family_to_str(item_family(it));
 }
@@ -1453,7 +1453,7 @@ pub fn translate_def_id(cdata: Cmd, did: ast::DefId) -> ast::DefId {
 
     match cdata.cnum_map.find(&did.crate) {
       option::Some(&n) => ast::DefId { crate: n, node: did.node },
-      option::None => fail2!("didn't find a crate in the cnum_map")
+      option::None => fail!("didn't find a crate in the cnum_map")
     }
 }
 
index 5434e7ab07b1c77f9fb8bb814bdb40c42de95b12..9f40593a93ae76b0bad3091a020132240e761eb1 100644 (file)
@@ -282,7 +282,7 @@ fn encode_symbol(ecx: &EncodeContext,
     ebml_w.start_tag(tag_items_data_item_symbol);
     match ecx.item_symbols.find(&id) {
         Some(x) => {
-            debug2!("encode_symbol(id={:?}, str={})", id, *x);
+            debug!("encode_symbol(id={:?}, str={})", id, *x);
             ebml_w.writer.write(x.as_bytes());
         }
         None => {
@@ -337,7 +337,7 @@ fn encode_enum_variant_info(ecx: &EncodeContext,
                             path: &[ast_map::path_elt],
                             index: @mut ~[entry<i64>],
                             generics: &ast::Generics) {
-    debug2!("encode_enum_variant_info(id={:?})", id);
+    debug!("encode_enum_variant_info(id={:?})", id);
 
     let mut disr_val = 0;
     let mut i = 0;
@@ -423,7 +423,7 @@ fn encode_reexported_static_method(ecx: &EncodeContext,
                                    exp: &middle::resolve::Export2,
                                    method_def_id: DefId,
                                    method_ident: Ident) {
-    debug2!("(encode reexported static method) {}::{}",
+    debug!("(encode reexported static method) {}::{}",
             exp.name, ecx.tcx.sess.str_of(method_ident));
     ebml_w.start_tag(tag_items_data_item_reexport);
     ebml_w.start_tag(tag_items_data_item_reexport_def_id);
@@ -496,13 +496,13 @@ fn encode_reexported_static_methods(ecx: &EncodeContext,
             if mod_path != *path || exp.name != original_name {
                 if !encode_reexported_static_base_methods(ecx, ebml_w, exp) {
                     if encode_reexported_static_trait_methods(ecx, ebml_w, exp) {
-                        debug2!("(encode reexported static methods) {} \
+                        debug!("(encode reexported static methods) {} \
                                  [trait]",
                                 original_name);
                     }
                 }
                 else {
-                    debug2!("(encode reexported static methods) {} [base]",
+                    debug!("(encode reexported static methods) {} [base]",
                             original_name);
                 }
             }
@@ -550,12 +550,12 @@ fn encode_reexports(ecx: &EncodeContext,
                     ebml_w: &mut writer::Encoder,
                     id: NodeId,
                     path: &[ast_map::path_elt]) {
-    debug2!("(encoding info for module) encoding reexports for {}", id);
+    debug!("(encoding info for module) encoding reexports for {}", id);
     match ecx.reexports2.find(&id) {
         Some(ref exports) => {
-            debug2!("(encoding info for module) found reexports for {}", id);
+            debug!("(encoding info for module) found reexports for {}", id);
             for exp in exports.iter() {
-                debug2!("(encoding info for module) reexport '{}' ({}/{}) for \
+                debug!("(encoding info for module) reexport '{}' ({}/{}) for \
                         {}",
                        exp.name,
                        exp.def_id.crate,
@@ -573,7 +573,7 @@ fn encode_reexports(ecx: &EncodeContext,
             }
         }
         None => {
-            debug2!("(encoding info for module) found no reexports for {}",
+            debug!("(encoding info for module) found no reexports for {}",
                    id);
         }
     }
@@ -590,7 +590,7 @@ fn encode_info_for_mod(ecx: &EncodeContext,
     encode_def_id(ebml_w, local_def(id));
     encode_family(ebml_w, 'm');
     encode_name(ecx, ebml_w, name);
-    debug2!("(encoding info for module) encoding info for module ID {}", id);
+    debug!("(encoding info for module) encoding info for module ID {}", id);
 
     // Encode info about all the module children.
     for item in md.items.iter() {
@@ -608,7 +608,7 @@ fn encode_info_for_mod(ecx: &EncodeContext,
         match item.node {
             item_impl(*) => {
                 let (ident, did) = (item.ident, item.id);
-                debug2!("(encoding info for module) ... encoding impl {} \
+                debug!("(encoding info for module) ... encoding impl {} \
                         ({:?}/{:?})",
                         ecx.tcx.sess.str_of(ident),
                         did,
@@ -627,7 +627,7 @@ fn encode_info_for_mod(ecx: &EncodeContext,
 
     // Encode the reexports of this module, if this module is public.
     if vis == public {
-        debug2!("(encoding info for module) encoding reexports for {}", id);
+        debug!("(encoding info for module) encoding reexports for {}", id);
         encode_reexports(ecx, ebml_w, id, path);
     }
 
@@ -729,7 +729,7 @@ fn encode_info_for_struct(ecx: &EncodeContext,
         index.push(entry {val: id as i64, pos: ebml_w.writer.tell()});
         global_index.push(entry {val: id as i64, pos: ebml_w.writer.tell()});
         ebml_w.start_tag(tag_items_data_item);
-        debug2!("encode_info_for_struct: doing {} {}",
+        debug!("encode_info_for_struct: doing {} {}",
                tcx.sess.str_of(nm), id);
         encode_struct_field_family(ebml_w, vis);
         encode_name(ecx, ebml_w, nm);
@@ -795,7 +795,7 @@ fn encode_info_for_method(ecx: &EncodeContext,
                           parent_id: NodeId,
                           ast_method_opt: Option<@method>) {
 
-    debug2!("encode_info_for_method: {:?} {}", m.def_id,
+    debug!("encode_info_for_method: {:?} {}", m.def_id,
            ecx.tcx.sess.str_of(m.ident));
     ebml_w.start_tag(tag_items_data_item);
 
@@ -835,7 +835,7 @@ fn purity_static_method_family(p: purity) -> char {
     match p {
       unsafe_fn => 'U',
       impure_fn => 'F',
-      _ => fail2!("extern fn can't be static")
+      _ => fail!("extern fn can't be static")
     }
 }
 
@@ -894,7 +894,7 @@ fn add_to_index_(item: @item, ebml_w: &writer::Encoder,
     }
     let add_to_index: &fn() = || add_to_index_(item, ebml_w, index);
 
-    debug2!("encoding info for item at {}",
+    debug!("encoding info for item at {}",
            ecx.tcx.sess.codemap.span_to_str(item.span));
 
     let def_id = local_def(item.id);
@@ -1224,7 +1224,7 @@ fn add_to_index_(item: @item, ebml_w: &writer::Encoder,
         // Encode inherent implementations for this trait.
         encode_inherent_implementations(ecx, ebml_w, def_id);
       }
-      item_mac(*) => fail2!("item macros unimplemented")
+      item_mac(*) => fail!("item macros unimplemented")
     }
 }
 
@@ -1278,7 +1278,7 @@ fn my_visit_item(i:@item, items: ast_map::map, ebml_w:&writer::Encoder,
             let ecx : &EncodeContext = unsafe { cast::transmute(ecx_ptr) };
             encode_info_for_item(ecx, &mut ebml_w, i, index, *pt, i.vis);
         }
-        _ => fail2!("bad item")
+        _ => fail!("bad item")
     }
 }
 
@@ -1286,7 +1286,7 @@ fn my_visit_foreign_item(ni:@foreign_item, items: ast_map::map, ebml_w:&writer::
                          ecx_ptr:*int, index: @mut ~[entry<i64>]) {
     match items.get_copy(&ni.id) {
         ast_map::node_foreign_item(_, abi, _, pt) => {
-            debug2!("writing foreign item {}::{}",
+            debug!("writing foreign item {}::{}",
                    ast_map::path_to_str(
                        *pt,
                        token::get_ident_interner()),
@@ -1303,7 +1303,7 @@ fn my_visit_foreign_item(ni:@foreign_item, items: ast_map::map, ebml_w:&writer::
                                          abi);
         }
         // case for separate item and foreign-item tables
-        _ => fail2!("bad foreign item")
+        _ => fail!("bad foreign item")
     }
 }
 
index 8f42614707886c553888a524970c4e17c174916f..4b679072bba739bc0f765547c87ce96fb21c1578 100644 (file)
@@ -53,7 +53,7 @@ fn for_each_lib_search_path(&self, f: &fn(&Path) -> FileMatch) {
             let mut visited_dirs = HashSet::new();
             let mut found = false;
 
-            debug2!("filesearch: searching additional lib search paths [{:?}]",
+            debug!("filesearch: searching additional lib search paths [{:?}]",
                    self.addl_lib_search_paths.len());
             for path in self.addl_lib_search_paths.iter() {
                 match f(path) {
@@ -63,7 +63,7 @@ fn for_each_lib_search_path(&self, f: &fn(&Path) -> FileMatch) {
                 visited_dirs.insert(path.as_vec().to_owned());
             }
 
-            debug2!("filesearch: searching target lib path");
+            debug!("filesearch: searching target lib path");
             let tlib_path = make_target_lib_path(self.sysroot,
                                         self.target_triple);
             if !visited_dirs.contains_equiv(&tlib_path.as_vec()) {
@@ -78,7 +78,7 @@ fn for_each_lib_search_path(&self, f: &fn(&Path) -> FileMatch) {
                 let rustpath = rust_path();
                 for path in rustpath.iter() {
                     let tlib_path = make_rustpkg_target_lib_path(path, self.target_triple);
-                    debug2!("is {} in visited_dirs? {:?}", tlib_path.display(),
+                    debug!("is {} in visited_dirs? {:?}", tlib_path.display(),
                             visited_dirs.contains_equiv(&tlib_path.as_vec().to_owned()));
 
                     if !visited_dirs.contains_equiv(&tlib_path.as_vec()) {
@@ -106,7 +106,7 @@ fn get_target_lib_file_path(&self, file: &Path) -> Path {
     }
 
     let sysroot = get_sysroot(maybe_sysroot);
-    debug2!("using sysroot = {}", sysroot.display());
+    debug!("using sysroot = {}", sysroot.display());
     @FileSearchImpl {
         sysroot: sysroot,
         addl_lib_search_paths: addl_lib_search_paths,
@@ -116,19 +116,19 @@ fn get_target_lib_file_path(&self, file: &Path) -> Path {
 
 pub fn search(filesearch: @FileSearch, pick: pick) {
     do filesearch.for_each_lib_search_path() |lib_search_path| {
-        debug2!("searching {}", lib_search_path.display());
+        debug!("searching {}", lib_search_path.display());
         let r = os::list_dir_path(lib_search_path);
         let mut rslt = FileDoesntMatch;
         for path in r.iter() {
-            debug2!("testing {}", path.display());
+            debug!("testing {}", path.display());
             let maybe_picked = pick(path);
             match maybe_picked {
                 FileMatches => {
-                    debug2!("picked {}", path.display());
+                    debug!("picked {}", path.display());
                     rslt = FileMatches;
                 }
                 FileDoesntMatch => {
-                    debug2!("rejected {}", path.display());
+                    debug!("rejected {}", path.display());
                 }
             }
         }
@@ -161,7 +161,7 @@ fn make_rustpkg_target_lib_path(dir: &Path,
 pub fn get_or_default_sysroot() -> Path {
     match os::self_exe_path() {
       option::Some(p) => { let mut p = p; p.pop(); p }
-      option::None => fail2!("can't determine value for sysroot")
+      option::None => fail!("can't determine value for sysroot")
     }
 }
 
index 593a02c95082dcb9945a94112bee4e82f031009d..e682ff299a935a96ca507431a1b37cbeddbebe5c 100644 (file)
@@ -99,21 +99,21 @@ fn find_library_crate_aux(
           None => FileDoesntMatch,
           Some(path_str) =>
               if path_str.starts_with(prefix) && path_str.ends_with(suffix) {
-                  debug2!("{} is a candidate", path.display());
+                  debug!("{} is a candidate", path.display());
                   match get_metadata_section(cx.os, path) {
                       Some(cvec) =>
                           if !crate_matches(cvec, cx.metas, cx.hash) {
-                              debug2!("skipping {}, metadata doesn't match",
+                              debug!("skipping {}, metadata doesn't match",
                                   path.display());
                               FileDoesntMatch
                           } else {
-                              debug2!("found {} with matching metadata", path.display());
+                              debug!("found {} with matching metadata", path.display());
                               // FIXME (#9639): This needs to handle non-utf8 paths
                               matches.push((path.as_str().unwrap().to_owned(), cvec));
                               FileMatches
                           },
                       _ => {
-                          debug2!("could not load metadata for {}", path.display());
+                          debug!("could not load metadata for {}", path.display());
                           FileDoesntMatch
                       }
                   }
@@ -151,7 +151,7 @@ pub fn crate_name_from_metas(metas: &[@ast::MetaItem]) -> @str {
             _ => {}
         }
     }
-    fail2!("expected to find the crate name")
+    fail!("expected to find the crate name")
 }
 
 pub fn package_id_from_metas(metas: &[@ast::MetaItem]) -> Option<@str> {
@@ -190,7 +190,7 @@ pub fn metadata_matches(extern_metas: &[@ast::MetaItem],
 
 // extern_metas: metas we read from the crate
 // local_metas: metas we're looking for
-    debug2!("matching {} metadata requirements against {} items",
+    debug!("matching {} metadata requirements against {} items",
            local_metas.len(), extern_metas.len());
 
     do local_metas.iter().all |needed| {
@@ -213,14 +213,14 @@ fn get_metadata_section(os: Os,
         while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
             let name_buf = llvm::LLVMGetSectionName(si.llsi);
             let name = str::raw::from_c_str(name_buf);
-            debug2!("get_metadata_section: name {}", name);
+            debug!("get_metadata_section: name {}", name);
             if read_meta_section_name(os) == name {
                 let cbuf = llvm::LLVMGetSectionContents(si.llsi);
                 let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
                 let mut found = None;
                 let cvbuf: *u8 = cast::transmute(cbuf);
                 let vlen = encoder::metadata_encoding_version.len();
-                debug2!("checking {} bytes of metadata-version stamp",
+                debug!("checking {} bytes of metadata-version stamp",
                        vlen);
                 let minsz = num::min(vlen, csz);
                 let mut version_ok = false;
@@ -231,7 +231,7 @@ fn get_metadata_section(os: Os,
                 if !version_ok { return None; }
 
                 let cvbuf1 = ptr::offset(cvbuf, vlen as int);
-                debug2!("inflating {} bytes of compressed metadata",
+                debug!("inflating {} bytes of compressed metadata",
                        csz - vlen);
                 do vec::raw::buf_as_slice(cvbuf1, csz-vlen) |bytes| {
                     let inflated = flate::inflate_bytes(bytes);
index d7a544320c26e760fa0e2956b0ec054c624d2e77..62de991ce9631fe010762bdcf0cf9db907fba175 100644 (file)
@@ -80,10 +80,10 @@ fn scan<R>(st: &mut PState, is_last: &fn(char) -> bool,
            op: &fn(&[u8]) -> R) -> R
 {
     let start_pos = st.pos;
-    debug2!("scan: '{}' (start)", st.data[st.pos] as char);
+    debug!("scan: '{}' (start)", st.data[st.pos] as char);
     while !is_last(st.data[st.pos] as char) {
         st.pos += 1;
-        debug2!("scan: '{}'", st.data[st.pos] as char);
+        debug!("scan: '{}'", st.data[st.pos] as char);
     }
     let end_pos = st.pos;
     st.pos += 1;
@@ -221,7 +221,7 @@ fn parse_region_substs(st: &mut PState) -> ty::RegionSubsts {
             assert_eq!(next(st), '.');
             ty::NonerasedRegions(regions)
         }
-        _ => fail2!("parse_bound_region: bad input")
+        _ => fail!("parse_bound_region: bad input")
     }
 }
 
@@ -239,7 +239,7 @@ fn parse_bound_region(st: &mut PState) -> ty::bound_region {
         assert_eq!(next(st), '|');
         ty::br_cap_avoid(id, @parse_bound_region(st))
       },
-      _ => fail2!("parse_bound_region: bad input")
+      _ => fail!("parse_bound_region: bad input")
     }
 }
 
@@ -268,7 +268,7 @@ fn parse_region(st: &mut PState) -> ty::Region {
       'e' => {
         ty::re_static
       }
-      _ => fail2!("parse_region: bad input")
+      _ => fail!("parse_region: bad input")
     }
 }
 
@@ -276,7 +276,7 @@ fn parse_opt<T>(st: &mut PState, f: &fn(&mut PState) -> T) -> Option<T> {
     match next(st) {
       'n' => None,
       's' => Some(f(st)),
-      _ => fail2!("parse_opt: bad input")
+      _ => fail!("parse_opt: bad input")
     }
 }
 
@@ -316,7 +316,7 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
           'D' => return ty::mk_mach_int(ast::ty_i64),
           'f' => return ty::mk_mach_float(ast::ty_f32),
           'F' => return ty::mk_mach_float(ast::ty_f64),
-          _ => fail2!("parse_ty: bad numeric type")
+          _ => fail!("parse_ty: bad numeric type")
         }
       }
       'c' => return ty::mk_char(),
@@ -339,7 +339,7 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
       }
       'p' => {
         let did = parse_def(st, TypeParameter, conv);
-        debug2!("parsed ty_param: did={:?}", did);
+        debug!("parsed ty_param: did={:?}", did);
         return ty::mk_param(st.tcx, parse_uint(st), did);
       }
       's' => {
@@ -416,7 +416,7 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
           assert_eq!(next(st), ']');
           return ty::mk_struct(st.tcx, did, substs);
       }
-      c => { error2!("unexpected char in type string: {}", c); fail2!();}
+      c => { error!("unexpected char in type string: {}", c); fail!();}
     }
 }
 
@@ -466,7 +466,7 @@ fn parse_purity(c: char) -> purity {
       'u' => unsafe_fn,
       'i' => impure_fn,
       'c' => extern_fn,
-      _ => fail2!("parse_purity: bad purity {}", c)
+      _ => fail!("parse_purity: bad purity {}", c)
     }
 }
 
@@ -487,7 +487,7 @@ fn parse_onceness(c: char) -> ast::Onceness {
     match c {
         'o' => ast::Once,
         'm' => ast::Many,
-        _ => fail2!("parse_onceness: bad onceness")
+        _ => fail!("parse_onceness: bad onceness")
     }
 }
 
@@ -538,8 +538,8 @@ pub fn parse_def_id(buf: &[u8]) -> ast::DefId {
     let len = buf.len();
     while colon_idx < len && buf[colon_idx] != ':' as u8 { colon_idx += 1u; }
     if colon_idx == len {
-        error2!("didn't find ':' when parsing def id");
-        fail2!();
+        error!("didn't find ':' when parsing def id");
+        fail!();
     }
 
     let crate_part = buf.slice(0u, colon_idx);
@@ -547,12 +547,12 @@ pub fn parse_def_id(buf: &[u8]) -> ast::DefId {
 
     let crate_num = match uint::parse_bytes(crate_part, 10u) {
        Some(cn) => cn as int,
-       None => fail2!("internal error: parse_def_id: crate number expected, but found {:?}",
+       None => fail!("internal error: parse_def_id: crate number expected, but found {:?}",
                      crate_part)
     };
     let def_num = match uint::parse_bytes(def_part, 10u) {
        Some(dn) => dn as int,
-       None => fail2!("internal error: parse_def_id: id expected, but found {:?}",
+       None => fail!("internal error: parse_def_id: id expected, but found {:?}",
                      def_part)
     };
     ast::DefId { crate: crate_num, node: def_num }
@@ -598,7 +598,7 @@ fn parse_bounds(st: &mut PState, conv: conv_did) -> ty::ParamBounds {
                 return param_bounds;
             }
             _ => {
-                fail2!("parse_bounds: bad bounds")
+                fail!("parse_bounds: bad bounds")
             }
         }
     }
index 146e3cd920095bf6dc26b5d625d93dd167bcf2d5..33be1be8955561639b3bb184deefdc494a209f15 100644 (file)
@@ -335,18 +335,18 @@ fn enc_sty(w: @io::Writer, cx: @ctxt, st: &ty::sty) {
       }
       ty::ty_opaque_box => w.write_char('B'),
       ty::ty_struct(def, ref substs) => {
-          debug2!("~~~~ {}", "a[");
+          debug!("~~~~ {}", "a[");
           w.write_str(&"a[");
           let s = (cx.ds)(def);
-          debug2!("~~~~ {}", s);
+          debug!("~~~~ {}", s);
           w.write_str(s);
-          debug2!("~~~~ {}", "|");
+          debug!("~~~~ {}", "|");
           w.write_char('|');
           enc_substs(w, cx, substs);
-          debug2!("~~~~ {}", "]");
+          debug!("~~~~ {}", "]");
           w.write_char(']');
       }
-      ty::ty_err => fail2!("Shouldn't encode error type")
+      ty::ty_err => fail!("Shouldn't encode error type")
     }
 }
 
index b6a782c09b79d151949ddc5d8e1db9b739ede194..294bbcb46f7b8ddd81076c70e52fe68c8755f278 100644 (file)
@@ -84,7 +84,7 @@ pub fn encode_inlined_item(ecx: &e::EncodeContext,
                            path: &[ast_map::path_elt],
                            ii: ast::inlined_item,
                            maps: Maps) {
-    debug2!("> Encoding inlined item: {}::{} ({})",
+    debug!("> Encoding inlined item: {}::{} ({})",
            ast_map::path_to_str(path, token::get_ident_interner()),
            ecx.tcx.sess.str_of(ii.ident()),
            ebml_w.writer.tell());
@@ -97,7 +97,7 @@ pub fn encode_inlined_item(ecx: &e::EncodeContext,
     encode_side_tables_for_ii(ecx, maps, ebml_w, &ii);
     ebml_w.end_tag();
 
-    debug2!("< Encoded inlined fn: {}::{} ({})",
+    debug!("< Encoded inlined fn: {}::{} ({})",
            ast_map::path_to_str(path, token::get_ident_interner()),
            ecx.tcx.sess.str_of(ii.ident()),
            ebml_w.writer.tell());
@@ -117,7 +117,7 @@ pub fn decode_inlined_item(cdata: @cstore::crate_metadata,
     match par_doc.opt_child(c::tag_ast) {
       None => None,
       Some(ast_doc) => {
-        debug2!("> Decoding inlined fn: {}::?",
+        debug!("> Decoding inlined fn: {}::?",
                ast_map::path_to_str(path, token::get_ident_interner()));
         let mut ast_dsr = reader::Decoder(ast_doc);
         let from_id_range = Decodable::decode(&mut ast_dsr);
@@ -129,8 +129,8 @@ pub fn decode_inlined_item(cdata: @cstore::crate_metadata,
         };
         let raw_ii = decode_ast(ast_doc);
         let ii = renumber_ast(xcx, raw_ii);
-        debug2!("Fn named: {}", tcx.sess.str_of(ii.ident()));
-        debug2!("< Decoded inlined fn: {}::{}",
+        debug!("Fn named: {}", tcx.sess.str_of(ii.ident()));
+        debug!("< Decoded inlined fn: {}::{}",
                ast_map::path_to_str(path, token::get_ident_interner()),
                tcx.sess.str_of(ii.ident()));
         ast_map::map_decoded_item(tcx.sess.diagnostic(),
@@ -140,7 +140,7 @@ pub fn decode_inlined_item(cdata: @cstore::crate_metadata,
         decode_side_tables(xcx, ast_doc);
         match ii {
           ast::ii_item(i) => {
-            debug2!(">>> DECODED ITEM >>>\n{}\n<<< DECODED ITEM <<<",
+            debug!(">>> DECODED ITEM >>>\n{}\n<<< DECODED ITEM <<<",
                    syntax::print::pprust::item_to_str(i, tcx.sess.intr()));
           }
           _ => { }
@@ -305,7 +305,7 @@ fn fold_block(&self, blk: &ast::Block) -> ast::Block {
                     node: ast::DeclItem(_),
                     span: _
                 }, _) => None,
-                ast::StmtMac(*) => fail2!("unexpanded macro in astencode")
+                ast::StmtMac(*) => fail!("unexpanded macro in astencode")
             }
         }.collect();
         let blk_sans_items = ast::Block {
@@ -741,7 +741,7 @@ fn read_vtable_origin(&mut self,
                     )
                   }
                   // hard to avoid - user input
-                  _ => fail2!("bad enum variant")
+                  _ => fail!("bad enum variant")
                 }
             }
         }
@@ -896,7 +896,7 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
                              id: ast::NodeId) {
     let tcx = ecx.tcx;
 
-    debug2!("Encoding side tables for id {}", id);
+    debug!("Encoding side tables for id {}", id);
 
     {
         let r = tcx.def_map.find(&id);
@@ -1091,7 +1091,7 @@ fn read_ty(&mut self, xcx: @ExtendedDecodeContext) -> ty::t {
                 xcx.dcx.tcx,
                 |s, a| this.convert_def_id(xcx, s, a));
 
-            debug2!("read_ty({}) = {}",
+            debug!("read_ty({}) = {}",
                    type_string(doc),
                    ty_to_str(xcx.dcx.tcx, ty));
 
@@ -1176,7 +1176,7 @@ fn convert_def_id(&mut self,
             NominalType | TypeWithId => xcx.tr_def_id(did),
             TypeParameter => xcx.tr_intern_def_id(did)
         };
-        debug2!("convert_def_id(source={:?}, did={:?})={:?}", source, did, r);
+        debug!("convert_def_id(source={:?}, did={:?})={:?}", source, did, r);
         return r;
     }
 }
@@ -1189,7 +1189,7 @@ fn decode_side_tables(xcx: @ExtendedDecodeContext,
         let id0 = entry_doc.get(c::tag_table_id as uint).as_int();
         let id = xcx.tr_id(id0);
 
-        debug2!(">> Side table document with tag 0x{:x} \
+        debug!(">> Side table document with tag 0x{:x} \
                 found for id {} (orig {})",
                tag, id, id0);
 
@@ -1210,7 +1210,7 @@ fn decode_side_tables(xcx: @ExtendedDecodeContext,
                     }
                     c::tag_table_node_type => {
                         let ty = val_dsr.read_ty(xcx);
-                        debug2!("inserting ty for node {:?}: {}",
+                        debug!("inserting ty for node {:?}: {}",
                                id, ty_to_str(dcx.tcx, ty));
                         dcx.tcx.node_types.insert(id as uint, ty);
                     }
@@ -1263,7 +1263,7 @@ fn decode_side_tables(xcx: @ExtendedDecodeContext,
             }
         }
 
-        debug2!(">< Side table doc loaded");
+        debug!(">< Side table doc loaded");
         true
     };
 }
@@ -1381,6 +1381,6 @@ fn new_int_alist<B>() -> alist<int, B> {
                      == pprust::item_to_str(item_exp,
                                             token::get_ident_interner()));
       }
-      _ => fail2!()
+      _ => fail!()
     }
 }
index 47c29436856945e1ad58e55cedb91658ca9f56dc..b05bdaa203220cb47a624ca97c5131f7a1f870c4 100644 (file)
@@ -65,7 +65,7 @@ pub fn check_loans(bccx: &BorrowckCtxt,
                    move_data: move_data::FlowedMoveData,
                    all_loans: &[Loan],
                    body: &ast::Block) {
-    debug2!("check_loans(body id={:?})", body.id);
+    debug!("check_loans(body id={:?})", body.id);
 
     let mut clcx = CheckLoanCtxt {
         bccx: bccx,
@@ -197,10 +197,10 @@ pub fn check_for_conflicting_loans(&self, scope_id: ast::NodeId) {
         //! issued when we enter `scope_id` (for example, we do not
         //! permit two `&mut` borrows of the same variable).
 
-        debug2!("check_for_conflicting_loans(scope_id={:?})", scope_id);
+        debug!("check_for_conflicting_loans(scope_id={:?})", scope_id);
 
         let new_loan_indices = self.loans_generated_by(scope_id);
-        debug2!("new_loan_indices = {:?}", new_loan_indices);
+        debug!("new_loan_indices = {:?}", new_loan_indices);
 
         do self.each_issued_loan(scope_id) |issued_loan| {
             for &new_loan_index in new_loan_indices.iter() {
@@ -225,7 +225,7 @@ pub fn report_error_if_loans_conflict(&self,
         //! Checks whether `old_loan` and `new_loan` can safely be issued
         //! simultaneously.
 
-        debug2!("report_error_if_loans_conflict(old_loan={}, new_loan={})",
+        debug!("report_error_if_loans_conflict(old_loan={}, new_loan={})",
                old_loan.repr(self.tcx()),
                new_loan.repr(self.tcx()));
 
@@ -249,7 +249,7 @@ pub fn report_error_if_loan_conflicts_with_restriction(&self,
         //! Checks whether the restrictions introduced by `loan1` would
         //! prohibit `loan2`. Returns false if an error is reported.
 
-        debug2!("report_error_if_loan_conflicts_with_restriction(\
+        debug!("report_error_if_loan_conflicts_with_restriction(\
                 loan1={}, loan2={})",
                loan1.repr(self.tcx()),
                loan2.repr(self.tcx()));
@@ -260,7 +260,7 @@ pub fn report_error_if_loan_conflicts_with_restriction(&self,
             ImmutableMutability => RESTR_ALIAS | RESTR_FREEZE,
             ConstMutability     => RESTR_ALIAS,
         };
-        debug2!("illegal_if={:?}", illegal_if);
+        debug!("illegal_if={:?}", illegal_if);
 
         for restr in loan1.restrictions.iter() {
             if !restr.set.intersects(illegal_if) { continue; }
@@ -317,7 +317,7 @@ pub fn check_if_path_is_moved(&self,
          * is using a moved/uninitialized value
          */
 
-        debug2!("check_if_path_is_moved(id={:?}, use_kind={:?}, lp={})",
+        debug!("check_if_path_is_moved(id={:?}, use_kind={:?}, lp={})",
                id, use_kind, lp.repr(self.bccx.tcx));
         do self.move_data.each_move_of(id, lp) |move, moved_lp| {
             self.bccx.report_use_of_moved_value(
@@ -338,7 +338,7 @@ pub fn check_assignment(&self, expr: @ast::Expr) {
             Some(&adj) => self.bccx.cat_expr_autoderefd(expr, adj)
         };
 
-        debug2!("check_assignment(cmt={})", cmt.repr(self.tcx()));
+        debug!("check_assignment(cmt={})", cmt.repr(self.tcx()));
 
         // Mutable values can be assigned, as long as they obey loans
         // and aliasing restrictions:
@@ -387,7 +387,7 @@ fn mark_variable_as_used_mut(this: &CheckLoanCtxt,
 
             let mut cmt = cmt;
             loop {
-                debug2!("mark_writes_through_upvars_as_used_mut(cmt={})",
+                debug!("mark_writes_through_upvars_as_used_mut(cmt={})",
                        cmt.repr(this.tcx()));
                 match cmt.cat {
                     mc::cat_local(id) |
@@ -435,7 +435,7 @@ fn check_for_aliasable_mutable_writes(this: &CheckLoanCtxt,
             //! Safety checks related to writes to aliasable, mutable locations
 
             let guarantor = cmt.guarantor();
-            debug2!("check_for_aliasable_mutable_writes(cmt={}, guarantor={})",
+            debug!("check_for_aliasable_mutable_writes(cmt={}, guarantor={})",
                    cmt.repr(this.tcx()), guarantor.repr(this.tcx()));
             match guarantor.cat {
                 mc::cat_deref(b, _, mc::region_ptr(MutMutable, _)) => {
@@ -451,7 +451,7 @@ fn check_for_aliasable_mutable_writes(this: &CheckLoanCtxt,
                         id: guarantor.id,
                         derefs: deref_count
                     };
-                    debug2!("Inserting write guard at {:?}", key);
+                    debug!("Inserting write guard at {:?}", key);
                     this.bccx.write_guard_map.insert(key);
                 }
 
@@ -690,7 +690,7 @@ fn check_move_out_from_id(&self, id: ast::NodeId, span: Span) {
     pub fn analyze_move_out_from(&self,
                                  expr_id: ast::NodeId,
                                  move_path: @LoanPath) -> MoveError {
-        debug2!("analyze_move_out_from(expr_id={:?}, move_path={})",
+        debug!("analyze_move_out_from(expr_id={:?}, move_path={})",
                expr_id, move_path.repr(self.tcx()));
 
         // FIXME(#4384) inadequare if/when we permit `move a.b`
@@ -794,7 +794,7 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
                            expr: @ast::Expr) {
     visit::walk_expr(this, expr, ());
 
-    debug2!("check_loans_in_expr(expr={})",
+    debug!("check_loans_in_expr(expr={})",
            expr.repr(this.tcx()));
 
     this.check_for_conflicting_loans(expr.id);
@@ -805,7 +805,7 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
       ast::ExprPath(*) => {
           if !this.move_data.is_assignee(expr.id) {
               let cmt = this.bccx.cat_expr_unadjusted(expr);
-              debug2!("path cmt={}", cmt.repr(this.tcx()));
+              debug!("path cmt={}", cmt.repr(this.tcx()));
               let r = opt_loan_path(cmt);
               for &lp in r.iter() {
                   this.check_if_path_is_moved(expr.id, expr.span, MovedInUse, lp);
index 485004a642cfbcce25a8911ecfd476e50d06f6e6..a0c6fdc32255fee5bb95671e7e5a0f84b9d0f033 100644 (file)
@@ -27,7 +27,7 @@ pub fn guarantee_lifetime(bccx: &BorrowckCtxt,
                           cmt: mc::cmt,
                           loan_region: ty::Region,
                           loan_mutbl: LoanMutability) {
-    debug2!("guarantee_lifetime(cmt={}, loan_region={})",
+    debug!("guarantee_lifetime(cmt={}, loan_region={})",
            cmt.repr(bccx.tcx), loan_region.repr(bccx.tcx));
     let ctxt = GuaranteeLifetimeContext {bccx: bccx,
                                          item_scope_id: item_scope_id,
@@ -101,7 +101,7 @@ fn check(&self, cmt: mc::cmt, discr_scope: Option<ast::NodeId>) {
                     // L-Deref-Managed-Mut-Compiler-Root
                     self.check_root(cmt, base, derefs, ptr_mutbl, discr_scope);
                 } else {
-                    debug2!("omitting root, base={}, base_scope={:?}",
+                    debug!("omitting root, base={}, base_scope={:?}",
                            base.repr(self.tcx()), base_scope);
                 }
             }
@@ -189,7 +189,7 @@ fn check_root(&self,
                   derefs: uint,
                   ptr_mutbl: ast::Mutability,
                   discr_scope: Option<ast::NodeId>) {
-        debug2!("check_root(cmt_deref={}, cmt_base={}, derefs={:?}, ptr_mutbl={:?}, \
+        debug!("check_root(cmt_deref={}, cmt_base={}, derefs={:?}, ptr_mutbl={:?}, \
                 discr_scope={:?})",
                cmt_deref.repr(self.tcx()),
                cmt_base.repr(self.tcx()),
@@ -247,7 +247,7 @@ fn check_root(&self,
         // FIXME(#3511) grow to the nearest cleanup scope---this can
         // cause observable errors if freezing!
         if !self.bccx.tcx.region_maps.is_cleanup_scope(root_scope) {
-            debug2!("{:?} is not a cleanup scope, adjusting", root_scope);
+            debug!("{:?} is not a cleanup scope, adjusting", root_scope);
 
             let cleanup_scope =
                 self.bccx.tcx.region_maps.cleanup_scope(root_scope);
@@ -277,7 +277,7 @@ fn check_root(&self,
         let root_info = RootInfo {scope: root_scope, freeze: opt_dyna};
         self.bccx.root_map.insert(rm_key, root_info);
 
-        debug2!("root_key: {:?} root_info: {:?}", rm_key, root_info);
+        debug!("root_key: {:?} root_info: {:?}", rm_key, root_info);
     }
 
     fn check_scope(&self, max_scope: ty::Region) {
index 224c8bf6a6b55cf9c4b188b5bfe4327d14a53d01..6c927794dc8117f7e568747fdfbd8d19fe159602 100644 (file)
@@ -136,7 +136,7 @@ fn gather_loans_in_fn(this: &mut GatherLoanCtxt,
                       id: ast::NodeId) {
     match fk {
         &visit::fk_item_fn(*) | &visit::fk_method(*) => {
-            fail2!("cannot occur, due to visit_item override");
+            fail!("cannot occur, due to visit_item override");
         }
 
         // Visit closures as part of the containing item.
@@ -196,7 +196,7 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
     let bccx = this.bccx;
     let tcx = bccx.tcx;
 
-    debug2!("gather_loans_in_expr(expr={:?}/{})",
+    debug!("gather_loans_in_expr(expr={:?}/{})",
            ex.id, pprust::expr_to_str(ex, tcx.sess.intr()));
 
     this.id_range.add(ex.id);
@@ -347,20 +347,20 @@ pub fn pop_repeating_id(&mut self, id: ast::NodeId) {
     pub fn guarantee_adjustments(&mut self,
                                  expr: @ast::Expr,
                                  adjustment: &ty::AutoAdjustment) {
-        debug2!("guarantee_adjustments(expr={}, adjustment={:?})",
+        debug!("guarantee_adjustments(expr={}, adjustment={:?})",
                expr.repr(self.tcx()), adjustment);
         let _i = indenter();
 
         match *adjustment {
             ty::AutoAddEnv(*) => {
-                debug2!("autoaddenv -- no autoref");
+                debug!("autoaddenv -- no autoref");
                 return;
             }
 
             ty::AutoDerefRef(
                 ty::AutoDerefRef {
                     autoref: None, _ }) => {
-                debug2!("no autoref");
+                debug!("no autoref");
                 return;
             }
 
@@ -372,7 +372,7 @@ pub fn guarantee_adjustments(&mut self,
                     tcx: self.tcx(),
                     method_map: self.bccx.method_map};
                 let cmt = mcx.cat_expr_autoderefd(expr, autoderefs);
-                debug2!("after autoderef, cmt={}", cmt.repr(self.tcx()));
+                debug!("after autoderef, cmt={}", cmt.repr(self.tcx()));
 
                 match *autoref {
                     ty::AutoPtr(r, m) => {
@@ -429,7 +429,7 @@ pub fn guarantee_valid(&mut self,
                            cmt: mc::cmt,
                            req_mutbl: LoanMutability,
                            loan_region: ty::Region) {
-        debug2!("guarantee_valid(borrow_id={:?}, cmt={}, \
+        debug!("guarantee_valid(borrow_id={:?}, cmt={}, \
                 req_mutbl={:?}, loan_region={:?})",
                borrow_id,
                cmt.repr(self.tcx()),
@@ -490,13 +490,13 @@ pub fn guarantee_valid(&mut self,
                             format!("Invalid borrow lifetime: {:?}", loan_region));
                     }
                 };
-                debug2!("loan_scope = {:?}", loan_scope);
+                debug!("loan_scope = {:?}", loan_scope);
 
                 let gen_scope = self.compute_gen_scope(borrow_id, loan_scope);
-                debug2!("gen_scope = {:?}", gen_scope);
+                debug!("gen_scope = {:?}", gen_scope);
 
                 let kill_scope = self.compute_kill_scope(loan_scope, loan_path);
-                debug2!("kill_scope = {:?}", kill_scope);
+                debug!("kill_scope = {:?}", kill_scope);
 
                 if req_mutbl == MutableMutability {
                     self.mark_loan_path_as_mutated(loan_path);
@@ -516,7 +516,7 @@ pub fn guarantee_valid(&mut self,
             }
         };
 
-        debug2!("guarantee_valid(borrow_id={:?}), loan={}",
+        debug!("guarantee_valid(borrow_id={:?}), loan={}",
                borrow_id, loan.repr(self.tcx()));
 
         // let loan_path = loan.loan_path;
index 8464c19cb01594443bfe9f30bbfb6e4b28f359df..2722fff12a82864bc2f98322d457982cc902a72e 100644 (file)
@@ -135,7 +135,7 @@ fn borrowck_fn(this: &mut BorrowckCtxt,
 
         &visit::fk_item_fn(*) |
         &visit::fk_method(*) => {
-            debug2!("borrowck_fn(id={:?})", id);
+            debug!("borrowck_fn(id={:?})", id);
 
             // Check the body of fn items.
             let (id_range, all_loans, move_data) =
index 239254e82dd5232b6ccba407aa2ff4bc77761b6e..e031420996789b87e89ed06a2cac0c0c680d99a4 100644 (file)
@@ -244,7 +244,7 @@ pub fn move_path(&mut self,
             }
         };
 
-        debug2!("move_path(lp={}, index={:?})",
+        debug!("move_path(lp={}, index={:?})",
                lp.repr(tcx),
                index);
 
@@ -304,7 +304,7 @@ pub fn add_move(&mut self,
          * location `id` with kind `kind`.
          */
 
-        debug2!("add_move(lp={}, id={:?}, kind={:?})",
+        debug!("add_move(lp={}, id={:?}, kind={:?})",
                lp.repr(tcx),
                id,
                kind);
@@ -334,7 +334,7 @@ pub fn add_assignment(&mut self,
          * location `id` with the given `span`.
          */
 
-        debug2!("add_assignment(lp={}, assign_id={:?}, assignee_id={:?}",
+        debug!("add_assignment(lp={}, assign_id={:?}, assignee_id={:?}",
                lp.repr(tcx), assign_id, assignee_id);
 
         let path_index = self.move_path(tcx, lp);
@@ -348,12 +348,12 @@ pub fn add_assignment(&mut self,
         };
 
         if self.is_var_path(path_index) {
-            debug2!("add_assignment[var](lp={}, assignment={}, path_index={:?})",
+            debug!("add_assignment[var](lp={}, assignment={}, path_index={:?})",
                    lp.repr(tcx), self.var_assignments.len(), path_index);
 
             self.var_assignments.push(assignment);
         } else {
-            debug2!("add_assignment[path](lp={}, path_index={:?})",
+            debug!("add_assignment[path](lp={}, path_index={:?})",
                    lp.repr(tcx), path_index);
 
             self.path_assignments.push(assignment);
index 9e92bd3829c5da59568b98c853f437fc97aed1da..27fbecb59790659e18438ac1863a261f1d8d9f5f 100644 (file)
@@ -239,7 +239,7 @@ fn expr(&mut self, expr: @ast::Expr, pred: CFGIndex) -> CFGIndex {
                 expr_exit
             }
 
-            ast::ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+            ast::ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
             ast::ExprLoop(ref body, _) => {
                 //
index dd624a882839abb9428c85eb46143332d6fb56f0..d12808c3a4dad94880079a71f2b95ad819ff01ea 100644 (file)
@@ -153,7 +153,7 @@ pub fn check_expr(v: &mut CheckCrateVisitor,
               Some(&DefStruct(_)) => { }
 
               Some(&def) => {
-                debug2!("(checking const) found bad def: {:?}", def);
+                debug!("(checking const) found bad def: {:?}", def);
                 sess.span_err(
                     e.span,
                     "paths in constants may only refer to \
@@ -266,7 +266,7 @@ fn visit_expr(&mut self, e: @Expr, _: ()) {
                         ast_map::node_item(it, _) => {
                             self.visit_item(it, ());
                         }
-                        _ => fail2!("const not bound to an item")
+                        _ => fail!("const not bound to an item")
                     },
                 _ => ()
             },
index 2d03b0c778d67fa0f3cc11c411767e37778aaab3..de5e00d241eb1d09ae7cb221277d914564fcf8ca 100644 (file)
@@ -181,14 +181,14 @@ fn check_exhaustive(cx: &MatchCheckCtxt, sp: Span, pats: ~[@Pat]) {
                 ty::ty_enum(id, _) => {
                     let vid = match *ctor {
                         variant(id) => id,
-                        _ => fail2!("check_exhaustive: non-variant ctor"),
+                        _ => fail!("check_exhaustive: non-variant ctor"),
                     };
                     let variants = ty::enum_variants(cx.tcx, id);
 
                     match variants.iter().find(|v| v.id == vid) {
                         Some(v) => Some(cx.tcx.sess.str_of(v.name)),
                         None => {
-                            fail2!("check_exhaustive: bad variant in ctor")
+                            fail!("check_exhaustive: bad variant in ctor")
                         }
                     }
                 }
@@ -409,7 +409,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
                     return Some(variant(v.id));
                 }
             }
-            fail2!();
+            fail!();
         } else { None }
       }
       ty::ty_nil => None,
@@ -421,7 +421,7 @@ fn missing_ctor(cx: &MatchCheckCtxt,
               None => (),
               Some(val(const_bool(true))) => true_found = true,
               Some(val(const_bool(false))) => false_found = true,
-              _ => fail2!("impossible case")
+              _ => fail!("impossible case")
             }
         }
         if true_found && false_found { None }
@@ -511,10 +511,10 @@ fn ctor_arity(cx: &MatchCheckCtxt, ctor: &ctor, ty: ty::t) -> uint {
       ty::ty_box(_) | ty::ty_uniq(_) | ty::ty_rptr(*) => 1u,
       ty::ty_enum(eid, _) => {
           let id = match *ctor { variant(id) => id,
-          _ => fail2!("impossible case") };
+          _ => fail!("impossible case") };
         match ty::enum_variants(cx.tcx, eid).iter().find(|v| v.id == id ) {
             Some(v) => v.args.len(),
-            None => fail2!("impossible case")
+            None => fail!("impossible case")
         }
       }
       ty::ty_struct(cid, _) => ty::lookup_struct_fields(cx.tcx, cid).len(),
@@ -585,7 +585,7 @@ fn specialize(cx: &MatchCheckCtxt,
                                 }
                             }
                             single => true,
-                            _ => fail2!("type error")
+                            _ => fail!("type error")
                         };
                         if match_ {
                             Some(r.tail().to_owned())
@@ -632,7 +632,7 @@ fn specialize(cx: &MatchCheckCtxt,
                                 }
                             }
                             single => true,
-                            _ => fail2!("type error")
+                            _ => fail!("type error")
                         };
                         if match_ {
                             Some(r.tail().to_owned())
@@ -739,7 +739,7 @@ fn specialize(cx: &MatchCheckCtxt,
                         }
                     }
                     single => true,
-                    _ => fail2!("type error")
+                    _ => fail!("type error")
                 };
                 if match_ { Some(r.tail().to_owned()) } else { None }
             }
@@ -748,7 +748,7 @@ fn specialize(cx: &MatchCheckCtxt,
                     val(ref v) => (*v, *v),
                     range(ref lo, ref hi) => (*lo, *hi),
                     single => return Some(r.tail().to_owned()),
-                    _ => fail2!("type error")
+                    _ => fail!("type error")
                 };
                 let v_lo = eval_const_expr(cx.tcx, lo);
                 let v_hi = eval_const_expr(cx.tcx, hi);
index b9355d326637726985783cb2b6955a48cc62e4fb..22fd1d393e9729952f509f0657611585bf9fdd45 100644 (file)
@@ -131,7 +131,7 @@ pub fn new(tcx: ty::ctxt,
                bits_per_id: uint) -> DataFlowContext<O> {
         let words_per_id = (bits_per_id + uint::bits - 1) / uint::bits;
 
-        debug2!("DataFlowContext::new(id_range={:?}, bits_per_id={:?}, words_per_id={:?})",
+        debug!("DataFlowContext::new(id_range={:?}, bits_per_id={:?}, words_per_id={:?})",
                id_range, bits_per_id, words_per_id);
 
         let gens = ~[];
@@ -154,7 +154,7 @@ pub fn new(tcx: ty::ctxt,
     pub fn add_gen(&mut self, id: ast::NodeId, bit: uint) {
         //! Indicates that `id` generates `bit`
 
-        debug2!("add_gen(id={:?}, bit={:?})", id, bit);
+        debug!("add_gen(id={:?}, bit={:?})", id, bit);
         let (start, end) = self.compute_id_range(id);
         {
             let gens = self.gens.mut_slice(start, end);
@@ -165,7 +165,7 @@ pub fn add_gen(&mut self, id: ast::NodeId, bit: uint) {
     pub fn add_kill(&mut self, id: ast::NodeId, bit: uint) {
         //! Indicates that `id` kills `bit`
 
-        debug2!("add_kill(id={:?}, bit={:?})", id, bit);
+        debug!("add_kill(id={:?}, bit={:?})", id, bit);
         let (start, end) = self.compute_id_range(id);
         {
             let kills = self.kills.mut_slice(start, end);
@@ -176,7 +176,7 @@ pub fn add_kill(&mut self, id: ast::NodeId, bit: uint) {
     fn apply_gen_kill(&mut self, id: ast::NodeId, bits: &mut [uint]) {
         //! Applies the gen and kill sets for `id` to `bits`
 
-        debug2!("apply_gen_kill(id={:?}, bits={}) [before]",
+        debug!("apply_gen_kill(id={:?}, bits={}) [before]",
                id, mut_bits_to_str(bits));
         let (start, end) = self.compute_id_range(id);
         let gens = self.gens.slice(start, end);
@@ -184,17 +184,17 @@ fn apply_gen_kill(&mut self, id: ast::NodeId, bits: &mut [uint]) {
         let kills = self.kills.slice(start, end);
         bitwise(bits, kills, |a, b| a & !b);
 
-        debug2!("apply_gen_kill(id={:?}, bits={}) [after]",
+        debug!("apply_gen_kill(id={:?}, bits={}) [after]",
                id, mut_bits_to_str(bits));
     }
 
     fn apply_kill(&mut self, id: ast::NodeId, bits: &mut [uint]) {
-        debug2!("apply_kill(id={:?}, bits={}) [before]",
+        debug!("apply_kill(id={:?}, bits={}) [before]",
                id, mut_bits_to_str(bits));
         let (start, end) = self.compute_id_range(id);
         let kills = self.kills.slice(start, end);
         bitwise(bits, kills, |a, b| a & !b);
-        debug2!("apply_kill(id={:?}, bits={}) [after]",
+        debug!("apply_kill(id={:?}, bits={}) [after]",
                id, mut_bits_to_str(bits));
     }
 
@@ -242,7 +242,7 @@ pub fn each_bit_on_entry_frozen(&self,
         }
         let (start, end) = self.compute_id_range_frozen(id);
         let on_entry = self.on_entry.slice(start, end);
-        debug2!("each_bit_on_entry_frozen(id={:?}, on_entry={})",
+        debug!("each_bit_on_entry_frozen(id={:?}, on_entry={})",
                id, bits_to_str(on_entry));
         self.each_bit(on_entry, f)
     }
@@ -255,7 +255,7 @@ pub fn each_bit_on_entry(&mut self,
 
         let (start, end) = self.compute_id_range(id);
         let on_entry = self.on_entry.slice(start, end);
-        debug2!("each_bit_on_entry(id={:?}, on_entry={})",
+        debug!("each_bit_on_entry(id={:?}, on_entry={})",
                id, bits_to_str(on_entry));
         self.each_bit(on_entry, f)
     }
@@ -267,7 +267,7 @@ pub fn each_gen_bit(&mut self,
 
         let (start, end) = self.compute_id_range(id);
         let gens = self.gens.slice(start, end);
-        debug2!("each_gen_bit(id={:?}, gens={})",
+        debug!("each_gen_bit(id={:?}, gens={})",
                id, bits_to_str(gens));
         self.each_bit(gens, f)
     }
@@ -281,7 +281,7 @@ pub fn each_gen_bit_frozen(&self,
         }
         let (start, end) = self.compute_id_range_frozen(id);
         let gens = self.gens.slice(start, end);
-        debug2!("each_gen_bit(id={:?}, gens={})",
+        debug!("each_gen_bit(id={:?}, gens={})",
                id, bits_to_str(gens));
         self.each_bit(gens, f)
     }
@@ -346,8 +346,8 @@ pub fn propagate(&mut self, blk: &ast::Block) {
             }
         }
 
-        debug2!("Dataflow result:");
-        debug2!("{}", {
+        debug!("Dataflow result:");
+        debug!("{}", {
             let this = @(*self).clone();
             this.pretty_print_to(io::stderr(), blk);
             ""
@@ -374,7 +374,7 @@ fn walk_block(&mut self,
                   blk: &ast::Block,
                   in_out: &mut [uint],
                   loop_scopes: &mut ~[LoopScope]) {
-        debug2!("DataFlowContext::walk_block(blk.id={:?}, in_out={})",
+        debug!("DataFlowContext::walk_block(blk.id={:?}, in_out={})",
                blk.id, bits_to_str(reslice(in_out)));
 
         self.merge_with_entry_set(blk.id, in_out);
@@ -425,7 +425,7 @@ fn walk_expr(&mut self,
                  expr: &ast::Expr,
                  in_out: &mut [uint],
                  loop_scopes: &mut ~[LoopScope]) {
-        debug2!("DataFlowContext::walk_expr(expr={}, in_out={})",
+        debug!("DataFlowContext::walk_expr(expr={}, in_out={})",
                expr.repr(self.dfcx.tcx), bits_to_str(reslice(in_out)));
 
         self.merge_with_entry_set(expr.id, in_out);
@@ -569,7 +569,7 @@ fn walk_expr(&mut self,
                 copy_bits(new_loop_scope.break_bits, in_out);
             }
 
-            ast::ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+            ast::ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
             ast::ExprLoop(ref blk, _) => {
                 //
@@ -756,7 +756,7 @@ fn pop_scopes(&mut self,
         let tcx = self.tcx();
         let region_maps = tcx.region_maps;
 
-        debug2!("pop_scopes(from_expr={}, to_scope={:?}, in_out={})",
+        debug!("pop_scopes(from_expr={}, to_scope={:?}, in_out={})",
                from_expr.repr(tcx), to_scope.loop_id,
                bits_to_str(reslice(in_out)));
 
@@ -784,7 +784,7 @@ fn break_from_to(&mut self,
         self.pop_scopes(from_expr, to_scope, in_out);
         self.dfcx.apply_kill(from_expr.id, in_out);
         join_bits(&self.dfcx.oper, reslice(in_out), to_scope.break_bits);
-        debug2!("break_from_to(from_expr={}, to_scope={:?}) final break_bits={}",
+        debug!("break_from_to(from_expr={}, to_scope={:?}) final break_bits={}",
                from_expr.repr(self.tcx()),
                to_scope.loop_id,
                bits_to_str(reslice(in_out)));
@@ -833,11 +833,11 @@ fn walk_pat(&mut self,
                 pat: @ast::Pat,
                 in_out: &mut [uint],
                 _loop_scopes: &mut ~[LoopScope]) {
-        debug2!("DataFlowContext::walk_pat(pat={}, in_out={})",
+        debug!("DataFlowContext::walk_pat(pat={}, in_out={})",
                pat.repr(self.dfcx.tcx), bits_to_str(reslice(in_out)));
 
         do ast_util::walk_pat(pat) |p| {
-            debug2!("  p.id={:?} in_out={}", p.id, bits_to_str(reslice(in_out)));
+            debug!("  p.id={:?} in_out={}", p.id, bits_to_str(reslice(in_out)));
             self.merge_with_entry_set(p.id, in_out);
             self.dfcx.apply_gen_kill(p.id, in_out);
             true
@@ -909,7 +909,7 @@ fn reset(&mut self, bits: &mut [uint]) {
     }
 
     fn add_to_entry_set(&mut self, id: ast::NodeId, pred_bits: &[uint]) {
-        debug2!("add_to_entry_set(id={:?}, pred_bits={})",
+        debug!("add_to_entry_set(id={:?}, pred_bits={})",
                id, bits_to_str(pred_bits));
         let (start, end) = self.dfcx.compute_id_range(id);
         let changed = { // FIXME(#5074) awkward construction
@@ -917,7 +917,7 @@ fn add_to_entry_set(&mut self, id: ast::NodeId, pred_bits: &[uint]) {
             join_bits(&self.dfcx.oper, pred_bits, on_entry)
         };
         if changed {
-            debug2!("changed entry set for {:?} to {}",
+            debug!("changed entry set for {:?} to {}",
                    id, bits_to_str(self.dfcx.on_entry.slice(start, end)));
             self.changed = true;
         }
@@ -926,7 +926,7 @@ fn add_to_entry_set(&mut self, id: ast::NodeId, pred_bits: &[uint]) {
     fn merge_with_entry_set(&mut self,
                             id: ast::NodeId,
                             pred_bits: &mut [uint]) {
-        debug2!("merge_with_entry_set(id={:?}, pred_bits={})",
+        debug!("merge_with_entry_set(id={:?}, pred_bits={})",
                id, mut_bits_to_str(pred_bits));
         let (start, end) = self.dfcx.compute_id_range(id);
         let changed = { // FIXME(#5074) awkward construction
@@ -936,7 +936,7 @@ fn merge_with_entry_set(&mut self,
             changed
         };
         if changed {
-            debug2!("changed entry set for {:?} to {}",
+            debug!("changed entry set for {:?} to {}",
                    id, bits_to_str(self.dfcx.on_entry.slice(start, end)));
             self.changed = true;
         }
@@ -992,12 +992,12 @@ fn bitwise(out_vec: &mut [uint],
 }
 
 fn set_bit(words: &mut [uint], bit: uint) -> bool {
-    debug2!("set_bit: words={} bit={}",
+    debug!("set_bit: words={} bit={}",
            mut_bits_to_str(words), bit_str(bit));
     let word = bit / uint::bits;
     let bit_in_word = bit % uint::bits;
     let bit_mask = 1 << bit_in_word;
-    debug2!("word={} bit_in_word={} bit_mask={}", word, bit_in_word, word);
+    debug!("word={} bit_in_word={} bit_mask={}", word, bit_in_word, word);
     let oldv = words[word];
     let newv = oldv | bit_mask;
     words[word] = newv;
index 8cc4c23bd1c702a81746756c79b1e54d61008348..c0ac48bfee8cf2444643f5b3fce4d72c4c8d5bfa 100644 (file)
@@ -55,7 +55,7 @@ fn require_unsafe(&mut self, span: Span, description: &str) {
             }
             UnsafeBlock(block_id) => {
                 // OK, but record this.
-                debug2!("effect: recording unsafe block as used: {:?}", block_id);
+                debug!("effect: recording unsafe block as used: {:?}", block_id);
                 let _ = self.tcx.used_unsafe.insert(block_id);
             }
             UnsafeFn => {}
@@ -67,7 +67,7 @@ fn check_str_index(&mut self, e: @ast::Expr) {
             ast::ExprIndex(_, base, _) => ty::node_id_to_type(self.tcx, base.id),
             _ => return
         };
-        debug2!("effect: checking index with base type {}",
+        debug!("effect: checking index with base type {}",
                 ppaux::ty_to_str(self.tcx, base_type));
         match ty::get(base_type).sty {
             ty::ty_estr(*) => {
@@ -121,7 +121,7 @@ fn visit_expr(&mut self, expr: @ast::Expr, _:()) {
         match expr.node {
             ast::ExprMethodCall(callee_id, _, _, _, _, _) => {
                 let base_type = ty::node_id_to_type(self.tcx, callee_id);
-                debug2!("effect: method call case, base type is {}",
+                debug!("effect: method call case, base type is {}",
                        ppaux::ty_to_str(self.tcx, base_type));
                 if type_is_unsafe_function(base_type) {
                     self.require_unsafe(expr.span,
@@ -130,7 +130,7 @@ fn visit_expr(&mut self, expr: @ast::Expr, _:()) {
             }
             ast::ExprCall(base, _, _) => {
                 let base_type = ty::node_id_to_type(self.tcx, base.id);
-                debug2!("effect: call case, base type is {}",
+                debug!("effect: call case, base type is {}",
                        ppaux::ty_to_str(self.tcx, base_type));
                 if type_is_unsafe_function(base_type) {
                     self.require_unsafe(expr.span, "call to unsafe function")
@@ -138,7 +138,7 @@ fn visit_expr(&mut self, expr: @ast::Expr, _:()) {
             }
             ast::ExprUnary(_, ast::UnDeref, base) => {
                 let base_type = ty::node_id_to_type(self.tcx, base.id);
-                debug2!("effect: unary case, base type is {}",
+                debug!("effect: unary case, base type is {}",
                         ppaux::ty_to_str(self.tcx, base_type));
                 match ty::get(base_type).sty {
                     ty::ty_ptr(_) => {
index 383c37952d7a7984252a6f8fd3347d44ee7abfa5..9aaddab69a1078bf91e5562ce6906f8bab1f92cf 100644 (file)
@@ -53,7 +53,7 @@ fn visit_expr(&mut self, expr:@ast::Expr, depth:int) {
               ast::ExprPath(*) | ast::ExprSelf => {
                   let mut i = 0;
                   match self.def_map.find(&expr.id) {
-                    None => fail2!("path not found"),
+                    None => fail!("path not found"),
                     Some(&df) => {
                       let mut def = df;
                       while i < depth {
@@ -137,7 +137,7 @@ pub fn annotate_freevars(def_map: resolve::DefMap, crate: &ast::Crate) ->
 
 pub fn get_freevars(tcx: ty::ctxt, fid: ast::NodeId) -> freevar_info {
     match tcx.freevars.find(&fid) {
-      None => fail2!("get_freevars: {} has no freevars", fid),
+      None => fail!("get_freevars: {} has no freevars", fid),
       Some(&d) => return d
     }
 }
index 98912b57572a61abf68f8be73bd909a7b498b1d3..87dce84d23dc5bf05fed3e37804cb981c7018948 100644 (file)
@@ -343,7 +343,7 @@ fn test_adjacent_edges<N:Eq,E:Eq>(graph: &Graph<N,E>,
         do graph.each_incoming_edge(start_index) |edge_index, edge| {
             assert_eq!(graph.edge_data(edge_index), &edge.data);
             assert!(counter < expected_incoming.len());
-            debug2!("counter={:?} expected={:?} edge_index={:?} edge={:?}",
+            debug!("counter={:?} expected={:?} edge_index={:?} edge={:?}",
                    counter, expected_incoming[counter], edge_index, edge);
             match expected_incoming[counter] {
                 (ref e, ref n) => {
@@ -361,7 +361,7 @@ fn test_adjacent_edges<N:Eq,E:Eq>(graph: &Graph<N,E>,
         do graph.each_outgoing_edge(start_index) |edge_index, edge| {
             assert_eq!(graph.edge_data(edge_index), &edge.data);
             assert!(counter < expected_outgoing.len());
-            debug2!("counter={:?} expected={:?} edge_index={:?} edge={:?}",
+            debug!("counter={:?} expected={:?} edge_index={:?} edge={:?}",
                    counter, expected_outgoing[counter], edge_index, edge);
             match expected_outgoing[counter] {
                 (ref e, ref n) => {
index b20cb8ed809b95de49c56a6cf29c88b0b9823aab..5737039f83c3556a5e387023f7e7a2ed6572e2c5 100644 (file)
@@ -124,7 +124,7 @@ fn check_impl_of_trait(cx: &mut Context, it: @item, trait_ref: &trait_ref, self_
 
     // If this trait has builtin-kind supertraits, meet them.
     let self_ty: ty::t = ty::node_id_to_type(cx.tcx, it.id);
-    debug2!("checking impl with self type {:?}", ty::get(self_ty).sty);
+    debug!("checking impl with self type {:?}", ty::get(self_ty).sty);
     do check_builtin_bounds(cx, self_ty, trait_def.bounds) |missing| {
         cx.tcx.sess.span_err(self_type.span,
             format!("the type `{}', which does not fulfill `{}`, cannot implement this \
@@ -265,7 +265,7 @@ fn check_fn(
 }
 
 pub fn check_expr(cx: &mut Context, e: @Expr) {
-    debug2!("kind::check_expr({})", expr_to_str(e, cx.tcx.sess.intr()));
+    debug!("kind::check_expr({})", expr_to_str(e, cx.tcx.sess.intr()));
 
     // Handle any kind bounds on type parameters
     let type_parameter_id = match e.get_callee_id() {
@@ -292,7 +292,7 @@ pub fn check_expr(cx: &mut Context, e: @Expr) {
             };
             if ts.len() != type_param_defs.len() {
                 // Fail earlier to make debugging easier
-                fail2!("internal error: in kind::check_expr, length \
+                fail!("internal error: in kind::check_expr, length \
                       mismatch between actual and declared bounds: actual = \
                       {}, declared = {}",
                       ts.repr(cx.tcx),
@@ -451,7 +451,7 @@ fn check_imm_free_var(cx: &Context, def: Def, sp: Span) {
 }
 
 fn check_copy(cx: &Context, ty: ty::t, sp: Span, reason: &str) {
-    debug2!("type_contents({})={}",
+    debug!("type_contents({})={}",
            ty_to_str(cx.tcx, ty),
            ty::type_contents(cx.tcx, ty).to_str());
     if ty::type_moves_by_default(cx.tcx, ty) {
index 8b21ce320243234a8340c55673ae1b76f94879fe..b0cdd53de922c82347f23501266c9c8f5cf21188 100644 (file)
@@ -359,7 +359,7 @@ fn lint_to_str(&self, lint: lint) -> &'static str {
                 return *k;
             }
         }
-        fail2!("unregistered lint {:?}", lint);
+        fail!("unregistered lint {:?}", lint);
     }
 
     fn span_lint(&self, lint: lint, span: Span, msg: &str) {
@@ -380,7 +380,7 @@ fn span_lint(&self, lint: lint, span: Span, msg: &str) {
                 format!("{} [-{} {}]", msg,
                     match level {
                         warn => 'W', deny => 'D', forbid => 'F',
-                        allow => fail2!()
+                        allow => fail!()
                     }, self.lint_to_str(lint).replace("_", "-"))
             },
             Node(src) => {
@@ -391,7 +391,7 @@ fn span_lint(&self, lint: lint, span: Span, msg: &str) {
         match level {
             warn =>          { self.tcx.sess.span_warn(span, msg); }
             deny | forbid => { self.tcx.sess.span_err(span, msg);  }
-            allow => fail2!(),
+            allow => fail!(),
         }
 
         for &span in note.iter() {
@@ -526,7 +526,7 @@ fn is_valid<T:cmp::Ord>(binop: ast::BinOp, v: T,
             ast::BiGt => v >= min,
             ast::BiGe => v > min,
             ast::BiEq | ast::BiNe => v >= min && v <= max,
-            _ => fail2!()
+            _ => fail!()
         }
     }
 
@@ -582,7 +582,7 @@ fn check_limits(tcx: ty::ctxt, binop: ast::BinOp,
                         ast::lit_int_unsuffixed(v) => v,
                         _ => return true
                     },
-                    _ => fail2!()
+                    _ => fail!()
                 };
                 is_valid(norm_binop, lit_val, min, max)
             }
@@ -595,7 +595,7 @@ fn check_limits(tcx: ty::ctxt, binop: ast::BinOp,
                         ast::lit_int_unsuffixed(v) => v as u64,
                         _ => return true
                     },
-                    _ => fail2!()
+                    _ => fail!()
                 };
                 is_valid(norm_binop, lit_val, min, max)
             }
index 824dbb5b561064a71dab162d7a5a36b09e32164c..6c53fc1602f237a8fa5c71a6955d4e0783fa0a57 100644 (file)
@@ -276,7 +276,7 @@ pub fn add_live_node(&mut self, lnk: LiveNodeKind) -> LiveNode {
         self.lnks.push(lnk);
         self.num_live_nodes += 1;
 
-        debug2!("{} is of kind {}", ln.to_str(),
+        debug!("{} is of kind {}", ln.to_str(),
                live_node_kind_to_str(lnk, self.tcx));
 
         ln
@@ -288,7 +288,7 @@ pub fn add_live_node_for_node(&mut self,
         let ln = self.add_live_node(lnk);
         self.live_node_map.insert(node_id, ln);
 
-        debug2!("{} is node {}", ln.to_str(), node_id);
+        debug!("{} is node {}", ln.to_str(), node_id);
     }
 
     pub fn add_variable(&mut self, vk: VarKind) -> Variable {
@@ -303,7 +303,7 @@ pub fn add_variable(&mut self, vk: VarKind) -> Variable {
             ImplicitRet => {}
         }
 
-        debug2!("{} is {:?}", v.to_str(), vk);
+        debug!("{} is {:?}", v.to_str(), vk);
 
         v
     }
@@ -367,7 +367,7 @@ fn visit_fn(v: &mut LivenessVisitor,
             sp: Span,
             id: NodeId,
             this: @mut IrMaps) {
-    debug2!("visit_fn: id={}", id);
+    debug!("visit_fn: id={}", id);
     let _i = ::util::common::indenter();
 
     // swap in a new set of IR maps for this function body:
@@ -376,13 +376,13 @@ fn visit_fn(v: &mut LivenessVisitor,
                               this.capture_map);
 
     unsafe {
-        debug2!("creating fn_maps: {}", transmute::<&IrMaps, *IrMaps>(fn_maps));
+        debug!("creating fn_maps: {}", transmute::<&IrMaps, *IrMaps>(fn_maps));
     }
 
     for arg in decl.inputs.iter() {
         do pat_util::pat_bindings(this.tcx.def_map, arg.pat)
                 |_bm, arg_id, _x, path| {
-            debug2!("adding argument {}", arg_id);
+            debug!("adding argument {}", arg_id);
             let ident = ast_util::path_to_ident(path);
             fn_maps.add_variable(Arg(arg_id, ident));
         }
@@ -429,7 +429,7 @@ fn visit_fn(v: &mut LivenessVisitor,
 fn visit_local(v: &mut LivenessVisitor, local: @Local, this: @mut IrMaps) {
     let def_map = this.tcx.def_map;
     do pat_util::pat_bindings(def_map, local.pat) |_bm, p_id, sp, path| {
-        debug2!("adding local variable {}", p_id);
+        debug!("adding local variable {}", p_id);
         let name = ast_util::path_to_ident(path);
         this.add_live_node_for_node(p_id, VarDefNode(sp));
         let kind = match local.init {
@@ -450,7 +450,7 @@ fn visit_arm(v: &mut LivenessVisitor, arm: &Arm, this: @mut IrMaps) {
     let def_map = this.tcx.def_map;
     for pat in arm.pats.iter() {
         do pat_util::pat_bindings(def_map, *pat) |bm, p_id, sp, path| {
-            debug2!("adding local variable {} from match with bm {:?}",
+            debug!("adding local variable {} from match with bm {:?}",
                    p_id, bm);
             let name = ast_util::path_to_ident(path);
             this.add_live_node_for_node(p_id, VarDefNode(sp));
@@ -470,7 +470,7 @@ fn visit_expr(v: &mut LivenessVisitor, expr: @Expr, this: @mut IrMaps) {
       // live nodes required for uses or definitions of variables:
       ExprPath(_) | ExprSelf => {
         let def = this.tcx.def_map.get_copy(&expr.id);
-        debug2!("expr {}: path that leads to {:?}", expr.id, def);
+        debug!("expr {}: path that leads to {:?}", expr.id, def);
         if moves::moved_variable_node_id_from_def(def).is_some() {
             this.add_live_node_for_node(expr.id, ExprNode(expr.span));
         }
@@ -515,7 +515,7 @@ fn visit_expr(v: &mut LivenessVisitor, expr: @Expr, this: @mut IrMaps) {
         this.add_live_node_for_node(expr.id, ExprNode(expr.span));
         visit::walk_expr(v, expr, this);
       }
-      ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+      ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
       ExprBinary(_, op, _, _) if ast_util::lazy_binop(op) => {
         this.add_live_node_for_node(expr.id, ExprNode(expr.span));
         visit::walk_expr(v, expr, this);
@@ -819,7 +819,7 @@ pub fn init_from_succ(&self, ln: LiveNode, succ_ln: LiveNode) {
         self.indices2(ln, succ_ln, |idx, succ_idx| {
             self.users[idx] = self.users[succ_idx]
         });
-        debug2!("init_from_succ(ln={}, succ={})",
+        debug!("init_from_succ(ln={}, succ={})",
                self.ln_str(ln), self.ln_str(succ_ln));
     }
 
@@ -843,7 +843,7 @@ pub fn merge_from_succ(&self,
             }
         }
 
-        debug2!("merge_from_succ(ln={}, succ={}, first_merge={}, changed={})",
+        debug!("merge_from_succ(ln={}, succ={}, first_merge={}, changed={})",
                ln.to_str(), self.ln_str(succ_ln), first_merge, changed);
         return changed;
 
@@ -866,7 +866,7 @@ pub fn define(&self, writer: LiveNode, var: Variable) {
         self.users[idx].reader = invalid_node();
         self.users[idx].writer = invalid_node();
 
-        debug2!("{} defines {} (idx={}): {}", writer.to_str(), var.to_str(),
+        debug!("{} defines {} (idx={}): {}", writer.to_str(), var.to_str(),
                idx, self.ln_str(writer));
     }
 
@@ -891,7 +891,7 @@ pub fn acc(&self, ln: LiveNode, var: Variable, acc: uint) {
             user.used = true;
         }
 
-        debug2!("{} accesses[{:x}] {}: {}",
+        debug!("{} accesses[{:x}] {}: {}",
                ln.to_str(), acc, var.to_str(), self.ln_str(ln));
     }
 
@@ -902,18 +902,18 @@ pub fn compute(&self, decl: &fn_decl, body: &Block) -> LiveNode {
         // effectively a return---this only occurs in `for` loops,
         // where the body is really a closure.
 
-        debug2!("compute: using id for block, {}", block_to_str(body,
+        debug!("compute: using id for block, {}", block_to_str(body,
                       self.tcx.sess.intr()));
 
         let entry_ln: LiveNode =
             self.with_loop_nodes(body.id, self.s.exit_ln, self.s.exit_ln,
               || { self.propagate_through_fn_block(decl, body) });
 
-        // hack to skip the loop unless debug2! is enabled:
-        debug2!("^^ liveness computation results for body {} (entry={})",
+        // hack to skip the loop unless debug! is enabled:
+        debug!("^^ liveness computation results for body {} (entry={})",
                {
                    for ln_idx in range(0u, self.ir.num_live_nodes) {
-                       debug2!("{}", self.ln_str(LiveNode(ln_idx)));
+                       debug!("{}", self.ln_str(LiveNode(ln_idx)));
                    }
                    body.id
                },
@@ -1007,7 +1007,7 @@ pub fn propagate_through_opt_expr(&self,
 
     pub fn propagate_through_expr(&self, expr: @Expr, succ: LiveNode)
                                   -> LiveNode {
-        debug2!("propagate_through_expr: {}",
+        debug!("propagate_through_expr: {}",
              expr_to_str(expr, self.tcx.sess.intr()));
 
         match expr.node {
@@ -1022,7 +1022,7 @@ pub fn propagate_through_expr(&self, expr: @Expr, succ: LiveNode)
           }
 
           ExprFnBlock(_, ref blk) => {
-              debug2!("{} is an expr_fn_block",
+              debug!("{} is an expr_fn_block",
                    expr_to_str(expr, self.tcx.sess.intr()));
 
               /*
@@ -1070,7 +1070,7 @@ pub fn propagate_through_expr(&self, expr: @Expr, succ: LiveNode)
             self.propagate_through_loop(expr, Some(cond), blk, succ)
           }
 
-          ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+          ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
           // Note that labels have been resolved, so we don't need to look
           // at the label ident
@@ -1382,7 +1382,7 @@ pub fn propagate_through_loop(&self,
             self.merge_from_succ(ln, succ, first_merge);
             first_merge = false;
         }
-        debug2!("propagate_through_loop: using id for loop body {} {}",
+        debug!("propagate_through_loop: using id for loop body {} {}",
                expr.id, block_to_str(body, self.tcx.sess.intr()));
 
         let cond_ln = self.propagate_through_opt_expr(cond, ln);
@@ -1410,7 +1410,7 @@ pub fn with_loop_nodes<R>(&self,
                               cont_ln: LiveNode,
                               f: &fn() -> R)
                               -> R {
-      debug2!("with_loop_nodes: {} {}", loop_node_id, *break_ln);
+      debug!("with_loop_nodes: {} {}", loop_node_id, *break_ln);
         self.loop_scope.push(loop_node_id);
         self.break_ln.insert(loop_node_id, break_ln);
         self.cont_ln.insert(loop_node_id, cont_ln);
@@ -1433,7 +1433,7 @@ fn check_local(this: &mut Liveness, local: @Local) {
         // No initializer: the variable might be unused; if not, it
         // should not be live at this point.
 
-        debug2!("check_local() with no initializer");
+        debug!("check_local() with no initializer");
         do this.pat_bindings(local.pat) |ln, var, sp, id| {
             if !this.warn_about_unused(sp, id, ln, var) {
                 match this.live_on_exit(ln, var) {
@@ -1499,7 +1499,7 @@ fn check_expr(this: &mut Liveness, expr: @Expr) {
       ExprParen(*) | ExprFnBlock(*) | ExprPath(*) | ExprSelf(*) => {
         visit::walk_expr(this, expr, ());
       }
-      ExprForLoop(*) => fail2!("non-desugared expr_for_loop")
+      ExprForLoop(*) => fail!("non-desugared expr_for_loop")
     }
 }
 
index 3b8ea2c33ec90ab6d4a12e25cecbec992873329e..37e89e58fa5696dfce734ce5388d64fbec9021f3 100644 (file)
@@ -383,7 +383,7 @@ pub fn cat_expr_autoderefd(&self, expr: @ast::Expr, autoderefs: uint)
     }
 
     pub fn cat_expr_unadjusted(&self, expr: @ast::Expr) -> cmt {
-        debug2!("cat_expr: id={} expr={}",
+        debug!("cat_expr: id={} expr={}",
                expr.id, pprust::expr_to_str(expr, self.tcx.sess.intr()));
 
         let expr_ty = self.expr_ty(expr);
@@ -436,7 +436,7 @@ pub fn cat_expr_unadjusted(&self, expr: @ast::Expr) -> cmt {
             return self.cat_rvalue_node(expr, expr_ty);
           }
 
-          ast::ExprForLoop(*) => fail2!("non-desugared expr_for_loop")
+          ast::ExprForLoop(*) => fail!("non-desugared expr_for_loop")
         }
     }
 
@@ -870,7 +870,7 @@ pub fn cat_pattern(&self,
         // get the type of the *subpattern* and use that.
 
         let tcx = self.tcx;
-        debug2!("cat_pattern: id={} pat={} cmt={}",
+        debug!("cat_pattern: id={} pat={} cmt={}",
                pat.id, pprust::pat_to_str(pat, tcx.sess.intr()),
                cmt.repr(tcx));
         let _i = indenter();
index 71d0621fc16aefdd8e40390bc5682d2f30833efb..1ed517c951293078abe028f9253d7c39b1bad188 100644 (file)
@@ -275,7 +275,7 @@ pub fn consume_expr(&mut self, expr: @Expr) {
          * meaning either copied or moved depending on its type.
          */
 
-        debug2!("consume_expr(expr={})",
+        debug!("consume_expr(expr={})",
                expr.repr(self.tcx));
 
         let expr_ty = ty::expr_ty_adjusted(self.tcx, expr);
@@ -293,7 +293,7 @@ pub fn consume_block(&mut self, blk: &Block) {
          * meaning either copied or moved depending on its type.
          */
 
-        debug2!("consume_block(blk.id={:?})", blk.id);
+        debug!("consume_block(blk.id={:?})", blk.id);
 
         for stmt in blk.stmts.iter() {
             self.visit_stmt(*stmt, ());
@@ -312,7 +312,7 @@ pub fn use_expr(&mut self,
          * in turn trigger calls to the subcomponents of `expr`.
          */
 
-        debug2!("use_expr(expr={}, mode={:?})",
+        debug!("use_expr(expr={}, mode={:?})",
                expr.repr(self.tcx),
                expr_mode);
 
@@ -326,7 +326,7 @@ pub fn use_expr(&mut self,
             _ => expr_mode
         };
 
-        debug2!("comp_mode = {:?}", comp_mode);
+        debug!("comp_mode = {:?}", comp_mode);
 
         match expr.node {
             ExprPath(*) | ExprSelf => {
@@ -500,7 +500,7 @@ fn has_dtor(tcx: ty::ctxt, ty: ty::t) -> bool {
                 self.consume_block(blk);
             }
 
-            ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+            ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
             ExprUnary(_, _, lhs) => {
                 if !self.use_overloaded_operator(expr, lhs, [])
@@ -620,7 +620,7 @@ pub fn use_pat(&mut self, pat: @Pat) {
                 BindByRef(_) => false,
                 BindInfer => {
                     let pat_ty = ty::node_id_to_type(self.tcx, id);
-                    debug2!("pattern {:?} {} type is {}",
+                    debug!("pattern {:?} {} type is {}",
                            id,
                            ast_util::path_to_ident(path).repr(self.tcx),
                            pat_ty.repr(self.tcx));
@@ -628,7 +628,7 @@ pub fn use_pat(&mut self, pat: @Pat) {
                 }
             };
 
-            debug2!("pattern binding {:?}: bm={:?}, binding_moves={}",
+            debug!("pattern binding {:?}: bm={:?}, binding_moves={}",
                    id, bm, binding_moves);
 
             if binding_moves {
@@ -678,7 +678,7 @@ pub fn arms_have_by_move_bindings(&mut self,
     }
 
     pub fn compute_captures(&mut self, fn_expr_id: NodeId) -> @[CaptureVar] {
-        debug2!("compute_capture_vars(fn_expr_id={:?})", fn_expr_id);
+        debug!("compute_capture_vars(fn_expr_id={:?})", fn_expr_id);
         let _indenter = indenter();
 
         let fn_ty = ty::node_id_to_type(self.tcx, fn_expr_id);
@@ -696,7 +696,7 @@ pub fn compute_captures(&mut self, fn_expr_id: NodeId) -> @[CaptureVar] {
                 let fvar = &freevars[i];
                 let fvar_def_id = ast_util::def_id_of_def(fvar.def).node;
                 let fvar_ty = ty::node_id_to_type(self.tcx, fvar_def_id);
-                debug2!("fvar_def_id={:?} fvar_ty={}",
+                debug!("fvar_def_id={:?} fvar_ty={}",
                        fvar_def_id, ppaux::ty_to_str(self.tcx, fvar_ty));
                 let mode = if ty::type_moves_by_default(self.tcx, fvar_ty) {
                     CapMove
index c502dac7db01ecd0d79d7d07e54f873bcee33f99..17aab59828981b3bf41bbc2b06d674f1eaa27909 100644 (file)
@@ -192,7 +192,7 @@ fn visit_item(&mut self, item: @ast::item, _: ()) {
             // Trait implementation methods are all completely public
             ast::item_impl(_, Some(*), _, ref methods) => {
                 for method in methods.iter() {
-                    debug2!("exporting: {}", method.id);
+                    debug!("exporting: {}", method.id);
                     self.exported_items.insert(method.id);
                 }
             }
@@ -203,11 +203,11 @@ fn visit_item(&mut self, item: @ast::item, _: ()) {
                 for method in methods.iter() {
                     match *method {
                         ast::provided(ref m) => {
-                            debug2!("provided {}", m.id);
+                            debug!("provided {}", m.id);
                             self.exported_items.insert(m.id);
                         }
                         ast::required(ref m) => {
-                            debug2!("required {}", m.id);
+                            debug!("required {}", m.id);
                             self.exported_items.insert(m.id);
                         }
                     }
@@ -267,26 +267,26 @@ fn nodestr(&self, id: ast::NodeId) -> ~str {
     fn def_privacy(&self, did: ast::DefId) -> PrivacyResult {
         if !is_local(did) {
             if self.external_exports.contains(&did) {
-                debug2!("privacy - {:?} was externally exported", did);
+                debug!("privacy - {:?} was externally exported", did);
                 return Allowable;
             }
-            debug2!("privacy - is {:?} a public method", did);
+            debug!("privacy - is {:?} a public method", did);
             return match self.tcx.methods.find(&did) {
                 Some(meth) => {
-                    debug2!("privacy - well at least it's a method: {:?}", meth);
+                    debug!("privacy - well at least it's a method: {:?}", meth);
                     match meth.container {
                         ty::TraitContainer(id) => {
-                            debug2!("privacy - recursing on trait {:?}", id);
+                            debug!("privacy - recursing on trait {:?}", id);
                             self.def_privacy(id)
                         }
                         ty::ImplContainer(id) => {
                             match ty::impl_trait_ref(self.tcx, id) {
                                 Some(t) => {
-                                    debug2!("privacy - impl of trait {:?}", id);
+                                    debug!("privacy - impl of trait {:?}", id);
                                     self.def_privacy(t.def_id)
                                 }
                                 None => {
-                                    debug2!("privacy - found a method {:?}",
+                                    debug!("privacy - found a method {:?}",
                                             meth.vis);
                                     if meth.vis == ast::public {
                                         Allowable
@@ -299,19 +299,19 @@ fn def_privacy(&self, did: ast::DefId) -> PrivacyResult {
                     }
                 }
                 None => {
-                    debug2!("privacy - nope, not even a method");
+                    debug!("privacy - nope, not even a method");
                     ExternallyDenied
                 }
             };
         } else if self.exported_items.contains(&did.node) {
-            debug2!("privacy - exported item {}", self.nodestr(did.node));
+            debug!("privacy - exported item {}", self.nodestr(did.node));
             return Allowable;
         }
 
-        debug2!("privacy - local {:?} not public all the way down", did);
+        debug!("privacy - local {:?} not public all the way down", did);
         // return quickly for things in the same module
         if self.parents.find(&did.node) == self.parents.find(&self.curitem) {
-            debug2!("privacy - same parent, we're done here");
+            debug!("privacy - same parent, we're done here");
             return Allowable;
         }
 
@@ -319,7 +319,7 @@ fn def_privacy(&self, did: ast::DefId) -> PrivacyResult {
         // destination and the root.
         let mut closest_private_id = did.node;
         loop {
-            debug2!("privacy - examining {}", self.nodestr(closest_private_id));
+            debug!("privacy - examining {}", self.nodestr(closest_private_id));
             let vis = match self.tcx.items.find(&closest_private_id) {
                 Some(&ast_map::node_item(it, _)) => it.vis,
                 Some(&ast_map::node_method(ref m, _, _)) => m.vis,
@@ -339,7 +339,7 @@ fn def_privacy(&self, did: ast::DefId) -> PrivacyResult {
             // way down in the first place...
             assert!(closest_private_id != ast::DUMMY_NODE_ID);
         }
-        debug2!("privacy - closest priv {}", self.nodestr(closest_private_id));
+        debug!("privacy - closest priv {}", self.nodestr(closest_private_id));
         if self.private_accessible(closest_private_id) {
             Allowable
         } else {
@@ -352,7 +352,7 @@ fn def_privacy(&self, did: ast::DefId) -> PrivacyResult {
     /// inside.
     fn private_accessible(&self, id: ast::NodeId) -> bool {
         let parent = *self.parents.get(&id);
-        debug2!("privacy - accessible parent {}", self.nodestr(parent));
+        debug!("privacy - accessible parent {}", self.nodestr(parent));
 
         // After finding `did`'s closest private member, we roll ourselves back
         // to see if this private member's parent is anywhere in our ancestry.
@@ -360,7 +360,7 @@ fn private_accessible(&self, id: ast::NodeId) -> bool {
         // members, so that's why we test the parent, and not the did itself.
         let mut cur = self.curitem;
         loop {
-            debug2!("privacy - questioning {}", self.nodestr(cur));
+            debug!("privacy - questioning {}", self.nodestr(cur));
             match cur {
                 // If the relevant parent is in our history, then we're allowed
                 // to look inside any of our ancestor's immediate private items,
@@ -458,7 +458,7 @@ fn check_static_method(&mut self, span: Span, method_id: ast::DefId,
 
     // Checks that a path is in scope.
     fn check_path(&mut self, span: Span, path_id: ast::NodeId, path: &ast::Path) {
-        debug2!("privacy - path {}", self.nodestr(path_id));
+        debug!("privacy - path {}", self.nodestr(path_id));
         let def = self.tcx.def_map.get_copy(&path_id);
         let ck = |tyname: &str| {
             let origdid = def_id_of_def(def);
@@ -703,7 +703,7 @@ fn visit_expr(&mut self, expr: @ast::Expr, _: ()) {
                             }
                             Some(entry) => entry
                         };
-                        debug2!("(privacy checking) checking impl method");
+                        debug!("(privacy checking) checking impl method");
                         self.check_method(expr.span, &entry.origin, ident);
                     }
                     _ => {}
@@ -773,12 +773,12 @@ fn visit_view_item(&mut self, a: &ast::view_item, _: ()) {
                     match vpath.node {
                         ast::view_path_simple(_, ref path, id) |
                         ast::view_path_glob(ref path, id) => {
-                            debug2!("privacy - glob/simple {}", id);
+                            debug!("privacy - glob/simple {}", id);
                             self.check_path(vpath.span, id, path);
                         }
                         ast::view_path_list(_, ref list, _) => {
                             for pid in list.iter() {
-                                debug2!("privacy - list {}", pid.node.id);
+                                debug!("privacy - list {}", pid.node.id);
                                 let seg = ast::PathSegment {
                                     identifier: pid.node.name,
                                     lifetime: None,
index 0ae8e01fe9d42d04420cb6a171c483497ae23b28..29acfe143813878ff7f51eb4a358349f1757df8e 100644 (file)
@@ -93,13 +93,13 @@ pub fn relate_free_regions(&mut self, sub: FreeRegion, sup: FreeRegion) {
             None => {}
         }
 
-        debug2!("relate_free_regions(sub={:?}, sup={:?})", sub, sup);
+        debug!("relate_free_regions(sub={:?}, sup={:?})", sub, sup);
 
         self.free_region_map.insert(sub, ~[sup]);
     }
 
     pub fn record_parent(&mut self, sub: ast::NodeId, sup: ast::NodeId) {
-        debug2!("record_parent(sub={:?}, sup={:?})", sub, sup);
+        debug!("record_parent(sub={:?}, sup={:?})", sub, sup);
         assert!(sub != sup);
 
         self.scope_map.insert(sub, sup);
@@ -125,7 +125,7 @@ pub fn encl_scope(&self, id: ast::NodeId) -> ast::NodeId {
 
         match self.scope_map.find(&id) {
             Some(&r) => r,
-            None => { fail2!("No enclosing scope for id {:?}", id); }
+            None => { fail!("No enclosing scope for id {:?}", id); }
         }
     }
 
@@ -168,7 +168,7 @@ pub fn is_subscope_of(&self,
         while superscope != s {
             match self.scope_map.find(&s) {
                 None => {
-                    debug2!("is_subscope_of({:?}, {:?}, s={:?})=false",
+                    debug!("is_subscope_of({:?}, {:?}, s={:?})=false",
                            subscope, superscope, s);
 
                     return false;
@@ -177,7 +177,7 @@ pub fn is_subscope_of(&self,
             }
         }
 
-        debug2!("is_subscope_of({:?}, {:?})=true",
+        debug!("is_subscope_of({:?}, {:?})=true",
                subscope, superscope);
 
         return true;
@@ -231,7 +231,7 @@ pub fn is_subregion_of(&self,
          * duplicated with the code in infer.rs.
          */
 
-        debug2!("is_subregion_of(sub_region={:?}, super_region={:?})",
+        debug!("is_subregion_of(sub_region={:?}, super_region={:?})",
                sub_region, super_region);
 
         sub_region == super_region || {
@@ -303,7 +303,7 @@ pub fn nearest_common_ancestor(&self,
         fn ancestors_of(this: &RegionMaps, scope: ast::NodeId)
             -> ~[ast::NodeId]
         {
-            // debug2!("ancestors_of(scope={})", scope);
+            // debug!("ancestors_of(scope={})", scope);
             let mut result = ~[scope];
             let mut scope = scope;
             loop {
@@ -314,7 +314,7 @@ fn ancestors_of(this: &RegionMaps, scope: ast::NodeId)
                         scope = superscope;
                     }
                 }
-                // debug2!("ancestors_of_loop(scope={})", scope);
+                // debug!("ancestors_of_loop(scope={})", scope);
             }
         }
     }
@@ -323,7 +323,7 @@ fn ancestors_of(this: &RegionMaps, scope: ast::NodeId)
 /// Records the current parent (if any) as the parent of `child_id`.
 fn parent_to_expr(visitor: &mut RegionResolutionVisitor,
                   cx: Context, child_id: ast::NodeId, sp: Span) {
-    debug2!("region::parent_to_expr(span={:?})",
+    debug!("region::parent_to_expr(span={:?})",
            visitor.sess.codemap.span_to_str(sp));
     for parent_id in cx.parent.iter() {
         visitor.region_maps.record_parent(child_id, *parent_id);
@@ -437,7 +437,7 @@ fn resolve_fn(visitor: &mut RegionResolutionVisitor,
               sp: Span,
               id: ast::NodeId,
               cx: Context) {
-    debug2!("region::resolve_fn(id={:?}, \
+    debug!("region::resolve_fn(id={:?}, \
                                span={:?}, \
                                body.id={:?}, \
                                cx.parent={:?})",
@@ -619,7 +619,7 @@ pub fn add_rp(&mut self, id: ast::NodeId, variance: region_variance) {
           Some(v) => join_variance(v, variance)
         };
 
-        debug2!("add_rp() variance for {}: {:?} == {:?} ^ {:?}",
+        debug!("add_rp() variance for {}: {:?} == {:?} ^ {:?}",
                ast_map::node_id_to_str(self.ast_map, id,
                                        token::get_ident_interner()),
                joined_variance, old_variance, variance);
@@ -637,7 +637,7 @@ pub fn add_rp(&mut self, id: ast::NodeId, variance: region_variance) {
     /// contains a value of type `from`, so if `from` is
     /// region-parameterized, so is the current item.
     pub fn add_dep(&mut self, from: ast::NodeId) {
-        debug2!("add dependency from {} -> {} ({} -> {}) with variance {:?}",
+        debug!("add dependency from {} -> {} ({} -> {}) with variance {:?}",
                from, self.item_id,
                ast_map::node_id_to_str(self.ast_map, from,
                                        token::get_ident_interner()),
@@ -715,7 +715,7 @@ pub fn with(@mut self,
         let old_anon_implies_rp = self.anon_implies_rp;
         self.item_id = item_id;
         self.anon_implies_rp = anon_implies_rp;
-        debug2!("with_item_id({}, {})",
+        debug!("with_item_id({}, {})",
                item_id,
                anon_implies_rp);
         let _i = ::util::common::indenter();
@@ -787,7 +787,7 @@ fn determine_rp_in_ty(visitor: &mut DetermineRpVisitor,
     let sess = cx.sess;
     match ty.node {
         ast::ty_rptr(ref r, _) => {
-            debug2!("referenced rptr type {}",
+            debug!("referenced rptr type {}",
                    pprust::ty_to_str(ty, sess.intr()));
 
             if cx.region_is_relevant(r) {
@@ -797,7 +797,7 @@ fn determine_rp_in_ty(visitor: &mut DetermineRpVisitor,
         }
 
         ast::ty_closure(ref f) => {
-            debug2!("referenced fn type: {}",
+            debug!("referenced fn type: {}",
                    pprust::ty_to_str(ty, sess.intr()));
             match f.region {
                 Some(_) => {
@@ -837,7 +837,7 @@ fn determine_rp_in_ty(visitor: &mut DetermineRpVisitor,
                 match csearch::get_region_param(cstore, did) {
                   None => {}
                   Some(variance) => {
-                    debug2!("reference to external, rp'd type {}",
+                    debug!("reference to external, rp'd type {}",
                            pprust::ty_to_str(ty, sess.intr()));
                     if cx.region_is_relevant(&path.segments.last().lifetime) {
                         let rv = cx.add_variance(variance);
@@ -967,7 +967,7 @@ pub fn determine_rp_in_crate(sess: Session,
         while cx.worklist.len() != 0 {
             let c_id = cx.worklist.pop();
             let c_variance = cx.region_paramd_items.get_copy(&c_id);
-            debug2!("popped {} from worklist", c_id);
+            debug!("popped {} from worklist", c_id);
             match cx.dep_map.find(&c_id) {
               None => {}
               Some(deps) => {
@@ -980,11 +980,11 @@ pub fn determine_rp_in_crate(sess: Session,
         }
     }
 
-    debug2!("{}", {
-        debug2!("Region variance results:");
+    debug!("{}", {
+        debug!("Region variance results:");
         let region_paramd_items = cx.region_paramd_items;
         for (&key, &value) in region_paramd_items.iter() {
-            debug2!("item {:?} ({}) is parameterized with variance {:?}",
+            debug!("item {:?} ({}) is parameterized with variance {:?}",
                    key,
                    ast_map::node_id_to_str(ast_map, key,
                                            token::get_ident_interner()),
index a6c22bd574264c2d3dda87ccaf449095446c9aac..b480aaac1acb1763958c96ebceccce9158f80154 100644 (file)
@@ -665,7 +665,7 @@ fn get_module_if_available(&self) -> Option<@mut Module> {
     fn get_module(&mut self) -> @mut Module {
         match self.get_module_if_available() {
             None => {
-                fail2!("get_module called on a node with no module \
+                fail!("get_module called on a node with no module \
                        definition!")
             }
             Some(module_def) => module_def
@@ -1405,7 +1405,7 @@ fn build_reduced_graph_for_item(&mut self,
                     }
                     match self.method_map.find_mut(name) {
                         Some(s) => { s.insert(def_id); },
-                        _ => fail2!("Can't happen"),
+                        _ => fail!("Can't happen"),
                     }
                 }
 
@@ -1414,7 +1414,7 @@ fn build_reduced_graph_for_item(&mut self,
             }
 
             item_mac(*) => {
-                fail2!("item macros unimplemented")
+                fail!("item macros unimplemented")
             }
         }
     }
@@ -1596,7 +1596,7 @@ fn build_reduced_graph_for_block(&mut self,
         if self.block_needs_anonymous_module(block) {
             let block_id = block.id;
 
-            debug2!("(building reduced graph for block) creating a new \
+            debug!("(building reduced graph for block) creating a new \
                     anonymous module for block {}",
                    block_id);
 
@@ -1621,7 +1621,7 @@ fn handle_external_def(&mut self,
                            final_ident: &str,
                            ident: Ident,
                            new_parent: ReducedGraphParent) {
-        debug2!("(building reduced graph for \
+        debug!("(building reduced graph for \
                 external crate) building external def, priv {:?}",
                vis);
         let is_public = vis == ast::public;
@@ -1641,12 +1641,12 @@ fn handle_external_def(&mut self,
           DefTy(def_id) => {
             match child_name_bindings.type_def {
               Some(TypeNsDef { module_def: Some(module_def), _ }) => {
-                debug2!("(building reduced graph for external crate) \
+                debug!("(building reduced graph for external crate) \
                         already created module");
                 module_def.def_id = Some(def_id);
               }
               Some(_) | None => {
-                debug2!("(building reduced graph for \
+                debug!("(building reduced graph for \
                         external crate) building module \
                         {}", final_ident);
                 let parent_link = self.get_parent_link(new_parent, ident);
@@ -1666,7 +1666,7 @@ fn handle_external_def(&mut self,
         match def {
           DefMod(_) | DefForeignMod(_) => {}
           DefVariant(_, variant_id, is_struct) => {
-            debug2!("(building reduced graph for external crate) building \
+            debug!("(building reduced graph for external crate) building \
                     variant {}",
                    final_ident);
             // We assume the parent is visible, or else we wouldn't have seen
@@ -1681,12 +1681,12 @@ fn handle_external_def(&mut self,
             }
           }
           DefFn(*) | DefStaticMethod(*) | DefStatic(*) => {
-            debug2!("(building reduced graph for external \
+            debug!("(building reduced graph for external \
                     crate) building value (fn/static) {}", final_ident);
             child_name_bindings.define_value(def, dummy_sp(), is_public);
           }
           DefTrait(def_id) => {
-              debug2!("(building reduced graph for external \
+              debug!("(building reduced graph for external \
                       crate) building type {}", final_ident);
 
               // If this is a trait, add all the method names
@@ -1700,7 +1700,7 @@ fn handle_external_def(&mut self,
                       get_method_name_and_explicit_self(self.session.cstore,
                                                         method_def_id);
 
-                  debug2!("(building reduced graph for \
+                  debug!("(building reduced graph for \
                           external crate) ... adding \
                           trait method '{}'",
                          self.session.str_of(method_name));
@@ -1719,7 +1719,7 @@ trait method '{}'",
                   }
                   match self.method_map.find_mut(name) {
                       Some(s) => { s.insert(def_id); },
-                      _ => fail2!("Can't happen"),
+                      _ => fail!("Can't happen"),
                   }
               }
 
@@ -1735,13 +1735,13 @@ trait method '{}'",
                                                   dummy_sp())
           }
           DefTy(_) => {
-              debug2!("(building reduced graph for external \
+              debug!("(building reduced graph for external \
                       crate) building type {}", final_ident);
 
               child_name_bindings.define_type(def, dummy_sp(), is_public);
           }
           DefStruct(def_id) => {
-            debug2!("(building reduced graph for external \
+            debug!("(building reduced graph for external \
                     crate) building type and value for {}",
                    final_ident);
             child_name_bindings.define_type(def, dummy_sp(), is_public);
@@ -1751,7 +1751,7 @@ trait method '{}'",
             self.structs.insert(def_id);
           }
           DefMethod(*) => {
-              debug2!("(building reduced graph for external crate) \
+              debug!("(building reduced graph for external crate) \
                       ignoring {:?}", def);
               // Ignored; handled elsewhere.
           }
@@ -1759,7 +1759,7 @@ trait method '{}'",
           DefPrimTy(*) | DefTyParam(*) | DefBinding(*) |
           DefUse(*) | DefUpvar(*) | DefRegion(*) |
           DefTyParamBinder(*) | DefLabel(*) | DefSelfTy(*) => {
-            fail2!("didn't expect `{:?}`", def);
+            fail!("didn't expect `{:?}`", def);
           }
         }
     }
@@ -1814,7 +1814,7 @@ fn build_reduced_graph_for_external_crate_def(&mut self,
                         match static_methods_opt {
                             Some(ref static_methods) if
                                 static_methods.len() >= 1 => {
-                                debug2!("(building reduced graph for \
+                                debug!("(building reduced graph for \
                                         external crate) processing \
                                         static methods for type name {}",
                                         self.session.str_of(
@@ -1866,7 +1866,7 @@ fn build_reduced_graph_for_external_crate_def(&mut self,
                                 for static_method_info in
                                         static_methods.iter() {
                                     let ident = static_method_info.ident;
-                                    debug2!("(building reduced graph for \
+                                    debug!("(building reduced graph for \
                                              external crate) creating \
                                              static method '{}'",
                                            self.session.str_of(ident));
@@ -1893,7 +1893,7 @@ fn build_reduced_graph_for_external_crate_def(&mut self,
                 }
             }
             DlField => {
-                debug2!("(building reduced graph for external crate) \
+                debug!("(building reduced graph for external crate) \
                         ignoring field");
             }
         }
@@ -1901,12 +1901,12 @@ fn build_reduced_graph_for_external_crate_def(&mut self,
 
     /// Builds the reduced graph rooted at the given external module.
     fn populate_external_module(&mut self, module: @mut Module) {
-        debug2!("(populating external module) attempting to populate {}",
+        debug!("(populating external module) attempting to populate {}",
                self.module_to_str(module));
 
         let def_id = match module.def_id {
             None => {
-                debug2!("(populating external module) ... no def ID!");
+                debug!("(populating external module) ... no def ID!");
                 return
             }
             Some(def_id) => def_id,
@@ -1914,7 +1914,7 @@ fn populate_external_module(&mut self, module: @mut Module) {
 
         do csearch::each_child_of_item(self.session.cstore, def_id)
                 |def_like, child_ident, visibility| {
-            debug2!("(populating external module) ... found ident: {}",
+            debug!("(populating external module) ... found ident: {}",
                    token::ident_to_str(&child_ident));
             self.build_reduced_graph_for_external_crate_def(module,
                                                             def_like,
@@ -1965,14 +1965,14 @@ fn build_import_directive(&mut self,
 
         match *subclass {
             SingleImport(target, _) => {
-                debug2!("(building import directive) building import \
+                debug!("(building import directive) building import \
                         directive: {}::{}",
                        self.idents_to_str(directive.module_path),
                        self.session.str_of(target));
 
                 match module_.import_resolutions.find(&target.name) {
                     Some(&resolution) => {
-                        debug2!("(building import directive) bumping \
+                        debug!("(building import directive) bumping \
                                 reference");
                         resolution.outstanding_references += 1;
 
@@ -1981,7 +1981,7 @@ fn build_import_directive(&mut self,
                         resolution.value_id = id;
                     }
                     None => {
-                        debug2!("(building import directive) creating new");
+                        debug!("(building import directive) creating new");
                         let resolution = @mut ImportResolution::new(id, is_public);
                         resolution.outstanding_references = 1;
                         module_.import_resolutions.insert(target.name, resolution);
@@ -2013,14 +2013,14 @@ fn resolve_imports(&mut self) {
         let mut i = 0;
         let mut prev_unresolved_imports = 0;
         loop {
-            debug2!("(resolving imports) iteration {}, {} imports left",
+            debug!("(resolving imports) iteration {}, {} imports left",
                    i, self.unresolved_imports);
 
             let module_root = self.graph_root.get_module();
             self.resolve_imports_for_module_subtree(module_root);
 
             if self.unresolved_imports == 0 {
-                debug2!("(resolving imports) success");
+                debug!("(resolving imports) success");
                 break;
             }
 
@@ -2038,7 +2038,7 @@ fn resolve_imports(&mut self) {
     /// submodules.
     fn resolve_imports_for_module_subtree(&mut self,
                                               module_: @mut Module) {
-        debug2!("(resolving imports for module subtree) resolving {}",
+        debug!("(resolving imports for module subtree) resolving {}",
                self.module_to_str(module_));
         self.resolve_imports_for_module(module_);
 
@@ -2062,7 +2062,7 @@ fn resolve_imports_for_module_subtree(&mut self,
     /// Attempts to resolve imports for the given module only.
     fn resolve_imports_for_module(&mut self, module: @mut Module) {
         if module.all_imports_resolved() {
-            debug2!("(resolving imports for module) all imports resolved for \
+            debug!("(resolving imports for module) all imports resolved for \
                    {}",
                    self.module_to_str(module));
             return;
@@ -2151,7 +2151,7 @@ fn resolve_import_for_module(&mut self,
         let mut resolution_result = Failed;
         let module_path = &import_directive.module_path;
 
-        debug2!("(resolving import for module) resolving import `{}::...` in \
+        debug!("(resolving import for module) resolving import `{}::...` in \
                 `{}`",
                self.idents_to_str(*module_path),
                self.module_to_str(module_));
@@ -2256,7 +2256,7 @@ fn resolve_single_import(&mut self,
                              directive: &ImportDirective,
                              lp: LastPrivate)
                                  -> ResolveResult<()> {
-        debug2!("(resolving single import) resolving `{}` = `{}::{}` from \
+        debug!("(resolving single import) resolving `{}` = `{}::{}` from \
                 `{}` id {}, last private {:?}",
                self.session.str_of(target),
                self.module_to_str(containing_module),
@@ -2300,7 +2300,7 @@ fn resolve_single_import(&mut self,
                 // able to resolve this import.
 
                 if containing_module.glob_count > 0 {
-                    debug2!("(resolving single import) unresolved glob; \
+                    debug!("(resolving single import) unresolved glob; \
                             bailing out");
                     return Indeterminate;
                 }
@@ -2368,7 +2368,7 @@ fn get_binding(this: &mut Resolver,
                     }
                     Some(_) => {
                         // The import is unresolved. Bail out.
-                        debug2!("(resolving single import) unresolved import; \
+                        debug!("(resolving single import) unresolved import; \
                                 bailing out");
                         return Indeterminate;
                     }
@@ -2403,7 +2403,7 @@ fn get_binding(this: &mut Resolver,
 
         match value_result {
             BoundResult(target_module, name_bindings) => {
-                debug2!("(resolving single import) found value target");
+                debug!("(resolving single import) found value target");
                 import_resolution.value_target =
                     Some(Target::new(target_module, name_bindings));
                 import_resolution.value_id = directive.id;
@@ -2411,12 +2411,12 @@ fn get_binding(this: &mut Resolver,
             }
             UnboundResult => { /* Continue. */ }
             UnknownResult => {
-                fail2!("value result should be known at this point");
+                fail!("value result should be known at this point");
             }
         }
         match type_result {
             BoundResult(target_module, name_bindings) => {
-                debug2!("(resolving single import) found type target: {:?}",
+                debug!("(resolving single import) found type target: {:?}",
                         name_bindings.type_def.unwrap().type_def);
                 import_resolution.type_target =
                     Some(Target::new(target_module, name_bindings));
@@ -2425,7 +2425,7 @@ fn get_binding(this: &mut Resolver,
             }
             UnboundResult => { /* Continue. */ }
             UnknownResult => {
-                fail2!("type result should be known at this point");
+                fail!("type result should be known at this point");
             }
         }
 
@@ -2467,7 +2467,7 @@ fn get_binding(this: &mut Resolver,
             None => {}
         }
 
-        debug2!("(resolving single import) successfully resolved import");
+        debug!("(resolving single import) successfully resolved import");
         return Success(());
     }
 
@@ -2484,12 +2484,12 @@ fn resolve_glob_import(&mut self,
         // This function works in a highly imperative manner; it eagerly adds
         // everything it can to the list of import resolutions of the module
         // node.
-        debug2!("(resolving glob import) resolving glob import {}", id);
+        debug!("(resolving glob import) resolving glob import {}", id);
 
         // We must bail out if the node has unresolved imports of any kind
         // (including globs).
         if !(*containing_module).all_imports_resolved() {
-            debug2!("(resolving glob import) target module has unresolved \
+            debug!("(resolving glob import) target module has unresolved \
                     imports; bailing out");
             return Indeterminate;
         }
@@ -2499,13 +2499,13 @@ fn resolve_glob_import(&mut self,
         // Add all resolved imports from the containing module.
         for (ident, target_import_resolution) in containing_module.import_resolutions.iter() {
 
-            debug2!("(resolving glob import) writing module resolution \
+            debug!("(resolving glob import) writing module resolution \
                     {:?} into `{}`",
                    target_import_resolution.type_target.is_none(),
                    self.module_to_str(module_));
 
             if !target_import_resolution.is_public {
-                debug2!("(resolving glob import) nevermind, just kidding");
+                debug!("(resolving glob import) nevermind, just kidding");
                 continue
             }
 
@@ -2566,7 +2566,7 @@ fn resolve_glob_import(&mut self,
                 }
             }
 
-            debug2!("(resolving glob import) writing resolution `{}` in `{}` \
+            debug!("(resolving glob import) writing resolution `{}` in `{}` \
                     to `{}`",
                    interner_get(name),
                    self.module_to_str(containing_module),
@@ -2574,13 +2574,13 @@ fn resolve_glob_import(&mut self,
 
             // Merge the child item into the import resolution.
             if name_bindings.defined_in_public_namespace(ValueNS) {
-                debug2!("(resolving glob import) ... for value target");
+                debug!("(resolving glob import) ... for value target");
                 dest_import_resolution.value_target =
                     Some(Target::new(containing_module, name_bindings));
                 dest_import_resolution.value_id = id;
             }
             if name_bindings.defined_in_public_namespace(TypeNS) {
-                debug2!("(resolving glob import) ... for type target");
+                debug!("(resolving glob import) ... for type target");
                 dest_import_resolution.type_target =
                     Some(Target::new(containing_module, name_bindings));
                 dest_import_resolution.type_id = id;
@@ -2610,7 +2610,7 @@ fn resolve_glob_import(&mut self,
             None => {}
         }
 
-        debug2!("(resolving glob import) successfully resolved import");
+        debug!("(resolving glob import) successfully resolved import");
         return Success(());
     }
 
@@ -2658,7 +2658,7 @@ fn resolve_module_path_from_root(&mut self,
                     return Failed;
                 }
                 Indeterminate => {
-                    debug2!("(resolving module path for import) module \
+                    debug!("(resolving module path for import) module \
                             resolution is indeterminate: {}",
                             self.session.str_of(name));
                     return Indeterminate;
@@ -2747,7 +2747,7 @@ fn resolve_module_path(&mut self,
         let module_path_len = module_path.len();
         assert!(module_path_len > 0);
 
-        debug2!("(resolving module path for import) processing `{}` rooted at \
+        debug!("(resolving module path for import) processing `{}` rooted at \
                `{}`",
                self.idents_to_str(module_path),
                self.module_to_str(module_));
@@ -2776,7 +2776,7 @@ fn resolve_module_path(&mut self,
                 return Failed;
             }
             Indeterminate => {
-                debug2!("(resolving module path for import) indeterminate; \
+                debug!("(resolving module path for import) indeterminate; \
                         bailing");
                 return Indeterminate;
             }
@@ -2805,7 +2805,7 @@ fn resolve_module_path(&mut self,
                                 return Failed;
                             }
                             Indeterminate => {
-                                debug2!("(resolving module path for import) \
+                                debug!("(resolving module path for import) \
                                         indeterminate; bailing");
                                 return Indeterminate;
                             }
@@ -2842,7 +2842,7 @@ fn resolve_item_in_lexical_scope(&mut self,
                                      search_through_modules:
                                      SearchThroughModulesFlag)
                                     -> ResolveResult<(Target, bool)> {
-        debug2!("(resolving item in lexical scope) resolving `{}` in \
+        debug!("(resolving item in lexical scope) resolving `{}` in \
                 namespace {:?} in `{}`",
                self.session.str_of(name),
                namespace,
@@ -2854,7 +2854,7 @@ fn resolve_item_in_lexical_scope(&mut self,
         match module_.children.find(&name.name) {
             Some(name_bindings)
                     if name_bindings.defined_in_namespace(namespace) => {
-                debug2!("top name bindings succeeded");
+                debug!("top name bindings succeeded");
                 return Success((Target::new(module_, *name_bindings), false));
             }
             Some(_) | None => { /* Not found; continue. */ }
@@ -2872,12 +2872,12 @@ fn resolve_item_in_lexical_scope(&mut self,
                 match (*import_resolution).target_for_namespace(namespace) {
                     None => {
                         // Not found; continue.
-                        debug2!("(resolving item in lexical scope) found \
+                        debug!("(resolving item in lexical scope) found \
                                 import resolution, but not in namespace {:?}",
                                namespace);
                     }
                     Some(target) => {
-                        debug2!("(resolving item in lexical scope) using \
+                        debug!("(resolving item in lexical scope) using \
                                 import resolution");
                         self.used_imports.insert(import_resolution.id(namespace));
                         return Success((target, false));
@@ -2894,7 +2894,7 @@ fn resolve_item_in_lexical_scope(&mut self,
                     let name_bindings =
                         @mut Resolver::create_name_bindings_from_module(
                             *module);
-                    debug2!("lower name bindings succeeded");
+                    debug!("lower name bindings succeeded");
                     return Success((Target::new(module_, name_bindings), false));
                 }
             }
@@ -2907,7 +2907,7 @@ fn resolve_item_in_lexical_scope(&mut self,
             match search_module.parent_link {
                 NoParentLink => {
                     // No more parents. This module was unresolved.
-                    debug2!("(resolving item in lexical scope) unresolved \
+                    debug!("(resolving item in lexical scope) unresolved \
                             module");
                     return Failed;
                 }
@@ -2917,7 +2917,7 @@ fn resolve_item_in_lexical_scope(&mut self,
                             match search_module.kind {
                                 NormalModuleKind => {
                                     // We stop the search here.
-                                    debug2!("(resolving item in lexical \
+                                    debug!("(resolving item in lexical \
                                             scope) unresolved module: not \
                                             searching through module \
                                             parents");
@@ -2953,13 +2953,13 @@ fn resolve_item_in_lexical_scope(&mut self,
                     // We couldn't see through the higher scope because of an
                     // unresolved import higher up. Bail.
 
-                    debug2!("(resolving item in lexical scope) indeterminate \
+                    debug!("(resolving item in lexical scope) indeterminate \
                             higher scope; bailing");
                     return Indeterminate;
                 }
                 Success((target, used_reexport)) => {
                     // We found the module.
-                    debug2!("(resolving item in lexical scope) found name \
+                    debug!("(resolving item in lexical scope) found name \
                             in module, done");
                     return Success((target, used_reexport));
                 }
@@ -2983,7 +2983,7 @@ fn resolve_module_in_lexical_scope(&mut self,
                     Some(ref type_def) => {
                         match (*type_def).module_def {
                             None => {
-                                error2!("!!! (resolving module in lexical \
+                                error!("!!! (resolving module in lexical \
                                         scope) module wasn't actually a \
                                         module!");
                                 return Failed;
@@ -2994,19 +2994,19 @@ fn resolve_module_in_lexical_scope(&mut self,
                         }
                     }
                     None => {
-                        error2!("!!! (resolving module in lexical scope) module
+                        error!("!!! (resolving module in lexical scope) module
                                 wasn't actually a module!");
                         return Failed;
                     }
                 }
             }
             Indeterminate => {
-                debug2!("(resolving module in lexical scope) indeterminate; \
+                debug!("(resolving module in lexical scope) indeterminate; \
                         bailing");
                 return Indeterminate;
             }
             Failed => {
-                debug2!("(resolving module in lexical scope) failed to \
+                debug!("(resolving module in lexical scope) failed to \
                         resolve");
                 return Failed;
             }
@@ -3079,7 +3079,7 @@ fn resolve_module_prefix(&mut self,
         // Now loop through all the `super`s we find.
         while i < module_path.len() &&
                 "super" == token::ident_to_str(&module_path[i]) {
-            debug2!("(resolving module prefix) resolving `super` at {}",
+            debug!("(resolving module prefix) resolving `super` at {}",
                    self.module_to_str(containing_module));
             match self.get_nearest_normal_module_parent(containing_module) {
                 None => return Failed,
@@ -3090,7 +3090,7 @@ fn resolve_module_prefix(&mut self,
             }
         }
 
-        debug2!("(resolving module prefix) finished resolving prefix at {}",
+        debug!("(resolving module prefix) finished resolving prefix at {}",
                self.module_to_str(containing_module));
 
         return Success(PrefixFound(containing_module, i));
@@ -3108,7 +3108,7 @@ fn resolve_name_in_module(&mut self,
                               namespace: Namespace,
                               name_search_type: NameSearchType)
                               -> ResolveResult<(Target, bool)> {
-        debug2!("(resolving name in module) resolving `{}` in `{}`",
+        debug!("(resolving name in module) resolving `{}` in `{}`",
                self.session.str_of(name),
                self.module_to_str(module_));
 
@@ -3117,7 +3117,7 @@ fn resolve_name_in_module(&mut self,
         match module_.children.find(&name.name) {
             Some(name_bindings)
                     if name_bindings.defined_in_namespace(namespace) => {
-                debug2!("(resolving name in module) found node as child");
+                debug!("(resolving name in module) found node as child");
                 return Success((Target::new(module_, *name_bindings), false));
             }
             Some(_) | None => {
@@ -3138,18 +3138,18 @@ fn resolve_name_in_module(&mut self,
             Some(import_resolution) => {
                 if import_resolution.is_public &&
                         import_resolution.outstanding_references != 0 {
-                    debug2!("(resolving name in module) import \
+                    debug!("(resolving name in module) import \
                            unresolved; bailing out");
                     return Indeterminate;
                 }
                 match import_resolution.target_for_namespace(namespace) {
                     None => {
-                        debug2!("(resolving name in module) name found, \
+                        debug!("(resolving name in module) name found, \
                                 but not in namespace {:?}",
                                namespace);
                     }
                     Some(target) => {
-                        debug2!("(resolving name in module) resolved to \
+                        debug!("(resolving name in module) resolved to \
                                 import");
                         self.used_imports.insert(import_resolution.id(namespace));
                         return Success((target, true));
@@ -3173,7 +3173,7 @@ fn resolve_name_in_module(&mut self,
         }
 
         // We're out of luck.
-        debug2!("(resolving name in module) failed to resolve `{}`",
+        debug!("(resolving name in module) failed to resolve `{}`",
                self.session.str_of(name));
         return Failed;
     }
@@ -3233,19 +3233,19 @@ fn record_exports_for_module_subtree(&mut self,
         match module_.def_id {
             Some(def_id) if def_id.crate == LOCAL_CRATE => {
                 // OK. Continue.
-                debug2!("(recording exports for module subtree) recording \
+                debug!("(recording exports for module subtree) recording \
                         exports for local module `{}`",
                        self.module_to_str(module_));
             }
             None => {
                 // Record exports for the root module.
-                debug2!("(recording exports for module subtree) recording \
+                debug!("(recording exports for module subtree) recording \
                         exports for root module `{}`",
                        self.module_to_str(module_));
             }
             Some(_) => {
                 // Bail out.
-                debug2!("(recording exports for module subtree) not recording \
+                debug!("(recording exports for module subtree) not recording \
                         exports for `{}`",
                        self.module_to_str(module_));
                 return;
@@ -3278,7 +3278,7 @@ fn record_exports_for_module(&mut self, module_: @mut Module) {
         match module_.def_id {
             Some(def_id) => {
                 self.export_map2.insert(def_id.node, exports2);
-                debug2!("(computing exports) writing exports for {} (some)",
+                debug!("(computing exports) writing exports for {} (some)",
                        def_id.node);
             }
             None => {}
@@ -3293,7 +3293,7 @@ fn add_exports_of_namebindings(&mut self,
                                    reexport: bool) {
         match namebindings.def_for_namespace(ns) {
             Some(d) => {
-                debug2!("(computing exports) YES: {} '{}' => {:?}",
+                debug!("(computing exports) YES: {} '{}' => {:?}",
                        if reexport { ~"reexport" } else { ~"export"},
                        interner_get(name),
                        def_id_of_def(d));
@@ -3304,7 +3304,7 @@ fn add_exports_of_namebindings(&mut self,
                 });
             }
             d_opt => {
-                debug2!("(computing reexports) NO: {:?}", d_opt);
+                debug!("(computing reexports) NO: {:?}", d_opt);
             }
         }
     }
@@ -3318,7 +3318,7 @@ fn add_exports_for_module(&mut self,
             for &ns in xs.iter() {
                 match importresolution.target_for_namespace(ns) {
                     Some(target) => {
-                        debug2!("(computing exports) maybe reexport '{}'",
+                        debug!("(computing exports) maybe reexport '{}'",
                                interner_get(*name));
                         self.add_exports_of_namebindings(exports2,
                                                          *name,
@@ -3362,14 +3362,14 @@ fn with_scope(&mut self, name: Option<Ident>, f: &fn(&mut Resolver)) {
                 self.populate_module_if_necessary(orig_module);
                 match orig_module.children.find(&name.name) {
                     None => {
-                        debug2!("!!! (with scope) didn't find `{}` in `{}`",
+                        debug!("!!! (with scope) didn't find `{}` in `{}`",
                                self.session.str_of(name),
                                self.module_to_str(orig_module));
                     }
                     Some(name_bindings) => {
                         match (*name_bindings).get_module_if_available() {
                             None => {
-                                debug2!("!!! (with scope) didn't find module \
+                                debug!("!!! (with scope) didn't find module \
                                         for `{}` in `{}`",
                                        self.session.str_of(name),
                                        self.module_to_str(orig_module));
@@ -3529,13 +3529,13 @@ fn search_ribs(&mut self,
     }
 
     fn resolve_crate(&mut self, crate: &ast::Crate) {
-        debug2!("(resolving crate) starting");
+        debug!("(resolving crate) starting");
 
         visit::walk_crate(self, crate, ());
     }
 
     fn resolve_item(&mut self, item: @item) {
-        debug2!("(resolving item) resolving {}",
+        debug!("(resolving item) resolving {}",
                self.session.str_of(item.ident));
 
         // Items with the !resolve_unexported attribute are X-ray contexts.
@@ -3705,7 +3705,7 @@ fn resolve_item(&mut self, item: @item) {
             }
 
           item_mac(*) => {
-            fail2!("item macros unimplemented")
+            fail!("item macros unimplemented")
           }
         }
 
@@ -3724,7 +3724,7 @@ fn with_type_parameter_rib(&mut self,
 
                 for (index, type_parameter) in generics.ty_params.iter().enumerate() {
                     let ident = type_parameter.ident;
-                    debug2!("with_type_parameter_rib: {} {}", node_id,
+                    debug!("with_type_parameter_rib: {} {}", node_id,
                            type_parameter.id);
                     let def_like = DlDef(DefTyParam
                         (local_def(type_parameter.id),
@@ -3822,7 +3822,7 @@ fn resolve_function(&mut self,
 
                         this.resolve_type(&argument.ty);
 
-                        debug2!("(resolving function) recorded argument");
+                        debug!("(resolving function) recorded argument");
                     }
 
                     this.resolve_type(&declaration.output);
@@ -3832,7 +3832,7 @@ fn resolve_function(&mut self,
             // Resolve the function body.
             this.resolve_block(block);
 
-            debug2!("(resolving function) leaving function");
+            debug!("(resolving function) leaving function");
         }
 
         self.label_ribs.pop();
@@ -3876,7 +3876,7 @@ fn resolve_trait_reference(&mut self,
                 self.resolve_error(trait_reference.path.span, msg);
             }
             Some(def) => {
-                debug2!("(resolving trait) found trait def: {:?}", def);
+                debug!("(resolving trait) found trait def: {:?}", def);
                 self.record_def(trait_reference.ref_id, def);
             }
         }
@@ -4027,7 +4027,7 @@ fn resolve_module(&mut self,
                           _name: Ident,
                           id: NodeId) {
         // Write the implementations in scope into the module metadata.
-        debug2!("(resolving module) resolving module ID {}", id);
+        debug!("(resolving module) resolving module ID {}", id);
         visit::walk_mod(self, module_, ());
     }
 
@@ -4127,7 +4127,7 @@ fn resolve_arm(&mut self, arm: &Arm) {
     }
 
     fn resolve_block(&mut self, block: &Block) {
-        debug2!("(resolving block) entering block");
+        debug!("(resolving block) entering block");
         self.value_ribs.push(@Rib::new(NormalRibKind));
 
         // Move down in the graph, if there's an anonymous module rooted here.
@@ -4135,7 +4135,7 @@ fn resolve_block(&mut self, block: &Block) {
         match self.current_module.anonymous_children.find(&block.id) {
             None => { /* Nothing to do. */ }
             Some(&anonymous_module) => {
-                debug2!("(resolving block) found anonymous module, moving \
+                debug!("(resolving block) found anonymous module, moving \
                         down");
                 self.current_module = anonymous_module;
             }
@@ -4148,7 +4148,7 @@ fn resolve_block(&mut self, block: &Block) {
         self.current_module = orig_module;
 
         self.value_ribs.pop();
-        debug2!("(resolving block) leaving block");
+        debug!("(resolving block) leaving block");
     }
 
     fn resolve_type(&mut self, ty: &Ty) {
@@ -4199,7 +4199,7 @@ fn resolve_type(&mut self, ty: &Ty) {
                     None => {
                         match self.resolve_path(ty.id, path, TypeNS, true) {
                             Some(def) => {
-                                debug2!("(resolving type) resolved `{}` to \
+                                debug!("(resolving type) resolved `{}` to \
                                         type {:?}",
                                        self.session.str_of(path.segments
                                                                .last()
@@ -4218,7 +4218,7 @@ fn resolve_type(&mut self, ty: &Ty) {
                 match result_def {
                     Some(def) => {
                         // Write the result into the def map.
-                        debug2!("(resolving type) writing resolution for `{}` \
+                        debug!("(resolving type) writing resolution for `{}` \
                                 (id {})",
                                self.path_idents_to_str(path),
                                path_id);
@@ -4282,7 +4282,7 @@ fn resolve_pattern(&mut self,
                     match self.resolve_bare_identifier_pattern(ident) {
                         FoundStructOrEnumVariant(def, lp)
                                 if mode == RefutableMode => {
-                            debug2!("(resolving pattern) resolving `{}` to \
+                            debug!("(resolving pattern) resolving `{}` to \
                                     struct or enum variant",
                                    interner_get(renamed));
 
@@ -4301,7 +4301,7 @@ struct in scope",
                                                        interner_get(renamed)));
                         }
                         FoundConst(def, lp) if mode == RefutableMode => {
-                            debug2!("(resolving pattern) resolving `{}` to \
+                            debug!("(resolving pattern) resolving `{}` to \
                                     constant",
                                    interner_get(renamed));
 
@@ -4317,7 +4317,7 @@ struct in scope",
                                                    allowed here");
                         }
                         BareIdentifierPatternUnresolved => {
-                            debug2!("(resolving pattern) binding `{}`",
+                            debug!("(resolving pattern) binding `{}`",
                                    interner_get(renamed));
 
                             let is_mutable = mutability == Mutable;
@@ -4490,7 +4490,7 @@ struct or const `{}`",
                             self.record_def(pattern.id, definition);
                         }
                         result => {
-                            debug2!("(resolving pattern) didn't find struct \
+                            debug!("(resolving pattern) didn't find struct \
                                     def: {:?}", result);
                             let msg = format!("`{}` does not name a structure",
                                               self.path_idents_to_str(path));
@@ -4515,12 +4515,12 @@ fn resolve_bare_identifier_pattern(&mut self, name: Ident)
                                                  ValueNS,
                                                  SearchThroughModules) {
             Success((target, _)) => {
-                debug2!("(resolve bare identifier pattern) succeeded in \
+                debug!("(resolve bare identifier pattern) succeeded in \
                          finding {} at {:?}",
                         self.session.str_of(name), target.bindings.value_def);
                 match target.bindings.value_def {
                     None => {
-                        fail2!("resolved name in the value namespace to a \
+                        fail!("resolved name in the value namespace to a \
                               set of name bindings with no def?!");
                     }
                     Some(def) => {
@@ -4543,11 +4543,11 @@ fn resolve_bare_identifier_pattern(&mut self, name: Ident)
             }
 
             Indeterminate => {
-                fail2!("unexpected indeterminate result");
+                fail!("unexpected indeterminate result");
             }
 
             Failed => {
-                debug2!("(resolve bare identifier pattern) failed to find {}",
+                debug!("(resolve bare identifier pattern) failed to find {}",
                         self.session.str_of(name));
                 return BareIdentifierPatternUnresolved;
             }
@@ -4713,7 +4713,7 @@ fn resolve_module_relative_path(&mut self,
             }
 
             Indeterminate => {
-                fail2!("indeterminate unexpected");
+                fail!("indeterminate unexpected");
             }
 
             Success((resulting_module, resulting_last_private)) => {
@@ -4740,7 +4740,7 @@ fn resolve_module_relative_path(&mut self,
                     Some(s) => {
                         match containing_module.def_id {
                             Some(def_id) if s.contains(&def_id) => {
-                                debug2!("containing module was a trait or impl \
+                                debug!("containing module was a trait or impl \
                                         and name was a method -> not resolved");
                                 return None;
                             },
@@ -4781,7 +4781,7 @@ fn resolve_crate_relative_path(&mut self,
             }
 
             Indeterminate => {
-                fail2!("indeterminate unexpected");
+                fail!("indeterminate unexpected");
             }
 
             Success((resulting_module, resulting_last_private)) => {
@@ -4827,7 +4827,7 @@ fn resolve_identifier_in_local_ribs(&mut self,
 
         match search_result {
             Some(DlDef(def)) => {
-                debug2!("(resolving path in local ribs) resolved `{}` to \
+                debug!("(resolving path in local ribs) resolved `{}` to \
                         local: {:?}",
                        self.session.str_of(ident),
                        def);
@@ -4885,13 +4885,13 @@ fn resolve_item_by_identifier_in_lexical_scope(&mut self,
                     None => {
                         // This can happen if we were looking for a type and
                         // found a module instead. Modules don't have defs.
-                        debug2!("(resolving item path by identifier in lexical \
+                        debug!("(resolving item path by identifier in lexical \
                                  scope) failed to resolve {} after success...",
                                  self.session.str_of(ident));
                         return None;
                     }
                     Some(def) => {
-                        debug2!("(resolving item path in lexical scope) \
+                        debug!("(resolving item path in lexical scope) \
                                 resolved `{}` to item",
                                self.session.str_of(ident));
                         // This lookup is "all public" because it only searched
@@ -4902,10 +4902,10 @@ fn resolve_item_by_identifier_in_lexical_scope(&mut self,
                 }
             }
             Indeterminate => {
-                fail2!("unexpected indeterminate result");
+                fail!("unexpected indeterminate result");
             }
             Failed => {
-                debug2!("(resolving item path by identifier in lexical scope) \
+                debug!("(resolving item path by identifier in lexical scope) \
                          failed to resolve {}", self.session.str_of(ident));
                 return None;
             }
@@ -4983,7 +4983,7 @@ fn resolve_expr(&mut self, expr: @Expr) {
                 match self.resolve_path(expr.id, path, ValueNS, true) {
                     Some(def) => {
                         // Write the result into the def map.
-                        debug2!("(resolving expr) resolved `{}`",
+                        debug!("(resolving expr) resolved `{}`",
                                self.path_idents_to_str(path));
 
                         // First-class methods are not supported yet; error
@@ -5069,7 +5069,7 @@ fn resolve_expr(&mut self, expr: @Expr) {
                         self.record_def(expr.id, definition);
                     }
                     result => {
-                        debug2!("(resolving expression) didn't find struct \
+                        debug!("(resolving expression) didn't find struct \
                                 def: {:?}", result);
                         let msg = format!("`{}` does not name a structure",
                                           self.path_idents_to_str(path));
@@ -5091,7 +5091,7 @@ fn resolve_expr(&mut self, expr: @Expr) {
                 }
             }
 
-            ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+            ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
             ExprBreak(Some(label)) | ExprAgain(Some(label)) => {
                 match self.search_ribs(self.label_ribs, label, expr.span,
@@ -5142,7 +5142,7 @@ fn record_candidate_traits_for_expr_if_necessary(&mut self,
                 self.trait_map.insert(expr.id, @mut traits);
             }
             ExprMethodCall(_, _, ident, _, _, _) => {
-                debug2!("(recording candidate traits for expr) recording \
+                debug!("(recording candidate traits for expr) recording \
                         traits for {}",
                        expr.id);
                 let traits = self.search_for_traits_containing_method(ident);
@@ -5217,7 +5217,7 @@ fn record_candidate_traits_for_expr_if_necessary(&mut self,
 
     fn search_for_traits_containing_method(&mut self, name: Ident)
                                                -> ~[DefId] {
-        debug2!("(searching for traits containing method) looking for '{}'",
+        debug!("(searching for traits containing method) looking for '{}'",
                self.session.str_of(name));
 
         let mut found_traits = ~[];
@@ -5319,7 +5319,7 @@ fn add_trait_info(&self,
                           found_traits: &mut ~[DefId],
                           trait_def_id: DefId,
                           name: Ident) {
-        debug2!("(adding trait info) found trait {}:{} for method '{}'",
+        debug!("(adding trait info) found trait {}:{} for method '{}'",
                trait_def_id.crate,
                trait_def_id.node,
                self.session.str_of(name));
@@ -5338,7 +5338,7 @@ fn add_fixed_trait_for_expr(&mut self,
     }
 
     fn record_def(&mut self, node_id: NodeId, (def, lp): (Def, LastPrivate)) {
-        debug2!("(recording def) recording {:?} for {:?}, last private {:?}",
+        debug!("(recording def) recording {:?} for {:?}, last private {:?}",
                 def, node_id, lp);
         self.last_private.insert(node_id, lp);
         do self.def_map.insert_or_update_with(node_id, def) |_, old_value| {
@@ -5449,15 +5449,15 @@ fn module_to_str(&mut self, module_: @mut Module) -> ~str {
     }
 
     fn dump_module(&mut self, module_: @mut Module) {
-        debug2!("Dump of module `{}`:", self.module_to_str(module_));
+        debug!("Dump of module `{}`:", self.module_to_str(module_));
 
-        debug2!("Children:");
+        debug!("Children:");
         self.populate_module_if_necessary(module_);
         for (&name, _) in module_.children.iter() {
-            debug2!("* {}", interner_get(name));
+            debug!("* {}", interner_get(name));
         }
 
-        debug2!("Import resolutions:");
+        debug!("Import resolutions:");
         for (name, import_resolution) in module_.import_resolutions.iter() {
             let value_repr;
             match import_resolution.target_for_namespace(ValueNS) {
@@ -5477,7 +5477,7 @@ fn dump_module(&mut self, module_: @mut Module) {
                 }
             }
 
-            debug2!("* {}:{}{}", interner_get(*name),
+            debug!("* {}:{}{}", interner_get(*name),
                    value_repr, type_repr);
         }
     }
index 1c572b2cbadbfaa1be234e1f9b490ab377cb8bb5..fdb7f1508fb47a64d9497fa7a9a7383952f48af1 100644 (file)
@@ -123,20 +123,20 @@ fn stack_check_fn<'a>(v: &mut StackCheckVisitor,
         }
     };
     let new_cx = Context {safe_stack: safe_stack};
-    debug2!("stack_check_fn(safe_stack={}, id={:?})", safe_stack, id);
+    debug!("stack_check_fn(safe_stack={}, id={:?})", safe_stack, id);
     visit::walk_fn(v, fk, decl, body, sp, id, new_cx);
 }
 
 fn stack_check_expr<'a>(v: &mut StackCheckVisitor,
                         expr: @ast::Expr,
                         cx: Context) {
-    debug2!("stack_check_expr(safe_stack={}, expr={})",
+    debug!("stack_check_expr(safe_stack={}, expr={})",
            cx.safe_stack, expr.repr(v.tcx));
     if !cx.safe_stack {
         match expr.node {
             ast::ExprCall(callee, _, _) => {
                 let callee_ty = ty::expr_ty(v.tcx, callee);
-                debug2!("callee_ty={}", callee_ty.repr(v.tcx));
+                debug!("callee_ty={}", callee_ty.repr(v.tcx));
                 match ty::get(callee_ty).sty {
                     ty::ty_bare_fn(ref fty) => {
                         if !fty.abis.is_rust() && !fty.abis.is_intrinsic() {
index 89dfa64511f824cab4f94fda39943d772e6d9108..6bb41929db1d1a618451b6280a7a51a9b8b9f2ed 100644 (file)
@@ -264,7 +264,7 @@ fn opt_eq(tcx: ty::ctxt, a: &Opt, b: &Opt) -> bool {
                                 a_expr = e.unwrap();
                             }
                         UnitLikeStructLit(_) => {
-                            fail2!("UnitLikeStructLit should have been handled \
+                            fail!("UnitLikeStructLit should have been handled \
                                     above")
                         }
                     }
@@ -277,14 +277,14 @@ fn opt_eq(tcx: ty::ctxt, a: &Opt, b: &Opt) -> bool {
                                 b_expr = e.unwrap();
                             }
                         UnitLikeStructLit(_) => {
-                            fail2!("UnitLikeStructLit should have been handled \
+                            fail!("UnitLikeStructLit should have been handled \
                                     above")
                         }
                     }
 
                     match const_eval::compare_lit_exprs(tcx, a_expr, b_expr) {
                         Some(val1) => val1 == 0,
-                        None => fail2!("compare_list_exprs: type mismatch"),
+                        None => fail!("compare_list_exprs: type mismatch"),
                     }
                 }
             }
@@ -294,7 +294,7 @@ fn opt_eq(tcx: ty::ctxt, a: &Opt, b: &Opt) -> bool {
             let m2 = const_eval::compare_lit_exprs(tcx, a2, b2);
             match (m1, m2) {
                 (Some(val1), Some(val2)) => (val1 == 0 && val2 == 0),
-                _ => fail2!("compare_list_exprs: type mismatch"),
+                _ => fail!("compare_list_exprs: type mismatch"),
             }
         }
         (&var(a, _), &var(b, _)) => a == b,
@@ -439,7 +439,7 @@ fn expand_nested_bindings<'r>(bcx: @mut Block,
                                   col: uint,
                                   val: ValueRef)
                               -> ~[Match<'r>] {
-    debug2!("expand_nested_bindings(bcx={}, m={}, col={}, val={})",
+    debug!("expand_nested_bindings(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -486,7 +486,7 @@ fn enter_match<'r>(bcx: @mut Block,
                        val: ValueRef,
                        e: enter_pat)
                     -> ~[Match<'r>] {
-    debug2!("enter_match(bcx={}, m={}, col={}, val={})",
+    debug!("enter_match(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -523,7 +523,7 @@ fn enter_match<'r>(bcx: @mut Block,
         }
     }
 
-    debug2!("result={}", result.repr(bcx.tcx()));
+    debug!("result={}", result.repr(bcx.tcx()));
 
     return result;
 }
@@ -535,7 +535,7 @@ fn enter_default<'r>(bcx: @mut Block,
                      val: ValueRef,
                      chk: FailureHandler)
                       -> ~[Match<'r>] {
-    debug2!("enter_default(bcx={}, m={}, col={}, val={})",
+    debug!("enter_default(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -605,7 +605,7 @@ fn enter_opt<'r>(bcx: @mut Block,
                      variant_size: uint,
                      val: ValueRef)
                   -> ~[Match<'r>] {
-    debug2!("enter_opt(bcx={}, m={}, opt={:?}, col={}, val={})",
+    debug!("enter_opt(bcx={}, m={}, opt={:?}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            *opt,
@@ -741,7 +741,7 @@ fn enter_rec_or_struct<'r>(bcx: @mut Block,
                                fields: &[ast::Ident],
                                val: ValueRef)
                             -> ~[Match<'r>] {
-    debug2!("enter_rec_or_struct(bcx={}, m={}, col={}, val={})",
+    debug!("enter_rec_or_struct(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -776,7 +776,7 @@ fn enter_tup<'r>(bcx: @mut Block,
                      val: ValueRef,
                      n_elts: uint)
                   -> ~[Match<'r>] {
-    debug2!("enter_tup(bcx={}, m={}, col={}, val={})",
+    debug!("enter_tup(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -802,7 +802,7 @@ fn enter_tuple_struct<'r>(bcx: @mut Block,
                               val: ValueRef,
                               n_elts: uint)
                           -> ~[Match<'r>] {
-    debug2!("enter_tuple_struct(bcx={}, m={}, col={}, val={})",
+    debug!("enter_tuple_struct(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -827,7 +827,7 @@ fn enter_box<'r>(bcx: @mut Block,
                      col: uint,
                      val: ValueRef)
                  -> ~[Match<'r>] {
-    debug2!("enter_box(bcx={}, m={}, col={}, val={})",
+    debug!("enter_box(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -854,7 +854,7 @@ fn enter_uniq<'r>(bcx: @mut Block,
                       col: uint,
                       val: ValueRef)
                   -> ~[Match<'r>] {
-    debug2!("enter_uniq(bcx={}, m={}, col={}, val={})",
+    debug!("enter_uniq(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -881,7 +881,7 @@ fn enter_region<'r>(bcx: @mut Block,
                         col: uint,
                         val: ValueRef)
                     -> ~[Match<'r>] {
-    debug2!("enter_region(bcx={}, m={}, col={}, val={})",
+    debug!("enter_region(bcx={}, m={}, col={}, val={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            col,
@@ -1225,7 +1225,7 @@ fn is_fallible(&self) -> bool {
     fn handle_fail(&self) -> BasicBlockRef {
         match *self {
             Infallible => {
-                fail2!("attempted to fail in infallible failure handler!")
+                fail!("attempted to fail in infallible failure handler!")
             }
             JumpToBasicBlock(basic_block) => basic_block,
             CustomFailureHandlerClass(custom_failure_handler) => {
@@ -1376,7 +1376,7 @@ fn insert_lllocals(bcx: @mut Block,
             }
         };
 
-        debug2!("binding {:?} to {}", binding_info.id, bcx.val_to_str(llval));
+        debug!("binding {:?} to {}", binding_info.id, bcx.val_to_str(llval));
         llmap.insert(binding_info.id, llval);
 
         if bcx.sess().opts.extra_debuginfo {
@@ -1397,7 +1397,7 @@ fn compile_guard(bcx: @mut Block,
                      vals: &[ValueRef],
                      chk: FailureHandler)
                   -> @mut Block {
-    debug2!("compile_guard(bcx={}, guard_expr={}, m={}, vals={})",
+    debug!("compile_guard(bcx={}, guard_expr={}, m={}, vals={})",
            bcx.to_str(),
            bcx.expr_to_str(guard_expr),
            m.repr(bcx.tcx()),
@@ -1451,7 +1451,7 @@ fn compile_submatch(bcx: @mut Block,
                     m: &[Match],
                     vals: &[ValueRef],
                     chk: FailureHandler) {
-    debug2!("compile_submatch(bcx={}, m={}, vals={})",
+    debug!("compile_submatch(bcx={}, m={}, vals={})",
            bcx.to_str(),
            m.repr(bcx.tcx()),
            vec_map_to_str(vals, |v| bcx.val_to_str(*v)));
@@ -1617,7 +1617,7 @@ fn compile_submatch_continue(mut bcx: @mut Block,
 
     // Decide what kind of branch we need
     let opts = get_options(bcx, m, col);
-    debug2!("options={:?}", opts);
+    debug!("options={:?}", opts);
     let mut kind = no_branch;
     let mut test_val = val;
     if opts.len() > 0u {
@@ -2104,7 +2104,7 @@ fn bind_irrefutable_pat(bcx: @mut Block,
      * - binding_mode: is this for an argument or a local variable?
      */
 
-    debug2!("bind_irrefutable_pat(bcx={}, pat={}, binding_mode={:?})",
+    debug!("bind_irrefutable_pat(bcx={}, pat={}, binding_mode={:?})",
            bcx.to_str(),
            pat.repr(bcx.tcx()),
            binding_mode);
index ce789ee7ab6550a7c8dc170d025a45b911abdadd..5e64dc5c2e26e4d98f23642a6702c53210db1c60 100644 (file)
@@ -113,13 +113,13 @@ pub fn represent_node(bcx: @mut Block, node: ast::NodeId) -> @Repr {
 
 /// Decides how to represent a given type.
 pub fn represent_type(cx: &mut CrateContext, t: ty::t) -> @Repr {
-    debug2!("Representing: {}", ty_to_str(cx.tcx, t));
+    debug!("Representing: {}", ty_to_str(cx.tcx, t));
     match cx.adt_reprs.find(&t) {
         Some(repr) => return *repr,
         None => { }
     }
     let repr = @represent_type_uncached(cx, t);
-    debug2!("Represented as: {:?}", repr)
+    debug!("Represented as: {:?}", repr)
     cx.adt_reprs.insert(t, repr);
     return repr;
 }
index cfeefc8642c7a8a596cfd7b5aaea58a200dd4ad5..7f809451b35f2d4be8f59f866e66fafe8db6715e 100644 (file)
@@ -85,7 +85,7 @@ pub fn trans_inline_asm(bcx: @mut Block, ia: &ast::inline_asm) -> @mut Block {
         constraints.push_str(clobbers);
     }
 
-    debug2!("Asm Constraints: {:?}", constraints);
+    debug!("Asm Constraints: {:?}", constraints);
 
     let numOutputs = outputs.len();
 
index 6cb63f9e1a16487dfb5fd995b488f73c2f1a4637..df7b09f9db79a991475d0fe15d846ccc0d2232c7 100644 (file)
@@ -122,7 +122,7 @@ fn drop(&mut self) {
 }
 
 pub fn push_ctxt(s: &'static str) -> _InsnCtxt {
-    debug2!("new InsnCtxt: {}", s);
+    debug!("new InsnCtxt: {}", s);
     do local_data::modify(task_local_insn_key) |c| {
         do c.map |mut ctx| {
             ctx.push(s);
@@ -379,7 +379,7 @@ fn require_alloc_fn(bcx: @mut Block, t: ty::t, it: LangItem) -> ast::DefId {
                 (ty::mk_imm_box,
                  require_alloc_fn(bcx, t, ClosureExchangeMallocFnLangItem))
             }
-            _ => fail2!("heap_exchange already handled")
+            _ => fail!("heap_exchange already handled")
         };
 
         // Grab the TypeRef type of box_ptr_ty.
@@ -911,18 +911,18 @@ pub fn invoke(bcx: @mut Block, llfn: ValueRef, llargs: ~[ValueRef],
     }
 
     match bcx.node_info {
-        None => debug2!("invoke at ???"),
+        None => debug!("invoke at ???"),
         Some(node_info) => {
-            debug2!("invoke at {}",
+            debug!("invoke at {}",
                    bcx.sess().codemap.span_to_str(node_info.span));
         }
     }
 
     if need_invoke(bcx) {
         unsafe {
-            debug2!("invoking {} at {}", llfn, bcx.llbb);
+            debug!("invoking {} at {}", llfn, bcx.llbb);
             for &llarg in llargs.iter() {
-                debug2!("arg: {}", llarg);
+                debug!("arg: {}", llarg);
             }
         }
         let normal_bcx = sub_block(bcx, "normal return");
@@ -935,9 +935,9 @@ pub fn invoke(bcx: @mut Block, llfn: ValueRef, llargs: ~[ValueRef],
         return (llresult, normal_bcx);
     } else {
         unsafe {
-            debug2!("calling {} at {}", llfn, bcx.llbb);
+            debug!("calling {} at {}", llfn, bcx.llbb);
             for &llarg in llargs.iter() {
-                debug2!("arg: {}", llarg);
+                debug!("arg: {}", llarg);
             }
         }
         let llresult = Call(bcx, llfn, llargs, attributes);
@@ -1157,7 +1157,7 @@ pub fn ignore_lhs(_bcx: @mut Block, local: &ast::Local) -> bool {
 
 pub fn init_local(bcx: @mut Block, local: &ast::Local) -> @mut Block {
 
-    debug2!("init_local(bcx={}, local.id={:?})",
+    debug!("init_local(bcx={}, local.id={:?})",
            bcx.to_str(), local.id);
     let _indenter = indenter();
 
@@ -1178,7 +1178,7 @@ pub fn init_local(bcx: @mut Block, local: &ast::Local) -> @mut Block {
 
 pub fn trans_stmt(cx: @mut Block, s: &ast::Stmt) -> @mut Block {
     let _icx = push_ctxt("trans_stmt");
-    debug2!("trans_stmt({})", stmt_to_str(s, cx.tcx().sess.intr()));
+    debug!("trans_stmt({})", stmt_to_str(s, cx.tcx().sess.intr()));
 
     if cx.sess().asm_comments() {
         add_span_comment(cx, s.span, stmt_to_str(s, cx.ccx().sess.intr()));
@@ -1341,7 +1341,7 @@ pub fn cleanup_and_leave(bcx: @mut Block,
     let mut bcx = bcx;
     let is_lpad = leave == None;
     loop {
-        debug2!("cleanup_and_leave: leaving {}", cur.to_str());
+        debug!("cleanup_and_leave: leaving {}", cur.to_str());
 
         if bcx.sess().trace() {
             trans_trace(
@@ -1415,7 +1415,7 @@ pub fn cleanup_block(bcx: @mut Block, upto: Option<BasicBlockRef>) -> @mut Block
     let mut cur = bcx;
     let mut bcx = bcx;
     loop {
-        debug2!("cleanup_block: {}", cur.to_str());
+        debug!("cleanup_block: {}", cur.to_str());
 
         if bcx.sess().trace() {
             trans_trace(
@@ -1465,7 +1465,7 @@ pub fn with_scope(bcx: @mut Block,
                   f: &fn(@mut Block) -> @mut Block) -> @mut Block {
     let _icx = push_ctxt("with_scope");
 
-    debug2!("with_scope(bcx={}, opt_node_info={:?}, name={})",
+    debug!("with_scope(bcx={}, opt_node_info={:?}, name={})",
            bcx.to_str(), opt_node_info, name);
     let _indenter = indenter();
 
@@ -1684,7 +1684,7 @@ pub fn new_fn_ctxt_w_id(ccx: @mut CrateContext,
                      -> @mut FunctionContext {
     for p in param_substs.iter() { p.validate(); }
 
-    debug2!("new_fn_ctxt_w_id(path={}, id={:?}, \
+    debug!("new_fn_ctxt_w_id(path={}, id={:?}, \
             param_substs={})",
            path_str(ccx.sess, path),
            id,
@@ -1798,7 +1798,7 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
                             args: &[ast::arg],
                             raw_llargs: &[ValueRef],
                             arg_tys: &[ty::t]) -> @mut Block {
-    debug2!("copy_args_to_allocas: raw_llargs={} arg_tys={}",
+    debug!("copy_args_to_allocas: raw_llargs={} arg_tys={}",
            raw_llargs.llrepr(fcx.ccx),
            arg_tys.repr(fcx.ccx.tcx));
 
@@ -1922,7 +1922,7 @@ pub fn trans_closure(ccx: @mut CrateContext,
     let _icx = push_ctxt("trans_closure");
     set_uwtable(llfndecl);
 
-    debug2!("trans_closure(..., param_substs={})",
+    debug!("trans_closure(..., param_substs={})",
            param_substs.repr(ccx.tcx));
 
     let fcx = new_fn_ctxt_w_id(ccx,
@@ -2002,7 +2002,7 @@ pub fn trans_fn(ccx: @mut CrateContext,
 
     let the_path_str = path_str(ccx.sess, path);
     let _s = StatRecorder::new(ccx, the_path_str);
-    debug2!("trans_fn(self_arg={:?}, param_substs={})",
+    debug!("trans_fn(self_arg={:?}, param_substs={})",
            self_arg,
            param_substs.repr(ccx.tcx));
     let _icx = push_ctxt("trans_fn");
@@ -2038,7 +2038,7 @@ fn insert_synthetic_type_entries(bcx: @mut Block,
 
     let tcx = bcx.tcx();
     for i in range(0u, fn_args.len()) {
-        debug2!("setting type of argument {} (pat node {}) to {}",
+        debug!("setting type of argument {} (pat node {}) to {}",
                i, fn_args[i].pat.id, bcx.ty_to_str(arg_tys[i]));
 
         let pat_id = fn_args[i].pat.id;
@@ -2214,7 +2214,7 @@ pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
     let path = match ccx.tcx.items.get_copy(&item.id) {
         ast_map::node_item(_, p) => p,
         // tjc: ?
-        _ => fail2!("trans_item"),
+        _ => fail!("trans_item"),
     };
     match item.node {
       ast::item_fn(ref decl, purity, _abis, ref generics, ref body) => {
@@ -2357,7 +2357,7 @@ pub fn register_fn(ccx: @mut CrateContext,
             assert!(f.abis.is_rust() || f.abis.is_intrinsic());
             f
         }
-        _ => fail2!("expected bare rust fn or an intrinsic")
+        _ => fail!("expected bare rust fn or an intrinsic")
     };
 
     let llfn = decl_rust_fn(ccx, f.sig.inputs, f.sig.output, sym);
@@ -2373,7 +2373,7 @@ pub fn register_fn_llvmty(ccx: @mut CrateContext,
                           cc: lib::llvm::CallConv,
                           fn_ty: Type)
                           -> ValueRef {
-    debug2!("register_fn_fuller creating fn for item {} with path {}",
+    debug!("register_fn_fuller creating fn for item {} with path {}",
            node_id,
            ast_map::path_to_str(item_path(ccx, &node_id), token::get_ident_interner()));
 
@@ -2452,7 +2452,7 @@ fn create_entry_fn(ccx: @mut CrateContext,
                 };
                 (start_fn, args)
             } else {
-                debug2!("using user-defined start fn");
+                debug!("using user-defined start fn");
                 let args = ~[
                     C_null(Type::opaque_box(ccx).ptr_to()),
                     llvm::LLVMGetParam(llfn, 0 as c_uint),
@@ -2500,7 +2500,7 @@ fn exported_name(ccx: &mut CrateContext, path: path, ty: ty::t, attrs: &[ast::At
 }
 
 pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
-    debug2!("get_item_val(id=`{:?}`)", id);
+    debug!("get_item_val(id=`{:?}`)", id);
 
     let val = ccx.item_vals.find_copy(&id);
     match val {
@@ -2522,10 +2522,10 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
                             // we need to get the symbol from csearch instead of
                             // using the current crate's name/version
                             // information in the hash of the symbol
-                            debug2!("making {}", sym);
+                            debug!("making {}", sym);
                             let sym = match ccx.external_srcs.find(&i.id) {
                                 Some(&did) => {
-                                    debug2!("but found in other crate...");
+                                    debug!("but found in other crate...");
                                     csearch::get_symbol(ccx.sess.cstore, did)
                                 }
                                 None => sym
@@ -2575,7 +2575,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
                                 }
 
                                 if !inlineable {
-                                    debug2!("{} not inlined", sym);
+                                    debug!("{} not inlined", sym);
                                     ccx.non_inlineable_statics.insert(id);
                                 }
                                 ccx.item_symbols.insert(i.id, sym);
@@ -2596,7 +2596,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
                             llfn
                         }
 
-                        _ => fail2!("get_item_val: weird result in table")
+                        _ => fail!("get_item_val: weird result in table")
                     };
 
                     match (attr::first_attr_value_str_by_name(i.attrs, "link_section")) {
@@ -2612,7 +2612,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
                 }
 
                 ast_map::node_trait_method(trait_method, _, pth) => {
-                    debug2!("get_item_val(): processing a node_trait_method");
+                    debug!("get_item_val(): processing a node_trait_method");
                     match *trait_method {
                         ast::required(_) => {
                             ccx.sess.bug("unexpected variant: required trait method in \
@@ -2669,11 +2669,11 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
                                 ast::item_enum(_, _) => {
                                     register_fn(ccx, (*v).span, sym, id, ty)
                                 }
-                                _ => fail2!("node_variant, shouldn't happen")
+                                _ => fail!("node_variant, shouldn't happen")
                             };
                         }
                         ast::struct_variant_kind(_) => {
-                            fail2!("struct variant kind unexpected in get_item_val")
+                            fail!("struct variant kind unexpected in get_item_val")
                         }
                     }
                     set_inline_hint(llfn);
index 1754741a1f4fe86a0f4238c075a7e86a96455c79..2042c6ddad1040885bb1e383c032bbf289da864a 100644 (file)
@@ -29,7 +29,7 @@ pub fn terminate(cx: &mut Block, _: &str) {
 
 pub fn check_not_terminated(cx: &Block) {
     if cx.terminated {
-        fail2!("already terminated!");
+        fail!("already terminated!");
     }
 }
 
@@ -117,7 +117,7 @@ pub fn Invoke(cx: @mut Block,
     }
     check_not_terminated(cx);
     terminate(cx, "Invoke");
-    debug2!("Invoke({} with arguments ({}))",
+    debug!("Invoke({} with arguments ({}))",
            cx.val_to_str(Fn),
            Args.map(|a| cx.val_to_str(*a)).connect(", "));
     B(cx).invoke(Fn, Args, Then, Catch, attributes)
index febe4de730da7188617e8b7d1a7445279c036966..27b1e6b39dc16eaa9a5971abc0140fe6a48f3f60 100644 (file)
@@ -476,7 +476,7 @@ pub fn load_range_assert(&self, ptr: ValueRef, lo: c_ulonglong,
     }
 
     pub fn store(&self, val: ValueRef, ptr: ValueRef) {
-        debug2!("Store {} -> {}",
+        debug!("Store {} -> {}",
                self.ccx.tn.val_to_str(val),
                self.ccx.tn.val_to_str(ptr));
         assert!(is_not_null(self.llbuilder));
@@ -487,7 +487,7 @@ pub fn store(&self, val: ValueRef, ptr: ValueRef) {
     }
 
     pub fn atomic_store(&self, val: ValueRef, ptr: ValueRef, order: AtomicOrdering) {
-        debug2!("Store {} -> {}",
+        debug!("Store {} -> {}",
                self.ccx.tn.val_to_str(val),
                self.ccx.tn.val_to_str(ptr));
         self.count_insn("store.atomic");
@@ -726,7 +726,7 @@ pub fn phi(&self, ty: Type, vals: &[ValueRef], bbs: &[BasicBlockRef]) -> ValueRe
     pub fn add_span_comment(&self, sp: Span, text: &str) {
         if self.ccx.sess.asm_comments() {
             let s = format!("{} ({})", text, self.ccx.sess.codemap.span_to_str(sp));
-            debug2!("{}", s);
+            debug!("{}", s);
             self.add_comment(s);
         }
     }
@@ -758,11 +758,11 @@ pub fn inline_asm_call(&self, asm: *c_char, cons: *c_char,
                          else          { lib::llvm::False };
 
         let argtys = do inputs.map |v| {
-            debug2!("Asm Input Type: {:?}", self.ccx.tn.val_to_str(*v));
+            debug!("Asm Input Type: {:?}", self.ccx.tn.val_to_str(*v));
             val_ty(*v)
         };
 
-        debug2!("Asm Output Type: {:?}", self.ccx.tn.type_to_str(output));
+        debug!("Asm Output Type: {:?}", self.ccx.tn.type_to_str(output));
         let fty = Type::func(argtys, &output);
         unsafe {
             let v = llvm::LLVMInlineAsm(
index 5add2250038fba753d08ee9163db28863eb0633e..736feeb0618a41414428507f6b2ba2fbf72da682 100644 (file)
@@ -51,7 +51,7 @@ fn ty_align(ty: Type) -> uint {
             let elt = ty.element_type();
             ty_align(elt)
         }
-        _ => fail2!("ty_align: unhandled type")
+        _ => fail!("ty_align: unhandled type")
     }
 }
 
@@ -81,7 +81,7 @@ fn ty_size(ty: Type) -> uint {
             let eltsz = ty_size(elt);
             len * eltsz
         }
-        _ => fail2!("ty_size: unhandled type")
+        _ => fail!("ty_size: unhandled type")
     }
 }
 
index 3f2d18ddbe2fc8715b661e46604367699e65470d..e98618c4e0108940c204417e1cdb2a0e38488586 100644 (file)
@@ -51,7 +51,7 @@ fn ty_align(ty: Type) -> uint {
             let elt = ty.element_type();
             ty_align(elt)
         }
-        _ => fail2!("ty_size: unhandled type")
+        _ => fail!("ty_size: unhandled type")
     }
 }
 
@@ -81,7 +81,7 @@ fn ty_size(ty: Type) -> uint {
             let eltsz = ty_size(elt);
             len * eltsz
         }
-        _ => fail2!("ty_size: unhandled type")
+        _ => fail!("ty_size: unhandled type")
     }
 }
 
index b35ffe5c965dcd61de9cca8090810073cb602d0a..1e22c46dd5db5fab27028998c34b8706a4dccb58 100644 (file)
@@ -112,7 +112,7 @@ fn ty_align(ty: Type) -> uint {
                 let elt = ty.element_type();
                 ty_align(elt)
             }
-            _ => fail2!("ty_size: unhandled type")
+            _ => fail!("ty_size: unhandled type")
         }
     }
 
@@ -141,7 +141,7 @@ fn ty_size(ty: Type) -> uint {
                 let eltsz = ty_size(elt);
                 len * eltsz
             }
-            _ => fail2!("ty_size: unhandled type")
+            _ => fail!("ty_size: unhandled type")
         }
     }
 
@@ -232,7 +232,7 @@ fn classify(ty: Type,
                     i += 1u;
                 }
             }
-            _ => fail2!("classify: unhandled type")
+            _ => fail!("classify: unhandled type")
         }
     }
 
@@ -325,7 +325,7 @@ fn llvec_len(cls: &[RegClass]) -> uint {
             SSEDs => {
                 tys.push(Type::f64());
             }
-            _ => fail2!("llregtype: unhandled class")
+            _ => fail!("llregtype: unhandled class")
         }
         i += 1u;
     }
index 839313f7bbe6621fc2e011b5b158a6dd5790a571..7a3a67b35ee1ece8563123138f2cd25995e2ffe2 100644 (file)
@@ -79,7 +79,7 @@ pub struct Callee {
 
 pub fn trans(bcx: @mut Block, expr: &ast::Expr) -> Callee {
     let _icx = push_ctxt("trans_callee");
-    debug2!("callee::trans(expr={})", expr.repr(bcx.tcx()));
+    debug!("callee::trans(expr={})", expr.repr(bcx.tcx()));
 
     // pick out special kinds of expressions that can be called:
     match expr.node {
@@ -180,7 +180,7 @@ pub fn trans_fn_ref(bcx: @mut Block,
 
     let type_params = node_id_type_params(bcx, ref_id);
     let vtables = node_vtables(bcx, ref_id);
-    debug2!("trans_fn_ref(def_id={}, ref_id={:?}, type_params={}, vtables={})",
+    debug!("trans_fn_ref(def_id={}, ref_id={:?}, type_params={}, vtables={})",
            def_id.repr(bcx.tcx()), ref_id, type_params.repr(bcx.tcx()),
            vtables.repr(bcx.tcx()));
     trans_fn_ref_with_vtables(bcx, def_id, ref_id, type_params, vtables)
@@ -266,7 +266,7 @@ pub fn trans_fn_ref_with_vtables(
     let ccx = bcx.ccx();
     let tcx = ccx.tcx;
 
-    debug2!("trans_fn_ref_with_vtables(bcx={}, def_id={}, ref_id={:?}, \
+    debug!("trans_fn_ref_with_vtables(bcx={}, def_id={}, ref_id={:?}, \
             type_params={}, vtables={})",
            bcx.to_str(),
            def_id.repr(bcx.tcx()),
@@ -329,7 +329,7 @@ pub fn trans_fn_ref_with_vtables(
                 resolve_default_method_vtables(bcx, impl_id,
                                                method, &substs, vtables);
 
-            debug2!("trans_fn_with_vtables - default method: \
+            debug!("trans_fn_with_vtables - default method: \
                     substs = {}, trait_subst = {}, \
                     first_subst = {}, new_subst = {}, \
                     vtables = {}, \
@@ -472,7 +472,7 @@ pub fn trans_method_call(in_cx: @mut Block,
                          dest: expr::Dest)
                          -> @mut Block {
     let _icx = push_ctxt("trans_method_call");
-    debug2!("trans_method_call(call_ex={}, rcvr={})",
+    debug!("trans_method_call(call_ex={}, rcvr={})",
            call_ex.repr(in_cx.tcx()),
            rcvr.repr(in_cx.tcx()));
     trans_call_inner(
@@ -483,7 +483,7 @@ pub fn trans_method_call(in_cx: @mut Block,
         |cx| {
             match cx.ccx().maps.method_map.find_copy(&call_ex.id) {
                 Some(origin) => {
-                    debug2!("origin for {}: {}",
+                    debug!("origin for {}: {}",
                            call_ex.repr(in_cx.tcx()),
                            origin.repr(in_cx.tcx()));
 
@@ -562,7 +562,7 @@ pub fn trans_lang_call_with_type_params(bcx: @mut Block,
                                                       substituted);
                     new_llval = PointerCast(callee.bcx, fn_data.llfn, llfnty);
                 }
-                _ => fail2!()
+                _ => fail!()
             }
             Callee { bcx: callee.bcx, data: Fn(FnData { llfn: new_llval }) }
         },
@@ -840,7 +840,7 @@ pub fn trans_arg_expr(bcx: @mut Block,
     let _icx = push_ctxt("trans_arg_expr");
     let ccx = bcx.ccx();
 
-    debug2!("trans_arg_expr(formal_arg_ty=({}), self_mode={:?}, arg_expr={})",
+    debug!("trans_arg_expr(formal_arg_ty=({}), self_mode={:?}, arg_expr={})",
            formal_arg_ty.repr(bcx.tcx()),
            self_mode,
            arg_expr.repr(bcx.tcx()));
@@ -850,7 +850,7 @@ pub fn trans_arg_expr(bcx: @mut Block,
     let arg_datum = arg_datumblock.datum;
     let bcx = arg_datumblock.bcx;
 
-    debug2!("   arg datum: {}", arg_datum.to_str(bcx.ccx()));
+    debug!("   arg datum: {}", arg_datum.to_str(bcx.ccx()));
 
     let mut val;
     if ty::type_is_bot(arg_datum.ty) {
@@ -890,11 +890,11 @@ pub fn trans_arg_expr(bcx: @mut Block,
 
                 val = match self_mode {
                     ty::ByRef => {
-                        debug2!("by ref arg with type {}", bcx.ty_to_str(arg_datum.ty));
+                        debug!("by ref arg with type {}", bcx.ty_to_str(arg_datum.ty));
                         arg_datum.to_ref_llval(bcx)
                     }
                     ty::ByCopy => {
-                        debug2!("by copy arg with type {}", bcx.ty_to_str(arg_datum.ty));
+                        debug!("by copy arg with type {}", bcx.ty_to_str(arg_datum.ty));
                         arg_datum.to_appropriate_llval(bcx)
                     }
                 }
@@ -904,12 +904,12 @@ pub fn trans_arg_expr(bcx: @mut Block,
         if formal_arg_ty != arg_datum.ty {
             // this could happen due to e.g. subtyping
             let llformal_arg_ty = type_of::type_of_explicit_arg(ccx, formal_arg_ty);
-            debug2!("casting actual type ({}) to match formal ({})",
+            debug!("casting actual type ({}) to match formal ({})",
                    bcx.val_to_str(val), bcx.llty_str(llformal_arg_ty));
             val = PointerCast(bcx, val, llformal_arg_ty);
         }
     }
 
-    debug2!("--- trans_arg_expr passing {}", bcx.val_to_str(val));
+    debug!("--- trans_arg_expr passing {}", bcx.val_to_str(val));
     return rslt(bcx, val);
 }
index 875be5d3af54a69091370e4a5e5cb41625c43863..f036f922de9ccf57db9c2298ff2e6d8cc43835e9 100644 (file)
@@ -151,7 +151,7 @@ pub fn mk_closure_tys(tcx: ty::ctxt,
         }
     });
     let cdata_ty = ty::mk_tup(tcx, bound_tys);
-    debug2!("cdata_ty={}", ty_to_str(tcx, cdata_ty));
+    debug!("cdata_ty={}", ty_to_str(tcx, cdata_ty));
     return cdata_ty;
 }
 
@@ -224,12 +224,12 @@ pub fn store_environment(bcx: @mut Block,
     let Result {bcx: bcx, val: llbox} = allocate_cbox(bcx, sigil, cdata_ty);
 
     let llbox = PointerCast(bcx, llbox, llboxptr_ty);
-    debug2!("tuplify_box_ty = {}", ty_to_str(tcx, cbox_ty));
+    debug!("tuplify_box_ty = {}", ty_to_str(tcx, cbox_ty));
 
     // Copy expr values into boxed bindings.
     let mut bcx = bcx;
     for (i, bv) in bound_values.iter().enumerate() {
-        debug2!("Copy {} into closure", bv.to_str(ccx));
+        debug!("Copy {} into closure", bv.to_str(ccx));
 
         if ccx.sess.asm_comments() {
             add_comment(bcx, format!("Copy {} into closure",
@@ -268,7 +268,7 @@ pub fn build_closure(bcx0: @mut Block,
     // Package up the captured upvars
     let mut env_vals = ~[];
     for cap_var in cap_vars.iter() {
-        debug2!("Building closure: captured variable {:?}", *cap_var);
+        debug!("Building closure: captured variable {:?}", *cap_var);
         let datum = expr::trans_local_var(bcx, cap_var.def);
         match cap_var.mode {
             moves::CapRef => {
@@ -384,7 +384,7 @@ pub fn trans_expr_fn(bcx: @mut Block,
     let fty = node_id_type(bcx, outer_id);
     let f = match ty::get(fty).sty {
         ty::ty_closure(ref f) => f,
-        _ => fail2!("expected closure")
+        _ => fail!("expected closure")
     };
 
     let sub_path = vec::append_one(bcx.fcx.path.clone(),
index 6c665f6f6fea3c561edb3ea27fd2421a4ac15e3d..bfea123939a4c4de15fdb0516ad1388a169b8d8d 100644 (file)
@@ -449,7 +449,7 @@ pub fn add_clean(bcx: @mut Block, val: ValueRef, t: ty::t) {
         return
     }
 
-    debug2!("add_clean({}, {}, {})", bcx.to_str(), bcx.val_to_str(val), t.repr(bcx.tcx()));
+    debug!("add_clean({}, {}, {})", bcx.to_str(), bcx.val_to_str(val), t.repr(bcx.tcx()));
 
     let cleanup_type = cleanup_type(bcx.tcx(), t);
     do in_scope_cx(bcx, None) |scope_info| {
@@ -464,7 +464,7 @@ pub fn add_clean(bcx: @mut Block, val: ValueRef, t: ty::t) {
 
 pub fn add_clean_temp_immediate(cx: @mut Block, val: ValueRef, ty: ty::t) {
     if !ty::type_needs_drop(cx.tcx(), ty) { return; }
-    debug2!("add_clean_temp_immediate({}, {}, {})",
+    debug!("add_clean_temp_immediate({}, {}, {})",
            cx.to_str(), cx.val_to_str(val),
            ty.repr(cx.tcx()));
     let cleanup_type = cleanup_type(cx.tcx(), ty);
@@ -493,7 +493,7 @@ pub fn add_clean_temp_mem_in_scope(bcx: @mut Block,
 pub fn add_clean_temp_mem_in_scope_(bcx: @mut Block, scope_id: Option<ast::NodeId>,
                                     val: ValueRef, t: ty::t) {
     if !ty::type_needs_drop(bcx.tcx(), t) { return; }
-    debug2!("add_clean_temp_mem({}, {}, {})",
+    debug!("add_clean_temp_mem({}, {}, {})",
            bcx.to_str(), bcx.val_to_str(val),
            t.repr(bcx.tcx()));
     let cleanup_type = cleanup_type(bcx.tcx(), t);
@@ -522,7 +522,7 @@ pub fn add_clean_return_to_mut(bcx: @mut Block,
     //! box was frozen initially. Here, both `frozen_val_ref` and
     //! `bits_val_ref` are in fact pointers to stack slots.
 
-    debug2!("add_clean_return_to_mut({}, {}, {})",
+    debug!("add_clean_return_to_mut({}, {}, {})",
            bcx.to_str(),
            bcx.val_to_str(frozen_val_ref),
            bcx.val_to_str(bits_val_ref));
@@ -776,7 +776,7 @@ pub fn in_scope_cx(cx: @mut Block, scope_id: Option<ast::NodeId>, f: &fn(si: &mu
             Some(inf) => match scope_id {
                 Some(wanted) => match inf.node_info {
                     Some(NodeInfo { id: actual, _ }) if wanted == actual => {
-                        debug2!("in_scope_cx: selected cur={} (cx={})",
+                        debug!("in_scope_cx: selected cur={} (cx={})",
                                cur.to_str(), cx.to_str());
                         f(inf);
                         return;
@@ -784,7 +784,7 @@ pub fn in_scope_cx(cx: @mut Block, scope_id: Option<ast::NodeId>, f: &fn(si: &mu
                     _ => inf.parent,
                 },
                 None => {
-                    debug2!("in_scope_cx: selected cur={} (cx={})",
+                    debug!("in_scope_cx: selected cur={} (cx={})",
                            cur.to_str(), cx.to_str());
                     f(inf);
                     return;
@@ -987,7 +987,7 @@ pub fn const_get_elt(cx: &CrateContext, v: ValueRef, us: &[c_uint])
             llvm::LLVMConstExtractValue(v, p, len as c_uint)
         };
 
-        debug2!("const_get_elt(v={}, us={:?}, r={})",
+        debug!("const_get_elt(v={}, us={:?}, r={})",
                cx.tn.val_to_str(v), us, cx.tn.val_to_str(r));
 
         return r;
@@ -1230,7 +1230,7 @@ pub fn find_vtable(tcx: ty::ctxt,
                    n_param: typeck::param_index,
                    n_bound: uint)
                    -> typeck::vtable_origin {
-    debug2!("find_vtable(n_param={:?}, n_bound={}, ps={})",
+    debug!("find_vtable(n_param={:?}, n_bound={}, ps={})",
            n_param, n_bound, ps.repr(tcx));
 
     let param_bounds = match n_param {
index 2b473d2b6e1768d342671083b4e24dd52409dae9..219307786568d1143865c0aed8a29ac44064dcf5 100644 (file)
@@ -245,7 +245,7 @@ pub fn builder(@mut self) -> Builder {
     pub fn const_inbounds_gepi(&self,
                                pointer: ValueRef,
                                indices: &[uint]) -> ValueRef {
-        debug2!("const_inbounds_gepi: pointer={} indices={:?}",
+        debug!("const_inbounds_gepi: pointer={} indices={:?}",
                self.tn.val_to_str(pointer), indices);
         let v: ~[ValueRef] =
             indices.iter().map(|i| C_i32(*i as i32)).collect();
index 105cb6e5606db60772d51a4fc2880f8b9dc8a853..ec00f144308285d443151e18e6062c2014a1a957 100644 (file)
@@ -50,7 +50,7 @@ pub fn trans_if(bcx: @mut Block,
             els: Option<@ast::Expr>,
             dest: expr::Dest)
          -> @mut Block {
-    debug2!("trans_if(bcx={}, cond={}, thn={:?}, dest={})",
+    debug!("trans_if(bcx={}, cond={}, thn={:?}, dest={})",
            bcx.to_str(), bcx.expr_to_str(cond), thn.id,
            dest.to_str(bcx.ccx()));
     let _indenter = indenter();
@@ -119,7 +119,7 @@ pub fn trans_if(bcx: @mut Block,
       }
     };
 
-    debug2!("then_bcx_in={}, else_bcx_in={}",
+    debug!("then_bcx_in={}, else_bcx_in={}",
            then_bcx_in.to_str(), else_bcx_in.to_str());
 
     CondBr(bcx, cond_val, then_bcx_in.llbb, else_bcx_in.llbb);
index 294f3379f84f63f7c199aa5de50307479524f8bb..d57c24e37d57e61f5202dbcfa66a93794aad1247 100644 (file)
@@ -242,7 +242,7 @@ pub fn store_to_datum(&self,
                           action: CopyAction,
                           datum: Datum)
                           -> @mut Block {
-        debug2!("store_to_datum(self={}, action={:?}, datum={})",
+        debug!("store_to_datum(self={}, action={:?}, datum={})",
                self.to_str(bcx.ccx()), action, datum.to_str(bcx.ccx()));
         assert!(datum.mode.is_by_ref());
         self.store_to(bcx, action, datum.val)
@@ -275,7 +275,7 @@ pub fn copy_to(&self, bcx: @mut Block, action: CopyAction, dst: ValueRef)
             return bcx;
         }
 
-        debug2!("copy_to(self={}, action={:?}, dst={})",
+        debug!("copy_to(self={}, action={:?}, dst={})",
                self.to_str(bcx.ccx()), action, bcx.val_to_str(dst));
 
         // Watch out for the case where we are writing the copying the
@@ -340,7 +340,7 @@ pub fn move_to(&self, bcx: @mut Block, action: CopyAction, dst: ValueRef)
         let _icx = push_ctxt("move_to");
         let mut bcx = bcx;
 
-        debug2!("move_to(self={}, action={:?}, dst={})",
+        debug!("move_to(self={}, action={:?}, dst={})",
                self.to_str(bcx.ccx()), action, bcx.val_to_str(dst));
 
         if ty::type_is_voidish(bcx.tcx(), self.ty) {
@@ -607,7 +607,7 @@ pub fn try_deref(&self,
                      -> (Option<Datum>, @mut Block) {
         let ccx = bcx.ccx();
 
-        debug2!("try_deref(expr_id={:?}, derefs={:?}, is_auto={}, self={:?})",
+        debug!("try_deref(expr_id={:?}, derefs={:?}, is_auto={}, self={:?})",
                expr_id, derefs, is_auto, self.to_str(bcx.ccx()));
 
         let bcx =
@@ -732,7 +732,7 @@ pub fn autoderef(&self,
                      -> DatumBlock {
         let _icx = push_ctxt("autoderef");
 
-        debug2!("autoderef(expr_id={}, max={:?}, self={:?})",
+        debug!("autoderef(expr_id={}, max={:?}, self={:?})",
                expr_id, max, self.to_str(bcx.ccx()));
         let _indenter = indenter();
 
index 7ccca6df000fac0dddef063a136d99bb40a5b72c..2138afd2e9bb568b700f8672dccf58a9865b7ebe 100644 (file)
@@ -146,7 +146,7 @@ pub struct CrateDebugContext {
 
 impl CrateDebugContext {
     pub fn new(llmod: ModuleRef, crate: ~str) -> CrateDebugContext {
-        debug2!("CrateDebugContext::new");
+        debug!("CrateDebugContext::new");
         let builder = unsafe { llvm::LLVMDIBuilderCreate(llmod) };
         // DIBuilder inherits context from the module, so we'd better use the same one
         let llcontext = unsafe { llvm::LLVMGetModuleContext(llmod) };
@@ -234,7 +234,7 @@ pub fn finalize(cx: @mut CrateContext) {
         return;
     }
 
-    debug2!("finalize");
+    debug!("finalize");
     compile_unit_metadata(cx);
     unsafe {
         llvm::LLVMDIBuilderFinalize(DIB(cx));
@@ -497,7 +497,7 @@ pub fn set_source_location(fcx: &FunctionContext,
 
     let cx = fcx.ccx;
 
-    debug2!("set_source_location: {}", cx.sess.codemap.span_to_str(span));
+    debug!("set_source_location: {}", cx.sess.codemap.span_to_str(span));
 
     if fcx.debug_context.get_ref(cx, span).source_locations_enabled {
         let loc = span_start(cx, span);
@@ -857,7 +857,7 @@ fn compile_unit_metadata(cx: @mut CrateContext) {
     let dcx = debug_context(cx);
     let crate_name: &str = dcx.crate_file;
 
-    debug2!("compile_unit_metadata: {:?}", crate_name);
+    debug!("compile_unit_metadata: {:?}", crate_name);
 
     // FIXME (#9639): This needs to handle non-utf8 paths
     let work_dir = cx.sess.working_dir.as_str().unwrap();
@@ -968,7 +968,7 @@ fn file_metadata(cx: &mut CrateContext, full_path: &str) -> DIFile {
         None => ()
     }
 
-    debug2!("file_metadata: {}", full_path);
+    debug!("file_metadata: {}", full_path);
 
     // FIXME (#9639): This needs to handle non-utf8 paths
     let work_dir = cx.sess.working_dir.as_str().unwrap();
@@ -1011,7 +1011,7 @@ fn scope_metadata(fcx: &FunctionContext,
 
 fn basic_type_metadata(cx: &mut CrateContext, t: ty::t) -> DIType {
 
-    debug2!("basic_type_metadata: {:?}", ty::get(t));
+    debug!("basic_type_metadata: {:?}", ty::get(t));
 
     let (name, encoding) = match ty::get(t).sty {
         ty::ty_nil | ty::ty_bot => (~"uint", DW_ATE_unsigned),
@@ -1849,7 +1849,7 @@ fn vec_slice_metadata(cx: &mut CrateContext,
                       span: Span)
                    -> DICompositeType {
 
-    debug2!("vec_slice_metadata: {:?}", ty::get(vec_type));
+    debug!("vec_slice_metadata: {:?}", ty::get(vec_type));
 
     let slice_llvm_type = type_of::type_of(cx, vec_type);
     let slice_type_name = ppaux::ty_to_str(cx.tcx, vec_type);
@@ -1964,7 +1964,7 @@ fn trait_metadata(cx: &mut CrateContext,
 }
 
 fn unimplemented_type_metadata(cx: &mut CrateContext, t: ty::t) -> DIType {
-    debug2!("unimplemented_type_metadata: {:?}", ty::get(t));
+    debug!("unimplemented_type_metadata: {:?}", ty::get(t));
 
     let name = ppaux::ty_to_str(cx.tcx, t);
     let metadata = do format!("NYI<{}>", name).with_c_str |name| {
@@ -2016,7 +2016,7 @@ fn create_pointer_to_box_metadata(cx: &mut CrateContext,
         pointer_type_metadata(cx, pointer_type, box_metadata)
     }
 
-    debug2!("type_metadata: {:?}", ty::get(t));
+    debug!("type_metadata: {:?}", ty::get(t));
 
     let sty = &ty::get(t).sty;
     let type_metadata = match *sty {
@@ -2135,7 +2135,7 @@ fn set_debug_location(cx: &mut CrateContext, debug_location: DebugLocation) {
 
     match debug_location {
         KnownLocation { scope, line, col } => {
-            debug2!("setting debug location to {} {}", line, col);
+            debug!("setting debug location to {} {}", line, col);
             let elements = [C_i32(line as i32), C_i32(col as i32), scope, ptr::null()];
             unsafe {
                 metadata_node = llvm::LLVMMDNodeInContext(debug_context(cx).llcontext,
@@ -2144,7 +2144,7 @@ fn set_debug_location(cx: &mut CrateContext, debug_location: DebugLocation) {
             }
         }
         UnknownLocation => {
-            debug2!("clearing debug location ");
+            debug!("clearing debug location ");
             metadata_node = ptr::null();
         }
     };
index 48d3e3f7c58b893d4c4f62ae805ea11ecd7b629f..238b15fe5979fb05308c5fcf3e10e81ac1f0b541 100644 (file)
@@ -183,7 +183,7 @@ fn drop_and_cancel_clean(bcx: @mut Block, dat: Datum) -> @mut Block {
 }
 
 pub fn trans_to_datum(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
-    debug2!("trans_to_datum(expr={})", bcx.expr_to_str(expr));
+    debug!("trans_to_datum(expr={})", bcx.expr_to_str(expr));
 
     let mut bcx = bcx;
     let mut datum = unpack_datum!(bcx, trans_to_datum_unadjusted(bcx, expr));
@@ -191,7 +191,7 @@ pub fn trans_to_datum(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
         None => { return DatumBlock {bcx: bcx, datum: datum}; }
         Some(adj) => { adj }
     };
-    debug2!("unadjusted datum: {}", datum.to_str(bcx.ccx()));
+    debug!("unadjusted datum: {}", datum.to_str(bcx.ccx()));
     match *adjustment {
         AutoAddEnv(*) => {
             datum = unpack_datum!(bcx, add_env(bcx, expr, datum));
@@ -233,7 +233,7 @@ pub fn trans_to_datum(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
             };
         }
     }
-    debug2!("after adjustments, datum={}", datum.to_str(bcx.ccx()));
+    debug!("after adjustments, datum={}", datum.to_str(bcx.ccx()));
     return DatumBlock {bcx: bcx, datum: datum};
 
     fn auto_ref(bcx: @mut Block, datum: Datum) -> DatumBlock {
@@ -289,7 +289,7 @@ fn add_env(bcx: @mut Block, expr: &ast::Expr, datum: Datum) -> DatumBlock {
 
         let tcx = bcx.tcx();
         let closure_ty = expr_ty_adjusted(bcx, expr);
-        debug2!("add_env(closure_ty={})", closure_ty.repr(tcx));
+        debug!("add_env(closure_ty={})", closure_ty.repr(tcx));
         let scratch = scratch_datum(bcx, closure_ty, "__adjust", false);
         let llfn = GEPi(bcx, scratch.val, [0u, abi::fn_field_code]);
         assert_eq!(datum.appropriate_mode(bcx.ccx()), ByValue);
@@ -313,7 +313,7 @@ fn auto_borrow_obj(mut bcx: @mut Block,
                        source_datum: Datum) -> DatumBlock {
         let tcx = bcx.tcx();
         let target_obj_ty = expr_ty_adjusted(bcx, expr);
-        debug2!("auto_borrow_obj(target={})",
+        debug!("auto_borrow_obj(target={})",
                target_obj_ty.repr(tcx));
 
         // Extract source store information
@@ -434,7 +434,7 @@ pub fn trans_into(bcx: @mut Block, expr: &ast::Expr, dest: Dest) -> @mut Block {
 
     let ty = expr_ty(bcx, expr);
 
-    debug2!("trans_into_unadjusted(expr={}, dest={})",
+    debug!("trans_into_unadjusted(expr={}, dest={})",
            bcx.expr_to_str(expr),
            dest.to_str(bcx.ccx()));
     let _indenter = indenter();
@@ -450,7 +450,7 @@ pub fn trans_into(bcx: @mut Block, expr: &ast::Expr, dest: Dest) -> @mut Block {
     };
 
     let kind = bcx.expr_kind(expr);
-    debug2!("expr kind = {:?}", kind);
+    debug!("expr kind = {:?}", kind);
     return match kind {
         ty::LvalueExpr => {
             let datumblock = trans_lvalue_unadjusted(bcx, expr);
@@ -508,7 +508,7 @@ fn trans_to_datum_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
 
     let mut bcx = bcx;
 
-    debug2!("trans_to_datum_unadjusted(expr={})", bcx.expr_to_str(expr));
+    debug!("trans_to_datum_unadjusted(expr={})", bcx.expr_to_str(expr));
     let _indenter = indenter();
 
     debuginfo::set_source_location(bcx.fcx, expr.id, expr.span);
@@ -720,7 +720,7 @@ fn trans_rvalue_dps_unadjusted(bcx: @mut Block, expr: &ast::Expr,
         ast::ExprFnBlock(ref decl, ref body) => {
             let expr_ty = expr_ty(bcx, expr);
             let sigil = ty::ty_closure_sigil(expr_ty);
-            debug2!("translating fn_block {} with type {}",
+            debug!("translating fn_block {} with type {}",
                    expr_to_str(expr, tcx.sess.intr()),
                    expr_ty.repr(tcx));
             return closure::trans_expr_fn(bcx, sigil, decl, body,
@@ -889,7 +889,7 @@ fn trans_lvalue_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
     let _icx = push_ctxt("trans_lval");
     let mut bcx = bcx;
 
-    debug2!("trans_lvalue(expr={})", bcx.expr_to_str(expr));
+    debug!("trans_lvalue(expr={})", bcx.expr_to_str(expr));
     let _indenter = indenter();
 
     trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
@@ -977,8 +977,8 @@ fn trans_index(bcx: @mut Block,
         let (bcx, base, len) =
             base_datum.get_vec_base_and_len(bcx, index_expr.span, index_expr.id, 0);
 
-        debug2!("trans_index: base {}", bcx.val_to_str(base));
-        debug2!("trans_index: len {}", bcx.val_to_str(len));
+        debug!("trans_index: base {}", bcx.val_to_str(base));
+        debug!("trans_index: len {}", bcx.val_to_str(len));
 
         let bounds_check = ICmp(bcx, lib::llvm::IntUGE, ix_val, len);
         let bcx = do with_cond(bcx, bounds_check) |bcx| {
@@ -1109,7 +1109,7 @@ pub fn trans_local_var(bcx: @mut Block, def: ast::Def) -> Datum {
                 }
             };
 
-            debug2!("def_self() reference, self_info.t={}",
+            debug!("def_self() reference, self_info.t={}",
                    self_info.t.repr(bcx.tcx()));
 
             Datum {
@@ -1135,7 +1135,7 @@ fn take_local(bcx: @mut Block,
             }
         };
         let ty = node_id_type(bcx, nid);
-        debug2!("take_local(nid={:?}, v={}, ty={})",
+        debug!("take_local(nid={:?}, v={}, ty={})",
                nid, bcx.val_to_str(v), bcx.ty_to_str(ty));
         Datum {
             val: v,
@@ -1756,7 +1756,7 @@ fn trans_assign_op(bcx: @mut Block,
     let _icx = push_ctxt("trans_assign_op");
     let mut bcx = bcx;
 
-    debug2!("trans_assign_op(expr={})", bcx.expr_to_str(expr));
+    debug!("trans_assign_op(expr={})", bcx.expr_to_str(expr));
 
     // Evaluate LHS (destination), which should be an lvalue
     let dst_datum = unpack_datum!(bcx, trans_lvalue_unadjusted(bcx, dst));
index 09dd2f21a3b029b893b5124d38674a9cdb6bad10..7f8f1daebc48a020fcbcf00bb37e56a9c4d2b851 100644 (file)
@@ -110,7 +110,7 @@ pub fn register_foreign_item_fn(ccx: @mut CrateContext,
      * Just adds a LLVM global.
      */
 
-    debug2!("register_foreign_item_fn(abis={}, \
+    debug!("register_foreign_item_fn(abis={}, \
             path={}, \
             foreign_item.id={:?})",
            abis.repr(ccx.tcx),
@@ -165,7 +165,7 @@ pub fn trans_native_call(bcx: @mut Block,
     let ccx = bcx.ccx();
     let tcx = bcx.tcx();
 
-    debug2!("trans_native_call(callee_ty={}, \
+    debug!("trans_native_call(callee_ty={}, \
             llfn={}, \
             llretptr={})",
            callee_ty.repr(tcx),
@@ -210,7 +210,7 @@ pub fn trans_native_call(bcx: @mut Block,
         // Does Rust pass this argument by pointer?
         let rust_indirect = type_of::arg_is_indirect(ccx, fn_sig.inputs[i]);
 
-        debug2!("argument {}, llarg_rust={}, rust_indirect={}, arg_ty={}",
+        debug!("argument {}, llarg_rust={}, rust_indirect={}, arg_ty={}",
                i,
                ccx.tn.val_to_str(llarg_rust),
                rust_indirect,
@@ -224,7 +224,7 @@ pub fn trans_native_call(bcx: @mut Block,
             llarg_rust = scratch;
         }
 
-        debug2!("llarg_rust={} (after indirection)",
+        debug!("llarg_rust={} (after indirection)",
                ccx.tn.val_to_str(llarg_rust));
 
         // Check whether we need to do any casting
@@ -233,7 +233,7 @@ pub fn trans_native_call(bcx: @mut Block,
             None => ()
         }
 
-        debug2!("llarg_rust={} (after casting)",
+        debug!("llarg_rust={} (after casting)",
                ccx.tn.val_to_str(llarg_rust));
 
         // Finally, load the value if needed for the foreign ABI
@@ -244,7 +244,7 @@ pub fn trans_native_call(bcx: @mut Block,
             Load(bcx, llarg_rust)
         };
 
-        debug2!("argument {}, llarg_foreign={}",
+        debug!("argument {}, llarg_foreign={}",
                i, ccx.tn.val_to_str(llarg_foreign));
 
         // fill padding with undef value
@@ -289,10 +289,10 @@ pub fn trans_native_call(bcx: @mut Block,
             None => fn_type.ret_ty.ty
         };
 
-        debug2!("llretptr={}", ccx.tn.val_to_str(llretptr));
-        debug2!("llforeign_retval={}", ccx.tn.val_to_str(llforeign_retval));
-        debug2!("llrust_ret_ty={}", ccx.tn.type_to_str(llrust_ret_ty));
-        debug2!("llforeign_ret_ty={}", ccx.tn.type_to_str(llforeign_ret_ty));
+        debug!("llretptr={}", ccx.tn.val_to_str(llretptr));
+        debug!("llforeign_retval={}", ccx.tn.val_to_str(llforeign_retval));
+        debug!("llrust_ret_ty={}", ccx.tn.type_to_str(llrust_ret_ty));
+        debug!("llforeign_ret_ty={}", ccx.tn.type_to_str(llforeign_ret_ty));
 
         if llrust_ret_ty == llforeign_ret_ty {
             Store(bcx, llforeign_retval, llretptr);
@@ -318,7 +318,7 @@ pub fn trans_native_call(bcx: @mut Block,
             let llforeign_align = machine::llalign_of_min(ccx, llforeign_ret_ty);
             let llrust_align = machine::llalign_of_min(ccx, llrust_ret_ty);
             let llalign = uint::min(llforeign_align, llrust_align);
-            debug2!("llrust_size={:?}", llrust_size);
+            debug!("llrust_size={:?}", llrust_size);
             base::call_memcpy(bcx, llretptr_i8, llscratch_i8,
                               C_uint(ccx, llrust_size), llalign as u32);
         }
@@ -377,7 +377,7 @@ pub fn register_rust_fn_with_foreign_abi(ccx: @mut CrateContext,
                                         lib::llvm::CCallConv,
                                         llfn_ty);
     add_argument_attributes(&tys, llfn);
-    debug2!("register_rust_fn_with_foreign_abi(node_id={:?}, llfn_ty={}, llfn={})",
+    debug!("register_rust_fn_with_foreign_abi(node_id={:?}, llfn_ty={}, llfn={})",
            node_id, ccx.tn.type_to_str(llfn_ty), ccx.tn.val_to_str(llfn));
     llfn
 }
@@ -430,7 +430,7 @@ fn build_rust_fn(ccx: @mut CrateContext,
             }
         };
 
-        debug2!("build_rust_fn: path={} id={:?} t={}",
+        debug!("build_rust_fn: path={} id={:?} t={}",
                path.repr(tcx),
                id,
                t.repr(tcx));
@@ -457,7 +457,7 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
             "foreign::trans_rust_fn_with_foreign_abi::build_wrap_fn");
         let tcx = ccx.tcx;
 
-        debug2!("build_wrap_fn(llrustfn={}, llwrapfn={})",
+        debug!("build_wrap_fn(llrustfn={}, llwrapfn={})",
                ccx.tn.val_to_str(llrustfn),
                ccx.tn.val_to_str(llwrapfn));
 
@@ -512,14 +512,14 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
             // alloca some scratch space on the stack.
             match foreign_outptr {
                 Some(llforeign_outptr) => {
-                    debug2!("out pointer, foreign={}",
+                    debug!("out pointer, foreign={}",
                            ccx.tn.val_to_str(llforeign_outptr));
                     let llrust_retptr =
                         llvm::LLVMBuildBitCast(builder,
                                                llforeign_outptr,
                                                llrust_ret_ty.ptr_to().to_ref(),
                                                noname());
-                    debug2!("out pointer, foreign={} (casted)",
+                    debug!("out pointer, foreign={} (casted)",
                            ccx.tn.val_to_str(llrust_retptr));
                     llrust_args.push(llrust_retptr);
                     return_alloca = None;
@@ -532,7 +532,7 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
                                                       llrust_ret_ty.to_ref(),
                                                       s))
                     };
-                    debug2!("out pointer, \
+                    debug!("out pointer, \
                             allocad={}, \
                             llrust_ret_ty={}, \
                             return_ty={}",
@@ -552,7 +552,7 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
 
         // Push an (null) env pointer
         let env_pointer = base::null_env_ptr(ccx);
-        debug2!("env pointer={}", ccx.tn.val_to_str(env_pointer));
+        debug!("env pointer={}", ccx.tn.val_to_str(env_pointer));
         llrust_args.push(env_pointer);
 
         // Build up the arguments to the call to the rust function.
@@ -569,9 +569,9 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
             let foreign_index = next_foreign_arg(llforeign_arg_ty.pad.is_some());
             let mut llforeign_arg = llvm::LLVMGetParam(llwrapfn, foreign_index);
 
-            debug2!("llforeign_arg \\#{}: {}",
+            debug!("llforeign_arg \\#{}: {}",
                    i, ccx.tn.val_to_str(llforeign_arg));
-            debug2!("rust_indirect = {}, foreign_indirect = {}",
+            debug!("rust_indirect = {}, foreign_indirect = {}",
                    rust_indirect, foreign_indirect);
 
             // Ensure that the foreign argument is indirect (by
@@ -602,14 +602,14 @@ unsafe fn build_wrap_fn(ccx: @mut CrateContext,
                 llvm::LLVMBuildLoad(builder, llforeign_arg, noname())
             };
 
-            debug2!("llrust_arg \\#{}: {}",
+            debug!("llrust_arg \\#{}: {}",
                    i, ccx.tn.val_to_str(llrust_arg));
             llrust_args.push(llrust_arg);
         }
 
         // Perform the call itself
         let llrust_ret_val = do llrust_args.as_imm_buf |ptr, len| {
-            debug2!("calling llrustfn = {}", ccx.tn.val_to_str(llrustfn));
+            debug!("calling llrustfn = {}", ccx.tn.val_to_str(llrustfn));
             llvm::LLVMBuildCall(builder, llrustfn, ptr,
                                 len as c_uint, noname())
         };
@@ -737,7 +737,7 @@ fn foreign_types_for_fn_ty(ccx: &mut CrateContext,
                                        llsig.llarg_tys,
                                        llsig.llret_ty,
                                        ret_def);
-    debug2!("foreign_types_for_fn_ty(\
+    debug!("foreign_types_for_fn_ty(\
            ty={}, \
            llsig={} -> {}, \
            fn_ty={} -> {}, \
index 01470b13e3ae79360bc14a0010a1a64f8dd292dd..aaa187931c967085075ff5bb3a50fb0a645faf03 100644 (file)
@@ -213,12 +213,12 @@ pub fn lazily_emit_tydesc_glue(ccx: @mut CrateContext,
         match ti.take_glue {
           Some(_) => (),
           None => {
-            debug2!("+++ lazily_emit_tydesc_glue TAKE {}",
+            debug!("+++ lazily_emit_tydesc_glue TAKE {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
             let glue_fn = declare_generic_glue(ccx, ti.ty, llfnty, "take");
             ti.take_glue = Some(glue_fn);
             make_generic_glue(ccx, ti.ty, glue_fn, make_take_glue, "take");
-            debug2!("--- lazily_emit_tydesc_glue TAKE {}",
+            debug!("--- lazily_emit_tydesc_glue TAKE {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
           }
         }
@@ -226,12 +226,12 @@ pub fn lazily_emit_tydesc_glue(ccx: @mut CrateContext,
         match ti.drop_glue {
           Some(_) => (),
           None => {
-            debug2!("+++ lazily_emit_tydesc_glue DROP {}",
+            debug!("+++ lazily_emit_tydesc_glue DROP {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
             let glue_fn = declare_generic_glue(ccx, ti.ty, llfnty, "drop");
             ti.drop_glue = Some(glue_fn);
             make_generic_glue(ccx, ti.ty, glue_fn, make_drop_glue, "drop");
-            debug2!("--- lazily_emit_tydesc_glue DROP {}",
+            debug!("--- lazily_emit_tydesc_glue DROP {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
           }
         }
@@ -239,12 +239,12 @@ pub fn lazily_emit_tydesc_glue(ccx: @mut CrateContext,
         match ti.free_glue {
           Some(_) => (),
           None => {
-            debug2!("+++ lazily_emit_tydesc_glue FREE {}",
+            debug!("+++ lazily_emit_tydesc_glue FREE {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
             let glue_fn = declare_generic_glue(ccx, ti.ty, llfnty, "free");
             ti.free_glue = Some(glue_fn);
             make_generic_glue(ccx, ti.ty, glue_fn, make_free_glue, "free");
-            debug2!("--- lazily_emit_tydesc_glue FREE {}",
+            debug!("--- lazily_emit_tydesc_glue FREE {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
           }
         }
@@ -252,12 +252,12 @@ pub fn lazily_emit_tydesc_glue(ccx: @mut CrateContext,
         match ti.visit_glue {
           Some(_) => (),
           None => {
-            debug2!("+++ lazily_emit_tydesc_glue VISIT {}",
+            debug!("+++ lazily_emit_tydesc_glue VISIT {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
             let glue_fn = declare_generic_glue(ccx, ti.ty, llfnty, "visit");
             ti.visit_glue = Some(glue_fn);
             make_generic_glue(ccx, ti.ty, glue_fn, make_visit_glue, "visit");
-            debug2!("--- lazily_emit_tydesc_glue VISIT {}",
+            debug!("--- lazily_emit_tydesc_glue VISIT {}",
                    ppaux::ty_to_str(ccx.tcx, ti.ty));
           }
         }
@@ -640,7 +640,7 @@ pub fn declare_tydesc(ccx: &mut CrateContext, t: ty::t) -> @mut tydesc_info {
     let llalign = llalign_of(ccx, llty);
     let name = mangle_internal_name_by_type_and_seq(ccx, t, "tydesc").to_managed();
     note_unique_llvm_symbol(ccx, name);
-    debug2!("+++ declare_tydesc {} {}", ppaux::ty_to_str(ccx.tcx, t), name);
+    debug!("+++ declare_tydesc {} {}", ppaux::ty_to_str(ccx.tcx, t), name);
     let gvar = do name.with_c_str |buf| {
         unsafe {
             llvm::LLVMAddGlobal(ccx.llmod, ccx.tydesc_type.to_ref(), buf)
@@ -661,7 +661,7 @@ pub fn declare_tydesc(ccx: &mut CrateContext, t: ty::t) -> @mut tydesc_info {
         free_glue: None,
         visit_glue: None
     };
-    debug2!("--- declare_tydesc {}", ppaux::ty_to_str(ccx.tcx, t));
+    debug!("--- declare_tydesc {}", ppaux::ty_to_str(ccx.tcx, t));
     return inf;
 }
 
@@ -671,7 +671,7 @@ pub fn declare_generic_glue(ccx: &mut CrateContext, t: ty::t, llfnty: Type,
                             name: &str) -> ValueRef {
     let _icx = push_ctxt("declare_generic_glue");
     let fn_nm = mangle_internal_name_by_type_and_seq(ccx, t, (~"glue_" + name)).to_managed();
-    debug2!("{} is for type {}", fn_nm, ppaux::ty_to_str(ccx.tcx, t));
+    debug!("{} is for type {}", fn_nm, ppaux::ty_to_str(ccx.tcx, t));
     note_unique_llvm_symbol(ccx, fn_nm);
     let llfn = decl_cdecl_fn(ccx.llmod, fn_nm, llfnty);
     set_glue_inlining(llfn, t);
@@ -771,7 +771,7 @@ pub fn emit_tydescs(ccx: &mut CrateContext) {
               }
             };
 
-        debug2!("ti.borrow_offset: {}", ccx.tn.val_to_str(ti.borrow_offset));
+        debug!("ti.borrow_offset: {}", ccx.tn.val_to_str(ti.borrow_offset));
 
         let tydesc = C_named_struct(ccx.tydesc_type,
                                     [ti.size, // size
index 41a835fcab957faa6a7802907c677186d3c2e667..a5be9a3ca5e141c3b1f2c5c63a52d77f3b948adb 100644 (file)
@@ -29,7 +29,7 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::DefId)
     match ccx.external.find(&fn_id) {
         Some(&Some(node_id)) => {
             // Already inline
-            debug2!("maybe_instantiate_inline({}): already inline as node id {}",
+            debug!("maybe_instantiate_inline({}): already inline as node id {}",
                    ty::item_path_str(ccx.tcx, fn_id), node_id);
             return local_def(node_id);
         }
@@ -141,7 +141,7 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::DefId)
                   _ => {
                       let self_ty = ty::node_id_to_type(ccx.tcx,
                                                         mth.self_id);
-                      debug2!("calling inline trans_fn with self_ty {}",
+                      debug!("calling inline trans_fn with self_ty {}",
                              ty_to_str(ccx.tcx, self_ty));
                       match mth.explicit_self.node {
                           ast::sty_value => impl_self(self_ty, ty::ByRef),
index 6334677a40695cc3e40871fe6f32322887e75083..e627f39f201711f109fccd7bbe13a483e9f57b1e 100644 (file)
@@ -41,7 +41,7 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
                        substs: @param_substs,
                        attributes: &[ast::Attribute],
                        ref_id: Option<ast::NodeId>) {
-    debug2!("trans_intrinsic(item.ident={})", ccx.sess.str_of(item.ident));
+    debug!("trans_intrinsic(item.ident={})", ccx.sess.str_of(item.ident));
 
     fn simple_llvm_intrinsic(bcx: @mut Block, name: &'static str, num_args: uint) {
         assert!(num_args <= 4);
@@ -311,7 +311,7 @@ fn count_zeros_intrinsic(bcx: @mut Block, name: &'static str) {
             if in_type_size != out_type_size {
                 let sp = match ccx.tcx.items.get_copy(&ref_id.unwrap()) {
                     ast_map::node_expr(e) => e.span,
-                    _ => fail2!("transmute has non-expr arg"),
+                    _ => fail!("transmute has non-expr arg"),
                 };
                 let pluralize = |n| if 1u == n { "" } else { "s" };
                 ccx.sess.span_fatal(sp,
index 81466af6f747b842dc1b9dbbdb30b46f41bc0608..a8c18c721671d714ad6ed8c56edded363f03379a 100644 (file)
@@ -55,7 +55,7 @@ pub fn trans_impl(ccx: @mut CrateContext,
     let _icx = push_ctxt("impl::trans_impl");
     let tcx = ccx.tcx;
 
-    debug2!("trans_impl(path={}, name={}, id={:?})",
+    debug!("trans_impl(path={}, name={}, id={:?})",
            path.repr(tcx), name.repr(tcx), id);
 
     // Both here and below with generic methods, be sure to recurse and look for
@@ -117,7 +117,7 @@ pub fn trans_method(ccx: @mut CrateContext,
                 ty::subst_tps(ccx.tcx, *tys, *self_sub, self_ty)
             }
         };
-        debug2!("calling trans_fn with self_ty {}",
+        debug!("calling trans_fn with self_ty {}",
                self_ty.repr(ccx.tcx));
         match method.explicit_self.node {
           ast::sty_value => impl_self(self_ty, ty::ByRef),
@@ -161,7 +161,7 @@ pub fn trans_method_callee(bcx: @mut Block,
                            -> Callee {
     let _icx = push_ctxt("impl::trans_method_callee");
 
-    debug2!("trans_method_callee(callee_id={:?}, this={}, mentry={})",
+    debug!("trans_method_callee(callee_id={:?}, this={}, mentry={})",
            callee_id,
            bcx.expr_to_str(this),
            mentry.repr(bcx.tcx()));
@@ -199,7 +199,7 @@ pub fn trans_method_callee(bcx: @mut Block,
                                                trait_id, off, vtbl)
                 }
                 // how to get rid of this?
-                None => fail2!("trans_method_callee: missing param_substs")
+                None => fail!("trans_method_callee: missing param_substs")
             }
         }
 
@@ -220,7 +220,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
     let _icx = push_ctxt("impl::trans_static_method_callee");
     let ccx = bcx.ccx();
 
-    debug2!("trans_static_method_callee(method_id={:?}, trait_id={}, \
+    debug!("trans_static_method_callee(method_id={:?}, trait_id={}, \
             callee_id={:?})",
            method_id,
            ty::item_path_str(bcx.tcx(), trait_id),
@@ -250,16 +250,16 @@ pub fn trans_static_method_callee(bcx: @mut Block,
             ast_map::node_trait_method(trait_method, _, _) => {
                 ast_util::trait_method_to_ty_method(trait_method).ident
             }
-            _ => fail2!("callee is not a trait method")
+            _ => fail!("callee is not a trait method")
         }
     } else {
         let path = csearch::get_item_path(bcx.tcx(), method_id);
         match path[path.len()-1] {
             path_pretty_name(s, _) | path_name(s) => { s }
-            path_mod(_) => { fail2!("path doesn't have a name?") }
+            path_mod(_) => { fail!("path doesn't have a name?") }
         }
     };
-    debug2!("trans_static_method_callee: method_id={:?}, callee_id={:?}, \
+    debug!("trans_static_method_callee: method_id={:?}, callee_id={:?}, \
             name={}", method_id, callee_id, ccx.sess.str_of(mname));
 
     let vtbls = resolve_vtables_in_fn_ctxt(
@@ -287,7 +287,7 @@ pub fn trans_static_method_callee(bcx: @mut Block,
             FnData {llfn: PointerCast(bcx, lval, llty)}
         }
         _ => {
-            fail2!("vtable_param left in monomorphized \
+            fail!("vtable_param left in monomorphized \
                    function's vtable substs");
         }
     }
@@ -362,7 +362,7 @@ pub fn trans_monomorphized_callee(bcx: @mut Block,
           }
       }
       typeck::vtable_param(*) => {
-          fail2!("vtable_param left in monomorphized function's vtable substs");
+          fail!("vtable_param left in monomorphized function's vtable substs");
       }
     };
 
@@ -395,13 +395,13 @@ pub fn combine_impl_and_methods_tps(bcx: @mut Block,
     let method = ty::method(ccx.tcx, mth_did);
     let n_m_tps = method.generics.type_param_defs.len();
     let node_substs = node_id_type_params(bcx, callee_id);
-    debug2!("rcvr_substs={:?}", rcvr_substs.repr(ccx.tcx));
+    debug!("rcvr_substs={:?}", rcvr_substs.repr(ccx.tcx));
     let ty_substs
         = vec::append(rcvr_substs.to_owned(),
                       node_substs.tailn(node_substs.len() - n_m_tps));
-    debug2!("n_m_tps={:?}", n_m_tps);
-    debug2!("node_substs={:?}", node_substs.repr(ccx.tcx));
-    debug2!("ty_substs={:?}", ty_substs.repr(ccx.tcx));
+    debug!("n_m_tps={:?}", n_m_tps);
+    debug!("node_substs={:?}", node_substs.repr(ccx.tcx));
+    debug!("ty_substs={:?}", ty_substs.repr(ccx.tcx));
 
 
     // Now, do the same work for the vtables.  The vtables might not
@@ -474,13 +474,13 @@ pub fn trans_trait_callee_from_llval(bcx: @mut Block,
     let ccx = bcx.ccx();
 
     // Load the data pointer from the object.
-    debug2!("(translating trait callee) loading second index from pair");
+    debug!("(translating trait callee) loading second index from pair");
     let llboxptr = GEPi(bcx, llpair, [0u, abi::trt_field_box]);
     let llbox = Load(bcx, llboxptr);
     let llself = PointerCast(bcx, llbox, Type::opaque_box(ccx).ptr_to());
 
     // Load the function from the vtable and cast it to the expected type.
-    debug2!("(translating trait callee) loading method");
+    debug!("(translating trait callee) loading method");
     let llcallee_ty = type_of_fn_from_ty(ccx, callee_ty);
     let llvtable = Load(bcx,
                         PointerCast(bcx,
@@ -524,7 +524,7 @@ pub fn vtable_id(ccx: @mut CrateContext,
         }
 
         // can't this be checked at the callee?
-        _ => fail2!("vtable_id")
+        _ => fail!("vtable_id")
     }
 }
 
@@ -611,7 +611,7 @@ fn emit_vtable_methods(bcx: @mut Block,
         // the method type from the impl to substitute into.
         let m_id = method_with_name(ccx, impl_id, ident.name);
         let m = ty::method(tcx, m_id);
-        debug2!("(making impl vtable) emitting method {} at subst {}",
+        debug!("(making impl vtable) emitting method {} at subst {}",
                m.repr(tcx),
                substs.repr(tcx));
         let fty = ty::subst_tps(tcx,
@@ -619,7 +619,7 @@ fn emit_vtable_methods(bcx: @mut Block,
                                 None,
                                 ty::mk_bare_fn(tcx, m.fty.clone()));
         if m.generics.has_type_params() || ty::type_has_self(fty) {
-            debug2!("(making impl vtable) method has self or type params: {}",
+            debug!("(making impl vtable) method has self or type params: {}",
                    tcx.sess.str_of(ident));
             C_null(Type::nil().ptr_to())
         } else {
index 79b3453037d103b8a0f392708a62ef44669cff1b..f625ce4b01c1ac1a2f867a88a4287de15b31c649 100644 (file)
@@ -36,7 +36,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
                       ref_id: Option<ast::NodeId>)
     -> (ValueRef, bool)
 {
-    debug2!("monomorphic_fn(\
+    debug!("monomorphic_fn(\
             fn_id={}, \
             real_substs={}, \
             vtables={}, \
@@ -68,7 +68,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
         must_cast = true;
     }
 
-    debug2!("monomorphic_fn(\
+    debug!("monomorphic_fn(\
             fn_id={}, \
             psubsts={}, \
             hash_id={:?})",
@@ -78,7 +78,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
 
     match ccx.monomorphized.find(&hash_id) {
       Some(&val) => {
-        debug2!("leaving monomorphic fn {}",
+        debug!("leaving monomorphic fn {}",
                ty::item_path_str(ccx.tcx, fn_id));
         return (val, must_cast);
       }
@@ -140,7 +140,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
       ast_map::node_struct_ctor(_, i, pt) => (pt, i.ident, i.span)
     };
 
-    debug2!("monomorphic_fn about to subst into {}", llitem_ty.repr(ccx.tcx));
+    debug!("monomorphic_fn about to subst into {}", llitem_ty.repr(ccx.tcx));
     let mono_ty = match is_static_provided {
         None => ty::subst_tps(ccx.tcx, psubsts.tys,
                               psubsts.self_ty, llitem_ty),
@@ -164,7 +164,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
                 (psubsts.tys.slice(0, idx) +
                  &[psubsts.self_ty.unwrap()] +
                  psubsts.tys.tailn(idx));
-            debug2!("static default: changed substitution to {}",
+            debug!("static default: changed substitution to {}",
                    substs.repr(ccx.tcx));
 
             ty::subst_tps(ccx.tcx, substs, None, llitem_ty)
@@ -176,7 +176,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
             assert!(f.abis.is_rust() || f.abis.is_intrinsic());
             f
         }
-        _ => fail2!("expected bare rust fn or an intrinsic")
+        _ => fail!("expected bare rust fn or an intrinsic")
     };
 
     ccx.stats.n_monos += 1;
@@ -197,7 +197,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
     let mut pt = (*pt).clone();
     pt.push(elt);
     let s = mangle_exported_name(ccx, pt.clone(), mono_ty);
-    debug2!("monomorphize_fn mangled to {}", s);
+    debug!("monomorphize_fn mangled to {}", s);
 
     let mk_lldecl = || {
         let lldecl = decl_internal_rust_fn(ccx, f.sig.inputs, f.sig.output, s);
@@ -290,7 +290,7 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
     };
     ccx.monomorphizing.insert(fn_id, depth);
 
-    debug2!("leaving monomorphic fn {}", ty::item_path_str(ccx.tcx, fn_id));
+    debug!("leaving monomorphic fn {}", ty::item_path_str(ccx.tcx, fn_id));
     (lldecl, must_cast)
 }
 
@@ -302,7 +302,7 @@ pub fn make_mono_id(ccx: @mut CrateContext,
     let substs_iter = substs.self_ty.iter().chain(substs.tys.iter());
     let precise_param_ids: ~[(ty::t, Option<@~[mono_id]>)] = match substs.vtables {
       Some(vts) => {
-        debug2!("make_mono_id vtables={} substs={}",
+        debug!("make_mono_id vtables={} substs={}",
                vts.repr(ccx.tcx), substs.tys.repr(ccx.tcx));
         let vts_iter = substs.self_vtables.iter().chain(vts.iter());
         vts_iter.zip(substs_iter).map(|(vtable, subst)| {
index 1ab9e4581f28c0ff4bc98fad4ecad1404a46b79b..54ecc15c44f7072439599b1d12f0cb91f881cd05 100644 (file)
@@ -98,10 +98,10 @@ pub fn visit(&mut self, ty_name: &str, args: &[ValueRef]) {
         let mth_ty =
             ty::mk_bare_fn(tcx, self.visitor_methods[mth_idx].fty.clone());
         let v = self.visitor_val;
-        debug2!("passing {} args:", args.len());
+        debug!("passing {} args:", args.len());
         let mut bcx = self.bcx;
         for (i, a) in args.iter().enumerate() {
-            debug2!("arg {}: {}", i, bcx.val_to_str(*a));
+            debug!("arg {}: {}", i, bcx.val_to_str(*a));
         }
         let bool_ty = ty::mk_bool();
         let result = unpack_result!(bcx, callee::trans_call_inner(
@@ -151,7 +151,7 @@ pub fn leaf(&mut self, name: &str) {
     pub fn visit_ty(&mut self, t: ty::t) {
         let bcx = self.bcx;
         let tcx = bcx.ccx().tcx;
-        debug2!("reflect::visit_ty {}", ty_to_str(bcx.ccx().tcx, t));
+        debug!("reflect::visit_ty {}", ty_to_str(bcx.ccx().tcx, t));
 
         match ty::get(t).sty {
           ty::ty_bot => self.leaf("bot"),
index bde98eff41ce777a45d1edce4a05fcf29bd545e0..38c5e0b55f741a503fbf983bcb719292c6ae2683 100644 (file)
@@ -169,7 +169,7 @@ pub fn trans_fixed_vstore(bcx: @mut Block,
     // to store the array of the suitable size, so all we have to do is
     // generate the content.
 
-    debug2!("trans_fixed_vstore(vstore_expr={}, dest={:?})",
+    debug!("trans_fixed_vstore(vstore_expr={}, dest={:?})",
            bcx.expr_to_str(vstore_expr), dest.to_str(bcx.ccx()));
     let _indenter = indenter();
 
@@ -199,7 +199,7 @@ pub fn trans_slice_vstore(bcx: @mut Block,
 
     let ccx = bcx.ccx();
 
-    debug2!("trans_slice_vstore(vstore_expr={}, dest={})",
+    debug!("trans_slice_vstore(vstore_expr={}, dest={})",
            bcx.expr_to_str(vstore_expr), dest.to_str(ccx));
     let _indenter = indenter();
 
@@ -214,7 +214,7 @@ pub fn trans_slice_vstore(bcx: @mut Block,
     // Handle the &[...] case:
     let vt = vec_types_from_expr(bcx, vstore_expr);
     let count = elements_required(bcx, content_expr);
-    debug2!("vt={}, count={:?}", vt.to_str(ccx), count);
+    debug!("vt={}, count={:?}", vt.to_str(ccx), count);
 
     // Make a fixed-length backing array and allocate it on the stack.
     let llcount = C_uint(ccx, count);
@@ -255,7 +255,7 @@ pub fn trans_lit_str(bcx: @mut Block,
     // different from trans_slice_vstore() above because it does need to copy
     // the content anywhere.
 
-    debug2!("trans_lit_str(lit_expr={}, dest={})",
+    debug!("trans_lit_str(lit_expr={}, dest={})",
            bcx.expr_to_str(lit_expr),
            dest.to_str(bcx.ccx()));
     let _indenter = indenter();
@@ -286,7 +286,7 @@ pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: &a
     // @[...] or ~[...] (also @"..." or ~"...") allocate boxes in the
     // appropriate heap and write the array elements into them.
 
-    debug2!("trans_uniq_or_managed_vstore(vstore_expr={}, heap={:?})",
+    debug!("trans_uniq_or_managed_vstore(vstore_expr={}, heap={:?})",
            bcx.expr_to_str(vstore_expr), heap);
     let _indenter = indenter();
 
@@ -317,7 +317,7 @@ pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: &a
                 _ => {}
             }
         }
-        heap_exchange_closure => fail2!("vectors use exchange_alloc"),
+        heap_exchange_closure => fail!("vectors use exchange_alloc"),
         heap_managed | heap_managed_unique => {}
     }
 
@@ -329,7 +329,7 @@ pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: &a
     add_clean_free(bcx, val, heap);
     let dataptr = get_dataptr(bcx, get_bodyptr(bcx, val, vt.vec_ty));
 
-    debug2!("alloc_vec() returned val={}, dataptr={}",
+    debug!("alloc_vec() returned val={}, dataptr={}",
            bcx.val_to_str(val), bcx.val_to_str(dataptr));
 
     let bcx = write_content(bcx, &vt, vstore_expr,
@@ -349,7 +349,7 @@ pub fn write_content(bcx: @mut Block,
     let _icx = push_ctxt("tvec::write_content");
     let mut bcx = bcx;
 
-    debug2!("write_content(vt={}, dest={}, vstore_expr={:?})",
+    debug!("write_content(vt={}, dest={}, vstore_expr={:?})",
            vt.to_str(bcx.ccx()),
            dest.to_str(bcx.ccx()),
            bcx.expr_to_str(vstore_expr));
@@ -382,7 +382,7 @@ pub fn write_content(bcx: @mut Block,
                     let mut temp_cleanups = ~[];
                     for (i, element) in elements.iter().enumerate() {
                         let lleltptr = GEPi(bcx, lldest, [i]);
-                        debug2!("writing index {:?} with lleltptr={:?}",
+                        debug!("writing index {:?} with lleltptr={:?}",
                                i, bcx.val_to_str(lleltptr));
                         bcx = expr::trans_into(bcx, *element,
                                                SaveIn(lleltptr));
index efb85bc8df226bfb787dfb280b9497fc0de0bf31..de41548895df2eade480ff90cdf1a0685422c028 100644 (file)
@@ -364,7 +364,7 @@ pub fn float_width(&self) -> uint {
             Double => 64,
             X86_FP80 => 80,
             FP128 | PPC_FP128 => 128,
-            _ => fail2!("llvm_float_width called on a non-float type")
+            _ => fail!("llvm_float_width called on a non-float type")
         }
     }
 }
index 8667d7224e7922565dd9a4f83d693669987b4be0..2a8d16a2ceb83ab784368bf26984c0123a57171b 100644 (file)
@@ -172,7 +172,7 @@ pub fn sizing_type_of(cx: &mut CrateContext, t: ty::t) -> Type {
 
 // NB: If you update this, be sure to update `sizing_type_of()` as well.
 pub fn type_of(cx: &mut CrateContext, t: ty::t) -> Type {
-    debug2!("type_of {:?}: {:?}", t, ty::get(t));
+    debug!("type_of {:?}: {:?}", t, ty::get(t));
 
     // Check the cache.
     match cx.lltypes.find(&t) {
index f6c1741a9bd6e2993395f5228d0c720b6f9e5886..577e0a28105f293533fed5322ef27170ef5591ba 100644 (file)
@@ -39,7 +39,7 @@ pub fn root_and_write_guard(datum: &Datum,
                             expr_id: ast::NodeId,
                             derefs: uint) -> @mut Block {
     let key = root_map_key { id: expr_id, derefs: derefs };
-    debug2!("write_guard::root_and_write_guard(key={:?})", key);
+    debug!("write_guard::root_and_write_guard(key={:?})", key);
 
     // root the autoderef'd value, if necessary:
     //
@@ -66,7 +66,7 @@ pub fn return_to_mut(mut bcx: @mut Block,
                      bits_val_ref: ValueRef,
                      filename_val: ValueRef,
                      line_val: ValueRef) -> @mut Block {
-    debug2!("write_guard::return_to_mut(root_key={:?}, {}, {}, {})",
+    debug!("write_guard::return_to_mut(root_key={:?}, {}, {}, {})",
            root_key,
            bcx.to_str(),
            bcx.val_to_str(frozen_val_ref),
@@ -111,7 +111,7 @@ fn root(datum: &Datum,
     //! case, we will call this function, which will stash a copy
     //! away until we exit the scope `scope_id`.
 
-    debug2!("write_guard::root(root_key={:?}, root_info={:?}, datum={:?})",
+    debug!("write_guard::root(root_key={:?}, root_info={:?}, datum={:?})",
            root_key, root_info, datum.to_str(bcx.ccx()));
 
     if bcx.sess().trace() {
@@ -184,7 +184,7 @@ fn root(datum: &Datum,
 fn perform_write_guard(datum: &Datum,
                        bcx: @mut Block,
                        span: Span) -> @mut Block {
-    debug2!("perform_write_guard");
+    debug!("perform_write_guard");
 
     let llval = datum.to_value_llval(bcx);
     let (filename, line) = filename_and_line_num_from_span(bcx, span);
index 20a9fb8f7a944e268b7e72793282a65ba61db791..39aa6c5e39637833e2ac5ee6255fd58961dab73f 100644 (file)
@@ -1514,7 +1514,7 @@ pub fn fold_regions(
     fldr: &fn(r: Region, in_fn: bool) -> Region) -> t {
     fn do_fold(cx: ctxt, ty: t, in_fn: bool,
                fldr: &fn(Region, bool) -> Region) -> t {
-        debug2!("do_fold(ty={}, in_fn={})", ty_to_str(cx, ty), in_fn);
+        debug!("do_fold(ty={}, in_fn={})", ty_to_str(cx, ty), in_fn);
         if !type_has_regions(ty) { return ty; }
         fold_regions_and_ty(
             cx, ty,
@@ -1655,7 +1655,7 @@ pub fn simd_type(cx: ctxt, ty: t) -> t {
             let fields = lookup_struct_fields(cx, did);
             lookup_field_type(cx, did, fields[0].id, substs)
         }
-        _ => fail2!("simd_type called on invalid type")
+        _ => fail!("simd_type called on invalid type")
     }
 }
 
@@ -1665,14 +1665,14 @@ pub fn simd_size(cx: ctxt, ty: t) -> uint {
             let fields = lookup_struct_fields(cx, did);
             fields.len()
         }
-        _ => fail2!("simd_size called on invalid type")
+        _ => fail!("simd_size called on invalid type")
     }
 }
 
 pub fn get_element_type(ty: t, i: uint) -> t {
     match get(ty).sty {
       ty_tup(ref ts) => return ts[i],
-      _ => fail2!("get_element_type called on invalid type")
+      _ => fail!("get_element_type called on invalid type")
     }
 }
 
@@ -2323,7 +2323,7 @@ fn kind_bounds_to_contents(cx: ctxt, bounds: &BuiltinBounds, traits: &[@TraitRef
 
         let mut tc = TC_ALL;
         do each_inherited_builtin_bound(cx, bounds, traits) |bound| {
-            debug2!("tc = {}, bound = {:?}", tc.to_str(), bound);
+            debug!("tc = {}, bound = {:?}", tc.to_str(), bound);
             tc = tc - match bound {
                 BoundStatic => TypeContents::nonstatic(cx),
                 BoundSend => TypeContents::nonsendable(cx),
@@ -2333,7 +2333,7 @@ fn kind_bounds_to_contents(cx: ctxt, bounds: &BuiltinBounds, traits: &[@TraitRef
             };
         }
 
-        debug2!("result = {}", tc.to_str());
+        debug!("result = {}", tc.to_str());
         return tc;
 
         // Iterates over all builtin bounds on the type parameter def, including
@@ -2363,7 +2363,7 @@ pub fn type_moves_by_default(cx: ctxt, ty: t) -> bool {
 pub fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
     fn type_requires(cx: ctxt, seen: &mut ~[DefId],
                      r_ty: t, ty: t) -> bool {
-        debug2!("type_requires({}, {})?",
+        debug!("type_requires({}, {})?",
                ::util::ppaux::ty_to_str(cx, r_ty),
                ::util::ppaux::ty_to_str(cx, ty));
 
@@ -2372,7 +2372,7 @@ fn type_requires(cx: ctxt, seen: &mut ~[DefId],
                 subtypes_require(cx, seen, r_ty, ty)
         };
 
-        debug2!("type_requires({}, {})? {}",
+        debug!("type_requires({}, {})? {}",
                ::util::ppaux::ty_to_str(cx, r_ty),
                ::util::ppaux::ty_to_str(cx, ty),
                r);
@@ -2381,7 +2381,7 @@ fn type_requires(cx: ctxt, seen: &mut ~[DefId],
 
     fn subtypes_require(cx: ctxt, seen: &mut ~[DefId],
                         r_ty: t, ty: t) -> bool {
-        debug2!("subtypes_require({}, {})?",
+        debug!("subtypes_require({}, {})?",
                ::util::ppaux::ty_to_str(cx, r_ty),
                ::util::ppaux::ty_to_str(cx, ty));
 
@@ -2455,7 +2455,7 @@ fn subtypes_require(cx: ctxt, seen: &mut ~[DefId],
             }
         };
 
-        debug2!("subtypes_require({}, {})? {}",
+        debug!("subtypes_require({}, {})? {}",
                ::util::ppaux::ty_to_str(cx, r_ty),
                ::util::ppaux::ty_to_str(cx, ty),
                r);
@@ -2472,7 +2472,7 @@ pub fn type_structurally_contains(cx: ctxt,
                                   test: &fn(x: &sty) -> bool)
                                -> bool {
     let sty = &get(ty).sty;
-    debug2!("type_structurally_contains: {}",
+    debug!("type_structurally_contains: {}",
            ::util::ppaux::ty_to_str(cx, ty));
     if test(sty) { return true; }
     match *sty {
@@ -2819,7 +2819,7 @@ pub fn ty_fn_sig(fty: t) -> FnSig {
         ty_bare_fn(ref f) => f.sig.clone(),
         ty_closure(ref f) => f.sig.clone(),
         ref s => {
-            fail2!("ty_fn_sig() called on non-fn type: {:?}", s)
+            fail!("ty_fn_sig() called on non-fn type: {:?}", s)
         }
     }
 }
@@ -2830,7 +2830,7 @@ pub fn ty_fn_args(fty: t) -> ~[t] {
         ty_bare_fn(ref f) => f.sig.inputs.clone(),
         ty_closure(ref f) => f.sig.inputs.clone(),
         ref s => {
-            fail2!("ty_fn_args() called on non-fn type: {:?}", s)
+            fail!("ty_fn_args() called on non-fn type: {:?}", s)
         }
     }
 }
@@ -2839,7 +2839,7 @@ pub fn ty_closure_sigil(fty: t) -> Sigil {
     match get(fty).sty {
         ty_closure(ref f) => f.sigil,
         ref s => {
-            fail2!("ty_closure_sigil() called on non-closure type: {:?}", s)
+            fail!("ty_closure_sigil() called on non-closure type: {:?}", s)
         }
     }
 }
@@ -2849,7 +2849,7 @@ pub fn ty_fn_purity(fty: t) -> ast::purity {
         ty_bare_fn(ref f) => f.purity,
         ty_closure(ref f) => f.purity,
         ref s => {
-            fail2!("ty_fn_purity() called on non-fn type: {:?}", s)
+            fail!("ty_fn_purity() called on non-fn type: {:?}", s)
         }
     }
 }
@@ -2859,7 +2859,7 @@ pub fn ty_fn_ret(fty: t) -> t {
         ty_bare_fn(ref f) => f.sig.output,
         ty_closure(ref f) => f.sig.output,
         ref s => {
-            fail2!("ty_fn_ret() called on non-fn type: {:?}", s)
+            fail!("ty_fn_ret() called on non-fn type: {:?}", s)
         }
     }
 }
@@ -2876,7 +2876,7 @@ pub fn ty_vstore(ty: t) -> vstore {
     match get(ty).sty {
         ty_evec(_, vstore) => vstore,
         ty_estr(vstore) => vstore,
-        ref s => fail2!("ty_vstore() called on invalid sty: {:?}", s)
+        ref s => fail!("ty_vstore() called on invalid sty: {:?}", s)
     }
 }
 
@@ -3310,7 +3310,7 @@ pub fn expr_kind(tcx: ctxt,
             RvalueStmtExpr
         }
 
-        ast::ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+        ast::ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
 
         ast::ExprLogLevel |
         ast::ExprLit(_) | // Note: lit_str is carved out above
@@ -3338,7 +3338,7 @@ pub fn stmt_node_id(s: &ast::Stmt) -> ast::NodeId {
       ast::StmtDecl(_, id) | StmtExpr(_, id) | StmtSemi(_, id) => {
         return id;
       }
-      ast::StmtMac(*) => fail2!("unexpanded macro in trans")
+      ast::StmtMac(*) => fail!("unexpanded macro in trans")
     }
 }
 
@@ -3689,7 +3689,7 @@ fn lookup_locally_or_in_crate_store<V:Clone>(
     }
 
     if def_id.crate == ast::LOCAL_CRATE {
-        fail2!("No def'n found for {:?} in tcx.{}", def_id, descr);
+        fail!("No def'n found for {:?} in tcx.{}", def_id, descr);
     }
     let v = load_external();
     map.insert(def_id, v.clone());
@@ -3732,7 +3732,7 @@ pub fn impl_trait_ref(cx: ctxt, id: ast::DefId) -> Option<@TraitRef> {
         None => {}
     }
     let ret = if id.crate == ast::LOCAL_CRATE {
-        debug2!("(impl_trait_ref) searching for trait impl {:?}", id);
+        debug!("(impl_trait_ref) searching for trait impl {:?}", id);
         match cx.items.find(&id.node) {
             Some(&ast_map::node_item(@ast::item {
                                      node: ast::item_impl(_, ref opt_trait, _, _),
@@ -4491,7 +4491,7 @@ pub fn each_bound_trait_and_supertraits(tcx: ctxt,
 
         // Add the given trait ty to the hash map
         while i < trait_refs.len() {
-            debug2!("each_bound_trait_and_supertraits(i={:?}, trait_ref={})",
+            debug!("each_bound_trait_and_supertraits(i={:?}, trait_ref={})",
                    i, trait_refs[i].repr(tcx));
 
             if !f(trait_refs[i]) {
@@ -4501,7 +4501,7 @@ pub fn each_bound_trait_and_supertraits(tcx: ctxt,
             // Add supertraits to supertrait_set
             let supertrait_refs = trait_ref_supertraits(tcx, trait_refs[i]);
             for &supertrait_ref in supertrait_refs.iter() {
-                debug2!("each_bound_trait_and_supertraits(supertrait_ref={})",
+                debug!("each_bound_trait_and_supertraits(supertrait_ref={})",
                        supertrait_ref.repr(tcx));
 
                 let d_id = supertrait_ref.def_id;
index fdf0a094dc078213581c5527f5da94426f904bac..ccda6bbaf9d11495058de1eebbee3e7b023339ee 100644 (file)
@@ -636,7 +636,7 @@ fn ty_of_method_or_bare_fn<AC:AstConv,RS:RegionScope + Clone + 'static>(
     opt_self_info: Option<&SelfInfo>,
     decl: &ast::fn_decl) -> (Option<Option<ty::t>>, ty::BareFnTy)
 {
-    debug2!("ty_of_bare_fn");
+    debug!("ty_of_bare_fn");
 
     // new region names that appear inside of the fn decl are bound to
     // that function type
@@ -717,7 +717,7 @@ pub fn ty_of_closure<AC:AstConv,RS:RegionScope + Clone + 'static>(
     // names or they are provided, but not both.
     assert!(lifetimes.is_empty() || expected_sig.is_none());
 
-    debug2!("ty_of_fn_decl");
+    debug!("ty_of_fn_decl");
     let _i = indenter();
 
     // resolve the function bound region in the original region
index 545a487ab441265ba0ca18fc0aaaa8e415097728..25048d888fa8c27da49de652d99e9edbd7b0e9c2 100644 (file)
@@ -428,8 +428,8 @@ pub fn check_pat(pcx: &pat_ctxt, pat: @ast::Pat, expected: ty::t) {
             fcx.infcx().resolve_type_vars_if_possible(fcx.expr_ty(begin));
         let e_ty =
             fcx.infcx().resolve_type_vars_if_possible(fcx.expr_ty(end));
-        debug2!("pat_range beginning type: {:?}", b_ty);
-        debug2!("pat_range ending type: {:?}", e_ty);
+        debug!("pat_range beginning type: {:?}", b_ty);
+        debug!("pat_range ending type: {:?}", e_ty);
         if !require_same_types(
             tcx, Some(fcx.infcx()), false, pat.span, b_ty, e_ty,
             || ~"mismatched types in range")
@@ -488,7 +488,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: @ast::Pat, expected: ty::t) {
         }
         fcx.write_ty(pat.id, typ);
 
-        debug2!("(checking match) writing type for pat id {}", pat.id);
+        debug!("(checking match) writing type for pat id {}", pat.id);
 
         match sub {
           Some(p) => check_pat(pcx, p, expected),
index e0df9bf1cfc9aba2a5a7fbf0927d3f9715ef05ce..f6efd3aa5ad1f573a81d1fa5382d152bfef840e1 100644 (file)
@@ -151,18 +151,18 @@ pub fn lookup(
     };
 
     let self_ty = structurally_resolved_type(fcx, self_expr.span, self_ty);
-    debug2!("method lookup(self_ty={}, expr={}, self_expr={})",
+    debug!("method lookup(self_ty={}, expr={}, self_expr={})",
            self_ty.repr(fcx.tcx()), expr.repr(fcx.tcx()),
            self_expr.repr(fcx.tcx()));
 
-    debug2!("searching inherent candidates");
+    debug!("searching inherent candidates");
     lcx.push_inherent_candidates(self_ty);
     let mme = lcx.search(self_ty);
     if mme.is_some() {
         return mme;
     }
 
-    debug2!("searching extension candidates");
+    debug!("searching extension candidates");
     lcx.reset_candidates();
     lcx.push_bound_candidates(self_ty);
     lcx.push_extension_candidates();
@@ -215,7 +215,7 @@ fn search(&self, self_ty: ty::t) -> Option<method_map_entry> {
         let mut self_ty = self_ty;
         let mut autoderefs = 0;
         loop {
-            debug2!("loop: self_ty={} autoderefs={}",
+            debug!("loop: self_ty={} autoderefs={}",
                    self.ty_to_str(self_ty), autoderefs);
 
             match self.deref_args {
@@ -397,7 +397,7 @@ fn get_method_index(&self,
     fn push_inherent_candidates_from_object(&self,
                                             did: DefId,
                                             substs: &ty::substs) {
-        debug2!("push_inherent_candidates_from_object(did={}, substs={})",
+        debug!("push_inherent_candidates_from_object(did={}, substs={})",
                self.did_to_str(did),
                substs_to_str(self.tcx(), substs));
         let _indenter = indenter();
@@ -446,7 +446,7 @@ fn push_inherent_candidates_from_object(&self,
     fn push_inherent_candidates_from_param(&self,
                                            rcvr_ty: ty::t,
                                            param_ty: param_ty) {
-        debug2!("push_inherent_candidates_from_param(param_ty={:?})",
+        debug!("push_inherent_candidates_from_param(param_ty={:?})",
                param_ty);
         let _indenter = indenter();
 
@@ -523,11 +523,11 @@ fn push_inherent_candidates_from_bounds_inner(
                     let cand = mk_cand(bound_trait_ref, method,
                                        pos, this_bound_idx);
 
-                    debug2!("pushing inherent candidate for param: {:?}", cand);
+                    debug!("pushing inherent candidate for param: {:?}", cand);
                     self.inherent_candidates.push(cand);
                 }
                 None => {
-                    debug2!("trait doesn't contain method: {:?}",
+                    debug!("trait doesn't contain method: {:?}",
                     bound_trait_ref.def_id);
                     // check next trait or bound
                 }
@@ -557,7 +557,7 @@ fn push_candidates_from_impl(&self,
         if !self.impl_dups.insert(impl_info.did) {
             return; // already visited
         }
-        debug2!("push_candidates_from_impl: {} {} {}",
+        debug!("push_candidates_from_impl: {} {} {}",
                token::interner_get(self.m_name),
                impl_info.ident.repr(self.tcx()),
                impl_info.methods.map(|m| m.ident).repr(self.tcx()));
@@ -603,7 +603,7 @@ fn search_for_autoderefd_method(&self,
         match self.search_for_method(self_ty) {
             None => None,
             Some(mme) => {
-                debug2!("(searching for autoderef'd method) writing \
+                debug!("(searching for autoderef'd method) writing \
                        adjustment ({}) to {}",
                        autoderefs,
                        self.self_expr.id);
@@ -832,14 +832,14 @@ fn search_for_some_kind_of_autorefd_method(
 
     fn search_for_method(&self, rcvr_ty: ty::t)
                              -> Option<method_map_entry> {
-        debug2!("search_for_method(rcvr_ty={})", self.ty_to_str(rcvr_ty));
+        debug!("search_for_method(rcvr_ty={})", self.ty_to_str(rcvr_ty));
         let _indenter = indenter();
 
         // I am not sure that inherent methods should have higher
         // priority, but it is necessary ATM to handle some of the
         // existing code.
 
-        debug2!("searching inherent candidates");
+        debug!("searching inherent candidates");
         match self.consider_candidates(rcvr_ty, self.inherent_candidates) {
             None => {}
             Some(mme) => {
@@ -847,7 +847,7 @@ fn search_for_method(&self, rcvr_ty: ty::t)
             }
         }
 
-        debug2!("searching extension candidates");
+        debug!("searching extension candidates");
         match self.consider_candidates(rcvr_ty, self.extension_candidates) {
             None => {
                 return None;
@@ -896,7 +896,7 @@ fn merge_candidates(&self, candidates: &[Candidate]) -> ~[Candidate] {
             let mut j = i + 1;
             while j < candidates.len() {
                 let candidate_b = &candidates[j];
-                debug2!("attempting to merge {:?} and {:?}",
+                debug!("attempting to merge {:?} and {:?}",
                        candidate_a, candidate_b);
                 let candidates_same = match (&candidate_a.origin,
                                              &candidate_b.origin) {
@@ -936,7 +936,7 @@ fn confirm_candidate(&self, rcvr_ty: ty::t, candidate: &Candidate)
         let tcx = self.tcx();
         let fty = ty::mk_bare_fn(tcx, candidate.method_ty.fty.clone());
 
-        debug2!("confirm_candidate(expr={}, candidate={}, fty={})",
+        debug!("confirm_candidate(expr={}, candidate={}, fty={})",
                self.expr.repr(tcx),
                self.cand_to_str(candidate),
                self.ty_to_str(fty));
@@ -992,11 +992,11 @@ fn confirm_candidate(&self, rcvr_ty: ty::t, candidate: &Candidate)
         };
 
         // Compute the method type with type parameters substituted
-        debug2!("fty={} all_substs={}",
+        debug!("fty={} all_substs={}",
                self.ty_to_str(fty),
                ty::substs_to_str(tcx, &all_substs));
         let fty = ty::subst(tcx, &all_substs, fty);
-        debug2!("after subst, fty={}", self.ty_to_str(fty));
+        debug!("after subst, fty={}", self.ty_to_str(fty));
 
         // Replace any bound regions that appear in the function
         // signature with region variables
@@ -1019,7 +1019,7 @@ fn confirm_candidate(&self, rcvr_ty: ty::t, candidate: &Candidate)
             purity: bare_fn_ty.purity,
             abis: bare_fn_ty.abis.clone(),
         });
-        debug2!("after replacing bound regions, fty={}", self.ty_to_str(fty));
+        debug!("after replacing bound regions, fty={}", self.ty_to_str(fty));
 
         let self_mode = get_mode_from_explicit_self(candidate.method_ty.explicit_self);
 
@@ -1189,12 +1189,12 @@ fn enforce_drop_trait_limitations(&self, candidate: &Candidate) {
     // `rcvr_ty` is the type of the expression. It may be a subtype of a
     // candidate method's `self_ty`.
     fn is_relevant(&self, rcvr_ty: ty::t, candidate: &Candidate) -> bool {
-        debug2!("is_relevant(rcvr_ty={}, candidate={})",
+        debug!("is_relevant(rcvr_ty={}, candidate={})",
                self.ty_to_str(rcvr_ty), self.cand_to_str(candidate));
 
         return match candidate.method_ty.explicit_self {
             sty_static => {
-                debug2!("(is relevant?) explicit self is static");
+                debug!("(is relevant?) explicit self is static");
                 false
             }
 
@@ -1203,7 +1203,7 @@ fn is_relevant(&self, rcvr_ty: ty::t, candidate: &Candidate) -> bool {
             }
 
             sty_region(_, m) => {
-                debug2!("(is relevant?) explicit self is a region");
+                debug!("(is relevant?) explicit self is a region");
                 match ty::get(rcvr_ty).sty {
                     ty::ty_rptr(_, mt) => {
                         mutability_matches(mt.mutbl, m) &&
@@ -1220,7 +1220,7 @@ fn is_relevant(&self, rcvr_ty: ty::t, candidate: &Candidate) -> bool {
             }
 
             sty_box(m) => {
-                debug2!("(is relevant?) explicit self is a box");
+                debug!("(is relevant?) explicit self is a box");
                 match ty::get(rcvr_ty).sty {
                     ty::ty_box(mt) => {
                         mutability_matches(mt.mutbl, m) &&
@@ -1237,7 +1237,7 @@ fn is_relevant(&self, rcvr_ty: ty::t, candidate: &Candidate) -> bool {
             }
 
             sty_uniq => {
-                debug2!("(is relevant?) explicit self is a unique pointer");
+                debug!("(is relevant?) explicit self is a unique pointer");
                 match ty::get(rcvr_ty).sty {
                     ty::ty_uniq(mt) => {
                         rcvr_matches_ty(self.fcx, mt.ty, candidate)
@@ -1310,7 +1310,7 @@ fn report_static_candidate(&self, idx: uint, did: DefId) {
             match self.tcx().items.find(&did.node) {
               Some(&ast_map::node_method(m, _, _))
               | Some(&ast_map::node_trait_method(@ast::provided(m), _, _)) => m.span,
-              _ => fail2!("report_static_candidate: bad item {:?}", did)
+              _ => fail!("report_static_candidate: bad item {:?}", did)
             }
         } else {
             self.expr.span
index 627216ea7b77bae7d2f8c8b18f01aae069b7c08d..eddf8aa518508fc35d3dd592c61264c4d138b6d4 100644 (file)
@@ -362,7 +362,7 @@ fn visit_local(&mut self, local:@ast::Local, _:()) {
               _ => Some(self.fcx.to_ty(&local.ty))
             };
             self.assign(local.id, o_ty);
-            debug2!("Local variable {} is assigned type {}",
+            debug!("Local variable {} is assigned type {}",
                    self.fcx.pat_to_str(local.pat),
                    self.fcx.infcx().ty_to_str(
                        self.fcx.inh.locals.get_copy(&local.id)));
@@ -375,7 +375,7 @@ fn visit_pat(&mut self, p:@ast::Pat, _:()) {
               ast::PatIdent(_, ref path, _)
                   if pat_util::pat_is_binding(self.fcx.ccx.tcx.def_map, p) => {
                 self.assign(p.id, None);
-                debug2!("Pattern binding {} is assigned to {}",
+                debug!("Pattern binding {} is assigned to {}",
                        self.tcx.sess.str_of(path.segments[0].identifier),
                        self.fcx.infcx().ty_to_str(
                            self.fcx.inh.locals.get_copy(&p.id)));
@@ -450,7 +450,7 @@ pub fn check_fn(ccx: @mut CrateCtxt,
     let arg_tys = fn_sig.inputs.map(|a| *a);
     let ret_ty = fn_sig.output;
 
-    debug2!("check_fn(arg_tys={:?}, ret_ty={:?}, opt_self_ty={:?})",
+    debug!("check_fn(arg_tys={:?}, ret_ty={:?}, opt_self_ty={:?})",
            arg_tys.map(|&a| ppaux::ty_to_str(tcx, a)),
            ppaux::ty_to_str(tcx, ret_ty),
            opt_self_info.map(|si| ppaux::ty_to_str(tcx, si.self_ty)));
@@ -510,7 +510,7 @@ fn gather_locals(fcx: @mut FnCtxt,
         // Add the self parameter
         for self_info in opt_self_info.iter() {
             visit.assign(self_info.self_id, Some(self_info.self_ty));
-            debug2!("self is assigned to {}",
+            debug!("self is assigned to {}",
                    fcx.infcx().ty_to_str(
                        fcx.inh.locals.get_copy(&self_info.self_id)));
         }
@@ -588,7 +588,7 @@ pub fn check_struct(ccx: @mut CrateCtxt, id: ast::NodeId, span: Span) {
 }
 
 pub fn check_item(ccx: @mut CrateCtxt, it: @ast::item) {
-    debug2!("check_item(it.id={}, it.ident={})",
+    debug!("check_item(it.id={}, it.ident={})",
            it.id,
            ty::item_path_str(ccx.tcx, local_def(it.id)));
     let _indenter = indenter();
@@ -606,7 +606,7 @@ pub fn check_item(ccx: @mut CrateCtxt, it: @ast::item) {
       }
       ast::item_impl(_, _, _, ref ms) => {
         let rp = ccx.tcx.region_paramd_items.find(&it.id).map(|x| *x);
-        debug2!("item_impl {} with id {} rp {:?}",
+        debug!("item_impl {} with id {} rp {:?}",
                ccx.tcx.sess.str_of(it.ident), it.id, rp);
         for m in ms.iter() {
             check_method(ccx, *m);
@@ -742,14 +742,14 @@ pub fn block_region(&self) -> ty::Region {
 
     #[inline]
     pub fn write_ty(&self, node_id: ast::NodeId, ty: ty::t) {
-        debug2!("write_ty({}, {}) in fcx {}",
+        debug!("write_ty({}, {}) in fcx {}",
                node_id, ppaux::ty_to_str(self.tcx(), ty), self.tag());
         self.inh.node_types.insert(node_id, ty);
     }
 
     pub fn write_substs(&self, node_id: ast::NodeId, substs: ty::substs) {
         if !ty::substs_is_noop(&substs) {
-            debug2!("write_substs({}, {}) in fcx {}",
+            debug!("write_substs({}, {}) in fcx {}",
                    node_id,
                    ty::substs_to_str(self.tcx(), &substs),
                    self.tag());
@@ -781,7 +781,7 @@ pub fn write_autoderef_adjustment(&self,
     pub fn write_adjustment(&self,
                             node_id: ast::NodeId,
                             adj: @ty::AutoAdjustment) {
-        debug2!("write_adjustment(node_id={:?}, adj={:?})", node_id, adj);
+        debug!("write_adjustment(node_id={:?}, adj={:?})", node_id, adj);
         self.inh.adjustments.insert(node_id, adj);
     }
 
@@ -1306,7 +1306,7 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
                                expr: @ast::Expr,
                                expected: Option<ty::t>,
                                unifier: &fn()) {
-    debug2!(">> typechecking");
+    debug!(">> typechecking");
 
     fn check_method_argument_types(
         fcx: @mut FnCtxt,
@@ -1384,7 +1384,7 @@ fn check_argument_types(
             vec::from_elem(supplied_arg_count, ty::mk_err())
         };
 
-        debug2!("check_argument_types: formal_tys={:?}",
+        debug!("check_argument_types: formal_tys={:?}",
                formal_tys.map(|t| fcx.infcx().ty_to_str(*t)));
 
         // Check the arguments.
@@ -1396,7 +1396,7 @@ fn check_argument_types(
         let xs = [false, true];
         for check_blocks in xs.iter() {
             let check_blocks = *check_blocks;
-            debug2!("check_blocks={}", check_blocks);
+            debug!("check_blocks={}", check_blocks);
 
             // More awful hacks: before we check the blocks, try to do
             // an "opportunistic" vtable resolution of any trait
@@ -1413,7 +1413,7 @@ fn check_argument_types(
                 };
 
                 if is_block == check_blocks {
-                    debug2!("checking the argument");
+                    debug!("checking the argument");
                     let mut formal_ty = formal_tys[i];
 
                     match deref_args {
@@ -1567,7 +1567,7 @@ fn check_method_call(fcx: @mut FnCtxt,
                 method_map.insert(expr.id, (*entry));
             }
             None => {
-                debug2!("(checking method call) failing expr is {}", expr.id);
+                debug!("(checking method call) failing expr is {}", expr.id);
 
                 fcx.type_error_message(expr.span,
                   |actual| {
@@ -1921,7 +1921,7 @@ fn check_expr_fn(fcx: @mut FnCtxt,
             ty::mk_closure(tcx, fn_ty_copy)
         };
 
-        debug2!("check_expr_fn_with_unifier fty={}",
+        debug!("check_expr_fn_with_unifier fty={}",
                fcx.infcx().ty_to_str(fty));
 
         fcx.write_ty(expr.id, fty);
@@ -1955,7 +1955,7 @@ fn check_field(fcx: @mut FnCtxt,
 
                 // (1) verify that the class id actually has a field called
                 // field
-                debug2!("class named {}", ppaux::ty_to_str(tcx, base_t));
+                debug!("class named {}", ppaux::ty_to_str(tcx, base_t));
                 let cls_items = ty::lookup_struct_fields(tcx, base_id);
                 match lookup_field_ty(tcx, base_id, cls_items,
                                       field, &(*substs)) {
@@ -2570,7 +2570,7 @@ fn check_struct_enum_variant(fcx: @mut FnCtxt,
         }
       }
       ast::ExprForLoop(*) =>
-          fail2!("non-desugared expr_for_loop"),
+          fail!("non-desugared expr_for_loop"),
       ast::ExprLoop(ref body, _) => {
         check_block_no_value(fcx, (body));
         if !may_break(tcx, expr.id, body) {
@@ -2618,7 +2618,7 @@ fn check_struct_enum_variant(fcx: @mut FnCtxt,
             demand::suptype(fcx, b.span, inner_ty, fcx.expr_ty(b));
           }
           // argh
-          _ => fail2!("expected fn ty")
+          _ => fail!("expected fn ty")
         }
         fcx.write_ty(expr.id, fcx.node_ty(b.id));
       }
@@ -2662,8 +2662,8 @@ fn check_struct_enum_variant(fcx: @mut FnCtxt,
         let t_1 = fcx.to_ty(t);
         let t_e = fcx.expr_ty(e);
 
-        debug2!("t_1={}", fcx.infcx().ty_to_str(t_1));
-        debug2!("t_e={}", fcx.infcx().ty_to_str(t_e));
+        debug!("t_1={}", fcx.infcx().ty_to_str(t_1));
+        debug!("t_e={}", fcx.infcx().ty_to_str(t_e));
 
         if ty::type_is_error(t_e) {
             fcx.write_error(id);
@@ -2892,9 +2892,9 @@ fn types_compatible(fcx: @mut FnCtxt, sp: Span,
        }
     }
 
-    debug2!("type of expr({}) {} is...", expr.id,
+    debug!("type of expr({}) {} is...", expr.id,
            syntax::print::pprust::expr_to_str(expr, tcx.sess.intr()));
-    debug2!("... {}, expected is {}",
+    debug!("... {}, expected is {}",
            ppaux::ty_to_str(tcx, fcx.expr_ty(expr)),
            match expected {
                Some(t) => ppaux::ty_to_str(tcx, t),
@@ -3175,7 +3175,7 @@ fn do_check(ccx: @mut CrateCtxt,
 
             match v.node.disr_expr {
                 Some(e) => {
-                    debug2!("disr expr, checking {}", pprust::expr_to_str(e, ccx.tcx.sess.intr()));
+                    debug!("disr expr, checking {}", pprust::expr_to_str(e, ccx.tcx.sess.intr()));
 
                     let fcx = blank_fn_ctxt(ccx, rty, e.id);
                     let declty = ty::mk_int_var(ccx.tcx, fcx.infcx().next_int_var_id());
@@ -3305,7 +3305,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
                         def: ast::Def,
                         span: Span,
                         node_id: ast::NodeId) {
-    debug2!(">>> instantiate_path");
+    debug!(">>> instantiate_path");
 
     let ty_param_count = tpt.generics.type_param_defs.len();
     let mut ty_substs_len = 0;
@@ -3313,7 +3313,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
         ty_substs_len += segment.types.len()
     }
 
-    debug2!("tpt={} ty_param_count={:?} ty_substs_len={:?}",
+    debug!("tpt={} ty_param_count={:?} ty_substs_len={:?}",
            tpt.repr(fcx.tcx()),
            ty_param_count,
            ty_substs_len);
@@ -3412,7 +3412,7 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
     };
     fcx.write_ty_substs(node_id, tpt.ty, substs);
 
-    debug2!("<<<");
+    debug!("<<<");
 }
 
 // Resolves `typ` by a single level if `typ` is a type variable.  If no
@@ -3508,7 +3508,7 @@ pub fn check_bounds_are_used(ccx: @mut CrateCtxt,
                              span: Span,
                              tps: &OptVec<ast::TyParam>,
                              ty: ty::t) {
-    debug2!("check_bounds_are_used(n_tps={}, ty={})",
+    debug!("check_bounds_are_used(n_tps={}, ty={})",
            tps.len(), ppaux::ty_to_str(ccx.tcx, ty));
 
     // make a vector of booleans initially false, set to true when used
@@ -3521,7 +3521,7 @@ pub fn check_bounds_are_used(ccx: @mut CrateCtxt,
         |t| {
             match ty::get(t).sty {
               ty::ty_param(param_ty {idx, _}) => {
-                  debug2!("Found use of ty param \\#{}", idx);
+                  debug!("Found use of ty param \\#{}", idx);
                   tps_used[idx] = true;
               }
               _ => ()
index edc2947d890042f68975f3746e061ca1bb67d3ea..06a13059462385f557242b74d40d58ddf5c084ed 100644 (file)
@@ -211,7 +211,7 @@ fn visit_local(rcx: &mut Rcx, l: @ast::Local) {
 
 fn constrain_bindings_in_pat(pat: @ast::Pat, rcx: &mut Rcx) {
     let tcx = rcx.fcx.tcx();
-    debug2!("regionck::visit_pat(pat={})", pat.repr(tcx));
+    debug!("regionck::visit_pat(pat={})", pat.repr(tcx));
     do pat_util::pat_bindings(tcx.def_map, pat) |_, id, span, _| {
         // If we have a variable that contains region'd data, that
         // data will be accessible from anywhere that the variable is
@@ -244,7 +244,7 @@ fn constrain_bindings_in_pat(pat: @ast::Pat, rcx: &mut Rcx) {
 }
 
 fn visit_expr(rcx: &mut Rcx, expr: @ast::Expr) {
-    debug2!("regionck::visit_expr(e={}, repeating_scope={:?})",
+    debug!("regionck::visit_expr(e={}, repeating_scope={:?})",
            expr.repr(rcx.fcx.tcx()), rcx.repeating_scope);
 
     let has_method_map = rcx.fcx.inh.method_map.contains_key(&expr.id);
@@ -302,7 +302,7 @@ fn visit_expr(rcx: &mut Rcx, expr: @ast::Expr) {
     {
         let r = rcx.fcx.inh.adjustments.find(&expr.id);
         for &adjustment in r.iter() {
-            debug2!("adjustment={:?}", adjustment);
+            debug!("adjustment={:?}", adjustment);
             match *adjustment {
                 @ty::AutoDerefRef(
                     ty::AutoDerefRef {autoderefs: autoderefs, autoref: opt_autoref}) =>
@@ -535,7 +535,7 @@ fn constrain_call(rcx: &mut Rcx,
     //! appear in the arguments appropriately.
 
     let tcx = rcx.fcx.tcx();
-    debug2!("constrain_call(call_expr={}, implicitly_ref_args={:?})",
+    debug!("constrain_call(call_expr={}, implicitly_ref_args={:?})",
            call_expr.repr(tcx), implicitly_ref_args);
     let callee_ty = rcx.resolve_node_type(callee_id);
     if ty::type_is_error(callee_ty) {
@@ -597,7 +597,7 @@ fn constrain_derefs(rcx: &mut Rcx,
     let tcx = rcx.fcx.tcx();
     let r_deref_expr = ty::re_scope(deref_expr.id);
     for i in range(0u, derefs) {
-        debug2!("constrain_derefs(deref_expr=?, derefd_ty={}, derefs={:?}/{:?}",
+        debug!("constrain_derefs(deref_expr=?, derefd_ty={}, derefs={:?}/{:?}",
                rcx.fcx.infcx().ty_to_str(derefd_ty),
                i, derefs);
 
@@ -638,7 +638,7 @@ fn constrain_index(rcx: &mut Rcx,
      * includes the deref expr.
      */
 
-    debug2!("constrain_index(index_expr=?, indexed_ty={}",
+    debug!("constrain_index(index_expr=?, indexed_ty={}",
            rcx.fcx.infcx().ty_to_str(indexed_ty));
 
     let r_index_expr = ty::re_scope(index_expr.id);
@@ -662,13 +662,13 @@ fn constrain_free_variables(rcx: &mut Rcx,
      */
 
     let tcx = rcx.fcx.ccx.tcx;
-    debug2!("constrain_free_variables({}, {})",
+    debug!("constrain_free_variables({}, {})",
            region.repr(tcx), expr.repr(tcx));
     for freevar in get_freevars(tcx, expr.id).iter() {
-        debug2!("freevar def is {:?}", freevar.def);
+        debug!("freevar def is {:?}", freevar.def);
         let def = freevar.def;
         let en_region = encl_region_of_def(rcx.fcx, def);
-        debug2!("en_region = {}", en_region.repr(tcx));
+        debug!("en_region = {}", en_region.repr(tcx));
         rcx.fcx.mk_subr(true, infer::FreeVariable(freevar.span),
                         region, en_region);
     }
@@ -692,7 +692,7 @@ fn constrain_regions_in_type_of_node(
     let ty0 = rcx.resolve_node_type(id);
     let adjustment = rcx.fcx.inh.adjustments.find_copy(&id);
     let ty = ty::adjust_ty(tcx, origin.span(), ty0, adjustment);
-    debug2!("constrain_regions_in_type_of_node(\
+    debug!("constrain_regions_in_type_of_node(\
             ty={}, ty0={}, id={}, minimum_lifetime={:?}, adjustment={:?})",
            ty_to_str(tcx, ty), ty_to_str(tcx, ty0),
            id, minimum_lifetime, adjustment);
@@ -722,12 +722,12 @@ fn constrain_regions_in_type(
     let e = rcx.errors_reported;
     let tcx = rcx.fcx.ccx.tcx;
 
-    debug2!("constrain_regions_in_type(minimum_lifetime={}, ty={})",
+    debug!("constrain_regions_in_type(minimum_lifetime={}, ty={})",
            region_to_str(tcx, "", false, minimum_lifetime),
            ty_to_str(tcx, ty));
 
     do relate_nested_regions(tcx, Some(minimum_lifetime), ty) |r_sub, r_sup| {
-        debug2!("relate(r_sub={}, r_sup={})",
+        debug!("relate(r_sub={}, r_sup={})",
                region_to_str(tcx, "", false, r_sub),
                region_to_str(tcx, "", false, r_sup));
 
@@ -813,7 +813,7 @@ pub fn for_addr_of(rcx: &mut Rcx, expr: @ast::Expr, base: @ast::Expr) {
          * to the lifetime of its guarantor (if any).
          */
 
-        debug2!("guarantor::for_addr_of(base=?)");
+        debug!("guarantor::for_addr_of(base=?)");
 
         let guarantor = guarantor(rcx, base);
         link(rcx, expr.span, expr.id, guarantor);
@@ -826,9 +826,9 @@ pub fn for_match(rcx: &mut Rcx, discr: @ast::Expr, arms: &[ast::Arm]) {
          * linked to the lifetime of its guarantor (if any).
          */
 
-        debug2!("regionck::for_match()");
+        debug!("regionck::for_match()");
         let discr_guarantor = guarantor(rcx, discr);
-        debug2!("discr_guarantor={}", discr_guarantor.repr(rcx.tcx()));
+        debug!("discr_guarantor={}", discr_guarantor.repr(rcx.tcx()));
         for arm in arms.iter() {
             for pat in arm.pats.iter() {
                 link_ref_bindings_in_pat(rcx, *pat, discr_guarantor);
@@ -847,10 +847,10 @@ pub fn for_autoref(rcx: &mut Rcx,
          * region pointers.
          */
 
-        debug2!("guarantor::for_autoref(autoref={:?})", autoref);
+        debug!("guarantor::for_autoref(autoref={:?})", autoref);
 
         let mut expr_ct = categorize_unadjusted(rcx, expr);
-        debug2!("    unadjusted cat={:?}", expr_ct.cat);
+        debug!("    unadjusted cat={:?}", expr_ct.cat);
         expr_ct = apply_autoderefs(
             rcx, expr, autoderefs, expr_ct);
 
@@ -898,10 +898,10 @@ pub fn for_by_ref(rcx: &mut Rcx,
          */
 
         let tcx = rcx.tcx();
-        debug2!("guarantor::for_by_ref(expr={}, callee_scope={:?})",
+        debug!("guarantor::for_by_ref(expr={}, callee_scope={:?})",
                expr.repr(tcx), callee_scope);
         let expr_cat = categorize(rcx, expr);
-        debug2!("guarantor::for_by_ref(expr={:?}, callee_scope={:?}) category={:?}",
+        debug!("guarantor::for_by_ref(expr={:?}, callee_scope={:?}) category={:?}",
                expr.id, callee_scope, expr_cat);
         let minimum_lifetime = ty::re_scope(callee_scope);
         for guarantor in expr_cat.guarantor.iter() {
@@ -921,7 +921,7 @@ fn link(
          * to the lifetime of its guarantor (if any).
          */
 
-        debug2!("link(id={:?}, guarantor={:?})", id, guarantor);
+        debug!("link(id={:?}, guarantor={:?})", id, guarantor);
 
         let bound = match guarantor {
             None => {
@@ -939,7 +939,7 @@ fn link(
         let rptr_ty = rcx.resolve_node_type(id);
         if !ty::type_is_bot(rptr_ty) {
             let tcx = rcx.fcx.ccx.tcx;
-            debug2!("rptr_ty={}", ty_to_str(tcx, rptr_ty));
+            debug!("rptr_ty={}", ty_to_str(tcx, rptr_ty));
             let r = ty::ty_region(tcx, span, rptr_ty);
             rcx.fcx.mk_subr(true, infer::Reborrow(span), r, bound);
         }
@@ -977,7 +977,7 @@ fn guarantor(rcx: &mut Rcx, expr: @ast::Expr) -> Option<ty::Region> {
          * `&expr`).
          */
 
-        debug2!("guarantor()");
+        debug!("guarantor()");
         match expr.node {
             ast::ExprUnary(_, ast::UnDeref, b) => {
                 let cat = categorize(rcx, b);
@@ -1035,15 +1035,15 @@ fn guarantor(rcx: &mut Rcx, expr: @ast::Expr) -> Option<ty::Region> {
                     rcx.fcx.tcx(), rcx.fcx.inh.method_map, expr));
                 None
             }
-            ast::ExprForLoop(*) => fail2!("non-desugared expr_for_loop"),
+            ast::ExprForLoop(*) => fail!("non-desugared expr_for_loop"),
         }
     }
 
     fn categorize(rcx: &mut Rcx, expr: @ast::Expr) -> ExprCategorization {
-        debug2!("categorize()");
+        debug!("categorize()");
 
         let mut expr_ct = categorize_unadjusted(rcx, expr);
-        debug2!("before adjustments, cat={:?}", expr_ct.cat);
+        debug!("before adjustments, cat={:?}", expr_ct.cat);
 
         match rcx.fcx.inh.adjustments.find(&expr.id) {
             Some(&@ty::AutoAddEnv(*)) => {
@@ -1056,7 +1056,7 @@ fn categorize(rcx: &mut Rcx, expr: @ast::Expr) -> ExprCategorization {
             }
 
             Some(&@ty::AutoDerefRef(ref adjustment)) => {
-                debug2!("adjustment={:?}", adjustment);
+                debug!("adjustment={:?}", adjustment);
 
                 expr_ct = apply_autoderefs(
                     rcx, expr, adjustment.autoderefs, expr_ct);
@@ -1067,7 +1067,7 @@ fn categorize(rcx: &mut Rcx, expr: @ast::Expr) -> ExprCategorization {
                     Some(ty::AutoUnsafe(_)) => {
                         expr_ct.cat.guarantor = None;
                         expr_ct.cat.pointer = OtherPointer;
-                        debug2!("autoref, cat={:?}", expr_ct.cat);
+                        debug!("autoref, cat={:?}", expr_ct.cat);
                     }
                     Some(ty::AutoPtr(r, _)) |
                     Some(ty::AutoBorrowVec(r, _)) |
@@ -1078,7 +1078,7 @@ fn categorize(rcx: &mut Rcx, expr: @ast::Expr) -> ExprCategorization {
                         // expression will be some sort of borrowed pointer.
                         expr_ct.cat.guarantor = None;
                         expr_ct.cat.pointer = BorrowedPointer(r);
-                        debug2!("autoref, cat={:?}", expr_ct.cat);
+                        debug!("autoref, cat={:?}", expr_ct.cat);
                     }
                 }
             }
@@ -1086,14 +1086,14 @@ fn categorize(rcx: &mut Rcx, expr: @ast::Expr) -> ExprCategorization {
             None => {}
         }
 
-        debug2!("result={:?}", expr_ct.cat);
+        debug!("result={:?}", expr_ct.cat);
         return expr_ct.cat;
     }
 
     fn categorize_unadjusted(rcx: &mut Rcx,
                              expr: @ast::Expr)
                           -> ExprCategorizationType {
-        debug2!("categorize_unadjusted()");
+        debug!("categorize_unadjusted()");
 
         let guarantor = {
             if rcx.fcx.inh.method_map.contains_key(&expr.id) {
@@ -1143,7 +1143,7 @@ fn apply_autoderefs(
                 }
             }
 
-            debug2!("autoderef, cat={:?}", ct.cat);
+            debug!("autoderef, cat={:?}", ct.cat);
         }
         return ct;
     }
@@ -1205,7 +1205,7 @@ fn link_ref_bindings_in_pat(
          * other pointers.
          */
 
-        debug2!("link_ref_bindings_in_pat(pat={}, guarantor={:?})",
+        debug!("link_ref_bindings_in_pat(pat={}, guarantor={:?})",
                rcx.fcx.pat_to_str(pat), guarantor);
 
         match pat.node {
index b4ac7aaa6d227e90f5ac3a7dfba8aa72f1d5d3e7..9ba709f7651064645aec7e79bad309e21ef1347f 100644 (file)
@@ -34,7 +34,7 @@ pub fn replace_bound_regions_in_fn_sig(
 
     for &t in opt_self_ty.iter() { all_tys.push(t) }
 
-    debug2!("replace_bound_regions_in_fn_sig(self_ty={:?}, fn_sig={}, \
+    debug!("replace_bound_regions_in_fn_sig(self_ty={:?}, fn_sig={}, \
             all_tys={:?})",
            opt_self_ty.map(|t| ppaux::ty_to_str(tcx, t)),
            ppaux::fn_sig_to_str(tcx, fn_sig),
@@ -42,7 +42,7 @@ pub fn replace_bound_regions_in_fn_sig(
     let _i = indenter();
 
     let isr = do create_bound_region_mapping(tcx, isr, all_tys) |br| {
-        debug2!("br={:?}", br);
+        debug!("br={:?}", br);
         mapf(br)
     };
     let new_fn_sig = ty::fold_sig(fn_sig, |t| {
@@ -50,7 +50,7 @@ pub fn replace_bound_regions_in_fn_sig(
     });
     let new_self_ty = opt_self_ty.map(|t| replace_bound_regions(tcx, isr, t));
 
-    debug2!("result of replace_bound_regions_in_fn_sig: \
+    debug!("result of replace_bound_regions_in_fn_sig: \
             new_self_ty={:?}, \
             fn_sig={}",
            new_self_ty.map(|t| ppaux::ty_to_str(tcx, t)),
@@ -251,7 +251,7 @@ pub fn relate_free_regions(
      * Tests: `src/test/compile-fail/regions-free-region-ordering-*.rs`
      */
 
-    debug2!("relate_free_regions >>");
+    debug!("relate_free_regions >>");
 
     let mut all_tys = ~[];
     for arg in fn_sig.inputs.iter() {
@@ -262,7 +262,7 @@ pub fn relate_free_regions(
     }
 
     for &t in all_tys.iter() {
-        debug2!("relate_free_regions(t={})", ppaux::ty_to_str(tcx, t));
+        debug!("relate_free_regions(t={})", ppaux::ty_to_str(tcx, t));
         relate_nested_regions(tcx, None, t, |a, b| {
             match (&a, &b) {
                 (&ty::re_free(free_a), &ty::re_free(free_b)) => {
@@ -273,5 +273,5 @@ pub fn relate_free_regions(
         })
     }
 
-    debug2!("<< relate_free_regions");
+    debug!("<< relate_free_regions");
 }
index 46805af8938a3dd1963430ba70eb8e8103191b44..3c4ff35b768db42b24e60fd8491b29e7a2be7a79 100644 (file)
@@ -87,7 +87,7 @@ fn lookup_vtables(vcx: &VtableContext,
                   type_param_defs: &[ty::TypeParameterDef],
                   substs: &ty::substs,
                   is_early: bool) -> vtable_res {
-    debug2!("lookup_vtables(location_info={:?}, \
+    debug!("lookup_vtables(location_info={:?}, \
             type_param_defs={}, \
             substs={}",
            location_info,
@@ -108,7 +108,7 @@ fn lookup_vtables(vcx: &VtableContext,
     result.reverse();
 
     assert_eq!(substs.tps.len(), result.len());
-    debug2!("lookup_vtables result(\
+    debug!("lookup_vtables result(\
             location_info={:?}, \
             type_param_defs={}, \
             substs={}, \
@@ -142,12 +142,12 @@ fn lookup_vtables_for_param(vcx: &VtableContext,
         // Substitute the values of the type parameters that may
         // appear in the bound.
         let trait_ref = substs.as_ref().map_default(trait_ref, |substs| {
-            debug2!("about to subst: {}, {}",
+            debug!("about to subst: {}, {}",
                    trait_ref.repr(tcx), substs.repr(tcx));
             trait_ref.subst(tcx, *substs)
         });
 
-        debug2!("after subst: {}", trait_ref.repr(tcx));
+        debug!("after subst: {}", trait_ref.repr(tcx));
 
         match lookup_vtable(vcx, location_info, ty, trait_ref, is_early) {
             Some(vtable) => param_result.push(vtable),
@@ -163,7 +163,7 @@ trait {} for {}",
         true
     };
 
-    debug2!("lookup_vtables_for_param result(\
+    debug!("lookup_vtables_for_param result(\
             location_info={:?}, \
             type_param_bounds={}, \
             ty={}, \
@@ -228,7 +228,7 @@ fn lookup_vtable(vcx: &VtableContext,
                  is_early: bool)
     -> Option<vtable_origin>
 {
-    debug2!("lookup_vtable(ty={}, trait_ref={})",
+    debug!("lookup_vtable(ty={}, trait_ref={})",
            vcx.infcx.ty_to_str(ty),
            vcx.infcx.trait_ref_to_str(trait_ref));
     let _i = indenter();
@@ -291,7 +291,7 @@ fn lookup_vtable_from_bounds(vcx: &VtableContext,
     let mut n_bound = 0;
     let mut ret = None;
     do ty::each_bound_trait_and_supertraits(tcx, bounds) |bound_trait_ref| {
-        debug2!("checking bounds trait {}",
+        debug!("checking bounds trait {}",
                bound_trait_ref.repr(vcx.tcx()));
 
         if bound_trait_ref.def_id == trait_ref.def_id {
@@ -300,7 +300,7 @@ fn lookup_vtable_from_bounds(vcx: &VtableContext,
                               bound_trait_ref,
                               trait_ref);
             let vtable = vtable_param(param, n_bound);
-            debug2!("found param vtable: {:?}",
+            debug!("found param vtable: {:?}",
                    vtable);
             ret = Some(vtable);
             false
@@ -382,7 +382,7 @@ fn search_for_vtable(vcx: &VtableContext,
 
         // Now, in the previous example, for_ty is bound to
         // the type self_ty, and substs is bound to [T].
-        debug2!("The self ty is {} and its substs are {}",
+        debug!("The self ty is {} and its substs are {}",
                vcx.infcx.ty_to_str(for_ty),
                vcx.infcx.tys_to_str(substs.tps));
 
@@ -396,7 +396,7 @@ fn search_for_vtable(vcx: &VtableContext,
         // some value of U) with some_trait<T>. This would fail if T
         // and U weren't compatible.
 
-        debug2!("(checking vtable) @2 relating trait \
+        debug!("(checking vtable) @2 relating trait \
                 ty {} to of_trait_ref {}",
                vcx.infcx.trait_ref_to_str(trait_ref),
                vcx.infcx.trait_ref_to_str(of_trait_ref));
@@ -434,7 +434,7 @@ fn search_for_vtable(vcx: &VtableContext,
             }
         };
 
-        debug2!("The fixed-up substs are {} - \
+        debug!("The fixed-up substs are {} - \
                 they will be unified with the bounds for \
                 the target ty, {}",
                vcx.infcx.tys_to_str(substs_f.tps),
@@ -486,7 +486,7 @@ fn fixup_substs(vcx: &VtableContext,
     do fixup_ty(vcx, location_info, t, is_early).map |t_f| {
         match ty::get(t_f).sty {
           ty::ty_trait(_, ref substs_f, _, _, _) => (*substs_f).clone(),
-          _ => fail2!("t_f should be a trait")
+          _ => fail!("t_f should be a trait")
         }
     }
 }
@@ -532,7 +532,7 @@ fn connect_trait_tps(vcx: &VtableContext,
 fn insert_vtables(fcx: @mut FnCtxt,
                   callee_id: ast::NodeId,
                   vtables: vtable_res) {
-    debug2!("insert_vtables(callee_id={}, vtables={:?})",
+    debug!("insert_vtables(callee_id={}, vtables={:?})",
            callee_id, vtables.repr(fcx.tcx()));
     fcx.inh.vtable_map.insert(callee_id, vtables);
 }
@@ -553,7 +553,7 @@ pub fn location_info_for_item(item: @ast::item) -> LocationInfo {
 pub fn early_resolve_expr(ex: @ast::Expr,
                           fcx: @mut FnCtxt,
                           is_early: bool) {
-    debug2!("vtable: early_resolve_expr() ex with id {:?} (early: {}): {}",
+    debug!("vtable: early_resolve_expr() ex with id {:?} (early: {}): {}",
            ex.id, is_early, expr_to_str(ex, fcx.tcx().sess.intr()));
     let _indent = indenter();
 
@@ -561,15 +561,15 @@ pub fn early_resolve_expr(ex: @ast::Expr,
     match ex.node {
       ast::ExprPath(*) => {
         do fcx.opt_node_ty_substs(ex.id) |substs| {
-            debug2!("vtable resolution on parameter bounds for expr {}",
+            debug!("vtable resolution on parameter bounds for expr {}",
                    ex.repr(fcx.tcx()));
             let def = cx.tcx.def_map.get_copy(&ex.id);
             let did = ast_util::def_id_of_def(def);
             let item_ty = ty::lookup_item_type(cx.tcx, did);
-            debug2!("early resolve expr: def {:?} {:?}, {:?}, {}", ex.id, did, def,
+            debug!("early resolve expr: def {:?} {:?}, {:?}, {}", ex.id, did, def,
                    fcx.infcx().ty_to_str(item_ty.ty));
             if has_trait_bounds(*item_ty.generics.type_param_defs) {
-                debug2!("early_resolve_expr: looking up vtables for type params {}",
+                debug!("early_resolve_expr: looking up vtables for type params {}",
                        item_ty.generics.type_param_defs.repr(fcx.tcx()));
                 let vcx = VtableContext { ccx: fcx.ccx, infcx: fcx.infcx() };
                 let vtbls = lookup_vtables(&vcx, &location_info_for_expr(ex),
@@ -595,7 +595,7 @@ pub fn early_resolve_expr(ex: @ast::Expr,
       ast::ExprMethodCall(callee_id, _, _, _, _, _) => {
         match ty::method_call_type_param_defs(cx.tcx, fcx.inh.method_map, ex.id) {
           Some(type_param_defs) => {
-            debug2!("vtable resolution on parameter bounds for method call {}",
+            debug!("vtable resolution on parameter bounds for method call {}",
                    ex.repr(fcx.tcx()));
             if has_trait_bounds(*type_param_defs) {
                 let substs = fcx.node_ty_substs(callee_id);
@@ -611,7 +611,7 @@ pub fn early_resolve_expr(ex: @ast::Expr,
         }
       }
       ast::ExprCast(src, _) => {
-          debug2!("vtable resolution on expr {}", ex.repr(fcx.tcx()));
+          debug!("vtable resolution on expr {}", ex.repr(fcx.tcx()));
           let target_ty = fcx.expr_ty(ex);
           match ty::get(target_ty).sty {
               // Bounds of type's contents are not checked here, but in kind.rs.
@@ -752,7 +752,7 @@ pub fn resolve_impl(ccx: @mut CrateCtxt, impl_item: @ast::item) {
                 trait_bounds: ~[trait_ref]
             };
             let t = ty::node_id_to_type(ccx.tcx, impl_item.id);
-            debug2!("=== Doing a self lookup now.");
+            debug!("=== Doing a self lookup now.");
             // Right now, we don't have any place to store this.
             // We will need to make one so we can use this information
             // for compiling default methods that refer to supertraits.
index 4f281ce5f45701bc67c2a5d8c167334febc6c5a8..46c7968a0a4141824ad2a4f6eaa66e96e0ff2333 100644 (file)
@@ -70,7 +70,7 @@ fn resolve_method_map_entry(fcx: @mut FnCtxt, sp: Span, id: ast::NodeId) {
                 for t in r.iter() {
                     let method_map = fcx.ccx.method_map;
                     let new_entry = method_map_entry { self_ty: *t, ..*mme };
-                    debug2!("writeback::resolve_method_map_entry(id={:?}, \
+                    debug!("writeback::resolve_method_map_entry(id={:?}, \
                             new_entry={:?})",
                            id, new_entry);
                     method_map.insert(id, new_entry);
@@ -88,7 +88,7 @@ fn resolve_vtable_map_entry(fcx: @mut FnCtxt, sp: Span, id: ast::NodeId) {
             let r_origins = resolve_origins(fcx, sp, *origins);
             let vtable_map = fcx.ccx.vtable_map;
             vtable_map.insert(id, r_origins);
-            debug2!("writeback::resolve_vtable_map_entry(id={}, vtables={:?})",
+            debug!("writeback::resolve_vtable_map_entry(id={}, vtables={:?})",
                    id, r_origins.repr(fcx.tcx()));
         }
     }
@@ -133,7 +133,7 @@ fn resolve_type_vars_for_node(wbcx: &mut WbCtxt, sp: Span, id: ast::NodeId)
                 }
                 Ok(r1) => {
                     let resolved_adj = @ty::AutoAddEnv(r1, s);
-                    debug2!("Adjustments for node {}: {:?}", id, resolved_adj);
+                    debug!("Adjustments for node {}: {:?}", id, resolved_adj);
                     fcx.tcx().adjustments.insert(id, resolved_adj);
                 }
             }
@@ -162,7 +162,7 @@ fn resolve_type_vars_for_node(wbcx: &mut WbCtxt, sp: Span, id: ast::NodeId)
                 autoderefs: adj.autoderefs,
                 autoref: resolved_autoref,
             });
-            debug2!("Adjustments for node {}: {:?}", id, resolved_adj);
+            debug!("Adjustments for node {}: {:?}", id, resolved_adj);
             fcx.tcx().adjustments.insert(id, resolved_adj);
         }
     }
@@ -176,7 +176,7 @@ fn resolve_type_vars_for_node(wbcx: &mut WbCtxt, sp: Span, id: ast::NodeId)
       }
 
       Some(t) => {
-        debug2!("resolve_type_vars_for_node(id={}, n_ty={}, t={})",
+        debug!("resolve_type_vars_for_node(id={}, n_ty={}, t={})",
                id, ppaux::ty_to_str(tcx, n_ty), ppaux::ty_to_str(tcx, t));
         write_ty_to_tcx(tcx, id, t);
         let mut ret = Some(t);
@@ -284,7 +284,7 @@ fn visit_pat(p: @ast::Pat, wbcx: &mut WbCtxt) {
     }
 
     resolve_type_vars_for_node(wbcx, p.span, p.id);
-    debug2!("Type for pattern binding {} (id {}) resolved to {}",
+    debug!("Type for pattern binding {} (id {}) resolved to {}",
            pat_to_str(p, wbcx.fcx.ccx.tcx.sess.intr()), p.id,
            wbcx.fcx.infcx().ty_to_str(
                ty::node_id_to_type(wbcx.fcx.ccx.tcx,
@@ -297,7 +297,7 @@ fn visit_local(l: @ast::Local, wbcx: &mut WbCtxt) {
     let var_ty = wbcx.fcx.local_ty(l.span, l.id);
     match resolve_type(wbcx.fcx.infcx(), var_ty, resolve_all | force_all) {
         Ok(lty) => {
-            debug2!("Type for local {} (id {}) resolved to {}",
+            debug!("Type for local {} (id {}) resolved to {}",
                    pat_to_str(l.pat, wbcx.fcx.tcx().sess.intr()),
                    l.id,
                    wbcx.fcx.infcx().ty_to_str(lty));
index ae8081df7bac25c66bea8739b9ea5c566870b439..795074fa61904dbe7356ee5b12f083ebd827fd90 100644 (file)
@@ -76,7 +76,7 @@ pub fn get_base_type(inference_context: @mut InferCtxt,
 
     match get(resolved_type).sty {
         ty_enum(*) | ty_trait(*) | ty_struct(*) => {
-            debug2!("(getting base type) found base type");
+            debug!("(getting base type) found base type");
             Some(resolved_type)
         }
 
@@ -85,7 +85,7 @@ pub fn get_base_type(inference_context: @mut InferCtxt,
         ty_infer(*) | ty_param(*) | ty_self(*) | ty_type | ty_opaque_box |
         ty_opaque_closure_ptr(*) | ty_unboxed_vec(*) | ty_err | ty_box(_) |
         ty_uniq(_) | ty_ptr(_) | ty_rptr(_, _) => {
-            debug2!("(getting base type) no base type; found {:?}",
+            debug!("(getting base type) no base type; found {:?}",
                    get(original_type).sty);
             None
         }
@@ -135,7 +135,7 @@ pub fn get_base_type_def_id(inference_context: @mut InferCtxt,
                     return Some(def_id);
                 }
                 _ => {
-                    fail2!("get_base_type() returned a type that wasn't an \
+                    fail!("get_base_type() returned a type that wasn't an \
                            enum, struct, or trait");
                 }
             }
@@ -160,7 +160,7 @@ struct CoherenceCheckVisitor { cc: CoherenceChecker }
 impl visit::Visitor<()> for CoherenceCheckVisitor {
     fn visit_item(&mut self, item:@item, _:()) {
 
-//                debug2!("(checking coherence) item '{}'",
+//                debug!("(checking coherence) item '{}'",
 //                       self.cc.crate_context.tcx.sess.str_of(item.ident));
 
                 match item.node {
@@ -266,7 +266,7 @@ pub fn check_implementation(&self,
         // base type.
 
         if associated_traits.len() == 0 {
-            debug2!("(checking implementation) no associated traits for item \
+            debug!("(checking implementation) no associated traits for item \
                     '{}'",
                    self.crate_context.tcx.sess.str_of(item.ident));
 
@@ -290,7 +290,7 @@ pub fn check_implementation(&self,
         for associated_trait in associated_traits.iter() {
             let trait_ref = ty::node_id_to_trait_ref(
                 self.crate_context.tcx, associated_trait.ref_id);
-            debug2!("(checking implementation) adding impl for trait '{}', item '{}'",
+            debug!("(checking implementation) adding impl for trait '{}', item '{}'",
                    trait_ref.repr(self.crate_context.tcx),
                    self.crate_context.tcx.sess.str_of(item.ident));
 
@@ -325,7 +325,7 @@ pub fn instantiate_default_methods(&self,
                                        trait_ref: &ty::TraitRef,
                                        all_methods: &mut ~[@Method]) {
         let tcx = self.crate_context.tcx;
-        debug2!("instantiate_default_methods(impl_id={:?}, trait_ref={})",
+        debug!("instantiate_default_methods(impl_id={:?}, trait_ref={})",
                impl_id, trait_ref.repr(tcx));
 
         let impl_poly_type = ty::lookup_item_type(tcx, impl_id);
@@ -336,7 +336,7 @@ pub fn instantiate_default_methods(&self,
             let new_id = tcx.sess.next_node_id();
             let new_did = local_def(new_id);
 
-            debug2!("new_did={:?} trait_method={}", new_did, trait_method.repr(tcx));
+            debug!("new_did={:?} trait_method={}", new_did, trait_method.repr(tcx));
 
             // Create substitutions for the various trait parameters.
             let new_method_ty =
@@ -348,7 +348,7 @@ pub fn instantiate_default_methods(&self,
                     *trait_method,
                     Some(trait_method.def_id));
 
-            debug2!("new_method_ty={}", new_method_ty.repr(tcx));
+            debug!("new_method_ty={}", new_method_ty.repr(tcx));
             all_methods.push(new_method_ty);
 
             // construct the polytype for the method based on the method_ty
@@ -364,7 +364,7 @@ pub fn instantiate_default_methods(&self,
                 generics: new_generics,
                 ty: ty::mk_bare_fn(tcx, new_method_ty.fty.clone())
             };
-            debug2!("new_polytype={}", new_polytype.repr(tcx));
+            debug!("new_polytype={}", new_polytype.repr(tcx));
 
             tcx.tcache.insert(new_did, new_polytype);
             tcx.methods.insert(new_did, new_method_ty);
@@ -557,7 +557,7 @@ pub fn check_trait_methods_are_implemented(
 
         let r = ty::trait_methods(tcx, trait_did);
         for method in r.iter() {
-            debug2!("checking for {}", method.ident.repr(tcx));
+            debug!("checking for {}", method.ident.repr(tcx));
             if provided_names.contains(&method.ident.name) { continue; }
 
             tcx.sess.span_err(trait_ref_span,
index 238bcff653737274989b1fe3bc6a6b8e7912e9ef..9c69e6fd85cc7d60cfb9985dd5c369c3e3e7ee87 100644 (file)
@@ -347,7 +347,7 @@ fn make_static_method_ty(ccx: &CrateCtxt,
         let substd_type_param_defs = m.generics.type_param_defs.subst(tcx, &substs);
         new_type_param_defs.push_all(*substd_type_param_defs);
 
-        debug2!("static method {} type_param_defs={} ty={}, substs={}",
+        debug!("static method {} type_param_defs={} ty={}, substs={}",
                m.def_id.repr(tcx),
                new_type_param_defs.repr(tcx),
                ty.repr(tcx),
@@ -453,7 +453,7 @@ pub fn compare_impl_method(tcx: ty::ctxt,
                            trait_m: &ty::Method,
                            trait_substs: &ty::substs,
                            self_ty: ty::t) {
-    debug2!("compare_impl_method()");
+    debug!("compare_impl_method()");
     let infcx = infer::new_infer_ctxt(tcx);
 
     let impl_m = &cm.mty;
@@ -632,10 +632,10 @@ pub fn compare_impl_method(tcx: ty::ctxt,
     //   that correspond to the parameters we will find on the impl
     // - replace self region with a fresh, dummy region
     let impl_fty = {
-        debug2!("impl_fty (pre-subst): {}", ppaux::ty_to_str(tcx, impl_fty));
+        debug!("impl_fty (pre-subst): {}", ppaux::ty_to_str(tcx, impl_fty));
         replace_bound_self(tcx, impl_fty, dummy_self_r)
     };
-    debug2!("impl_fty (post-subst): {}", ppaux::ty_to_str(tcx, impl_fty));
+    debug!("impl_fty (post-subst): {}", ppaux::ty_to_str(tcx, impl_fty));
     let trait_fty = {
         let num_trait_m_type_params = trait_m.generics.type_param_defs.len();
         let dummy_tps = do vec::from_fn(num_trait_m_type_params) |i| {
@@ -649,11 +649,11 @@ pub fn compare_impl_method(tcx: ty::ctxt,
             self_ty: Some(self_ty),
             tps: vec::append(trait_tps, dummy_tps)
         };
-        debug2!("trait_fty (pre-subst): {} substs={}",
+        debug!("trait_fty (pre-subst): {} substs={}",
                trait_fty.repr(tcx), substs.repr(tcx));
         ty::subst(tcx, &substs, trait_fty)
     };
-    debug2!("trait_fty (post-subst): {}", trait_fty.repr(tcx));
+    debug!("trait_fty (post-subst): {}", trait_fty.repr(tcx));
 
     match infer::mk_subty(infcx, false, infer::MethodCompatCheck(cm.span),
                           impl_fty, trait_fty) {
@@ -844,7 +844,7 @@ pub fn ensure_no_ty_param_bounds(ccx: &CrateCtxt,
 pub fn convert(ccx: &CrateCtxt, it: &ast::item) {
     let tcx = ccx.tcx;
     let rp = tcx.region_paramd_items.find(&it.id).map(|x| *x);
-    debug2!("convert: item {} with id {} rp {:?}",
+    debug!("convert: item {} with id {} rp {:?}",
            tcx.sess.str_of(it.ident), it.id, rp);
     match it.node {
       // These don't define types.
@@ -1120,7 +1120,7 @@ pub fn ty_of_item(ccx: &CrateCtxt, it: &ast::item)
             },
             ty: ty::mk_bare_fn(ccx.tcx, tofd)
         };
-        debug2!("type of {} (id {}) is {}",
+        debug!("type of {} (id {}) is {}",
                tcx.sess.str_of(it.ident),
                it.id,
                ppaux::ty_to_str(tcx, tpt.ty));
@@ -1174,8 +1174,8 @@ pub fn ty_of_item(ccx: &CrateCtxt, it: &ast::item)
           return tpt;
       }
       ast::item_impl(*) | ast::item_mod(_) |
-      ast::item_foreign_mod(_) => fail2!(),
-      ast::item_mac(*) => fail2!("item macros unimplemented")
+      ast::item_foreign_mod(_) => fail!(),
+      ast::item_mac(*) => fail!("item macros unimplemented")
     }
 }
 
@@ -1222,7 +1222,7 @@ pub fn ty_generics(ccx: &CrateCtxt,
                         def_id: local_def(param.id),
                         bounds: bounds
                     };
-                    debug2!("def for param: {}", def.repr(ccx.tcx));
+                    debug!("def for param: {}", def.repr(ccx.tcx));
                     ccx.tcx.ty_param_defs.insert(param.id, def);
                     def
                 }
index 8d1eaf34256bdfe1ed189492d94aeda54490bc63..e1f65f79e4fb7ac82020a695c0b1ee3c12595f9b 100644 (file)
@@ -87,7 +87,7 @@ fn foo<A>(a: A, b: A) { ... }
 
 impl Coerce {
     pub fn tys(&self, a: ty::t, b: ty::t) -> CoerceResult {
-        debug2!("Coerce.tys({} => {})",
+        debug!("Coerce.tys({} => {})",
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
         let _indent = indenter();
@@ -184,7 +184,7 @@ pub fn coerce_borrowed_pointer(&self,
                                    b: ty::t,
                                    mt_b: ty::mt)
                                    -> CoerceResult {
-        debug2!("coerce_borrowed_pointer(a={}, sty_a={:?}, b={}, mt_b={:?})",
+        debug!("coerce_borrowed_pointer(a={}, sty_a={:?}, b={}, mt_b={:?})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx), mt_b);
 
@@ -221,7 +221,7 @@ pub fn coerce_borrowed_string(&self,
                                   sty_a: &ty::sty,
                                   b: ty::t)
                                   -> CoerceResult {
-        debug2!("coerce_borrowed_string(a={}, sty_a={:?}, b={})",
+        debug!("coerce_borrowed_string(a={}, sty_a={:?}, b={})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx));
 
@@ -248,7 +248,7 @@ pub fn coerce_borrowed_vector(&self,
                                   b: ty::t,
                                   mt_b: ty::mt)
                                   -> CoerceResult {
-        debug2!("coerce_borrowed_vector(a={}, sty_a={:?}, b={})",
+        debug!("coerce_borrowed_vector(a={}, sty_a={:?}, b={})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx));
 
@@ -277,7 +277,7 @@ fn coerce_borrowed_object(&self,
                               b: ty::t,
                               b_mutbl: ast::Mutability) -> CoerceResult
     {
-        debug2!("coerce_borrowed_object(a={}, sty_a={:?}, b={})",
+        debug!("coerce_borrowed_object(a={}, sty_a={:?}, b={})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx));
 
@@ -306,7 +306,7 @@ pub fn coerce_borrowed_fn(&self,
                               sty_a: &ty::sty,
                               b: ty::t)
                               -> CoerceResult {
-        debug2!("coerce_borrowed_fn(a={}, sty_a={:?}, b={})",
+        debug!("coerce_borrowed_fn(a={}, sty_a={:?}, b={})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx));
 
@@ -361,7 +361,7 @@ pub fn coerce_from_bare_fn_post_unpack(&self,
          * "rust" fn`) into a closure.
          */
 
-        debug2!("coerce_from_bare_fn(a={}, b={})",
+        debug!("coerce_from_bare_fn(a={}, b={})",
                a.inf_str(self.infcx), b.inf_str(self.infcx));
 
         if !fn_ty_a.abis.is_rust() {
@@ -389,7 +389,7 @@ pub fn coerce_unsafe_ptr(&self,
                              b: ty::t,
                              mt_b: ty::mt)
                              -> CoerceResult {
-        debug2!("coerce_unsafe_ptr(a={}, sty_a={:?}, b={})",
+        debug!("coerce_unsafe_ptr(a={}, sty_a={:?}, b={})",
                a.inf_str(self.infcx), sty_a,
                b.inf_str(self.infcx));
 
index 3f6248eae1236b14ec91abfe9b264d6d404103d5..2d810f1da746fab196122fb83c2bb94460795b45 100644 (file)
@@ -270,7 +270,7 @@ fn contraregions(&self, a: ty::Region, b: ty::Region)
     fn vstores(&self, vk: ty::terr_vstore_kind,
                a: ty::vstore, b: ty::vstore) -> cres<ty::vstore> {
 
-        debug2!("{}.vstores(a={:?}, b={:?})", self.tag(), a, b);
+        debug!("{}.vstores(a={:?}, b={:?})", self.tag(), a, b);
 
         match (a, b) {
             (ty::vstore_slice(a_r), ty::vstore_slice(b_r)) => {
@@ -295,7 +295,7 @@ fn trait_stores(&self,
                     b: ty::TraitStore)
                  -> cres<ty::TraitStore> {
 
-        debug2!("{}.trait_stores(a={:?}, b={:?})", self.tag(), a, b);
+        debug!("{}.trait_stores(a={:?}, b={:?})", self.tag(), a, b);
 
         match (a, b) {
             (ty::RegionTraitStore(a_r), ty::RegionTraitStore(b_r)) => {
@@ -365,7 +365,7 @@ pub fn eq_tys<C:Combine>(this: &C, a: ty::t, b: ty::t) -> ures {
 
 pub fn eq_regions<C:Combine>(this: &C, a: ty::Region, b: ty::Region)
                           -> ures {
-    debug2!("eq_regions({}, {})",
+    debug!("eq_regions({}, {})",
            a.inf_str(this.infcx()),
            b.inf_str(this.infcx()));
     let sub = this.sub();
index 5e9eb51cbb64df369d629a23106c2d338939d36d..87c7373b005d56db747c766d029bab7cc9aca04d 100644 (file)
@@ -44,7 +44,7 @@ fn glb(&self) -> Glb { Glb(**self) }
     fn mts(&self, a: &ty::mt, b: &ty::mt) -> cres<ty::mt> {
         let tcx = self.infcx.tcx;
 
-        debug2!("{}.mts({}, {})",
+        debug!("{}.mts({}, {})",
                self.tag(),
                mt_to_str(tcx, a),
                mt_to_str(tcx, b));
@@ -100,7 +100,7 @@ fn bounds(&self, a: BuiltinBounds, b: BuiltinBounds) -> cres<BuiltinBounds> {
     }
 
     fn regions(&self, a: ty::Region, b: ty::Region) -> cres<ty::Region> {
-        debug2!("{}.regions({:?}, {:?})",
+        debug!("{}.regions({:?}, {:?})",
                self.tag(),
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
@@ -121,7 +121,7 @@ fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
         // Note: this is a subtle algorithm.  For a full explanation,
         // please see the large comment in `region_inference.rs`.
 
-        debug2!("{}.fn_sigs({:?}, {:?})",
+        debug!("{}.fn_sigs({:?}, {:?})",
                self.tag(), a.inf_str(self.infcx), b.inf_str(self.infcx));
         let _indenter = indenter();
 
@@ -143,7 +143,7 @@ fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
 
         // Collect constraints.
         let sig0 = if_ok!(super_fn_sigs(self, &a_with_fresh, &b_with_fresh));
-        debug2!("sig0 = {}", sig0.inf_str(self.infcx));
+        debug!("sig0 = {}", sig0.inf_str(self.infcx));
 
         // Generalize the regions appearing in fn_ty0 if possible
         let new_vars =
@@ -155,7 +155,7 @@ fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
                 |r, _in_fn| generalize_region(self, snapshot,
                                               new_vars, a_isr, a_vars, b_vars,
                                               r));
-        debug2!("sig1 = {}", sig1.inf_str(self.infcx));
+        debug!("sig1 = {}", sig1.inf_str(self.infcx));
         return Ok(sig1);
 
         fn generalize_region(this: &Glb,
index 919ad68a818fa7fec68fe90e6c1be027f4a2e9fb..8a32a305b3a0e6b7b7aff8942d7d1106f4825d6b 100644 (file)
@@ -131,7 +131,7 @@ fn var_sub_var<T:Clone + InferStr + LatticeValue,
         let a_bounds = node_a.possible_types.clone();
         let b_bounds = node_b.possible_types.clone();
 
-        debug2!("vars({}={} <: {}={})",
+        debug!("vars({}={} <: {}={})",
                a_id.to_str(), a_bounds.inf_str(self.infcx),
                b_id.to_str(), b_bounds.inf_str(self.infcx));
 
@@ -179,7 +179,7 @@ fn var_sub_t<T:Clone + InferStr + LatticeValue,
         let a_bounds = &node_a.possible_types;
         let b_bounds = &Bounds { lb: None, ub: Some(b.clone()) };
 
-        debug2!("var_sub_t({}={} <: {})",
+        debug!("var_sub_t({}={} <: {})",
                a_id.to_str(),
                a_bounds.inf_str(self.infcx),
                b.inf_str(self.infcx));
@@ -203,7 +203,7 @@ fn t_sub_var<T:Clone + InferStr + LatticeValue,
         let b_id = node_b.root.clone();
         let b_bounds = &node_b.possible_types;
 
-        debug2!("t_sub_var({} <: {}={})",
+        debug!("t_sub_var({} <: {}={})",
                a.inf_str(self.infcx),
                b_id.to_str(),
                b_bounds.inf_str(self.infcx));
@@ -222,7 +222,7 @@ fn merge_bnd<T:Clone + InferStr + LatticeValue>(
          *
          * Combines two bounds into a more general bound. */
 
-        debug2!("merge_bnd({},{})",
+        debug!("merge_bnd({},{})",
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
         let _r = indenter();
@@ -273,7 +273,7 @@ fn set_var_to_merged_bounds<T:Clone + InferStr + LatticeValue,
         //       A     \ / A
         //              B
 
-        debug2!("merge({},{},{})",
+        debug!("merge({},{},{})",
                v_id.to_str(),
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
@@ -290,7 +290,7 @@ fn set_var_to_merged_bounds<T:Clone + InferStr + LatticeValue,
         let ub = if_ok!(self.merge_bnd(&a.ub, &b.ub, LatticeValue::glb));
         let lb = if_ok!(self.merge_bnd(&a.lb, &b.lb, LatticeValue::lub));
         let bounds = Bounds { lb: lb, ub: ub };
-        debug2!("merge({}): bounds={}",
+        debug!("merge({}): bounds={}",
                v_id.to_str(),
                bounds.inf_str(self.infcx));
 
@@ -305,7 +305,7 @@ fn bnds<T:Clone + InferStr + LatticeValue>(&self,
                                                a: &Bound<T>,
                                                b: &Bound<T>)
                                                -> ures {
-        debug2!("bnds({} <: {})", a.inf_str(self.infcx),
+        debug!("bnds({} <: {})", a.inf_str(self.infcx),
                b.inf_str(self.infcx));
         let _r = indenter();
 
@@ -370,7 +370,7 @@ pub fn super_lattice_tys<L:LatticeDir + TyLatticeDir + Combine>(
     this: &L,
     a: ty::t,
     b: ty::t) -> cres<ty::t> {
-    debug2!("{}.lattice_tys({}, {})", this.tag(),
+    debug!("{}.lattice_tys({}, {})", this.tag(),
            a.inf_str(this.infcx()),
            b.inf_str(this.infcx()));
     let _r = indenter();
@@ -448,7 +448,7 @@ pub fn lattice_vars<L:LatticeDir + Combine,
     let a_bounds = &nde_a.possible_types;
     let b_bounds = &nde_b.possible_types;
 
-    debug2!("{}.lattice_vars({}={} <: {}={})",
+    debug!("{}.lattice_vars({}={} <: {}={})",
            this.tag(),
            a_vid.to_str(), a_bounds.inf_str(this.infcx()),
            b_vid.to_str(), b_bounds.inf_str(this.infcx()));
@@ -494,7 +494,7 @@ pub fn lattice_var_and_t<L:LatticeDir + Combine,
     // The comments in this function are written for LUB, but they
     // apply equally well to GLB if you inverse upper/lower/sub/super/etc.
 
-    debug2!("{}.lattice_var_and_t({}={} <: {})",
+    debug!("{}.lattice_var_and_t({}={} <: {})",
            this.tag(),
            a_id.to_str(),
            a_bounds.inf_str(this.infcx()),
@@ -503,13 +503,13 @@ pub fn lattice_var_and_t<L:LatticeDir + Combine,
     match this.bnd(a_bounds) {
         Some(ref a_bnd) => {
             // If a has an upper bound, return the LUB(a.ub, b)
-            debug2!("bnd=Some({})", a_bnd.inf_str(this.infcx()));
+            debug!("bnd=Some({})", a_bnd.inf_str(this.infcx()));
             lattice_dir_op(a_bnd, b)
         }
         None => {
             // If a does not have an upper bound, make b the upper bound of a
             // and then return b.
-            debug2!("bnd=None");
+            debug!("bnd=None");
             let a_bounds = this.with_bnd(a_bounds, (*b).clone());
             do this.combine_fields().bnds(&a_bounds.lb, &a_bounds.ub).then {
                 this.infcx().set(a_id.clone(),
index c8974a722fd88de6df8edaccd6b9e52a42077f51..42793d956df063fc1a0ee6db98ee49ff39d40a66 100644 (file)
@@ -50,7 +50,7 @@ fn glb(&self) -> Glb { Glb(**self) }
     fn mts(&self, a: &ty::mt, b: &ty::mt) -> cres<ty::mt> {
         let tcx = self.infcx.tcx;
 
-        debug2!("{}.mts({}, {})",
+        debug!("{}.mts({}, {})",
                self.tag(),
                mt_to_str(tcx, a),
                mt_to_str(tcx, b));
@@ -106,7 +106,7 @@ fn contraregions(&self, a: ty::Region, b: ty::Region)
     }
 
     fn regions(&self, a: ty::Region, b: ty::Region) -> cres<ty::Region> {
-        debug2!("{}.regions({:?}, {:?})",
+        debug!("{}.regions({:?}, {:?})",
                self.tag(),
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
@@ -134,7 +134,7 @@ fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
 
         // Collect constraints.
         let sig0 = if_ok!(super_fn_sigs(self, &a_with_fresh, &b_with_fresh));
-        debug2!("sig0 = {}", sig0.inf_str(self.infcx));
+        debug!("sig0 = {}", sig0.inf_str(self.infcx));
 
         // Generalize the regions appearing in sig0 if possible
         let new_vars =
@@ -154,7 +154,7 @@ fn generalize_region(this: &Lub,
                              r0: ty::Region) -> ty::Region {
             // Regions that pre-dated the LUB computation stay as they are.
             if !is_var_in_set(new_vars, r0) {
-                debug2!("generalize_region(r0={:?}): not new variable", r0);
+                debug!("generalize_region(r0={:?}): not new variable", r0);
                 return r0;
             }
 
@@ -164,7 +164,7 @@ fn generalize_region(this: &Lub,
             // *related* to regions that pre-date the LUB computation
             // stay as they are.
             if !tainted.iter().all(|r| is_var_in_set(new_vars, *r)) {
-                debug2!("generalize_region(r0={:?}): \
+                debug!("generalize_region(r0={:?}): \
                         non-new-variables found in {:?}",
                        r0, tainted);
                 return r0;
@@ -179,7 +179,7 @@ fn generalize_region(this: &Lub,
             do list::each(a_isr) |pair| {
                 let (a_br, a_r) = *pair;
                 if tainted.iter().any(|x| x == &a_r) {
-                    debug2!("generalize_region(r0={:?}): \
+                    debug!("generalize_region(r0={:?}): \
                             replacing with {:?}, tainted={:?}",
                            r0, a_br, tainted);
                     ret = Some(ty::re_bound(a_br));
index c93b50c76b0c86847d82251275113f009cc6a426..487eb4c32890e9f267c8aebcf57dbe9fb163f7e8 100644 (file)
@@ -285,7 +285,7 @@ pub fn common_supertype(cx: @mut InferCtxt,
      * not possible, reports an error and returns ty::err.
      */
 
-    debug2!("common_supertype({}, {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("common_supertype({}, {})", a.inf_str(cx), b.inf_str(cx));
 
     let trace = TypeTrace {
         origin: origin,
@@ -311,7 +311,7 @@ pub fn mk_subty(cx: @mut InferCtxt,
                 a: ty::t,
                 b: ty::t)
              -> ures {
-    debug2!("mk_subty({} <: {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("mk_subty({} <: {})", a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.commit {
             let trace = TypeTrace {
@@ -324,7 +324,7 @@ pub fn mk_subty(cx: @mut InferCtxt,
 }
 
 pub fn can_mk_subty(cx: @mut InferCtxt, a: ty::t, b: ty::t) -> ures {
-    debug2!("can_mk_subty({} <: {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("can_mk_subty({} <: {})", a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.probe {
             let trace = TypeTrace {
@@ -341,7 +341,7 @@ pub fn mk_subr(cx: @mut InferCtxt,
                origin: SubregionOrigin,
                a: ty::Region,
                b: ty::Region) {
-    debug2!("mk_subr({} <: {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("mk_subr({} <: {})", a.inf_str(cx), b.inf_str(cx));
     cx.region_vars.start_snapshot();
     cx.region_vars.make_subregion(origin, a, b);
     cx.region_vars.commit();
@@ -353,7 +353,7 @@ pub fn mk_eqty(cx: @mut InferCtxt,
                a: ty::t,
                b: ty::t)
             -> ures {
-    debug2!("mk_eqty({} <: {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("mk_eqty({} <: {})", a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.commit {
             let trace = TypeTrace {
@@ -373,7 +373,7 @@ pub fn mk_sub_trait_refs(cx: @mut InferCtxt,
                          b: @ty::TraitRef)
     -> ures
 {
-    debug2!("mk_sub_trait_refs({} <: {})",
+    debug!("mk_sub_trait_refs({} <: {})",
            a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.commit {
@@ -403,7 +403,7 @@ pub fn mk_coercety(cx: @mut InferCtxt,
                    a: ty::t,
                    b: ty::t)
                 -> CoerceResult {
-    debug2!("mk_coercety({} -> {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("mk_coercety({} -> {})", a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.commit {
             let trace = TypeTrace {
@@ -416,7 +416,7 @@ pub fn mk_coercety(cx: @mut InferCtxt,
 }
 
 pub fn can_mk_coercety(cx: @mut InferCtxt, a: ty::t, b: ty::t) -> ures {
-    debug2!("can_mk_coercety({} -> {})", a.inf_str(cx), b.inf_str(cx));
+    debug!("can_mk_coercety({} -> {})", a.inf_str(cx), b.inf_str(cx));
     do indent {
         do cx.probe {
             let trace = TypeTrace {
@@ -539,7 +539,7 @@ pub fn start_snapshot(&mut self) -> Snapshot {
     }
 
     pub fn rollback_to(&mut self, snapshot: &Snapshot) {
-        debug2!("rollback!");
+        debug!("rollback!");
         rollback_to(&mut self.ty_var_bindings, snapshot.ty_var_bindings_len);
 
         rollback_to(&mut self.int_var_bindings,
@@ -554,7 +554,7 @@ pub fn rollback_to(&mut self, snapshot: &Snapshot) {
     pub fn commit<T,E>(@mut self, f: &fn() -> Result<T,E>) -> Result<T,E> {
         assert!(!self.in_snapshot());
 
-        debug2!("commit()");
+        debug!("commit()");
         do indent {
             let r = self.try(|| f());
 
@@ -567,7 +567,7 @@ pub fn commit<T,E>(@mut self, f: &fn() -> Result<T,E>) -> Result<T,E> {
 
     /// Execute `f`, unroll bindings on failure
     pub fn try<T,E>(@mut self, f: &fn() -> Result<T,E>) -> Result<T,E> {
-        debug2!("try()");
+        debug!("try()");
         do indent {
             let snapshot = self.start_snapshot();
             let r = f();
@@ -581,7 +581,7 @@ pub fn try<T,E>(@mut self, f: &fn() -> Result<T,E>) -> Result<T,E> {
 
     /// Execute `f` then unroll any bindings it creates
     pub fn probe<T,E>(@mut self, f: &fn() -> Result<T,E>) -> Result<T,E> {
-        debug2!("probe()");
+        debug!("probe()");
         do indent {
             let snapshot = self.start_snapshot();
             let r = f();
@@ -725,7 +725,7 @@ pub fn type_error_message_str_with_expected(@mut self,
                                                 expected_ty: Option<ty::t>,
                                                 actual_ty: ~str,
                                                 err: Option<&ty::type_err>) {
-        debug2!("hi! expected_ty = {:?}, actual_ty = {}", expected_ty, actual_ty);
+        debug!("hi! expected_ty = {:?}, actual_ty = {}", expected_ty, actual_ty);
 
         let error_str = do err.map_default(~"") |t_err| {
             format!(" ({})", ty::type_err_to_str(self.tcx, t_err))
@@ -792,7 +792,7 @@ pub fn replace_bound_regions_with_fresh_regions(&mut self,
             replace_bound_regions_in_fn_sig(self.tcx, @Nil, None, fsig, |br| {
                 let rvar = self.next_region_var(
                     BoundRegionInFnType(trace.origin.span(), br));
-                debug2!("Bound region {} maps to {:?}",
+                debug!("Bound region {} maps to {:?}",
                        bound_region_to_str(self.tcx, "", false, br),
                        rvar);
                 rvar
index 3ab7ced39416c518f505690eba4ba1e124e40b1d..68c5ec3b7d66dc73aa5004965bdbedbc60de09b6 100644 (file)
@@ -130,7 +130,7 @@ pub fn in_snapshot(&self) -> bool {
     }
 
     pub fn start_snapshot(&mut self) -> uint {
-        debug2!("RegionVarBindings: snapshot()={}", self.undo_log.len());
+        debug!("RegionVarBindings: snapshot()={}", self.undo_log.len());
         if self.in_snapshot() {
             self.undo_log.len()
         } else {
@@ -140,17 +140,17 @@ pub fn start_snapshot(&mut self) -> uint {
     }
 
     pub fn commit(&mut self) {
-        debug2!("RegionVarBindings: commit()");
+        debug!("RegionVarBindings: commit()");
         while self.undo_log.len() > 0 {
             self.undo_log.pop();
         }
     }
 
     pub fn rollback_to(&mut self, snapshot: uint) {
-        debug2!("RegionVarBindings: rollback_to({})", snapshot);
+        debug!("RegionVarBindings: rollback_to({})", snapshot);
         while self.undo_log.len() > snapshot {
             let undo_item = self.undo_log.pop();
-            debug2!("undo_item={:?}", undo_item);
+            debug!("undo_item={:?}", undo_item);
             match undo_item {
               Snapshot => {}
               AddVar(vid) => {
@@ -181,7 +181,7 @@ pub fn new_region_var(&mut self, origin: RegionVariableOrigin) -> RegionVid {
         if self.in_snapshot() {
             self.undo_log.push(AddVar(vid));
         }
-        debug2!("created new region variable {:?} with origin {:?}",
+        debug!("created new region variable {:?} with origin {:?}",
                vid, origin.repr(self.tcx));
         return vid;
     }
@@ -218,7 +218,7 @@ pub fn add_constraint(&mut self,
         // cannot add constraints once regions are resolved
         assert!(self.values.is_empty());
 
-        debug2!("RegionVarBindings: add_constraint({:?})", constraint);
+        debug!("RegionVarBindings: add_constraint({:?})", constraint);
 
         if self.constraints.insert(constraint, origin) {
             if self.in_snapshot() {
@@ -234,7 +234,7 @@ pub fn make_subregion(&mut self,
         // cannot add constraints once regions are resolved
         assert!(self.values.is_empty());
 
-        debug2!("RegionVarBindings: make_subregion({:?}, {:?})", sub, sup);
+        debug!("RegionVarBindings: make_subregion({:?}, {:?})", sub, sup);
         match (sub, sup) {
           (re_infer(ReVar(sub_id)), re_infer(ReVar(sup_id))) => {
             self.add_constraint(ConstrainVarSubVar(sub_id, sup_id), origin);
@@ -269,7 +269,7 @@ pub fn lub_regions(&mut self,
         // cannot add constraints once regions are resolved
         assert!(self.values.is_empty());
 
-        debug2!("RegionVarBindings: lub_regions({:?}, {:?})", a, b);
+        debug!("RegionVarBindings: lub_regions({:?}, {:?})", a, b);
         match (a, b) {
             (re_static, _) | (_, re_static) => {
                 re_static // nothing lives longer than static
@@ -292,7 +292,7 @@ pub fn glb_regions(&mut self,
         // cannot add constraints once regions are resolved
         assert!(self.values.is_empty());
 
-        debug2!("RegionVarBindings: glb_regions({:?}, {:?})", a, b);
+        debug!("RegionVarBindings: glb_regions({:?}, {:?})", a, b);
         match (a, b) {
             (re_static, r) | (r, re_static) => {
                 // static lives longer than everything else
@@ -317,7 +317,7 @@ pub fn resolve_var(&mut self, rid: RegionVid) -> ty::Region {
         }
 
         let v = self.values.with_ref(|values| values[rid.to_uint()]);
-        debug2!("RegionVarBindings: resolve_var({:?}={})={:?}",
+        debug!("RegionVarBindings: resolve_var({:?}={})={:?}",
                rid, rid.to_uint(), v);
         match v {
             Value(r) => r,
@@ -367,7 +367,7 @@ pub fn combine_vars(&mut self,
         }
         relate(self, a, re_infer(ReVar(c)));
         relate(self, b, re_infer(ReVar(c)));
-        debug2!("combine_vars() c={:?}", c);
+        debug!("combine_vars() c={:?}", c);
         re_infer(ReVar(c))
     }
 
@@ -390,7 +390,7 @@ pub fn tainted(&mut self, snapshot: uint, r0: Region) -> ~[Region] {
          * regions.
          */
 
-        debug2!("tainted(snapshot={}, r0={:?})", snapshot, r0);
+        debug!("tainted(snapshot={}, r0={:?})", snapshot, r0);
         let _indenter = indenter();
 
         let undo_len = self.undo_log.len();
@@ -404,7 +404,7 @@ pub fn tainted(&mut self, snapshot: uint, r0: Region) -> ~[Region] {
             // nb: can't use uint::range() here because result_set grows
             let r = result_set[result_index];
 
-            debug2!("result_index={}, r={:?}", result_index, r);
+            debug!("result_index={}, r={:?}", result_index, r);
 
             let mut undo_index = snapshot;
             while undo_index < undo_len {
@@ -469,7 +469,7 @@ fn consider_adding_edge(result_set: ~[Region],
     errors are reported.
     */
     pub fn resolve_regions(&mut self) -> OptVec<RegionResolutionError> {
-        debug2!("RegionVarBindings: resolve_regions()");
+        debug!("RegionVarBindings: resolve_regions()");
         let mut errors = opt_vec::Empty;
         let v = self.infer_variable_values(&mut errors);
         self.values.put_back(v);
@@ -582,7 +582,7 @@ fn glb_concrete_regions(&self,
                             a: Region,
                             b: Region)
                          -> cres<Region> {
-        debug2!("glb_concrete_regions({:?}, {:?})", a, b);
+        debug!("glb_concrete_regions({:?}, {:?})", a, b);
         match (a, b) {
             (re_static, r) | (r, re_static) => {
                 // static lives longer than everything else
@@ -691,7 +691,7 @@ fn intersect_scopes(&self,
         // scopes or two free regions.  So, if one of
         // these scopes is a subscope of the other, return
         // it.  Otherwise fail.
-        debug2!("intersect_scopes(scope_a={:?}, scope_b={:?}, region_a={:?}, region_b={:?})",
+        debug!("intersect_scopes(scope_a={:?}, scope_b={:?}, region_a={:?}, region_b={:?})",
                scope_a, scope_b, region_a, region_b);
         let rm = self.tcx.region_maps;
         match rm.nearest_common_ancestor(scope_a, scope_b) {
@@ -778,13 +778,13 @@ fn expand_node(&self,
                    b_vid: RegionVid,
                    b_data: &mut VarData)
                    -> bool {
-        debug2!("expand_node({:?}, {:?} == {:?})",
+        debug!("expand_node({:?}, {:?} == {:?})",
                a_region, b_vid, b_data.value);
 
         b_data.classification = Expanding;
         match b_data.value {
           NoValue => {
-            debug2!("Setting initial value of {:?} to {:?}", b_vid, a_region);
+            debug!("Setting initial value of {:?} to {:?}", b_vid, a_region);
 
             b_data.value = Value(a_region);
             return true;
@@ -796,7 +796,7 @@ fn expand_node(&self,
                 return false;
             }
 
-            debug2!("Expanding value of {:?} from {:?} to {:?}",
+            debug!("Expanding value of {:?} from {:?} to {:?}",
                    b_vid, cur_region, lub);
 
             b_data.value = Value(lub);
@@ -843,7 +843,7 @@ fn contract_node(&self,
                      a_data: &mut VarData,
                      b_region: Region)
                      -> bool {
-        debug2!("contract_node({:?} == {:?}/{:?}, {:?})",
+        debug!("contract_node({:?} == {:?}/{:?}, {:?})",
                a_vid, a_data.value, a_data.classification, b_region);
 
         return match a_data.value {
@@ -876,7 +876,7 @@ fn check_node(this: &RegionVarBindings,
                       b_region: Region)
                    -> bool {
             if !this.is_subregion_of(a_region, b_region) {
-                debug2!("Setting {:?} to ErrorValue: {:?} not subregion of {:?}",
+                debug!("Setting {:?} to ErrorValue: {:?} not subregion of {:?}",
                        a_vid, a_region, b_region);
                 a_data.value = ErrorValue;
             }
@@ -894,14 +894,14 @@ fn adjust_node(this: &RegionVarBindings,
                     if glb == a_region {
                         false
                     } else {
-                        debug2!("Contracting value of {:?} from {:?} to {:?}",
+                        debug!("Contracting value of {:?} from {:?} to {:?}",
                                a_vid, a_region, glb);
                         a_data.value = Value(glb);
                         true
                     }
                 }
                 Err(_) => {
-                    debug2!("Setting {:?} to ErrorValue: no glb of {:?}, {:?}",
+                    debug!("Setting {:?} to ErrorValue: no glb of {:?}, {:?}",
                            a_vid, a_region, b_region);
                     a_data.value = ErrorValue;
                     false
@@ -930,7 +930,7 @@ fn collect_concrete_region_errors(
                 continue;
             }
 
-            debug2!("ConcreteFailure: !(sub <= sup): sub={:?}, sup={:?}",
+            debug!("ConcreteFailure: !(sub <= sup): sub={:?}, sup={:?}",
                    sub, sup);
             let origin = self.constraints.get_copy(constraint);
             errors.push(ConcreteFailure(origin, sub, sup));
@@ -943,7 +943,7 @@ fn extract_values_and_collect_conflicts(
         errors: &mut OptVec<RegionResolutionError>)
         -> ~[VarValue]
     {
-        debug2!("extract_values_and_collect_conflicts()");
+        debug!("extract_values_and_collect_conflicts()");
 
         // This is the best way that I have found to suppress
         // duplicate and related errors. Basically we keep a set of
@@ -1182,7 +1182,7 @@ struct WalkState {
                 state.dup_found = true;
             }
 
-            debug2!("collect_concrete_regions(orig_node_idx={:?}, node_idx={:?}, \
+            debug!("collect_concrete_regions(orig_node_idx={:?}, node_idx={:?}, \
                     classification={:?})",
                    orig_node_idx, node_idx, classification);
 
@@ -1204,7 +1204,7 @@ fn process_edges(this: &RegionVarBindings,
                          graph: &RegionGraph,
                          source_vid: RegionVid,
                          dir: Direction) {
-            debug2!("process_edges(source_vid={:?}, dir={:?})", source_vid, dir);
+            debug!("process_edges(source_vid={:?}, dir={:?})", source_vid, dir);
 
             let source_node_index = NodeIndex(source_vid.to_uint());
             do graph.each_adjacent_edge(source_node_index, dir) |_, edge| {
@@ -1240,17 +1240,17 @@ fn iterate_until_fixed_point(&self,
         while changed {
             changed = false;
             iteration += 1;
-            debug2!("---- {} Iteration \\#{}", tag, iteration);
+            debug!("---- {} Iteration \\#{}", tag, iteration);
             for (constraint, _) in self.constraints.iter() {
                 let edge_changed = body(constraint);
                 if edge_changed {
-                    debug2!("Updated due to constraint {}",
+                    debug!("Updated due to constraint {}",
                            constraint.repr(self.tcx));
                     changed = true;
                 }
             }
         }
-        debug2!("---- {} Complete after {} iteration(s)", tag, iteration);
+        debug!("---- {} Complete after {} iteration(s)", tag, iteration);
     }
 
 }
index dcb0e6fbd413da27b19a2989615fba3f43e1d1aa..564fcb76dc73b57ec688500de4c10b08d256b283 100644 (file)
@@ -104,7 +104,7 @@ pub fn should(&mut self, mode: uint) -> bool {
     pub fn resolve_type_chk(&mut self, typ: ty::t) -> fres<ty::t> {
         self.err = None;
 
-        debug2!("Resolving {} (modes={:x})",
+        debug!("Resolving {} (modes={:x})",
                ty_to_str(self.infcx.tcx, typ),
                self.modes);
 
@@ -116,7 +116,7 @@ pub fn resolve_type_chk(&mut self, typ: ty::t) -> fres<ty::t> {
         assert!(self.v_seen.is_empty());
         match self.err {
           None => {
-            debug2!("Resolved to {} + {} (modes={:x})",
+            debug!("Resolved to {} + {} (modes={:x})",
                    ty_to_str(self.infcx.tcx, rty),
                    ty_to_str(self.infcx.tcx, rty),
                    self.modes);
@@ -137,7 +137,7 @@ pub fn resolve_region_chk(&mut self, orig: ty::Region)
     }
 
     pub fn resolve_type(&mut self, typ: ty::t) -> ty::t {
-        debug2!("resolve_type({})", typ.inf_str(self.infcx));
+        debug!("resolve_type({})", typ.inf_str(self.infcx));
         let _i = indenter();
 
         if !ty::type_needs_infer(typ) {
@@ -179,7 +179,7 @@ pub fn resolve_type(&mut self, typ: ty::t) -> ty::t {
     }
 
     pub fn resolve_region(&mut self, orig: ty::Region) -> ty::Region {
-        debug2!("Resolve_region({})", orig.inf_str(self.infcx));
+        debug!("Resolve_region({})", orig.inf_str(self.infcx));
         match orig {
           ty::re_infer(ty::ReVar(rid)) => self.resolve_region_var(rid),
           _ => orig
index 2a2d7fbcfc74614809cd3d571cda7ef4d7a56f91..e5afefe0c716471b18bb503f35a6389df9129aaa 100644 (file)
@@ -56,7 +56,7 @@ fn contraregions(&self, a: ty::Region, b: ty::Region)
     }
 
     fn regions(&self, a: ty::Region, b: ty::Region) -> cres<ty::Region> {
-        debug2!("{}.regions({}, {})",
+        debug!("{}.regions({}, {})",
                self.tag(),
                a.inf_str(self.infcx),
                b.inf_str(self.infcx));
@@ -65,7 +65,7 @@ fn regions(&self, a: ty::Region, b: ty::Region) -> cres<ty::Region> {
     }
 
     fn mts(&self, a: &ty::mt, b: &ty::mt) -> cres<ty::mt> {
-        debug2!("mts({} <: {})", a.inf_str(self.infcx), b.inf_str(self.infcx));
+        debug!("mts({} <: {})", a.inf_str(self.infcx), b.inf_str(self.infcx));
 
         if a.mutbl != b.mutbl {
             return Err(ty::terr_mutability);
@@ -110,7 +110,7 @@ fn bounds(&self, a: BuiltinBounds, b: BuiltinBounds) -> cres<BuiltinBounds> {
     }
 
     fn tys(&self, a: ty::t, b: ty::t) -> cres<ty::t> {
-        debug2!("{}.tys({}, {})", self.tag(),
+        debug!("{}.tys({}, {})", self.tag(),
                a.inf_str(self.infcx), b.inf_str(self.infcx));
         if a == b { return Ok(a); }
         let _indenter = indenter();
@@ -143,7 +143,7 @@ fn tys(&self, a: ty::t, b: ty::t) -> cres<ty::t> {
     }
 
     fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
-        debug2!("fn_sigs(a={}, b={})",
+        debug!("fn_sigs(a={}, b={})",
                a.inf_str(self.infcx), b.inf_str(self.infcx));
         let _indenter = indenter();
 
@@ -172,15 +172,15 @@ fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig> {
             do replace_bound_regions_in_fn_sig(self.infcx.tcx, @Nil,
                                               None, b) |br| {
                 let skol = self.infcx.region_vars.new_skolemized(br);
-                debug2!("Bound region {} skolemized to {:?}",
+                debug!("Bound region {} skolemized to {:?}",
                        bound_region_to_str(self.infcx.tcx, "", false, br),
                        skol);
                 skol
             }
         };
 
-        debug2!("a_sig={}", a_sig.inf_str(self.infcx));
-        debug2!("b_sig={}", b_sig.inf_str(self.infcx));
+        debug!("a_sig={}", a_sig.inf_str(self.infcx));
+        debug!("b_sig={}", b_sig.inf_str(self.infcx));
 
         // Compare types now that bound regions have been replaced.
         let sig = if_ok!(super_fn_sigs(self, &a_sig, &b_sig));
index 8792a068671d381a1b0b26dd0cd4fde944bc75d7..48660ab64e591b541a0bad53009f7e0a039786e0 100644 (file)
@@ -100,7 +100,7 @@ pub fn lookup_item(&self, names: &[~str]) -> ast::node_id {
         return match search_mod(self, &self.crate.node.module, 0, names) {
             Some(id) => id,
             None => {
-                fail2!("No item found: `%s`", names.connect("::"));
+                fail!("No item found: `%s`", names.connect("::"));
             }
         };
 
@@ -153,7 +153,7 @@ pub fn is_subtype(&self, a: ty::t, b: ty::t) -> bool {
 
     pub fn assert_subtype(&self, a: ty::t, b: ty::t) {
         if !self.is_subtype(a, b) {
-            fail2!("%s is not a subtype of %s, but it should be",
+            fail!("%s is not a subtype of %s, but it should be",
                   self.ty_to_str(a),
                   self.ty_to_str(b));
         }
@@ -161,7 +161,7 @@ pub fn assert_subtype(&self, a: ty::t, b: ty::t) {
 
     pub fn assert_not_subtype(&self, a: ty::t, b: ty::t) {
         if self.is_subtype(a, b) {
-            fail2!("%s is a subtype of %s, but it shouldn't be",
+            fail!("%s is a subtype of %s, but it shouldn't be",
                   self.ty_to_str(a),
                   self.ty_to_str(b));
         }
@@ -223,12 +223,12 @@ pub fn lub() -> Lub { Lub(self.infcx.combine_fields(true, dummy_sp())) }
     pub fn glb() -> Glb { Glb(self.infcx.combine_fields(true, dummy_sp())) }
 
     pub fn resolve_regions(exp_count: uint) {
-        debug2!("resolve_regions(%u)", exp_count);
+        debug!("resolve_regions(%u)", exp_count);
 
         self.infcx.resolve_regions();
         if self.err_messages.len() != exp_count {
             for msg in self.err_messages.iter() {
-                debug2!("Error encountered: %s", *msg);
+                debug!("Error encountered: %s", *msg);
             }
             format!("Resolving regions encountered %u errors but expected %u!",
                  self.err_messages.len(),
@@ -240,7 +240,7 @@ pub fn resolve_regions(exp_count: uint) {
     pub fn check_lub(&self, t1: ty::t, t2: ty::t, t_lub: ty::t) {
         match self.lub().tys(t1, t2) {
             Err(e) => {
-                fail2!("Unexpected error computing LUB: %?", e)
+                fail!("Unexpected error computing LUB: %?", e)
             }
             Ok(t) => {
                 self.assert_eq(t, t_lub);
@@ -256,13 +256,13 @@ pub fn check_lub(&self, t1: ty::t, t2: ty::t, t_lub: ty::t) {
 
     /// Checks that `GLB(t1,t2) == t_glb`
     pub fn check_glb(&self, t1: ty::t, t2: ty::t, t_glb: ty::t) {
-        debug2!("check_glb(t1=%s, t2=%s, t_glb=%s)",
+        debug!("check_glb(t1=%s, t2=%s, t_glb=%s)",
                self.ty_to_str(t1),
                self.ty_to_str(t2),
                self.ty_to_str(t_glb));
         match self.glb().tys(t1, t2) {
             Err(e) => {
-                fail2!("Unexpected error computing LUB: %?", e)
+                fail!("Unexpected error computing LUB: %?", e)
             }
             Ok(t) => {
                 self.assert_eq(t, t_glb);
@@ -281,7 +281,7 @@ pub fn check_no_lub(&self, t1: ty::t, t2: ty::t) {
         match self.lub().tys(t1, t2) {
             Err(_) => {}
             Ok(t) => {
-                fail2!("Unexpected success computing LUB: %?", self.ty_to_str(t))
+                fail!("Unexpected success computing LUB: %?", self.ty_to_str(t))
             }
         }
     }
@@ -291,7 +291,7 @@ pub fn check_no_glb(&self, t1: ty::t, t2: ty::t) {
         match self.glb().tys(t1, t2) {
             Err(_) => {}
             Ok(t) => {
-                fail2!("Unexpected success computing GLB: %?", self.ty_to_str(t))
+                fail!("Unexpected success computing GLB: %?", self.ty_to_str(t))
             }
         }
     }
index c05306a27be429fddbc1007e4328da3372c2995a..b58a526b7ea94e1d10941666a804edbd1dce4555 100644 (file)
@@ -116,7 +116,7 @@ fn set<T:Clone + InferStr,
          * Sets the value for `vid` to `new_v`.  `vid` MUST be a root node!
          */
 
-        debug2!("Updating variable {} to {}",
+        debug!("Updating variable {} to {}",
                vid.to_str(), new_v.inf_str(self));
 
         let vb = UnifyVid::appropriate_vals_and_bindings(self);
@@ -134,7 +134,7 @@ fn unify<T:Clone + InferStr,
         // Rank optimization: if you don't know what it is, check
         // out <http://en.wikipedia.org/wiki/Disjoint-set_data_structure>
 
-        debug2!("unify(node_a(id={:?}, rank={:?}), \
+        debug!("unify(node_a(id={:?}, rank={:?}), \
                 node_b(id={:?}, rank={:?}))",
                node_a.root, node_a.rank,
                node_b.root, node_b.rank);
index 116d26967b2b551f37f6d07cdea5f547cf591c2b..10005bfb2cb68cae39342397f60e8c757e435d9a 100644 (file)
@@ -226,7 +226,7 @@ pub struct CrateCtxt {
 
 // Functions that write types into the node type table
 pub fn write_ty_to_tcx(tcx: ty::ctxt, node_id: ast::NodeId, ty: ty::t) {
-    debug2!("write_ty_to_tcx({}, {})", node_id, ppaux::ty_to_str(tcx, ty));
+    debug!("write_ty_to_tcx({}, {})", node_id, ppaux::ty_to_str(tcx, ty));
     assert!(!ty::type_needs_infer(ty));
     tcx.node_types.insert(node_id as uint, ty);
 }
@@ -234,7 +234,7 @@ pub fn write_substs_to_tcx(tcx: ty::ctxt,
                            node_id: ast::NodeId,
                            substs: ~[ty::t]) {
     if substs.len() > 0u {
-        debug2!("write_substs_to_tcx({}, {:?})", node_id,
+        debug!("write_substs_to_tcx({}, {:?})", node_id,
                substs.map(|t| ppaux::ty_to_str(tcx, *t)));
         assert!(substs.iter().all(|t| !ty::type_needs_infer(*t)));
         tcx.node_type_substs.insert(node_id, substs);
index f6483a48ed00dfad377b9c2b6c53405e07d4c481..1967122745dad5ebfaa98895dbebd991fd0fa8fd 100644 (file)
@@ -235,7 +235,7 @@ fn self_region(&self, _span: Span) -> Result<ty::Region, RegionError> {
             None => {
                 // if the self region is used, region parameterization should
                 // have inferred that this type is RP
-                fail2!("region parameterization should have inferred that \
+                fail!("region parameterization should have inferred that \
                         this type is RP");
             }
             Some(ref region_parameterization) => {
index 712bf66bdaf26ba529d5ca9d4aeb00000dac1c43..8bdb518b621172b14eab513c025a87b4f6c23f48 100644 (file)
@@ -392,7 +392,7 @@ impl Drop for finally {
                 }
             }
             // Fail so the process returns a failure code
-            fail2!();
+            fail!();
         }
     }
 }
index 46c71ea12f58331306f8e9c337e96da686c79248..ecc53ae5f80615420ac576af45224f093d07576d 100644 (file)
@@ -29,9 +29,9 @@ pub fn time<T, U>(do_it: bool, what: &str, u: U, f: &fn(U) -> T) -> T {
 pub fn indent<R>(op: &fn() -> R) -> R {
     // Use in conjunction with the log post-processor like `src/etc/indenter`
     // to make debug output more readable.
-    debug2!(">>");
+    debug!(">>");
     let r = op();
-    debug2!("<< (Result = {:?})", r);
+    debug!("<< (Result = {:?})", r);
     r
 }
 
@@ -40,7 +40,7 @@ pub struct _indenter {
 }
 
 impl Drop for _indenter {
-    fn drop(&mut self) { debug2!("<<"); }
+    fn drop(&mut self) { debug!("<<"); }
 }
 
 pub fn _indenter(_i: ()) -> _indenter {
@@ -50,7 +50,7 @@ pub fn _indenter(_i: ()) -> _indenter {
 }
 
 pub fn indenter() -> _indenter {
-    debug2!(">>");
+    debug!(">>");
     _indenter(())
 }
 
index 169363c75538f70512fa4596a6409a96f3d12b38..6ee7f8c172743d403ca5b3bcca20f7ad8027a585 100644 (file)
@@ -86,7 +86,7 @@ fn clean(&self) -> Crate {
         Crate {
             name: match maybe_meta {
                 Some(x) => x.to_owned(),
-                None => fail2!("rustdoc requires a \\#[link(name=\"foo\")] \
+                None => fail!("rustdoc requires a \\#[link(name=\"foo\")] \
                                 crate attribute"),
             },
             module: Some(self.module.clean()),
@@ -623,9 +623,9 @@ pub enum TypeKind {
 impl Clean<Type> for ast::Ty {
     fn clean(&self) -> Type {
         use syntax::ast::*;
-        debug2!("cleaning type `{:?}`", self);
+        debug!("cleaning type `{:?}`", self);
         let codemap = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess.codemap;
-        debug2!("span corresponds to `{}`", codemap.span_to_str(self.span));
+        debug!("span corresponds to `{}`", codemap.span_to_str(self.span));
         match self.node {
             ty_nil => Unit,
             ty_ptr(ref m) => RawPointer(m.mutbl.clean(), ~m.ty.clean()),
@@ -643,7 +643,7 @@ fn clean(&self) -> Type {
             ty_closure(ref c) => Closure(~c.clean()),
             ty_bare_fn(ref barefn) => BareFunction(~barefn.clean()),
             ty_bot => Bottom,
-            ref x => fail2!("Unimplemented type {:?}", x),
+            ref x => fail!("Unimplemented type {:?}", x),
         }
     }
 }
@@ -927,7 +927,7 @@ pub struct Static {
 
 impl Clean<Item> for doctree::Static {
     fn clean(&self) -> Item {
-        debug2!("claning static {}: {:?}", self.name.clean(), self);
+        debug!("claning static {}: {:?}", self.name.clean(), self);
         Item {
             name: Some(self.name.clean()),
             attrs: self.attrs.clean(),
@@ -1107,13 +1107,13 @@ trait ToSource {
 
 impl ToSource for syntax::codemap::Span {
     fn to_src(&self) -> ~str {
-        debug2!("converting span {:?} to snippet", self.clean());
+        debug!("converting span {:?} to snippet", self.clean());
         let cm = local_data::get(super::ctxtkey, |x| x.unwrap().clone()).sess.codemap.clone();
         let sn = match cm.span_to_snippet(*self) {
             Some(x) => x,
             None    => ~""
         };
-        debug2!("got snippet {}", sn);
+        debug!("got snippet {}", sn);
         sn
     }
 }
@@ -1139,17 +1139,17 @@ fn name_from_pat(p: &ast::Pat) -> ~str {
         PatWild => ~"_",
         PatIdent(_, ref p, _) => path_to_str(p),
         PatEnum(ref p, _) => path_to_str(p),
-        PatStruct(*) => fail2!("tried to get argument name from pat_struct, \
+        PatStruct(*) => fail!("tried to get argument name from pat_struct, \
                                 which is not allowed in function arguments"),
         PatTup(*) => ~"(tuple arg NYI)",
         PatBox(p) => name_from_pat(p),
         PatUniq(p) => name_from_pat(p),
         PatRegion(p) => name_from_pat(p),
-        PatLit(*) => fail2!("tried to get argument name from pat_lit, \
+        PatLit(*) => fail!("tried to get argument name from pat_lit, \
                             which is not allowed in function arguments"),
-        PatRange(*) => fail2!("tried to get argument name from pat_range, \
+        PatRange(*) => fail!("tried to get argument name from pat_range, \
                               which is not allowed in function arguments"),
-        PatVec(*) => fail2!("tried to get argument name from pat_vec, \
+        PatVec(*) => fail!("tried to get argument name from pat_vec, \
                              which is not allowed in function arguments")
     }
 }
@@ -1158,14 +1158,14 @@ fn name_from_pat(p: &ast::Pat) -> ~str {
 fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
                 id: ast::NodeId) -> Type {
     let cx = local_data::get(super::ctxtkey, |x| *x.unwrap());
-    debug2!("searching for {:?} in defmap", id);
+    debug!("searching for {:?} in defmap", id);
     let d = match cx.tycx.def_map.find(&id) {
         Some(k) => k,
         None => {
             let ctxt = local_data::get(super::ctxtkey, |x| *x.unwrap());
-            debug2!("could not find {:?} in defmap (`{}`)", id,
+            debug!("could not find {:?} in defmap (`{}`)", id,
                    syntax::ast_map::node_id_to_str(ctxt.tycx.items, id, ctxt.sess.intr()));
-            fail2!("Unexpected failure: unresolved id not in defmap (this is a bug!)")
+            fail!("Unexpected failure: unresolved id not in defmap (this is a bug!)")
         }
     };
 
@@ -1174,7 +1174,7 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
         ast::DefSelf(i) | ast::DefSelfTy(i) => return Self(i),
         ast::DefTy(i) => (i, TypeEnum),
         ast::DefTrait(i) => {
-            debug2!("saw DefTrait in def_to_id");
+            debug!("saw DefTrait in def_to_id");
             (i, TypeTrait)
         },
         ast::DefPrimTy(p) => match p {
@@ -1185,10 +1185,10 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
         ast::DefTyParam(i, _) => return Generic(i.node),
         ast::DefStruct(i) => (i, TypeStruct),
         ast::DefTyParamBinder(i) => {
-            debug2!("found a typaram_binder, what is it? {}", i);
+            debug!("found a typaram_binder, what is it? {}", i);
             return TyParamBinder(i);
         },
-        x => fail2!("resolved type maps to a weird def {:?}", x),
+        x => fail!("resolved type maps to a weird def {:?}", x),
     };
     if ast_util::is_local(def_id) {
         ResolvedPath{ path: path, typarams: tpbs, id: def_id.node }
index d596139f5c006b3a6e33320ce847b7374d6f8ca9..b6e16720459ea85a75f98190890d63998971cb7b 100644 (file)
@@ -84,7 +84,7 @@ fn get_ast_and_resolve(cpath: &Path,
                                       .to_owned_vec());
     }
 
-    debug2!("crate: {:?}", crate);
+    debug!("crate: {:?}", crate);
     return (DocContext { crate: crate, tycx: ty_cx, sess: sess },
             CrateAnalysis { reexports: reexports, exported_items: exported_items });
 }
@@ -92,9 +92,9 @@ fn get_ast_and_resolve(cpath: &Path,
 pub fn run_core (libs: ~[Path], path: &Path) -> (clean::Crate, CrateAnalysis) {
     let (ctxt, analysis) = get_ast_and_resolve(path, libs);
     let ctxt = @ctxt;
-    debug2!("defmap:");
+    debug!("defmap:");
     for (k, v) in ctxt.tycx.def_map.iter() {
-        debug2!("{:?}: {:?}", k, v);
+        debug!("{:?}: {:?}", k, v);
     }
     local_data::set(super::ctxtkey, ctxt);
 
index 8b089e76f3a0ba68efb7c622796a2c31b854d61d..e92d159b5a15d521d9913888b03ab47afa5d82d1 100644 (file)
@@ -291,7 +291,7 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
 
     // Render all source files (this may turn into a giant no-op)
     {
-        info2!("emitting source files");
+        info!("emitting source files");
         let dst = cx.dst.join("src");
         mkdir(&dst);
         let dst = dst.join(crate.name.as_slice());
@@ -323,9 +323,9 @@ fn write(dst: Path, contents: &str) {
 /// skipping if the directory already exists.
 fn mkdir(path: &Path) {
     do io::io_error::cond.trap(|err| {
-        error2!("Couldn't create directory `{}`: {}",
+        error!("Couldn't create directory `{}`: {}",
                 path.display(), err.desc);
-        fail2!()
+        fail!()
     }).inside {
         if !path.is_dir() {
             file::mkdir(path);
@@ -647,7 +647,7 @@ impl Context {
     /// sure it always points to the top (relatively)
     fn recurse<T>(&mut self, s: ~str, f: &fn(&mut Context) -> T) -> T {
         if s.len() == 0 {
-            fail2!("what {:?}", self);
+            fail!("what {:?}", self);
         }
         let prev = self.dst.clone();
         self.dst.push(s.as_slice());
@@ -679,7 +679,7 @@ enum Progress { JobNew, JobDone }
         let workers = match os::getenv("RUSTDOC_WORKERS") {
             Some(s) => {
                 match from_str::<uint>(s) {
-                    Some(n) => n, None => fail2!("{} not a number", s)
+                    Some(n) => n, None => fail!("{} not a number", s)
                 }
             }
             None => 10,
@@ -974,7 +974,7 @@ fn document(w: &mut io::Writer, item: &clean::Item) {
 fn item_module(w: &mut io::Writer, cx: &Context,
                item: &clean::Item, items: &[clean::Item]) {
     document(w, item);
-    debug2!("{:?}", items);
+    debug!("{:?}", items);
     let mut indices = vec::from_fn(items.len(), |i| i);
 
     fn lt(i1: &clean::Item, i2: &clean::Item, idx1: uint, idx2: uint) -> bool {
@@ -1013,12 +1013,12 @@ fn lt(i1: &clean::Item, i2: &clean::Item, idx1: uint, idx2: uint) -> bool {
         }
     }
 
-    debug2!("{:?}", indices);
+    debug!("{:?}", indices);
     do sort::quick_sort(indices) |&i1, &i2| {
         lt(&items[i1], &items[i2], i1, i2)
     }
 
-    debug2!("{:?}", indices);
+    debug!("{:?}", indices);
     let mut curty = "";
     for &idx in indices.iter() {
         let myitem = &items[idx];
index e11552cb08faf4ab677ec84f8e5ef4674a307424..1e7c42455f241291eac5e8773164bcd29e59b732 100644 (file)
@@ -34,7 +34,7 @@ fn fold_item(&mut self, i: Item) -> Option<Item> {
                         for innerattr in l.iter() {
                             match innerattr {
                                 &clean::Word(ref s) if "hidden" == *s => {
-                                    debug2!("found one in strip_hidden; removing");
+                                    debug!("found one in strip_hidden; removing");
                                     return None;
                                 },
                                 _ => (),
index df732f1fc8694e2b7b9af5a1d7f3c0913a9da5ff..ddf686a3905d49ec6434b3b1894499e8b15b6d15 100644 (file)
@@ -134,7 +134,7 @@ pub fn main_args(args: &[~str]) -> int {
         }
     };
 
-    info2!("going to format");
+    info!("going to format");
     let started = time::precise_time_ns();
     let output = matches.opt_str("o").map(|s| Path::new(s));
     match matches.opt_str("w") {
@@ -150,7 +150,7 @@ pub fn main_args(args: &[~str]) -> int {
         }
     }
     let ended = time::precise_time_ns();
-    info2!("Took {:.03f}s", (ended as f64 - started as f64) / 1e9f64);
+    info!("Took {:.03f}s", (ended as f64 - started as f64) / 1e9f64);
 
     return 0;
 }
@@ -192,12 +192,12 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
     // First, parse the crate and extract all relevant information.
     let libs = Cell::new(matches.opt_strs("L").map(|s| Path::new(s.as_slice())));
     let cr = Cell::new(Path::new(cratefile));
-    info2!("starting to run rustc");
+    info!("starting to run rustc");
     let (crate, analysis) = do std::task::try {
         let cr = cr.take();
         core::run_core(libs.take(), &cr)
     }.unwrap();
-    info2!("finished with rustc");
+    info!("finished with rustc");
     local_data::set(analysiskey, analysis);
 
     // Process all of the crate attributes, extracting plugin metadata along
@@ -238,19 +238,19 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
         let plugin = match PASSES.iter().position(|&(p, _, _)| p == *pass) {
             Some(i) => PASSES[i].n1(),
             None => {
-                error2!("unknown pass {}, skipping", *pass);
+                error!("unknown pass {}, skipping", *pass);
                 continue
             },
         };
         pm.add_plugin(plugin);
     }
-    info2!("loading plugins...");
+    info!("loading plugins...");
     for pname in plugins.move_iter() {
         pm.load_plugin(pname);
     }
 
     // Run everything!
-    info2!("Executing passes/plugins");
+    info!("Executing passes/plugins");
     return pm.run_plugins(crate);
 }
 
@@ -311,7 +311,7 @@ fn json_output(crate: clean::Crate, res: ~[plugins::PluginJson], dst: Path) {
     };
     let crate_json = match json::from_str(crate_json_str) {
         Ok(j) => j,
-        Err(_) => fail2!("Rust generated JSON is invalid??")
+        Err(_) => fail!("Rust generated JSON is invalid??")
     };
 
     json.insert(~"crate", crate_json);
index 9fd4c43c2543759b3e025cfb3c4363416b353163..79ab752f295a84445ad291ef6f1edab80d849da7 100644 (file)
@@ -37,7 +37,7 @@ pub fn visit(@mut self, crate: &ast::Crate) {
         self.attrs = crate.attrs.clone();
         fn visit_struct_def(item: &ast::item, sd: @ast::struct_def, generics:
                             &ast::Generics) -> Struct {
-            debug2!("Visiting struct");
+            debug!("Visiting struct");
             let struct_type = struct_type_from_def(sd);
             Struct {
                 id: item.id,
@@ -52,7 +52,7 @@ fn visit_struct_def(item: &ast::item, sd: @ast::struct_def, generics:
         }
 
         fn visit_enum_def(it: &ast::item, def: &ast::enum_def, params: &ast::Generics) -> Enum {
-            debug2!("Visiting enum");
+            debug!("Visiting enum");
             let mut vars: ~[Variant] = ~[];
             for x in def.variants.iter() {
                 vars.push(Variant {
@@ -77,7 +77,7 @@ fn visit_enum_def(it: &ast::item, def: &ast::enum_def, params: &ast::Generics) -
 
         fn visit_fn(item: &ast::item, fd: &ast::fn_decl, purity: &ast::purity,
                      _abi: &AbiSet, gen: &ast::Generics) -> Function {
-            debug2!("Visiting fn");
+            debug!("Visiting fn");
             Function {
                 id: item.id,
                 vis: item.vis,
@@ -96,7 +96,7 @@ fn visit_mod_contents(span: Span, attrs: ~[ast::Attribute], vis:
             let name = match am.find(&id) {
                 Some(m) => match m {
                     &ast_map::node_item(ref it, _) => Some(it.ident),
-                    _ => fail2!("mod id mapped to non-item in the ast map")
+                    _ => fail!("mod id mapped to non-item in the ast map")
                 },
                 None => None
             };
@@ -113,7 +113,7 @@ fn visit_mod_contents(span: Span, attrs: ~[ast::Attribute], vis:
         }
 
         fn visit_item(item: &ast::item, om: &mut Module) {
-            debug2!("Visiting item {:?}", item);
+            debug!("Visiting item {:?}", item);
             match item.node {
                 ast::item_mod(ref m) => {
                     om.mods.push(visit_mod_contents(item.span, item.attrs.clone(),
index 02a96402229090a58e89ffdc555892c57514b62d..1f5802927a641d1f96c23f46a5cc86b3c397c9e1 100644 (file)
@@ -54,7 +54,7 @@ fn binary_is_fresh(path: &str, in_hash: &str) -> bool {
 
 pub fn new_workcache_context(p: &Path) -> workcache::Context {
     let db_file = p.join("rustpkg_db.json"); // ??? probably wrong
-    debug2!("Workcache database file: {}", db_file.display());
+    debug!("Workcache database file: {}", db_file.display());
     let db = RWArc::new(Database::new(db_file));
     let lg = RWArc::new(Logger::new());
     let cfg = Arc::new(TreeMap::new());
index 554019133b2d79157db376a86acda806026e3694..3f1f2a1f59d5210b6734dc193b5fc97c0bb514bb 100644 (file)
@@ -154,7 +154,7 @@ pub fn compile_upto(&self) -> StopBefore {
 /// rustpkg from a Rust target directory. This is part of a
 /// kludgy hack used to adjust the sysroot.
 pub fn in_target(sysroot: &Path) -> bool {
-    debug2!("Checking whether {} is in target", sysroot.display());
+    debug!("Checking whether {} is in target", sysroot.display());
     let mut p = sysroot.dir_path();
     p.set_filename("rustc");
     os::path_is_dir(&p)
index ecc0b7f07e240b2ef8bb8c6fed436795a0975931..767a31ed78563578356bcb610319a12a0ef6475c 100644 (file)
@@ -31,17 +31,17 @@ pub fn list_installed_packages(f: &fn(&PkgId) -> bool) -> bool  {
         }
         let libfiles = os::list_dir(&p.join("lib"));
         for lib in libfiles.iter() {
-            debug2!("Full name: {}", lib.display());
+            debug!("Full name: {}", lib.display());
             match has_library(lib) {
                 Some(basename) => {
                     let parent = p.join("lib");
-                    debug2!("parent = {}, child = {}",
+                    debug!("parent = {}, child = {}",
                             parent.display(), lib.display());
                     let rel_p = lib.path_relative_from(&parent).unwrap();
-                    debug2!("Rel: {}", rel_p.display());
+                    debug!("Rel: {}", rel_p.display());
                     let rel_path = rel_p.join(basename);
                     do rel_path.display().with_str |s| {
-                        debug2!("Rel name: {}", s);
+                        debug!("Rel name: {}", s);
                         f(&PkgId::new(s));
                     }
                 }
index c1e5dbf5ee5c86dc00e7beb2fa26caa6ff7ac11f..68d2d9662e3458237bc652c9a3016d1378eb18b8 100644 (file)
@@ -77,7 +77,7 @@ pub fn new(mut source_workspace: Path,
                id: PkgId) -> PkgSrc {
         use conditions::nonexistent_package::cond;
 
-        debug2!("Checking package source for package ID {}, \
+        debug!("Checking package source for package ID {}, \
                 workspace = {} -> {}, use_rust_path_hack = {:?}",
                 id.to_str(),
                 source_workspace.display(),
@@ -115,13 +115,13 @@ pub fn new(mut source_workspace: Path,
 
         }
 
-        debug2!("Checking dirs: {:?}", to_try.map(|p| p.display().to_str()).connect(":"));
+        debug!("Checking dirs: {:?}", to_try.map(|p| p.display().to_str()).connect(":"));
 
         let path = to_try.iter().find(|&d| os::path_exists(d));
 
         // See the comments on the definition of PkgSrc
         let mut build_in_destination = use_rust_path_hack;
-        debug2!("1. build_in_destination = {:?}", build_in_destination);
+        debug!("1. build_in_destination = {:?}", build_in_destination);
 
         let dir: Path = match path {
             Some(d) => (*d).clone(),
@@ -131,7 +131,7 @@ pub fn new(mut source_workspace: Path,
                 for (prefix, suffix) in id.prefixes_iter() {
                     let package_id = PkgId::new(prefix.as_str().unwrap());
                     let path = build_dir.join(&package_id.path);
-                    debug2!("in loop: checking if {} is a directory", path.display());
+                    debug!("in loop: checking if {} is a directory", path.display());
                     if os::path_is_dir(&path) {
                         let ps = PkgSrc::new(source_workspace,
                                              destination_workspace,
@@ -154,7 +154,7 @@ pub fn new(mut source_workspace: Path,
                                     tests: ~[],
                                     benchs: ~[]
                                 };
-                                debug2!("pkgsrc: Returning {}", result.to_str());
+                                debug!("pkgsrc: Returning {}", result.to_str());
                                 return result;
                             }
                         }
@@ -165,12 +165,12 @@ pub fn new(mut source_workspace: Path,
                 // Ok, no prefixes work, so try fetching from git
                 let mut ok_d = None;
                 for w in output_names.iter() {
-                    debug2!("Calling fetch_git on {}", w.display());
+                    debug!("Calling fetch_git on {}", w.display());
                     let target_dir_opt = PkgSrc::fetch_git(w, &id);
                     for p in target_dir_opt.iter() {
                         ok_d = Some(p.clone());
                         build_in_destination = true;
-                        debug2!("2. build_in_destination = {:?}", build_in_destination);
+                        debug!("2. build_in_destination = {:?}", build_in_destination);
                         break;
                     }
                     match ok_d {
@@ -232,10 +232,10 @@ pub fn new(mut source_workspace: Path,
                 }
             }
         };
-        debug2!("3. build_in_destination = {:?}", build_in_destination);
-        debug2!("source: {} dest: {}", source_workspace.display(), destination_workspace.display());
+        debug!("3. build_in_destination = {:?}", build_in_destination);
+        debug!("source: {} dest: {}", source_workspace.display(), destination_workspace.display());
 
-        debug2!("For package id {}, returning {}", id.to_str(), dir.display());
+        debug!("For package id {}, returning {}", id.to_str(), dir.display());
 
         if !os::path_is_dir(&dir) {
             cond.raise((id.clone(), ~"supplied path for package dir is a \
@@ -264,7 +264,7 @@ pub fn fetch_git(local: &Path, pkgid: &PkgId) -> Option<Path> {
         use conditions::git_checkout_failed::cond;
 
         let cwd = os::getcwd();
-        debug2!("Checking whether {} (path = {}) exists locally. Cwd = {}, does it? {:?}",
+        debug!("Checking whether {} (path = {}) exists locally. Cwd = {}, does it? {:?}",
                 pkgid.to_str(), pkgid.path.display(),
                 cwd.display(),
                 os::path_exists(&pkgid.path));
@@ -282,7 +282,7 @@ pub fn fetch_git(local: &Path, pkgid: &PkgId) -> Option<Path> {
 
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 let url = format!("https://{}", pkgid.path.as_str().unwrap());
-                debug2!("Fetching package: git clone {} {} [version={}]",
+                debug!("Fetching package: git clone {} {} [version={}]",
                         url, clone_target.display(), pkgid.version.to_str());
 
                 let mut failed = false;
@@ -311,7 +311,7 @@ pub fn fetch_git(local: &Path, pkgid: &PkgId) -> Option<Path> {
     // return the path for it. Otherwise, None
     pub fn package_script_option(&self) -> Option<Path> {
         let maybe_path = self.start_dir.join("pkg.rs");
-        debug2!("package_script_option: checking whether {} exists", maybe_path.display());
+        debug!("package_script_option: checking whether {} exists", maybe_path.display());
         if os::path_exists(&maybe_path) {
             Some(maybe_path)
         } else {
@@ -334,7 +334,7 @@ pub fn push_crate(cs: &mut ~[Crate], prefix: uint, p: &Path) {
         for c in it {
             sub.push(c);
         }
-        debug2!("Will compile crate {}", sub.display());
+        debug!("Will compile crate {}", sub.display());
         cs.push(Crate::new(&sub));
     }
 
@@ -348,7 +348,7 @@ pub fn find_crates_with_filter(&mut self, filter: &fn(&str) -> bool) {
         use conditions::missing_pkg_files::cond;
 
         let prefix = self.start_dir.component_iter().len();
-        debug2!("Matching against {}", self.id.short_name);
+        debug!("Matching against {}", self.id.short_name);
         do os::walk_dir(&self.start_dir) |pth| {
             let maybe_known_crate_set = match pth.filename_str() {
                 Some(filename) if filter(filename) => match filename {
@@ -377,7 +377,7 @@ pub fn find_crates_with_filter(&mut self, filter: &fn(&str) -> bool) {
             cond.raise(self.id.clone());
         }
 
-        debug2!("In {}, found {} libs, {} mains, {} tests, {} benchs",
+        debug!("In {}, found {} libs, {} mains, {} tests, {} benchs",
                self.start_dir.display(),
                self.libs.len(),
                self.mains.len(),
@@ -393,11 +393,11 @@ fn build_crates(&self,
                     what: OutputType) {
         for crate in crates.iter() {
             let path = self.start_dir.join(&crate.file);
-            debug2!("build_crates: compiling {}", path.display());
+            debug!("build_crates: compiling {}", path.display());
             let cfgs = crate.cfgs + cfgs;
 
             do ctx.workcache_context.with_prep(crate_tag(&path)) |prep| {
-                debug2!("Building crate {}, declaring it as an input", path.display());
+                debug!("Building crate {}, declaring it as an input", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 prep.declare_input("file", path.as_str().unwrap(),
                                    workcache_support::digest_file_with_date(&path));
@@ -424,7 +424,7 @@ fn build_crates(&self,
                     // output as "Some(\"path\")". But I don't know what to do about it.
                     // FIXME (#9639): This needs to handle non-utf8 paths
                     let result = result.as_ref().map(|p|p.as_str().unwrap());
-                    debug2!("Result of compiling {} was {}", subpath.display(), result.to_str());
+                    debug!("Result of compiling {} was {}", subpath.display(), result.to_str());
                     result.to_str()
                 }
             };
@@ -436,11 +436,11 @@ fn build_crates(&self,
     pub fn declare_inputs(&self, prep: &mut workcache::Prep) {
         let to_do = ~[self.libs.clone(), self.mains.clone(),
                       self.tests.clone(), self.benchs.clone()];
-        debug2!("In declare inputs, self = {}", self.to_str());
+        debug!("In declare inputs, self = {}", self.to_str());
         for cs in to_do.iter() {
             for c in cs.iter() {
                 let path = self.start_dir.join(&c.file);
-                debug2!("Declaring input: {}", path.display());
+                debug!("Declaring input: {}", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 prep.declare_input("file", path.as_str().unwrap(),
                                    workcache_support::digest_file_with_date(&path.clone()));
@@ -459,14 +459,14 @@ pub fn build(&self,
         let mains = self.mains.clone();
         let tests = self.tests.clone();
         let benchs = self.benchs.clone();
-        debug2!("Building libs in {}, destination = {}",
+        debug!("Building libs in {}, destination = {}",
                self.source_workspace.display(), self.build_workspace().display());
         self.build_crates(build_context, &mut deps, libs, cfgs, Lib);
-        debug2!("Building mains");
+        debug!("Building mains");
         self.build_crates(build_context, &mut deps, mains, cfgs, Main);
-        debug2!("Building tests");
+        debug!("Building tests");
         self.build_crates(build_context, &mut deps, tests, cfgs, Test);
-        debug2!("Building benches");
+        debug!("Building benches");
         self.build_crates(build_context, &mut deps, benchs, cfgs, Bench);
         deps
     }
@@ -486,7 +486,7 @@ pub fn dump_crates(&self) {
         let crate_sets = [&self.libs, &self.mains, &self.tests, &self.benchs];
         for crate_set in crate_sets.iter() {
             for c in crate_set.iter() {
-                debug2!("Built crate: {}", c.file.display())
+                debug!("Built crate: {}", c.file.display())
             }
         }
     }
index 911cfde7164a431b37e7c5f70839a3208a092cba..c47c89d777b483080d123d42933c97ba7447daa4 100644 (file)
@@ -25,7 +25,7 @@
 pub fn default_workspace() -> Path {
     let p = rust_path();
     if p.is_empty() {
-        fail2!("Empty RUST_PATH");
+        fail!("Empty RUST_PATH");
     }
     let result = p[0];
     if !os::path_is_dir(&result) {
@@ -88,9 +88,9 @@ pub fn workspace_contains_package_id_(pkgid: &PkgId, workspace: &Path,
     };
 
     if found.is_some() {
-        debug2!("Found {} in {}", pkgid.to_str(), workspace.display());
+        debug!("Found {} in {}", pkgid.to_str(), workspace.display());
     } else {
-        debug2!("Didn't find {} in {}", pkgid.to_str(), workspace.display());
+        debug!("Didn't find {} in {}", pkgid.to_str(), workspace.display());
     }
     found
 }
@@ -123,13 +123,13 @@ fn target_bin_dir(workspace: &Path) -> Path {
 pub fn built_executable_in_workspace(pkgid: &PkgId, workspace: &Path) -> Option<Path> {
     let mut result = target_build_dir(workspace);
     result = mk_output_path(Main, Build, pkgid, result);
-    debug2!("built_executable_in_workspace: checking whether {} exists",
+    debug!("built_executable_in_workspace: checking whether {} exists",
            result.display());
     if os::path_exists(&result) {
         Some(result)
     }
     else {
-        debug2!("built_executable_in_workspace: {} does not exist", result.display());
+        debug!("built_executable_in_workspace: {} does not exist", result.display());
         None
     }
 }
@@ -150,13 +150,13 @@ fn output_in_workspace(pkgid: &PkgId, workspace: &Path, what: OutputType) -> Opt
     let mut result = target_build_dir(workspace);
     // should use a target-specific subdirectory
     result = mk_output_path(what, Build, pkgid, result);
-    debug2!("output_in_workspace: checking whether {} exists",
+    debug!("output_in_workspace: checking whether {} exists",
            result.display());
     if os::path_exists(&result) {
         Some(result)
     }
     else {
-        error2!("output_in_workspace: {} does not exist", result.display());
+        error!("output_in_workspace: {} does not exist", result.display());
         None
     }
 }
@@ -186,13 +186,13 @@ pub fn installed_library_in_workspace(pkg_path: &Path, workspace: &Path) -> Opti
 /// `short_name` is taken as the link name of the library.
 pub fn library_in_workspace(path: &Path, short_name: &str, where: Target,
                         workspace: &Path, prefix: &str, version: &Version) -> Option<Path> {
-    debug2!("library_in_workspace: checking whether a library named {} exists",
+    debug!("library_in_workspace: checking whether a library named {} exists",
            short_name);
 
     // We don't know what the hash is, so we have to search through the directory
     // contents
 
-    debug2!("short_name = {} where = {:?} workspace = {} \
+    debug!("short_name = {} where = {:?} workspace = {} \
             prefix = {}", short_name, where, workspace.display(), prefix);
 
     let dir_to_search = match where {
@@ -209,20 +209,20 @@ pub fn system_library(sysroot: &Path, lib_name: &str) -> Option<Path> {
 }
 
 fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Option<Path> {
-    debug2!("Listing directory {}", dir_to_search.display());
+    debug!("Listing directory {}", dir_to_search.display());
     let dir_contents = os::list_dir(dir_to_search);
-    debug2!("dir has {:?} entries", dir_contents.len());
+    debug!("dir has {:?} entries", dir_contents.len());
 
     let lib_prefix = format!("{}{}", os::consts::DLL_PREFIX, short_name);
     let lib_filetype = os::consts::DLL_EXTENSION;
 
-    debug2!("lib_prefix = {} and lib_filetype = {}", lib_prefix, lib_filetype);
+    debug!("lib_prefix = {} and lib_filetype = {}", lib_prefix, lib_filetype);
 
     // Find a filename that matches the pattern:
     // (lib_prefix)-hash-(version)(lib_suffix)
     let mut libraries = do dir_contents.iter().filter |p| {
         let extension = p.extension_str();
-        debug2!("p = {}, p's extension is {:?}", p.display(), extension);
+        debug!("p = {}, p's extension is {:?}", p.display(), extension);
         match extension {
             None => false,
             Some(ref s) => lib_filetype == *s
@@ -243,12 +243,12 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
             if f_name.is_empty() { break; }
             match f_name.rfind('-') {
                 Some(i) => {
-                    debug2!("Maybe {} is a version", f_name.slice(i + 1, f_name.len()));
+                    debug!("Maybe {} is a version", f_name.slice(i + 1, f_name.len()));
                     match try_parsing_version(f_name.slice(i + 1, f_name.len())) {
                        Some(ref found_vers) if version == found_vers => {
                            match f_name.slice(0, i).rfind('-') {
                                Some(j) => {
-                                   debug2!("Maybe {} equals {}", f_name.slice(0, j), lib_prefix);
+                                   debug!("Maybe {} equals {}", f_name.slice(0, j), lib_prefix);
                                    if f_name.slice(0, j) == lib_prefix {
                                        result_filename = Some(p_path.clone());
                                    }
@@ -266,7 +266,7 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
     } // for
 
     if result_filename.is_none() {
-        debug2!("warning: library_in_workspace didn't find a library in {} for {}",
+        debug!("warning: library_in_workspace didn't find a library in {} for {}",
                   dir_to_search.display(), short_name);
     }
 
@@ -274,7 +274,7 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
     // (if result_filename != None)
     let abs_path = do result_filename.map |result_filename| {
         let absolute_path = dir_to_search.join(&result_filename);
-        debug2!("result_filename = {}", absolute_path.display());
+        debug!("result_filename = {}", absolute_path.display());
         absolute_path
     };
 
@@ -348,7 +348,7 @@ pub fn build_pkg_id_in_workspace(pkgid: &PkgId, workspace: &Path) -> Path {
 
     let mut result = target_build_dir(workspace);
     result.push(&pkgid.path);
-    debug2!("Creating build dir {} for package id {}", result.display(),
+    debug!("Creating build dir {} for package id {}", result.display(),
            pkgid.to_str());
     if os::path_exists(&result) || os::mkdir_recursive(&result, U_RWX) {
         result
@@ -372,7 +372,7 @@ pub fn mk_output_path(what: OutputType, where: Target,
         // and if we're just building, it goes in a package-specific subdir
         Build => workspace.join(&pkg_id.path)
     };
-    debug2!("[{:?}:{:?}] mk_output_path: short_name = {}, path = {}", what, where,
+    debug!("[{:?}:{:?}] mk_output_path: short_name = {}, path = {}", what, where,
            if what == Lib { short_name_with_version.clone() } else { pkg_id.short_name.clone() },
            dir.display());
     let mut output_path = match what {
@@ -390,7 +390,7 @@ pub fn mk_output_path(what: OutputType, where: Target,
     if !output_path.is_absolute() {
         output_path = os::getcwd().join(&output_path);
     }
-    debug2!("mk_output_path: returning {}", output_path.display());
+    debug!("mk_output_path: returning {}", output_path.display());
     output_path
 }
 
@@ -431,13 +431,13 @@ pub fn find_dir_using_rust_path_hack(p: &PkgId) -> Option<Path> {
         // Note that this only matches if the package ID being searched for
         // has a name that's a single component
         if dir.ends_with_path(&p.path) || dir.ends_with_path(&versionize(&p.path, &p.version)) {
-            debug2!("In find_dir_using_rust_path_hack: checking dir {}", dir.display());
+            debug!("In find_dir_using_rust_path_hack: checking dir {}", dir.display());
             if dir_has_crate_file(dir) {
-                debug2!("Did find id {} in dir {}", p.to_str(), dir.display());
+                debug!("Did find id {} in dir {}", p.to_str(), dir.display());
                 return Some(dir.clone());
             }
         }
-        debug2!("Didn't find id {} in dir {}", p.to_str(), dir.display())
+        debug!("Didn't find id {} in dir {}", p.to_str(), dir.display())
     }
     None
 }
index 4d7983d9ff1dec61b2c757181064c7ad3f6367f5..6c55f7af0c06a2c79d74f59628791f6f5427f745 100644 (file)
@@ -104,7 +104,7 @@ fn parse<'a>(sysroot: @Path,
         let binary = os::args()[0].to_managed();
         // Build the rustc session data structures to pass
         // to the compiler
-        debug2!("pkgscript parse: {}", sysroot.display());
+        debug!("pkgscript parse: {}", sysroot.display());
         let options = @session::options {
             binary: binary,
             maybe_sysroot: Some(sysroot),
@@ -120,7 +120,7 @@ fn parse<'a>(sysroot: @Path,
         let crate = driver::phase_2_configure_and_expand(sess, cfg.clone(), crate);
         let work_dir = build_pkg_id_in_workspace(id, workspace);
 
-        debug2!("Returning package script with id {}", id.to_str());
+        debug!("Returning package script with id {}", id.to_str());
 
         PkgScript {
             id: id,
@@ -140,10 +140,10 @@ fn run_custom(&mut self, exec: &mut workcache::Exec,
                   sysroot: &Path) -> (~[~str], ExitCode) {
         let sess = self.sess;
 
-        debug2!("Working directory = {}", self.build_dir.display());
+        debug!("Working directory = {}", self.build_dir.display());
         // Collect together any user-defined commands in the package script
         let crate = util::ready_crate(sess, self.crate.take_unwrap());
-        debug2!("Building output filenames with script name {}",
+        debug!("Building output filenames with script name {}",
                driver::source_name(&driver::file_input(self.input.clone())));
         let exe = self.build_dir.join("pkg" + util::exe_suffix());
         util::compile_crate_from_input(&self.input,
@@ -152,7 +152,7 @@ fn run_custom(&mut self, exec: &mut workcache::Exec,
                                        &self.build_dir,
                                        sess,
                                        crate);
-        debug2!("Running program: {} {} {}", exe.display(),
+        debug!("Running program: {} {} {}", exe.display(),
                sysroot.display(), "install");
         // Discover the output
         // FIXME (#9639): This needs to handle non-utf8 paths
@@ -165,7 +165,7 @@ fn run_custom(&mut self, exec: &mut workcache::Exec,
             return (~[], status);
         }
         else {
-            debug2!("Running program (configs): {} {} {}",
+            debug!("Running program (configs): {} {} {}",
                    exe.display(), sysroot.display(), "configs");
             // FIXME (#9639): This needs to handle non-utf8 paths
             let output = run::process_output(exe.as_str().unwrap(),
@@ -243,7 +243,7 @@ fn build_args(&self, args: ~[~str], what: &WhatToBuild) -> Option<(PkgId, Path)>
             let pkgid = PkgId::new(args[0].clone());
             let mut dest_ws = default_workspace();
             do each_pkg_parent_workspace(&self.context, &pkgid) |workspace| {
-                debug2!("found pkg {} in workspace {}, trying to build",
+                debug!("found pkg {} in workspace {}, trying to build",
                        pkgid.to_str(), workspace.display());
                 dest_ws = determine_destination(os::getcwd(),
                                                 self.context.use_rust_path_hack,
@@ -315,7 +315,7 @@ fn run(&self, cmd: &str, args: ~[~str]) {
                     // argument
                     let pkgid = PkgId::new(args[0]);
                     let workspaces = pkg_parent_workspaces(&self.context, &pkgid);
-                    debug2!("package ID = {}, found it in {:?} workspaces",
+                    debug!("package ID = {}, found it in {:?} workspaces",
                            pkgid.to_str(), workspaces.len());
                     if workspaces.is_empty() {
                         let d = default_workspace();
@@ -401,13 +401,13 @@ fn run(&self, cmd: &str, args: ~[~str]) {
 
                 self.unprefer(args[0], None);
             }
-            _ => fail2!("I don't know the command `{}`", cmd)
+            _ => fail!("I don't know the command `{}`", cmd)
         }
     }
 
     fn do_cmd(&self, _cmd: &str, _pkgname: &str)  {
         // stub
-        fail2!("`do` not yet implemented");
+        fail!("`do` not yet implemented");
     }
 
     fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
@@ -416,7 +416,7 @@ fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
         let workspace = pkg_src.source_workspace.clone();
         let pkgid = pkg_src.id.clone();
 
-        debug2!("build: workspace = {} (in Rust path? {:?} is git dir? {:?} \
+        debug!("build: workspace = {} (in Rust path? {:?} is git dir? {:?} \
                 pkgid = {} pkgsrc start_dir = {}", workspace.display(),
                in_rust_path(&workspace), is_git_dir(&workspace.join(&pkgid.path)),
                pkgid.to_str(), pkg_src.start_dir.display());
@@ -435,7 +435,7 @@ fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
                 _ => cond.raise((pkgid.path.as_str().unwrap().to_owned(), out_dir.clone()))
             };
             let default_ws = default_workspace();
-            debug2!("Calling build recursively with {:?} and {:?}", default_ws.display(),
+            debug!("Calling build recursively with {:?} and {:?}", default_ws.display(),
                    pkgid.to_str());
             return self.build(&mut PkgSrc::new(default_ws.clone(),
                                                default_ws,
@@ -445,9 +445,9 @@ fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
 
         // Is there custom build logic? If so, use it
         let mut custom = false;
-        debug2!("Package source directory = {}", pkg_src.to_str());
+        debug!("Package source directory = {}", pkg_src.to_str());
         let opt = pkg_src.package_script_option();
-        debug2!("Calling pkg_script_option on {:?}", opt);
+        debug!("Calling pkg_script_option on {:?}", opt);
         let cfgs = match pkg_src.package_script_option() {
             Some(package_script_path) => {
                 let sysroot = self.sysroot_to_use();
@@ -469,16 +469,16 @@ fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
                         pscript.run_custom(exec, &sub_sysroot)
                     }
                 };
-                debug2!("Command return code = {:?}", hook_result);
+                debug!("Command return code = {:?}", hook_result);
                 if hook_result != 0 {
-                    fail2!("Error running custom build command")
+                    fail!("Error running custom build command")
                 }
                 custom = true;
                 // otherwise, the package script succeeded
                 cfgs
             }
             None => {
-                debug2!("No package script, continuing");
+                debug!("No package script, continuing");
                 ~[]
             }
         } + self.context.cfgs;
@@ -495,7 +495,7 @@ fn build(&self, pkg_src: &mut PkgSrc, what_to_build: &WhatToBuild) {
                 &JustOne(ref p) => {
                     // We expect that p is relative to the package source's start directory,
                     // so check that assumption
-                    debug2!("JustOne: p = {}", p.display());
+                    debug!("JustOne: p = {}", p.display());
                     assert!(os::path_exists(&pkg_src.start_dir.join(p)));
                     if is_lib(p) {
                         PkgSrc::push_crate(&mut pkg_src.libs, 0, p);
@@ -534,7 +534,7 @@ fn clean(&self, workspace: &Path, id: &PkgId)  {
 
     fn info(&self) {
         // stub
-        fail2!("info not yet implemented");
+        fail!("info not yet implemented");
     }
 
     fn install(&self, mut pkg_src: PkgSrc, what: &WhatToBuild) -> (~[Path], ~[(~str, ~str)]) {
@@ -545,7 +545,7 @@ fn install(&self, mut pkg_src: PkgSrc, what: &WhatToBuild) -> (~[Path], ~[(~str,
         let mut inputs = ~[];
         let mut build_inputs = ~[];
 
-        debug2!("Installing package source: {}", pkg_src.to_str());
+        debug!("Installing package source: {}", pkg_src.to_str());
 
         // workcache only knows about *crates*. Building a package
         // just means inferring all the crates in it, then building each one.
@@ -553,11 +553,11 @@ fn install(&self, mut pkg_src: PkgSrc, what: &WhatToBuild) -> (~[Path], ~[(~str,
 
         let to_do = ~[pkg_src.libs.clone(), pkg_src.mains.clone(),
                       pkg_src.tests.clone(), pkg_src.benchs.clone()];
-        debug2!("In declare inputs for {}", id.to_str());
+        debug!("In declare inputs for {}", id.to_str());
         for cs in to_do.iter() {
             for c in cs.iter() {
                 let path = pkg_src.start_dir.join(&c.file);
-                debug2!("Recording input: {}", path.display());
+                debug!("Recording input: {}", path.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 inputs.push((~"file", path.as_str().unwrap().to_owned()));
                 build_inputs.push(path);
@@ -568,7 +568,7 @@ fn install(&self, mut pkg_src: PkgSrc, what: &WhatToBuild) -> (~[Path], ~[(~str,
                                            build_inputs,
                                            &pkg_src.destination_workspace,
                                            &id).map(|s| Path::new(s.as_slice()));
-        debug2!("install: id = {}, about to call discover_outputs, {:?}",
+        debug!("install: id = {}, about to call discover_outputs, {:?}",
                id.to_str(), result.map(|p| p.display().to_str()));
         installed_files = installed_files + result;
         note(format!("Installed package {} to {}",
@@ -585,7 +585,7 @@ fn install_no_build(&self,
                         id: &PkgId) -> ~[~str] {
         use conditions::copy_failed::cond;
 
-        debug2!("install_no_build: assuming {} comes from {} with target {}",
+        debug!("install_no_build: assuming {} comes from {} with target {}",
                id.to_str(), build_workspace.display(), target_workspace.display());
 
         // Now copy stuff into the install dirs
@@ -595,7 +595,7 @@ fn install_no_build(&self,
         let target_lib = maybe_library.as_ref()
             .map(|_| target_library_in_workspace(id, target_workspace));
 
-        debug2!("target_exec = {} target_lib = {:?} \
+        debug!("target_exec = {} target_lib = {:?} \
                maybe_executable = {:?} maybe_library = {:?}",
                target_exec.display(), target_lib,
                maybe_executable, maybe_library);
@@ -641,7 +641,7 @@ fn install_no_build(&self,
 
 
                 for exec in subex.iter() {
-                    debug2!("Copying: {} -> {}", exec.display(), sub_target_ex.display());
+                    debug!("Copying: {} -> {}", exec.display(), sub_target_ex.display());
                     if !(os::mkdir_recursive(&sub_target_ex.dir_path(), U_RWX) &&
                          os::copy_file(exec, &sub_target_ex)) {
                         cond.raise(((*exec).clone(), sub_target_ex.clone()));
@@ -661,7 +661,7 @@ fn install_no_build(&self,
                          os::copy_file(lib, &target_lib)) {
                         cond.raise(((*lib).clone(), target_lib.clone()));
                     }
-                    debug2!("3. discovering output {}", target_lib.display());
+                    debug!("3. discovering output {}", target_lib.display());
                     exe_thing.discover_output("binary",
                                               target_lib.as_str().unwrap(),
                                               workcache_support::digest_only_date(&target_lib));
@@ -673,13 +673,13 @@ fn install_no_build(&self,
     }
 
     fn prefer(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("prefer not yet implemented");
+        fail!("prefer not yet implemented");
     }
 
     fn test(&self, pkgid: &PkgId, workspace: &Path)  {
         match built_test_in_workspace(pkgid, workspace) {
             Some(test_exec) => {
-                debug2!("test: test_exec = {}", test_exec.display());
+                debug!("test: test_exec = {}", test_exec.display());
                 // FIXME (#9639): This needs to handle non-utf8 paths
                 let status = run::process_status(test_exec.as_str().unwrap(), [~"--test"]);
                 os::set_exit_status(status);
@@ -700,11 +700,11 @@ fn init(&self) {
     }
 
     fn uninstall(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("uninstall not yet implemented");
+        fail!("uninstall not yet implemented");
     }
 
     fn unprefer(&self, _id: &str, _vers: Option<~str>)  {
-        fail2!("unprefer not yet implemented");
+        fail!("unprefer not yet implemented");
     }
 }
 
@@ -880,9 +880,9 @@ pub fn main_args(args: &[~str]) -> int {
         _ => filesearch::get_or_default_sysroot()
     };
 
-    debug2!("Using sysroot: {}", sroot.display());
+    debug!("Using sysroot: {}", sroot.display());
     let ws = default_workspace();
-    debug2!("Will store workcache in {}", ws.display());
+    debug!("Will store workcache in {}", ws.display());
 
     let rm_args = remaining_args.clone();
     let sub_cmd = cmd.clone();
index 080ba461f05fb176600c388df5b93c9cfafe7d30..aec4e95f8e21c5201a1f0d6d769d8386e3441a42 100644 (file)
@@ -17,7 +17,7 @@
 /// FIXME #8711: This ignores the desired version.
 pub fn find_installed_library_in_rust_path(pkg_path: &Path, _version: &Version) -> Option<Path> {
     let rp = rust_path();
-    debug2!("find_installed_library_in_rust_path: looking for path {}",
+    debug!("find_installed_library_in_rust_path: looking for path {}",
             pkg_path.display());
     for p in rp.iter() {
         match installed_library_in_workspace(pkg_path, p) {
index 3c879af34cf1e9c64042e25e075a29a049ecc084..9a571e07570844c140ac187d91bc6d4665a7a445 100644 (file)
 /// Returns `CheckedOutSources` if the clone succeeded.
 pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult {
     if os::path_exists(source) {
-        debug2!("{} exists locally! Cloning it into {}",
+        debug!("{} exists locally! Cloning it into {}",
                 source.display(), target.display());
         // Ok to use target here; we know it will succeed
         assert!(os::path_is_dir(source));
         assert!(is_git_dir(source));
 
         if !os::path_exists(target) {
-            debug2!("Running: git clone {} {}", source.display(), target.display());
+            debug!("Running: git clone {} {}", source.display(), target.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             let outp = run::process_output("git", [~"clone",
                                                    source.as_str().unwrap().to_owned(),
@@ -44,7 +44,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
                 match v {
                     &ExactRevision(ref s) => {
                         let git_dir = target.join(".git");
-                        debug2!("`Running: git --work-tree={} --git-dir={} checkout {}",
+                        debug!("`Running: git --work-tree={} --git-dir={} checkout {}",
                                 *s, target.display(), git_dir.display());
                         // FIXME (#9639: This needs to handle non-utf8 paths
                         let outp = run::process_output("git",
@@ -65,7 +65,7 @@ pub fn safe_git_clone(source: &Path, v: &Version, target: &Path) -> CloneResult
             // case where a version was requested, but I haven't implemented it.
             assert!(*v == NoVersion);
             let git_dir = target.join(".git");
-            debug2!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
+            debug!("Running: git --work-tree={} --git-dir={} pull --no-edit {}",
                     target.display(), git_dir.display(), source.display());
             // FIXME (#9639: This needs to handle non-utf8 paths
             let args = [format!("--work-tree={}", target.as_str().unwrap().to_owned()),
@@ -111,8 +111,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) {
     let outp = run::process_output("git", [~"clone", source.to_owned(),
                                            target.as_str().unwrap().to_owned()]);
     if outp.status != 0 {
-         debug2!("{}", str::from_utf8_owned(outp.output.clone()));
-         debug2!("{}", str::from_utf8_owned(outp.error));
+         debug!("{}", str::from_utf8_owned(outp.output.clone()));
+         debug!("{}", str::from_utf8_owned(outp.error));
          cond.raise((source.to_owned(), target.clone()))
     }
     else {
@@ -121,8 +121,8 @@ pub fn git_clone_url(source: &str, target: &Path, v: &Version) {
                     let outp = process_output_in_cwd("git", [~"checkout", s.to_owned()],
                                                          target);
                     if outp.status != 0 {
-                        debug2!("{}", str::from_utf8_owned(outp.output.clone()));
-                        debug2!("{}", str::from_utf8_owned(outp.error));
+                        debug!("{}", str::from_utf8_owned(outp.output.clone()));
+                        debug!("{}", str::from_utf8_owned(outp.error));
                         cond.raise((source.to_owned(), target.clone()))
                     }
             }
index 08c0fb72bf31f0fa8364372715d58515c9715b25..58c6b4ff81fb66e9e193d1ad45aab93055689c96 100644 (file)
@@ -115,12 +115,12 @@ fn mk_temp_workspace(short_name: &Path, version: &Version) -> (TempDir, Path) {
                                                               short_name.as_str().unwrap(),
                                                               version.to_str())]);
 
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
-    debug2!("mk_workspace: creating {}", package_dir.display());
+    debug!("mk_workspace: creating {}", package_dir.display());
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
 
@@ -146,7 +146,7 @@ fn run_git(args: &[~str], env: Option<~[(~str, ~str)]>, cwd: &Path, err_msg: &st
     });
     let rslt = prog.finish_with_output();
     if rslt.status != 0 {
-        fail2!("{} [git returned {:?}, output = {}, error = {}]", err_msg,
+        fail!("{} [git returned {:?}, output = {}, error = {}]", err_msg,
            rslt.status, str::from_utf8(rslt.output), str::from_utf8(rslt.error));
     }
 }
@@ -159,7 +159,7 @@ fn init_git_repo(p: &Path) -> TempDir {
     let work_dir = tmp.path().join(p);
     let work_dir_for_opts = work_dir.clone();
     assert!(os::mkdir_recursive(&work_dir, U_RWX));
-    debug2!("Running: git init in {}", work_dir.display());
+    debug!("Running: git init in {}", work_dir.display());
     run_git([~"init"], None, &work_dir_for_opts,
         format!("Couldn't initialize git repository in {}", work_dir.display()));
     // Add stuff to the dir so that git tag succeeds
@@ -239,7 +239,7 @@ fn rustpkg_exec() -> Path {
             second_try
         }
         else {
-            fail2!("in rustpkg test, can't find an installed rustpkg");
+            fail!("in rustpkg test, can't find an installed rustpkg");
         }
     }
 }
@@ -247,7 +247,7 @@ fn rustpkg_exec() -> Path {
 fn command_line_test(args: &[~str], cwd: &Path) -> ProcessOutput {
     match command_line_test_with_env(args, cwd, None) {
         Success(r) => r,
-        Fail(error) => fail2!("Command line test failed with error {}", error)
+        Fail(error) => fail!("Command line test failed with error {}", error)
     }
 }
 
@@ -260,9 +260,9 @@ fn command_line_test_expect_fail(args: &[~str],
                                  env: Option<~[(~str, ~str)]>,
                                  expected_exitcode: int) {
     match command_line_test_with_env(args, cwd, env) {
-        Success(_) => fail2!("Should have failed with {}, but it succeeded", expected_exitcode),
+        Success(_) => fail!("Should have failed with {}, but it succeeded", expected_exitcode),
         Fail(error) if error == expected_exitcode => (), // ok
-        Fail(other) => fail2!("Expected to fail with {}, but failed with {} instead",
+        Fail(other) => fail!("Expected to fail with {}, but failed with {} instead",
                               expected_exitcode, other)
     }
 }
@@ -284,7 +284,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
         Some(ref pairs) => pairs.map(|&(ref k, ref v)| { format!("{}={}", *k, *v) }).connect(","),
         None        => ~""
     };
-    debug2!("{} cd {}; {} {}", env_str, cwd.display(), cmd, args.connect(" "));
+    debug!("{} cd {}; {} {}", env_str, cwd.display(), cmd, args.connect(" "));
     assert!(os::path_is_dir(&*cwd));
     let cwd = (*cwd).clone();
     let mut prog = run::Process::new(cmd, args, run::ProcessOptions {
@@ -295,7 +295,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
         err_fd: None
     });
     let output = prog.finish_with_output();
-    debug2!("Output from command {} with args {:?} was {} \\{{}\\}[{:?}]",
+    debug!("Output from command {} with args {:?} was {} \\{{}\\}[{:?}]",
                     cmd, args, str::from_utf8(output.output),
                    str::from_utf8(output.error),
                    output.status);
@@ -306,7 +306,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
 to make sure the command succeeded
 */
     if output.status != 0 {
-        debug2!("Command {} {:?} failed with exit code {:?}; its output was --- {} ---",
+        debug!("Command {} {:?} failed with exit code {:?}; its output was --- {} ---",
               cmd, args, output.status,
               str::from_utf8(output.output) + str::from_utf8(output.error));
         Fail(output.status)
@@ -318,7 +318,7 @@ fn command_line_test_with_env(args: &[~str], cwd: &Path, env: Option<~[(~str, ~s
 
 fn create_local_package(pkgid: &PkgId) -> TempDir {
     let (workspace, parent_dir) = mk_temp_workspace(&pkgid.path, &pkgid.version);
-    debug2!("Created empty package dir for {}, returning {}", pkgid.to_str(), parent_dir.display());
+    debug!("Created empty package dir for {}, returning {}", pkgid.to_str(), parent_dir.display());
     workspace
 }
 
@@ -328,7 +328,7 @@ fn create_local_package_in(pkgid: &PkgId, pkgdir: &Path) -> Path {
 
     // Create main, lib, test, and bench files
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
-    debug2!("Created {} and does it exist? {:?}", package_dir.display(),
+    debug!("Created {} and does it exist? {:?}", package_dir.display(),
           os::path_is_dir(&package_dir));
     // Create main, lib, test, and bench files
 
@@ -344,7 +344,7 @@ fn create_local_package_in(pkgid: &PkgId, pkgdir: &Path) -> Path {
 }
 
 fn create_local_package_with_test(pkgid: &PkgId) -> TempDir {
-    debug2!("Dry run -- would create package {:?} with test", pkgid);
+    debug!("Dry run -- would create package {:?} with test", pkgid);
     create_local_package(pkgid) // Already has tests???
 }
 
@@ -363,7 +363,7 @@ fn create_local_package_with_dep(pkgid: &PkgId, subord_pkgid: &PkgId) -> TempDir
 
 fn create_local_package_with_custom_build_hook(pkgid: &PkgId,
                                                custom_build_hook: &str) -> TempDir {
-    debug2!("Dry run -- would create package {} with custom build hook {}",
+    debug!("Dry run -- would create package {} with custom build hook {}",
            pkgid.to_str(), custom_build_hook);
     create_local_package(pkgid)
     // actually write the pkg.rs with the custom build hook
@@ -375,9 +375,9 @@ fn assert_lib_exists(repo: &Path, pkg_path: &Path, v: Version) {
 }
 
 fn lib_exists(repo: &Path, pkg_path: &Path, _v: Version) -> bool { // ??? version?
-    debug2!("assert_lib_exists: repo = {}, pkg_path = {}", repo.display(), pkg_path.display());
+    debug!("assert_lib_exists: repo = {}, pkg_path = {}", repo.display(), pkg_path.display());
     let lib = installed_library_in_workspace(pkg_path, repo);
-    debug2!("assert_lib_exists: checking whether {:?} exists", lib);
+    debug!("assert_lib_exists: checking whether {:?} exists", lib);
     lib.is_some() && {
         let libname = lib.get_ref();
         os::path_exists(libname) && is_rwx(libname)
@@ -389,13 +389,13 @@ fn assert_executable_exists(repo: &Path, short_name: &str) {
 }
 
 fn executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let exec = target_executable_in_workspace(&PkgId::new(short_name), repo);
     os::path_exists(&exec) && is_rwx(&exec)
 }
 
 fn test_executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("test_executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("test_executable_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let exec = built_test_in_workspace(&PkgId::new(short_name), repo);
     do exec.map_default(false) |exec| {
         os::path_exists(&exec) && is_rwx(&exec)
@@ -414,7 +414,7 @@ fn assert_built_executable_exists(repo: &Path, short_name: &str) {
 }
 
 fn built_executable_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("assert_built_executable_exists: repo = {}, short_name = {}",
+    debug!("assert_built_executable_exists: repo = {}, short_name = {}",
             repo.display(), short_name);
     let exec = built_executable_in_workspace(&PkgId::new(short_name), repo);
     exec.is_some() && {
@@ -457,7 +457,7 @@ fn assert_built_library_exists(repo: &Path, short_name: &str) {
 }
 
 fn built_library_exists(repo: &Path, short_name: &str) -> bool {
-    debug2!("assert_built_library_exists: repo = {}, short_name = {}", repo.display(), short_name);
+    debug!("assert_built_library_exists: repo = {}, short_name = {}", repo.display(), short_name);
     let lib = built_library_in_workspace(&PkgId::new(short_name), repo);
     lib.is_some() && {
         let libname = lib.get_ref();
@@ -479,7 +479,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
     let mut result = ~[];
     let p_output = match command_line_test_with_env(args,
         &os::getcwd(), Some(env)) {
-        Fail(_) => fail2!("Command-line test failed"),
+        Fail(_) => fail!("Command-line test failed"),
         Success(r) => r
     };
     let test_output = str::from_utf8(p_output.output);
@@ -491,7 +491,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
 
 // assumes short_name and path are one and the same -- I should fix
 fn lib_output_file_name(workspace: &Path, short_name: &str) -> Path {
-    debug2!("lib_output_file_name: given {} and short name {}",
+    debug!("lib_output_file_name: given {} and short name {}",
            workspace.display(), short_name);
     library_in_workspace(&Path::new(short_name),
                          short_name,
@@ -549,11 +549,11 @@ fn frob_source_file(workspace: &Path, pkgid: &PkgId, filename: &str) {
     let pkg_src_dir = workspace.join_many([~"src", pkgid.to_str()]);
     let mut maybe_p = None;
     let maybe_file = pkg_src_dir.join(filename);
-    debug2!("Trying to frob {} -- {}", pkg_src_dir.display(), filename);
+    debug!("Trying to frob {} -- {}", pkg_src_dir.display(), filename);
     if os::path_exists(&maybe_file) {
         maybe_p = Some(maybe_file);
     }
-    debug2!("Frobbed? {:?}", maybe_p);
+    debug!("Frobbed? {:?}", maybe_p);
     match maybe_p {
         Some(ref p) => {
             let w = io::file_writer(p, &[io::Append]);
@@ -562,7 +562,7 @@ fn frob_source_file(workspace: &Path, pkgid: &PkgId, filename: &str) {
                 Ok(w)  => w.write_line("/* hi */")
             }
         }
-        None => fail2!("frob_source_file failed to find a source file in {}",
+        None => fail!("frob_source_file failed to find a source file in {}",
                            pkg_src_dir.display())
     }
 }
@@ -573,7 +573,7 @@ fn test_make_dir_rwx() {
     let dir = temp.join("quux");
     assert!(!os::path_exists(&dir) ||
             os::remove_dir_recursive(&dir));
-    debug2!("Trying to make {}", dir.display());
+    debug!("Trying to make {}", dir.display());
     assert!(make_dir_rwx(&dir));
     assert!(os::path_is_dir(&dir));
     assert!(is_rwx(&dir));
@@ -589,12 +589,12 @@ fn test_install_valid() {
     use path_util::installed_library_in_workspace;
 
     let sysroot = test_sysroot();
-    debug2!("sysroot = {}", sysroot.display());
+    debug!("sysroot = {}", sysroot.display());
     let temp_pkg_id = fake_pkg();
     let (temp_workspace, _pkg_dir) = mk_temp_workspace(&temp_pkg_id.path, &NoVersion);
     let temp_workspace = temp_workspace.path();
     let ctxt = fake_ctxt(sysroot, temp_workspace);
-    debug2!("temp_workspace = {}", temp_workspace.display());
+    debug!("temp_workspace = {}", temp_workspace.display());
     // should have test, bench, lib, and main
     let src = PkgSrc::new(temp_workspace.clone(),
                           temp_workspace.clone(),
@@ -603,19 +603,19 @@ fn test_install_valid() {
     ctxt.install(src, &Everything);
     // Check that all files exist
     let exec = target_executable_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
 
     let lib = installed_library_in_workspace(&temp_pkg_id.path, temp_workspace);
-    debug2!("lib = {:?}", lib);
+    debug!("lib = {:?}", lib);
     assert!(lib.as_ref().map_default(false, |l| os::path_exists(l)));
     assert!(lib.as_ref().map_default(false, |l| is_rwx(l)));
 
     // And that the test and bench executables aren't installed
     assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, temp_workspace)));
     let bench = target_bench_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 
     // Make sure the db isn't dirty, so that it doesn't try to save()
@@ -656,19 +656,19 @@ fn test_install_valid_external() {
 
     // Check that all files exist
     let exec = target_executable_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
 
     let lib = installed_library_in_workspace(&temp_pkg_id.path, temp_workspace);
-    debug2!("lib = {:?}", lib);
+    debug!("lib = {:?}", lib);
     assert!(lib.as_ref().map_default(false, |l| os::path_exists(l)));
     assert!(lib.as_ref().map_default(false, |l| is_rwx(l)));
 
     // And that the test and bench executables aren't installed
     assert!(!os::path_exists(&target_test_in_workspace(&temp_pkg_id, temp_workspace)));
     let bench = target_bench_in_workspace(&temp_pkg_id, temp_workspace);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 
 }
@@ -689,9 +689,9 @@ fn test_install_git() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
 
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
@@ -703,16 +703,16 @@ fn test_install_git() {
               "#[bench] pub fn f() { (); }");
     add_git_tag(&repo_subdir, ~"0.1"); // this has the effect of committing the files
 
-    debug2!("test_install_git: calling rustpkg install {} in {}",
+    debug!("test_install_git: calling rustpkg install {} in {}",
            temp_pkg_id.path.display(), repo.display());
     // should have test, bench, lib, and main
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test([~"install", temp_pkg_id.path.as_str().unwrap().to_owned()], repo);
     let ws = repo.join(".rust");
     // Check that all files exist
-    debug2!("Checking for files in {}", ws.display());
+    debug!("Checking for files in {}", ws.display());
     let exec = target_executable_in_workspace(&temp_pkg_id, &ws);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
     let _built_lib =
@@ -728,9 +728,9 @@ fn test_install_git() {
     // And that the test and bench executables aren't installed
     let test = target_test_in_workspace(&temp_pkg_id, &ws);
     assert!(!os::path_exists(&test));
-    debug2!("test = {}", test.display());
+    debug!("test = {}", test.display());
     let bench = target_bench_in_workspace(&temp_pkg_id, &ws);
-    debug2!("bench = {}", bench.display());
+    debug!("bench = {}", bench.display());
     assert!(!os::path_exists(&bench));
 }
 
@@ -784,7 +784,7 @@ fn test_package_version() {
     let repo = init_git_repo(&Path::new(local_path));
     let repo = repo.path();
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
-    debug2!("Writing files in: {}", repo_subdir.display());
+    debug!("Writing files in: {}", repo_subdir.display());
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&repo_subdir.join("lib.rs"),
@@ -823,7 +823,7 @@ fn test_package_request_version() {
     let repo = init_git_repo(&Path::new(local_path));
     let repo = repo.path();
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
-    debug2!("Writing files in: {}", repo_subdir.display());
+    debug!("Writing files in: {}", repo_subdir.display());
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&repo_subdir.join("lib.rs"),
@@ -842,7 +842,7 @@ fn test_package_request_version() {
     assert!(match installed_library_in_workspace(&Path::new("test_pkg_version"),
                                                  &repo.join(".rust")) {
         Some(p) => {
-            debug2!("installed: {}", p.display());
+            debug!("installed: {}", p.display());
             let suffix = format!("0.3{}", os::consts::DLL_SUFFIX);
             p.as_vec().ends_with(suffix.as_bytes())
         }
@@ -854,7 +854,7 @@ fn test_package_request_version() {
 
     let mut dir = target_build_dir(&repo.join(".rust"));
     dir.push(&Path::new("src/mockgithub.com/catamorphism/test_pkg_version-0.3"));
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     assert!(os::path_is_dir(&dir));
     assert!(os::path_exists(&dir.join("version-0.3-file.txt")));
     assert!(!os::path_exists(&dir.join("version-0.4-file.txt")));
@@ -874,7 +874,7 @@ fn rustpkg_library_target() {
     let foo_repo = foo_repo.path();
     let package_dir = foo_repo.join("foo");
 
-    debug2!("Writing files in: {}", package_dir.display());
+    debug!("Writing files in: {}", package_dir.display());
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
     writeFile(&package_dir.join("lib.rs"),
@@ -901,14 +901,14 @@ fn rustpkg_local_pkg() {
 fn package_script_with_default_build() {
     let dir = create_local_package(&PkgId::new("fancy-lib"));
     let dir = dir.path();
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     let mut source = test_sysroot().dir_path();
     source.pop(); source.pop();
     source.push_many(["src", "librustpkg", "testsuite", "pass", "src", "fancy-lib", "pkg.rs"]);
-    debug2!("package_script_with_default_build: {}", source.display());
+    debug!("package_script_with_default_build: {}", source.display());
     if !os::copy_file(&source,
                       &dir.join_many(["src", "fancy-lib-0.1", "pkg.rs"])) {
-        fail2!("Couldn't copy file");
+        fail!("Couldn't copy file");
     }
     command_line_test([~"install", ~"fancy-lib"], dir);
     assert_lib_exists(dir, &Path::new("fancy-lib"), NoVersion);
@@ -924,7 +924,7 @@ fn rustpkg_build_no_arg() {
 
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
-    debug2!("build_no_arg: dir = {}", package_dir.display());
+    debug!("build_no_arg: dir = {}", package_dir.display());
     command_line_test([~"build"], &package_dir);
     assert_built_executable_exists(&tmp, "foo");
 }
@@ -937,7 +937,7 @@ fn rustpkg_install_no_arg() {
     assert!(os::mkdir_recursive(&package_dir, U_RWX));
     writeFile(&package_dir.join("lib.rs"),
               "fn main() { let _x = (); }");
-    debug2!("install_no_arg: dir = {}", package_dir.display());
+    debug!("install_no_arg: dir = {}", package_dir.display());
     command_line_test([~"install"], &package_dir);
     assert_lib_exists(&tmp, &Path::new("foo"), NoVersion);
 }
@@ -951,7 +951,7 @@ fn rustpkg_clean_no_arg() {
 
     writeFile(&package_dir.join("main.rs"),
               "fn main() { let _x = (); }");
-    debug2!("clean_no_arg: dir = {}", package_dir.display());
+    debug!("clean_no_arg: dir = {}", package_dir.display());
     command_line_test([~"build"], &package_dir);
     assert_built_executable_exists(&tmp, "foo");
     command_line_test([~"clean"], &package_dir);
@@ -963,11 +963,11 @@ fn rustpkg_clean_no_arg() {
 fn rust_path_test() {
     let dir_for_path = TempDir::new("more_rust").expect("rust_path_test failed");
     let dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
 
     let cwd = os::getcwd();
-    debug2!("cwd = {}", cwd.display());
+    debug!("cwd = {}", cwd.display());
                                      // use command_line_test_with_env
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test_with_env([~"install", ~"foo"],
@@ -1080,7 +1080,7 @@ fn install_check_duplicates() {
     let mut contents = ~[];
     let check_dups = |p: &PkgId| {
         if contents.contains(p) {
-            fail2!("package {} appears in `list` output more than once", p.path.display());
+            fail!("package {} appears in `list` output more than once", p.path.display());
         }
         else {
             contents.push((*p).clone());
@@ -1104,8 +1104,8 @@ fn no_rebuilding() {
 
     match command_line_test_partial([~"build", ~"foo"], workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("no_rebuilding failed: it tried to rebuild bar"),
-        Fail(_) => fail2!("no_rebuilding failed for some other reason")
+        Fail(status) if status == 65 => fail!("no_rebuilding failed: it tried to rebuild bar"),
+        Fail(_) => fail!("no_rebuilding failed for some other reason")
     }
 }
 
@@ -1122,8 +1122,8 @@ fn no_rebuilding_dep() {
     assert!(chmod_read_only(&bar_lib));
     match command_line_test_partial([~"build", ~"foo"], workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("no_rebuilding_dep failed: it tried to rebuild bar"),
-        Fail(_) => fail2!("no_rebuilding_dep failed for some other reason")
+        Fail(status) if status == 65 => fail!("no_rebuilding_dep failed: it tried to rebuild bar"),
+        Fail(_) => fail!("no_rebuilding_dep failed for some other reason")
     }
 }
 
@@ -1141,9 +1141,9 @@ fn do_rebuild_dep_dates_change() {
     assert!(chmod_read_only(&bar_lib_name));
 
     match command_line_test_partial([~"build", ~"foo"], workspace) {
-        Success(*) => fail2!("do_rebuild_dep_dates_change failed: it didn't rebuild bar"),
+        Success(*) => fail!("do_rebuild_dep_dates_change failed: it didn't rebuild bar"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("do_rebuild_dep_dates_change failed for some other reason")
+        Fail(_) => fail!("do_rebuild_dep_dates_change failed for some other reason")
     }
 }
 
@@ -1162,9 +1162,9 @@ fn do_rebuild_dep_only_contents_change() {
 
     // should adjust the datestamp
     match command_line_test_partial([~"build", ~"foo"], workspace) {
-        Success(*) => fail2!("do_rebuild_dep_only_contents_change failed: it didn't rebuild bar"),
+        Success(*) => fail!("do_rebuild_dep_only_contents_change failed: it didn't rebuild bar"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("do_rebuild_dep_only_contents_change failed for some other reason")
+        Fail(_) => fail!("do_rebuild_dep_only_contents_change failed for some other reason")
     }
 }
 
@@ -1270,7 +1270,7 @@ fn test_extern_mod() {
     });
     let outp = prog.finish_with_output();
     if outp.status != 0 {
-        fail2!("output was {}, error was {}",
+        fail!("output was {}, error was {}",
               str::from_utf8(outp.output),
               str::from_utf8(outp.error));
     }
@@ -1304,7 +1304,7 @@ fn test_extern_mod_simpler() {
     let rustpkg_exec = rustpkg_exec();
     let rustc = rustpkg_exec.with_filename("rustc");
     let test_sys = test_sysroot();
-    debug2!("RUST_PATH={} {} {} \n --sysroot {} -o {}",
+    debug!("RUST_PATH={} {} {} \n --sysroot {} -o {}",
                      lib_depend_dir.display(),
                      rustc.display(),
                      main_file.display(),
@@ -1325,7 +1325,7 @@ fn test_extern_mod_simpler() {
     });
     let outp = prog.finish_with_output();
     if outp.status != 0 {
-        fail2!("output was {}, error was {}",
+        fail!("output was {}, error was {}",
               str::from_utf8(outp.output),
               str::from_utf8(outp.error));
     }
@@ -1340,7 +1340,7 @@ fn test_import_rustpkg() {
     writeFile(&workspace.join_many(["src", "foo-0.1", "pkg.rs"]),
               "extern mod rustpkg; fn main() {}");
     command_line_test([~"build", ~"foo"], workspace);
-    debug2!("workspace = {}", workspace.display());
+    debug!("workspace = {}", workspace.display());
     assert!(os::path_exists(&target_build_dir(workspace).join("foo").join(format!("pkg{}",
         os::EXE_SUFFIX))));
 }
@@ -1351,9 +1351,9 @@ fn test_macro_pkg_script() {
     let workspace = create_local_package(&p_id);
     let workspace = workspace.path();
     writeFile(&workspace.join_many(["src", "foo-0.1", "pkg.rs"]),
-              "extern mod rustpkg; fn main() { debug2!(\"Hi\"); }");
+              "extern mod rustpkg; fn main() { debug!(\"Hi\"); }");
     command_line_test([~"build", ~"foo"], workspace);
-    debug2!("workspace = {}", workspace.display());
+    debug!("workspace = {}", workspace.display());
     assert!(os::path_exists(&target_build_dir(workspace).join("foo").join(format!("pkg{}",
         os::EXE_SUFFIX))));
 }
@@ -1367,9 +1367,9 @@ fn multiple_workspaces() {
     let (a_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
     let (b_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
     let (a_loc, b_loc) = (a_loc.path(), b_loc.path());
-    debug2!("Trying to install foo in {}", a_loc.display());
+    debug!("Trying to install foo in {}", a_loc.display());
     command_line_test([~"install", ~"foo"], a_loc);
-    debug2!("Trying to install foo in {}", b_loc.display());
+    debug!("Trying to install foo in {}", b_loc.display());
     command_line_test([~"install", ~"foo"], b_loc);
     // FIXME (#9639): This needs to handle non-utf8 paths
     let env = Some(~[(~"RUST_PATH", format!("{}:{}", a_loc.as_str().unwrap(),
@@ -1443,7 +1443,7 @@ fn rust_path_hack_cwd() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack", ~"foo"], &cwd, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!lib_exists(&cwd, &Path::new("foo"), NoVersion));
@@ -1464,7 +1464,7 @@ fn rust_path_hack_multi_path() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack", name.clone()], &subdir, rust_path);
-   debug2!("Checking that {} exists in {}", name, dest_workspace.display());
+   debug!("Checking that {} exists in {}", name, dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("quux"), NoVersion);
    assert_built_library_exists(dest_workspace, name);
    assert!(!lib_exists(&subdir, &Path::new("quux"), NoVersion));
@@ -1485,7 +1485,7 @@ fn rust_path_hack_install_no_arg() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"install", ~"--rust-path-hack"], &source_dir, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!lib_exists(&source_dir, &Path::new("foo"), NoVersion));
@@ -1505,7 +1505,7 @@ fn rust_path_hack_build_no_arg() {
    // FIXME (#9639): This needs to handle non-utf8 paths
    let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
    command_line_test_with_env([~"build", ~"--rust-path-hack"], &source_dir, rust_path);
-   debug2!("Checking that foo exists in {}", dest_workspace.display());
+   debug!("Checking that foo exists in {}", dest_workspace.display());
    assert_built_library_exists(dest_workspace, "foo");
    assert!(!built_library_exists(&source_dir, "foo"));
 }
@@ -1515,7 +1515,7 @@ fn rust_path_install_target() {
     let dir_for_path = TempDir::new(
         "source_workspace").expect("rust_path_install_target failed");
     let mut dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
-    debug2!("dir = {}", dir.display());
+    debug!("dir = {}", dir.display());
     writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
     let dir_to_install_to = TempDir::new(
         "dest_workspace").expect("rust_path_install_target failed");
@@ -1696,7 +1696,7 @@ fn test_cfg_fail() {
                        ~"build",
                        ~"foo"],
                       workspace) {
-        Success(*) => fail2!("test_cfg_fail failed"),
+        Success(*) => fail!("test_cfg_fail failed"),
         _          => ()
     }
 }
@@ -1857,7 +1857,7 @@ fn pkgid_pointing_to_subdir() {
     writeFile(&foo_dir.join("lib.rs"), "pub fn f() {}");
     writeFile(&bar_dir.join("lib.rs"), "pub fn g() {}");
 
-    debug2!("Creating a file in {}", workspace.display());
+    debug!("Creating a file in {}", workspace.display());
     let testpkg_dir = workspace.join_many(["src", "testpkg-0.1"]);
     assert!(os::mkdir_recursive(&testpkg_dir, U_RWX));
 
@@ -1888,7 +1888,7 @@ fn test_recursive_deps() {
                "extern mod c; use c::g; pub fn f() { g(); }");
     // FIXME (#9639): This needs to handle non-utf8 paths
     let environment = Some(~[(~"RUST_PATH", b_workspace.as_str().unwrap().to_owned())]);
-    debug2!("RUST_PATH={}", b_workspace.display());
+    debug!("RUST_PATH={}", b_workspace.display());
     command_line_test_with_env([~"install", ~"a"],
                                a_workspace,
                                environment);
@@ -1908,7 +1908,7 @@ fn test_install_to_rust_path() {
     let rust_path = Some(~[(~"RUST_PATH",
                             format!("{}:{}", first_workspace.as_str().unwrap(),
                                     second_workspace.as_str().unwrap()))]);
-    debug2!("RUST_PATH={}:{}", first_workspace.display(), second_workspace.display());
+    debug!("RUST_PATH={}:{}", first_workspace.display(), second_workspace.display());
     let test_sys = test_sysroot();
     // FIXME (#9639): This needs to handle non-utf8 paths
     command_line_test_with_env([test_sys.as_str().unwrap().to_owned(),
@@ -2086,9 +2086,9 @@ fn test_rebuild_when_needed() {
     frob_source_file(foo_workspace, &foo_id, "test.rs");
     chmod_read_only(&test_executable);
     match command_line_test_partial([~"test", ~"foo"], foo_workspace) {
-        Success(*) => fail2!("test_rebuild_when_needed didn't rebuild"),
+        Success(*) => fail!("test_rebuild_when_needed didn't rebuild"),
         Fail(status) if status == 65 => (), // ok
-        Fail(_) => fail2!("test_rebuild_when_needed failed for some other reason")
+        Fail(_) => fail!("test_rebuild_when_needed failed for some other reason")
     }
 }
 
@@ -2106,8 +2106,8 @@ fn test_no_rebuilding() {
     chmod_read_only(&test_executable);
     match command_line_test_partial([~"test", ~"foo"], foo_workspace) {
         Success(*) => (), // ok
-        Fail(status) if status == 65 => fail2!("test_no_rebuilding failed: it rebuilt the tests"),
-        Fail(_) => fail2!("test_no_rebuilding failed for some other reason")
+        Fail(status) if status == 65 => fail!("test_no_rebuilding failed: it rebuilt the tests"),
+        Fail(_) => fail!("test_no_rebuilding failed for some other reason")
     }
 }
 
@@ -2118,9 +2118,9 @@ fn test_installed_read_only() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
 
     writeFile(&repo_subdir.join("main.rs"),
               "fn main() { let _x = (); }");
@@ -2133,9 +2133,9 @@ fn test_installed_read_only() {
 
     let ws = repo.join(".rust");
     // Check that all files exist
-    debug2!("Checking for files in {}", ws.display());
+    debug!("Checking for files in {}", ws.display());
     let exec = target_executable_in_workspace(&temp_pkg_id, &ws);
-    debug2!("exec = {}", exec.display());
+    debug!("exec = {}", exec.display());
     assert!(os::path_exists(&exec));
     assert!(is_rwx(&exec));
     let built_lib =
@@ -2158,9 +2158,9 @@ fn test_installed_local_changes() {
     let temp_pkg_id = git_repo_pkg();
     let repo = init_git_repo(&temp_pkg_id.path);
     let repo = repo.path();
-    debug2!("repo = {}", repo.display());
+    debug!("repo = {}", repo.display());
     let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test-pkg"]);
-    debug2!("repo_subdir = {}", repo_subdir.display());
+    debug!("repo_subdir = {}", repo_subdir.display());
     assert!(os::mkdir_recursive(&repo.join_many([".rust", "src"]), U_RWX));
 
     writeFile(&repo_subdir.join("main.rs"),
@@ -2181,12 +2181,12 @@ fn test_installed_local_changes() {
                                                   "mockgithub.com",
                                                   "catamorphism",
                                                   "test-pkg-0.1"]);
-    debug2!("---- git clone {} {}", repo_subdir.display(), target_dir.display());
+    debug!("---- git clone {} {}", repo_subdir.display(), target_dir.display());
 
     let c_res = safe_git_clone(&repo_subdir, &NoVersion, &target_dir);
 
     match c_res {
-        DirToUse(_) => fail2!("test_installed_local_changes failed"),
+        DirToUse(_) => fail!("test_installed_local_changes failed"),
         CheckedOutSources => ()
     };
 
@@ -2232,9 +2232,9 @@ fn test_compile_error() {
     writeFile(&main_crate, "pub fn main() { if 42 != ~\"the answer\" { fail!(); } }");
     let result = command_line_test_partial([~"build", ~"foo"], foo_workspace);
     match result {
-        Success(*) => fail2!("Failed by succeeding!"), // should be a compile error
+        Success(*) => fail!("Failed by succeeding!"), // should be a compile error
         Fail(status) => {
-            debug2!("Failed with status {:?}... that's good, right?", status);
+            debug!("Failed with status {:?}... that's good, right?", status);
         }
     }
 }
index 345518eddc7bb6b6f761b2150c55168a066e2872..a3a4a07cfc77a9dbf432c78255d15ea55fba782c 100644 (file)
@@ -175,7 +175,7 @@ pub fn compile_input(context: &BuildContext,
                      what: OutputType) -> Option<Path> {
     assert!(in_file.component_iter().nth(1).is_some());
     let input = driver::file_input(in_file.clone());
-    debug2!("compile_input: {} / {:?}", in_file.display(), what);
+    debug!("compile_input: {} / {:?}", in_file.display(), what);
     // tjc: by default, use the package ID name as the link name
     // not sure if we should support anything else
 
@@ -186,10 +186,10 @@ pub fn compile_input(context: &BuildContext,
 
     let binary = os::args()[0].to_managed();
 
-    debug2!("flags: {}", flags.connect(" "));
-    debug2!("cfgs: {}", cfgs.connect(" "));
+    debug!("flags: {}", flags.connect(" "));
+    debug!("cfgs: {}", cfgs.connect(" "));
     let csysroot = context.sysroot();
-    debug2!("compile_input's sysroot = {}", csysroot.display());
+    debug!("compile_input's sysroot = {}", csysroot.display());
 
     let crate_type = match what {
         Lib => lib_crate,
@@ -206,7 +206,7 @@ pub fn compile_input(context: &BuildContext,
                           + context.flag_strs()
                           + cfgs.flat_map(|c| { ~[~"--cfg", (*c).clone()] }),
                           driver::optgroups()).unwrap();
-    debug2!("rustc flags: {:?}", matches);
+    debug!("rustc flags: {:?}", matches);
 
     // Hack so that rustpkg can run either out of a rustc target dir,
     // or the host dir
@@ -221,8 +221,8 @@ pub fn compile_input(context: &BuildContext,
         p
     };
     let csysroot = context.sysroot();
-    debug2!("compile_input's sysroot = {}", csysroot.display());
-    debug2!("sysroot_to_use = {}", sysroot_to_use.display());
+    debug!("compile_input's sysroot = {}", csysroot.display());
+    debug!("sysroot_to_use = {}", sysroot_to_use.display());
 
     let output_type = match context.compile_upto() {
         Assemble => link::output_type_assembly,
@@ -270,7 +270,7 @@ pub fn compile_input(context: &BuildContext,
 
     find_and_install_dependencies(context, pkg_id, in_file, sess, exec, &crate, deps,
                                   |p| {
-                                      debug2!("a dependency: {}", p.display());
+                                      debug!("a dependency: {}", p.display());
                                       // Pass the directory containing a dependency
                                       // as an additional lib search path
                                       if !addl_lib_search_paths.contains(&p) {
@@ -287,7 +287,7 @@ pub fn compile_input(context: &BuildContext,
             Bench => format!("{}bench", pkg_id.short_name).to_managed(),
             _     => pkg_id.short_name.to_managed()
         };
-        debug2!("Injecting link name: {}", name_to_use);
+        debug!("Injecting link name: {}", name_to_use);
         // FIXME (#9639): This needs to handle non-utf8 paths
         let link_options =
             ~[attr::mk_name_value_item_str(@"name", name_to_use),
@@ -295,11 +295,11 @@ pub fn compile_input(context: &BuildContext,
             ~[attr::mk_name_value_item_str(@"package_id",
                                            pkg_id.path.as_str().unwrap().to_managed())];
 
-        debug2!("link options: {:?}", link_options);
+        debug!("link options: {:?}", link_options);
         crate.attrs = ~[attr::mk_attr(attr::mk_list_item(@"link", link_options))];
     }
 
-    debug2!("calling compile_crate_from_input, workspace = {},
+    debug!("calling compile_crate_from_input, workspace = {},
            building_library = {:?}", out_dir.display(), sess.building_library);
     let result = compile_crate_from_input(in_file,
                                           exec,
@@ -315,9 +315,9 @@ pub fn compile_input(context: &BuildContext,
         result
     };
     for p in discovered_output.iter() {
-        debug2!("About to discover output {}", p.display());
+        debug!("About to discover output {}", p.display());
         if os::path_exists(p) {
-            debug2!("4. discovering output {}", p.display());
+            debug!("4. discovering output {}", p.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             exec.discover_output("binary", p.as_str().unwrap(), digest_only_date(p));
         }
@@ -342,22 +342,22 @@ pub fn compile_crate_from_input(input: &Path,
 // Returns None if one of the flags that suppresses compilation output was
 // given
                                 crate: ast::Crate) -> Option<Path> {
-    debug2!("Calling build_output_filenames with {}, building library? {:?}",
+    debug!("Calling build_output_filenames with {}, building library? {:?}",
            out_dir.display(), sess.building_library);
 
     // bad copy
-    debug2!("out_dir = {}", out_dir.display());
+    debug!("out_dir = {}", out_dir.display());
     let outputs = driver::build_output_filenames(&driver::file_input(input.clone()),
                                                  &Some(out_dir.clone()), &None,
                                                  crate.attrs, sess);
 
-    debug2!("Outputs are out_filename: {} and obj_filename: {} and output type = {:?}",
+    debug!("Outputs are out_filename: {} and obj_filename: {} and output type = {:?}",
            outputs.out_filename.display(),
            outputs.obj_filename.display(),
            sess.opts.output_type);
-    debug2!("additional libraries:");
+    debug!("additional libraries:");
     for lib in sess.opts.addl_lib_search_paths.iter() {
-        debug2!("an additional library: {}", lib.display());
+        debug!("an additional library: {}", lib.display());
     }
     let analysis = driver::phase_3_run_analysis_passes(sess, &crate);
     if driver::stop_after_phase_3(sess) { return None; }
@@ -375,7 +375,7 @@ pub fn compile_crate_from_input(input: &Path,
     // FIXME (#9639): This needs to handle non-utf8 paths
     exec.discover_input("file", input.as_str().unwrap(), digest_file_with_date(input));
 
-    debug2!("Built {}, date = {:?}", outputs.out_filename.display(),
+    debug!("Built {}, date = {:?}", outputs.out_filename.display(),
            datestamp(&outputs.out_filename));
 
     Some(outputs.out_filename)
@@ -401,10 +401,10 @@ pub fn compile_crate(ctxt: &BuildContext,
                      cfgs: &[~str],
                      opt: bool,
                      what: OutputType) -> Option<Path> {
-    debug2!("compile_crate: crate={}, workspace={}", crate.display(), workspace.display());
-    debug2!("compile_crate: short_name = {}, flags =...", pkg_id.to_str());
+    debug!("compile_crate: crate={}, workspace={}", crate.display(), workspace.display());
+    debug!("compile_crate: short_name = {}, flags =...", pkg_id.to_str());
     for fl in flags.iter() {
-        debug2!("+++ {}", *fl);
+        debug!("+++ {}", *fl);
     }
     compile_input(ctxt, exec, pkg_id, crate, workspace, deps, flags, cfgs, opt, what)
 }
@@ -429,11 +429,11 @@ fn visit_view_item(&mut self, vi: &ast::view_item, env: ()) {
                     Some((p, _)) => p,
                     None => self.sess.str_of(lib_ident)
                 };
-                debug2!("Finding and installing... {}", lib_name);
+                debug!("Finding and installing... {}", lib_name);
                 // Check standard Rust library path first
                 match system_library(&self.context.sysroot(), lib_name) {
                     Some(ref installed_path) => {
-                        debug2!("It exists: {}", installed_path.display());
+                        debug!("It exists: {}", installed_path.display());
                         // Say that [path for c] has a discovered dependency on
                         // installed_path
                         // For binary files, we only hash the datestamp, not the contents.
@@ -449,7 +449,7 @@ fn visit_view_item(&mut self, vi: &ast::view_item, env: ()) {
                     }
                     None => {
                         // FIXME #8711: need to parse version out of path_opt
-                        debug2!("Trying to install library {}, rebuilding it",
+                        debug!("Trying to install library {}, rebuilding it",
                                lib_name.to_str());
                         // Try to install it
                         let pkg_id = PkgId::new(lib_name);
@@ -479,15 +479,15 @@ fn visit_view_item(&mut self, vi: &ast::view_item, env: ()) {
                                                   pkg_id.clone());
                         let (outputs_disc, inputs_disc) =
                             self.context.install(pkg_src, &JustOne(Path::new(lib_crate_filename)));
-                        debug2!("Installed {}, returned {:?} dependencies and \
+                        debug!("Installed {}, returned {:?} dependencies and \
                                {:?} transitive dependencies",
                                lib_name, outputs_disc.len(), inputs_disc.len());
-                        debug2!("discovered outputs = {:?} discovered_inputs = {:?}",
+                        debug!("discovered outputs = {:?} discovered_inputs = {:?}",
                                outputs_disc, inputs_disc);
                         // It must have installed *something*...
                         assert!(!outputs_disc.is_empty());
                         for dep in outputs_disc.iter() {
-                            debug2!("Discovering a binary input: {}", dep.display());
+                            debug!("Discovering a binary input: {}", dep.display());
                             // FIXME (#9639): This needs to handle non-utf8 paths
                             self.exec.discover_input("binary",
                                                      dep.as_str().unwrap(),
@@ -498,10 +498,10 @@ fn visit_view_item(&mut self, vi: &ast::view_item, env: ()) {
 
                             // Also, add an additional search path
                             let dep_dir = dep.dir_path();
-                            debug2!("Installed {} into {}", dep.display(), dep_dir.display());
+                            debug!("Installed {} into {}", dep.display(), dep_dir.display());
                             (self.save)(dep_dir);
                         }
-                        debug2!("Installed {}, returned {} dependencies and \
+                        debug!("Installed {}, returned {} dependencies and \
                                 {} transitive dependencies",
                                 lib_name, outputs_disc.len(), inputs_disc.len());
                         // It must have installed *something*...
@@ -526,10 +526,10 @@ fn visit_view_item(&mut self, vi: &ast::view_item, env: ()) {
                                                          digest_only_date(
                                                              &Path::new(dep.as_slice())));
                             } else {
-                                fail2!("Bad kind: {}", *what);
+                                fail!("Bad kind: {}", *what);
                             }
                             // Also, add an additional search path
-                            debug2!("Installed {} into {}",
+                            debug!("Installed {} into {}",
                                     lib_name, target_workspace.as_str().unwrap().to_owned());
                             (self.save)(target_workspace.clone());
                         }
@@ -554,7 +554,7 @@ pub fn find_and_install_dependencies(context: &BuildContext,
                                      c: &ast::Crate,
                                      deps: &mut DepMap,
                                      save: &fn(Path)) {
-    debug2!("In find_and_install_dependencies...");
+    debug!("In find_and_install_dependencies...");
     let mut visitor = ViewItemVisitor {
         context: context,
         parent: parent,
@@ -608,9 +608,9 @@ fn debug_flags() -> ~[~str] { ~[] }
 
 /// Returns the last-modified date as an Option
 pub fn datestamp(p: &Path) -> Option<libc::time_t> {
-    debug2!("Scrutinizing datestamp for {} - does it exist? {:?}", p.display(), os::path_exists(p));
+    debug!("Scrutinizing datestamp for {} - does it exist? {:?}", p.display(), os::path_exists(p));
     let out = p.stat().map(|stat| stat.st_mtime);
-    debug2!("Date = {:?}", out);
+    debug!("Date = {:?}", out);
     out.map(|t| { t as libc::time_t })
 }
 
index 218f410e4dcfca47fa34b0587f964651e8984367..6ca19562724fe8b0a60e22e5d1abb3070ebae30a 100644 (file)
@@ -107,7 +107,7 @@ pub fn try_getting_local_version(local_path: &Path) -> Option<Version> {
         let outp = run::process_output("git",
                                    ["--git-dir=" + git_dir.as_str().unwrap(), ~"tag", ~"-l"]);
 
-        debug2!("git --git-dir={} tag -l ~~~> {:?}", git_dir.display(), outp.status);
+        debug!("git --git-dir={} tag -l ~~~> {:?}", git_dir.display(), outp.status);
 
         if outp.status != 0 {
             continue;
@@ -136,7 +136,7 @@ pub fn try_getting_version(remote_path: &Path) -> Option<Version> {
         let tmp_dir = TempDir::new("test");
         let tmp_dir = tmp_dir.expect("try_getting_version: couldn't create temp dir");
         let tmp_dir = tmp_dir.path();
-        debug2!("(to get version) executing \\{git clone https://{} {}\\}",
+        debug!("(to get version) executing \\{git clone https://{} {}\\}",
                remote_path.display(),
                tmp_dir.display());
         // FIXME (#9639): This needs to handle non-utf8 paths
@@ -144,21 +144,21 @@ pub fn try_getting_version(remote_path: &Path) -> Option<Version> {
                                                                   remote_path.as_str().unwrap()),
                                                 tmp_dir.as_str().unwrap().to_owned()]);
         if outp.status == 0 {
-            debug2!("Cloned it... ( {}, {} )",
+            debug!("Cloned it... ( {}, {} )",
                    str::from_utf8(outp.output),
                    str::from_utf8(outp.error));
             let mut output = None;
             let git_dir = tmp_dir.join(".git");
-            debug2!("(getting version, now getting tags) executing \\{git --git-dir={} tag -l\\}",
+            debug!("(getting version, now getting tags) executing \\{git --git-dir={} tag -l\\}",
                    git_dir.display());
             // FIXME (#9639): This needs to handle non-utf8 paths
             let outp = run::process_output("git",
                                            ["--git-dir=" + git_dir.as_str().unwrap(),
                                             ~"tag", ~"-l"]);
             let output_text = str::from_utf8(outp.output);
-            debug2!("Full output: ( {} ) [{:?}]", output_text, outp.status);
+            debug!("Full output: ( {} ) [{:?}]", output_text, outp.status);
             for l in output_text.line_iter() {
-                debug2!("A line of output: {}", l);
+                debug!("A line of output: {}", l);
                 if !l.is_whitespace() {
                     output = Some(l);
                 }
@@ -185,7 +185,7 @@ enum ParseState {
 
 pub fn try_parsing_version(s: &str) -> Option<Version> {
     let s = s.trim();
-    debug2!("Attempting to parse: {}", s);
+    debug!("Attempting to parse: {}", s);
     let mut parse_state = Start;
     for c in s.iter() {
         if char::is_digit(c) {
@@ -248,7 +248,7 @@ fn test_parse_version() {
 #[test]
 fn test_split_version() {
     let s = "a/b/c#0.1";
-    debug2!("== {:?} ==", split_version(s));
+    debug!("== {:?} ==", split_version(s));
     assert!(split_version(s) == Some((s.slice(0, 5), ExactRevision(~"0.1"))));
     assert!(split_version("a/b/c") == None);
     let s = "a#1.2";
index 34404ad625c78dd959705804fb271a1d15f9c55a..0352067a7e9edf7387ce438fcf974db7f3fbacf6 100644 (file)
@@ -54,9 +54,9 @@ pub fn digest_only_date(path: &Path) -> ~str {
 
 /// Adds multiple discovered outputs
 pub fn discover_outputs(e: &mut workcache::Exec, outputs: ~[Path]) {
-    debug2!("Discovering {:?} outputs", outputs.len());
+    debug!("Discovering {:?} outputs", outputs.len());
     for p in outputs.iter() {
-        debug2!("Discovering output! {}", p.display());
+        debug!("Discovering output! {}", p.display());
         // For now, assume that all discovered outputs are binaries
         // FIXME (#9639): This needs to handle non-utf8 paths
         e.discover_output("binary", p.as_str().unwrap(), digest_only_date(p));
index 13d70f153329b05caef1e7120e9f38452d9d7851..a35500372467c2e5dad9caf65c35c42c96006cfc 100644 (file)
@@ -24,7 +24,7 @@ pub fn each_pkg_parent_workspace(cx: &Context, pkgid: &PkgId, action: &fn(&Path)
     let workspaces = pkg_parent_workspaces(cx, pkgid);
     if workspaces.is_empty() {
         // tjc: make this a condition
-        fail2!("Package {} not found in any of \
+        fail!("Package {} not found in any of \
                     the following workspaces: {}",
                    pkgid.path.display(),
                    rust_path().map(|p| p.display().to_str()).to_str());
index 8607710edc396f5ccadba3c0b733027f79397dcc..ee0b9b0df0b808b95124f2d1ad4c56a945e234e5 100644 (file)
@@ -238,7 +238,7 @@ pub fn reserve_raw(ty: *TyDesc, ptr: *mut *mut Box<Vec<()>>, n: uint) {
                 let alloc = n * (*ty).size;
                 let total_size = alloc + mem::size_of::<Vec<()>>();
                 if alloc / (*ty).size != n || total_size < alloc {
-                    fail2!("vector size is too large: {}", n);
+                    fail!("vector size is too large: {}", n);
                 }
                 (*ptr) = local_realloc(*ptr as *(), total_size) as *mut Box<Vec<()>>;
                 (**ptr).data.alloc = alloc;
index 8118907322bf79c48318fc57e05a47405fa3f69a..acfa02a4defd5f2782068673b135c83d927e15ce 100644 (file)
@@ -116,7 +116,7 @@ pub unsafe fn unwrap(self) -> *libc::c_char {
     ///
     /// Fails if the CString is null.
     pub fn with_ref<T>(&self, f: &fn(*libc::c_char) -> T) -> T {
-        if self.buf.is_null() { fail2!("CString is null!"); }
+        if self.buf.is_null() { fail!("CString is null!"); }
         f(self.buf)
     }
 
@@ -126,7 +126,7 @@ pub fn with_ref<T>(&self, f: &fn(*libc::c_char) -> T) -> T {
     ///
     /// Fails if the CString is null.
     pub fn with_mut_ref<T>(&mut self, f: &fn(*mut libc::c_char) -> T) -> T {
-        if self.buf.is_null() { fail2!("CString is null!"); }
+        if self.buf.is_null() { fail!("CString is null!"); }
         f(unsafe { cast::transmute_mut_unsafe(self.buf) })
     }
 
@@ -152,7 +152,7 @@ pub fn owns_buffer(&self) -> bool {
     /// Fails if the CString is null.
     #[inline]
     pub fn as_bytes<'a>(&'a self) -> &'a [u8] {
-        if self.buf.is_null() { fail2!("CString is null!"); }
+        if self.buf.is_null() { fail!("CString is null!"); }
         unsafe {
             cast::transmute((self.buf, self.len() + 1))
         }
@@ -273,7 +273,7 @@ unsafe fn to_c_str_unchecked(&self) -> CString {
         do self.as_imm_buf |self_buf, self_len| {
             let buf = libc::malloc(self_len as libc::size_t + 1) as *mut u8;
             if buf.is_null() {
-                fail2!("failed to allocate memory!");
+                fail!("failed to allocate memory!");
             }
 
             ptr::copy_memory(buf, self_buf, self_len);
index 4bbb0a5935aeeba50617ab06c0af99c7cea65c86..a1459b780dfb3cd204d4d47bc8f1d04eb2da374e 100644 (file)
@@ -44,7 +44,7 @@ pub fn new_empty() -> Cell<T> {
     pub fn take(&self) -> T {
         let this = unsafe { transmute_mut(self) };
         if this.is_empty() {
-            fail2!("attempt to take an empty cell");
+            fail!("attempt to take an empty cell");
         }
 
         this.value.take_unwrap()
@@ -60,7 +60,7 @@ pub fn take_opt(&self) -> Option<T> {
     pub fn put_back(&self, value: T) {
         let this = unsafe { transmute_mut(self) };
         if !this.is_empty() {
-            fail2!("attempt to put a value back into a full cell");
+            fail!("attempt to put a value back into a full cell");
         }
         this.value = Some(value);
     }
index 54613adf3fec15ebf8efd82089c17cb1c82e8a81..643498f000af695b0714bef76a428ff3e4fee84f 100644 (file)
@@ -187,7 +187,7 @@ pub fn is_digit_radix(c: char, radix: uint) -> bool {
 #[inline]
 pub fn to_digit(c: char, radix: uint) -> Option<uint> {
     if radix > 36 {
-        fail2!("to_digit: radix {} is to high (maximum 36)", radix);
+        fail!("to_digit: radix {} is to high (maximum 36)", radix);
     }
     let val = match c {
       '0' .. '9' => c as uint - ('0' as uint),
@@ -214,7 +214,7 @@ pub fn to_digit(c: char, radix: uint) -> Option<uint> {
 #[inline]
 pub fn from_digit(num: uint, radix: uint) -> Option<char> {
     if radix > 36 {
-        fail2!("from_digit: radix {} is to high (maximum 36)", num);
+        fail!("from_digit: radix {} is to high (maximum 36)", num);
     }
     if num < radix {
         unsafe {
@@ -342,7 +342,7 @@ pub fn len_utf8_bytes(c: char) -> uint {
         _ if code < MAX_TWO_B   => 2u,
         _ if code < MAX_THREE_B => 3u,
         _ if code < MAX_FOUR_B  => 4u,
-        _                       => fail2!("invalid character!"),
+        _                       => fail!("invalid character!"),
     }
 }
 
index a8c4d9fdca3c20f1ff5091cb9eb9dae786045246..a9070a7a7a2727cee40a026dadbe0b3f6ae41e3c 100644 (file)
@@ -123,7 +123,7 @@ pub unsafe fn annihilate() {
 
     if debug_mem() {
         // We do logging here w/o allocation.
-        debug2!("annihilator stats:\n  \
+        debug!("annihilator stats:\n  \
                        total boxes: {}\n  \
                       unique boxes: {}\n  \
                        bytes freed: {}",
index 7828fa09d970d2a4315845ad232e548b40ff53e8..cb9552b189ce5b7fa99184bb694473501f5e8461 100644 (file)
@@ -56,7 +56,7 @@
 Condition handling is useful in cases where propagating errors is either to
 cumbersome or just not necessary in the first place. It should also be noted,
 though, that if there is not handler installed when a condition is raised, then
-the task invokes `fail2!()` and will terminate.
+the task invokes `fail!()` and will terminate.
 
 ## More Info
 
@@ -128,7 +128,7 @@ pub fn trap<'a>(&'a self, h: &'a fn(T) -> U) -> Trap<'a, T, U> {
     /// function will not return.
     pub fn raise(&self, t: T) -> U {
         let msg = format!("Unhandled condition: {}: {:?}", self.name, t);
-        self.raise_default(t, || fail2!("{}", msg.clone()))
+        self.raise_default(t, || fail!("{}", msg.clone()))
     }
 
     /// Performs the same functionality as `raise`, except that when no handler
@@ -136,11 +136,11 @@ pub fn raise(&self, t: T) -> U {
     pub fn raise_default(&self, t: T, default: &fn() -> U) -> U {
         match local_data::pop(self.key) {
             None => {
-                debug2!("Condition.raise: found no handler");
+                debug!("Condition.raise: found no handler");
                 default()
             }
             Some(handler) => {
-                debug2!("Condition.raise: found handler");
+                debug!("Condition.raise: found handler");
                 match handler.prev {
                     None => {}
                     Some(hp) => local_data::set(self.key, hp)
@@ -183,7 +183,7 @@ impl<'self, T, U> Trap<'self, T, U> {
     /// ```
     pub fn inside<V>(&self, inner: &'self fn() -> V) -> V {
         let _g = Guard { cond: self.cond };
-        debug2!("Trap: pushing handler to TLS");
+        debug!("Trap: pushing handler to TLS");
         local_data::set(self.cond.key, self.handler);
         inner()
     }
@@ -197,7 +197,7 @@ struct Guard<'self, T, U> {
 #[unsafe_destructor]
 impl<'self, T, U> Drop for Guard<'self, T, U> {
     fn drop(&mut self) {
-        debug2!("Guard: popping handler from TLS");
+        debug!("Guard: popping handler from TLS");
         let curr = local_data::pop(self.cond.key);
         match curr {
             None => {}
@@ -216,20 +216,20 @@ mod test {
     }
 
     fn trouble(i: int) {
-        debug2!("trouble: raising condition");
+        debug!("trouble: raising condition");
         let j = sadness::cond.raise(i);
-        debug2!("trouble: handler recovered with {}", j);
+        debug!("trouble: handler recovered with {}", j);
     }
 
     fn nested_trap_test_inner() {
         let mut inner_trapped = false;
 
         do sadness::cond.trap(|_j| {
-            debug2!("nested_trap_test_inner: in handler");
+            debug!("nested_trap_test_inner: in handler");
             inner_trapped = true;
             0
         }).inside {
-            debug2!("nested_trap_test_inner: in protected block");
+            debug!("nested_trap_test_inner: in protected block");
             trouble(1);
         }
 
@@ -241,10 +241,10 @@ fn nested_trap_test_outer() {
         let mut outer_trapped = false;
 
         do sadness::cond.trap(|_j| {
-            debug2!("nested_trap_test_outer: in handler");
+            debug!("nested_trap_test_outer: in handler");
             outer_trapped = true; 0
         }).inside {
-            debug2!("nested_guard_test_outer: in protected block");
+            debug!("nested_guard_test_outer: in protected block");
             nested_trap_test_inner();
             trouble(1);
         }
@@ -256,13 +256,13 @@ fn nested_reraise_trap_test_inner() {
         let mut inner_trapped = false;
 
         do sadness::cond.trap(|_j| {
-            debug2!("nested_reraise_trap_test_inner: in handler");
+            debug!("nested_reraise_trap_test_inner: in handler");
             inner_trapped = true;
             let i = 10;
-            debug2!("nested_reraise_trap_test_inner: handler re-raising");
+            debug!("nested_reraise_trap_test_inner: handler re-raising");
             sadness::cond.raise(i)
         }).inside {
-            debug2!("nested_reraise_trap_test_inner: in protected block");
+            debug!("nested_reraise_trap_test_inner: in protected block");
             trouble(1);
         }
 
@@ -274,10 +274,10 @@ fn nested_reraise_trap_test_outer() {
         let mut outer_trapped = false;
 
         do sadness::cond.trap(|_j| {
-            debug2!("nested_reraise_trap_test_outer: in handler");
+            debug!("nested_reraise_trap_test_outer: in handler");
             outer_trapped = true; 0
         }).inside {
-            debug2!("nested_reraise_trap_test_outer: in protected block");
+            debug!("nested_reraise_trap_test_outer: in protected block");
             nested_reraise_trap_test_inner();
         }
 
@@ -289,10 +289,10 @@ fn test_default() {
         let mut trapped = false;
 
         do sadness::cond.trap(|j| {
-            debug2!("test_default: in handler");
+            debug!("test_default: in handler");
             sadness::cond.raise_default(j, || { trapped=true; 5 })
         }).inside {
-            debug2!("test_default: in protected block");
+            debug!("test_default: in protected block");
             trouble(1);
         }
 
index 657212fc692270f32fffd317ae0c35718eaeefa8..262cdaed492acd897f54dae9755bf65f8636ce42 100644 (file)
@@ -78,7 +78,7 @@ pub fn is_right(&self) -> bool {
     pub fn expect_left(self, reason: &str) -> L {
         match self {
             Left(x) => x,
-            Right(_) => fail2!("{}", reason.to_owned())
+            Right(_) => fail!("{}", reason.to_owned())
         }
     }
 
@@ -94,7 +94,7 @@ pub fn unwrap_left(self) -> L {
     pub fn expect_right(self, reason: &str) -> R {
         match self {
             Right(x) => x,
-            Left(_) => fail2!("{}", reason.to_owned())
+            Left(_) => fail!("{}", reason.to_owned())
         }
     }
 
index d63acb74acdb1e5313331b0f6d505608ddc825e4..ed7fc9eb1d9546215685e3ed0e84820dbf10119b 100644 (file)
@@ -493,10 +493,10 @@ fn to_hex_str(r: &[u8, ..8]) -> ~str {
         }
 
         while t < 64 {
-            debug2!("siphash test {}", t);
+            debug!("siphash test {}", t);
             let vec = u8to64_le!(vecs[t], 0);
             let out = Bytes(buf.as_slice()).hash_keyed(k0, k1);
-            debug2!("got {:?}, expected {:?}", out, vec);
+            debug!("got {:?}, expected {:?}", out, vec);
             assert_eq!(vec, out);
 
             stream_full.reset();
@@ -504,7 +504,7 @@ fn to_hex_str(r: &[u8, ..8]) -> ~str {
             let f = stream_full.result_str();
             let i = stream_inc.result_str();
             let v = to_hex_str(&vecs[t]);
-            debug2!("{}: ({}) => inc={} full={}", t, v, i, f);
+            debug!("{}: ({}) => inc={} full={}", t, v, i, f);
 
             assert!(f == i && f == v);
 
index 7816480efab243258f905237a693f21f525b3fbb..edefd39ebb4d1c62f7be6b50d99dffcaa468e333 100644 (file)
@@ -179,7 +179,7 @@ fn insert_opt_bucket(&mut self, bucket: Option<Bucket<K, V>>) {
     fn value_for_bucket<'a>(&'a self, idx: uint) -> &'a V {
         match self.buckets[idx] {
             Some(ref bkt) => &bkt.value,
-            None => fail2!("HashMap::find: internal logic error"),
+            None => fail!("HashMap::find: internal logic error"),
         }
     }
 
@@ -196,7 +196,7 @@ fn mut_value_for_bucket<'a>(&'a mut self, idx: uint) -> &'a mut V {
     /// True if there was no previous entry with that key
     fn insert_internal(&mut self, hash: uint, k: K, v: V) -> Option<V> {
         match self.bucket_for_key_with_hash(hash, &k) {
-            TableFull => { fail2!("Internal logic error"); }
+            TableFull => { fail!("Internal logic error"); }
             FoundHole(idx) => {
                 self.buckets[idx] = Some(Bucket{hash: hash, key: k,
                                                 value: v});
@@ -205,7 +205,7 @@ fn insert_internal(&mut self, hash: uint, k: K, v: V) -> Option<V> {
             }
             FoundEntry(idx) => {
                 match self.buckets[idx] {
-                    None => { fail2!("insert_internal: Internal logic error") }
+                    None => { fail!("insert_internal: Internal logic error") }
                     Some(ref mut b) => {
                         b.hash = hash;
                         b.key = k;
@@ -374,7 +374,7 @@ pub fn mangle<'a,A>(&'a mut self, k: K, a: A, not_found: &fn(&K, A) -> V,
 
         let hash = k.hash_keyed(self.k0, self.k1) as uint;
         let idx = match self.bucket_for_key_with_hash(hash, &k) {
-            TableFull => fail2!("Internal logic error"),
+            TableFull => fail!("Internal logic error"),
             FoundEntry(idx) => { found(&k, self.mut_value_for_bucket(idx), a); idx }
             FoundHole(idx) => {
                 let v = not_found(&k, a);
@@ -413,7 +413,7 @@ pub fn insert_or_update_with<'a>(&'a mut self, k: K, v: V,
     pub fn get<'a>(&'a self, k: &K) -> &'a V {
         match self.find(k) {
             Some(v) => v,
-            None => fail2!("No entry found for key: {:?}", k),
+            None => fail!("No entry found for key: {:?}", k),
         }
     }
 
@@ -422,7 +422,7 @@ pub fn get<'a>(&'a self, k: &K) -> &'a V {
     pub fn get_mut<'a>(&'a mut self, k: &K) -> &'a mut V {
         match self.find_mut(k) {
             Some(v) => v,
-            None => fail2!("No entry found for key: {:?}", k),
+            None => fail!("No entry found for key: {:?}", k),
         }
     }
 
@@ -826,7 +826,7 @@ fn test_find_mut() {
         assert!(m.insert(5, 14));
         let new = 100;
         match m.find_mut(&5) {
-            None => fail2!(), Some(x) => *x = new
+            None => fail!(), Some(x) => *x = new
         }
         assert_eq!(m.find(&5), Some(&new));
     }
@@ -943,7 +943,7 @@ fn test_find() {
         assert!(m.find(&1).is_none());
         m.insert(1, 2);
         match m.find(&1) {
-            None => fail2!(),
+            None => fail!(),
             Some(v) => assert!(*v == 2)
         }
     }
index b92806d715f00c25347fa0d2da5f8550f8f4f207..94a6b7cfea8dd1c69714a80aae89a1d19a4b2b92 100644 (file)
@@ -946,8 +946,8 @@ fn read(&self, bytes: &mut [u8], len: uint) -> uint {
                   match libc::ferror(*self) {
                     0 => (),
                     _ => {
-                      error2!("error reading buffer: {}", os::last_os_error());
-                      fail2!();
+                      error!("error reading buffer: {}", os::last_os_error());
+                      fail!();
                     }
                   }
                 }
@@ -1194,8 +1194,8 @@ fn write(&self, v: &[u8]) {
                                         len as size_t,
                                         *self);
                 if nout != len as size_t {
-                    error2!("error writing buffer: {}", os::last_os_error());
-                    fail2!();
+                    error!("error writing buffer: {}", os::last_os_error());
+                    fail!();
                 }
             }
         }
@@ -1255,8 +1255,8 @@ fn write(&self, v: &[u8]) {
                     let vb = ptr::offset(vbuf, count as int) as *c_void;
                     let nout = libc::write(*self, vb, len as IoSize);
                     if nout < 0 as IoRet {
-                        error2!("error writing buffer: {}", os::last_os_error());
-                        fail2!();
+                        error!("error writing buffer: {}", os::last_os_error());
+                        fail!();
                     }
                     count += nout as uint;
                 }
@@ -1264,12 +1264,12 @@ fn write(&self, v: &[u8]) {
         }
     }
     fn seek(&self, _offset: int, _whence: SeekStyle) {
-        error2!("need 64-bit foreign calls for seek, sorry");
-        fail2!();
+        error!("need 64-bit foreign calls for seek, sorry");
+        fail!();
     }
     fn tell(&self) -> uint {
-        error2!("need 64-bit foreign calls for tell, sorry");
-        fail2!();
+        error!("need 64-bit foreign calls for tell, sorry");
+        fail!();
     }
     fn flush(&self) -> int { 0 }
     fn get_type(&self) -> WriterType {
@@ -1895,17 +1895,17 @@ mod tests {
     #[test]
     fn test_simple() {
         let tmpfile = &Path::new("tmp/lib-io-test-simple.tmp");
-        debug2!("{}", tmpfile.display());
+        debug!("{}", tmpfile.display());
         let frood: ~str =
             ~"A hoopy frood who really knows where his towel is.";
-        debug2!("{}", frood.clone());
+        debug!("{}", frood.clone());
         {
             let out = io::file_writer(tmpfile, [io::Create, io::Truncate]).unwrap();
             out.write_str(frood);
         }
         let inp = io::file_reader(tmpfile).unwrap();
         let frood2: ~str = inp.read_c_str();
-        debug2!("{}", frood2.clone());
+        debug!("{}", frood2.clone());
         assert_eq!(frood, frood2);
     }
 
@@ -1922,14 +1922,14 @@ fn test_each_byte_each_char_file() {
         {
             let file = io::file_reader(&path).unwrap();
             do file.each_byte() |_| {
-                fail2!("must be empty")
+                fail!("must be empty")
             };
         }
 
         {
             let file = io::file_reader(&path).unwrap();
             do file.each_char() |_| {
-                fail2!("must be empty")
+                fail!("must be empty")
             };
         }
     }
@@ -2016,7 +2016,7 @@ fn file_reader_not_exist() {
           Err(e) => {
             assert_eq!(e, ~"error opening not a file");
           }
-          Ok(_) => fail2!()
+          Ok(_) => fail!()
         }
     }
 
@@ -2056,7 +2056,7 @@ fn file_writer_bad_name() {
           Err(e) => {
             assert!(e.starts_with("error opening"));
           }
-          Ok(_) => fail2!()
+          Ok(_) => fail!()
         }
     }
 
index 4d2abd2633f93959481540e1c934f761be9a7e31..01af3d931573cd3234eac42b51ae38719cdc95f9 100644 (file)
@@ -742,7 +742,7 @@ fn rposition(&mut self, predicate: &fn(A) -> bool) -> Option<uint> {
                 Some(x) => {
                     i = match i.checked_sub(&1) {
                         Some(x) => x,
-                        None => fail2!("rposition: incorrect ExactSize")
+                        None => fail!("rposition: incorrect ExactSize")
                     };
                     if predicate(x) {
                         return Some(i)
@@ -2487,7 +2487,7 @@ fn test_all() {
         assert!(v.iter().all(|&x| x < 10));
         assert!(!v.iter().all(|&x| x.is_even()));
         assert!(!v.iter().all(|&x| x > 100));
-        assert!(v.slice(0, 0).iter().all(|_| fail2!()));
+        assert!(v.slice(0, 0).iter().all(|_| fail!()));
     }
 
     #[test]
@@ -2496,7 +2496,7 @@ fn test_any() {
         assert!(v.iter().any(|&x| x < 10));
         assert!(v.iter().any(|&x| x.is_even()));
         assert!(!v.iter().any(|&x| x > 100));
-        assert!(!v.slice(0, 0).iter().any(|_| fail2!()));
+        assert!(!v.slice(0, 0).iter().any(|_| fail!()));
     }
 
     #[test]
@@ -2646,7 +2646,7 @@ fn test_rposition_fail() {
         let mut i = 0;
         do v.iter().rposition |_elt| {
             if i == 2 {
-                fail2!()
+                fail!()
             }
             i += 1;
             false
@@ -2790,12 +2790,12 @@ fn test_random_access_cycle() {
     fn test_double_ended_range() {
         assert_eq!(range(11i, 14).invert().collect::<~[int]>(), ~[13i, 12, 11]);
         for _ in range(10i, 0).invert() {
-            fail2!("unreachable");
+            fail!("unreachable");
         }
 
         assert_eq!(range(11u, 14).invert().collect::<~[uint]>(), ~[13u, 12, 11]);
         for _ in range(10u, 0).invert() {
-            fail2!("unreachable");
+            fail!("unreachable");
         }
     }
 
index 64f02539d0f9b20d25ab549809b29d78b6eae1e1..30175d6609b93167243c9f7ebc9731ab2c7d7ba3 100644 (file)
@@ -144,7 +144,7 @@ pub fn pop<T: 'static>(key: Key<T>) -> Option<T> {
         match *entry {
             Some((k, _, loan)) if k == key_value => {
                 if loan != NoLoan {
-                    fail2!("TLS value cannot be removed because it is currently \
+                    fail!("TLS value cannot be removed because it is currently \
                           borrowed as {}", loan.describe());
                 }
                 // Move the data out of the `entry` slot via util::replace.
@@ -241,7 +241,7 @@ fn get_with<T: 'static, U>(key: Key<T>,
                         }
                         (ImmLoan, ImmLoan) => {}
                         (want, cur) => {
-                            fail2!("TLS slot cannot be borrowed as {} because \
+                            fail!("TLS slot cannot be borrowed as {} because \
                                     it is already borrowed as {}",
                                   want.describe(), cur.describe());
                         }
@@ -305,7 +305,7 @@ fn insertion_position(map: &mut Map,
             match *entry {
                 Some((ekey, _, loan)) if key == ekey => {
                     if loan != NoLoan {
-                        fail2!("TLS value cannot be overwritten because it is
+                        fail!("TLS value cannot be overwritten because it is
                                already borrowed as {}", loan.describe())
                     }
                     true
@@ -389,15 +389,15 @@ fn test_tls_modify() {
         static my_key: Key<@~str> = &Key;
         modify(my_key, |data| {
             match data {
-                Some(@ref val) => fail2!("unwelcome value: {}", *val),
+                Some(@ref val) => fail!("unwelcome value: {}", *val),
                 None           => Some(@~"first data")
             }
         });
         modify(my_key, |data| {
             match data {
                 Some(@~"first data") => Some(@~"next data"),
-                Some(@ref val)       => fail2!("wrong value: {}", *val),
-                None                 => fail2!("missing value")
+                Some(@ref val)       => fail!("wrong value: {}", *val),
+                None                 => fail!("missing value")
             }
         });
         assert!(*(pop(my_key).unwrap()) == ~"next data");
@@ -457,11 +457,11 @@ fn test_tls_cleanup_on_failure() {
             set(str_key, @~"string data");
             set(box_key, @@());
             set(int_key, @42);
-            fail2!();
+            fail!();
         }
         // Not quite nondeterministic.
         set(int_key, @31337);
-        fail2!();
+        fail!();
     }
 
     #[test]
index e99dcd6b2eb33b9e68231ea02d78f51bd055ebff..3103731a52faf110ece91a8e1f2eef962bf523c0 100644 (file)
@@ -820,7 +820,7 @@ impl num::ToStrRadix for f32 {
     fn to_str_radix(&self, rdx: uint) -> ~str {
         let (r, special) = strconv::float_to_str_common(
             *self, rdx, true, strconv::SignNeg, strconv::DigAll);
-        if special { fail2!("number has a special value, \
+        if special { fail!("number has a special value, \
                              try to_str_radix_special() if those are expected") }
         r
     }
index f367de376d418fbf8d38a5cd1384ce88bf0c516d..da8270703d72fff004d14f013d8f8d734a1e0a61 100644 (file)
@@ -868,7 +868,7 @@ impl num::ToStrRadix for f64 {
     fn to_str_radix(&self, rdx: uint) -> ~str {
         let (r, special) = strconv::float_to_str_common(
             *self, rdx, true, strconv::SignNeg, strconv::DigAll);
-        if special { fail2!("number has a special value, \
+        if special { fail!("number has a special value, \
                              try to_str_radix_special() if those are expected") }
         r
     }
index 0f253a26ccf1eeae30e9e0a6998585b091910704..d17c947ab5620398c78affd7810adb22816414b2 100644 (file)
@@ -473,19 +473,19 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Div<T,T>+
         ) -> Option<T> {
     match exponent {
         ExpDec if radix >= DIGIT_E_RADIX       // decimal exponent 'e'
-          => fail2!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {:?} incompatible with \
                     use of 'e' as decimal exponent", radix),
         ExpBin if radix >= DIGIT_P_RADIX       // binary exponent 'p'
-          => fail2!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {:?} incompatible with \
                     use of 'p' as binary exponent", radix),
         _ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
-          => fail2!("from_str_bytes_common: radix {:?} incompatible with \
+          => fail!("from_str_bytes_common: radix {:?} incompatible with \
                     special values 'inf' and 'NaN'", radix),
         _ if (radix as int) < 2
-          => fail2!("from_str_bytes_common: radix {:?} to low, \
+          => fail!("from_str_bytes_common: radix {:?} to low, \
                     must lie in the range [2, 36]", radix),
         _ if (radix as int) > 36
-          => fail2!("from_str_bytes_common: radix {:?} to high, \
+          => fail!("from_str_bytes_common: radix {:?} to high, \
                     must lie in the range [2, 36]", radix),
         _ => ()
     }
index cdff32a46dc7ad4f0b983fba821d4c7d99048c4d..732dbe64d015fb35db16acb6237f95cd3a947974 100644 (file)
@@ -244,7 +244,7 @@ pub fn mutate_default(&mut self, def: T, f: &fn(T) -> T) -> bool {
     pub fn get_ref<'a>(&'a self) -> &'a T {
         match *self {
             Some(ref x) => x,
-            None => fail2!("called `Option::get_ref()` on a `None` value"),
+            None => fail!("called `Option::get_ref()` on a `None` value"),
         }
     }
 
@@ -264,7 +264,7 @@ pub fn get_ref<'a>(&'a self) -> &'a T {
     pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T {
         match *self {
             Some(ref mut x) => x,
-            None => fail2!("called `Option::get_mut_ref()` on a `None` value"),
+            None => fail!("called `Option::get_mut_ref()` on a `None` value"),
         }
     }
 
@@ -286,7 +286,7 @@ pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T {
     pub fn unwrap(self) -> T {
         match self {
             Some(x) => x,
-            None => fail2!("called `Option::unwrap()` on a `None` value"),
+            None => fail!("called `Option::unwrap()` on a `None` value"),
         }
     }
 
@@ -299,7 +299,7 @@ pub fn unwrap(self) -> T {
     #[inline]
     pub fn take_unwrap(&mut self) -> T {
         if self.is_none() {
-            fail2!("called `Option::take_unwrap()` on a `None` value")
+            fail!("called `Option::take_unwrap()` on a `None` value")
         }
         self.take().unwrap()
     }
@@ -314,7 +314,7 @@ pub fn take_unwrap(&mut self) -> T {
     pub fn expect(self, reason: &str) -> T {
         match self {
             Some(val) => val,
-            None => fail2!("{}", reason.to_owned()),
+            None => fail!("{}", reason.to_owned()),
         }
     }
 
@@ -630,7 +630,7 @@ fn test_unwrap_fail1() {
 
     #[test]
     #[should_fail]
-    fn test_unwrap_fail2() {
+    fn test_unwrap_fail() {
         let x: Option<~str> = None;
         x.unwrap();
     }
index 41acd050a509089e2cc0f1d22d97716dd184128e..ba2b42c9b9c8b227d50c263ee1f88cf62ffdea79 100644 (file)
@@ -89,7 +89,7 @@ pub fn getcwd() -> Path {
     do buf.as_mut_buf |buf, len| {
         unsafe {
             if libc::getcwd(buf, len as size_t).is_null() {
-                fail2!()
+                fail!()
             }
 
             Path::new(CString::new(buf as *c_char, false))
@@ -106,7 +106,7 @@ pub fn getcwd() -> Path {
     do buf.as_mut_buf |buf, len| {
         unsafe {
             if libc::GetCurrentDirectoryW(len as DWORD, buf) == 0 as DWORD {
-                fail2!();
+                fail!();
             }
         }
     }
@@ -197,7 +197,7 @@ unsafe fn get_env_pairs() -> ~[~str] {
             };
             let ch = GetEnvironmentStringsA();
             if (ch as uint == 0) {
-                fail2!("os::env() failure getting env string from OS: {}",
+                fail!("os::env() failure getting env string from OS: {}",
                        os::last_os_error());
             }
             let result = str::raw::from_c_multistring(ch as *libc::c_char, None);
@@ -213,13 +213,13 @@ unsafe fn get_env_pairs() -> ~[~str] {
             }
             let environ = rust_env_pairs();
             if (environ as uint == 0) {
-                fail2!("os::env() failure getting env string from OS: {}",
+                fail!("os::env() failure getting env string from OS: {}",
                        os::last_os_error());
             }
             let mut result = ~[];
             ptr::array_each(environ, |e| {
                 let env_pair = str::raw::from_c_str(e);
-                debug2!("get_env_pairs: {}", env_pair);
+                debug!("get_env_pairs: {}", env_pair);
                 result.push(env_pair);
             });
             result
@@ -229,7 +229,7 @@ fn env_convert(input: ~[~str]) -> ~[(~str, ~str)] {
             let mut pairs = ~[];
             for p in input.iter() {
                 let vs: ~[&str] = p.splitn_iter('=', 1).collect();
-                debug2!("splitting: len: {}", vs.len());
+                debug!("splitting: len: {}", vs.len());
                 assert_eq!(vs.len(), 2);
                 pairs.push((vs[0].to_owned(), vs[1].to_owned()));
             }
@@ -767,14 +767,14 @@ unsafe fn get_list(p: &Path) -> ~[Path] {
                 fn rust_list_dir_val(ptr: *dirent_t) -> *libc::c_char;
             }
             let mut paths = ~[];
-            debug2!("os::list_dir -- BEFORE OPENDIR");
+            debug!("os::list_dir -- BEFORE OPENDIR");
 
             let dir_ptr = do p.with_c_str |buf| {
                 opendir(buf)
             };
 
             if (dir_ptr as uint != 0) {
-                debug2!("os::list_dir -- opendir() SUCCESS");
+                debug!("os::list_dir -- opendir() SUCCESS");
                 let mut entry_ptr = readdir(dir_ptr);
                 while (entry_ptr as uint != 0) {
                     let cstr = CString::new(rust_list_dir_val(entry_ptr), false);
@@ -784,9 +784,9 @@ unsafe fn get_list(p: &Path) -> ~[Path] {
                 closedir(dir_ptr);
             }
             else {
-                debug2!("os::list_dir -- opendir() FAILURE");
+                debug!("os::list_dir -- opendir() FAILURE");
             }
-            debug2!("os::list_dir -- AFTER -- \\#: {}", paths.len());
+            debug!("os::list_dir -- AFTER -- \\#: {}", paths.len());
             paths
         }
         #[cfg(windows)]
@@ -820,7 +820,7 @@ unsafe fn get_list(p: &Path) -> ~[Path] {
                     while more_files != 0 {
                         let fp_buf = rust_list_dir_wfd_fp_buf(wfd_ptr);
                         if fp_buf as uint == 0 {
-                            fail2!("os::list_dir() failure: got null ptr from wfd");
+                            fail!("os::list_dir() failure: got null ptr from wfd");
                         }
                         else {
                             let fp_vec = vec::from_buf(
@@ -1143,7 +1143,7 @@ fn __xpg_strerror_r(errnum: c_int,
         do buf.as_mut_buf |buf, len| {
             unsafe {
                 if strerror_r(errno() as c_int, buf, len as size_t) < 0 {
-                    fail2!("strerror_r failure");
+                    fail!("strerror_r failure");
                 }
 
                 str::raw::from_c_str(buf as *c_char)
@@ -1207,7 +1207,7 @@ fn FormatMessageW(flags: DWORD,
                                          len as DWORD,
                                          ptr::null());
                 if res == 0 {
-                    fail2!("[{}] FormatMessage failure", errno());
+                    fail!("[{}] FormatMessage failure", errno());
                 }
             }
 
@@ -1263,7 +1263,7 @@ fn real_args() -> ~[~str] {
 
     match rt::args::clone() {
         Some(args) => args,
-        None => fail2!("process arguments not initialized")
+        None => fail!("process arguments not initialized")
     }
 }
 
@@ -1508,10 +1508,10 @@ fn drop(&mut self) {
             match libc::munmap(self.data as *c_void, self.len) {
                 0 => (),
                 -1 => match errno() as c_int {
-                    libc::EINVAL => error2!("invalid addr or len"),
-                    e => error2!("unknown errno={}", e)
+                    libc::EINVAL => error!("invalid addr or len"),
+                    e => error!("unknown errno={}", e)
                 },
-                r => error2!("Unexpected result {}", r)
+                r => error!("Unexpected result {}", r)
             }
         }
     }
@@ -1639,15 +1639,15 @@ fn drop(&mut self) {
                     if libc::VirtualFree(self.data as *mut c_void,
                                          self.len,
                                          libc::MEM_RELEASE) == FALSE {
-                        error2!("VirtualFree failed: {}", errno());
+                        error!("VirtualFree failed: {}", errno());
                     }
                 },
                 MapFile(mapping) => {
                     if libc::UnmapViewOfFile(self.data as LPCVOID) == FALSE {
-                        error2!("UnmapViewOfFile failed: {}", errno());
+                        error!("UnmapViewOfFile failed: {}", errno());
                     }
                     if libc::CloseHandle(mapping as HANDLE) == FALSE {
-                        error2!("CloseHandle failed: {}", errno());
+                        error!("CloseHandle failed: {}", errno());
                     }
                 }
             }
@@ -1778,7 +1778,7 @@ mod tests {
 
     #[test]
     pub fn last_os_error() {
-        debug2!("{}", os::last_os_error());
+        debug!("{}", os::last_os_error());
     }
 
     #[test]
@@ -1833,7 +1833,7 @@ fn test_getenv_big() {
         }
         let n = make_rand_name();
         setenv(n, s);
-        debug2!("{}", s.clone());
+        debug!("{}", s.clone());
         assert_eq!(getenv(n), option::Some(s));
     }
 
@@ -1842,7 +1842,7 @@ fn test_self_exe_path() {
         let path = os::self_exe_path();
         assert!(path.is_some());
         let path = path.unwrap();
-        debug2!("{:?}", path.clone());
+        debug!("{:?}", path.clone());
 
         // Hard to test this function
         assert!(path.is_absolute());
@@ -1855,7 +1855,7 @@ fn test_env_getenv() {
         assert!(e.len() > 0u);
         for p in e.iter() {
             let (n, v) = (*p).clone();
-            debug2!("{:?}", n.clone());
+            debug!("{:?}", n.clone());
             let v2 = getenv(n);
             // MingW seems to set some funky environment variables like
             // "=C:=C:\MinGW\msys\1.0\bin" and "!::=::\" that are returned
@@ -1881,10 +1881,10 @@ fn test() {
         assert!((!Path::new("test-path").is_absolute()));
 
         let cwd = getcwd();
-        debug2!("Current working directory: {}", cwd.display());
+        debug!("Current working directory: {}", cwd.display());
 
-        debug2!("{:?}", make_absolute(&Path::new("test-path")));
-        debug2!("{:?}", make_absolute(&Path::new("/usr/bin")));
+        debug!("{:?}", make_absolute(&Path::new("test-path")));
+        debug!("{:?}", make_absolute(&Path::new("/usr/bin")));
     }
 
     #[test]
@@ -1949,7 +1949,7 @@ fn list_dir() {
         assert!(dirs.len() > 0u);
 
         for dir in dirs.iter() {
-            debug2!("{:?}", (*dir).clone());
+            debug!("{:?}", (*dir).clone());
         }
     }
 
@@ -1978,16 +1978,16 @@ fn path_is_dir() {
         let mut dirpath = os::tmpdir();
         dirpath.push(format!("rust-test-{}/test-\uac00\u4e00\u30fc\u4f60\u597d",
             rand::random::<u32>())); // ê°€ä¸€ãƒ¼ä½ å¥½
-        debug2!("path_is_dir dirpath: {}", dirpath.display());
+        debug!("path_is_dir dirpath: {}", dirpath.display());
 
         let mkdir_result = os::mkdir_recursive(&dirpath, (S_IRUSR | S_IWUSR | S_IXUSR) as i32);
-        debug2!("path_is_dir mkdir_result: {}", mkdir_result);
+        debug!("path_is_dir mkdir_result: {}", mkdir_result);
 
         assert!((os::path_is_dir(&dirpath)));
 
         let mut filepath = dirpath;
         filepath.push("unicode-file-\uac00\u4e00\u30fc\u4f60\u597d.rs");
-        debug2!("path_is_dir filepath: {}", filepath.display());
+        debug!("path_is_dir filepath: {}", filepath.display());
 
         open(&filepath, OpenOrCreate, Read); // ignore return; touch only
         assert!((!os::path_is_dir(&filepath)));
@@ -2048,7 +2048,7 @@ fn copy_file_ok() {
             let in_mode = input.get_mode();
             let rs = os::copy_file(&input, &out);
             if (!os::path_exists(&input)) {
-                fail2!("{} doesn't exist", input.display());
+                fail!("{} doesn't exist", input.display());
             }
             assert!((rs));
             // FIXME (#9639): This needs to handle non-utf8 paths
@@ -2076,7 +2076,7 @@ fn memory_map_rw() {
             os::MapWritable
         ]) {
             Ok(chunk) => chunk,
-            Err(msg) => fail2!(msg.to_str())
+            Err(msg) => fail!(msg.to_str())
         };
         assert!(chunk.len >= 16);
 
@@ -2133,7 +2133,7 @@ fn lseek_(fd: c_int, size: uint) {
             MapOffset(size / 2)
         ]) {
             Ok(chunk) => chunk,
-            Err(msg) => fail2!(msg.to_str())
+            Err(msg) => fail!(msg.to_str())
         };
         assert!(chunk.len > 0);
 
index 4962b63c8cff6aa6478bf0aed51dc2d3250e88a5..f71f67a30db84467c966c04e4d7de83b5e316157 100644 (file)
 
 ```rust
 let mut path = Path::new("/tmp/path");
-debug2!("path: {}", path.display());
+debug!("path: {}", path.display());
 path.set_filename("foo");
 path.push("bar");
-debug2!("new path: {}", path.display());
+debug!("new path: {}", path.display());
 let b = std::os::path_exists(&path);
-debug2!("path exists: {}", b);
+debug!("path exists: {}", b);
 ```
 
 */
index c27665d76985acacde8b3995ae3b4532c0912452..8803d39b0c67e3c5e41a468a908711bb2ca610e7 100644 (file)
@@ -236,16 +236,16 @@ pub fn to_mut_unsafe_ptr<T>(thing: &mut T) -> *mut T {
   SAFETY NOTE: Pointer-arithmetic. Dragons be here.
 */
 pub unsafe fn array_each_with_len<T>(arr: **T, len: uint, cb: &fn(*T)) {
-    debug2!("array_each_with_len: before iterate");
+    debug!("array_each_with_len: before iterate");
     if (arr as uint == 0) {
-        fail2!("ptr::array_each_with_len failure: arr input is null pointer");
+        fail!("ptr::array_each_with_len failure: arr input is null pointer");
     }
     //let start_ptr = *arr;
     for e in range(0, len) {
         let n = offset(arr, e as int);
         cb(*n);
     }
-    debug2!("array_each_with_len: after iterate");
+    debug!("array_each_with_len: after iterate");
 }
 
 /**
@@ -259,10 +259,10 @@ pub unsafe fn array_each_with_len<T>(arr: **T, len: uint, cb: &fn(*T)) {
 */
 pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
     if (arr as uint == 0) {
-        fail2!("ptr::array_each_with_len failure: arr input is null pointer");
+        fail!("ptr::array_each_with_len failure: arr input is null pointer");
     }
     let len = buf_len(arr);
-    debug2!("array_each inferred len: {}", len);
+    debug!("array_each inferred len: {}", len);
     array_each_with_len(arr, len, cb);
 }
 
@@ -669,7 +669,7 @@ fn test_ptr_array_each_with_len() {
                      let expected = do expected_arr[ctr].with_ref |buf| {
                          str::raw::from_c_str(buf)
                      };
-                     debug2!(
+                     debug!(
                          "test_ptr_array_each_with_len e: {}, a: {}",
                          expected, actual);
                      assert_eq!(actual, expected);
@@ -706,7 +706,7 @@ fn test_ptr_array_each() {
                      let expected = do expected_arr[ctr].with_ref |buf| {
                          str::raw::from_c_str(buf)
                      };
-                     debug2!(
+                     debug!(
                          "test_ptr_array_each e: {}, a: {}",
                          expected, actual);
                      assert_eq!(actual, expected);
index 954db42c89be1f7329d48323818f8cb13bc9371e..f5c60417bacb5c9344f64b745687f7d2ec060297 100644 (file)
@@ -175,7 +175,7 @@ fn fill_bytes(&mut self, dest: &mut [u8]) {
                 *b = (rand >> 8) as u8;
                 *c = (rand >> 16) as u8;
             }
-            _ => fail2!("Rng.fill_bytes: the impossible occurred: remaining != 1, 2 or 3")
+            _ => fail!("Rng.fill_bytes: the impossible occurred: remaining != 1, 2 or 3")
         }
     }
 
@@ -797,7 +797,7 @@ fn test_gen_f64() {
         let mut r = rng();
         let a = r.gen::<f64>();
         let b = r.gen::<f64>();
-        debug2!("{:?}", (a, b));
+        debug!("{:?}", (a, b));
     }
 
     #[test]
@@ -810,9 +810,9 @@ fn test_gen_weighted_bool() {
     #[test]
     fn test_gen_ascii_str() {
         let mut r = rng();
-        debug2!("{}", r.gen_ascii_str(10u));
-        debug2!("{}", r.gen_ascii_str(10u));
-        debug2!("{}", r.gen_ascii_str(10u));
+        debug!("{}", r.gen_ascii_str(10u));
+        debug!("{}", r.gen_ascii_str(10u));
+        debug!("{}", r.gen_ascii_str(10u));
         assert_eq!(r.gen_ascii_str(0u).len(), 0u);
         assert_eq!(r.gen_ascii_str(10u).len(), 10u);
         assert_eq!(r.gen_ascii_str(16u).len(), 16u);
index 961a5b2cd2869cdf49c652d7ff86118fcc772efa..f1e67da815e1700fb8cdbf3c6d16e6e9957bb149 100644 (file)
@@ -68,9 +68,9 @@ fn fill_bytes(&mut self, v: &mut [u8]) {
         if v.len() == 0 { return }
         match self.reader.read(v) {
             Some(n) if n == v.len() => return,
-            Some(n) => fail2!("ReaderRng.fill_bytes could not fill buffer: \
+            Some(n) => fail!("ReaderRng.fill_bytes could not fill buffer: \
                               read {} out of {} bytes.", n, v.len()),
-            None => fail2!("ReaderRng.fill_bytes reached eof.")
+            None => fail!("ReaderRng.fill_bytes reached eof.")
         }
     }
 }
index a788064293ff0378c6b32498d312203845a12a9c..4feb1ca19104b1ddf68c0535c443eaa28dff1681 100644 (file)
@@ -182,7 +182,7 @@ pub fn write_mut_qualifier(&mut self, mtbl: uint) {
         } else if mtbl == 1 {
             // skip, this is ast::m_imm
         } else {
-            fail2!("invalid mutability value");
+            fail!("invalid mutability value");
         }
     }
 
@@ -294,7 +294,7 @@ fn visit_estr_slice(&mut self) -> bool {
 
     // Type no longer exists, vestigial function.
     fn visit_estr_fixed(&mut self, _n: uint, _sz: uint,
-                        _align: uint) -> bool { fail2!(); }
+                        _align: uint) -> bool { fail!(); }
 
     fn visit_box(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         self.writer.write(['@' as u8]);
@@ -337,7 +337,7 @@ fn visit_rptr(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
     }
 
     // Type no longer exists, vestigial function.
-    fn visit_vec(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { fail2!(); }
+    fn visit_vec(&mut self, _mtbl: uint, _inner: *TyDesc) -> bool { fail!(); }
 
     fn visit_unboxed_vec(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
         do self.get::<raw::Vec<()>> |this, b| {
@@ -552,7 +552,7 @@ fn visit_leave_enum(&mut self,
                         _align: uint)
                         -> bool {
         match self.var_stk.pop() {
-            SearchingFor(*) => fail2!("enum value matched no variant"),
+            SearchingFor(*) => fail!("enum value matched no variant"),
             _ => true
         }
     }
index 92315b5d47a26d7f4f82f1268a346d082be97e41..957ba4a04389317456f9e52b231dc01faf712a8d 100644 (file)
@@ -47,7 +47,7 @@ impl<T, E: ToStr> Result<T, E> {
     pub fn get_ref<'a>(&'a self) -> &'a T {
         match *self {
             Ok(ref t) => t,
-            Err(ref e) => fail2!("called `Result::get_ref()` on `Err` value: {}",
+            Err(ref e) => fail!("called `Result::get_ref()` on `Err` value: {}",
                                  e.to_str()),
         }
     }
@@ -108,7 +108,7 @@ pub fn iter_err<'r>(&'r self) -> OptionIterator<&'r E> {
     pub fn unwrap(self) -> T {
         match self {
             Ok(t) => t,
-            Err(e) => fail2!("called `Result::unwrap()` on `Err` value: {}",
+            Err(e) => fail!("called `Result::unwrap()` on `Err` value: {}",
                              e.to_str()),
         }
     }
@@ -126,7 +126,7 @@ pub fn unwrap_err(self) -> E {
     pub fn expect(self, reason: &str) -> T {
         match self {
             Ok(t) => t,
-            Err(_) => fail2!("{}", reason.to_owned()),
+            Err(_) => fail!("{}", reason.to_owned()),
         }
     }
 
@@ -136,7 +136,7 @@ pub fn expect(self, reason: &str) -> T {
     pub fn expect_err(self, reason: &str) -> E {
         match self {
             Err(e) => e,
-            Ok(_) => fail2!("{}", reason.to_owned()),
+            Ok(_) => fail!("{}", reason.to_owned()),
         }
     }
 
@@ -571,7 +571,7 @@ fn test_collect() {
                    Err(2));
 
         // test that it does not take more elements than it needs
-        let functions = [|| Ok(()), || Err(1), || fail2!()];
+        let functions = [|| Ok(()), || Err(1), || fail!()];
 
         assert_eq!(collect(functions.iter().map(|f| (*f)())),
                    Err(1));
@@ -591,7 +591,7 @@ fn test_fold() {
                    Err(2));
 
         // test that it does not take more elements than it needs
-        let functions = [|| Ok(()), || Err(1), || fail2!()];
+        let functions = [|| Ok(()), || Err(1), || fail!()];
 
         assert_eq!(fold_(functions.iter()
                         .map(|f| (*f)())),
index 315de4b9af38336bb9851474ebdc43e324905b9c..24143ba040ba74e3f4a48d00af93ecf310750cdf 100644 (file)
@@ -163,14 +163,14 @@ pub fn cleanup() {
     }
 
     pub fn take() -> Option<~[~str]> {
-        fail2!()
+        fail!()
     }
 
     pub fn put(_args: ~[~str]) {
-        fail2!()
+        fail!()
     }
 
     pub fn clone() -> Option<~[~str]> {
-        fail2!()
+        fail!()
     }
 }
index 3e3431b32c97f0fa69bf705eb591cc7452375d78..4eae8bdc9a8224f9dfbcaa6038da3b9117803375 100644 (file)
@@ -196,7 +196,7 @@ pub fn recv(self) -> T {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail2!("receiving on closed channel");
+                fail!("receiving on closed channel");
             }
         }
     }
@@ -495,7 +495,7 @@ fn recv(&self) -> T {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail2!("receiving on closed channel");
+                fail!("receiving on closed channel");
             }
         }
     }
@@ -650,7 +650,7 @@ fn recv(&self) -> T {
         match self.try_recv() {
             Some(val) => val,
             None => {
-                fail2!("receiving on a closed channel");
+                fail!("receiving on a closed channel");
             }
         }
     }
index 96a0069e851568a7b27f16dfeb8d505ad7a9c5ea..d33e1af90f8d0adaf4e9d3dfecec07a281701352 100644 (file)
@@ -93,7 +93,7 @@ fn do_iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: &fn(&ModEntry),
                     do_iter_crate_map(*child, |x| f(x), visited);
                 }
             },
-            _ => fail2!("invalid crate map version")
+            _ => fail!("invalid crate map version")
         }
     }
 }
index 495d1f97cd2bafd71f51f0e6e5e8e4c364524ad5..06424fee8bc121831a71eb2aeb5afd69a8240f75 100644 (file)
 struct PortReader<P>;
 
 impl<P: GenericPort<~[u8]>> PortReader<P> {
-    pub fn new(_port: P) -> PortReader<P> { fail2!() }
+    pub fn new(_port: P) -> PortReader<P> { fail!() }
 }
 
 impl<P: GenericPort<~[u8]>> Reader for PortReader<P> {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 struct ChanWriter<C>;
 
 impl<C: GenericChan<~[u8]>> ChanWriter<C> {
-    pub fn new(_chan: C) -> ChanWriter<C> { fail2!() }
+    pub fn new(_chan: C) -> ChanWriter<C> { fail!() }
 }
 
 impl<C: GenericChan<~[u8]>> Writer for ChanWriter<C> {
-    fn write(&mut self, _buf: &[u8]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 struct ReaderPort<R>;
 
 impl<R: Reader> ReaderPort<R> {
-    pub fn new(_reader: R) -> ReaderPort<R> { fail2!() }
+    pub fn new(_reader: R) -> ReaderPort<R> { fail!() }
 }
 
 impl<R: Reader> GenericPort<~[u8]> for ReaderPort<R> {
-    fn recv(&self) -> ~[u8] { fail2!() }
+    fn recv(&self) -> ~[u8] { fail!() }
 
-    fn try_recv(&self) -> Option<~[u8]> { fail2!() }
+    fn try_recv(&self) -> Option<~[u8]> { fail!() }
 }
 
 struct WriterChan<W>;
 
 impl<W: Writer> WriterChan<W> {
-    pub fn new(_writer: W) -> WriterChan<W> { fail2!() }
+    pub fn new(_writer: W) -> WriterChan<W> { fail!() }
 }
 
 impl<W: Writer> GenericChan<~[u8]> for WriterChan<W> {
-    fn send(&self, _x: ~[u8]) { fail2!() }
+    fn send(&self, _x: ~[u8]) { fail!() }
 }
index 69f0423bf5d37aa038c1f78535318413623a246e..99634b532b082c6962d27f05cc09cf3dfa237ddd 100644 (file)
@@ -288,7 +288,7 @@ fn read_byte(&mut self) -> Option<u8> {
         let mut buf = [0];
         match self.read(buf) {
             Some(0) => {
-                debug2!("read 0 bytes. trying again");
+                debug!("read 0 bytes. trying again");
                 self.read_byte()
             }
             Some(1) => Some(buf[0]),
index 39c3c5692f8a2ca67bbc30ab74cc19dec43ce702..a5d593d2454da691f47e3f26633a3568a955d874 100644 (file)
@@ -59,7 +59,7 @@
 ///     }).inside {
 ///         let stream = match open(p, Create, ReadWrite) {
 ///             Some(s) => s,
-///             None => fail2!("whoops! I'm sure this raised, anyways..");
+///             None => fail!("whoops! I'm sure this raised, anyways..");
 ///         }
 ///         // do some stuff with that stream
 ///
@@ -223,7 +223,7 @@ pub fn rmdir<P: PathLike>(path: &P) {
 ///     }).inside {
 ///         let info = match stat(p) {
 ///             Some(s) => s,
-///             None => fail2!("whoops! I'm sure this raised, anyways..");
+///             None => fail!("whoops! I'm sure this raised, anyways..");
 ///         }
 ///         if stat.is_file {
 ///             // just imagine the possibilities ...
@@ -271,7 +271,7 @@ pub fn stat<P: PathLike>(path: &P) -> Option<FileStat> {
 ///                 else { cb(entry); }
 ///             }
 ///         }
-///         else { fail2!("nope"); }
+///         else { fail!("nope"); }
 ///     }
 ///
 /// # Errors
@@ -596,7 +596,7 @@ impl FileInfo for Path { }
 ///             else { cb(entry); }
 ///         }
 ///     }
-///     else { fail2!("nope"); }
+///     else { fail!("nope"); }
 /// }
 /// ```
 pub trait DirectoryInfo : FileSystemInfo {
@@ -713,7 +713,7 @@ fn file_test_io_smoke_test() {
                 let mut read_stream = open(filename, Open, Read).unwrap();
                 let mut read_buf = [0, .. 1028];
                 let read_str = match read_stream.read(read_buf).unwrap() {
-                    -1|0 => fail2!("shouldn't happen"),
+                    -1|0 => fail!("shouldn't happen"),
                     n => str::from_utf8(read_buf.slice_to(n))
                 };
                 assert!(read_str == message.to_owned());
@@ -881,7 +881,7 @@ fn file_test_stat_is_correct_on_is_file() {
             }
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             };
             assert!(stat_res.is_file);
             unlink(filename);
@@ -895,7 +895,7 @@ fn file_test_stat_is_correct_on_is_dir() {
             mkdir(filename);
             let stat_res = match stat(filename) {
                 Some(s) => s,
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             };
             assert!(stat_res.is_dir);
             rmdir(filename);
@@ -964,7 +964,7 @@ fn file_test_directoryinfo_readdir() {
                             r.read(mem);
                             let read_str = str::from_utf8(mem);
                             let expected = match n {
-                                None|Some("") => fail2!("really shouldn't happen.."),
+                                None|Some("") => fail!("really shouldn't happen.."),
                                 Some(n) => prefix+n
                             };
                             assert!(expected == read_str);
@@ -972,7 +972,7 @@ fn file_test_directoryinfo_readdir() {
                         f.unlink();
                     }
                 },
-                None => fail2!("shouldn't happen")
+                None => fail!("shouldn't happen")
             }
             dir.rmdir();
         }
index 72029d07263e316a87d030f0614568a9c5fea0f3..7c72ce6ba891ea13e107f5711d41eb351589d6d9 100644 (file)
@@ -29,9 +29,9 @@ pub fn new(inner_writer: W) -> DeflateWriter<W> {
 }
 
 impl<W: Writer> Writer for DeflateWriter<W> {
-    fn write(&mut self, _buf: &[u8]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 impl<W: Writer> Decorator<W> for DeflateWriter<W> {
@@ -68,9 +68,9 @@ pub fn new(inner_reader: R) -> InflateReader<R> {
 }
 
 impl<R: Reader> Reader for InflateReader<R> {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl<R: Reader> Decorator<R> for InflateReader<R> {
index 1f396a4476e1e61f7484c017b20601ab9d40a1b9..5f6b4398c22f72be83aac931ab8fba5191b05e64 100644 (file)
@@ -40,7 +40,7 @@ fn flush(&mut self) { /* no-op */ }
 impl Seek for MemWriter {
     fn tell(&self) -> u64 { self.buf.len() as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 impl Decorator<~[u8]> for MemWriter {
@@ -102,7 +102,7 @@ fn eof(&mut self) -> bool { self.pos == self.buf.len() }
 impl Seek for MemReader {
     fn tell(&self) -> u64 { self.pos as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 impl Decorator<~[u8]> for MemReader {
@@ -143,15 +143,15 @@ pub fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> {
 }
 
 impl<'self> Writer for BufWriter<'self> {
-    fn write(&mut self, _buf: &[u8]) { fail2!() }
+    fn write(&mut self, _buf: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 impl<'self> Seek for BufWriter<'self> {
-    fn tell(&self) -> u64 { fail2!() }
+    fn tell(&self) -> u64 { fail!() }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 
@@ -193,7 +193,7 @@ fn eof(&mut self) -> bool { self.pos == self.buf.len() }
 impl<'self> Seek for BufReader<'self> {
     fn tell(&self) -> u64 { self.pos as u64 }
 
-    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail2!() }
+    fn seek(&mut self, _pos: i64, _style: SeekStyle) { fail!() }
 }
 
 ///Calls a function with a MemWriter and returns
index d505c97ba0f9d6ff7ac42fe707422ebec27dc9eb..c0971b5d3cd5d3f7d50c09782a19835a16fd40dc 100644 (file)
@@ -611,7 +611,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
                 detail: None
             }
         }
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
index dc8d34d1b11058c5cd2a6654b38ddaa78ab779d9..d682098118172fa2f09ca4368f38138519fe0f4b 100644 (file)
@@ -241,7 +241,7 @@ fn test_file_desc() {
                     assert_eq!(buf[2], 's' as u8);
                     assert_eq!(buf[3], 't' as u8);
                 }
-                r => fail2!("invalid read: {:?}", r)
+                r => fail!("invalid read: {:?}", r)
             }
 
             let mut raised = false;
@@ -276,7 +276,7 @@ fn test_cfile() {
                     assert_eq!(buf[2], 's' as u8);
                     assert_eq!(buf[3], 't' as u8);
                 }
-                r => fail2!("invalid read: {:?}", r)
+                r => fail!("invalid read: {:?}", r)
             }
         }
     }
index 57367beacd833c19dfd09ff8aa109f30928fb2e5..91fff6d92630b802a26d0c5f1d1ec88eb7324810 100644 (file)
@@ -124,7 +124,7 @@ pub fn id(&self) -> pid_t { self.pid }
     pub fn input<'a>(&'a mut self) -> &'a mut io::Writer {
         match self.input {
             Some(ref mut fd) => fd as &mut io::Writer,
-            None => fail2!("This process has no stdin")
+            None => fail!("This process has no stdin")
         }
     }
 
@@ -138,7 +138,7 @@ pub fn input<'a>(&'a mut self) -> &'a mut io::Writer {
     pub fn output<'a>(&'a mut self) -> &'a mut io::Reader {
         match self.input {
             Some(ref mut fd) => fd as &mut io::Reader,
-            None => fail2!("This process has no stdout")
+            None => fail!("This process has no stdout")
         }
     }
 
@@ -152,7 +152,7 @@ pub fn output<'a>(&'a mut self) -> &'a mut io::Reader {
     pub fn error<'a>(&'a mut self) -> &'a mut io::Reader {
         match self.error {
             Some(ref mut fd) => fd as &mut io::Reader,
-            None => fail2!("This process has no stderr")
+            None => fail!("This process has no stderr")
         }
     }
 
@@ -283,29 +283,29 @@ fn spawn_process_os(prog: &str, args: &[~str],
 
         let orig_std_in = get_osfhandle(in_fd) as HANDLE;
         if orig_std_in == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_in, cur_proc, &mut si.hStdInput,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let orig_std_out = get_osfhandle(out_fd) as HANDLE;
         if orig_std_out == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_out, cur_proc, &mut si.hStdOutput,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let orig_std_err = get_osfhandle(err_fd) as HANDLE;
         if orig_std_err == INVALID_HANDLE_VALUE as HANDLE {
-            fail2!("failure in get_osfhandle: {}", os::last_os_error());
+            fail!("failure in get_osfhandle: {}", os::last_os_error());
         }
         if DuplicateHandle(cur_proc, orig_std_err, cur_proc, &mut si.hStdError,
                            0, TRUE, DUPLICATE_SAME_ACCESS) == FALSE {
-            fail2!("failure in DuplicateHandle: {}", os::last_os_error());
+            fail!("failure in DuplicateHandle: {}", os::last_os_error());
         }
 
         let cmd = make_command_line(prog, args);
@@ -330,7 +330,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
         CloseHandle(si.hStdError);
 
         for msg in create_err.iter() {
-            fail2!("failure in CreateProcess: {}", *msg);
+            fail!("failure in CreateProcess: {}", *msg);
         }
 
         // We close the thread handle because we don't care about keeping the
@@ -471,7 +471,7 @@ unsafe fn set_environ(envp: *c_void) {
 
         let pid = fork();
         if pid < 0 {
-            fail2!("failure in fork: {}", os::last_os_error());
+            fail!("failure in fork: {}", os::last_os_error());
         } else if pid > 0 {
             return SpawnProcessResult {pid: pid, handle: ptr::null()};
         }
@@ -479,13 +479,13 @@ unsafe fn set_environ(envp: *c_void) {
         rustrt::rust_unset_sigprocmask();
 
         if dup2(in_fd, 0) == -1 {
-            fail2!("failure in dup2(in_fd, 0): {}", os::last_os_error());
+            fail!("failure in dup2(in_fd, 0): {}", os::last_os_error());
         }
         if dup2(out_fd, 1) == -1 {
-            fail2!("failure in dup2(out_fd, 1): {}", os::last_os_error());
+            fail!("failure in dup2(out_fd, 1): {}", os::last_os_error());
         }
         if dup2(err_fd, 2) == -1 {
-            fail2!("failure in dup3(err_fd, 2): {}", os::last_os_error());
+            fail!("failure in dup3(err_fd, 2): {}", os::last_os_error());
         }
         // close all other fds
         for fd in range(3, getdtablesize()).invert() {
@@ -494,7 +494,7 @@ unsafe fn set_environ(envp: *c_void) {
 
         do with_dirp(dir) |dirp| {
             if !dirp.is_null() && chdir(dirp) == -1 {
-                fail2!("failure in chdir: {}", os::last_os_error());
+                fail!("failure in chdir: {}", os::last_os_error());
             }
         }
 
@@ -505,7 +505,7 @@ unsafe fn set_environ(envp: *c_void) {
             do with_argv(prog, args) |argv| {
                 execvp(*argv, argv);
                 // execvp only returns if an error occurred
-                fail2!("failure in execvp: {}", os::last_os_error());
+                fail!("failure in execvp: {}", os::last_os_error());
             }
         }
     }
@@ -651,14 +651,14 @@ fn waitpid_os(pid: pid_t) -> int {
 
             let proc = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, FALSE, pid as DWORD);
             if proc.is_null() {
-                fail2!("failure in OpenProcess: {}", os::last_os_error());
+                fail!("failure in OpenProcess: {}", os::last_os_error());
             }
 
             loop {
                 let mut status = 0;
                 if GetExitCodeProcess(proc, &mut status) == FALSE {
                     CloseHandle(proc);
-                    fail2!("failure in GetExitCodeProcess: {}", os::last_os_error());
+                    fail!("failure in GetExitCodeProcess: {}", os::last_os_error());
                 }
                 if status != STILL_ACTIVE {
                     CloseHandle(proc);
@@ -666,7 +666,7 @@ fn waitpid_os(pid: pid_t) -> int {
                 }
                 if WaitForSingleObject(proc, INFINITE) == WAIT_FAILED {
                     CloseHandle(proc);
-                    fail2!("failure in WaitForSingleObject: {}", os::last_os_error());
+                    fail!("failure in WaitForSingleObject: {}", os::last_os_error());
                 }
             }
         }
@@ -704,7 +704,7 @@ fn WEXITSTATUS(status: i32) -> i32 {
 
         let mut status = 0 as c_int;
         if unsafe { waitpid(pid, &mut status, 0) } == -1 {
-            fail2!("failure in waitpid: {}", os::last_os_error());
+            fail!("failure in waitpid: {}", os::last_os_error());
         }
 
         return if WIFEXITED(status) {
index 3b894b9d3319338d242c8abe358cfb9cd764f10e..f29e17cfc2f3d127152f16b9d66be1874e690fd0 100644 (file)
@@ -84,7 +84,7 @@ fn read(&mut self, buf: &mut [u8]) -> Option<uint> {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for TcpStream {
@@ -324,7 +324,7 @@ fn read_eof_twice_ip4() {
                     if cfg!(windows) {
                         assert_eq!(e.kind, NotConnected);
                     } else {
-                        fail2!();
+                        fail!();
                     }
                 }).inside {
                     let nread = stream.read(buf);
@@ -359,7 +359,7 @@ fn read_eof_twice_ip6() {
                     if cfg!(windows) {
                         assert_eq!(e.kind, NotConnected);
                     } else {
-                        fail2!();
+                        fail!();
                     }
                 }).inside {
                     let nread = stream.read(buf);
index 2f9babf57896ae82f198b547454fbdffba8c44ce..27faae0838b15d2383e8564bb3b3c6d04c6c9a02 100644 (file)
@@ -94,7 +94,7 @@ fn read(&mut self, buf: &mut [u8]) -> Option<uint> {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for UdpStream {
@@ -104,7 +104,7 @@ fn write(&mut self, buf: &[u8]) {
         }
     }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 #[cfg(test)]
@@ -153,10 +153,10 @@ fn socket_smoke_test_ip4() {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -166,7 +166,7 @@ fn socket_smoke_test_ip4() {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -192,10 +192,10 @@ fn socket_smoke_test_ip6() {
                                 assert_eq!(buf[0], 99);
                                 assert_eq!(src, client_ip);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -205,7 +205,7 @@ fn socket_smoke_test_ip6() {
                         port.take().recv();
                         client.sendto([99], server_ip)
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -232,10 +232,10 @@ fn stream_smoke_test_ip4() {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -247,7 +247,7 @@ fn stream_smoke_test_ip4() {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
@@ -274,10 +274,10 @@ fn stream_smoke_test_ip6() {
                                 assert_eq!(nread, 1);
                                 assert_eq!(buf[0], 99);
                             }
-                            None => fail2!()
+                            None => fail!()
                         }
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
 
@@ -289,7 +289,7 @@ fn stream_smoke_test_ip6() {
                         port.take().recv();
                         stream.write([99]);
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             }
         }
index 07de33935ee2a6a9b7581dba8450fb3051fe2805..1771a963ba78cdf6dacb6b49aa3bf905e37eed84 100644 (file)
 
 impl UnixStream {
     pub fn connect<P: PathLike>(_path: &P) -> Option<UnixStream> {
-        fail2!()
+        fail!()
     }
 }
 
 impl Reader for UnixStream {
-    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail2!() }
+    fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for UnixStream {
-    fn write(&mut self, _v: &[u8]) { fail2!() }
+    fn write(&mut self, _v: &[u8]) { fail!() }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
 
 pub struct UnixListener;
 
 impl UnixListener {
     pub fn bind<P: PathLike>(_path: &P) -> Option<UnixListener> {
-        fail2!()
+        fail!()
     }
 }
 
 impl Listener<UnixStream, UnixAcceptor> for UnixListener {
-    fn listen(self) -> Option<UnixAcceptor> { fail2!() }
+    fn listen(self) -> Option<UnixAcceptor> { fail!() }
 }
 
 pub struct UnixAcceptor;
 
 impl Acceptor<UnixStream> for UnixAcceptor {
-    fn accept(&mut self) -> Option<UnixStream> { fail2!() }
+    fn accept(&mut self) -> Option<UnixStream> { fail!() }
 }
index 251795ab238f52cf581468aeeeefa843bc7ccff9..d2cd531ed266fd99c631e6e216844f958c016b4e 100644 (file)
@@ -64,7 +64,7 @@ fn read(&mut self, buf: &mut [u8]) -> Option<uint> {
         }
     }
 
-    fn eof(&mut self) -> bool { fail2!() }
+    fn eof(&mut self) -> bool { fail!() }
 }
 
 impl Writer for PipeStream {
@@ -77,5 +77,5 @@ fn write(&mut self, buf: &[u8]) {
         }
     }
 
-    fn flush(&mut self) { fail2!() }
+    fn flush(&mut self) { fail!() }
 }
index 6043ae318fec56d622751fd667e3331e7e902396..8029e3f643175507277a6c50780a1cde87c80bbb 100644 (file)
@@ -403,7 +403,7 @@ pub fn inhibit_kill(&mut self, already_failing: bool) {
         // FIXME(#7544)(bblum): is it really necessary to prohibit double kill?
         match inner.unkillable.compare_and_swap(KILL_RUNNING, KILL_UNKILLABLE, Relaxed) {
             KILL_RUNNING    => { }, // normal case
-            KILL_KILLED     => if !already_failing { fail2!("{}", KILLED_MSG) },
+            KILL_KILLED     => if !already_failing { fail!("{}", KILLED_MSG) },
             _               => rtabort!("inhibit_kill: task already unkillable"),
         }
     }
@@ -416,7 +416,7 @@ pub fn allow_kill(&mut self, already_failing: bool) {
         // FIXME(#7544)(bblum): is it really necessary to prohibit double kill?
         match inner.unkillable.compare_and_swap(KILL_UNKILLABLE, KILL_RUNNING, Relaxed) {
             KILL_UNKILLABLE => { }, // normal case
-            KILL_KILLED     => if !already_failing { fail2!("{}", KILLED_MSG) },
+            KILL_KILLED     => if !already_failing { fail!("{}", KILLED_MSG) },
             _               => rtabort!("allow_kill: task already killable"),
         }
     }
@@ -624,7 +624,7 @@ pub fn check_killed(&self, already_failing: bool) {
                 // synchronization during unwinding or cleanup (for example,
                 // sending on a notify port). In that case failing won't help.
                 if self.unkillable == 0 && (!already_failing) && kill_handle.killed() {
-                    fail2!("{}", KILLED_MSG);
+                    fail!("{}", KILLED_MSG);
                 },
             // This may happen during task death (see comments in collect_failure).
             None => rtassert!(self.unkillable > 0),
@@ -650,7 +650,7 @@ pub fn allow_kill(&mut self, already_failing: bool) {
         if self.unkillable == 0 {
             // we need to decrement the counter before failing.
             self.unkillable -= 1;
-            fail2!("Cannot enter a rekillable() block without a surrounding unkillable()");
+            fail!("Cannot enter a rekillable() block without a surrounding unkillable()");
         }
         self.unkillable -= 1;
         if self.unkillable == 0 {
index 93ac308df3a24eb1dfa42f9f2e673a92e1fc1b2b..336d2518e437c82941c8e90cf28819cdd421b70e 100644 (file)
@@ -1292,12 +1292,12 @@ fn roundtrip(id: int, n_tasks: int,
             while (true) {
                 match p.recv() {
                     (1, end_chan) => {
-                                debug2!("{}\n", id);
+                                debug!("{}\n", id);
                                 end_chan.send(());
                                 return;
                     }
                     (token, end_chan) => {
-                        debug2!("thread: {}   got token: {}", id, token);
+                        debug!("thread: {}   got token: {}", id, token);
                         ch.send((token - 1, end_chan));
                         if token <= n_tasks {
                             return;
index 28c38ac9b53cc72dc6339ff59c8d260515447ed5..a6f9e11e40e9e2ed68b8f75eaad48226f4c47db6 100644 (file)
@@ -626,7 +626,7 @@ fn unwind() {
             let result = spawntask_try(||());
             rtdebug!("trying first assert");
             assert!(result.is_ok());
-            let result = spawntask_try(|| fail2!());
+            let result = spawntask_try(|| fail!());
             rtdebug!("trying second assert");
             assert!(result.is_err());
         }
@@ -644,7 +644,7 @@ fn rng() {
     #[test]
     fn logging() {
         do run_in_newsched_task() {
-            info2!("here i am. logging in a newsched task");
+            info!("here i am. logging in a newsched task");
         }
     }
 
@@ -686,7 +686,7 @@ fn comm_shared_chan() {
     fn linked_failure() {
         do run_in_newsched_task() {
             let res = do spawntask_try {
-                spawntask_random(|| fail2!());
+                spawntask_random(|| fail!());
             };
             assert!(res.is_err());
         }
index 9f4e6558ac598a19178bb6c22138198f3184a559..4f7ebb4a72195954e71d0ecb30f97be9a2d2725f 100644 (file)
@@ -115,7 +115,7 @@ pub unsafe fn raise_fd_limit() {
                   to_mut_unsafe_ptr(&mut size),
                   mut_null(), 0) != 0 {
             let err = last_os_error();
-            error2!("raise_fd_limit: error calling sysctl: {}", err);
+            error!("raise_fd_limit: error calling sysctl: {}", err);
             return;
         }
 
@@ -123,7 +123,7 @@ pub unsafe fn raise_fd_limit() {
         let mut rlim = rlimit{rlim_cur: 0, rlim_max: 0};
         if getrlimit(RLIMIT_NOFILE, to_mut_unsafe_ptr(&mut rlim)) != 0 {
             let err = last_os_error();
-            error2!("raise_fd_limit: error calling getrlimit: {}", err);
+            error!("raise_fd_limit: error calling getrlimit: {}", err);
             return;
         }
 
@@ -133,7 +133,7 @@ pub unsafe fn raise_fd_limit() {
         // Set our newly-increased resource limit
         if setrlimit(RLIMIT_NOFILE, to_unsafe_ptr(&rlim)) != 0 {
             let err = last_os_error();
-            error2!("raise_fd_limit: error calling setrlimit: {}", err);
+            error!("raise_fd_limit: error calling setrlimit: {}", err);
             return;
         }
     }
index cb5054626d4c494f0a3424d7bfa174c1f1a38326..3a6d858df791cbfa2abd9a87162e30988ba12f2b 100644 (file)
@@ -505,7 +505,7 @@ fn file_test_full_simple_sync() {
                 let unlink_req = FsRequest::new();
                 let result = unlink_req.unlink_sync(&loop_, &Path::new(path_str));
                 assert!(result.is_ok());
-            } else { fail2!("nread was 0.. wudn't expectin' that."); }
+            } else { fail!("nread was 0.. wudn't expectin' that."); }
             loop_.close();
         }
     }
index 2c27db982aa3100a53652a226b13778eb525093a..a2608bf6b2406be50c1c5a0c1a020b7d43b6781b 100644 (file)
@@ -34,7 +34,7 @@ fn sockaddr_to_UvSocketAddr(addr: *uvll::sockaddr) -> UvSocketAddr {
         match addr {
             _ if is_ip4_addr(addr) => UvIpv4SocketAddr(addr as *uvll::sockaddr_in),
             _ if is_ip6_addr(addr) => UvIpv6SocketAddr(addr as *uvll::sockaddr_in6),
-            _ => fail2!(),
+            _ => fail!(),
         }
     }
 }
index 0d32efbba883de67179e66ca3899a4eff2943038..a406058631823779049167d46456dc662da23080 100644 (file)
@@ -229,7 +229,7 @@ fn read_everything(r: &mut io::Reader) -> ~[u8] {
             ((1, o), (2, e)) => (e, o),
             ((2, e), (1, o)) => (e, o),
             ((x, _), (y, _)) => {
-                fail2!("unexpected file numbers: {}, {}", x, y);
+                fail!("unexpected file numbers: {}, {}", x, y);
             }
         };
 
index 8ce23f4b53b276fbd9b60227771f87d9122bcd3d..62a09984794978671703af45600f3d73cec8b3de 100644 (file)
@@ -35,7 +35,7 @@ pub trait SelectPort<T> : SelectPortInner<T> { }
 /// port whose data is ready. (If multiple are ready, returns the lowest index.)
 pub fn select<A: Select>(ports: &mut [A]) -> uint {
     if ports.is_empty() {
-        fail2!("can't select on an empty list");
+        fail!("can't select on an empty list");
     }
 
     for (index, port) in ports.mut_iter().enumerate() {
@@ -116,7 +116,7 @@ pub fn select2<TA, A: SelectPort<TA>, TB, B: SelectPort<TB>>(mut a: A, mut b: B)
     match result {
         0 => Left ((a.recv_ready(), b)),
         1 => Right((a, b.recv_ready())),
-        x => fail2!("impossible case in select2: {:?}", x)
+        x => fail!("impossible case in select2: {:?}", x)
     }
 }
 
@@ -335,7 +335,7 @@ fn select_killed() {
                         let _ = dead_cs;
                     }
                     do task::spawn {
-                        fail2!(); // should kill sibling awake
+                        fail!(); // should kill sibling awake
                     }
 
                     // wait for killed selector to close (NOT send on) its c.
index 9d2f60fc27cbf42bb3ccc0547d36f28ad7498ca8..883934124a6c3bcc8c14d8fe0f8accfd562031b7 100644 (file)
@@ -1229,7 +1229,7 @@ fn test_str_multistring_parsing() {
                 match ctr {
                     0 => assert_eq!(x, &~"zero"),
                     1 => assert_eq!(x, &~"one"),
-                    _ => fail2!("shouldn't happen!")
+                    _ => fail!("shouldn't happen!")
                 }
                 ctr += 1;
             }
@@ -2001,8 +2001,8 @@ fn slice_chars(&self, begin: uint, end: uint) -> &'self str {
         if end_byte.is_none() && count == end { end_byte = Some(self.len()) }
 
         match (begin_byte, end_byte) {
-            (None, _) => fail2!("slice_chars: `begin` is beyond end of string"),
-            (_, None) => fail2!("slice_chars: `end` is beyond end of string"),
+            (None, _) => fail!("slice_chars: `begin` is beyond end of string"),
+            (_, None) => fail!("slice_chars: `end` is beyond end of string"),
             (Some(a), Some(b)) => unsafe { raw::slice_bytes(*self, a, b) }
         }
     }
@@ -3246,7 +3246,7 @@ fn test_as_bytes_fail() {
         // original problem code path anymore.)
         let s = ~"";
         let _bytes = s.as_bytes();
-        fail2!();
+        fail!();
     }
 
     #[test]
@@ -3304,8 +3304,8 @@ fn vec_str_conversions() {
         while i < n1 {
             let a: u8 = s1[i];
             let b: u8 = s2[i];
-            debug2!("{}", a);
-            debug2!("{}", b);
+            debug!("{}", a);
+            debug!("{}", b);
             assert_eq!(a, b);
             i += 1u;
         }
index 51b1ab603ed55343751856aa8d24d4fa39f7043d..970a62b676fcc5c63e8d0f3b1e545ce765aa40ba 100644 (file)
@@ -192,7 +192,7 @@ pub fn task() -> TaskBuilder {
 impl TaskBuilder {
     fn consume(&mut self) -> TaskBuilder {
         if self.consumed {
-            fail2!("Cannot copy a task_builder"); // Fake move mode on self
+            fail!("Cannot copy a task_builder"); // Fake move mode on self
         }
         self.consumed = true;
         let gen_body = self.gen_body.take();
@@ -280,7 +280,7 @@ pub fn future_result(&mut self) -> Port<TaskResult> {
         // sending out messages.
 
         if self.opts.notify_chan.is_some() {
-            fail2!("Can't set multiple future_results for one task!");
+            fail!("Can't set multiple future_results for one task!");
         }
 
         // Construct the future and give it to the caller.
@@ -540,7 +540,7 @@ pub fn with_task_name<U>(blk: &fn(Option<&str>) -> U) -> U {
             }
         }
     } else {
-        fail2!("no task name exists in non-green task context")
+        fail!("no task name exists in non-green task context")
     }
 }
 
@@ -648,7 +648,7 @@ fn test_kill_unkillable_task() {
     do run_in_newsched_task {
         do task::try {
             do task::spawn {
-                fail2!();
+                fail!();
             }
             do task::unkillable { }
         };
@@ -667,7 +667,7 @@ fn test_kill_rekillable_task() {
             do task::unkillable {
                 do task::rekillable {
                     do task::spawn {
-                        fail2!();
+                        fail!();
                     }
                 }
             }
@@ -697,7 +697,7 @@ fn test_rekillable_nested_failure() {
         do unkillable {
             do rekillable {
                 let (port,chan) = comm::stream();
-                do task::spawn { chan.send(()); fail2!(); }
+                do task::spawn { chan.send(()); fail!(); }
                 port.recv(); // wait for child to exist
                 port.recv(); // block forever, expect to get killed.
             }
@@ -741,7 +741,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
                 do 16.times { task::deschedule(); }
                 ch.send(()); // If killed first, grandparent hangs.
             }
-            fail2!(); // Shouldn't kill either (grand)parent or (grand)child.
+            fail!(); // Shouldn't kill either (grand)parent or (grand)child.
         }
         po.recv();
     }
@@ -751,7 +751,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
 fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
     use rt::test::run_in_newsched_task;
     do run_in_newsched_task {
-        do spawn_unlinked { fail2!(); }
+        do spawn_unlinked { fail!(); }
     }
 }
 #[ignore(reason = "linked failure")]
@@ -759,7 +759,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
 fn test_spawn_unlinked_sup_no_fail_up() { // child unlinked fails
     use rt::test::run_in_newsched_task;
     do run_in_newsched_task {
-        do spawn_supervised { fail2!(); }
+        do spawn_supervised { fail!(); }
         // Give child a chance to fail-but-not-kill-us.
         do 16.times { task::deschedule(); }
     }
@@ -771,7 +771,7 @@ fn test_spawn_unlinked_sup_fail_down() {
     do run_in_newsched_task {
         let result: Result<(),()> = do try {
             do spawn_supervised { block_forever(); }
-            fail2!(); // Shouldn't leave a child hanging around.
+            fail!(); // Shouldn't leave a child hanging around.
         };
         assert!(result.is_err());
     }
@@ -791,7 +791,7 @@ fn test_spawn_unlinked_sup_fail_down() {
             b0.opts.supervised = true;
 
             do b0.spawn {
-                fail2!();
+                fail!();
             }
             block_forever(); // We should get punted awake
         };
@@ -810,7 +810,7 @@ fn test_spawn_unlinked_sup_fail_down() {
             b0.opts.linked = true;
             b0.opts.supervised = true;
             do b0.spawn { block_forever(); }
-            fail2!(); // *both* mechanisms would be wrong if this didn't kill the child
+            fail!(); // *both* mechanisms would be wrong if this didn't kill the child
         };
         assert!(result.is_err());
     }
@@ -822,7 +822,7 @@ fn test_spawn_unlinked_sup_fail_down() {
     do run_in_newsched_task {
         let result: Result<(),()> = do try {
             // Default options are to spawn linked & unsupervised.
-            do spawn { fail2!(); }
+            do spawn { fail!(); }
             block_forever(); // We should get punted awake
         };
         assert!(result.is_err());
@@ -836,7 +836,7 @@ fn test_spawn_unlinked_sup_fail_down() {
         let result: Result<(),()> = do try {
             // Default options are to spawn linked & unsupervised.
             do spawn { block_forever(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -851,7 +851,7 @@ fn test_spawn_unlinked_sup_fail_down() {
             let mut builder = task();
             builder.linked();
             do builder.spawn { block_forever(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -871,7 +871,7 @@ fn test_spawn_failure_propagate_grandchild() {
                 do spawn_supervised { block_forever(); }
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -888,7 +888,7 @@ fn test_spawn_failure_propagate_secondborn() {
                 do spawn { block_forever(); } // linked
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -905,7 +905,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
                 do spawn_supervised { block_forever(); }
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -922,7 +922,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
                 do spawn { block_forever(); } // linked
             }
             do 16.times { task::deschedule(); }
-            fail2!();
+            fail!();
         };
         assert!(result.is_err());
     }
@@ -1030,7 +1030,7 @@ fn test_future_result() {
     let result = builder.future_result();
     builder.unlinked();
     do builder.spawn {
-        fail2!();
+        fail!();
     }
     assert_eq!(result.recv(), Failure);
 }
@@ -1048,17 +1048,17 @@ fn test_try_success() {
         ~"Success!"
     } {
         result::Ok(~"Success!") => (),
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
 #[test]
 fn test_try_fail() {
     match do try {
-        fail2!()
+        fail!()
     } {
         result::Err(()) => (),
-        result::Ok(()) => fail2!()
+        result::Ok(()) => fail!()
     }
 }
 
@@ -1248,7 +1248,7 @@ fn test_unkillable() {
         deschedule();
         // We want to fail after the unkillable task
         // blocks on recv
-        fail2!();
+        fail!();
     }
 
     unsafe {
@@ -1283,7 +1283,7 @@ fn test_unkillable_nested() {
         deschedule();
         // We want to fail after the unkillable task
         // blocks on recv
-        fail2!();
+        fail!();
     }
 
     unsafe {
@@ -1348,7 +1348,7 @@ fn test_spawn_watched() {
                 t.watched();
                 do t.spawn {
                     task::deschedule();
-                    fail2!();
+                    fail!();
                 }
             }
         };
@@ -1384,7 +1384,7 @@ fn test_indestructible() {
                 do t.spawn {
                     p3.recv();
                     task::deschedule();
-                    fail2!();
+                    fail!();
                 }
                 c3.send(());
                 p2.recv();
index 611d2f1fdb67ba7dfcb4b33a118f915ee250e71c..7cf0f04c7e9f6882438d66e6fbd389c71278d69b 100644 (file)
@@ -631,7 +631,7 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
             let (thread_port, thread_chan) = oneshot();
             let thread_port_cell = Cell::new(thread_port);
             let join_task = do Task::build_child(None) {
-                debug2!("running join task");
+                debug!("running join task");
                 let thread_port = thread_port_cell.take();
                 let thread: Thread = thread_port.recv();
                 thread.join();
@@ -648,11 +648,11 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
                 let join_task = join_task_cell.take();
 
                 let bootstrap_task = ~do Task::new_root(&mut new_sched.stack_pool, None) || {
-                    debug2!("boostrapping a 1:1 scheduler");
+                    debug!("boostrapping a 1:1 scheduler");
                 };
                 new_sched.bootstrap(bootstrap_task);
 
-                debug2!("enqueing join_task");
+                debug!("enqueing join_task");
                 // Now tell the original scheduler to join with this thread
                 // by scheduling a thread-joining task on the original scheduler
                 orig_sched_handle.send_task_from_friend(join_task);
@@ -684,7 +684,7 @@ pub fn spawn_raw(mut opts: TaskOpts, f: ~fn()) {
     }
 
     task.name = opts.name.take();
-    debug2!("spawn calling run_task");
+    debug!("spawn calling run_task");
     Scheduler::run_task(task);
 
 }
@@ -707,7 +707,7 @@ fn test_spawn_raw_unsupervise() {
         .. default_task_opts()
     };
     do spawn_raw(opts) {
-        fail2!();
+        fail!();
     }
 }
 
@@ -736,7 +736,7 @@ fn test_spawn_raw_notify_failure() {
         .. default_task_opts()
     };
     do spawn_raw(opts) {
-        fail2!();
+        fail!();
     }
     assert_eq!(notify_po.recv(), Failure);
 }
index b42d3c904d7488b283a18ff7b718e263f8deba1a..c561fb6cc8a457d1759982e02a6076f56087b8a2 100644 (file)
@@ -422,7 +422,7 @@ fn remove<T>(count: &mut uint, child: &mut Child<T>, key: uint,
       External(stored, _) if stored == key => {
         match replace(child, Nothing) {
             External(_, value) => (Some(value), true),
-            _ => fail2!()
+            _ => fail!()
         }
       }
       External(*) => (None, false),
@@ -531,7 +531,7 @@ fn test_find_mut() {
         assert!(m.insert(5, 14));
         let new = 100;
         match m.find_mut(&5) {
-            None => fail2!(), Some(x) => *x = new
+            None => fail!(), Some(x) => *x = new
         }
         assert_eq!(m.find(&5), Some(&new));
     }
index 58ff51fe102bdc0c1988a807103378cfcf71d5f2..d3d768bc0c6fba6ecb070fdee0a64580fe83f9bb 100644 (file)
@@ -33,7 +33,7 @@ fn drop(&mut self) {
             }
         } {
             Ok(()) => {},
-            Err(str) => fail2!("{}", str)
+            Err(str) => fail!("{}", str)
         }
     }
 }
@@ -94,13 +94,13 @@ fn test_loading_cosine() {
         // The math library does not need to be loaded since it is already
         // statically linked in
         let libm = match DynamicLibrary::open(None) {
-            Err(error) => fail2!("Could not load self as module: {}", error),
+            Err(error) => fail!("Could not load self as module: {}", error),
             Ok(libm) => libm
         };
 
         let cosine: extern fn(libc::c_double) -> libc::c_double = unsafe {
             match libm.symbol("cos") {
-                Err(error) => fail2!("Could not load function cos: {}", error),
+                Err(error) => fail!("Could not load function cos: {}", error),
                 Ok(cosine) => cosine
             }
         };
@@ -109,7 +109,7 @@ fn test_loading_cosine() {
         let expected_result = 1.0;
         let result = cosine(argument);
         if result != expected_result {
-            fail2!("cos({:?}) != {:?} but equaled {:?} instead", argument,
+            fail!("cos({:?}) != {:?} but equaled {:?} instead", argument,
                    expected_result, result)
         }
     }
@@ -124,7 +124,7 @@ fn test_errors_do_not_crash() {
         let path = GenericPath::new("/dev/null");
         match DynamicLibrary::open(Some(&path)) {
             Err(_) => {}
-            Ok(_) => fail2!("Successfully opened the empty library.")
+            Ok(_) => fail!("Successfully opened the empty library.")
         }
     }
 }
index 9fe3435c21ba1510ff2cbcead90222814639d638..c1365a44bc913c8d19a6cc8cffcd206e4bcb1a5e 100644 (file)
@@ -87,7 +87,7 @@ fn test_fail() {
     let mut i = 0;
     do (|| {
         i = 10;
-        fail2!();
+        fail!();
     }).finally {
         assert!(failing());
         assert_eq!(i, 10);
index cf6bf839ccc051290f3aa250bb22e704d2f809d8..4c6ad469d8cbeaccd1ecd18773821c31e2b64586 100644 (file)
@@ -172,7 +172,7 @@ pub fn unwrap(self) -> T {
                     // If 'put' returns the server end back to us, we were rejected;
                     // someone else was trying to unwrap. Avoid guaranteed deadlock.
                     cast::forget(data);
-                    fail2!("Another task is already unwrapping this Arc!");
+                    fail!("Another task is already unwrapping this Arc!");
                 }
             }
         }
@@ -386,7 +386,7 @@ pub unsafe fn with<U>(&self, f: &fn(x: &mut T) -> U) -> U {
         let rec = self.x.get();
         do (*rec).lock.lock {
             if (*rec).failed {
-                fail2!("Poisoned Exclusive::new - another task failed inside!");
+                fail!("Poisoned Exclusive::new - another task failed inside!");
             }
             (*rec).failed = true;
             let result = f(&mut (*rec).data);
@@ -617,7 +617,7 @@ fn exclusive_new_unwrap_deadlock() {
             let x2 = x.clone();
             do task::spawn {
                 do 10.times { task::deschedule(); } // try to let the unwrapper go
-                fail2!(); // punt it awake from its deadlock
+                fail!(); // punt it awake from its deadlock
             }
             let _z = x.unwrap();
             unsafe { do x2.with |_hello| { } }
index d298507aa8cb6e27a467c7d1e1afaa30fef84c7c..b10d0ded5b47757345b2b3b6bca964dd0cb27aa9 100644 (file)
@@ -1063,7 +1063,7 @@ fn get_opt(&self, index: uint) -> Option<&'self T> {
 
     #[inline]
     fn head(&self) -> &'self T {
-        if self.len() == 0 { fail2!("head: empty vector") }
+        if self.len() == 0 { fail!("head: empty vector") }
         &self[0]
     }
 
@@ -1090,7 +1090,7 @@ fn initn(&self, n: uint) -> &'self [T] {
 
     #[inline]
     fn last(&self) -> &'self T {
-        if self.len() == 0 { fail2!("last: empty vector") }
+        if self.len() == 0 { fail!("last: empty vector") }
         &self[self.len() - 1]
     }
 
@@ -1409,7 +1409,7 @@ fn reserve(&mut self, n: uint) {
                     let alloc = n * mem::nonzero_size_of::<T>();
                     let size = alloc + mem::size_of::<Vec<()>>();
                     if alloc / mem::nonzero_size_of::<T>() != n || size < alloc {
-                        fail2!("vector size is too large: {}", n);
+                        fail!("vector size is too large: {}", n);
                     }
                     *ptr = realloc_raw(*ptr as *mut c_void, size)
                            as *mut Vec<()>;
@@ -1428,7 +1428,7 @@ fn reserve_at_least(&mut self, n: uint) {
     fn reserve_additional(&mut self, n: uint) {
         if self.capacity() - self.len() < n {
             match self.len().checked_add(&n) {
-                None => fail2!("vec::reserve_additional: `uint` overflow"),
+                None => fail!("vec::reserve_additional: `uint` overflow"),
                 Some(new_cap) => self.reserve_at_least(new_cap)
             }
         }
@@ -1622,7 +1622,7 @@ fn remove(&mut self, i: uint) -> T {
     fn swap_remove(&mut self, index: uint) -> T {
         let ln = self.len();
         if index >= ln {
-            fail2!("vec::swap_remove - index {} >= length {}", index, ln);
+            fail!("vec::swap_remove - index {} >= length {}", index, ln);
         }
         if index < ln - 1 {
             self.swap(index, ln - 1);
@@ -2997,7 +2997,7 @@ fn test_element_swaps() {
                 3 => assert_eq!(v, [2, 3, 1]),
                 4 => assert_eq!(v, [2, 1, 3]),
                 5 => assert_eq!(v, [1, 2, 3]),
-                _ => fail2!(),
+                _ => fail!(),
             }
         }
     }
@@ -3244,7 +3244,7 @@ fn test_slice_2() {
     #[should_fail]
     fn test_from_fn_fail() {
         do from_fn(100) |v| {
-            if v == 50 { fail2!() }
+            if v == 50 { fail!() }
             (~0, @0)
         };
     }
@@ -3263,7 +3263,7 @@ impl Clone for S {
             fn clone(&self) -> S {
                 let s = unsafe { cast::transmute_mut(self) };
                 s.f += 1;
-                if s.f == 10 { fail2!() }
+                if s.f == 10 { fail!() }
                 S { f: s.f, boxes: s.boxes.clone() }
             }
         }
@@ -3280,7 +3280,7 @@ fn test_build_fail() {
             push((~0, @0));
             push((~0, @0));
             push((~0, @0));
-            fail2!();
+            fail!();
         };
     }
 
@@ -3290,7 +3290,7 @@ fn test_grow_fn_fail() {
         let mut v = ~[];
         do v.grow_fn(100) |i| {
             if i == 50 {
-                fail2!()
+                fail!()
             }
             (~0, @0)
         }
@@ -3303,7 +3303,7 @@ fn test_map_fail() {
         let mut i = 0;
         do v.map |_elt| {
             if i == 2 {
-                fail2!()
+                fail!()
             }
             i += 1;
             ~[(~0, @0)]
@@ -3317,7 +3317,7 @@ fn test_flat_map_fail() {
         let mut i = 0;
         do flat_map(v) |_elt| {
             if i == 2 {
-                fail2!()
+                fail!()
             }
             i += 1;
             ~[(~0, @0)]
@@ -3331,7 +3331,7 @@ fn test_permute_fail() {
         let mut i = 0;
         for _ in v.permutations_iter() {
             if i == 2 {
-                fail2!()
+                fail!()
             }
             i += 1;
         }
@@ -3342,7 +3342,7 @@ fn test_permute_fail() {
     fn test_as_imm_buf_fail() {
         let v = [(~0, @0), (~0, @0), (~0, @0), (~0, @0)];
         do v.as_imm_buf |_buf, _i| {
-            fail2!()
+            fail!()
         }
     }
 
@@ -3351,7 +3351,7 @@ fn test_as_imm_buf_fail() {
     fn test_as_mut_buf_fail() {
         let mut v = [(~0, @0), (~0, @0), (~0, @0), (~0, @0)];
         do v.as_mut_buf |_buf, _i| {
-            fail2!()
+            fail!()
         }
     }
 
@@ -3816,7 +3816,7 @@ fn iterator(bh: &mut BenchHarness) {
                 sum += *x;
             }
             // sum == 11806, to stop dead code elimination.
-            if sum == 0 {fail2!()}
+            if sum == 0 {fail!()}
         }
     }
 
index 4875ef6d3caa55c95dc3950a4f3cfcc392071895..ed20b160eb4d3810e0b3ca58652655b664c6e764 100644 (file)
@@ -221,7 +221,7 @@ pub fn check_valid(&self) -> Option<(Abi, Abi)> {
             let data = abi.data();
             for other_abi in abis.slice(0, i).iter() {
                 let other_data = other_abi.data();
-                debug2!("abis=({:?},{:?}) datas=({:?},{:?})",
+                debug!("abis=({:?},{:?}) datas=({:?},{:?})",
                        abi, data.abi_arch,
                        other_abi, other_data.abi_arch);
                 match (&data.abi_arch, &other_data.abi_arch) {
@@ -306,7 +306,7 @@ fn cannot_combine(n: Abi, m: Abi) {
                          (m == a && n == b));
         }
         None => {
-            fail2!("Invalid match not detected");
+            fail!("Invalid match not detected");
         }
     }
 }
@@ -318,7 +318,7 @@ fn can_combine(n: Abi, m: Abi) {
     set.add(m);
     match set.check_valid() {
         Some((_, _)) => {
-            fail2!("Valid match declared invalid");
+            fail!("Valid match declared invalid");
         }
         None => {}
     }
@@ -367,7 +367,7 @@ fn abi_to_str_c_aaps() {
     let mut set = AbiSet::empty();
     set.add(Aapcs);
     set.add(C);
-    debug2!("set = {}", set.to_str());
+    debug!("set = {}", set.to_str());
     assert!(set.to_str() == ~"\"aapcs C\"");
 }
 
@@ -375,7 +375,7 @@ fn abi_to_str_c_aaps() {
 fn abi_to_str_rust() {
     let mut set = AbiSet::empty();
     set.add(Rust);
-    debug2!("set = {}", set.to_str());
+    debug!("set = {}", set.to_str());
     assert!(set.to_str() == ~"\"Rust\"");
 }
 
index 34b359ef3db8a84388b2de5ea8e1efa4c08787be..01033e829f6a76d14c8cc6647f0a8aec0fc4dc45 100644 (file)
@@ -47,7 +47,7 @@ fn eq(&self, other: &Ident) -> bool {
             // if it should be non-hygienic (most things are), just compare the
             // 'name' fields of the idents. Or, even better, replace the idents
             // with Name's.
-            fail2!("not allowed to compare these idents: {:?}, {:?}.
+            fail!("not allowed to compare these idents: {:?}, {:?}.
                     Probably related to issue \\#6993", self, other);
         }
     }
index 83205ccc9818aace51d1c4ffcada611430fccf8c..17613d19c7ef1148c1fb76b0f135538e6ce6c2fd 100644 (file)
@@ -185,7 +185,7 @@ fn map_struct_def(&mut self,
                                                          item,
                                                          p));
                     }
-                    _ => fail2!("struct def parent wasn't an item")
+                    _ => fail!("struct def parent wasn't an item")
                 }
             }
         }
@@ -485,6 +485,6 @@ pub fn node_item_query<Result>(items: map, id: NodeId,
                                error_msg: ~str) -> Result {
     match items.find(&id) {
         Some(&node_item(it, _)) => query(it),
-        _ => fail2!("{}", error_msg)
+        _ => fail!("{}", error_msg)
     }
 }
index 7295081afba2fa8c42feb78df7c06de8868548dd..bdebc9872e690dd3b9352a8438a64c2d2deedccb 100644 (file)
@@ -45,7 +45,7 @@ pub fn stmt_id(s: &Stmt) -> NodeId {
       StmtDecl(_, id) => id,
       StmtExpr(_, id) => id,
       StmtSemi(_, id) => id,
-      StmtMac(*) => fail2!("attempted to analyze unexpanded stmt")
+      StmtMac(*) => fail!("attempted to analyze unexpanded stmt")
     }
 }
 
@@ -72,7 +72,7 @@ pub fn def_id_of_def(d: Def) -> DefId {
         local_def(id)
       }
 
-      DefPrimTy(_) => fail2!()
+      DefPrimTy(_) => fail!()
     }
 }
 
@@ -735,7 +735,7 @@ pub fn new_mark_internal(m:Mrk, tail:SyntaxContext,table:&mut SCTable)
         }
         true => {
             match table.mark_memo.find(&key) {
-                None => fail2!("internal error: key disappeared 2013042901"),
+                None => fail!("internal error: key disappeared 2013042901"),
                 Some(idxptr) => {*idxptr}
             }
         }
@@ -762,7 +762,7 @@ pub fn new_rename_internal(id:Ident, to:Name, tail:SyntaxContext, table: &mut SC
         }
         true => {
             match table.rename_memo.find(&key) {
-                None => fail2!("internal error: key disappeared 2013042902"),
+                None => fail!("internal error: key disappeared 2013042902"),
                 Some(idxptr) => {*idxptr}
             }
         }
@@ -795,9 +795,9 @@ pub fn get_sctable() -> @mut SCTable {
 
 /// print out an SCTable for debugging
 pub fn display_sctable(table : &SCTable) {
-    error2!("SC table:");
+    error!("SC table:");
     for (idx,val) in table.table.iter().enumerate() {
-        error2!("{:4u} : {:?}",idx,val);
+        error!("{:4u} : {:?}",idx,val);
     }
 }
 
@@ -859,7 +859,7 @@ pub fn resolve_internal(id : Ident,
                             resolvedthis
                         }
                     }
-                    IllegalCtxt() => fail2!("expected resolvable context, got IllegalCtxt")
+                    IllegalCtxt() => fail!("expected resolvable context, got IllegalCtxt")
                 }
             };
             resolve_table.insert(key,resolved);
@@ -900,7 +900,7 @@ pub fn marksof(ctxt: SyntaxContext, stopname: Name, table: &SCTable) -> ~[Mrk] {
                     loopvar = tl;
                 }
             }
-            IllegalCtxt => fail2!("expected resolvable context, got IllegalCtxt")
+            IllegalCtxt => fail!("expected resolvable context, got IllegalCtxt")
         }
     }
 }
@@ -911,7 +911,7 @@ pub fn mtwt_outer_mark(ctxt: SyntaxContext) -> Mrk {
     let sctable = get_sctable();
     match sctable.table[ctxt] {
         ast::Mark(mrk,_) => mrk,
-        _ => fail2!("can't retrieve outer mark when outside is not a mark")
+        _ => fail!("can't retrieve outer mark when outside is not a mark")
     }
 }
 
@@ -1043,7 +1043,7 @@ fn refold_test_sc(mut sc: SyntaxContext, table : &SCTable) -> ~[TestSC] {
                     sc = tail;
                     continue;
                 }
-                IllegalCtxt => fail2!("expected resolvable context, got IllegalCtxt")
+                IllegalCtxt => fail!("expected resolvable context, got IllegalCtxt")
             }
         }
     }
index 47b31a4f76d5fe299b0fb03571fd729598be798f..40b7ff29e241a45b2d1b7eefe7b9fd4140e5166b 100644 (file)
@@ -168,17 +168,17 @@ pub fn mk_sugared_doc_attr(text: @str, lo: BytePos, hi: BytePos) -> Attribute {
 /// span included in the `==` comparison a plain MetaItem.
 pub fn contains(haystack: &[@ast::MetaItem],
                 needle: @ast::MetaItem) -> bool {
-    debug2!("attr::contains (name={})", needle.name());
+    debug!("attr::contains (name={})", needle.name());
     do haystack.iter().any |item| {
-        debug2!("  testing: {}", item.name());
+        debug!("  testing: {}", item.name());
         item.node == needle.node
     }
 }
 
 pub fn contains_name<AM: AttrMetaMethods>(metas: &[AM], name: &str) -> bool {
-    debug2!("attr::contains_name (name={})", name);
+    debug!("attr::contains_name (name={})", name);
     do metas.iter().any |item| {
-        debug2!("  testing: {}", item.name());
+        debug!("  testing: {}", item.name());
         name == item.name()
     }
 }
@@ -279,23 +279,23 @@ pub fn test_cfg<AM: AttrMetaMethods, It: Iterator<AM>>
     // this would be much nicer as a chain of iterator adaptors, but
     // this doesn't work.
     let some_cfg_matches = do metas.any |mi| {
-        debug2!("testing name: {}", mi.name());
+        debug!("testing name: {}", mi.name());
         if "cfg" == mi.name() { // it is a #[cfg()] attribute
-            debug2!("is cfg");
+            debug!("is cfg");
             no_cfgs = false;
              // only #[cfg(...)] ones are understood.
             match mi.meta_item_list() {
                 Some(cfg_meta) => {
-                    debug2!("is cfg(...)");
+                    debug!("is cfg(...)");
                     do cfg_meta.iter().all |cfg_mi| {
-                        debug2!("cfg({}[...])", cfg_mi.name());
+                        debug!("cfg({}[...])", cfg_mi.name());
                         match cfg_mi.node {
                             ast::MetaList(s, ref not_cfgs) if "not" == s => {
-                                debug2!("not!");
+                                debug!("not!");
                                 // inside #[cfg(not(...))], so these need to all
                                 // not match.
                                 not_cfgs.iter().all(|mi| {
-                                    debug2!("cfg(not({}[...]))", mi.name());
+                                    debug!("cfg(not({}[...]))", mi.name());
                                     !contains(cfg, *mi)
                                 })
                             }
@@ -309,7 +309,7 @@ pub fn test_cfg<AM: AttrMetaMethods, It: Iterator<AM>>
             false
         }
     };
-    debug2!("test_cfg (no_cfgs={}, some_cfg_matches={})", no_cfgs, some_cfg_matches);
+    debug!("test_cfg (no_cfgs={}, some_cfg_matches={})", no_cfgs, some_cfg_matches);
     no_cfgs || some_cfg_matches
 }
 
index de8f45c880d2acd160c3112b4d11780215d1ae8c..5e4355161f40af946af3434dfc82b48a59f6afd2 100644 (file)
@@ -374,7 +374,7 @@ pub fn get_filemap(&self, filename: &str) -> @FileMap {
         for fm in self.files.iter() { if filename == fm.name { return *fm; } }
         //XXjdm the following triggers a mismatched type bug
         //      (or expected function, found _|_)
-        fail2!(); // ("asking for " + filename + " which we don't know about");
+        fail!(); // ("asking for " + filename + " which we don't know about");
     }
 }
 
@@ -393,7 +393,7 @@ fn lookup_filemap_idx(&self, pos: BytePos) -> uint {
             }
         }
         if (a >= len) {
-            fail2!("position {} does not resolve to a source location", pos.to_uint())
+            fail!("position {} does not resolve to a source location", pos.to_uint())
         }
 
         return a;
@@ -419,11 +419,11 @@ fn lookup_pos(&self, pos: BytePos) -> Loc {
         let chpos = self.bytepos_to_local_charpos(pos);
         let linebpos = f.lines[a];
         let linechpos = self.bytepos_to_local_charpos(linebpos);
-        debug2!("codemap: byte pos {:?} is on the line at byte pos {:?}",
+        debug!("codemap: byte pos {:?} is on the line at byte pos {:?}",
                pos, linebpos);
-        debug2!("codemap: char pos {:?} is on the line at char pos {:?}",
+        debug!("codemap: char pos {:?} is on the line at char pos {:?}",
                chpos, linechpos);
-        debug2!("codemap: byte is on line: {:?}", line);
+        debug!("codemap: byte is on line: {:?}", line);
         assert!(chpos >= linechpos);
         return Loc {
             file: f,
@@ -450,7 +450,7 @@ fn lookup_byte_offset(&self, bpos: BytePos)
     // Converts an absolute BytePos to a CharPos relative to the file it is
     // located in
     fn bytepos_to_local_charpos(&self, bpos: BytePos) -> CharPos {
-        debug2!("codemap: converting {:?} to char pos", bpos);
+        debug!("codemap: converting {:?} to char pos", bpos);
         let idx = self.lookup_filemap_idx(bpos);
         let map = self.files[idx];
 
@@ -458,7 +458,7 @@ fn bytepos_to_local_charpos(&self, bpos: BytePos) -> CharPos {
         let mut total_extra_bytes = 0;
 
         for mbc in map.multibyte_chars.iter() {
-            debug2!("codemap: {:?}-byte char at {:?}", mbc.bytes, mbc.pos);
+            debug!("codemap: {:?}-byte char at {:?}", mbc.bytes, mbc.pos);
             if mbc.pos < bpos {
                 total_extra_bytes += mbc.bytes;
                 // We should never see a byte position in the middle of a
index 4b5ab2fbb56df0223e3930c02231079f94f2eaf4..b38d46115357c6af247ae0654ca64cc79cf2eeb9 100644 (file)
@@ -69,7 +69,7 @@ struct CodemapT {
 impl span_handler for CodemapT {
     fn span_fatal(@mut self, sp: Span, msg: &str) -> ! {
         self.handler.emit(Some((self.cm, sp)), msg, fatal);
-        fail2!();
+        fail!();
     }
     fn span_err(@mut self, sp: Span, msg: &str) {
         self.handler.emit(Some((self.cm, sp)), msg, error);
@@ -95,7 +95,7 @@ fn handler(@mut self) -> @mut handler {
 impl handler for HandlerT {
     fn fatal(@mut self, msg: &str) -> ! {
         self.emit.emit(None, msg, fatal);
-        fail2!();
+        fail!();
     }
     fn err(@mut self, msg: &str) {
         self.emit.emit(None, msg, error);
index 78c4d6b6f4b3bd04706a553b68a4d7c43366377d..1f9fe28a46d5b5088de46c10906da6774f3645af 100644 (file)
@@ -540,11 +540,11 @@ pub fn contains_key (&self, key: &K) -> bool {
     // names? I think not.
     // delaying implementing this....
     pub fn each_key (&self, _f: &fn (&K)->bool) {
-        fail2!("unimplemented 2013-02-15T10:01");
+        fail!("unimplemented 2013-02-15T10:01");
     }
 
     pub fn each_value (&self, _f: &fn (&V) -> bool) {
-        fail2!("unimplemented 2013-02-15T10:02");
+        fail!("unimplemented 2013-02-15T10:02");
     }
 
     // Returns a copy of the value that the name maps to.
@@ -587,7 +587,7 @@ pub fn insert_into_frame(&mut self, key: K, ext: @V, n: K, pred: &fn(&@V)->bool)
                 if satisfies_pred(map,&n,pred) {
                     map.insert(key,ext);
                 } else {
-                    fail2!("expected map chain containing satisfying frame")
+                    fail!("expected map chain containing satisfying frame")
                 }
             },
             ConsMapChain (~ref mut map, rest) => {
index 620594a0a171e47da73912507e52a368fee079d8..e1cc63fd0b82865161958ee767a093951ed7c1ad 100644 (file)
@@ -429,7 +429,7 @@ fn insert_macro(exts: SyntaxEnv, name: ast::Name, transformer: @Transformer) {
         match t {
             &@BlockInfo(BlockInfo {macros_escape:false,_}) => true,
             &@BlockInfo(BlockInfo {_}) => false,
-            _ => fail2!("special identifier {:?} was bound to a non-BlockInfo",
+            _ => fail!("special identifier {:?} was bound to a non-BlockInfo",
                         special_block_name)
         }
     };
@@ -741,7 +741,7 @@ pub fn expand_block_elts(exts: SyntaxEnv, b: &Block, fld: &MacroExpander)
 fn mustbesome<T>(val : Option<T>) -> T {
     match val {
         Some(v) => v,
-        None => fail2!("rename_fold returned None")
+        None => fail!("rename_fold returned None")
     }
 }
 
@@ -749,7 +749,7 @@ fn mustbesome<T>(val : Option<T>) -> T {
 fn get_block_info(exts : SyntaxEnv) -> BlockInfo {
     match exts.find_in_topmost_frame(&intern(special_block_name)) {
         Some(@BlockInfo(bi)) => bi,
-        _ => fail2!("special identifier {:?} was bound to a non-BlockInfo",
+        _ => fail!("special identifier {:?} was bound to a non-BlockInfo",
                     @" block")
     }
 }
@@ -782,7 +782,7 @@ pub fn renames_to_fold(renames: @mut ~[(ast::Ident,ast::Name)]) -> @ast_fold {
 fn apply_pending_renames(folder : @ast_fold, stmt : ast::Stmt) -> @ast::Stmt {
     match folder.fold_stmt(&stmt) {
         Some(s) => s,
-        None => fail2!("renaming of stmt produced None")
+        None => fail!("renaming of stmt produced None")
     }
 }
 
@@ -840,11 +840,11 @@ macro_rules! fail(
 
     // NOTE (acrichto): remove these after the next snapshot
     macro_rules! log2( ($($arg:tt)*) => (log!($($arg)*)) )
-    macro_rules! error2( ($($arg:tt)*) => (error!($($arg)*)) )
-    macro_rules! warn2 ( ($($arg:tt)*) => (warn!($($arg)*)) )
-    macro_rules! info2 ( ($($arg:tt)*) => (info!($($arg)*)) )
-    macro_rules! debug2( ($($arg:tt)*) => (debug!($($arg)*)) )
-    macro_rules! fail2( ($($arg:tt)*) => (fail!($($arg)*)) )
+    macro_rules! error( ($($arg:tt)*) => (error!($($arg)*)) )
+    macro_rules! warn ( ($($arg:tt)*) => (warn!($($arg)*)) )
+    macro_rules! info ( ($($arg:tt)*) => (info!($($arg)*)) )
+    macro_rules! debug( ($($arg:tt)*) => (debug!($($arg)*)) )
+    macro_rules! fail( ($($arg:tt)*) => (fail!($($arg)*)) )
 
     macro_rules! assert(
         ($cond:expr) => {
@@ -873,7 +873,7 @@ macro_rules! assert_eq (
                 // check both directions of equality....
                 if !((*given_val == *expected_val) &&
                      (*expected_val == *given_val)) {
-                    fail2!(\"assertion failed: `(left == right) && (right == \
+                    fail!(\"assertion failed: `(left == right) && (right == \
                              left)` (left: `{:?}`, right: `{:?}`)\",
                            *given_val, *expected_val);
                 }
@@ -893,7 +893,7 @@ macro_rules! assert_approx_eq (
                     given_val.approx_eq(&expected_val) &&
                     expected_val.approx_eq(&given_val)
                 ) {
-                    fail2!(\"left: {:?} does not approximately equal right: {:?}\",
+                    fail!(\"left: {:?} does not approximately equal right: {:?}\",
                            given_val, expected_val);
                 }
             }
@@ -910,7 +910,7 @@ macro_rules! assert_approx_eq (
                     given_val.approx_eq_eps(&expected_val, &epsilon_val) &&
                     expected_val.approx_eq_eps(&given_val, &epsilon_val)
                 ) {
-                    fail2!(\"left: {:?} does not approximately equal right: \
+                    fail!(\"left: {:?} does not approximately equal right: \
                              {:?} with epsilon: {:?}\",
                           given_val, expected_val, epsilon_val);
                 }
@@ -945,7 +945,7 @@ fn choose_weighted_item(v: &[Item]) -> Item {
 
     */
     macro_rules! unreachable (() => (
-        fail2!(\"internal error: entered unreachable code\");
+        fail!(\"internal error: entered unreachable code\");
     ))
 
     macro_rules! condition (
@@ -1123,7 +1123,7 @@ pub fn inject_std_macros(parse_sess: @mut parse::ParseSess,
                                               ~[],
                                               parse_sess) {
         Some(item) => item,
-        None => fail2!("expected core macros to parse correctly")
+        None => fail!("expected core macros to parse correctly")
     };
 
     let injector = @Injector {
@@ -1381,16 +1381,16 @@ mod test {
     use util::parser_testing::{string_to_pat, string_to_tts, strs_to_idents};
     use visit;
 
-    // make sure that fail2! is present
+    // make sure that fail! is present
     #[test] fn fail_exists_test () {
-        let src = @"fn main() { fail2!(\"something appropriately gloomy\");}";
+        let src = @"fn main() { fail!(\"something appropriately gloomy\");}";
         let sess = parse::new_parse_sess(None);
         let crate_ast = parse::parse_crate_from_source_str(
             @"<test>",
             src,
             ~[],sess);
         let crate_ast = inject_std_macros(sess, ~[], crate_ast);
-        // don't bother with striping, doesn't affect fail2!.
+        // don't bother with striping, doesn't affect fail!.
         expand_crate(sess,~[],crate_ast);
     }
 
@@ -1448,7 +1448,7 @@ mod test {
             cfg,~[],sess);
         match item_ast {
             Some(_) => (), // success
-            None => fail2!("expected this to parse")
+            None => fail!("expected this to parse")
         }
     }
 
@@ -1487,7 +1487,7 @@ fn make_dummy_attr(s: @str) -> ast::Attribute {
         let marked_once_ctxt =
             match marked_once[0] {
                 ast::tt_tok(_,token::IDENT(id,_)) => id.ctxt,
-                _ => fail2!(format!("unexpected shape for marked tts: {:?}",marked_once[0]))
+                _ => fail!(format!("unexpected shape for marked tts: {:?}",marked_once[0]))
             };
         assert_eq!(mtwt_marksof(marked_once_ctxt,invalid_name),~[fm]);
         let remarked = mtwt_cancel_outer_mark(marked_once,marked_once_ctxt);
@@ -1495,7 +1495,7 @@ fn make_dummy_attr(s: @str) -> ast::Attribute {
         match remarked[0] {
             ast::tt_tok(_,token::IDENT(id,_)) =>
             assert_eq!(mtwt_marksof(id.ctxt,invalid_name),~[]),
-            _ => fail2!(format!("unexpected shape for marked tts: {:?}",remarked[0]))
+            _ => fail!(format!("unexpected shape for marked tts: {:?}",remarked[0]))
         }
     }
 
@@ -1700,7 +1700,7 @@ fn run_renaming_test(t : &renaming_test, test_idx: uint) {
             bindings.iter().filter(|b|{@"xx" == (ident_to_str(*b))}).collect();
         let cxbind = match cxbinds {
             [b] => b,
-            _ => fail2!("expected just one binding for ext_cx")
+            _ => fail!("expected just one binding for ext_cx")
         };
         let resolved_binding = mtwt_resolve(*cxbind);
         // find all the xx varrefs:
index 4bef960185523d8e1b8b3db6471e4a05d5af000e..d10ec4229874b13eadc74e190f325db4e7a88ddd 100644 (file)
@@ -255,8 +255,8 @@ fn parse_item(&self, s: @str) -> @ast::item {
             match res {
                 Some(ast) => ast,
                 None => {
-                    error2!("Parse error with ```\n{}\n```", s);
-                    fail2!()
+                    error!("Parse error with ```\n{}\n```", s);
+                    fail!()
                 }
             }
         }
@@ -490,7 +490,7 @@ fn mk_token(cx: @ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr {
                                       ~[mk_ident(cx, sp, ident)]);
         }
 
-        INTERPOLATED(_) => fail2!("quote! with interpolated token"),
+        INTERPOLATED(_) => fail!("quote! with interpolated token"),
 
         _ => ()
     }
@@ -528,7 +528,7 @@ fn mk_token(cx: @ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr {
         DOLLAR => "DOLLAR",
         UNDERSCORE => "UNDERSCORE",
         EOF => "EOF",
-        _ => fail2!()
+        _ => fail!()
     };
     cx.expr_ident(sp, id_ext(name))
 }
@@ -553,7 +553,7 @@ fn mk_tt(cx: @ExtCtxt, sp: Span, tt: &ast::token_tree)
         }
 
         ast::tt_delim(ref tts) => mk_tts(cx, sp, **tts),
-        ast::tt_seq(*) => fail2!("tt_seq in quote!"),
+        ast::tt_seq(*) => fail!("tt_seq in quote!"),
 
         ast::tt_nonterminal(sp, ident) => {
 
index 7db64feb809854e92fec357eb9f83e50011f6ce4..50688afc56a5fe3ba3302bda13ae3e40cc07dda5 100644 (file)
@@ -122,7 +122,7 @@ pub struct MatcherPos {
 pub fn copy_up(mpu: &matcher_pos_up) -> ~MatcherPos {
     match *mpu {
       matcher_pos_up(Some(ref mp)) => (*mp).clone(),
-      _ => fail2!()
+      _ => fail!()
     }
 }
 
@@ -387,7 +387,7 @@ pub fn parse(
                         format!("{} ('{}')", ident_to_str(name),
                              ident_to_str(bind))
                       }
-                      _ => fail2!()
+                      _ => fail!()
                     } }).connect(" or ");
                 return error(sp, format!(
                     "Local ambiguity: multiple parsing options: \
@@ -412,7 +412,7 @@ pub fn parse(
                         parse_nt(&rust_parser, ident_to_str(name))));
                     ei.idx += 1u;
                   }
-                  _ => fail2!()
+                  _ => fail!()
                 }
                 cur_eis.push(ei);
 
index 84ff98b0188cf9d8e650b71f581adc11621fb9d3..37bc00d5827b9f252cb9d7633398308a8763118e 100644 (file)
@@ -891,7 +891,7 @@ macro_rules! assert_pred (
                 let a_val = $a;
                 let b_val = $b;
                 if !(pred_val(a_val,b_val)) {
-                    fail2!("expected args satisfying {}, got {:?} and {:?}",
+                    fail!("expected args satisfying {}, got {:?} and {:?}",
                           $predname, a_val, b_val);
                 }
             }
index ca93cbaea39e07923f7dcf03d4d348418a3ad672..2000d0b97461f8b8f150a38cb6d02b8b566ff8de 100644 (file)
@@ -66,7 +66,7 @@ pub fn map_move<U>(self, op: &fn(T) -> U) -> OptVec<U> {
 
     pub fn get<'a>(&'a self, i: uint) -> &'a T {
         match *self {
-            Empty => fail2!("Invalid index {}", i),
+            Empty => fail!("Invalid index {}", i),
             Vec(ref v) => &v[i]
         }
     }
index dba2f0b94171745070da5fa06446a752359b427e..a8132860b9b4fe2e3eaf12bd0864dbfda3084682 100644 (file)
@@ -32,7 +32,7 @@ impl parser_attr for Parser {
     fn parse_outer_attributes(&self) -> ~[ast::Attribute] {
         let mut attrs: ~[ast::Attribute] = ~[];
         loop {
-            debug2!("parse_outer_attributes: self.token={:?}",
+            debug!("parse_outer_attributes: self.token={:?}",
                    self.token);
             match *self.token {
               token::INTERPOLATED(token::nt_attr(*)) => {
@@ -67,7 +67,7 @@ fn parse_outer_attributes(&self) -> ~[ast::Attribute] {
     // if permit_inner is true, then a trailing `;` indicates an inner
     // attribute
     fn parse_attribute(&self, permit_inner: bool) -> ast::Attribute {
-        debug2!("parse_attributes: permit_inner={:?} self.token={:?}",
+        debug!("parse_attributes: permit_inner={:?} self.token={:?}",
                permit_inner, self.token);
         let (span, value) = match *self.token {
             INTERPOLATED(token::nt_attr(attr)) => {
index f163bec7d4eef3403dc352bce05ea5d516fef99a..38921648a2bc618e3f6194d19889a8f231ef4763 100644 (file)
@@ -134,7 +134,7 @@ fn horizontal_trim(lines: ~[~str]) -> ~[~str] {
         return lines.connect("\n");
     }
 
-    fail2!("not a doc-comment: {}", comment);
+    fail!("not a doc-comment: {}", comment);
 }
 
 fn read_to_eol(rdr: @mut StringReader) -> ~str {
@@ -161,7 +161,7 @@ fn consume_non_eol_whitespace(rdr: @mut StringReader) {
 }
 
 fn push_blank_line_comment(rdr: @mut StringReader, comments: &mut ~[cmnt]) {
-    debug2!(">>> blank-line comment");
+    debug!(">>> blank-line comment");
     let v: ~[~str] = ~[];
     comments.push(cmnt {style: blank_line, lines: v, pos: rdr.last_pos});
 }
@@ -179,9 +179,9 @@ fn consume_whitespace_counting_blank_lines(rdr: @mut StringReader,
 
 fn read_shebang_comment(rdr: @mut StringReader, code_to_the_left: bool,
                                             comments: &mut ~[cmnt]) {
-    debug2!(">>> shebang comment");
+    debug!(">>> shebang comment");
     let p = rdr.last_pos;
-    debug2!("<<< shebang comment");
+    debug!("<<< shebang comment");
     comments.push(cmnt {
         style: if code_to_the_left { trailing } else { isolated },
         lines: ~[read_one_line_comment(rdr)],
@@ -191,19 +191,19 @@ fn read_shebang_comment(rdr: @mut StringReader, code_to_the_left: bool,
 
 fn read_line_comments(rdr: @mut StringReader, code_to_the_left: bool,
                                           comments: &mut ~[cmnt]) {
-    debug2!(">>> line comments");
+    debug!(">>> line comments");
     let p = rdr.last_pos;
     let mut lines: ~[~str] = ~[];
     while rdr.curr == '/' && nextch(rdr) == '/' {
         let line = read_one_line_comment(rdr);
-        debug2!("{}", line);
+        debug!("{}", line);
         if is_doc_comment(line) { // doc-comments are not put in comments
             break;
         }
         lines.push(line);
         consume_non_eol_whitespace(rdr);
     }
-    debug2!("<<< line comments");
+    debug!("<<< line comments");
     if !lines.is_empty() {
         comments.push(cmnt {
             style: if code_to_the_left { trailing } else { isolated },
@@ -242,14 +242,14 @@ fn trim_whitespace_prefix_and_push_line(lines: &mut ~[~str],
         }
         None => s,
     };
-    debug2!("pushing line: {}", s1);
+    debug!("pushing line: {}", s1);
     lines.push(s1);
 }
 
 fn read_block_comment(rdr: @mut StringReader,
                       code_to_the_left: bool,
                       comments: &mut ~[cmnt]) {
-    debug2!(">>> block comment");
+    debug!(">>> block comment");
     let p = rdr.last_pos;
     let mut lines: ~[~str] = ~[];
     let col: CharPos = rdr.col;
@@ -275,7 +275,7 @@ fn read_block_comment(rdr: @mut StringReader,
     } else {
         let mut level: int = 1;
         while level > 0 {
-            debug2!("=== block comment level {}", level);
+            debug!("=== block comment level {}", level);
             if is_eof(rdr) {
                 (rdr as @mut reader).fatal(~"unterminated block comment");
             }
@@ -311,7 +311,7 @@ fn read_block_comment(rdr: @mut StringReader,
     if !is_eof(rdr) && rdr.curr != '\n' && lines.len() == 1u {
         style = mixed;
     }
-    debug2!("<<< block comment");
+    debug!("<<< block comment");
     comments.push(cmnt {style: style, lines: lines, pos: p});
 }
 
@@ -324,15 +324,15 @@ fn peeking_at_comment(rdr: @mut StringReader) -> bool {
 fn consume_comment(rdr: @mut StringReader,
                    code_to_the_left: bool,
                    comments: &mut ~[cmnt]) {
-    debug2!(">>> consume comment");
+    debug!(">>> consume comment");
     if rdr.curr == '/' && nextch(rdr) == '/' {
         read_line_comments(rdr, code_to_the_left, comments);
     } else if rdr.curr == '/' && nextch(rdr) == '*' {
         read_block_comment(rdr, code_to_the_left, comments);
     } else if rdr.curr == '#' && nextch(rdr) == '!' {
         read_shebang_comment(rdr, code_to_the_left, comments);
-    } else { fail2!(); }
-    debug2!("<<< consume comment");
+    } else { fail!(); }
+    debug!("<<< consume comment");
 }
 
 #[deriving(Clone)]
@@ -378,11 +378,11 @@ pub fn gather_comments_and_literals(span_diagnostic:
         let TokenAndSpan {tok: tok, sp: sp} = rdr.peek();
         if token::is_lit(&tok) {
             do with_str_from(rdr, bstart) |s| {
-                debug2!("tok lit: {}", s);
+                debug!("tok lit: {}", s);
                 literals.push(lit {lit: s.to_owned(), pos: sp.lo});
             }
         } else {
-            debug2!("tok: {}", token::to_str(get_ident_interner(), &tok));
+            debug!("tok: {}", token::to_str(get_ident_interner(), &tok));
         }
         first_read = false;
     }
index 8edc171fcacacf8c8e1c9974415532e83a42ec7d..7ac999c46a40017e5f9a5efda8dea962b727f1dd 100644 (file)
@@ -133,7 +133,7 @@ impl reader for TtReader {
     fn is_eof(@mut self) -> bool { self.cur_tok == token::EOF }
     fn next_token(@mut self) -> TokenAndSpan {
         let r = tt_next_token(self);
-        debug2!("TtReader: r={:?}", r);
+        debug!("TtReader: r={:?}", r);
         return r;
     }
     fn fatal(@mut self, m: ~str) -> ! {
@@ -273,7 +273,7 @@ fn hex_digit_val(c: char) -> int {
     if in_range(c, '0', '9') { return (c as int) - ('0' as int); }
     if in_range(c, 'a', 'f') { return (c as int) - ('a' as int) + 10; }
     if in_range(c, 'A', 'F') { return (c as int) - ('A' as int) + 10; }
-    fail2!();
+    fail!();
 }
 
 fn bin_digit_value(c: char) -> int { if c == '0' { return 0; } return 1; }
@@ -576,7 +576,7 @@ fn scan_number(c: char, rdr: @mut StringReader) -> token::Token {
                                ~"int literal is too large")
         };
 
-        debug2!("lexing {} as an unsuffixed integer literal", num_str);
+        debug!("lexing {} as an unsuffixed integer literal", num_str);
         return token::LIT_INT_UNSUFFIXED(parsed as i64);
     }
 }
index 05998d80213951280f61082053878fc61c529ece..c9405d72464bb46d659b76693e3bdcd46ca28089 100644 (file)
@@ -417,18 +417,18 @@ fn sp (a: uint, b: uint) -> Span {
                         _ => assert_eq!("wrong 4","correct")
                     },
                     _ => {
-                        error2!("failing value 3: {:?}",first_set);
+                        error!("failing value 3: {:?}",first_set);
                         assert_eq!("wrong 3","correct")
                     }
                 },
                 _ => {
-                    error2!("failing value 2: {:?}",delim_elts);
+                    error!("failing value 2: {:?}",delim_elts);
                     assert_eq!("wrong","correct");
                 }
 
             },
             _ => {
-                error2!("failing value: {:?}",tts);
+                error!("failing value: {:?}",tts);
                 assert_eq!("wrong 1","correct");
             }
         }
index c776e5bfd38fb4e6ad5c76421e82a175a5bf0622..ed6019e1a55ace0e28adc8babef81f4670b9e278 100644 (file)
@@ -448,7 +448,7 @@ pub fn check_for_erroneous_unit_struct_expecting(&self, expected: &[token::Token
     // followed by some token from the set edible + inedible.  Recover
     // from anticipated input errors, discarding erroneous characters.
     pub fn commit_expr(&self, e: @Expr, edible: &[token::Token], inedible: &[token::Token]) {
-        debug2!("commit_expr {:?}", e);
+        debug!("commit_expr {:?}", e);
         match e.node {
             ExprPath(*) => {
                 // might be unit-struct construction; check for recoverableinput error.
@@ -468,7 +468,7 @@ pub fn commit_expr_expecting(&self, e: @Expr, edible: token::Token) {
     // followed by some token from the set edible + inedible.  Check
     // for recoverable input errors, discarding erroneous characters.
     pub fn commit_stmt(&self, s: @Stmt, edible: &[token::Token], inedible: &[token::Token]) {
-        debug2!("commit_stmt {:?}", s);
+        debug!("commit_stmt {:?}", s);
         let _s = s; // unused, but future checks might want to inspect `s`.
         if self.last_token.as_ref().map_default(false, |t| is_ident_or_path(*t)) {
             let expected = vec::append(edible.to_owned(), inedible);
@@ -933,13 +933,13 @@ pub fn parse_trait_methods(&self) -> ~[trait_method] {
             };
 
             let hi = p.last_span.hi;
-            debug2!("parse_trait_methods(): trait method signature ends in \
+            debug!("parse_trait_methods(): trait method signature ends in \
                     `{}`",
                    self.this_token_to_str());
             match *p.token {
               token::SEMI => {
                 p.bump();
-                debug2!("parse_trait_methods(): parsing required method");
+                debug!("parse_trait_methods(): parsing required method");
                 // NB: at the moment, visibility annotations on required
                 // methods are ignored; this could change.
                 if vis != ast::inherited {
@@ -958,7 +958,7 @@ pub fn parse_trait_methods(&self) -> ~[trait_method] {
                 })
               }
               token::LBRACE => {
-                debug2!("parse_trait_methods(): parsing provided method");
+                debug!("parse_trait_methods(): parsing provided method");
                 let (inner_attrs, body) =
                     p.parse_inner_attrs_and_block();
                 let attrs = vec::append(attrs, inner_attrs);
@@ -1196,7 +1196,7 @@ pub fn is_named_argument(&self) -> bool {
             _ => 0
         };
 
-        debug2!("parser is_named_argument offset:{}", offset);
+        debug!("parser is_named_argument offset:{}", offset);
 
         if offset == 0 {
             is_plain_ident_or_underscore(&*self.token)
@@ -1212,7 +1212,7 @@ pub fn is_named_argument(&self) -> bool {
     pub fn parse_arg_general(&self, require_name: bool) -> arg {
         let is_mutbl = self.eat_keyword(keywords::Mut);
         let pat = if require_name || self.is_named_argument() {
-            debug2!("parse_arg_general parse_pat (require_name:{:?})",
+            debug!("parse_arg_general parse_pat (require_name:{:?})",
                    require_name);
             let pat = self.parse_pat();
 
@@ -1223,7 +1223,7 @@ pub fn parse_arg_general(&self, require_name: bool) -> arg {
             self.expect(&token::COLON);
             pat
         } else {
-            debug2!("parse_arg_general ident_to_pat");
+            debug!("parse_arg_general ident_to_pat");
             ast_util::ident_to_pat(ast::DUMMY_NODE_ID,
                                    *self.last_span,
                                    special_idents::invalid)
@@ -2470,7 +2470,7 @@ pub fn parse_sugary_call_expr(&self, lo: BytePos,
                 // There may be other types of expressions that can
                 // represent the callee in `for` and `do` expressions
                 // but they aren't represented by tests
-                debug2!("sugary call on {:?}", e.node);
+                debug!("sugary call on {:?}", e.node);
                 self.span_fatal(
                     e.span,
                     format!("`{}` must be followed by a block call", keyword));
@@ -3916,7 +3916,7 @@ fn parse_mod_items(&self,
                 attrs = attrs_remaining + attrs;
                 first = false;
             }
-            debug2!("parse_mod_items: parse_item_or_view_item(attrs={:?})",
+            debug!("parse_mod_items: parse_item_or_view_item(attrs={:?})",
                    attrs);
             match self.parse_item_or_view_item(attrs,
                                                true /* macros allowed */) {
@@ -4629,7 +4629,7 @@ fn parse_view_path(&self) -> @view_path {
 
         let first_ident = self.parse_ident();
         let mut path = ~[first_ident];
-        debug2!("parsed view_path: {}", self.id_to_str(first_ident));
+        debug!("parsed view_path: {}", self.id_to_str(first_ident));
         match *self.token {
           token::EQ => {
             // x = foo::bar
@@ -4837,7 +4837,7 @@ fn parse_items_and_view_items(&self,
                     break;
                 }
                 iovi_foreign_item(_) => {
-                    fail2!();
+                    fail!();
                 }
             }
             attrs = self.parse_outer_attributes();
@@ -4860,7 +4860,7 @@ fn parse_items_and_view_items(&self,
                     items.push(item)
                 }
                 iovi_foreign_item(_) => {
-                    fail2!();
+                    fail!();
                 }
             }
         }
index eae3e665b580491bdb9ba5b928db2a36f9582727..27747d94b6614ac7d00fe6903ac63419bbc93ffa 100644 (file)
@@ -219,8 +219,8 @@ pub fn to_str(input: @ident_interner, t: &Token) -> ~str {
                       nt_block(*) => ~"block",
                       nt_stmt(*) => ~"statement",
                       nt_pat(*) => ~"pattern",
-                      nt_attr(*) => fail2!("should have been handled"),
-                      nt_expr(*) => fail2!("should have been handled above"),
+                      nt_attr(*) => fail!("should have been handled"),
+                      nt_expr(*) => fail!("should have been handled above"),
                       nt_ty(*) => ~"type",
                       nt_ident(*) => ~"identifier",
                       nt_path(*) => ~"path",
@@ -275,7 +275,7 @@ pub fn flip_delimiter(t: &token::Token) -> token::Token {
       RPAREN => LPAREN,
       RBRACE => LBRACE,
       RBRACKET => LBRACKET,
-      _ => fail2!()
+      _ => fail!()
     }
 }
 
index 58d73ad687c49cc59196e40c7f1cfe6f88b60271..871584003b51e4a8bca61512f5c801d0a0687c58 100644 (file)
@@ -152,7 +152,7 @@ pub fn mk_printer(out: @io::Writer, linewidth: uint) -> @mut Printer {
     // Yes 3, it makes the ring buffers big enough to never
     // fall behind.
     let n: uint = 3 * linewidth;
-    debug2!("mk_printer {}", linewidth);
+    debug!("mk_printer {}", linewidth);
     let token: ~[token] = vec::from_elem(n, EOF);
     let size: ~[int] = vec::from_elem(n, 0);
     let scan_stack: ~[uint] = vec::from_elem(n, 0u);
@@ -288,7 +288,7 @@ pub fn replace_last_token(&mut self, t: token) {
         self.token[self.right] = t;
     }
     pub fn pretty_print(&mut self, t: token) {
-        debug2!("pp ~[{},{}]", self.left, self.right);
+        debug!("pp ~[{},{}]", self.left, self.right);
         match t {
           EOF => {
             if !self.scan_stack_empty {
@@ -305,7 +305,7 @@ pub fn pretty_print(&mut self, t: token) {
                 self.left = 0u;
                 self.right = 0u;
             } else { self.advance_right(); }
-            debug2!("pp BEGIN({})/buffer ~[{},{}]",
+            debug!("pp BEGIN({})/buffer ~[{},{}]",
                    b.offset, self.left, self.right);
             self.token[self.right] = t;
             self.size[self.right] = -self.right_total;
@@ -313,10 +313,10 @@ pub fn pretty_print(&mut self, t: token) {
           }
           END => {
             if self.scan_stack_empty {
-                debug2!("pp END/print ~[{},{}]", self.left, self.right);
+                debug!("pp END/print ~[{},{}]", self.left, self.right);
                 self.print(t, 0);
             } else {
-                debug2!("pp END/buffer ~[{},{}]", self.left, self.right);
+                debug!("pp END/buffer ~[{},{}]", self.left, self.right);
                 self.advance_right();
                 self.token[self.right] = t;
                 self.size[self.right] = -1;
@@ -330,7 +330,7 @@ pub fn pretty_print(&mut self, t: token) {
                 self.left = 0u;
                 self.right = 0u;
             } else { self.advance_right(); }
-            debug2!("pp BREAK({})/buffer ~[{},{}]",
+            debug!("pp BREAK({})/buffer ~[{},{}]",
                    b.offset, self.left, self.right);
             self.check_stack(0);
             self.scan_push(self.right);
@@ -340,11 +340,11 @@ pub fn pretty_print(&mut self, t: token) {
           }
           STRING(s, len) => {
             if self.scan_stack_empty {
-                debug2!("pp STRING('{}')/print ~[{},{}]",
+                debug!("pp STRING('{}')/print ~[{},{}]",
                        s, self.left, self.right);
                 self.print(t, len);
             } else {
-                debug2!("pp STRING('{}')/buffer ~[{},{}]",
+                debug!("pp STRING('{}')/buffer ~[{},{}]",
                        s, self.left, self.right);
                 self.advance_right();
                 self.token[self.right] = t;
@@ -356,14 +356,14 @@ pub fn pretty_print(&mut self, t: token) {
         }
     }
     pub fn check_stream(&mut self) {
-        debug2!("check_stream ~[{}, {}] with left_total={}, right_total={}",
+        debug!("check_stream ~[{}, {}] with left_total={}, right_total={}",
                self.left, self.right, self.left_total, self.right_total);
         if self.right_total - self.left_total > self.space {
-            debug2!("scan window is {}, longer than space on line ({})",
+            debug!("scan window is {}, longer than space on line ({})",
                    self.right_total - self.left_total, self.space);
             if !self.scan_stack_empty {
                 if self.left == self.scan_stack[self.bottom] {
-                    debug2!("setting {} to infinity and popping", self.left);
+                    debug!("setting {} to infinity and popping", self.left);
                     self.size[self.scan_pop_bottom()] = size_infinity;
                 }
             }
@@ -372,7 +372,7 @@ pub fn check_stream(&mut self) {
         }
     }
     pub fn scan_push(&mut self, x: uint) {
-        debug2!("scan_push {}", x);
+        debug!("scan_push {}", x);
         if self.scan_stack_empty {
             self.scan_stack_empty = false;
         } else {
@@ -408,7 +408,7 @@ pub fn advance_right(&mut self) {
         assert!((self.right != self.left));
     }
     pub fn advance_left(&mut self, x: token, L: int) {
-        debug2!("advnce_left ~[{},{}], sizeof({})={}", self.left, self.right,
+        debug!("advnce_left ~[{},{}], sizeof({})={}", self.left, self.right,
                self.left, L);
         if L >= 0 {
             self.print(x, L);
@@ -451,13 +451,13 @@ pub fn check_stack(&mut self, k: int) {
         }
     }
     pub fn print_newline(&mut self, amount: int) {
-        debug2!("NEWLINE {}", amount);
+        debug!("NEWLINE {}", amount);
         (*self.out).write_str("\n");
         self.pending_indentation = 0;
         self.indent(amount);
     }
     pub fn indent(&mut self, amount: int) {
-        debug2!("INDENT {}", amount);
+        debug!("INDENT {}", amount);
         self.pending_indentation += amount;
     }
     pub fn get_top(&mut self) -> print_stack_elt {
@@ -480,9 +480,9 @@ pub fn print_str(&mut self, s: &str) {
         (*self.out).write_str(s);
     }
     pub fn print(&mut self, x: token, L: int) {
-        debug2!("print {} {} (remaining line space={})", tok_str(x), L,
+        debug!("print {} {} (remaining line space={})", tok_str(x), L,
                self.space);
-        debug2!("{}", buf_str(self.token.clone(),
+        debug!("{}", buf_str(self.token.clone(),
                              self.size.clone(),
                              self.left,
                              self.right,
@@ -491,13 +491,13 @@ pub fn print(&mut self, x: token, L: int) {
           BEGIN(b) => {
             if L > self.space {
                 let col = self.margin - self.space + b.offset;
-                debug2!("print BEGIN -> push broken block at col {}", col);
+                debug!("print BEGIN -> push broken block at col {}", col);
                 self.print_stack.push(print_stack_elt {
                     offset: col,
                     pbreak: broken(b.breaks)
                 });
             } else {
-                debug2!("print BEGIN -> push fitting block");
+                debug!("print BEGIN -> push fitting block");
                 self.print_stack.push(print_stack_elt {
                     offset: 0,
                     pbreak: fits
@@ -505,7 +505,7 @@ pub fn print(&mut self, x: token, L: int) {
             }
           }
           END => {
-            debug2!("print END -> pop END");
+            debug!("print END -> pop END");
             let print_stack = &mut *self.print_stack;
             assert!((print_stack.len() != 0u));
             print_stack.pop();
@@ -514,24 +514,24 @@ pub fn print(&mut self, x: token, L: int) {
             let top = self.get_top();
             match top.pbreak {
               fits => {
-                debug2!("print BREAK({}) in fitting block", b.blank_space);
+                debug!("print BREAK({}) in fitting block", b.blank_space);
                 self.space -= b.blank_space;
                 self.indent(b.blank_space);
               }
               broken(consistent) => {
-                debug2!("print BREAK({}+{}) in consistent block",
+                debug!("print BREAK({}+{}) in consistent block",
                        top.offset, b.offset);
                 self.print_newline(top.offset + b.offset);
                 self.space = self.margin - (top.offset + b.offset);
               }
               broken(inconsistent) => {
                 if L > self.space {
-                    debug2!("print BREAK({}+{}) w/ newline in inconsistent",
+                    debug!("print BREAK({}+{}) w/ newline in inconsistent",
                            top.offset, b.offset);
                     self.print_newline(top.offset + b.offset);
                     self.space = self.margin - (top.offset + b.offset);
                 } else {
-                    debug2!("print BREAK({}) w/o newline in inconsistent",
+                    debug!("print BREAK({}) w/o newline in inconsistent",
                            b.blank_space);
                     self.indent(b.blank_space);
                     self.space -= b.blank_space;
@@ -540,7 +540,7 @@ pub fn print(&mut self, x: token, L: int) {
             }
           }
           STRING(s, len) => {
-            debug2!("print STRING({})", s);
+            debug!("print STRING({})", s);
             assert_eq!(L, len);
             // assert!(L <= space);
             self.space -= len;
@@ -548,7 +548,7 @@ pub fn print(&mut self, x: token, L: int) {
           }
           EOF => {
             // EOF should never get here.
-            fail2!();
+            fail!();
           }
         }
     }
index 0d442dca9b686ec017b422b8b168f0e0c0c3da85..b245bd75ace7286a33be1035eef0480136f33468 100644 (file)
@@ -453,10 +453,10 @@ pub fn print_type(s: @ps, ty: &ast::Ty) {
           word(s.s, ")");
       }
       ast::ty_mac(_) => {
-          fail2!("print_type doesn't know how to print a ty_mac");
+          fail!("print_type doesn't know how to print a ty_mac");
       }
       ast::ty_infer => {
-          fail2!("print_type shouldn't see a ty_infer");
+          fail!("print_type shouldn't see a ty_infer");
       }
 
     }
@@ -701,7 +701,7 @@ pub fn print_struct(s: @ps,
             popen(s);
             do commasep(s, inconsistent, struct_def.fields) |s, field| {
                 match field.node.kind {
-                    ast::named_field(*) => fail2!("unexpected named field"),
+                    ast::named_field(*) => fail!("unexpected named field"),
                     ast::unnamed_field => {
                         maybe_print_comment(s, field.span.lo);
                         print_type(s, &field.node.ty);
@@ -720,7 +720,7 @@ pub fn print_struct(s: @ps,
 
         for field in struct_def.fields.iter() {
             match field.node.kind {
-                ast::unnamed_field => fail2!("unexpected unnamed field"),
+                ast::unnamed_field => fail!("unexpected unnamed field"),
                 ast::named_field(ident, visibility) => {
                     hardbreak_if_not_bol(s);
                     maybe_print_comment(s, field.span.lo);
@@ -1009,7 +1009,7 @@ fn do_else(s: @ps, els: Option<@ast::Expr>) {
               }
               // BLEAH, constraints would be great here
               _ => {
-                  fail2!("print_if saw if with weird alternative");
+                  fail!("print_if saw if with weird alternative");
               }
             }
           }
@@ -1311,7 +1311,7 @@ fn print_field(s: @ps, field: &ast::Field) {
                         }
                         end(s); // close enclosing cbox
                     }
-                    None => fail2!()
+                    None => fail!()
                 }
             } else {
                 // the block will close the pattern's ibox
@@ -2304,7 +2304,7 @@ mod test {
 
     fn string_check<T:Eq> (given : &T, expected: &T) {
         if !(given == expected) {
-            fail2!("given {:?}, expected {:?}", given, expected);
+            fail!("given {:?}, expected {:?}", given, expected);
         }
     }
 
index 78f9d62087baf0c48434b817360db8dca1bca31b..98e5c8c2b5bbd59316a209d5c1e41673bbe95388 100644 (file)
@@ -21,11 +21,11 @@ impl cat {
 
         pub fn eat(&mut self) -> bool {
             if self.how_hungry > 0 {
-                error2!("OM NOM NOM");
+                error!("OM NOM NOM");
                 self.how_hungry -= 2;
                 return true;
             } else {
-                error2!("Not hungry!");
+                error!("Not hungry!");
                 return false;
             }
         }
@@ -33,7 +33,7 @@ pub fn eat(&mut self) -> bool {
 
     impl cat {
         pub fn meow(&mut self) {
-            error2!("Meow");
+            error!("Meow");
             self.meows += 1u;
             if self.meows % 5u == 0u {
                 self.how_hungry += 1;
index 906928d1b79203edf7c985e4aaafefa0329a4173..8fac4a3f322af16db2df251e6a93ba677bf52bb9 100644 (file)
@@ -21,7 +21,7 @@ fn to_str(&self) -> ~str { self.name.clone() }
 
     impl cat {
         fn meow(&mut self) {
-            error2!("Meow");
+            error!("Meow");
             self.meows += 1u;
             if self.meows % 5u == 0u {
                 self.how_hungry += 1;
@@ -35,12 +35,12 @@ impl cat {
 
         pub fn eat(&mut self) -> bool {
             if self.how_hungry > 0 {
-                error2!("OM NOM NOM");
+                error!("OM NOM NOM");
                 self.how_hungry -= 2;
                 return true;
             }
             else {
-                error2!("Not hungry!");
+                error!("Not hungry!");
                 return false;
             }
         }
index 626947306c7297aace6a2c5446620a198045771a..350bd09826fad67c7d66950fd6ee060e63a8289c 100644 (file)
@@ -33,7 +33,7 @@ pub fn alist_get<A:Clone + 'static,
             return entry.value.clone();
         }
     }
-    fail2!();
+    fail!();
 }
 
 #[inline]
index ecc094a612103db250d2cb0f8a1825b1800d04c7..0f762039746f78cd178ae0bbd546a2a4a11c0cb6 100644 (file)
@@ -28,7 +28,7 @@ pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
 #[fixed_stack_segment] #[inline(never)]
 pub fn fact(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         rustrt::rust_dbg_call(cb, n)
     }
 }
index 20b3a3280ec8293ebbcc606e960aa99151ccf082..ea14229cc48a7520683d3871a3652581f86776ae 100644 (file)
@@ -17,7 +17,7 @@ impl <T:Clone> Index<uint,T> for maybe<T> {
     fn index(&self, _idx: &uint) -> T {
         match self {
             &just(ref t) => (*t).clone(),
-            &nothing => { fail2!(); }
+            &nothing => { fail!(); }
         }
     }
 }
index 384f69c736cf0b2309962bf2f6782009d7f2fce0..b3fa8e73cc22292fc9349262d887613eacd446ce 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 pub unsafe fn f(xs: ~[int]) {
-    xs.map(|_x| { unsafe fn q() { fail2!(); } });
+    xs.map(|_x| { unsafe fn q() { fail!(); } });
 }
index 84bf6f0240fbca8c0bc59bcc3880f84c80e7902b..4fc7de9f7d2f5556cee26d9495fbc73fbf972388 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 pub fn foo<T>() {
-    fn death() -> int { fail2!() }
-    debug2!("{:?}", (||{ death() })());
+    fn death() -> int { fail!() }
+    debug!("{:?}", (||{ death() })());
 }
index ef173d52bc4fe55ff694876d2d30304f7d7bbe39..6978b9209d8bcc97db065ecb7acb31d15b839480 100644 (file)
@@ -38,6 +38,6 @@ fn readMaybe(s: ~str) -> Option<bool> {
 pub fn read<T:read>(s: ~str) -> T {
     match read::readMaybe(s) {
       Some(x) => x,
-      _ => fail2!("read failed!")
+      _ => fail!("read failed!")
     }
 }
index 6ce289620fb79846d02fedf1f9c9bc14e0f3e4cf..f549f747ef7971634d2401166f6fbab2fc360a8d 100644 (file)
@@ -138,7 +138,7 @@ fn is_utf8_ascii() {
     for _ in range(0u, 20000) {
         v.push('b' as u8);
         if !str::is_utf8(v) {
-            fail2!("is_utf8 failed");
+            fail!("is_utf8 failed");
         }
     }
 }
@@ -149,7 +149,7 @@ fn is_utf8_multibyte() {
     for _ in range(0u, 5000) {
         v.push_all(s.as_bytes());
         if !str::is_utf8(v) {
-            fail2!("is_utf8 failed");
+            fail!("is_utf8 failed");
         }
     }
 }
index ef6610cd93a3f3d4738cabac1946adc3767650ba..aec0bfb1e657cc7e17f13085c520a38f97eb1327 100644 (file)
@@ -25,6 +25,6 @@ fn main() {
 
     for i in range(0u, n) {
         let x = i.to_str();
-        info2!("{}", x);
+        info!("{}", x);
     }
 }
index ff2eb575ec5c846cf035e200f02f3a16d7cd42aa..97479fc133a67b5aade23eeef2ee9285a85acc7b 100644 (file)
@@ -42,7 +42,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) {
         match requests.try_recv() {
           Some(get_count) => { responses.send(count.clone()); }
           Some(bytes(b)) => {
-            //error2!("server: received {:?} bytes", b);
+            //error!("server: received {:?} bytes", b);
             count += b;
           }
           None => { done = true; }
@@ -50,7 +50,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) {
         }
     }
     responses.send(count);
-    //error2!("server exiting");
+    //error!("server exiting");
 }
 
 fn run(args: &[~str]) {
@@ -70,10 +70,10 @@ fn run(args: &[~str]) {
         worker_results.push(builder.future_result());
         do builder.spawn {
             for _ in range(0u, size / workers) {
-                //error2!("worker {:?}: sending {:?} bytes", i, num_bytes);
+                //error!("worker {:?}: sending {:?} bytes", i, num_bytes);
                 to_child.send(bytes(num_bytes));
             }
-            //error2!("worker {:?} exiting", i);
+            //error!("worker {:?} exiting", i);
         }
     }
     do task::spawn || {
@@ -84,7 +84,7 @@ fn run(args: &[~str]) {
         r.recv();
     }
 
-    //error2!("sending stop message");
+    //error!("sending stop message");
     to_child.send(stop);
     move_out(to_child);
     let result = from_child.recv();
@@ -107,6 +107,6 @@ fn main() {
         args.clone()
     };
 
-    info2!("{:?}", args);
+    info!("{:?}", args);
     run(args);
 }
index 4ce9fb493eb767b7262949376f5d788605bf6d9b..584a8b8befcc6e59100cb2da794a23974f90c3bd 100644 (file)
@@ -37,7 +37,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) {
         match requests.try_recv() {
           Some(get_count) => { responses.send(count.clone()); }
           Some(bytes(b)) => {
-            //error2!("server: received {:?} bytes", b);
+            //error!("server: received {:?} bytes", b);
             count += b;
           }
           None => { done = true; }
@@ -45,7 +45,7 @@ fn server(requests: &Port<request>, responses: &Chan<uint>) {
         }
     }
     responses.send(count);
-    //error2!("server exiting");
+    //error!("server exiting");
 }
 
 fn run(args: &[~str]) {
@@ -64,10 +64,10 @@ fn run(args: &[~str]) {
         worker_results.push(builder.future_result());
         do builder.spawn {
             for _ in range(0u, size / workers) {
-                //error2!("worker {:?}: sending {:?} bytes", i, num_bytes);
+                //error!("worker {:?}: sending {:?} bytes", i, num_bytes);
                 to_child.send(bytes(num_bytes));
             }
-            //error2!("worker {:?} exiting", i);
+            //error!("worker {:?} exiting", i);
         };
     }
     do task::spawn || {
@@ -78,7 +78,7 @@ fn run(args: &[~str]) {
         r.recv();
     }
 
-    //error2!("sending stop message");
+    //error!("sending stop message");
     to_child.send(stop);
     move_out(to_child);
     let result = from_child.recv();
@@ -101,6 +101,6 @@ fn main() {
         args.clone()
     };
 
-    info2!("{:?}", args);
+    info!("{:?}", args);
     run(args);
 }
index 1fa48755663be24c311e9bf1dddfd82a4ef69c23..96e87788b70d8be2ccc064f44dcc4fad5a976ccc 100644 (file)
@@ -66,7 +66,7 @@ fn show_digit(nn: uint) -> ~str {
         7 => {~"seven"}
         8 => {~"eight"}
         9 => {~"nine"}
-        _ => {fail2!("expected digits from 0 to 9...")}
+        _ => {fail!("expected digits from 0 to 9...")}
     }
 }
 
index b4f6e7e4b710b296cb75a272f4b0d34860d1dbe6..88b3cfdff42986b22e8ade806af9daff4e4d3dee 100644 (file)
@@ -66,7 +66,7 @@ fn parse_opts(argv: ~[~str]) -> Config {
       Ok(ref m) => {
           return Config {stress: m.opt_present("stress")}
       }
-      Err(_) => { fail2!(); }
+      Err(_) => { fail!(); }
     }
 }
 
@@ -76,7 +76,7 @@ fn stress_task(id: int) {
         let n = 15;
         assert_eq!(fib(n), fib(n));
         i += 1;
-        error2!("{}: Completed {} iterations", id, i);
+        error!("{}: Completed {} iterations", id, i);
     }
 }
 
index 0c0c5226dcea08844a7da91133d5a9e350a96c3b..5e0968163064134ae6e2f525d93e261356bcee31 100644 (file)
@@ -44,7 +44,7 @@ fn roundtrip(id: int, n_tasks: int, p: &Port<int>, ch: &Chan<int>) {
             return;
           }
           token => {
-            info2!("thread: {}   got token: {}", id, token);
+            info!("thread: {}   got token: {}", id, token);
             ch.send(token - 1);
             if token <= n_tasks {
                 return;
index 91d9c9656af96663554aa1362c978b4a02d20890..a4e32b4c074a6eb72dc238a8cd00d2f0f786beca 100644 (file)
@@ -79,7 +79,7 @@ pub fn read(reader: @io::Reader) -> Sudoku {
                 g[row][col] = from_str::<uint>(comps[2]).unwrap() as u8;
             }
             else {
-                fail2!("Invalid sudoku file");
+                fail!("Invalid sudoku file");
             }
         }
         return Sudoku::new(g)
@@ -117,7 +117,7 @@ pub fn solve(&mut self) {
                 ptr = ptr + 1u;
             } else {
                 // no: redo this field aft recoloring pred; unless there is none
-                if ptr == 0u { fail2!("No solution found for this sudoku"); }
+                if ptr == 0u { fail!("No solution found for this sudoku"); }
                 ptr = ptr - 1u;
             }
         }
index 639cbd05cbf7a3b7aa0d8dc72dd0202660a541ae..7ee0c3e13ce9d0b7c7b37350e50ec55f9f205493 100644 (file)
@@ -31,11 +31,11 @@ fn main() {
 
 fn run(repeat: int, depth: int) {
     for _ in range(0, repeat) {
-        info2!("starting {:.4f}", precise_time_s());
+        info!("starting {:.4f}", precise_time_s());
         do task::try {
             recurse_or_fail(depth, None)
         };
-        info2!("stopping {:.4f}", precise_time_s());
+        info!("stopping {:.4f}", precise_time_s());
     }
 }
 
@@ -68,8 +68,8 @@ fn r(l: @nillist) -> r {
 
 fn recurse_or_fail(depth: int, st: Option<State>) {
     if depth == 0 {
-        info2!("unwinding {:.4f}", precise_time_s());
-        fail2!();
+        info!("unwinding {:.4f}", precise_time_s());
+        fail!();
     } else {
         let depth = depth - 1;
 
index ac028686f08e18cb42a2ea507324bbcf0d3c02bc..0827f7d34475b28aa683582dcdb335c7ab76e1d8 100644 (file)
@@ -54,6 +54,6 @@ fn main() {
     let (p,c) = comm::stream();
     child_generation(from_str::<uint>(args[1]).unwrap(), c);
     if p.try_recv().is_none() {
-        fail2!("it happened when we slumbered");
+        fail!("it happened when we slumbered");
     }
 }
index 3b64cb38c7e27920196ba6c9aba605a5ffa6ea78..5484a3965b3a895ec63edeee0e389441a3b08d15 100644 (file)
@@ -43,13 +43,13 @@ fn grandchild_group(num_tasks: uint) {
             p.recv(); // block forever
         }
     }
-    error2!("Grandchild group getting started");
+    error!("Grandchild group getting started");
     for _ in range(0, num_tasks) {
         // Make sure all above children are fully spawned; i.e., enlisted in
         // their ancestor groups.
         po.recv();
     }
-    error2!("Grandchild group ready to go.");
+    error!("Grandchild group ready to go.");
     // Master grandchild task exits early.
 }
 
@@ -58,7 +58,7 @@ fn spawn_supervised_blocking(myname: &str, f: ~fn()) {
     let res = builder.future_result();
     builder.supervised();
     builder.spawn(f);
-    error2!("{} group waiting", myname);
+    error!("{} group waiting", myname);
     let x = res.recv();
     assert_eq!(x, task::Success);
 }
@@ -84,11 +84,11 @@ fn main() {
                 grandchild_group(num_tasks);
             }
             // When grandchild group is ready to go, make the middle group exit.
-            error2!("Middle group wakes up and exits");
+            error!("Middle group wakes up and exits");
         }
         // Grandparent group waits for middle group to be gone, then fails
-        error2!("Grandparent group wakes up and fails");
-        fail2!();
+        error!("Grandparent group wakes up and fails");
+        fail!();
     };
     assert!(x.is_err());
 }
index 87d03290b46f17fa7e3bfb84b7ef6d4e8d7a6b65..4e934d988019b45709b2d1d5924393857adbb09c 100644 (file)
@@ -11,7 +11,7 @@
 // xfail-fast #[feature] doesn't work with check-fast
 #[feature(asm)];
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "x86_64")]
index 629d8082f44408057f626e831a19bcf053c0b808..599ab76e61ce9c5cc79a4a6628ba29d7db2a911e 100644 (file)
@@ -11,7 +11,7 @@
 // xfail-fast #[feature] doesn't work with check-fast
 #[feature(asm)];
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "x86_64")]
index 80237f331bca755c6d71c8abfd957b847e46d649..b520c27c80ed013648440a7085f5da3c82b0e232 100644 (file)
@@ -11,7 +11,7 @@
 // xfail-fast #[feature] doesn't work with check-fast
 #[feature(asm)];
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "x86_64")]
index ce3bbcebec2a2d968921446d1578821f9e0ac6f4..f49624295b1debde02e0cfd6ab11337fd06b81b0 100644 (file)
@@ -11,7 +11,7 @@
 // xfail-fast #[feature] doesn't work with check-fast
 #[feature(asm)];
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "x86_64")]
index f60b67cf8420f037d4eb94b7de4f875a6729eb72..e11b47a1b582c527725ce4ea0b9d05870eac96af 100644 (file)
@@ -11,9 +11,9 @@
 fn test() {
     let v: int;
     v = 1; //~ NOTE prior assignment occurs here
-    info2!("v={}", v);
+    info!("v={}", v);
     v = 2; //~ ERROR re-assignment of immutable variable
-    info2!("v={}", v);
+    info!("v={}", v);
 }
 
 fn main() {
index 32f27f64f54d596a57d56b3a7317ef70a05e90ca..f300bd51b24eca1582df34ca467bfdaf8e6e1242 100644 (file)
@@ -27,5 +27,5 @@ fn cat(in_x : uint, in_y : int) -> cat {
 
 fn main() {
   let nyan : cat = cat(52u, 99);
-  nyan.speak = || info2!("meow"); //~ ERROR attempted to take value of method
+  nyan.speak = || info!("meow"); //~ ERROR attempted to take value of method
 }
index ae911b54107908ad8db90dfc314858ff6e805586..b8af09e308b487eb2214d56abd83a29bf8d0905b 100644 (file)
@@ -21,11 +21,11 @@ fn main() {
     let a: clam = clam{x: @1, y: @2};
     let b: clam = clam{x: @10, y: @20};
     let z: int = a.x + b.y; //~ ERROR binary operation + cannot be applied to type `@int`
-    info2!("{:?}", z);
+    info!("{:?}", z);
     assert_eq!(z, 21);
     let forty: fish = fish{a: @40};
     let two: fish = fish{a: @2};
     let answer: int = forty.a + two.a;  //~ ERROR binary operation + cannot be applied to type `@int`
-    info2!("{:?}", answer);
+    info!("{:?}", answer);
     assert_eq!(answer, 42);
 }
index a9e9ed64d9a37375f3b46ab04feb266eda4dfdd1..2ffb5dd29066f37f712f0c54823627e19a2dd4a9 100644 (file)
@@ -12,7 +12,7 @@
 // Tests that a function with a ! annotation always actually fails
 
 fn bad_bang(i: uint) -> ! {
-    if i < 0u { } else { fail2!(); }
+    if i < 0u { } else { fail!(); }
     //~^ ERROR expected `!` but found `()`
 }
 
index 095a85ab21e96c05c1056b67abf6627d044e4c63..08ced2b002da614816579b5776e2e563077fd55d 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:expected `~str` but found `int`
 
 static i: ~str = 10i;
-fn main() { info2!("{:?}", i); }
+fn main() { info!("{:?}", i); }
index 262248f9dc3b795691610c6a5dd79407d152f5ad..3d1cca46085dbf06f8d9f95a890360b85d309391 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: () }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("destructor runs");
+        error!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some(X { x: () });
     match x {
         Some(ref _y @ _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail2!()
+        None => fail!()
     }
 }
index bf665e6fb60b28eb43422e9435d4a4a66ba50a82..a1803a621a53fc2996f4ddea13508ddcc58a5d0d 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("destructor runs");
+        error!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some((X { x: () }, X { x: () }));
     match x {
         Some((ref _y, _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail2!()
+        None => fail!()
     }
 }
index fcb9dbb300c82e3aca02689fcd55ec18c7937cd0..34a9c0b8fc26d01fdcdbcc6ead782b013377ef62 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("destructor runs");
+        error!("destructor runs");
     }
 }
 
@@ -22,6 +22,6 @@ fn main() {
     let x = some2(X { x: () }, X { x: () });
     match x {
         some2(ref _y, _z) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        none2 => fail2!()
+        none2 => fail!()
     }
 }
index 19076181c512293253c49a5bb02fae3d83bf0bfb..2aa3379993b7abaf195f247baa57c9707d592a04 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("destructor runs");
+        error!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some((X { x: () }, X { x: () }));
     match x {
         Some((_y, ref _z)) => { }, //~ ERROR cannot bind by-move and by-ref in the same pattern
-        None => fail2!()
+        None => fail!()
     }
 }
index 5c0274b03d09a76ad806977c6ec0225b4bdf5328..348781d74977e79710b52ee6563fd2d088f4f233 100644 (file)
@@ -15,8 +15,8 @@ fn main() {
     let x = Some(p);
     c.send(false);
     match x {
-        Some(z) if z.recv() => { fail2!() }, //~ ERROR cannot bind by-move into a pattern guard
+        Some(z) if z.recv() => { fail!() }, //~ ERROR cannot bind by-move into a pattern guard
         Some(z) => { assert!(!z.recv()); },
-        None => fail2!()
+        None => fail!()
     }
 }
index 9b7cc41e5c875729b7028f4febd5632c247b1e48..7143ce0252b733c4b5683f3d2453fe753d16a317 100644 (file)
@@ -12,7 +12,7 @@ struct X { x: (), }
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("destructor runs");
+        error!("destructor runs");
     }
 }
 
@@ -20,6 +20,6 @@ fn main() {
     let x = Some(X { x: () });
     match x {
         Some(_y @ ref _z) => { }, //~ ERROR cannot bind by-move with sub-bindings
-        None => fail2!()
+        None => fail!()
     }
 }
index 71a0b8b7a8e85b45db9f18facab153fc1334333c..7637ebdc80dcc5422b5a2d7cded9b6c5f3ef6ff7 100644 (file)
@@ -17,6 +17,6 @@ fn compute1() -> f64 {
 
 fn main() {
     let x = compute1();
-    info2!("{:?}", x);
+    info!("{:?}", x);
     assert_eq!(x, -4f64);
 }
index 379b71f741173e7179de1ff18740e1559ac6a912..71afba18bb1ff46f197b5ebdf00ae44ce9cd91a1 100644 (file)
@@ -21,6 +21,6 @@ fn fn_id(f: extern fn()) -> extern fn() { return f }
 
 fn main() {
     let i = 8;
-    let f = coerce(|| error2!("{:?}", i) );
+    let f = coerce(|| error!("{:?}", i) );
     f();
 }
index c14989fcbbb6c8a9179af97aca11a6e51723db98..63d12b72cc6353c1fcd8e2d4a404751d0bb12d36 100644 (file)
@@ -17,7 +17,7 @@ enum color { rgb(int, int, int), rgba(int, int, int, int), }
 fn main() {
     let red: color = rgb(255, 0, 0);
     match red {
-      rgb(r, g, b) => { info2!("rgb"); }
-      hsl(h, s, l) => { info2!("hsl"); }
+      rgb(r, g, b) => { info!("rgb"); }
+      hsl(h, s, l) => { info!("hsl"); }
     }
 }
index ce3aff59d7a63470bff7c85c2120cab99613ad87..da0a9323d2c8178da4b8cff2cf4db54e790596c8 100644 (file)
@@ -10,12 +10,12 @@ fn distinct_variant() {
 
     let a = match y {
       Y(ref mut a, _) => a,
-      X => fail2!()
+      X => fail!()
     };
 
     let b = match y {
       Y(_, ref mut b) => b,
-      X => fail2!()
+      X => fail!()
     };
 
     *a += 1;
@@ -27,12 +27,12 @@ fn same_variant() {
 
     let a = match y {
       Y(ref mut a, _) => a,
-      X => fail2!()
+      X => fail!()
     };
 
     let b = match y {
       Y(ref mut b, _) => b, //~ ERROR cannot borrow
-      X => fail2!()
+      X => fail!()
     };
 
     *a += 1;
index 8c4d681d9835dba2c3ca03e1e0300e279fff3efb..81e16b6b615ed715544cb2909f057fc0ea740ca9 100644 (file)
@@ -21,7 +21,7 @@ fn a() {
 
     p[0] = 5; //~ ERROR cannot assign
 
-    info2!("{}", *q);
+    info!("{}", *q);
 }
 
 fn borrow(_x: &[int], _f: &fn()) {}
index 487a16c1836d17c51a6951ba56d6936c71bd63a6..4bbd1b0decf57c8b3f222bf80669e30564b0f0b4 100644 (file)
@@ -24,7 +24,7 @@ fn main() {
                 x = X(Left((0,0))); //~ ERROR cannot assign to `x`
                 (*f)()
             },
-            _ => fail2!()
+            _ => fail!()
         }
     }
 }
index c7cb9ce27f2bb02e28197352a23acb15403d8a57..1051c5829ec387cd9e5957a6b48e8f042a13bdec 100644 (file)
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> ~Foo { fail2!() }
+fn make_foo() -> ~Foo { fail!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();
index d01fd86f2886ae9885012c35391951e5c146cb58..cdcf50c906e3655234f3a9cdd276d505a8e99355 100644 (file)
@@ -18,7 +18,7 @@ struct Bar {
   int2: int,
 }
 
-fn make_foo() -> Foo { fail2!() }
+fn make_foo() -> Foo { fail!() }
 
 fn borrow_same_field_twice_mut_mut() {
     let mut foo = make_foo();
index 918e06fad07d4a59610b2f1db81f4ae685b1c90c..cc196a6f7cf57454639b7881a5612cddab22f152 100644 (file)
@@ -16,7 +16,7 @@ struct defer<'self> {
 impl<'self> Drop for defer<'self> {
     fn drop(&mut self) {
         unsafe {
-            error2!("{:?}", self.x);
+            error!("{:?}", self.x);
         }
     }
 }
index 1058211a6e455e3a3276cad3e63722ee87e728a7..563f63b98be05528580535b642cbc6bc77fd11f6 100644 (file)
@@ -16,9 +16,9 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail2!() }
-fn for_func(_f: &fn() -> bool) { fail2!() }
-fn produce<T>() -> T { fail2!(); }
+fn cond() -> bool { fail!() }
+fn for_func(_f: &fn() -> bool) { fail!() }
+fn produce<T>() -> T { fail!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index 99112985be674d5a3fa926a4006e2be04e24b622..9286340f6c9f5f79803c7fe8100ea3fb098ba481 100644 (file)
@@ -16,8 +16,8 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail2!() }
-fn produce<T>() -> T { fail2!(); }
+fn cond() -> bool { fail!() }
+fn produce<T>() -> T { fail!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index b6a30da46f830ffe02eb31d4b265e3184d7d21f2..d5c5597e57fce15f3d0794bd44e92e6872b51b27 100644 (file)
@@ -13,7 +13,7 @@
 #[allow(unused_variable)];
 #[allow(dead_assignment)];
 
-fn cond() -> bool { fail2!() }
+fn cond() -> bool { fail!() }
 fn link<'a>(v: &'a uint, w: &mut &'a uint) -> bool { *w = v; true }
 
 fn separate_arms() {
index c51d6117e5ca146bd691478579bc4ff2e7f50f40..ea840a28b4e6ac97efd6fe7ebb3af8bbcbe691a9 100644 (file)
@@ -16,9 +16,9 @@
 
 fn borrow(_v: &int) {}
 fn borrow_mut(_v: &mut int) {}
-fn cond() -> bool { fail2!() }
-fn for_func(_f: &fn() -> bool) { fail2!() }
-fn produce<T>() -> T { fail2!(); }
+fn cond() -> bool { fail!() }
+fn for_func(_f: &fn() -> bool) { fail!() }
+fn produce<T>() -> T { fail!(); }
 
 fn inc(v: &mut ~int) {
     *v = ~(**v + 1);
index 32dfa59927f5134070f423931f5b2ea291a8fb75..0284f234d9a5a21841e68ac51a2800ce8ecd1b12 100644 (file)
@@ -18,14 +18,14 @@ fn box_imm() {
     let v = ~3;
     let _w = &v;
     do task::spawn {
-        info2!("v={}", *v);
+        info!("v={}", *v);
         //~^ ERROR cannot move `v` into closure
     }
 
     let v = ~3;
     let _w = &v;
     task::spawn(|| {
-        info2!("v={}", *v);
+        info!("v={}", *v);
         //~^ ERROR cannot move
     });
 }
index 9d9dd5b1ad8bdbe8d6640dfc0ca05e43a0d680a2..e2136c82313efc63e0d769995e804d4d0113c300 100644 (file)
@@ -16,7 +16,7 @@ fn f(x: &mut Either<int,f64>, y: &Either<int,f64>) -> int {
                 *x = Right(1.0);
                 *z
             }
-            _ => fail2!()
+            _ => fail!()
         }
     }
 
index 145aaa405a6e89a3580eafb35ea11cb9c70f76ba..4b6a2eca1af1df5ce4221fe1223831ff3a8cd399 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
                 }
             }
             let z = tail[0].clone();
-            info2!("{:?}", z);
+            info!("{:?}", z);
         }
         _ => {
             unreachable!();
index 56e047e5bc52253cd5c0cba5249454b16bb1c394..cab2a5565f4ec671a85abfa295d7df87c22169d4 100644 (file)
@@ -12,5 +12,5 @@ fn main() {
     let x: int = 3;
     let y: &mut int = &mut x; //~ ERROR cannot borrow
     *y = 5;
-    info2!("{:?}", *y);
+    info!("{:?}", *y);
 }
index bd0b4afe730c901317cbfe98a08e80095cf1b9e9..cb56e929754da1ccf77669eb819f65065e54372b 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
         Some(ref m) => { //~ ERROR borrowed value does not live long enough
             msg = m;
         },
-        None => { fail2!() }
+        None => { fail!() }
     }
     println(*msg);
 }
index 53e69fc1611aa911d2359b08634d5e7ebbb349cb..ca20d68e4cdcbde130e1e448ab4ef9cec03edeab 100644 (file)
@@ -2,7 +2,7 @@ fn a() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let tail = match vec {
         [_, ..tail] => tail, //~ ERROR does not live long enough
-        _ => fail2!("a")
+        _ => fail!("a")
     };
     tail
 }
@@ -11,7 +11,7 @@ fn b() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let init = match vec {
         [..init, _] => init, //~ ERROR does not live long enough
-        _ => fail2!("b")
+        _ => fail!("b")
     };
     init
 }
@@ -20,7 +20,7 @@ fn c() -> &[int] {
     let vec = ~[1, 2, 3, 4];
     let slice = match vec {
         [_, ..slice, _] => slice, //~ ERROR does not live long enough
-        _ => fail2!("c")
+        _ => fail!("c")
     };
     slice
 }
index b31e49bceb505087f54b4c546e916a341c7e4ee1..02ba1b9d2fffb634f41b8336a5aedfc7bbccfe71 100644 (file)
@@ -4,7 +4,7 @@ fn a() {
         [~ref _a] => {
             vec[0] = ~4; //~ ERROR cannot assign to `(*vec)[]` because it is borrowed
         }
-        _ => fail2!("foo")
+        _ => fail!("foo")
     }
 }
 
index e0c2d08e413399f3c17535e461b93b6625ba3b16..e542238d035665c2b56f238f167877663d939223 100644 (file)
@@ -2,7 +2,7 @@ fn a() -> &int {
     let vec = ~[1, 2, 3, 4];
     let tail = match vec {
         [_a, ..tail] => &tail[0], //~ ERROR borrowed value does not live long enough
-        _ => fail2!("foo")
+        _ => fail!("foo")
     };
     tail
 }
index 6f483b82d818336eb05ae22770f98e495e7509ed..0d1582bf85713b654dc3c68efa5cbb5d58cce8b6 100644 (file)
@@ -22,12 +22,12 @@ struct cat {
 impl cat {
   pub fn eat(&self) -> bool {
     if self.how_hungry > 0 {
-        error2!("OM NOM NOM");
+        error!("OM NOM NOM");
         self.how_hungry -= 2;
         return true;
     }
     else {
-        error2!("Not hungry!");
+        error!("Not hungry!");
         return false;
     }
   }
@@ -40,7 +40,7 @@ impl noisy for cat {
 
 impl cat {
     fn meow(&self) {
-      error2!("Meow");
+      error!("Meow");
       self.meows += 1;
       if self.meows % 5 == 0 {
           self.how_hungry += 1;
index 101f96ce0b47cb4ebfabc474dc2f4944edb23d2a..c27c27b5942e1b3276e86c410a94a21883c57b8b 100644 (file)
@@ -15,7 +15,7 @@ struct cat {
 impl cat {
     fn sleep(&self) { loop{} }
     fn meow(&self) {
-      error2!("Meow");
+      error!("Meow");
       meows += 1u; //~ ERROR unresolved name
       sleep();     //~ ERROR unresolved name
     }
index 6663cff9b5632141677db824f2948346c498bf5e..aad0e8bcbb6dd874fa5ead459190574cdcfeb112 100644 (file)
@@ -2,6 +2,6 @@ fn foo(f: &fn() -> !) {}
 
 fn main() {
     // Type inference didn't use to be able to handle this:
-    foo(|| fail2!());
+    foo(|| fail!());
     foo(|| 22); //~ ERROR mismatched types
 }
index 771f2b2dfb680454225c813db095076088f225c1..7e928e190a327e748fab93ef51b67b8f32558d47 100644 (file)
@@ -26,5 +26,5 @@ fn main() {
     let x = foo(10);
     let _y = x.clone();
     //~^ ERROR does not implement any method in scope
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 86c56f7ae8190a1105dece47fcc5da8b50436833..7b1b0f6243ac4321b22ebd7470b7d8be4441979e 100644 (file)
@@ -10,6 +10,6 @@
 
 fn main() {
   match *1 { //~ ERROR: cannot be dereferenced
-      _ => { fail2!(); }
+      _ => { fail!(); }
   }
 }
index aac6cd118b204884ce23647a8f070c12d8fe89ad..945c3d6295277435469d1ad75d7ed00912334615 100644 (file)
@@ -14,7 +14,7 @@ struct X {
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("value: {}", self.x);
+        error!("value: {}", self.x);
     }
 }
 
@@ -26,5 +26,5 @@ fn unwrap(x: X) -> ~str {
 fn main() {
     let x = X { x: ~"hello" };
     let y = unwrap(x);
-    error2!("contents: {}", y);
+    error!("contents: {}", y);
 }
index e14900c4bb44cb0553aa5018691dc3a197eafcff..0432920c1a6fe1a49c4fcf4111ef35390627c465 100644 (file)
@@ -14,7 +14,7 @@ struct X {
 
 impl Drop for X {
     fn drop(&mut self) {
-        error2!("value: {}", self.x);
+        error!("value: {}", self.x);
     }
 }
 
@@ -22,7 +22,7 @@ fn main() {
     let x = X { x: ~"hello" };
 
     match x {
-        X { x: y } => error2!("contents: {}", y)
+        X { x: y } => error!("contents: {}", y)
         //~^ ERROR cannot move out of type `X`, which defines the `Drop` trait
     }
 }
index dc32e8e10226cc5601a132c9ed577cfc965b1e31..9d2b68ddb81ef6ce2cd712ac3160e3941998c7c2 100644 (file)
@@ -1,2 +1,2 @@
 // error-pattern: unresolved name `this_does_nothing_what_the`.
-fn main() { info2!("doing"); this_does_nothing_what_the; info2!("boing"); }
+fn main() { info!("doing"); this_does_nothing_what_the; info!("boing"); }
index 3fdd4000b1b9ab383f6cf765231ad70474b90bfb..22762eb4a7eb514d54cbe8c37b38422abbce6ef8 100644 (file)
@@ -15,7 +15,7 @@ mod foo {
 }
 
 mod bar {
-    fn x() { info2!("x"); }
+    fn x() { info!("x"); }
 
     pub fn y() { }
 }
index 4dce462bd416d9304e999c85a36074be32386ed4..98270bdc583835e63d9b274d6dd1e3996cdac965 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for int
 
-fn main() { fail2!(5); }
+fn main() { fail!(5); }
index bcede4483c744bf06ff7bbc5106453450f2024de..7def16770a790d9e39f7f22f7982c3a38bdee63c 100644 (file)
@@ -12,5 +12,5 @@
 
 // error-pattern:unexpected token
 fn main() {
-  fail2!(@);
+  fail!(@);
 }
index 341f60eeedf8d57018579eb5f0272861bdb1cdf3..b6755249bcf98108dce766569262e59a522784ff 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern:failed to find an implementation of trait std::sys::FailWithCause for ~[int]
-fn main() { fail2!(~[0i]); }
+fn main() { fail!(~[0i]); }
index c5fb22c68210682388c10bfe8e9a993dd828121f..dcda6afa6ca1e366b2364b5d6a734495800e94ec 100644 (file)
@@ -12,5 +12,5 @@
 
 fn main() {
     let a = if true { true };
-    info2!("{:?}", a);
+    info!("{:?}", a);
 }
index 233826bcc7d5edfcb1ef8380dd8a62482184bcf9..124d4631601d6d34c9e8d0f3d7e29f318d3d6364 100644 (file)
 use module_of_many_things::*;
 
 mod module_of_many_things {
-    pub fn f1() { info2!("f1"); }
-    pub fn f2() { info2!("f2"); }
-    fn f3() { info2!("f3"); }
-    pub fn f4() { info2!("f4"); }
+    pub fn f1() { info!("f1"); }
+    pub fn f2() { info!("f2"); }
+    fn f3() { info!("f3"); }
+    pub fn f4() { info!("f4"); }
 }
 
 
index 23b449fe061e33e25c7e4a1ce92dff79bce3b036..ae5a0f04e2c043d45b15058fae613f8df176c302 100644 (file)
 
 mod circ1 {
     pub use circ2::f2;
-    pub fn f1() { info2!("f1"); }
+    pub fn f1() { info!("f1"); }
     pub fn common() -> uint { return 0u; }
 }
 
 mod circ2 {
     pub use circ1::f1;
-    pub fn f2() { info2!("f2"); }
+    pub fn f2() { info!("f2"); }
     pub fn common() -> uint { return 1u; }
 }
 
index 129a4aece8f5e4172a696790347cf47062469b87..5177dc4e47570caa711ee236b52fed63724dddf0 100644 (file)
@@ -12,6 +12,6 @@
 use zed::bar;
 use zed::baz;
 mod zed {
-    pub fn bar() { info2!("bar"); }
+    pub fn bar() { info!("bar"); }
 }
 fn main(args: ~[str]) { bar(); }
index 8cebbdbc176fb176f621b7b94016497948175e3b..e67a79130b1f9a6e0529088136cf7aa14a2166e7 100644 (file)
@@ -13,6 +13,6 @@
 
 mod baz {}
 mod zed {
-    pub fn bar() { info2!("bar3"); }
+    pub fn bar() { info!("bar3"); }
 }
 fn main(args: ~[str]) { bar(); }
index f05a90acc9dd35bfb580f63c3dd9b62d04f2b5ae..7a7f4f20aea07f1b4dc57eba1a17d144120c92df 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern: unresolved
 use main::bar;
 
-fn main(args: ~[str]) { info2!("foo"); }
+fn main(args: ~[str]) { info!("foo"); }
index bcc93407ec15af88039e328af75487121d93f9cf..087842d78c709f6910011c49886675be479cf420 100644 (file)
@@ -13,4 +13,4 @@
 mod a { pub use b::foo; }
 mod b { pub use a::foo; }
 
-fn main(args: ~[str]) { info2!("loop"); }
+fn main(args: ~[str]) { info!("loop"); }
index bf419db39541f8c5d759792a07eb99b171b35c66..e2ca7641500c3014f11aa2e05dcfaffc64005b46 100644 (file)
@@ -13,5 +13,5 @@
 fn foo(a: uint) -> uint { a }
 
 fn main() {
-    info2!("{:u}", foo(10i)); //~ ERROR mismatched types
+    info!("{:u}", foo(10i)); //~ ERROR mismatched types
 }
index 5e1a69227e57d4f8cb4095ff51083d84792e08ab..ed2e75c4fa602fff2e726bc9edad452f711d2b9c 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    error2!("{:?}", x); //~ ERROR unresolved name `x`.
+    error!("{:?}", x); //~ ERROR unresolved name `x`.
 }
index 1e427ceb4b73dc857c04dda73826450325f716c6..3da01c6fb01398fb105dae508654b5cde55c4551 100644 (file)
@@ -14,7 +14,7 @@ trait vec_monad<A> {
 
 impl<A> vec_monad<A> for ~[A] {
     fn bind<B>(&self, f: &fn(A) -> ~[B]) {
-        let mut r = fail2!();
+        let mut r = fail!();
         for elt in self.iter() { r = r + f(*elt); }
         //~^ ERROR the type of this value must be known
    }
index 1c4df25f353bf4c3dedd77a1af0f32d776e0711b..64344ab4277939605bdaea6b4c13063dab6fa0fd 100644 (file)
@@ -13,7 +13,7 @@
 
 fn fail_len(v: ~[int]) -> uint {
     let mut i = 3;
-    fail2!();
+    fail!();
     for x in v.iter() { i += 1u; }
     //~^ ERROR: unreachable statement
     return i;
index db02bb5e55b60535dc776189711419dccda0a9f6..5559ba344ed17a44e61bc775f65e77413276e033 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn main() {
-    let x = fail2!();
+    let x = fail!();
     x.clone(); //~ ERROR the type of this value must be known in this context
 }
index b9b26e12b40fe658dd9f7eb46eeab55567b7428a..7896d91443dadd6cbfdc7afb758e650ca9dcf57b 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern: unresolved name `foobar`.
 
-fn main(args: ~[str]) { info2!("{:?}", foobar); }
+fn main(args: ~[str]) { info!("{:?}", foobar); }
index c8f835ccdc9aad15ee28655eea97557c02d50f26..6152e82294d1b51f9d0d4faa28506f0cf48117ae 100644 (file)
@@ -16,7 +16,7 @@ trait channel<T> {
 
 // `chan` is not a trait, it's an enum
 impl chan for int { //~ ERROR chan is not a trait
-    fn send(&self, v: int) { fail2!() }
+    fn send(&self, v: int) { fail!() }
 }
 
 fn main() {
index 247ef3d751f4852453d0240e08e352f3d1ec9c59..dc4530d586eae832ff694eda8b625acc5cd40688 100644 (file)
@@ -15,5 +15,5 @@ struct cat {
 
 fn main() {
     let kitty : cat = cat { x: () };
-    error2!("{:?}", *kitty);
+    error!("{:?}", *kitty);
 }
index 5754b4bb472e04b6f40afe6d0b891dac4dc4f066..656088a00b7dd3ad158745e8f324641ef96d2a99 100644 (file)
@@ -15,5 +15,5 @@ struct cat {
 
 fn main() {
     let nyan = cat { foo: () };
-    error2!("{:?}", *nyan);
+    error!("{:?}", *nyan);
 }
index 77f07a9d793e28c0a5e47fcdb590e1dba281f38c..c62c28745253d157977417675c3758126fcdf2e8 100644 (file)
@@ -20,7 +20,7 @@ struct E {
 }
 
 impl A for E {
-  fn b<F:Freeze,G>(_x: F) -> F { fail2!() } //~ ERROR type parameter 0 requires `Freeze`
+  fn b<F:Freeze,G>(_x: F) -> F { fail!() } //~ ERROR type parameter 0 requires `Freeze`
 }
 
 fn main() {}
index 7dc6dd6a85208ce2c1d65de6c972c956c2984794..9b8346da5c5d932dc2886938037bb32cbe931fb3 100644 (file)
@@ -21,7 +21,7 @@ struct E {
 
 impl A for E {
   // n.b. The error message is awful -- see #3404
-  fn b<F:Clone,G>(&self, _x: G) -> G { fail2!() } //~ ERROR method `b` has an incompatible type
+  fn b<F:Clone,G>(&self, _x: G) -> G { fail!() } //~ ERROR method `b` has an incompatible type
 }
 
 fn main() {}
index 49bc3b9ba6c3f3ed406390c346983f34fd257715..790a5fac18305106cec096e3ca185e0caacde9bb 100644 (file)
@@ -14,7 +14,7 @@ struct C {
 
 impl Drop for C {
     fn drop(&mut self) {
-        error2!("dropping: {:?}", self.x);
+        error!("dropping: {:?}", self.x);
     }
 }
 
index f8e355360d709a370669465dde21043528a32f20..56ade814db0207bf60ff70c2a245ec00064e4365 100644 (file)
@@ -25,7 +25,7 @@ fn reset(&self) {
            //~^ ERROR unresolved name `k0`.
         }
     }
-    fail2!();
+    fail!();
 }
 
 fn main() {}
index 3ab44b6674806b9ef80ec44a9e316df3bde1fc67..d0c7a07859ea691e9145252cf4a66b372253a2f0 100644 (file)
@@ -19,13 +19,13 @@ fn main()
 {
 
     let _z = match g(1, 2) {
-      g(x, x) => { info2!("{:?}", x + x); }
+      g(x, x) => { info!("{:?}", x + x); }
       //~^ ERROR Identifier `x` is bound more than once in the same pattern
     };
 
     let _z = match i(l(1, 2), m(3, 4)) {
       i(l(x, _), m(_, x))  //~ ERROR Identifier `x` is bound more than once in the same pattern
-        => { error2!("{:?}", x + x); }
+        => { error!("{:?}", x + x); }
     };
 
     let _z = match (1, 2) {
index d65001f2b041079086effac19874cefec30fa8e0..bb220091a13149d025c2c0c9f926467286614383 100644 (file)
@@ -17,5 +17,5 @@ fn a(x: ~str, y: ~str) -> ~str { //~ ERROR duplicate definition of value `a`
 }
 
 fn main() {
-    info2!("Result: ");
+    info!("Result: ");
 }
index 7c56064c2990a588dd1d2447d7eecb7f2ad27086..db07d9a94e84d67dbc96adc3b592f3a9c4376a6a 100644 (file)
@@ -13,5 +13,5 @@ fn main() {
 
     static y: int = foo + 1; //~ ERROR: attempt to use a non-constant value in a constant
 
-    error2!("{}", y);
+    error!("{}", y);
 }
index aa82ade449d1f2d7ae62b2d996b9dc1ace2ed603..94ca74d2b6a79d4d9d9d139be7079988666060a8 100644 (file)
@@ -15,5 +15,5 @@ enum Stuff {
         Bar = foo //~ ERROR attempt to use a non-constant value in a constant
     }
 
-    error2!("{:?}", Bar);
+    error!("{:?}", Bar);
 }
index 4718c5b88a671b41391d17312566fc073e44fe1c..c37c5a3e5afa58dbb06c08e66b4577e91bc8f0aa 100644 (file)
@@ -37,6 +37,6 @@ fn main() {
         ~Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns
             ~HTMLImageElement(ref d) if d.image.is_some() => { true }
         },
-        _ => fail2!("WAT") //~ ERROR unreachable pattern
+        _ => fail!("WAT") //~ ERROR unreachable pattern
     };
 }
index b6bfe79800f6758563e1a60813bdb7406d647f19..77e2e4f21e8a1aa32de28745ce203d2e553322f3 100644 (file)
@@ -16,7 +16,7 @@ trait PTrait {
 impl PTrait for P {
    fn getChildOption(&self) -> Option<@P> {
        static childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant
-       fail2!();
+       fail!();
    }
 }
 
index 77ff58e7427bb382ec21e716efba8e0f9a491e21..a54f05ec3480729d6820fde0fb5c96cfdafb7b08 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn foo<T>(t: T) {}
-fn main() { foo(fail2!()) } //~ ERROR cannot determine a type for this expression: unconstrained type
+fn main() { foo(fail!()) } //~ ERROR cannot determine a type for this expression: unconstrained type
index 9deb7d6fba42b42467ff878969f1d44150402bad..6f0c2f1de1ab45b1bb7f4cf7992a2e1e329d2cb3 100644 (file)
@@ -19,7 +19,7 @@ mod foo {
     }
 }
 
-fn callback<T>(_f: &fn() -> T) -> T { fail2!() }
+fn callback<T>(_f: &fn() -> T) -> T { fail!() }
 unsafe fn unsf() {}
 
 fn bad1() { unsafe {} }                  //~ ERROR: unnecessary `unsafe` block
@@ -49,7 +49,7 @@ fn good2() {
        sure that when purity is inherited that the source of the unsafe-ness
        is tracked correctly */
     unsafe {
-        unsafe fn what() -> ~[~str] { fail2!() }
+        unsafe fn what() -> ~[~str] { fail!() }
 
         do callback {
             what();
index 71d063130bf769a2c57b6db4e985d13b67313ccc..134390d0b59272206b66c585a213b3828ddf6e4f 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let i: int;
 
-    info2!("{}", false && { i = 5; true });
-    info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
+    info!("{}", false && { i = 5; true });
+    info!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
 }
index 87cd83d8aeaf68e9f175171efb87e3032763322e..5399127fcb67b23749eef9d49df841da0c565512 100644 (file)
@@ -12,6 +12,6 @@
 // Tests that a function with a ! annotation always actually fails
 // error-pattern: some control paths may return
 
-fn bad_bang(i: uint) -> ! { info2!("{}", 3); }
+fn bad_bang(i: uint) -> ! { info!("{}", 3); }
 
 fn main() { bad_bang(5u); }
index 9438aa0e52e8a3c3b080fa4647081f0bed7c7fbc..98b6cabb6ffac6f73c6bfa9832710701d5eb6ffb 100644 (file)
@@ -12,6 +12,6 @@
 fn main() {
     let x: int;
     force(|| {
-        info2!("{}", x); //~ ERROR capture of possibly uninitialized variable: `x`
+        info!("{}", x); //~ ERROR capture of possibly uninitialized variable: `x`
     });
 }
index 37a91338d8d2e380ce33c9ede878050798fbc2dd..accb907697430e70588615c4aa56d52960d6e1bf 100644 (file)
@@ -16,9 +16,9 @@ fn foo() -> int {
         x = 0;
     }
 
-    info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+    info!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
 
     return 17;
 }
 
-fn main() { info2!("{}", foo()); }
+fn main() { info!("{}", foo()); }
index 5aae93df0dcd5a8b167a43ae4cd6f21680258ceb..d49e79d2c64c39bf2846c975672c2d1c8b290804 100644 (file)
@@ -16,9 +16,9 @@ fn foo() -> int {
         x = 0;
     }
 
-    info2!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
+    info!("{}", x); //~ ERROR use of possibly uninitialized variable: `x`
 
     return 17;
 }
 
-fn main() { info2!("{}", foo()); }
+fn main() { info!("{}", foo()); }
index 69aa47bd567ae4a8bbbd4429a0ad5f54ccefc5d7..8f9941e668895326d12bfa83f4fd1c3a182ef5c4 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn force(f: &fn() -> int) -> int { f() }
-fn main() { info2!("{:?}", force(|| {})); } //~ ERROR mismatched types
+fn main() { info!("{:?}", force(|| {})); } //~ ERROR mismatched types
index a0436d984167be7df2cf0058e87bc680ab203208..8dc590b47f0c61d9306af8f0cde0f9a00a6b87b2 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 fn main() {
     let x: int; if 1 > 2 { x = 10; }
index cf13f7117eea2796beea04cf7d3f2555f18f30ee..55fb8222634ccc61a04aa440222a146925df933d 100644 (file)
@@ -8,12 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info2!("{:?}", x); }
+fn foo(x: int) { info!("{:?}", x); }
 
 fn main() {
     let x: int;
     if 1 > 2 {
-        info2!("whoops");
+        info!("whoops");
     } else {
         x = 10;
     }
index db8afdf45ae22d03fe2a2f1c37467e03f2473616..13816313884498313c6e37333048e9f6f41f612a 100644 (file)
@@ -13,5 +13,5 @@ fn main() {
         let i: int;
         i //~ ERROR use of possibly uninitialized variable: `i`
     };
-    error2!("{:?}", f());
+    error!("{:?}", f());
 }
index 769de1e7ef3da5a89d1ef7c35a40171f14c320e5..6ba7d57ef88e9612a81fc918e6f3bd9fca5b75af 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
     let y: ~int = ~42;
     let mut x: ~int;
     loop {
-        info2!("{:?}", y);
+        info!("{:?}", y);
         loop {
             loop {
                 loop {
index 752c6c9f1b7181862a14590c4fc05a2891f5f17a..ad0cdc5451fbe7792a0dc1a0f7e50528db068ed5 100644 (file)
@@ -13,7 +13,7 @@ fn main() {
     let y: ~int = ~42;
     let mut x: ~int;
     loop {
-        info2!("{:?}", y); //~ ERROR use of moved value: `y`
+        info!("{:?}", y); //~ ERROR use of moved value: `y`
         while true { while true { while true { x = y; x.clone(); } } }
         //~^ ERROR use of moved value: `y`
     }
index 9ab7a64e8bdf9d4f2a1649d5ea4b6cc67f8bacd4..f878afce9691670aa83bd1ef4d863dafc7010f54 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let i: int;
 
-    info2!("{}", false || { i = 5; true });
-    info2!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
+    info!("{}", false || { i = 5; true });
+    info!("{}", i); //~ ERROR use of possibly uninitialized variable: `i`
 }
index 439aff342bc61513b8afb57f808236bf5f39ea9e..a6ce736c89be6a98e76a7a1622a5b08f976c020a 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 fn main() {
     let x: int;
index 8ef3c5494aec671d05e68314cd6b2c310ddf1203..83b8d79756ff7cb1a4994d3d4130046ee302d885 100644 (file)
@@ -11,6 +11,6 @@
 fn main() {
     let x = ~5;
     let y = x;
-    info2!("{:?}", *x); //~ ERROR use of moved value: `x`
+    info!("{:?}", *x); //~ ERROR use of moved value: `x`
     y.clone();
 }
index 4f2d84ad13b029b785134702fc598f9d5eb0866b..7bc277c2eac1e478b5f44afb54e2f6c443496cfc 100644 (file)
@@ -9,9 +9,9 @@
 // except according to those terms.
 
 fn send<T:Send>(ch: _chan<T>, data: T) {
-    info2!("{:?}", ch);
-    info2!("{:?}", data);
-    fail2!();
+    info!("{:?}", ch);
+    info!("{:?}", data);
+    fail!();
 }
 
 struct _chan<T>(int);
@@ -20,7 +20,7 @@ fn send<T:Send>(ch: _chan<T>, data: T) {
 // message after the send deinitializes it
 fn test00_start(ch: _chan<~int>, message: ~int, _count: ~int) {
     send(ch, message);
-    info2!("{:?}", message); //~ ERROR use of moved value: `message`
+    info!("{:?}", message); //~ ERROR use of moved value: `message`
 }
 
-fn main() { fail2!(); }
+fn main() { fail!(); }
index 02d8656baff178b57e9c1bac5b3226064c7d6c0a..e5d4b6ef48cd61f2ea86d574f6326aa8144e83eb 100644 (file)
@@ -14,7 +14,7 @@ fn test(cond: bool) {
         v = 3;
         break;
     }
-    info2!("{}", v); //~ ERROR use of possibly uninitialized variable: `v`
+    info!("{}", v); //~ ERROR use of possibly uninitialized variable: `v`
 }
 
 fn main() {
index 5d9ae958ce0c11f3e491b810e7572e4478bc90cd..8155a2fbda3e2ff0ad436992ced73992e889793f 100644 (file)
 // a good test that we merge paths correctly in the presence of a
 // variable that's used before it's declared
 
-fn my_fail() -> ! { fail2!(); }
+fn my_fail() -> ! { fail!(); }
 
 fn main() {
     match true { false => { my_fail(); } true => { } }
 
-    info2!("{:?}", x); //~ ERROR unresolved name `x`.
+    info!("{:?}", x); //~ ERROR unresolved name `x`.
     let x: int;
 }
index 6531ae035843ac9227abbe839ad1a87c87be75e8..fec0f89adbaf8a89f8bd08165619a3a2d918d7f8 100644 (file)
@@ -2,7 +2,7 @@
 // they occur as part of various kinds of expressions.
 
 struct Foo<A> { f: A }
-fn guard(_s: ~str) -> bool {fail2!()}
+fn guard(_s: ~str) -> bool {fail!()}
 fn touch<A>(_a: &A) {}
 
 fn f10() {
index 4893c8b71979b78f24b3b002cad9e2af353be2cc..42944a206b360bb5d4bc2d6265dd7e766ec8fc2d 100644 (file)
@@ -3,7 +3,7 @@
 // terms of the binding, not the discriminant.
 
 struct Foo<A> { f: A }
-fn guard(_s: ~str) -> bool {fail2!()}
+fn guard(_s: ~str) -> bool {fail!()}
 fn touch<A>(_a: &A) {}
 
 fn f10() {
index d1eae1ae6134b74a734a58ea2af5eb0e948b175c..2762140be3793c04fc2010aa596b6491d09b4dae 100644 (file)
@@ -30,7 +30,7 @@ fn innocent_looking_victim() {
                     (f.c)(f, true);
                     println!("{:?}", msg);
                 },
-                None => fail2!("oops"),
+                None => fail!("oops"),
             }
         }
     }
index 90a68d796f3076e8ca91dd4a68d1b926a6c0447a..65e0c07b3580e127ee8edfd6baa96d30b4cf10aa 100644 (file)
@@ -26,5 +26,5 @@ fn main() {
 
     assert_eq!((arc_v.get())[2], 3);
 
-    info2!("{:?}", arc_v);
+    info!("{:?}", arc_v);
 }
index 9eca1329824535e43e01e2f8abe8b10544d9e6df..3cd048040c6f5647e5b7d56b8fc6bc978ebdd7dd 100644 (file)
@@ -24,5 +24,5 @@ fn main() {
 
     assert_eq!((arc_v.get())[2], 3); //~ ERROR use of moved value: `arc_v`
 
-    info2!("{:?}", arc_v); //~ ERROR use of moved value: `arc_v`
+    info!("{:?}", arc_v); //~ ERROR use of moved value: `arc_v`
 }
index f6d1aceab6469968bcc96d6dc4abcaf117ffb1c9..e0ce486cbd65564c512c7ecf4e56d346de2e6100 100644 (file)
@@ -33,6 +33,6 @@ fn foo(x: Port<()>) -> foo {
 
     do task::spawn {
         let y = x.take();   //~ ERROR does not fulfill `Send`
-        error2!("{:?}", y);
+        error!("{:?}", y);
     }
 }
index f5660fd35106c8cd4870eaabab4cedd0cb067a8a..b87b3c5245a8cbac80aa91f3e7f536fdaf949478 100644 (file)
@@ -16,7 +16,7 @@ enum u { c, d }
 fn main() {
   let x = a(c);
   match x {
-      a(d) => { fail2!("hello"); }
-      b => { fail2!("goodbye"); }
+      a(d) => { fail!("hello"); }
+      b => { fail!("goodbye"); }
     }
 }
index 199bdaa397adbc61e8c340ec3983008cbec48eda..e57ac5726fbba546fc7170b7ffe4d1c87ef85e54 100644 (file)
@@ -39,5 +39,5 @@ fn foo(i:int) -> foo {
 fn main() {
     let x = foo(10);
     let _y = x.clone(); //~ ERROR does not implement any method in scope
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 45efa8929890a7b2f4d9be310929426dbdcac2c6..5c7a85a03237ca9372ddef3eab31ceaade14af3e 100644 (file)
@@ -15,5 +15,5 @@ struct foo {
 }
 
 fn main() {
-    info2!("{:?}", foo{ x: 1 } as int);
+    info!("{:?}", foo{ x: 1 } as int);
 }
index a53736580d9b2aa53027227765c3f39547c84e1a..57eca3666ef14ef3dc363b4e1f8c32f719f26b58 100644 (file)
@@ -13,7 +13,7 @@
 // unrelated errors.
 
 fn foo(a: int, b: int, c: int, d:int) {
-  fail2!();
+  fail!();
 }
 
 fn main() {
index 5b5cab25e0464126e6aee39828ca228e4fd01a3c..2e4ba8855bdb64446b3f67fd600f25815b48a733 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:literal out of range
 
-fn main() { info2!("{}", 300u8); }
+fn main() { info!("{}", 300u8); }
index 0a5bc4ad8bb851f7d7064a1f08adfbffd6ba9878..991a4ed9e0900310f809158faa5135bca9e10f57 100644 (file)
@@ -32,6 +32,6 @@ fn main() {
     let foo = Foo { bar: [1u8, 2, 3, 4, 5], baz: 10i32 };
     unsafe {
         let oof: Oof<[u8, .. 5], i32> = cast::transmute(foo);
-        info2!("{:?}", oof);
+        info!("{:?}", oof);
     }
 }
index 79978dedb567fb89b598f412e3ec79f95e21e857..58c5aabba1267d830722822abbdfc27843ad6159 100644 (file)
@@ -32,6 +32,6 @@ fn main() {
     let foo = Foo { bar: 1, baz: 10 };
     unsafe {
         let oof: Oof = cast::transmute(foo);
-        info2!("{:?}", oof);
+        info!("{:?}", oof);
     }
 }
index 216280b34e922b98b9e2d3ba4fbeda8bef3b85d3..537d095d2d7a3d0a02b9e242a80e4e44be501e94 100644 (file)
@@ -15,6 +15,6 @@
 enum bar { t1((), Option<~[int]>), t2, }
 
 // n.b. my change changes this error message, but I think it's right -- tjc
-fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail2!(); } } } //~ ERROR binary operation * cannot be applied to
+fn foo(t: bar) -> int { match t { t1(_, Some(x)) => { return x * 3; } _ => { fail!(); } } } //~ ERROR binary operation * cannot be applied to
 
 fn main() { }
index 67a4bacbe9a9d9555155ea5afceca9227afbd0e3..b81e4ea92d0228dda3984dff565fc653fb0f3b3a 100644 (file)
@@ -18,9 +18,9 @@ enum bar { t1((), Option<~[int]>), t2, }
 fn foo(t: bar) {
     match t {
       t1(_, Some::<int>(x)) => {
-        info2!("{:?}", x);
+        info!("{:?}", x);
       }
-      _ => { fail2!(); }
+      _ => { fail!(); }
     }
 }
 
index 8baba6cccc11823d41de7bb74ab155e6c798f6e8..69ed3ea545e973f8b870fc7352d8051cc7818a01 100644 (file)
@@ -37,7 +37,7 @@ fn main() {
         // Can't do this copy
         let x = ~~~A {y: r(i)};
         let _z = x.clone(); //~ ERROR failed to find an implementation
-        info2!("{:?}", x);
+        info!("{:?}", x);
     }
-    error2!("{:?}", *i);
+    error!("{:?}", *i);
 }
index 1904f0826176ea25cd9f09ce779a0e04a449f1a3..3a480a7e9631c1cdad3f300c5cd357bdaf126e28 100644 (file)
@@ -33,5 +33,5 @@ fn dog() -> dog {
 fn main() {
     let mut d = dog();
     d.chase_cat();
-    info2!("cats_chased: {}", d.cats_chased);
+    info!("cats_chased: {}", d.cats_chased);
 }
index 10107f64158d454ce3271ad3fbdffe8ffc31276d..5928d31a66860479ad0b0523a4cb8e946c8cbf96 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn of<T>() -> &fn(T) { fail2!(); }
-fn subtype<T>(x: &fn(T)) { fail2!(); }
+fn of<T>() -> &fn(T) { fail!(); }
+fn subtype<T>(x: &fn(T)) { fail!(); }
 
 fn test_fn<'x,'y,'z,T>(_x: &'x T, _y: &'y T, _z: &'z T) {
     // Here, x, y, and z are free.  Other letters
index 872491adaacc849c44ee33991fa817d318576b62..66ab4b7705433851896c2f167a315e05bac63d9e 100644 (file)
@@ -27,7 +27,7 @@ fn ordering3<'a, 'b>(x: &'a uint, y: &'b uint) -> &'a &'b uint {
     // Do not infer an ordering from the return value.
     let z: &'b uint = &*x;
     //~^ ERROR cannot infer an appropriate lifetime due to conflicting requirements
-    fail2!();
+    fail!();
 }
 
 fn ordering4<'a, 'b>(a: &'a uint, b: &'b uint, x: &fn(&'a &'b uint)) {
index 06e91ddcf56debabc465b5542d25022c72520bb1..251be9123597551d4f427d5251a2ac72dcb95f78 100644 (file)
@@ -13,6 +13,6 @@ fn wants_static_fn(_x: &'static fn()) {}
 fn main() {
     let i = 3;
     do wants_static_fn { //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements
-        info2!("i={}", i);
+        info!("i={}", i);
     }
 }
index 885d50b7efc4c3823f77d7f22ae341845a9af609..df7831e905056fab4372e4e5f52a6b1085c09101 100644 (file)
@@ -24,5 +24,5 @@ fn return_it<'a>() -> &'a int {
 
 fn main() {
     let x = return_it();
-    info2!("foo={}", *x);
+    info!("foo={}", *x);
 }
index 5dea40f4ac7c96c9bcd82decd6117b2398ac2ef7..c2e48053260cfb222ae2c28e8010e11e14986bdf 100644 (file)
@@ -27,5 +27,5 @@ fn return_it() -> &int {
 
 fn main() {
     let x = return_it();
-    info2!("foo={}", *x);
+    info!("foo={}", *x);
 }
index ce6d12a22655e9cf7258b9dea657250e08d3a3b6..ebd3320d901269871fee00554297ba856e05e229 100644 (file)
@@ -16,7 +16,7 @@
 extern mod std;
 
 fn last<T>(v: ~[&T]) -> std::option::Option<T> {
-    fail2!();
+    fail!();
 }
 
 fn main() {
index a88435bff6eb0835d93f0bc77c7d4616e0a44aa6..f2ef1d1952505c09ba85aae43a1eda241b026277 100644 (file)
@@ -14,4 +14,4 @@ enum quux<T> { bar }
 
 fn foo(c: quux) { assert!((false)); }
 
-fn main() { fail2!(); }
+fn main() { fail!(); }
index 8882bd1e2681a19a957765d2b7e3cf90d9340972..bf62247e7e785c1daccb732f159fa110fd5561e2 100644 (file)
@@ -19,5 +19,5 @@ fn drop(&mut self) {}
 fn main() {
     let i = ~r { b: true };
     let _j = i.clone(); //~ ERROR failed to find an implementation
-    info2!("{:?}", i);
+    info!("{:?}", i);
 }
index 4bc181cbdfa978aa87970d7a0bbba110629565ee..dd9d2e067c6d512ad7307ef19c535055723a72b5 100644 (file)
@@ -31,6 +31,6 @@ fn main() {
     let r2 = ~[~r { i: i2 }];
     f(r1.clone(), r2.clone());
     //~^ ERROR failed to find an implementation of
-    info2!("{:?}", (r2, *i1));
-    info2!("{:?}", (r1, *i2));
+    info!("{:?}", (r2, *i1));
+    info!("{:?}", (r1, *i2));
 }
index d9a5302aedcb9306121ef6d92b64993cf03e5f78..dc3895d0190cd15014880b045760bf71ce0af98b 100644 (file)
@@ -13,5 +13,5 @@
 use std::libc;
 
 fn main() {
-  info2!("{:?}", 1.0 as *libc::FILE); // Can't cast float to foreign.
+  info!("{:?}", 1.0 as *libc::FILE); // Can't cast float to foreign.
 }
index 38bba1efea5748ec1ca6295192fc4b9aec4c1871..d97c32a64a47cc6ce70b5e9b607a3f9af1b2a871 100644 (file)
@@ -13,7 +13,7 @@
 
 fn f() {
     let v = ~[1i];
-    info2!("{}", v.some_field_name); //type error
+    info!("{}", v.some_field_name); //type error
 }
 
 fn main() { }
index 48db83bd92f3304ce209abb15e0f858090175a28..3545392d5d9f73259165919df6de0d2d41508628 100644 (file)
@@ -25,5 +25,5 @@ fn main() {
     let i = ~[r(0)];
     let j = ~[r(1)];
     let k = i + j;
-    info2!("{}", j);
+    info!("{}", j);
 }
index a82a8ec41c75c183d901c71f4c0e741605748a6d..636fac82b6b00ae8a3c31010efd932cbe1196b35 100644 (file)
@@ -8,6 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn f() { if (1 == fail2!()) { } else { } }
+fn f() { if (1 == fail!()) { } else { } }
 
 fn main() { }
index d936368cc33d381bd40e15d04d4c699e7b20bb2f..b803d7488b073aac578daa31b7a460c54a37f853 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 // error-pattern:meep
-fn f(_a: int, _b: int, _c: @int) { fail2!("moop"); }
+fn f(_a: int, _b: int, _c: @int) { fail!("moop"); }
 
-fn main() { f(1, fail2!("meep"), @42); }
+fn main() { f(1, fail!("meep"), @42); }
index 1038d2025c78369f606b4d9ac978afcfdabfe5b0..ef2a4e5335f45dbd63298721ec01e115c4508b80 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern:quux
-fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); }
+fn my_err(s: ~str) -> ! { error!("{}", s); fail!("quux"); }
 fn main() { 3u == my_err(~"bye"); }
index b46d5251e22344697bf1b7b8ee062bc9b9ae2a38..150544f16af0c100dbe696463be61f3227380015 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern:quux
-fn foo() -> ! { fail2!("quux"); }
+fn foo() -> ! { fail!("quux"); }
 fn main() { foo() == foo(); }
index 1038d2025c78369f606b4d9ac978afcfdabfe5b0..ef2a4e5335f45dbd63298721ec01e115c4508b80 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern:quux
-fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); }
+fn my_err(s: ~str) -> ! { error!("{}", s); fail!("quux"); }
 fn main() { 3u == my_err(~"bye"); }
index 17b4c83788ca8362181a379d5089a2bbb78c22bb..36f05a0a73cd1777f9272130633cec9bb4dc0679 100644 (file)
@@ -24,13 +24,13 @@ fn main() {
     do x.as_imm_buf |p, _len| {
         let base = p as uint;
         let idx = base / mem::size_of::<uint>();
-        error2!("ov1 base = 0x{:x}", base);
-        error2!("ov1 idx = 0x{:x}", idx);
-        error2!("ov1 sizeof::<uint>() = 0x{:x}", mem::size_of::<uint>());
-        error2!("ov1 idx * sizeof::<uint>() = 0x{:x}",
+        error!("ov1 base = 0x{:x}", base);
+        error!("ov1 idx = 0x{:x}", idx);
+        error!("ov1 sizeof::<uint>() = 0x{:x}", mem::size_of::<uint>());
+        error!("ov1 idx * sizeof::<uint>() = 0x{:x}",
                idx * mem::size_of::<uint>());
 
         // This should fail.
-        error2!("ov1 0x{:x}",  x[idx]);
+        error!("ov1 0x{:x}",  x[idx]);
     }
 }
index b41062043cfd828e130d5352eff3cbd7cfece85a..2a256b9a4e384d8310e6b53d52b7033b41fb4b88 100644 (file)
@@ -19,6 +19,6 @@ struct chan_t<T> {
     port: port_id,
 }
 
-fn send<T:Send>(_ch: chan_t<T>, _data: T) { fail2!(); }
+fn send<T:Send>(_ch: chan_t<T>, _data: T) { fail!(); }
 
-fn main() { fail2!("quux"); }
+fn main() { fail!("quux"); }
index 3310ffe909a7f2bb53dc75dcb0d1839d38a663a8..8ff62d5a43d108293327d964e90f8b95a6e9927a 100644 (file)
@@ -1,5 +1,5 @@
 // error-pattern:test
 
 fn main() {
-    let _i: int = fail2!("test");
+    let _i: int = fail!("test");
 }
index 6d0f5909c4dedf3b5c8afc78a89585fbb3ae52cb..bb62a7e8beff664b576fad114e36cfa4f9ed71fa 100644 (file)
@@ -1,7 +1,7 @@
 // error-pattern:test
 
 fn f() {
-    fail2!("test");
+    fail!("test");
 }
 
 fn main() {
index 678ac65558045595129731782d9c8be1222a7ede..71cc7317e6ef20aadf6e6990b86828b59e435efa 100644 (file)
@@ -1,5 +1,5 @@
 // error-pattern:test
 
 fn main() {
-    fail2!("test");
+    fail!("test");
 }
index ee59823e8ad27bb1201cbb840dfa6ca5c7f2adf9..1ceeee1b6ed11a8520a0ed5ec104ada159e2e3b0 100644 (file)
@@ -12,6 +12,6 @@
 
 //error-pattern:One
 fn main() {
-    fail2!("One");
-    fail2!("Two");
+    fail!("One");
+    fail!("Two");
 }
index c1d2e986f1247f5e997da4ed2f3105370e59a9ae..ab8cea0a3051a3bc02520ec6bcf9b442ab628f91 100644 (file)
@@ -15,5 +15,5 @@
 fn main() {
     let mut a = 1;
     if 1 == 1 { a = 2; }
-    fail2!(~"woooo" + "o");
+    fail!(~"woooo" + "o");
 }
index 78a407bbbd5f9ab297d46600ee67d3b36cad6f67..8c204b66e3657f2010776d4c370f977438567a24 100644 (file)
@@ -12,4 +12,4 @@
 
 
 // error-pattern:explicit
-fn main() { fail2!(); }
+fn main() { fail!(); }
index a8714fdbdc83582796ede6653a691d08ace7e2b4..e645ea34df5647b5c204396ae33327844729db05 100644 (file)
@@ -12,6 +12,6 @@
 
 
 // error-pattern:explicit failure
-fn f() -> ! { fail2!() }
+fn f() -> ! { fail!() }
 
 fn main() { f(); }
index 8ecc2cdf0f4f67dd5b7eb137baff550ef4df5ac3..99f798147f28f3e615fc8c5d30874ca6bce63739 100644 (file)
@@ -12,7 +12,7 @@
 
 
 // error-pattern:explicit failure
-fn f() -> ! { fail2!() }
+fn f() -> ! { fail!() }
 
 fn g() -> int { let x = if true { f() } else { 10 }; return x; }
 
index 50778f6556043573fd3fdf9c4c20f484de5b5f58..73259e6e140f549d57664a736d44a8f22ccbe89a 100644 (file)
@@ -12,4 +12,4 @@
 
 
 // error-pattern:explicit failure
-fn main() { let _x = if false { 0 } else if true { fail2!() } else { 10 }; }
+fn main() { let _x = if false { 0 } else if true { fail!() } else { 10 }; }
index 98cc3c230a04989429ace004beea6f4154756fa0..6476e57a35b842b3ca89cd4192f54c3afacaa74d 100644 (file)
@@ -12,7 +12,7 @@
 
 
 // error-pattern:explicit failure
-fn f() -> ! { fail2!() }
+fn f() -> ! { fail!() }
 
 fn g() -> int { let x = match true { true => { f() } false => { 10 } }; return x; }
 
index c8cab907d7d1c67d895385c171e38438e7d18e61..075f6f5b4b1908286d50cac779bb9876bf0b4a94 100644 (file)
@@ -12,4 +12,4 @@
 
 
 // error-pattern:explicit failure
-fn main() { let _x = match true { false => { 0 } true => { fail2!() } }; }
+fn main() { let _x = match true { false => { 0 } true => { fail!() } }; }
index 17059107c011ba7119c1a57e42a9d8fdaf25c051..ce5ea56502cc7bb1bdefe63bfb41958110e3001b 100644 (file)
@@ -45,7 +45,7 @@ fn main() {
         do task::spawn {
             let result = count(5u);
             info!("result = %?", result);
-            fail2!();
+            fail!();
         };
     }
 }
index 29baa4b31704e6140a20d2059369ef6c4cb1c5fe..705b7f4028c2714aae2a675ace5a2cbfc999f2ff 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 // error-pattern:woe
-fn f(a: int) { info2!("{}", a); }
+fn f(a: int) { info!("{}", a); }
 
-fn main() { f(fail2!("woe")); }
+fn main() { f(fail!("woe")); }
index ca6abee03bfa997308944c66a69c454721415ff6..13e3a6a31a8fa535139ddbe6710d9d5a41925781 100644 (file)
@@ -11,5 +11,5 @@
 // error-pattern:failed at 'explicit failure'
 
 fn main() {
-    fail2!();
+    fail!();
 }
index 90d9ff9b0ec89ec0e0d50358ebd024dd021810d8..e97d2dbe985a9561c6878a30374f5cf94c8caf4c 100644 (file)
@@ -11,5 +11,5 @@
 // error-pattern:failed at 'test-fail-fmt 42 rust'
 
 fn main() {
-    fail2!("test-fail-fmt {} {}", 42, "rust");
+    fail!("test-fail-fmt {} {}", 42, "rust");
 }
index fa461fefb88c160fc7dc040f68b4047c7fe5b9aa..e59f5bdcaa1797d8e2507614879291f3f9488f1e 100644 (file)
@@ -11,5 +11,5 @@
 // error-pattern:failed at 'test-fail-owned'
 
 fn main() {
-    fail2!("test-fail-owned");
+    fail!("test-fail-owned");
 }
index f05a68a5fcb242757f5e3629f25182103ab70809..688ca4ce7e5720145a6a7f2efc721753639c3bae 100644 (file)
@@ -11,5 +11,5 @@
 // error-pattern:failed at 'test-fail-static'
 
 fn main() {
-    fail2!("test-fail-static");
+    fail!("test-fail-static");
 }
index 2691beed27252ca045ae9f497f6951e3ece7241c..f007e03041c14909b7780269f2a3975cf45d2189 100644 (file)
@@ -10,4 +10,4 @@
 
 // error-pattern:moop
 extern mod extra;
-fn main() { fail2!("moop"); }
+fn main() { fail!("moop"); }
index 79f46f47fb30cffdf12e7466d05dbf0d2c9332ad..90a44e42759377e416135c568cda77a819f96388 100644 (file)
@@ -13,8 +13,8 @@
 // error-pattern:oops
 
 fn bigfail() {
-    while (fail2!("oops")) { if (fail2!()) {
-        match (fail2!()) { () => {
+    while (fail!("oops")) { if (fail!()) {
+        match (fail!()) { () => {
         }
                      }
     }};
index 5d4de9ea43c11557b94371da071936ade5672dfc..542ccfb0aeaccda3d6b39151501891555e25b9fb 100644 (file)
@@ -12,6 +12,6 @@
 
 fn main() {
     do spawn {
-        fail2!("test");
+        fail!("test");
     }
 }
index f00f18cf5c2abd2a27150d7af786efd1b010fab3..ff3596df142618bb0cffba761113e3e7cf19f60f 100644 (file)
@@ -14,6 +14,6 @@ fn main() {
     let mut t = ::std::task::task();
     t.name(~"owned name");
     do t.spawn {
-        fail2!("test");
+        fail!("test");
     }
 }
index e44f78094ff48d4ad19abfe63b5a16eeee595110..96fe82fa5ca142d622b255bab2af5093bd22192f 100644 (file)
@@ -14,6 +14,6 @@ fn main() {
     let mut t = ::std::task::task();
     t.name("send name".to_send_str());
     do t.spawn {
-        fail2!("test");
+        fail!("test");
     }
 }
index 0b502d8a35ee9490a96d580a86108b8caf79227c..a20dbe42c6d26b4b45300a7fdfb0d52487e2dc88 100644 (file)
@@ -14,6 +14,6 @@ fn main() {
     let mut t = ::std::task::task();
     t.name("static name");
     do t.spawn {
-        fail2!("test");
+        fail!("test");
     }
 }
index 1c6298a6c8d2be7136cc27cab3a3009c6d8155fc..3bc9014a74c045e1713b56228c733e1e71e9a0e2 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:meh
 extern mod extra;
 
-fn main() { let str_var: ~str = ~"meh"; fail2!("{}", str_var); }
+fn main() { let str_var: ~str = ~"meh"; fail!("{}", str_var); }
index 032460d20796ac2dcdfa608ef00bf45a962e509d..3c9397fc07ff34e6ac06b26ba208c1ec251f329b 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:moop
 extern mod extra;
 
-fn main() { for _ in range(0u, 10u) { fail2!("moop"); } }
+fn main() { for _ in range(0u, 10u) { fail!("moop"); } }
index e8a1cad53ad115f1f6dca064e5adcba581477942..d9e64fecfd49f618ce0cbd97c14b3303e6227884 100644 (file)
@@ -17,9 +17,9 @@ fn even(x: uint) -> bool {
 
 fn foo(x: uint) {
     if even(x) {
-        info2!("{}", x);
+        info!("{}", x);
     } else {
-        fail2!("Number is odd");
+        fail!("Number is odd");
     }
 }
 
index d596a11f1cbdcf0077f118b05d6975ce66773d21..97c4279b18837f28eed93927d803dd481b177a03 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // error-pattern:quux
-fn my_err(s: ~str) -> ! { error2!("{}", s); fail2!("quux"); }
+fn my_err(s: ~str) -> ! { error!("{}", s); fail!("quux"); }
 fn main() { if my_err(~"bye") { } }
index 78422347f784237e8348889936e8e16ca701c610..863663334f8ed444fda789b0d78c842c83dc31d7 100644 (file)
@@ -19,6 +19,6 @@
 
 fn main() {
     do io::with_str_reader(~"") |rdr| {
-        match rdr.read_char() { '=' => { } _ => { fail2!() } }
+        match rdr.read_char() { '=' => { } _ => { fail!() } }
     }
 }
index 9b8ecca96a6fa8a38c9297475baa8c56874e0133..5ce89bc1814960d5cdfa25f5e9942fa6427a9593 100644 (file)
@@ -22,5 +22,5 @@ fn main() {
         },
         a: ~0
     };
-    fail2!();
+    fail!();
 }
index b15c54c7b6eb81a6edb64bbb515ac2cbcf4e5e30..c1357988f7db59d0a8e58ac3367a1be2c969cd56 100644 (file)
@@ -15,7 +15,7 @@
 
 enum e<T> { e(arc::Arc<T>) }
 
-fn foo() -> e<int> {fail2!();}
+fn foo() -> e<int> {fail!();}
 
 fn main() {
    let _f = foo();
index 5d20c49945e084ff7404b1c29fd25dbccb5f4f01..44364007c067e80b44776c094fd36129cee787ff 100644 (file)
@@ -16,7 +16,7 @@
 fn main() {
     let mut x = ~[];
     let y = ~[3];
-    fail2!("so long");
+    fail!("so long");
     x.push_all_move(y);
     ~"good" + ~"bye";
 }
index 39d741e5169e2f5aad2fc1b3a336e3f7dfd043b3..db954bc59466ac5f8d7cdda590506f0bcb3c3293 100644 (file)
@@ -16,5 +16,5 @@ struct Point { x: int, y: int }
 
 fn main() {
     let origin = Point {x: 0, y: 0};
-    let f: Point = Point {x: (fail2!("beep boop")),.. origin};
+    let f: Point = Point {x: (fail!("beep boop")),.. origin};
 }
index d99cfe40da43e1d901796800a006a984493417f9..52a67872d4cffba35f640d1f5f7670ddd1fff922 100644 (file)
@@ -16,7 +16,7 @@
 use std::comm;
 use std::task;
 
-fn child() { fail2!(); }
+fn child() { fail!(); }
 
 fn main() {
     let (p, _c) = comm::stream::<()>();
index fd330bba1c57e4e780a84e1edc3796b1e50e3144..f40eae20bc0bc386b6e7276e009e22345914c2f0 100644 (file)
@@ -16,7 +16,7 @@
 use std::comm;
 use std::task;
 
-fn grandchild() { fail2!("grandchild dies"); }
+fn grandchild() { fail!("grandchild dies"); }
 
 fn child() {
     let (p, _c) = comm::stream::<int>();
index 7b1d6bea499d309e12476224bf687aae68e51eb0..a54422ef8f535c4e6e9925c7c1cf1ff6d10b6a6b 100644 (file)
@@ -17,6 +17,6 @@ fn foo(s: ~str) { }
 
 fn main() {
     let i =
-        match Some::<int>(3) { None::<int> => { fail2!() } Some::<int>(_) => { fail2!() } };
+        match Some::<int>(3) { None::<int> => { fail!() } Some::<int>(_) => { fail!() } };
     foo(i);
 }
index 9b38a381a58edab353e6bd5c9eb10e4619e73e94..13ccd118c61861ac0f4eaebf90c45b9517c0edc2 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 // error-pattern:quux
-fn f() -> ! { fail2!("quux") }
+fn f() -> ! { fail!("quux") }
 fn g() -> int { match f() { true => { 1 } false => { 0 } } }
 fn main() { g(); }
index 535b3340a4d01d664b4856a3b06a6581bd55ef8a..0d1aebc82e90342aa54982d6c0ccb2785873f2e4 100644 (file)
 // error-pattern:squirrelcupcake
 fn cmp() -> int {
     match (Some('a'), None::<char>) {
-        (Some(_), _) => { fail2!("squirrelcupcake"); }
-        (_, Some(_)) => { fail2!(); }
-        _                    => { fail2!("wat"); }
+        (Some(_), _) => { fail!("squirrelcupcake"); }
+        (_, Some(_)) => { fail!(); }
+        _                    => { fail!("wat"); }
     }
 }
 
-fn main() { error2!("{}", cmp()); }
+fn main() { error!("{}", cmp()); }
index 35c19c47f52864d99296df2cd26c90b44f618537..d3e3be6c2caab6db13030502fa05e52546d24618 100644 (file)
@@ -14,7 +14,7 @@ fn getbig(i: int) {
     if i != 0 {
         getbig(i - 1);
     } else {
-        fail2!();
+        fail!();
     }
 }
 
index 9af45cebe6871d77f9b1e66ab61ceb93b86646c9..5ac3092640038ae3f4d78a85c81ac2d87041fee3 100644 (file)
@@ -35,7 +35,7 @@ fn getbig_call_c_and_fail(i: int) {
     } else {
         unsafe {
             rustrt::rust_get_argc();
-            fail2!();
+            fail!();
         }
     }
 }
index fea9155116131cf494a06bd79b682950999dae44..e6f219710b37bc0b5a43089c3ef224b3aebe0f8f 100644 (file)
@@ -22,7 +22,7 @@ fn getbig_and_fail(i: int) {
     if i != 0 {
         getbig_and_fail(i - 1);
     } else {
-        fail2!();
+        fail!();
     }
 }
 
index a4df5e57923f213b2f75ad2553880f4dd4ba33d7..02a65e91d04456e0890d25a7f2f08f6bd3bcb0cd 100644 (file)
@@ -22,7 +22,7 @@ fn getbig_and_fail(i: int) {
     if i != 0 {
         getbig_and_fail(i - 1);
     } else {
-        fail2!();
+        fail!();
     }
 }
 
index c3f4250b05385f4b84698bc57b9a8a6d48c1b4ea..81eed9267ab59b5fa7b1d7ccf80bb130f80306cf 100644 (file)
@@ -13,5 +13,5 @@
 use std::result;
 
 fn main() {
-    error2!("{:?}", result::Err::<int,~str>(~"kitty").unwrap());
+    error!("{:?}", result::Err::<int,~str>(~"kitty").unwrap());
 }
index 5e09536fb4d3265b1b933e38a63105b30067689b..ca267608025c30b0c8af8a2e32213a658a693115 100644 (file)
@@ -18,6 +18,6 @@
 struct T { t: ~str }
 
 fn main() {
-    let pth = fail2!("bye");
+    let pth = fail!("bye");
     let _rs: T = T {t: pth};
 }
index 5c854825c28a2ad70dc6f55e3d554653db6149e2..52399c09188d974fc1fee810282277782ac97ab9 100644 (file)
 use std::os;
 
 fn main() {
-    error2!("whatever");
+    error!("whatever");
     // Setting the exit status only works when the scheduler terminates
     // normally. In this case we're going to fail, so instead of of
     // returning 50 the process will return the typical rt failure code.
     os::set_exit_status(50);
-    fail2!();
+    fail!();
 }
index 493420e3ee622a54ff1dca56459b2852bff1290d..ea70bb0eab9a5ab1a3f73b763953807b50d0c4c4 100644 (file)
@@ -33,9 +33,9 @@ fn r(x:int) -> r {
 }
 
 fn main() {
-    error2!("whatever");
+    error!("whatever");
     do task::spawn {
       let _i = r(5);
     };
-    fail2!();
+    fail!();
 }
index 4dc1386d850de7f6ebad5719e321be7087823563..915e9010b3e0fdf1a6d4c8119ad90b3cadf86856 100644 (file)
@@ -13,7 +13,7 @@
 use std::os;
 
 fn main() {
-    error2!("whatever");
+    error!("whatever");
     // 101 is the code the runtime uses on task failure and the value
     // compiletest expects run-fail tests to return.
     os::set_exit_status(101);
index 622e2e326e564041c7a5edf6d741093fab07827b..e9d3c41faa6cc10b8e7a74c0f090f92e6f3dd9af 100644 (file)
@@ -17,5 +17,5 @@ mod m {
     pub fn exported() { }
 
     #[test]
-    fn unexported() { fail2!("runned an unexported test"); }
+    fn unexported() { fail!("runned an unexported test"); }
 }
index dad8ead8d65a6da63f0465fe102ebac22f0807e8..122ea901805bb9abb8f3ee378da9a8e69fffd76a 100644 (file)
@@ -17,7 +17,7 @@
 // We don't want to see any invalid reads
 fn main() {
     fn f() {
-        fail2!();
+        fail!();
     }
     task::spawn(|| f() );
 }
index 840db545dec771193927c6f95bbbc510e1a5c329..fb2d90e99cf194d0411e2e8c6b6425ba9fe573b3 100644 (file)
@@ -16,7 +16,7 @@
 
 fn goodfail() {
     task::deschedule();
-    fail2!("goodfail");
+    fail!("goodfail");
 }
 
 fn main() {
@@ -25,5 +25,5 @@ fn main() {
     // We shouldn't be able to get past this recv since there's no
     // message available
     let i: int = po.recv();
-    fail2!("badfail");
+    fail!("badfail");
 }
index 419d8c1320f9142615806f8581d36915613c420d..1858ceb2836485bed7fa8ca2f73170b363d36654 100644 (file)
@@ -15,5 +15,5 @@
 
 fn main() {
     os::args();
-    fail2!("please have a nonzero exit status");
+    fail!("please have a nonzero exit status");
 }
index d1d816f7f793268bf5f1bc9a038606d441058ab9..86fde5b7f9781de0aff8e8711e5ed9b082278f4f 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern: fail
-fn main() { ~fail2!(); }
+fn main() { ~fail!(); }
index 0050002a22e8e473f30d6040d8982a7532cde33c..30b54b3dfcc100fdc8fc41ebcba4605f119bfebf 100644 (file)
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
     let y = ~0;
     let x: @~fn() = @(|| {
-        error2!("{:?}", y.clone());
+        error!("{:?}", y.clone());
     });
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 02d2218f536d42bbfad568338203b835f65ea315..f0d6e1c1882686230a87bd77f35fac9eacd47afd 100644 (file)
@@ -13,7 +13,7 @@
 use std::cast;
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 struct r {
@@ -41,6 +41,6 @@ fn main() {
         cast::forget(i1);
         let x = @r(i1p);
         failfn();
-        error2!("{:?}", x);
+        error!("{:?}", x);
     }
 }
index 2086a23c6af7ebfbfa76e9292512343577d99bc8..a30f2bfab0a417e835327c4bfb69987f39fd3914 100644 (file)
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
     let x = @~"hi";
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index b8534483fb52efbff173b3823a0a316dbef12b85..66dac6a98a986818e7ce3e1a7dd0987040f69f16 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 trait i {
@@ -25,5 +25,5 @@ fn foo(&self) { }
 fn main() {
     let x = @~0 as @i;
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 3abf5330e408f6e3372510d636ea0407824ea0d0..fc8e3a793d2c7e771af5bf9e1a8c892c480aa145 100644 (file)
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
     let x = @~~0;
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 5b3bf74f89e2511f92b9fbabafd5819f031fd65c..15925dc475e8f964208d2bd88913c9371d7d47c8 100644 (file)
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
     let x = @~0;
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 3b767839a0dd62df4c68380a66dc1f3386c73864..18b4cebaa339c36294403dafb38d1ec82568bef3 100644 (file)
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
     let x = @~[0, 1, 2, 3, 4, 5];
     failfn();
-    error2!("{:?}", x);
+    error!("{:?}", x);
 }
index 0b144b6c1edd4cdcc67f494ee11f97835b26d442..21308945253b543f9b90aeeca3ff04b342c79ad2 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
index df6c2be860f7adfae887b033bae6b755c81cfd37..4d4bc0d53eba22dd79442871ab102bf1cd4b66c9 100644 (file)
@@ -12,5 +12,5 @@
 
 fn main() {
     @0;
-    fail2!();
+    fail!();
 }
index 8a71d1d34560a93e7c76835a79619214f7d04105..fd1ab88ff964704ddb1626afaf6cbc436ef759af 100644 (file)
@@ -10,7 +10,7 @@
 
 // error-pattern:fail
 
-fn f() -> @int { fail2!(); }
+fn f() -> @int { fail!(); }
 
 fn main() {
     let _a: @int = f();
index a4161ad424b17a0fece03ebb46ceb0ca6f464163..0d1584f3dc8dbaa82e8c684abd2787dfc47bb59c 100644 (file)
@@ -12,6 +12,6 @@
 
 fn main() {
     let _a: @int = {
-        fail2!();
+        fail!();
     };
 }
index cfd8d555c2e8b1519625fac3be7f663e18c61b1b..365204d5c9e4d13d5c61d63dce2cad213979ea55 100644 (file)
@@ -12,7 +12,7 @@
 
 fn a() { }
 
-fn b() { fail2!(); }
+fn b() { fail!(); }
 
 fn main() {
     let _x = ~[0];
index 4c9125bde99c8dc3fa4e8eefd8988f92f354a1a7..51c6cb3adf318cc137df1099e0b9d92ad54cfc58 100644 (file)
@@ -14,7 +14,7 @@
 #[allow(unused_variable)];
 
 fn x(it: &fn(int)) {
-    fail2!();
+    fail!();
     it(0);
 }
 
index 11fbcfaff78c59f1f1562bd3cb5622bbe4c1b191..17936df6959f2bb0423f3f32939e9f469cc9c204 100644 (file)
@@ -16,5 +16,5 @@ fn x(it: &fn(int)) {
 }
 
 fn main() {
-    x(|_x| fail2!() );
+    x(|_x| fail!() );
 }
index 4857a38519c19783705f3eca2759a5ca94c50623..65d9fce5ff5dc8acf74499eeef0a9f1641083c16 100644 (file)
@@ -22,7 +22,7 @@ fn main() {
         let cheese = cheese.clone();
         let f: &fn() = || {
             let _chew = mush + cheese;
-            fail2!("so yummy")
+            fail!("so yummy")
         };
         f();
     });
index c017ddc49f0f8a4b7a23d57730b438333c04e2b9..a9761017c73f5e9b65f8cfb5650c8272fa965149 100644 (file)
@@ -15,7 +15,7 @@ fn test_box() {
 }
 fn test_str() {
   let res = match false { true => { ~"happy" },
-     _ => fail2!("non-exhaustive match failure") };
+     _ => fail!("non-exhaustive match failure") };
   assert_eq!(res, ~"happy");
 }
 fn main() {
index dc5e5a3b9956f155f97c1b5e16c2347a4c655da1..d215927c7d03fc28dbccf1caccd68878e0e2ecb4 100644 (file)
@@ -19,7 +19,7 @@ fn main() {
         arr.push(@~"key stuff");
         map.insert(arr.clone(), arr + &[@~"value stuff"]);
         if arr.len() == 5 {
-            fail2!();
+            fail!();
         }
     }
 }
index 626228cd225955ac5b3f88619c734094f86c5ee1..8f1b34d17cd99f8c038c9a0a34ad1591382c3708 100644 (file)
@@ -10,7 +10,7 @@
 
 // error-pattern:fail
 fn f(_a: @int) {
-    fail2!();
+    fail!();
 }
 
 fn main() {
index ae543c9a88c42e224c7663a839e3e20da9a6636b..f8a63be2e9ad0d127e7babc932bfbe44799a87c1 100644 (file)
@@ -15,7 +15,7 @@ fn main() {
     {
         let _b = @0;
         {
-            fail2!();
+            fail!();
         }
     }
 }
index 933bd62bc0cae0963e5163f2dc9c160f9c4ada36..88f71a5ed7ceaafbe25af922d2100ce6b3a2ba4b 100644 (file)
@@ -10,7 +10,7 @@
 
 // error-pattern:fail
 
-fn f() -> ~[int] { fail2!(); }
+fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
 // have been to do with memory allocation patterns.
index b627103485ca24d62a90eae6bfd411e05130fe04..e9bbbd46c03fffc76e263508253220162e90f49b 100644 (file)
@@ -10,7 +10,7 @@
 
 // error-pattern:fail
 
-fn f() -> ~[int] { fail2!(); }
+fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
 // have been to do with memory allocation patterns.
index 348989659067a30726795204339e3af8de24c079..3d6d26937dbacf59e69accfaeb88f02012924ce7 100644 (file)
@@ -10,7 +10,7 @@
 
 // error-pattern:fail
 
-fn f() -> ~[int] { fail2!(); }
+fn f() -> ~[int] { fail!(); }
 
 // Voodoo. In unwind-alt we had to do this to trigger the bug. Might
 // have been to do with memory allocation patterns.
index 3858fe3923f1b434168036f365204679a71014ae..016654500b4aca83e5dbd8425c7c6b54d08d4e35 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn build() -> ~[int] {
-    fail2!();
+    fail!();
 }
 
 struct Blk { node: ~[int] }
index a5aaf46b4b2efdc41376c695ca3c1dd7f6924611..49a35181a8b2eb0b36460cd449603460be193e92 100644 (file)
@@ -15,7 +15,7 @@ fn build1() -> ~[int] {
 }
 
 fn build2() -> ~[int] {
-    fail2!();
+    fail!();
 }
 
 struct Blk { node: ~[int], span: ~[int] }
index 5b9917979694dbc5d131944c102bbdd8281334e0..6526455b8e2e073a6694271d4feb6bed9b7b48cf 100644 (file)
@@ -15,7 +15,7 @@ struct r {
 }
 
 impl Drop for r {
-    fn drop(&mut self) { fail2!("squirrel") }
+    fn drop(&mut self) { fail!("squirrel") }
 }
 
 fn r(i: int) -> r { r { i: i } }
index 652bf31dee405b02843f67e3ebb09a374f3155da..67e1d0e8f92ac5752c85bb6bb781cdad20e00838 100644 (file)
@@ -16,7 +16,7 @@ struct r {
 }
 
 impl Drop for r {
-    fn drop(&mut self) { fail2!("wombat") }
+    fn drop(&mut self) { fail!("wombat") }
 }
 
 fn r(i: int) -> r { r { i: i } }
@@ -24,5 +24,5 @@ fn r(i: int) -> r { r { i: i } }
 fn main() {
     @0;
     let r = r(0);
-    fail2!();
+    fail!();
 }
index 92b10cef31998eba19740b2c8625b70597664147..231f6e7b7d579f840b46561821611aff1d08f362 100644 (file)
@@ -20,7 +20,7 @@ fn faily_box(i: @int) -> faily_box { faily_box { i: i } }
 #[unsafe_destructor]
 impl Drop for faily_box {
     fn drop(&mut self) {
-        fail2!("quux");
+        fail!("quux");
     }
 }
 
index ab28cb8a9ee44fbc934827a7664337407f16ddd3..8249807af74ad51bfafd45d2989efe1e8d6c153d 100644 (file)
@@ -12,7 +12,7 @@
 
 fn f() {
     let _a = @0;
-    fail2!();
+    fail!();
 }
 
 fn g() {
index efb69b9f9576fa5461993753e713db897c451bcb..15fa3ceed5356a9ab3373d67b61e6df1476afac4 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn fold_local() -> @~[int]{
-    fail2!();
+    fail!();
 }
 
 fn main() {
index 20d394bafac837900e3aee4abddaf03a603f8348..236ff8172207bbc0a601fa3de41be9ae8662d80e 100644 (file)
@@ -15,7 +15,7 @@ fn fold_local() -> @~[int]{
 }
 
 fn fold_remote() -> @~[int]{
-    fail2!();
+    fail!();
 }
 
 fn main() {
index d61a4927db8bce2d6417a9692fa021808b55ab5c..d5a06ffb9036b915e9084fe152bc10cd124a6052 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn f() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
index 9ede24d28c48685b0a8a66ff59125f68f4536453..53b2a55602c296162792008022a2bf3cc84448f7 100644 (file)
@@ -11,7 +11,7 @@
 // error-pattern:fail
 
 fn failfn() {
-    fail2!();
+    fail!();
 }
 
 fn main() {
index c0a1033efe0469897c70ec455916ab6297ab51c7..32e1425b28c8af78c2c876ffdc050e799468ddaa 100644 (file)
@@ -11,4 +11,4 @@
 #[allow(while_true)];
 
 // error-pattern:quux
-fn main() { let _x: int = { while true { fail2!("quux"); } ; 8 } ; }
+fn main() { let _x: int = { while true { fail!("quux"); } ; 8 } ; }
index e42cb5e778cf2f95870182ac896b7dc3431e7398..a0b437814fd8d46867eac3f9cac8b08c588410b4 100644 (file)
@@ -12,5 +12,5 @@
 
 // error-pattern:giraffe
 fn main() {
-    fail2!({ while true { fail2!("giraffe") }; "clandestine" });
+    fail!({ while true { fail!("giraffe") }; "clandestine" });
 }
index 873eb66e52e6f97e8503a6ba56e85c6f7589d060..f1bc4e9a87f4e8a429236edbfe53574889fdaf18 100644 (file)
@@ -36,7 +36,7 @@ fn f<A:Clone + 'static>(a: A, b: u16) -> @Invokable<A> {
 
 pub fn main() {
     let (a, b) = f(22_u64, 44u16).f();
-    info2!("a={:?} b={:?}", a, b);
+    info!("a={:?} b={:?}", a, b);
     assert_eq!(a, 22u64);
     assert_eq!(b, 44u16);
 }
index 7c43385ed616784f37278fff771004caba8fa859..5491baf35267703119c2ba36ae85bb5468331c23 100644 (file)
@@ -55,7 +55,7 @@ pub fn main() {
     let z = f(~x, y);
     make_cycle(z);
     let (a, b) = z.f();
-    info2!("a={} b={}", *a as uint, b as uint);
+    info!("a={} b={}", *a as uint, b as uint);
     assert_eq!(*a, x);
     assert_eq!(b, y);
 }
index 9944241836b58241ed16ad68afff5d9773138290..5cbd0da23cf7f26536f8abf7fd66638fe087a412 100644 (file)
@@ -12,6 +12,6 @@
 
 pub fn main() {
     let a: int = 10;
-    info2!("{}", a);
+    info!("{}", a);
     assert_eq!(a * (a - 1), 90);
 }
index db8f0eac4f6b38ca60d8e44663aefe33f04373af..0b3492784c871111cfc9479438c158422e0454ed 100644 (file)
@@ -28,6 +28,6 @@ pub fn main() {
     assert_eq!(i32_b << 1, i32_b << 1);
     assert_eq!(i32_b >> 1, i32_b >> 1);
     assert_eq!(i32_b & i32_b << 1, 0);
-    info2!("{}", i32_b | i32_b << 1);
+    info!("{}", i32_b | i32_b << 1);
     assert_eq!(i32_b | i32_b << 1, 0x30303030);
 }
index 6078698ebd6b6fa7046ee04bcea943964dba9222..741f7006633302da56c05806265667c57ede867d 100644 (file)
@@ -11,7 +11,7 @@
 // xfail-fast
 
 pub fn main() {
-    fail2!()
+    fail!()
 }
 
 #[main]
index d8399848e09e300b0ce33e153ded210d88f884bb..b7e3de478a4e28e33344dd2aceeff811154234a4 100644 (file)
@@ -19,6 +19,6 @@ struct Triple { x: int, y: int, z: int }
 fn f<T,U>(x: T, y: U) -> Pair<T, U> { return Pair {a: x, b: y}; }
 
 pub fn main() {
-    info2!("{:?}", f(Triple {x: 3, y: 4, z: 5}, 4).a.x);
-    info2!("{:?}", f(5, 6).a);
+    info!("{:?}", f(Triple {x: 3, y: 4, z: 5}, 4).a.x);
+    info!("{:?}", f(5, 6).a);
 }
index f312cdae8bdeed6f5d1773c372f31c83d8c02426..78edf3e112e987622a4b82b08f2ff97d8c02cf09 100644 (file)
@@ -11,6 +11,6 @@
 // Check that issue #954 stays fixed
 
 pub fn main() {
-    match -1 { -1 => {}, _ => fail2!("wat") }
+    match -1 { -1 => {}, _ => fail!("wat") }
     assert_eq!(1-1, 0);
 }
index ad5573889dd36e397506f5165bbf06f1ad02094e..a7a4aa9885e6e89f5bd6b8cb43dc9ac103dbfdf1 100644 (file)
@@ -18,6 +18,6 @@ pub fn main() {
     let x = Some(p);
     match x {
         Some(z) => { dispose(z); },
-        None => fail2!()
+        None => fail!()
     }
 }
index 10a7355c91d0b7b31548b830e460e33606461602..2fe39dc624c91f6d3d3a141e32df6cc31afcda75 100644 (file)
@@ -81,7 +81,7 @@ fn test_class() {
   let mut r = p(1, 2);
 
   unsafe {
-  error2!("q = {:x}, r = {:x}",
+  error!("q = {:x}, r = {:x}",
          (::std::cast::transmute::<*p, uint>(&q)),
          (::std::cast::transmute::<*p, uint>(&r)));
   }
index b99067419b06e02ae68cb97883697b142c550aed..169b3848c634d578b269be2417207920f7cdea86 100644 (file)
@@ -27,8 +27,8 @@ fn general() {
     a ^= b;
     b ^= a;
     a = a ^ b;
-    info2!("{}", a);
-    info2!("{}", b);
+    info!("{}", a);
+    info!("{}", b);
     assert_eq!(b, 1);
     assert_eq!(a, 2);
     assert_eq!(!0xf0 & 0xff, 0xf);
index c296a37a17ce0e3c4bdcdeeb3f7be8df565f6603..0608285db1e8ecb3f1052fe5fa31aa3ccf1a9fe1 100644 (file)
@@ -14,7 +14,7 @@ pub fn main() {
 
     // Statement form does not require parentheses:
     for i in v.iter() {
-        info2!("{:?}", *i);
+        info!("{:?}", *i);
     }
 
     // Usable at all:
@@ -35,14 +35,14 @@ pub fn main() {
         assert!(false);
     }
     match do v.iter().all |e| { e.is_negative() } {
-        true => { fail2!("incorrect answer."); }
+        true => { fail!("incorrect answer."); }
         false => { }
     }
     match 3 {
       _ if do v.iter().any |e| { e.is_negative() } => {
       }
       _ => {
-        fail2!("wrong answer.");
+        fail!("wrong answer.");
       }
     }
 
index 1931ec589ac10951403699bcd8847fbfd77184b7..379fced1d334b099bac4ca63f82f7f41f26b8c86 100644 (file)
@@ -10,5 +10,5 @@
 
 pub fn main() {
     fn as_buf<T>(s: ~str, f: &fn(~str) -> T) -> T { f(s) }
-    as_buf(~"foo", |foo: ~str| -> () error2!("{}", foo) );
+    as_buf(~"foo", |foo: ~str| -> () error!("{}", foo) );
 }
index 806ed035d5a0f7ba4a06a755e1296abd58128a76..a977eb40992bb5479b170cb04bb699b0adb7cd74 100644 (file)
@@ -20,6 +20,6 @@ pub fn main() {
             odds += 1;
         }
     });
-    error2!("{:?}", odds);
+    error!("{:?}", odds);
     assert_eq!(odds, 4);
 }
index c84033e5bde086cf704995bd19ace405a0421661..e5ea54c2a3eb3f97a7e15cb9f59cb8984b8f1317 100644 (file)
@@ -20,6 +20,6 @@ pub fn main() {
             sum += *i * *j;
         });
     });
-    error2!("{:?}", sum);
+    error!("{:?}", sum);
     assert_eq!(sum, 225);
 }
index 2c4d007cb1a2130b059c4d11efb83f635b364791..1490d67904967e4f5ca19a325bf92598547ebf60 100644 (file)
@@ -21,11 +21,11 @@ macro_rules! declare(
     );
     match s {
       ~Bar2(id, rest) => declare!(id, self.elaborate_stm(rest)),
-      _ => fail2!()
+      _ => fail!()
     }
   }
 
-  fn check_id(&mut self, s: int) { fail2!() }
+  fn check_id(&mut self, s: int) { fail!() }
 }
 
 pub fn main() { }
index 8ff326ed8706eb55dc872f59968bc3ad68e9f267..9057ebf7983f1cbcbc64c9b8ae58c8fc94e81fcc 100644 (file)
@@ -31,9 +31,9 @@ pub fn main() {
     add_int(ints, 44);
 
     do iter_ints(ints) |i| {
-        error2!("int = {}", *i);
+        error!("int = {}", *i);
         true
     };
 
-    error2!("ints={:?}", ints);
+    error!("ints={:?}", ints);
 }
index 4be38df939b79d1988711364b7adf95503bab3d2..c155563d8d06ef7503ce96a1f5167dbb076405b6 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
 
         x = @F {f: ~4};
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(**b_x)) as uint);
         assert_eq!(**b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(**b_x)));
index ddc1d618697489701c2c4c6f7abfdec173cf2899..214753c009cda4611c591336e18e7cb539a64dd4 100644 (file)
@@ -28,7 +28,7 @@ pub fn main() {
         assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x)));
         x = @F {f: ~4};
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(*b_x)) as uint);
         assert_eq!(*b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x)));
index dc389ed1bc8cd76b63fad231d06862c5b045f175..fd5f8c0868c6ce0e47f8664600d1a9eb18891d29 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
 
         *x = @F {f: ~4};
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(**b_x)) as uint);
         assert_eq!(**b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(**b_x)));
index 139466bf40aa1d00c1aeb1860f7524733d217198..239dd4c6dc43c67a91d59d72606fcac1ce9d1020 100644 (file)
@@ -28,7 +28,7 @@ pub fn main() {
         assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x)));
         *x = @F{f: ~4};
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(*b_x)) as uint);
         assert_eq!(*b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x)));
index f852f36d6337498b075866ee9c6304055a55ba3c..8a97e8f1b5caf6d43995b9edeb022aae2e8fdd1a 100644 (file)
@@ -26,7 +26,7 @@ pub fn main() {
         assert_eq!(ptr::to_unsafe_ptr(&(*x)), ptr::to_unsafe_ptr(&(*b_x)));
         x = @22;
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(*b_x)) as uint);
         assert_eq!(*b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x)) != ptr::to_unsafe_ptr(&(*b_x)));
index b9428daf152b44eaaee3df58d8fe3aa62a3bacf2..055a924cf04e3bdb484f39aa1c0b5c1b406822d2 100644 (file)
@@ -25,13 +25,13 @@ fn testfn(cond: bool) {
         exp = 4;
     }
 
-    info2!("*r = {}, exp = {}", *r, exp);
+    info!("*r = {}, exp = {}", *r, exp);
     assert_eq!(*r, exp);
 
     x = @5;
     y = @6;
 
-    info2!("*r = {}, exp = {}", *r, exp);
+    info!("*r = {}, exp = {}", *r, exp);
     assert_eq!(*r, exp);
     assert_eq!(x, @5);
     assert_eq!(y, @6);
index fec857574931154bed3806ed88a75dc9fedc60bd..a0010d36190910477a29a4b4603323969f9972b9 100644 (file)
@@ -28,7 +28,7 @@ pub fn main() {
         assert_eq!(ptr::to_unsafe_ptr(&(*x.f)), ptr::to_unsafe_ptr(&(*b_x)));
         x = @F {f: ~4};
 
-        info2!("ptr::to_unsafe_ptr(*b_x) = {:x}",
+        info!("ptr::to_unsafe_ptr(*b_x) = {:x}",
                ptr::to_unsafe_ptr(&(*b_x)) as uint);
         assert_eq!(*b_x, 3);
         assert!(ptr::to_unsafe_ptr(&(*x.f)) != ptr::to_unsafe_ptr(&(*b_x)));
index 6d16fd838f854e324bcac45eb07ecf3bbd16388c..87d42943fac97862f2c30c51cbabe9e8a1cc5d0a 100644 (file)
@@ -14,7 +14,7 @@ struct noncopyable {
 
 impl Drop for noncopyable {
     fn drop(&mut self) {
-        error2!("dropped");
+        error!("dropped");
     }
 }
 
index 249e9a47164c30db490875acfd87343d396e050a..ea2b7d58a1112c136f2a1ee2c68a1d4bc9a0cf58 100644 (file)
@@ -19,7 +19,7 @@
 fn length_is_even(_vs: @int) -> bool { return true; }
 
 fn foo(_acc: int, n: int) {
-    if is_odd(n) && length_is_even(some_box(1)) { error2!("bloop"); }
+    if is_odd(n) && length_is_even(some_box(1)) { error!("bloop"); }
 }
 
 pub fn main() { foo(67, 5); }
index a4563c33331b054078b055c3e784b36f2fcefc0f..53b468470609156db30b8914b0f2a629abf2eb07 100644 (file)
@@ -19,7 +19,7 @@
 fn length_is_even(_vs: @int) -> bool { return true; }
 
 fn foo(_acc: int, n: int) {
-    if is_odd(n) || length_is_even(some_box(1)) { error2!("bloop"); }
+    if is_odd(n) || length_is_even(some_box(1)) { error!("bloop"); }
 }
 
 pub fn main() { foo(67, 5); }
index f5d522470d360274356430d591fee918aed31ce5..2e92395d5490795296cad5b2bc37d93507cedaff 100644 (file)
@@ -17,6 +17,6 @@ struct Box<T> {c: @T}
 pub fn main() {
     let foo: int = 17;
     let bfoo: Box<int> = Box {c: @foo};
-    info2!("see what's in our box");
+    info!("see what's in our box");
     assert_eq!(unbox::<int>(bfoo), foo);
 }
index e9be0904d4e9b579deabdf744953bd464112a2c7..81bd3b6c139e343400c5bdbaa8b3012e9d3a6210 100644 (file)
@@ -15,7 +15,7 @@ struct Tree<T> {
     parent: Option<T>
 }
 
-fn empty<T>() -> Tree<T> { fail2!() }
+fn empty<T>() -> Tree<T> { fail!() }
 
 struct Box {
     tree: Tree<@Box>
index 69ca1584c12fa09fa579fc5a4220489afae825cd..2a3f79e824594646a73f34b4a2e5e01bb8d5dd9d 100644 (file)
@@ -12,5 +12,5 @@
 
 pub fn main() {
     let x = 3;
-    info2!("&x={:x}", borrow::to_uint(&x));
+    info!("&x={:x}", borrow::to_uint(&x));
 }
index 3db000accec77ea04a4f8f61aa87c258fda81d1c..fe57d6b3fecf8b2f46360d1a404355e7b9f0bb31 100644 (file)
@@ -17,6 +17,6 @@
 pub fn main() {
     let p = @22u;
     let r = foo(p);
-    info2!("r={}", r);
+    info!("r={}", r);
     assert_eq!(r, 22u);
 }
index 3e7cae395d482a59efe7102e5cc272c74a26c7c8..97b3eda5eff63b99af289666036970945119ecfb 100644 (file)
@@ -16,7 +16,7 @@ struct cat {
 
 impl Drop for cat {
     #[cat_dropper]
-    fn drop(&mut self) { error2!("{} landed on hir feet" , self . name); }
+    fn drop(&mut self) { error!("{} landed on hir feet" , self . name); }
 }
 
 
index 0a3f1539333cf9286870c3c553267cfe4892cb14..fa498e90503e88078ac51d11d23a8b6825bcf099 100644 (file)
@@ -18,7 +18,7 @@ impl Drop for cat {
        Actually, cats don't always land on their feet when you drop them.
     */
     fn drop(&mut self) {
-        error2!("{} landed on hir feet", self.name);
+        error!("{} landed on hir feet", self.name);
     }
 }
 
index bdba6a4c6c67bf6822b5e1811d01c870c030b0f8..52ba13595416c983b913496b7663eadc72673b91 100644 (file)
@@ -16,7 +16,7 @@
 
 fn print_out(thing: @ToStr, expected: ~str) {
   let actual = thing.to_str();
-  info2!("{}", actual);
+  info!("{}", actual);
   assert_eq!(actual, expected);
 }
 
index 3828fbd4395015bb30d8a7e9c60269aa6a1aaff3..a259ee8ffde42ddbe2ffa1074328f0933eae6cd3 100644 (file)
@@ -20,7 +20,7 @@ struct dog {
 
 impl dog {
     fn bark(&self) -> int {
-      info2!("Woof {} {}", *self.barks, *self.volume);
+      info!("Woof {} {}", *self.barks, *self.volume);
       *self.barks += 1u;
       if *self.barks % 3u == 0u {
           *self.volume += 1;
@@ -28,7 +28,7 @@ fn bark(&self) -> int {
       if *self.barks % 10u == 0u {
           *self.volume -= 2;
       }
-      info2!("Grrr {} {}", *self.barks, *self.volume);
+      info!("Grrr {} {}", *self.barks, *self.volume);
       *self.volume
     }
 }
@@ -62,7 +62,7 @@ pub fn meow_count(&self) -> uint { *self.meows }
 
 impl cat {
     fn meow(&self) -> uint {
-      info2!("Meow");
+      info!("Meow");
       *self.meows += 1u;
       if *self.meows % 5u == 0u {
           *self.how_hungry += 1;
index 69a94e09d5f3028daab7915b2c3b5e81a37868f1..737253a956fc02f9fc19e53961d60754ae35970f 100644 (file)
@@ -25,12 +25,12 @@ impl noisy for cat {
 impl cat {
   pub fn eat(&mut self) -> bool {
     if self.how_hungry > 0 {
-        error2!("OM NOM NOM");
+        error!("OM NOM NOM");
         self.how_hungry -= 2;
         return true;
     }
     else {
-        error2!("Not hungry!");
+        error!("Not hungry!");
         return false;
     }
   }
@@ -38,7 +38,7 @@ pub fn eat(&mut self) -> bool {
 
 impl cat {
     fn meow(&mut self) {
-      error2!("Meow");
+      error!("Meow");
       self.meows += 1u;
       if self.meows % 5u == 0u {
           self.how_hungry += 1;
index baa82dbb2deb6668ec9aaa32050b385fc04118a5..918547a3a2babcab4d749244a05dddd547c5433a 100644 (file)
@@ -38,11 +38,11 @@ impl<T> cat<T> {
 
     pub fn eat(&mut self) -> bool {
         if self.how_hungry > 0 {
-            error2!("OM NOM NOM");
+            error!("OM NOM NOM");
             self.how_hungry -= 2;
             return true;
         } else {
-            error2!("Not hungry!");
+            error!("Not hungry!");
             return false;
         }
     }
@@ -75,7 +75,7 @@ fn insert(&mut self, k: int, _: T) -> bool {
         true
     }
 
-    fn find_mut<'a>(&'a mut self, _k: &int) -> Option<&'a mut T> { fail2!() }
+    fn find_mut<'a>(&'a mut self, _k: &int) -> Option<&'a mut T> { fail!() }
 
     fn remove(&mut self, k: &int) -> bool {
         if self.find(k).is_some() {
@@ -85,16 +85,16 @@ fn remove(&mut self, k: &int) -> bool {
         }
     }
 
-    fn pop(&mut self, _k: &int) -> Option<T> { fail2!() }
+    fn pop(&mut self, _k: &int) -> Option<T> { fail!() }
 
-    fn swap(&mut self, _k: int, _v: T) -> Option<T> { fail2!() }
+    fn swap(&mut self, _k: int, _v: T) -> Option<T> { fail!() }
 }
 
 impl<T> cat<T> {
     pub fn get<'a>(&'a self, k: &int) -> &'a T {
         match self.find(k) {
           Some(v) => { v }
-          None    => { fail2!("epic fail"); }
+          None    => { fail!("epic fail"); }
         }
     }
 
@@ -106,7 +106,7 @@ pub fn new(in_x: int, in_y: int, in_name: T) -> cat<T> {
 impl<T> cat<T> {
     fn meow(&mut self) {
         self.meows += 1;
-        error2!("Meow {}", self.meows);
+        error!("Meow {}", self.meows);
         if self.meows % 5 == 0 {
             self.how_hungry += 1;
         }
index d6477d2d5a5cbae9dc895d176bd21094eb371d82..88051e18c30f272d79063514532f35d8dbe9ed06 100644 (file)
@@ -23,12 +23,12 @@ struct cat {
 impl cat {
     pub fn eat(&mut self) -> bool {
         if self.how_hungry > 0 {
-            error2!("OM NOM NOM");
+            error!("OM NOM NOM");
             self.how_hungry -= 2;
             return true;
         }
         else {
-            error2!("Not hungry!");
+            error!("Not hungry!");
             return false;
         }
     }
@@ -40,7 +40,7 @@ impl noisy for cat {
 
 impl cat {
     fn meow(&mut self) {
-        error2!("Meow");
+        error!("Meow");
         self.meows += 1u;
         if self.meows % 5u == 0u {
             self.how_hungry += 1;
index 1433b5a8024cde23c3613ed1bbab5c56876e806c..433d7f7a22ff48089fe38ececa8174b57605088e 100644 (file)
@@ -24,7 +24,7 @@ struct cat {
 
 impl cat {
     fn meow(&mut self) {
-        error2!("Meow");
+        error!("Meow");
         self.meows += 1u;
         if self.meows % 5u == 0u {
             self.how_hungry += 1;
@@ -35,11 +35,11 @@ fn meow(&mut self) {
 impl cat {
     pub fn eat(&mut self) -> bool {
         if self.how_hungry > 0 {
-            error2!("OM NOM NOM");
+            error!("OM NOM NOM");
             self.how_hungry -= 2;
             return true;
         } else {
-            error2!("Not hungry!");
+            error!("Not hungry!");
             return false;
         }
     }
index 5ef0569cf10e007aab7ebf5120fa4396e2207626..e16aa706049552125f7b283eea42ff83206a83a2 100644 (file)
@@ -21,12 +21,12 @@ impl cat {
 
     pub fn eat(&mut self) -> bool {
         if self.how_hungry > 0 {
-            error2!("OM NOM NOM");
+            error!("OM NOM NOM");
             self.how_hungry -= 2;
             return true;
         }
         else {
-            error2!("Not hungry!");
+            error!("Not hungry!");
             return false;
         }
     }
@@ -34,7 +34,7 @@ pub fn eat(&mut self) -> bool {
 
 impl cat {
     fn meow(&mut self) {
-        error2!("Meow");
+        error!("Meow");
         self.meows += 1u;
         if self.meows % 5u == 0u {
             self.how_hungry += 1;
@@ -58,7 +58,7 @@ fn to_str(&self) -> ~str {
 
 fn print_out(thing: @ToStr, expected: ~str) {
   let actual = thing.to_str();
-  info2!("{}", actual);
+  info!("{}", actual);
   assert_eq!(actual, expected);
 }
 
index 14acd1c911506b50577fd5bc7bfc0c6b0e9267ae..e5220b15520a7c95c1e351cd16006db7ecb209d4 100644 (file)
@@ -20,11 +20,11 @@ impl cat {
 
     pub fn eat(&mut self) -> bool {
         if self.how_hungry > 0 {
-            error2!("OM NOM NOM");
+            error!("OM NOM NOM");
             self.how_hungry -= 2;
             return true;
         } else {
-            error2!("Not hungry!");
+            error!("Not hungry!");
             return false;
         }
     }
@@ -32,7 +32,7 @@ pub fn eat(&mut self) -> bool {
 
 impl cat {
     fn meow(&mut self) {
-        error2!("Meow");
+        error!("Meow");
         self.meows += 1u;
         if self.meows % 5u == 0u {
             self.how_hungry += 1;
index 6381a402cfd96051f16403ccc55a629eb855f52d..70f70430bb9ee744f8930608a1dc775fbccd698b 100644 (file)
@@ -11,7 +11,7 @@
 use std::task;
 
 fn adder(x: @int, y: @int) -> int { return *x + *y; }
-fn failer() -> @int { fail2!(); }
+fn failer() -> @int { fail!(); }
 pub fn main() {
     assert!(task::try(|| {
         adder(@2, failer()); ()
index 4b6b3cca334085a6d1d23a492e1f6ea68cdba954..40d8cda9c41637ec6b7dd8997a414824da4d1ee9 100644 (file)
@@ -40,7 +40,7 @@ fn f<A:Clone + 'static>(a: A, b: u16) -> @Invokable<A> {
 
 pub fn main() {
     let (a, b) = f(22_u64, 44u16).f();
-    info2!("a={:?} b={:?}", a, b);
+    info!("a={:?} b={:?}", a, b);
     assert_eq!(a, 22u64);
     assert_eq!(b, 44u16);
 }
index 63c1f4ed3d6967b9c22b38301d551aeea3207807..a41f1fa42cd479c23c259cf81f7c1fd8be08ad18 100644 (file)
@@ -15,13 +15,13 @@ pub fn main() {
     let (p, ch) = stream();
     let _t = task::spawn(|| child(&ch) );
     let y = p.recv();
-    error2!("received");
-    error2!("{:?}", y);
+    error!("received");
+    error!("{:?}", y);
     assert_eq!(y, 10);
 }
 
 fn child(c: &Chan<int>) {
-    error2!("sending");
+    error!("sending");
     c.send(10);
-    error2!("value sent");
+    error!("value sent");
 }
index f395c6b7151cdaf821fa93cceb2b8fbfbb39985b..11599f6b1e35f92f65cdb5f90e5c0558e65aa263 100644 (file)
@@ -37,7 +37,7 @@ fn foo(x: int) -> int {
 
 pub fn main() {
     let x: int = 2 + 2;
-    info2!("{}", x);
-    info2!("hello, world");
-    info2!("{}", 10);
+    info!("{}", x);
+    info!("hello, world");
+    info!("{}", 10);
 }
index 17062757286e5abaa9bd28996002f94a744c2d11..1648b1989990e969fe0a0c22f44c81a440c042b3 100644 (file)
@@ -14,5 +14,5 @@
 
 fn main() {
     // only fails if debug! evaluates its argument.
-    debug2!("{:?}", { if true { fail2!() } });
+    debug!("{:?}", { if true { fail!() } });
 }
index dec79f0cb5b75ad59af25a0ddd1948843bab89dd..3842d480327379f95303aa5374fc82d7eb3aa0bf 100644 (file)
@@ -14,7 +14,7 @@
 fn main() {
     // exits early if debug! evaluates its arguments, otherwise it
     // will hit the fail.
-    debug2!("{:?}", { if true { return; } });
+    debug!("{:?}", { if true { return; } });
 
-    fail2!();
+    fail!();
 }
index 0a5a42116b9821604b37de7bff73717f97bbafd7..ac2e879ceacc931b266366e665372f9f94c31ead 100644 (file)
@@ -19,18 +19,18 @@ enum Foo {
 pub fn main() {
     match X {
         Baz => {}
-        _ => fail2!()
+        _ => fail!()
     }
     match Y {
         Bar(s) => assert!(s == 2654435769),
-        _ => fail2!()
+        _ => fail!()
     }
     match Z {
         Quux(d,h) => {
             assert_eq!(d, 0x123456789abcdef0);
             assert_eq!(h, 0x1234);
         }
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
index 25e4b7189f273ed9c26310b3e04717fd3d9a27b7..098a001cfcde977eee7cb9f748c95f1f1c0789ac 100644 (file)
@@ -15,7 +15,7 @@ impl E {
     pub fn method(&self) {
         match *self {
             V => {}
-            VV(*) => fail2!()
+            VV(*) => fail!()
         }
     }
 }
index 22ec61f8544744a4199cf54a4a50345da15f6ca3..83fafad4f99bbfcc1b6fe71c229c10b7b2078ce7 100644 (file)
@@ -14,7 +14,7 @@ enum E { V, VV(int) }
 fn f(a: &E) {
     match *a {
         V => {}
-        VV(*) => fail2!()
+        VV(*) => fail!()
     }
 }
 
index c75d1728ca94b7d6216304aef98e307a86ed6261..c1e3889d613d922dfcd3bd5f6a2ae3d869492379 100644 (file)
@@ -14,6 +14,6 @@ enum E { V0, V1(int) }
 pub fn main() {
     match *C {
         V0 => (),
-        _ => fail2!()
+        _ => fail!()
     }
 }
index 95ba635011f833641a05e23043261c90ac7679a8..943597fa28fa7490077e3dcd7fe64e1116f6241d 100644 (file)
@@ -19,7 +19,7 @@ enum E {
 
 pub fn main() {
     match C {
-        S0 { _ } => fail2!(),
+        S0 { _ } => fail!(),
         S1 { u } => assert!(u == 23)
     }
 }
index 5b4ce1bc4efd210df3872bd0b1183f26e645f25d..4c81eaae1d8027355f15a7ef388cfa407cd9e5d4 100644 (file)
@@ -16,10 +16,10 @@ enum E { V1(int), V0 }
 pub fn main() {
     match C0 {
         V0 => (),
-        _ => fail2!()
+        _ => fail!()
     }
     match C1 {
         V1(n) => assert!(n == 0xDEADBEE),
-        _ => fail2!()
+        _ => fail!()
     }
 }
index 8b905042f7ffc9db72f0ac2dd7e4e0215d984f35..95c4ed836c7698610affe5f2bd1f2972900e8714 100644 (file)
@@ -14,10 +14,10 @@ enum E { V1(int), V0 }
 pub fn main() {
     match C[1] {
         V1(n) => assert!(n == 0xDEADBEE),
-        _ => fail2!()
+        _ => fail!()
     }
     match C[2] {
         V0 => (),
-        _ => fail2!()
+        _ => fail!()
     }
 }
index cff5d4689e4d7d55732ce2846ed87cb0d4fc6155..3dc5b918f7f583db6518f2c6b8093caeae0db652 100644 (file)
@@ -14,10 +14,10 @@ enum E { V1(int), V0 }
 pub fn main() {
     match C[1] {
         V1(n) => assert!(n == 0xDEADBEE),
-        _ => fail2!()
+        _ => fail!()
     }
     match C[2] {
         V0 => (),
-        _ => fail2!()
+        _ => fail!()
     }
 }
index ac9a7fa6552cd5f41026e98be92c746eef12e5df..bc61c8e9aecf5e47bba25f8abaa74e3d8f0a3e78 100644 (file)
@@ -19,11 +19,11 @@ enum Foo {
 pub fn main() {
     match X {
         Bar => {}
-        Baz | Boo => fail2!()
+        Baz | Boo => fail!()
     }
     match Y {
         Baz => {}
-        Bar | Boo => fail2!()
+        Bar | Boo => fail!()
     }
 }
 
index 5696c163fc571ebfb40b3ef837802ca3109fd245..fe060ff482e710d09165fc72cf4840eb516effee 100644 (file)
@@ -12,4 +12,4 @@
 
 static i: int = 10;
 
-pub fn main() { info2!("{}", i); }
+pub fn main() { info!("{}", i); }
index 0260edf1182c6f28ac8db6ce4a83b34b7134f803..6e3d9629da043b88befd8963236c86181a63171b 100644 (file)
@@ -15,6 +15,6 @@
 #[start]
 fn start(argc: int, argv: **u8) -> int {
     do std::rt::start(argc, argv) {
-        info2!("creating my own runtime is joy");
+        info!("creating my own runtime is joy");
     }
 }
index 9a2819c2293715405004e149e82b335df59a46fc..2749fc31ceab75d0164e22d769e60b3bb71d8d7e 100644 (file)
@@ -12,4 +12,4 @@
 
 
 // -*- rust -*-
-pub fn main() { if 1 == 1 { return; } info2!("Paul is dead"); }
+pub fn main() { if 1 == 1 { return; } info!("Paul is dead"); }
index bc0b51c6b5d51f8f68bfa910d4626f629d3c7f06..e7a307c4a22a6427419fa3adf8f47de4f9b4b6e6 100644 (file)
@@ -10,4 +10,4 @@
 
 
 
-pub fn main() { let x = @mut 5; *x = 1000; info2!("{:?}", *x); }
+pub fn main() { let x = @mut 5; *x = 1000; info!("{:?}", *x); }
index 940ddc31f46a7534603785dff293c6e907959df6..431c856ee88a59927f455e9d2f62e79c43050c47 100644 (file)
 
 pub struct FailCmp;
 impl Eq for FailCmp {
-    fn eq(&self, _: &FailCmp) -> bool { fail2!("eq") }
+    fn eq(&self, _: &FailCmp) -> bool { fail!("eq") }
 }
 
 impl Ord for FailCmp {
-    fn lt(&self, _: &FailCmp) -> bool { fail2!("lt") }
+    fn lt(&self, _: &FailCmp) -> bool { fail!("lt") }
 }
 
 impl TotalEq for FailCmp {
-    fn equals(&self, _: &FailCmp) -> bool { fail2!("equals") }
+    fn equals(&self, _: &FailCmp) -> bool { fail!("equals") }
 }
 
 impl TotalOrd for FailCmp {
-    fn cmp(&self, _: &FailCmp) -> Ordering { fail2!("cmp") }
+    fn cmp(&self, _: &FailCmp) -> Ordering { fail!("cmp") }
 }
 
 #[deriving(Eq,Ord,TotalEq,TotalOrd)]
index ade01142c35b7266866b8b0adc8e8d936e486f9b..f08e5f054a9da75651f4def6d7f05aa9217a879c 100644 (file)
@@ -3,9 +3,9 @@
 #[allow(unreachable_code)];
 
 fn f() {
-    fail2!();
+    fail!();
 
-    let _x: int = fail2!();
+    let _x: int = fail!();
 }
 
 pub fn main() {
index 4c60cfb73281651f57c3d1007d45fb16ddada1ea..3c8dd33ae9c356111c05e9979522c8f45c88b3f2 100644 (file)
@@ -27,7 +27,7 @@ fn is_aligned<T>(ptr: &T) -> bool {
 pub fn main() {
     let x = Some(0u64);
     match x {
-        None => fail2!(),
+        None => fail!(),
         Some(ref y) => assert!(is_aligned(y))
     }
 }
index 334047d6ca693ae93b9072e32d2c6be82b245566..4764dbb9417fb02dc60b5ce313eaf71f7e757cd9 100644 (file)
@@ -19,6 +19,6 @@ pub fn main() {
     match Cons(10, @Nil) {
         Cons(10, _) => {}
         Nil => {}
-        _ => fail2!()
+        _ => fail!()
     }
 }
index 145f04009d16c1fbffa99d81a488499d977c1d38..f579e7a3d20acc0a3aac7c656ad1726f8f506ce4 100644 (file)
@@ -14,8 +14,8 @@ pub fn main() {
     let v = &"hello";
     let y : &str = &"there";
 
-    info2!("{}", x);
-    info2!("{}", y);
+    info!("{}", x);
+    info!("{}", y);
 
     assert_eq!(x[0], 'h' as u8);
     assert_eq!(x[4], 'o' as u8);
@@ -30,7 +30,7 @@ pub fn main() {
     let c = &"cccc";
     let cc = &"ccccc";
 
-    info2!("{}", a);
+    info!("{}", a);
 
     assert!(a < b);
     assert!(a <= b);
@@ -38,7 +38,7 @@ pub fn main() {
     assert!(b >= a);
     assert!(b > a);
 
-    info2!("{}", b);
+    info!("{}", b);
 
     assert!(a < c);
     assert!(a <= c);
@@ -46,7 +46,7 @@ pub fn main() {
     assert!(c >= a);
     assert!(c > a);
 
-    info2!("{}", c);
+    info!("{}", c);
 
     assert!(c < cc);
     assert!(c <= cc);
@@ -54,5 +54,5 @@ pub fn main() {
     assert!(cc >= c);
     assert!(cc > c);
 
-    info2!("{}", cc);
+    info!("{}", cc);
 }
index 32de1ad79b2658e653dcd4d5e72f46bcdb097764..a0af5e5a9e001fa066f479db8b6c71420f3a9b2d 100644 (file)
@@ -22,7 +22,7 @@ pub fn main() {
     let c : &[int] = &[2,2,2,2,3];
     let cc : &[int] = &[2,2,2,2,2,2];
 
-    info2!("{:?}", a);
+    info!("{:?}", a);
 
     assert!(a < b);
     assert!(a <= b);
@@ -30,7 +30,7 @@ pub fn main() {
     assert!(b >= a);
     assert!(b > a);
 
-    info2!("{:?}", b);
+    info!("{:?}", b);
 
     assert!(b < c);
     assert!(b <= c);
@@ -44,7 +44,7 @@ pub fn main() {
     assert!(c >= a);
     assert!(c > a);
 
-    info2!("{:?}", c);
+    info!("{:?}", c);
 
     assert!(a < cc);
     assert!(a <= cc);
@@ -52,5 +52,5 @@ pub fn main() {
     assert!(cc >= a);
     assert!(cc > a);
 
-    info2!("{:?}", cc);
+    info!("{:?}", cc);
 }
index 8fdc9c563156d27ba4fe8e9d40453e5cf11d4ab4..13b21fbe1afe84a702af5ee1257a023d0f510958 100644 (file)
@@ -13,7 +13,7 @@ pub mod bar {
         pub fn y() { super::super::foo::x(); }
     }
 
-    pub fn x() { info2!("x"); }
+    pub fn x() { info!("x"); }
 }
 
 pub fn main() { self::foo::bar::y(); }
index b06323741a5c2f2581d370a767262ac33a8f7848..e2af3121f16e1065445dc37a90128886deb5c708 100644 (file)
@@ -15,7 +15,7 @@ pub mod foo {
 }
 
 pub mod bar {
-    pub fn x() { info2!("x"); }
+    pub fn x() { info!("x"); }
 }
 
 pub fn main() { foo::x(); }
index 710cab50fba693ef92c89deffa0edf1f0192f3b8..b4ca5e31e612aefc2bf4f6703b6be50ed618c85f 100644 (file)
@@ -21,8 +21,8 @@ fn test_generic<T>(expected: @T, eq: compare<T>) {
 
 fn test_box() {
     fn compare_box(b1: @bool, b2: @bool) -> bool {
-        info2!("{}", *b1);
-        info2!("{}", *b2);
+        info!("{}", *b1);
+        info!("{}", *b2);
         return *b1 == *b2;
     }
     test_generic::<bool>(@true, compare_box);
index f22ef2138ff82cab36313cb42014c696c1dfc680..b225f1a8ddfad5ab35b85eb2aaf35862e68de712 100644 (file)
@@ -20,8 +20,8 @@ fn test_generic<T:Clone>(expected: ~T, eq: compare<T>) {
 
 fn test_box() {
     fn compare_box(b1: ~bool, b2: ~bool) -> bool {
-        info2!("{}", *b1);
-        info2!("{}", *b2);
+        info!("{}", *b1);
+        info!("{}", *b2);
         return *b1 == *b2;
     }
     test_generic::<bool>(~true, compare_box);
index b19b9ceaa00b90bcf294061d789b965fab4d6883..a34620d2e1be427f97afd9b03057e0b9c3e5b8ce 100644 (file)
@@ -14,6 +14,6 @@ pub fn main() {
     let _x = if true {
         10
     } else {
-        if true { fail2!() } else { fail2!() }
+        if true { fail!() } else { fail!() }
     };
 }
index 966a1db1d0e6091af58a43cdb4d70d16810c9adb..f79b7198b50e7e76fc31e09d144428409004018e 100644 (file)
@@ -8,15 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn test_if_fail() { let x = if false { fail2!() } else { 10 }; assert!((x == 10)); }
+fn test_if_fail() { let x = if false { fail!() } else { 10 }; assert!((x == 10)); }
 
 fn test_else_fail() {
-    let x = if true { 10 } else { fail2!() };
+    let x = if true { 10 } else { fail!() };
     assert_eq!(x, 10);
 }
 
 fn test_elseif_fail() {
-    let x = if false { 0 } else if false { fail2!() } else { 10 };
+    let x = if false { 0 } else if false { fail!() } else { 10 };
     assert_eq!(x, 10);
 }
 
index 6f638758ed882cbf709ceeb22b6207083bfae43a..84a78637187fc93da6c8b4f99c0c47fa2b205617 100644 (file)
 
 // Tests for match as expressions resulting in boxed types
 fn test_box() {
-    let res = match true { true => { @100 } _ => fail2!("wat") };
+    let res = match true { true => { @100 } _ => fail!("wat") };
     assert_eq!(*res, 100);
 }
 
 fn test_str() {
     let res = match true { true => { ~"happy" },
-                         _ => fail2!("not happy at all") };
+                         _ => fail!("not happy at all") };
     assert_eq!(res, ~"happy");
 }
 
index 418031243ee5e37cb908890930659f99a01f4bc6..aef11a78e0dbb6ae5c79deedd52dd821b87292b4 100644 (file)
@@ -17,6 +17,6 @@ pub fn main() {
     let _x =
         match true {
           true => { 10 }
-          false => { match true { true => { fail2!() } false => { fail2!() } } }
+          false => { match true { true => { fail!() } false => { fail!() } } }
         };
 }
index c1081561b6f123a091f7db39cd5172243142ab69..3e1b96763e1966e25763816bd80345ed369c332a 100644 (file)
@@ -9,12 +9,12 @@
 // except according to those terms.
 
 fn test_simple() {
-    let r = match true { true => { true } false => { fail2!() } };
+    let r = match true { true => { true } false => { fail!() } };
     assert_eq!(r, true);
 }
 
 fn test_box() {
-    let r = match true { true => { ~[10] } false => { fail2!() } };
+    let r = match true { true => { ~[10] } false => { fail!() } };
     assert_eq!(r[0], 10);
 }
 
index e70a18a7f6d80ff595e8617fcdb8f45d843141b5..064e33436205047e61e289bfae458ad686fc2b40 100644 (file)
@@ -15,7 +15,7 @@
 type compare<T> = &'static fn(@T, @T) -> bool;
 
 fn test_generic<T>(expected: @T, eq: compare<T>) {
-    let actual: @T = match true { true => { expected }, _ => fail2!() };
+    let actual: @T = match true { true => { expected }, _ => fail!() };
     assert!((eq(expected, actual)));
 }
 
index 92e13e36d073a358e761b5f070f62e303544e32a..bca06ebdbb5f3405f5757b836d0badffad7bfba4 100644 (file)
@@ -14,7 +14,7 @@
 type compare<T> = &'static fn(T, T) -> bool;
 
 fn test_generic<T:Clone>(expected: T, eq: compare<T>) {
-    let actual: T = match true { true => { expected.clone() }, _ => fail2!("wat") };
+    let actual: T = match true { true => { expected.clone() }, _ => fail!("wat") };
     assert!((eq(expected, actual)));
 }
 
index e4a6fa516c5bd43403280df0f2fd42392d64f69d..7371f8fd89b9ce28c193edbc0cb9ad7e2c4c8d05 100644 (file)
@@ -16,7 +16,7 @@
 fn test_generic<T:Clone>(expected: ~T, eq: compare<T>) {
     let actual: ~T = match true {
         true => { expected.clone() },
-        _ => fail2!("wat")
+        _ => fail!("wat")
     };
     assert!((eq(expected, actual)));
 }
index 09278fad75ce90282781e069f009e393ce072370..d07d40e675766c2ddae974844d25a8a507adb62e 100644 (file)
@@ -16,7 +16,7 @@
 fn test_generic<T:Clone>(expected: T, eq: compare<T>) {
     let actual: T = match true {
         true => expected.clone(),
-        _ => fail2!("wat")
+        _ => fail!("wat")
     };
     assert!((eq(expected, actual)));
 }
index d98cd130022fed47f4e3620f1cbd653b8510e882..b43085d346f30416b2e89a06c56c904afd2ae165 100644 (file)
@@ -14,7 +14,7 @@
 type compare<T> = extern "Rust" fn(T, T) -> bool;
 
 fn test_generic<T:Clone>(expected: T, eq: compare<T>) {
-  let actual: T = match true { true => { expected.clone() }, _ => fail2!("wat") };
+  let actual: T = match true { true => { expected.clone() }, _ => fail!("wat") };
     assert!((eq(expected, actual)));
 }
 
index 7fa58a535b0a45cb82c2ea8ba11d6860273e6957..7cfcc38f8dd3104eb55806acb9e9757a19cf3971 100644 (file)
@@ -17,7 +17,7 @@
 struct R { i: int }
 
 fn test_rec() {
-    let rs = match true { true => R {i: 100}, _ => fail2!() };
+    let rs = match true { true => R {i: 100}, _ => fail!() };
     assert_eq!(rs.i, 100);
 }
 
index 7f610d1babd87b68e8627ca41f3b1ecf9b967390..cdd4e45877ad640f692cfa624db363ac165d217b 100644 (file)
@@ -15,7 +15,7 @@
 
 // Tests for match as expressions resulting in boxed types
 fn test_box() {
-    let res = match true { true => { ~100 }, _ => fail2!() };
+    let res = match true { true => { ~100 }, _ => fail!() };
     assert_eq!(*res, 100);
 }
 
index 41ae128626befd76a39b331afbf72cb1e8228a4b..86922f5dc25e3de1b554731cbd9bf7fb49ebb1bf 100644 (file)
@@ -31,13 +31,13 @@ pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
 #[fixed_stack_segment]
 fn count(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         rustrt::rust_dbg_call(cb, n)
     }
 }
 
 pub fn main() {
     let result = count(1000u);
-    info2!("result = {}", result);
+    info!("result = {}", result);
     assert_eq!(result, 1000u);
 }
index 0490949e8a475908bab733487f8720859513a255..bbff0edfffd8fb5eae0fd457f338a2e667f377e3 100644 (file)
@@ -32,7 +32,7 @@ pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
 #[fixed_stack_segment] #[inline(never)]
 fn count(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         rustrt::rust_dbg_call(cb, n)
     }
 }
@@ -42,7 +42,7 @@ pub fn main() {
     // has a large stack)
     do task::spawn {
         let result = count(1000u);
-        info2!("result = {}", result);
+        info!("result = {}", result);
         assert_eq!(result, 1000u);
     };
 }
index 733625f492ef9184a1ff41ef6bd1d8fc7e5dbfbd..bea937fa9c9a720b53658e7c4f60d43a8209eea2 100644 (file)
@@ -31,13 +31,13 @@ pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
 #[fixed_stack_segment] #[inline(never)]
 fn fact(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         rustrt::rust_dbg_call(cb, n)
     }
 }
 
 pub fn main() {
     let result = fact(10u);
-    info2!("result = {}", result);
+    info!("result = {}", result);
     assert_eq!(result, 3628800u);
 }
index 74b1ed9a5c42301ce64a411d9c95fb7ad596ea2d..8a54b9bfc3481c06700d3e8c223ff9fb142f874d 100644 (file)
@@ -36,7 +36,7 @@ pub fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t) -> libc::uintptr_t,
 #[fixed_stack_segment] #[inline(never)]
 fn count(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         rustrt::rust_dbg_call(cb, n)
     }
 }
@@ -46,7 +46,7 @@ pub fn main() {
     // has a large stack)
     do task::spawn {
         let result = count(12u);
-        info2!("result = {}", result);
+        info!("result = {}", result);
         assert_eq!(result, 2048u);
     };
 }
index 3367b795462b3ad95bf76fad6f171d2fc4577d39..a2b42134b55ba88cf02717edfa129a75f2fcace3 100644 (file)
 #[fixed_stack_segment] #[inline(never)]
 fn fact(n: uint) -> uint {
     unsafe {
-        info2!("n = {}", n);
+        info!("n = {}", n);
         externcallback::rustrt::rust_dbg_call(externcallback::cb, n)
     }
 }
 
 pub fn main() {
     let result = fact(10u);
-    info2!("result = {}", result);
+    info!("result = {}", result);
     assert_eq!(result, 3628800u);
 }
index 7e71d416b55a8b701205c00b459a0ddfe73e0a81..3ce0dbe30e2066199c54671e3bb12f8af4c6a247 100644 (file)
@@ -41,7 +41,7 @@ pub fn main() {
     do 10u.times {
         do task::spawn {
             let result = count(5u);
-            info2!("result = {}", result);
+            info!("result = {}", result);
             assert_eq!(result, 16u);
         };
     }
index f0379e1dac1c9e7edbd1cdf71a86c8bc5ddb1b04..1c9f5e254f146fbb1d6dd7dbed993f11068340bb 100644 (file)
@@ -15,7 +15,7 @@
 fn f(x: int) -> int {
     // info!("in f:");
 
-    info2!("{}", x);
+    info!("{}", x);
     if x == 1 {
         // info!("bottoming out");
 
@@ -26,7 +26,7 @@ fn f(x: int) -> int {
         let y: int = x * f(x - 1);
         // info!("returned");
 
-        info2!("{}", y);
+        info!("{}", y);
         return y;
     }
 }
index be945e93ec9d0c945cea577c17761908c5ef4791..63e62e254b80a514ec6d300e9b6840fe73a9d640 100644 (file)
@@ -17,7 +17,7 @@ enum color {
 }
 
 pub fn main() {
-    error2!("{}", match red {
+    error!("{}", match red {
         red => { 1 }
         green => { 2 }
         blue => { 3 }
index dae41d34e05267f8fa4b0eb0460009a901ec1601..26974bbcecef76d3fc9eb2433d15a077bd602ff7 100644 (file)
@@ -14,5 +14,5 @@ pub fn main() {
     fn foo(n: f64) -> f64 { return n + 0.12345; }
     let n: f64 = 0.1;
     let m: f64 = foo(n);
-    info2!("{}", m);
+    info!("{}", m);
 }
index 1418255d601ca9134bcdecea25d879b267a73107..987ee233810f7d743171750faf97a38906ab2655 100644 (file)
@@ -12,9 +12,9 @@
 
 pub fn main() {
     let pi = 3.1415927;
-    info2!("{:?}", -pi * (pi + 2.0 / pi) - pi * 5.0);
+    info!("{:?}", -pi * (pi + 2.0 / pi) - pi * 5.0);
     if pi == 5.0 || pi < 10.0 || pi <= 2.0 || pi != 22.0 / 7.0 || pi >= 10.0
            || pi > 1.0 {
-        info2!("yes");
+        info!("yes");
     }
 }
index be0f686c5a4031a7c526e084f013515c75ed4210..e01c7ee998c3140843eb519c06d88a3764e355e3 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 fn f() {
-    info2!("This is a bare function");
+    info!("This is a bare function");
 }
 
 pub fn main() {
index 9599c5852df89e445758714a3d5e2354ee93b39a..ff718500340c8ebb1136eaf84d51ff199a0a49e4 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub fn main() { let x: ~[int] = ~[]; for _ in x.iter() { fail2!("moop"); } }
+pub fn main() { let x: ~[int] = ~[]; for _ in x.iter() { fail!("moop"); } }
index 6e20bb20bd9365401f1dcb1f31227a0e474f882d..2b57cc033f9f68308b342e9c09f791695d641a90 100644 (file)
@@ -21,8 +21,8 @@ pub fn main() {
     let mut j: int = 0;
     do pairs() |p| {
         let (_0, _1) = p;
-        info2!("{}", _0);
-        info2!("{}", _1);
+        info!("{}", _0);
+        info!("{}", _1);
         assert_eq!(_0 + 10, i);
         i += 1;
         j = _1;
index b5fa186902e39d7697e61f3091a4c88e6d91b7b3..53201c7a91aa789233216d97fe16022b852e2736 100644 (file)
 // -*- rust -*-
 pub fn main() {
     let mut sum: int = 0;
-    do first_ten |i| { info2!("main"); info2!("{}", i); sum = sum + i; }
-    info2!("sum");
-    info2!("{}", sum);
+    do first_ten |i| { info!("main"); info!("{}", i); sum = sum + i; }
+    info!("sum");
+    info!("{}", sum);
     assert_eq!(sum, 45);
 }
 
 fn first_ten(it: &fn(int)) {
     let mut i: int = 0;
-    while i < 10 { info2!("first_ten"); it(i); i = i + 1; }
+    while i < 10 { info!("first_ten"); it(i); i = i + 1; }
 }
index b4412db1a5881e7ad1358af049b3e8b6ce695f15..0ba40fe063d7e279a956f3140857620b33aa4a35 100644 (file)
@@ -15,6 +15,6 @@
 pub fn main() {
     let expected = @100;
     let actual = id::<@int>(expected);
-    info2!("{:?}", *actual);
+    info!("{:?}", *actual);
     assert_eq!(*expected, *actual);
 }
index ab50b70b1b8c8fe0bb5d11846ca2cb95c4430f7d..a54c68a907b9b2eb59ddf9bfbda1ef34bc8527e4 100644 (file)
@@ -15,6 +15,6 @@
 pub fn main() {
     let expected = ~100;
     let actual = id::<~int>(expected.clone());
-    info2!("{:?}", *actual);
+    info!("{:?}", *actual);
     assert_eq!(*expected, *actual);
 }
index 7ce3dc7a03da73cf1d2333f5491f6a6effc2dbb6..396ac88bd06de088756343e85be696b7aa632e8d 100644 (file)
@@ -25,8 +25,8 @@ fn f<T:Clone>(t: T) -> Pair<T> {
 
 pub fn main() {
     let b = f::<int>(10);
-    info2!("{:?}" ,b.a);
-    info2!("{:?}", b.b);
+    info!("{:?}" ,b.a);
+    info!("{:?}", b.b);
     assert_eq!(b.a, 10);
     assert_eq!(b.b, 10);
 }
index c5d6d23d9487c435da0fa4e0f60fd120efba1799..a203b6b3adab451a80256d92727be9e656e3635a 100644 (file)
@@ -12,4 +12,4 @@
 
 fn f<T>(x: @T) -> @T { return x; }
 
-pub fn main() { let x = f(@3); info2!("{:?}", *x); }
+pub fn main() { let x = f(@3); info!("{:?}", *x); }
index d4ba0ddfc8e4424a01e425b39aaef27cdebecbd3..64e7d0101b875469cc448bc3220669176bd73235 100644 (file)
@@ -11,4 +11,4 @@
 
 fn f<T>(x: ~T) -> ~T { return x; }
 
-pub fn main() { let x = f(~3); info2!("{:?}", *x); }
+pub fn main() { let x = f(~3); info!("{:?}", *x); }
index 4d8b382b511ea512eaa92d6da90df6df877601fa..652349dea82da56afdca2091d338abfa4fd68d54 100644 (file)
@@ -23,14 +23,14 @@ pub fn main() {
     let p: Triple = Triple {x: 65, y: 66, z: 67};
     let mut q: Triple = Triple {x: 68, y: 69, z: 70};
     y = id::<int>(x);
-    info2!("{}", y);
+    info!("{}", y);
     assert_eq!(x, y);
     b = id::<char>(a);
-    info2!("{}", b);
+    info!("{}", b);
     assert_eq!(a, b);
     q = id::<Triple>(p);
     x = p.z;
     y = q.z;
-    info2!("{}", y);
+    info!("{}", y);
     assert_eq!(x, y);
 }
index 7b3b11189746a213adb6cc3de71b80f553606e97..f740d8cb2d1591ef73233d5b392bd22d1efde466 100644 (file)
@@ -14,7 +14,7 @@ enum foo<T> { arm(T), }
 
 fn altfoo<T>(f: foo<T>) {
     let mut hit = false;
-    match f { arm::<T>(_x) => { info2!("in arm"); hit = true; } }
+    match f { arm::<T>(_x) => { info!("in arm"); hit = true; } }
     assert!((hit));
 }
 
index 739eb9f0aca3c283d5bd9c3ffba4820dcf626463..984765c4e5190d6952d8f2aa8a9a8c785662c1ec 100644 (file)
@@ -18,12 +18,12 @@ struct Pair { x: int, y: int }
 
 pub fn main() {
     let nop: noption<int> = some::<int>(5);
-    match nop { some::<int>(n) => { info2!("{:?}", n); assert!((n == 5)); } }
+    match nop { some::<int>(n) => { info!("{:?}", n); assert!((n == 5)); } }
     let nop2: noption<Pair> = some(Pair{x: 17, y: 42});
     match nop2 {
       some(t) => {
-        info2!("{:?}", t.x);
-        info2!("{:?}", t.y);
+        info!("{:?}", t.x);
+        info!("{:?}", t.y);
         assert_eq!(t.x, 17);
         assert_eq!(t.y, 42);
       }
index 5143676f34a5b234d2bc8e75c3987b06735d231d..1f480bf402be1b84aca8c002a945f543ff7d38fb 100644 (file)
@@ -12,7 +12,7 @@
 
 fn mk() -> int { return 1; }
 
-fn chk(a: int) { info2!("{}", a); assert!((a == 1)); }
+fn chk(a: int) { info!("{}", a); assert!((a == 1)); }
 
 fn apply<T>(produce: extern fn() -> T,
             consume: extern fn(T)) {
index f9f5da51196b5bd8f73d69d80695bff8c06253e7..9626884be9dd95c75ad97e5a8eba4d3a59cada86 100644 (file)
@@ -11,7 +11,7 @@
 fn get_third<T>(t: (T, T, T)) -> T { let (_, _, x) = t; return x; }
 
 pub fn main() {
-    info2!("{:?}", get_third((1, 2, 3)));
+    info!("{:?}", get_third((1, 2, 3)));
     assert_eq!(get_third((1, 2, 3)), 3);
     assert_eq!(get_third((5u8, 6u8, 7u8)), 7u8);
 }
index e0ac464f321b89ed06aa531eb51df4cf0939623d..bfc140065655f5af85b82f41a72a71d8e8fb4485 100644 (file)
@@ -21,7 +21,7 @@ pub fn main() {
     match getopts(args, opts) {
         Ok(ref m)  =>
             assert!(!m.opt_present("b")),
-        Err(ref f) => fail2!("{:?}", (*f).clone().to_err_msg())
+        Err(ref f) => fail!("{:?}", (*f).clone().to_err_msg())
     };
 
 }
index 13a544a200bab8760c33649a7e9b9e8b0dcfe93c..73595fd782c4744fefae61462929d7dfd841b72f 100644 (file)
@@ -47,11 +47,11 @@ fn emit(im: &mut HashMap<~str, int>, ctrl: SharedChan<ctrl_proto>, key: ~str,
                 return;
             }
             let (pp, cc) = stream();
-            error2!("sending find_reducer");
+            error!("sending find_reducer");
             ctrl.send(find_reducer(key.as_bytes().to_owned(), cc));
-            error2!("receiving");
+            error!("receiving");
             let c = pp.recv();
-            error2!("{:?}", c);
+            error!("{:?}", c);
             im.insert(key, c);
         }
 
index 768f3431832da3adaabc7b40ed3bc6876899216c..6ac169fed9b09e62f1b27d33733eefa27e6f95a0 100644 (file)
@@ -11,6 +11,6 @@
 
 
 pub fn main() {
-    let i: int = if false { fail2!() } else { 5 };
-    info2!("{:?}", i);
+    let i: int = if false { fail!() } else { 5 };
+    info!("{:?}", i);
 }
index 0fd5fc01d17623131e623ecb6378d12d4daac68e..50a1b4345dc7ea3734896cd7e31c7026bfc14ec4 100644 (file)
@@ -16,9 +16,9 @@ fn even(x: uint) -> bool {
 
 fn foo(x: uint) {
     if even(x) {
-        info2!("{}", x);
+        info!("{}", x);
     } else {
-        fail2!();
+        fail!();
     }
 }
 
index 1da617273df64634175fdfe7d01967fb82bf96f0..0ace721cdc06fe9691048d0b1e606d49e96b65e9 100644 (file)
 use dug::too::greedily::and::too::deep::*;
 
 mod module_of_many_things {
-    pub fn f1() { info2!("f1"); }
-    pub fn f2() { info2!("f2"); }
-    fn f3() { info2!("f3"); }
-    pub fn f4() { info2!("f4"); }
+    pub fn f1() { info!("f1"); }
+    pub fn f2() { info!("f2"); }
+    fn f3() { info!("f3"); }
+    pub fn f4() { info!("f4"); }
 }
 
 mod dug {
@@ -28,8 +28,8 @@ pub mod greedily {
             pub mod and {
                 pub mod too {
                     pub mod deep {
-                        pub fn nameless_fear() { info2!("Boo!"); }
-                        pub fn also_redstone() { info2!("Whatever."); }
+                        pub fn nameless_fear() { info!("Boo!"); }
+                        pub fn also_redstone() { info!("Whatever."); }
                     }
                 }
             }
index eff085e687dfcba2f1c91fa1cfce0f73132972fb..2b20eed593aa289f9d6e5fb9b7017fd2d7cd645c 100644 (file)
@@ -11,7 +11,7 @@
 // except according to those terms.
 
 mod foo {
-    pub fn x(y: int) { info2!("{:?}", y); }
+    pub fn x(y: int) { info!("{:?}", y); }
 }
 
 mod bar {
index 3ca64ce199ec56085791db2859bd677edbe06918..9cda55f508408cf2d67d409fdbfed4899d6472c4 100644 (file)
@@ -14,7 +14,7 @@
 use zed::bar;
 
 mod zed {
-    pub fn bar() { info2!("bar"); }
+    pub fn bar() { info!("bar"); }
 }
 
 pub fn main() { bar(); }
index 10f6d87bf4cfdc18ed9a4e939a9c636f62c82bf0..64d47bf22195f634822d497b834483193339b1d7 100644 (file)
@@ -17,7 +17,7 @@
 
 mod baz {
     pub mod zed {
-        pub fn bar() { info2!("bar2"); }
+        pub fn bar() { info!("bar2"); }
     }
 }
 
index d453306317bb78c2e4ae906d2a7e41ffe9d46837..d368ab2e993db4a7a5efa1364c8d9b3f8d5e9b42 100644 (file)
@@ -14,7 +14,7 @@
 use zed::bar;
 
 mod zed {
-    pub fn bar() { info2!("bar"); }
+    pub fn bar() { info!("bar"); }
 }
 
 pub fn main() { let _zed = 42; bar(); }
index 00c5f35c54239fcf9c38cfedcc24e77d15574fb3..e9539b290ae1d1ab8c491c9b425ebfdb33f9842f 100644 (file)
@@ -14,7 +14,7 @@
 mod foo {
     pub use foo::zed::bar;
     pub mod zed {
-        pub fn bar() { info2!("foo"); }
+        pub fn bar() { info!("foo"); }
     }
 }
 
index 150a89f61769de05d6d1a45dcc54da7fff2f8856..4f813247576c8fcfb2454366dda8a390e28efa45 100644 (file)
@@ -17,7 +17,7 @@
 
 mod foo {
     pub mod zed {
-        pub fn baz() { info2!("baz"); }
+        pub fn baz() { info!("baz"); }
     }
 }
 mod bar {
index e9241882f655972a2f607f7954742e18c3f523d5..63a30ccee2cebb0656b04aa372bd701833f77081 100644 (file)
@@ -17,7 +17,7 @@
 
 mod foo {
     pub mod zed {
-        pub fn baz() { info2!("baz"); }
+        pub fn baz() { info!("baz"); }
     }
 }
 mod bar {
index 9b0c512d4f1f45d16ab11a2cee8fdcda2454343a..2af4cf5e984246afd87c1daedf0caf6bae51f0fa 100644 (file)
@@ -15,7 +15,7 @@
 use z = foo::x;
 
 mod foo {
-    pub fn x(y: int) { info2!("{}", y); }
+    pub fn x(y: int) { info!("{}", y); }
 }
 
 pub fn main() { x(10); z(10); }
index 7e3547ba7f3298fea665ea7521b191ab1c241e1c..1e53dd849fc8fc607e0c3eda04d258eb526832f3 100644 (file)
@@ -14,7 +14,7 @@
 // -*- rust -*-
 mod inner {
     pub mod inner2 {
-        pub fn hello() { info2!("hello, modular world"); }
+        pub fn hello() { info!("hello, modular world"); }
     }
     pub fn hello() { inner2::hello(); }
 }
index 05032dda759b0274646ed584c9ba0ce62e8d297e..edc71b524e337d8d0f8e057bf3273b0840ff0473 100644 (file)
@@ -20,11 +20,11 @@ pub fn main() {
     assert_eq!(v[3i8], 3);
     assert_eq!(v[3u32], 3);
     assert_eq!(v[3i32], 3);
-    info2!("{}", v[3u8]);
+    info!("{}", v[3u8]);
     assert_eq!(s[3u], 'd' as u8);
     assert_eq!(s[3u8], 'd' as u8);
     assert_eq!(s[3i8], 'd' as u8);
     assert_eq!(s[3u32], 'd' as u8);
     assert_eq!(s[3i32], 'd' as u8);
-    info2!("{}", s[3u8]);
+    info!("{}", s[3u8]);
 }
index 17444e657087c73641502f94b01b0d1d2399730c..4b73d83595e64c6c2ac33d71c8c46b8e75c0360f 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 pub fn main() {
-    let early_error: &'static fn(&str) -> !  = |_msg| { fail2!() };
+    let early_error: &'static fn(&str) -> !  = |_msg| { fail!() };
 }
index de62c57ab9fa24b52360aa5a9960091d0b02ba66..1532a8a3fb88334266b77e089ba8f51219933dd9 100644 (file)
@@ -15,5 +15,5 @@
 pub fn main() {
     let mut m = HashMap::new();
     m.insert("foo".as_bytes().to_owned(), "bar".as_bytes().to_owned());
-    error2!("{:?}", m);
+    error!("{:?}", m);
 }
index f51a49e9c7b93ab21728bbacf1ed3b3dcc4a6035..4a1bb2ea8776c296266b9346df6e1457055928b4 100644 (file)
@@ -27,6 +27,6 @@ pub fn main() {
         break;
     }
 
-    error2!("{:?}", x);
+    error!("{:?}", x);
     assert_eq!(x, 42);
 }
index cf8d3dc642c2ba253b1ee0b6704c5e86ac081c62..b03bfb958af1b2af92258db09dad4f7471aa6ba5 100644 (file)
@@ -15,7 +15,7 @@ struct foo<A> {
 
 impl<A> foo<A> {
    pub fn bar<B,C:clam<A>>(&self, _c: C) -> B {
-     fail2!();
+     fail!();
    }
 }
 
index 54a8730fa1bb29a092ec9242ee9dd7f5c80166c4..14b5efe904db8c4b5036704f50bac4c728abec23 100644 (file)
@@ -15,7 +15,7 @@ trait clam<A> { }
 struct foo(int);
 
 impl foo {
-    pub fn bar<B,C:clam<B>>(&self, _c: C) -> B { fail2!(); }
+    pub fn bar<B,C:clam<B>>(&self, _c: C) -> B { fail!(); }
 }
 
 pub fn main() { }
index 5882edf18803e78785e3672b383376360566a809..a3d51bb9014e88d1157106366284ba6a0cbac1c0 100644 (file)
@@ -20,7 +20,7 @@ struct E {
 }
 
 impl A for E {
-  fn b<F,G>(_x: F) -> F { fail2!() }
+  fn b<F,G>(_x: F) -> F { fail!() }
   //~^ ERROR in method `b`, type parameter 0 has 1 bound, but
 }
 
index e905c895c3510d7bc6dab93dd46b9dfe05d853e0..bde18d77b9add6edf023e34e56a14b11f636ff50 100644 (file)
@@ -13,7 +13,7 @@ struct cat {
 }
 
 fn meow() {
-    error2!("meow")
+    error!("meow")
 }
 
 fn cat() -> cat {
index 617f98cdb5f19e0b4cdca7295966a6889fbce29c..7cebfa13223475f1702a3c8e3d1a199dd44f3732 100644 (file)
@@ -52,9 +52,9 @@ pub fn packet<T:Send>() -> *packet<T> {
     }
 
     mod rusti {
-      pub fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail2!(); }
-      pub fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail2!(); }
-      pub fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail2!(); }
+      pub fn atomic_xchg(_dst: &mut int, _src: int) -> int { fail!(); }
+      pub fn atomic_xchg_acq(_dst: &mut int, _src: int) -> int { fail!(); }
+      pub fn atomic_xchg_rel(_dst: &mut int, _src: int) -> int { fail!(); }
     }
 
     // We should consider moving this to ::std::unsafe, although I
@@ -88,7 +88,7 @@ pub fn send<T:Send>(mut p: send_packet<T>, payload: T) {
             // The receiver will eventually clean this up.
             unsafe { forget(p); }
           }
-          full => { fail2!("duplicate send") }
+          full => { fail!("duplicate send") }
           blocked => {
 
             // The receiver will eventually clean this up.
@@ -130,7 +130,7 @@ pub fn sender_terminate<T:Send>(p: *packet<T>) {
           }
           full => {
             // This is impossible
-            fail2!("you dun goofed")
+            fail!("you dun goofed")
           }
           terminated => {
             // I have to clean up, use drop_glue
@@ -147,7 +147,7 @@ pub fn receiver_terminate<T:Send>(p: *packet<T>) {
           }
           blocked => {
             // this shouldn't happen.
-            fail2!("terminating a blocked packet")
+            fail!("terminating a blocked packet")
           }
           terminated | full => {
             // I have to clean up, use drop_glue
@@ -232,7 +232,7 @@ pub fn liberate_ping(p: ping) -> ::pipes::send_packet<pong> {
             let _addr : *::pipes::send_packet<pong> = match &p {
               &ping(ref x) => { cast::transmute(x) }
             };
-            fail2!()
+            fail!()
         }
     }
 
@@ -241,7 +241,7 @@ pub fn liberate_pong(p: pong) -> ::pipes::send_packet<ping> {
             let _addr : *::pipes::send_packet<ping> = match &p {
               &pong(ref x) => { cast::transmute(x) }
             };
-            fail2!()
+            fail!()
         }
     }
 
@@ -265,7 +265,7 @@ pub fn do_ping(c: ping) -> pong {
         pub fn do_pong(c: pong) -> (ping, ()) {
             let packet = ::pipes::recv(c);
             if packet.is_none() {
-                fail2!("sender closed the connection")
+                fail!("sender closed the connection")
             }
             (pingpong::liberate_pong(packet.unwrap()), ())
         }
@@ -280,7 +280,7 @@ pub mod server {
         pub fn do_ping(c: ping) -> (pong, ()) {
             let packet = ::pipes::recv(c);
             if packet.is_none() {
-                fail2!("sender closed the connection")
+                fail!("sender closed the connection")
             }
             (pingpong::liberate_ping(packet.unwrap()), ())
         }
@@ -295,16 +295,16 @@ pub fn do_pong(c: pong) -> ping {
 
 fn client(chan: pingpong::client::ping) {
     let chan = pingpong::client::do_ping(chan);
-    error2!("Sent ping");
+    error!("Sent ping");
     let (_chan, _data) = pingpong::client::do_pong(chan);
-    error2!("Received pong");
+    error!("Received pong");
 }
 
 fn server(chan: pingpong::server::ping) {
     let (chan, _data) = pingpong::server::do_ping(chan);
-    error2!("Received ping");
+    error!("Received ping");
     let _chan = pingpong::server::do_pong(chan);
-    error2!("Sent pong");
+    error!("Sent pong");
 }
 
 pub fn main() {
index 8fad80ce238eecd4043636fafdbdfd544b49a90d..9597823c33503857a288074d3b974bce494ee3d5 100644 (file)
@@ -16,7 +16,7 @@
 use std::hashmap::HashMap;
 
 fn add_interfaces(managed_ip: ~str, device: HashMap<~str, int>)  {
-     error2!("{}, {:?}", managed_ip, device.get(&~"interfaces"));
+     error!("{}, {:?}", managed_ip, device.get(&~"interfaces"));
 }
 
 pub fn main() {}
index efcdbaa482c0784d33a735c02f60fe686f17cc51..2d590f25af1d1e613a0ad7acfb3d4e5edc976371 100644 (file)
@@ -28,7 +28,7 @@ fn lookup(table: ~json::Object, key: ~str, default: ~str) -> ~str
             (*s).clone()
         }
         option::Some(value) => {
-            error2!("{} was expected to be a string but is a {:?}", key, value);
+            error!("{} was expected to be a string but is a {:?}", key, value);
             default
         }
         option::None => {
@@ -47,7 +47,7 @@ fn add_interface(_store: int, managed_ip: ~str, data: extra::json::Json) -> (~st
             (label, bool_value(false))
         }
         _ => {
-            error2!("Expected dict for {} interfaces but found {:?}", managed_ip, data);
+            error!("Expected dict for {} interfaces but found {:?}", managed_ip, data);
             (~"gnos:missing-interface", bool_value(true))
         }
     }
@@ -65,7 +65,7 @@ fn add_interfaces(store: int, managed_ip: ~str, device: HashMap<~str, extra::jso
         }
         _ =>
         {
-            error2!("Expected list for {} interfaces but found {:?}", managed_ip,
+            error!("Expected list for {} interfaces but found {:?}", managed_ip,
                    device.get(&~"interfaces"));
             ~[]
         }
index f2a4692d396516ec2c19bfe7eb7f45bda936153b..328ea167d1e5f08d643028ba72903b0243a7ced7 100644 (file)
@@ -55,8 +55,8 @@ fn square_from_char(c: char) -> square {
       '.'  => { earth }
       ' '  => { empty }
       _ => {
-        error2!("invalid square: {:?}", c);
-        fail2!()
+        error!("invalid square: {:?}", c);
+        fail!()
       }
     }
 }
index fff89381dbe3746f773e559ace49e504a1b3dd2c..c1f4e1e49aa08068a88555be8ebb146d2e0e67f6 100644 (file)
@@ -29,6 +29,6 @@ pub fn main() {
     //  x.f();
     // y.f();
     // (*z).f();
-    error2!("ok so far...");
+    error!("ok so far...");
     z.f(); //segfault
 }
index 76cb182b0b6a6a56ef2839155bcf32387c896837..15580a01f7add8309928d92fe98398e2d92c373b 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 pub fn main() {
-    error2!("{:?}", ("hi there!", "you"));
+    error!("{:?}", ("hi there!", "you"));
 }
index fdd26478a99dc35f56deaa8039b6db610ac5562f..8ed70a7ee32d25cefb64a56ecf6ea4ab9ca553c9 100644 (file)
@@ -18,7 +18,7 @@ fn foo(name: ~str, samples_chan: Chan<Msg>) {
             |buffer|
             {
                 for i in range(0u, buffer.len()) {
-                    error2!("{}: {}", i, buffer[i])
+                    error!("{}: {}", i, buffer[i])
                 }
             };
         samples_chan.send(GetSamples(name.clone(), callback));
index ef9cab8754126ff3c2c1f8b2f2f1f1eededcafe0..efe0cb8d491d9fa4dd8c289a97830c626db7a536 100644 (file)
@@ -13,6 +13,6 @@ enum State { BadChar, BadSyntax }
 
     match BadChar {
         _ if true => BadChar,
-        BadChar | BadSyntax => fail2!() ,
+        BadChar | BadSyntax => fail!() ,
     };
 }
index 98b6a9c5f44b2c5ea4bb7dd1b00cadd44fb361fb..c4178961d9e6946577d558a0018cdf8df04ca640 100644 (file)
@@ -20,7 +20,7 @@ fn exec<T: JD>() {
     let doc = json::from_str("").unwrap();
     let mut decoder = json::Decoder(doc);
     let _v: T = Decodable::decode(&mut decoder);
-    fail2!()
+    fail!()
 }
 
 pub fn main() {}
index b0560b4e637b63dd91ee990e8c819e19e151a30d..8f0d01fab405762413d1337537444696eedbe240 100644 (file)
 
 fn foo(self_: &A) -> int {
     if true {
-        fail2!()
+        fail!()
     } else {
         *bar(self_.bar)
     }
 }
 
 fn bar<'r>(_: &'r mut int) -> &'r int {
-    fail2!()
+    fail!()
 }
 
 struct A {
index 51c7ed8babcc18ce144e7477741a6220ce5e9125..a01a04ebf82721aa03e5b3c4a08be52e063d08c5 100644 (file)
@@ -17,7 +17,7 @@ trait Graph<Node, Edge> {
 
 impl<E> Graph<int, E> for HashMap<int, int> {
     fn f(&self, _e: E) {
-        fail2!();
+        fail!();
     }
 }
 
index 2d70f2623e4a57c690742a6a2196c1b130a71651..05404b16f16a9401ac86c64b7ff2a01b73b45d2a 100644 (file)
@@ -17,5 +17,5 @@ pub fn main() {
     let a = A { x: 0 };
 
     let A { x: ref x } = a;
-    info2!("{:?}", x)
+    info!("{:?}", x)
 }
index 465e413b0ec04cded6e7ce7755ebffeaf74a1b61..ddac18235469331b5ccf03ae03ca586d51662c16 100644 (file)
@@ -18,7 +18,7 @@ pub fn main() {
 
     match a {
         A { x : ref x } => {
-            info2!("{:?}", x)
+            info!("{:?}", x)
         }
     }
 }
index 348a455830f7afeac50887c21ac83ff808b37667..ece53f4e3f22b19251d7e8deb0ff5a3d61084516 100644 (file)
@@ -19,7 +19,7 @@ pub fn main() {
     let sa = A { a: 100 };
     let sb = B { b: 200, pa: &sa };
 
-    debug2!("sa is {:?}", sa);
-    debug2!("sb is {:?}", sb);
-    debug2!("sb.pa is {:?}", sb.get_pa());
+    debug!("sa is {:?}", sa);
+    debug!("sb is {:?}", sb);
+    debug!("sb.pa is {:?}", sb.get_pa());
 }
index 44e100576e22f5567b3408d1f8183d332cd144de..9aaaa13c7994da0192a1146e4eeff76e55ce0943 100644 (file)
@@ -18,8 +18,8 @@ enum E {
 pub fn main() {
     let e = Foo{f: 0};
     match e {
-        Foo{f: 1} => fail2!(),
+        Foo{f: 1} => fail!(),
         Foo{_} => (),
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
index 4c31921895337da3ef83b6311daa3a209e47cb43..528303c8ad3f2b698cde942542979b2eabecd925 100644 (file)
@@ -18,8 +18,8 @@ enum E {
 pub fn main() {
     let e = Foo{f: 0, b: false};
     match e {
-        Foo{f: 1, b: true} => fail2!(),
+        Foo{f: 1, b: true} => fail!(),
         Foo{b: false, f: 0} => (),
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
index a02edba5f65363da2ec7312e90cbe0be0878b990..9b3db58ea9b293c951a79aca6ef182b24ecf08b4 100644 (file)
@@ -10,7 +10,7 @@
 
 fn test_stack_assign() {
     let s: ~str = ~"a";
-    info2!("{}", s.clone());
+    info!("{}", s.clone());
     let t: ~str = ~"a";
     assert!(s == t);
     let u: ~str = ~"b";
@@ -27,7 +27,7 @@ fn test_heap_assign() {
     assert!((s != u));
 }
 
-fn test_heap_log() { let s = ~"a big ol' string"; info2!("{}", s); }
+fn test_heap_log() { let s = ~"a big ol' string"; info!("{}", s); }
 
 fn test_stack_add() {
     assert_eq!(~"a" + "b", ~"ab");
@@ -49,7 +49,7 @@ fn test_append() {
 
     let mut s = ~"a";
     s.push_str("b");
-    info2!("{}", s.clone());
+    info!("{}", s.clone());
     assert_eq!(s, ~"ab");
 
     let mut s = ~"c";
index 82163200e5926a30f2a6ccd8292a53307adcc9df..5ada4aa8c7583b3e610acab170f1e3b02b22b9f4 100644 (file)
@@ -19,5 +19,5 @@ fn range_(a: int, b: int, it: &fn(int)) {
 pub fn main() {
     let mut sum: int = 0;
     range_(0, 100, |x| sum += x );
-    info2!("{}", sum);
+    info!("{}", sum);
 }
index 0a6393d3deee2d79af9e20b5b59d3ea9319f44f0..e615cfae6add006535353afae6d5f630c3273caa 100644 (file)
@@ -16,6 +16,6 @@ struct Refs { refs: ~[int], n: int }
 
 pub fn main() {
     let e = @mut Refs{refs: ~[], n: 0};
-    let _f: &fn() = || error2!("{}", e.n);
+    let _f: &fn() = || error!("{}", e.n);
     e.refs.push(1);
 }
index 2f7f0f26e0fa545cef29acbe3324057d8918fe99..e2dbf7d29db1931aba8850a272009d378ddb4955 100644 (file)
@@ -15,7 +15,7 @@ fn lp<T>(s: ~str, f: &fn(~str) -> T) -> T {
         let r = f(s);
         return (r);
     }
-    fail2!();
+    fail!();
 }
 
 fn apply<T>(s: ~str, f: &fn(~str) -> T) -> T {
index a6beed631da117f4faa2785f6b58ba99d6c34ce4..5c349a095513e55773de0186d9f070e4b5bce9ca 100644 (file)
@@ -16,5 +16,5 @@ pub fn main() {
     fn invoke(f: &fn()) { f(); }
     let k = ~22;
     let _u = A {a: k.clone()};
-    invoke(|| error2!("{:?}", k.clone()) )
+    invoke(|| error!("{:?}", k.clone()) )
 }
index c821f582662ba9753434d32b264e196976c355c6..a3dc848344c4f7f9962a5c66874d13a62cbe102f 100644 (file)
@@ -16,7 +16,7 @@ pub fn main() {
     let x = 1 == 2 || 3 == 3;
     assert!((x));
     let mut y: int = 10;
-    info2!("{:?}", x || incr(&mut y));
+    info!("{:?}", x || incr(&mut y));
     assert_eq!(y, 10);
     if true && x { assert!((true)); } else { assert!((false)); }
 }
index 53edb3d732cf73420b622bd2adcb7e55306d43c3..d58e7f2a28738e7ff612ed706fff5c464d738b46 100644 (file)
@@ -10,6 +10,6 @@
 
 
 
-fn foo(x: int) { info2!("{}", x); }
+fn foo(x: int) { info!("{}", x); }
 
 pub fn main() { let mut x: int; if 1 > 2 { x = 12; } else { x = 10; } foo(x); }
index db27a471ba3559d964dc08ae523267035d019043..05ac2d7e1204baa71b307867eebc3ebf4472d09d 100644 (file)
@@ -11,8 +11,8 @@
 pub fn main() {
     let x = ~[1, 2, 3];
     let mut y = 0;
-    for i in x.iter() { info2!("{:?}", *i); y += *i; }
-    info2!("{:?}", y);
+    for i in x.iter() { info!("{:?}", *i); y += *i; }
+    info!("{:?}", y);
     assert_eq!(y, 6);
     let s = ~"hello there";
     let mut i: int = 0;
@@ -25,8 +25,8 @@ pub fn main() {
         // ...
 
         i += 1;
-        info2!("{:?}", i);
-        info2!("{:?}", c);
+        info!("{:?}", i);
+        info!("{:?}", c);
     }
     assert_eq!(i, 11);
 }
index 103a34492d9e1b95661628164b86ed919bfd5ac6..3e11f74f04abbfb00c11c221e29323338c901f71 100644 (file)
@@ -14,7 +14,7 @@ fn test() {
         v = 3;
         break;
     }
-    info2!("{}", v);
+    info!("{}", v);
 }
 
 pub fn main() {
index 399ef25b7272e83a0dfeaa42e19c671e99f33f50..57aeac9fcf87c670332a09e08cf964ce2fe83752 100644 (file)
@@ -10,4 +10,4 @@
 
 
 
-pub fn main() { if false { error2!("{}", ~"foo" + "bar"); } }
+pub fn main() { if false { error!("{}", ~"foo" + "bar"); } }
index 393b5c3d281de4cbe9ecffb9f61c8fecde570eaf..42a0020fad15012acb7c7f691dbbbe7ef596d6d3 100644 (file)
@@ -26,7 +26,7 @@ fn mk<T:'static>() -> @mut Smallintmap<T> {
 
 fn f<T,U:'static>() {
     let sim = mk::<U>();
-    error2!("{:?}", sim);
+    error!("{:?}", sim);
 }
 
 pub fn main() {
index 5cd4561137735042855fbf87b656ae3a0222bb2d..c5221cd73d7efbbffd37931baecd85caa02216d8 100644 (file)
@@ -13,8 +13,8 @@ enum Numbers {
 }
 
 pub fn main() {
-    info2!("{}", 1);
-    info2!("{}", 2.0);
-    warn2!("{:?}", Three);
-    error2!("{:?}", ~[4]);
+    info!("{}", 1);
+    info!("{}", 2.0);
+    warn!("{:?}", Three);
+    error!("{:?}", ~[4]);
 }
index 812089fd5a570ef0b7bacd939e95f3d4aee95c20..d6f148f559dbaa879f965a5f35d27815e1bf8d50 100644 (file)
@@ -11,7 +11,7 @@
 pub fn main() {
   let mut i = 0u;
   loop {
-    error2!("a");
+    error!("a");
     i += 1u;
     if i == 10u {
       break;
@@ -23,7 +23,7 @@ pub fn main() {
     if i == 21u {
         break;
     }
-    error2!("b");
+    error!("b");
     is_even = false;
     i += 1u;
     if i % 2u != 0u {
@@ -33,7 +33,7 @@ pub fn main() {
   }
   assert!(!is_even);
   loop {
-    error2!("c");
+    error!("c");
     if i == 22u {
         break;
     }
index 0741d74b214b02bd56ca1227b69177d851c9e1be..4b89844194a57a79cce61d9f87331a16abb3eb27 100644 (file)
@@ -18,7 +18,7 @@ fn $fnname($arg: $ty) -> Option<$ty> $body
           Some($pat) => {
             $res
           }
-          _ => { fail2!(); }
+          _ => { fail!(); }
         }
     })
 
index 3abc4435edc526640f20033b7041b0f76cadfa63..ba897bd92c01757c7cadacc14cf665c1b154f43d 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 // n.b. This was only ever failing with optimization disabled.
-fn a() -> int { match return 1 { 2 => 3, _ => fail2!() } }
+fn a() -> int { match return 1 { 2 => 3, _ => fail!() } }
 pub fn main() { a(); }
index fd26dbfac0f8f84c217f098ea3db16d169063891..861d72ea228a23225fe69e0a038b844c89a95916 100644 (file)
@@ -11,6 +11,6 @@
 
 pub fn main() {
     let i: int =
-        match Some::<int>(3) { None::<int> => { fail2!() } Some::<int>(_) => { 5 } };
-    info2!("{}", i);
+        match Some::<int>(3) { None::<int> => { fail!() } Some::<int>(_) => { 5 } };
+    info!("{}", i);
 }
index f5e4cf6c9260b211b52c6b1332553ff7b7a7831b..0e3ecba8a357a6a02f7afd6205e643d4bace4f2d 100644 (file)
@@ -20,7 +20,7 @@ enum E {
 pub fn main() {
     let e = Bar;
     match e {
-        Foo{f: _f} => fail2!(),
+        Foo{f: _f} => fail!(),
         _ => (),
     }
 }
index 0f853cf64c571517f3e26cae0a057b2f8203ff35..5ee06e29cb8ddc48d485a75f15b2653bd288cc9a 100644 (file)
@@ -19,10 +19,10 @@ pub fn main() {
     let e = Foo{f: 1};
     match e {
         Foo{_} => (),
-        _ => fail2!(),
+        _ => fail!(),
     }
     match e {
         Foo{f: _f} => (),
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
index e73319712affcc6e4fd71c6953e4885d1ea97b58..0f01985f274ad25f37f7ed61021f553a866207b4 100644 (file)
@@ -28,4 +28,4 @@ fn foo<T>(y: Option<T>) {
     return;
 }
 
-pub fn main() { info2!("hello"); foo::<int>(Some::<int>(5)); }
+pub fn main() { info!("hello"); foo::<int>(Some::<int>(5)); }
index 416c932b6c7ff6365e8da5b8657e666d6bf4fa03..34d6597c62d1ede7683bf4213b7ab5b998e3ea6c 100644 (file)
 enum t { make_t(@int), clam, }
 
 fn foo(s: @int) {
-    info2!("{:?}", ::std::managed::refcount(s));
+    info!("{:?}", ::std::managed::refcount(s));
     let count = ::std::managed::refcount(s);
     let x: t = make_t(s); // ref up
     assert_eq!(::std::managed::refcount(s), count + 1u);
-    info2!("{:?}", ::std::managed::refcount(s));
+    info!("{:?}", ::std::managed::refcount(s));
 
     match x {
       make_t(y) => {
-        info2!("{:?}", y); // ref up then down
+        info!("{:?}", y); // ref up then down
 
       }
-      _ => { info2!("?"); fail2!(); }
+      _ => { info!("?"); fail!(); }
     }
-    info2!("{:?}", ::std::managed::refcount(s));
+    info!("{:?}", ::std::managed::refcount(s));
     assert_eq!(::std::managed::refcount(s), count + 1u);
     let _ = ::std::managed::refcount(s); // don't get bitten by last-use.
 }
@@ -39,7 +39,7 @@ pub fn main() {
 
     foo(s); // ref up then down
 
-    info2!("{}", ::std::managed::refcount(s));
+    info!("{}", ::std::managed::refcount(s));
     let count2 = ::std::managed::refcount(s);
     assert_eq!(count, count2);
 }
index 9493b8d960deeca761588f00d54b507baa93007b..84e9012be4e24a13221a496a2d7232694fb601d6 100644 (file)
@@ -12,9 +12,9 @@
 
 fn altlit(f: int) -> int {
     match f {
-      10 => { info2!("case 10"); return 20; }
-      11 => { info2!("case 11"); return 22; }
-      _  => fail2!("the impossible happened")
+      10 => { info!("case 10"); return 20; }
+      11 => { info!("case 11"); return 22; }
+      _  => fail!("the impossible happened")
     }
 }
 
index 6ef3f75fbbc6ea165a684d719b41f28d8e9ffedc..2076f46e8ab7bbeab01b9732fff7513dd6a1849d 100644 (file)
@@ -12,8 +12,8 @@ enum maybe<T> { nothing, just(T), }
 
 fn foo(x: maybe<int>) {
     match x {
-        nothing => { error2!("A"); }
-        just(_a) => { error2!("B"); }
+        nothing => { error!("A"); }
+        just(_a) => { error!("B"); }
     }
 }
 
index 70832548f82771ede6933ba9875040bbb630c216..6df4c8123610f938ea15b310d58870a2899a6456 100644 (file)
@@ -15,7 +15,7 @@ fn test1() {
                 assert_eq!(a, ~"a");
                 assert_eq!(b, ~"b");
             },
-            _ => fail2!(),
+            _ => fail!(),
     }
 }
 
@@ -25,7 +25,7 @@ fn test2() {
             assert_eq!(a, 2);
             assert_eq!(b, 3);
         },
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
 
@@ -35,7 +35,7 @@ fn test3() {
             assert_eq!(*a, 2);
             assert_eq!(*b, 3);
         },
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
 
@@ -45,7 +45,7 @@ fn test4() {
             assert_eq!(a, 2);
             assert_eq!(b, 3);
         },
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
 
@@ -55,7 +55,7 @@ fn test5() {
             assert_eq!(*a, 2);
             assert_eq!(*b, 3);
         },
-        _ => fail2!(),
+        _ => fail!(),
     }
 }
 
index a95c4e5289b19e356f55cbf11ceabeba62514bb9..6b02b21a084bd950bdf6d2af91c51530339d499b 100644 (file)
 pub fn main() {
     match 5u {
       1u..5u => {}
-      _ => fail2!("should match range"),
+      _ => fail!("should match range"),
     }
     match 5u {
-      6u..7u => fail2!("shouldn't match range"),
+      6u..7u => fail!("shouldn't match range"),
       _ => {}
     }
     match 5u {
-      1u => fail2!("should match non-first range"),
+      1u => fail!("should match non-first range"),
       2u..6u => {}
-      _ => fail2!("math is broken")
+      _ => fail!("math is broken")
     }
     match 'c' {
       'a'..'z' => {}
-      _ => fail2!("should suppport char ranges")
+      _ => fail!("should suppport char ranges")
     }
     match -3 {
       -7..5 => {}
-      _ => fail2!("should match signed range")
+      _ => fail!("should match signed range")
     }
     match 3.0 {
       1.0..5.0 => {}
-      _ => fail2!("should match float range")
+      _ => fail!("should match float range")
     }
     match -1.5 {
       -3.6..3.6 => {}
-      _ => fail2!("should match negative float range")
+      _ => fail!("should match negative float range")
     }
 }
index 74a3f255362472d5a9129033347b59796aed7a6d..e1d2f0e1c4847365aecd9bbdefb05188bde7fe3f 100644 (file)
@@ -17,7 +17,7 @@ pub fn main() {
             Some(ref z) if z.with(|b| *b) => {
                 do z.with |b| { assert!(*b); }
             },
-            _ => fail2!()
+            _ => fail!()
         }
     }
 }
index ecec003519c81e74d2f52bd2938eb07c6e891b80..8bbcc507f184fce31215cb47b2fb516c7f2dce60 100644 (file)
 // Issue #53
 
 pub fn main() {
-    match ~"test" { ~"not-test" => fail2!(), ~"test" => (), _ => fail2!() }
+    match ~"test" { ~"not-test" => fail!(), ~"test" => (), _ => fail!() }
 
     enum t { tag1(~str), tag2, }
 
 
     match tag1(~"test") {
-      tag2 => fail2!(),
-      tag1(~"not-test") => fail2!(),
+      tag2 => fail!(),
+      tag1(~"not-test") => fail!(),
       tag1(~"test") => (),
-      _ => fail2!()
+      _ => fail!()
     }
 
-    let x = match ~"a" { ~"a" => 1, ~"b" => 2, _ => fail2!() };
+    let x = match ~"a" { ~"a" => 1, ~"b" => 2, _ => fail!() };
     assert_eq!(x, 1);
 
-    match ~"a" { ~"a" => { } ~"b" => { }, _ => fail2!() }
+    match ~"a" { ~"a" => { } ~"b" => { }, _ => fail!() }
 
 }
index 215b05ac73f47d58174393df511ccc7daba45992..67e844c519ee8c8740f02ea40e14bbfb2cc357c0 100644 (file)
@@ -15,15 +15,15 @@ struct Foo{
 pub fn main() {
     let f = Foo{f: 1};
     match f {
-        Foo{f: 0} => fail2!(),
+        Foo{f: 0} => fail!(),
         Foo{_} => (),
     }
     match f {
-        Foo{f: 0} => fail2!(),
+        Foo{f: 0} => fail!(),
         Foo{f: _f} => (),
     }
     match f {
-        Foo{f: 0} => fail2!(),
+        Foo{f: 0} => fail!(),
         _ => (),
     }
 }
index 7f2af90d09af6bf78d12d6a0359df3ece4402724..50aa840e6d748513cc1b19736b4adf41d7f7856e 100644 (file)
@@ -11,7 +11,7 @@
 pub fn main() {
     match ~100 {
       ~x => {
-        info2!("{:?}", x);
+        info!("{:?}", x);
         assert_eq!(x, 100);
       }
     }
index 2476d440a15702da8a90b0837c62aff09d7fe8ae..4257442ea33c82b1579e02599fcc620387471836 100644 (file)
@@ -19,5 +19,5 @@ pub fn main() {
         Some(num) => num as u32
     };
     assert_eq!(f, 1234u32);
-    error2!("{}", f)
+    error!("{}", f)
 }
index ad8b32839ea4499fffbfd5283c4b8ce253454aea..ec678df357a8ddd4ffde27790768887fa4402f11 100644 (file)
@@ -19,6 +19,6 @@ pub fn main() {
     unsafe {
         let addr = rusti::morestack_addr();
         assert!(addr.is_not_null());
-        error2!("{}", addr);
+        error!("{}", addr);
     }
 }
index 9ec91d930c05a44e3481e6beffd0b3c9bec120ef..0d08c11b664aedfcef1dd1e996f586a7882b7086 100644 (file)
@@ -21,6 +21,6 @@ pub fn main() {
     grow(&mut v);
     grow(&mut v);
     let len = v.len();
-    info2!("{}", len);
+    info!("{}", len);
     assert_eq!(len, 3 as uint);
 }
index a435f2c6050d2284c6a9654db2d546fcd853cd52..d92496c4b7b40b6099a780c083251fcdb9da39ee 100644 (file)
@@ -11,6 +11,6 @@
 pub fn main() {
     match -5 {
       -5 => {}
-      _ => { fail2!() }
+      _ => { fail!() }
     }
 }
index 9c728194e90d49659010432796c37ed9664d1758..a516e2bf9bc09c2ec8c5964d3dbf6659764580fd 100644 (file)
@@ -9,16 +9,16 @@
 // except according to those terms.
 
 
-fn baz() -> ! { fail2!(); }
+fn baz() -> ! { fail!(); }
 
 fn foo() {
     match Some::<int>(5) {
       Some::<int>(_x) => {
         let mut bar;
         match None::<int> { None::<int> => { bar = 5; } _ => { baz(); } }
-        info2!("{:?}", bar);
+        info!("{:?}", bar);
       }
-      None::<int> => { info2!("hello"); }
+      None::<int> => { info!("hello"); }
     }
 }
 
index cc8436e7c4b2fbadccde6d5376a678dc3c6820e5..0bc6280393cff82e85bf474c8591207dd68a9945 100644 (file)
@@ -16,8 +16,8 @@ enum t { foo(int, uint), bar(int, Option<int>), }
 
 fn nested(o: t) {
     match o {
-        bar(_i, Some::<int>(_)) => { error2!("wrong pattern matched"); fail2!(); }
-        _ => { error2!("succeeded"); }
+        bar(_i, Some::<int>(_)) => { error!("wrong pattern matched"); fail!(); }
+        _ => { error!("succeeded"); }
     }
 }
 
index b979518f8a10f87ca73af24bb8d2e245dcece80a..d901a625e1d1e4816ef80f01b7c3bd608f57eaf9 100644 (file)
@@ -16,7 +16,7 @@ struct C { c: int }
 pub fn main() {
     match A {a: 10, b: @20} {
         x@A {a, b: @20} => { assert!(x.a == 10); assert!(a == 10); }
-        A {b: _b, _} => { fail2!(); }
+        A {b: _b, _} => { fail!(); }
     }
     let mut x@B {b, _} = B {a: 10, b: C {c: 20}};
     x.b.c = 30;
index 5172af1718443333c1612fdf227b7c0683c05e90..c83a3b7dfd0c1c0c161e6e8aa6253ddedd7d788e 100644 (file)
 pub fn main() {
     let mut x: int = 1;
     x *= 2;
-    info2!("{}", x);
+    info!("{}", x);
     assert_eq!(x, 2);
     x += 3;
-    info2!("{}", x);
+    info!("{}", x);
     assert_eq!(x, 5);
     x *= x;
-    info2!("{}", x);
+    info!("{}", x);
     assert_eq!(x, 25);
     x /= 5;
-    info2!("{}", x);
+    info!("{}", x);
     assert_eq!(x, 5);
 }
index 7c8872fae8a76b737ded15eeb1f1f9915e05aa96..66cd7f2b55f7499e5ee58e6152fef537e3ac638e 100644 (file)
@@ -24,7 +24,7 @@ fn drop(&mut self) {
 fn unwrap<T>(o: Option<T>) -> T {
     match o {
       Some(v) => v,
-      None => fail2!()
+      None => fail!()
     }
 }
 
index 0fc56cecec559e2444ee959ffdf9d1aa91b8bd36..cbd0416cb69b8678117439485c08c3beea65ea72 100644 (file)
@@ -17,6 +17,6 @@ pub fn main() {
     while b <= 32u {
         0u << b;
         b <<= 1u;
-        info2!("{:?}", b);
+        info!("{:?}", b);
     }
 }
index 8de802e1fc9797dcd71b665e0c2281c622884e9c..b475222619d62689610dabbb2cb1d9f2778d674e 100644 (file)
@@ -36,7 +36,7 @@ fn index(&self, index: &K) -> V {
                 return pair.value.clone();
             }
         }
-        fail2!("No value found for key: {:?}", index);
+        fail!("No value found for key: {:?}", index);
     }
 }
 
index 29789f38a4bf01fc208ad3b08f477c950e4b23db..751ba78b2820fcfd9c3add03a545bf4ceea6711c 100644 (file)
@@ -11,5 +11,5 @@
 pub fn main() {
     let x = true;
     if x { let mut i = 10; while i > 0 { i -= 1; } }
-    match x { true => { info2!("right"); } false => { info2!("wrong"); } }
+    match x { true => { info!("right"); } false => { info!("wrong"); } }
 }
index 7d4a74fe32cbe563d88aeddfed43f39e57316aa7..cfb5ecb1f5db1d352bb1c77df0ea9dc6705c47c7 100644 (file)
@@ -11,6 +11,6 @@
 #[allow(unreachable_code)];
 
 // -*- rust -*-
-fn dont_call_me() { fail2!(); info2!("{}", 1); }
+fn dont_call_me() { fail!(); info!("{}", 1); }
 
 pub fn main() { }
index a9cfd3aa1832f5e4eac2d0ca829d382eb89c7d4d..14ce305d6c1bff817a2bcccab60ce0938d89e55b 100644 (file)
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn magic(x: A) { info2!("{:?}", x); }
-fn magic2(x: @int) { info2!("{:?}", x); }
+fn magic(x: A) { info!("{:?}", x); }
+fn magic2(x: @int) { info!("{:?}", x); }
 
 struct A { a: @int }
 
index 030df6bcc085fa47076855bf7c0344abd2c50e93..debde77b21128d08853803e6a500898682218ba7 100644 (file)
@@ -11,5 +11,5 @@
 
 fn something(f: &fn()) { f(); }
 pub fn main() {
-    something(|| error2!("hi!") );
+    something(|| error!("hi!") );
 }
index 376a14924c081fdcb0ec4d553ba54605f6dcac96..8f256bbf2a40efe545ed0f33a339d1c8e8d4f81e 100644 (file)
@@ -28,16 +28,16 @@ pub fn main() {
 
     let x = @6;
     let y = x.get();
-    info2!("y={}", y);
+    info!("y={}", y);
     assert_eq!(y, 6);
 
     let x = ~6;
     let y = x.get();
-    info2!("y={}", y);
+    info!("y={}", y);
     assert_eq!(y, 6);
 
     let x = &6;
     let y = x.get();
-    info2!("y={}", y);
+    info!("y={}", y);
     assert_eq!(y, 6);
 }
index 1f1b9d3d1ee9e9e0958b7a5e7f3aca7e9d9e12c2..fd37cc12302da6bf8ef861aef91a2690d1968eca 100644 (file)
@@ -24,16 +24,16 @@ fn call_sum(x: &[int]) -> int { x.sum_() }
 pub fn main() {
     let x = ~[1, 2, 3];
     let y = call_sum(x);
-    info2!("y=={}", y);
+    info!("y=={}", y);
     assert_eq!(y, 6);
 
     let x = ~[1, 2, 3];
     let y = x.sum_();
-    info2!("y=={}", y);
+    info!("y=={}", y);
     assert_eq!(y, 6);
 
     let x = ~[1, 2, 3];
     let y = x.sum_();
-    info2!("y=={}", y);
+    info!("y=={}", y);
     assert_eq!(y, 6);
 }
index 43304b66176dcd8a194a7993b2e51b5f7ef6d26c..55375b6284404c869634330c298b5fb1d9fb7be9 100644 (file)
@@ -54,9 +54,9 @@ pub fn main() {
         // Send it through the shape code
         let y = format!("{:?}", x);
 
-        info2!("align inner = {:?}", rusti::min_align_of::<Inner>());
-        info2!("size outer = {:?}", mem::size_of::<Outer>());
-        info2!("y = {}", y);
+        info!("align inner = {:?}", rusti::min_align_of::<Inner>());
+        info!("size outer = {:?}", mem::size_of::<Outer>());
+        info!("y = {}", y);
 
         // per clang/gcc the alignment of `inner` is 4 on x86.
         assert_eq!(rusti::min_align_of::<Inner>(), m::align());
index 5adb8cf951050b096fed1a39e0d1a11c6666a7ae..9185ac123b2890aeb2acd99e3e2e30a83a06ea5f 100644 (file)
@@ -76,9 +76,9 @@ pub fn main() {
         // Send it through the shape code
         let y = format!("{:?}", x);
 
-        info2!("align inner = {}", rusti::min_align_of::<Inner>());
-        info2!("size outer = {}", mem::size_of::<Outer>());
-        info2!("y = {}", y);
+        info!("align inner = {}", rusti::min_align_of::<Inner>());
+        info!("size outer = {}", mem::size_of::<Outer>());
+        info!("y = {}", y);
 
         // per clang/gcc the alignment of `Inner` is 4 on x86.
         assert_eq!(rusti::min_align_of::<Inner>(), m::m::align());
index 086d03ae4e30f7cc94322e74fd99a440e72f82a2..669965bd617c0bcca856f6015337e87180ce6b38 100644 (file)
@@ -19,6 +19,6 @@ struct X { foo: ~str, bar: ~str }
 
 pub fn main() {
     let x = X {foo: ~"hello", bar: ~"world"};
-    info2!("{}", x.foo.clone());
-    info2!("{}", x.bar.clone());
+    info!("{}", x.foo.clone());
+    info!("{}", x.bar.clone());
 }
index 5a2243b19408836f7647a4ad0602d16a9b34a41f..9e7021a56bbf3029994b6f56191c88bfc7d147e2 100644 (file)
@@ -551,7 +551,7 @@ fn visit_enter_rec(&mut self, _n_fields: uint,
                        _sz: uint, _align: uint) -> bool { true }
     fn visit_rec_field(&mut self, _i: uint, _name: &str,
                        _mtbl: uint, inner: *TyDesc) -> bool {
-        error2!("rec field!");
+        error!("rec field!");
         self.visit_inner(inner)
     }
     fn visit_leave_rec(&mut self, _n_fields: uint,
@@ -569,7 +569,7 @@ fn visit_leave_class(&mut self, _name: &str, _named_fields: bool, _n_fields: uin
     fn visit_enter_tup(&mut self, _n_fields: uint,
                        _sz: uint, _align: uint) -> bool { true }
     fn visit_tup_field(&mut self, _i: uint, inner: *TyDesc) -> bool {
-        error2!("tup field!");
+        error!("tup field!");
         self.visit_inner(inner)
     }
     fn visit_leave_tup(&mut self, _n_fields: uint,
@@ -633,7 +633,7 @@ pub fn main() {
                                        vals: ~[]});
         let mut v = ptr_visit_adaptor(Inner {inner: u});
         let td = get_tydesc_for(r);
-        error2!("tydesc sz: {}, align: {}",
+        error!("tydesc sz: {}, align: {}",
                (*td).size, (*td).align);
         visit_tydesc(td, &mut v as &mut TyVisitor);
 
@@ -641,7 +641,7 @@ pub fn main() {
         for s in r.iter() {
             println!("val: {}", *s);
         }
-        error2!("{:?}", u.vals.clone());
+        error!("{:?}", u.vals.clone());
         assert_eq!(u.vals.clone(),
                    ~[ ~"1", ~"2", ~"3", ~"true", ~"false", ~"5", ~"4", ~"3", ~"12"]);
     }
index 0afc5dd1b17ea24347d84444232bb0b4550f43f2..e447c9c650c99d3e1a0618cad1ce4aae509b78a4 100644 (file)
@@ -17,32 +17,32 @@ struct MyVisitor {
 impl TyVisitor for MyVisitor {
     fn visit_bot(&mut self) -> bool {
         self.types.push(~"bot");
-        error2!("visited bot type");
+        error!("visited bot type");
         true
     }
     fn visit_nil(&mut self) -> bool {
         self.types.push(~"nil");
-        error2!("visited nil type");
+        error!("visited nil type");
         true
     }
     fn visit_bool(&mut self) -> bool {
         self.types.push(~"bool");
-        error2!("visited bool type");
+        error!("visited bool type");
         true
     }
     fn visit_int(&mut self) -> bool {
         self.types.push(~"int");
-        error2!("visited int type");
+        error!("visited int type");
         true
     }
     fn visit_i8(&mut self) -> bool {
         self.types.push(~"i8");
-        error2!("visited i8 type");
+        error!("visited i8 type");
         true
     }
     fn visit_i16(&mut self) -> bool {
         self.types.push(~"i16");
-        error2!("visited i16 type");
+        error!("visited i16 type");
         true
     }
     fn visit_i32(&mut self) -> bool { true }
index 1d44d8defdc1c0c1eb66b3d790a4b77c351ad45f..d8076f543ecc1436e9145357dd96ace3dafb29c4 100644 (file)
@@ -57,21 +57,21 @@ fn get_v5<'v>(a: &'v A, _i: uint) -> &'v int {
 fn get_v6_a<'v>(a: &'v A, _i: uint) -> &'v int {
     match a.value.v6 {
         Some(ref v) => &v.f,
-        None => fail2!()
+        None => fail!()
     }
 }
 
 fn get_v6_b<'v>(a: &'v A, _i: uint) -> &'v int {
     match *a {
         A { value: B { v6: Some(ref v), _ } } => &v.f,
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
 fn get_v6_c<'v>(a: &'v A, _i: uint) -> &'v int {
     match a {
         &A { value: B { v6: Some(ref v), _ } } => &v.f,
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
index 9258b149fd316173ad2619eafd4a5ed8a06f7663..aa4630717db6c63feb058acd7f350d25028abe77 100644 (file)
@@ -11,7 +11,7 @@
 fn get<'r, T>(opt: &'r Option<T>) -> &'r T {
     match *opt {
       Some(ref v) => v,
-      None => fail2!("none")
+      None => fail!("none")
     }
 }
 
index 08b1d249869367745eb84b2817aad37b5c02331e..898759f67d24ab99733a67926b2f5620cc570f74 100644 (file)
@@ -14,5 +14,5 @@ fn f<'a>(x : &'a int) -> &'a int {
 
 pub fn main() {
     let three = &3;
-    error2!("{}", *f(three));
+    error!("{}", *f(three));
 }
index a504296a182bd66795f6dc9bf528a354f206de55..b4ec9914f2637b657686350dda47d08d316c8026 100644 (file)
@@ -15,6 +15,6 @@ fn foo(x: &uint) -> uint {
 pub fn main() {
     let p = @22u;
     let r = foo(p);
-    info2!("r={}", r);
+    info!("r={}", r);
     assert_eq!(r, 22u);
 }
index 5d8d5d6033a48bf80b0cd8b769c0393562b36f88..dbc5bf6626af1086d04f27562617a5f722c0681d 100644 (file)
@@ -10,7 +10,7 @@
 
 // A very limited test of the "bottom" region
 
-fn produce_static<T>() -> &'static T { fail2!(); }
+fn produce_static<T>() -> &'static T { fail!(); }
 
 fn foo<T>(_x: &T) -> &uint { produce_static() }
 
index 61d088851fd08075c9ecbdb8107255e316e43ef0..ceff247b5dd7f1a96ca07ffda56ad1299572b00d 100644 (file)
@@ -22,6 +22,6 @@ impl<'self> get_chowder<'self> for Clam<'self> {
 
 pub fn main() {
     let clam = Clam { chowder: &3 };
-    info2!("{:?}", *clam.get_chowder());
+    info!("{:?}", *clam.get_chowder());
     clam.get_chowder();
 }
index f0b7306990dd3fe833c6e62aaf96eec900ed6d30..1b429110e10ecec04b7be0bd93b6023918182c55 100644 (file)
@@ -19,5 +19,5 @@ pub fn main() {
     match y {
         int_wrapper_ctor(zz) => { z = zz; }
     }
-    info2!("{:?}", *z);
+    info!("{:?}", *z);
 }
index e57c2e9807e0fcf4f328650289a1341fa98fa9b3..bb612c5b0df202d6e0f95deb81f61449b73c21a0 100644 (file)
@@ -12,5 +12,5 @@ pub fn main() {
     let mut x: int = 3;
     let y: &mut int = &mut x;
     *y = 5;
-    info2!("{:?}", *y);
+    info!("{:?}", *y);
 }
index 3cb6fea3e532eb932907c77d6747f51869dd48f0..a2eb459ce206ed575f8d535be41f65e2d7ffd49e 100644 (file)
@@ -21,6 +21,6 @@ fn call_static_closure(cl: closure_box<'static>) {
 }
 
 pub fn main() {
-    let cl_box = box_it(|| info2!("Hello, world!"));
+    let cl_box = box_it(|| info!("Hello, world!"));
     call_static_closure(cl_box);
 }
index 6291e229b6c9c201bc892997ba3526d3cd4acf55..465c9b7090e6546b12f54a73a773f1054c2fd82a 100644 (file)
@@ -17,6 +17,6 @@ pub fn main() {
     let x = [ @[true], ..512 ];
     let y = [ 0, ..1 ];
 
-    error2!("{:?}", x);
-    error2!("{:?}", y);
+    error!("{:?}", x);
+    error!("{:?}", y);
 }
index 2e30044f31887af19e0ee77ffd640443119a194c..f5bc9895755e8da1cfde64b4432ee584b9203bcb 100644 (file)
@@ -32,7 +32,7 @@ pub fn main() {
         let a = r(i);
         let b = (a, 10);
         let (c, _d) = b;
-        info2!("{:?}", c);
+        info!("{:?}", c);
     }
     assert_eq!(*i, 1);
 }
index e7384203310c89b42abbd993d27eca54c68a11d6..0c0707e9036a719d4b773707cb9f71f24d21d721 100644 (file)
@@ -19,7 +19,7 @@ struct r {
 impl Drop for r {
     fn drop(&mut self) {
         unsafe {
-            info2!("r's dtor: self = {:x}, self.v = {:x}, self.v's value = {:x}",
+            info!("r's dtor: self = {:x}, self.v = {:x}, self.v's value = {:x}",
               cast::transmute::<*mut r, uint>(self),
               cast::transmute::<**int, uint>(&(self.v)),
               cast::transmute::<*int, uint>(self.v));
@@ -54,11 +54,11 @@ pub fn main() {
             next: None,
               r: {
               let rs = r(i1p);
-              info2!("r = {:x}", cast::transmute::<*r, uint>(&rs));
+              info!("r = {:x}", cast::transmute::<*r, uint>(&rs));
               rs }
         });
 
-        info2!("x1 = {:x}, x1.r = {:x}",
+        info!("x1 = {:x}, x1.r = {:x}",
                cast::transmute::<@mut t, uint>(x1),
                cast::transmute::<*r, uint>(&x1.r));
 
@@ -66,12 +66,12 @@ pub fn main() {
             next: None,
               r: {
               let rs = r(i2p);
-              info2!("r2 = {:x}", cast::transmute::<*r, uint>(&rs));
+              info!("r2 = {:x}", cast::transmute::<*r, uint>(&rs));
               rs
                 }
         });
 
-        info2!("x2 = {:x}, x2.r = {:x}",
+        info!("x2 = {:x}, x2.r = {:x}",
                cast::transmute::<@mut t, uint>(x2),
                cast::transmute::<*r, uint>(&(x2.r)));
 
index 70adccbb9c92a35f0570988898d3ecbcb38c8b32..50b6509bb736270b19da2dc0a48a95f816df538c 100644 (file)
@@ -15,7 +15,7 @@ struct shrinky_pointer {
 #[unsafe_destructor]
 impl Drop for shrinky_pointer {
     fn drop(&mut self) {
-        error2!("Hello!"); **(self.i) -= 1;
+        error!("Hello!"); **(self.i) -= 1;
     }
 }
 
@@ -32,6 +32,6 @@ fn shrinky_pointer(i: @@mut int) -> shrinky_pointer {
 pub fn main() {
     let my_total = @@mut 10;
     { let pt = shrinky_pointer(my_total); assert!((pt.look_at() == 10)); }
-    error2!("my_total = {}", **my_total);
+    error!("my_total = {}", **my_total);
     assert_eq!(**my_total, 9);
 }
index f56cf57e12e94e3eb319c603ba2ddefb8ce5c5f4..9754b08cd18a3d50b9d0448e8716835116e3c8ec 100644 (file)
@@ -12,7 +12,7 @@
 
 
 // -*- rust -*-
-fn my_err(s: ~str) -> ! { error2!("{:?}", s); fail2!(); }
+fn my_err(s: ~str) -> ! { error!("{:?}", s); fail!(); }
 
 fn okay(i: uint) -> int {
     if i == 3u { my_err(~"I don't like three"); } else { return 42; }
index 9a6dfb22106a44262a3182a84e7dcc1e6c63b96b..47a723ce6e14dc35511ea2aaa50ebaa9fbab7df3 100644 (file)
@@ -13,9 +13,9 @@
 #[start]
 fn start(argc: int, argv: **u8) -> int {
     do std::rt::start_on_main_thread(argc, argv) {
-        info2!("running on main thread");
+        info!("running on main thread");
         do spawn {
-            info2!("running on another thread");
+            info!("running on another thread");
         }
     }
 }
index 7cc83e2ff546e14246f07e1e1436fa9f4ff077e3..d077db69c2a8c24ffe686e43e43e40343ea0d06e 100644 (file)
@@ -26,12 +26,12 @@ fn make_generic_record<A,B>(a: A, b: B) -> Pair<A,B> {
 
 fn test05_start(f: &~fn(v: f64, v: ~str) -> Pair<f64, ~str>) {
     let p = (*f)(22.22, ~"Hi");
-    info2!("{:?}", p.clone());
+    info!("{:?}", p.clone());
     assert!(p.a == 22.22);
     assert!(p.b == ~"Hi");
 
     let q = (*f)(44.44, ~"Ho");
-    info2!("{:?}", q.clone());
+    info!("{:?}", q.clone());
     assert!(q.a == 44.44);
     assert!(q.b == ~"Ho");
 }
index 6cc8b27834cf0195bfdfbdf1335dd1a70c51c7e8..ecf1830864cd125a0d9dd0c113b2108f273d9f10 100644 (file)
@@ -20,7 +20,7 @@ fn test05_start(f: ~fn(int)) {
 fn test05() {
     let three = ~3;
     let fn_to_send: ~fn(int) = |n| {
-        error2!("{}", *three + n); // will copy x into the closure
+        error!("{}", *three + n); // will copy x into the closure
         assert_eq!(*three, 3);
     };
     let fn_to_send = Cell::new(fn_to_send);
index 345c2aad0d38a75c748eb0bb08d632b3c6601035..050c505b7c148dea0ea51889b8dac9f1ee82fef6 100644 (file)
@@ -17,7 +17,7 @@ fn foo(c: ~[int]) {
     match none::<int> {
         some::<int>(_) => {
             for _i in c.iter() {
-                info2!("{:?}", a);
+                info!("{:?}", a);
                 let a = 17;
                 b.push(a);
             }
index a989ac68d711de0124f25e5c784b178208a9be49..4420804aad1b91c6c10fac7d447c834843e889bd 100644 (file)
@@ -57,6 +57,6 @@ pub fn main() {
     let p_: Path_ = Path_ { global: true, idents: ~[~"hi"], types: ~[t] };
     let p: path = Spanned { data: p_, span: sp };
     let x = X { sp: sp, path: p };
-    error2!("{:?}", x.path.clone());
-    error2!("{:?}", x.clone());
+    error!("{:?}", x.path.clone());
+    error!("{:?}", x.clone());
 }
index 0924655a767175808f85fcb0760aa22bacf9d160..e3d3b3389ba14c569e3c657f72c12059f94c8f4f 100644 (file)
@@ -10,4 +10,4 @@
 
 
 
-pub fn main() { let mut n; n = 1; info2!("{}", n); }
+pub fn main() { let mut n; n = 1; info!("{}", n); }
index 1c080bb8146ba3579b8cc9761d1b28a87929f309..d8b7c99d000aa30e52f15ad5514eb25ac8afda6b 100644 (file)
@@ -14,5 +14,5 @@ enum opt<T> { none, }
 
 pub fn main() {
     let x = none::<int>;
-    match x { none::<int> => { info2!("hello world"); } }
+    match x { none::<int> => { info!("hello world"); } }
 }
index d34da045c02dd89fec65159161a4f53c5a840d9d..4d2309cb8697e7130d6344b37d180185007d45b5 100644 (file)
@@ -17,11 +17,11 @@ enum clam<T> { a(T, int), b, }
 fn uhoh<T>(v: ~[clam<T>]) {
     match v[1] {
       a::<T>(ref _t, ref u) => {
-          info2!("incorrect");
-          info2!("{:?}", u);
-          fail2!();
+          info!("incorrect");
+          info!("{:?}", u);
+          fail!();
       }
-      b::<T> => { info2!("correct"); }
+      b::<T> => { info!("correct"); }
     }
 }
 
index f95ddcad4d63802cdc58a2b9df7a8327e4489110..b8f356f80d4c5780018186938a38838dfc4603a2 100644 (file)
@@ -12,8 +12,8 @@
 use std::task;
 
 fn x(s: ~str, n: int) {
-    info2!("{:?}", s);
-    info2!("{:?}", n);
+    info!("{:?}", s);
+    info!("{:?}", n);
 }
 
 pub fn main() {
@@ -21,5 +21,5 @@ pub fn main() {
     task::spawn(|| x(~"hello from second spawned fn", 66) );
     task::spawn(|| x(~"hello from third spawned fn", 67) );
     let mut i: int = 30;
-    while i > 0 { i = i - 1; info2!("parent sleeping"); task::deschedule(); }
+    while i > 0 { i = i - 1; info!("parent sleeping"); task::deschedule(); }
 }
index 9273752d6293bec4e7cfcb92016f3983496dd835..5c24c6228120820ede854a7c2b05d5e53890d914 100644 (file)
@@ -17,4 +17,4 @@ pub fn main() {
     task::spawn(|| child(10) );
 }
 
-fn child(i: int) { error2!("{}", i); assert!((i == 10)); }
+fn child(i: int) { error!("{}", i); assert!((i == 10)); }
index 31967b31c638533326929ec79d9bd14d8782d053..a94877714c59f93f337f327b79d1308bcf86bfc2 100644 (file)
 
 fn child(args: (int, int, int, int, int, int, int, int, int)) {
     let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args;
-    error2!("{}", i1);
-    error2!("{}", i2);
-    error2!("{}", i3);
-    error2!("{}", i4);
-    error2!("{}", i5);
-    error2!("{}", i6);
-    error2!("{}", i7);
-    error2!("{}", i8);
-    error2!("{}", i9);
+    error!("{}", i1);
+    error!("{}", i2);
+    error!("{}", i3);
+    error!("{}", i4);
+    error!("{}", i5);
+    error!("{}", i6);
+    error!("{}", i7);
+    error!("{}", i8);
+    error!("{}", i9);
     assert_eq!(i1, 10);
     assert_eq!(i2, 20);
     assert_eq!(i3, 30);
index aa0661d49a2193f592f8c7f6877653687bc15f9c..7501c46079d98ba7ee38bc6b8f332420a0063a56 100644 (file)
@@ -23,7 +23,7 @@ pub fn main() {
 
     {
         match io::file_writer(&path, [io::Create, io::Truncate]) {
-            Err(ref e) => fail2!("{}", e.clone()),
+            Err(ref e) => fail!("{}", e.clone()),
             Ok(f) => {
                 for _ in range(0u, 1000) {
                     f.write_u8(0);
index fe57c5dd4e511de4d5b5f189367b7ba2c17bde6a..127838fd9ec9d2592c6dba7a2a2c7bde302e36ef 100644 (file)
@@ -16,7 +16,7 @@
 fn test1() {
     let mut s: ~str = ~"hello";
     s.push_str("world");
-    info2!("{}", s.clone());
+    info!("{}", s.clone());
     assert_eq!(s[9], 'd' as u8);
 }
 
@@ -26,8 +26,8 @@ fn test2() {
     let ff: ~str = ~"abc";
     let a: ~str = ff + "ABC" + ff;
     let b: ~str = ~"ABC" + ff + "ABC";
-    info2!("{}", a.clone());
-    info2!("{}", b.clone());
+    info!("{}", a.clone());
+    info!("{}", b.clone());
     assert_eq!(a, ~"abcABCabc");
     assert_eq!(b, ~"ABCabcABC");
 }
index dc605c50bb0f263e20e55f02e1b53e4210f7d32c..870fc20f7711fafb96eb8ea125f190563b0fc70f 100644 (file)
@@ -16,6 +16,6 @@ pub fn main() {
     let a: ~str = ~"hello";
     let b: ~str = ~"world";
     let s: ~str = a + b;
-    info2!("{}", s.clone());
+    info!("{}", s.clone());
     assert_eq!(s[9], 'd' as u8);
 }
index ca80f71cca7fe7b3140f431d50b798fe7e0607aa..ebed8e24a484187b5058081ed2df7612ed53da13 100644 (file)
@@ -13,6 +13,6 @@
 pub fn main() {
     let s = ~"hello";
     let c: u8 = s[4];
-    info2!("{:?}", c);
+    info!("{:?}", c);
     assert_eq!(c, 0x6f as u8);
 }
index f230bb38701e40279fab4e2ea57c5012f34b2843..68f1e21571c315d9ef8c8e0ff1c1319e1a63f6e7 100644 (file)
@@ -16,7 +16,7 @@ pub fn main() {
     let mut i = 20;
     let mut expected_len = 1u;
     while i > 0 {
-        error2!("{}", a.len());
+        error!("{}", a.len());
         assert_eq!(a.len(), expected_len);
         a = a + a; // FIXME(#3387)---can't write a += a
         i -= 1;
index a4238799d09f75abf52591617cd0fa5a5cfadde1..c5f8d0410d81a8816ef75c11fe794aea15c26ed1 100644 (file)
@@ -14,7 +14,7 @@ struct foo {
 
 impl Drop for foo {
     fn drop(&mut self) {
-        error2!("{}", self.x);
+        error!("{}", self.x);
     }
 }
 
index 7b5988b9b3dd896f6a1ca9b672f209771b425814..8b22b4c9ac10cc23f86212ae20999df6ebfe9ee9 100644 (file)
@@ -31,10 +31,10 @@ fn test1() {
                  c: 0xcccc_cccc_cccc_cccc_u64,
                  d: 0xdddd_dddd_dddd_dddd_u64 };
         let qq = rustrt::rust_dbg_abi_1(q);
-        error2!("a: {:x}", qq.a as uint);
-        error2!("b: {:x}", qq.b as uint);
-        error2!("c: {:x}", qq.c as uint);
-        error2!("d: {:x}", qq.d as uint);
+        error!("a: {:x}", qq.a as uint);
+        error!("b: {:x}", qq.b as uint);
+        error!("c: {:x}", qq.c as uint);
+        error!("d: {:x}", qq.d as uint);
         assert_eq!(qq.a, q.c + 1u64);
         assert_eq!(qq.b, q.d - 1u64);
         assert_eq!(qq.c, q.a + 1u64);
@@ -51,9 +51,9 @@ fn test2() {
                  b: 0b_1010_1010_u8,
                  c: 1.0987654321e-15_f64 };
         let ff = rustrt::rust_dbg_abi_2(f);
-        error2!("a: {}", ff.a as f64);
-        error2!("b: {}", ff.b as uint);
-        error2!("c: {}", ff.c as f64);
+        error!("a: {}", ff.a as f64);
+        error!("b: {}", ff.b as uint);
+        error!("c: {}", ff.c as f64);
         assert_eq!(ff.a, f.c + 1.0f64);
         assert_eq!(ff.b, 0xff_u8);
         assert_eq!(ff.c, f.a - 1.0f64);
index 090e932d8dc8b366cfa8df2a9817361631e904ba..60e5a157bfc42e5dd84b608ab388999cf9d01c79 100644 (file)
 
 pub fn main() {
   let f = 1 as *libc::FILE;
-  info2!("{}", f as int);
-  info2!("{}", f as uint);
-  info2!("{}", f as i8);
-  info2!("{}", f as i16);
-  info2!("{}", f as i32);
-  info2!("{}", f as i64);
-  info2!("{}", f as u8);
-  info2!("{}", f as u16);
-  info2!("{}", f as u32);
-  info2!("{}", f as u64);
-
-  info2!("{}", 1 as int);
-  info2!("{}", 1 as uint);
-  info2!("{}", 1 as *libc::FILE);
-  info2!("{}", 1 as i8);
-  info2!("{}", 1 as i16);
-  info2!("{}", 1 as i32);
-  info2!("{}", 1 as i64);
-  info2!("{}", 1 as u8);
-  info2!("{}", 1 as u16);
-  info2!("{}", 1 as u32);
-  info2!("{}", 1 as u64);
-  info2!("{}", 1 as f32);
-  info2!("{}", 1 as f64);
-
-  info2!("{}", 1u as int);
-  info2!("{}", 1u as uint);
-  info2!("{}", 1u as *libc::FILE);
-  info2!("{}", 1u as i8);
-  info2!("{}", 1u as i16);
-  info2!("{}", 1u as i32);
-  info2!("{}", 1u as i64);
-  info2!("{}", 1u as u8);
-  info2!("{}", 1u as u16);
-  info2!("{}", 1u as u32);
-  info2!("{}", 1u as u64);
-  info2!("{}", 1u as f32);
-  info2!("{}", 1u as f64);
-
-  info2!("{}", 1i8 as int);
-  info2!("{}", 1i8 as uint);
-  info2!("{}", 1i8 as *libc::FILE);
-  info2!("{}", 1i8 as i8);
-  info2!("{}", 1i8 as i16);
-  info2!("{}", 1i8 as i32);
-  info2!("{}", 1i8 as i64);
-  info2!("{}", 1i8 as u8);
-  info2!("{}", 1i8 as u16);
-  info2!("{}", 1i8 as u32);
-  info2!("{}", 1i8 as u64);
-  info2!("{}", 1i8 as f32);
-  info2!("{}", 1i8 as f64);
-
-  info2!("{}", 1u8 as int);
-  info2!("{}", 1u8 as uint);
-  info2!("{}", 1u8 as *libc::FILE);
-  info2!("{}", 1u8 as i8);
-  info2!("{}", 1u8 as i16);
-  info2!("{}", 1u8 as i32);
-  info2!("{}", 1u8 as i64);
-  info2!("{}", 1u8 as u8);
-  info2!("{}", 1u8 as u16);
-  info2!("{}", 1u8 as u32);
-  info2!("{}", 1u8 as u64);
-  info2!("{}", 1u8 as f32);
-  info2!("{}", 1u8 as f64);
-
-  info2!("{}", 1i16 as int);
-  info2!("{}", 1i16 as uint);
-  info2!("{}", 1i16 as *libc::FILE);
-  info2!("{}", 1i16 as i8);
-  info2!("{}", 1i16 as i16);
-  info2!("{}", 1i16 as i32);
-  info2!("{}", 1i16 as i64);
-  info2!("{}", 1i16 as u8);
-  info2!("{}", 1i16 as u16);
-  info2!("{}", 1i16 as u32);
-  info2!("{}", 1i16 as u64);
-  info2!("{}", 1i16 as f32);
-  info2!("{}", 1i16 as f64);
-
-  info2!("{}", 1u16 as int);
-  info2!("{}", 1u16 as uint);
-  info2!("{}", 1u16 as *libc::FILE);
-  info2!("{}", 1u16 as i8);
-  info2!("{}", 1u16 as i16);
-  info2!("{}", 1u16 as i32);
-  info2!("{}", 1u16 as i64);
-  info2!("{}", 1u16 as u8);
-  info2!("{}", 1u16 as u16);
-  info2!("{}", 1u16 as u32);
-  info2!("{}", 1u16 as u64);
-  info2!("{}", 1u16 as f32);
-  info2!("{}", 1u16 as f64);
-
-  info2!("{}", 1i32 as int);
-  info2!("{}", 1i32 as uint);
-  info2!("{}", 1i32 as *libc::FILE);
-  info2!("{}", 1i32 as i8);
-  info2!("{}", 1i32 as i16);
-  info2!("{}", 1i32 as i32);
-  info2!("{}", 1i32 as i64);
-  info2!("{}", 1i32 as u8);
-  info2!("{}", 1i32 as u16);
-  info2!("{}", 1i32 as u32);
-  info2!("{}", 1i32 as u64);
-  info2!("{}", 1i32 as f32);
-  info2!("{}", 1i32 as f64);
-
-  info2!("{}", 1u32 as int);
-  info2!("{}", 1u32 as uint);
-  info2!("{}", 1u32 as *libc::FILE);
-  info2!("{}", 1u32 as i8);
-  info2!("{}", 1u32 as i16);
-  info2!("{}", 1u32 as i32);
-  info2!("{}", 1u32 as i64);
-  info2!("{}", 1u32 as u8);
-  info2!("{}", 1u32 as u16);
-  info2!("{}", 1u32 as u32);
-  info2!("{}", 1u32 as u64);
-  info2!("{}", 1u32 as f32);
-  info2!("{}", 1u32 as f64);
-
-  info2!("{}", 1i64 as int);
-  info2!("{}", 1i64 as uint);
-  info2!("{}", 1i64 as *libc::FILE);
-  info2!("{}", 1i64 as i8);
-  info2!("{}", 1i64 as i16);
-  info2!("{}", 1i64 as i32);
-  info2!("{}", 1i64 as i64);
-  info2!("{}", 1i64 as u8);
-  info2!("{}", 1i64 as u16);
-  info2!("{}", 1i64 as u32);
-  info2!("{}", 1i64 as u64);
-  info2!("{}", 1i64 as f32);
-  info2!("{}", 1i64 as f64);
-
-  info2!("{}", 1u64 as int);
-  info2!("{}", 1u64 as uint);
-  info2!("{}", 1u64 as *libc::FILE);
-  info2!("{}", 1u64 as i8);
-  info2!("{}", 1u64 as i16);
-  info2!("{}", 1u64 as i32);
-  info2!("{}", 1u64 as i64);
-  info2!("{}", 1u64 as u8);
-  info2!("{}", 1u64 as u16);
-  info2!("{}", 1u64 as u32);
-  info2!("{}", 1u64 as u64);
-  info2!("{}", 1u64 as f32);
-  info2!("{}", 1u64 as f64);
-
-  info2!("{}", 1u64 as int);
-  info2!("{}", 1u64 as uint);
-  info2!("{}", 1u64 as *libc::FILE);
-  info2!("{}", 1u64 as i8);
-  info2!("{}", 1u64 as i16);
-  info2!("{}", 1u64 as i32);
-  info2!("{}", 1u64 as i64);
-  info2!("{}", 1u64 as u8);
-  info2!("{}", 1u64 as u16);
-  info2!("{}", 1u64 as u32);
-  info2!("{}", 1u64 as u64);
-  info2!("{}", 1u64 as f32);
-  info2!("{}", 1u64 as f64);
-
-  info2!("{}", true as int);
-  info2!("{}", true as uint);
-  info2!("{}", true as *libc::FILE);
-  info2!("{}", true as i8);
-  info2!("{}", true as i16);
-  info2!("{}", true as i32);
-  info2!("{}", true as i64);
-  info2!("{}", true as u8);
-  info2!("{}", true as u16);
-  info2!("{}", true as u32);
-  info2!("{}", true as u64);
-  info2!("{}", true as f32);
-  info2!("{}", true as f64);
-
-  info2!("{}", 1. as int);
-  info2!("{}", 1. as uint);
-  info2!("{}", 1. as i8);
-  info2!("{}", 1. as i16);
-  info2!("{}", 1. as i32);
-  info2!("{}", 1. as i64);
-  info2!("{}", 1. as u8);
-  info2!("{}", 1. as u16);
-  info2!("{}", 1. as u32);
-  info2!("{}", 1. as u64);
-  info2!("{}", 1. as f32);
-  info2!("{}", 1. as f64);
-
-  info2!("{}", 1f32 as int);
-  info2!("{}", 1f32 as uint);
-  info2!("{}", 1f32 as i8);
-  info2!("{}", 1f32 as i16);
-  info2!("{}", 1f32 as i32);
-  info2!("{}", 1f32 as i64);
-  info2!("{}", 1f32 as u8);
-  info2!("{}", 1f32 as u16);
-  info2!("{}", 1f32 as u32);
-  info2!("{}", 1f32 as u64);
-  info2!("{}", 1f32 as f32);
-  info2!("{}", 1f32 as f64);
-
-  info2!("{}", 1f64 as int);
-  info2!("{}", 1f64 as uint);
-  info2!("{}", 1f64 as i8);
-  info2!("{}", 1f64 as i16);
-  info2!("{}", 1f64 as i32);
-  info2!("{}", 1f64 as i64);
-  info2!("{}", 1f64 as u8);
-  info2!("{}", 1f64 as u16);
-  info2!("{}", 1f64 as u32);
-  info2!("{}", 1f64 as u64);
-  info2!("{}", 1f64 as f32);
-  info2!("{}", 1f64 as f64);
+  info!("{}", f as int);
+  info!("{}", f as uint);
+  info!("{}", f as i8);
+  info!("{}", f as i16);
+  info!("{}", f as i32);
+  info!("{}", f as i64);
+  info!("{}", f as u8);
+  info!("{}", f as u16);
+  info!("{}", f as u32);
+  info!("{}", f as u64);
+
+  info!("{}", 1 as int);
+  info!("{}", 1 as uint);
+  info!("{}", 1 as *libc::FILE);
+  info!("{}", 1 as i8);
+  info!("{}", 1 as i16);
+  info!("{}", 1 as i32);
+  info!("{}", 1 as i64);
+  info!("{}", 1 as u8);
+  info!("{}", 1 as u16);
+  info!("{}", 1 as u32);
+  info!("{}", 1 as u64);
+  info!("{}", 1 as f32);
+  info!("{}", 1 as f64);
+
+  info!("{}", 1u as int);
+  info!("{}", 1u as uint);
+  info!("{}", 1u as *libc::FILE);
+  info!("{}", 1u as i8);
+  info!("{}", 1u as i16);
+  info!("{}", 1u as i32);
+  info!("{}", 1u as i64);
+  info!("{}", 1u as u8);
+  info!("{}", 1u as u16);
+  info!("{}", 1u as u32);
+  info!("{}", 1u as u64);
+  info!("{}", 1u as f32);
+  info!("{}", 1u as f64);
+
+  info!("{}", 1i8 as int);
+  info!("{}", 1i8 as uint);
+  info!("{}", 1i8 as *libc::FILE);
+  info!("{}", 1i8 as i8);
+  info!("{}", 1i8 as i16);
+  info!("{}", 1i8 as i32);
+  info!("{}", 1i8 as i64);
+  info!("{}", 1i8 as u8);
+  info!("{}", 1i8 as u16);
+  info!("{}", 1i8 as u32);
+  info!("{}", 1i8 as u64);
+  info!("{}", 1i8 as f32);
+  info!("{}", 1i8 as f64);
+
+  info!("{}", 1u8 as int);
+  info!("{}", 1u8 as uint);
+  info!("{}", 1u8 as *libc::FILE);
+  info!("{}", 1u8 as i8);
+  info!("{}", 1u8 as i16);
+  info!("{}", 1u8 as i32);
+  info!("{}", 1u8 as i64);
+  info!("{}", 1u8 as u8);
+  info!("{}", 1u8 as u16);
+  info!("{}", 1u8 as u32);
+  info!("{}", 1u8 as u64);
+  info!("{}", 1u8 as f32);
+  info!("{}", 1u8 as f64);
+
+  info!("{}", 1i16 as int);
+  info!("{}", 1i16 as uint);
+  info!("{}", 1i16 as *libc::FILE);
+  info!("{}", 1i16 as i8);
+  info!("{}", 1i16 as i16);
+  info!("{}", 1i16 as i32);
+  info!("{}", 1i16 as i64);
+  info!("{}", 1i16 as u8);
+  info!("{}", 1i16 as u16);
+  info!("{}", 1i16 as u32);
+  info!("{}", 1i16 as u64);
+  info!("{}", 1i16 as f32);
+  info!("{}", 1i16 as f64);
+
+  info!("{}", 1u16 as int);
+  info!("{}", 1u16 as uint);
+  info!("{}", 1u16 as *libc::FILE);
+  info!("{}", 1u16 as i8);
+  info!("{}", 1u16 as i16);
+  info!("{}", 1u16 as i32);
+  info!("{}", 1u16 as i64);
+  info!("{}", 1u16 as u8);
+  info!("{}", 1u16 as u16);
+  info!("{}", 1u16 as u32);
+  info!("{}", 1u16 as u64);
+  info!("{}", 1u16 as f32);
+  info!("{}", 1u16 as f64);
+
+  info!("{}", 1i32 as int);
+  info!("{}", 1i32 as uint);
+  info!("{}", 1i32 as *libc::FILE);
+  info!("{}", 1i32 as i8);
+  info!("{}", 1i32 as i16);
+  info!("{}", 1i32 as i32);
+  info!("{}", 1i32 as i64);
+  info!("{}", 1i32 as u8);
+  info!("{}", 1i32 as u16);
+  info!("{}", 1i32 as u32);
+  info!("{}", 1i32 as u64);
+  info!("{}", 1i32 as f32);
+  info!("{}", 1i32 as f64);
+
+  info!("{}", 1u32 as int);
+  info!("{}", 1u32 as uint);
+  info!("{}", 1u32 as *libc::FILE);
+  info!("{}", 1u32 as i8);
+  info!("{}", 1u32 as i16);
+  info!("{}", 1u32 as i32);
+  info!("{}", 1u32 as i64);
+  info!("{}", 1u32 as u8);
+  info!("{}", 1u32 as u16);
+  info!("{}", 1u32 as u32);
+  info!("{}", 1u32 as u64);
+  info!("{}", 1u32 as f32);
+  info!("{}", 1u32 as f64);
+
+  info!("{}", 1i64 as int);
+  info!("{}", 1i64 as uint);
+  info!("{}", 1i64 as *libc::FILE);
+  info!("{}", 1i64 as i8);
+  info!("{}", 1i64 as i16);
+  info!("{}", 1i64 as i32);
+  info!("{}", 1i64 as i64);
+  info!("{}", 1i64 as u8);
+  info!("{}", 1i64 as u16);
+  info!("{}", 1i64 as u32);
+  info!("{}", 1i64 as u64);
+  info!("{}", 1i64 as f32);
+  info!("{}", 1i64 as f64);
+
+  info!("{}", 1u64 as int);
+  info!("{}", 1u64 as uint);
+  info!("{}", 1u64 as *libc::FILE);
+  info!("{}", 1u64 as i8);
+  info!("{}", 1u64 as i16);
+  info!("{}", 1u64 as i32);
+  info!("{}", 1u64 as i64);
+  info!("{}", 1u64 as u8);
+  info!("{}", 1u64 as u16);
+  info!("{}", 1u64 as u32);
+  info!("{}", 1u64 as u64);
+  info!("{}", 1u64 as f32);
+  info!("{}", 1u64 as f64);
+
+  info!("{}", 1u64 as int);
+  info!("{}", 1u64 as uint);
+  info!("{}", 1u64 as *libc::FILE);
+  info!("{}", 1u64 as i8);
+  info!("{}", 1u64 as i16);
+  info!("{}", 1u64 as i32);
+  info!("{}", 1u64 as i64);
+  info!("{}", 1u64 as u8);
+  info!("{}", 1u64 as u16);
+  info!("{}", 1u64 as u32);
+  info!("{}", 1u64 as u64);
+  info!("{}", 1u64 as f32);
+  info!("{}", 1u64 as f64);
+
+  info!("{}", true as int);
+  info!("{}", true as uint);
+  info!("{}", true as *libc::FILE);
+  info!("{}", true as i8);
+  info!("{}", true as i16);
+  info!("{}", true as i32);
+  info!("{}", true as i64);
+  info!("{}", true as u8);
+  info!("{}", true as u16);
+  info!("{}", true as u32);
+  info!("{}", true as u64);
+  info!("{}", true as f32);
+  info!("{}", true as f64);
+
+  info!("{}", 1. as int);
+  info!("{}", 1. as uint);
+  info!("{}", 1. as i8);
+  info!("{}", 1. as i16);
+  info!("{}", 1. as i32);
+  info!("{}", 1. as i64);
+  info!("{}", 1. as u8);
+  info!("{}", 1. as u16);
+  info!("{}", 1. as u32);
+  info!("{}", 1. as u64);
+  info!("{}", 1. as f32);
+  info!("{}", 1. as f64);
+
+  info!("{}", 1f32 as int);
+  info!("{}", 1f32 as uint);
+  info!("{}", 1f32 as i8);
+  info!("{}", 1f32 as i16);
+  info!("{}", 1f32 as i32);
+  info!("{}", 1f32 as i64);
+  info!("{}", 1f32 as u8);
+  info!("{}", 1f32 as u16);
+  info!("{}", 1f32 as u32);
+  info!("{}", 1f32 as u64);
+  info!("{}", 1f32 as f32);
+  info!("{}", 1f32 as f64);
+
+  info!("{}", 1f64 as int);
+  info!("{}", 1f64 as uint);
+  info!("{}", 1f64 as i8);
+  info!("{}", 1f64 as i16);
+  info!("{}", 1f64 as i32);
+  info!("{}", 1f64 as i64);
+  info!("{}", 1f64 as u8);
+  info!("{}", 1f64 as u16);
+  info!("{}", 1f64 as u32);
+  info!("{}", 1f64 as u64);
+  info!("{}", 1f64 as f32);
+  info!("{}", 1f64 as f64);
 }
index 89ca7de00e2beb3936dd5d5d5a8ff7dd0a79bd4e..321929207f7a6ccd4fc11128034ef6b1653383cd 100644 (file)
 
 fn main() {
     // check
-    if ! cfg!(foo) { fail2!() }
-    if   cfg!(not(foo)) { fail2!() }
+    if ! cfg!(foo) { fail!() }
+    if   cfg!(not(foo)) { fail!() }
 
-    if ! cfg!(bar(baz)) { fail2!() }
-    if   cfg!(not(bar(baz))) { fail2!() }
+    if ! cfg!(bar(baz)) { fail!() }
+    if   cfg!(not(bar(baz))) { fail!() }
 
-    if ! cfg!(qux="foo") { fail2!() }
-    if   cfg!(not(qux="foo")) { fail2!() }
+    if ! cfg!(qux="foo") { fail!() }
+    if   cfg!(not(qux="foo")) { fail!() }
 
-    if ! cfg!(foo, bar(baz), qux="foo") { fail2!() }
-    if   cfg!(not(foo, bar(baz), qux="foo")) { fail2!() }
+    if ! cfg!(foo, bar(baz), qux="foo") { fail!() }
+    if   cfg!(not(foo, bar(baz), qux="foo")) { fail!() }
 
-    if cfg!(not_a_cfg) { fail2!() }
-    if cfg!(not_a_cfg, foo, bar(baz), qux="foo") { fail2!() }
+    if cfg!(not_a_cfg) { fail!() }
+    if cfg!(not_a_cfg, foo, bar(baz), qux="foo") { fail!() }
 
-    if ! cfg!(not(not_a_cfg)) { fail2!() }
-    if ! cfg!(not(not_a_cfg), foo, bar(baz), qux="foo") { fail2!() }
+    if ! cfg!(not(not_a_cfg)) { fail!() }
+    if ! cfg!(not(not_a_cfg), foo, bar(baz), qux="foo") { fail!() }
 
-    if cfg!(trailing_comma, ) { fail2!() }
+    if cfg!(trailing_comma, ) { fail!() }
 }
index 6f5ca090052f2c8b502abfa26840f1d55b9a18a1..42d730ff6bfe76d3893edf8ff9cafee0d049da4a 100644 (file)
@@ -22,6 +22,6 @@ struct t_rec {
 pub fn main() {
     let x = t_rec {c8: 22u8, t: a_tag(44u64)};
     let y = format!("{:?}", x);
-    info2!("y = {}", y);
+    info!("y = {}", y);
     assert_eq!(y, ~"t_rec{c8: 22u8, t: a_tag(44u64)}");
 }
index 9991f05aa3ac4c5b5764e756776ae30b2aaa8f9f..22e2304c0cebfa1912394124ce3276c249605544 100644 (file)
 pub fn main() { let k = checktrue; evenk(42, k); oddk(45, k); }
 
 fn evenk(n: int, k: extern fn(bool) -> bool) -> bool {
-    info2!("evenk");
-    info2!("{:?}", n);
+    info!("evenk");
+    info!("{:?}", n);
     if n == 0 { return k(true); } else { return oddk(n - 1, k); }
 }
 
 fn oddk(n: int, k: extern fn(bool) -> bool) -> bool {
-    info2!("oddk");
-    info2!("{:?}", n);
+    info!("oddk");
+    info!("{:?}", n);
     if n == 0 { return k(false); } else { return evenk(n - 1, k); }
 }
index 69d66092abf64ab4dd4a1a468f66e71cee1bdfd3..804b03559fa2f56a56b3009c5a4b653ba1fa6ccd 100644 (file)
 
 fn test05_start(ch : &Chan<int>) {
     ch.send(10);
-    error2!("sent 10");
+    error!("sent 10");
     ch.send(20);
-    error2!("sent 20");
+    error!("sent 20");
     ch.send(30);
-    error2!("sent 30");
+    error!("sent 30");
 }
 
 fn test05() {
     let (po, ch) = comm::stream();
     task::spawn(|| test05_start(&ch) );
     let mut value: int = po.recv();
-    error2!("{}", value);
+    error!("{}", value);
     value = po.recv();
-    error2!("{}", value);
+    error!("{}", value);
     value = po.recv();
-    error2!("{}", value);
+    error!("{}", value);
     assert_eq!(value, 30);
 }
index f169566653a3beafa510506dce443bf54a95ba72..d202bac7089b1997cc2959d433971478301b64b8 100644 (file)
@@ -12,9 +12,9 @@
 
 pub fn main() { test00(); }
 
-fn start() { info2!("Started / Finished task."); }
+fn start() { info!("Started / Finished task."); }
 
 fn test00() {
     task::try(|| start() );
-    info2!("Completing.");
+    info!("Completing.");
 }
index 023bb142e444c086c821fce04227f1a75ec41629..9195208fb96cac232eff2c78c39ee450de75f574 100644 (file)
@@ -23,10 +23,10 @@ fn start(c: &comm::Chan<comm::Chan<~str>>) {
     let mut b;
     a = p.recv();
     assert!(a == ~"A");
-    error2!("{:?}", a);
+    error!("{:?}", a);
     b = p.recv();
     assert!(b == ~"B");
-    error2!("{:?}", b);
+    error!("{:?}", b);
 }
 
 pub fn main() {
index 9d5f8937590435fb5e37640ddf1ff6e648c23d6d..0d221a6cb1d77e256c768dd7ebcf9b6ae9da7b77 100644 (file)
@@ -14,7 +14,7 @@
 
 pub fn main() { test00(); }
 
-fn start(_task_number: int) { info2!("Started / Finished task."); }
+fn start(_task_number: int) { info!("Started / Finished task."); }
 
 fn test00() {
     let i: int = 0;
@@ -34,5 +34,5 @@ fn test00() {
     // Try joining tasks that have already finished.
     result.recv();
 
-    info2!("Joined task.");
+    info!("Joined task.");
 }
index 2bbed1497cc5ee6880dd78c71466e8137eaeb842..b039f01bf0cd90f0efd714bd24a161203110d230 100644 (file)
@@ -21,8 +21,8 @@ fn start(c: &comm::Chan<int>, start: int, number_of_messages: int) {
 }
 
 pub fn main() {
-    info2!("Check that we don't deadlock.");
+    info!("Check that we don't deadlock.");
     let (_p, ch) = comm::stream();
     task::try(|| start(&ch, 0, 10) );
-    info2!("Joined task");
+    info!("Joined task");
 }
index cacaea5e8c06f429d14e77445258fb532e5a66ea..da9b3703a99f5f6030348ec8c8c6a24779b38a8e 100644 (file)
@@ -20,7 +20,7 @@ pub fn main() {
     // Spawn 10 tasks each sending us back one int.
     let mut i = 10;
     while (i > 0) {
-        info2!("{}", i);
+        info!("{}", i);
         let ch = ch.clone();
         task::spawn({let i = i; || child(i, &ch)});
         i = i - 1;
@@ -31,15 +31,15 @@ pub fn main() {
 
     i = 10;
     while (i > 0) {
-        info2!("{}", i);
+        info!("{}", i);
         po.recv();
         i = i - 1;
     }
 
-    info2!("main thread exiting");
+    info!("main thread exiting");
 }
 
 fn child(x: int, ch: &comm::SharedChan<int>) {
-    info2!("{}", x);
+    info!("{}", x);
     ch.send(x);
 }
index b4a1a38faa20b9056bcaee835d6a6e7edd9d05a4..eb48fa1812d749e33fabc4ec01c974a58dbd14b8 100644 (file)
 use std::comm;
 use std::task;
 
-pub fn main() { info2!("===== WITHOUT THREADS ====="); test00(); }
+pub fn main() { info!("===== WITHOUT THREADS ====="); test00(); }
 
 fn test00_start(ch: &SharedChan<int>, message: int, count: int) {
-    info2!("Starting test00_start");
+    info!("Starting test00_start");
     let mut i: int = 0;
     while i < count {
-        info2!("Sending Message");
+        info!("Sending Message");
         ch.send(message + 0);
         i = i + 1;
     }
-    info2!("Ending test00_start");
+    info!("Ending test00_start");
 }
 
 fn test00() {
     let number_of_tasks: int = 16;
     let number_of_messages: int = 4;
 
-    info2!("Creating tasks");
+    info!("Creating tasks");
 
     let (po, ch) = comm::stream();
     let ch = comm::SharedChan::new(ch);
@@ -67,8 +67,8 @@ fn test00() {
     // Join spawned tasks...
     for r in results.iter() { r.recv(); }
 
-    info2!("Completed: Final number is: ");
-    error2!("{:?}", sum);
+    info!("Completed: Final number is: ");
+    error!("{:?}", sum);
     // assert (sum == (((number_of_tasks * (number_of_tasks - 1)) / 2) *
     //       number_of_messages));
     assert_eq!(sum, 480);
index 80d981b0d45505bf217d1748ea4266d23e55c017..8e1704fe12f5e75b59b26ce10e9f9ebdfe335f2c 100644 (file)
@@ -24,31 +24,31 @@ fn test00() {
     c.send(4);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     c.send(5);
     c.send(6);
     c.send(7);
     c.send(8);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     r = p.recv();
     sum += r;
-    info2!("{}", r);
+    info!("{}", r);
     assert_eq!(sum, 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8);
 }
index 20d22204bedeb6b8160f12dce2e7ed0910672cfa..049810ff5692c2a789144a49f8dbd371db64bb6d 100644 (file)
@@ -37,7 +37,7 @@ fn test00() {
     let mut i: int = 0;
     while i < number_of_messages {
         sum += p.recv();
-        info2!("{:?}", r);
+        info!("{:?}", r);
         i += 1;
     }
 
index 5d12f4e88177c038a8edc4df59509880032ea3aa..142186853f52688c061e85997a0a74b26b63d544 100644 (file)
@@ -41,7 +41,7 @@ fn test_rm_tempdir() {
     let f: ~fn() = || {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
         wr.send(tmp.path().clone());
-        fail2!("fail to unwind past `tmp`");
+        fail!("fail to unwind past `tmp`");
     };
     task::try(f);
     let path = rd.recv();
@@ -52,7 +52,7 @@ fn test_rm_tempdir() {
     let cell = Cell::new(tmp);
     let f: ~fn() = || {
         let _tmp = cell.take();
-        fail2!("fail to unwind past `tmp`");
+        fail!("fail to unwind past `tmp`");
     };
     task::try(f);
     assert!(!os::path_exists(&path));
@@ -83,7 +83,7 @@ fn test_rm_tempdir() {
 fn recursive_mkdir_rel() {
     let path = Path::new("frob");
     let cwd = os::getcwd();
-    debug2!("recursive_mkdir_rel: Making: {} in cwd {} [{:?}]", path.display(),
+    debug!("recursive_mkdir_rel: Making: {} in cwd {} [{:?}]", path.display(),
            cwd.display(), os::path_exists(&path));
     assert!(os::mkdir_recursive(&path,  (S_IRUSR | S_IWUSR | S_IXUSR) as i32));
     assert!(os::path_is_dir(&path));
@@ -101,13 +101,13 @@ fn recursive_mkdir_dot() {
 fn recursive_mkdir_rel_2() {
     let path = Path::new("./frob/baz");
     let cwd = os::getcwd();
-    debug2!("recursive_mkdir_rel_2: Making: {} in cwd {} [{:?}]", path.display(),
+    debug!("recursive_mkdir_rel_2: Making: {} in cwd {} [{:?}]", path.display(),
            cwd.display(), os::path_exists(&path));
     assert!(os::mkdir_recursive(&path, (S_IRUSR | S_IWUSR | S_IXUSR) as i32));
         assert!(os::path_is_dir(&path));
     assert!(os::path_is_dir(&path.dir_path()));
     let path2 = Path::new("quux/blat");
-    debug2!("recursive_mkdir_rel_2: Making: {} in cwd {}", path2.display(),
+    debug!("recursive_mkdir_rel_2: Making: {} in cwd {}", path2.display(),
            cwd.display());
     assert!(os::mkdir_recursive(&path2, (S_IRUSR | S_IWUSR | S_IXUSR) as i32));
         assert!(os::path_is_dir(&path2));
@@ -123,7 +123,7 @@ pub fn test_rmdir_recursive_ok() {
     let tmpdir = tmpdir.path();
     let root = tmpdir.join("foo");
 
-    debug2!("making {}", root.display());
+    debug!("making {}", root.display());
     assert!(os::make_dir(&root, rwx));
     assert!(os::make_dir(&root.join("foo"), rwx));
     assert!(os::make_dir(&root.join("foo").join("bar"), rwx));
index 37cbc2b40de16386dec7c91a253d2313ed293113..c1b308c489e1462e63b3d8088ff274faad0e9d7b 100644 (file)
 fn test_ret() { let _x: @int = return; }
 
 fn test_fail() {
-    fn f() { let _x: @int = fail2!(); }
+    fn f() { let _x: @int = fail!(); }
     task::try(|| f() );
 }
 
 fn test_fail_indirect() {
-    fn f() -> ! { fail2!(); }
+    fn f() -> ! { fail!(); }
     fn g() { let _x: @int = f(); }
     task::try(|| g() );
 }
index a399d22cdad002c7ed79de82e9c49e615b17d1ea..3f1e9fe4c519749dd9a341e377e47ba1bfd126c6 100644 (file)
@@ -15,4 +15,4 @@
 
 // Building as a test runner means that a synthetic main will be run,
 // not ours
-pub fn main() { fail2!(); }
+pub fn main() { fail!(); }
index 81fcfd7efa0e7d6c2d02f2f5d65b1ae47f538013..d5f853fc2411f3f35759ccc5569c7f944029c439 100644 (file)
@@ -16,7 +16,7 @@
 pub fn main() {
     let mut i = 10;
     while i > 0 { task::spawn({let i = i; || child(i)}); i = i - 1; }
-    info2!("main thread exiting");
+    info!("main thread exiting");
 }
 
-fn child(x: int) { info2!("{}", x); }
+fn child(x: int) { info!("{}", x); }
index 62b415422a3b55e020b23c7fc8773e0683e82c7d..faea070c94de2ef9633631a33d325267cd1b0e7d 100644 (file)
@@ -19,5 +19,5 @@ pub fn main() {
     let (po, ch) = comm::stream();
     ch.send(42);
     let r = po.recv();
-    error2!("{:?}", r);
+    error!("{:?}", r);
 }
index b4f28114f967281b442bfc80fa208e7e41779f4c..a4512e99ce0d0923e4e46f1a70ba5ee7fb4c4e17 100644 (file)
@@ -11,7 +11,7 @@ fn foo(a:T, b:T) -> T {
             match (a, b) {
                 (A(x), A(y)) => A($e),
                 (B(x), B(y)) => B($e),
-                _ => fail2!()
+                _ => fail!()
             }
         }
     )
index 0d37c0f443d23780a4209030ff1cc34571916525..c14dd0471f91e4505564ab5a87a66fd166e5252d 100644 (file)
@@ -61,5 +61,5 @@ pub fn main() {
     assert!(!Equal::isEq(branch(@leaf(magenta), @leaf(cyan)),
                  branch(@leaf(magenta), @leaf(magenta))));
 
-    error2!("Assertions all succeeded!");
+    error!("Assertions all succeeded!");
 }
index 11973df2fec30d91c72f4a447e33733202907928..18a68bc1c34f98d71f84ba7c51962632a72df267 100644 (file)
@@ -60,5 +60,5 @@ pub fn main() {
     assert!(!branch(@leaf(magenta), @leaf(cyan))
         .isEq(branch(@leaf(magenta), @leaf(magenta))));
 
-    error2!("Assertions all succeeded!");
+    error!("Assertions all succeeded!");
 }
index e1ed28bc2ccd2058f63c0e006d56e4f6ca959686..4898ef1cd0ae2160ad687dd4314c670b88324ce1 100644 (file)
 pub fn main() {
     let a = 1;
     let a_neg: i8 = -a;
-    error2!("{}", a_neg);
+    error!("{}", a_neg);
 
     let b = 1;
     let b_neg: i16 = -b;
-    error2!("{}", b_neg);
+    error!("{}", b_neg);
 
     let c = 1;
     let c_neg: i32 = -c;
-    error2!("{}", c_neg);
+    error!("{}", c_neg);
 
     let d = 1;
     let d_neg: i64 = -d;
-    error2!("{}", d_neg);
+    error!("{}", d_neg);
 
     let e = 1;
     let e_neg: int = -e;
-    error2!("{}", e_neg);
+    error!("{}", e_neg);
 
     // intentional overflows
 
     let f = 1;
     let f_neg: u8 = -f;
-    error2!("{}", f_neg);
+    error!("{}", f_neg);
 
     let g = 1;
     let g_neg: u16 = -g;
-    error2!("{}", g_neg);
+    error!("{}", g_neg);
 
     let h = 1;
     let h_neg: u32 = -h;
-    error2!("{}", h_neg);
+    error!("{}", h_neg);
 
     let i = 1;
     let i_neg: u64 = -i;
-    error2!("{}", i_neg);
+    error!("{}", i_neg);
 
     let j = 1;
     let j_neg: uint = -j;
-    error2!("{}", j_neg);
+    error!("{}", j_neg);
 }
index 6f4c85960356bf089bcdca2f9aa313495c74076e..d84ebe0ba766b851a10ec1d11dff502d090d28bd 100644 (file)
@@ -18,6 +18,6 @@ pub fn main() {
     let rc1 = managed::refcount(*i);
     let j = i.clone();
     let rc2 = managed::refcount(*i);
-    error2!("rc1: {} rc2: {}", rc1, rc2);
+    error!("rc1: {} rc2: {}", rc1, rc2);
     assert_eq!(rc1 + 1u, rc2);
 }
index 14a651943fde9c48b67b48bc9410fa168da5359e..74b73d773699815329417acc2a2af41c6f1323a6 100644 (file)
@@ -13,5 +13,5 @@ pub fn main() {
 }
 
 fn f(_i: ~int) -> ~int {
-    fail2!();
+    fail!();
 }
index d0fa48a6c4d507a08fc29600dd43b5062dfab124..b1fc4e76ea084bafd22b6008130117b295aae9cc 100644 (file)
@@ -14,7 +14,7 @@ enum bar { u(~int), w(int), }
     let x = u(~10);
     assert!(match x {
       u(a) => {
-        error2!("{:?}", a);
+        error!("{:?}", a);
         *a
       }
       _ => { 66 }
index 24342190e3fc4c298e2de46afad26f61e2099218..96d61b377af5c8047ea8cc4b141b40da615b1067 100644 (file)
@@ -10,5 +10,5 @@
 
 pub fn main() {
     let i = ~100;
-    error2!("{:?}", i);
+    error!("{:?}", i);
 }
index 7a9790973d0116c3af502ed1ad99aa14c12b0b47..077bbdfb0baa4b7127a2e12680df13a3a79621ac 100644 (file)
@@ -14,7 +14,7 @@ enum bar { u(~int), w(int), }
 pub fn main() {
     assert!(match u(~10) {
       u(a) => {
-        error2!("{:?}", a);
+        error!("{:?}", a);
         *a
       }
       _ => { 66 }
index d33db85eb30e02cf15205b47a31724f6ce061e96..0b9ad6ee194e7b1ed18011dd358ba4f88c09134f 100644 (file)
@@ -11,7 +11,7 @@
 fn simple() {
     match ~true {
       ~true => { }
-      _ => { fail2!(); }
+      _ => { fail!(); }
     }
 }
 
index 2d7234cbe314542f5afbfa7cc234a17ae7ff3a1e..7b450168cc4a8282005d82ab5a180cc802ad0e94 100644 (file)
@@ -16,7 +16,7 @@
 
 impl Drop for Foo {
     fn drop(&mut self) {
-        fail2!("This failure should happen.");
+        fail!("This failure should happen.");
     }
 }
 
index e094f874c3fddaa2a74152f98cdd054dacff18b1..d1896a258c63426a233c093366814085725b6120 100644 (file)
@@ -14,7 +14,7 @@
 fn id(x: bool) -> bool { x }
 
 fn call_id() {
-    let c = fail2!();
+    let c = fail!();
     id(c); //~ WARNING unreachable statement
 }
 
index 55a359efeed45be5a228a4deea14cccddfd98a84..2c65e2283e8ed6ba1a39a0442773bdb9e6dbe6bf 100644 (file)
@@ -15,7 +15,7 @@
 fn id(x: bool) -> bool { x }
 
 fn call_id() {
-    let c = fail2!();
+    let c = fail!();
     id(c);
 }
 
index de65d9bbaba2b97863f157ea8ca1ad3af53d40ac..24e898a90bb7706cc206c94c93d967a14c36523e 100644 (file)
@@ -14,7 +14,7 @@
 
 fn f() {
     let _a = @0;
-    fail2!();
+    fail!();
 }
 
 pub fn main() {
index 6ab40c10aa4534ef51504b634e30c633c2ea2779..c5276b727a95668fb72868a65415c20d50911c43 100644 (file)
@@ -21,14 +21,14 @@ struct complainer {
 
 impl Drop for complainer {
     fn drop(&mut self) {
-        error2!("About to send!");
+        error!("About to send!");
         self.c.send(true);
-        error2!("Sent!");
+        error!("Sent!");
     }
 }
 
 fn complainer(c: SharedChan<bool>) -> complainer {
-    error2!("Hello!");
+    error!("Hello!");
     complainer {
         c: c
     }
@@ -36,13 +36,13 @@ fn complainer(c: SharedChan<bool>) -> complainer {
 
 fn f(c: SharedChan<bool>) {
     let _c = complainer(c);
-    fail2!();
+    fail!();
 }
 
 pub fn main() {
     let (p, c) = stream();
     let c = SharedChan::new(c);
     task::spawn_unlinked(|| f(c.clone()) );
-    error2!("hiiiiiiiii");
+    error!("hiiiiiiiii");
     assert!(p.recv());
 }
index 751b9430e3b55b7c47860d1ba3f3c6d80364085c..5b0cd17eea05eca5e735173399d79ebf51f4940a 100644 (file)
@@ -29,7 +29,7 @@ fn complainer(c: @int) -> complainer {
 
 fn f() {
     let _c = complainer(@0);
-    fail2!();
+    fail!();
 }
 
 pub fn main() {
index 07610fe7115ca60552377763891d475a7206a527..0038392115b16c1c647ce0e699d3600436fabaa7 100644 (file)
@@ -14,7 +14,7 @@
 
 fn f() {
     let _a = ~0;
-    fail2!();
+    fail!();
 }
 
 pub fn main() {
index 18698a48613b823f7888e45e6db723200d0b3530..69e28e30d09202c6ad4f2ea1fc737ad98d537e71 100644 (file)
@@ -21,4 +21,4 @@ fn foo<T>(o: myoption<T>) -> int {
 
 enum myoption<T> { none, some(T), }
 
-pub fn main() { info2!("{}", 5); }
+pub fn main() { info!("{}", 5); }
index 844b0521f3a3981ba98a8d87edf3690a19a120cc..a85861d2aa5d4732752dafc52649365214b84cbd 100644 (file)
@@ -13,7 +13,7 @@
 fn foo<T>(o: myoption<T>) -> int {
     let mut x: int;
     match o {
-        none::<T> => { fail2!(); }
+        none::<T> => { fail!(); }
         some::<T>(_t) => { x = 5; }
     }
     return x;
@@ -21,4 +21,4 @@ fn foo<T>(o: myoption<T>) -> int {
 
 enum myoption<T> { none, some(T), }
 
-pub fn main() { info2!("{}", 5); }
+pub fn main() { info!("{}", 5); }
index 5222b0eb984aee1b840ea661cdef0779fbd76291..984b4938faa3f2fb050bbbc46e25101a941dc758 100644 (file)
@@ -42,10 +42,10 @@ pub fn main() {
     fn check_str_eq(a: ~str, b: ~str) {
         let mut i: int = 0;
         for ab in a.byte_iter() {
-            info2!("{}", i);
-            info2!("{}", ab);
+            info!("{}", i);
+            info!("{}", ab);
             let bb: u8 = b[i];
-            info2!("{}", bb);
+            info!("{}", bb);
             assert_eq!(ab, bb);
             i += 1;
         }
index 0a8a9b1bab7990223815766406fb7311322647de..3a4a424c3b831ea36221831dc097a0824174ec40 100644 (file)
@@ -13,7 +13,7 @@ pub fn main() {
     let a: ~[int] = ~[1, 2, 3, 4, 5];
     let b: ~[int] = ~[6, 7, 8, 9, 0];
     let v: ~[int] = a + b;
-    info2!("{}", v[9]);
+    info!("{}", v[9]);
     assert_eq!(v[0], 1);
     assert_eq!(v[7], 8);
     assert_eq!(v[9], 0);
index e11bd257d42fb09f0a67a71f3a916cf8bbb9b3ff..7ffbade05c1cce4f3b7d88d521642873ae0d535e 100644 (file)
@@ -13,5 +13,5 @@
 pub fn main() {
     let mut later: ~[int];
     if true { later = ~[1]; } else { later = ~[2]; }
-    info2!("{}", later[0]);
+    info!("{}", later[0]);
 }
index 8965ee688425aefccf7b18e77ab23d251db16398..2ad21aba6cdd82e4f15397402805e98dd061b967 100644 (file)
@@ -1,22 +1,22 @@
 pub fn main() {
     let x = @[1, 2, 3];
     match x {
-        [2, .._] => fail2!(),
+        [2, .._] => fail!(),
         [1, ..tail] => {
             assert_eq!(tail, [2, 3]);
         }
-        [_] => fail2!(),
-        [] => fail2!()
+        [_] => fail!(),
+        [] => fail!()
     }
 
     let y = (~[(1, true), (2, false)], 0.5);
     match y {
-        ([_, _, _], 0.5) => fail2!(),
+        ([_, _, _], 0.5) => fail!(),
         ([(1, a), (b, false), ..tail], _) => {
             assert_eq!(a, true);
             assert_eq!(b, 2);
             assert!(tail.is_empty());
         }
-        ([.._tail], _) => fail2!()
+        ([.._tail], _) => fail!()
     }
 }
index dec29c8da5330341bd697a02f17ffced8bdaacf0..c09fb8d6bc7ef896ab44ad695bbc52f1dac7182a 100644 (file)
@@ -1,14 +1,14 @@
 fn a() {
     let x = ~[1];
     match x {
-        [_, _, _, _, _, .._] => fail2!(),
-        [.._, _, _, _, _] => fail2!(),
-        [_, .._, _, _] => fail2!(),
-        [_, _] => fail2!(),
+        [_, _, _, _, _, .._] => fail!(),
+        [.._, _, _, _, _] => fail!(),
+        [_, .._, _, _] => fail!(),
+        [_, _] => fail!(),
         [a] => {
             assert_eq!(a, 1);
         }
-        [] => fail2!()
+        [] => fail!()
     }
 }
 
@@ -20,7 +20,7 @@ fn b() {
             assert_eq!(b, 2);
             assert_eq!(c, &[3]);
         }
-        _ => fail2!()
+        _ => fail!()
     }
     match x {
         [..a, b, c] => {
@@ -28,7 +28,7 @@ fn b() {
             assert_eq!(b, 2);
             assert_eq!(c, 3);
         }
-        _ => fail2!()
+        _ => fail!()
     }
     match x {
         [a, ..b, c] => {
@@ -36,7 +36,7 @@ fn b() {
             assert_eq!(b, &[2]);
             assert_eq!(c, 3);
         }
-        _ => fail2!()
+        _ => fail!()
     }
     match x {
         [a, b, c] => {
@@ -44,14 +44,14 @@ fn b() {
             assert_eq!(b, 2);
             assert_eq!(c, 3);
         }
-        _ => fail2!()
+        _ => fail!()
     }
 }
 
 fn c() {
     let x = [1];
     match x {
-        [2, .. _] => fail2!(),
+        [2, .. _] => fail!(),
         [.. _] => ()
     }
 }
index 4d5286502b7dfe14745144523c6919a996404074..ce70643cfc68e1b228bfff08b6515b137e11b666 100644 (file)
@@ -47,7 +47,7 @@ fn test_loop() {
     let mut i = 20;
     let mut expected_len = 1u;
     while i > 0 {
-        error2!("{}", a.len());
+        error!("{}", a.len());
         assert_eq!(a.len(), expected_len);
         a = a + a; // FIXME(#3387)---can't write a += a
         i -= 1;
index 9de4e29529466bd47a68deab34f4e34fe0fbcd71..0e24ba326b7a4d6469b2cecfe9fb4d4e14a2b598 100644 (file)
@@ -61,17 +61,17 @@ fn canttouchthis() -> uint {
     fn p() -> bool { true }
     let _a = (assert!((true)) == (assert!(p())));
     let _c = (assert!((p())) == ());
-    let _b: bool = (info2!("{}", 0) == (return 0u));
+    let _b: bool = (info!("{}", 0) == (return 0u));
 }
 
 fn angrydome() {
     loop { if break { } }
     let mut i = 0;
-    loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => fail2!("wat") } }
+    loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => fail!("wat") } }
       break; }
 }
 
-fn evil_lincoln() { let _evil = info2!("lincoln"); }
+fn evil_lincoln() { let _evil = info!("lincoln"); }
 
 pub fn main() {
     strange();
index 44c3225bb1594c42d607c57a5039c41de2ca756b..ed7ba12ea0f2fd1f2f9464a612ce4ed31d6bfad7 100644 (file)
@@ -13,7 +13,7 @@ pub fn main() {
     let mut i = 1;
     while i > 0 {
         assert!((i > 0));
-        info2!("{}", i);
+        info!("{}", i);
         i -= 1;
         continue;
     }
index a07d122c8e2ce78ece58d19ec731801ed067cbb1..a21aa4a9a6246dbbc46ade93556e5092ea37dd2c 100644 (file)
@@ -18,7 +18,7 @@ pub fn main() {
     while z < 50 {
         z += 1;
         while false { x = y; y = z; }
-        info2!("{}", y);
+        info!("{}", y);
     }
     assert!((y == 42 && z == 50));
 }
index 05eea29b31da0f0ebfc6807f8df05c04177b3dcd..82fb39a7c6269e2bbadf9a2b32798e42c4682117 100644 (file)
@@ -5,13 +5,13 @@
 pub fn main() {
     let mut i: int = 90;
     while i < 100 {
-        info2!("{}", i);
+        info!("{}", i);
         i = i + 1;
         if i == 95 {
             let _v: ~[int] =
                 ~[1, 2, 3, 4, 5]; // we check that it is freed by break
 
-            info2!("breaking");
+            info!("breaking");
             break;
         }
     }
index 4295c89865f11dec932fbb4c51627e41b457e575..fe2506ad686ab89549ef7d9bae5b977b013d0e3d 100644 (file)
 pub fn main() {
     let mut x: int = 10;
     let mut y: int = 0;
-    while y < x { info2!("{}", y); info2!("hello"); y = y + 1; }
+    while y < x { info!("{}", y); info!("hello"); y = y + 1; }
     while x > 0 {
-        info2!("goodbye");
+        info!("goodbye");
         x = x - 1;
-        info2!("{}", x);
+        info!("{}", x);
     }
 }
index 06c2ca7be0bc85dcff79b66082b24a70bee1a414..2db954d27c10b292d56d06f9210480c991e0415a 100644 (file)
@@ -22,7 +22,7 @@ pub fn main() {
             Some(ref z) if z.with(|b| *b) => {
                 do z.with |b| { assert!(*b); }
             },
-            _ => fail2!()
+            _ => fail!()
         }
     }
 }
index 6f6f59d80a5dea978397088600a39dbcb5ef355e..2c331f29223d6cc94f3272f80f140f6e2163ec57 100644 (file)
@@ -15,14 +15,14 @@ pub fn main() {
     let mut builder = task::task();
     let result = builder.future_result();
     builder.spawn(child);
-    error2!("1");
+    error!("1");
     task::deschedule();
-    error2!("2");
+    error!("2");
     task::deschedule();
-    error2!("3");
+    error!("3");
     result.recv();
 }
 
 fn child() {
-    error2!("4"); task::deschedule(); error2!("5"); task::deschedule(); error2!("6");
+    error!("4"); task::deschedule(); error!("5"); task::deschedule(); error!("6");
 }
index 6b189e515ff6c5761bd342f53ff2156abbaf81bc..21088c9dacc9f8d59921fca55064121d6ce8aa16 100644 (file)
@@ -15,9 +15,9 @@ pub fn main() {
     let mut builder = task::task();
     let result = builder.future_result();
     builder.spawn(child);
-    error2!("1");
+    error!("1");
     task::deschedule();
     result.recv();
 }
 
-fn child() { error2!("2"); }
+fn child() { error!("2"); }
index 6dc96536540d4f279184c931d50fa531e33ee32f..aaf4b257f7afef9702bb4f0cf32e2f1c7e6ba880 100644 (file)
@@ -13,5 +13,5 @@
 
 pub fn main() {
     let mut i: int = 0;
-    while i < 100 { i = i + 1; error2!("{}", i); task::deschedule(); }
+    while i < 100 { i = i + 1; error!("{}", i); task::deschedule(); }
 }