]> git.lizzy.rs Git - rust.git/commitdiff
librustc: Replace `impl Type : Trait` with `impl Trait for Type`. rs=implflipping
authorPatrick Walton <pcwalton@mimiga.net>
Thu, 14 Feb 2013 19:47:00 +0000 (11:47 -0800)
committerPatrick Walton <pcwalton@mimiga.net>
Thu, 14 Feb 2013 22:44:12 +0000 (14:44 -0800)
583 files changed:
src/libcore/bool.rs
src/libcore/char.rs
src/libcore/clone.rs
src/libcore/condition.rs
src/libcore/dvec.rs
src/libcore/hash.rs
src/libcore/hashmap.rs
src/libcore/io.rs
src/libcore/iter-trait.rs
src/libcore/managed.rs
src/libcore/nil.rs
src/libcore/num/f32.rs
src/libcore/num/f64.rs
src/libcore/num/float.rs
src/libcore/num/int-template.rs
src/libcore/num/int-template/i16.rs
src/libcore/num/int-template/i32.rs
src/libcore/num/uint-template.rs
src/libcore/num/uint-template/u16.rs
src/libcore/num/uint-template/u32.rs
src/libcore/num/uint-template/u64.rs
src/libcore/num/uint-template/u8.rs
src/libcore/num/uint-template/uint.rs
src/libcore/owned.rs
src/libcore/path.rs
src/libcore/pipes.rs
src/libcore/private.rs
src/libcore/private/at_exit.rs
src/libcore/private/finally.rs
src/libcore/private/global.rs
src/libcore/ptr.rs
src/libcore/rand.rs
src/libcore/reflect.rs
src/libcore/repr.rs
src/libcore/run.rs
src/libcore/str.rs
src/libcore/task/local_data_priv.rs
src/libcore/task/mod.rs
src/libcore/to_bytes.rs
src/libcore/to_str.rs
src/libcore/tuple.rs
src/libcore/vec.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/middle/astencode.rs
src/librustc/middle/lint.rs
src/librustc/middle/liveness.rs
src/librustc/middle/trans/cabi.rs
src/librustc/middle/trans/cabi_x86_64.rs
src/librustc/middle/trans/expr.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/infer/mod.rs
src/librustc/middle/typeck/infer/region_inference.rs
src/librustc/middle/typeck/mod.rs
src/librustdoc/astsrv.rs
src/librustdoc/config.rs
src/librustdoc/demo.rs
src/librustdoc/doc.rs
src/librustdoc/fold.rs
src/librustdoc/markdown_writer.rs
src/librustdoc/path_pass.rs
src/librustdoc/util.rs
src/libstd/arc.rs
src/libstd/arena.rs
src/libstd/base64.rs
src/libstd/bigint.rs
src/libstd/bitv.rs
src/libstd/c_vec.rs
src/libstd/cmp.rs
src/libstd/comm.rs
src/libstd/deque.rs
src/libstd/ebml.rs
src/libstd/flatpipes.rs
src/libstd/future.rs
src/libstd/io_util.rs
src/libstd/json.rs
src/libstd/net_ip.rs
src/libstd/net_tcp.rs
src/libstd/net_url.rs
src/libstd/oldmap.rs
src/libstd/oldsmallintmap.rs
src/libstd/priority_queue.rs
src/libstd/sha1.rs
src/libstd/smallintmap.rs
src/libstd/sort.rs
src/libstd/stats.rs
src/libstd/sync.rs
src/libstd/time.rs
src/libstd/treemap.rs
src/libstd/uv_global_loop.rs
src/libstd/uv_iotask.rs
src/libstd/workcache.rs
src/libsyntax/attr.rs
src/libsyntax/diagnostic.rs
src/libsyntax/ext/auto_encode.rs
src/libsyntax/ext/base.rs
src/libsyntax/ext/quote.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/comments.rs
src/libsyntax/parse/lexer.rs
src/libsyntax/parse/token.rs
src/test/auxiliary/ambig_impl_2_lib.rs
src/test/auxiliary/cci_impl_lib.rs
src/test/auxiliary/explicit_self_xcrate.rs
src/test/auxiliary/impl_privacy_xc_2.rs
src/test/auxiliary/issue-2380.rs
src/test/auxiliary/issue-2414-a.rs
src/test/auxiliary/issue-2526.rs
src/test/auxiliary/issue2378a.rs
src/test/auxiliary/issue2378b.rs
src/test/auxiliary/issue4516_ty_param_lib.rs
src/test/auxiliary/issue_2242_a.rs
src/test/auxiliary/issue_2242_c.rs
src/test/auxiliary/issue_2472_b.rs
src/test/auxiliary/issue_3136_a.rs
src/test/auxiliary/private_variant_1.rs
src/test/auxiliary/static-methods-crate.rs
src/test/auxiliary/static_fn_inline_xc_aux.rs
src/test/auxiliary/static_fn_trait_xc_aux.rs
src/test/auxiliary/trait_inheritance_auto_xc_2_aux.rs
src/test/auxiliary/trait_inheritance_auto_xc_aux.rs
src/test/auxiliary/trait_inheritance_cross_trait_call_xc_aux.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/task-perf-alloc-unwind.rs
src/test/compile-fail/alt-arrows-block-then-binop.rs
src/test/compile-fail/alt-range-fail-dominate.rs
src/test/compile-fail/ambig_impl_2_exe.rs
src/test/compile-fail/ambig_impl_bounds.rs
src/test/compile-fail/ambig_impl_unify.rs
src/test/compile-fail/assign-super.rs
src/test/compile-fail/attempted-access-non-fatal.rs
src/test/compile-fail/attr-before-ext.rs
src/test/compile-fail/attr-before-let.rs
src/test/compile-fail/auto-ref-borrowck-failure.rs
src/test/compile-fail/auto-ref-slice-plus-ref.rs
src/test/compile-fail/bad-method-typaram-kind.rs
src/test/compile-fail/bad-value-ident-false.rs
src/test/compile-fail/bad-value-ident-true.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-lvalues-1.rs
src/test/compile-fail/bind-by-move-no-lvalues-2.rs
src/test/compile-fail/bind-by-move-no-sub-bindings.rs
src/test/compile-fail/binop-add-ptr.rs
src/test/compile-fail/block-must-not-have-result-do.rs
src/test/compile-fail/block-must-not-have-result-for.rs
src/test/compile-fail/block-must-not-have-result-res.rs
src/test/compile-fail/block-must-not-have-result-while.rs
src/test/compile-fail/borrowck-addr-of-upvar.rs
src/test/compile-fail/borrowck-assign-to-constants.rs
src/test/compile-fail/borrowck-assign-to-enum.rs
src/test/compile-fail/borrowck-assign-to-subfield.rs
src/test/compile-fail/borrowck-borrowed-uniq-rvalue-2.rs
src/test/compile-fail/borrowck-insert-during-each.rs
src/test/compile-fail/borrowck-loan-in-overloaded-op.rs
src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs
src/test/compile-fail/borrowck-loan-rcvr.rs
src/test/compile-fail/borrowck-loan-vec-content.rs
src/test/compile-fail/borrowck-move-from-unsafe-ptr.rs
src/test/compile-fail/borrowck-mut-deref-comp.rs
src/test/compile-fail/borrowck-mut-field-imm-base.rs
src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs
src/test/compile-fail/borrowck-pure-scope-in-call.rs
src/test/compile-fail/borrowck-unary-move-2.rs
src/test/compile-fail/cast-from-nil.rs
src/test/compile-fail/cast-to-nil.rs
src/test/compile-fail/class-cast-to-trait.rs
src/test/compile-fail/class-method-missing.rs
src/test/compile-fail/class-missing-self.rs
src/test/compile-fail/coerce-bad-variance.rs
src/test/compile-fail/const-recursive.rs
src/test/compile-fail/copy-a-resource.rs
src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs
src/test/compile-fail/drop-on-non-struct.rs
src/test/compile-fail/elided-test.rs
src/test/compile-fail/empty-record-type.rs
src/test/compile-fail/explicit-call-to-dtor.rs
src/test/compile-fail/explicit-call-to-supertrait-dtor.rs
src/test/compile-fail/ext-after-attrib.rs
src/test/compile-fail/extern-no-call.rs
src/test/compile-fail/if-without-else-result.rs
src/test/compile-fail/immut-function-arguments.rs
src/test/compile-fail/import-from-path.rs
src/test/compile-fail/import-glob-path.rs
src/test/compile-fail/infinite-instantiation.rs
src/test/compile-fail/infinite-tag-type-recursion.rs
src/test/compile-fail/issue-1802-1.rs
src/test/compile-fail/issue-1802-2.rs
src/test/compile-fail/issue-1896-1.rs
src/test/compile-fail/issue-1900.rs
src/test/compile-fail/issue-2063.rs
src/test/compile-fail/issue-2111.rs
src/test/compile-fail/issue-2149.rs
src/test/compile-fail/issue-2330.rs
src/test/compile-fail/issue-2548.rs
src/test/compile-fail/issue-2590.rs
src/test/compile-fail/issue-2611-3.rs
src/test/compile-fail/issue-2611-4.rs
src/test/compile-fail/issue-2611-5.rs
src/test/compile-fail/issue-2817-2.rs
src/test/compile-fail/issue-2823.rs
src/test/compile-fail/issue-2951.rs
src/test/compile-fail/issue-2995.rs
src/test/compile-fail/issue-3021-d.rs
src/test/compile-fail/issue-3021.rs
src/test/compile-fail/issue-3154.rs
src/test/compile-fail/issue-3214.rs
src/test/compile-fail/issue-3243.rs
src/test/compile-fail/issue-3344.rs
src/test/compile-fail/issue-3477.rs
src/test/compile-fail/issue-3651-2.rs
src/test/compile-fail/issue-3651.rs
src/test/compile-fail/issue-3668.rs
src/test/compile-fail/issue-3702-2.rs
src/test/compile-fail/issue-3820.rs
src/test/compile-fail/issue-3953.rs
src/test/compile-fail/issue-3973.rs
src/test/compile-fail/issue-4335.rs
src/test/compile-fail/issue-4523.rs
src/test/compile-fail/issue-818.rs
src/test/compile-fail/kindck-nonsendable-1.rs
src/test/compile-fail/kindck-owned-trait-contains.rs
src/test/compile-fail/kindck-owned-trait-scoped.rs
src/test/compile-fail/lint-deprecated-self.rs
src/test/compile-fail/lint-non-camel-case-types.rs
src/test/compile-fail/liveness-unused.rs
src/test/compile-fail/loop-does-not-diverge.rs
src/test/compile-fail/lub-in-args.rs
src/test/compile-fail/missing-derivable-attr.rs
src/test/compile-fail/mod_file_correct_spans.rs
src/test/compile-fail/mod_file_not_exist.rs
src/test/compile-fail/mod_file_with_path_attr.rs
src/test/compile-fail/moves-based-on-type-access-to-field.rs
src/test/compile-fail/multiple-main.rs
src/test/compile-fail/multitrait.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/non-const.rs
src/test/compile-fail/noncopyable-class.rs
src/test/compile-fail/omitted-arg-in-item-fn.rs
src/test/compile-fail/omitted-arg-wrong-types.rs
src/test/compile-fail/pinned-deep-copy.rs
src/test/compile-fail/pptypedef.rs
src/test/compile-fail/private_variant_2.rs
src/test/compile-fail/pure-modifies-aliased.rs
src/test/compile-fail/qquote-1.rs
src/test/compile-fail/qquote-2.rs
src/test/compile-fail/rec-expected.rs
src/test/compile-fail/record-with-resource.rs
src/test/compile-fail/regions-addr-of-arg.rs
src/test/compile-fail/regions-escape-via-trait-or-not.rs
src/test/compile-fail/regions-in-consts.rs
src/test/compile-fail/regions-in-enums.rs
src/test/compile-fail/regions-in-rsrcs.rs
src/test/compile-fail/regions-in-type-items.rs
src/test/compile-fail/regions-infer-call-3.rs
src/test/compile-fail/regions-infer-contravariance-due-to-immutability.rs
src/test/compile-fail/regions-infer-contravariance-due-to-ret.rs
src/test/compile-fail/regions-infer-covariance-due-to-arg.rs
src/test/compile-fail/regions-infer-invariance-due-to-arg-and-ret.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-1.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs
src/test/compile-fail/regions-infer-invariance-due-to-mutability.rs
src/test/compile-fail/regions-infer-paramd-indirect.rs
src/test/compile-fail/regions-infer-paramd-method.rs
src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs
src/test/compile-fail/regions-nested-fns-2.rs
src/test/compile-fail/regions-nested-fns.rs
src/test/compile-fail/regions-out-of-scope-slice.rs
src/test/compile-fail/regions-scoping.rs
src/test/compile-fail/regions-trait-1.rs
src/test/compile-fail/regions-trait-2.rs
src/test/compile-fail/regions-var-type-out-of-scope.rs
src/test/compile-fail/repeat-to-run-dtor-twice.rs
src/test/compile-fail/reserved-be.rs
src/test/compile-fail/selftype-astparam.rs
src/test/compile-fail/seq-args.rs
src/test/compile-fail/staticness-mismatch.rs
src/test/compile-fail/struct-fields-dupe.rs
src/test/compile-fail/tps-invariant-class.rs
src/test/compile-fail/tps-invariant-enum.rs
src/test/compile-fail/tps-invariant-trait.rs
src/test/compile-fail/trait-impl-can-not-have-untraitful-methods.rs
src/test/compile-fail/trait-impl-different-num-params.rs
src/test/compile-fail/trait-impl-method-mismatch.rs
src/test/compile-fail/trait-impl-subtype.rs
src/test/compile-fail/trait-inheritance-missing-requirement.rs
src/test/compile-fail/trait-keyword.rs
src/test/compile-fail/trait-test-2.rs
src/test/compile-fail/trait-test.rs
src/test/compile-fail/tutorial-suffix-inference-test.rs
src/test/compile-fail/unique-mut.rs
src/test/compile-fail/unique-object-noncopyable.rs
src/test/compile-fail/unique-pinned-nocopy.rs
src/test/compile-fail/unique-vec-res.rs
src/test/compile-fail/unreachable-code.rs
src/test/compile-fail/vec-concat-bug.rs
src/test/compile-fail/vec-res-add.rs
src/test/compile-fail/vtable-res-trait-param.rs
src/test/compile-fail/warn-path-statement.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/issue-2061.rs
src/test/run-fail/linked-failure4.rs
src/test/run-fail/morestack2.rs
src/test/run-fail/morestack3.rs
src/test/run-fail/morestack4.rs
src/test/run-fail/rt-set-exit-status-fail2.rs
src/test/run-fail/rt-set-exit-status.rs
src/test/run-fail/too-much-recursion.rs
src/test/run-fail/unwind-assert.rs
src/test/run-fail/unwind-box-res.rs
src/test/run-fail/unwind-box-trait.rs
src/test/run-fail/unwind-resource-fail3.rs
src/test/run-pass-fulldeps/qquote.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/alt-value-binding-in-guard-3291.rs
src/test/run-pass/assignability-trait.rs
src/test/run-pass/auto-encode.rs
src/test/run-pass/auto-ref-bounded-ty-param.rs
src/test/run-pass/auto-ref-slice-plus-ref.rs
src/test/run-pass/auto-ref-sliceable.rs
src/test/run-pass/auto-ref.rs
src/test/run-pass/autoderef-method-newtype.rs
src/test/run-pass/autoderef-method-on-trait-monomorphized.rs
src/test/run-pass/autoderef-method-on-trait.rs
src/test/run-pass/autoderef-method-priority.rs
src/test/run-pass/autoderef-method-twice-but-not-thrice.rs
src/test/run-pass/autoderef-method-twice.rs
src/test/run-pass/autoderef-method.rs
src/test/run-pass/autoref-intermediate-types-issue-3585.rs
src/test/run-pass/big-literals.rs
src/test/run-pass/binops.rs
src/test/run-pass/borrow-by-val-method-receiver.rs
src/test/run-pass/borrowck-borrow-from-at-vec.rs
src/test/run-pass/borrowck-move-from-unsafe-ptr-ok.rs
src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
src/test/run-pass/borrowck-newtype-issue-2573.rs
src/test/run-pass/borrowck-preserve-box-in-field.rs
src/test/run-pass/borrowck-preserve-box-in-uniq.rs
src/test/run-pass/borrowck-preserve-box-sometimes-needed.rs
src/test/run-pass/borrowck-preserve-box.rs
src/test/run-pass/borrowck-preserve-cond-box.rs
src/test/run-pass/borrowck-univariant-enum.rs
src/test/run-pass/borrowed-ptr-pattern-option.rs
src/test/run-pass/boxed-trait-with-vstore.rs
src/test/run-pass/cast-region-to-uint.rs
src/test/run-pass/cfg-family.rs
src/test/run-pass/cfg-target-family.rs
src/test/run-pass/class-attributes-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-dtor.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/class-str-field.rs
src/test/run-pass/classes-cross-crate.rs
src/test/run-pass/classes.rs
src/test/run-pass/clone-with-exterior.rs
src/test/run-pass/coerce-reborrow-mut-vec-rcvr.rs
src/test/run-pass/coherence-copy-bound.rs
src/test/run-pass/coherence-impl-in-fn.rs
src/test/run-pass/compare-generic-enums.rs
src/test/run-pass/conditional-compile.rs
src/test/run-pass/const-const.rs
src/test/run-pass/const-extern-function.rs
src/test/run-pass/const-fn-val.rs
src/test/run-pass/const-negative.rs
src/test/run-pass/const-struct.rs
src/test/run-pass/cycle-collection2.rs
src/test/run-pass/cycle-collection4.rs
src/test/run-pass/cycle-collection5.rs
src/test/run-pass/deep-vector.rs
src/test/run-pass/deep-vector2.rs
src/test/run-pass/default-method-simple.rs
src/test/run-pass/do-for-no-args.rs
src/test/run-pass/do-pure.rs
src/test/run-pass/drop-trait-generic.rs
src/test/run-pass/drop-trait.rs
src/test/run-pass/early-vtbl-resolution.rs
src/test/run-pass/empty-tag.rs
src/test/run-pass/explicit-self-objects-box.rs
src/test/run-pass/explicit-self-objects-ext-1.rs
src/test/run-pass/explicit-self-objects-ext-2.rs
src/test/run-pass/explicit-self-objects-ext-3.rs
src/test/run-pass/explicit-self-objects-ext-4.rs
src/test/run-pass/explicit-self-objects-simple.rs
src/test/run-pass/explicit-self-objects-uniq.rs
src/test/run-pass/explicit-self.rs
src/test/run-pass/export-unexported-dep.rs
src/test/run-pass/expr-alt-struct.rs
src/test/run-pass/expr-if-struct.rs
src/test/run-pass/extern-1.rs
src/test/run-pass/fn-assign-managed-to-bare-1.rs
src/test/run-pass/fn-bare-assign.rs
src/test/run-pass/fn-bare-coerce-to-block.rs
src/test/run-pass/fn-bare-coerce-to-shared.rs
src/test/run-pass/fn-bare-item.rs
src/test/run-pass/fn-bare-size.rs
src/test/run-pass/fn-coerce-field.rs
src/test/run-pass/foreign-call-no-runtime.rs
src/test/run-pass/generic-object.rs
src/test/run-pass/impl-implicit-trait.rs
src/test/run-pass/impl-variance.rs
src/test/run-pass/infinite-loops.rs
src/test/run-pass/init-res-into-things.rs
src/test/run-pass/issue-1701.rs
src/test/run-pass/issue-1821.rs
src/test/run-pass/issue-1974.rs
src/test/run-pass/issue-2185.rs
src/test/run-pass/issue-2190-2.rs
src/test/run-pass/issue-2216.rs
src/test/run-pass/issue-2284.rs
src/test/run-pass/issue-2288.rs
src/test/run-pass/issue-2316-c.rs
src/test/run-pass/issue-2487-a.rs
src/test/run-pass/issue-2611.rs
src/test/run-pass/issue-2708.rs
src/test/run-pass/issue-2734.rs
src/test/run-pass/issue-2735-2.rs
src/test/run-pass/issue-2735-3.rs
src/test/run-pass/issue-2735.rs
src/test/run-pass/issue-2895.rs
src/test/run-pass/issue-2904.rs
src/test/run-pass/issue-2935.rs
src/test/run-pass/issue-2936.rs
src/test/run-pass/issue-2989.rs
src/test/run-pass/issue-3211.rs
src/test/run-pass/issue-3220.rs
src/test/run-pass/issue-3305.rs
src/test/run-pass/issue-3461.rs
src/test/run-pass/issue-3480.rs
src/test/run-pass/issue-3683.rs
src/test/run-pass/issue-3753.rs
src/test/run-pass/issue-3794.rs
src/test/run-pass/issue-3860.rs
src/test/run-pass/issue-3979-generics.rs
src/test/run-pass/issue-3979-xcrate.rs
src/test/run-pass/issue-3979.rs
src/test/run-pass/issue-4401.rs
src/test/run-pass/issue-4542.rs
src/test/run-pass/issue-979.rs
src/test/run-pass/kindck-owned-trait-contains-1.rs
src/test/run-pass/lint-structural-records.rs
src/test/run-pass/loop-break-cont-1.rs
src/test/run-pass/loop-break-cont.rs
src/test/run-pass/loop-diverges.rs
src/test/run-pass/max-min-classes.rs
src/test/run-pass/mlist-cycle.rs
src/test/run-pass/mod-merge-hack.rs
src/test/run-pass/mod_file.rs
src/test/run-pass/mod_file_with_path_attr.rs
src/test/run-pass/module-polymorphism3-files/float-template/inst_f32.rs
src/test/run-pass/module-polymorphism3-files/float-template/inst_f64.rs
src/test/run-pass/module-polymorphism3-files/float-template/inst_float.rs
src/test/run-pass/monad.rs
src/test/run-pass/monomorphize-trait-in-fn-at.rs
src/test/run-pass/monomorphized-callees-with-ty-params-3314.rs
src/test/run-pass/morestack1.rs
src/test/run-pass/morestack2.rs
src/test/run-pass/morestack3.rs
src/test/run-pass/morestack4.rs
src/test/run-pass/morestack5.rs
src/test/run-pass/move-nullary-fn.rs
src/test/run-pass/mut-function-arguments.rs
src/test/run-pass/operator-overloading.rs
src/test/run-pass/option-unwrap.rs
src/test/run-pass/propagate-expected-type-through-block.rs
src/test/run-pass/pure-sum.rs
src/test/run-pass/rcvr-borrowed-to-region.rs
src/test/run-pass/rcvr-borrowed-to-slice.rs
src/test/run-pass/recursion.rs
src/test/run-pass/reflect-visit-data.rs
src/test/run-pass/reflect-visit-type.rs
src/test/run-pass/regions-creating-enums2.rs
src/test/run-pass/regions-creating-enums5.rs
src/test/run-pass/regions-infer-call-2.rs
src/test/run-pass/regions-infer-call.rs
src/test/run-pass/regions-infer-contravariance-due-to-ret.rs
src/test/run-pass/regions-infer-contravariance.rs
src/test/run-pass/regions-nullary-variant.rs
src/test/run-pass/regions-self-impls.rs
src/test/run-pass/regions-trait.rs
src/test/run-pass/resource-assign-is-not-copy.rs
src/test/run-pass/resource-cycle.rs
src/test/run-pass/resource-cycle2.rs
src/test/run-pass/resource-cycle3.rs
src/test/run-pass/resource-destruct.rs
src/test/run-pass/resource-generic.rs
src/test/run-pass/resource-in-struct.rs
src/test/run-pass/self-type-param.rs
src/test/run-pass/send-resource.rs
src/test/run-pass/sendable-class.rs
src/test/run-pass/static-impl.rs
src/test/run-pass/static-method-in-trait-with-tps-intracrate.rs
src/test/run-pass/static-method-test.rs
src/test/run-pass/static-methods-in-traits.rs
src/test/run-pass/struct-literal-dtor.rs
src/test/run-pass/structured-compare.rs
src/test/run-pass/tag-variant-disr-val.rs
src/test/run-pass/tag.rs
src/test/run-pass/task-comm-16.rs
src/test/run-pass/task-comm-17.rs
src/test/run-pass/task-killjoin-rsrc.rs
src/test/run-pass/test-ignore-cfg.rs
src/test/run-pass/trait-bounds.rs
src/test/run-pass/trait-cast.rs
src/test/run-pass/trait-default-method-bound-subst.rs
src/test/run-pass/trait-default-method-bound-subst2.rs
src/test/run-pass/trait-default-method-bound-subst3.rs
src/test/run-pass/trait-default-method-bound-subst4.rs
src/test/run-pass/trait-default-method-bound.rs
src/test/run-pass/trait-generic.rs
src/test/run-pass/trait-inheritance-auto-xc-2.rs
src/test/run-pass/trait-inheritance-auto-xc.rs
src/test/run-pass/trait-inheritance-auto.rs
src/test/run-pass/trait-inheritance-call-bound-inherited.rs
src/test/run-pass/trait-inheritance-call-bound-inherited2.rs
src/test/run-pass/trait-inheritance-cast-without-call-to-supertrait.rs
src/test/run-pass/trait-inheritance-cast.rs
src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs
src/test/run-pass/trait-inheritance-cross-trait-call.rs
src/test/run-pass/trait-inheritance-diamond.rs
src/test/run-pass/trait-inheritance-multiple-inheritors.rs
src/test/run-pass/trait-inheritance-multiple-params.rs
src/test/run-pass/trait-inheritance-overloading-simple.rs
src/test/run-pass/trait-inheritance-overloading.rs
src/test/run-pass/trait-inheritance-self.rs
src/test/run-pass/trait-inheritance-simple.rs
src/test/run-pass/trait-inheritance-static.rs
src/test/run-pass/trait-inheritance-static2.rs
src/test/run-pass/trait-inheritance-subst.rs
src/test/run-pass/trait-inheritance-subst2.rs
src/test/run-pass/trait-inheritance-visibility.rs
src/test/run-pass/trait-inheritance2.rs
src/test/run-pass/trait-region-pointer-simple.rs
src/test/run-pass/trait-to-str.rs
src/test/run-pass/trait-typedef-cc.rs
src/test/run-pass/traits-default-method-macro.rs
src/test/run-pass/traits-default-method-self.rs
src/test/run-pass/traits-default-method-trivial.rs
src/test/run-pass/traits.rs
src/test/run-pass/type-param-constraints.rs
src/test/run-pass/typeclasses-eq-example-static.rs
src/test/run-pass/typeclasses-eq-example.rs
src/test/run-pass/unique-alt-discrim.rs
src/test/run-pass/unique-assign-drop.rs
src/test/run-pass/unique-assign.rs
src/test/run-pass/unique-autoderef-field.rs
src/test/run-pass/unique-cmp.rs
src/test/run-pass/unique-create.rs
src/test/run-pass/unique-decl-init.rs
src/test/run-pass/unique-decl-move-temp.rs
src/test/run-pass/unique-decl-move.rs
src/test/run-pass/unique-deref.rs
src/test/run-pass/unique-destructure.rs
src/test/run-pass/unique-fn-arg-move.rs
src/test/run-pass/unique-fn-arg-mut.rs
src/test/run-pass/unique-fn-arg.rs
src/test/run-pass/unique-fn-ret.rs
src/test/run-pass/unique-init.rs
src/test/run-pass/unique-log.rs
src/test/run-pass/unique-move-drop.rs
src/test/run-pass/unique-move-temp.rs
src/test/run-pass/unique-move.rs
src/test/run-pass/unique-mutable.rs
src/test/run-pass/unique-object.rs
src/test/run-pass/unique-pinned-nocopy-2.rs
src/test/run-pass/unique-send-2.rs
src/test/run-pass/unique-send.rs
src/test/run-pass/unique-swap.rs
src/test/run-pass/unused-move.rs
src/test/run-pass/unwind-resource.rs
src/test/run-pass/unwind-resource2.rs
src/test/run-pass/use-trait-before-def.rs
src/test/run-pass/vec-slice-drop.rs

index 1eebb716a5973564cb9ca690fa4d69651e024629..89ffaeff63d935f6b2bb2a9e6b9f446f1e058dce 100644 (file)
@@ -74,7 +74,7 @@ pub fn all_values(blk: fn(v: bool)) {
 pub pure fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
 
 #[cfg(notest)]
-impl bool : cmp::Eq {
+impl cmp::Eq for bool {
     pure fn eq(&self, other: &bool) -> bool { (*self) == (*other) }
     pure fn ne(&self, other: &bool) -> bool { (*self) != (*other) }
 }
index 13e4595a77a802ee528eb88d48103818931e89cc..daff7d116e8447bced8c5a244389e5b30c19c942 100644 (file)
 }
 
 #[cfg(notest)]
-impl char : Eq {
+impl Eq for char {
     pure fn eq(&self, other: &char) -> bool { (*self) == (*other) }
     pure fn ne(&self, other: &char) -> bool { (*self) != (*other) }
 }
index 7b66c7c934b2b81d655b4c7c53ffad55060eb8f8..6580ce55ddd66dda39b5e1b9ca99ca8a42bc769e 100644 (file)
@@ -15,7 +15,7 @@ pub trait Clone {
     fn clone(&self) -> Self;
 }
 
-impl (): Clone {
+impl Clone for () {
     #[inline(always)]
     fn clone(&self) -> () { () }
 }
index fb44ff4514d8cd7baca67f1e88a24780d6487ede..a7c8c1f4d66001aed32f3947d9838f755d6e91b3 100644 (file)
@@ -84,7 +84,7 @@ struct Guard<T, U> {
     cond: &Condition<T, U>
 }
 
-impl<T, U> Guard<T, U> : Drop {
+impl<T, U> Drop for Guard<T, U> {
     fn finalize(&self) {
         unsafe {
             debug!("Guard: popping handler from TLS");
index b0c33dc6f2601a351264a192119ef96feaf545a3..0a96bd633d1eff930cc9e6e75b471ec8c0aefdcf 100644 (file)
@@ -358,7 +358,7 @@ fn rev_eachi(f: fn(uint, v: &A) -> bool) {
     }
 }
 
-impl<A:Copy> DVec<A>: Index<uint,A> {
+impl<A:Copy> Index<uint,A> for DVec<A> {
     #[inline(always)]
     pure fn index(&self, idx: uint) -> A {
         self.get_elt(idx)
index 4e391d6ee0052965d66ba990c6d93fc81fb4bd20..b4f4e7d343b0a2a0f43ecf6183ba7e689a71c375 100644 (file)
@@ -59,7 +59,7 @@ pub trait HashUtil {
     pure fn hash() -> u64;
 }
 
-impl <A: Hash> A: HashUtil {
+impl<A: Hash> HashUtil for A {
     #[inline(always)]
     pure fn hash() -> u64 { self.hash_keyed(0,0) }
 }
@@ -74,7 +74,7 @@ pub trait Streaming {
     fn reset();
 }
 
-impl <A: IterBytes> A: Hash {
+impl<A: IterBytes> Hash for A {
     #[inline(always)]
     pure fn hash_keyed(k0: u64, k1: u64) -> u64 {
         unsafe {
@@ -187,7 +187,7 @@ fn SipState(key0: u64, key1: u64) -> SipState {
 }
 
 
-impl SipState : io::Writer {
+impl io::Writer for SipState {
 
     // Methods for io::writer
     #[inline(always)]
@@ -295,7 +295,7 @@ fn get_type(&self) -> io::WriterType {
     }
 }
 
-impl &SipState : Streaming {
+impl Streaming for &SipState {
 
     #[inline(always)]
     fn input(buf: &[const u8]) {
index fc117f99e9087389598d7e16b66825c8c3439a03..1e9f05a35ebdc577650baafb4b66b1dba24797ac 100644 (file)
@@ -240,7 +240,7 @@ fn search(&self, hash: uint,
         }
     }
 
-    impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: BaseIter<(&K, &V)> {
+    impl<K: Hash IterBytes Eq, V> BaseIter<(&K, &V)> for LinearMap<K, V> {
         /// Visit all key-value pairs
         pure fn each(&self, blk: fn(&(&self/K, &self/V)) -> bool) {
             for uint::range(0, self.buckets.len()) |i| {
@@ -257,7 +257,7 @@ impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: BaseIter<(&K, &V)> {
     }
 
 
-    impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: Container {
+    impl<K: Hash IterBytes Eq, V> Container for LinearMap<K, V> {
         /// Return the number of elements in the map
         pure fn len(&self) -> uint { self.size }
 
@@ -265,7 +265,7 @@ impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: Container {
         pure fn is_empty(&self) -> bool { self.len() == 0 }
     }
 
-    impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: Mutable {
+    impl<K: Hash IterBytes Eq, V> Mutable for LinearMap<K, V> {
         /// Clear the map, removing all key-value pairs.
         fn clear(&mut self) {
             for uint::range(0, self.buckets.len()) |idx| {
@@ -275,7 +275,7 @@ fn clear(&mut self) {
         }
     }
 
-    impl <K: Hash IterBytes Eq, V> LinearMap<K, V>: Map<K, V> {
+    impl<K: Hash IterBytes Eq, V> Map<K, V> for LinearMap<K, V> {
         /// Return true if the map contains a value for the specified key
         pure fn contains_key(&self, k: &K) -> bool {
             match self.bucket_for_key(k) {
@@ -443,7 +443,7 @@ fn consume(&mut self, f: fn(K, V)) {
         }
     }
 
-    impl<K: Hash IterBytes Eq, V: Eq> LinearMap<K, V>: Eq {
+    impl<K: Hash IterBytes Eq, V: Eq> Eq for LinearMap<K, V> {
         pure fn eq(&self, other: &LinearMap<K, V>) -> bool {
             if self.len() != other.len() { return false; }
 
@@ -464,13 +464,13 @@ pub struct LinearSet<T> {
         priv map: LinearMap<T, ()>
     }
 
-    impl <T: Hash IterBytes Eq> LinearSet<T>: BaseIter<T> {
+    impl<T: Hash IterBytes Eq> BaseIter<T> for LinearSet<T> {
         /// Visit all values in order
         pure fn each(&self, f: fn(&T) -> bool) { self.map.each_key(f) }
         pure fn size_hint(&self) -> Option<uint> { Some(self.len()) }
     }
 
-    impl <T: Hash IterBytes Eq> LinearSet<T>: Eq {
+    impl<T: Hash IterBytes Eq> Eq for LinearSet<T> {
         pure fn eq(&self, other: &LinearSet<T>) -> bool {
             self.map == other.map
         }
@@ -479,7 +479,7 @@ impl <T: Hash IterBytes Eq> LinearSet<T>: Eq {
         }
     }
 
-    impl <T: Hash IterBytes Eq> LinearSet<T>: Container {
+    impl<T: Hash IterBytes Eq> Container for LinearSet<T> {
         /// Return the number of elements in the set
         pure fn len(&self) -> uint { self.map.len() }
 
@@ -487,12 +487,12 @@ impl <T: Hash IterBytes Eq> LinearSet<T>: Container {
         pure fn is_empty(&self) -> bool { self.map.is_empty() }
     }
 
-    impl <T: Hash IterBytes Eq> LinearSet<T>: Mutable {
+    impl<T: Hash IterBytes Eq> Mutable for LinearSet<T> {
         /// Clear the set, removing all values.
         fn clear(&mut self) { self.map.clear() }
     }
 
-    impl <T: Hash IterBytes Eq> LinearSet<T>: Set<T> {
+    impl<T: Hash IterBytes Eq> Set<T> for LinearSet<T> {
         /// Return true if the set contains a value
         pure fn contains(&self, value: &T) -> bool {
             self.map.contains_key(value)
index 571d9344243a4e6069f5016ca57a568ec1ec4d5d..2173efe5ac66fc9e0dd554121625de571b142b62 100644 (file)
@@ -169,7 +169,7 @@ pub trait ReaderUtil {
     fn read_i8(&self) -> i8;
 }
 
-impl<T: Reader> T : ReaderUtil {
+impl<T: Reader> ReaderUtil for T {
 
     fn read_bytes(&self,len: uint) -> ~[u8] {
         let mut bytes = vec::with_capacity(len);
@@ -415,7 +415,7 @@ fn convert_whence(whence: SeekStyle) -> i32 {
     };
 }
 
-impl *libc::FILE: Reader {
+impl Reader for *libc::FILE {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         unsafe {
             do vec::as_mut_buf(bytes) |buf_p, buf_len| {
@@ -460,7 +460,7 @@ struct Wrapper<T, C> {
 // A forwarding impl of reader that also holds on to a resource for the
 // duration of its lifetime.
 // FIXME there really should be a better way to do this // #2004
-impl<R: Reader, C> Wrapper<R, C>: Reader {
+impl<R: Reader, C> Reader for Wrapper<R, C> {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         self.base.read(bytes, len)
     }
@@ -527,7 +527,7 @@ pub struct BytesReader {
     mut pos: uint
 }
 
-impl BytesReader: Reader {
+impl Reader for BytesReader {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         let count = uint::min(len, self.bytes.len() - self.pos);
 
@@ -589,7 +589,7 @@ pub trait Writer {
     fn get_type(&self) -> WriterType;
 }
 
-impl<W: Writer, C> Wrapper<W, C>: Writer {
+impl<W: Writer, C> Writer for Wrapper<W, C> {
     fn write(&self, bs: &[const u8]) { self.base.write(bs); }
     fn seek(&self, off: int, style: SeekStyle) { self.base.seek(off, style); }
     fn tell(&self) -> uint { self.base.tell() }
@@ -597,7 +597,7 @@ fn flush(&self) -> int { self.base.flush() }
     fn get_type(&self) -> WriterType { File }
 }
 
-impl *libc::FILE: Writer {
+impl Writer for *libc::FILE {
     fn write(&self, v: &[const u8]) {
         unsafe {
             do vec::as_const_buf(v) |vbuf, len| {
@@ -647,7 +647,7 @@ pub fn FILE_writer(f: *libc::FILE, cleanup: bool) -> Writer {
     }
 }
 
-impl fd_t: Writer {
+impl Writer for fd_t {
     fn write(&self, v: &[const u8]) {
         unsafe {
             let mut count = 0u;
@@ -890,7 +890,7 @@ pub trait WriterUtil {
     fn write_i8(&self, n: i8);
 }
 
-impl<T: Writer> T : WriterUtil {
+impl<T: Writer> WriterUtil for T {
     fn write_char(&self, ch: char) {
         if ch as uint < 128u {
             self.write(&[ch as u8]);
@@ -996,7 +996,7 @@ pub struct BytesWriter {
     mut pos: uint,
 }
 
-impl BytesWriter: Writer {
+impl Writer for BytesWriter {
     fn write(&self, v: &[const u8]) {
         do self.bytes.swap |bytes| {
             let mut bytes = move bytes;
@@ -1112,7 +1112,7 @@ pub struct Res<t> {
         arg: Arg<t>,
     }
 
-    impl<T: Copy> Res<T>: Drop {
+    impl<T: Copy> Drop for Res<T> {
         fn finalize(&self) {
           match self.arg.opt_level {
             None => (),
index df2aa6271d1f839cbb8dd4e76d20a8740a37fb19..7c2b5d7ffcd40b639c7961a017d64dcb0c101335 100644 (file)
 
 use self::inst::{IMPL_T, EACH, SIZE_HINT};
 
-impl<A> IMPL_T<A>: iter::BaseIter<A> {
+impl<A> iter::BaseIter<A> for IMPL_T<A> {
     #[inline(always)]
     pure fn each(&self, blk: fn(v: &A) -> bool) { EACH(self, blk) }
     #[inline(always)]
     pure fn size_hint(&self) -> Option<uint> { SIZE_HINT(self) }
 }
 
-impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
+impl<A> iter::ExtendedIter<A> for IMPL_T<A> {
     #[inline(always)]
     pure fn eachi(&self, blk: fn(uint, v: &A) -> bool) {
         iter::eachi(self, blk)
@@ -60,14 +60,14 @@ impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
 
 }
 
-impl<A: Eq> IMPL_T<A>: iter::EqIter<A> {
+impl<A: Eq> iter::EqIter<A> for IMPL_T<A> {
     #[inline(always)]
     pure fn contains(&self, x: &A) -> bool { iter::contains(self, x) }
     #[inline(always)]
     pure fn count(&self, x: &A) -> uint { iter::count(self, x) }
 }
 
-impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {
+impl<A: Copy> iter::CopyableIter<A> for IMPL_T<A> {
     #[inline(always)]
     pure fn filter_to_vec(&self, pred: fn(&A) -> bool) -> ~[A] {
         iter::filter_to_vec(self, pred)
@@ -80,7 +80,7 @@ impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {
     }
 }
 
-impl<A: Copy Ord> IMPL_T<A>: iter::CopyableOrderedIter<A> {
+impl<A: Copy Ord> iter::CopyableOrderedIter<A> for IMPL_T<A> {
     #[inline(always)]
     pure fn min(&self) -> A { iter::min(self) }
     #[inline(always)]
index 7cb20f7b44e9ebd3f0f943ad9cb90aebdc6debbd..0f13a8485afdb4814a2b52234b2f03895cabd264 100644 (file)
@@ -46,7 +46,7 @@ pub struct BoxRepr {
 }
 
 #[cfg(notest)]
-impl<T:Eq> @const T : Eq {
+impl<T:Eq> Eq for @const T {
     #[inline(always)]
     pure fn eq(&self, other: &@const T) -> bool { *(*self) == *(*other) }
     #[inline(always)]
@@ -54,7 +54,7 @@ impl<T:Eq> @const T : Eq {
 }
 
 #[cfg(notest)]
-impl<T:Ord> @const T : Ord {
+impl<T:Ord> Ord for @const T {
     #[inline(always)]
     pure fn lt(&self, other: &@const T) -> bool { *(*self) < *(*other) }
     #[inline(always)]
index 8f03a1b6e3498cd2a7091a44706f0f5f73ee1ef3..62ed1d24d790ee379849cf69a6b1ac080105ce40 100644 (file)
@@ -17,7 +17,7 @@
 use cmp::{Eq, Ord};
 
 #[cfg(notest)]
-impl () : Eq {
+impl Eq for () {
     #[inline(always)]
     pure fn eq(&self, _other: &()) -> bool { true }
     #[inline(always)]
@@ -25,7 +25,7 @@ impl () : Eq {
 }
 
 #[cfg(notest)]
-impl () : Ord {
+impl Ord for () {
     #[inline(always)]
     pure fn lt(&self, _other: &()) -> bool { false }
     #[inline(always)]
index d27393fe50783c683d75d4ef3f9657592813906e..8350ba42591d75a092abb2dc638f7132449099a4 100644 (file)
@@ -253,7 +253,7 @@ pub mod consts {
 }
 
 #[cfg(notest)]
-impl f32 : cmp::Eq {
+impl cmp::Eq for f32 {
     #[inline(always)]
     pure fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
     #[inline(always)]
@@ -261,7 +261,7 @@ impl f32 : cmp::Eq {
 }
 
 #[cfg(notest)]
-impl f32 : cmp::Ord {
+impl cmp::Ord for f32 {
     #[inline(always)]
     pure fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
     #[inline(always)]
@@ -272,12 +272,12 @@ impl f32 : cmp::Ord {
     pure fn gt(&self, other: &f32) -> bool { (*self) > (*other) }
 }
 
-impl f32: num::Zero {
+impl num::Zero for f32 {
     #[inline(always)]
     static pure fn zero() -> f32 { 0.0 }
 }
 
-impl f32: num::One {
+impl num::One for f32 {
     #[inline(always)]
     static pure fn one() -> f32 { 1.0 }
 }
@@ -336,7 +336,7 @@ impl ops::Neg<f32> for f32 {
     fn floorf32(val: f32) -> f32;
 }
 
-impl f32: num::Round {
+impl num::Round for f32 {
     #[inline(always)]
     pure fn round(&self, mode: num::RoundMode) -> f32 {
         match mode {
@@ -464,12 +464,12 @@ impl f32: num::Round {
     r
 }
 
-impl f32: to_str::ToStr {
+impl to_str::ToStr for f32 {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { to_str_digits(*self, 8) }
 }
 
-impl f32: num::ToStrRadix {
+impl num::ToStrRadix for f32 {
     #[inline(always)]
     pure fn to_str_radix(&self, rdx: uint) -> ~str {
         to_str_radix(*self, rdx)
@@ -564,12 +564,12 @@ impl f32: num::ToStrRadix {
     num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
 }
 
-impl f32: from_str::FromStr {
+impl from_str::FromStr for f32 {
     #[inline(always)]
     static pure fn from_str(val: &str) -> Option<f32> { from_str(val) }
 }
 
-impl f32: num::FromStrRadix {
+impl num::FromStrRadix for f32 {
     #[inline(always)]
     static pure fn from_str_radix(val: &str, rdx: uint) -> Option<f32> {
         from_str_radix(val, rdx)
index d189a0254eba8710280222b03e17b0491e0b6f92..474067a1860c8673414ea23985a7f345532c7df4 100644 (file)
@@ -278,7 +278,7 @@ pub mod consts {
 }
 
 #[cfg(notest)]
-impl f64 : cmp::Eq {
+impl cmp::Eq for f64 {
     #[inline(always)]
     pure fn eq(&self, other: &f64) -> bool { (*self) == (*other) }
     #[inline(always)]
@@ -286,7 +286,7 @@ impl f64 : cmp::Eq {
 }
 
 #[cfg(notest)]
-impl f64 : cmp::Ord {
+impl cmp::Ord for f64 {
     #[inline(always)]
     pure fn lt(&self, other: &f64) -> bool { (*self) < (*other) }
     #[inline(always)]
@@ -321,12 +321,12 @@ pub impl f64: NumCast {
     #[inline(always)] pure fn to_float(&self) -> float { *self as float }
 }
 
-impl f64: num::Zero {
+impl num::Zero for f64 {
     #[inline(always)]
     static pure fn zero() -> f64 { 0.0 }
 }
 
-impl f64: num::One {
+impl num::One for f64 {
     #[inline(always)]
     static pure fn one() -> f64 { 1.0 }
 }
@@ -361,7 +361,7 @@ impl ops::Neg<f64> for f64 {
     fn floorf64(val: f64) -> f64;
 }
 
-impl f64: num::Round {
+impl num::Round for f64 {
     #[inline(always)]
     pure fn round(&self, mode: num::RoundMode) -> f64 {
         match mode {
@@ -489,12 +489,12 @@ impl f64: num::Round {
     r
 }
 
-impl f64: to_str::ToStr {
+impl to_str::ToStr for f64 {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { to_str_digits(*self, 8) }
 }
 
-impl f64: num::ToStrRadix {
+impl num::ToStrRadix for f64 {
     #[inline(always)]
     pure fn to_str_radix(&self, rdx: uint) -> ~str {
         to_str_radix(*self, rdx)
@@ -589,12 +589,12 @@ impl f64: num::ToStrRadix {
     num::from_str_common(num, rdx, true, true, false, num::ExpNone, false)
 }
 
-impl f64: from_str::FromStr {
+impl from_str::FromStr for f64 {
     #[inline(always)]
     static pure fn from_str(val: &str) -> Option<f64> { from_str(val) }
 }
 
-impl f64: num::FromStrRadix {
+impl num::FromStrRadix for f64 {
     #[inline(always)]
     static pure fn from_str_radix(val: &str, rdx: uint) -> Option<f64> {
         from_str_radix(val, rdx)
index bbea58f5cf5dcd15700e271b00ed3c6d08e983a6..0f0b721e4626a51c42d05a993ca1860341055b38 100644 (file)
@@ -201,12 +201,12 @@ pub fn test_to_str_exact_do_decimal() {
     r
 }
 
-impl float: to_str::ToStr {
+impl to_str::ToStr for float {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { to_str_digits(*self, 8) }
 }
 
-impl float: num::ToStrRadix {
+impl num::ToStrRadix for float {
     #[inline(always)]
     pure fn to_str_radix(&self, radix: uint) -> ~str {
         to_str_radix(*self, radix)
@@ -301,12 +301,12 @@ impl float: num::ToStrRadix {
     num::from_str_common(num, radix, true, true, false, num::ExpNone, false)
 }
 
-impl float: from_str::FromStr {
+impl from_str::FromStr for float {
     #[inline(always)]
     static pure fn from_str(val: &str) -> Option<float> { from_str(val) }
 }
 
-impl float: num::FromStrRadix {
+impl num::FromStrRadix for float {
     #[inline(always)]
     static pure fn from_str_radix(val: &str, radix: uint) -> Option<float> {
         from_str_radix(val, radix)
@@ -392,25 +392,25 @@ impl float: num::FromStrRadix {
 }
 
 #[cfg(notest)]
-impl float : Eq {
+impl Eq for float {
     pure fn eq(&self, other: &float) -> bool { (*self) == (*other) }
     pure fn ne(&self, other: &float) -> bool { (*self) != (*other) }
 }
 
 #[cfg(notest)]
-impl float : Ord {
+impl Ord for float {
     pure fn lt(&self, other: &float) -> bool { (*self) < (*other) }
     pure fn le(&self, other: &float) -> bool { (*self) <= (*other) }
     pure fn ge(&self, other: &float) -> bool { (*self) >= (*other) }
     pure fn gt(&self, other: &float) -> bool { (*self) > (*other) }
 }
 
-impl float: num::Zero {
+impl num::Zero for float {
     #[inline(always)]
     static pure fn zero() -> float { 0.0 }
 }
 
-impl float: num::One {
+impl num::One for float {
     #[inline(always)]
     static pure fn one() -> float { 1.0 }
 }
@@ -439,7 +439,7 @@ pub impl float: NumCast {
     #[inline(always)] pure fn to_float(&self) -> float { *self          }
 }
 
-impl float: num::Round {
+impl num::Round for float {
     #[inline(always)]
     pure fn round(&self, mode: num::RoundMode) -> float {
         match mode {
index c25938a187fda14100ec57c6cd8d56758db48739..eaaa78b84f83772f2f28c8b2247e58348cc3a60d 100644 (file)
 }
 
 #[cfg(notest)]
-impl T : Ord {
+impl Ord for T {
     #[inline(always)]
     pure fn lt(&self, other: &T) -> bool { return (*self) < (*other); }
     #[inline(always)]
@@ -159,24 +159,24 @@ impl T : Ord {
 }
 
 #[cfg(notest)]
-impl T : Eq {
+impl Eq for T {
     #[inline(always)]
     pure fn eq(&self, other: &T) -> bool { return (*self) == (*other); }
     #[inline(always)]
     pure fn ne(&self, other: &T) -> bool { return (*self) != (*other); }
 }
 
-impl T: num::Zero {
+impl num::Zero for T {
     #[inline(always)]
     static pure fn zero() -> T { 0 }
 }
 
-impl T: num::One {
+impl num::One for T {
     #[inline(always)]
     static pure fn one() -> T { 1 }
 }
 
-impl T: num::Round {
+impl num::Round for T {
     #[inline(always)]
     pure fn round(&self, _: num::RoundMode) -> T { *self }
 
@@ -236,14 +236,14 @@ impl ops::Neg<T> for T {
                                num::ExpNone, false)
 }
 
-impl T : FromStr {
+impl FromStr for T {
     #[inline(always)]
     static pure fn from_str(s: &str) -> Option<T> {
         from_str(s)
     }
 }
 
-impl T : FromStrRadix {
+impl FromStrRadix for T {
     #[inline(always)]
     static pure fn from_str_radix(&self, s: &str, radix: uint) -> Option<T> {
         from_str_radix(s, radix)
@@ -281,14 +281,14 @@ impl T : FromStrRadix {
 #[inline(always)]
 pub pure fn str(i: T) -> ~str { to_str(i) }
 
-impl T : ToStr {
+impl ToStr for T {
     #[inline(always)]
     pure fn to_str(&self) -> ~str {
         to_str(*self)
     }
 }
 
-impl T : ToStrRadix {
+impl ToStrRadix for T {
     #[inline(always)]
     pure fn to_str_radix(&self, radix: uint) -> ~str {
         to_str_radix(*self, radix)
index 572cce92ea1d71eaa81557edfb2c79daa079d374..76725e3895b559fbce148a1aac350d1216b5f5d9 100644 (file)
@@ -84,4 +84,4 @@ fn test_numcast() {
     assert (20i16 == num::cast(20f));
     assert (20i16 == num::cast(20f32));
     assert (20i16 == num::cast(20f64));
-}
\ No newline at end of file
+}
index de2e467d02ab1848781f5aaddd8380420e6aa24c..1c2d60a80ee2bf504a765f7fa4a81bc6529c7a1c 100644 (file)
@@ -84,4 +84,4 @@ fn test_numcast() {
     assert (20i32 == num::cast(20f));
     assert (20i32 == num::cast(20f32));
     assert (20i32 == num::cast(20f64));
-}
\ No newline at end of file
+}
index adfd50e20e7910a06759044dc26d37ef9c810d71..b1ef3f11fa4e134b9a441f8a8592828db82af1fd 100644 (file)
 }
 
 #[cfg(notest)]
-impl T : Ord {
+impl Ord for T {
     #[inline(always)]
     pure fn lt(&self, other: &T) -> bool { (*self) < (*other) }
     #[inline(always)]
@@ -123,24 +123,24 @@ impl T : Ord {
 }
 
 #[cfg(notest)]
-impl T : Eq {
+impl Eq for T {
     #[inline(always)]
     pure fn eq(&self, other: &T) -> bool { return (*self) == (*other); }
     #[inline(always)]
     pure fn ne(&self, other: &T) -> bool { return (*self) != (*other); }
 }
 
-impl T: num::Zero {
+impl num::Zero for T {
     #[inline(always)]
     static pure fn zero() -> T { 0 }
 }
 
-impl T: num::One {
+impl num::One for T {
     #[inline(always)]
     static pure fn one() -> T { 1 }
 }
 
-impl T: num::Round {
+impl num::Round for T {
     #[inline(always)]
     pure fn round(&self, _: num::RoundMode) -> T { *self }
 
@@ -200,14 +200,14 @@ impl ops::Neg<T> for T {
                                num::ExpNone, false)
 }
 
-impl T : FromStr {
+impl FromStr for T {
     #[inline(always)]
     static pure fn from_str(s: &str) -> Option<T> {
         from_str(s)
     }
 }
 
-impl T : FromStrRadix {
+impl FromStrRadix for T {
     #[inline(always)]
     static pure fn from_str_radix(&self, s: &str, radix: uint) -> Option<T> {
         from_str_radix(s, radix)
@@ -245,14 +245,14 @@ impl T : FromStrRadix {
 #[inline(always)]
 pub pure fn str(i: T) -> ~str { to_str(i) }
 
-impl T : ToStr {
+impl ToStr for T {
     #[inline(always)]
     pure fn to_str(&self) -> ~str {
         to_str(*self)
     }
 }
 
-impl T : ToStrRadix {
+impl ToStrRadix for T {
     #[inline(always)]
     pure fn to_str_radix(&self, radix: uint) -> ~str {
         to_str_radix(*self, radix)
index e2e8e2bc9fce206fca9f779680d78c0035f20a04..57e1f5283f6641a47c5a6fcea8cfda8c598f7056 100644 (file)
@@ -86,4 +86,4 @@ fn test_numcast() {
     assert (20u16 == num::cast(20f));
     assert (20u16 == num::cast(20f32));
     assert (20u16 == num::cast(20f64));
-}
\ No newline at end of file
+}
index ac2727bff0996d697f5396a964b7b2c764022515..7099d15c40b49e0bb0d4ea08982fc352f7786274 100644 (file)
@@ -86,4 +86,4 @@ fn test_numcast() {
     assert (20u64 == num::cast(20f));
     assert (20u64 == num::cast(20f32));
     assert (20u64 == num::cast(20f64));
-}
\ No newline at end of file
+}
index 345f81c147c778772f88abcaa48c70cfdd7e9859..f4d1482de905f585bc304a180c79445274009d30 100644 (file)
@@ -86,4 +86,4 @@ fn test_numcast() {
     assert (20u64 == num::cast(20f));
     assert (20u64 == num::cast(20f32));
     assert (20u64 == num::cast(20f64));
-}
\ No newline at end of file
+}
index 71be36d90196148564e7c9e0c73cfb4adb83c8e8..e2f8e00db81972e4687a202516105dcc27e44017 100644 (file)
@@ -93,4 +93,4 @@ fn test_numcast() {
     assert (20u8 == num::cast(20f));
     assert (20u8 == num::cast(20f32));
     assert (20u8 == num::cast(20f64));
-}
\ No newline at end of file
+}
index 66689f18dfe9986b4687a9c7dd91c44e3c4d70e6..cfb445cbdc8786a80b7778100811a1ded8b129b8 100644 (file)
@@ -276,4 +276,4 @@ fn test_numcast() {
     assert (20u == num::cast(20f));
     assert (20u == num::cast(20f32));
     assert (20u == num::cast(20f64));
-}
\ No newline at end of file
+}
index d841188501d967756a2cc9e297d59a7369e45666..230386655e08e9cae315281f65b9977d6cc622df 100644 (file)
@@ -13,7 +13,7 @@
 use cmp::{Eq, Ord};
 
 #[cfg(notest)]
-impl<T:Eq> ~const T : Eq {
+impl<T:Eq> Eq for ~const T {
     #[inline(always)]
     pure fn eq(&self, other: &~const T) -> bool { *(*self) == *(*other) }
     #[inline(always)]
@@ -21,7 +21,7 @@ impl<T:Eq> ~const T : Eq {
 }
 
 #[cfg(notest)]
-impl<T:Ord> ~const T : Ord {
+impl<T:Ord> Ord for ~const T {
     #[inline(always)]
     pure fn lt(&self, other: &~const T) -> bool { *(*self) < *(*other) }
     #[inline(always)]
index bf1f1c713a9945be7638f94e0ae927760dce43df..91690b6b5b0b220e502baade4890472221789200 100644 (file)
@@ -363,7 +363,7 @@ fn get_ctime(&self) -> Option<(i64, int)> {
     }
 }
 
-impl PosixPath : ToStr {
+impl ToStr for PosixPath {
     pure fn to_str(&self) -> ~str {
         let mut s = ~"";
         if self.is_absolute {
@@ -375,7 +375,7 @@ impl PosixPath : ToStr {
 
 // FIXME (#3227): when default methods in traits are working, de-duplicate
 // PosixPath and WindowsPath, most of their methods are common.
-impl PosixPath : GenericPath {
+impl GenericPath for PosixPath {
 
     static pure fn from_str(s: &str) -> PosixPath {
         let mut components = str::split_nonempty(s, |c| c == '/');
@@ -526,7 +526,7 @@ impl PosixPath : GenericPath {
 }
 
 
-impl WindowsPath : ToStr {
+impl ToStr for WindowsPath {
     pure fn to_str(&self) -> ~str {
         let mut s = ~"";
         match self.host {
@@ -545,7 +545,7 @@ impl WindowsPath : ToStr {
 }
 
 
-impl WindowsPath : GenericPath {
+impl GenericPath for WindowsPath {
 
     static pure fn from_str(s: &str) -> WindowsPath {
         let host;
index 7964b081e4902d51c4ade91b5e51606da047d0f9..a26a6b5f8ec3d1a3f102ee5f7f7d000a3a9cb6c9 100644 (file)
@@ -112,7 +112,7 @@ enum State {
     Terminated
 }
 
-impl State : Eq {
+impl Eq for State {
     pure fn eq(&self, other: &State) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
@@ -207,7 +207,7 @@ pub trait HasBuffer {
     fn set_buffer(b: *libc::c_void);
 }
 
-impl<T: Owned> Packet<T>: HasBuffer {
+impl<T: Owned> HasBuffer for Packet<T> {
     fn set_buffer(b: *libc::c_void) {
         self.header.buffer = b;
     }
@@ -561,7 +561,7 @@ struct DropState {
     }
 }
 
-impl<T: Owned, Tb: Owned> RecvPacketBuffered<T, Tb>: Peekable<T> {
+impl<T: Owned, Tb: Owned> Peekable<T> for RecvPacketBuffered<T, Tb> {
     pure fn peek() -> bool {
         peek(&self)
     }
@@ -734,7 +734,7 @@ trait Selectable {
     pure fn header() -> *PacketHeader;
 }
 
-impl *PacketHeader: Selectable {
+impl Selectable for *PacketHeader {
     pure fn header() -> *PacketHeader { self }
 }
 
@@ -783,7 +783,7 @@ pub struct SendPacketBuffered<T, Tbuffer> {
     mut buffer: Option<BufferResource<Tbuffer>>,
 }
 
-impl<T:Owned,Tbuffer:Owned> SendPacketBuffered<T,Tbuffer> : ::ops::Drop {
+impl<T:Owned,Tbuffer:Owned> ::ops::Drop for SendPacketBuffered<T,Tbuffer> {
     fn finalize(&self) {
         //if self.p != none {
         //    debug!("drop send %?", option::get(self.p));
@@ -852,7 +852,7 @@ pub struct RecvPacketBuffered<T, Tbuffer> {
     mut buffer: Option<BufferResource<Tbuffer>>,
 }
 
-impl<T:Owned, Tbuffer:Owned> RecvPacketBuffered<T,Tbuffer> : ::ops::Drop {
+impl<T:Owned, Tbuffer:Owned> ::ops::Drop for RecvPacketBuffered<T,Tbuffer> {
     fn finalize(&self) {
         //if self.p != none {
         //    debug!("drop recv %?", option::get(self.p));
@@ -884,7 +884,7 @@ fn reuse_buffer() -> BufferResource<Tbuffer> {
     }
 }
 
-impl<T: Owned, Tbuffer: Owned> RecvPacketBuffered<T, Tbuffer> : Selectable {
+impl<T: Owned, Tbuffer: Owned> Selectable for RecvPacketBuffered<T, Tbuffer> {
     pure fn header() -> *PacketHeader {
         match self.p {
           Some(packet) => unsafe {
@@ -1036,7 +1036,7 @@ pub fn stream<T:Owned>() -> (Port<T>, Chan<T>) {
     (Port_(Port_ { endp: Some(s) }), Chan_(Chan_{ endp: Some(c) }))
 }
 
-impl<T: Owned> Chan<T>: GenericChan<T> {
+impl<T: Owned> GenericChan<T> for Chan<T> {
     fn send(x: T) {
         let mut endp = None;
         endp <-> self.endp;
@@ -1045,7 +1045,7 @@ fn send(x: T) {
     }
 }
 
-impl<T: Owned> Chan<T>: GenericSmartChan<T> {
+impl<T: Owned> GenericSmartChan<T> for Chan<T> {
 
     fn try_send(x: T) -> bool {
         let mut endp = None;
@@ -1060,7 +1060,7 @@ fn try_send(x: T) -> bool {
     }
 }
 
-impl<T: Owned> Port<T>: GenericPort<T> {
+impl<T: Owned> GenericPort<T> for Port<T> {
     fn recv() -> T {
         let mut endp = None;
         endp <-> self.endp;
@@ -1082,7 +1082,7 @@ fn try_recv() -> Option<T> {
     }
 }
 
-impl<T: Owned> Port<T>: Peekable<T> {
+impl<T: Owned> Peekable<T> for Port<T> {
     pure fn peek() -> bool {
         unsafe {
             let mut endp = None;
@@ -1097,7 +1097,7 @@ impl<T: Owned> Port<T>: Peekable<T> {
     }
 }
 
-impl<T: Owned> Port<T>: Selectable {
+impl<T: Owned> Selectable for Port<T> {
     pure fn header() -> *PacketHeader {
         unsafe {
             match self.endp {
@@ -1132,7 +1132,7 @@ fn chan() -> Chan<T> {
     }
 }
 
-impl<T: Owned> PortSet<T> : GenericPort<T> {
+impl<T: Owned> GenericPort<T> for PortSet<T> {
 
     fn try_recv() -> Option<T> {
         let mut result = None;
@@ -1162,7 +1162,7 @@ fn recv() -> T {
 
 }
 
-impl<T: Owned> PortSet<T> : Peekable<T> {
+impl<T: Owned> Peekable<T> for PortSet<T> {
     pure fn peek() -> bool {
         // It'd be nice to use self.port.each, but that version isn't
         // pure.
@@ -1176,7 +1176,7 @@ impl<T: Owned> PortSet<T> : Peekable<T> {
 /// A channel that can be shared between many senders.
 pub type SharedChan<T> = private::Exclusive<Chan<T>>;
 
-impl<T: Owned> SharedChan<T>: GenericChan<T> {
+impl<T: Owned> GenericChan<T> for SharedChan<T> {
     fn send(x: T) {
         let mut xx = Some(move x);
         do self.with_imm |chan| {
@@ -1187,7 +1187,7 @@ fn send(x: T) {
     }
 }
 
-impl<T: Owned> SharedChan<T>: GenericSmartChan<T> {
+impl<T: Owned> GenericSmartChan<T> for SharedChan<T> {
     fn try_send(x: T) -> bool {
         let mut xx = Some(move x);
         do self.with_imm |chan| {
index e6ced90c0d3d9a9b3f00a5684fe4fa1fbcfd9326..9df31bbd81f2c81ac7af9a89509e7c1f3b637256 100644 (file)
@@ -291,7 +291,7 @@ pub unsafe fn clone_shared_mutable_state<T: Owned>(rc: &SharedMutableState<T>)
     ArcDestruct((*rc).data)
 }
 
-impl<T: Owned> SharedMutableState<T>: Clone {
+impl<T: Owned> Clone for SharedMutableState<T> {
     fn clone(&self) -> SharedMutableState<T> {
         unsafe {
             clone_shared_mutable_state(self)
@@ -360,7 +360,7 @@ pub fn exclusive<T:Owned >(user_data: T) -> Exclusive<T> {
     Exclusive { x: unsafe { shared_mutable_state(move data) } }
 }
 
-impl<T: Owned> Exclusive<T>: Clone {
+impl<T: Owned> Clone for Exclusive<T> {
     // Duplicate an exclusive ARC, as std::arc::clone.
     fn clone(&self) -> Exclusive<T> {
         Exclusive { x: unsafe { clone_shared_mutable_state(&self.x) } }
index a87301dbe07bb8235fc6e5dfd36afb0758de7c14..d80631a29ee60b8f6613c03d1bc962ec672b4383 100644 (file)
@@ -95,4 +95,4 @@ fn test_at_exit_many() {
             assert j > i;
         }
     }
-}
\ No newline at end of file
+}
index 30a309e80b0496dc3ae94051705333ceb71c99dc..af7197159ca8da87fe429971375fb69821ef0d78 100644 (file)
@@ -39,7 +39,7 @@ pub trait Finally<T> {
 }
 
 #[cfg(stage0)]
-impl<T> &fn() -> T: Finally<T> {
+impl<T> Finally<T> for &fn() -> T {
     // FIXME #4518: Should not require a mode here
     fn finally(&self, +dtor: &fn()) -> T {
         let _d = Finallyalizer {
@@ -53,7 +53,7 @@ fn finally(&self, +dtor: &fn()) -> T {
 #[cfg(stage1)]
 #[cfg(stage2)]
 #[cfg(stage3)]
-impl<T> &fn() -> T: Finally<T> {
+impl<T> Finally<T> for &fn() -> T {
     fn finally(&self, dtor: &fn()) -> T {
         let _d = Finallyalizer {
             dtor: dtor
@@ -67,7 +67,7 @@ struct Finallyalizer {
     dtor: &fn()
 }
 
-impl Finallyalizer: Drop {
+impl Drop for Finallyalizer {
     fn finalize(&self) {
         (self.dtor)();
     }
index e1ab28ce7ecbb45ebac71b6d4d8a544d6f64bad9..621ead48abc1a803fdb63aeab177f916ef35aa67 100644 (file)
@@ -146,7 +146,7 @@ struct GlobalState {
     map: LinearMap<uint, (*c_void, ~fn())>
 }
 
-impl GlobalState: Drop {
+impl Drop for GlobalState {
     fn finalize(&self) {
         for self.map.each_value |v| {
             match v {
index 4369b29ba52be95cd90c052d6b4d6edeafecc3bf..acadf079b3b673e86a028be58b027b42fc92036a 100644 (file)
@@ -194,7 +194,7 @@ pub trait Ptr<T> {
 }
 
 /// Extension methods for immutable pointers
-impl<T> *T: Ptr<T> {
+impl<T> Ptr<T> for *T {
     /// Returns true if the pointer is equal to the null pointer.
     #[inline(always)]
     pure fn is_null() -> bool { is_null(self) }
@@ -209,7 +209,7 @@ impl<T> *T: Ptr<T> {
 }
 
 /// Extension methods for mutable pointers
-impl<T> *mut T: Ptr<T> {
+impl<T> Ptr<T> for *mut T {
     /// Returns true if the pointer is equal to the null pointer.
     #[inline(always)]
     pure fn is_null() -> bool { is_null(self) }
@@ -225,7 +225,7 @@ impl<T> *mut T: Ptr<T> {
 
 // Equality for pointers
 #[cfg(notest)]
-impl<T> *const T : Eq {
+impl<T> Eq for *const T {
     #[inline(always)]
     pure fn eq(&self, other: &*const T) -> bool {
         unsafe {
@@ -240,7 +240,7 @@ impl<T> *const T : Eq {
 
 // Comparison for pointers
 #[cfg(notest)]
-impl<T> *const T : Ord {
+impl<T> Ord for *const T {
     #[inline(always)]
     pure fn lt(&self, other: &*const T) -> bool {
         unsafe {
@@ -277,7 +277,7 @@ impl<T> *const T : Ord {
 
 // Equality for region pointers
 #[cfg(notest)]
-impl<T:Eq> &const T : Eq {
+impl<T:Eq> Eq for &const T {
     #[inline(always)]
     pure fn eq(&self, other: & &self/const T) -> bool {
         return *(*self) == *(*other);
@@ -290,7 +290,7 @@ impl<T:Eq> &const T : Eq {
 
 // Comparison for region pointers
 #[cfg(notest)]
-impl<T:Ord> &const T : Ord {
+impl<T:Ord> Ord for &const T {
     #[inline(always)]
     pure fn lt(&self, other: & &self/const T) -> bool {
         *(*self) < *(*other)
index 1881bd784c4cb1ca7c75a7ace10fe02ff4a90e54..47a0e11941cb07a3ac843de972d9653de29d9b79 100644 (file)
@@ -24,91 +24,91 @@ pub trait Rand {
     static fn rand(rng: rand::Rng) -> Self;
 }
 
-impl int: Rand {
+impl Rand for int {
     static fn rand(rng: rand::Rng) -> int {
         rng.gen_int()
     }
 }
 
-impl i8: Rand {
+impl Rand for i8 {
     static fn rand(rng: rand::Rng) -> i8 {
         rng.gen_i8()
     }
 }
 
-impl i16: Rand {
+impl Rand for i16 {
     static fn rand(rng: rand::Rng) -> i16 {
         rng.gen_i16()
     }
 }
 
-impl i32: Rand {
+impl Rand for i32 {
     static fn rand(rng: rand::Rng) -> i32 {
         rng.gen_i32()
     }
 }
 
-impl i64: Rand {
+impl Rand for i64 {
     static fn rand(rng: rand::Rng) -> i64 {
         rng.gen_i64()
     }
 }
 
-impl u8: Rand {
+impl Rand for u8 {
     static fn rand(rng: rand::Rng) -> u8 {
         rng.gen_u8()
     }
 }
 
-impl u16: Rand {
+impl Rand for u16 {
     static fn rand(rng: rand::Rng) -> u16 {
         rng.gen_u16()
     }
 }
 
-impl u32: Rand {
+impl Rand for u32 {
     static fn rand(rng: rand::Rng) -> u32 {
         rng.gen_u32()
     }
 }
 
-impl u64: Rand {
+impl Rand for u64 {
     static fn rand(rng: rand::Rng) -> u64 {
         rng.gen_u64()
     }
 }
 
-impl float: Rand {
+impl Rand for float {
     static fn rand(rng: rand::Rng) -> float {
         rng.gen_float()
     }
 }
 
-impl f32: Rand {
+impl Rand for f32 {
     static fn rand(rng: rand::Rng) -> f32 {
         rng.gen_f32()
     }
 }
 
-impl f64: Rand {
+impl Rand for f64 {
     static fn rand(rng: rand::Rng) -> f64 {
         rng.gen_f64()
     }
 }
 
-impl char: Rand {
+impl Rand for char {
     static fn rand(rng: rand::Rng) -> char {
         rng.gen_char()
     }
 }
 
-impl bool: Rand {
+impl Rand for bool {
     static fn rand(rng: rand::Rng) -> bool {
         rng.gen_bool()
     }
 }
 
-impl<T: Rand> Option<T>: Rand {
+impl<T: Rand> Rand for Option<T> {
     static fn rand(rng: rand::Rng) -> Option<T> {
         if rng.gen_bool() { Some(Rand::rand(rng)) }
         else { None }
@@ -377,7 +377,7 @@ fn RandRes(c: *rctx) -> RandRes {
     }
 }
 
-impl @RandRes: Rng {
+impl Rng for @RandRes {
     fn next() -> u32 {
         unsafe {
             return rustrt::rand_next((*self).c);
@@ -418,7 +418,7 @@ struct XorShiftState {
     mut w: u32,
 }
 
-impl XorShiftState: Rng {
+impl Rng for XorShiftState {
     fn next() -> u32 {
         let x = self.x;
         let mut t = x ^ (x << 11);
index de94100d7a50615f095a81cd8da46009fb1b1f7f..eb407cf1128e9c5ca4b13ff610ecfa2a10b5586f 100644 (file)
@@ -72,7 +72,7 @@ fn bump_past<T>() {
 }
 
 /// Abstract type-directed pointer-movement using the MovePtr trait
-impl<V: TyVisitor MovePtr> MovePtrAdaptor<V>: TyVisitor {
+impl<V: TyVisitor MovePtr> TyVisitor for MovePtrAdaptor<V> {
     fn visit_bot(&self) -> bool {
         self.align_to::<()>();
         if ! self.inner.visit_bot() { return false; }
index 5848a868f44782a1c2957411832e2c74baf6266a..c2266f4fdb0423920e7cccf9dca04deef3a2521f 100644 (file)
@@ -46,7 +46,7 @@ trait EscapedCharWriter {
     fn write_escaped_char(ch: char);
 }
 
-impl Writer : EscapedCharWriter {
+impl EscapedCharWriter for Writer {
     fn write_escaped_char(ch: char) {
         match ch {
             '\t' => self.write_str("\\t"),
@@ -71,64 +71,64 @@ trait Repr {
     fn write_repr(writer: @Writer);
 }
 
-impl () : Repr {
+impl Repr for () {
     fn write_repr(writer: @Writer) { writer.write_str("()"); }
 }
 
-impl bool : Repr {
+impl Repr for bool {
     fn write_repr(writer: @Writer) {
         writer.write_str(if self { "true" } else { "false" })
     }
 }
 
-impl int : Repr {
+impl Repr for int {
     fn write_repr(writer: @Writer) { writer.write_int(self); }
 }
-impl i8 : Repr {
+impl Repr for i8 {
     fn write_repr(writer: @Writer) { writer.write_int(self as int); }
 }
-impl i16 : Repr {
+impl Repr for i16 {
     fn write_repr(writer: @Writer) { writer.write_int(self as int); }
 }
-impl i32 : Repr {
+impl Repr for i32 {
     fn write_repr(writer: @Writer) { writer.write_int(self as int); }
 }
-impl i64 : Repr {
+impl Repr for i64 {
     // FIXME #4424: This can lose precision.
     fn write_repr(writer: @Writer) { writer.write_int(self as int); }
 }
 
-impl uint : Repr {
+impl Repr for uint {
     fn write_repr(writer: @Writer) { writer.write_uint(self); }
 }
-impl u8 : Repr {
+impl Repr for u8 {
     fn write_repr(writer: @Writer) { writer.write_uint(self as uint); }
 }
-impl u16 : Repr {
+impl Repr for u16 {
     fn write_repr(writer: @Writer) { writer.write_uint(self as uint); }
 }
-impl u32 : Repr {
+impl Repr for u32 {
     fn write_repr(writer: @Writer) { writer.write_uint(self as uint); }
 }
-impl u64 : Repr {
+impl Repr for u64 {
     // FIXME #4424: This can lose precision.
     fn write_repr(writer: @Writer) { writer.write_uint(self as uint); }
 }
 
-impl float : Repr {
+impl Repr for float {
     // FIXME #4423: This mallocs.
     fn write_repr(writer: @Writer) { writer.write_str(self.to_str()); }
 }
-impl f32 : Repr {
+impl Repr for f32 {
     // FIXME #4423 This mallocs.
     fn write_repr(writer: @Writer) { writer.write_str(self.to_str()); }
 }
-impl f64 : Repr {
+impl Repr for f64 {
     // FIXME #4423: This mallocs.
     fn write_repr(writer: @Writer) { writer.write_str(self.to_str()); }
 }
 
-impl char : Repr {
+impl Repr for char {
     fn write_repr(writer: @Writer) { writer.write_char(self); }
 }
 
@@ -154,7 +154,7 @@ pub fn ReprVisitor(ptr: *c_void, writer: @Writer) -> ReprVisitor {
                   writer: writer }
 }
 
-impl ReprVisitor : MovePtr {
+impl MovePtr for ReprVisitor {
     #[inline(always)]
     fn move_ptr(adjustment: fn(*c_void) -> *c_void) {
         self.ptr = adjustment(self.ptr);
@@ -262,7 +262,7 @@ fn write_unboxed_vec_repr(mtbl: uint, v: &UnboxedVecRepr,
 
 }
 
-impl ReprVisitor : TyVisitor {
+impl TyVisitor for ReprVisitor {
     fn visit_bot(&self) -> bool {
         self.writer.write_str("!");
         true
index 690486010ca4b4f006a042b799088ad82d4e71eb..1761d7658386fda5e15954a7ad79f422f4c1ab92 100644 (file)
@@ -262,7 +262,7 @@ fn ProgRes(r: ProgRepr) -> ProgRes {
         }
     }
 
-    impl ProgRes: Program {
+    impl Program for ProgRes {
         fn get_id(&mut self) -> pid_t { return self.r.pid; }
         fn input(&mut self) -> io::Writer {
             io::fd_writer(self.r.in_fd, false)
index b01f422c84a25c5c4162011735fbfa8234414f51..7e7a34f1bab0c8e22f5180682b0871a8adac174b 100644 (file)
@@ -771,7 +771,7 @@ pub fn split_within(ss: &str, lim: uint) -> ~[~str] {
 }
 
 #[cfg(notest)]
-impl &str : Eq {
+impl Eq for &str {
     #[inline(always)]
     pure fn eq(&self, other: & &self/str) -> bool {
         eq_slice((*self), (*other))
@@ -781,7 +781,7 @@ impl &str : Eq {
 }
 
 #[cfg(notest)]
-impl ~str : Eq {
+impl Eq for ~str {
     #[inline(always)]
     pure fn eq(&self, other: &~str) -> bool {
         eq_slice((*self), (*other))
@@ -791,7 +791,7 @@ impl ~str : Eq {
 }
 
 #[cfg(notest)]
-impl @str : Eq {
+impl Eq for @str {
     #[inline(always)]
     pure fn eq(&self, other: &@str) -> bool {
         eq_slice((*self), (*other))
@@ -801,7 +801,7 @@ impl @str : Eq {
 }
 
 #[cfg(notest)]
-impl ~str : Ord {
+impl Ord for ~str {
     #[inline(always)]
     pure fn lt(&self, other: &~str) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -813,7 +813,7 @@ impl ~str : Ord {
 }
 
 #[cfg(notest)]
-impl &str : Ord {
+impl Ord for &str {
     #[inline(always)]
     pure fn lt(&self, other: & &self/str) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -825,7 +825,7 @@ impl &str : Ord {
 }
 
 #[cfg(notest)]
-impl @str : Ord {
+impl Ord for @str {
     #[inline(always)]
     pure fn lt(&self, other: &@str) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -2134,7 +2134,7 @@ pub trait Trimmable {
 }
 
 /// Extension methods for strings
-impl ~str: Trimmable {
+impl Trimmable for ~str {
     /// Returns a string with leading and trailing whitespace removed
     #[inline]
     pure fn trim() -> ~str { trim(self) }
@@ -2151,7 +2151,7 @@ pub mod traits {
     use ops::Add;
     use str::append;
 
-    impl ~str : Add<&str,~str> {
+    impl Add<&str,~str> for ~str {
         #[inline(always)]
         pure fn add(&self, rhs: & &self/str) -> ~str {
             append(copy *self, (*rhs))
@@ -2195,7 +2195,7 @@ pub trait StrSlice {
 }
 
 /// Extension methods for strings
-impl &str: StrSlice {
+impl StrSlice for &str {
     /**
      * Return true if a predicate matches all characters or if the string
      * contains no characters
index 05019c0df84c6bb5447f036e9abb6c4cf66c516a..35bbc0347ee11dfe2fb2aa97e2ad95c34b7e302b 100644 (file)
@@ -26,9 +26,9 @@
 type rust_task = libc::c_void;
 
 pub trait LocalData { }
-impl<T: Durable> @T: LocalData { }
+impl<T: Durable> LocalData for @T { }
 
-impl LocalData: Eq {
+impl Eq for LocalData {
     pure fn eq(&self, other: &@LocalData) -> bool {
         unsafe {
             let ptr_a: (uint, uint) = cast::reinterpret_cast(&(*self));
index 698463b2147768196d7e3d7da627e54c0c1a87ac..09c558e3be599b358f17db1876d1045eb312f769 100644 (file)
@@ -84,7 +84,7 @@ pub enum TaskResult {
     Failure,
 }
 
-impl TaskResult : Eq {
+impl Eq for TaskResult {
     pure fn eq(&self, other: &TaskResult) -> bool {
         match ((*self), (*other)) {
             (Success, Success) | (Failure, Failure) => true,
index b4647d0c621a112a37237e36300da876968fcaf5..58ecf2560ace0445ae173dd08f46914069981cde 100644 (file)
@@ -46,7 +46,7 @@ pub trait IterBytes {
     pure fn iter_bytes(&self, lsb0: bool, f: Cb);
 }
 
-impl bool: IterBytes {
+impl IterBytes for bool {
     #[inline(always)]
     pure fn iter_bytes(&self, _lsb0: bool, f: Cb) {
         f([
@@ -55,7 +55,7 @@ impl bool: IterBytes {
     }
 }
 
-impl u8: IterBytes {
+impl IterBytes for u8 {
     #[inline(always)]
     pure fn iter_bytes(&self, _lsb0: bool, f: Cb) {
         f([
@@ -64,7 +64,7 @@ impl u8: IterBytes {
     }
 }
 
-impl u16: IterBytes {
+impl IterBytes for u16 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         if lsb0 {
@@ -81,7 +81,7 @@ impl u16: IterBytes {
     }
 }
 
-impl u32: IterBytes {
+impl IterBytes for u32 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         if lsb0 {
@@ -102,7 +102,7 @@ impl u32: IterBytes {
     }
 }
 
-impl u64: IterBytes {
+impl IterBytes for u64 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         if lsb0 {
@@ -131,35 +131,35 @@ impl u64: IterBytes {
     }
 }
 
-impl i8: IterBytes {
+impl IterBytes for i8 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as u8).iter_bytes(lsb0, f)
     }
 }
 
-impl i16: IterBytes {
+impl IterBytes for i16 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as u16).iter_bytes(lsb0, f)
     }
 }
 
-impl i32: IterBytes {
+impl IterBytes for i32 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as u32).iter_bytes(lsb0, f)
     }
 }
 
-impl i64: IterBytes {
+impl IterBytes for i64 {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as u64).iter_bytes(lsb0, f)
     }
 }
 
-impl char: IterBytes {
+impl IterBytes for char {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as u32).iter_bytes(lsb0, f)
@@ -190,14 +190,14 @@ pub impl uint: IterBytes {
     }
 }
 
-impl int: IterBytes {
+impl IterBytes for int {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as uint).iter_bytes(lsb0, f)
     }
 }
 
-impl<A: IterBytes> &[A]: IterBytes {
+impl<A: IterBytes> IterBytes for &[A] {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         for (*self).each |elt| {
@@ -208,7 +208,7 @@ impl<A: IterBytes> &[A]: IterBytes {
     }
 }
 
-impl<A: IterBytes, B: IterBytes> (A,B): IterBytes {
+impl<A: IterBytes, B: IterBytes> IterBytes for (A,B) {
   #[inline(always)]
   pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
     match *self {
@@ -219,7 +219,7 @@ impl<A: IterBytes, B: IterBytes> (A,B): IterBytes {
   }
 }
 
-impl<A: IterBytes, B: IterBytes, C: IterBytes> (A,B,C): IterBytes {
+impl<A: IterBytes, B: IterBytes, C: IterBytes> IterBytes for (A,B,C) {
   #[inline(always)]
   pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
     match *self {
@@ -235,14 +235,14 @@ impl<A: IterBytes, B: IterBytes, C: IterBytes> (A,B,C): IterBytes {
     a
 }
 
-impl<A: IterBytes> ~[A]: IterBytes {
+impl<A: IterBytes> IterBytes for ~[A] {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         borrow(*self).iter_bytes(lsb0, f)
     }
 }
 
-impl<A: IterBytes> @[A]: IterBytes {
+impl<A: IterBytes> IterBytes for @[A] {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         borrow(*self).iter_bytes(lsb0, f)
@@ -352,7 +352,7 @@ impl<A: IterBytes> @[A]: IterBytes {
     g.iter_bytes(lsb0, |bytes| {flag = z(bytes); flag});
 }
 
-impl &str: IterBytes {
+impl IterBytes for &str {
     #[inline(always)]
     pure fn iter_bytes(&self, _lsb0: bool, f: Cb) {
         do str::byte_slice(*self) |bytes| {
@@ -361,7 +361,7 @@ impl &str: IterBytes {
     }
 }
 
-impl ~str: IterBytes {
+impl IterBytes for ~str {
     #[inline(always)]
     pure fn iter_bytes(&self, _lsb0: bool, f: Cb) {
         do str::byte_slice(*self) |bytes| {
@@ -370,7 +370,7 @@ impl ~str: IterBytes {
     }
 }
 
-impl @str: IterBytes {
+impl IterBytes for @str {
     #[inline(always)]
     pure fn iter_bytes(&self, _lsb0: bool, f: Cb) {
         do str::byte_slice(*self) |bytes| {
@@ -379,7 +379,7 @@ impl @str: IterBytes {
     }
 }
 
-impl<A: IterBytes> Option<A>: IterBytes {
+impl<A: IterBytes> IterBytes for Option<A> {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         match *self {
@@ -389,21 +389,21 @@ impl<A: IterBytes> Option<A>: IterBytes {
     }
 }
 
-impl<A: IterBytes> &A: IterBytes {
+impl<A: IterBytes> IterBytes for &A {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (**self).iter_bytes(lsb0, f);
     }
 }
 
-impl<A: IterBytes> @A: IterBytes {
+impl<A: IterBytes> IterBytes for @A {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (**self).iter_bytes(lsb0, f);
     }
 }
 
-impl<A: IterBytes> ~A: IterBytes {
+impl<A: IterBytes> IterBytes for ~A {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (**self).iter_bytes(lsb0, f);
@@ -412,7 +412,7 @@ impl<A: IterBytes> ~A: IterBytes {
 
 // NB: raw-pointer IterBytes does _not_ dereference
 // to the target; it just gives you the pointer-bytes.
-impl<A> *const A: IterBytes {
+impl<A> IterBytes for *const A {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
         (*self as uint).iter_bytes(lsb0, f);
@@ -424,7 +424,7 @@ trait ToBytes {
     fn to_bytes(&self, lsb0: bool) -> ~[u8];
 }
 
-impl<A: IterBytes> A: ToBytes {
+impl<A: IterBytes> ToBytes for A {
     fn to_bytes(&self, lsb0: bool) -> ~[u8] {
         do io::with_bytes_writer |wr| {
             for self.iter_bytes(lsb0) |bytes| {
index d98e341eab8a36c6a59430fde366fa1e60f2745e..a1e77a494d5bd251b3781059fb2ff1b8f2290faf 100644 (file)
@@ -22,28 +22,28 @@ pub trait ToStr {
     pure fn to_str(&self) -> ~str;
 }
 
-impl bool: ToStr {
+impl ToStr for bool {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ::bool::to_str(*self) }
 }
-impl (): ToStr {
+impl ToStr for () {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ~"()" }
 }
-impl ~str: ToStr {
+impl ToStr for ~str {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { copy *self }
 }
-impl &str: ToStr {
+impl ToStr for &str {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
 }
-impl @str: ToStr {
+impl ToStr for @str {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
 }
 
-impl<A: ToStr, B: ToStr> (A, B): ToStr {
+impl<A: ToStr, B: ToStr> ToStr for (A, B) {
     #[inline(always)]
     pure fn to_str(&self) -> ~str {
         // FIXME(#4760): this causes an llvm assertion
@@ -55,7 +55,7 @@ impl<A: ToStr, B: ToStr> (A, B): ToStr {
         }
     }
 }
-impl<A: ToStr, B: ToStr, C: ToStr> (A, B, C): ToStr {
+impl<A: ToStr, B: ToStr, C: ToStr> ToStr for (A, B, C) {
     #[inline(always)]
     pure fn to_str(&self) -> ~str {
         // FIXME(#4760): this causes an llvm assertion
@@ -72,7 +72,7 @@ impl<A: ToStr, B: ToStr, C: ToStr> (A, B, C): ToStr {
     }
 }
 
-impl<A: ToStr> ~[A]: ToStr {
+impl<A: ToStr> ToStr for ~[A] {
     #[inline(always)]
     pure fn to_str(&self) -> ~str {
         unsafe {
@@ -92,11 +92,11 @@ impl<A: ToStr> ~[A]: ToStr {
     }
 }
 
-impl<A: ToStr> @A: ToStr {
+impl<A: ToStr> ToStr for @A {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ~"@" + (**self).to_str() }
 }
-impl<A: ToStr> ~A: ToStr {
+impl<A: ToStr> ToStr for ~A {
     #[inline(always)]
     pure fn to_str(&self) -> ~str { ~"~" + (**self).to_str() }
 }
index 484fc1a5a276556bbdb8031281ee1e7f2d662a03..23235104e9fc607d834848f9bd0a4c95bed457a2 100644 (file)
@@ -20,7 +20,7 @@ pub trait CopyableTuple<T, U> {
     pure fn swap() -> (U, T);
 }
 
-impl<T: Copy, U: Copy> (T, U): CopyableTuple<T, U> {
+impl<T: Copy, U: Copy> CopyableTuple<T, U> for (T, U) {
 
     /// Return the first element of self
     #[inline(always)]
@@ -50,7 +50,7 @@ pub trait ImmutableTuple<T, U> {
     pure fn second_ref(&self) -> &self/U;
 }
 
-impl<T, U> (T, U): ImmutableTuple<T, U> {
+impl<T, U> ImmutableTuple<T, U> for (T, U) {
     #[inline(always)]
     pure fn first_ref(&self) -> &self/T {
         match *self {
@@ -70,7 +70,7 @@ pub trait ExtendedTupleOps<A,B> {
     fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C];
 }
 
-impl<A: Copy, B: Copy> (&[A], &[B]): ExtendedTupleOps<A,B> {
+impl<A: Copy, B: Copy> ExtendedTupleOps<A,B> for (&[A], &[B]) {
     #[inline(always)]
     fn zip(&self) -> ~[(A, B)] {
         match *self {
@@ -90,7 +90,7 @@ fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C] {
     }
 }
 
-impl<A: Copy, B: Copy> (~[A], ~[B]): ExtendedTupleOps<A,B> {
+impl<A: Copy, B: Copy> ExtendedTupleOps<A,B> for (~[A], ~[B]) {
 
     #[inline(always)]
     fn zip(&self) -> ~[(A, B)] {
@@ -112,7 +112,7 @@ fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C] {
 }
 
 #[cfg(notest)]
-impl<A: Eq, B: Eq> (A, B) : Eq {
+impl<A: Eq, B: Eq> Eq for (A, B) {
     #[inline(always)]
     pure fn eq(&self, other: &(A, B)) -> bool {
         match (*self) {
@@ -128,7 +128,7 @@ impl<A: Eq, B: Eq> (A, B) : Eq {
 }
 
 #[cfg(notest)]
-impl<A: Ord, B: Ord> (A, B) : Ord {
+impl<A: Ord, B: Ord> Ord for (A, B) {
     #[inline(always)]
     pure fn lt(&self, other: &(A, B)) -> bool {
         match (*self) {
@@ -153,7 +153,7 @@ impl<A: Ord, B: Ord> (A, B) : Ord {
 }
 
 #[cfg(notest)]
-impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
+impl<A: Eq, B: Eq, C: Eq> Eq for (A, B, C) {
     #[inline(always)]
     pure fn eq(&self, other: &(A, B, C)) -> bool {
         match (*self) {
@@ -170,7 +170,7 @@ impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
 }
 
 #[cfg(notest)]
-impl<A: Ord, B: Ord, C: Ord> (A, B, C) : Ord {
+impl<A: Ord, B: Ord, C: Ord> Ord for (A, B, C) {
     #[inline(always)]
     pure fn lt(&self, other: &(A, B, C)) -> bool {
         match (*self) {
index 966928125a98a09c6032da770d1f877d80f929af..3808e13be1cbc03d0a48072055e8e5f8c0289df6 100644 (file)
@@ -1559,7 +1559,7 @@ pub fn each2<U, T>(v1: &[U], v2: &[T], f: fn(u: &U, t: &T) -> bool) {
 }
 
 #[cfg(notest)]
-impl<T: Eq> &[T] : Eq {
+impl<T: Eq> Eq for &[T] {
     #[inline(always)]
     pure fn eq(&self, other: & &self/[T]) -> bool { eq((*self), (*other)) }
     #[inline(always)]
@@ -1568,7 +1568,7 @@ impl<T: Eq> &[T] : Eq {
 
 
 #[cfg(notest)]
-impl<T: Eq> ~[T] : Eq {
+impl<T: Eq> Eq for ~[T] {
     #[inline(always)]
     pure fn eq(&self, other: &~[T]) -> bool { eq((*self), (*other)) }
     #[inline(always)]
@@ -1576,7 +1576,7 @@ impl<T: Eq> ~[T] : Eq {
 }
 
 #[cfg(notest)]
-impl<T: Eq> @[T] : Eq {
+impl<T: Eq> Eq for @[T] {
     #[inline(always)]
     pure fn eq(&self, other: &@[T]) -> bool { eq((*self), (*other)) }
     #[inline(always)]
@@ -1605,7 +1605,7 @@ impl<T: Eq> @[T] : Eq {
 pure fn gt<T: Ord>(a: &[T], b: &[T]) -> bool { lt(b, a)  }
 
 #[cfg(notest)]
-impl<T: Ord> &[T] : Ord {
+impl<T: Ord> Ord for &[T] {
     #[inline(always)]
     pure fn lt(&self, other: & &self/[T]) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -1617,7 +1617,7 @@ impl<T: Ord> &[T] : Ord {
 }
 
 #[cfg(notest)]
-impl<T: Ord> ~[T] : Ord {
+impl<T: Ord> Ord for ~[T] {
     #[inline(always)]
     pure fn lt(&self, other: &~[T]) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -1629,7 +1629,7 @@ impl<T: Ord> ~[T] : Ord {
 }
 
 #[cfg(notest)]
-impl<T: Ord> @[T] : Ord {
+impl<T: Ord> Ord for @[T] {
     #[inline(always)]
     pure fn lt(&self, other: &@[T]) -> bool { lt((*self), (*other)) }
     #[inline(always)]
@@ -1646,7 +1646,7 @@ pub mod traits {
     use ops::Add;
     use vec::append;
 
-    impl<T: Copy> ~[T] : Add<&[const T],~[T]> {
+    impl<T: Copy> Add<&[const T],~[T]> for ~[T] {
         #[inline(always)]
         pure fn add(&self, rhs: & &self/[const T]) -> ~[T] {
             append(copy *self, (*rhs))
@@ -1654,7 +1654,7 @@ impl<T: Copy> ~[T] : Add<&[const T],~[T]> {
     }
 }
 
-impl<T> &[const T]: Container {
+impl<T> Container for &[const T] {
     /// Returns true if a vector contains no elements
     #[inline]
     pure fn is_empty(&self) -> bool { is_empty(*self) }
@@ -1673,7 +1673,7 @@ pub trait CopyableVector<T> {
 }
 
 /// Extension methods for vectors
-impl<T: Copy> &[const T]: CopyableVector<T> {
+impl<T: Copy> CopyableVector<T> for &[const T] {
     /// Returns the first element of a vector
     #[inline]
     pure fn head(&self) -> T { head(*self) }
@@ -1709,7 +1709,7 @@ pub trait ImmutableVector<T> {
 }
 
 /// Extension methods for vectors
-impl<T> &[T]: ImmutableVector<T> {
+impl<T> ImmutableVector<T> for &[T] {
     /// Return a slice that points into another slice.
     #[inline]
     pure fn view(&self, start: uint, end: uint) -> &self/[T] {
@@ -1780,7 +1780,7 @@ pub trait ImmutableEqVector<T: Eq> {
     pure fn rposition_elem(&self, t: &T) -> Option<uint>;
 }
 
-impl<T: Eq> &[T]: ImmutableEqVector<T> {
+impl<T: Eq> ImmutableEqVector<T> for &[T] {
     /**
      * Find the first index matching some predicate
      *
@@ -1825,7 +1825,7 @@ pub trait ImmutableCopyableVector<T> {
 }
 
 /// Extension methods for vectors
-impl<T: Copy> &[T]: ImmutableCopyableVector<T> {
+impl<T: Copy> ImmutableCopyableVector<T> for &[T] {
     /**
      * Construct a new vector from the elements of a vector for which some
      * predicate holds.
@@ -1876,7 +1876,7 @@ pub trait OwnedVector<T> {
     fn partition(self, f: pure fn(&T) -> bool) -> (~[T], ~[T]);
 }
 
-impl<T> ~[T]: OwnedVector<T> {
+impl<T> OwnedVector<T> for ~[T] {
     #[inline]
     fn push(&mut self, t: T) {
         push(self, t);
@@ -1947,7 +1947,7 @@ fn partition(self, f: fn(&T) -> bool) -> (~[T], ~[T]) {
     }
 }
 
-impl<T> ~[T]: Mutable {
+impl<T> Mutable for ~[T] {
     /// Clear the vector, removing all values.
     fn clear(&mut self) { self.truncate(0) }
 }
@@ -1959,7 +1959,7 @@ pub trait OwnedCopyableVector<T: Copy> {
     fn grow_set(&mut self, index: uint, initval: &T, val: T);
 }
 
-impl<T: Copy> ~[T]: OwnedCopyableVector<T> {
+impl<T: Copy> OwnedCopyableVector<T> for ~[T] {
     #[inline]
     fn push_all(&mut self, rhs: &[const T]) {
         push_all(self, rhs);
@@ -1985,7 +1985,7 @@ trait OwnedEqVector<T: Eq> {
     fn dedup(&mut self);
 }
 
-impl<T: Eq> ~[T]: OwnedEqVector<T> {
+impl<T: Eq> OwnedEqVector<T> for ~[T] {
     #[inline]
     fn dedup(&mut self) {
         dedup(self)
@@ -2218,7 +2218,7 @@ pub fn copy_memory(dst: &mut [u8], src: &[const u8], count: uint) {
 // This cannot be used with iter-trait.rs because of the region pointer
 // required in the slice.
 
-impl<A> &[A]: iter::BaseIter<A> {
+impl<A> iter::BaseIter<A> for &[A] {
     pub pure fn each(&self, blk: fn(v: &A) -> bool) {
         // FIXME(#2263)---should be able to call each(self, blk)
         for each(*self) |e| {
@@ -2231,7 +2231,7 @@ impl<A> &[A]: iter::BaseIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A> ~[A]: iter::BaseIter<A> {
+impl<A> iter::BaseIter<A> for ~[A] {
     pub pure fn each(&self, blk: fn(v: &A) -> bool) {
         // FIXME(#2263)---should be able to call each(self, blk)
         for each(*self) |e| {
@@ -2244,7 +2244,7 @@ impl<A> ~[A]: iter::BaseIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A> @[A]: iter::BaseIter<A> {
+impl<A> iter::BaseIter<A> for @[A] {
     pub pure fn each(&self, blk: fn(v: &A) -> bool) {
         // FIXME(#2263)---should be able to call each(self, blk)
         for each(*self) |e| {
@@ -2256,7 +2256,7 @@ impl<A> @[A]: iter::BaseIter<A> {
     pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
 }
 
-impl<A> &[A]: iter::ExtendedIter<A> {
+impl<A> iter::ExtendedIter<A> for &[A] {
     pub pure fn eachi(&self, blk: fn(uint, v: &A) -> bool) {
         iter::eachi(self, blk)
     }
@@ -2282,7 +2282,7 @@ impl<A> &[A]: iter::ExtendedIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A> ~[A]: iter::ExtendedIter<A> {
+impl<A> iter::ExtendedIter<A> for ~[A] {
     pub pure fn eachi(&self, blk: fn(uint, v: &A) -> bool) {
         iter::eachi(self, blk)
     }
@@ -2308,7 +2308,7 @@ impl<A> ~[A]: iter::ExtendedIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A> @[A]: iter::ExtendedIter<A> {
+impl<A> iter::ExtendedIter<A> for @[A] {
     pub pure fn eachi(&self, blk: fn(uint, v: &A) -> bool) {
         iter::eachi(self, blk)
     }
@@ -2333,24 +2333,24 @@ impl<A> @[A]: iter::ExtendedIter<A> {
     }
 }
 
-impl<A: Eq> &[A]: iter::EqIter<A> {
+impl<A: Eq> iter::EqIter<A> for &[A] {
     pub pure fn contains(&self, x: &A) -> bool { iter::contains(self, x) }
     pub pure fn count(&self, x: &A) -> uint { iter::count(self, x) }
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Eq> ~[A]: iter::EqIter<A> {
+impl<A: Eq> iter::EqIter<A> for ~[A] {
     pub pure fn contains(&self, x: &A) -> bool { iter::contains(self, x) }
     pub pure fn count(&self, x: &A) -> uint { iter::count(self, x) }
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Eq> @[A]: iter::EqIter<A> {
+impl<A: Eq> iter::EqIter<A> for @[A] {
     pub pure fn contains(&self, x: &A) -> bool { iter::contains(self, x) }
     pub pure fn count(&self, x: &A) -> uint { iter::count(self, x) }
 }
 
-impl<A: Copy> &[A]: iter::CopyableIter<A> {
+impl<A: Copy> iter::CopyableIter<A> for &[A] {
     pure fn filter_to_vec(&self, pred: fn(&A) -> bool) -> ~[A] {
         iter::filter_to_vec(self, pred)
     }
@@ -2361,7 +2361,7 @@ impl<A: Copy> &[A]: iter::CopyableIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Copy> ~[A]: iter::CopyableIter<A> {
+impl<A: Copy> iter::CopyableIter<A> for ~[A] {
     pure fn filter_to_vec(&self, pred: fn(&A) -> bool) -> ~[A] {
         iter::filter_to_vec(self, pred)
     }
@@ -2372,7 +2372,7 @@ impl<A: Copy> ~[A]: iter::CopyableIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Copy> @[A]: iter::CopyableIter<A> {
+impl<A: Copy> iter::CopyableIter<A> for @[A] {
     pure fn filter_to_vec(&self, pred: fn(&A) -> bool) -> ~[A] {
         iter::filter_to_vec(self, pred)
     }
@@ -2382,24 +2382,24 @@ impl<A: Copy> @[A]: iter::CopyableIter<A> {
     }
 }
 
-impl<A: Copy Ord> &[A]: iter::CopyableOrderedIter<A> {
+impl<A: Copy Ord> iter::CopyableOrderedIter<A> for &[A] {
     pure fn min(&self) -> A { iter::min(self) }
     pure fn max(&self) -> A { iter::max(self) }
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Copy Ord> ~[A]: iter::CopyableOrderedIter<A> {
+impl<A: Copy Ord> iter::CopyableOrderedIter<A> for ~[A] {
     pure fn min(&self) -> A { iter::min(self) }
     pure fn max(&self) -> A { iter::max(self) }
 }
 
 // FIXME(#4148): This should be redundant
-impl<A: Copy Ord> @[A]: iter::CopyableOrderedIter<A> {
+impl<A: Copy Ord> iter::CopyableOrderedIter<A> for @[A] {
     pure fn min(&self) -> A { iter::min(self) }
     pure fn max(&self) -> A { iter::max(self) }
 }
 
-impl<A:Copy> &[A] : iter::CopyableNonstrictIter<A> {
+impl<A:Copy> iter::CopyableNonstrictIter<A> for &[A] {
     pure fn each_val(&const self, f: fn(A) -> bool) {
         let mut i = 0;
         while i < self.len() {
@@ -2410,7 +2410,7 @@ impl<A:Copy> &[A] : iter::CopyableNonstrictIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A:Copy> ~[A] : iter::CopyableNonstrictIter<A> {
+impl<A:Copy> iter::CopyableNonstrictIter<A> for ~[A] {
     pure fn each_val(&const self, f: fn(A) -> bool) {
         let mut i = 0;
         while i < self.len() {
@@ -2421,7 +2421,7 @@ impl<A:Copy> ~[A] : iter::CopyableNonstrictIter<A> {
 }
 
 // FIXME(#4148): This should be redundant
-impl<A:Copy> @[A] : iter::CopyableNonstrictIter<A> {
+impl<A:Copy> iter::CopyableNonstrictIter<A> for @[A] {
     pure fn each_val(&const self, f: fn(A) -> bool) {
         let mut i = 0;
         while i < self.len() {
index cb56136f1c466b9460470aee726cb34c5651d43e..3564e10790d3a0328fcedb6e1893892307cdab63 100644 (file)
@@ -120,7 +120,7 @@ enum Family {
     InheritedField         // N
 }
 
-impl Family : cmp::Eq {
+impl cmp::Eq for Family {
     pure fn eq(&self, other: &Family) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index eac459ec703d0e52fef483aace0dbe49fa31a8d0..ed4ea665aafcd5ba6305d314b6209a26b04e7a83 100644 (file)
@@ -41,7 +41,7 @@ pub fn mk_filesearch(maybe_sysroot: Option<Path>,
     type filesearch_impl = {sysroot: Path,
                             addl_lib_search_paths: ~[Path],
                             target_triple: ~str};
-    impl filesearch_impl: FileSearch {
+    impl FileSearch for filesearch_impl {
         fn sysroot() -> Path { /*bad*/copy self.sysroot }
         fn lib_search_paths() -> ~[Path] {
             let mut paths = /*bad*/copy self.addl_lib_search_paths;
index af2465fe4d14d5df5c812ebd6fa20a44c6b5d1a4..3b84216b2e6db6660ed4a44be37a5f6eb9b4873b 100644 (file)
@@ -224,19 +224,19 @@ fn tr_span(_span: span) -> span {
     }
 }
 
-impl ast::def_id: tr_intern {
+impl tr_intern for ast::def_id {
     fn tr_intern(xcx: extended_decode_ctxt) -> ast::def_id {
         xcx.tr_intern_def_id(self)
     }
 }
 
-impl ast::def_id: tr {
+impl tr for ast::def_id {
     fn tr(xcx: extended_decode_ctxt) -> ast::def_id {
         xcx.tr_def_id(self)
     }
 }
 
-impl span: tr {
+impl tr for span {
     fn tr(xcx: extended_decode_ctxt) -> span {
         xcx.tr_span(self)
     }
@@ -246,7 +246,7 @@ trait def_id_encoder_helpers {
     fn emit_def_id(did: ast::def_id);
 }
 
-impl<S: serialize::Encoder> S: def_id_encoder_helpers {
+impl<S: serialize::Encoder> def_id_encoder_helpers for S {
     fn emit_def_id(did: ast::def_id) {
         did.encode(&self)
     }
@@ -256,7 +256,7 @@ trait def_id_decoder_helpers {
     fn read_def_id(xcx: extended_decode_ctxt) -> ast::def_id;
 }
 
-impl<D: serialize::Decoder> D: def_id_decoder_helpers {
+impl<D: serialize::Decoder> def_id_decoder_helpers for D {
 
     fn read_def_id(xcx: extended_decode_ctxt) -> ast::def_id {
         let did: ast::def_id = Decodable::decode(&self);
@@ -402,7 +402,7 @@ fn decode_def(xcx: extended_decode_ctxt, doc: ebml::Doc) -> ast::def {
     def.tr(xcx)
 }
 
-impl ast::def: tr {
+impl tr for ast::def {
     fn tr(xcx: extended_decode_ctxt) -> ast::def {
         match self {
           ast::def_fn(did, p) => { ast::def_fn(did.tr(xcx), p) }
@@ -447,7 +447,7 @@ fn tr(xcx: extended_decode_ctxt) -> ast::def {
 // ______________________________________________________________________
 // Encoding and decoding of adjustment information
 
-impl ty::AutoAdjustment: tr {
+impl tr for ty::AutoAdjustment {
     fn tr(xcx: extended_decode_ctxt) -> ty::AutoAdjustment {
         ty::AutoAdjustment {
             autoderefs: self.autoderefs,
@@ -456,7 +456,7 @@ fn tr(xcx: extended_decode_ctxt) -> ty::AutoAdjustment {
     }
 }
 
-impl ty::AutoRef: tr {
+impl tr for ty::AutoRef {
     fn tr(xcx: extended_decode_ctxt) -> ty::AutoRef {
         ty::AutoRef {
             kind: self.kind,
@@ -466,7 +466,7 @@ fn tr(xcx: extended_decode_ctxt) -> ty::AutoRef {
     }
 }
 
-impl ty::Region: tr {
+impl tr for ty::Region {
     fn tr(xcx: extended_decode_ctxt) -> ty::Region {
         match self {
             ty::re_bound(br) => ty::re_bound(br.tr(xcx)),
@@ -477,7 +477,7 @@ fn tr(xcx: extended_decode_ctxt) -> ty::Region {
     }
 }
 
-impl ty::bound_region: tr {
+impl tr for ty::bound_region {
     fn tr(xcx: extended_decode_ctxt) -> ty::bound_region {
         match self {
             ty::br_anon(_) | ty::br_named(_) | ty::br_self |
@@ -499,14 +499,14 @@ trait ebml_decoder_helper {
     fn read_freevar_entry(xcx: extended_decode_ctxt) -> freevar_entry;
 }
 
-impl reader::Decoder: ebml_decoder_helper {
+impl ebml_decoder_helper for reader::Decoder {
     fn read_freevar_entry(xcx: extended_decode_ctxt) -> freevar_entry {
         let fv: freevar_entry = Decodable::decode(&self);
         fv.tr(xcx)
     }
 }
 
-impl freevar_entry: tr {
+impl tr for freevar_entry {
     fn tr(xcx: extended_decode_ctxt) -> freevar_entry {
         freevar_entry {
             def: self.def.tr(xcx),
@@ -522,14 +522,14 @@ trait capture_var_helper {
     fn read_capture_var(xcx: extended_decode_ctxt) -> moves::CaptureVar;
 }
 
-impl reader::Decoder : capture_var_helper {
+impl capture_var_helper for reader::Decoder {
     fn read_capture_var(xcx: extended_decode_ctxt) -> moves::CaptureVar {
         let cvar: moves::CaptureVar = Decodable::decode(&self);
         cvar.tr(xcx)
     }
 }
 
-impl moves::CaptureVar : tr {
+impl tr for moves::CaptureVar {
     fn tr(xcx: extended_decode_ctxt) -> moves::CaptureVar {
         moves::CaptureVar {
             def: self.def.tr(xcx),
@@ -562,7 +562,7 @@ fn encode_method_map_entry(ecx: @e::encode_ctxt,
     }
 }
 
-impl reader::Decoder: read_method_map_entry_helper {
+impl read_method_map_entry_helper for reader::Decoder {
     fn read_method_map_entry(xcx: extended_decode_ctxt) -> method_map_entry {
         do self.read_rec {
             method_map_entry {
@@ -583,7 +583,7 @@ fn read_method_map_entry(xcx: extended_decode_ctxt) -> method_map_entry {
     }
 }
 
-impl method_origin: tr {
+impl tr for method_origin {
     fn tr(xcx: extended_decode_ctxt) -> method_origin {
         match self {
           typeck::method_static(did) => {
@@ -673,7 +673,7 @@ trait vtable_decoder_helpers {
     fn read_vtable_origin(xcx: extended_decode_ctxt) -> typeck::vtable_origin;
 }
 
-impl reader::Decoder: vtable_decoder_helpers {
+impl vtable_decoder_helpers for reader::Decoder {
     fn read_vtable_res(xcx: extended_decode_ctxt) -> typeck::vtable_res {
         @self.read_to_vec(|| self.read_vtable_origin(xcx) )
     }
@@ -731,7 +731,7 @@ trait get_ty_str_ctxt {
     fn ty_str_ctxt() -> @tyencode::ctxt;
 }
 
-impl @e::encode_ctxt: get_ty_str_ctxt {
+impl get_ty_str_ctxt for @e::encode_ctxt {
     fn ty_str_ctxt() -> @tyencode::ctxt {
         @tyencode::ctxt {diag: self.tcx.sess.diagnostic(),
                         ds: e::def_to_str,
@@ -750,7 +750,7 @@ trait ebml_writer_helpers {
     fn emit_tpbt(ecx: @e::encode_ctxt, tpbt: ty::ty_param_bounds_and_ty);
 }
 
-impl writer::Encoder: ebml_writer_helpers {
+impl ebml_writer_helpers for writer::Encoder {
     fn emit_ty(ecx: @e::encode_ctxt, ty: ty::t) {
         do self.emit_opaque {
             e::write_type(ecx, self, ty)
@@ -803,7 +803,7 @@ trait write_tag_and_id {
     fn id(id: ast::node_id);
 }
 
-impl writer::Encoder: write_tag_and_id {
+impl write_tag_and_id for writer::Encoder {
     fn tag(tag_id: c::astencode_tag, f: fn()) {
         do self.wr_tag(tag_id as uint) { f() }
     }
@@ -981,7 +981,7 @@ trait doc_decoder_helpers {
     fn opt_child(tag: c::astencode_tag) -> Option<ebml::Doc>;
 }
 
-impl ebml::Doc: doc_decoder_helpers {
+impl doc_decoder_helpers for ebml::Doc {
     fn as_int() -> int { reader::doc_as_u64(self) as int }
     fn opt_child(tag: c::astencode_tag) -> Option<ebml::Doc> {
         reader::maybe_get_doc(self, tag as uint)
@@ -1000,7 +1000,7 @@ fn convert_def_id(xcx: extended_decode_ctxt,
                       did: ast::def_id) -> ast::def_id;
 }
 
-impl reader::Decoder: ebml_decoder_decoder_helpers {
+impl ebml_decoder_decoder_helpers for reader::Decoder {
     fn read_arg(xcx: extended_decode_ctxt) -> ty::arg {
         do self.read_opaque |doc| {
             tydecode::parse_arg_data(
@@ -1198,7 +1198,7 @@ trait fake_ext_ctxt {
 type fake_session = parse::parse_sess;
 
 #[cfg(test)]
-impl fake_session: fake_ext_ctxt {
+impl fake_ext_ctxt for fake_session {
     fn cfg() -> ast::crate_cfg { ~[] }
     fn parse_sess() -> parse::parse_sess { self }
     fn call_site() -> span {
index da153778b9abbee732e82ff59d4115e43f19a48c..6e5146818b0cc1db3f73b8ba6c52f1338b6b6630 100644 (file)
@@ -106,7 +106,7 @@ pub enum level {
     allow, warn, deny, forbid
 }
 
-impl level : cmp::Eq {
+impl cmp::Eq for level {
     pure fn eq(&self, other: &level) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 3d105ad551182d14e953ee96260953f600ae6442..d65c4e0158055f6fbbafe68882d52a8e8687adf3 100644 (file)
 enum Variable = uint;
 enum LiveNode = uint;
 
-impl Variable : cmp::Eq {
+impl cmp::Eq for Variable {
     pure fn eq(&self, other: &Variable) -> bool { *(*self) == *(*other) }
     pure fn ne(&self, other: &Variable) -> bool { *(*self) != *(*other) }
 }
 
-impl LiveNode : cmp::Eq {
+impl cmp::Eq for LiveNode {
     pure fn eq(&self, other: &LiveNode) -> bool { *(*self) == *(*other) }
     pure fn ne(&self, other: &LiveNode) -> bool { *(*self) != *(*other) }
 }
@@ -158,7 +158,7 @@ enum LiveNodeKind {
     ExitNode
 }
 
-impl LiveNodeKind : cmp::Eq {
+impl cmp::Eq for LiveNodeKind {
     pure fn eq(&self, other: &LiveNodeKind) -> bool {
         match (*self) {
             FreeVarNode(e0a) => {
@@ -224,11 +224,11 @@ pub fn check_crate(tcx: ty::ctxt,
     return last_use_map;
 }
 
-impl LiveNode: to_str::ToStr {
+impl to_str::ToStr for LiveNode {
     pure fn to_str(&self) -> ~str { fmt!("ln(%u)", **self) }
 }
 
-impl Variable: to_str::ToStr {
+impl to_str::ToStr for Variable {
     pure fn to_str(&self) -> ~str { fmt!("v(%u)", **self) }
 }
 
index 908c567761411277ae3f0e86fa256814af4b8421..bc48519ffda4c9c8b7d7eb357c5a037bf2c54136 100644 (file)
@@ -179,7 +179,7 @@ fn build_wrap_ret(&self, bcx: block,
 
 enum LLVM_ABIInfo { LLVM_ABIInfo }
 
-impl LLVM_ABIInfo: ABIInfo {
+impl ABIInfo for LLVM_ABIInfo {
     fn compute_info(&self,
                     atys: &[TypeRef],
                     rty: TypeRef,
index bac91e17e03098d82d12d744957ca27620065680..a3c5e094ea819514299ce8bf6f964948be9cad8c 100644 (file)
@@ -32,7 +32,7 @@ enum x86_64_reg_class {
     memory_class
 }
 
-impl x86_64_reg_class : cmp::Eq {
+impl cmp::Eq for x86_64_reg_class {
     pure fn eq(&self, other: &x86_64_reg_class) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
@@ -402,7 +402,7 @@ fn x86_64_ty(ty: TypeRef,
 
 enum X86_64_ABIInfo { X86_64_ABIInfo }
 
-impl X86_64_ABIInfo: ABIInfo {
+impl ABIInfo for X86_64_ABIInfo {
     fn compute_info(&self,
                     atys: &[TypeRef],
                     rty: TypeRef,
index 30ba0e7feeec88208fc4710cc3877ce768dfaf83..6af6adbf68dca6f75652d50b99e39722b33643f6 100644 (file)
@@ -165,7 +165,7 @@ fn to_str(ccx: @crate_ctxt) -> ~str {
     }
 }
 
-impl Dest : cmp::Eq {
+impl cmp::Eq for Dest {
     pure fn eq(&self, other: &Dest) -> bool {
         match ((*self), (*other)) {
             (SaveIn(e0a), SaveIn(e0b)) => e0a == e0b,
@@ -1516,7 +1516,7 @@ pub enum cast_kind {
     cast_other,
 }
 
-impl cast_kind : cmp::Eq {
+impl cmp::Eq for cast_kind {
     pure fn eq(&self, other: &cast_kind) -> bool {
         match ((*self), (*other)) {
             (cast_pointer, cast_pointer) => true,
index 23c9f349cdbdf45a39c33df02300130b1da17d11..f7fb5b771aa74adfbb916481d0d46c9bbeae2d3d 100644 (file)
@@ -111,7 +111,7 @@ pub struct creader_cache_key {
 
 type creader_cache = HashMap<creader_cache_key, t>;
 
-impl creader_cache_key : to_bytes::IterBytes {
+impl to_bytes::IterBytes for creader_cache_key {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_3(&self.cnum, &self.pos, &self.len, lsb0, f);
     }
@@ -125,7 +125,7 @@ struct intern_key {
 // NB: Do not replace this with #[deriving_eq]. The automatically-derived
 // implementation will not recurse through sty and you will get stack
 // exhaustion.
-impl intern_key : cmp::Eq {
+impl cmp::Eq for intern_key {
     pure fn eq(&self, other: &intern_key) -> bool {
         unsafe {
             *self.sty == *other.sty && self.o_def_id == other.o_def_id
@@ -136,7 +136,7 @@ impl intern_key : cmp::Eq {
     }
 }
 
-impl intern_key : to_bytes::IterBytes {
+impl to_bytes::IterBytes for intern_key {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         unsafe {
             to_bytes::iter_bytes_2(&*self.sty, &self.o_def_id, lsb0, f);
@@ -155,7 +155,7 @@ pub enum ast_ty_to_ty_cache_entry {
 #[auto_decode]
 pub enum region_variance { rv_covariant, rv_invariant, rv_contravariant }
 
-impl region_variance : cmp::Eq {
+impl cmp::Eq for region_variance {
     pure fn eq(&self, other: &region_variance) -> bool {
         match ((*self), (*other)) {
             (rv_covariant, rv_covariant) => true,
@@ -372,13 +372,13 @@ pub struct FnSig {
     output: t
 }
 
-impl BareFnTy : to_bytes::IterBytes {
+impl to_bytes::IterBytes for BareFnTy {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_3(&self.purity, &self.abi, &self.sig, lsb0, f)
     }
 }
 
-impl ClosureTy : to_bytes::IterBytes {
+impl to_bytes::IterBytes for ClosureTy {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_5(&self.purity, &self.sigil, &self.onceness,
                                &self.region, &self.sig, lsb0, f)
@@ -391,7 +391,7 @@ pub struct param_ty {
     def_id: def_id
 }
 
-impl param_ty : to_bytes::IterBytes {
+impl to_bytes::IterBytes for param_ty {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_2(&self.idx, &self.def_id, lsb0, f)
     }
@@ -597,7 +597,7 @@ pub enum InferTy {
     FloatVar(FloatVid)
 }
 
-impl InferTy : to_bytes::IterBytes {
+impl to_bytes::IterBytes for InferTy {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           TyVar(ref tv) => to_bytes::iter_bytes_2(&0u8, tv, lsb0, f),
@@ -614,7 +614,7 @@ pub enum InferRegion {
     ReSkolemized(uint, bound_region)
 }
 
-impl InferRegion : to_bytes::IterBytes {
+impl to_bytes::IterBytes for InferRegion {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
             ReVar(ref rv) => to_bytes::iter_bytes_2(&0u8, rv, lsb0, f),
@@ -623,7 +623,7 @@ impl InferRegion : to_bytes::IterBytes {
     }
 }
 
-impl InferRegion : cmp::Eq {
+impl cmp::Eq for InferRegion {
     pure fn eq(&self, other: &InferRegion) -> bool {
         match ((*self), *other) {
             (ReVar(rva), ReVar(rvb)) => {
@@ -640,7 +640,7 @@ impl InferRegion : cmp::Eq {
     }
 }
 
-impl param_bound : to_bytes::IterBytes {
+impl to_bytes::IterBytes for param_bound {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           bound_copy => 0u8.iter_bytes(lsb0, f),
@@ -1817,19 +1817,19 @@ fn is_safe_for_default_mode(&self, cx: ctxt) -> bool {
     }
 }
 
-impl TypeContents : ops::Add<TypeContents,TypeContents> {
+impl ops::Add<TypeContents,TypeContents> for TypeContents {
     pure fn add(&self, other: &TypeContents) -> TypeContents {
         TypeContents {bits: self.bits | other.bits}
     }
 }
 
-impl TypeContents : ops::Sub<TypeContents,TypeContents> {
+impl ops::Sub<TypeContents,TypeContents> for TypeContents {
     pure fn sub(&self, other: &TypeContents) -> TypeContents {
         TypeContents {bits: self.bits & !other.bits}
     }
 }
 
-impl TypeContents : ToStr {
+impl ToStr for TypeContents {
     pure fn to_str(&self) -> ~str {
         fmt!("TypeContents(%s)", u32::to_str_radix(self.bits, 2))
     }
@@ -2586,7 +2586,7 @@ pub fn index_sty(cx: ctxt, sty: &sty) -> Option<mt> {
     }
 }
 
-impl bound_region : to_bytes::IterBytes {
+impl to_bytes::IterBytes for bound_region {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           ty::br_self => 0u8.iter_bytes(lsb0, f),
@@ -2606,7 +2606,7 @@ impl bound_region : to_bytes::IterBytes {
     }
 }
 
-impl Region : to_bytes::IterBytes {
+impl to_bytes::IterBytes for Region {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           re_bound(ref br) =>
@@ -2626,7 +2626,7 @@ impl Region : to_bytes::IterBytes {
     }
 }
 
-impl vstore : to_bytes::IterBytes {
+impl to_bytes::IterBytes for vstore {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           vstore_fixed(ref u) =>
@@ -2641,7 +2641,7 @@ impl vstore : to_bytes::IterBytes {
     }
 }
 
-impl substs : to_bytes::IterBytes {
+impl to_bytes::IterBytes for substs {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
           to_bytes::iter_bytes_3(&self.self_r,
                                  &self.self_ty,
@@ -2649,28 +2649,28 @@ impl substs : to_bytes::IterBytes {
     }
 }
 
-impl mt : to_bytes::IterBytes {
+impl to_bytes::IterBytes for mt {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
           to_bytes::iter_bytes_2(&self.ty,
                                  &self.mutbl, lsb0, f)
     }
 }
 
-impl field : to_bytes::IterBytes {
+impl to_bytes::IterBytes for field {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
           to_bytes::iter_bytes_2(&self.ident,
                                  &self.mt, lsb0, f)
     }
 }
 
-impl arg : to_bytes::IterBytes {
+impl to_bytes::IterBytes for arg {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_2(&self.mode,
                                &self.ty, lsb0, f)
     }
 }
 
-impl FnSig : to_bytes::IterBytes {
+impl to_bytes::IterBytes for FnSig {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_2(&self.inputs,
                                &self.output,
@@ -2678,7 +2678,7 @@ impl FnSig : to_bytes::IterBytes {
     }
 }
 
-impl sty : to_bytes::IterBytes {
+impl to_bytes::IterBytes for sty {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           ty_nil => 0u8.iter_bytes(lsb0, f),
@@ -4383,14 +4383,14 @@ pub fn get_impl_id(tcx: ctxt, trait_id: def_id, self_ty: t) -> def_id {
     }
 }
 
-impl mt : cmp::Eq {
+impl cmp::Eq for mt {
     pure fn eq(&self, other: &mt) -> bool {
         (*self).ty == (*other).ty && (*self).mutbl == (*other).mutbl
     }
     pure fn ne(&self, other: &mt) -> bool { !(*self).eq(other) }
 }
 
-impl vstore : cmp::Eq {
+impl cmp::Eq for vstore {
     pure fn eq(&self, other: &vstore) -> bool {
         match (*self) {
             vstore_fixed(e0a) => {
@@ -4422,7 +4422,7 @@ impl vstore : cmp::Eq {
     pure fn ne(&self, other: &vstore) -> bool { !(*self).eq(other) }
 }
 
-impl Region : cmp::Eq {
+impl cmp::Eq for Region {
     pure fn eq(&self, other: &Region) -> bool {
         match (*self) {
             re_bound(e0a) => {
@@ -4460,7 +4460,7 @@ impl Region : cmp::Eq {
     pure fn ne(&self, other: &Region) -> bool { !(*self).eq(other) }
 }
 
-impl bound_region : cmp::Eq {
+impl cmp::Eq for bound_region {
     pure fn eq(&self, other: &bound_region) -> bool {
         match (*self) {
             br_self => {
@@ -4498,7 +4498,7 @@ impl bound_region : cmp::Eq {
     pure fn ne(&self, other: &bound_region) -> bool { !(*self).eq(other) }
 }
 
-impl param_bound : cmp::Eq {
+impl cmp::Eq for param_bound {
     pure fn eq(&self, other: &param_bound) -> bool {
         match (*self) {
             bound_copy => {
index fd967956b488ffb045a15bc6e0f5c59d1ba3a374..f6af29c1a8df9930a61446da815c887ec5ad8c1f 100644 (file)
@@ -490,7 +490,7 @@ fn then<T:Copy>(f: fn() -> Result<T,ty::type_err>)
         -> Result<T,ty::type_err>;
 }
 
-impl ures: then {
+impl then for ures {
     fn then<T:Copy>(f: fn() -> Result<T,ty::type_err>)
         -> Result<T,ty::type_err> {
         self.chain(|_i| f())
@@ -501,7 +501,7 @@ trait ToUres {
     fn to_ures() -> ures;
 }
 
-impl<T> cres<T>: ToUres {
+impl<T> ToUres for cres<T> {
     fn to_ures() -> ures {
         match self {
           Ok(ref _v) => Ok(()),
@@ -514,7 +514,7 @@ trait CresCompare<T> {
     fn compare(t: T, f: fn() -> ty::type_err) -> cres<T>;
 }
 
-impl<T:Copy Eq> cres<T>: CresCompare<T> {
+impl<T:Copy Eq> CresCompare<T> for cres<T> {
     fn compare(t: T, f: fn() -> ty::type_err) -> cres<T> {
         do self.chain |s| {
             if s == t {
index 230bfe693e093c8c14c0a64008015a39423af575..c838a52a6892f18ec8f89cd40e3bda761ae54ad4 100644 (file)
@@ -568,7 +568,7 @@ enum Constraint {
     ConstrainVarSubReg(RegionVid, Region)
 }
 
-impl Constraint : cmp::Eq {
+impl cmp::Eq for Constraint {
     pure fn eq(&self, other: &Constraint) -> bool {
         match ((*self), (*other)) {
             (ConstrainVarSubVar(v0a, v1a), ConstrainVarSubVar(v0b, v1b)) => {
@@ -588,7 +588,7 @@ impl Constraint : cmp::Eq {
     pure fn ne(&self, other: &Constraint) -> bool { !(*self).eq(other) }
 }
 
-impl Constraint : to_bytes::IterBytes {
+impl to_bytes::IterBytes for Constraint {
    pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         match *self {
           ConstrainVarSubVar(ref v0, ref v1) =>
@@ -608,14 +608,14 @@ struct TwoRegions {
     b: Region,
 }
 
-impl TwoRegions : cmp::Eq {
+impl cmp::Eq for TwoRegions {
     pure fn eq(&self, other: &TwoRegions) -> bool {
         (*self).a == (*other).a && (*self).b == (*other).b
     }
     pure fn ne(&self, other: &TwoRegions) -> bool { !(*self).eq(other) }
 }
 
-impl TwoRegions : to_bytes::IterBytes {
+impl to_bytes::IterBytes for TwoRegions {
     pure fn iter_bytes(&self, +lsb0: bool, f: to_bytes::Cb) {
         to_bytes::iter_bytes_2(&self.a, &self.b, lsb0, f)
     }
index caa02da2858bcf965a7cb8532e5a9797cc942020..fa02c14b6c906eb73f28bb1c4908e689d06ecde3 100644 (file)
@@ -279,7 +279,7 @@ trait get_and_find_region {
     fn find(br: ty::bound_region) -> Option<ty::Region>;
 }
 
-impl isr_alist: get_and_find_region {
+impl get_and_find_region for isr_alist {
     fn get(br: ty::bound_region) -> ty::Region {
         self.find(br).get()
     }
index 1d629467a42e9ebd99e22d037832551b68405a31..f07701f05e7996abcaa6fcc90a8160a017820f9d 100644 (file)
@@ -59,7 +59,7 @@ pub struct Srv {
     ch: SharedChan<Msg>
 }
 
-impl Srv: Clone {
+impl Clone for Srv {
     fn clone(&self) -> Srv {
         Srv {
             ch: self.ch.clone()
index 90b18599620cb0d76f0f05f8184babd0686c6317..f75f4b83a1d621ddf3a731509ef60dd126ec0ccd 100644 (file)
@@ -28,7 +28,7 @@ pub enum OutputFormat {
     pub PandocHtml
 }
 
-impl OutputFormat : cmp::Eq {
+impl cmp::Eq for OutputFormat {
     pure fn eq(&self, other: &OutputFormat) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
@@ -43,7 +43,7 @@ pub enum OutputStyle {
     pub DocPerMod
 }
 
-impl OutputStyle : cmp::Eq {
+impl cmp::Eq for OutputStyle {
     pure fn eq(&self, other: &OutputStyle) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index ffc0d668aed77d03fcb1e0fc70cba38301546432..3c45c4a6fa03673b867ed04691d25c9f5b18e1f4 100644 (file)
@@ -187,7 +187,7 @@ trait TheShunnedHouse {
 }
 
 /// Whatever
-impl OmNomNomy: TheShunnedHouse {
+impl TheShunnedHouse for OmNomNomy {
     fn dingy_house(&self, _unkempt_yard: int) {
     }
 
index 2eb4ed97871323801149d2d1d9b4b1bcbb6485b0..40617e13b8d5e8539b6b36aeddd2fbd9ae521a6e 100644 (file)
@@ -284,7 +284,7 @@ pub trait PageUtils {
     fn types(&self) -> ~[TyDoc];
 }
 
-impl ~[Page]: PageUtils {
+impl PageUtils for ~[Page] {
 
     fn mods(&self) -> ~[ModDoc] {
         do vec::filter_mapped(*self) |page| {
@@ -363,7 +363,7 @@ pub trait Item {
     pure fn item(&self) -> ItemDoc;
 }
 
-impl ItemTag: Item {
+impl Item for ItemTag {
     pure fn item(&self) -> ItemDoc {
         match self {
           &doc::ModTag(ref doc) => copy doc.item,
@@ -379,31 +379,31 @@ impl ItemTag: Item {
     }
 }
 
-impl SimpleItemDoc: Item {
+impl Item for SimpleItemDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl ModDoc: Item {
+impl Item for ModDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl NmodDoc: Item {
+impl Item for NmodDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl EnumDoc: Item {
+impl Item for EnumDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl TraitDoc: Item {
+impl Item for TraitDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl ImplDoc: Item {
+impl Item for ImplDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
-impl StructDoc: Item {
+impl Item for StructDoc {
     pure fn item(&self) -> ItemDoc { copy self.item }
 }
 
@@ -416,7 +416,7 @@ pub trait ItemUtils {
     pure fn sections(&self) -> ~[Section];
 }
 
-impl<A:Item> A: ItemUtils {
+impl<A:Item> ItemUtils for A {
     pure fn id(&self) -> AstId {
         self.item().id
     }
index e9b25b07de15bdb5c25f65300411e9cbdcdb0a72..b9e598dc19d6699cc36d0cf4f358328fe6aabe38 100644 (file)
@@ -35,7 +35,7 @@ pub struct Fold<T> {
     fold_struct: FoldStruct<T>
 }
 
-impl<T: Clone> Fold<T>: Clone {
+impl<T: Clone> Clone for Fold<T> {
     fn clone(&self) -> Fold<T> {
         Fold {
             ctxt: self.ctxt.clone(),
index 7577785d95422c7d294d5538d157282172ae3679..f0d9effe6fc517abd993ec68041b3258a57d791b 100644 (file)
@@ -43,7 +43,7 @@ pub trait WriterUtils {
     fn write_done(&self);
 }
 
-impl Writer: WriterUtils {
+impl WriterUtils for Writer {
     fn write_str(&self, str: ~str) {
         (*self)(Write(str));
     }
index 165ab989a2f065bfe1ba5357de7227155fb914e3..7dc8d0202cbf10df0814f2503a36e9467d36f470 100644 (file)
@@ -34,7 +34,7 @@ struct Ctxt {
     mut path: ~[~str]
 }
 
-impl Ctxt: Clone {
+impl Clone for Ctxt {
     fn clone(&self) -> Ctxt {
         Ctxt {
             srv: self.srv.clone(),
index aa15c104540f60f2371f5a117bbd500cbf8aff7d..3ec9d17c854bec0e4d6e0a5a475d4b43b3c1c6bd 100644 (file)
@@ -17,6 +17,6 @@ pub struct NominalOp<T> {
     op: T
 }
 
-impl<T: Copy> NominalOp<T>: Clone {
+impl<T: Copy> Clone for NominalOp<T> {
     fn clone(&self) -> NominalOp<T> { copy *self }
 }
index 0a51a7ef191451eb6b93d681bb88d11316047810..59e278f17960ff38d7f14c0eab0c47a8dcc7f60e 100644 (file)
@@ -117,7 +117,7 @@ pub fn unwrap<T: Const Owned>(rc: ARC<T>) -> T {
     unsafe { unwrap_shared_mutable_state(move x) }
 }
 
-impl<T: Const Owned> ARC<T>: Clone {
+impl<T: Const Owned> Clone for ARC<T> {
     fn clone(&self) -> ARC<T> {
         clone(self)
     }
@@ -148,7 +148,7 @@ pub fn mutex_arc_with_condvars<T: Owned>(user_data: T,
     MutexARC { x: unsafe { shared_mutable_state(move data) } }
 }
 
-impl<T: Owned> MutexARC<T>: Clone {
+impl<T: Owned> Clone for MutexARC<T> {
     /// Duplicate a mutex-protected ARC, as arc::clone.
     fn clone(&self) -> MutexARC<T> {
         // NB: Cloning the underlying mutex is not necessary. Its reference
@@ -247,7 +247,7 @@ struct PoisonOnFail {
     failed: *mut bool,
 }
 
-impl PoisonOnFail : Drop {
+impl Drop for PoisonOnFail {
     fn finalize(&self) {
         unsafe {
             /* assert !*self.failed;
index 9beb8e276ef989d7c09a551a51be207e0163cacb..177932aa072a167629147efd3291d7afda440f58 100644 (file)
@@ -81,7 +81,7 @@ pub struct Arena {
     priv mut chunks: @List<Chunk>,
 }
 
-impl Arena : Drop {
+impl Drop for Arena {
     fn finalize(&self) {
         unsafe {
             destroy_chunk(&self.head);
index 10ea113f74e524b3bfbce1cb44847dfbf13584c9..5065e15bb5e30c728d9564e3e3009512f732e970 100644 (file)
@@ -17,7 +17,7 @@ pub trait ToBase64 {
     pure fn to_base64() -> ~str;
 }
 
-impl &[u8]: ToBase64 {
+impl ToBase64 for &[u8] {
     pure fn to_base64() -> ~str {
         let chars = str::chars(
           ~"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
@@ -70,7 +70,7 @@ impl &[u8]: ToBase64 {
     }
 }
 
-impl &str: ToBase64 {
+impl ToBase64 for &str {
     pure fn to_base64() -> ~str {
         str::to_bytes(self).to_base64()
     }
@@ -80,7 +80,7 @@ pub trait FromBase64 {
     pure fn from_base64() -> ~[u8];
 }
 
-impl ~[u8]: FromBase64 {
+impl FromBase64 for ~[u8] {
     pure fn from_base64() -> ~[u8] {
         if self.len() % 4u != 0u { fail!(~"invalid base64 length"); }
 
@@ -142,7 +142,7 @@ impl ~[u8]: FromBase64 {
     }
 }
 
-impl ~str: FromBase64 {
+impl FromBase64 for ~str {
     pure fn from_base64() -> ~[u8] {
         str::to_bytes(self).from_base64()
     }
index 2c713e58e9a86da8dc79fb7240e491b6687c8195..ab622438511bbe56e54d43af478ec3e2c52c38b9 100644 (file)
@@ -75,29 +75,29 @@ pub struct BigUint {
     priv data: ~[BigDigit]
 }
 
-impl BigUint : Eq {
+impl Eq for BigUint {
     pure fn eq(&self, other: &BigUint) -> bool { self.cmp(other) == 0 }
     pure fn ne(&self, other: &BigUint) -> bool { self.cmp(other) != 0 }
 }
 
-impl BigUint : Ord {
+impl Ord for BigUint {
     pure fn lt(&self, other: &BigUint) -> bool { self.cmp(other) <  0 }
     pure fn le(&self, other: &BigUint) -> bool { self.cmp(other) <= 0 }
     pure fn ge(&self, other: &BigUint) -> bool { self.cmp(other) >= 0 }
     pure fn gt(&self, other: &BigUint) -> bool { self.cmp(other) >  0 }
 }
 
-impl BigUint : ToStr {
+impl ToStr for BigUint {
     pure fn to_str(&self) -> ~str { self.to_str_radix(10) }
 }
 
-impl BigUint : from_str::FromStr {
+impl from_str::FromStr for BigUint {
     static pure fn from_str(s: &str) -> Option<BigUint> {
         BigUint::from_str_radix(s, 10)
     }
 }
 
-impl BigUint : Shl<uint, BigUint> {
+impl Shl<uint, BigUint> for BigUint {
     pure fn shl(&self, rhs: &uint) -> BigUint {
         let n_unit = *rhs / BigDigit::bits;
         let n_bits = *rhs % BigDigit::bits;
@@ -105,7 +105,7 @@ impl BigUint : Shl<uint, BigUint> {
     }
 }
 
-impl BigUint : Shr<uint, BigUint> {
+impl Shr<uint, BigUint> for BigUint {
     pure fn shr(&self, rhs: &uint) -> BigUint {
         let n_unit = *rhs / BigDigit::bits;
         let n_bits = *rhs % BigDigit::bits;
@@ -113,15 +113,15 @@ impl BigUint : Shr<uint, BigUint> {
     }
 }
 
-impl BigUint : Zero {
+impl Zero for BigUint {
     static pure fn zero() -> BigUint { BigUint::new(~[]) }
 }
 
-impl BigUint : One {
+impl One for BigUint {
     static pub pure fn one() -> BigUint { BigUint::new(~[1]) }
 }
 
-impl BigUint : Add<BigUint, BigUint> {
+impl Add<BigUint, BigUint> for BigUint {
     pure fn add(&self, other: &BigUint) -> BigUint {
         let new_len = uint::max(self.data.len(), other.data.len());
 
@@ -140,7 +140,7 @@ impl BigUint : Add<BigUint, BigUint> {
     }
 }
 
-impl BigUint : Sub<BigUint, BigUint> {
+impl Sub<BigUint, BigUint> for BigUint {
     pure fn sub(&self, other: &BigUint) -> BigUint {
         let new_len = uint::max(self.data.len(), other.data.len());
 
@@ -165,7 +165,7 @@ impl BigUint : Sub<BigUint, BigUint> {
     }
 }
 
-impl BigUint : Mul<BigUint, BigUint> {
+impl Mul<BigUint, BigUint> for BigUint {
     pure fn mul(&self, other: &BigUint) -> BigUint {
         if self.is_zero() || other.is_zero() { return Zero::zero(); }
 
@@ -230,25 +230,25 @@ impl BigUint : Mul<BigUint, BigUint> {
     }
 }
 
-impl BigUint : Div<BigUint, BigUint> {
+impl Div<BigUint, BigUint> for BigUint {
     pure fn div(&self, other: &BigUint) -> BigUint {
         let (d, _) = self.divmod(other);
         return d;
     }
 }
 
-impl BigUint : Modulo<BigUint, BigUint> {
+impl Modulo<BigUint, BigUint> for BigUint {
     pure fn modulo(&self, other: &BigUint) -> BigUint {
         let (_, m) = self.divmod(other);
         return m;
     }
 }
 
-impl BigUint : Neg<BigUint> {
+impl Neg<BigUint> for BigUint {
     pure fn neg(&self) -> BigUint { fail!() }
 }
 
-impl BigUint : IntConvertible {
+impl IntConvertible for BigUint {
     pure fn to_int(&self) -> int {
         uint::min(self.to_uint(), int::max_value as uint) as int
     }
@@ -554,12 +554,12 @@ pub impl BigUint {
 /// A Sign is a BigInt's composing element.
 pub enum Sign { Minus, Zero, Plus }
 
-impl Sign : Eq {
+impl Eq for Sign {
     pure fn eq(&self, other: &Sign) -> bool { self.cmp(other) == 0 }
     pure fn ne(&self, other: &Sign) -> bool { self.cmp(other) != 0 }
 }
 
-impl Sign : Ord {
+impl Ord for Sign {
     pure fn lt(&self, other: &Sign) -> bool { self.cmp(other) <  0 }
     pure fn le(&self, other: &Sign) -> bool { self.cmp(other) <= 0 }
     pure fn ge(&self, other: &Sign) -> bool { self.cmp(other) >= 0 }
@@ -592,53 +592,53 @@ pub struct BigInt {
     priv data: BigUint
 }
 
-impl BigInt : Eq {
+impl Eq for BigInt {
     pure fn eq(&self, other: &BigInt) -> bool { self.cmp(other) == 0 }
     pure fn ne(&self, other: &BigInt) -> bool { self.cmp(other) != 0 }
 }
 
-impl BigInt : Ord {
+impl Ord for BigInt {
     pure fn lt(&self, other: &BigInt) -> bool { self.cmp(other) <  0 }
     pure fn le(&self, other: &BigInt) -> bool { self.cmp(other) <= 0 }
     pure fn ge(&self, other: &BigInt) -> bool { self.cmp(other) >= 0 }
     pure fn gt(&self, other: &BigInt) -> bool { self.cmp(other) >  0 }
 }
 
-impl BigInt : ToStr {
+impl ToStr for BigInt {
     pure fn to_str(&self) -> ~str { self.to_str_radix(10) }
 }
 
-impl BigInt : from_str::FromStr {
+impl from_str::FromStr for BigInt {
     static pure fn from_str(s: &str) -> Option<BigInt> {
         BigInt::from_str_radix(s, 10)
     }
 }
 
-impl BigInt : Shl<uint, BigInt> {
+impl Shl<uint, BigInt> for BigInt {
     pure fn shl(&self, rhs: &uint) -> BigInt {
         BigInt::from_biguint(self.sign, self.data << *rhs)
     }
 }
 
-impl BigInt : Shr<uint, BigInt> {
+impl Shr<uint, BigInt> for BigInt {
     pure fn shr(&self, rhs: &uint) -> BigInt {
         BigInt::from_biguint(self.sign, self.data >> *rhs)
     }
 }
 
-impl BigInt : Zero {
+impl Zero for BigInt {
     static pub pure fn zero() -> BigInt {
         BigInt::from_biguint(Zero, Zero::zero())
     }
 }
 
-impl BigInt : One {
+impl One for BigInt {
     static pub pure fn one() -> BigInt {
         BigInt::from_biguint(Plus, One::one())
     }
 }
 
-impl BigInt : Add<BigInt, BigInt> {
+impl Add<BigInt, BigInt> for BigInt {
     pure fn add(&self, other: &BigInt) -> BigInt {
         match (self.sign, other.sign) {
             (Zero, _)      => copy *other,
@@ -652,7 +652,7 @@ impl BigInt : Add<BigInt, BigInt> {
     }
 }
 
-impl BigInt : Sub<BigInt, BigInt> {
+impl Sub<BigInt, BigInt> for BigInt {
     pure fn sub(&self, other: &BigInt) -> BigInt {
         match (self.sign, other.sign) {
             (Zero, _)    => -other,
@@ -672,7 +672,7 @@ impl BigInt : Sub<BigInt, BigInt> {
     }
 }
 
-impl BigInt : Mul<BigInt, BigInt> {
+impl Mul<BigInt, BigInt> for BigInt {
     pure fn mul(&self, other: &BigInt) -> BigInt {
         match (self.sign, other.sign) {
             (Zero, _)     | (_,     Zero)  => Zero::zero(),
@@ -686,27 +686,27 @@ impl BigInt : Mul<BigInt, BigInt> {
     }
 }
 
-impl BigInt : Div<BigInt, BigInt> {
+impl Div<BigInt, BigInt> for BigInt {
     pure fn div(&self, other: &BigInt) -> BigInt {
         let (d, _) = self.divmod(other);
         return d;
     }
 }
 
-impl BigInt : Modulo<BigInt, BigInt> {
+impl Modulo<BigInt, BigInt> for BigInt {
     pure fn modulo(&self, other: &BigInt) -> BigInt {
         let (_, m) = self.divmod(other);
         return m;
     }
 }
 
-impl BigInt : Neg<BigInt> {
+impl Neg<BigInt> for BigInt {
     pure fn neg(&self) -> BigInt {
         BigInt::from_biguint(self.sign.neg(), copy self.data)
     }
 }
 
-impl BigInt : IntConvertible {
+impl IntConvertible for BigInt {
     pure fn to_int(&self) -> int {
         match self.sign {
             Plus  => uint::min(self.to_uint(), int::max_value as uint) as int,
index d62fb2e8f6ec31ee27728bb61bec6c4679a1d4d3..e6557d163f9dbdd1c283a537b345693e38e51da8 100644 (file)
@@ -507,7 +507,7 @@ fn ones(f: fn(uint) -> bool) {
 
 }
 
-impl Bitv: Clone {
+impl Clone for Bitv {
     /// Makes a copy of a bitvector
     #[inline(always)]
     fn clone(&self) -> Bitv {
@@ -568,7 +568,7 @@ pub fn from_fn(len: uint, f: fn(index: uint) -> bool) -> Bitv {
 
 pure fn right(_w0: uint, w1: uint) -> uint { return w1; }
 
-impl Bitv: ops::Index<uint,bool> {
+impl ops::Index<uint,bool> for Bitv {
     pure fn index(&self, i: uint) -> bool {
         self.get(i)
     }
index 5ea5418d9882e66c7c968ba6789b3b493191dd7d..696b2753ea44b9d2de30576d2918e32e21115e60 100644 (file)
@@ -56,7 +56,7 @@ struct DtorRes {
   dtor: Option<fn@()>,
 }
 
-impl DtorRes : Drop {
+impl Drop for DtorRes {
     fn finalize(&self) {
         match self.dtor {
           option::None => (),
index 991953cccb7fa5d39463ec2669fc87f107a0abb8..a73b5f2a706d0382ae2ccf46daaccb5f1fbbb4e2 100644 (file)
@@ -21,7 +21,7 @@ pub trait FuzzyEq<Eps> {
     pure fn fuzzy_eq_eps(&self, other: &Self, epsilon: &Eps) -> bool;
 }
 
-impl float: FuzzyEq<float> {
+impl FuzzyEq<float> for float {
     pure fn fuzzy_eq(&self, other: &float) -> bool {
         self.fuzzy_eq_eps(other, &FUZZY_EPSILON)
     }
@@ -31,7 +31,7 @@ impl float: FuzzyEq<float> {
     }
 }
 
-impl f32: FuzzyEq<f32> {
+impl FuzzyEq<f32> for f32 {
     pure fn fuzzy_eq(&self, other: &f32) -> bool {
         self.fuzzy_eq_eps(other, &(FUZZY_EPSILON as f32))
     }
@@ -41,7 +41,7 @@ impl f32: FuzzyEq<f32> {
     }
 }
 
-impl f64: FuzzyEq<f64> {
+impl FuzzyEq<f64> for f64 {
     pure fn fuzzy_eq(&self, other: &f64) -> bool {
         self.fuzzy_eq_eps(other, &(FUZZY_EPSILON as f64))
     }
@@ -70,7 +70,7 @@ mod test_complex{
 
     struct Complex { r: float, i: float }
 
-    impl Complex: FuzzyEq<float> {
+    impl FuzzyEq<float> for Complex {
         pure fn fuzzy_eq(&self, other: &Complex) -> bool {
             self.fuzzy_eq_eps(other, &FUZZY_EPSILON)
         }
index 71eb29e26eba750c466d52c645d21508867b14e3..47f3c70352c3bd90138642261ce1c521cf557613 100644 (file)
@@ -25,19 +25,19 @@ pub struct DuplexStream<T, U> {
     priv port: Port<U>,
 }
 
-impl<T: Owned, U: Owned> DuplexStream<T, U> : GenericChan<T> {
+impl<T: Owned, U: Owned> GenericChan<T> for DuplexStream<T, U> {
     fn send(x: T) {
         self.chan.send(move x)
     }
 }
 
-impl<T: Owned, U: Owned> DuplexStream<T, U> : GenericSmartChan<T> {
+impl<T: Owned, U: Owned> GenericSmartChan<T> for DuplexStream<T, U> {
     fn try_send(x: T) -> bool {
         self.chan.try_send(move x)
     }
 }
 
-impl<T: Owned, U: Owned> DuplexStream<T, U> : GenericPort<U> {
+impl<T: Owned, U: Owned> GenericPort<U> for DuplexStream<T, U> {
     fn recv() -> U {
         self.port.recv()
     }
@@ -47,13 +47,13 @@ fn try_recv() -> Option<U> {
     }
 }
 
-impl<T: Owned, U: Owned> DuplexStream<T, U> : Peekable<U> {
+impl<T: Owned, U: Owned> Peekable<U> for DuplexStream<T, U> {
     pure fn peek() -> bool {
         self.port.peek()
     }
 }
 
-impl<T: Owned, U: Owned> DuplexStream<T, U> : Selectable {
+impl<T: Owned, U: Owned> Selectable for DuplexStream<T, U> {
     pure fn header() -> *pipes::PacketHeader {
         self.port.header()
     }
index 7d819ba0b3f227f63282394f5aa7cabae207cfc6..772cacf47a11bf719321fada3d1d37463c46ad39 100644 (file)
@@ -67,7 +67,7 @@ struct Repr<T> {
         elts: DVec<Cell<T>>,
     }
 
-    impl <T: Copy> Repr<T>: Deque<T> {
+    impl<T: Copy> Deque<T> for Repr<T> {
         fn size() -> uint { return self.nelts; }
         fn add_front(t: T) {
             let oldlo: uint = self.lo;
index c332c7656b4c466064931501d307cf6cee836c16..f691dfe6a627389b8765505a9ef055d0d26a5fd7 100644 (file)
@@ -74,7 +74,7 @@ pub mod reader {
 
     // ebml reading
 
-    impl Doc: ops::Index<uint,Doc> {
+    impl ops::Index<uint,Doc> for Doc {
         pure fn index(&self, tag: uint) -> Doc {
             unsafe {
                 get_doc(*self, tag)
@@ -285,7 +285,7 @@ fn read_opaque<R>(&self, op: fn(Doc) -> R) -> R {
         }
     }
 
-    impl Decoder: serialize::Decoder {
+    impl serialize::Decoder for Decoder {
         fn read_nil(&self) -> () { () }
 
         fn read_u64(&self) -> u64 { doc_as_u64(self.next_doc(EsU64)) }
@@ -577,7 +577,7 @@ fn emit_opaque(&self, f: fn()) {
         }
     }
 
-    impl Encoder: ::serialize::Encoder {
+    impl ::serialize::Encoder for Encoder {
         fn emit_nil(&self) {}
 
         fn emit_uint(&self, v: uint) {
index a7507a971c85fb53e8ac419ee013d1595e7013c6..dad761ac20d7cdf5128ded75f0af30eb06272741 100644 (file)
@@ -303,7 +303,7 @@ fn try_recv() -> Option<T> {
     }
 }
 
-impl<T,F:Flattener<T>,C:ByteChan> FlatChan<T, F, C>: GenericChan<T> {
+impl<T,F:Flattener<T>,C:ByteChan> GenericChan<T> for FlatChan<T, F, C> {
     fn send(val: T) {
         self.byte_chan.send(CONTINUE.to_vec());
         let bytes = self.flattener.flatten(move val);
@@ -474,7 +474,7 @@ pub trait FromWriter {
         static fn from_writer(w: Writer) -> Self;
     }
 
-    impl json::Decoder: FromReader {
+    impl FromReader for json::Decoder {
         static fn from_reader(r: Reader) -> json::Decoder {
             match json::from_reader(r) {
                 Ok(move json) => {
@@ -485,13 +485,13 @@ impl json::Decoder: FromReader {
         }
     }
 
-    impl json::Encoder: FromWriter {
+    impl FromWriter for json::Encoder {
         static fn from_writer(w: Writer) -> json::Encoder {
             json::Encoder(move w)
         }
     }
 
-    impl ebml::reader::Decoder: FromReader {
+    impl FromReader for ebml::reader::Decoder {
         static fn from_reader(r: Reader) -> ebml::reader::Decoder {
             let buf = @r.read_whole_stream();
             let doc = ebml::reader::Doc(buf);
@@ -499,7 +499,7 @@ impl ebml::reader::Decoder: FromReader {
         }
     }
 
-    impl ebml::writer::Encoder: FromWriter {
+    impl FromWriter for ebml::writer::Encoder {
         static fn from_writer(w: Writer) -> ebml::writer::Encoder {
             ebml::writer::Encoder(move w)
         }
index ec71c30242cf273f1ae0e1cdbc7843b8cd2f0fc2..8659e3cbb102cdb5ebe7c6dea38c21172a10c379 100644 (file)
@@ -36,7 +36,7 @@ pub struct Future<A> {
 
 // FIXME(#2829) -- futures should not be copyable, because they close
 // over fn~'s that have pipes and so forth within!
-impl<A> Future<A> : Drop {
+impl<A> Drop for Future<A> {
     fn finalize(&self) {}
 }
 
index 9a90b811e44c540fbca0a48fa328754356ef0ff3..3cc28563e12eb87b528bd6f047ec0b795e983429 100644 (file)
@@ -42,7 +42,7 @@ pub impl BufReader {
     }
 }
 
-impl BufReader: Reader {
+impl Reader for BufReader {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         self.as_bytes_reader(|r| r.read(bytes, len) )
     }
index 95f9130fa372f427295a865a0185a0cc1f9a5da0..fcdd2de5743a3591ceb31b4871be7b217e716b6f 100644 (file)
@@ -949,7 +949,7 @@ fn read_tup_elt<T>(&self, idx: uint, f: fn() -> T) -> T {
     }
 }
 
-impl Json : Eq {
+impl Eq for Json {
     pure fn eq(&self, other: &Json) -> bool {
         match (self) {
             &Number(f0) =>
@@ -987,7 +987,7 @@ impl Json : Eq {
 }
 
 /// Test if two json values are less than one another
-impl Json : Ord {
+impl Ord for Json {
     pure fn lt(&self, other: &Json) -> bool {
         match (*self) {
             Number(f0) => {
@@ -1063,7 +1063,7 @@ impl Json : Ord {
     pure fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self))  }
 }
 
-impl Error : Eq {
+impl Eq for Error {
     pure fn eq(&self, other: &Error) -> bool {
         (*self).line == other.line &&
         (*self).col == other.col &&
@@ -1074,83 +1074,83 @@ impl Error : Eq {
 
 trait ToJson { fn to_json() -> Json; }
 
-impl Json: ToJson {
+impl ToJson for Json {
     fn to_json() -> Json { copy self }
 }
 
-impl @Json: ToJson {
+impl ToJson for @Json {
     fn to_json() -> Json { (*self).to_json() }
 }
 
-impl int: ToJson {
+impl ToJson for int {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl i8: ToJson {
+impl ToJson for i8 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl i16: ToJson {
+impl ToJson for i16 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl i32: ToJson {
+impl ToJson for i32 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl i64: ToJson {
+impl ToJson for i64 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl uint: ToJson {
+impl ToJson for uint {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl u8: ToJson {
+impl ToJson for u8 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl u16: ToJson {
+impl ToJson for u16 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl u32: ToJson {
+impl ToJson for u32 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl u64: ToJson {
+impl ToJson for u64 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl float: ToJson {
+impl ToJson for float {
     fn to_json() -> Json { Number(self) }
 }
 
-impl f32: ToJson {
+impl ToJson for f32 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl f64: ToJson {
+impl ToJson for f64 {
     fn to_json() -> Json { Number(self as float) }
 }
 
-impl (): ToJson {
+impl ToJson for () {
     fn to_json() -> Json { Null }
 }
 
-impl bool: ToJson {
+impl ToJson for bool {
     fn to_json() -> Json { Boolean(self) }
 }
 
-impl ~str: ToJson {
+impl ToJson for ~str {
     fn to_json() -> Json { String(copy self) }
 }
 
-impl @~str: ToJson {
+impl ToJson for @~str {
     fn to_json() -> Json { String(copy *self) }
 }
 
-impl <A: ToJson, B: ToJson> (A, B): ToJson {
+impl<A: ToJson, B: ToJson> ToJson for (A, B) {
     fn to_json() -> Json {
         match self {
           (ref a, ref b) => {
@@ -1160,7 +1160,7 @@ fn to_json() -> Json {
     }
 }
 
-impl <A: ToJson, B: ToJson, C: ToJson> (A, B, C): ToJson {
+impl<A: ToJson, B: ToJson, C: ToJson> ToJson for (A, B, C) {
     fn to_json() -> Json {
         match self {
           (ref a, ref b, ref c) => {
@@ -1170,11 +1170,11 @@ fn to_json() -> Json {
     }
 }
 
-impl <A: ToJson> ~[A]: ToJson {
+impl<A: ToJson> ToJson for ~[A] {
     fn to_json() -> Json { List(self.map(|elt| elt.to_json())) }
 }
 
-impl <A: ToJson Copy> LinearMap<~str, A>: ToJson {
+impl<A: ToJson Copy> ToJson for LinearMap<~str, A> {
     fn to_json() -> Json {
         let mut d = LinearMap::new();
         for self.each |&(key, value)| {
@@ -1184,7 +1184,7 @@ fn to_json() -> Json {
     }
 }
 
-impl <A: ToJson> Option<A>: ToJson {
+impl<A: ToJson> ToJson for Option<A> {
     fn to_json() -> Json {
         match self {
           None => Null,
@@ -1193,11 +1193,11 @@ fn to_json() -> Json {
     }
 }
 
-impl Json: to_str::ToStr {
+impl to_str::ToStr for Json {
     pure fn to_str(&self) -> ~str { to_str(self) }
 }
 
-impl Error: to_str::ToStr {
+impl to_str::ToStr for Error {
     pure fn to_str(&self) -> ~str {
         fmt!("%u:%u: %s", self.line, self.col, *self.msg)
     }
index 2f423f4c8d4265321b9a7af6c107b89c0c87b165..88bacf53e636b05ba8f587477bad97737f9de9ab 100644 (file)
@@ -193,7 +193,7 @@ pub trait AsUnsafeU32 {
         unsafe fn as_u32() -> u32;
     }
 
-    impl Ipv4Rep: AsUnsafeU32 {
+    impl AsUnsafeU32 for Ipv4Rep {
         // this is pretty dastardly, i know
         unsafe fn as_u32() -> u32 {
             *((ptr::addr_of(&self)) as *u32)
index 8addea9c30bb17f03014f367f7d45a5886810097..4e0b5494883b0f8b6887c051946ad020884ee81f 100644 (file)
@@ -51,7 +51,7 @@ pub struct TcpSocket {
   socket_data: @TcpSocketData,
 }
 
-impl TcpSocket : Drop {
+impl Drop for TcpSocket {
     fn finalize(&self) {
         unsafe {
             tear_down_socket_data(self.socket_data)
@@ -863,7 +863,7 @@ pub fn get_peer_addr() -> ip::IpAddr {
 }
 
 /// Implementation of `io::reader` trait for a buffered `net::tcp::tcp_socket`
-impl TcpSocketBuf: io::Reader {
+impl io::Reader for TcpSocketBuf {
     fn read(&self, buf: &mut [u8], len: uint) -> uint {
         if len == 0 { return 0 }
         let mut count: uint = 0;
@@ -963,7 +963,7 @@ fn tell(&self) -> uint {
 }
 
 /// Implementation of `io::reader` trait for a buffered `net::tcp::tcp_socket`
-impl TcpSocketBuf: io::Writer {
+impl io::Writer for TcpSocketBuf {
     pub fn write(&self, data: &[const u8]) {
         unsafe {
             let socket_data_ptr =
@@ -1264,7 +1264,7 @@ trait ToTcpErr {
     fn to_tcp_err() -> TcpErrData;
 }
 
-impl uv::ll::uv_err_data: ToTcpErr {
+impl ToTcpErr for uv::ll::uv_err_data {
     fn to_tcp_err() -> TcpErrData {
         TcpErrData { err_name: self.err_name, err_msg: self.err_msg }
     }
index 1da3a64251405ac32eef42dc3f9de9d96a7d89c9..7874899cb27acbd87e26cc16571c7fb1e88c3e2c 100644 (file)
@@ -668,7 +668,7 @@ enum State {
     Ok(Url::new(scheme, userinfo, host, port, path, query, fragment))
 }
 
-impl Url: FromStr {
+impl FromStr for Url {
     static pure fn from_str(s: &str) -> Option<Url> {
         match from_str(s) {
             Ok(move url) => Some(url),
@@ -718,13 +718,13 @@ impl Url: FromStr {
     fmt!("%s:%s%s%s%s", url.scheme, authority, url.path, query, fragment)
 }
 
-impl Url: to_str::ToStr {
+impl to_str::ToStr for Url {
     pub pure fn to_str(&self) -> ~str {
         to_str(self)
     }
 }
 
-impl Url: to_bytes::IterBytes {
+impl to_bytes::IterBytes for Url {
     pure fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) {
         self.to_str().iter_bytes(lsb0, f)
     }
index 900b7068ce3d36e6abf7af6f04020608da52fc7d..3ad45cf2d5b309e97f6600ac14ccf9be2f4a93fe 100644 (file)
@@ -156,12 +156,12 @@ fn rehash() {
         }
     }
 
-    impl<K: Eq IterBytes Hash, V> T<K, V>: Container {
+    impl<K: Eq IterBytes Hash, V> Container for T<K, V> {
         pure fn len(&self) -> uint { self.count }
         pure fn is_empty(&self) -> bool { self.count == 0 }
     }
 
-    impl<K: Eq IterBytes Hash, V> T<K, V>: Mutable {
+    impl<K: Eq IterBytes Hash, V> Mutable for T<K, V> {
         fn clear(&mut self) {
             self.count = 0u;
             self.chains = chains(initial_capacity);
@@ -347,7 +347,7 @@ fn to_writer(wr: io::Writer) {
         }
     }
 
-    impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> T<K, V>: ToStr {
+    impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> ToStr for T<K, V> {
         pure fn to_str(&self) -> ~str {
             unsafe {
                 // Meh -- this should be safe
@@ -356,7 +356,7 @@ impl<K:Eq IterBytes Hash Copy ToStr, V: ToStr Copy> T<K, V>: ToStr {
         }
     }
 
-    impl<K:Eq IterBytes Hash Copy, V: Copy> T<K, V>: ops::Index<K, V> {
+    impl<K:Eq IterBytes Hash Copy, V: Copy> ops::Index<K, V> for T<K, V> {
         pure fn index(&self, k: K) -> V {
             self.get(&k)
         }
index c9e739e3c8b839aab59ddd2853098c81a821cc72..5c3477660706e787c47167718467f8c68b343811 100644 (file)
@@ -78,7 +78,7 @@ pub fn insert<T: Copy>(self: SmallIntMap<T>, key: uint, val: T) {
     return !find(self, key).is_none();
 }
 
-impl<V> SmallIntMap<V>: Container {
+impl<V> Container for SmallIntMap<V> {
     /// Return the number of elements in the map
     pure fn len(&self) -> uint {
         let mut sz = 0u;
@@ -95,7 +95,7 @@ impl<V> SmallIntMap<V>: Container {
     pure fn is_empty(&self) -> bool { self.len() == 0 }
 }
 
-impl<V> SmallIntMap<V>: Mutable {
+impl<V> Mutable for SmallIntMap<V> {
     fn clear(&mut self) { self.v.set(~[]) }
 }
 
@@ -162,7 +162,7 @@ fn update(key: uint, newval: V, ff: fn(V, V) -> V) -> bool {
     }
 }
 
-impl<V: Copy> SmallIntMap<V>: ops::Index<uint, V> {
+impl<V: Copy> ops::Index<uint, V> for SmallIntMap<V> {
     pure fn index(&self, key: uint) -> V {
         unsafe {
             get(*self, key)
index a64aa5e9687429b3ba21d3efa8d3191b5b44858e..a25a4196b4cab423d1ca28c114defca1e24cf8dd 100644 (file)
@@ -27,7 +27,7 @@ pub struct PriorityQueue<T> {
     priv data: ~[T],
 }
 
-impl <T: Ord> PriorityQueue<T>: BaseIter<T> {
+impl<T: Ord> BaseIter<T> for PriorityQueue<T> {
     /// Visit all values in the underlying vector.
     ///
     /// The values are **not** visited in order.
@@ -35,7 +35,7 @@ impl <T: Ord> PriorityQueue<T>: BaseIter<T> {
     pure fn size_hint(&self) -> Option<uint> { self.data.size_hint() }
 }
 
-impl <T: Ord> PriorityQueue<T>: Container {
+impl<T: Ord> Container for PriorityQueue<T> {
     /// Returns the length of the queue
     pure fn len(&self) -> uint { self.data.len() }
 
@@ -43,7 +43,7 @@ impl <T: Ord> PriorityQueue<T>: Container {
     pure fn is_empty(&self) -> bool { self.data.is_empty() }
 }
 
-impl <T: Ord> PriorityQueue<T>: Mutable {
+impl<T: Ord> Mutable for PriorityQueue<T> {
     /// Drop all items from the queue
     fn clear(&mut self) { self.data.truncate(0) }
 }
index e89f37878300c0d226a2aa5274504cecf213e1bd..1d91fafa4f96229fc848f4fe0daa054578e59ba4 100644 (file)
@@ -228,7 +228,7 @@ fn pad_msg(st: &mut Sha1State) {
         process_msg_block(st);
     }
 
-    impl Sha1State: Sha1 {
+    impl Sha1 for Sha1State {
         fn reset(&mut self) {
             assert (vec::len(self.h) == digest_buf_len);
             self.len_low = 0u32;
index 2e5cd8956cd9d5a452b81557b22d11aed4f1647a..382cd658663dc8097b8673eb5557d852018c2ce3 100644 (file)
@@ -22,7 +22,7 @@ pub struct SmallIntMap<T> {
     priv v: ~[Option<T>],
 }
 
-impl<V> SmallIntMap<V>: BaseIter<(uint, &V)> {
+impl<V> BaseIter<(uint, &V)> for SmallIntMap<V> {
     /// Visit all key-value pairs in order
     pure fn each(&self, it: fn(&(uint, &self/V)) -> bool) {
         for uint::range(0, self.v.len()) |i| {
@@ -36,7 +36,7 @@ impl<V> SmallIntMap<V>: BaseIter<(uint, &V)> {
     pure fn size_hint(&self) -> Option<uint> { Some(self.len()) }
 }
 
-impl<V> SmallIntMap<V>: ReverseIter<(uint, &V)> {
+impl<V> ReverseIter<(uint, &V)> for SmallIntMap<V> {
     /// Visit all key-value pairs in reverse order
     pure fn each_reverse(&self, it: fn(&(uint, &self/V)) -> bool) {
         for uint::range_rev(self.v.len(), 0) |i| {
@@ -48,7 +48,7 @@ impl<V> SmallIntMap<V>: ReverseIter<(uint, &V)> {
     }
 }
 
-impl<V> SmallIntMap<V>: Container {
+impl<V> Container for SmallIntMap<V> {
     /// Return the number of elements in the map
     pure fn len(&self) -> uint {
         let mut sz = 0;
@@ -64,12 +64,12 @@ impl<V> SmallIntMap<V>: Container {
     pure fn is_empty(&self) -> bool { self.len() == 0 }
 }
 
-impl<V> SmallIntMap<V>: Mutable {
+impl<V> Mutable for SmallIntMap<V> {
     /// Clear the map, removing all key-value pairs.
     fn clear(&mut self) { self.v.clear() }
 }
 
-impl<V> SmallIntMap<V>: Map<uint, V> {
+impl<V> Map<uint, V> for SmallIntMap<V> {
     /// Return true if the map contains a value for the specified key
     pure fn contains_key(&self, key: &uint) -> bool {
         self.find(key).is_some()
index f8acbe8418086055600f2c036a8de644cbb1b650..98a451dc8abddeaa5ec4a580213da83d5b2303b4 100644 (file)
@@ -169,7 +169,7 @@ pub trait Sort {
     fn qsort(self);
 }
 
-impl<T: Copy Ord Eq> &mut [T] : Sort {
+impl<T: Copy Ord Eq> Sort for &mut [T] {
     fn qsort(self) { quick_sort3(self); }
 }
 
@@ -908,7 +908,7 @@ struct CVal {
         val: float,
     }
 
-    impl CVal: Ord {
+    impl Ord for CVal {
         pure fn lt(&self, other: &CVal) -> bool {
             unsafe {
                 let rng = rand::Rng();
@@ -973,7 +973,7 @@ fn crash_test() {
 
     struct DVal { val: uint }
 
-    impl DVal: Ord {
+    impl Ord for DVal {
         pure fn lt(&self, _x: &DVal) -> bool { true }
         pure fn le(&self, _x: &DVal) -> bool { true }
         pure fn gt(&self, _x: &DVal) -> bool { true }
@@ -1182,7 +1182,7 @@ struct LVal {
 
     }
 
-    impl LVal : Drop {
+    impl Drop for LVal {
         fn finalize(&self) {
             let x = unsafe { task::local_data::local_data_get(self.key) };
             match x {
@@ -1196,7 +1196,7 @@ fn finalize(&self) {
         }
     }
 
-    impl LVal: Ord {
+    impl Ord for LVal {
         pure fn lt(&self, other: &a/LVal/&self) -> bool {
             (*self).val < other.val
         }
index 2048cb6c59f0d7d6e7f7b1160a5c6628cc73c523..fb6f80a65008424f95db9c066c360252acaf66b4 100644 (file)
@@ -30,7 +30,7 @@ pub trait Stats {
     fn median_abs_dev_pct(self) -> f64;
 }
 
-impl &[f64] : Stats {
+impl Stats for &[f64] {
     fn sum(self) -> f64 {
         vec::foldl(0.0, self, |p,q| p + *q)
     }
index 8a5741201c009e4ac10c814403858b122d967e76..af773f5bf4e506716f17ba15ef8031043551ef21 100644 (file)
@@ -167,7 +167,7 @@ fn access<U>(blk: fn() -> U) -> U {
 type SemAndSignalRelease = SemReleaseGeneric<~[Waitqueue]>;
 struct SemReleaseGeneric<Q> { sem: &Sem<Q> }
 
-impl<Q: Owned> SemReleaseGeneric<Q> : Drop {
+impl<Q: Owned> Drop for SemReleaseGeneric<Q> {
     fn finalize(&self) {
         self.sem.release();
     }
@@ -189,7 +189,7 @@ fn SemAndSignalRelease(sem: &r/Sem<~[Waitqueue]>)
 /// A mechanism for atomic-unlock-and-deschedule blocking and signalling.
 pub struct Condvar { priv sem: &Sem<~[Waitqueue]> }
 
-impl Condvar : Drop { fn finalize(&self) {} }
+impl Drop for Condvar { fn finalize(&self) {} }
 
 impl &Condvar {
     /**
@@ -260,7 +260,7 @@ struct SemAndSignalReacquire {
             sem: &Sem<~[Waitqueue]>,
         }
 
-        impl SemAndSignalReacquire : Drop {
+        impl Drop for SemAndSignalReacquire {
             fn finalize(&self) {
                 unsafe {
                     // Needs to succeed, instead of itself dying.
@@ -362,7 +362,7 @@ pub fn semaphore(count: int) -> Semaphore {
     Semaphore { sem: new_sem(count, ()) }
 }
 
-impl Semaphore: Clone {
+impl Clone for Semaphore {
     /// Create a new handle to the semaphore.
     fn clone(&self) -> Semaphore {
         Semaphore { sem: Sem((*self.sem).clone()) }
@@ -412,7 +412,7 @@ pub fn mutex_with_condvars(num_condvars: uint) -> Mutex {
     Mutex { sem: new_sem_and_signal(1, num_condvars) }
 }
 
-impl Mutex: Clone {
+impl Clone for Mutex {
     /// Create a new handle to the mutex.
     fn clone(&self) -> Mutex { Mutex { sem: Sem((*self.sem).clone()) } }
 }
@@ -610,7 +610,7 @@ struct RWlockReleaseRead {
     lock: &RWlock,
 }
 
-impl RWlockReleaseRead : Drop {
+impl Drop for RWlockReleaseRead {
     fn finalize(&self) {
         unsafe {
             do task::unkillable {
@@ -644,7 +644,7 @@ struct RWlockReleaseDowngrade {
     lock: &RWlock,
 }
 
-impl RWlockReleaseDowngrade : Drop {
+impl Drop for RWlockReleaseDowngrade {
     fn finalize(&self) {
         unsafe {
             do task::unkillable {
@@ -682,10 +682,10 @@ fn RWlockReleaseDowngrade(lock: &r/RWlock) -> RWlockReleaseDowngrade/&r {
 
 /// The "write permission" token used for rwlock.write_downgrade().
 pub struct RWlockWriteMode { priv lock: &RWlock }
-impl RWlockWriteMode : Drop { fn finalize(&self) {} }
+impl Drop for RWlockWriteMode { fn finalize(&self) {} }
 /// The "read permission" token used for rwlock.write_downgrade().
 pub struct RWlockReadMode  { priv lock: &RWlock }
-impl RWlockReadMode : Drop { fn finalize(&self) {} }
+impl Drop for RWlockReadMode { fn finalize(&self) {} }
 
 impl &RWlockWriteMode {
     /// Access the pre-downgrade rwlock in write mode.
@@ -1007,7 +1007,7 @@ struct SendOnFailure {
             c: pipes::Chan<()>,
         }
 
-        impl SendOnFailure : Drop {
+        impl Drop for SendOnFailure {
             fn finalize(&self) {
                 self.c.send(());
             }
index 622e1ea65d8b5298d175f0393169ee56d945a8cf..77e7e3c3054d8d31c3b45bc6cecb43b425a7620f 100644 (file)
@@ -54,14 +54,14 @@ impl Timespec {
     }
 }
 
-impl Timespec : Eq {
+impl Eq for Timespec {
     pure fn eq(&self, other: &Timespec) -> bool {
         self.sec == other.sec && self.nsec == other.nsec
     }
     pure fn ne(&self, other: &Timespec) -> bool { !self.eq(other) }
 }
 
-impl Timespec : Ord {
+impl Ord for Timespec {
     pure fn lt(&self, other: &Timespec) -> bool {
         self.sec < other.sec ||
             (self.sec == other.sec && self.nsec < other.nsec)
@@ -129,7 +129,7 @@ pub struct Tm {
     tm_nsec: i32, // nanoseconds
 }
 
-impl Tm : Eq {
+impl Eq for Tm {
     pure fn eq(&self, other: &Tm) -> bool {
         self.tm_sec == (*other).tm_sec &&
         self.tm_min == (*other).tm_min &&
index 2fdaeb545a286dc003e1260d33ee4297f43d73ce..282ecf086e4e8f5b95e1f99f5bb201965f7cbdf8 100644 (file)
@@ -39,7 +39,7 @@ pub struct TreeMap<K, V> {
     priv length: uint
 }
 
-impl <K: Eq Ord, V: Eq> TreeMap<K, V>: Eq {
+impl<K: Eq Ord, V: Eq> Eq for TreeMap<K, V> {
     pure fn eq(&self, other: &TreeMap<K, V>) -> bool {
         if self.len() != other.len() {
             false
@@ -85,7 +85,7 @@ impl <K: Eq Ord, V: Eq> TreeMap<K, V>: Eq {
     return a_len < b_len;
 }
 
-impl <K: Ord, V> TreeMap<K, V>: Ord {
+impl<K: Ord, V> Ord for TreeMap<K, V> {
     #[inline(always)]
     pure fn lt(&self, other: &TreeMap<K, V>) -> bool {
         lt(self, other)
@@ -104,7 +104,7 @@ impl <K: Ord, V> TreeMap<K, V>: Ord {
     }
 }
 
-impl <K: Ord, V> TreeMap<K, V>: BaseIter<(&K, &V)> {
+impl<K: Ord, V> BaseIter<(&K, &V)> for TreeMap<K, V> {
     /// Visit all key-value pairs in order
     pure fn each(&self, f: fn(&(&self/K, &self/V)) -> bool) {
         each(&self.root, f)
@@ -112,14 +112,14 @@ impl <K: Ord, V> TreeMap<K, V>: BaseIter<(&K, &V)> {
     pure fn size_hint(&self) -> Option<uint> { Some(self.len()) }
 }
 
-impl <K: Ord, V> TreeMap<K, V>: ReverseIter<(&K, &V)> {
+impl<K: Ord, V> ReverseIter<(&K, &V)> for TreeMap<K, V> {
     /// Visit all key-value pairs in reverse order
     pure fn each_reverse(&self, f: fn(&(&self/K, &self/V)) -> bool) {
         each_reverse(&self.root, f);
     }
 }
 
-impl <K: Ord, V> TreeMap<K, V>: Container {
+impl<K: Ord, V> Container for TreeMap<K, V> {
     /// Return the number of elements in the map
     pure fn len(&self) -> uint { self.length }
 
@@ -127,7 +127,7 @@ impl <K: Ord, V> TreeMap<K, V>: Container {
     pure fn is_empty(&self) -> bool { self.root.is_none() }
 }
 
-impl <K: Ord, V> TreeMap<K, V>: Mutable {
+impl<K: Ord, V> Mutable for TreeMap<K, V> {
     /// Clear the map, removing all key-value pairs.
     fn clear(&mut self) {
         self.root = None;
@@ -135,7 +135,7 @@ fn clear(&mut self) {
     }
 }
 
-impl <K: Ord, V> TreeMap<K, V>: Map<K, V> {
+impl<K: Ord, V> Map<K, V> for TreeMap<K, V> {
     /// Return true if the map contains a value for the specified key
     pure fn contains_key(&self, key: &K) -> bool {
         self.find(key).is_some()
@@ -246,25 +246,25 @@ pub struct TreeSet<T> {
     priv map: TreeMap<T, ()>
 }
 
-impl <T: Ord> TreeSet<T>: BaseIter<T> {
+impl<T: Ord> BaseIter<T> for TreeSet<T> {
     /// Visit all values in order
     pure fn each(&self, f: fn(&T) -> bool) { self.map.each_key(f) }
     pure fn size_hint(&self) -> Option<uint> { Some(self.len()) }
 }
 
-impl <T: Ord> TreeSet<T>: ReverseIter<T> {
+impl<T: Ord> ReverseIter<T> for TreeSet<T> {
     /// Visit all values in reverse order
     pure fn each_reverse(&self, f: fn(&T) -> bool) {
         self.map.each_key_reverse(f)
     }
 }
 
-impl <T: Eq Ord> TreeSet<T>: Eq {
+impl<T: Eq Ord> Eq for TreeSet<T> {
     pure fn eq(&self, other: &TreeSet<T>) -> bool { self.map == other.map }
     pure fn ne(&self, other: &TreeSet<T>) -> bool { self.map != other.map }
 }
 
-impl <T: Ord> TreeSet<T>: Ord {
+impl<T: Ord> Ord for TreeSet<T> {
     #[inline(always)]
     pure fn lt(&self, other: &TreeSet<T>) -> bool { self.map < other.map }
     #[inline(always)]
@@ -275,7 +275,7 @@ impl <T: Ord> TreeSet<T>: Ord {
     pure fn gt(&self, other: &TreeSet<T>) -> bool { self.map > other.map }
 }
 
-impl <T: Ord> TreeSet<T>: Container {
+impl<T: Ord> Container for TreeSet<T> {
     /// Return the number of elements in the set
     pure fn len(&self) -> uint { self.map.len() }
 
@@ -283,12 +283,12 @@ impl <T: Ord> TreeSet<T>: Container {
     pure fn is_empty(&self) -> bool { self.map.is_empty() }
 }
 
-impl <T: Ord> TreeSet<T>: Mutable {
+impl<T: Ord> Mutable for TreeSet<T> {
     /// Clear the set, removing all values.
     fn clear(&mut self) { self.map.clear() }
 }
 
-impl <T: Ord> TreeSet<T>: Set<T> {
+impl<T: Ord> Set<T> for TreeSet<T> {
     /// Return true if the set contains a value
     pure fn contains(&self, value: &T) -> bool {
         self.map.contains_key(value)
index 6621eef8b0b420e51a5cf063623825c7b16fff1f..3152f0b54052421047ecbb92a86006da234cbda2 100644 (file)
@@ -51,7 +51,7 @@ fn get_monitor_task_gl() -> IoTask {
 
     struct GlobalIoTask(IoTask);
 
-    impl GlobalIoTask: Clone {
+    impl Clone for GlobalIoTask {
         fn clone(&self) -> GlobalIoTask {
             GlobalIoTask((**self).clone())
         }
index ccb3175eef4990884c3ff03091e166d45ee98d98..a93bdf86a6428a785030b182e8f98f04d45f67b1 100644 (file)
@@ -31,7 +31,7 @@ pub struct IoTask {
     op_chan: SharedChan<IoTaskMsg>
 }
 
-impl IoTask: Clone {
+impl Clone for IoTask {
     fn clone(&self) -> IoTask {
         IoTask{
             async_handle: self.async_handle,
index d78761b70e3ef3d851e37779e8e4b6e0fe02290a..d652b18cfad470f55903e92aa434fe246c6501a1 100644 (file)
@@ -104,7 +104,7 @@ struct WorkKey {
     name: ~str
 }
 
-impl WorkKey: to_bytes::IterBytes {
+impl to_bytes::IterBytes for WorkKey {
     #[inline(always)]
     pure fn iter_bytes(&self, lsb0: bool, f: to_bytes::Cb) {
         let mut flag = true;
@@ -114,7 +114,7 @@ impl WorkKey: to_bytes::IterBytes {
     }
 }
 
-impl WorkKey: cmp::Ord {
+impl cmp::Ord for WorkKey {
     pure fn lt(&self, other: &WorkKey) -> bool {
         self.kind < other.kind ||
             (self.kind == other.kind &&
@@ -285,7 +285,7 @@ fn exec<T:Owned
         Decodable<json::Decoder>>(&self, blk: ~fn(&Exec) -> T) -> Work<T>;
 }
 
-impl @Mut<Prep> : TPrep {
+impl TPrep for @Mut<Prep> {
     fn declare_input(&self, kind:&str, name:&str, val:&str) {
         do self.borrow_mut |p| {
             p.declared_inputs.insert(WorkKey::new(kind, name),
index 22f1e2d47533b661d91706f23347c72288bfb40f..e3d1fb9781b2ef56f708787663938e4dc4f04506 100644 (file)
@@ -326,7 +326,7 @@ pub enum inline_attr {
     ia_never,
 }
 
-impl inline_attr : cmp::Eq {
+impl cmp::Eq for inline_attr {
     pure fn eq(&self, other: &inline_attr) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index e44ee4eef0a8c578f179c05f0163d7fabb14c576..2b24d03f8e9e5df980a489eb48727aad0dcb2dc4 100644 (file)
@@ -63,7 +63,7 @@ struct CodemapT {
     cm: @codemap::CodeMap,
 }
 
-impl CodemapT: span_handler {
+impl span_handler for CodemapT {
     fn span_fatal(@mut self, sp: span, msg: &str) -> ! {
         self.handler.emit(Some((self.cm, sp)), msg, fatal);
         fail!();
@@ -89,7 +89,7 @@ fn handler(@mut self) -> handler {
     }
 }
 
-impl HandlerT: handler {
+impl handler for HandlerT {
     fn fatal(@mut self, msg: &str) -> ! {
         (self.emit)(None, msg, fatal);
         fail!();
index c854fca64248dd8e0cf0c2f0a688a10a6ed6b25e..9c0550c98752781e1ebbbe803eb9e5cc79084c10 100644 (file)
@@ -23,7 +23,7 @@ struct Node {id: uint}
 
 would generate two implementations like:
 
-impl<S: std::serialize::Encoder> Node: Encodable<S> {
+impl<S: std::serialize::Encoder> Encodable<S> for Node {
     fn encode(&self, s: &S) {
         do s.emit_struct("Node", 1) {
             s.emit_field("id", 0, || s.emit_uint(self.id))
@@ -31,7 +31,7 @@ fn encode(&self, s: &S) {
     }
 }
 
-impl<D: Decoder> node_id: Decodable {
+impl<D: Decoder> Decodable for node_id {
     static fn decode(d: &D) -> Node {
         do d.read_struct("Node", 1) {
             Node {
index c924acd577d321cf9b72c505add9f231f5f5f910..951e350f8b29014ca469246e153559ca353ffb98 100644 (file)
@@ -197,7 +197,7 @@ struct CtxtRepr {
         mod_path: ~[ast::ident],
         trace_mac: bool
     }
-    impl CtxtRepr: ext_ctxt {
+    impl ext_ctxt for CtxtRepr {
         fn codemap(@mut self) -> @CodeMap { self.parse_sess.cm }
         fn parse_sess(@mut self) -> parse::parse_sess { self.parse_sess }
         fn cfg(@mut self) -> ast::crate_cfg { self.cfg }
index 4522c7e0fd6c2b97cb462b7b22831e74907599bb..ffa6101d58fccc812f047bc7b42f6be87d9306a1 100644 (file)
@@ -53,7 +53,7 @@ trait ToTokens {
         pub fn to_tokens(_cx: ext_ctxt) -> ~[token_tree];
     }
 
-    impl ~[token_tree]: ToTokens {
+    impl ToTokens for ~[token_tree] {
         pub fn to_tokens(_cx: ext_ctxt) -> ~[token_tree] {
             copy self
         }
@@ -78,43 +78,43 @@ trait ToSource {
         pub fn to_source(cx: ext_ctxt) -> ~str;
     }
 
-    impl ast::ident: ToSource {
+    impl ToSource for ast::ident {
         fn to_source(cx: ext_ctxt) -> ~str {
             copy *cx.parse_sess().interner.get(self)
         }
     }
 
-    impl @ast::item: ToSource {
+    impl ToSource for @ast::item {
         fn to_source(cx: ext_ctxt) -> ~str {
             item_to_str(self, cx.parse_sess().interner)
         }
     }
 
-    impl ~[@ast::item]: ToSource {
+    impl ToSource for ~[@ast::item] {
         fn to_source(cx: ext_ctxt) -> ~str {
             str::connect(self.map(|i| i.to_source(cx)), ~"\n\n")
         }
     }
 
-    impl @ast::Ty: ToSource {
+    impl ToSource for @ast::Ty {
         fn to_source(cx: ext_ctxt) -> ~str {
             ty_to_str(self, cx.parse_sess().interner)
         }
     }
 
-    impl ~[@ast::Ty]: ToSource {
+    impl ToSource for ~[@ast::Ty] {
         fn to_source(cx: ext_ctxt) -> ~str {
             str::connect(self.map(|i| i.to_source(cx)), ~", ")
         }
     }
 
-    impl ~[ast::ty_param]: ToSource {
+    impl ToSource for ~[ast::ty_param] {
         fn to_source(cx: ext_ctxt) -> ~str {
             pprust::typarams_to_str(self, cx.parse_sess().interner)
         }
     }
 
-    impl @ast::expr: ToSource {
+    impl ToSource for @ast::expr {
         fn to_source(cx: ext_ctxt) -> ~str {
             pprust::expr_to_str(self, cx.parse_sess().interner)
         }
@@ -122,43 +122,43 @@ fn to_source(cx: ext_ctxt) -> ~str {
 
     // Alas ... we write these out instead. All redundant.
 
-    impl ast::ident: ToTokens {
+    impl ToTokens for ast::ident {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl @ast::item: ToTokens {
+    impl ToTokens for @ast::item {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl ~[@ast::item]: ToTokens {
+    impl ToTokens for ~[@ast::item] {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl @ast::Ty: ToTokens {
+    impl ToTokens for @ast::Ty {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl ~[@ast::Ty]: ToTokens {
+    impl ToTokens for ~[@ast::Ty] {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl ~[ast::ty_param]: ToTokens {
+    impl ToTokens for ~[ast::ty_param] {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
     }
 
-    impl @ast::expr: ToTokens {
+    impl ToTokens for @ast::expr {
         fn to_tokens(cx: ext_ctxt) -> ~[token_tree] {
             cx.parse_tts(self.to_source(cx))
         }
@@ -171,7 +171,7 @@ trait ExtParseUtils {
         fn parse_tts(s: ~str) -> ~[ast::token_tree];
     }
 
-    impl ext_ctxt: ExtParseUtils {
+    impl ExtParseUtils for ext_ctxt {
 
         fn parse_item(s: ~str) -> @ast::item {
             let res = parse::parse_item_from_source_str(
index e6ba543cf790db280ee3e828ec50da5df57f2280..e297e33d825c6bba54639e803d22b6181773fc4e 100644 (file)
@@ -30,7 +30,7 @@ fn parse_inner_attrs_and_next() ->
     fn parse_optional_meta() -> ~[@ast::meta_item];
 }
 
-impl Parser: parser_attr {
+impl parser_attr for Parser {
 
     // Parse attributes that appear before an item
     fn parse_outer_attributes() -> ~[ast::attribute] {
index 1e17cf3543dd6ea65f642e88fc656b8defd25a1d..2cadf195778a28570713e6166a60906ac072ff0a 100644 (file)
@@ -34,7 +34,7 @@ pub enum cmnt_style {
     blank_line, // Just a manual blank line "\n\n", for layout
 }
 
-impl cmnt_style : cmp::Eq {
+impl cmp::Eq for cmnt_style {
     pure fn eq(&self, other: &cmnt_style) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 48ba94bdc33b72e00ab138eb819f3b37f412ac69..f5fbefdd89b4b0200fc9a6218458d1c3e96b6f5c 100644 (file)
@@ -108,7 +108,7 @@ fn dup_string_reader(r: @mut StringReader) -> @mut StringReader {
     }
 }
 
-impl StringReader: reader {
+impl reader for StringReader {
     fn is_eof(@mut self) -> bool { is_eof(self) }
     // return the next token. EFFECT: advances the string_reader.
     fn next_token(@mut self) -> TokenAndSpan {
index 92d25d5d19378c89dbb5629ff8433c32e6677bd6..3279c79e5af0d4ea8a6c4d0c1346b0cf878ae4de 100644 (file)
@@ -520,7 +520,7 @@ pub fn reserved_keyword_table() -> HashMap<~str, ()> {
 }
 
 
-impl Token : cmp::Eq {
+impl cmp::Eq for Token {
     pure fn eq(&self, other: &Token) -> bool {
         match (*self) {
             EQ => {
index ef195c9c32a0b0158a70a5be53c5ec48bc3d4042..c6dfe7b79a9d0b52769a83bb680721cde355eb27 100644 (file)
@@ -11,4 +11,4 @@
 trait me {
     fn me() -> uint;
 }
-impl uint: me { fn me() -> uint { self } }
+impl me for uint { fn me() -> uint { self } }
index cd342c44407f673eb4af538f954be2d92d74e06e..ab744d60ac22834bb072aff6a726c2c404776a42 100644 (file)
@@ -14,7 +14,7 @@ trait uint_helpers {
     fn to(v: uint, f: fn(uint));
 }
 
-impl uint: uint_helpers {
+impl uint_helpers for uint {
     #[inline]
     fn to(v: uint, f: fn(uint)) {
         let mut i = self;
index 355cd935ce2b4c19987e6a21a6dbd8aaa445597b..c790252244f6bc9f24b703070d661718634d2df3 100644 (file)
@@ -17,7 +17,7 @@ pub struct Bar {
     x: ~str
 }
 
-impl Bar : Foo {
+impl Foo for Bar {
     #[inline(always)]
     fn f(&self) {
         io::println((*self).x);
index 009e132f5985daac75c0308456941c921eb85e75..d8c2a9ede5cffec91302f5c018af25398d8a969f 100644 (file)
@@ -6,7 +6,7 @@ pub struct Fish {
 
 mod unexported {
     use super::Fish;
-    impl Fish : Eq {
+    impl Eq for Fish {
         pure fn eq(&self, _: &Fish) -> bool { true }
         pure fn ne(&self, _: &Fish) -> bool { false }
     }
index c0b824618a47cf1d4d4e90a44badb3b523e6c1a4..7cc8dcb22c99558eecc1392b655bd1c3a4c53ca1 100644 (file)
@@ -14,7 +14,7 @@
 pub trait i<T> { }
 
 pub fn f<T>() -> i<T> {
-    impl<T> (): i<T> { }
+    impl<T> i<T> for () { }
 
     () as i::<T>
 }
index 2c691d6d58e43b558c1c17e99448d6487ee65e6e..fb97adf51a5349a9ad0e06720ce2f81d7211765b 100644 (file)
@@ -17,7 +17,7 @@ trait foo {
     fn foo();
 }
 
-impl ~str: foo {
+impl foo for ~str {
     fn foo() {}
 }
 
index 4e07de771e5bacfa9cd59780828473c69215b913..f9d08713852e402265c5e1825e11241dcf01f882 100644 (file)
@@ -19,7 +19,7 @@ struct arc_destruct<T> {
   _data: int,
 }
 
-impl<T:Const> arc_destruct<T> : Drop {
+impl<T:Const> Drop for arc_destruct<T> {
     fn finalize(&self) {}
 }
 
@@ -43,7 +43,7 @@ struct context_res {
     ctx : int,
 }
 
-impl context_res : Drop {
+impl Drop for context_res {
     fn finalize(&self) {}
 }
 
index 6007b1f3d175e8e8f31b7dc0c36a6b5ec496694e..ead338c4bc803a0a27fca208a70e41cf654b42df 100644 (file)
@@ -10,7 +10,7 @@
 
 enum maybe<T> { just(T), nothing }
 
-impl methods<T:copy> for maybe<T> {
+impl copy> for maybe<T> for methods<T {
     fn ~[](idx: uint) -> T {
         match self {
           just(t) { t }
index ff056b8028d061a3aa060da36c696c3fe8bfbe90..9037417ef6224060c1087a373ad3a1503f05b62f 100644 (file)
@@ -15,8 +15,8 @@
 
 type two_maybes<T> = {a: maybe<T>, b: maybe<T>};
 
-impl methods<T:copy> for two_maybes<T> {
+impl copy> for two_maybes<T> for methods<T {
     fn ~[](idx: uint) -> (T, T) {
         (self.a[idx], self.b[idx])
     }
-}
\ No newline at end of file
+}
index 3f93540e64f62c42792b967f969792e888e807d8..2e3c7eedfcc3829e5d4d5af041274c2e428dabb1 100644 (file)
@@ -10,4 +10,4 @@
 
 pub fn to_closure<A: Durable Copy>(x: A) -> @fn() -> A {
     fn@() -> A { copy x }
-}
\ No newline at end of file
+}
index 6f3813a94c0a90db00d079df5114e9394dea14c9..c2caf1e77ee9d65c099695d0a222c95270299c34 100644 (file)
@@ -15,6 +15,6 @@ trait to_strz {
     fn to_strz() -> ~str;
 }
 
-impl ~str: to_strz {
+impl to_strz for ~str {
     fn to_strz() -> ~str { copy self }
 }
index 32e131fac262fb52121b63fabb20e7df8cd6bfb7..40a2bcc114a532c5f7a52853e66a4bfbd76c805d 100644 (file)
@@ -15,6 +15,6 @@
 
 use a::to_strz;
 
-impl bool: to_strz {
+impl to_strz for bool {
     fn to_strz() -> ~str { fmt!("%b", self) }
 }
index 0c7c827e0299b6e92a34d3bd0b35efded1f0da7e..e1be3adcd4a02c35f32ea7efc5e6b1585e68c51b 100644 (file)
@@ -19,6 +19,6 @@ trait T {
     fn bar();
 }
 
-impl S: T {
+impl T for S {
     fn bar() { }
 }
index a0c056d1f993129a666d84ea06c444904fc920c3..4de0b900dd3eaad20080b894a74220bbe64ac69b 100644 (file)
@@ -12,7 +12,7 @@ trait x {
     fn use_x<T>();
 }
 enum y = (); 
-impl y:x { 
+impl x for y { 
     fn use_x<T>() {
         struct foo { //~ ERROR quux
             i: ()
index 248223e5c5dc26ddacec0228d94f09e9568d46de..606a662315a0d95f97f2ac17b9cc55575165cb5d 100644 (file)
@@ -12,4 +12,4 @@ mod super_sekrit {
     pub enum sooper_sekrit {
         pub quux, priv baz
     }
-}
\ No newline at end of file
+}
index 37be325f15bc60df67632947de88344a5d974728..f06f2e31b710f47cb8945b6aa8eb79dbabebda63 100644 (file)
@@ -17,13 +17,13 @@ pub trait read {
     static fn readMaybe(s: ~str) -> Option<Self>;
 }
 
-impl int: read {
+impl read for int {
     static fn readMaybe(s: ~str) -> Option<int> {
         int::from_str(s)
     }
 }
 
-impl bool: read {
+impl read for bool {
     static fn readMaybe(s: ~str) -> Option<bool> {
         match s {
           ~"true" => Some(true),
index 78e3dcca39db08c98dfce75a55d28a8fe6c06811..f595529b7f6d79cceafc60707be818bdc9f9d9a6 100644 (file)
@@ -16,7 +16,7 @@ pub trait Num2 {
 }
 
 pub mod float {
-    impl float: ::num::Num2 {
+    impl ::num::Num2 for float {
         #[inline]
         static pure fn from_int2(n: int) -> float { return n as float;  }
     }
index d28d6ce187a95fab9bd49de35b3724135087e311..80734b8336b872aafdb90d2309571bdbda2fdc14 100644 (file)
@@ -5,7 +5,7 @@ pub trait Num2 {
 }
 
 pub mod float {
-    impl float: ::num::Num2 {
+    impl ::num::Num2 for float {
         static pure fn from_int2(n: int) -> float { return n as float;  }
     }
 }
index 0b434ad0f4f8dea56da0c73cc012328335f7fca9..11d4b28c215217bd6b6042df2708bd9058645f42 100644 (file)
@@ -14,8 +14,8 @@
 
 pub struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
-impl A : Baz { fn h() -> int { 30 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
+impl Baz for A { fn h() -> int { 30 } }
 
 
index 6bbf9bd59946fbab03c13ad965b3d83f72a0ce3b..97a363f6b0c45a8e77cb6ac7f157e36cf44d1572 100644 (file)
@@ -14,4 +14,4 @@
 
 trait Quux: Foo Bar Baz { }
 
-impl<T: Foo Bar Baz> T: Quux { }
+impl<T: Foo Bar Baz> Quux for T { }
index ca4d8edc2c74e9d749567bd8997173d8e9067ab6..724860d6855444dbd75699c06ebab7797e3ebbb0 100644 (file)
@@ -17,6 +17,6 @@ pub struct A {
     x: int
 }
 
-impl A : Foo {
+impl Foo for A {
     fn f() -> int { 10 }
 }
index b19454ec230c207d27994710a625d018765cb6b0..76a76887772180d0a6d9cc0a044b7334eeb78187 100644 (file)
@@ -29,7 +29,7 @@ struct cmplx {
     im: f64
 }
 
-impl cmplx : ops::Mul<cmplx,cmplx> {
+impl ops::Mul<cmplx,cmplx> for cmplx {
     pure fn mul(&self, x: &cmplx) -> cmplx {
         cmplx {
             re: self.re*(*x).re - self.im*(*x).im,
@@ -38,7 +38,7 @@ impl cmplx : ops::Mul<cmplx,cmplx> {
     }
 }
 
-impl cmplx : ops::Add<cmplx,cmplx> {
+impl ops::Add<cmplx,cmplx> for cmplx {
     pure fn add(&self, x: &cmplx) -> cmplx {
         cmplx {
             re: self.re + (*x).re,
@@ -98,7 +98,7 @@ fn chanmb(i: uint, size: uint) -> Line
 
 struct Devnull();
 
-impl Devnull: io::Writer {
+impl io::Writer for Devnull {
     fn write(&self, _b: &[const u8]) {}
     fn seek(&self, _i: int, _s: io::SeekStyle) {}
     fn tell(&self) -> uint {0_u}
index c67305bab8f3155c8b2aea2cd648dd4af703553a..5f0530871fc835c56f55b4381e241de5543ee04c 100644 (file)
@@ -56,7 +56,7 @@ struct r {
   _l: @nillist,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
index 490a8a8b67b43482430d114d420048f430b5e9eb..b6b2313aa09c36dd66ff66cad5cd87bca9eedf26 100644 (file)
@@ -14,4 +14,4 @@ fn main() {
       0 => {
       } + 5 //~ ERROR unexpected token: `+`
     }
-}
\ No newline at end of file
+}
index c5354a8f7f135a809d333905b983a9ef6e234d7e..3f484511859f31dc4430d825b88fd06b02afed37 100644 (file)
@@ -44,4 +44,4 @@ fn main() {
       0.02 => {}
       _ => {}
     };
-}
\ No newline at end of file
+}
index f73fb95c5bc172b6771835bd76a6d19804e1e02f..ed18abe9bf0ab7b3bc04f9b6db9dab746a88ea92 100644 (file)
@@ -15,6 +15,6 @@
 trait me {
     fn me() -> uint;
 }
-impl uint: me { fn me() -> uint { self } } //~ NOTE is `__extensions__::me`
+impl me for uint { fn me() -> uint { self } } //~ NOTE is `__extensions__::me`
 fn main() { 1u.me(); } //~ ERROR multiple applicable methods in scope
 //~^ NOTE is `ambig_impl_2_lib::__extensions__::me`
index 10629ef2344ea5250012ae863b4b965abdfa2c9e..d4fe51835aee58db60e2a50096bdddcf4afe59be 100644 (file)
@@ -17,4 +17,4 @@ fn foo<T: A B>(t: T) {
     //~^^ NOTE candidate #2 derives from the bound `B`
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 4d2a8004986bffcfaf3cc99a4984f89bdbcd6be1..7e27a51ccdd8977302f5222f2af56be61e593bf3 100644 (file)
@@ -12,11 +12,11 @@ trait foo {
     fn foo() -> int;
 }
 
-impl ~[uint]: foo {
+impl foo for ~[uint] {
     fn foo() -> int {1} //~ NOTE candidate #1 is `__extensions__::foo`
 }
 
-impl ~[int]: foo {
+impl foo for ~[int] {
     fn foo() -> int {2} //~ NOTE candidate #2 is `__extensions__::foo`
 }
 
index a728a64f53b656ef16839448c0c88d39d8d337bd..17c7ff1bb6037bfc249e9db83cea547d4760c47b 100644 (file)
@@ -12,4 +12,4 @@ fn main() {
     let mut x: ~[mut int] = ~[mut 3];
     let y: ~[int] = ~[3];
     x = y; //~ ERROR values differ in mutability
-}
\ No newline at end of file
+}
index e55efd7938fe0f586cdb246d31e48502ed17a556..06dd154c279055ea4cc398022bb616bd0fa6a7eb 100644 (file)
@@ -13,4 +13,4 @@ fn main() {
     let x = 0;
     log(debug, x.foo); //~ ERROR attempted access of field
     log(debug, x.bar); //~ ERROR attempted access of field
-}
\ No newline at end of file
+}
index 764f8fc7d37ab590eb853dec0fd3887ed572ae5e..2675b865e901726c077f8e08b48820f70698fbba 100644 (file)
@@ -11,4 +11,4 @@
 fn main() {
     #[attr]
     debug!("hi"); //~ ERROR expected item after attrs
-}
\ No newline at end of file
+}
index ad757d16eb379ae9249e850fb2360cd1e7617da7..51ee903b1b1db04b2cb6e213d2c0a3f99dba2b77 100644 (file)
@@ -11,4 +11,4 @@
 fn main() {
     #[attr]
     let _i = 0; //~ ERROR expected item
-}
\ No newline at end of file
+}
index 5e6ceac9031c6e05ff2268df1fd14d2a388b0009..f5dbef3c061bf50143e395ff44660ac40fb1467d 100644 (file)
@@ -18,7 +18,7 @@ trait Stuff {
     fn printme();
 }
 
-impl &mut Foo : Stuff {
+impl Stuff for &mut Foo {
     fn printme() {
         io::println(fmt!("%d", self.x));
     }
index f80112834eaee5a8c20f0715c8bbf097e349e362..db89dcfea02b2eaf20562a30bad543988e30ef75 100644 (file)
@@ -23,6 +23,6 @@ trait MyIter {
     pure fn test_mut(&mut self);
 }
 
-impl &[int]: MyIter {
+impl MyIter for &[int] {
     pure fn test_mut(&mut self) { }
 }
index 112423a073e9e0746c2d4efe92f3490ca9cc2a98..7032a3a0b22e769e6e299f08e814400e30856d9a 100644 (file)
@@ -16,7 +16,7 @@ trait bar {
     fn bar<T:Copy>();
 }
 
-impl uint: bar {
+impl bar for uint {
     fn bar<T:Copy>() {
     }
 }
index 79a247d827d3427089de86d1ec09759030d885b3..17157623863adca5673368329640848acb130e8f 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn false() { } //~ ERROR found `false` in ident position
-fn main() { }
\ No newline at end of file
+fn main() { }
index 317a9a32931a2afd8aaed409f2074e970678e28c..5160471e95c80937d6f224d41ab5db060e0bf8d9 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn true() { } //~ ERROR found `true` in ident position
-fn main() { }
\ No newline at end of file
+fn main() { }
index 1bffb0739e93faea76560414c9eb9cc2f2a52524..298e5d53c940148dfc1ec04876dda21d2a4145d0 100644 (file)
@@ -10,7 +10,7 @@
 
 struct X { x: () }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index cbf48559909159499f64abac7676930681502cb0..162a10a370b78369e6f0da3d0fc3a58bad834440 100644 (file)
@@ -10,7 +10,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index 9c14a53eba169cb9912bd5a77916dc66c597c915..1aed491bbf0694c6b4eec75b3122fa8547e6bbb5 100644 (file)
@@ -10,7 +10,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index 1d492fdd0f1f2b9c2ad4933378ab30d83fcc72bd..9c879e297090f76eb74e82b9bdf9143c3f1be467 100644 (file)
@@ -10,7 +10,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index e4e8cba4e9ce181380d008684b7803d267c8fa86..586285d9566916f6b8e9d709c220438e805e0312 100644 (file)
@@ -12,7 +12,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index 45f9415db9b75d8096efe629450072e2e034ba79..9ed48fe33e31917e927b2b34dad23a824a0c98f7 100644 (file)
@@ -12,7 +12,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index 0d845983c6e0dbfad4055a82f8b6ce2465a4404a..d60ef84f04024ee2318e24a48176ed9b4e34616b 100644 (file)
@@ -10,7 +10,7 @@
 
 struct X { x: (), }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("destructor runs");
     }
index 605e2179f2119ade6d6c536de920619961a04c25..679deceb7bca35e88de2cd5d8cd74165f943e485 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:binary operation + cannot be applied to type `*int`
 
 fn die() -> *int { (0 as *int) + (0 as *int) }
-fn main() { }
\ No newline at end of file
+fn main() { }
index 1c2a3b5627cc389ad37930d22e4dca0b29a2bc09..abeefa4aac81015c31a88ab7b0ba9543c92248c9 100644 (file)
@@ -14,4 +14,4 @@ fn main() {
     loop {
         true
     }
-}
\ No newline at end of file
+}
index b3f1755dc66b74b0ad1904373cf5908918fb1ca4..d1e001f722c3fbaea03baa9c38923756bdf64cfa 100644 (file)
@@ -12,4 +12,4 @@ fn main() {
     for vec::each(~[0]) |_i| {  //~ ERROR A for-loop body must return (), but
         true
     }
-}
\ No newline at end of file
+}
index 25108d2a13b52e8345491bcf72d45f876e7ad6a1..6095d645f483db95e2d4ddb0dbfffb7f5dbba70b 100644 (file)
@@ -12,7 +12,7 @@
 
 struct r {}
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         true
     }
index 7caf5bd129d5d4faa3a27cef4543324919f9efa4..e4aceabf0c8fbc0e81d8c748262a256270788d74 100644 (file)
@@ -14,4 +14,4 @@ fn main() {
     while true {
         true
     }
-}
\ No newline at end of file
+}
index b9e3960fcce79066d418620d78172569576b1acf..8bd3832d70cebdd07b28f819b0bd75e4b8022874 100644 (file)
@@ -21,4 +21,4 @@ fn zed(x: @int) -> fn@() -> int {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index c89c22db3dc1786d7d3147f5d719169f4bf4fc1d..78a95cb33c0c312d648ee3012f3380f3c5a2f835 100644 (file)
@@ -14,4 +14,4 @@ fn main() {
     // assigning to various global constants
     None = Some(3); //~ ERROR assigning to static item
     foo = 6; //~ ERROR assigning to static item
-}
\ No newline at end of file
+}
index adc923ce22f04b5d7a7f4bb07586224d474456c7..25a320061d4517f7c306656bdbdd3638489be31a 100644 (file)
@@ -13,4 +13,4 @@
 fn main() {
     let x = foo(3);
     *x = 4; //~ ERROR assigning to enum content
-}
\ No newline at end of file
+}
index 397525b94738b1870305956ab276e75e240c5972..9e90995c33abfd6a62c9cb588c6799a0d2b7daad 100644 (file)
@@ -27,4 +27,4 @@ fn main() {
     p.x.a = 2;     //~ ERROR assigning to immutable field
     p.y.a = 2;     //~ ERROR assigning to const field
     p.z.a = 2;
-}
\ No newline at end of file
+}
index e899e214248b1d95d460bd46a041f1b14ee218b7..404644e78e2e51465c940ff1656013153c72fe51 100644 (file)
@@ -12,7 +12,7 @@ struct defer {
     x: &[&str],
 }
 
-impl defer : Drop {
+impl Drop for defer {
     fn finalize(&self) {
         error!("%?", self.x);
     }
index 1dcf8268440eb1037a13f3c138133d1cb2efc55d..e0fca586b6b7bc41f67c0b71ebbaf2b6e1649840 100644 (file)
@@ -31,4 +31,4 @@ fn bar(f: &mut Foo) {
 fn main() {
   let mut f = Foo { n: LinearSet::new() };
   bar(&mut f);
-}
\ No newline at end of file
+}
index fb72dc0271404dc9b9f3a08939f0029ebd612e9c..0b9375bc543a1b526c46930c6e16a418ffe262ad 100644 (file)
@@ -12,7 +12,7 @@
 
 enum foo = ~uint;
 
-impl foo : Add<foo, foo> {
+impl Add<foo, foo> for foo {
     pure fn add(f: &foo) -> foo {
         foo(~(**self + **(*f)))
     }
index c2649801cbc80c2b4bdf6893e7aca653cf25df0d..e15edd8cf199c9d54b7f51d883431d2c12e6f05c 100644 (file)
@@ -13,7 +13,7 @@ struct Point {
     y: int,
 }
 
-impl Point : ops::Add<int,int> {
+impl ops::Add<int,int> for Point {
     pure fn add(&self, z: &int) -> int {
         self.x + self.y + (*z)
     }
index f558280f0e107e5c25eba7f798b19943632eb59e..97b46c714921f99c482db583a6d2b5e47c7fb88d 100644 (file)
@@ -16,7 +16,7 @@ trait methods {
     pure fn purem();
 }
 
-impl point: methods {
+impl methods for point {
     fn impurem() {
     }
 
index 1423eac4ab875bcca15e197718b0ddee4e536576..b0b22dcfe61d0f187b3f19865f46107d8fd7695e 100644 (file)
@@ -41,4 +41,4 @@ fn has_mut_vec_and_tries_to_change_it() {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 32fe696dbb9bf2cc99d1ff6734865628f3406dca..7154683565960c8f9d05091b95a7e37d294e5780 100644 (file)
@@ -14,4 +14,4 @@ fn foo(x: *~int) -> ~int {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 3ffe71e2325e04071f0e7bc77fc23c4f5b5c96fa..3c67b6d5caf8d8269f255f19ac4cefca17effc76 100644 (file)
@@ -16,4 +16,4 @@ fn borrow(x: @mut foo) {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 2d57419f4946cd2c9131324fb009273931a99d3a..685efcacf0c5802c5dd355f91bf51319458f0afb 100644 (file)
@@ -27,4 +27,4 @@ fn main() {
     *q += 1;
     io::println(fmt!("*r = %u", *r));
     io::println(fmt!("*r = %u", *s));
-}
\ No newline at end of file
+}
index 88263df954b22ffd3c76f48d85b506ad49c9e3e5..43feb65c8b96b9492e4ab595c0405033dc2d77f1 100644 (file)
@@ -21,4 +21,4 @@ fn has_mut_vec(+v: @~[mut int]) -> int {
 
 fn main() {
     assert has_mut_vec(@~[mut 1, 2, 3]) == 6;
-}
\ No newline at end of file
+}
index 0d652585fdb5effe3ff5ffe3fcfa378fad2fc5b6..7ff13739ba7e67af9a02f3510b81ec3d450e0357 100644 (file)
@@ -30,4 +30,4 @@ fn test2() {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 9a70449f372600fb2e1568b7c745972e3c342863..a25fc8327bd10c3a3ed6d318a518d8439b4e0d98 100644 (file)
@@ -12,7 +12,7 @@ struct noncopyable {
     i: (),
 }
 
-impl noncopyable : Drop {
+impl Drop for noncopyable {
     fn finalize(&self) {
         error!("dropped");
     }
index 8cf2b82a36bb7bc87165afaec4073bf5d5bdfbd2..262bf1030bcbe1df7e8903db2030eb9ad5221b5a 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern: cast from nil: `()` as `u32`
-fn main() { let u = (assert true) as u32; }
\ No newline at end of file
+fn main() { let u = (assert true) as u32; }
index a5b179284d39c0a6b7861fe8d906b0a013552cc8..1a5c0744f70a2f19a086da52f75de43bae6d3ea7 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern: cast to nil: `u32` as `()`
-fn main() { let u = 0u32 as (); }
\ No newline at end of file
+fn main() { let u = 0u32 as (); }
index 5facc3cc5f7f73355011994d2d30526529d3df86..671298040a90b2df88b8b37b8e15ab2c9b8115d4 100644 (file)
@@ -34,7 +34,7 @@ fn eat() -> bool {
   }
 }
 
-impl cat : noisy {
+impl noisy for cat {
   fn speak() { self.meow(); }
 
 }
index bdde101b0c8370bdadf3c506ca0b012ad2f07389..2a7e2cea6fa984b6dcb87a7957f6770b6c212742 100644 (file)
@@ -17,7 +17,7 @@ struct cat {
   meows: uint,
 }
 
-impl cat : animal {
+impl animal for cat {
 }
 
 fn cat(in_x : uint) -> cat {
@@ -28,4 +28,4 @@ fn cat(in_x : uint) -> cat {
 
 fn main() {
   let nyan = cat(0u);
-}
\ No newline at end of file
+}
index bbab4c7d4240c04a06afb6b28523a9c4bba75a84..9d3eb6446565f18c30b9ef6599024e01319172ee 100644 (file)
@@ -23,4 +23,4 @@ fn meow() {
 }
 
 
- fn main() { }
\ No newline at end of file
+ fn main() { }
index c4cdbcb67e2bed1ac07c3215e295f8ce4fbba596..6ce969c7eaf3c31c0b0f8ecbb6a2e1e6190c0a26 100644 (file)
@@ -14,4 +14,4 @@ fn give_away3(y: @mut @int) {
     mutate(y); //~ ERROR values differ in mutability
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 43eceab2c1f16bfe4ebff3e97f8d6183d13ff3c8..f565a44c97f97ad989805df7e871430512d9ccbf 100644 (file)
@@ -13,4 +13,4 @@
 const b: int = a;
 
 fn main() {
-}
\ No newline at end of file
+}
index eb135e188936318d4773b0fcf6a35087f17d4aab..95fd9b938f07b649a0db58b68dc3c1d2ecab1050 100644 (file)
@@ -12,7 +12,7 @@ struct foo {
   i: int,
 }
 
-impl foo : Drop {
+impl Drop for foo {
     fn finalize(&self) {}
 }
 
index e4448f17a997d7e07a1229224ce94bfacb828c45..9019d338d09039e677369994b881a48f40212c83 100644 (file)
@@ -12,7 +12,7 @@ struct X {
     x: ~str,
 }
 
-impl X : Drop {
+impl Drop for X {
     fn finalize(&self) {
         error!("value: %s", self.x);
     }
index 6988027235074e7c4c24f7ff1a29f558337128e3..4e5b64c8f3db4a8ada76ed2150a26eb885f99afb 100644 (file)
@@ -10,7 +10,7 @@
 
 type Foo = @[u8];
 
-impl Foo : Drop {   //~ ERROR the Drop trait may only be implemented
+impl Drop for Foo {   //~ ERROR the Drop trait may only be implemented
 //~^ ERROR cannot provide an extension implementation
     fn finalize(&self) {
         io::println("kaboom");
index 13c2caf2c42aef6399675d5a116d86de71149c0a..b62214b12f9a03edc2af928eaca23d8942783c21 100644 (file)
@@ -14,4 +14,4 @@
 // and the build will fail because main doesn't exist
 #[test]
 fn main() {
-}
\ No newline at end of file
+}
index 16eaea638c8d9984027efc23f91a6fc7a05db572..74ac36f3694544e6b1bc64b34b0d7c446ba2177e 100644 (file)
@@ -14,4 +14,4 @@
 type t = {};
 
 fn main() {
-}
\ No newline at end of file
+}
index 0f124158410e8e8aa3aead05307f37f504acd851..71674186b6125b9e4caec2612056a0ecabba1b24 100644 (file)
@@ -12,7 +12,7 @@ struct Foo {
     x: int
 }
 
-impl Foo : Drop {
+impl Drop for Foo {
     fn finalize(&self) {
         io::println("kaboom");
     }
index f16053a9a44c53b1eabb2029316af380e4902388..3b1dda19448cc51453c939cb7f816548db02f431 100644 (file)
@@ -16,13 +16,13 @@ trait Bar : Drop {
     fn blah();
 }
 
-impl Foo : Drop {
+impl Drop for Foo {
     fn finalize(&self) {
         io::println("kaboom");
     }
 }
 
-impl Foo : Bar {
+impl Bar for Foo {
     fn blah() {
         self.finalize();    //~ ERROR explicit call to destructor
     }
index 256ef33cedefe29ce33ebb083a3c7413d08da0f3..eacad50b92f07d2b06035b4408921cbb624f4f5f 100644 (file)
@@ -14,4 +14,4 @@
 // item attribute. Probably could use a better error message.
 #[foo = "bar"]
 fmt!("baz")
-fn main() { }
\ No newline at end of file
+fn main() { }
index 5a4474c7ccc3d0e9001190c7639cf62f2c42bef7..8c6deb34816746ba8da6bfc1319024b0f6d3acb8 100644 (file)
@@ -14,4 +14,4 @@
 
 fn main() {
     f();
-}
\ No newline at end of file
+}
index b95c853aa7b5b8c7ce42325ab6b0afe1ec551eec..58e78953d5a78a8147753e16da8acefc4b3bef58 100644 (file)
@@ -13,4 +13,4 @@
 fn main() {
     let a = if true { true };
     log(debug, a);
-}
\ No newline at end of file
+}
index 814ec64b5c0ea2fc979363223fef655260994b1a..e557eaba8347491176f5c53bb835a9a8d35e0763 100644 (file)
@@ -17,4 +17,4 @@ fn g() {
 
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 480491067cd9d8bd436ac1c4db9f5c99c052a350..ce91de7e9d97a120a442d0a3887718b84d96c546 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern:expected
-use foo::{bar}::baz
\ No newline at end of file
+use foo::{bar}::baz
index bf60f951e7f36a4e9bf81d374e6a6a291b0978ba..b6bc53fad945f0f63823f5ce8068061446fdce6e 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern:expected
-use foo::*::bar
\ No newline at end of file
+use foo::*::bar
index 8b068f47c8f79f835c4d7b8b0df094bac8a807a9..21f49b11f66a11668ec117a7cccfde63d578e0f8 100644 (file)
@@ -15,13 +15,13 @@ trait to_opt {
     fn to_option() -> Option<Self>;
 }
 
-impl uint: to_opt {
+impl to_opt for uint {
     fn to_option() -> Option<uint> {
         Some(self)
     }
 }
 
-impl<T:Copy> Option<T>: to_opt {
+impl<T:Copy> to_opt for Option<T> {
     fn to_option() -> Option<Option<T>> {
         Some(self)
     }
index 84ffffcd3d63af0a5f91a5016fe4bea379597384..0974668f19d31b7f8dd150ca1a617315266cf478 100644 (file)
@@ -14,4 +14,4 @@
 
 enum mlist { cons(int, mlist), nil, }
 
-fn main() { let a = cons(10, cons(11, nil)); }
\ No newline at end of file
+fn main() { let a = cons(10, cons(11, nil)); }
index d75a66de0f6cd14b6c1ebf39fe89b460891440eb..8ce99f517c48af568cd611a0b2ec3c3747a3a83a 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:no valid digits found for number
 fn main() {
     log(error, 0b42);
-}
\ No newline at end of file
+}
index a8d3e386187bdbd30736499c75143dc3f8d153f3..c7aacdfc68aac7eb252eeecd82c6f4cd9b652fc9 100644 (file)
@@ -11,4 +11,4 @@
 // error-pattern:no valid digits found for number
 fn main() {
     log(error, 0bu);
-}
\ No newline at end of file
+}
index ff1afcebf9a1ae2cdfe31450a8e1a2eb40736ceb..5def792558aac2763e08cd9fc734974a8a6db1eb 100644 (file)
@@ -20,4 +20,4 @@ fn main () {
     let myInt: uint = (aFn.theFn)();
 
     assert myInt == 10;
-}
\ No newline at end of file
+}
index a5ec5c5e794935b967f3a1c1ec7780e05cf6f203..ae46ab8116f1560bd0cbf191971fb7993817d3f2 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 // error-pattern: main function is not allowed to have type parameters
-fn main<T>() { }
\ No newline at end of file
+fn main<T>() { }
index 7837fa2f8c79df1b7930dbeb02d0d764cd73bad5..8f344f42606640603220d19b52e4308409bc61cb 100644 (file)
@@ -20,7 +20,7 @@ trait to_str_2 {
 // I use an impl here because it will cause
 // the compiler to attempt autoderef and then
 // try to resolve the method.
-impl t: to_str_2 {
+impl to_str_2 for t {
     fn to_str() -> ~str { ~"t" }
 }
 
index 124c25d681f81a4cc1de8f078d8e44fd596f4326..40010b203aa9bc46393640cc93f56339cc99ec3c 100644 (file)
@@ -18,4 +18,4 @@ fn foo(a: Option<uint>, b: Option<uint>) {
 
 fn main() {
   foo(None, None);
-}
\ No newline at end of file
+}
index abc6fe50fab8e00088fee6ac871b5210aa2aaa00..7e3ffb92950ad6b67b9f550f436170fb99d6a9b3 100644 (file)
@@ -12,7 +12,7 @@ trait vec_monad<A> {
     fn bind<B>(f: fn(A) -> ~[B]);
 }
 
-impl<A> ~[A]: vec_monad<A> {
+impl<A> vec_monad<A> for ~[A] {
     fn bind<B>(f: fn(A) -> ~[B]) {
         let mut r = fail!();
         for self.each |elt| { r += f(*elt); }
index 9ff9676b675fb2226f7166dbfdf8dfbec33895e4..e255d46633a6277c65c1b3655aa6602958bf7849 100644 (file)
@@ -15,7 +15,7 @@ trait channel<T> {
 }
 
 // `chan` is not a trait, it's an enum
-impl int: chan { //~ ERROR can only implement trait types
+impl chan for int { //~ ERROR can only implement trait types
     fn send(v: int) { fail!() }
 }
 
index 1b85bd9646e754d45efef3b3fc0249db452d267c..abc734697191f4096219e5d0e1d0404fd6c39eaa 100644 (file)
@@ -16,7 +16,7 @@ struct foo {
 
 }
 
-impl foo : Drop {
+impl Drop for foo {
     fn finalize(&self) {
         io::println("Goodbye, World!");
         *self.x += 1;
index ac8132555d6da9215cc0657418af7bfea6500741..22ae941350b4cc8a0626151620634bcfa5f555fb 100644 (file)
@@ -18,7 +18,7 @@ trait parse {
     fn parse() -> ~[int];
 }
 
-impl parser: parse {
+impl parse for parser {
     fn parse() -> ~[int] {
         dvec::unwrap(self.tokens) //~ ERROR moving out of immutable field
     }
index 4bcdf9b299f4d69c59652ba7602a7903f67615a6..5da3d08e34c56984626e5b66fb339e89b4b8b0b6 100644 (file)
@@ -23,7 +23,7 @@ struct E {
  f: int
 }
 
-impl E: A {
+impl A for E {
   fn b<F:Copy, G>(_x: F) -> F { fail!() } //~ ERROR in method `b`, type parameter 0 has 1 bound, but
 }
 
index a20a182d85ec32ce486b2fa23c9815fdc4b7fdf7..c8f3f9a4a5a3d39e2366ddac1a340520b8dc5eb7 100644 (file)
@@ -20,7 +20,7 @@ struct E {
  f: int
 }
 
-impl E: A {
+impl A for E {
   fn b<F:Copy Const, G>(_x: F) -> F { fail!() } //~ ERROR in method `b`, type parameter 0 has 2 bounds, but
 }
 
index f55feb80c32c640d2845108be4532a05b1042501..f8f7704bcd9d00475bc34f88e466c85a6b703b11 100644 (file)
@@ -20,7 +20,7 @@ struct E {
  f: int
 }
 
-impl E: A {
+impl A for E {
   // n.b. The error message is awful -- see #3404
   fn b<F:Copy, G>(_x: G) -> G { fail!() } //~ ERROR method `b` has an incompatible type
 }
index 05adfaa03ecd9de395449e24ca2072d22b1ca8ab..890b984e42ef270a5effc52d57c93cbd7422a62b 100644 (file)
@@ -24,4 +24,4 @@ fn main() {
     for not_bool() |_i| {
     //~^ ERROR A `for` loop iterator should expect a closure that returns `bool`
     };
-}
\ No newline at end of file
+}
index f2ea4faf48212bf732b6ff01da9c10851c9c540d..b29b19b406f03634cc944f5db4b264590b869374 100644 (file)
@@ -12,7 +12,7 @@ struct C {
     x: int,
 }
 
-impl C : Drop {
+impl Drop for C {
     fn finalize(&self) {
         error!("dropping: %?", self.x);
     }
index f31c4c8c6794ff71cefb30352a3a41cfe4dd1b80..3874d9b13f5ca1dbf972728bcd9c70289d6be4e1 100644 (file)
@@ -16,4 +16,4 @@ fn foo<T, U>(x: T, y: U) {
 
 fn main() {
     
-}
\ No newline at end of file
+}
index dd146b98af20aafcd094d0704a748a4a8232baca..5c48416667fe19d28f60de829dde9c1614948b2d 100644 (file)
@@ -10,4 +10,4 @@
 
 fn bad (p: *int) {
     let _q: &int = p as &int; //~ ERROR non-scalar cast
-}
\ No newline at end of file
+}
index 6779829e70c647a384cd711e5cafe827dea65c6c..38bd007f1891e076caccbeb26f672347a432aed9 100644 (file)
@@ -28,7 +28,7 @@ fn mk_result(st : sipstate) -> u64 {
         return v0 ^ v1;
     }
 
-   impl sipstate: siphash {
+   impl siphash for sipstate {
         fn reset() {
             self.v0 = k0 ^ 0x736f6d6570736575;  //~ ERROR attempted dynamic environment-capture
             //~^ ERROR unresolved name: k0
index fa9c4eb52170cfc47e1f2998e5941e8783151c13..fdfd25621750844596d371f6a9dad844724bd0c3 100644 (file)
@@ -20,7 +20,7 @@ fn siphash(k0 : u64) -> siphash {
     };
 
 
-   impl sipstate: siphash {
+   impl siphash for sipstate {
         fn reset() {
            self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR attempted dynamic environment-capture
            //~^ ERROR unresolved name: k0
index bdb9d6ee16af58591a15c768fb588f9c2120bb66..8f638713742e555fa63394a7aa3100ca67d1f5d7 100644 (file)
@@ -18,4 +18,4 @@ fn thing<Q>(x: &Q) -> thing<Q> {
 
 fn main() {
     thing(&());
-}
\ No newline at end of file
+}
index ca36a6260148be2ca384960cacbcd33fffe82a6d..ff19551896b860b4b1af111bd37f88084d3b8a9d 100644 (file)
@@ -14,7 +14,7 @@ struct foo {
         //~^ ERROR use of undeclared type name
     }
 
-    impl<T> foo<T> : Drop {
+    impl<T> Drop for foo<T> {
         fn finalize(&self) {}
     }
 }
index 4a09e93deff3ddebae6fb06fa100f544d4be91a3..ac5c099e1146ac322910474db13da0f9fdaf557b 100644 (file)
@@ -18,4 +18,4 @@ fn function() -> &[mut int] {
 fn main() {
     let x = function();
     error!("%?", x);
-}
\ No newline at end of file
+}
index 84deb4cad46e304a5c8caa77703042f7cd379fb6..2d31867752ac557d87a7fe54a6e0cd434c215ac4 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 enum thing = uint;
-impl thing : cmp::Ord { //~ ERROR missing method `gt`
+impl cmp::Ord for thing { //~ ERROR missing method `gt`
     pure fn lt(&self, other: &thing) -> bool { **self < **other }
     pure fn le(&self, other: &thing) -> bool { **self < **other }
     pure fn ge(&self, other: &thing) -> bool { **self < **other }
index 7e189348db354643f04082f6aa41e1e8f6e6ebc5..23e680fd851c37de7cc0d0f9753e673ad0fc2e02 100644 (file)
@@ -1,3 +1,3 @@
 fn main() {
     let _p: char = 100; //~ ERROR mismatched types: expected `char` but found
-}
\ No newline at end of file
+}
index bb20be701db40b696d4ec6ef20ebb1deb63891d3..2431313df631c4b0dc89adea04f6a2ece6d9db80 100644 (file)
@@ -10,4 +10,4 @@
 
 fn main() {
     do 5.times {} //~ ERROR Do-block body must return bool, but returns () here. Perhaps
-}
\ No newline at end of file
+}
index 392c1415d8a7157a7bf5299c4290e47422c662ad..38e9348155ac352253a595906c74a374faf1d79b 100644 (file)
@@ -10,4 +10,4 @@
 
 fn main() {
     for task::spawn { return true; } //~ ERROR A `for` loop iterator should expect a closure that
-}
\ No newline at end of file
+}
index 364701de2d1091fb69275c9b8737c1126d7299b4..2b25afeb0e7b431210374fe1534f424a171cbf9b 100644 (file)
@@ -13,7 +13,7 @@ trait PTrait {
    fn getChildOption() -> Option<@P>;
 }
 
-impl P: PTrait {
+impl PTrait for P {
    fn getChildOption() -> Option<@P> {
        const childVal: @P = self.child.get(); //~ ERROR attempt to use a non-constant value in a constant
        fail!();
index f50b046b5ee75f1b55b83734c6375e35d1572904..54100d543dda06084b5d933da974d81c45d1ee78 100644 (file)
@@ -13,7 +13,7 @@ trait Add {
     fn add_dynamic(&self, other: &Add) -> int;
 }
 
-impl int: Add {
+impl Add for int {
     fn to_int(&self) -> int { *self }
     fn add_dynamic(&self, other: &Add) -> int {
         self.to_int() + other.to_int() //~ ERROR multiple applicable methods in scope
index 719036db1ab950f1355f59026b3ddaf1b649c17a..3a726d270ffce285d8b4ddcc8014495f7c060364 100644 (file)
@@ -13,7 +13,7 @@ struct Thing {
     x: int
 }
 
-impl Thing/*: Mul<int, Thing>*/ { //~ ERROR Look ma, no Mul!
+impl Mul<int, Thing>*/ for Thing/* { //~ ERROR Look ma, no Mul!
     pure fn mul(c: &int) -> Thing {
         Thing {x: self.x * *c}
     }
index 0b10f6cd17eaacdfc83d3dc1b9b557e107592912..2c797691b8d7a5e33b6c3e9195cd26a3e64d874d 100644 (file)
@@ -21,7 +21,7 @@ trait Hahaha: Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq Eq //~ ERROR Duplicat
 
 pub impl Lol: Hahaha { }
 
-impl Lol: Eq {
+impl Eq for Lol {
     pure fn eq(&self, other: &Lol) -> bool { **self != **other }
     pure fn ne(&self, other: &Lol) -> bool { **self == **other }
 }
@@ -32,4 +32,4 @@ fn main() {
     } else {
         io::println("2 != 4");
     }
-}
\ No newline at end of file
+}
index 5d49610a4e5be2e9de88f02956c995a6b04e3e10..812e0fc8c9660da6e00b9dbb857ff287a4a5aebe 100644 (file)
@@ -15,7 +15,7 @@ struct Point {
     mut y: float,
 }
 
-impl Point : ToStr { //~ ERROR implements a method not defined in the trait
+impl ToStr for Point { //~ ERROR implements a method not defined in the trait
     static fn new(x: float, y: float) -> Point {
         Point { x: x, y: y }
     }
index 3aaac650c2b0edfcbc16b276bc08757134c2f1d7..7242d993f33f74d975fedbc3c0f6723c4e6589f8 100644 (file)
@@ -16,4 +16,4 @@ fn f<T>(v: &r/T) -> &r/fn()->T { id::<&r/fn()->T>(|| *v) } //~ ERROR ???
 fn main() {
     let v = &5;
     io::println(fmt!("%d", f(v)()));
-}
\ No newline at end of file
+}
index e72b73f8fa4c6836efa40130f809d1fc83d5764d..49510c33858be863c5239f359b49fe8f6e789182 100644 (file)
@@ -14,4 +14,4 @@ fn foopy() {}
 
 fn main () {
     f();
-}
\ No newline at end of file
+}
index 824f36038dd1c27af9086649338abca20daa4895..00f2df00385947d138c07d604ddd6afafcbcbcf2 100644 (file)
@@ -21,4 +21,4 @@ fn main() {
     let c = ctr::new(42);
     let c2 = ctr::inc(c);
     assert *c2 == 5; //~ ERROR can only dereference enums with a single, public variant
-}
\ No newline at end of file
+}
index f04740bae4c53f0b52cea42b495555913445723d..a513e367fe5bc83d904aecd072b1580a4f266446 100644 (file)
@@ -15,4 +15,4 @@ fn main() {
     let _ = fn~() { foo(x); }; //~ ERROR value has non-owned type `@uint`
     let _ = fn~(copy x) { foo(x); }; //~ ERROR value has non-owned type `@uint`
     let _ = fn~(move x) { foo(x); }; //~ ERROR value has non-owned type `@uint`
-}
\ No newline at end of file
+}
index 69f07e3e77492bac15bea532ee44dbde83cd7e40..2864e27f42f8f178745491d89861ad3012387a29 100644 (file)
@@ -10,7 +10,7 @@
 
 trait repeat<A> { fn get() -> A; }
 
-impl<A:Copy> @A: repeat<A> {
+impl<A:Copy> repeat<A> for @A {
     fn get() -> A { *self }
 }
 
@@ -28,4 +28,4 @@ fn main() {
         repeater(@x)
     };
     assert 3 == *(y.get()); //~ ERROR reference is not valid
-}
\ No newline at end of file
+}
index 6c6cdbbb2c7730a9045a1828c08470d8dcd06609..3d83f13c211ba49376522736dcb6f845f721ae09 100644 (file)
@@ -15,7 +15,7 @@ trait foo {
     fn foo(i: &self/int) -> int;
 }
 
-impl<T:Copy> T: foo {
+impl<T:Copy> foo for T {
     fn foo(i: &self/int) -> int {*i}
 }
 
@@ -42,4 +42,4 @@ fn to_foo_3<T:Copy &static>(t: T) -> foo {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index f02ab438fde23d006fea385387f9b6be9c86bb1b..9da103396d87c97746f1bef3bddb54cd96fca17b 100644 (file)
@@ -8,7 +8,7 @@ struct S {
         x: int
     }
 
-    impl S : T {
+    impl T for S {
         fn f() {    //~ ERROR this method form is deprecated
         }
     }
index 2cb0c9e8ddb4d7bae999645bee49454a384e5b35..27c9ca64a93c64ff64aeb5f6b22acddb9d600abb 100644 (file)
@@ -31,4 +31,4 @@ enum Foo5 {
 trait foo6 { //~ ERROR type, variant, or trait should have a camel case identifier
 }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 351a63f062d7e9d3317c7d7b5665f52525526874..b5157c669a73a5be8ae299863ed946c3539a2f46 100644 (file)
@@ -62,7 +62,7 @@ struct r {
     x: (),
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
index 0265bd6d24b675c0bde3801d7f714507f33bbee8..0a9d9fb20ab0e88a668d9f9c6f981a1d99f4c341 100644 (file)
@@ -19,4 +19,4 @@ fn forever() -> ! {
 
 fn main() {
   if (1 == 2) { forever(); }
-}
\ No newline at end of file
+}
index ffd5ce3d10801d390594f24dc5e7f883cfa7df03..c2879d7f27203571837226e3f95c13f94b62543a 100644 (file)
@@ -24,4 +24,4 @@ fn main() {
 
     two_args(x, y); //~ ERROR (values differ in mutability)
     two_args(a, b); //~ ERROR (values differ in mutability)
-}
\ No newline at end of file
+}
index bff6344bc5539321a3d1bca13cfaf13164524199..3d63b622fcc96cad567468704ac2ceb74e58f25e 100644 (file)
@@ -16,7 +16,7 @@ struct A {
     x: int
 }
 
-impl int : MyEq {
+impl MyEq for int {
     pure fn eq(&self, other: &int) -> bool { *self == *other }
 }
 
index aa1106952fab81338ce332cdeb340359fde15397..f2973fb0d5eaeb018acde86171dcb1141d6f61a5 100644 (file)
@@ -14,4 +14,4 @@
 
 fn main() {
     assert mod_file_aux::bar() == 10; //~ ERROR unresolved name
-}
\ No newline at end of file
+}
index da2eb70915ca832a3c4ad9bea31a0c072d850e05..42a43ea358ca577028a8b7d42d7d1f90b8b4c125 100644 (file)
@@ -12,4 +12,4 @@
 
 fn main() {
     assert mod_file_aux::bar() == 10;
-}
\ No newline at end of file
+}
index 7cc03081105f63c4fd338a517e8b6058f9acaeb6..56be5e5022a0e57ba46d220c34ed8bbf6f2e7e99 100644 (file)
@@ -13,4 +13,4 @@
 
 fn main() {
     assert m::foo() == 10;
-}
\ No newline at end of file
+}
index 663b615816d0c149a6ac600f91ea407855543c4a..6cc19b18c20a6aba95093db356394b10948736b8 100644 (file)
@@ -17,4 +17,4 @@ fn f20() {
     touch(&x[0]); //~ ERROR use of partially moved value: `x`
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 0ca42425dbdf9e3d4eb3833452eaeceb91b65957..ef8cd58abf992d57fce370419b3aeadad390eea0 100644 (file)
@@ -14,4 +14,4 @@ fn main() {
 mod foo {
     fn main() { //~ ERROR multiple 'main' functions
     }
-}
\ No newline at end of file
+}
index a0a9e3f0ddf27564307b6caf6a9179f65321e5b7..b49ee5aab47e639b5da2b633ecf544ed29f767c9 100644 (file)
@@ -12,7 +12,7 @@ struct S {
  y: int
 }
 
-impl S: Cmp, ToStr { //~ ERROR: expected `{` but found `,`
+impl Cmp, ToStr for S { //~ ERROR: expected `{` but found `,`
   fn eq(&&other: S) { false }
   fn to_str(&self) -> ~str { ~"hi" }
 }
index d0c216fe23122efa3cd443bb772be39688a1b24a..4954bbfa09d068aa4aeeca93802e99fb9ae87e82 100644 (file)
@@ -15,7 +15,7 @@ struct foo {
       _x: Port<()>,
     }
 
-    impl foo : Drop {
+    impl Drop for foo {
         fn finalize(&self) {}
     }
 
index 84f34d0e9bdfb90e1f4f6be4c785fe6ecf701777..9bc4ce87787ed0c9d4437c8b3a9aff6c61d852fc 100644 (file)
@@ -16,7 +16,7 @@ struct r {
   x:int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
@@ -30,7 +30,7 @@ struct r2 {
   x:@mut int,
 }
 
-impl r2 : Drop {
+impl Drop for r2 {
     fn finalize(&self) {}
 }
 
index 360180ee4557e1dd5579dfe55ef119758143f3b5..115120ff37263d6e928605b4c3fa3b5689f8c342 100644 (file)
@@ -14,7 +14,7 @@ struct bar {
   x: int,
 }
 
-impl bar : Drop {
+impl Drop for bar {
     fn finalize(&self) {}
 }
 
index df833ad55fe82559e09725c6b10f50de20c165db..fcbfb115af7567930ae23691fe297170e9d76560 100644 (file)
@@ -9,4 +9,4 @@
 // except according to those terms.
 
 fn foo(x) { //~ ERROR expected `:` but found `)`
-}
\ No newline at end of file
+}
index 2a9f427c7b040d872dc1c5d19513516fe16add7a..13087e05d0be466c4c6b9d613838d5bafeeba344 100644 (file)
@@ -17,4 +17,4 @@ fn main() {
 
     let_in(3, fn&(i) { assert i == 3u; });
     //~^ ERROR expected `int` but found `uint`
-}
\ No newline at end of file
+}
index 80cf409f23986027daf253f44e19fd00c798e05f..43515e265297e1ca72bc518cfdc12e332ecef391 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   i: @mut int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.i) = *(self.i) + 1;
     }
index 223d7effa4ce610f474e77ca26a245d2469d7897..b3717c5b20ec4c46396ae5b7e63a63eef9b54b50 100644 (file)
@@ -16,4 +16,4 @@ fn bar(_t: foo) {}
 fn main() {
     // we used to print foo<int>:
     bar(Some(3u)); //~ ERROR mismatched types: expected `foo`
-}
\ No newline at end of file
+}
index 11d929f79ca2f72d4f23c8367c6810926dd06773..e6a27e6a4bb544a67a659bc26e2517b5f2e310b2 100644 (file)
@@ -14,4 +14,4 @@
 
 fn main() {
     let _x = private_variant_1::super_sekrit::baz; //~ ERROR baz is private
-}
\ No newline at end of file
+}
index 85497e2ee0acbabe5a325df2e718db544088d194..90c507091e93292bd24bc1a8c9464f7df8e45dfb 100644 (file)
@@ -22,7 +22,7 @@ trait modify_in_box_rec {
     pure fn modify_in_box_rec(sum: @{mut f: int});
 }
 
-impl int: modify_in_box_rec {
+impl modify_in_box_rec for int {
     pure fn modify_in_box_rec(sum: @{mut f: int}) {
         sum.f = self; //~ ERROR assigning to mutable field prohibited in pure context
     }
index a9ba7082628b5f402c74ec9bc273af28b07c12cd..e4e61e438f938446c1e7a255c413bb7eef7a81cb 100644 (file)
@@ -31,7 +31,7 @@ trait fake_ext_ctxt {
 
 type fake_session = parse::parse_sess;
 
-impl fake_session: fake_ext_ctxt {
+impl fake_ext_ctxt for fake_session {
     fn cfg() -> ast::crate_cfg { ~[] }
     fn parse_sess() -> parse::parse_sess { self }
     fn call_site() -> span {
index fe382badb5cdf5e73a5074031f88fad7553eb0b8..abe62e15e1309f6bb8c80c3f78fe4f40f1888390 100644 (file)
@@ -30,7 +30,7 @@ trait fake_ext_ctxt {
 
 type fake_session = parse::parse_sess;
 
-impl fake_session: fake_ext_ctxt {
+impl fake_ext_ctxt for fake_session {
     fn cfg() -> ast::crate_cfg { ~[] }
     fn parse_sess() -> parse::parse_sess { self }
     fn call_site() -> span {
index e64b6092c66ef25a36b56ddc365bfff4d3bfd302..962201aa9b966f8a1d09b2a3b1cff6f24fd2a24f 100644 (file)
@@ -16,4 +16,4 @@ fn have_bar(b: bar) {
     want_foo(b); //~ ERROR expected a record with field `a`
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index c9dc77ce4d21b98ef5b7a343c6912704b5e083f7..2a1db52d73312bbfcc315c91c0294ce49c70017b 100644 (file)
@@ -12,7 +12,7 @@ struct my_resource {
   x: int,
 }
 
-impl my_resource : Drop {
+impl Drop for my_resource {
     fn finalize(&self) {
         log(error, self.x);
     }
index b9ffb485bdf718609a00f8506596a4c6e2109bef..54d7c0b4d18b7b8bdf9ee45642d1116fc3a65a81 100644 (file)
@@ -17,4 +17,4 @@ fn bar(a: int) {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 0e6039a4db70e24a778df99e33d197509c3e3818..0681680b9c4a24d37407e4a49c0053da72f86a75 100644 (file)
@@ -12,7 +12,7 @@ trait deref {
     fn get() -> int;
 }
 
-impl &int: deref {
+impl deref for &int {
     fn get() -> int {
         *self
     }
index 47a290099d37fa35e294a7e7cbb82dc085f073b8..1d6ddc4cd9adec95867d240a642fcdc08573b756 100644 (file)
@@ -12,4 +12,4 @@
 const c_y: &static/int = &22;
 
 fn main() {
-}
\ No newline at end of file
+}
index 5e90fbb0498ae84364bcc0752fb778e887862fd4..baf072c01eea212bcbafe69684c0c255a5edf07c 100644 (file)
@@ -20,4 +20,4 @@ enum yes2 {
     x5(&foo/uint) //~ ERROR named regions other than `self` are not allowed as part of a type declaration
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 5547d14799c31f6c263f6f5c2ebb71cd4c97bb10..a3ff05634839de809582f02e907011b47e3288ff 100644 (file)
@@ -12,7 +12,7 @@ struct yes0 {
   x: &uint,
 }
 
-impl yes0 : Drop {
+impl Drop for yes0 {
     fn finalize(&self) {}
 }
 
@@ -20,7 +20,7 @@ struct yes1 {
   x: &self/uint,
 }
 
-impl yes1 : Drop {
+impl Drop for yes1 {
     fn finalize(&self) {}
 }
 
@@ -28,7 +28,7 @@ struct yes2 {
   x: &foo/uint, //~ ERROR named regions other than `self` are not allowed as part of a type declaration
 }
 
-impl yes2 : Drop {
+impl Drop for yes2 {
     fn finalize(&self) {}
 }
 
index a183c60fecdd20a18161f20d38402928349a98d4..a83b747d2f11d581a78ff35de2f3dbedf2def773 100644 (file)
@@ -20,4 +20,4 @@
     x: &foo/uint //~ ERROR named regions other than `self` are not allowed as part of a type declaration
 };
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index fcef29a5156c48b503563bb9ab09e9fc845a4655..762142993f9d93bb917b5aedc256db07d7586268 100644 (file)
@@ -21,4 +21,4 @@ fn manip(x: &a/int) -> int {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 2c493ba2882cdf9e6a1d064ca398ffbf7459583e..e9603dba74424f8e6b789353cca583bac6250c29 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: contravariant/&r) -> contravariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 16a6f9352905a1ba2b60c4729e937c2c1e3b7400..5c57fe26c24b7f1f07e8032550c06b6d01a55510 100644 (file)
@@ -30,4 +30,4 @@ fn to_longer_lifetime(bi: contravariant/&r) -> contravariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index cfd8834a53adf292b69427616392726978f99fb7..a7363867ddc56c09c089bce022be9cfec1447be1 100644 (file)
@@ -29,4 +29,4 @@ fn to_longer_lifetime(bi: covariant/&r) -> covariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index ec11b193ba6462bda97bb5036782527fcb982f17..a22bc7c08c574fe4a16a1cadc57f015bb1edba1b 100644 (file)
@@ -29,4 +29,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index b500b8d6724f96f2ae25440f4c0962f9f0a23389..83c2c5806e45005defd3f81ee6d2a8505a69cded 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 523b48f2aff7e3fb7c77a848062b92d3d50b5010..1a20ca23faedbcc67a38a4f6e08a4108bfdac53a 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 76996e9c14224120f814396c0cc43754c654c218..3d831f02a916b69f8c98e26a44c1b5c3ecc3b61a 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 0f2bdd57bbf01df6bb55c6196e699aa561ab8b33..2c232f70bc412617805a1382c348c66bd7df1cd4 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 119c28a9e84c686bb208035722ffee0be15ffa7e..fabce969b9c3ffd59a0e8c42b6ab3332c74d1ee4 100644 (file)
@@ -25,4 +25,4 @@ fn to_longer_lifetime(bi: invariant/&r) -> invariant/&static {
 }
 
 fn main() {
-}
\ No newline at end of file
+}
index 51a8fe9ceac486b250b3a4a0d35f07e6791c5d9e..c3ce00594f4c1da2a0793996d9e308a668b5106d 100644 (file)
@@ -20,7 +20,7 @@ trait set_f {
     fn set_f_bad(b: @b);
 }
 
-impl c: set_f {
+impl set_f for c {
     fn set_f_ok(b: @b/&self) {
         self.f = b;
     }
index 46b809d225fb66e2217c582f28f182e830fb996b..a75e1deb6a2a320fefb6ce6bef64d57002a76e89 100644 (file)
@@ -23,7 +23,7 @@ trait set_foo_foo {
     fn set_foo(f: foo);
 }
 
-impl with_foo: set_foo_foo {
+impl set_foo_foo for with_foo {
     fn set_foo(f: foo) {
         self.f = f; //~ ERROR mismatched types: expected `@foo/&self` but found `@foo/&`
     }
@@ -41,7 +41,7 @@ trait set_foo_bar {
     fn set_foo(f: bar);
 }
 
-impl with_bar: set_foo_bar {
+impl set_foo_bar for with_bar {
     fn set_foo(f: bar) {
         self.f = f;
     }
index 914e77bb5bb255deb9e8ae46057a54c35414e04c..7b8b8daf565b4aedd2811ef867eba23a89650f4e 100644 (file)
@@ -16,4 +16,4 @@
 fn take_foo(x: foo/&) {} //~ ERROR no region bound is allowed on `foo`
 
 fn main() {
-}
\ No newline at end of file
+}
index 63c27957215f74d0dc7fcb0e39149a83a39725bc..ee2aea1086be320b3cdec256663052482b492031 100644 (file)
@@ -18,4 +18,4 @@ fn nested() {
     });
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index fa4cebcdefb5ae4b68a81a2467775cd5f02fbe54..4d53db35596bc5db3efee08320073f1fed0e94b4 100644 (file)
@@ -27,4 +27,4 @@ fn nested(x: &x/int) {
     });
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 55cdf2752edf86fa39b002158150f03174ae01fb..102ff8b3998bf531ff67e3dd6a17df43aa7c5585 100644 (file)
@@ -19,4 +19,4 @@ fn foo(cond: bool) {
     }
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index f9992429733450371a41cee900a79929a0d05e52..380a9a57d01feede7fd71d79725a89bb4434ced2 100644 (file)
@@ -53,4 +53,4 @@ fn nested(x: &x/int) {  // (1)
     }
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 76e2244c5702b18fc296e62f0551d77cd9f0fd67..de31c64328f92778e3c4c485a3a72ff410a270cf 100644 (file)
@@ -17,7 +17,7 @@ trait get_ctxt {
 
 type has_ctxt = { c: &ctxt };
 
-impl has_ctxt: get_ctxt {
+impl get_ctxt for has_ctxt {
 
     // Here an error occurs because we used `&self` but
     // the definition used `&`:
index 044e656e71c41ddb0b9c6b02cb8b779c12517811..f19417425aaceff45f8ded351193f1e975692cae 100644 (file)
@@ -16,7 +16,7 @@ trait get_ctxt {
 
 type has_ctxt = { c: &ctxt };
 
-impl has_ctxt: get_ctxt {
+impl get_ctxt for has_ctxt {
     fn get_ctxt() -> &self/ctxt { self.c }
 }
 
index aad58446d0ecf3d735d4fcddad03a4a67c06b151..48ef79a998488d4c651065fb93b44ebfb3a56c09 100644 (file)
@@ -19,4 +19,4 @@ fn foo(cond: bool) {
     }
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index 58c07cc8ea6dba3cd9302d8ac6844ccd2eaddaa3..18bdb564441d342de0bba848e769d982db45600c 100644 (file)
@@ -16,7 +16,7 @@ struct Foo {
 
 }
 
-impl Foo : Drop {
+impl Drop for Foo {
     fn finalize(&self) {
         io::println("Goodbye!");
     }
index b0e8e6ae7bd123bb0bc92df6a219b385ab39c907..386d53cc16e92c6f8c464a118b89b032591de3f7 100644 (file)
@@ -11,4 +11,4 @@
 fn main() {
     let be = 0;
     //~^ ERROR `be` is a reserved keyword
-}
\ No newline at end of file
+}
index e3bdb97e744d8cc35f78b5dafea602a34f3b21cf..c89d1d2795b51a7e0a6c1f3da3ecf840c00b26fb 100644 (file)
@@ -12,7 +12,7 @@ trait add {
     fn plus(++x: Self) -> Self;
 }
 
-impl int: add {
+impl add for int {
     fn plus(++x: int) -> int { self + x }
 }
 
index 5aec1c41d0fa41a7f584784e238effde2ca0fcc8..0d253d782832a1f3bd90be7ce1b81273923e1739 100644 (file)
 fn main() {
 trait seq { }
 
-impl<T> ~[T]: seq<T> { //~ ERROR wrong number of type arguments
+impl<T> seq<T> for ~[T] { //~ ERROR wrong number of type arguments
     /* ... */
 }
-impl u32: seq<bool> {
+impl seq<bool> for u32 {
    /* Treat the integer as a sequence of bits */
 }
 
index 6d02291622ed4eea9d60112bcec3bc64874b9585..e67a4099987989b20b9c9fda890c7bbc16d5b4f2 100644 (file)
@@ -13,7 +13,7 @@ trait foo {
     static fn bar();
 }
 
-impl int: foo {
+impl foo for int {
     fn bar() {} //~ ERROR method `bar` is declared as static in its trait, but not in its impl
 }
 
index 06cd7bf246895d0b40d28d9f9c748f811d4b9ef6..ffbfecdc48c7ec94bf08b9f57e56d8468c0138d8 100644 (file)
@@ -17,4 +17,4 @@ fn main() {
         foo: 0,
         foo: 0 //~ ERROR field `foo` specified more than once
     };
-}
\ No newline at end of file
+}
index ee7e52d321971d4527bd9e23c27054699d4e3b5f..c1a0b2209711c0783d78ba3ba11c2a5277aa15b0 100644 (file)
@@ -30,4 +30,4 @@ fn main() {
     // No error when type of parameter actually IS @const int
     let b = box_impl::<@const int>(@3);
     set_box_impl(b, @mut 5);
-}
\ No newline at end of file
+}
index fda80dc4d32c65ffb419a34f0daed034c5f6dc4e..1514dc5fd546dd2734fb93d899133588e02aea7a 100644 (file)
@@ -25,4 +25,4 @@ fn main() {
     let x: @const int = @3; // only way I could find to upcast
     let b = box_impl::<@const int>({mut f: x});
     set_box_impl(b, @mut 5);
-}
\ No newline at end of file
+}
index 94c17fa1602a600a3c943c5ea5d7babc5c4cd040..f2e030b259ed5fdc69b458834d18eb2c1f2ba1bd 100644 (file)
@@ -17,7 +17,7 @@ enum box_impl<T> = {
     mut f: T
 };
 
-impl<T:Copy> box_impl<T>: box_trait<T> {
+impl<T:Copy> box_trait<T> for box_impl<T> {
     fn get() -> T { return self.f; }
     fn set(t: T) { self.f = t; }
 }
@@ -36,4 +36,4 @@ fn main() {
     //~^ ERROR values differ in mutability
     set_box_impl(b, @mut 5);
     //~^ ERROR values differ in mutability
-}
\ No newline at end of file
+}
index 41277974cbfcf0c671f651dc5b2a8afca76cdea6..a20186c362b10e4f479dfdd10e476f3e18a41dca 100644 (file)
@@ -10,8 +10,8 @@
 
 trait A { }
 
-impl int: A {
+impl A for int {
     fn foo() { } //~ ERROR method `foo` is not a member of trait `A`
 }
 
-fn main() { }
\ No newline at end of file
+fn main() { }
index 8ff4188d4b6e0b41de38895dabefb65a87ccb2dc..f32793ad1e45a00fee9fd84d075202937e90d866 100644 (file)
@@ -11,7 +11,7 @@
 trait foo {
     fn bar(x: uint) -> Self;
 }
-impl int: foo {
+impl foo for int {
     fn bar() -> int {
         //~^ ERROR method `bar` has 0 parameters but the trait has 1
         self
index 5509ad42a706959f2ce83505e34536ce6ddd3480..6931e680e08f23fe991427e7ab103bfd6d5e025c 100644 (file)
@@ -14,7 +14,7 @@ trait Mumbo {
     fn jbmbo(&self) -> @uint;
 }
 
-impl uint: Mumbo {
+impl Mumbo for uint {
     // Cannot have a larger effect than the trait:
     fn jumbo(&self, x: @uint) { *self + *x; }
     //~^ ERROR expected pure fn but found impure fn
index b138cb88f0faee2e773b31ae21268f8b37cd4900..eb34ebbdfb0d80f5b0606fb86894f531641851d9 100644 (file)
@@ -12,7 +12,7 @@ trait Mumbo {
     fn jumbo(&self, x: @uint) -> uint;
 }
 
-impl uint: Mumbo {
+impl Mumbo for uint {
     // Note: this method def is ok, it is more accepting and
     // less effecting than the trait method:
     pure fn jumbo(&self, x: @const uint) -> uint { *self + *x }
index 37d1e02b8a992c25b69e366553c0ebe324ab0827..a341c2426113573dfc6619ae06d24e66adf2fbcc 100644 (file)
@@ -24,7 +24,7 @@ struct A {
 }
 
 // Can't implement Bar without an impl of Foo
-impl A : Bar {
+impl Bar for A {
     fn g() { }
 }
 
index db85c89f933277e4fb84e9c1cab368d6d8418ab9..e60be6c81eb585147a0078d82fd4758f2b03ee3d 100644 (file)
@@ -10,4 +10,4 @@
 
 iface foo { } //~ ERROR iface
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index cabcbff11545439b7d4df2578a17dc7e8c18e13f..73b7c4369ac8eedc5e305ba5b51a9badf042929c 100644 (file)
@@ -9,8 +9,8 @@
 // except according to those terms.
 
 trait bar { fn dup() -> Self; fn blah<X>(); }
-impl int: bar { fn dup() -> int { self } fn blah<X>() {} }
-impl uint: bar { fn dup() -> uint { self } fn blah<X>() {} }
+impl bar for int { fn dup() -> int { self } fn blah<X>() {} }
+impl bar for uint { fn dup() -> uint { self } fn blah<X>() {} }
 
 fn main() {
     10i.dup::<int>(); //~ ERROR does not take type parameters
index 9bc2abe076ce29c4f282968dd9f0099384c139cb..cd92801fb4d288f6ef6727eca93b16b53b3c9adf 100644 (file)
@@ -10,6 +10,6 @@
 
 trait foo { fn foo(); }
 
-impl uint: int { fn foo() {} } //~ ERROR trait
+impl int for uint { fn foo() {} } //~ ERROR trait
 
 fn main() {}
index b890ce205be319d783463de4f93daca06e920c65..c68af84b95be0862be6b5e57cbe07e834c2f2aa4 100644 (file)
@@ -29,4 +29,4 @@ fn identity_i(n: int) -> int { n }
     identity_u16(a); 
     //~^ ERROR mismatched types: expected `u16` but found `int`
 
-}
\ No newline at end of file
+}
index 44c30eebe66951e372392e337dfa0a8717ae3f52..a3a197505a34022957fab8ae0a74859dbafecacc 100644 (file)
@@ -11,4 +11,4 @@
 //error-pattern:mismatched types
 fn main() {
     let i: ~int = ~mut 0;
-}
\ No newline at end of file
+}
index 010161181f53ec7b3f6c4fe3d368bd2b892fc6fd..edc8a47822d72524b7c1af79d7d6594132323f2f 100644 (file)
@@ -16,11 +16,11 @@ struct Bar {
     x: int,
 }
 
-impl Bar : Drop {
+impl Drop for Bar {
     fn finalize(&self) {}
 }
 
-impl Bar : Foo {
+impl Foo for Bar {
     fn f(&self) {
         io::println("hi");
     }
index 0211fd3c01166c1435b34f2579686c535cd183a1..1eebc7701328cf6509e3c50eb1e207a905113993 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   b:bool,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
index a97f47551e1ddc7e75f2ce28aa8470ff65c8c6a9..28a7b37d6e20b1327ec37272778220cb283f6cba 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   i: @mut int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.i) = *(self.i) + 1;
     }
index c91bfe91630180f66971475d713fe98aa6d2cbcb..8ddd934f5804d78e6de240da78b0d0c889a3f869 100644 (file)
@@ -13,4 +13,4 @@ fn main() {
   loop{}
              // red herring to make sure compilation fails
   log(error, 42 == 'c');
-}
\ No newline at end of file
+}
index 42db7b9283806d3d2bdd8911b8d668bc45708407..f9ad20eaeb9b4801bd827be14d2022bf62dc65d1 100644 (file)
@@ -20,4 +20,4 @@ fn concat<T: Copy>(v: ~[const ~[const T]]) -> ~[T] {
     return r;
 }
 
-fn main() {}
\ No newline at end of file
+fn main() {}
index feaceea37288c5eb88285cfa80636b02cbf4cf6c..f21a202dcd82badd6af9a5277eb2aab7929d262d 100644 (file)
@@ -16,7 +16,7 @@ struct r {
 
 fn r(i:int) -> r { r { i: i } }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
index d00e7fff0769a33187e2f926e35af4eb4786be42..7b48eca3dbe23225ff4acd614e75fdedb826a3da 100644 (file)
@@ -16,7 +16,7 @@ trait TraitB {
     fn gimme_an_a<A: TraitA>(a: A) -> int;
 }
 
-impl int: TraitB {
+impl TraitB for int {
     fn gimme_an_a<A: TraitA>(a: A) -> int {
         a.method_a() + self
     }
index 5e67afcc2b2e69afcecba8aed778199f38be7d2c..90515807ac6cca6451ce7059d6771640b8d1fb7a 100644 (file)
@@ -13,4 +13,4 @@ fn main() {
 
     let x = 10;
     x; //~ ERROR path statement with no effect
-}
\ No newline at end of file
+}
index 26d5ea4349de676dbe94bb62f638a91d1b0cf586..06365ed989a64002ea8594cdab16b5f028bdf61d 100644 (file)
@@ -2,4 +2,4 @@
 
 fn main() {
     let i: int = fail!(~"test");
-}
\ No newline at end of file
+}
index 74de57a8a25a4b3b1656c93ea703b2c2604ad4f1..4479c2ecbeb35d05fa49b1fed2d1b68e3300bda6 100644 (file)
@@ -6,4 +6,4 @@
 
 fn main() {
     f();
-}
\ No newline at end of file
+}
index 6eb56a5be4e59e3dc6835e230e3d502c7fe03245..3fa3d69441a6289af24add2d3e05c2ab432a1a16 100644 (file)
@@ -2,4 +2,4 @@
 
 fn main() {
     fail!(~"test");
-}
\ No newline at end of file
+}
index e4355c7e02f35ab6435a5e410aa7f8506b457c92..cee3546acfa89b4d56ab4c6af64d26882e3d231d 100644 (file)
@@ -14,7 +14,7 @@ struct R {
     b: int,
 }
 
-impl R : Drop {
+impl Drop for R {
     fn finalize(&self) {
         let _y = R { b: self.b };
     }
index 23ddc7573197f350ed809c27eb30cff959b6416c..18d6b3c369bc110f65d738bdae259087b1a87905 100644 (file)
@@ -29,4 +29,4 @@ fn sleeper() {
 fn main() {
     task::spawn(|| sleeper() );
     task::spawn(|| parent() );
-}
\ No newline at end of file
+}
index d5f438385986d0464898d2585c4eae9649aeea5d..acd4fbad6e4cf66211ba22bf56a9b9a98a9694f4 100644 (file)
@@ -36,7 +36,7 @@ struct and_then_get_big_again {
   x:int,
 }
 
-impl and_then_get_big_again : Drop {
+impl Drop for and_then_get_big_again {
     fn finalize(&self) {
         fn getbig(i: int) {
             if i != 0 {
index e97e56ea0f9e2c5e4bff41b5609171b0f30380c8..14fc40a43cc9a136288a5b37f76898944f9e64a2 100644 (file)
@@ -27,7 +27,7 @@ struct and_then_get_big_again {
   x:int,
 }
 
-impl and_then_get_big_again : Drop {
+impl Drop for and_then_get_big_again {
     fn finalize(&self) {
         fn getbig(i: int) {
             if i != 0 {
index 30e9147cff7e881523b7d55e1a84b7179b8b1d70..e45853937037ef0c436de567b28aa215d315b17e 100644 (file)
@@ -27,7 +27,7 @@ struct and_then_get_big_again {
   x:int,
 }
 
-impl and_then_get_big_again : Drop {
+impl Drop for and_then_get_big_again {
     fn finalize(&self) {}
 }
 
index e936270d4b865f54e67a8944b8bfe77d99f07575..78de5c3b847d7f06daad4c47bd24295ecd1b524d 100644 (file)
@@ -17,7 +17,7 @@ struct r {
 // Setting the exit status after the runtime has already
 // failed has no effect and the process exits with the
 // runtime's exit code
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         os::set_exit_status(50);
     }
index 76d311cf055bcb38a6bcf6a8d9a5598e0d2d06d9..b20eb222025aab5be158ef3fb961bf2840bc3958 100644 (file)
@@ -15,4 +15,4 @@ fn main() {
     // 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);
-}
\ No newline at end of file
+}
index 0af0cdf4a20e6fe2aa293dc8dc5f61ef2c8a738c..009dee8cb7c67d8a8735837a8ba53c34495cd922 100644 (file)
@@ -15,4 +15,4 @@
 fn main() {
     log(debug, ~"don't optimize me out");
     main();
-}
\ No newline at end of file
+}
index 8e0fb37561e3ab7f1c0fe79fcbe38ddfa38d453b..1efff172d7c2509b436a5ebd88e0519fd3b327e8 100644 (file)
@@ -13,4 +13,4 @@
 fn main() {
     let a = @0;
     assert false;
-}
\ No newline at end of file
+}
index 920ddbb5bf24c896440304ec00a20f7119e5a13b..f544438a7cae1e1bba2b3eb5e0bff67059c976db 100644 (file)
@@ -18,7 +18,7 @@ struct r {
   v: *int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         unsafe {
             let _v2: ~int = cast::reinterpret_cast(&self.v);
index 1602964b481e707cef6836c85bfe40a33f5e3f20..b17fc467f0b1a3b31993b3067d02d3fd39528c44 100644 (file)
@@ -18,7 +18,7 @@ trait i {
     fn foo();
 }
 
-impl ~int: i {
+impl i for ~int {
     fn foo() { }
 }
 
index 514c780da096908b46b454d7d530bc38447259d2..27e0ebe77614f979af0b404f208a0bf0289f5668 100644 (file)
@@ -17,7 +17,7 @@ struct faily_box {
  
 fn faily_box(i: @int) -> faily_box { faily_box { i: i } }
 
-impl faily_box : Drop {
+impl Drop for faily_box {
     fn finalize(&self) {
         fail!(~"quux");
     }
index 5a82d0104383ba31ec2d43a0f7551d1639fd8f6b..57b45575b3e6316b6524a2d2e579c00b4afc38e0 100644 (file)
@@ -34,7 +34,7 @@ trait fake_ext_ctxt {
 
 type fake_session = parse::parse_sess;
 
-impl fake_session: fake_ext_ctxt {
+impl fake_ext_ctxt for fake_session {
     fn cfg() -> ast::crate_cfg { ~[] }
     fn parse_sess() -> parse::parse_sess { self }
     fn call_site() -> span {
index 64cc58c2af5ef15fb9a44d9336e6b09e92bd9a80..350132c15b82901f99e92d098a5c033417c914ed 100644 (file)
@@ -21,4 +21,4 @@ pub fn main() {
     debug!("a=%? b=%?", a, b);
     assert a == 22u64;
     assert b == 44u16;
-}
\ No newline at end of file
+}
index 01dcd6a364740ddf3353a797771f3957cd6da8c9..e16fae776f7e979ec185e19bcf8fcbd281348059 100644 (file)
@@ -36,4 +36,4 @@ pub fn main() {
     debug!("a=%u b=%u", *a as uint, b as uint);
     assert *a == x;
     assert b == y;
-}
\ No newline at end of file
+}
index 460e8873a17ea14a57f8a0ecd75525eb5630d8ba..5171d7d2a58a6592ca1a10379a0fe73c509d85e3 100644 (file)
@@ -21,4 +21,4 @@ pub fn main() {
     foo(Some(~22), false);
     foo(None, true);
     foo(None, false);
-}
\ No newline at end of file
+}
index d0dc2638ee593b4c3dba77f42870be5dcb2cdf25..85efaa8aed225245d86eacc0e6df6f348d0adcf3 100644 (file)
@@ -16,7 +16,7 @@ trait iterable<A> {
     fn iterate(blk: fn(x: &A) -> bool);
 }
 
-impl<A> &[A]: iterable<A> {
+impl<A> iterable<A> for &[A] {
     fn iterate(f: fn(x: &A) -> bool) {
         for vec::each(self) |e| {
             if !f(e) { break; }
@@ -24,7 +24,7 @@ fn iterate(f: fn(x: &A) -> bool) {
     }
 }
 
-impl<A> ~[A]: iterable<A> {
+impl<A> iterable<A> for ~[A] {
     fn iterate(f: fn(x: &A) -> bool) {
         for vec::each(self) |e| {
             if !f(e) { break; }
index 316f5ed195035ecc87ddeb803944efb79b88f5b7..53c572e75d099d344211c0392f6d398c85375c29 100644 (file)
@@ -59,7 +59,7 @@ enum Expr {
     Minus(@Expr, @Expr)
 }
 
-impl Expr : cmp::Eq {
+impl cmp::Eq for Expr {
     pure fn eq(&self, other: &Expr) -> bool {
         match *self {
             Val(e0a) => {
@@ -85,21 +85,21 @@ impl Expr : cmp::Eq {
     pure fn ne(&self, other: &Expr) -> bool { !(*self).eq(other) }
 }
 
-impl AnEnum : cmp::Eq {
+impl cmp::Eq for AnEnum {
     pure fn eq(&self, other: &AnEnum) -> bool {
         (*self).v == other.v
     }
     pure fn ne(&self, other: &AnEnum) -> bool { !(*self).eq(other) }
 }
 
-impl Point : cmp::Eq {
+impl cmp::Eq for Point {
     pure fn eq(&self, other: &Point) -> bool {
         self.x == other.x && self.y == other.y
     }
     pure fn ne(&self, other: &Point) -> bool { !(*self).eq(other) }
 }
 
-impl<T:cmp::Eq> Quark<T> : cmp::Eq {
+impl<T:cmp::Eq> cmp::Eq for Quark<T> {
     pure fn eq(&self, other: &Quark<T>) -> bool {
         match *self {
             Top(ref q) => {
@@ -119,7 +119,7 @@ impl<T:cmp::Eq> Quark<T> : cmp::Eq {
     pure fn ne(&self, other: &Quark<T>) -> bool { !(*self).eq(other) }
 }
 
-impl CLike : cmp::Eq {
+impl cmp::Eq for CLike {
     pure fn eq(&self, other: &CLike) -> bool {
         (*self) as int == *other as int
     }
index 4b943e62fd20f7cc093bc526ac818f135c756caf..08c936f2bb66eb6549fa50556d8f2a6a70d24618 100644 (file)
@@ -20,13 +20,13 @@ trait Baz {
     fn g(&self);
 }
 
-impl<T:Baz> T : Foo {
+impl<T:Baz> Foo for T {
     fn f(&self) {
         self.g();
     }
 }
 
-impl Bar : Baz {
+impl Baz for Bar {
     fn g(&self) {
         io::println(self.x.to_str());
     }
index 7c284bd820276ef04103ceee6951b7fd7bd239c9..e7929308897924c88f2a431d0a317a5b8cb8d9a2 100644 (file)
@@ -16,12 +16,12 @@ trait MyIter {
     pure fn test_const(&const self);
 }
 
-impl &[int]: MyIter {
+impl MyIter for &[int] {
     pure fn test_imm(&self) { assert self[0] == 1 }
     pure fn test_const(&const self) { assert self[0] == 1 }
 }
 
-impl &str: MyIter {
+impl MyIter for &str {
     pure fn test_imm(&self) { assert *self == "test" }
     pure fn test_const(&const self) { assert *self == "test" }
 }
index 8423ea8c2d80d9021d69b1334c9482bd170646ea..23165d026e81223f2f2801ae682f43b2a494c627 100644 (file)
@@ -12,7 +12,7 @@ trait Pushable<T> {
     fn push_val(&mut self, +t: T);
 }
 
-impl<T> ~[T]: Pushable<T> {
+impl<T> Pushable<T> for ~[T] {
     fn push_val(&mut self, +t: T) {
         self.push(move t);
     }
@@ -23,4 +23,4 @@ pub fn main() {
     v.push_val(2);
     v.push_val(3);
     assert v == ~[1, 2, 3];
-}
\ No newline at end of file
+}
index f3a1c824f80c58ec838df0e64f2425c3d67332d8..ec5a17ffc54e42370be7716758f08c83b9139c01 100644 (file)
@@ -16,7 +16,7 @@ trait Stuff {
     fn printme();
 }
 
-impl &Foo : Stuff {
+impl Stuff for &Foo {
     fn printme() {
         io::println(fmt!("%d", self.x));
     }
index cc45c75968cff6d0d94f8dcb8f29ff6cd999533e..5eb4d6dcaf37bb13b38daf7bd22b26540b24be33 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index d3377d196a4a80e6b821394af4eb755289b5f7a5..53dd6f942e8609627b65c515d3d8d3ebac63a0c8 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index 0071cc5923a1ce4ff718e8062ef4aef250494ac8..3653c0eb9c95abab72a7e6dcff5ea2dc0f71344d 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index aa487a529660a2c2ccd967568daa5c6a02ed4517..be028a789c9b661a39ff1903e836adadd691124f 100644 (file)
@@ -12,11 +12,11 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self }
 }
 
-impl @uint: double {
+impl double for @uint {
     fn double() -> uint { *self * 2u }
 }
 
index cab69a243d4f286fd53303a65bcf18a5fce317be..52f7a0ba72ebf87fa8acd6eecf9ad66825eb5fe2 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl @@uint: double {
+impl double for @@uint {
     fn double() -> uint { **self * 2u }
 }
 
index 5b307478887dbbce262a70edd384b335986445d5..1a8d550e9e7b72fe74a76fcbcbb7cf76a8e47345 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index 66372654701b79f7da230918a8c20b0a251fdfce..1e61f194354a7903e0a88e86142155ae2234267c 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index 1d7aa862a2a40da141bac4647c491450728db664..60f19b4db0a7d5f6385cdc1025dfa0cae940ed1c 100644 (file)
@@ -12,13 +12,13 @@ trait Foo {
     fn foo(&self) -> ~str;
 }
 
-impl<T: Foo> @T: Foo {
+impl<T: Foo> Foo for @T {
     fn foo(&self) -> ~str {
         fmt!("@%s", (**self).foo())
     }
 }
 
-impl uint: Foo {
+impl Foo for uint {
     fn foo(&self) -> ~str {
         fmt!("%u", *self)
     }
@@ -27,4 +27,4 @@ fn foo(&self) -> ~str {
 pub fn main() {
     let x = @3u;
     assert x.foo() == ~"@3";
-}
\ No newline at end of file
+}
index 338c264b65b70947070f9be58fd823dde2167edc..4a4f6c9bce7cf9d9152fc0faf107b0cd04ab6d3d 100644 (file)
@@ -16,4 +16,4 @@ pub fn main() {
 
     assert -2147483648i32 - 1i32 == 2147483647i32;
     assert -9223372036854775808i64 - 1i64 == 9223372036854775807i64;
-}
\ No newline at end of file
+}
index d27ca86c26ae285a4f6867a57c9c17c6a85f98ed..99379813840ffbf30533ccc97a26466eda8d7a71 100644 (file)
@@ -98,7 +98,7 @@ fn p(x: int, y: int) -> p {
     }
 }
 
-impl p : cmp::Eq {
+impl cmp::Eq for p {
     pure fn eq(&self, other: &p) -> bool {
         (*self).x == (*other).x && (*self).y == (*other).y
     }
index daed89033fca0bae23727d6f99aaf45cb55cc6c7..c2b19d2ce35b8cbcca205b3ac7263f7fa3ccc7ac 100644 (file)
@@ -12,7 +12,7 @@ trait Foo {
     fn foo(self);
 }
 
-impl &[int]: Foo {
+impl Foo for &[int] {
     fn foo(self) {}
 }
 
index 88c06476243a2642c6c35bb7f0314506051b9b96..0b15adb82bf034c760203636a35b526c3481e00a 100644 (file)
@@ -17,4 +17,4 @@ fn sum_slice(x: &[int]) -> int {
 pub fn main() {
     let x = @[1, 2, 3];
     assert sum_slice(x) == 6;
-}
\ No newline at end of file
+}
index 8db3bdd5e64fd6c35f9ccc671dca4d9320599475..b54791328a0cb9636fc104a09f9913745e4a8536 100644 (file)
@@ -18,4 +18,4 @@ fn bar(x: *~int) -> ~int {
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 9126a327d861d60349e04b80f75a70eb480a7344..62e58412a7303db8a4f109eeafb935f4f73ad671 100644 (file)
@@ -20,4 +20,4 @@ fn has_mut_vec(+v: ~[int]) -> int {
 
 pub fn main() {
     assert has_mut_vec(~[1, 2, 3]) == 6;
-}
\ No newline at end of file
+}
index 88ddf4e081adca85390a1145dee4a383fecf11d6..5dc373aa50fef1b9b49928f654725ab28d8aa62a 100644 (file)
@@ -16,7 +16,7 @@ trait frob {
     fn frob();
 }
 
-impl foo: frob {
+impl frob for foo {
     fn frob() {
         really_impure(self.bar);
     }
index 482673f9184a62a6a8ead8d22db3c4d228aa8353..5cea4129857d50a26258b4eab9965ad24b344b71 100644 (file)
@@ -30,4 +30,4 @@ pub fn main() {
         assert *b_x == 3;
         assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(*b_x));
     }
-}
\ No newline at end of file
+}
index 3f5708a8930335806d7d66efee713ad5a47d9d16..9724717f2d58072fec408a3455899ad5cd6f2ac2 100644 (file)
@@ -30,4 +30,4 @@ pub fn main() {
         assert *b_x == 3;
         assert ptr::addr_of(&(*x.f)) != ptr::addr_of(&(*b_x));
     }
-}
\ No newline at end of file
+}
index b4b5a622408c275ef8fdd644616c1e3a0ad34dd2..a0f1801ce29a9b9ad70ab49e533480ae3ff11334 100644 (file)
@@ -21,4 +21,4 @@ fn switcher(x: Option<@int>) {
 pub fn main() {
     switcher(None);
     switcher(Some(@3));
-}
\ No newline at end of file
+}
index 37c598f01a710118307cb31d0b505d74086d8629..70f26d12dcd703be0b2f32a9804c61ee5e17dd1b 100644 (file)
@@ -28,4 +28,4 @@ pub fn main() {
         assert *b_x == 3;
         assert ptr::addr_of(&(*x)) != ptr::addr_of(&(*b_x));
     }
-}
\ No newline at end of file
+}
index 490db9c47f728c69496bc63294441ec378ccf7e1..ca785558be3a7e8d103c03f6685584b9c147b399 100644 (file)
@@ -37,4 +37,4 @@ fn testfn(cond: bool) {
 pub fn main() {
     testfn(true);
     testfn(false);
-}
\ No newline at end of file
+}
index 531c49b82d76a994a46c5831ba72fc14eed2a11a..530870191f50ae7f04057ce94b976de7429d9eed 100644 (file)
@@ -26,4 +26,4 @@ pub fn main() {
       }
     };
     assert z == 18;
-}
\ No newline at end of file
+}
index f709448d43149bda8296b275fd809cecabe1cc68..5fcc2ca6b47727fc2235c7745a4ca3d3781620ec 100644 (file)
@@ -20,4 +20,4 @@ pub fn main() {
     let x = None;
     let y = Some(3);
     assert select(&x, &y).get() == 3;
-}
\ No newline at end of file
+}
index 1347430e4a07953d6c19e222bcdd31441600f2c4..50e137d6fd54036f21ec58b1e907c54218415a6c 100644 (file)
@@ -12,7 +12,7 @@ trait Foo {
     fn foo();
 }
 
-impl int : Foo {
+impl Foo for int {
     fn foo() {
         io::println("Hello world!");
     }
index bd099f45e49bb6c2e843ff9ef7a3ec0951c370c3..81fa3d6538c44b46dcb4187e31786afb00ad10ca 100644 (file)
@@ -11,4 +11,4 @@
 pub fn main() {
     let x = 3;
     debug!("&x=%x", ptr::to_uint(&x));
-}
\ No newline at end of file
+}
index d3a8dd53014fce6b85cdcdaf0dc5e7920408fd58..24120b69c7f0cc5a67ff209386c2d58c17d86eaf 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
 
 #[cfg(unix)]
 pub fn main() {
-}
\ No newline at end of file
+}
index ddf58d310cfe9a9ff148e7af7f7ab61e565dd0ca..784c9326a0186756556b567c6ee591f8eef3abbc 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
 
 #[cfg(target_family = "unix")]
 pub fn main() {
-}
\ No newline at end of file
+}
index 471f830c3e217724dba394e327942f5686067583..8636699c48251cfa1feeec37a0fbe40ecc4d80d4 100644 (file)
@@ -12,7 +12,7 @@ struct cat {
   name: ~str,
 }
 
-impl cat : Drop {
+impl Drop for cat {
     #[cat_dropper]
     /**
        Actually, cats don't always land on their feet when you drop them.
index 2f7ede7e59e5a608efeefa018a78baf9f30819c0..b72a8e5da27108ef106afcef0660a6ee1c35714b 100644 (file)
@@ -33,7 +33,7 @@ impl dog {
     }
 }
 
-impl dog : noisy {
+impl noisy for dog {
   fn speak() -> int { self.bark() }
 }
 
@@ -51,7 +51,7 @@ struct cat {
   name : ~str,
 }
 
-impl cat : noisy {
+impl noisy for cat {
   fn speak() -> int { self.meow() as int }
 }
 
index 014b5441cc2ce5cd219e979ffdd6fd74f9354b81..cb2e56d7f6e1a97dcc45ba4b459e38d2792ae4d5 100644 (file)
@@ -18,7 +18,7 @@ struct cat {
   name : ~str,
 }
 
-impl cat : noisy {
+impl noisy for cat {
   fn speak() { self.meow(); }
 }
 
@@ -58,4 +58,4 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
 pub fn main() {
   let nyan : noisy  = cat(0u, 2, ~"nyan") as noisy;
   nyan.speak();
-}
\ No newline at end of file
+}
index 07193400c6a9e048e98fc66f17d7b8dcedaa398a..229c683706dff460bba24704e8326d1565bd6249 100644 (file)
@@ -13,7 +13,7 @@ struct cat {
   meows : uint,
 }
 
-impl cat : Drop {
+impl Drop for cat {
     fn finalize(&self) {
         (self.done)(self.meows);
     }
index 347f44b2afa6ac79ff76b541ec377e59b73adb77..01b72c9d99592b48088be1ed055cf10e2e3d904e 100644 (file)
@@ -15,7 +15,7 @@
 
 enum cat_type { tuxedo, tabby, tortoiseshell }
 
-impl cat_type : cmp::Eq {
+impl cmp::Eq for cat_type {
     pure fn eq(&self, other: &cat_type) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
@@ -49,7 +49,7 @@ fn eat(&mut self) -> bool {
     }
 }
 
-impl<T> cat<T>: BaseIter<(int, &T)> {
+impl<T> BaseIter<(int, &T)> for cat<T> {
     pure fn each(&self, f: fn(&(int, &self/T)) -> bool) {
         let mut n = int::abs(self.meows);
         while n > 0 {
@@ -61,16 +61,16 @@ impl<T> cat<T>: BaseIter<(int, &T)> {
     pure fn size_hint(&self) -> Option<uint> { Some(self.len()) }
 }
 
-impl<T> cat<T>: Container {
+impl<T> Container for cat<T> {
     pure fn len(&self) -> uint { self.meows as uint }
     pure fn is_empty(&self) -> bool { self.meows == 0 }
 }
 
-impl<T> cat<T>: Mutable {
+impl<T> Mutable for cat<T> {
     fn clear(&mut self) {}
 }
 
-impl<T> cat<T>: Map<int, T> {
+impl<T> Map<int, T> for cat<T> {
     pure fn contains_key(&self, k: &int) -> bool { *k <= self.meows }
 
     pure fn each_key(&self, f: fn(v: &int) -> bool) {
index ff052259a76771d376e7438556dd1ea0769a0dcd..155090b44dfc385954ee732e2aaeb047884e146e 100644 (file)
@@ -34,7 +34,7 @@ fn eat() -> bool {
   }
 }
 
-impl cat : noisy {
+impl noisy for cat {
 
   fn speak() { self.meow(); }
 
@@ -65,4 +65,4 @@ pub fn main() {
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { nyan.speak(); };
   assert(nyan.eat());
-}
\ No newline at end of file
+}
index 4679abe21d7a08cc5df59a577568b3853f7df57a..06a2dbeb9a4996190d54311d26c8cb04ec1d86b4 100644 (file)
@@ -46,7 +46,7 @@ fn eat() -> bool {
   }
 }
 
-impl cat : noisy {
+impl noisy for cat {
   fn speak() { self.meow(); }
 }
 
index 7e59b5d7a870bd80e9d7fdfe3d0d349fa34041da..919fb058a953aa65936dd777f495d08e2035eacc 100644 (file)
@@ -53,7 +53,7 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
     }
 }
 
-impl cat: ToStr {
+impl ToStr for cat {
   pure fn to_str(&self) -> ~str { copy self.name }
 }
 
index 060ad2b4beba94679d77608a9dd6a25886f31255..db70d6e3b362cc82912ab12c12ed4682d28bd758 100644 (file)
@@ -22,4 +22,4 @@ fn cat(in_name: ~str) -> cat {
 
 pub fn main() {
   let nyan = cat(~"nyan");
-}
\ No newline at end of file
+}
index 1b68e6c519aa5bd5bbf30c031d3d41e6e510bb3b..d40f948431e25a1f12c964c95801770110b668bb 100644 (file)
@@ -19,4 +19,4 @@ pub fn main() {
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { nyan.speak(); };
   assert(nyan.eat());
-}
\ No newline at end of file
+}
index c3bc2f096ba784b5467fbffbab8bc714c0f2cb02..808b7cac501a6ab69bb07ffde78e242098517bb0 100644 (file)
@@ -56,4 +56,4 @@ pub fn main() {
   assert(!nyan.eat());
   for uint::range(1u, 10u) |_i| { nyan.speak(); };
   assert(nyan.eat());
-}
\ No newline at end of file
+}
index 09b57ebd6177c75173eab16c504d01e7318aaefa..9c8ca729a23caaa310e1fbfcaf7e3c913c0f1bae 100644 (file)
@@ -21,4 +21,4 @@ pub fn main() {
     let z : @{a:int, b:int} = @{ a : 10, b : 12};
     let p = task::_spawn(bind f(z));
     task::join_id(p);
-}
\ No newline at end of file
+}
index 0820af24c49eaa6838bb363f9366e09b71a69d09..7797af14364c88ba573710f5f23d3bd539dc26d3 100644 (file)
@@ -2,7 +2,7 @@ trait Reverser {
     fn reverse(&self);
 }
 
-impl &mut [uint] : Reverser {
+impl Reverser for &mut [uint] {
     fn reverse(&self) {
         vec::reverse(*self);
     }
index 7435096c27535320eb5341742ecfca59631132c6..9921389da6674c069095a5306082da5570148115 100644 (file)
@@ -1,13 +1,13 @@
 trait X {}
 
-impl<A:Copy> A : X {}
+impl<A:Copy> X for A {}
 
 struct S {
     x: int,
     drop {}
 }
 
-impl S : X {}
+impl X for S {}
 
 pub fn main(){}
 
index 561187d1934f6146e665fd8c120b8ec83e367e6b..4fb43092500b36f6642d9205e8dbf655c36cbda0 100644 (file)
@@ -10,7 +10,7 @@
 
 pub fn main() {
     enum x { foo }
-    impl x : ::core::cmp::Eq {
+    impl ::core::cmp::Eq for x {
         pure fn eq(&self, other: &x) -> bool {
             (*self) as int == (*other) as int
         }
index e73e1e9755517491e71ded6b9880e2e9b19cf878..591d2666e254feb67d655e7ae2a17abffc328e37 100644 (file)
@@ -19,4 +19,4 @@ pub fn main() {
     assert !cmp(Some(3), Some(4));
     assert cmp(Some(3), Some(3));
     assert cmp(None, None);
-}
\ No newline at end of file
+}
index 1c2da8ff3ec1c217b3776cb5a0e7a7540243c2e2..883acf817a0c8ff6e56d5236d27caee40d0a2075 100644 (file)
@@ -129,7 +129,7 @@ struct Foo {
         bar: uint
     }
 
-    impl Foo: Fooable {
+    impl Fooable for Foo {
         #[cfg(bogus)]
         static fn what() { }
 
index b3498b4dc58b3380e7da6e4e1cd1686949a2ba41..c07b2e2671e3300323d4fca50531f75a355b9973 100644 (file)
@@ -13,4 +13,4 @@
 
 pub fn main() {
     assert b == 3;
-}
\ No newline at end of file
+}
index 4d7dc6bac9dbd326bc0086fc19ad6305231ac7a5..1fd2ebab83ff3cd56c5c5b0a8dbcbb65db1a2bef 100644 (file)
@@ -20,4 +20,4 @@ struct S {
 pub fn main() {
     assert foopy == f;
     assert f == s.f;
-}
\ No newline at end of file
+}
index 17c66b354a1bc38dad32038e70a2fcbb7dc72a4d..4d4247ed5b91efb750f8fec6729edd711ddc1319 100644 (file)
@@ -18,4 +18,4 @@ struct Bar { f: &fn() -> int }
 
 pub fn main() {
     assert (b.f)() == 0xca7f000d;
-}
\ No newline at end of file
+}
index 44917e23293b8d2e214ab02787b7fdf391da8d2b..2b6817d4a08627b6e24dab6383ba8eda7d28bda5 100644 (file)
@@ -14,4 +14,4 @@
 
 pub fn main() {
     assert toplevel_mod == -1;
-}
\ No newline at end of file
+}
index 58c09ccce923d3e45159a903e5a5b5f5767f1340..24243601e09deeccbc0f50d5a8635d1d1d3f9520 100644 (file)
@@ -11,7 +11,7 @@
 
 struct foo { a: int, b: int, c: int }
 
-impl foo : cmp::Eq {
+impl cmp::Eq for foo {
     pure fn eq(&self, other: &foo) -> bool {
         (*self).a == (*other).a &&
         (*self).b == (*other).b &&
index 8eaad5c08b2a2b19b31c97b6a9ddb421cd4e9ccc..127a1c970389605db28749fd4efd4609b0b73f2d 100644 (file)
@@ -17,4 +17,4 @@ pub fn main() {
     let w = @foo{ mut z: || nop() };
     let x : fn@() = || nop_foo(w);
     w.z = x;
-}
\ No newline at end of file
+}
index b34ff10b5314387d594dad9b77dd58e551af738a..4be43fc1296ed203a3bb408f0a1b537989ed1299 100644 (file)
@@ -17,4 +17,4 @@ pub fn main() {
     let w = @foo{ z: || nop() };
     let x : fn@() = || nop_foo(~[], w);
     w.z = x;
-}
\ No newline at end of file
+}
index 9a5d776baccd2a94133f369ed164f514669d6b9a..6f3297c6602729c26baa7a9a50d636b5f0359562 100644 (file)
@@ -19,4 +19,4 @@ pub fn main() {
     let w = @foo { mut z: || nop() };
     let x : fn@() = || nop_foo(o(), w);
     w.z = x;
-}
\ No newline at end of file
+}
index d2d8181e114ace0e87be7be649ae5731e6cf76d5..e6ae892093c8ffb6947124fead4303ff0edd53fd 100644 (file)
@@ -2009,4 +2009,4 @@ pub fn main() {
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     ];
-}
\ No newline at end of file
+}
index e66cf1bbea64dc3d709311d6033d05eed6ac7d68..ab08a538723e4505c0206d271b300a8459d48bce 100644 (file)
@@ -8009,4 +8009,4 @@ pub fn main() {
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     ];
-}
\ No newline at end of file
+}
index 41ab5b1d3c860651dc8ff7835737823fd3b70a24..4e17506d6ead9612c3ac871d243127ac77858695 100644 (file)
@@ -22,7 +22,7 @@ struct A {
     x: int
 }
 
-impl A : Foo {
+impl Foo for A {
     fn g() {
         io::println("Goodbye!");
     }
index 5c5cec1fac1d8b9d1915b7ecb2ecc322663f9baa..745d941182e6c33be2aebf5fb3984746a7323d23 100644 (file)
@@ -17,4 +17,4 @@ fn d(f: fn@()) { }
 pub fn main() {
     for f { }
     do d { }
-}
\ No newline at end of file
+}
index 5cad9235af843173edc7a9e351617ab004c724cd..b422f5819f09ce21cba5ff8ea1603ad707e6e2b1 100644 (file)
@@ -17,4 +17,4 @@
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 256461b61bd050e2672b6b8a5772875bd9997295..270137c2fd292bb734af71195227431a57b7b720 100644 (file)
@@ -12,7 +12,7 @@ struct S<T> {
     x: T
 }
 
-impl<T> S<T> : ::core::ops::Drop {
+impl<T> ::core::ops::Drop for S<T> {
     fn finalize(&self) {
         io::println("bye");
     }
index 084bff6374380c980126fc04748b4f69b6c96b02..3eddda376a8365f3d58fc0051252dbd27e4ce2e0 100644 (file)
@@ -12,7 +12,7 @@ struct Foo {
     x: int
 }
 
-impl Foo : Drop {
+impl Drop for Foo {
     fn finalize(&self) {
         io::println("bye");
     }
index d71edb660985fc73a15642d219a3f836135833ba..0191934d6080797e2961d8fd4c37cc453a8a8086 100644 (file)
@@ -12,7 +12,7 @@
 trait thing<A> {
     fn foo() -> Option<A>;
 }
-impl<A> int: thing<A> {
+impl<A> thing<A> for int {
     fn foo() -> Option<A> { None }
 }
 fn foo_func<A, B: thing<A>>(x: B) -> Option<A> { x.foo() }
index 0dd6c2773ce9686dfdbb67255c1190266fd4a2ce..4c71e10c8e3aa7da2aa2447649aa508b7a7059c9 100644 (file)
@@ -10,7 +10,7 @@
 
 enum chan { chan_t, }
 
-impl chan : cmp::Eq {
+impl cmp::Eq for chan {
     pure fn eq(&self, other: &chan) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 8d081c16830e49cdb8d931a982de3956e0f4889a..c18e263245a4256053556c5d3a0f1bb7c7adb437 100644 (file)
@@ -16,7 +16,7 @@ struct S {
     x: int
 }
 
-impl S : Foo {
+impl Foo for S {
     fn f(@self) {
         assert self.x == 3;
     }
index f6a6ae5ed49e1dff925302e6f051e3903ea79831..80c18ca0974a4a787cfb2e02d189af6143ecdb69 100644 (file)
@@ -13,7 +13,7 @@ pub trait ReaderUtil {
     fn read_bytes(&self, len: uint);
 }
 
-impl<T: Reader> T : ReaderUtil {
+impl<T: Reader> ReaderUtil for T {
 
     fn read_bytes(&self, len: uint) {
         let mut count = self.read(&mut [0], len);
@@ -26,7 +26,7 @@ struct S {
     y: int
 }
 
-impl S: Reader {
+impl Reader for S {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         0
     }
index f6a6ae5ed49e1dff925302e6f051e3903ea79831..80c18ca0974a4a787cfb2e02d189af6143ecdb69 100644 (file)
@@ -13,7 +13,7 @@ pub trait ReaderUtil {
     fn read_bytes(&self, len: uint);
 }
 
-impl<T: Reader> T : ReaderUtil {
+impl<T: Reader> ReaderUtil for T {
 
     fn read_bytes(&self, len: uint) {
         let mut count = self.read(&mut [0], len);
@@ -26,7 +26,7 @@ struct S {
     y: int
 }
 
-impl S: Reader {
+impl Reader for S {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         0
     }
index 1804c24708bac9f72c37e05fe83298025b5822fa..a32ac955b946b7116afec5e996841feb588fecfc 100644 (file)
@@ -13,7 +13,7 @@ pub trait ReaderUtil {
     fn read_bytes(len: uint);
 }
 
-impl<T: Reader> T : ReaderUtil {
+impl<T: Reader> ReaderUtil for T {
 
     fn read_bytes(len: uint) {
         let mut count = self.read(&mut [0], len);
@@ -26,7 +26,7 @@ struct S {
     y: int
 }
 
-impl S: Reader {
+impl Reader for S {
     fn read(&self, bytes: &mut [u8], len: uint) -> uint {
         0
     }
index b460131461232d0a7f358270983c5f925f969f3e..ca7764f96f4f198b5260e9ed0170ef168b236724 100644 (file)
@@ -13,7 +13,7 @@ pub trait ReaderUtil {
     fn read_bytes(len: uint);
 }
 
-impl<T: Reader> T : ReaderUtil {
+impl<T: Reader> ReaderUtil for T {
 
     fn read_bytes(len: uint) {
         let mut count = self.read(&mut [0], len);
@@ -26,7 +26,7 @@ struct S {
     y: int
 }
 
-impl S: Reader {
+impl Reader for S {
     fn read(bytes: &mut [u8], len: uint) -> uint {
         0
     }
index 79d5d7791f420009fa118ba91f636ccc7fa08fce..3b5c02672d6a0557a89b8a540adf1195b955210c 100644 (file)
@@ -16,7 +16,7 @@ struct S {
     x: int
 }
 
-impl S : Foo {
+impl Foo for S {
     fn f(&self) {
         assert self.x == 3;
     }
index 6e789b7ff1ed1835889b911c3336fea4ce3412a6..44f39e3ef0c5d931c2bbe59534d0309282e737a3 100644 (file)
@@ -16,7 +16,7 @@ struct S {
     x: int
 }
 
-impl S : Foo {
+impl Foo for S {
     fn f(~self) {
         assert self.x == 3;
     }
index ebffa131fb6aeed4868cb033f4082965f6c2a86f..f162a1bc48a6a20ceaf9298f55c0179d24908087 100644 (file)
@@ -63,7 +63,7 @@ fn spam(self) -> int { *self.x.a }
 }
 
 trait Nus { fn f(&self); }
-impl thing: Nus { fn f(&self) {} }
+impl Nus for thing { fn f(&self) {} }
 
 pub fn main() {
 
index 16f2467422683e23b2ac187104106e909817df2d..1b33df0b328c93cba80a1d553653d61fd0e65765 100644 (file)
@@ -15,7 +15,7 @@ mod foo {
     // not exported
     enum t { t1, t2, }
 
-    impl t : cmp::Eq {
+    impl cmp::Eq for t {
         pure fn eq(&self, other: &t) -> bool {
             ((*self) as uint) == ((*other) as uint)
         }
index 620881d30e3cea90921d6a2d7a25d7c6028b7869..ed362edde40642e28a2ad294e219eb8fdf57d847 100644 (file)
@@ -23,7 +23,7 @@ fn test_rec() {
 
 enum mood { happy, sad, }
 
-impl mood : cmp::Eq {
+impl cmp::Eq for mood {
     pure fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 2f222c2d08e07dc34609bb8166513db5c4b5fa9c..ea0bd76843861dc1fd32fca6c781c22edf546a3e 100644 (file)
@@ -24,7 +24,7 @@ fn test_rec() {
 
 enum mood { happy, sad, }
 
-impl mood : cmp::Eq {
+impl cmp::Eq for mood {
     pure fn eq(&self, other: &mood) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index 3aaa514eea2c30350dbc0d503387d11f263483fe..e4b9b9dfa1686599c0e8eda763ee9dd38e4c7d3e 100644 (file)
@@ -12,4 +12,4 @@
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 6561708192b6bcb461f241fab1b6ea17fe1c366f..c08d8f61033beefb2f10fb7b9e7bd3e40461f20a 100644 (file)
@@ -17,4 +17,4 @@ pub fn main()
       assert add(3)(4) == 7;
       let add3 : fn(int)->int = add(3);
       assert add3(4) == 7;
-}
\ No newline at end of file
+}
index 1d523e180ff29a107375e38e35f885bdae12374e..ded30c6c7d62603627fcd21385e9caeae747847b 100644 (file)
@@ -22,4 +22,4 @@ pub fn main() {
     let h = f;
     g(h, &mut called);
     assert called == true;
-}
\ No newline at end of file
+}
index b243ce63e18c2831c27fe3697354fc0a9249b506..a1ccb8b37eff9614cfd019f05fe260d489f0ccb9 100644 (file)
@@ -14,4 +14,4 @@ fn likes_block(f: fn()) { f() }
 
 pub fn main() {
     likes_block(bare);
-}
\ No newline at end of file
+}
index 91b0abbb3ec3e51bcf29c43244c72621558fad72..5f69af31134789a42973eceb829110de7c5c8838 100644 (file)
@@ -14,4 +14,4 @@ fn likes_shared(f: fn@()) { f() }
 
 pub fn main() {
     likes_shared(bare);
-}
\ No newline at end of file
+}
index c224f48cbc3feb268cd0e3628bc8381b3b39717b..85203c185443e2d4d4792d15b69b4a2a73856395 100644 (file)
@@ -14,4 +14,4 @@ fn f() {
 
 pub fn main() {
     f();
-}
\ No newline at end of file
+}
index 499dc6a4a2b2283529a504483e3edaf02b332d46..e727dd6e8ab264a1a31b75e5e6c9aa34b5fee818 100644 (file)
@@ -16,4 +16,4 @@ pub fn main() {
     // Bare functions should just be a pointer
     assert sys::rustrt::size_of::<fn()>() ==
         sys::rustrt::size_of::<int>();
-}
\ No newline at end of file
+}
index 028fb0f444091392582a206d7d604db03832cae7..d1c903411afbedd5024814996a6e2d52ed449401 100644 (file)
@@ -15,4 +15,4 @@ struct r {
 pub fn main() {
     fn f() {}
     let i: r = r {field: f};
-}
\ No newline at end of file
+}
index 865aa775362843993ba0fd26f350406b3197a593..5d400e98d41aad951a7ac57d60838cad416859cb 100644 (file)
@@ -21,4 +21,4 @@ pub fn main() {
         let data: *int = cast::transmute(data);
         assert *data == 100;
     }
-}
\ No newline at end of file
+}
index 497739471d89ad8e10d96db7ee349df9e2bc274c..5279ef043f55934d297b6f3272b53199c9a6090c 100644 (file)
@@ -16,7 +16,7 @@ struct S {
     x: int
 }
 
-impl S : Foo<int> {
+impl Foo<int> for S {
     fn get() -> int {
         self.x
     }
index 8afa762c0a3eaf385947739ebfeb6169d4c7602e..511529bbc8f7877bef3ee080c65e6f6d7b1bcb05 100644 (file)
@@ -27,4 +27,4 @@ fn foo() -> bool { true }
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 972bd959a1d276c078031409c687b07f60b9aec8..59e248dfc1b31bd31f76b65c35fe231c48abc39b 100644 (file)
@@ -12,7 +12,7 @@ trait foo {
     fn foo() -> uint;
 }
 
-impl<T> ~[const T]: foo {
+impl<T> foo for ~[const T] {
     fn foo() -> uint { vec::len(self) }
 }
 
index 70a4cecf47a11afba5022699eb21eee634195151..62644fc678ea8cc41f17af0c6d25e70d77ab4b8a 100644 (file)
@@ -27,4 +27,4 @@ fn loop(n: int) {
     loop { }
 }
 
-pub fn main() { let t: task = spawn loop(5); join(t); }
\ No newline at end of file
+pub fn main() { let t: task = spawn loop(5); join(t); }
index 965c14f7315b78e9bac818eb2bd1a14ad818bde5..0605fac3677bf7a10c4c4accef743d042a3b1347 100644 (file)
@@ -17,7 +17,7 @@ struct r {
 
 struct Box { x: r }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.i) = *(self.i) + 1;
     }
index 33caaf1b53fca30b845452963fb77e5d3dd19c73..305bd69a57e5b3b9cef43ae471f97ff9fe826009 100644 (file)
@@ -28,4 +28,4 @@ pub fn main() {
     assert noise(dog(pug)) == Some(~"woof");
     assert noise(rabbit(~"Hilbert", upright)) == None;
     assert noise(tiger) == Some(~"roar");
-}
\ No newline at end of file
+}
index 092d2b05cb7423992d3ff9af6a9bfcbd3b3eded4..92f0beaeb9c27ea9f4052bd3e00ad14678171217 100644 (file)
@@ -12,4 +12,4 @@
 enum t {
     foo(~[t])
 }
-pub fn main() {}
\ No newline at end of file
+pub fn main() {}
index a28d5a205e9953835c58ec4a91ef5f0ef1579f79..90646b0750aa91dccbe0c1c8c6ba25a8e6b3dfbe 100644 (file)
@@ -15,4 +15,4 @@ pub fn main() {
     while s != ~"" {
         return;
     }
-}
\ No newline at end of file
+}
index e24defbf40caa257d1e45f881016424b847d3ac1..ff35b81aad1f66fef39e585b9f3902974b7a1089 100644 (file)
@@ -20,11 +20,11 @@ trait iterable<A> {
     fn iter(blk: fn(A));
 }
 
-impl<A> fn@(fn(A)): iterable<A> {
+impl<A> iterable<A> for fn@(fn(A)) {
     fn iter(blk: fn(A)) { self(blk); }
 }
 
-impl fn@(fn(uint)): iterable<uint> {
+impl iterable<uint> for fn@(fn(uint)) {
     fn iter(blk: fn(&&v: uint)) { self( |i| blk(i) ) }
 }
 
index b28055eca27996aaab21a665f2c22559d512aee1..245864cc3391dc951348ecdf89bc4f9e839034da 100644 (file)
@@ -28,4 +28,4 @@ fn bar() {}
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 730646e4075a96ee826524348d2f5cf74c470aa6..ada3852812c8b943314074f3917f7b4ffecdbed1 100644 (file)
@@ -29,4 +29,4 @@ pub fn main() {
 
     error!("%?", x);
     assert(x == 42);
-}
\ No newline at end of file
+}
index e2484433448d1e7930a35716b59ec0518fcbfcff..1c4f21c6288671c75934a66fd5a1141c04260940 100644 (file)
@@ -17,4 +17,4 @@ fn f<T: Send>(t: T) {
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index a77bbe150ab86109933ea956c557cefeebdf3db0..99c9828bfeaa00a366f8791fb1b5f5c3bf92b312 100644 (file)
@@ -15,7 +15,7 @@ struct foo<A> {
   x: A,
 }
 
-impl<A: Copy> foo<A> : clam<A> {
+impl<A: Copy> clam<A> for foo<A> {
   fn chowder(y: A) {
   }
 }
index 4a12440040c410ecde5286396b80a90349d2c570..c9dc6a58c122b1ece5398d65cb18717b05c50582 100644 (file)
@@ -17,4 +17,4 @@
 
 pub fn main() {
   let _c: cloth::fabric = cloth::calico;
-}
\ No newline at end of file
+}
index 62fef8202aa532b24e243e0813c8fb8b376dade2..198a8c900d77b44cfd4d13a06ecb90b9a524644d 100644 (file)
@@ -13,7 +13,7 @@ struct socket {
 
 }
 
-impl socket : Drop {
+impl Drop for socket {
     fn finalize(&self) {}
 }
 
index de03e3382a6d1ea63304dde2a700224759c57008..b70a9670df193010089c71afe22659b0994c8023 100644 (file)
@@ -14,7 +14,7 @@ trait FlatMapToVec<A> {
   fn flat_map_to_vec<B, IB:BaseIter<B>>(op: fn(&A) -> IB) -> ~[B];
 }
 
-impl<A:Copy> BaseIter<A>: FlatMapToVec<A> {
+impl<A:Copy> FlatMapToVec<A> for BaseIter<A> {
    fn flat_map_to_vec<B, IB:BaseIter<B>>(op: fn(&A) -> IB) -> ~[B] {
      iter::flat_map_to_vec(&self, op)
    }
index f16a65c930994c8112d630d39a2694069b29fe82..9e8438efad57f8926b9bf4e58e30cdf657010e9e 100644 (file)
@@ -15,7 +15,7 @@ struct Font {
 
 }
 
-impl Font : Drop {
+impl Drop for Font {
     fn finalize(&self) {}
 }
 
index d389ff34abe77b68ff0168d6740d034b80887a96..ed7b032e7139e33ae541af39fcb2ff769d00922d 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 trait hax { } 
-impl <A> A: hax { } 
+impl<A> hax for A { } 
 
 fn perform_hax<T: &static>(x: @T) -> hax {
     x as hax 
index 21bd5e2ebc119c7cd6235a00712b3c335f0b711b..a1619c69b3ce0e4754fec837bf63aa422d4eb80f 100644 (file)
@@ -13,7 +13,7 @@ struct defer {
     b: &mut bool,
 }
 
-impl defer : Drop {
+impl Drop for defer {
     fn finalize(&self) {
         *(self.b) = true;
     }
index 6a706404e33c076890057431c1f52e59fa55d9f4..c39b8a6c6d73cfc9c40e33db89461070a7d5863a 100644 (file)
@@ -13,7 +13,7 @@ struct defer {
     b: &mut bool,
 }
 
-impl defer : Drop {
+impl Drop for defer {
     fn finalize(&self) {
         *(self.b) = true;
     }
index 709227c83e3904146c819caf16a0260c8a6a00ca..8a6f2a0b461bf7efab9be2c0d597ccd1c178f614 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 trait hax { } 
-impl <A> A: hax { } 
+impl<A> hax for A { } 
 
 fn perform_hax<T: &static>(x: @T) -> hax {
     x as hax 
index be1cb3bef8feea398714e8ef3ca998d6fafb4239..d97c3c3de5ecd71187a999097ee8c1aecb316866 100644 (file)
@@ -16,7 +16,7 @@ struct Kitty {
     x: int,
 }
 
-impl Kitty : Drop {
+impl Drop for Kitty {
     fn finalize(&self) {}
 }
 
index d6804d83d72c88f75fc846fb2605bdb3d3c14b13..eadfa82619acd9862586ee94f1c05ffcca085026 100644 (file)
@@ -27,7 +27,7 @@ enum square {
     empty
 }
 
-impl square: to_str::ToStr {
+impl to_str::ToStr for square {
     pure fn to_str(&self) -> ~str {
         match *self {
           bot => { ~"R" }
index e30d8997b3bda39b4addf2e6e8ed043afdac9fa8..82089dd3bed1b5705d9b224ad30053b6bbd96c29 100644 (file)
@@ -16,7 +16,7 @@ trait it {
     fn f();
 }
 
-impl t: it {
+impl it for t {
     fn f() { }
 }
 
index 3a024c73791e733a5d896e1d06720cbb74c63580..52f1678fd022d98c34213dfdba2827ff54158a1d 100644 (file)
@@ -20,7 +20,7 @@ struct cbar {
     x: int,
 }
 
-impl cbar : bar<int> {
+impl bar<int> for cbar {
     fn get_bar() -> int {
         self.x
     }
index 40a78d7114acba0fddad011c28e8f72e12ebf91e..0ad88e350a6dfebb6774977b7f2141404d4f83a9 100644 (file)
@@ -14,7 +14,7 @@ trait methods {
     fn to_bytes() -> ~[u8];
 }
 
-impl (): methods {
+impl methods for () {
     fn to_bytes() -> ~[u8] {
         vec::from_elem(0, 0)
     }
index 2bb57d6c95a11ad2fc74627e542637ee5d191c28..435ac8e7bfe4ec6eef946c3c379af3970a094f03 100644 (file)
@@ -5,4 +5,4 @@ pub fn main() {
     }
     assert x == 4096;
     io::println(fmt!("x = %u", x));
-}
\ No newline at end of file
+}
index 561a1925a974793cac29460e84245a13b7f79679..71c83e02617ff04a37ce3cf016bfcc4c5a8f7559 100644 (file)
@@ -10,7 +10,7 @@
 
 struct thing { x: int, }
 
-impl thing : Drop {
+impl Drop for thing {
     fn finalize(&self) {}
 }
 
index d3377d196a4a80e6b821394af4eb755289b5f7a5..53dd6f942e8609627b65c515d3d8d3ebac63a0c8 100644 (file)
@@ -12,7 +12,7 @@ trait double {
     fn double() -> uint;
 }
 
-impl uint: double {
+impl double for uint {
     fn double() -> uint { self * 2u }
 }
 
index f285479df2051f5bcc7337a13bf67960eb14cf47..4c4144f28e891da2b0657f3a2e47fc3cb68deefb 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
     fn foo() { }
     
     let bar: ~fn() = ~foo;
-}
\ No newline at end of file
+}
index 8e4f3446953810e4364d3163d20b91a2bf559d61..252ebb86685ec70f1b0d6ab185c378ab0aab90a3 100644 (file)
@@ -24,4 +24,4 @@ impl<K: Copy, V: Copy> IMap<K, V> : ImmutableMap<K, V>
     }
 }
 
-pub fn main() {}
\ No newline at end of file
+pub fn main() {}
index 729f91760b10b981b9d00a8e078a6981585f49f5..e254ac809a4b575347edf0023088c13e8a1357e4 100644 (file)
@@ -17,7 +17,7 @@ fn b() -> int {
     }
 }
 
-impl int: Foo {
+impl Foo for int {
     fn a() -> int {
         3
     }
index 39d3e20ae2feb6f4a7b2877b261ab209db27adf8..920736a976ec26ee3779861673a0214554638772 100644 (file)
@@ -34,4 +34,4 @@ pub fn area(sh: Shape) -> float {
 pub fn main(){
     let s = Circle(Point { x: 1f, y: 2f }, 3f);
     io::println(fmt!("%f", s.area(s)));
-}
\ No newline at end of file
+}
index 47373e5490a7a175b7eb8920770bdafe1c98a3d4..1c1eb75c220c1f898e0cb013010870ad933f439b 100644 (file)
@@ -17,7 +17,7 @@ struct S {
     s: int,
 }
 
-impl S: T {
+impl T for S {
     fn print(&self) {
         io::println(fmt!("%?", self));
     }
index ba519fe58124e6240a3481a044a1d5b618683373..fdc50220014f34181cc31f33931d99cd9b0a4cc9 100644 (file)
@@ -21,4 +21,4 @@ pub fn main() {
     // Neither of the next two lines should cause an error
     let _ = x.stuff(); 
     x.stuff();
-}
\ No newline at end of file
+}
index 0f34947309615639931c7a3b1e67ac97364d7c32..ab042922df9422dfe2d7f79ce3e2ff461343c184 100644 (file)
@@ -23,7 +23,7 @@ fn translate(&self, dx: T) {
 
 struct Point { mut x: int, mut y: int }
 
-impl Point: Positioned<int> {
+impl Positioned<int> for Point {
     fn SetX(&self, x: int) {
         self.x = x;
     }
index 888fee6317d6067a03cc23c5c6321a91d2c3f0cb..07cf9d68d167c6d99f26300d1c4aec67f38a4c13 100644 (file)
@@ -15,7 +15,7 @@
 
 struct Point { mut x: int, mut y: int }
 
-impl Point: Positioned {
+impl Positioned for Point {
     fn SetX(&self, x: int) {
         self.x = x;
     }
index 3a112de5503e04abed994c645a0f12743af821f7..3ea2ef83296a99f6146523b99b0a41966714c61f 100644 (file)
@@ -22,7 +22,7 @@ fn translate(&self, dx: int) {
 
 struct Point { mut x: int, mut y: int }
 
-impl Point: Positioned {
+impl Positioned for Point {
     fn SetX(&self, x: int) {
         self.x = x;
     }
index 2af0246fb37768e05a1f40a38d5fbaf69fdc64cc..d89e0e7d95e15c4f6e2a181b3d58b12899fde6d5 100644 (file)
@@ -5,4 +5,4 @@ pub fn main() {
     }
     assert count == 999_999;
     io::println(fmt!("%u", count));
-}
\ No newline at end of file
+}
index 329e3647faea5de7e0d54d4ed21496aff1a7b9ff..f708b099c3796bc5678020c4c46ddbb59516d50c 100644 (file)
@@ -15,4 +15,4 @@ pub fn main() {
             s => { }
         }
     }
-}
\ No newline at end of file
+}
index 38fbc44e851458e5e78fb4db898ef4b2b04d27f2..119739f7fdbc8b5f024f8709d93af3c8dcdb2c0b 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   b: @mut int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.b) += 1;
     }
index f87e55173ab06f763e6aacc78278cef2eab2078f..351f68ab37c157d48684d600a7a011b14c0c82b7 100644 (file)
@@ -10,7 +10,7 @@
 
 trait repeat<A> { fn get() -> A; }
 
-impl<A:Copy> @A: repeat<A> {
+impl<A:Copy> repeat<A> for @A {
     fn get() -> A { *self }
 }
 
@@ -23,4 +23,4 @@ pub fn main() {
     let x = &3;
     let y = repeater(@x);
     assert *x == *(y.get());
-}
\ No newline at end of file
+}
index 9a812b77cb8812a0b7847f9b13cb5be4f2f24eac..e5107ba187cbb3cfea313372e4eb18e6c58d528b 100644 (file)
@@ -11,4 +11,4 @@
 #[warn(structural_records)];
 pub fn main() {
     let _foo = {x:5};
-}
\ No newline at end of file
+}
index 1634f36df53b3d4cb5397296f374965f982d53bf..b91770b3e397e11e98c9493edf3bb92d4622a763 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
     break;
   }
   assert true;
-}
\ No newline at end of file
+}
index 3be3d5f7585a2689486033d8dd86cfe36f435529..05a1764ed5ad97ab24a135ed58c34f2f3f37936c 100644 (file)
@@ -45,4 +45,4 @@ pub fn main() {
     is_even = true;
   }
   assert is_even;
-}
\ No newline at end of file
+}
index 27838fe642ace4a405a89f2b6aea05e058a28262..9c46ba2cb9bbfefdc0e3f0c074ed5c0fc120a020 100644 (file)
@@ -17,4 +17,4 @@ fn forever() -> ! {
 
 pub fn main() {
   if (1 == 2) { forever(); }
-}
\ No newline at end of file
+}
index 7247afeacd6fe663d6b9f24a699c6b470ea1a410..762b89f5101cd5905da2e2cf43a48e3e1f17996d 100644 (file)
@@ -23,7 +23,7 @@ fn sum() -> int {
     }
 }
 
-impl Foo : Product {
+impl Product for Foo {
     fn product() -> int {
         self.x * self.y
     }
index 537ce1bb218bc4568e73d54ef908076b33ffc042..8e544c09216ac360ebbe425154fbf50203773453 100644 (file)
@@ -22,4 +22,4 @@ pub fn main() {
     first._0 = @link(second);
     sys.rustrt.gc();
     let third: @cell = @{mut c: @nil()};
-}
\ No newline at end of file
+}
index 20df4978508bc026c63b75355d17813bf9c862d0..cd904681013264ef699891efb4b4bb2ab0c13998 100644 (file)
@@ -16,4 +16,4 @@
 pub fn main() {
     assert myint32::bits == 32;
     assert myint32::min(10, 20) == 10;
-}
\ No newline at end of file
+}
index 1fedf0c7874f92356900b5d7710737a2d1767bf5..f041aa9672d2f20ffc6f7b9ef8a48e789f9c8109 100644 (file)
@@ -16,4 +16,4 @@
 
 pub fn main() {
     assert mod_file_aux::foo() == 10;
-}
\ No newline at end of file
+}
index b7172a3d50c0365efba2876b4fa377282c223020..463132919c78284ad1f9160d9f3f32e15ca338ba 100644 (file)
@@ -17,4 +17,4 @@
 
 pub fn main() {
     assert m::foo() == 10;
-}
\ No newline at end of file
+}
index 66201efc77b9658b056ebbfbba10ce91a83d3aad..2242daa2d802f6bf1214d984f5f03205518e9bae 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub type T = f32;
\ No newline at end of file
+pub type T = f32;
index e6222cabae64c9952ffd8c4251e40a5c6084559e..543d672b0ab37e2d02c8ca1d73069d199e4dbaaf 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub type T = f64;
\ No newline at end of file
+pub type T = f64;
index ad504f79863cdab483628671b21980f372724c08..7151796c8ece138b4f6bb7a9dd239a538a64b07b 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub type T = float;
\ No newline at end of file
+pub type T = float;
index b5c6d8353745abf29d30cd69f8f35fac7169a449..9447330fe07ede2efd91f1da45365efb174cdf88 100644 (file)
@@ -15,7 +15,7 @@ trait vec_monad<A> {
     fn bind<B: Copy>(f: fn(A) -> ~[B]) -> ~[B];
 }
 
-impl<A> ~[A]: vec_monad<A> {
+impl<A> vec_monad<A> for ~[A] {
     fn bind<B: Copy>(f: fn(A) -> ~[B]) -> ~[B] {
         let mut r = ~[];
         for self.each |elt| { r += f(*elt); }
@@ -27,7 +27,7 @@ trait option_monad<A> {
     fn bind<B>(f: fn(A) -> Option<B>) -> Option<B>;
 }
 
-impl<A> Option<A>: option_monad<A> {
+impl<A> option_monad<A> for Option<A> {
     fn bind<B>(f: fn(A) -> Option<B>) -> Option<B> {
         match self {
           Some(ref a) => { f(*a) }
index bce5bb9cadee05cb5845d6b0f74a032ef513d8b1..3c491a7f695732c6576cd83c5029c7a6e855560b 100644 (file)
@@ -20,7 +20,7 @@ trait ty_ops {
     fn mk() -> uint;
 }
 
-impl (): ty_ops {
+impl ty_ops for () {
     fn mk() -> uint { 22u }
 }
 
@@ -29,4 +29,4 @@ pub fn main() {
         mk_nil(())
     };
     assert fn_env() == 22u;
-}
\ No newline at end of file
+}
index 72933f18d6f74c840dcc03a1af8cd02fccd6d748..57f7a3f24db2106cb4fd26e57e52657d3a845169 100644 (file)
@@ -17,19 +17,19 @@ trait Serializable {
     fn serialize<S: Serializer>(s: S);
 }
 
-impl int: Serializable {
+impl Serializable for int {
     fn serialize<S: Serializer>(_s: S) { }
 }
 
 struct F<A> { a: A }
 
-impl<A: Copy Serializable> F<A>: Serializable {
+impl<A: Copy Serializable> Serializable for F<A> {
     fn serialize<S: Serializer>(s: S) {
         self.a.serialize(move s);
     }
 }
 
-impl io::Writer: Serializer {
+impl Serializer for io::Writer {
 }
 
 pub fn main() {
index c31dae404c6df32ce92c4c21fcdf3dcce5c8f996..775bbc883f6d861f402b2f597ddcfafbe69ea304 100644 (file)
@@ -16,4 +16,4 @@ fn getbig(i: int) {
 
 pub fn main() {
     getbig(100000);
-}
\ No newline at end of file
+}
index 5b2c016d44bda4906aeb7d04b41440895491c04d..e3e2a788230a7854f852f2e9db58a940cc60e5ca 100644 (file)
@@ -21,4 +21,4 @@ fn getbig(i: int) -> int {
 
 pub fn main() {
     getbig(10000);
-}
\ No newline at end of file
+}
index 717536a2fbcab091c4cdef2b2cc9282901336a01..748d765f2c3717294aba998ef04483b81193aafc 100644 (file)
@@ -49,4 +49,4 @@ fn getbig(a0: int,
 pub fn main() {
     let a = 10000;
     getbig(a, a+1, a+2, a+3, a+4, a+5, a+6, a+7, a+8, a+9);
-}
\ No newline at end of file
+}
index 8f9a2575412193f24d95731c703ad9cf1282d04c..82d4279ed2b964ffc2c21b956e46b31ee3546b35 100644 (file)
@@ -104,4 +104,4 @@ pub fn main() {
         a38: 10000u64,
         a39: 10000u64,
     });
-}
\ No newline at end of file
+}
index c0407b6e786f8206874c25f31cdfaf37ffb321ea..1d232cc5cbd8d74ed59a88da6ca8a0da4f867955 100644 (file)
@@ -24,4 +24,4 @@ pub fn main() {
         task::try(|| getbig(200) );
         sz += 1u;
     }
-}
\ No newline at end of file
+}
index 77d4d2ccb3629d7443d8b9261868b2fec4972d4e..0aac8857c598d23ccbea65f5dbaa1412ca6bbf5a 100644 (file)
@@ -17,4 +17,4 @@ fn f(-thing: fn@()) {
 
 pub fn main() {
     f(fn@() {});
-}
\ No newline at end of file
+}
index ffa18e040e7e7f30c544133f061198ad3bc683d8..8d3f28fb3dcf20823b74feb9f52cb90f36b0f0ee 100644 (file)
@@ -24,4 +24,4 @@ pub fn main() {
     let z = ~17;
     f(z);
     g();
-}
\ No newline at end of file
+}
index 1ffdc6a21ca66961b7378c1db140594c7f94407a..3c6a3471377528548b7c84fcaede31fd7d3da058 100644 (file)
@@ -16,37 +16,37 @@ struct Point {
     y: int
 }
 
-impl Point : ops::Add<Point,Point> {
+impl ops::Add<Point,Point> for Point {
     pure fn add(&self, other: &Point) -> Point {
         Point {x: self.x + (*other).x, y: self.y + (*other).y}
     }
 }
 
-impl Point : ops::Sub<Point,Point> {
+impl ops::Sub<Point,Point> for Point {
     pure fn sub(&self, other: &Point) -> Point {
         Point {x: self.x - (*other).x, y: self.y - (*other).y}
     }
 }
 
-impl Point : ops::Neg<Point> {
+impl ops::Neg<Point> for Point {
     pure fn neg(&self) -> Point {
         Point {x: -self.x, y: -self.y}
     }
 }
 
-impl Point : ops::Not<Point> {
+impl ops::Not<Point> for Point {
     pure fn not(&self) -> Point {
         Point {x: !self.x, y: !self.y }
     }
 }
 
-impl Point : ops::Index<bool,int> {
+impl ops::Index<bool,int> for Point {
     pure fn index(&self, +x: bool) -> int {
         if x { self.x } else { self.y }
     }
 }
 
-impl Point : cmp::Eq {
+impl cmp::Eq for Point {
     pure fn eq(&self, other: &Point) -> bool {
         (*self).x == (*other).x && (*self).y == (*other).y
     }
index c0095b5296509f0d9931bb315c6bd5f795b467c8..9f787c915e59d74738c1bd6cfe46cba6b154e833 100644 (file)
@@ -13,7 +13,7 @@ struct dtor {
 
 }
 
-impl dtor : Drop {
+impl Drop for dtor {
     fn finalize(&self) {
         // abuse access to shared mutable state to write this code
         *self.x -= 1;
index 525535dd13997103e54dce07a7db6ff6465b2ecd..d41e629b5da53ea7db58be6d26e8038b9dcd477c 100644 (file)
@@ -9,4 +9,4 @@ pub fn main() {
         |x| *x + *y
     };
     assert foo(@22) == 25;
-}
\ No newline at end of file
+}
index 19957a67c041541a6c04f8f840f87289d3b2f64f..f4c92c869e46e457f53e09d686df622a52f82867 100644 (file)
@@ -49,4 +49,4 @@ struct F<T> { f: T }
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 7f8e9cfdd69055d69e85d4810383c85d7e500878..61cb473bf8fb2c60429986b93bd65f5297f084b2 100644 (file)
@@ -13,7 +13,7 @@ trait get {
 }
 
 // Note: impl on a slice
-impl &int: get {
+impl get for &int {
     fn get() -> int {
         return *self;
     }
index 51f4b4c953d0cd73aaeee9389b7486a761d4a4c5..6073295336049a02df6558fc839a2c0a9449e36a 100644 (file)
@@ -13,7 +13,7 @@ trait sum {
 }
 
 // Note: impl on a slice
-impl &[int]: sum {
+impl sum for &[int] {
     fn sum() -> int {
         let mut sum = 0;
         for vec::each(self) |e| { sum += *e; }
index 77c0872b7c4006e95e684f744f70c97fd89ec535..092cd3d8ed5bb8aa003b8447742eb13ec46818a2 100644 (file)
 enum Nil {Nil}
 struct Cons<T> {head:int, tail:T}
 trait Dot {fn dot(other:self) -> int;}
-impl Nil:Dot {
+impl Dot for Nil {
   fn dot(_:Nil) -> int {0}
 }
-impl<T:Dot> Cons<T>:Dot {
+impl<T:Dot> Dot for Cons<T> {
   fn dot(other:Cons<T>) -> int {
     self.head * other.head + self.tail.dot(other.tail)
   }
index 96bddf7099b8e46f878a32c713d19315d44630ae..d6470ad72b04e233e2ecf562f2e3b550d34d8646 100644 (file)
@@ -59,7 +59,7 @@ fn bump_past<T>() {
 
 }
 
-impl<V: TyVisitor movable_ptr> ptr_visit_adaptor<V>: TyVisitor {
+impl<V: TyVisitor movable_ptr> TyVisitor for ptr_visit_adaptor<V> {
 
     fn visit_bot(&self) -> bool {
         self.align_to::<()>();
@@ -498,14 +498,14 @@ fn visit_inner(inner: *TyDesc) -> bool {
 
 struct Inner<V> { inner: V }
 
-impl my_visitor: movable_ptr {
+impl movable_ptr for my_visitor {
     fn move_ptr(adjustment: fn(*c_void) -> *c_void) {
         self.ptr1 = adjustment(self.ptr1);
         self.ptr2 = adjustment(self.ptr2);
     }
 }
 
-impl my_visitor: TyVisitor {
+impl TyVisitor for my_visitor {
 
     fn visit_bot(&self) -> bool { true }
     fn visit_nil(&self) -> bool { true }
index 9c8c65698b3a115345d1e68e6e414053785ca263..6b57c73d0f2762d2017ef7fd342b337117487354 100644 (file)
@@ -12,7 +12,7 @@
 use intrinsic::{TyDesc, get_tydesc, visit_tydesc, TyVisitor};
 enum my_visitor = @{ mut types: ~[str] };
 
-impl my_visitor: TyVisitor {
+impl TyVisitor for my_visitor {
     fn visit_bot() -> bool {
         self.types += ~["bot"];
         error!("visited bot type");
index 2245bd72f880bc765f0bb2693fb599bd3471c8dd..9daec577cfa26e33949c1090c77c84092eacc0e1 100644 (file)
@@ -18,4 +18,4 @@ fn mk_add_ok(x: &r/ast, y: &r/ast) -> ast/&r {
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 959a40055fd38e1a9427547f34d470c7226dd5d1..943ec3f9cb7490e37068bf00b30b80886a5d363c 100644 (file)
@@ -18,4 +18,4 @@ fn mk_add_ok(x: &a/ast, y: &a/ast, z: &ast) -> ast/&a {
 }
 
 pub fn main() {
-}
\ No newline at end of file
+}
index 940c087ea62acd85f2c500f765bdc34298e88b01..b84de89feb8182fd05e37898ec6b956eaea98815 100644 (file)
@@ -20,4 +20,4 @@ fn has_one(x: &a/int) -> int {
 
 pub fn main() {
     assert has_one(&2) == 22;
-}
\ No newline at end of file
+}
index d546bed4fde749816be86addb2fd496284de1dfd..12f631755a90481db415424098069446df1a0823 100644 (file)
@@ -16,4 +16,4 @@ fn has_two(x: &a/int, y: &b/int) -> int {
 
 pub fn main() {
     assert has_two(&20, &2) == 22;
-}
\ No newline at end of file
+}
index 414f12bf3da4e86a6ced6e0dd33809555042cc34..d2a91db6bb8e81469e6b95b9a251675a89e9a579 100644 (file)
@@ -25,4 +25,4 @@ pub fn main() {
     let g = 21;
     let foo = boxed_int { f: &g };
     assert with(&foo) == 22;
-}
\ No newline at end of file
+}
index eccc75ed11f0e06092902eb0b81b7227d78bf26d..11a24fdc9627261480d2bbf667d8542d2ae10ba1 100644 (file)
@@ -28,4 +28,4 @@ pub fn main() {
     let g = 22;
     let foo = boxed_int { f: &g };
     with(&foo);
-}
\ No newline at end of file
+}
index ac416dd446846f152344d5df4ff48528b9a2e474..27dc2dea40d4dc0b8bbf490f2deeaf2467c06562 100644 (file)
@@ -16,4 +16,4 @@ fn mk(cond: bool, ptr: &r/uint) -> roption/&r {
     if cond {a} else {b(ptr)}
 }
 
-pub fn main() {}
\ No newline at end of file
+pub fn main() {}
index 40c83a17089697451e61620e8b6d266e5aec4518..7b07a8cf1af4d1c986c880d364c3e14ea5a1ad80 100644 (file)
@@ -14,7 +14,7 @@ trait get_chowder {
     fn get_chowder() -> &self/int;
 }
 
-impl Clam: get_chowder {
+impl get_chowder for Clam {
     fn get_chowder() -> &self/int { return self.chowder; }
 }
 
index 86da7c722ff30819670499ee283595173ef68660..e45a0d252c6683b19bd03d86b34732b8ccdbea6a 100644 (file)
@@ -16,7 +16,7 @@ trait get_ctxt {
 
 struct HasCtxt { c: &Ctxt }
 
-impl HasCtxt: get_ctxt {
+impl get_ctxt for HasCtxt {
     fn get_ctxt() -> &self/Ctxt {
         self.c
     }
index 9de6fbebf85a5cdf28c3be3c586f260f0036cbc6..ee28c96defcad4f62715e73f6e004bb24f60444b 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   i: @mut int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.i) += 1;
     }
index fa9832125b3f79b6d476a1aad091ab64dad80548..fb9a1e8117a5b7b0d63f7dfc6a8c2d33516f005b 100644 (file)
@@ -14,7 +14,7 @@ struct r {
   v: *int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         unsafe {
             debug!("r's dtor: self = %x, self.v = %x, self.v's value = %x",
index 0b7179cc819ca60fb4a9fdad9af14fe9dd546f0e..eea5c43bb99556afb619fc0438a1098708d362c6 100644 (file)
@@ -20,7 +20,7 @@ struct r {
   v: U,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         unsafe {
             let v2: ~int = cast::reinterpret_cast(&self.v.c);
index 4bec2f10f9899ac910f52043ae03b97fa05b204d..544d82e799544487b7a3c8aaa97b29d61deb1e3b 100644 (file)
@@ -24,7 +24,7 @@ struct R {
   x: *int,
 }
 
-impl R : Drop {
+impl Drop for R {
     fn finalize(&self) {
         unsafe {
             let _v2: ~int = cast::reinterpret_cast(&self.v.c);
index 6d4ddd13041937950f6b70c2aba24c57ef5af625..7b5456e21898cb485913fed1d029f75f27ad81c8 100644 (file)
@@ -12,7 +12,7 @@ struct shrinky_pointer {
   i: @@mut int,
 }
 
-impl shrinky_pointer : Drop {
+impl Drop for shrinky_pointer {
     fn finalize(&self) {
         log(error, ~"Hello!"); **(self.i) -= 1;
     }
index 86e023c4e8a1155741989968b4767d2d90eb295d..17ce27fa60ad12720dedd1af13567f95ec979378 100644 (file)
@@ -17,7 +17,7 @@ struct finish<T> {
   arg: Arg<T>
 }
 
-impl<T: Copy> finish<T> : Drop {
+impl<T: Copy> Drop for finish<T> {
     fn finalize(&self) {
         (self.arg.fin)(self.arg.val);
     }
index 50e60cb0f377f97ec64d2bcdc2011e1fb7de1df6..54b543c7c3f46eb0263ec6320a622700d557050f 100644 (file)
@@ -18,7 +18,7 @@ struct close_res {
 
 }
 
-impl close_res : Drop {
+impl Drop for close_res {
     fn finalize(&self) {
         *(self.i) = false;
     }
index d0d20d096b4ec1381d696f16f548b9bb10fedaba..0af197968040fb4a7c3f6de4dd8528862de06057 100644 (file)
@@ -6,7 +6,7 @@ struct S {
     x: int
 }
 
-impl S : MyTrait {
+impl MyTrait for S {
     fn f(&self) -> S {
         S { x: 3 }
     }
index 11d1af2b39975f4298a058ce65c00aa06835bf92..ac910232c16bfea67a8910d1bd9f9ba7a843974f 100644 (file)
@@ -14,7 +14,7 @@ struct test {
   f: int,
 }
 
-impl test : Drop {
+impl Drop for test {
     fn finalize(&self) {}
 }
 
index a5691e289d70069dae5a0df037984dd67bf7b5f0..19169c168c2cf2724c7083cac47f0720ae39fb8d 100644 (file)
@@ -25,4 +25,4 @@ fn foo(i:int, j: char) -> foo {
 pub fn main() {
     let (_po, ch) = pipes::stream();
     ch.send(foo(42, 'c'));
-}
\ No newline at end of file
+}
index 2aeabcf48727a793540391810e243046e0531502..870059d1edc52d5bf8b60628eebc9d8c1e4a03c5 100644 (file)
@@ -30,7 +30,7 @@ trait uint_utils {
     fn multi(f: fn(uint));
 }
 
-impl uint: uint_utils {
+impl uint_utils for uint {
     fn str() -> ~str { uint::str(self) }
     fn multi(f: fn(uint)) {
         let mut c = 0u;
@@ -44,7 +44,7 @@ trait vec_utils<T> {
     fn map_<U: Copy>(f: fn(T) -> U) -> ~[U];
 }
 
-impl<T> ~[T]: vec_utils<T> {
+impl<T> vec_utils<T> for ~[T] {
     fn length_() -> uint { vec::len(self) }
     fn iter_(f: fn(T)) { for self.each |x| { f(*x); } }
     fn map_<U: Copy>(f: fn(T) -> U) -> ~[U] {
index bf70b86a4c66ec75f035ffb6c2ddf1937685a8bd..328a937b441feeb84c8c26032b5f6fe2d08c4389 100644 (file)
@@ -16,7 +16,7 @@ trait Deserializable<D: Deserializer> {
     static fn deserialize(d: &D) -> Self;
 }
 
-impl<D: Deserializer> int: Deserializable<D> {
+impl<D: Deserializer> Deserializable<D> for int {
     static fn deserialize(d: &D) -> int {
         return d.read_int();
     }
@@ -24,7 +24,7 @@ impl<D: Deserializer> int: Deserializable<D> {
 
 struct FromThinAir { dummy: () }
 
-impl FromThinAir: Deserializer {
+impl Deserializer for FromThinAir {
     fn read_int() -> int { 22 }
 }
 
index 28bdcddb3adbb75a3cfd6dc35bb3335adf01da58..3402da6c55c9d1cbc6920708219f79c3a598e78a 100644 (file)
@@ -21,13 +21,13 @@ fn andand<T: bool_like Copy>(x1: T, x2: T) -> T {
     bool_like::select(x1, x2, x1)
 }
 
-impl bool: bool_like {
+impl bool_like for bool {
     static fn select<A>(&&b: bool, +x1: A, +x2: A) -> A {
         if b { move x1 } else { move x2 }
     }
 }
 
-impl int: bool_like {
+impl bool_like for int {
     static fn select<A>(&&b: int, +x1: A, +x2: A) -> A {
         if b != 0 { move x1 } else { move x2 }
     }
@@ -40,14 +40,14 @@ trait buildable<A> {
 }
 
 
-impl<A> @[A]: buildable<A> {
+impl<A> buildable<A> for @[A] {
     #[inline(always)]
      static pure fn build_sized(size: uint,
                                 builder: fn(push: pure fn(+v: A))) -> @[A] {
          at_vec::build_sized(size, builder)
      }
 }
-impl<A> ~[A]: buildable<A> {
+impl<A> buildable<A> for ~[A] {
     #[inline(always)]
      static pure fn build_sized(size: uint,
                                 builder: fn(push: pure fn(+v: A))) -> ~[A] {
index d144181984fe60c68df68f0a9683f41554392a5c..63d25240df86debb3d2a5a9c0920454dd41b8ebd 100644 (file)
@@ -13,13 +13,13 @@ pub trait Foo {
                static pub fn foo() -> Self;
        }
 
-       impl int : Foo {
+       impl Foo for int {
                static pub fn foo() -> int {
                        3
                }
        }
        
-       impl uint : Foo {
+       impl Foo for uint {
                static pub fn foo() -> uint {
                        5u
                }
index 668e7a80b35f6f726166d9fa3aa4da437f5c120e..9f5b8cf27dd4ffe1ece1cc6bce8f99cfec488faf 100644 (file)
@@ -12,7 +12,7 @@ struct foo {
     x: ~str,
 }
 
-impl foo : Drop {
+impl Drop for foo {
     fn finalize(&self) {
         error!("%s", self.x);
     }
index 17a4c904470e588d9fc553f6960d0cb72516926d..a11608bc52e919df7d964804c9c05c57a6ce2411 100644 (file)
@@ -12,7 +12,7 @@
 
 enum foo { large, small, }
 
-impl foo : cmp::Eq {
+impl cmp::Eq for foo {
     pure fn eq(&self, other: &foo) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index c573ee376c7c0892ae5fdfd719dbe2b7c60de5c9..d7571b3a47b6699620bbeb7de3bb6e900af01025 100644 (file)
@@ -19,7 +19,7 @@ enum color {
     orange = 8 >> 1
 }
 
-impl color : cmp::Eq {
+impl cmp::Eq for color {
     pure fn eq(&self, other: &color) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
index e74237c74944381681ab5abe7173f11c0a73129e..e9e7fdeaddff2df383385b881ddc6accc34d9912 100644 (file)
@@ -14,7 +14,7 @@
 // -*- rust -*-
 enum colour { red(int, int), green, }
 
-impl colour : cmp::Eq {
+impl cmp::Eq for colour {
     pure fn eq(&self, other: &colour) -> bool {
         match *self {
             red(a0, b0) => {
index 91925fc19172f3f69a4351764e9c4a229a32f5c8..afc9290b62db7d10f3ad8bc6506dc256405db094 100644 (file)
@@ -56,7 +56,7 @@ enum t {
     tag3(int, u8, char)
 }
 
-impl t : cmp::Eq {
+impl cmp::Eq for t {
     pure fn eq(&self, other: &t) -> bool {
         match *self {
             tag1 => {
index e146afa3a0fd2dd7d883a13390057fe185c51507..58fa65b7fe7a134b3dacbbdcd0f251ccd254e72e 100644 (file)
@@ -19,4 +19,4 @@ fn f() {
 
 pub fn main() {
     task::spawn(|| f() );
-}
\ No newline at end of file
+}
index 3af59a09ad04a4c6f711095e72545983ef6224c4..ca60dfd3de009f6c26a2278ef43fd4476478e3ac 100644 (file)
@@ -19,7 +19,7 @@ struct notify {
     ch: Chan<bool>, v: @mut bool,
 }
 
-impl notify : Drop {
+impl Drop for notify {
     fn finalize(&self) {
         error!("notify: task=%? v=%x unwinding=%b b=%b",
                task::get_task(),
index 6028d8c71d31b55a898f47750f624191566eee81..b045dc3074d598aef475e2de933bc8bfcaa84878 100644 (file)
@@ -35,4 +35,4 @@ fn checktests() {
     assert vec::any(
         tests,
         |t| t.desc.name.to_str() == ~"shouldnotignore" && !t.desc.ignore);
-}
\ No newline at end of file
+}
index 8c737428ba977fc23f9e85b76c0529d995edd90a..2e093d6d63163dd6aefc19b36344ad301933e588 100644 (file)
@@ -19,11 +19,11 @@ trait connection_factory<C: connection> {
 type my_connection = ();
 type my_connection_factory = ();
 
-impl (): connection {
+impl connection for () {
     fn read() -> int { 43 }
 }
 
-impl my_connection_factory: connection_factory<my_connection> {
+impl connection_factory<my_connection> for my_connection_factory {
     fn create() -> my_connection { () }
 }
 
index cfb0096f97f55f9974c356152084f2d02893c251..62d1c00eea944fd8a85b6971027b4ca750363e83 100644 (file)
@@ -21,7 +21,7 @@ trait to_str {
     fn to_str() -> ~str;
 }
 
-impl <T: to_str> Option<T>: to_str {
+impl<T: to_str> to_str for Option<T> {
     fn to_str() -> ~str {
         match self {
           None => { ~"none" }
@@ -30,11 +30,11 @@ fn to_str() -> ~str {
     }
 }
 
-impl int: to_str {
+impl to_str for int {
     fn to_str() -> ~str { int::str(self) }
 }
 
-impl Tree: to_str {
+impl to_str for Tree {
     fn to_str() -> ~str {
         let l = self.left, r = self.right;
         fmt!("[%s, %s, %s]", self.val.to_str(),
index 18b328d5368105027f288ac57ea7583ed1d48246..3f69a2e5d909b99650f38598d237cc23ccec6627 100644 (file)
@@ -14,7 +14,7 @@ trait A<T> {
     fn g<U>(x: T, y: U) -> (T, U) { (move x, move y) }
 }
 
-impl int: A<int> { }
+impl A<int> for int { }
 
 fn f<T, U, V: A<T>>(i: V, j: T, k: U) -> (T, U) {
     i.g(move j, move k)
index 34d210b06accbd62c0d75c91b0e5b0db0b3c87d1..fcb9f60d762c8ffb4bf136ce144544f5aaaf6a15 100644 (file)
@@ -14,7 +14,7 @@ trait A<T> {
     fn g(x: T) -> T { move x }
 }
 
-impl int: A<int> { }
+impl A<int> for int { }
 
 fn f<T, V: A<T>>(i: V, j: T) -> T {
     i.g(move j)
index adf07818e0c8adfd25e8ff2b122330941d15dcaf..c89d4abe3dae7a222b4a5640452d2efa125bf330 100644 (file)
@@ -14,7 +14,7 @@ trait A {
     fn g<T>(x: T, y: T) -> (T, T) { (move x, move y) }
 }
 
-impl int: A { }
+impl A for int { }
 
 fn f<T, V: A>(i: V, j: T, k: T) -> (T, T) {
     i.g(move j, move k)
index 0b34691ff6eda75902b8d8e21ae6067e712086cc..7a6dfa33a1ac4f2f7065cb1acb132f68c4007e9b 100644 (file)
@@ -14,7 +14,7 @@ trait A<T> {
     fn g(x: uint) -> uint { move x }
 }
 
-impl<T> int: A<T> { }
+impl<T> A<T> for int { }
 
 fn f<T, V: A<T>>(i: V, j: uint) -> uint {
     i.g(move j)
index 28e15e094965b6bc8f455ee35221ef1cf7132494..b28884e5fbc7e8e5317d0334950ab1b1ea3920aa 100644 (file)
@@ -14,7 +14,7 @@ trait A {
     fn g() -> int { 10 }
 }
 
-impl int: A { }
+impl A for int { }
 
 fn f<T: A>(i: T) {
     assert i.g() == 10;
index 8a8efb4b991f12eefd87212f9ecff9d32ea4d96b..80b1b1eba39ef612abe9eea978fc70a92ed0786d 100644 (file)
 trait to_str {
     fn to_str() -> ~str;
 }
-impl int: to_str {
+impl to_str for int {
     fn to_str() -> ~str { int::str(self) }
 }
-impl ~str: to_str {
+impl to_str for ~str {
     fn to_str() -> ~str { copy self }
 }
-impl (): to_str {
+impl to_str for () {
     fn to_str() -> ~str { ~"()" }
 }
 
 trait map<T> {
     fn map<U: Copy>(f: fn(T) -> U) -> ~[U];
 }
-impl<T> ~[T]: map<T> {
+impl<T> map<T> for ~[T] {
     fn map<U: Copy>(f: fn(T) -> U) -> ~[U] {
         let mut r = ~[];
         for self.each |x| { r += ~[f(*x)]; }
index 105cf9ba2abf606915c1bfd982afe5f06f1feb9b..b8e060ee914310f661ac5a5e291d49d96fa79445 100644 (file)
@@ -18,7 +18,7 @@
 
 // We want to extend all Foo, Bar, Bazes to Quuxes
 pub trait Quux: Foo Bar Baz { }
-impl<T: Foo Bar Baz> T: Quux { }
+impl<T: Foo Bar Baz> Quux for T { }
 
 fn f<T: Quux>(a: &T) {
     assert a.f() == 10;
index 5856d48aec4203855807a66e2cfc2c66b8626f0b..f0fa291f00c1529e1396f17cf528df895263ce29 100644 (file)
@@ -17,9 +17,9 @@
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
-impl A : Baz { fn h() -> int { 30 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
+impl Baz for A { fn h() -> int { 30 } }
 
 fn f<T: Quux>(a: &T) {
     assert a.f() == 10;
index c07c03c108da5b3a0d64e41e29bda78da942eccd..84e498c8ffd11e19f53e5507f7c6610a7a141a71 100644 (file)
@@ -10,7 +10,7 @@
 
 // Testing that this impl turns A into a Quux, because
 // A is already a Foo Bar Baz
-impl<T: Foo Bar Baz> T: Quux { }
+impl<T: Foo Bar Baz> Quux for T { }
 
 trait Foo { fn f() -> int; }
 trait Bar { fn g() -> int; }
@@ -20,9 +20,9 @@ trait Quux: Foo Bar Baz { }
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
-impl A : Baz { fn h() -> int { 30 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
+impl Baz for A { fn h() -> int { 30 } }
 
 fn f<T: Quux>(a: &T) {
     assert a.f() == 10;
index 8a3e81c3fdb71f94f687c95790a26cbc05e7227d..f02145896be7b6dbd8934d7bed276d878800b444 100644 (file)
@@ -13,8 +13,8 @@
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
 
 // Call a function on Foo, given a T: Bar
 fn gg<T:Bar>(a: &T) -> int {
index a6bac1a0583551ef1065b41b65c48bf4807b3bb2..45498996ba5528bd2ed3dadc6cdd3f9f66e52bfe 100644 (file)
@@ -14,9 +14,9 @@
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
-impl A : Baz { fn h() -> int { 30 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
+impl Baz for A { fn h() -> int { 30 } }
 
 // Call a function on Foo, given a T: Baz,
 // which is inherited via Bar
index 1ef250f215c18813067a6ad1e782285cc12458c1..caa69382e13cf8e2fcbae120eeb2b98fb6df0163 100644 (file)
@@ -23,11 +23,11 @@ struct A {
     x: int
 }
 
-impl A : Foo {
+impl Foo for A {
     fn f() -> int { 10 }
 }
 
-impl A : Bar {
+impl Bar for A {
     fn g() -> int { 20 }
 }
 
index 2fbfaf483e94f5e30c5d4e3460ee7b58f5800815..1cfc091c24943546f4b881798c744dc72f34dc50 100644 (file)
@@ -24,11 +24,11 @@ struct A {
     x: int
 }
 
-impl A : Foo {
+impl Foo for A {
     fn f() -> int { 10 }
 }
 
-impl A : Bar {
+impl Bar for A {
     fn g() -> int { 20 }
 }
 
index ce0a5fe5465fb08e5c6606ae0d8df1b2778b9825..f537357d3ce15674c96e4a86253aa3b30ed06797 100644 (file)
@@ -17,7 +17,7 @@ trait Bar : aux::Foo {
     fn g() -> int;
 }
 
-impl aux::A : Bar {
+impl Bar for aux::A {
     fn g() -> int { self.f() }
 }
 
index 78e258bac48f55571385b69f61e032b40216b083..5a1f109ac32cd82c44fc89ab2d28d9ae5b60e5fb 100644 (file)
@@ -13,9 +13,9 @@
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
+impl Foo for A { fn f() -> int { 10 } }
 
-impl A : Bar {
+impl Bar for A {
     // Testing that this impl can call the impl of Foo
     fn g() -> int { self.f() }
 }
index 42042641357550c38421a06d8a9fb63c141210a5..1c914ebabc0a202c4abec3e6d6aa2b7229f38fc8 100644 (file)
 
 struct S { bogus: () }
 
-impl S: A { fn a(&self) -> int { 10 } }
-impl S: B { fn b(&self) -> int { 20 } }
-impl S: C { fn c(&self) -> int { 30 } }
-impl S: D { fn d(&self) -> int { 40 } }
+impl A for S { fn a(&self) -> int { 10 } }
+impl B for S { fn b(&self) -> int { 20 } }
+impl C for S { fn c(&self) -> int { 30 } }
+impl D for S { fn d(&self) -> int { 40 } }
 
 fn f<T: D>(x: &T) {
     assert x.a() == 10;
@@ -32,4 +32,4 @@ fn f<T: D>(x: &T) {
 pub fn main() {
     let value = &S { bogus: () };
     f(value);
-}
\ No newline at end of file
+}
index a293051d360fefbd7a942a0606722433a33586fa..afcf5c87832acdf292ee4f0be8904c6925b09e5d 100644 (file)
@@ -14,9 +14,9 @@
 
 struct S { bogus: () }
 
-impl S: A { fn a(&self) -> int { 10 } }
-impl S: B { fn b(&self) -> int { 20 } }
-impl S: C { fn c(&self) -> int { 30 } }
+impl A for S { fn a(&self) -> int { 10 } }
+impl B for S { fn b(&self) -> int { 20 } }
+impl C for S { fn c(&self) -> int { 30 } }
 
 // Both B and C inherit from A
 fn f<T: B C>(x: &T) {
@@ -27,4 +27,4 @@ fn f<T: B C>(x: &T) {
 
 pub fn main() {
     f(&S { bogus: () })
-}
\ No newline at end of file
+}
index 7008b098d8a92398b3a0c19a2f491a1dafed3097..a91a40ce2212a021a0b3e070699b5f14fc02983d 100644 (file)
@@ -14,9 +14,9 @@
 
 struct S { bogus: () }
 
-impl S: A { fn a(&self) -> int { 10 } }
-impl S: B { fn b(&self) -> int { 20 } }
-impl S: C { fn c(&self) -> int { 30 } }
+impl A for S { fn a(&self) -> int { 10 } }
+impl B for S { fn b(&self) -> int { 20 } }
+impl C for S { fn c(&self) -> int { 30 } }
 
 // Multiple type params, multiple levels of inheritance
 fn f<X: A, Y: B, Z: C>(x: &X, y: &Y, z: &Z) {
@@ -30,4 +30,4 @@ fn f<X: A, Y: B, Z: C>(x: &X, y: &Y, z: &Z) {
 pub fn main() {
     let s = &S { bogus: () };
     f(s, s, s);
-}
\ No newline at end of file
+}
index 70c8981fd3cebc2676b29bd13d9547ee5da137f8..c41579e360374258c64567dd61a5e36f34a06acd 100644 (file)
@@ -14,7 +14,7 @@ trait MyNum : Eq { }
 
 struct MyInt { val: int }
 
-impl MyInt : Eq {
+impl Eq for MyInt {
     pure fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
     pure fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
 }
index 6794e8130e594ec8a3503047c4cfa6107435a0d0..56cdb5d31188d0019a0e4471a932282896d43e00 100644 (file)
@@ -14,19 +14,19 @@ trait MyNum : Add<Self,Self> Sub<Self,Self> Mul<Self,Self> Eq { }
 
 struct MyInt { val: int }
 
-impl MyInt : Add<MyInt, MyInt> {
+impl Add<MyInt, MyInt> for MyInt {
     pure fn add(&self, other: &MyInt) -> MyInt { mi(self.val + other.val) }
 }
 
-impl MyInt : Sub<MyInt, MyInt> {
+impl Sub<MyInt, MyInt> for MyInt {
     pure fn sub(&self, other: &MyInt) -> MyInt { mi(self.val - other.val) }
 }
 
-impl MyInt : Mul<MyInt, MyInt> {
+impl Mul<MyInt, MyInt> for MyInt {
     pure fn mul(&self, other: &MyInt) -> MyInt { mi(self.val * other.val) }
 }
 
-impl MyInt : Eq {
+impl Eq for MyInt {
     pure fn eq(&self, other: &MyInt) -> bool { self.val == other.val }
     pure fn ne(&self, other: &MyInt) -> bool { !self.eq(other) }
 }
index 3f157f31283c6cc6da78c597310a9117967a2de2..02ed518ff659148803bc640ccd0a5ce74b1d994a 100644 (file)
@@ -10,13 +10,13 @@ struct S {
     x: int
 }
 
-impl S : Foo<S> {
+impl Foo<S> for S {
     fn f(&self, x: &S) {
         io::println(x.x.to_str());
     }
 }
 
-impl S : Bar {
+impl Bar for S {
     fn g(&self) {
         self.f(self);
     }
index b119438240aeba596a67e122a98fa7eb4d98ecf9..29e2cb2f173ad3b7cff9e32663f24996e081eea2 100644 (file)
@@ -13,8 +13,8 @@
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
 
 fn ff<T:Foo>(a: &T) -> int {
     a.f()
index 4b40d7596098534265f05bf082856533108a8977..2659d30c2b975ee975b18fd23db1e6eacf80ccdd 100644 (file)
@@ -16,7 +16,7 @@ pub trait NumExt: MyNum { }
 
 struct S { v: int }
 
-impl S: MyNum {
+impl MyNum for S {
     static fn from_int(i: int) -> S {
         S {
             v: i
@@ -24,7 +24,7 @@ impl S: MyNum {
     }
 }
 
-impl S: NumExt { }
+impl NumExt for S { }
 
 fn greater_than_one<T:NumExt>() -> T { MyNum::from_int(1) }
 
index 8967bd91b8bd00b659a091f8aa5dcb961da2f492..6f706ad0be746278b0e4ea95842c3d52189a2666 100644 (file)
@@ -18,9 +18,9 @@ pub trait NumExt: MyEq MyNum { }
 
 struct S { v: int }
 
-impl S: MyEq { }
+impl MyEq for S { }
 
-impl S: MyNum {
+impl MyNum for S {
     static fn from_int(i: int) -> S {
         S {
             v: i
@@ -28,7 +28,7 @@ impl S: MyNum {
     }
 }
 
-impl S: NumExt { }
+impl NumExt for S { }
 
 fn greater_than_one<T:NumExt>() -> T { MyNum::from_int(1) }
 
index c8b270cad764803dbacdeda0e758fdd1441d4b44..03b7e37a7ad13c4a3e9950d3844958d2b27b0853 100644 (file)
@@ -16,7 +16,7 @@ trait MyNum : Add<Self,Self> { }
 
 struct MyInt { val: int }
 
-impl MyInt : Add<MyInt, MyInt> {
+impl Add<MyInt, MyInt> for MyInt {
     pure fn add(other: &MyInt) -> MyInt { mi(self.val + other.val) }
 }
 
index 5659fed9c9b9a5f38d6dfc6a1544c3b2e5da1b12..378c78cfd921fc1f4859846a3869482d44037b46 100644 (file)
@@ -20,13 +20,13 @@ trait MyNum : Add<Self,Self> { }
 
 struct MyInt { val: int }
 
-impl MyInt : Panda<MyInt> {
+impl Panda<MyInt> for MyInt {
     fn chomp(bamboo: &MyInt) -> MyInt {
         mi(self.val + bamboo.val)
     }
 }
 
-impl MyInt : Add<MyInt, MyInt> {
+impl Add<MyInt, MyInt> for MyInt {
     fn add(other: &MyInt) -> MyInt { self.chomp(other) }
 }
 
index 70b0302de8cb8fd44cb240fe91d8f4a0caf1f85b..6015eff8abe24002ab7eccbca43eaf566cec4e1e 100644 (file)
 mod traits {
     pub trait Foo { fn f() -> int; }
 
-    impl int: Foo { fn f() -> int { 10 } }
+    impl Foo for int { fn f() -> int { 10 } }
 }
 
 trait Quux: traits::Foo { }
-impl<T: traits::Foo> T: Quux { }
+impl<T: traits::Foo> Quux for T { }
 
 // Foo is not in scope but because Quux is we can still access
 // Foo's methods on a Quux bound typaram
@@ -25,4 +25,4 @@ fn f<T: Quux>(x: &T) {
 
 pub fn main() {
     f(&0)
-}
\ No newline at end of file
+}
index 951c03fd01615e3f82ca6eb432fcf1a1c4b588de..3dee07194dd51be7522752e5f7d8c4892abaec3d 100644 (file)
@@ -16,9 +16,9 @@ trait Quux: Foo Bar Baz { }
 
 struct A { x: int }
 
-impl A : Foo { fn f() -> int { 10 } }
-impl A : Bar { fn g() -> int { 20 } }
-impl A : Baz { fn h() -> int { 30 } }
+impl Foo for A { fn f() -> int { 10 } }
+impl Bar for A { fn g() -> int { 20 } }
+impl Baz for A { fn h() -> int { 30 } }
 impl A : Quux;
 
 fn f<T: Quux Foo Bar Baz>(a: &T) {
index 1cd34e264e828c9ac47cd1543dfe30d23cf4f575..a00ca6156854d5df8c4d3afdbeae565abd4803c0 100644 (file)
@@ -16,7 +16,7 @@ struct A {
     x: int
 }
 
-impl A : Foo {
+impl Foo for A {
     fn f() -> int {
         io::println(~"Today's number is " + self.x.to_str());
         return self.x;
index 8b6f61117e8ea59bbba99992ec7c4a3bf07df0f2..62f4ef89d693d2711d36b9a5a9c4cb9fe232c665 100644 (file)
@@ -20,11 +20,11 @@ trait to_str {
     fn to_str() -> ~str;
 }
 
-impl int: to_str {
+impl to_str for int {
     fn to_str() -> ~str { int::str(self) }
 }
 
-impl<T: to_str> ~[T]: to_str {
+impl<T: to_str> to_str for ~[T] {
     fn to_str() -> ~str {
         ~"[" + str::connect(vec::map(self, |e| e.to_str() ), ~", ") + ~"]"
     }
index 9e75a6625a5ff5753a7d5c90a62198d851b2147f..294b8a573f1ffca44ef7d06d16fc3da60d8ae166 100644 (file)
@@ -18,7 +18,7 @@ struct S {
     name: int
 }
 
-impl S: Foo {
+impl Foo for S {
     fn bar() { }
 }
 
@@ -27,4 +27,4 @@ pub fn main() {
         name: 0
     };
     s.bar();
-}
\ No newline at end of file
+}
index 66f4c431141190213369b4adc1cf478221972a36..43d8121c0b4998cfec874077f808780fed52487b 100644 (file)
@@ -20,7 +20,7 @@ enum Baz {
     Quux
 }
 
-impl Baz: Foo {
+impl Foo for Baz {
 }
 
 pub fn main() {
index b0742255ba37fb48bc342dd7004d2a509c430f94..5a62d36f3e85df30e7dc661b562ace2b34fe5c6c 100644 (file)
@@ -18,7 +18,7 @@ fn scratch() -> bool { self.purr() }
     fn purr() -> bool { true }
 }
 
-impl int : Cat {
+impl Cat for int {
     fn meow() -> bool {
         self.scratch()
     }
index e9850588e9e21af89607b36524691643f001c33a..639741a55f3575f40864d5733b4cb5ae187a4e51 100644 (file)
@@ -16,7 +16,7 @@ trait Cat {
     fn purr() -> bool { true }
 }
 
-impl int : Cat {
+impl Cat for int {
     fn meow() -> bool {
         self.scratch()
     }
index 182e47aa817272236f69eb032f992c2ac86021b0..c4ec15ff2730a37dd357b126a943b17e9124ed49 100644 (file)
@@ -43,7 +43,7 @@ fn gte(a: self) -> bool {
 }
 
 // pronounced "impl of Ord for int" -- not sold on this yet
-impl int : Ord {
+impl Ord for int {
     fn lt(a: &int) -> bool {
         self < (*a)
     }
index d5749155456aaecf201dc4ced2cbd02c808c108e..95920bcc967d3c27eab02d296870c7e596d2fccd 100644 (file)
@@ -19,7 +19,7 @@ struct r {
   i: int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {}
 }
 
index 13afc62baeb185f6d0fac48a5e01c0f14f659cdd..07f1306e40637cf891b838ad2cb67279b4fbe112 100644 (file)
@@ -17,7 +17,7 @@ trait Equal {
 
 enum Color { cyan, magenta, yellow, black }
 
-impl Color : Equal {
+impl Equal for Color {
     static fn isEq(a: Color, b: Color) -> bool {
         match (a, b) {
           (cyan, cyan)       => { true  }
@@ -34,7 +34,7 @@ enum ColorTree {
     branch(@ColorTree, @ColorTree)
 }
 
-impl ColorTree : Equal {
+impl Equal for ColorTree {
     static fn isEq(a: ColorTree, b: ColorTree) -> bool {
         match (a, b) {
           (leaf(x), leaf(y)) => { Equal::isEq(x, y) }
index cf2c2e27fa563221c0bae09523ff7c50c333cdc6..a586457519b87e44bd6576e6f3c75c3492c29324 100644 (file)
@@ -16,7 +16,7 @@ trait Equal {
 
 enum Color { cyan, magenta, yellow, black }
 
-impl Color : Equal {
+impl Equal for Color {
     fn isEq(a: Color) -> bool {
         match (self, a) {
           (cyan, cyan)       => { true  }
@@ -33,7 +33,7 @@ enum ColorTree {
     branch(@ColorTree, @ColorTree)
 }
 
-impl ColorTree : Equal {
+impl Equal for ColorTree {
     fn isEq(a: ColorTree) -> bool {
         match (self, a) {
           (leaf(x), leaf(y)) => { x.isEq(y) }
index 60c5bf068f0d6619c8a6decee8f393ae13ee62d2..1f0b13dfd01933f64b2ba82bbffcd7313107c37c 100644 (file)
@@ -15,4 +15,4 @@ fn altsimple() {
       _ => { }
     }
 }
-pub fn main() { }
\ No newline at end of file
+pub fn main() { }
index 07c1d5221578db6a90401b595b70d8e0265a75c3..9a49fefdef0ec5521452a736862a86860be124f3 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
     // Should drop the previous value of j
     j = i;
     assert *j == 1;
-}
\ No newline at end of file
+}
index 9089ac9a32790d927e3faae8d5b1b9cfff0abd3e..c1a2c33cc45c68179c7b4a4b2b58cb9b3c794c27 100644 (file)
@@ -12,4 +12,4 @@ pub fn main() {
     let mut i;
     i = ~1;
     assert *i == 1;
-}
\ No newline at end of file
+}
index eac67c65b8f0f75490732ccd8c01be9efe59ff3d..4bbdc9b4cd45b58395562d7932157c00bd3f4f20 100644 (file)
@@ -15,4 +15,4 @@ pub fn main() {
         j: 100
     };
     assert i.j == 100;
-}
\ No newline at end of file
+}
index 5a565d4b81c2d4d31c881b6f44b8c46c8422b2dd..9d6ed4933bcb3e04a34cf328a7887b699cfec674 100644 (file)
@@ -15,4 +15,4 @@ pub fn main() {
     assert i <= ~100;
     assert i > ~99;
     assert i >= ~99;
-}
\ No newline at end of file
+}
index 989ee58a793a2ce34324bccc803c677de6f3400e..9570c17c8654c3393d8989cb2fd6903a8131e442 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
 
 fn vec() {
     ~[0];
-}
\ No newline at end of file
+}
index 8c6420a4df7cf7dd711e2374b3976bb5f9b44f73..a856d37d4fca61f56b05919924f6a0d9c33635c1 100644 (file)
@@ -12,4 +12,4 @@ pub fn main() {
     let i = ~1;
     let j = i;
     assert *j == 1;
-}
\ No newline at end of file
+}
index 56cbc044c017560030e366ce989130e743c0ba2e..fd4f428bd9d7aa7668b4931290dd83e23c1c695f 100644 (file)
@@ -11,4 +11,4 @@
 pub fn main() {
     let i = move ~100;
     assert *i == 100;
-}
\ No newline at end of file
+}
index d41e6f99ec585c80987b183a41cf00ea1b37b770..27600c04e22f975ca516c41422790949e14c2259 100644 (file)
@@ -12,4 +12,4 @@ pub fn main() {
     let i = ~100;
     let j = move i;
     assert *j == 100;
-}
\ No newline at end of file
+}
index 625a8f8982e0ca5d1406101458edf762a1ba200c..96e91093d37a2eb40dc0ecf74e27c2d722b2fe1b 100644 (file)
@@ -11,4 +11,4 @@
 pub fn main() {
     let i = ~100;
     assert *i == 100;
-}
\ No newline at end of file
+}
index 4c4f46607d28497548479007e80bd5fbcecb32c1..513e3c017576c2297c4eeb75f1f9b29c1f2bebcc 100644 (file)
@@ -13,4 +13,4 @@ struct Foo { a: int, b: int }
 pub fn main() {
     let ~Foo{a, b} = ~Foo{a: 100, b: 200};
     assert a + b == 300;
-}
\ No newline at end of file
+}
index 2246fa2270ae835f6a38bc9db41ba9234655902b..61cee457b0cf0ee1ab06887d943d246ecc0ee19c 100644 (file)
@@ -15,4 +15,4 @@ fn f(-i: ~int) {
 pub fn main() {
     let i = ~100;
     f(move i);
-}
\ No newline at end of file
+}
index 82462c0c11c9b308ecb995628192170a4f2e39e6..ddf87707e36c2b76ca1a62daebec88c30d4217b6 100644 (file)
@@ -16,4 +16,4 @@ pub fn main() {
     let mut i = ~100;
     f(&mut i);
     assert *i == 200;
-}
\ No newline at end of file
+}
index 2dbd924a6ade12fcfe98d434d34c5cd419710c28..c35b40991df09e4177f33267ec167c553b14e768 100644 (file)
@@ -16,4 +16,4 @@ pub fn main() {
     f(~100);
     let i = ~100;
     f(i);
-}
\ No newline at end of file
+}
index b5127571a215a36ce4fef35a5e15b6f0322ea98d..427bd8966b8515c4ef0214cac04022b9e636108d 100644 (file)
@@ -14,4 +14,4 @@ fn f() -> ~int {
 
 pub fn main() {
     assert f() == ~100;
-}
\ No newline at end of file
+}
index 0d58e2fcd2eefa3783e8accaec8459dfb8bc8d6f..55145255840008e2dfa80f1862878db3b5d19f6c 100644 (file)
@@ -10,4 +10,4 @@
 
 pub fn main() {
     let i = ~100;
-}
\ No newline at end of file
+}
index 27a4cbf8d4b33bbc70bd210c1ecdf717aea47e00..b619140d509852e361323cc82b6c0e37d1c96a92 100644 (file)
@@ -11,4 +11,4 @@
 pub fn main() {
     let i = ~100;
     log(error, i);
-}
\ No newline at end of file
+}
index 6aac2ac39632f50b601fadf0c87e190fd3d59fda..fd86d5aa6fefaa2a16ee43080ca67f009c97d9ba 100644 (file)
@@ -13,4 +13,4 @@ pub fn main() {
     let j = ~200;
     let j = move i;
     assert *j == 100;
-}
\ No newline at end of file
+}
index df6ed48fa601cc68127ee025d7d9c86d77512a82..eaa8a1cf7bd409eb5028f68b6ab98cd1208408b6 100644 (file)
@@ -12,4 +12,4 @@ pub fn main() {
     let mut i;
     i = move ~100;
     assert *i == 100;
-}
\ No newline at end of file
+}
index 771e865287675224667079ff46454dafaa795533..be0426edbe2e40a035fcf1dbbe3625bcfb65a66e 100644 (file)
@@ -13,4 +13,4 @@ pub fn main() {
     let mut j;
     j = move i;
     assert *j == 100;
-}
\ No newline at end of file
+}
index 95ef19600e608ad807b8cce50f21ef634d013dab..c52d3b563ac55840d085f55a2df9eca577a3f18c 100644 (file)
@@ -12,4 +12,4 @@ pub fn main() {
     let i = ~mut 0;
     *i = 1;
     assert *i == 1;
-}
\ No newline at end of file
+}
index 4ad8ab38e4b8d3ea6d3442053a4752fde1e6ae98..031b17ceb8fdb37ee5380364e7dd0609c468b270 100644 (file)
@@ -16,7 +16,7 @@ struct Bar {
     x: int
 }
 
-impl Bar : Foo {
+impl Foo for Bar {
     fn f(&self) -> int {
         self.x
     }
index 089deeb20ac8fc93f310606ca0bb687045b88a16..7da21b1081eaf1c380d4ff3756393c3987ce0d94 100644 (file)
@@ -12,7 +12,7 @@ struct r {
   i: @mut int,
 }
 
-impl r : Drop {
+impl Drop for r {
     fn finalize(&self) {
         *(self.i) = *(self.i) + 1;
     }
index a79c7bd6d5b1d26591126d17d545bfd709f4cafe..a5398e7407b376391cc261ae74c86fbef49e8a25 100644 (file)
@@ -32,4 +32,4 @@ pub fn main() {
     }
 
     assert expected == actual;
-}
\ No newline at end of file
+}
index b6c5b2948a0d65753256df953a04df2879e56575..57b345c2d25eabd28de629b67f2aabf4f6c55b87 100644 (file)
@@ -15,4 +15,4 @@ pub fn main() {
     c.send(~100);
     let v = p.recv();
     assert v == ~100;
-}
\ No newline at end of file
+}
index d0e8c463f0081f0fc82267afe212ed98957cd2df..a024cda75c38aa7d344f048e1d07834c713e1c28 100644 (file)
@@ -14,4 +14,4 @@ pub fn main() {
     i <-> j;
     assert i == ~200;
     assert j == ~100;
-}
\ No newline at end of file
+}
index 95b224fa2b7b34e6ca8f1c28244a6632467e4951..785eb691459d6ffa41d92f21d4d696cf66091863 100644 (file)
@@ -16,4 +16,4 @@ pub fn main()
 {
     let y = ~1;
     move y;
-}
\ No newline at end of file
+}
index fbe0e4711e1102867929003cab002ebc3210ddce..62673fc134d19c8a51746b9af9dcdc9e4a4333a6 100644 (file)
@@ -17,7 +17,7 @@ struct complainer {
   c: SharedChan<bool>,
 }
 
-impl complainer : Drop {
+impl Drop for complainer {
     fn finalize(&self) {
         error!("About to send!");
         self.c.send(true);
index 55b286aee7ea0dc159e41a99b6ccecb877984b3f..967ed727aa535c35bf0b79d61819bd47fcfc73fc 100644 (file)
@@ -15,7 +15,7 @@ struct complainer {
   c: @int,
 }
 
-impl complainer : Drop {
+impl Drop for complainer {
     fn finalize(&self) {}
 }
 
index 30646c4a35612535dad889341ee909226ceadb46..1bd68bfa4b6f9273ff170020331530d09815b46a 100644 (file)
@@ -10,6 +10,6 @@
 
 // Issue #1761
 
-impl int: foo { fn foo() -> int { 10 } }
+impl foo for int { fn foo() -> int { 10 } }
 trait foo { fn foo() -> int; }
-pub fn main() {}
\ No newline at end of file
+pub fn main() {}
index a73b12bef9408f8e89f433005c17534b70223455..3fcd69ce40a56fb0f747393fa703e2a9b60b23f5 100644 (file)
@@ -13,7 +13,7 @@ struct foo {
     x: @mut int,
 }
 
-impl foo : Drop {
+impl Drop for foo {
     fn finalize(&self) {
         *self.x += 1;
     }