]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #19714: steveklabnik/gh16219
authorBrian Anderson <banderson@mozilla.com>
Sun, 14 Dec 2014 02:22:14 +0000 (18:22 -0800)
committerBrian Anderson <banderson@mozilla.com>
Mon, 15 Dec 2014 14:44:21 +0000 (06:44 -0800)
These should be properly annotated instead.

Fixes #16219.

558 files changed:
mk/crates.mk
mk/dist.mk
mk/rustllvm.mk
mk/tests.mk
src/compiletest/compiletest.rs
src/compiletest/runtest.rs
src/doc/guide-tasks.md
src/doc/guide-testing.md
src/doc/guide.md
src/doc/intro.md
src/doc/po4a.conf
src/doc/reference.md
src/doc/rustdoc.md
src/etc/emacs/rust-mode.el
src/etc/pkg/rust.iss
src/etc/unicode.py
src/etc/vim/syntax/rust.vim
src/liballoc/arc.rs
src/libarena/lib.rs
src/libcollections/bench.rs
src/libcollections/bit.rs
src/libcollections/btree/map.rs
src/libcollections/btree/node.rs
src/libcollections/btree/set.rs
src/libcollections/dlist.rs
src/libcollections/enum_set.rs
src/libcollections/lib.rs
src/libcollections/ring_buf.rs
src/libcollections/slice.rs
src/libcollections/str.rs
src/libcollections/string.rs
src/libcollections/tree/map.rs
src/libcollections/tree/mod.rs
src/libcollections/tree/set.rs
src/libcollections/trie/map.rs
src/libcollections/trie/mod.rs
src/libcollections/trie/set.rs
src/libcollections/vec.rs
src/libcollections/vec_map.rs
src/libcore/char.rs
src/libcore/finally.rs
src/libcore/fmt/float.rs
src/libcore/fmt/mod.rs
src/libcore/iter.rs
src/libcore/kinds.rs
src/libcore/ops.rs
src/libcore/option.rs
src/libcore/raw.rs
src/libcore/result.rs
src/libcore/simd.rs
src/libcore/slice.rs
src/libcore/str.rs
src/libcore/tuple/mod.rs
src/libcoretest/finally.rs
src/libcoretest/iter.rs
src/libcoretest/lib.rs
src/libcoretest/str.rs
src/libflate/lib.rs
src/libgetopts/lib.rs
src/libgraphviz/lib.rs
src/libgraphviz/maybe_owned_vec.rs
src/liblog/lib.rs
src/librand/chacha.rs
src/librand/distributions/mod.rs
src/librand/lib.rs
src/librbml/lib.rs
src/libregex/lib.rs
src/libregex/parse.rs
src/libregex/re.rs
src/libregex_macros/lib.rs
src/librustc/diagnostics.rs
src/librustc/lib.rs
src/librustc/lint/builtin.rs
src/librustc/lint/context.rs
src/librustc/metadata/common.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/loader.rs
src/librustc/metadata/tydecode.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/check_loans.rs [deleted file]
src/librustc/middle/borrowck/doc.rs [deleted file]
src/librustc/middle/borrowck/fragments.rs [deleted file]
src/librustc/middle/borrowck/gather_loans/gather_moves.rs [deleted file]
src/librustc/middle/borrowck/gather_loans/lifetime.rs [deleted file]
src/librustc/middle/borrowck/gather_loans/mod.rs [deleted file]
src/librustc/middle/borrowck/gather_loans/move_error.rs [deleted file]
src/librustc/middle/borrowck/gather_loans/restrictions.rs [deleted file]
src/librustc/middle/borrowck/graphviz.rs [deleted file]
src/librustc/middle/borrowck/mod.rs [deleted file]
src/librustc/middle/borrowck/move_data.rs [deleted file]
src/librustc/middle/cfg/construct.rs
src/librustc/middle/check_const.rs
src/librustc/middle/check_loop.rs
src/librustc/middle/check_match.rs
src/librustc/middle/check_static.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/dead.rs
src/librustc/middle/def.rs
src/librustc/middle/effect.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/graph.rs
src/librustc/middle/infer/coercion.rs
src/librustc/middle/infer/combine.rs
src/librustc/middle/infer/equate.rs
src/librustc/middle/infer/error_reporting.rs
src/librustc/middle/infer/glb.rs
src/librustc/middle/infer/higher_ranked/mod.rs
src/librustc/middle/infer/lub.rs
src/librustc/middle/infer/mod.rs
src/librustc/middle/infer/region_inference/mod.rs
src/librustc/middle/infer/skolemize.rs
src/librustc/middle/infer/sub.rs
src/librustc/middle/lang_items.rs
src/librustc/middle/liveness.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/pat_util.rs
src/librustc/middle/privacy.rs
src/librustc/middle/reachable.rs
src/librustc/middle/region.rs
src/librustc/middle/resolve.rs
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/stability.rs
src/librustc/middle/subst.rs
src/librustc/middle/traits/coherence.rs
src/librustc/middle/traits/fulfill.rs
src/librustc/middle/traits/mod.rs
src/librustc/middle/traits/select.rs
src/librustc/middle/traits/util.rs
src/librustc/middle/ty.rs
src/librustc/middle/ty_fold.rs
src/librustc/session/mod.rs
src/librustc/util/common.rs
src/librustc/util/ppaux.rs
src/librustc_back/archive.rs
src/librustc_back/lib.rs
src/librustc_back/rpath.rs
src/librustc_back/sha2.rs
src/librustc_back/svh.rs
src/librustc_borrowck/borrowck/check_loans.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/doc.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/fragments.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/gather_loans/lifetime.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/gather_loans/mod.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/gather_loans/move_error.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/gather_loans/restrictions.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/mod.rs [new file with mode: 0644]
src/librustc_borrowck/borrowck/move_data.rs [new file with mode: 0644]
src/librustc_borrowck/graphviz.rs [new file with mode: 0644]
src/librustc_borrowck/lib.rs [new file with mode: 0644]
src/librustc_driver/driver.rs
src/librustc_driver/lib.rs
src/librustc_driver/pretty.rs
src/librustc_driver/test.rs
src/librustc_llvm/lib.rs
src/librustc_trans/back/link.rs
src/librustc_trans/back/lto.rs
src/librustc_trans/back/write.rs
src/librustc_trans/lib.rs
src/librustc_trans/save/mod.rs
src/librustc_trans/trans/_match.rs
src/librustc_trans/trans/adt.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/basic_block.rs
src/librustc_trans/trans/cabi_x86_64.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/cleanup.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/consts.rs
src/librustc_trans/trans/datum.rs
src/librustc_trans/trans/debuginfo.rs
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/intrinsic.rs
src/librustc_trans/trans/meth.rs
src/librustc_trans/trans/value.rs
src/librustc_typeck/astconv.rs
src/librustc_typeck/check/closure.rs
src/librustc_typeck/check/demand.rs
src/librustc_typeck/check/method/confirm.rs
src/librustc_typeck/check/method/mod.rs
src/librustc_typeck/check/method/probe.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/regionck.rs
src/librustc_typeck/check/regionmanip.rs
src/librustc_typeck/check/vtable.rs
src/librustc_typeck/check/wf.rs
src/librustc_typeck/check/writeback.rs
src/librustc_typeck/coherence/mod.rs
src/librustc_typeck/coherence/orphan.rs
src/librustc_typeck/coherence/unsafety.rs [new file with mode: 0644]
src/librustc_typeck/collect.rs
src/librustc_typeck/diagnostics.rs
src/librustc_typeck/lib.rs
src/librustc_typeck/variance.rs
src/librustdoc/clean/inline.rs
src/librustdoc/clean/mod.rs
src/librustdoc/doctree.rs
src/librustdoc/fold.rs
src/librustdoc/html/format.rs
src/librustdoc/html/markdown.rs
src/librustdoc/html/render.rs
src/librustdoc/html/toc.rs
src/librustdoc/lib.rs
src/librustdoc/stability_summary.rs
src/librustdoc/test.rs
src/librustdoc/visit_ast.rs
src/librustrt/args.rs
src/librustrt/at_exit_imp.rs
src/librustrt/c_str.rs
src/librustrt/exclusive.rs
src/librustrt/lib.rs
src/librustrt/local.rs
src/librustrt/mutex.rs
src/librustrt/task.rs
src/librustrt/thread.rs
src/librustrt/thunk.rs [new file with mode: 0644]
src/librustrt/util.rs
src/libserialize/json.rs
src/libserialize/lib.rs
src/libserialize/serialize.rs
src/libstd/ascii.rs
src/libstd/bitflags.rs
src/libstd/c_vec.rs
src/libstd/collections/hash/map.rs
src/libstd/collections/hash/set.rs
src/libstd/comm/mod.rs
src/libstd/comm/mpsc_queue.rs
src/libstd/comm/select.rs
src/libstd/comm/spsc_queue.rs
src/libstd/dynamic_lib.rs
src/libstd/io/buffered.rs
src/libstd/io/comm_adapters.rs
src/libstd/io/extensions.rs
src/libstd/io/fs.rs
src/libstd/io/mod.rs
src/libstd/io/net/ip.rs
src/libstd/io/net/mod.rs
src/libstd/io/net/pipe.rs
src/libstd/io/net/tcp.rs
src/libstd/io/net/udp.rs
src/libstd/io/pipe.rs
src/libstd/io/process.rs
src/libstd/io/stdio.rs
src/libstd/io/timer.rs
src/libstd/lib.rs
src/libstd/macros.rs
src/libstd/num/strconv.rs
src/libstd/num/u16.rs
src/libstd/num/u32.rs
src/libstd/num/u64.rs
src/libstd/num/u8.rs
src/libstd/num/uint.rs
src/libstd/num/uint_macros.rs
src/libstd/os.rs
src/libstd/path/posix.rs
src/libstd/path/windows.rs
src/libstd/rand/os.rs
src/libstd/rt/mod.rs
src/libstd/sync/atomic.rs
src/libstd/sync/barrier.rs
src/libstd/sync/condvar.rs
src/libstd/sync/future.rs
src/libstd/sync/mutex.rs
src/libstd/sync/once.rs
src/libstd/sync/rwlock.rs
src/libstd/sync/semaphore.rs
src/libstd/sync/task_pool.rs
src/libstd/sys/common/helper_thread.rs
src/libstd/sys/common/mod.rs
src/libstd/sys/common/net.rs
src/libstd/sys/unix/mod.rs
src/libstd/sys/unix/pipe.rs
src/libstd/sys/unix/process.rs
src/libstd/sys/windows/mod.rs
src/libstd/sys/windows/process.rs
src/libstd/sys/windows/thread_local.rs
src/libstd/task.rs
src/libstd/thread_local/mod.rs
src/libstd/thread_local/scoped.rs
src/libstd/time/duration.rs
src/libsyntax/ast.rs
src/libsyntax/ast_map/blocks.rs
src/libsyntax/ast_map/mod.rs
src/libsyntax/ast_util.rs
src/libsyntax/attr.rs
src/libsyntax/codemap.rs
src/libsyntax/config.rs
src/libsyntax/diagnostic.rs
src/libsyntax/diagnostics/plugin.rs
src/libsyntax/ext/build.rs
src/libsyntax/ext/deriving/bounds.rs
src/libsyntax/ext/deriving/clone.rs
src/libsyntax/ext/deriving/cmp/eq.rs
src/libsyntax/ext/deriving/cmp/ord.rs
src/libsyntax/ext/deriving/cmp/totaleq.rs
src/libsyntax/ext/deriving/cmp/totalord.rs
src/libsyntax/ext/deriving/decodable.rs
src/libsyntax/ext/deriving/default.rs
src/libsyntax/ext/deriving/encodable.rs
src/libsyntax/ext/deriving/generic/mod.rs
src/libsyntax/ext/deriving/generic/ty.rs
src/libsyntax/ext/deriving/hash.rs
src/libsyntax/ext/deriving/primitive.rs
src/libsyntax/ext/deriving/rand.rs
src/libsyntax/ext/deriving/show.rs
src/libsyntax/ext/deriving/zero.rs
src/libsyntax/ext/env.rs
src/libsyntax/ext/expand.rs
src/libsyntax/ext/format.rs
src/libsyntax/ext/mtwt.rs
src/libsyntax/feature_gate.rs
src/libsyntax/fold.rs
src/libsyntax/lib.rs
src/libsyntax/owned_slice.rs
src/libsyntax/parse/lexer/mod.rs
src/libsyntax/parse/mod.rs
src/libsyntax/parse/obsolete.rs
src/libsyntax/parse/parser.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pprust.rs
src/libsyntax/ptr.rs
src/libsyntax/test.rs
src/libsyntax/util/parser_testing.rs
src/libsyntax/util/small_vector.rs
src/libsyntax/visit.rs
src/libterm/lib.rs
src/libtest/lib.rs
src/libunicode/lib.rs
src/libunicode/tables.rs
src/libunicode/u_str.rs
src/rustllvm/ExecutionEngineWrapper.cpp [new file with mode: 0644]
src/rustllvm/rustllvm.h
src/snapshots.txt
src/test/auxiliary/cci_capture_clause.rs
src/test/auxiliary/issue-19340-1.rs [new file with mode: 0644]
src/test/auxiliary/trait-safety-lib.rs [new file with mode: 0644]
src/test/bench/core-map.rs
src/test/bench/core-set.rs
src/test/bench/core-std.rs
src/test/bench/msgsend-pipes-shared.rs
src/test/bench/msgsend-pipes.rs
src/test/bench/msgsend-ring-mutex-arcs.rs
src/test/bench/rt-messaging-ping-pong.rs
src/test/bench/rt-parfib.rs
src/test/bench/shootout-binarytrees.rs
src/test/bench/shootout-chameneos-redux.rs
src/test/bench/shootout-fannkuch-redux.rs
src/test/bench/shootout-fasta.rs
src/test/bench/shootout-k-nucleotide-pipes.rs
src/test/bench/shootout-k-nucleotide.rs
src/test/bench/shootout-mandelbrot.rs
src/test/bench/shootout-meteor.rs
src/test/bench/shootout-pfib.rs
src/test/bench/shootout-regex-dna.rs
src/test/bench/shootout-reverse-complement.rs
src/test/bench/shootout-spectralnorm.rs
src/test/bench/shootout-threadring.rs
src/test/bench/spawnone.rs
src/test/bench/task-perf-alloc-unwind.rs
src/test/bench/task-perf-jargon-metal-smoke.rs
src/test/bench/task-perf-one-million.rs
src/test/bench/task-perf-spawnalot.rs
src/test/compile-fail-fulldeps/phase-syntax-doesnt-resolve.rs
src/test/compile-fail/assoc-eq-1.rs [new file with mode: 0644]
src/test/compile-fail/assoc-eq-2.rs [new file with mode: 0644]
src/test/compile-fail/assoc-eq-3.rs [new file with mode: 0644]
src/test/compile-fail/assoc-eq-expr-path.rs [new file with mode: 0644]
src/test/compile-fail/borrowck-call-sendfn.rs [deleted file]
src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
src/test/compile-fail/borrowck-move-by-capture.rs
src/test/compile-fail/borrowck-move-moved-value-into-closure.rs
src/test/compile-fail/borrowck-multiple-captures.rs
src/test/compile-fail/borrowck-return-variable-on-stack-via-clone.rs [new file with mode: 0644]
src/test/compile-fail/builtin-superkinds-self-type.rs
src/test/compile-fail/builtin-superkinds-simple.rs
src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs
src/test/compile-fail/coerce-bare-fn-to-closure-and-proc.rs
src/test/compile-fail/coerce-unsafe-to-closure.rs
src/test/compile-fail/hrtb-debruijn-in-receiver.rs [new file with mode: 0644]
src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs
src/test/compile-fail/issue-10398.rs
src/test/compile-fail/issue-11515.rs
src/test/compile-fail/issue-11925.rs
src/test/compile-fail/issue-12041.rs
src/test/compile-fail/issue-12127.rs
src/test/compile-fail/issue-13599.rs [deleted file]
src/test/compile-fail/issue-18252.rs
src/test/compile-fail/issue-19452.rs [new file with mode: 0644]
src/test/compile-fail/issue-19734.rs [new file with mode: 0644]
src/test/compile-fail/issue-3973.rs
src/test/compile-fail/kindck-impl-type-params.rs
src/test/compile-fail/kindck-nonsendable-1.rs
src/test/compile-fail/kindck-proc-bounds.rs [deleted file]
src/test/compile-fail/kindck-send-object.rs
src/test/compile-fail/kindck-send-object1.rs
src/test/compile-fail/kindck-send-owned.rs
src/test/compile-fail/kindck-send-region-pointers.rs
src/test/compile-fail/kindck-send-unsafe.rs
src/test/compile-fail/lex-bad-char-literals.rs
src/test/compile-fail/macro-inner-attributes.rs
src/test/compile-fail/moves-based-on-type-capture-clause-bad.rs
src/test/compile-fail/moves-sru-moved-field.rs
src/test/compile-fail/no-capture-arc.rs
src/test/compile-fail/no-reuse-move-arc.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/obsolete-proc.rs [new file with mode: 0644]
src/test/compile-fail/once-cant-call-twice-on-heap.rs
src/test/compile-fail/opt-out-copy-bad.rs [new file with mode: 0644]
src/test/compile-fail/recursion_limit.rs
src/test/compile-fail/region-object-lifetime-in-coercion.rs
src/test/compile-fail/regions-bounded-by-send.rs
src/test/compile-fail/regions-bounded-by-trait-requiring-static.rs
src/test/compile-fail/regions-bounded-method-type-parameters.rs
src/test/compile-fail/regions-infer-proc-static-upvar.rs
src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs [deleted file]
src/test/compile-fail/regions-proc-bound-capture.rs
src/test/compile-fail/regions-proc-bounds.rs [deleted file]
src/test/compile-fail/spawn-non-nil-fn.rs
src/test/compile-fail/trait-safety-fn-body.rs [new file with mode: 0644]
src/test/compile-fail/trait-safety-inherent-impl.rs [new file with mode: 0644]
src/test/compile-fail/trait-safety-trait-impl-cc.rs [new file with mode: 0644]
src/test/compile-fail/trait-safety-trait-impl.rs [new file with mode: 0644]
src/test/compile-fail/unboxed-closure-feature-gate.rs [new file with mode: 0644]
src/test/compile-fail/unboxed-closure-sugar-used-on-struct-1.rs [new file with mode: 0644]
src/test/compile-fail/unboxed-closure-sugar-used-on-struct-3.rs [new file with mode: 0644]
src/test/compile-fail/unboxed-closure-sugar-used-on-struct.rs [new file with mode: 0644]
src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs
src/test/compile-fail/unused-mut-warning-captured-var.rs
src/test/debuginfo/lexical-scope-in-unique-closure.rs
src/test/debuginfo/type-names.rs
src/test/pretty/closure-reform-pretty.rs
src/test/pretty/fn-types.rs
src/test/pretty/trait-safety.rs [new file with mode: 0644]
src/test/run-fail/extern-panic.rs
src/test/run-fail/panic-task-name-none.rs
src/test/run-fail/panic-task-name-owned.rs
src/test/run-fail/panic-task-name-send-str.rs
src/test/run-fail/panic-task-name-static.rs
src/test/run-fail/rt-set-exit-status-panic2.rs
src/test/run-make/bootstrap-from-c-with-native/lib.rs
src/test/run-make/static-unwinding/main.rs
src/test/run-pass/assignability-trait.rs
src/test/run-pass/assoc-eq.rs [new file with mode: 0644]
src/test/run-pass/backtrace.rs
src/test/run-pass/block-arg-call-as.rs
src/test/run-pass/block-arg.rs
src/test/run-pass/borrowck-move-by-capture-ok.rs
src/test/run-pass/capturing-logging.rs
src/test/run-pass/child-outlives-parent.rs
src/test/run-pass/clone-with-exterior.rs
src/test/run-pass/closure-bounds-can-capture-chan.rs
src/test/run-pass/closure-reform.rs
src/test/run-pass/closure-syntax.rs
src/test/run-pass/coerce-to-closure-and-proc.rs
src/test/run-pass/comm.rs
src/test/run-pass/core-run-destroy.rs
src/test/run-pass/drop-trait-enum.rs
src/test/run-pass/enum-null-pointer-opt.rs
src/test/run-pass/explicit-self-generic.rs
src/test/run-pass/extern-call-deep2.rs
src/test/run-pass/extern-call-scrub.rs
src/test/run-pass/extern-stress.rs
src/test/run-pass/extern-yield.rs
src/test/run-pass/foreign-call-no-runtime.rs
src/test/run-pass/hashmap-memory.rs
src/test/run-pass/hrtb-parse.rs
src/test/run-pass/infinite-loops.rs
src/test/run-pass/issue-10682.rs
src/test/run-pass/issue-10718.rs
src/test/run-pass/issue-11709.rs
src/test/run-pass/issue-11958.rs
src/test/run-pass/issue-12684.rs
src/test/run-pass/issue-13352.rs
src/test/run-pass/issue-13494.rs
src/test/run-pass/issue-14039.rs [deleted file]
src/test/run-pass/issue-15571.rs
src/test/run-pass/issue-16560.rs
src/test/run-pass/issue-16671.rs
src/test/run-pass/issue-16739.rs
src/test/run-pass/issue-18883.rs [deleted file]
src/test/run-pass/issue-19340-1.rs [new file with mode: 0644]
src/test/run-pass/issue-19340-2.rs [new file with mode: 0644]
src/test/run-pass/issue-2190-1.rs
src/test/run-pass/issue-3424.rs
src/test/run-pass/issue-3609.rs
src/test/run-pass/issue-4446.rs
src/test/run-pass/issue-4448.rs
src/test/run-pass/issue-8460.rs
src/test/run-pass/issue-8827.rs
src/test/run-pass/issue-9396.rs
src/test/run-pass/ivec-tag.rs
src/test/run-pass/kindck-implicit-close-over-mut-var.rs
src/test/run-pass/logging-only-prints-once.rs
src/test/run-pass/macro-with-braces-in-expr-position.rs
src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs [new file with mode: 0644]
src/test/run-pass/moves-based-on-type-capture-clause.rs
src/test/run-pass/newlambdas-ret-infer.rs
src/test/run-pass/newlambdas-ret-infer2.rs
src/test/run-pass/no-landing-pads.rs
src/test/run-pass/once-move-out-on-heap.rs
src/test/run-pass/operator-overloading.rs
src/test/run-pass/out-of-stack-new-thread-no-split.rs
src/test/run-pass/panic-in-dtor-drops-fields.rs
src/test/run-pass/preempt.rs
src/test/run-pass/proc-bounds.rs [deleted file]
src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs [new file with mode: 0644]
src/test/run-pass/regions-infer-static-from-proc.rs
src/test/run-pass/return-from-closure.rs
src/test/run-pass/running-with-no-runtime.rs
src/test/run-pass/rust-log-filter.rs
src/test/run-pass/send-resource.rs
src/test/run-pass/sendfn-spawn-with-fn-arg.rs
src/test/run-pass/sepcomp-unwind.rs
src/test/run-pass/slice-panic-1.rs
src/test/run-pass/slice-panic-2.rs
src/test/run-pass/spawn-fn.rs
src/test/run-pass/spawn-types.rs
src/test/run-pass/spawn.rs
src/test/run-pass/spawn2.rs
src/test/run-pass/spawning-with-debug.rs
src/test/run-pass/swap-overlapping.rs
src/test/run-pass/task-comm-0.rs
src/test/run-pass/task-comm-1.rs
src/test/run-pass/task-comm-10.rs
src/test/run-pass/task-comm-11.rs
src/test/run-pass/task-comm-12.rs
src/test/run-pass/task-comm-13.rs
src/test/run-pass/task-comm-14.rs
src/test/run-pass/task-comm-15.rs
src/test/run-pass/task-comm-17.rs
src/test/run-pass/task-comm-3.rs
src/test/run-pass/task-comm-7.rs
src/test/run-pass/task-comm-9.rs
src/test/run-pass/task-life-0.rs
src/test/run-pass/task-spawn-move-and-copy.rs
src/test/run-pass/task-stderr.rs
src/test/run-pass/tcp-accept-stress.rs
src/test/run-pass/tcp-connect-timeouts.rs
src/test/run-pass/tcp-stress.rs
src/test/run-pass/tempfile.rs
src/test/run-pass/terminate-in-initializer.rs
src/test/run-pass/threads.rs
src/test/run-pass/trait-bounds-in-arc.rs
src/test/run-pass/trait-safety-ok-cc.rs [new file with mode: 0644]
src/test/run-pass/trait-safety-ok.rs [new file with mode: 0644]
src/test/run-pass/unboxed-closures-monomorphization.rs
src/test/run-pass/unboxed-closures-prelude.rs
src/test/run-pass/unboxed-closures-unboxing-shim.rs [deleted file]
src/test/run-pass/unique-send-2.rs
src/test/run-pass/unit-like-struct-drop-run.rs
src/test/run-pass/unwind-resource.rs
src/test/run-pass/vector-sort-panic-safe.rs
src/test/run-pass/weak-lang-item.rs

index 3a2def389cc24e92e907ad9fbcdf9e5c56393d35..a47d4871326dff477c93d34ca90a086ea5e57bca 100644 (file)
@@ -53,7 +53,7 @@ TARGET_CRATES := libc std flate arena term \
                  serialize getopts collections test time rand \
                  log regex graphviz core rbml alloc rustrt \
                  unicode
-RUSTC_CRATES := rustc rustc_typeck rustc_driver rustc_trans rustc_back rustc_llvm 
+RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_driver rustc_trans rustc_back rustc_llvm 
 HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
 CRATES := $(TARGET_CRATES) $(HOST_CRATES)
 TOOLS := compiletest rustdoc rustc
@@ -67,11 +67,12 @@ DEPS_std := core libc rand alloc collections rustrt unicode \
        native:rust_builtin native:backtrace
 DEPS_graphviz := std
 DEPS_syntax := std term serialize log fmt_macros arena libc
-DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back \
+DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
                      rustc_typeck log syntax serialize rustc_llvm rustc_trans
 DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
                        log syntax serialize rustc_llvm
 DEPS_rustc_typeck := rustc syntax
+DEPS_rustc_borrowck := rustc log graphviz syntax
 DEPS_rustc := syntax flate arena serialize getopts rbml \
               time log graphviz rustc_llvm rustc_back
 DEPS_rustc_llvm := native:rustllvm libc std
@@ -117,9 +118,10 @@ ONLY_RLIB_unicode := 1
 DOC_CRATES := $(filter-out rustc, \
               $(filter-out rustc_trans, \
               $(filter-out rustc_typeck, \
+              $(filter-out rustc_borrowck, \
               $(filter-out rustc_driver, \
-              $(filter-out syntax, $(CRATES))))))
-COMPILER_DOC_CRATES := rustc rustc_trans rustc_typeck rustc_driver syntax
+              $(filter-out syntax, $(CRATES)))))))
+COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_typeck rustc_driver syntax
 
 # This macro creates some simple definitions for each crate being built, just
 # some munging of all of the parameters above.
index 0b9cd86c61fe47c668578026807de3c0fbbf6447..00f6e8617391d93d58806df525e03ab33bb20511 100644 (file)
@@ -48,7 +48,6 @@ PKG_FILES := \
     $(S)configure $(S)Makefile.in              \
     $(S)man                                    \
     $(addprefix $(S)src/,                      \
-      README.md                                \
       compiletest                              \
       doc                                      \
       driver                                   \
index a62386818c156fd18a74e51ed7956959b4cad25d..44225020811c0470848bb5130b4f022e970b6142 100644 (file)
@@ -22,7 +22,8 @@ LLVM_EXTRA_INCDIRS_$(1)= -iquote $(S)src/llvm/include \
                          -iquote $$(CFG_LLVM_BUILD_DIR_$(1))/include
 endif
 
-RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, RustWrapper.cpp PassWrapper.cpp)
+RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, \
+       ExecutionEngineWrapper.cpp RustWrapper.cpp PassWrapper.cpp)
 
 RUSTLLVM_DEF_$(1) := $(1)/rustllvm/rustllvm$(CFG_DEF_SUFFIX_$(1))
 
index b4b8249a8cb42ef5a7ba8ddb30d82faa6517e42d..3340f9b4969ea2d7c12335e120bb9e22cba1ce38 100644 (file)
@@ -21,7 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
 
 TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
 TEST_DOC_CRATES = $(DOC_CRATES)
-TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_trans,$(HOST_CRATES))
+TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_trans,$(HOST_CRATES))
 TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
 
 ######################################################################
index 47ab675aff9347f95e99d1e7a2ce80a31abf940d..196c38215f463e3a865b9e8ee2bc4274b5a60f60 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 #![crate_type = "bin"]
-#![feature(phase, slicing_syntax, globs)]
+#![feature(phase, slicing_syntax, globs, unboxed_closures)]
 
 #![deny(warnings)]
 
@@ -23,6 +23,7 @@
 use std::io;
 use std::io::fs;
 use std::str::FromStr;
+use std::thunk::{Thunk};
 use getopts::{optopt, optflag, reqopt};
 use common::Config;
 use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
@@ -369,16 +370,16 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
     let config = (*config).clone();
     // FIXME (#9639): This needs to handle non-utf8 paths
     let testfile = testfile.as_str().unwrap().to_string();
-    test::DynTestFn(proc() {
+    test::DynTestFn(Thunk::new(move || {
         runtest::run(config, testfile)
-    })
+    }))
 }
 
 pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
     let config = (*config).clone();
     // FIXME (#9639): This needs to handle non-utf8 paths
     let testfile = testfile.as_str().unwrap().to_string();
-    test::DynMetricFn(proc(mm) {
+    test::DynMetricFn(box move |: mm: &mut test::MetricMap| {
         runtest::run_metrics(config, testfile, mm)
     })
 }
index 5c3e5e12adbcbc325db0c88f490b67b56e4bdb16..ea6f180ec39acbff6bcfca3cd8b24bd47d2c3430 100644 (file)
@@ -445,7 +445,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
             loop {
                 //waiting 1 second for gdbserver start
                 timer::sleep(Duration::milliseconds(1000));
-                let result = task::try(proc() {
+                let result = task::try(move || {
                     tcp::TcpStream::connect("127.0.0.1:5039").unwrap();
                 });
                 if result.is_err() {
index c2309ba479ea605dc3373a3456bff698221f1f51..4adca43be18e946baa973d260903aedad5af58a3 100644 (file)
@@ -29,10 +29,11 @@ with a closure argument. `spawn` executes the closure in the new task.
 fn print_message() { println!("I am running in a different task!"); }
 spawn(print_message);
 
-// Alternatively, use a `proc` expression instead of a named function.
-// The `proc` expression evaluates to an (unnamed) proc.
-// That proc will call `println!(...)` when the spawned task runs.
-spawn(proc() println!("I am also running in a different task!") );
+// Alternatively, use a `move ||` expression instead of a named function.
+// `||` expressions evaluate to an unnamed closure. The `move` keyword
+// indicates that the closure should take ownership of any variables it
+// touches.
+spawn(move || println!("I am also running in a different task!"));
 ```
 
 In Rust, a task is not a concept that appears in the language semantics.
@@ -40,11 +41,13 @@ Instead, Rust's type system provides all the tools necessary to implement safe
 concurrency: particularly, ownership. The language leaves the implementation
 details to the standard library.
 
-The `spawn` function has a very simple type signature: `fn spawn(f: proc():
-Send)`. Because it accepts only procs, and procs contain only owned data,
-`spawn` can safely move the entire proc and all its associated state into an
-entirely different task for execution. Like any closure, the function passed to
-`spawn` may capture an environment that it carries across tasks.
+The `spawn` function has the type signature: `fn
+spawn<F:FnOnce()+Send>(f: F)`.  This indicates that it takes as
+argument a closure (of type `F`) that it will run exactly once. This
+closure is limited to capturing `Send`-able data from its environment
+(that is, data which is deeply owned). Limiting the closure to `Send`
+ensures that `spawn` can safely move the entire closure and all its
+associated state into an entirely different task for execution.
 
 ```{rust}
 # use std::task::spawn;
@@ -52,8 +55,11 @@ entirely different task for execution. Like any closure, the function passed to
 // Generate some state locally
 let child_task_number = generate_task_number();
 
-spawn(proc() {
-    // Capture it in the remote task
+spawn(move || {
+    // Capture it in the remote task. The `move` keyword indicates
+    // that this closure should move `child_task_number` into its
+    // environment, rather than capturing a reference into the
+    // enclosing stack frame.
     println!("I am child number {}", child_task_number);
 });
 ```
@@ -74,7 +80,7 @@ example of calculating two results concurrently:
 
 let (tx, rx): (Sender<int>, Receiver<int>) = channel();
 
-spawn(proc() {
+spawn(move || {
     let result = some_expensive_computation();
     tx.send(result);
 });
@@ -102,7 +108,7 @@ task.
 # use std::task::spawn;
 # fn some_expensive_computation() -> int { 42 }
 # let (tx, rx) = channel();
-spawn(proc() {
+spawn(move || {
     let result = some_expensive_computation();
     tx.send(result);
 });
@@ -135,13 +141,13 @@ results across a number of tasks? The following program is ill-typed:
 # fn some_expensive_computation() -> int { 42 }
 let (tx, rx) = channel();
 
-spawn(proc() {
+spawn(move || {
     tx.send(some_expensive_computation());
 });
 
 // ERROR! The previous spawn statement already owns the sender,
 // so the compiler will not allow it to be captured again
-spawn(proc() {
+spawn(move || {
     tx.send(some_expensive_computation());
 });
 ```
@@ -154,7 +160,7 @@ let (tx, rx) = channel();
 for init_val in range(0u, 3) {
     // Create a new channel handle to distribute to the child task
     let child_tx = tx.clone();
-    spawn(proc() {
+    spawn(move || {
         child_tx.send(some_expensive_computation(init_val));
     });
 }
@@ -179,7 +185,7 @@ reference, written with multiple streams, it might look like the example below.
 // Create a vector of ports, one for each child task
 let rxs = Vec::from_fn(3, |init_val| {
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move || {
         tx.send(some_expensive_computation(init_val));
     });
     rx
@@ -207,7 +213,7 @@ fn fib(n: u64) -> u64 {
     12586269025
 }
 
-let mut delayed_fib = Future::spawn(proc() fib(50));
+let mut delayed_fib = Future::spawn(move || fib(50));
 make_a_sandwich();
 println!("fib(50) = {}", delayed_fib.get())
 # }
@@ -236,7 +242,7 @@ fn partial_sum(start: uint) -> f64 {
 }
 
 fn main() {
-    let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) }));
+    let mut futures = Vec::from_fn(200, |ind| Future::spawn(move || partial_sum(ind)));
 
     let mut final_res = 0f64;
     for ft in futures.iter_mut()  {
@@ -278,7 +284,7 @@ fn main() {
     for num in range(1u, 10) {
         let task_numbers = numbers_arc.clone();
 
-        spawn(proc() {
+        spawn(move || {
             println!("{}-norm = {}", num, pnorm(task_numbers.as_slice(), num));
         });
     }
@@ -312,7 +318,7 @@ if it were local.
 # let numbers_arc = Arc::new(numbers);
 # let num = 4;
 let task_numbers = numbers_arc.clone();
-spawn(proc() {
+spawn(move || {
     // Capture task_numbers and use it as if it was the underlying vector
     println!("{}-norm = {}", num, pnorm(task_numbers.as_slice(), num));
 });
@@ -344,7 +350,7 @@ result with an `int` field (representing a successful result) or an `Err` result
 # use std::task;
 # fn some_condition() -> bool { false }
 # fn calculate_result() -> int { 0 }
-let result: Result<int, Box<std::any::Any + Send>> = task::try(proc() {
+let result: Result<int, Box<std::any::Any + Send>> = task::try(move || {
     if some_condition() {
         calculate_result()
     } else {
index f7cf5e5ac0019c9dd6e847625a2d8024b0e92d90..0452ed0bfeb559a209ff696899cda184ad72427c 100644 (file)
 % The Rust Testing Guide
 
-# Quick start
+> Program testing can be a very effective way to show the presence of bugs, but
+> it is hopelessly inadequate for showing their absence. 
+>
+> Edsger W. Dijkstra, "The Humble Programmer" (1972)
 
-To create test functions, add a `#[test]` attribute like this:
+Let's talk about how to test Rust code. What we will not be talking about is
+the right way to test Rust code. There are many schools of thought regarding
+the right and wrong way to write tests. All of these approaches use the same
+basic tools, and so we'll show you the syntax for using them.
 
-~~~test_harness
-fn return_two() -> int {
-    2
-}
+# The `test` attribute
+
+At its simplest, a test in Rust is a function that's annotated with the `test`
+attribute. Let's make a new project with Cargo called `adder`:
+
+```bash
+$ cargo new adder
+$ cd adder
+```
 
+Cargo will automatically generate a simple test when you make a new project.
+Here's the contents of `src/lib.rs`:
+
+```rust
 #[test]
-fn return_two_test() {
-    let x = return_two();
-    assert!(x == 2);
+fn it_works() {
 }
-~~~
+```
+
+Note the `#[test]`. This attribute indicates that this is a test function. It
+currently has no body. That's good enough to pass! We can run the tests with
+`cargo test`:
 
-To run these tests, compile with `rustc --test` and run the resulting
-binary:
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
 
-~~~console
-$ rustc --test foo.rs
-$ ./foo
 running 1 test
-test return_two_test ... ok
+test it_works ... ok
 
 test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
-~~~
 
-`rustc foo.rs` will *not* compile the tests, since `#[test]` implies
-`#[cfg(test)]`. The `--test` flag to `rustc` implies `--cfg test`.
+   Doc-tests adder
 
+running 0 tests
 
-# Unit testing in Rust
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+```
 
-Rust has built in support for simple unit testing. Functions can be
-marked as unit tests using the `test` attribute.
+Cargo compiled and ran our tests. There are two sets of output here: one
+for the test we wrote, and another for documentation tests. We'll talk about
+those later. For now, see this line:
+
+```text
+test it_works ... ok
+```
+
+Note the `it_works`. This comes from the name of our function:
+
+```rust
+fn it_works() {
+# }
+```
 
-~~~test_harness
+We also get a summary line:
+
+```text
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+```
+
+So why does our do-nothing test pass? Any test which doesn't `panic!` passes,
+and any test that does `panic!` fails. Let's make our test fail:
+
+```rust
 #[test]
-fn return_none_if_empty() {
-    // ... test code ...
+fn it_works() {
+    assert!(false);
 }
-~~~
+```
 
-A test function's signature must have no arguments and no return
-value. To run the tests in a crate, it must be compiled with the
-`--test` flag: `rustc myprogram.rs --test -o myprogram-tests`. Running
-the resulting executable will run all the tests in the crate. A test
-is considered successful if its function returns; if the task running
-the test fails, through a call to `panic!`, a failed `assert`, or some
-other (`assert_eq`, ...) means, then the test fails.
+`assert!` is a macro provided by Rust which takes one argument: if the argument
+is `true`, nothing happens. If the argument is false, it `panic!`s. Let's run
+our tests again:
 
-When compiling a crate with the `--test` flag `--cfg test` is also
-implied, so that tests can be conditionally compiled.
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
 
-~~~test_harness
-#[cfg(test)]
-mod tests {
-    #[test]
-    fn return_none_if_empty() {
-      // ... test code ...
-    }
+running 1 test
+test it_works ... FAILED
+
+failures:
+
+---- it_works stdout ----
+        task 'it_works' panicked at 'assertion failed: false', /home/steve/tmp/adder/src/lib.rs:3
+
+
+
+failures:
+    it_works
+
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
+
+task '<main>' panicked at 'Some tests failed', /home/steve/src/rust/src/libtest/lib.rs:247
+```
+
+Rust indicates that our test failed:
+
+```text
+test it_works ... FAILED
+```
+
+And that's reflected in the summary line:
+
+```text
+test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
+```
+
+We also get a non-zero status code:
+
+```bash
+$ echo $?
+101
+```
+
+This is useful if you want to integrate `cargo test` into other tooling.
+
+We can invert our test's failure with another attribute: `should_fail`:
+
+```rust
+#[test]
+#[should_fail]
+fn it_works() {
+    assert!(false);
 }
-~~~
+```
+
+This test will now succeed if we `panic!` and fail if we complete. Let's try it:
+
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
+
+running 1 test
+test it_works ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+
+   Doc-tests adder
 
-Additionally `#[test]` items behave as if they also have the
-`#[cfg(test)]` attribute, and will not be compiled when the `--test` flag
-is not used.
+running 0 tests
 
-Tests that should not be run can be annotated with the `ignore`
-attribute. The existence of these tests will be noted in the test
-runner output, but the test will not be run. Tests can also be ignored
-by configuration using the `cfg_attr` attribute so, for example, to ignore a
-test on windows you can write `#[cfg_attr(windows, ignore)]`.
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+```
 
-Tests that are intended to fail can be annotated with the
-`should_fail` attribute. The test will be run, and if it causes its
-task to panic then the test will be counted as successful; otherwise it
-will be counted as a failure. For example:
+Rust provides another macro, `assert_eq!`, that compares two arguments for
+equality:
 
-~~~test_harness
+```rust
 #[test]
 #[should_fail]
-fn test_out_of_bounds_failure() {
-    let v: &[int] = &[];
-    v[0];
+fn it_works() {
+    assert_eq!("Hello", "world");
 }
-~~~
+```
+
+Does this test pass or fail? Because of the `should_fail` attribute, it
+passes:
+
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
+
+running 1 test
+test it_works ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+
+   Doc-tests adder
+
+running 0 tests
 
-`#[should_fail]` tests can be fragile as it's hard to guarantee that the test
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+```
+
+`should_fail` tests can be fragile, as it's hard to guarantee that the test
 didn't fail for an unexpected reason. To help with this, an optional `expected`
 parameter can be added to the `should_fail` attribute. The test harness will
 make sure that the failure message contains the provided text. A safer version
 of the example above would be:
 
-~~~test_harness
+```
 #[test]
-#[should_fail(expected = "index out of bounds")]
-fn test_out_of_bounds_failure() {
-    let v: &[int] = &[];
-    v[0];
+#[should_fail(expected = "assertion failed")]
+fn it_works() {
+    assert_eq!("Hello", "world");
 }
-~~~
+```
 
-A test runner built with the `--test` flag supports a limited set of
-arguments to control which tests are run:
+That's all there is to the basics! Let's write one 'real' test:
 
-- the first free argument passed to a test runner is interpreted as a
-  regular expression
-  ([syntax reference](regex/index.html#syntax))
-  and is used to narrow down the set of tests being run. Note: a plain
-  string is a valid regular expression that matches itself.
-- the `--ignored` flag tells the test runner to run only tests with the
-  `ignore` attribute.
+```{rust,ignore}
+pub fn add_two(a: i32) -> i32 {
+    a + 2
+}
 
-## Parallelism
+#[test]
+fn it_works() {
+    assert_eq!(4, add_two(2));
+}
+```
 
-By default, tests are run in parallel, which can make interpreting
-failure output difficult. In these cases you can set the
-`RUST_TEST_TASKS` environment variable to 1 to make the tests run
-sequentially.
+This is a very common use of `assert_eq!`: call some function with
+some known arguments and compare it to the expected output.
 
-## Examples
+# The `test` module
 
-### Typical test run
+There is one way in which our existing example is not idiomatic: it's
+missing the test module. The idiomatic way of writing our example
+looks like this:
 
-~~~console
-$ mytests
+```{rust,ignore}
+pub fn add_two(a: i32) -> i32 {
+    a + 2
+}
 
-running 30 tests
-running driver::tests::mytest1 ... ok
-running driver::tests::mytest2 ... ignored
-... snip ...
-running driver::tests::mytest30 ... ok
+#[cfg(test)]
+mod tests {
+    use super::add_two;
 
-result: ok. 28 passed; 0 failed; 2 ignored
-~~~
+    #[test]
+    fn it_works() {
+        assert_eq!(4, add_two(2));
+    }
+}
+```
 
-### Test run with failures
+There's a few changes here. The first is the introduction of a `mod tests` with
+a `cfg` attribute. The module allows us to group all of our tests together, and
+to also define helper functions if needed, that don't become a part of the rest
+of our crate. The `cfg` attribute only compiles our test code if we're
+currently trying to run the tests. This can save compile time, and also ensures
+that our tests are entirely left out of a normal build.
 
-~~~console
-$ mytests
+The second change is the `use` declaration. Because we're in an inner module,
+we need to bring our test function into scope. This can be annoying if you have
+a large module, and so this is a common use of the `glob` feature. Let's change
+our `src/lib.rs` to make use of it:
 
-running 30 tests
-running driver::tests::mytest1 ... ok
-running driver::tests::mytest2 ... ignored
-... snip ...
-running driver::tests::mytest30 ... FAILED
+```{rust,ignore}
+#![feature(globs)]
 
-result: FAILED. 27 passed; 1 failed; 2 ignored
-~~~
+pub fn add_two(a: i32) -> i32 {
+    a + 2
+}
 
-### Running ignored tests
+#[cfg(test)]
+mod tests {
+    use super::*;
 
-~~~console
-$ mytests --ignored
+    #[test]
+    fn it_works() {
+        assert_eq!(4, add_two(2));
+    }
+}
+```
 
-running 2 tests
-running driver::tests::mytest2 ... failed
-running driver::tests::mytest10 ... ok
+Note the `feature` attribute, as well as the different `use` line. Now we run
+our tests:
 
-result: FAILED. 1 passed; 1 failed; 0 ignored
-~~~
+```bash
+$ cargo test
+    Updating registry `https://github.com/rust-lang/crates.io-index`
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
 
-### Running a subset of tests
+running 1 test
+test test::it_works ... ok
 
-Using a plain string:
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
-~~~console
-$ mytests mytest23
+   Doc-tests adder
 
-running 1 tests
-running driver::tests::mytest23 ... ok
+running 0 tests
 
-result: ok. 1 passed; 0 failed; 0 ignored
-~~~
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+```
 
-Using some regular expression features:
+It works!
 
-~~~console
-$ mytests 'mytest[145]'
+The current convention is to use the `test` module to hold your "unit"-style
+tests. Anything that just tests one small bit of functionality makes sense to
+go here. But what about "integration"-style tests instead? For that, we have
+the `tests` directory
 
-running 13 tests
-running driver::tests::mytest1 ... ok
-running driver::tests::mytest4 ... ok
-running driver::tests::mytest5 ... ok
-running driver::tests::mytest10 ... ignored
-... snip ...
-running driver::tests::mytest19 ... ok
+# The `tests` directory
 
-result: ok. 13 passed; 0 failed; 1 ignored
-~~~
+To write an integration test, let's make a `tests` directory, and
+put a `tests/lib.rs` file inside, with this as its contents:
 
-# Microbenchmarking
+```{rust,ignore}
+extern crate adder;
 
-The test runner also understands a simple form of benchmark execution.
-Benchmark functions are marked with the `#[bench]` attribute, rather
-than `#[test]`, and have a different form and meaning. They are
-compiled along with `#[test]` functions when a crate is compiled with
-`--test`, but they are not run by default. To run the benchmark
-component of your testsuite, pass `--bench` to the compiled test
-runner.
+#[test]
+fn it_works() {
+    assert_eq(4, adder::add_two(2));
+}   
+```
 
-The type signature of a benchmark function differs from a unit test:
-it takes a mutable reference to type
-`test::Bencher`. Inside the benchmark function, any
-time-variable or "setup" code should execute first, followed by a call
-to `iter` on the benchmark harness, passing a closure that contains
-the portion of the benchmark you wish to actually measure the
-per-iteration speed of.
+This looks similar to our previous tests, but slightly different. We now have
+an `extern crate adder` at the top. This is because the tests in the `tests`
+directory are an entirely separate crate, and so we need to import our library.
+This is also why `tests` is a suitable place to write integration-style tests:
+they use the library like any other consumer of it would.
 
-For benchmarks relating to processing/generating data, one can set the
-`bytes` field to the number of bytes consumed/produced in each
-iteration; this will be used to show the throughput of the benchmark.
-This must be the amount used in each iteration, *not* the total
-amount.
+Let's run them:
 
-For example:
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/you/projects/adder)
+     Running target/adder-91b3e234d4ed382a
 
-~~~test_harness
-extern crate test;
+running 1 test
+test test::it_works ... ok
 
-use test::Bencher;
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
 
-#[bench]
-fn bench_sum_1024_ints(b: &mut Bencher) {
-    let v = Vec::from_fn(1024, |n| n);
-    b.iter(|| v.iter().fold(0, |old, new| old + *new));
+     Running target/lib-c18e7d3494509e74
+
+running 1 test
+test it_works ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+
+   Doc-tests adder
+
+running 0 tests
+
+test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
+```
+
+Now we have three sections: our previous test is also run, as well as our new
+one.
+
+That's all there is to the `tests` directory. The `test` module isn't needed
+here, since the whole thing is focused on tests.
+
+Let's finally check out that third section: documentation tests.
+
+# Documentation tests
+
+Nothing is better than documentation with examples. Nothing is worse than
+examples that don't actually work, because the code has changed since the
+documentation has been written. To this end, Rust supports automaticaly
+running examples in your documentation. Here's a fleshed-out `src/lib.rs`
+with examples:
+
+```{rust,ignore}
+//! The `adder` crate provides functions that add numbers to other numbers.
+//!
+//! # Examples
+//!
+//! ```
+//! assert_eq!(4, adder::add_two(2));
+//! ```
+
+#![feature(globs)]
+
+/// This function adds two to its argument.
+///
+/// # Examples
+///
+/// ```
+/// use adder::add_two;
+///
+/// assert_eq!(4, add_two(2));
+/// ```
+pub fn add_two(a: i32) -> i32 {
+    a + 2
 }
 
-#[bench]
-fn initialise_a_vector(b: &mut Bencher) {
-    b.iter(|| Vec::from_elem(1024, 0u64));
-    b.bytes = 1024 * 8;
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn it_works() {
+        assert_eq!(4, add_two(2));
+    }
 }
-~~~
+```
 
-The benchmark runner will calibrate measurement of the benchmark
-function to run the `iter` block "enough" times to get a reliable
-measure of the per-iteration speed.
+Note the module-level documentation with `//!` and the function-level
+documentation with `///`. Rust's documentation supports Markdown in comments,
+and so triple graves mark code blocks. It is conventional to include the
+`# Examples` section, exactly like that, with examples following.
 
-Advice on writing benchmarks:
+Let's run the tests again:
 
-  - Move setup code outside the `iter` loop; only put the part you
-    want to measure inside
-  - Make the code do "the same thing" on each iteration; do not
-    accumulate or change state
-  - Make the outer function idempotent too; the benchmark runner is
-    likely to run it many times
-  - Make the inner `iter` loop short and fast so benchmark runs are
-    fast and the calibrator can adjust the run-length at fine
-    resolution
-  - Make the code in the `iter` loop do something simple, to assist in
-    pinpointing performance improvements (or regressions)
-
-To run benchmarks, pass the `--bench` flag to the compiled
-test-runner. Benchmarks are compiled-in but not executed by default.
-
-~~~console
-$ rustc mytests.rs -O --test
-$ mytests --bench
+```bash
+$ cargo test
+   Compiling adder v0.0.1 (file:///home/steve/tmp/adder)
+     Running target/adder-91b3e234d4ed382a
+
+running 1 test
+test test::it_works ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+
+     Running target/lib-c18e7d3494509e74
+
+running 1 test
+test it_works ... ok
+
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+
+   Doc-tests adder
 
 running 2 tests
-test bench_sum_1024_ints ... bench: 709 ns/iter (+/- 82)
-test initialise_a_vector ... bench: 424 ns/iter (+/- 99) = 19320 MB/s
+test add_two_0 ... ok
+test _0 ... ok
+
+test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
+```
+
+Now we have all three kinds of tests running! Note the names of the
+documentation tests: the `_0` is generated for the module test, and `add_two_0`
+for the function test. These will auto increment with names like `add_two_1` as
+you add more examples.
+
+# Benchmark tests
+
+Rust also supports benchmark tests, which can test the performance of your
+code. Let's make our `src/lib.rs` look like this (comments elided):
+
+```{rust,ignore}
+#![feature(globs)]
+
+extern crate test;
+
+pub fn add_two(a: i32) -> i32 {
+    a + 2
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use test::Bencher;
+
+    #[test]
+    fn it_works() {
+        assert_eq!(4, add_two(2));
+    }
+
+    #[bench]
+    fn bench_add_two(b: &mut Bencher) {
+        b.iter(|| add_two(2));
+    }
+}
+```
+
+We've imported the `test` crate, which contains our benchmarking support.
+We have a new function as well, with the `bench` attribute. Unlike regular
+tests, which take no arguments, benchmark tests take a `&mut Bencher`. This
+`Bencher` provides an `iter` method, which takes a closure. This closure
+contains the code we'd like to benchmark.
+
+We can run benchmark tests with `cargo bench`:
+
+```bash
+$ cargo bench
+   Compiling adder v0.0.1 (file:///home/steve/tmp/adder)
+     Running target/release/adder-91b3e234d4ed382a
+
+running 2 tests
+test tests::it_works ... ignored
+test tests::bench_add_two ... bench:         1 ns/iter (+/- 0)
+
+test result: ok. 0 passed; 0 failed; 1 ignored; 1 measured
+```
+
+Our non-benchmark test was ignored. You may have noticed that `cargo bench`
+takes a bit longer than `cargo test`. This is because Rust runs our benchmark
+a number of times, and then takes the average. Because we're doing so little
+work in this example, we have a `1 ns/iter (+/- 0)`, but this would show
+the variance if there was one.
+
+Advice on writing benchmarks:
 
-test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured
-~~~
 
-## Benchmarks and the optimizer
+* Move setup code outside the `iter` loop; only put the part you want to measure inside
+* Make the code do "the same thing" on each iteration; do not accumulate or change state
+* Make the outer function idempotent too; the benchmark runner is likely to run
+  it many times
+*  Make the inner `iter` loop short and fast so benchmark runs are fast and the
+   calibrator can adjust the run-length at fine resolution
+* Make the code in the `iter` loop do something simple, to assist in pinpointing
+  performance improvements (or regressions)
 
-Benchmarks compiled with optimizations activated can be dramatically
-changed by the optimizer so that the benchmark is no longer
-benchmarking what one expects. For example, the compiler might
-recognize that some calculation has no external effects and remove
-it entirely.
+There's another tricky part to writing benchmarks: benchmarks compiled with
+optimizations activated can be dramatically changed by the optimizer so that
+the benchmark is no longer benchmarking what one expects. For example, the
+compiler might recognize that some calculation has no external effects and
+remove it entirely.
 
-~~~test_harness
+```{rust,ignore}
 extern crate test;
 use test::Bencher;
 
@@ -287,36 +519,36 @@ fn bench_xor_1000_ints(b: &mut Bencher) {
         range(0u, 1000).fold(0, |old, new| old ^ new);
     });
 }
-~~~
+```
 
 gives the following results
 
-~~~console
+```text
 running 1 test
 test bench_xor_1000_ints ... bench:         0 ns/iter (+/- 0)
 
 test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
-~~~
+```
 
-The benchmarking runner offers two ways to avoid this. Either, the
-closure that the `iter` method receives can return an arbitrary value
-which forces the optimizer to consider the result used and ensures it
-cannot remove the computation entirely. This could be done for the
-example above by adjusting the `b.iter` call to
+The benchmarking runner offers two ways to avoid this. Either, the closure that
+the `iter` method receives can return an arbitrary value which forces the
+optimizer to consider the result used and ensures it cannot remove the
+computation entirely. This could be done for the example above by adjusting the
+`b.iter` call to
 
-~~~
+```rust
 # struct X; impl X { fn iter<T>(&self, _: || -> T) {} } let b = X;
 b.iter(|| {
     // note lack of `;` (could also use an explicit `return`).
     range(0u, 1000).fold(0, |old, new| old ^ new)
 });
-~~~
+```
 
-Or, the other option is to call the generic `test::black_box`
-function, which is an opaque "black box" to the optimizer and so
-forces it to consider any argument as used.
+Or, the other option is to call the generic `test::black_box` function, which
+is an opaque "black box" to the optimizer and so forces it to consider any
+argument as used.
 
-~~~
+```rust
 extern crate test;
 
 # fn main() {
@@ -325,54 +557,17 @@ b.iter(|| {
     test::black_box(range(0u, 1000).fold(0, |old, new| old ^ new));
 });
 # }
-~~~
+```
 
-Neither of these read or modify the value, and are very cheap for
-small values. Larger values can be passed indirectly to reduce
-overhead (e.g. `black_box(&huge_struct)`).
+Neither of these read or modify the value, and are very cheap for small values.
+Larger values can be passed indirectly to reduce overhead (e.g.
+`black_box(&huge_struct)`).
 
-Performing either of the above changes gives the following
-benchmarking results
+Performing either of the above changes gives the following benchmarking results
 
-~~~console
+```text
 running 1 test
-test bench_xor_1000_ints ... bench:       375 ns/iter (+/- 148)
+test bench_xor_1000_ints ... bench:       1 ns/iter (+/- 0)
 
 test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured
-~~~
-
-However, the optimizer can still modify a testcase in an undesirable
-manner even when using either of the above. Benchmarks can be checked
-by hand by looking at the output of the compiler using the `--emit=ir`
-(for LLVM IR), `--emit=asm` (for assembly) or compiling normally and
-using any method for examining object code.
-
-## Saving and ratcheting metrics
-
-When running benchmarks or other tests, the test runner can record
-per-test "metrics". Each metric is a scalar `f64` value, plus a noise
-value which represents uncertainty in the measurement. By default, all
-`#[bench]` benchmarks are recorded as metrics, which can be saved as
-JSON in an external file for further reporting.
-
-In addition, the test runner supports _ratcheting_ against a metrics
-file. Ratcheting is like saving metrics, except that after each run,
-if the output file already exists the results of the current run are
-compared against the contents of the existing file, and any regression
-_causes the testsuite to fail_. If the comparison passes -- if all
-metrics stayed the same (within noise) or improved -- then the metrics
-file is overwritten with the new values. In this way, a metrics file
-in your workspace can be used to ensure your work does not regress
-performance.
-
-Test runners take 3 options that are relevant to metrics:
-
-  - `--save-metrics=<file.json>` will save the metrics from a test run
-    to `file.json`
-  - `--ratchet-metrics=<file.json>` will ratchet the metrics against
-    the `file.json`
-  - `--ratchet-noise-percent=N` will override the noise measurements
-    in `file.json`, and consider a metric change less than `N%` to be
-    noise. This can be helpful if you are testing in a noisy
-    environment where the benchmark calibration loop cannot acquire a
-    clear enough signal.
+```
index 985a9eb5816667337858f4378429fdf55e9b5588..a6bec84a60666885cacb2e71de0f0dc62e4d19fe 100644 (file)
@@ -4235,36 +4235,16 @@ fn main() {
 }
 ```
 
-## Procs
+## Moving closures
 
-Rust has a second type of closure, called a **proc**. Procs are created
-with the `proc` keyword:
-
-```{rust}
-let x = 5i;
-
-let p = proc() { x * x };
-println!("{}", p()); // prints 25
-```
-
-There is a big difference between procs and closures: procs may only be called once. This
-will error when we try to compile:
-
-```{rust,ignore}
-let x = 5i;
-
-let p = proc() { x * x };
-println!("{}", p());
-println!("{}", p()); // error: use of moved value `p`
-```
-
-This restriction is important. Procs are allowed to consume values that they
-capture, and thus have to be restricted to being called once for soundness
-reasons: any value consumed would be invalid on a second call.
-
-Procs are most useful with Rust's concurrency features, and so we'll just leave
-it at this for now. We'll talk about them more in the "Tasks" section of the
-guide.
+Rust has a second type of closure, called a **moving closure**. Moving
+closures are indicated using the `move` keyword (e.g., `move || x *
+x`). The difference between a moving closure and an ordinary closure
+is that a moving closure always takes ownership of all variables that
+it uses. Ordinary closures, in contrast, just create a reference into
+the enclosing stack frame. Moving closures are most useful with Rust's
+concurrency features, and so we'll just leave it at this for
+now. We'll talk about them more in the "Tasks" section of the guide.
 
 ## Accepting closures as arguments
 
@@ -5231,28 +5211,30 @@ concurrency libraries can be written for Rust to help in specific scenarios.
 Here's an example of creating a task:
 
 ```{rust}
-spawn(proc() {
+spawn(move || {
     println!("Hello from a task!");
 });
 ```
 
-The `spawn` function takes a proc as an argument, and runs that proc in a new
-task. A proc takes ownership of its entire environment, and so any variables
-that you use inside the proc will not be usable afterward:
+The `spawn` function takes a closure as an argument, and runs that
+closure in a new task. Typically, you will want to use a moving
+closure, so that the closure takes ownership of any variables that it
+touches.  This implies that those variables are not usable from the
+parent task after the child task is spawned:
 
 ```{rust,ignore}
 let mut x = vec![1i, 2i, 3i];
 
-spawn(proc() {
+spawn(move || {
     println!("The value of x[0] is: {}", x[0]);
 });
 
 println!("The value of x[0] is: {}", x[0]); // error: use of moved value: `x`
 ```
 
-`x` is now owned by the proc, and so we can't use it anymore. Many other
-languages would let us do this, but it's not safe to do so. Rust's borrow
-checker catches the error.
+`x` is now owned by the closure, and so we can't use it anymore. Many
+other languages would let us do this, but it's not safe to do
+so. Rust's borrow checker catches the error.
 
 If tasks were only able to capture these values, they wouldn't be very useful.
 Luckily, tasks can communicate with each other through **channel**s. Channels
@@ -5261,7 +5243,7 @@ work like this:
 ```{rust}
 let (tx, rx) = channel();
 
-spawn(proc() {
+spawn(move || {
     tx.send("Hello from a task!".to_string());
 });
 
@@ -5281,7 +5263,7 @@ If you want to send messages to the task as well, create two channels!
 let (tx1, rx1) = channel();
 let (tx2, rx2) = channel();
 
-spawn(proc() {
+spawn(move || {
     tx1.send("Hello from a task!".to_string());
     let message = rx2.recv();
     println!("{}", message);
@@ -5293,8 +5275,9 @@ println!("{}", message);
 tx2.send("Goodbye from main!".to_string());
 ```
 
-The proc has one sending end and one receiving end, and the main task has one
-of each as well. Now they can talk back and forth in whatever way they wish.
+The closure has one sending end and one receiving end, and the main
+task has one of each as well. Now they can talk back and forth in
+whatever way they wish.
 
 Notice as well that because `Sender` and `Receiver` are generic, while you can
 pass any kind of information through the channel, the ends are strongly typed.
@@ -5310,7 +5293,7 @@ a useful thing to use:
 ```{rust}
 use std::sync::Future;
 
-let mut delayed_value = Future::spawn(proc() {
+let mut delayed_value = Future::spawn(move || {
     // just return anything for examples' sake
 
     12345i
@@ -5318,18 +5301,18 @@ let mut delayed_value = Future::spawn(proc() {
 println!("value = {}", delayed_value.get());
 ```
 
-Calling `Future::spawn` works just like `spawn()`: it takes a proc. In this
-case, though, you don't need to mess with the channel: just have the proc
-return the value.
+Calling `Future::spawn` works just like `spawn()`: it takes a
+closure. In this case, though, you don't need to mess with the
+channel: just have the closure return the value.
 
 `Future::spawn` will return a value which we can bind with `let`. It needs
 to be mutable, because once the value is computed, it saves a copy of the
 value, and if it were immutable, it couldn't update itself.
 
-The proc will go on processing in the background, and when we need the final
-value, we can call `get()` on it. This will block until the result is done,
-but if it's finished computing in the background, we'll just get the value
-immediately.
+The future will go on processing in the background, and when we need
+the final value, we can call `get()` on it. This will block until the
+result is done, but if it's finished computing in the background,
+we'll just get the value immediately.
 
 ## Success and failure
 
@@ -5337,7 +5320,7 @@ Tasks don't always succeed, they can also panic. A task that wishes to panic
 can call the `panic!` macro, passing a message:
 
 ```{rust}
-spawn(proc() {
+spawn(move || {
     panic!("Nope.");
 });
 ```
@@ -5349,7 +5332,7 @@ notify other tasks that it has panicked. We can do this with `task::try`:
 use std::task;
 use std::rand;
 
-let result = task::try(proc() {
+let result = task::try(move || {
     if rand::random() {
         println!("OK");
     } else {
index 06b4de34dce8dbe01b3a838424758e78014744ea..1c6f5b6c6f8489c823af23289ceb11722f96e4ab 100644 (file)
@@ -391,26 +391,29 @@ Here's an example of a concurrent Rust program:
 ```{rust}
 fn main() {
     for _ in range(0u, 10u) {
-        spawn(proc() {
+        spawn(move || {
             println!("Hello, world!");
         });
     }
 }
 ```
 
-This program creates ten threads, who all print `Hello, world!`. The `spawn`
-function takes one argument, a `proc`. 'proc' is short for 'procedure,' and is
-a form of closure. This closure is executed in a new thread, created by `spawn`
-itself.
-
-One common form of problem in concurrent programs is a 'data race.' This occurs
-when two different threads attempt to access the same location in memory in a
-non-synchronized way, where at least one of them is a write. If one thread is
-attempting to read, and one thread is attempting to write, you cannot be sure
-that your data will not be corrupted. Note the first half of that requirement:
-two threads that attempt to access the same location in memory. Rust's
-ownership model can track which pointers own which memory locations, which
-solves this problem.
+This program creates ten threads, who all print `Hello, world!`. The
+`spawn` function takes one argument, a closure, indicated by the
+double bars `||`. (The `move` keyword indicates that the closure takes
+ownership of any data it uses; we'll have more on the significance of
+this shortly.) This closure is executed in a new thread created by
+`spawn`.
+
+One common form of problem in concurrent programs is a 'data race.'
+This occurs when two different threads attempt to access the same
+location in memory in a non-synchronized way, where at least one of
+them is a write. If one thread is attempting to read, and one thread
+is attempting to write, you cannot be sure that your data will not be
+corrupted. Note the first half of that requirement: two threads that
+attempt to access the same location in memory. Rust's ownership model
+can track which pointers own which memory locations, which solves this
+problem.
 
 Let's see an example. This Rust code will not compile:
 
@@ -419,7 +422,7 @@ fn main() {
     let mut numbers = vec![1i, 2i, 3i];
 
     for i in range(0u, 3u) {
-        spawn(proc() {
+        spawn(move || {
             for j in range(0, 3) { numbers[j] += 1 }
         });
     }
@@ -432,8 +435,8 @@ It gives us this error:
 6:71 error: capture of moved value: `numbers`
     for j in range(0, 3) { numbers[j] += 1 }
                ^~~~~~~
-7:50 note: `numbers` moved into closure environment here because it has type `proc():Send`, which is non-copyable (perhaps you meant to use clone()?)
-    spawn(proc() {
+7:50 note: `numbers` moved into closure environment here
+    spawn(move || {
         for j in range(0, 3) { numbers[j] += 1 }
     });
 6:79 error: cannot assign to immutable dereference (dereference is implicit, due to indexing)
@@ -441,11 +444,16 @@ It gives us this error:
                            ^~~~~~~~~~~~~~~
 ```
 
-It mentions that "numbers moved into closure environment". Because we referred
-to `numbers` inside of our `proc`, and we create three `proc`s, we would have
-three references. Rust detects this and gives us the error: we claim that
-`numbers` has ownership, but our code tries to make three owners. This may
-cause a safety problem, so Rust disallows it.
+It mentions that "numbers moved into closure environment". Because we
+declared the closure as a moving closure, and it referred to
+`numbers`, the closure will try to take ownership of the vector. But
+the closure itself is created in a loop, and hence we will actually
+create three closures, one for every iteration of the loop. This means
+that all three of those closures would try to own `numbers`, which is
+impossible -- `numbers` must have just one owner. Rust detects this
+and gives us the error: we claim that `numbers` has ownership, but our
+code tries to make three owners. This may cause a safety problem, so
+Rust disallows it.
 
 What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
 "Arc" stands for "atomically reference counted." In other words, an Arc will
@@ -468,7 +476,7 @@ fn main() {
 
     for i in range(0u, 3u) {
         let number = numbers.clone();
-        spawn(proc() {
+        spawn(move || {
             let mut array = number.lock();
 
             (*array)[i] += 1;
@@ -528,7 +536,7 @@ fn main() {
     let vec = vec![1i, 2, 3];
 
     for i in range(1u, 3) {
-        spawn(proc() {
+        spawn(move || {
             println!("{}", vec[i]);
         });
     }
index 1726afa51e47917fff08741efe72607374ce840e..80f8b748814cb3955c7449862bd62e15deade9b1 100644 (file)
@@ -26,4 +26,3 @@
 [type: text] src/doc/intro.md $lang:doc/l10n/$lang/intro.md
 [type: text] src/doc/rust.md $lang:doc/l10n/$lang/rust.md
 [type: text] src/doc/rustdoc.md $lang:doc/l10n/$lang/rustdoc.md
-[type: text] src/doc/guide.md $lang:doc/l10n/$lang/guide.md
index 660a97cd55f3343465abd15aaf77fc99ef7a6dac..c24cd6d8bf3911f9a1d5bc4527a67f27fd88910c 100644 (file)
@@ -187,19 +187,18 @@ grammar as double-quoted strings. Other tokens have exact rules given.
 
 <p id="keyword-table-marker"></p>
 
-|          |          |          |          |        |
-|----------|----------|----------|----------|--------|
-| abstract | alignof  | as       | be       | box    |
-| break    | const    | continue | crate    | do     |
-| else     | enum     | extern   | false    | final  |
-| fn       | for      | if       | impl     | in     |
-| let      | loop     | match    | mod      | move   |
-| mut      | offsetof | once     | override | priv   |
-| proc     | pub      | pure     | ref      | return |
-| sizeof   | static   | self     | struct   | super  |
-| true     | trait    | type     | typeof   | unsafe |
-| unsized  | use      | virtual  | where    | while  |
-| yield    |          |          |          |        |
+|          |          |          |          |         |
+|----------|----------|----------|----------|---------|
+| abstract | alignof  | as       | be       | box     |
+| break    | const    | continue | crate    | do      |
+| else     | enum     | extern   | false    | final   |
+| fn       | for      | if       | impl     | in      |
+| let      | loop     | match    | mod      | move    |
+| mut      | offsetof | once     | override | priv    |
+| pub      | pure     | ref      | return   | sizeof  |
+| static   | self     | struct   | super    | true    |
+| trait    | type     | typeof   | unsafe   | unsized |
+| use      | virtual  | where    | while    | yield   |
 
 
 Each of these keywords has special meaning in its grammar, and all of them are
@@ -3145,8 +3144,8 @@ as
 ```
 
 Operators at the same precedence level are evaluated left-to-right. [Unary
-operators](#unary-operator-expressions) have the same precedence level and it
-is stronger than any of the binary operators'.
+operators](#unary-operator-expressions) have the same precedence level and are
+stronger than any of the binary operators.
 
 ### Grouped expressions
 
@@ -3842,8 +3841,6 @@ x = bo(5,7);
 ```{.ebnf .notation}
 closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
                 [ ':' bound-list ] [ '->' type ]
-procedure_type := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
-                  [ ':' bound-list ] [ '->' type ]
 lifetime-list := lifetime | lifetime ',' lifetime-list
 arg-list := ident ':' type | ident ':' type ',' arg-list
 bound-list := bound | bound '+' bound-list
@@ -3852,8 +3849,6 @@ bound := path | lifetime
 
 The type of a closure mapping an input of type `A` to an output of type `B` is
 `|A| -> B`. A closure with no arguments or return values has type `||`.
-Similarly, a procedure mapping `A` to `B` is `proc(A) -> B` and a no-argument
-and no-return value closure has type `proc()`.
 
 An example of creating and calling a closure:
 
@@ -3876,30 +3871,6 @@ call_closure(closure_no_args, closure_args);
 
 ```
 
-Unlike closures, procedures may only be invoked once, but own their
-environment, and are allowed to move out of their environment. Procedures are
-allocated on the heap (unlike closures). An example of creating and calling a
-procedure:
-
-```rust
-let string = "Hello".to_string();
-
-// Creates a new procedure, passing it to the `spawn` function.
-spawn(proc() {
-  println!("{} world!", string);
-});
-
-// the variable `string` has been moved into the previous procedure, so it is
-// no longer usable.
-
-
-// Create an invoke a procedure. Note that the procedure is *moved* when
-// invoked, so it cannot be invoked again.
-let f = proc(n: int) { n + 22 };
-println!("answer: {}", f(20));
-
-```
-
 ### Object types
 
 Every trait item (see [traits](#traits)) defines a type with the same name as
index 05475c605ea7214a11eb9901c3b65f1d40264136..054552559dbec077fb5a1fd4533b3f0d40b83efb 100644 (file)
@@ -210,11 +210,11 @@ that one can still write things like `#[deriving(Eq)]`).
 # // what's actually being documented.
 # fn fib(n: int) { n + 2 }
 
-spawn(proc() { fib(200); })
+spawn(move || { fib(200); })
 ```
 ~~~
 
-The documentation online would look like `spawn(proc() { fib(200); })`, but when
+The documentation online would look like `spawn(move || { fib(200); })`, but when
 testing this code, the `fib` function will be included (so it can compile).
 
 ## Running tests (advanced)
index 0d0e4b35a0b36f9caf3c92b4b99a0f3d5ea7f02a..6917e9ee354eef895cb04b503371258f8b7daf2d 100644 (file)
     "if" "impl" "in"
     "let" "loop"
     "match" "mod" "move" "mut"
-    "priv" "proc" "pub"
+    "priv" "pub"
     "ref" "return"
     "self" "static" "struct" "super"
     "true" "trait" "type"
index c57a7ab6c7059d98048203d6b9d9dda5ad0e9f78..43df6256e0b7ec8ca61b4830f3f38ed3044b87ca 100644 (file)
@@ -23,7 +23,7 @@ DisableStartupPrompt=true
 OutputDir=.\dist\
 SourceDir=.\
 OutputBaseFilename={#CFG_PACKAGE_NAME}-{#CFG_BUILD}
-DefaultDirName={pf32}\Rust
+DefaultDirName={sd}\Rust
 
 Compression=lzma2/ultra
 InternalCompressLevel=ultra
@@ -49,7 +49,7 @@ Source: "tmp/dist/win/gcc/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesu
 [Code]
 const
        ModPathName = 'modifypath';
-       ModPathType = 'system';
+       ModPathType = 'user';
 
 function ModPathDir(): TArrayOfString;
 begin
index 20edf9418f1486c7cdd871da888cbb1ed753b716..257cd80258246ef536c1195f155ea2184eed3f6a 100755 (executable)
@@ -283,11 +283,7 @@ def load_east_asian_width(want_widths, except_cats):
     return widths
 
 def escape_char(c):
-    if c <= 0x7f:
-        return "'\\x%2.2x'" % c
-    if c <= 0xffff:
-        return "'\\u%4.4x'" % c
-    return "'\\U%8.8x'" % c
+    return "'\\u{%x}'" % c
 
 def emit_bsearch_range_table(f):
     f.write("""
@@ -352,7 +348,6 @@ def emit_conversions_module(f, lowerupper, upperlower):
     f.write("""
     use core::cmp::Ordering::{Equal, Less, Greater};
     use core::slice::SlicePrelude;
-    use core::tuple::Tuple2;
     use core::option::Option;
     use core::option::Option::{Some, None};
     use core::slice;
@@ -360,14 +355,14 @@ def emit_conversions_module(f, lowerupper, upperlower):
     pub fn to_lower(c: char) -> char {
         match bsearch_case_table(c, LuLl_table) {
           None        => c,
-          Some(index) => LuLl_table[index].val1()
+          Some(index) => LuLl_table[index].1
         }
     }
 
     pub fn to_upper(c: char) -> char {
         match bsearch_case_table(c, LlLu_table) {
             None        => c,
-            Some(index) => LlLu_table[index].val1()
+            Some(index) => LlLu_table[index].1
         }
     }
 
@@ -377,8 +372,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
             else if key < c { Less }
             else { Greater }
         }) {
-            slice::Found(i) => Some(i),
-            slice::NotFound(_) => None,
+            slice::BinarySearchResult::Found(i) => Some(i),
+            slice::BinarySearchResult::NotFound(_) => None,
         }
     }
 
@@ -392,6 +387,7 @@ def emit_conversions_module(f, lowerupper, upperlower):
 def emit_grapheme_module(f, grapheme_table, grapheme_cats):
     f.write("""pub mod grapheme {
     use core::slice::SlicePrelude;
+    use core::kinds::Copy;
     pub use self::GraphemeCat::*;
     use core::slice;
 
@@ -403,6 +399,8 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
         f.write("        GC_" + cat + ",\n")
     f.write("""    }
 
+    impl Copy for GraphemeCat {}
+
     fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
         use core::cmp::Ordering::{Equal, Less, Greater};
         match r.binary_search(|&(lo, hi, _)| {
@@ -410,11 +408,11 @@ def emit_grapheme_module(f, grapheme_table, grapheme_cats):
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, cat) = r[idx];
                 cat
             }
-            slice::NotFound(_) => GC_Any
+            slice::BinarySearchResult::NotFound(_) => GC_Any
         }
     }
 
@@ -443,11 +441,11 @@ def emit_charwidth_module(f, width_table):
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, r_ncjk, r_cjk) = r[idx];
                 if is_cjk { r_cjk } else { r_ncjk }
             }
-            slice::NotFound(_) => 1
+            slice::BinarySearchResult::NotFound(_) => 1
         }
     }
 """)
@@ -540,11 +538,11 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
             else if hi < c { Less }
             else { Greater }
         }) {
-            slice::Found(idx) => {
+            slice::BinarySearchResult::Found(idx) => {
                 let (_, _, result) = r[idx];
                 result
             }
-            slice::NotFound(_) => 0
+            slice::BinarySearchResult::NotFound(_) => 0
         }
     }\n
 """)
@@ -613,7 +611,7 @@ if __name__ == "__main__":
             unicode_version = re.search(pattern, readme.read()).groups()
         rf.write("""
 /// The version of [Unicode](http://www.unicode.org/)
-/// that the `UnicodeChar` and `UnicodeStrSlice` traits are based on.
+/// that the `UnicodeChar` and `UnicodeStrPrelude` traits are based on.
 pub const UNICODE_VERSION: (uint, uint, uint) = (%s, %s, %s);
 """ % unicode_version)
         (canon_decomp, compat_decomp, gencats, combines,
index 0c7dcb8be7b02eddabdd78504aef7cfce451ba85..3bd2051c617ebf3330ded39b8fc162e47ac8cb82 100644 (file)
@@ -24,7 +24,7 @@ syn keyword   rustKeyword     continue
 syn keyword   rustKeyword     extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
 syn keyword   rustKeyword     fn nextgroup=rustFuncName skipwhite skipempty
 syn keyword   rustKeyword     for in if impl let
-syn keyword   rustKeyword     loop once proc pub
+syn keyword   rustKeyword     loop once pub
 syn keyword   rustKeyword     return super
 syn keyword   rustKeyword     unsafe virtual where while
 syn keyword   rustKeyword     use nextgroup=rustModPath skipwhite skipempty
index 1d2157b7e2fa3594ed8f36b7a36f9a11169bfadb..1f1909fd33cc18add67dbce919ffd70dac1679b8 100644 (file)
@@ -46,7 +46,7 @@
 ///     for _ in range(0u, 10) {
 ///         let child_numbers = shared_numbers.clone();
 ///
-///         spawn(proc() {
+///         spawn(move || {
 ///             let local_numbers = child_numbers.as_slice();
 ///
 ///             // Work with the local numbers
@@ -358,7 +358,7 @@ fn manually_share_arc() {
 
         let (tx, rx) = channel();
 
-        task::spawn(proc() {
+        task::spawn(move || {
             let arc_v: Arc<Vec<int>> = rx.recv();
             assert_eq!((*arc_v)[3], 4);
         });
index 95c4dff323ef0635d713e7be853dda967e345086..1f4df1fd0a5a28e1199ac28ca10c0ec90bc39433 100644 (file)
@@ -28,6 +28,7 @@
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
 #![feature(unsafe_destructor)]
+#![feature(unboxed_closures)]
 #![allow(missing_docs)]
 
 extern crate alloc;
@@ -209,7 +210,7 @@ fn alloc_copy_inner(&self, n_bytes: uint, align: uint) -> *const u8 {
     }
 
     #[inline]
-    fn alloc_copy<T>(&self, op: || -> T) -> &mut T {
+    fn alloc_copy<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
         unsafe {
             let ptr = self.alloc_copy_inner(mem::size_of::<T>(),
                                             mem::min_align_of::<T>());
@@ -263,7 +264,7 @@ fn alloc_noncopy_inner(&self, n_bytes: uint,
     }
 
     #[inline]
-    fn alloc_noncopy<T>(&self, op: || -> T) -> &mut T {
+    fn alloc_noncopy<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
         unsafe {
             let tydesc = get_tydesc::<T>();
             let (ty_ptr, ptr) =
@@ -287,7 +288,7 @@ fn alloc_noncopy<T>(&self, op: || -> T) -> &mut T {
     /// Allocates a new item in the arena, using `op` to initialize the value,
     /// and returns a reference to it.
     #[inline]
-    pub fn alloc<T>(&self, op: || -> T) -> &mut T {
+    pub fn alloc<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
         unsafe {
             if intrinsics::needs_drop::<T>() {
                 self.alloc_noncopy(op)
@@ -339,7 +340,7 @@ fn test_arena_destructors_fail() {
         arena.alloc(|| { [0u8, 1u8, 2u8] });
     }
     // Now, panic while allocating
-    arena.alloc::<Rc<int>>(|| {
+    arena.alloc::<Rc<int>, _>(|| {
         panic!();
     });
 }
index a212f22f899290bd0643994f7e4a88b7a0f0485b..3346e55158a2a178b3db99b6387de9563333a84d 100644 (file)
 use std::rand::Rng;
 use test::Bencher;
 
-pub fn insert_rand_n<M>(n: uint, map: &mut M, b: &mut Bencher,
-                        insert: |&mut M, uint|,
-                        remove: |&mut M, uint|) {
+pub fn insert_rand_n<M, I, R>(n: uint,
+                              map: &mut M,
+                              b: &mut Bencher,
+                              mut insert: I,
+                              mut remove: R) where
+    I: FnMut(&mut M, uint),
+    R: FnMut(&mut M, uint),
+{
     // setup
     let mut rng = rand::weak_rng();
 
@@ -31,9 +36,14 @@ pub fn insert_rand_n<M>(n: uint, map: &mut M, b: &mut Bencher,
     })
 }
 
-pub fn insert_seq_n<M>(n: uint, map: &mut M, b: &mut Bencher,
-                       insert: |&mut M, uint|,
-                       remove: |&mut M, uint|) {
+pub fn insert_seq_n<M, I, R>(n: uint,
+                             map: &mut M,
+                             b: &mut Bencher,
+                             mut insert: I,
+                             mut remove: R) where
+    I: FnMut(&mut M, uint),
+    R: FnMut(&mut M, uint),
+{
     // setup
     for i in range(0u, n) {
         insert(map, i * 2);
@@ -48,9 +58,14 @@ pub fn insert_seq_n<M>(n: uint, map: &mut M, b: &mut Bencher,
     })
 }
 
-pub fn find_rand_n<M, T>(n: uint, map: &mut M, b: &mut Bencher,
-                         insert: |&mut M, uint|,
-                         find: |&M, uint| -> T) {
+pub fn find_rand_n<M, T, I, F>(n: uint,
+                               map: &mut M,
+                               b: &mut Bencher,
+                               mut insert: I,
+                               mut find: F) where
+    I: FnMut(&mut M, uint),
+    F: FnMut(&M, uint) -> T,
+{
     // setup
     let mut rng = rand::weak_rng();
     let mut keys = Vec::from_fn(n, |_| rng.gen::<uint>() % n);
@@ -70,9 +85,14 @@ pub fn find_rand_n<M, T>(n: uint, map: &mut M, b: &mut Bencher,
     })
 }
 
-pub fn find_seq_n<M, T>(n: uint, map: &mut M, b: &mut Bencher,
-                        insert: |&mut M, uint|,
-                        find: |&M, uint| -> T) {
+pub fn find_seq_n<M, T, I, F>(n: uint,
+                              map: &mut M,
+                              b: &mut Bencher,
+                              mut insert: I,
+                              mut find: F) where
+    I: FnMut(&mut M, uint),
+    F: FnMut(&M, uint) -> T,
+{
     // setup
     for i in range(0u, n) {
         insert(map, i);
index b401978c9c9cd1bd25fae1949e50e89b55561f06..a0c4f6e7ee8c7f68629eabf901facffa3a17e7c6 100644 (file)
@@ -174,7 +174,7 @@ fn next<'a>(&'a mut self) -> Option<(uint, u32)> {
 
 impl Bitv {
     #[inline]
-    fn process(&mut self, other: &Bitv, op: |u32, u32| -> u32) -> bool {
+    fn process<F>(&mut self, other: &Bitv, mut op: F) -> bool where F: FnMut(u32, u32) -> u32 {
         let len = other.storage.len();
         assert_eq!(self.storage.len(), len);
         let mut changed = false;
@@ -816,7 +816,7 @@ pub fn from_bytes(bytes: &[u8]) -> Bitv {
 /// let bv = from_fn(5, |i| { i % 2 == 0 });
 /// assert!(bv.eq_vec(&[true, false, true, false, true]));
 /// ```
-pub fn from_fn(len: uint, f: |index: uint| -> bool) -> Bitv {
+pub fn from_fn<F>(len: uint, mut f: F) -> Bitv where F: FnMut(uint) -> bool {
     let mut bitv = Bitv::with_capacity(len, false);
     for i in range(0u, len) {
         bitv.set(i, f(i));
@@ -1182,7 +1182,7 @@ pub fn get_ref<'a>(&'a self) -> &'a Bitv {
     }
 
     #[inline]
-    fn other_op(&mut self, other: &BitvSet, f: |u32, u32| -> u32) {
+    fn other_op<F>(&mut self, other: &BitvSet, mut f: F) where F: FnMut(u32, u32) -> u32 {
         // Expand the vector if necessary
         self.reserve(other.capacity());
 
@@ -1277,10 +1277,12 @@ pub fn iter<'a>(&'a self) -> BitPositions<'a> {
     #[inline]
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn union<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
+        fn or(w1: u32, w2: u32) -> u32 { w1 | w2 }
+
         TwoBitPositions {
             set: self,
             other: other,
-            merge: |w1, w2| w1 | w2,
+            merge: or,
             current_word: 0u32,
             next_idx: 0u
         }
@@ -1306,11 +1308,13 @@ pub fn union<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
     #[inline]
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn intersection<'a>(&'a self, other: &'a BitvSet) -> Take<TwoBitPositions<'a>> {
+        fn bitand(w1: u32, w2: u32) -> u32 { w1 & w2 }
+
         let min = cmp::min(self.capacity(), other.capacity());
         TwoBitPositions {
             set: self,
             other: other,
-            merge: |w1, w2| w1 & w2,
+            merge: bitand,
             current_word: 0u32,
             next_idx: 0
         }.take(min)
@@ -1343,10 +1347,12 @@ pub fn intersection<'a>(&'a self, other: &'a BitvSet) -> Take<TwoBitPositions<'a
     #[inline]
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn difference<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
+        fn diff(w1: u32, w2: u32) -> u32 { w1 & !w2 }
+
         TwoBitPositions {
             set: self,
             other: other,
-            merge: |w1, w2| w1 & !w2,
+            merge: diff,
             current_word: 0u32,
             next_idx: 0
         }
@@ -1373,10 +1379,12 @@ pub fn difference<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
     #[inline]
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn symmetric_difference<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
+        fn bitxor(w1: u32, w2: u32) -> u32 { w1 ^ w2 }
+
         TwoBitPositions {
             set: self,
             other: other,
-            merge: |w1, w2| w1 ^ w2,
+            merge: bitxor,
             current_word: 0u32,
             next_idx: 0
         }
@@ -1614,7 +1622,7 @@ pub struct BitPositions<'a> {
 pub struct TwoBitPositions<'a> {
     set: &'a BitvSet,
     other: &'a BitvSet,
-    merge: |u32, u32|: 'a -> u32,
+    merge: fn(u32, u32) -> u32,
     current_word: u32,
     next_idx: uint
 }
index 31904b8772fd290abbeea51778ed75035207ef45..e49a8ddbe5ab8054fed030b8bdb2231374dc4a50 100644 (file)
@@ -29,6 +29,8 @@
 
 use ring_buf::RingBuf;
 
+use self::Continuation::{Continue, Finished};
+
 // FIXME(conventions): implement bounded iterators
 
 /// A map based on a B-Tree.
@@ -105,10 +107,12 @@ pub struct MoveEntries<K, V> {
 }
 
 /// An iterator over a BTreeMap's keys.
-pub type Keys<'a, K, V> = iter::Map<'static, (&'a K, &'a V), &'a K, Entries<'a, K, V>>;
+pub type Keys<'a, K, V> =
+    iter::Map<(&'a K, &'a V), &'a K, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>;
 
 /// An iterator over a BTreeMap's values.
-pub type Values<'a, K, V> = iter::Map<'static, (&'a K, &'a V), &'a V, Entries<'a, K, V>>;
+pub type Values<'a, K, V> =
+    iter::Map<(&'a K, &'a V), &'a V, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>;
 
 /// A view into a single entry in a map, which may either be vacant or occupied.
 pub enum Entry<'a, K:'a, V:'a> {
@@ -121,12 +125,12 @@ pub enum Entry<'a, K:'a, V:'a> {
 /// A vacant Entry.
 pub struct VacantEntry<'a, K:'a, V:'a> {
     key: K,
-    stack: stack::SearchStack<'a, K, V>,
+    stack: stack::VacantSearchStack<'a, K, V>,
 }
 
 /// An occupied Entry.
 pub struct OccupiedEntry<'a, K:'a, V:'a> {
-    stack: stack::SearchStack<'a, K, V>,
+    stack: stack::OccupiedSearchStack<'a, K, V>,
 }
 
 impl<K: Ord, V> BTreeMap<K, V> {
@@ -202,9 +206,9 @@ pub fn find(&self, key: &K) -> Option<&V> {
     pub fn get<Sized? Q>(&self, key: &Q) -> Option<&V> where Q: BorrowFrom<K> + Ord {
         let mut cur_node = &self.root;
         loop {
-            match cur_node.search(key) {
-                Found(i) => return cur_node.val(i),
-                GoDown(i) => match cur_node.edge(i) {
+            match Node::search(cur_node, key) {
+                Found(handle) => return Some(handle.into_kv().1),
+                GoDown(handle) => match handle.into_edge() {
                     None => return None,
                     Some(next_node) => {
                         cur_node = next_node;
@@ -266,9 +270,9 @@ pub fn get_mut<Sized? Q>(&mut self, key: &Q) -> Option<&mut V> where Q: BorrowFr
         let mut temp_node = &mut self.root;
         loop {
             let cur_node = temp_node;
-            match cur_node.search(key) {
-                Found(i) => return cur_node.val_mut(i),
-                GoDown(i) => match cur_node.edge_mut(i) {
+            match Node::search(cur_node, key) {
+                Found(handle) => return Some(handle.into_kv_mut().1),
+                GoDown(handle) => match handle.into_edge_mut() {
                     None => return None,
                     Some(next_node) => {
                         temp_node = next_node;
@@ -328,7 +332,7 @@ pub fn swap(&mut self, key: K, value: V) -> Option<V> {
     /// assert_eq!(map[37], "c");
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
-    pub fn insert(&mut self, key: K, mut value: V) -> Option<V> {
+    pub fn insert(&mut self, mut key: K, mut value: V) -> Option<V> {
         // This is a stack of rawptrs to nodes paired with indices, respectively
         // representing the nodes and edges of our search path. We have to store rawptrs
         // because as far as Rust is concerned, we can mutate aliased data with such a
@@ -347,30 +351,39 @@ pub fn insert(&mut self, key: K, mut value: V) -> Option<V> {
         let mut stack = stack::PartialSearchStack::new(self);
 
         loop {
-            // Same basic logic as found in `find`, but with PartialSearchStack mediating the
-            // actual nodes for us
-            match stack.next().search(&key) {
-                Found(i) => unsafe {
-                    // Perfect match, swap the values and return the old one
-                    let next = stack.into_next();
-                    mem::swap(next.unsafe_val_mut(i), &mut value);
-                    return Some(value);
-                },
-                GoDown(i) => {
-                    // We need to keep searching, try to get the search stack
-                    // to go down further
-                    stack = match stack.push(i) {
-                        stack::Done(new_stack) => {
-                            // We've reached a leaf, perform the insertion here
-                            new_stack.insert(key, value);
-                            return None;
-                        }
-                        stack::Grew(new_stack) => {
-                            // We've found the subtree to insert this key/value pair in,
-                            // keep searching
-                            new_stack
-                        }
-                    };
+            let result = stack.with(move |pusher, node| {
+                // Same basic logic as found in `find`, but with PartialSearchStack mediating the
+                // actual nodes for us
+                match Node::search(node, &key) {
+                    Found(mut handle) => {
+                        // Perfect match, swap the values and return the old one
+                        mem::swap(handle.val_mut(), &mut value);
+                        return Finished(Some(value));
+                    },
+                    GoDown(handle) => {
+                        // We need to keep searching, try to get the search stack
+                        // to go down further
+                        match pusher.push(handle) {
+                            stack::Done(new_stack) => {
+                                // We've reached a leaf, perform the insertion here
+                                new_stack.insert(key, value);
+                                return Finished(None);
+                            }
+                            stack::Grew(new_stack) => {
+                                // We've found the subtree to insert this key/value pair in,
+                                // keep searching
+                                return Continue((new_stack, key, value));
+                            }
+                        };
+                    }
+                }
+            });
+            match result {
+                Finished(ret) => { return ret; },
+                Continue((new_stack, renewed_key, renewed_val)) => {
+                    stack = new_stack;
+                    key = renewed_key;
+                    value = renewed_val;
                 }
             }
         }
@@ -438,36 +451,71 @@ pub fn remove<Sized? Q>(&mut self, key: &Q) -> Option<V> where Q: BorrowFrom<K>
         // See `swap` for a more thorough description of the stuff going on in here
         let mut stack = stack::PartialSearchStack::new(self);
         loop {
-            match stack.next().search(key) {
-                Found(i) => {
-                    // Perfect match. Terminate the stack here, and remove the entry
-                    return Some(stack.seal(i).remove());
-                },
-                GoDown(i) => {
-                    // We need to keep searching, try to go down the next edge
-                    stack = match stack.push(i) {
-                        stack::Done(_) => return None, // We're at a leaf; the key isn't in here
-                        stack::Grew(new_stack) => {
-                            new_stack
-                        }
-                    };
+            let result = stack.with(move |pusher, node| {
+                match Node::search(node, key) {
+                    Found(handle) => {
+                        // Perfect match. Terminate the stack here, and remove the entry
+                        return Finished(Some(pusher.seal(handle).remove()));
+                    },
+                    GoDown(handle) => {
+                        // We need to keep searching, try to go down the next edge
+                        match pusher.push(handle) {
+                            // We're at a leaf; the key isn't in here
+                            stack::Done(_) => return Finished(None),
+                            stack::Grew(new_stack) => return Continue(new_stack)
+                        };
+                    }
                 }
+            });
+            match result {
+                Finished(ret) => return ret,
+                Continue(new_stack) => stack = new_stack
             }
         }
     }
 }
 
+/// A helper enum useful for deciding whether to continue a loop since we can't
+/// return from a closure
+enum Continuation<A, B> {
+    Continue(A),
+    Finished(B)
+}
+
 /// The stack module provides a safe interface for constructing and manipulating a stack of ptrs
 /// to nodes. By using this module much better safety guarantees can be made, and more search
 /// boilerplate gets cut out.
 mod stack {
     pub use self::PushResult::*;
     use core::prelude::*;
+    use core::kinds::marker;
+    use core::mem;
     use super::BTreeMap;
     use super::super::node::*;
     use vec::Vec;
 
-    type StackItem<K, V> = (*mut Node<K, V>, uint);
+    /// A generic mutable reference, identical to `&mut` except for the fact that its lifetime
+    /// parameter is invariant. This means that wherever an `IdRef` is expected, only an `IdRef`
+    /// with the exact requested lifetime can be used. This is in contrast to normal references,
+    /// where `&'static` can be used in any function expecting any lifetime reference.
+    pub struct IdRef<'id, T: 'id> {
+        inner: &'id mut T,
+        marker: marker::InvariantLifetime<'id>
+    }
+
+    impl<'id, T> Deref<T> for IdRef<'id, T> {
+        fn deref(&self) -> &T {
+            &*self.inner
+        }
+    }
+
+    impl<'id, T> DerefMut<T> for IdRef<'id, T> {
+        fn deref_mut(&mut self) -> &mut T {
+            &mut *self.inner
+        }
+    }
+
+    type StackItem<K, V> = EdgeNodeHandle<*mut Node<K, V>>;
     type Stack<K, V> = Vec<StackItem<K, V>>;
 
     /// A PartialSearchStack handles the construction of a search stack.
@@ -477,12 +525,29 @@ pub struct PartialSearchStack<'a, K:'a, V:'a> {
         next: *mut Node<K, V>,
     }
 
-    /// A SearchStack represents a full path to an element of interest. It provides methods
+    /// An OccupiedSearchStack represents a full path to an element of interest. It provides methods
     /// for manipulating the element at the top of its stack.
-    pub struct SearchStack<'a, K:'a, V:'a> {
+    pub struct OccupiedSearchStack<'a, K:'a, V:'a> {
+        map: &'a mut BTreeMap<K, V>,
+        stack: Stack<K, V>,
+        top: KVNodeHandle<*mut Node<K, V>>,
+    }
+
+    /// A VacantSearchStack represents a full path to a spot for a new element of interest. It
+    /// provides a method inserting an element at the top of its stack.
+    pub struct VacantSearchStack<'a, K:'a, V:'a> {
         map: &'a mut BTreeMap<K, V>,
         stack: Stack<K, V>,
-        top: StackItem<K, V>,
+        top: EdgeNodeHandle<*mut Node<K, V>>,
+    }
+
+    /// A `PartialSearchStack` that doesn't hold a a reference to the next node, and is just
+    /// just waiting for a `Handle` to that next node to be pushed. See `PartialSearchStack::with`
+    /// for more details.
+    pub struct Pusher<'id, 'a, K:'a, V:'a> {
+        map: &'a mut BTreeMap<K, V>,
+        stack: Stack<K, V>,
+        marker: marker::InvariantLifetime<'id>
     }
 
     /// The result of asking a PartialSearchStack to push another node onto itself. Either it
@@ -490,7 +555,7 @@ pub struct SearchStack<'a, K:'a, V:'a> {
     /// which case it seals itself and yields a complete SearchStack.
     pub enum PushResult<'a, K:'a, V:'a> {
         Grew(PartialSearchStack<'a, K, V>),
-        Done(SearchStack<'a, K, V>),
+        Done(VacantSearchStack<'a, K, V>),
     }
 
     impl<'a, K, V> PartialSearchStack<'a, K, V> {
@@ -506,130 +571,92 @@ pub fn new<'a>(map: &'a mut BTreeMap<K, V>) -> PartialSearchStack<'a, K, V> {
             }
         }
 
+        /// Breaks up the stack into a `Pusher` and the next `Node`, allowing the given closure
+        /// to interact with, search, and finally push the `Node` onto the stack. The passed in
+        /// closure must be polymorphic on the `'id` lifetime parameter, as this statically
+        /// ensures that only `Handle`s from the correct `Node` can be pushed.
+        ///
+        /// The reason this works is that the `Pusher` has an `'id` parameter, and will only accept
+        /// handles with the same `'id`. The closure could only get references with that lifetime
+        /// through its arguments or through some other `IdRef` that it has lying around. However,
+        /// no other `IdRef` could possibly work - because the `'id` is held in an invariant
+        /// parameter, it would need to have precisely the correct lifetime, which would mean that
+        /// at least one of the calls to `with` wouldn't be properly polymorphic, wanting a
+        /// specific lifetime instead of the one that `with` chooses to give it.
+        ///
+        /// See also Haskell's `ST` monad, which uses a similar trick.
+        pub fn with<T, F: for<'id> FnOnce(Pusher<'id, 'a, K, V>,
+                                          IdRef<'id, Node<K, V>>) -> T>(self, closure: F) -> T {
+            let pusher = Pusher {
+                map: self.map,
+                stack: self.stack,
+                marker: marker::InvariantLifetime
+            };
+            let node = IdRef {
+                inner: unsafe { &mut *self.next },
+                marker: marker::InvariantLifetime
+            };
+
+            closure(pusher, node)
+        }
+    }
+
+    impl<'id, 'a, K, V> Pusher<'id, 'a, K, V> {
         /// Pushes the requested child of the stack's current top on top of the stack. If the child
-        /// exists, then a new PartialSearchStack is yielded. Otherwise, a full SearchStack is
+        /// exists, then a new PartialSearchStack is yielded. Otherwise, a VacantSearchStack is
         /// yielded.
-        pub fn push(self, edge: uint) -> PushResult<'a, K, V> {
-            let map = self.map;
-            let mut stack = self.stack;
-            let next_ptr = self.next;
-            let next_node = unsafe {
-                &mut *next_ptr
-            };
-            let to_insert = (next_ptr, edge);
-            match next_node.edge_mut(edge) {
-                None => Done(SearchStack {
-                    map: map,
-                    stack: stack,
-                    top: to_insert,
-                }),
+        pub fn push(mut self, mut edge: EdgeNodeHandle<IdRef<'id, Node<K, V>>>)
+                    -> PushResult<'a, K, V> {
+            let to_insert = edge.as_raw();
+            match edge.edge_mut() {
+                None => {
+                    Done(VacantSearchStack {
+                        map: self.map,
+                        stack: self.stack,
+                        top: to_insert,
+                    })
+                },
                 Some(node) => {
-                    stack.push(to_insert);
+                    self.stack.push(to_insert);
                     Grew(PartialSearchStack {
-                        map: map,
-                        stack: stack,
+                        map: self.map,
+                        stack: self.stack,
                         next: node as *mut _,
                     })
                 },
             }
         }
 
-        /// Converts the stack into a mutable reference to its top.
-        pub fn into_next(self) -> &'a mut Node<K, V> {
-            unsafe {
-                &mut *self.next
-            }
-        }
-
-        /// Gets the top of the stack.
-        pub fn next(&self) -> &Node<K, V> {
-            unsafe {
-                &*self.next
-            }
-        }
-
-        /// Converts the PartialSearchStack into a SearchStack.
-        pub fn seal(self, index: uint) -> SearchStack<'a, K, V> {
-            SearchStack {
+        /// Converts the PartialSearchStack into an OccupiedSearchStack.
+        pub fn seal(self, mut node: KVNodeHandle<IdRef<'id, Node<K, V>>>)
+                    -> OccupiedSearchStack<'a, K, V> {
+            OccupiedSearchStack {
                 map: self.map,
                 stack: self.stack,
-                top: (self.next as *mut _, index),
+                top: node.as_raw(),
             }
         }
     }
 
-    impl<'a, K, V> SearchStack<'a, K, V> {
+    impl<'a, K, V> OccupiedSearchStack<'a, K, V> {
         /// Gets a reference to the value the stack points to.
         pub fn peek(&self) -> &V {
-            let (node_ptr, index) = self.top;
-            unsafe {
-                (*node_ptr).val(index).unwrap()
-            }
+            unsafe { self.top.from_raw().into_kv().1 }
         }
 
         /// Gets a mutable reference to the value the stack points to.
         pub fn peek_mut(&mut self) -> &mut V {
-            let (node_ptr, index) = self.top;
-            unsafe {
-                (*node_ptr).val_mut(index).unwrap()
-            }
+            unsafe { self.top.from_raw_mut().into_kv_mut().1 }
         }
 
         /// Converts the stack into a mutable reference to the value it points to, with a lifetime
         /// tied to the original tree.
-        pub fn into_top(self) -> &'a mut V {
-            let (node_ptr, index) = self.top;
+        pub fn into_top(mut self) -> &'a mut V {
             unsafe {
-                (*node_ptr).val_mut(index).unwrap()
-            }
-        }
-
-        /// Inserts the key and value into the top element in the stack, and if that node has to
-        /// split recursively inserts the split contents into the next element stack until
-        /// splits stop.
-        ///
-        /// Assumes that the stack represents a search path from the root to a leaf.
-        ///
-        /// An &mut V is returned to the inserted value, for callers that want a reference to this.
-        pub fn insert(self, key: K, val: V) -> &'a mut V {
-            unsafe {
-                let map = self.map;
-                map.length += 1;
-
-                let mut stack = self.stack;
-                // Insert the key and value into the leaf at the top of the stack
-                let (node, index) = self.top;
-                let (mut insertion, inserted_ptr) = {
-                    (*node).insert_as_leaf(index, key, val)
-                };
-
-                loop {
-                    match insertion {
-                        Fit => {
-                            // The last insertion went off without a hitch, no splits! We can stop
-                            // inserting now.
-                            return &mut *inserted_ptr;
-                        }
-                        Split(key, val, right) => match stack.pop() {
-                            // The last insertion triggered a split, so get the next element on the
-                            // stack to recursively insert the split node into.
-                            None => {
-                                // The stack was empty; we've split the root, and need to make a
-                                // a new one. This is done in-place because we can't move the
-                                // root out of a reference to the tree.
-                                Node::make_internal_root(&mut map.root, map.b, key, val, right);
-
-                                map.depth += 1;
-                                return &mut *inserted_ptr;
-                            }
-                            Some((node, index)) => {
-                                // The stack wasn't empty, do the insertion and recurse
-                                insertion = (*node).insert_as_internal(index, key, val, right);
-                                continue;
-                            }
-                        }
-                    }
-                }
+                mem::copy_mut_lifetime(
+                    self.map,
+                    self.top.from_raw_mut().val_mut()
+                )
             }
         }
 
@@ -651,10 +678,8 @@ pub fn remove(mut self) -> V {
             // Then, note if the leaf is underfull, and promptly forget the leaf and its ptr
             // to avoid ownership issues.
             let (value, mut underflow) = unsafe {
-                let (leaf_ptr, index) = self.top;
-                let leaf = &mut *leaf_ptr;
-                let (_key, value) = leaf.remove_as_leaf(index);
-                let underflow = leaf.is_underfull();
+                let (_, value) = self.top.from_raw_mut().remove_as_leaf();
+                let underflow = self.top.from_raw().node().is_underfull();
                 (value, underflow)
             };
 
@@ -668,17 +693,16 @@ pub fn remove(mut self) -> V {
                             // We've emptied out the root, so make its only child the new root.
                             // If it's a leaf, we just let it become empty.
                             map.depth -= 1;
-                            map.root = map.root.pop_edge().unwrap();
+                            map.root.into_edge();
                         }
                         return value;
                     }
-                    Some((parent_ptr, index)) => {
+                    Some(mut handle) => {
                         if underflow {
                             // Underflow! Handle it!
                             unsafe {
-                                let parent = &mut *parent_ptr;
-                                parent.handle_underflow(index);
-                                underflow = parent.is_underfull();
+                                handle.from_raw_mut().handle_underflow();
+                                underflow = handle.from_raw().node().is_underfull();
                             }
                         } else {
                             // All done!
@@ -697,36 +721,87 @@ pub fn remove(mut self) -> V {
         /// become swapped.
         fn leafify(&mut self) {
             unsafe {
-                let (node_ptr, index) = self.top;
-                // First, get ptrs to the found key-value pair
-                let node = &mut *node_ptr;
-                let (key_ptr, val_ptr) = {
-                    (node.unsafe_key_mut(index) as *mut _,
-                     node.unsafe_val_mut(index) as *mut _)
-                };
+                let mut top_raw = self.top;
+                let mut top = top_raw.from_raw_mut();
+
+                let key_ptr = top.key_mut() as *mut _;
+                let val_ptr = top.val_mut() as *mut _;
 
                 // Try to go into the right subtree of the found key to find its successor
-                match node.edge_mut(index + 1) {
+                let mut right_edge = top.right_edge();
+                let right_edge_raw = right_edge.as_raw();
+                match right_edge.edge_mut() {
                     None => {
                         // We're a proper leaf stack, nothing to do
                     }
                     Some(mut temp_node) => {
                         //We're not a proper leaf stack, let's get to work.
-                        self.stack.push((node_ptr, index + 1));
+                        self.stack.push(right_edge_raw);
                         loop {
                             // Walk into the smallest subtree of this node
                             let node = temp_node;
-                            let node_ptr = node as *mut _;
 
                             if node.is_leaf() {
                                 // This node is a leaf, do the swap and return
-                                self.top = (node_ptr, 0);
-                                node.unsafe_swap(0, &mut *key_ptr, &mut *val_ptr);
+                                let mut handle = node.kv_handle(0);
+                                self.top = handle.as_raw();
+                                mem::swap(handle.key_mut(), &mut *key_ptr);
+                                mem::swap(handle.val_mut(), &mut *val_ptr);
                                 break;
                             } else {
                                 // This node is internal, go deeper
-                                self.stack.push((node_ptr, 0));
-                                temp_node = node.unsafe_edge_mut(0);
+                                let mut handle = node.edge_handle(0);
+                                self.stack.push(handle.as_raw());
+                                temp_node = handle.into_edge_mut().unwrap();
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    impl<'a, K, V> VacantSearchStack<'a, K, V> {
+        /// Inserts the key and value into the top element in the stack, and if that node has to
+        /// split recursively inserts the split contents into the next element stack until
+        /// splits stop.
+        ///
+        /// Assumes that the stack represents a search path from the root to a leaf.
+        ///
+        /// An &mut V is returned to the inserted value, for callers that want a reference to this.
+        pub fn insert(mut self, key: K, val: V) -> &'a mut V {
+            unsafe {
+                self.map.length += 1;
+
+                // Insert the key and value into the leaf at the top of the stack
+                let (mut insertion, inserted_ptr) = self.top.from_raw_mut()
+                                                        .insert_as_leaf(key, val);
+
+                loop {
+                    match insertion {
+                        Fit => {
+                            // The last insertion went off without a hitch, no splits! We can stop
+                            // inserting now.
+                            return &mut *inserted_ptr;
+                        }
+                        Split(key, val, right) => match self.stack.pop() {
+                            // The last insertion triggered a split, so get the next element on the
+                            // stack to recursively insert the split node into.
+                            None => {
+                                // The stack was empty; we've split the root, and need to make a
+                                // a new one. This is done in-place because we can't move the
+                                // root out of a reference to the tree.
+                                Node::make_internal_root(&mut self.map.root, self.map.b,
+                                                         key, val, right);
+
+                                self.map.depth += 1;
+                                return &mut *inserted_ptr;
+                            }
+                            Some(mut handle) => {
+                                // The stack wasn't empty, do the insertion and recurse
+                                insertion = handle.from_raw_mut()
+                                                  .insert_as_internal(key, val, right);
+                                continue;
                             }
                         }
                     }
@@ -1058,6 +1133,24 @@ pub fn iter<'a>(&'a self) -> Entries<'a, K, V> {
     }
 
     /// Gets a mutable iterator over the entries of the map.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeMap;
+    ///
+    /// let mut map = BTreeMap::new();
+    /// map.insert("a", 1u);
+    /// map.insert("b", 2u);
+    /// map.insert("c", 3u);
+    ///
+    /// // add 10 to the value if the key isn't "a"
+    /// for (key, value) in map.iter_mut() {
+    ///     if key != &"a" {
+    ///         *value += 10;
+    ///     }
+    /// }
+    /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn iter_mut<'a>(&'a mut self) -> MutEntries<'a, K, V> {
         let len = self.len();
@@ -1072,6 +1165,21 @@ pub fn iter_mut<'a>(&'a mut self) -> MutEntries<'a, K, V> {
     }
 
     /// Gets an owning iterator over the entries of the map.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeMap;
+    ///
+    /// let mut map = BTreeMap::new();
+    /// map.insert(1u, "a");
+    /// map.insert(2u, "b");
+    /// map.insert(3u, "c");
+    ///
+    /// for (key, value) in map.into_iter() {
+    ///     println!("{}: {}", key, value);
+    /// }
+    /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(self) -> MoveEntries<K, V> {
         let len = self.len();
@@ -1101,7 +1209,9 @@ pub fn into_iter(self) -> MoveEntries<K, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn keys<'a>(&'a self) -> Keys<'a, K, V> {
-        self.iter().map(|(k, _)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.iter().map(first)
     }
 
     /// Gets an iterator over the values of the map.
@@ -1120,7 +1230,9 @@ pub fn keys<'a>(&'a self) -> Keys<'a, K, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn values<'a>(&'a self) -> Values<'a, K, V> {
-        self.iter().map(|(_, v)| v)
+        fn second<A, B>((_, b): (A, B)) -> B { b }
+
+        self.iter().map(second)
     }
 
     /// Return the number of elements in the map.
@@ -1156,31 +1268,40 @@ pub fn is_empty(&self) -> bool { self.len() == 0 }
 
 impl<K: Ord, V> BTreeMap<K, V> {
     /// Gets the given key's corresponding entry in the map for in-place manipulation.
-    pub fn entry<'a>(&'a mut self, key: K) -> Entry<'a, K, V> {
+    pub fn entry<'a>(&'a mut self, mut key: K) -> Entry<'a, K, V> {
         // same basic logic of `swap` and `pop`, blended together
         let mut stack = stack::PartialSearchStack::new(self);
         loop {
-            match stack.next().search(&key) {
-                Found(i) => {
-                    // Perfect match
-                    return Occupied(OccupiedEntry {
-                        stack: stack.seal(i)
-                    });
-                },
-                GoDown(i) => {
-                    stack = match stack.push(i) {
-                        stack::Done(new_stack) => {
-                            // Not in the tree, but we've found where it goes
-                            return Vacant(VacantEntry {
-                                stack: new_stack,
-                                key: key,
-                            });
-                        }
-                        stack::Grew(new_stack) => {
-                            // We've found the subtree this key must go in
-                            new_stack
-                        }
-                    };
+            let result = stack.with(move |pusher, node| {
+                match Node::search(node, &key) {
+                    Found(handle) => {
+                        // Perfect match
+                        return Finished(Occupied(OccupiedEntry {
+                            stack: pusher.seal(handle)
+                        }));
+                    },
+                    GoDown(handle) => {
+                        match pusher.push(handle) {
+                            stack::Done(new_stack) => {
+                                // Not in the tree, but we've found where it goes
+                                return Finished(Vacant(VacantEntry {
+                                    stack: new_stack,
+                                    key: key,
+                                }));
+                            }
+                            stack::Grew(new_stack) => {
+                                // We've found the subtree this key must go in
+                                return Continue((new_stack, key));
+                            }
+                        };
+                    }
+                }
+            });
+            match result {
+                Finished(finished) => return finished,
+                Continue((new_stack, renewed_key)) => {
+                    stack = new_stack;
+                    key = renewed_key;
                 }
             }
         }
index 3f53bad6518f22e40b581b909833374860a65174..ae23f38c92913ef1e6a378cdb72de863f86da5c8 100644 (file)
 
 use core::prelude::*;
 
-use core::{slice, mem, ptr};
+use core::{slice, mem, ptr, cmp, num, raw};
+use core::kinds::marker;
 use core::iter::Zip;
 use core::borrow::BorrowFrom;
-
-use vec;
-use vec::Vec;
+use alloc::heap;
 
 /// Represents the result of an Insertion: either the item fit, or the node had to split
 pub enum InsertionResult<K, V> {
@@ -33,86 +32,516 @@ pub enum InsertionResult<K, V> {
 }
 
 /// Represents the result of a search for a key in a single node
-pub enum SearchResult {
+pub enum SearchResult<NodeRef> {
     /// The element was found at the given index
-    Found(uint),
+    Found(KVNodeHandle<NodeRef>),
     /// The element wasn't found, but if it's anywhere, it must be beyond this edge
-    GoDown(uint),
+    GoDown(EdgeNodeHandle<NodeRef>),
 }
 
 /// A B-Tree Node. We keep keys/edges/values separate to optimize searching for keys.
-#[deriving(Clone)]
+#[unsafe_no_drop_flag]
 pub struct Node<K, V> {
-    // FIXME(Gankro): This representation is super safe and easy to reason about, but painfully
-    // inefficient. As three Vecs, each node consists of *9* words: (ptr, cap, size) * 3. In
-    // theory, if we take full control of allocation like HashMap's RawTable does,
-    // and restrict leaves to max size 256 (not unreasonable for a btree node) we can cut
-    // this down to just (ptr, cap: u8, size: u8, is_leaf: bool). With generic
-    // integer arguments, cap can even move into the type, reducing this just to
-    // (ptr, size, is_leaf). This could also have cache benefits for very small nodes, as keys
-    // could bleed into edges and vals.
+    // To avoid the need for multiple allocations, we allocate a single buffer with enough space
+    // for `capacity` keys, `capacity` values, and (in internal nodes) `capacity + 1` edges.
+    // Despite this, we store three separate pointers to the three "chunks" of the buffer because
+    // the performance drops significantly if the locations of the vals and edges need to be
+    // recalculated upon access.
     //
-    // However doing this would require a fair amount of code to reimplement all
-    // the Vec logic and iterators. It would also use *way* more unsafe code, which sucks and is
-    // hard. For now, we accept this cost in the name of correctness and simplicity.
+    // These will never be null during normal usage of a `Node`. However, to avoid the need for a
+    // drop flag, `Node::drop` zeroes `keys`, signaling that the `Node` has already been cleaned
+    // up.
+    keys: *mut K,
+    vals: *mut V,
+
+    // In leaf nodes, this will be null, and no space will be allocated for edges.
+    edges: *mut Node<K, V>,
+
+    // At any given time, there will be `_len` keys, `_len` values, and (in an internal node)
+    // `_len + 1` edges. In a leaf node, there will never be any edges.
     //
-    // As a compromise, keys and vals could be merged into one Vec<(K, V)>, which would shave
-    // off 3 words, but possibly hurt our cache efficiency during search, which only cares about
-    // keys. This would also avoid the Zip we use in our iterator implementations. This is
-    // probably worth investigating.
+    // Note: instead of accessing this field directly, please call the `len()` method, which should
+    // be more stable in the face of representation changes.
+    _len: uint,
+
+    // FIXME(gereeter) It shouldn't be necessary to store the capacity in every node, as it should
+    // be constant throughout the tree. Once a solution to this is found, it might be possible to
+    // also pass down the offsets into the buffer that vals and edges are stored at, removing the
+    // need for those two pointers.
     //
-    // Note that this space waste is especially tragic since we store the Nodes by value in their
-    // parent's edges Vec, so unoccupied spaces in the edges Vec are quite large, and we have
-    // to shift around a lot more bits during insertion/removal.
+    // Note: instead of accessing this field directly, please call the `capacity()` method, which
+    // should be more stable in the face of representation changes.
+    _capacity: uint,
+}
+
+/// Rounds up to a multiple of a power of two. Returns the closest multiple
+/// of `target_alignment` that is higher or equal to `unrounded`.
+///
+/// # Panics
+///
+/// Fails if `target_alignment` is not a power of two.
+#[inline]
+fn round_up_to_next(unrounded: uint, target_alignment: uint) -> uint {
+    assert!(num::UnsignedInt::is_power_of_two(target_alignment));
+    (unrounded + target_alignment - 1) & !(target_alignment - 1)
+}
+
+#[test]
+fn test_rounding() {
+    assert_eq!(round_up_to_next(0, 4), 0);
+    assert_eq!(round_up_to_next(1, 4), 4);
+    assert_eq!(round_up_to_next(2, 4), 4);
+    assert_eq!(round_up_to_next(3, 4), 4);
+    assert_eq!(round_up_to_next(4, 4), 4);
+    assert_eq!(round_up_to_next(5, 4), 8);
+}
+
+// Returns a tuple of (val_offset, edge_offset),
+// from the start of a mallocated array.
+#[inline]
+fn calculate_offsets(keys_size: uint,
+                     vals_size: uint, vals_align: uint,
+                     edges_align: uint)
+                     -> (uint, uint) {
+    let vals_offset = round_up_to_next(keys_size, vals_align);
+    let end_of_vals = vals_offset + vals_size;
+
+    let edges_offset = round_up_to_next(end_of_vals, edges_align);
+
+    (vals_offset, edges_offset)
+}
+
+// Returns a tuple of (minimum required alignment, array_size),
+// from the start of a mallocated array.
+#[inline]
+fn calculate_allocation(keys_size: uint, keys_align: uint,
+                        vals_size: uint, vals_align: uint,
+                        edges_size: uint, edges_align: uint)
+                        -> (uint, uint) {
+    let (_, edges_offset) = calculate_offsets(keys_size,
+                                              vals_size, vals_align,
+                                                         edges_align);
+    let end_of_edges = edges_offset + edges_size;
+
+    let min_align = cmp::max(keys_align, cmp::max(vals_align, edges_align));
+
+    (min_align, end_of_edges)
+}
+
+#[test]
+fn test_offset_calculation() {
+    assert_eq!(calculate_allocation(128, 8, 15, 1, 4, 4), (8, 148));
+    assert_eq!(calculate_allocation(3, 1, 2, 1, 1, 1), (1, 6));
+    assert_eq!(calculate_allocation(6, 2, 12, 4, 24, 8), (8, 48));
+    assert_eq!(calculate_offsets(128, 15, 1, 4), (128, 144));
+    assert_eq!(calculate_offsets(3, 2, 1, 1), (3, 5));
+    assert_eq!(calculate_offsets(6, 12, 4, 8), (8, 24));
+}
+
+fn calculate_allocation_generic<K, V>(capacity: uint, is_leaf: bool) -> (uint, uint) {
+    let (keys_size, keys_align) = (capacity * mem::size_of::<K>(), mem::min_align_of::<K>());
+    let (vals_size, vals_align) = (capacity * mem::size_of::<V>(), mem::min_align_of::<V>());
+    let (edges_size, edges_align) = if is_leaf {
+        (0, 1)
+    } else {
+        ((capacity + 1) * mem::size_of::<Node<K, V>>(), mem::min_align_of::<Node<K, V>>())
+    };
+
+    calculate_allocation(
+            keys_size, keys_align,
+            vals_size, vals_align,
+            edges_size, edges_align
+    )
+}
+
+fn calculate_offsets_generic<K, V>(capacity: uint, is_leaf: bool) -> (uint, uint) {
+    let keys_size = capacity * mem::size_of::<K>();
+    let vals_size = capacity * mem::size_of::<V>();
+    let vals_align = mem::min_align_of::<V>();
+    let edges_align = if is_leaf {
+        1
+    } else {
+        mem::min_align_of::<Node<K, V>>()
+    };
+
+    calculate_offsets(
+            keys_size,
+            vals_size, vals_align,
+                       edges_align
+    )
+}
+
+/// An iterator over a slice that owns the elements of the slice but not the allocation.
+struct RawItems<T> {
+    head: *const T,
+    tail: *const T,
+    marker: marker::NoCopy
+}
+
+impl<T> RawItems<T> {
+    unsafe fn from_slice(slice: &[T]) -> RawItems<T> {
+        RawItems::from_parts(slice.as_ptr(), slice.len())
+    }
+
+    unsafe fn from_parts(ptr: *const T, len: uint) -> RawItems<T> {
+        if mem::size_of::<T>() == 0 {
+            RawItems {
+                head: ptr,
+                tail: (ptr as uint + len) as *const T,
+                marker: marker::NoCopy
+            }
+        } else {
+            RawItems {
+                head: ptr,
+                tail: ptr.offset(len as int),
+                marker: marker::NoCopy
+            }
+        }
+    }
+
+    unsafe fn push(&mut self, val: T) {
+        ptr::write(self.tail as *mut T, val);
+
+        if mem::size_of::<T>() == 0 {
+            self.tail = (self.tail as uint + 1) as *const T;
+        } else {
+            self.tail = self.tail.offset(1);
+        }
+    }
+}
+
+impl<T> Iterator<T> for RawItems<T> {
+    fn next(&mut self) -> Option<T> {
+        if self.head == self.tail {
+            None
+        } else {
+            unsafe {
+                let ret = Some(ptr::read(self.head));
+
+                if mem::size_of::<T>() == 0 {
+                    self.head = (self.head as uint + 1) as *const T;
+                } else {
+                    self.head = self.head.offset(1);
+                }
+
+                ret
+            }
+        }
+    }
+}
+
+impl<T> DoubleEndedIterator<T> for RawItems<T> {
+    fn next_back(&mut self) -> Option<T> {
+        if self.head == self.tail {
+            None
+        } else {
+            unsafe {
+                if mem::size_of::<T>() == 0 {
+                    self.tail = (self.tail as uint - 1) as *const T;
+                } else {
+                    self.tail = self.tail.offset(-1);
+                }
+
+                Some(ptr::read(self.tail))
+            }
+        }
+    }
+}
+
+#[unsafe_destructor]
+impl<T> Drop for RawItems<T> {
+    fn drop(&mut self) {
+        for _ in *self {}
+    }
+}
+
+#[unsafe_destructor]
+impl<K, V> Drop for Node<K, V> {
+    fn drop(&mut self) {
+        if self.keys.is_null() {
+            // We have already cleaned up this node.
+            return;
+        }
+
+        // Do the actual cleanup.
+        unsafe {
+            drop(RawItems::from_slice(self.keys()));
+            drop(RawItems::from_slice(self.vals()));
+            drop(RawItems::from_slice(self.edges()));
+
+            self.destroy();
+        }
+
+        self.keys = ptr::null_mut();
+    }
+}
+
+impl<K, V> Node<K, V> {
+    /// Make a new internal node. The caller must initialize the result to fix the invariant that
+    /// there are `len() + 1` edges.
+    unsafe fn new_internal(capacity: uint) -> Node<K, V> {
+        let (alignment, size) = calculate_allocation_generic::<K, V>(capacity, false);
+
+        let buffer = heap::allocate(size, alignment);
+        if buffer.is_null() { ::alloc::oom(); }
+
+        let (vals_offset, edges_offset) = calculate_offsets_generic::<K, V>(capacity, false);
+
+        Node {
+            keys: buffer as *mut K,
+            vals: buffer.offset(vals_offset as int) as *mut V,
+            edges: buffer.offset(edges_offset as int) as *mut Node<K, V>,
+            _len: 0,
+            _capacity: capacity,
+        }
+    }
+
+    /// Make a new leaf node
+    fn new_leaf(capacity: uint) -> Node<K, V> {
+        let (alignment, size) = calculate_allocation_generic::<K, V>(capacity, true);
+
+        let buffer = unsafe { heap::allocate(size, alignment) };
+        if buffer.is_null() { ::alloc::oom(); }
+
+        let (vals_offset, _) = calculate_offsets_generic::<K, V>(capacity, true);
+
+        Node {
+            keys: buffer as *mut K,
+            vals: unsafe { buffer.offset(vals_offset as int) as *mut V },
+            edges: ptr::null_mut(),
+            _len: 0,
+            _capacity: capacity,
+        }
+    }
+
+    unsafe fn destroy(&mut self) {
+        let (alignment, size) =
+                calculate_allocation_generic::<K, V>(self.capacity(), self.is_leaf());
+        heap::deallocate(self.keys as *mut u8, size, alignment);
+    }
+
+    #[inline]
+    pub fn as_slices<'a>(&'a self) -> (&'a [K], &'a [V]) {
+        unsafe {(
+            mem::transmute(raw::Slice {
+                data: self.keys as *const K,
+                len: self.len()
+            }),
+            mem::transmute(raw::Slice {
+                data: self.vals as *const V,
+                len: self.len()
+            })
+        )}
+    }
+
+    #[inline]
+    pub fn as_slices_mut<'a>(&'a mut self) -> (&'a mut [K], &'a mut [V]) {
+        unsafe { mem::transmute(self.as_slices()) }
+    }
+
+    #[inline]
+    pub fn as_slices_internal<'a>(&'a self) -> (&'a [K], &'a [V], &'a [Node<K, V>]) {
+        let (keys, vals) = self.as_slices();
+        let edges: &[_] = if self.is_leaf() {
+            &[]
+        } else {
+            unsafe {
+                mem::transmute(raw::Slice {
+                    data: self.edges as *const Node<K, V>,
+                    len: self.len() + 1
+                })
+            }
+        };
+        (keys, vals, edges)
+    }
+
+    #[inline]
+    pub fn as_slices_internal_mut<'a>(&'a mut self) -> (&'a mut [K], &'a mut [V],
+                                                        &'a mut [Node<K, V>]) {
+        unsafe { mem::transmute(self.as_slices_internal()) }
+    }
 
-    keys: Vec<K>,
-    edges: Vec<Node<K, V>>,
-    vals: Vec<V>,
+    #[inline]
+    pub fn keys<'a>(&'a self) -> &'a [K] {
+        self.as_slices().0
+    }
+
+    #[inline]
+    pub fn keys_mut<'a>(&'a mut self) -> &'a mut [K] {
+        self.as_slices_mut().0
+    }
+
+    #[inline]
+    pub fn vals<'a>(&'a self) -> &'a [V] {
+        self.as_slices().1
+    }
+
+    #[inline]
+    pub fn vals_mut<'a>(&'a mut self) -> &'a mut [V] {
+        self.as_slices_mut().1
+    }
+
+    #[inline]
+    pub fn edges<'a>(&'a self) -> &'a [Node<K, V>] {
+        self.as_slices_internal().2
+    }
+
+    #[inline]
+    pub fn edges_mut<'a>(&'a mut self) -> &'a mut [Node<K, V>] {
+        self.as_slices_internal_mut().2
+    }
+}
+
+// FIXME(gereeter) Write an efficient clone_from
+impl<K: Clone, V: Clone> Clone for Node<K, V> {
+    fn clone(&self) -> Node<K, V> {
+        let mut ret = if self.is_leaf() {
+            Node::new_leaf(self.capacity())
+        } else {
+            unsafe { Node::new_internal(self.capacity()) }
+        };
+
+        unsafe {
+            // For failure safety
+            let mut keys = RawItems::from_parts(ret.keys().as_ptr(), 0);
+            let mut vals = RawItems::from_parts(ret.vals().as_ptr(), 0);
+            let mut edges = RawItems::from_parts(ret.edges().as_ptr(), 0);
+
+            for key in self.keys().iter() {
+                keys.push(key.clone())
+            }
+            for val in self.vals().iter() {
+                vals.push(val.clone())
+            }
+            for edge in self.edges().iter() {
+                edges.push(edge.clone())
+            }
+
+            mem::forget(keys);
+            mem::forget(vals);
+            mem::forget(edges);
+
+            ret._len = self.len();
+        }
+
+        ret
+    }
+}
+
+/// A reference to a key/value pair in the middle of a `Node`. Methods are provided for removing
+/// the pair and accessing the pair and the adjacent edges.
+///
+/// This handle is generic, and can take any sort of reference to a `Node`. The reason for this is
+/// two-fold. First of all, it reduces the amount of repetitive code, implementing functions that
+/// don't need mutability on both mutable and immutable references. Secondly and more importantly,
+/// this allows users of the `Handle` API to associate metadata with the reference. This is used in
+/// `BTreeMap` to give `Node`s temporary "IDs" that persist to when the `Node` is used in a
+/// `Handle`.
+///
+/// # A note on safety
+///
+/// Unfortunately, the extra power afforded by being generic also means that safety can technically
+/// be broken. For sensible implementations of `Deref` and `DerefMut`, these handles are perfectly
+/// safe. As long as repeatedly calling `.deref()` results in the same Node being returned each
+/// time, everything should work fine. However, if the `Deref` implementation swaps in multiple
+/// different nodes, then the indices that are assumed to be in bounds suddenly stop being so. For
+/// example:
+///
+/// ```rust,ignore
+/// struct Nasty<'a> {
+///     first: &'a Node<uint, uint>,
+///     second: &'a Node<uint, uint>,
+///     flag: &'a Cell<bool>,
+/// }
+///
+/// impl<'a> Deref<Node<uint, uint>> for Nasty<'a> {
+///     fn deref(&self) -> &Node<uint, uint> {
+///         if self.flag.get() {
+///             &*self.second
+///         } else {
+///             &*self.first
+///         }
+///     }
+/// }
+///
+/// fn main() {
+///     let flag = Cell::new(false);
+///     let mut small_node = Node::make_leaf_root(3);
+///     let mut large_node = Node::make_leaf_root(100);
+///
+///     for i in range(0, 100) {
+///         // Insert to the end
+///         large_node.edge_handle(i).insert_as_leaf(i, i);
+///     }
+///
+///     let nasty = Nasty {
+///         first: &large_node,
+///         second: &small_node,
+///         flag: &flag
+///     }
+///
+///     // The handle points at index 75.
+///     let handle = Node::search(nasty, 75);
+///
+///     // Now the handle still points at index 75, but on the small node, which has no index 75.
+///     flag.set(true);
+///
+///     println!("Uninitialized memory: {}", handle.into_kv());
+/// }
+/// ```
+#[deriving(Copy)]
+pub struct KVNodeHandle<NodeRef> {
+    node: NodeRef,
+    index: uint
+}
+
+/// A reference to an edge in the middle of a `Node`. Methods are provided for inserting stuff into
+/// the space, handling underflow, and accessing the pointed-to edge.
+///
+/// Please see the notes on `KVNodeHandle` about the generic parameter and safety concerns.
+#[deriving(Copy)]
+pub struct EdgeNodeHandle<NodeRef> {
+    node: NodeRef,
+    index: uint
 }
 
 impl<K: Ord, V> Node<K, V> {
     /// Searches for the given key in the node. If it finds an exact match,
     /// `Found` will be yielded with the matching index. If it doesn't find an exact match,
     /// `GoDown` will be yielded with the index of the subtree the key must lie in.
-    pub fn search<Sized? Q>(&self, key: &Q) -> SearchResult where Q: BorrowFrom<K> + Ord {
+    pub fn search<Sized? Q, NodeRef: Deref<Node<K, V>>>(node: NodeRef, key: &Q)
+                  -> SearchResult<NodeRef> where Q: BorrowFrom<K> + Ord {
         // FIXME(Gankro): Tune when to search linear or binary based on B (and maybe K/V).
         // For the B configured as of this writing (B = 6), binary search was *significantly*
         // worse for uints.
-        self.search_linear(key)
+        let (found, index) = node.search_linear(key);
+        if found {
+            Found(KVNodeHandle {
+                node: node,
+                index: index
+            })
+        } else {
+            GoDown(EdgeNodeHandle {
+                node: node,
+                index: index
+            })
+        }
     }
 
-    fn search_linear<Sized? Q>(&self, key: &Q) -> SearchResult where Q: BorrowFrom<K> + Ord {
-        for (i, k) in self.keys.iter().enumerate() {
+    fn search_linear<Sized? Q>(&self, key: &Q) -> (bool, uint) where Q: BorrowFrom<K> + Ord {
+        for (i, k) in self.keys().iter().enumerate() {
             match key.cmp(BorrowFrom::borrow_from(k)) {
                 Greater => {},
-                Equal => return Found(i),
-                Less => return GoDown(i),
+                Equal => return (true, i),
+                Less => return (false, i),
             }
         }
-        GoDown(self.len())
+        (false, self.len())
     }
 }
 
 // Public interface
 impl <K, V> Node<K, V> {
-    /// Make a new internal node
-    pub fn new_internal(capacity: uint) -> Node<K, V> {
-        Node {
-            keys: Vec::with_capacity(capacity),
-            vals: Vec::with_capacity(capacity),
-            edges: Vec::with_capacity(capacity + 1),
-        }
-    }
-
-    /// Make a new leaf node
-    pub fn new_leaf(capacity: uint) -> Node<K, V> {
-        Node {
-            keys: Vec::with_capacity(capacity),
-            vals: Vec::with_capacity(capacity),
-            edges: Vec::new(),
-        }
-    }
-
     /// Make a leaf root from scratch
     pub fn make_leaf_root(b: uint) -> Node<K, V> {
         Node::new_leaf(capacity_from_b(b))
@@ -121,28 +550,29 @@ pub fn make_leaf_root(b: uint) -> Node<K, V> {
     /// Make an internal root and swap it with an old root
     pub fn make_internal_root(left_and_out: &mut Node<K,V>, b: uint, key: K, value: V,
             right: Node<K,V>) {
-        let mut node = Node::new_internal(capacity_from_b(b));
-        mem::swap(left_and_out, &mut node);
-        left_and_out.keys.push(key);
-        left_and_out.vals.push(value);
-        left_and_out.edges.push(node);
-        left_and_out.edges.push(right);
+        let node = mem::replace(left_and_out, unsafe { Node::new_internal(capacity_from_b(b)) });
+        left_and_out._len = 1;
+        unsafe {
+            ptr::write(left_and_out.keys_mut().unsafe_mut(0), key);
+            ptr::write(left_and_out.vals_mut().unsafe_mut(0), value);
+            ptr::write(left_and_out.edges_mut().unsafe_mut(0), node);
+            ptr::write(left_and_out.edges_mut().unsafe_mut(1), right);
+        }
     }
 
-
     /// How many key-value pairs the node contains
     pub fn len(&self) -> uint {
-        self.keys.len()
+        self._len
     }
 
     /// How many key-value pairs the node can fit
     pub fn capacity(&self) -> uint {
-        self.keys.capacity()
+        self._capacity
     }
 
     /// If the node has any children
     pub fn is_leaf(&self) -> bool {
-        self.edges.is_empty()
+        self.edges.is_null()
     }
 
     /// if the node has too few elements
@@ -154,336 +584,725 @@ pub fn is_underfull(&self) -> bool {
     pub fn is_full(&self) -> bool {
         self.len() == self.capacity()
     }
+}
 
-    /// Swap the given key-value pair with the key-value pair stored in the node's index,
-    /// without checking bounds.
-    pub unsafe fn unsafe_swap(&mut self, index: uint, key: &mut K, val: &mut V) {
-        mem::swap(self.keys.unsafe_mut(index), key);
-        mem::swap(self.vals.unsafe_mut(index), val);
-    }
-
-    /// Get the node's key mutably without any bounds checks.
-    pub unsafe fn unsafe_key_mut(&mut self, index: uint) -> &mut K {
-        self.keys.unsafe_mut(index)
-    }
-
-    /// Get the node's value at the given index
-    pub fn val(&self, index: uint) -> Option<&V> {
-        self.vals.get(index)
-    }
-
-    /// Get the node's value at the given index
-    pub fn val_mut(&mut self, index: uint) -> Option<&mut V> {
-        self.vals.get_mut(index)
-    }
-
-    /// Get the node's value mutably without any bounds checks.
-    pub unsafe fn unsafe_val_mut(&mut self, index: uint) -> &mut V {
-        self.vals.unsafe_mut(index)
+impl<'a, K: 'a, V: 'a> EdgeNodeHandle<&'a Node<K, V>> {
+    /// Turns the handle into a reference to the edge it points at. This is necessary because the
+    /// returned pointer has a larger lifetime than what would be returned by `edge` or `edge_mut`,
+    /// making it more suitable for moving down a chain of nodes.
+    ///
+    /// Returns `None` if called on an edge in a leaf node.
+    pub fn into_edge(self) -> Option<&'a Node<K, V>> {
+        if self.node.is_leaf() {
+            None
+        } else {
+            unsafe {
+                Some(self.node.edges().unsafe_get(self.index))
+            }
+        }
     }
+}
 
-    /// Get the node's edge at the given index
-    pub fn edge(&self, index: uint) -> Option<&Node<K,V>> {
-        self.edges.get(index)
+impl<'a, K: 'a, V: 'a> EdgeNodeHandle<&'a mut Node<K, V>> {
+    /// Turns the handle into a mutable reference to the edge it points at. This is necessary
+    /// because the returned pointer has a larger lifetime than what would be returned by
+    /// `edge_mut`, making it more suitable for moving down a chain of nodes.
+    ///
+    /// Returns `None` if called on an edge in a leaf node.
+    pub fn into_edge_mut(self) -> Option<&'a mut Node<K, V>> {
+        if self.node.is_leaf() {
+            None
+        } else {
+            unsafe {
+                Some(self.node.edges_mut().unsafe_mut(self.index))
+            }
+        }
     }
+}
 
-    /// Get the node's edge mutably at the given index
-    pub fn edge_mut(&mut self, index: uint) -> Option<&mut Node<K,V>> {
-        self.edges.get_mut(index)
+impl<K, V, NodeRef: Deref<Node<K, V>>> EdgeNodeHandle<NodeRef> {
+    /// Returns a reference to the node that contains the pointed-to edge. This is very different
+    /// from `edge` and `edge_mut` because those return children of the node returned by `node`.
+    pub fn node(&self) -> &Node<K, V> {
+        &*self.node
     }
 
-    /// Get the node's edge mutably without any bounds checks.
-    pub unsafe fn unsafe_edge_mut(&mut self, index: uint) -> &mut Node<K,V> {
-        self.edges.unsafe_mut(index)
-    }
+    // This doesn't exist because there are no uses for it,
+    // but is fine to add, analagous to edge_mut.
+    //
+    // /// Returns a reference to the edge pointed-to by this handle. This should not be
+    // /// confused with `node`, which references the parent node of what is returned here.
+    // ///
+    // /// Returns `None` when called on an edge in a leaf node.
+    // pub fn edge(&self) -> Option<&Node<K, V>>
+}
 
-    /// Pop an edge off the end of the node
-    pub fn pop_edge(&mut self) -> Option<Node<K,V>> {
-        self.edges.pop()
+impl<K, V, NodeRef: DerefMut<Node<K, V>>> EdgeNodeHandle<NodeRef> {
+    /// Returns a mutable reference to the edge pointed-to by this handle. This should not be
+    /// confused with `node`, which references the parent node of what is returned here.
+    ///
+    /// Returns `None` when called on an edge in a leaf node.
+    pub fn edge_mut(&mut self) -> Option<&mut Node<K, V>> {
+        if self.node.is_leaf() {
+            None
+        } else {
+            unsafe { Some(self.node.edges_mut().unsafe_mut(self.index)) }
+        }
     }
 
-    /// Try to insert this key-value pair at the given index in this internal node
+    /// Tries to insert this key-value pair at the given index in this leaf node
     /// If the node is full, we have to split it.
     ///
     /// Returns a *mut V to the inserted value, because the caller may want this when
     /// they're done mutating the tree, but we don't want to borrow anything for now.
-    pub fn insert_as_leaf(&mut self, index: uint, key: K, value: V) ->
+    pub fn insert_as_leaf(mut self, key: K, value: V) ->
             (InsertionResult<K, V>, *mut V) {
-        if !self.is_full() {
+        // Necessary for correctness, but in a private module
+        debug_assert!(self.node.is_leaf(),
+                      "insert_as_leaf must only be called on leaf nodes");
+
+        if !self.node.is_full() {
             // The element can fit, just insert it
-            self.insert_fit_as_leaf(index, key, value);
-            (Fit, unsafe { self.unsafe_val_mut(index) as *mut _ })
+            (Fit, unsafe { self.node.insert_kv(self.index, key, value) as *mut _ })
         } else {
             // The element can't fit, this node is full. Split it into two nodes.
-            let (new_key, new_val, mut new_right) = self.split();
-            let left_len = self.len();
-
-            let ptr = if index <= left_len {
-                self.insert_fit_as_leaf(index, key, value);
-                unsafe { self.unsafe_val_mut(index) as *mut _ }
-            } else {
-                new_right.insert_fit_as_leaf(index - left_len - 1, key, value);
-                unsafe { new_right.unsafe_val_mut(index - left_len - 1) as *mut _ }
-            };
+            let (new_key, new_val, mut new_right) = self.node.split();
+            let left_len = self.node.len();
+
+            let ptr = unsafe {
+                if self.index <= left_len {
+                    self.node.insert_kv(self.index, key, value)
+                } else {
+                    // We need to subtract 1 because in splitting we took out new_key and new_val.
+                    // Just being in the right node means we are past left_len k/v pairs in the
+                    // left node and 1 k/v pair in the parent node.
+                    new_right.insert_kv(self.index - left_len - 1, key, value)
+                }
+            } as *mut _;
 
             (Split(new_key, new_val, new_right), ptr)
         }
     }
 
-    /// Try to insert this key-value pair at the given index in this internal node
+    /// Tries to insert this key-value pair at the given index in this internal node
     /// If the node is full, we have to split it.
-    pub fn insert_as_internal(&mut self, index: uint, key: K, value: V, right: Node<K, V>)
+    pub fn insert_as_internal(mut self, key: K, value: V, right: Node<K, V>)
             -> InsertionResult<K, V> {
-        if !self.is_full() {
+        // Necessary for correctness, but in a private module
+        debug_assert!(!self.node.is_leaf(),
+                      "insert_as_internal must only be called on internal nodes");
+
+        if !self.node.is_full() {
             // The element can fit, just insert it
-            self.insert_fit_as_internal(index, key, value, right);
+            unsafe {
+                self.node.insert_kv(self.index, key, value);
+                self.node.insert_edge(self.index + 1, right); // +1 to insert to the right
+            }
             Fit
         } else {
             // The element can't fit, this node is full. Split it into two nodes.
-            let (new_key, new_val, mut new_right) = self.split();
-            let left_len = self.len();
-
-            if index <= left_len {
-                self.insert_fit_as_internal(index, key, value, right);
+            let (new_key, new_val, mut new_right) = self.node.split();
+            let left_len = self.node.len();
+
+            if self.index <= left_len {
+                unsafe {
+                    self.node.insert_kv(self.index, key, value);
+                    self.node.insert_edge(self.index + 1, right); // +1 to insert to the right
+                }
             } else {
-                new_right.insert_fit_as_internal(index - left_len - 1, key, value, right);
+                unsafe {
+                    // The -1 here is for the same reason as in insert_as_internal - because we
+                    // split, there are actually left_len + 1 k/v pairs before the right node, with
+                    // the extra 1 being put in the parent.
+                    new_right.insert_kv(self.index - left_len - 1, key, value);
+                    new_right.insert_edge(self.index - left_len, right);
+                }
             }
 
             Split(new_key, new_val, new_right)
         }
     }
 
-    /// Remove the key-value pair at the given index
-    pub fn remove_as_leaf(&mut self, index: uint) -> (K, V) {
-        match (self.keys.remove(index), self.vals.remove(index)) {
-            (Some(k), Some(v)) => (k, v),
-            _ => unreachable!(),
-        }
-    }
-
     /// Handle an underflow in this node's child. We favour handling "to the left" because we know
     /// we're empty, but our neighbour can be full. Handling to the left means when we choose to
     /// steal, we pop off the end of our neighbour (always fast) and "unshift" ourselves
     /// (always slow, but at least faster since we know we're half-empty).
     /// Handling "to the right" reverses these roles. Of course, we merge whenever possible
     /// because we want dense nodes, and merging is about equal work regardless of direction.
-    pub fn handle_underflow(&mut self, underflowed_child_index: uint) {
-        assert!(underflowed_child_index <= self.len());
+    pub fn handle_underflow(mut self) {
         unsafe {
-            if underflowed_child_index > 0 {
-                self.handle_underflow_to_left(underflowed_child_index);
+            if self.index > 0 {
+                self.handle_underflow_to_left();
             } else {
-                self.handle_underflow_to_right(underflowed_child_index);
+                self.handle_underflow_to_right();
             }
         }
     }
 
-    pub fn iter<'a>(&'a self) -> Traversal<'a, K, V> {
-        let is_leaf = self.is_leaf();
-        Traversal {
-            elems: self.keys.iter().zip(self.vals.iter()),
-            edges: self.edges.iter(),
-            head_is_edge: true,
-            tail_is_edge: true,
-            has_edges: !is_leaf,
+    /// Gets the handle pointing to the key/value pair just to the left of the pointed-to edge.
+    /// This is unsafe because the handle might point to the first edge in the node, which has no
+    /// pair to its left.
+    unsafe fn left_kv<'a>(&'a mut self) -> KVNodeHandle<&'a mut Node<K, V>> {
+        KVNodeHandle {
+            node: &mut *self.node,
+            index: self.index - 1
         }
     }
 
-    pub fn iter_mut<'a>(&'a mut self) -> MutTraversal<'a, K, V> {
-        let is_leaf = self.is_leaf();
-        MutTraversal {
-            elems: self.keys.iter().zip(self.vals.iter_mut()),
-            edges: self.edges.iter_mut(),
-            head_is_edge: true,
-            tail_is_edge: true,
-            has_edges: !is_leaf,
+    /// Gets the handle pointing to the key/value pair just to the right of the pointed-to edge.
+    /// This is unsafe because the handle might point to the last edge in the node, which has no
+    /// pair to its right.
+    unsafe fn right_kv<'a>(&'a mut self) -> KVNodeHandle<&'a mut Node<K, V>> {
+        KVNodeHandle {
+            node: &mut *self.node,
+            index: self.index
         }
     }
 
-    pub fn into_iter(self) -> MoveTraversal<K, V> {
-        let is_leaf = self.is_leaf();
-        MoveTraversal {
-            elems: self.keys.into_iter().zip(self.vals.into_iter()),
-            edges: self.edges.into_iter(),
-            head_is_edge: true,
-            tail_is_edge: true,
-            has_edges: !is_leaf,
+    /// Right is underflowed. Tries to steal from left,
+    /// but merges left and right if left is low too.
+    unsafe fn handle_underflow_to_left(&mut self) {
+        let left_len = self.node.edges()[self.index - 1].len();
+        if left_len > min_load_from_capacity(self.node.capacity()) {
+            self.left_kv().steal_rightward();
+        } else {
+            self.left_kv().merge_children();
+        }
+    }
+
+    /// Left is underflowed. Tries to steal from the right,
+    /// but merges left and right if right is low too.
+    unsafe fn handle_underflow_to_right(&mut self) {
+        let right_len = self.node.edges()[self.index + 1].len();
+        if right_len > min_load_from_capacity(self.node.capacity()) {
+            self.right_kv().steal_leftward();
+        } else {
+            self.right_kv().merge_children();
+        }
+    }
+
+    /// Converts a handle into one that stores the same information using a raw pointer. This can
+    /// be useful in conjunction with `from_raw` in the cases in which the type system is
+    /// insufficient for determining the lifetimes of the nodes.
+    pub fn as_raw(&mut self) -> EdgeNodeHandle<*mut Node<K, V>> {
+        EdgeNodeHandle {
+            node: &mut *self.node as *mut _,
+            index: self.index
         }
     }
 }
 
-// Private implementation details
-impl<K, V> Node<K, V> {
-    /// Make a node from its raw components
-    fn from_vecs(keys: Vec<K>, vals: Vec<V>, edges: Vec<Node<K, V>>) -> Node<K, V> {
-        Node {
-            keys: keys,
-            vals: vals,
-            edges: edges,
+impl<K, V> EdgeNodeHandle<*mut Node<K, V>> {
+    /// Converts from a handle stored with a raw pointer, which isn't directly usable, to a handle
+    /// stored with a reference. This is an unsafe inverse of `as_raw`, and together they allow
+    /// unsafely extending the lifetime of the reference to the `Node`.
+    pub unsafe fn from_raw<'a>(&'a self) -> EdgeNodeHandle<&'a Node<K, V>> {
+        EdgeNodeHandle {
+            node: &*self.node,
+            index: self.index
         }
     }
 
-    /// We have somehow verified that this key-value pair will fit in this internal node,
-    /// so insert under that assumption.
-    fn insert_fit_as_leaf(&mut self, index: uint, key: K, val: V) {
-        self.keys.insert(index, key);
-        self.vals.insert(index, val);
+    /// Converts from a handle stored with a raw pointer, which isn't directly usable, to a handle
+    /// stored with a mutable reference. This is an unsafe inverse of `as_raw`, and together they
+    /// allow unsafely extending the lifetime of the reference to the `Node`.
+    pub unsafe fn from_raw_mut<'a>(&'a mut self) -> EdgeNodeHandle<&'a mut Node<K, V>> {
+        EdgeNodeHandle {
+            node: &mut *self.node,
+            index: self.index
+        }
     }
+}
 
-    /// We have somehow verified that this key-value pair will fit in this internal node,
-    /// so insert under that assumption
-    fn insert_fit_as_internal(&mut self, index: uint, key: K, val: V, right: Node<K, V>) {
-        self.keys.insert(index, key);
-        self.vals.insert(index, val);
-        self.edges.insert(index + 1, right);
+impl<'a, K: 'a, V: 'a> KVNodeHandle<&'a Node<K, V>> {
+    /// Turns the handle into references to the key and value it points at. This is necessary
+    /// because the returned pointers have larger lifetimes than what would be returned by `key`
+    /// or `val`.
+    pub fn into_kv(self) -> (&'a K, &'a V) {
+        let (keys, vals) = self.node.as_slices();
+        unsafe {
+            (
+                keys.unsafe_get(self.index),
+                vals.unsafe_get(self.index)
+            )
+        }
     }
+}
 
-    /// Node is full, so split it into two nodes, and yield the middle-most key-value pair
-    /// because we have one too many, and our parent now has one too few
-    fn split(&mut self) -> (K, V, Node<K, V>) {
-        let r_keys = split(&mut self.keys);
-        let r_vals = split(&mut self.vals);
-        let r_edges = if self.edges.is_empty() {
-            Vec::new()
-        } else {
-            split(&mut self.edges)
-        };
+impl<'a, K: 'a, V: 'a> KVNodeHandle<&'a mut Node<K, V>> {
+    /// Turns the handle into mutable references to the key and value it points at. This is
+    /// necessary because the returned pointers have larger lifetimes than what would be returned
+    /// by `key_mut` or `val_mut`.
+    pub fn into_kv_mut(self) -> (&'a mut K, &'a mut V) {
+        let (keys, vals) = self.node.as_slices_mut();
+        unsafe {
+            (
+                keys.unsafe_mut(self.index),
+                vals.unsafe_mut(self.index)
+            )
+        }
+    }
+}
+
+impl<'a, K: 'a, V: 'a, NodeRef: Deref<Node<K, V>> + 'a> KVNodeHandle<NodeRef> {
+    /// Returns a reference to the node that contains the pointed-to key/value pair.
+    pub fn node(&'a self) -> &'a Node<K, V> {
+        &*self.node
+    }
 
-        let right = Node::from_vecs(r_keys, r_vals, r_edges);
-        // Pop it
-        let key = self.keys.pop().unwrap();
-        let val = self.vals.pop().unwrap();
+    // These are fine to include, but are currently unneeded.
+    //
+    // /// Returns a reference to the key pointed-to by this handle. This doesn't return a
+    // /// reference with a lifetime as large as `into_kv_mut`, but it also does not consume the
+    // /// handle.
+    // pub fn key(&'a self) -> &'a K {
+    //     unsafe { self.node.keys().unsafe_get(self.index) }
+    // }
+    //
+    // /// Returns a reference to the value pointed-to by this handle. This doesn't return a
+    // /// reference with a lifetime as large as `into_kv_mut`, but it also does not consume the
+    // /// handle.
+    // pub fn val(&'a self) -> &'a V {
+    //     unsafe { self.node.vals().unsafe_get(self.index) }
+    // }
+}
 
-        (key, val, right)
+impl<'a, K: 'a, V: 'a, NodeRef: DerefMut<Node<K, V>> + 'a> KVNodeHandle<NodeRef> {
+    /// Returns a mutable reference to the key pointed-to by this handle. This doesn't return a
+    /// reference with a lifetime as large as `into_kv_mut`, but it also does not consume the
+    /// handle.
+    pub fn key_mut(&'a mut self) -> &'a mut K {
+        unsafe { self.node.keys_mut().unsafe_mut(self.index) }
     }
 
-    /// Right is underflowed. Try to steal from left,
-    /// but merge left and right if left is low too.
-    unsafe fn handle_underflow_to_left(&mut self, underflowed_child_index: uint) {
-        let left_len = self.edges[underflowed_child_index - 1].len();
-        if left_len > min_load_from_capacity(self.capacity()) {
-            self.steal_to_left(underflowed_child_index);
-        } else {
-            self.merge_children(underflowed_child_index - 1);
+    /// Returns a mutable reference to the value pointed-to by this handle. This doesn't return a
+    /// reference with a lifetime as large as `into_kv_mut`, but it also does not consume the
+    /// handle.
+    pub fn val_mut(&'a mut self) -> &'a mut V {
+        unsafe { self.node.vals_mut().unsafe_mut(self.index) }
+    }
+}
+
+impl<K, V, NodeRef: DerefMut<Node<K, V>>> KVNodeHandle<NodeRef> {
+    /// Gets the handle pointing to the edge immediately to the left of the key/value pair pointed
+    /// to by this handle.
+    pub fn left_edge<'a>(&'a mut self) -> EdgeNodeHandle<&'a mut Node<K, V>> {
+        EdgeNodeHandle {
+            node: &mut *self.node,
+            index: self.index
         }
     }
 
-    /// Left is underflowed. Try to steal from the right,
-    /// but merge left and right if right is low too.
-    unsafe fn handle_underflow_to_right(&mut self, underflowed_child_index: uint) {
-        let right_len = self.edges[underflowed_child_index + 1].len();
-        if right_len > min_load_from_capacity(self.capacity()) {
-            self.steal_to_right(underflowed_child_index);
-        } else {
-            self.merge_children(underflowed_child_index);
+    /// Gets the handle pointing to the edge immediately to the right of the key/value pair pointed
+    /// to by this handle.
+    pub fn right_edge<'a>(&'a mut self) -> EdgeNodeHandle<&'a mut Node<K, V>> {
+        EdgeNodeHandle {
+            node: &mut *self.node,
+            index: self.index + 1
+        }
+    }
+
+    /// Removes the key/value pair at the handle's location.
+    ///
+    /// # Panics (in debug build)
+    ///
+    /// Panics if the node containing the pair is not a leaf node.
+    pub fn remove_as_leaf(mut self) -> (K, V) {
+        // Necessary for correctness, but in a private module
+        debug_assert!(self.node.is_leaf(), "remove_as_leaf must only be called on leaf nodes");
+        unsafe { self.node.remove_kv(self.index) }
+    }
+
+    /// Converts a handle into one that stores the same information using a raw pointer. This can
+    /// be useful in conjunction with `from_raw` in the cases in which the type system is
+    /// insufficient for determining the lifetimes of the nodes.
+    pub fn as_raw(&mut self) -> KVNodeHandle<*mut Node<K, V>> {
+        KVNodeHandle {
+            node: &mut *self.node as *mut _,
+            index: self.index
         }
     }
 
     /// Steal! Stealing is roughly analogous to a binary tree rotation.
     /// In this case, we're "rotating" right.
-    unsafe fn steal_to_left(&mut self, underflowed_child_index: uint) {
+    unsafe fn steal_rightward(&mut self) {
         // Take the biggest stuff off left
         let (mut key, mut val, edge) = {
-            let left = self.unsafe_edge_mut(underflowed_child_index - 1);
-            match (left.keys.pop(), left.vals.pop(), left.edges.pop()) {
-                (Some(k), Some(v), e) => (k, v, e),
-                _ => unreachable!(),
-            }
+            let mut left_handle = self.left_edge();
+            let left = left_handle.edge_mut().unwrap();
+            let (key, val) = left.pop_kv();
+            let edge = if left.is_leaf() {
+                None
+            } else {
+                Some(left.pop_edge())
+            };
+
+            (key, val, edge)
         };
 
         // Swap the parent's separating key-value pair with left's
-        self.unsafe_swap(underflowed_child_index - 1, &mut key, &mut val);
+        mem::swap(&mut key, self.key_mut());
+        mem::swap(&mut val, self.val_mut());
 
         // Put them at the start of right
-        {
-            let right = self.unsafe_edge_mut(underflowed_child_index);
-            right.keys.insert(0, key);
-            right.vals.insert(0, val);
-            match edge {
-                None => {}
-                Some(e) => right.edges.insert(0, e)
-            }
+        let mut right_handle = self.right_edge();
+        let right = right_handle.edge_mut().unwrap();
+        right.insert_kv(0, key, val);
+        match edge {
+            Some(edge) => right.insert_edge(0, edge),
+            None => {}
         }
     }
 
     /// Steal! Stealing is roughly analogous to a binary tree rotation.
     /// In this case, we're "rotating" left.
-    unsafe fn steal_to_right(&mut self, underflowed_child_index: uint) {
+    unsafe fn steal_leftward(&mut self) {
         // Take the smallest stuff off right
         let (mut key, mut val, edge) = {
-            let right = self.unsafe_edge_mut(underflowed_child_index + 1);
-            match (right.keys.remove(0), right.vals.remove(0), right.edges.remove(0)) {
-                (Some(k), Some(v), e) => (k, v, e),
-                _ => unreachable!(),
-            }
+            let mut right_handle = self.right_edge();
+            let right = right_handle.edge_mut().unwrap();
+            let (key, val) = right.remove_kv(0);
+            let edge = if right.is_leaf() {
+                None
+            } else {
+                Some(right.remove_edge(0))
+            };
+
+            (key, val, edge)
         };
 
         // Swap the parent's separating key-value pair with right's
-        self.unsafe_swap(underflowed_child_index, &mut key, &mut val);
+        mem::swap(&mut key, self.key_mut());
+        mem::swap(&mut val, self.val_mut());
 
         // Put them at the end of left
-        {
-            let left = self.unsafe_edge_mut(underflowed_child_index);
-            left.keys.push(key);
-            left.vals.push(val);
-            match edge {
-                None => {}
-                Some(e) => left.edges.push(e)
-            }
+        let mut left_handle = self.left_edge();
+        let left = left_handle.edge_mut().unwrap();
+        left.push_kv(key, val);
+        match edge {
+            Some(edge) => left.push_edge(edge),
+            None => {}
         }
     }
 
-    /// Merge! Left and right will be smooshed into one node, along with the key-value
+    /// Merge! Smooshes left and right into one node, along with the key-value
     /// pair that separated them in their parent.
-    unsafe fn merge_children(&mut self, left_index: uint) {
+    unsafe fn merge_children(mut self) {
         // Permanently remove right's index, and the key-value pair that separates
         // left and right
-        let (key, val, right) = {
-            match (self.keys.remove(left_index),
-                self.vals.remove(left_index),
-                self.edges.remove(left_index + 1)) {
-                (Some(k), Some(v), Some(e)) => (k, v, e),
-                _ => unreachable!(),
-            }
-        };
+        let (key, val) = self.node.remove_kv(self.index);
+        let right = self.node.remove_edge(self.index + 1);
 
         // Give left right's stuff.
-        let left = self.unsafe_edge_mut(left_index);
-        left.absorb(key, val, right);
+        self.left_edge().edge_mut().unwrap()
+            .absorb(key, val, right);
     }
+}
 
-    /// Take all the values from right, separated by the given key and value
-    fn absorb(&mut self, key: K, val: V, right: Node<K, V>) {
-        // Just as a sanity check, make sure we can fit this guy in
-        debug_assert!(self.len() + right.len() <= self.capacity())
+impl<K, V> KVNodeHandle<*mut Node<K, V>> {
+    /// Converts from a handle stored with a raw pointer, which isn't directly usable, to a handle
+    /// stored with a reference. This is an unsafe inverse of `as_raw`, and together they allow
+    /// unsafely extending the lifetime of the reference to the `Node`.
+    pub unsafe fn from_raw<'a>(&'a self) -> KVNodeHandle<&'a Node<K, V>> {
+        KVNodeHandle {
+            node: &*self.node,
+            index: self.index
+        }
+    }
 
-        self.keys.push(key);
-        self.vals.push(val);
-        self.keys.extend(right.keys.into_iter());
-        self.vals.extend(right.vals.into_iter());
-        self.edges.extend(right.edges.into_iter());
+    /// Converts from a handle stored with a raw pointer, which isn't directly usable, to a handle
+    /// stored with a mutable reference. This is an unsafe inverse of `as_raw`, and together they
+    /// allow unsafely extending the lifetime of the reference to the `Node`.
+    pub unsafe fn from_raw_mut<'a>(&'a mut self) -> KVNodeHandle<&'a mut Node<K, V>> {
+        KVNodeHandle {
+            node: &mut *self.node,
+            index: self.index
+        }
     }
 }
 
-/// Takes a Vec, and splits half the elements into a new one.
-fn split<T>(left: &mut Vec<T>) -> Vec<T> {
-    // This function is intended to be called on a full Vec of size 2B - 1 (keys, values),
-    // or 2B (edges). In the former case, left should get B elements, and right should get
-    // B - 1. In the latter case, both should get B. Therefore, we can just always take the last
-    // size / 2 elements from left, and put them on right. This also ensures this method is
-    // safe, even if the Vec isn't full. Just uninteresting for our purposes.
-    let len = left.len();
-    let right_len = len / 2;
-    let left_len = len - right_len;
-    let mut right = Vec::with_capacity(left.capacity());
-    unsafe {
-        let left_ptr = left.unsafe_get(left_len) as *const _;
-        let right_ptr = right.as_mut_ptr();
-        ptr::copy_nonoverlapping_memory(right_ptr, left_ptr, right_len);
-        left.set_len(left_len);
-        right.set_len(right_len);
+impl<K, V> Node<K, V> {
+    /// Returns the mutable handle pointing to the key/value pair at a given index.
+    ///
+    /// # Panics (in debug build)
+    ///
+    /// Panics if the given index is out of bounds.
+    pub fn kv_handle(&mut self, index: uint) -> KVNodeHandle<&mut Node<K, V>> {
+        // Necessary for correctness, but in a private module
+        debug_assert!(index < self.len(), "kv_handle index out of bounds");
+        KVNodeHandle {
+            node: self,
+            index: index
+        }
+    }
+
+    /// Returns the mutable handle pointing to the edge at a given index.
+    ///
+    /// # Panics (in debug build)
+    ///
+    /// Panics if the given index is out of bounds.
+    pub fn edge_handle(&mut self, index: uint) -> EdgeNodeHandle<&mut Node<K, V>> {
+        // Necessary for correctness, but in a private module
+        debug_assert!(index <= self.len(), "edge_handle index out of bounds");
+        EdgeNodeHandle {
+            node: self,
+            index: index
+        }
+    }
+
+    pub fn iter<'a>(&'a self) -> Traversal<'a, K, V> {
+        let is_leaf = self.is_leaf();
+        let (keys, vals, edges) = self.as_slices_internal();
+        Traversal {
+            inner: ElemsAndEdges(
+                keys.iter().zip(vals.iter()),
+                edges.iter()
+            ),
+            head_is_edge: true,
+            tail_is_edge: true,
+            has_edges: !is_leaf,
+        }
+    }
+
+    pub fn iter_mut<'a>(&'a mut self) -> MutTraversal<'a, K, V> {
+        let is_leaf = self.is_leaf();
+        let (keys, vals, edges) = self.as_slices_internal_mut();
+        MutTraversal {
+            inner: ElemsAndEdges(
+                keys.iter().zip(vals.iter_mut()),
+                edges.iter_mut()
+            ),
+            head_is_edge: true,
+            tail_is_edge: true,
+            has_edges: !is_leaf,
+        }
+    }
+
+    pub fn into_iter(self) -> MoveTraversal<K, V> {
+        unsafe {
+            let ret = MoveTraversal {
+                inner: MoveTraversalImpl {
+                    keys: RawItems::from_slice(self.keys()),
+                    vals: RawItems::from_slice(self.vals()),
+                    edges: RawItems::from_slice(self.edges()),
+
+                    ptr: self.keys as *mut u8,
+                    capacity: self.capacity(),
+                    is_leaf: self.is_leaf()
+                },
+                head_is_edge: true,
+                tail_is_edge: true,
+                has_edges: !self.is_leaf(),
+            };
+            mem::forget(self);
+            ret
+        }
+    }
+
+    /// When a node has no keys or values and only a single edge, extract that edge.
+    pub fn into_edge(&mut self) {
+        // Necessary for correctness, but in a private module
+        debug_assert!(self.len() == 0);
+        debug_assert!(!self.is_leaf());
+
+        unsafe {
+            let ret = ptr::read(self.edges().unsafe_get(0));
+            self.destroy();
+            ptr::write(self, ret);
+        }
+    }
+}
+
+// Vector functions (all unchecked)
+impl<K, V> Node<K, V> {
+    // This must be followed by push_edge on an internal node.
+    #[inline]
+    unsafe fn push_kv(&mut self, key: K, val: V) {
+        let len = self.len();
+
+        ptr::write(self.keys_mut().unsafe_mut(len), key);
+        ptr::write(self.vals_mut().unsafe_mut(len), val);
+
+        self._len += 1;
+    }
+
+    // This can only be called immediately after a call to push_kv.
+    #[inline]
+    unsafe fn push_edge(&mut self, edge: Node<K, V>) {
+        let len = self.len();
+
+        ptr::write(self.edges_mut().unsafe_mut(len), edge);
+    }
+
+    // This must be followed by insert_edge on an internal node.
+    #[inline]
+    unsafe fn insert_kv(&mut self, index: uint, key: K, val: V) -> &mut V {
+        ptr::copy_memory(
+            self.keys_mut().as_mut_ptr().offset(index as int + 1),
+            self.keys().as_ptr().offset(index as int),
+            self.len() - index
+        );
+        ptr::copy_memory(
+            self.vals_mut().as_mut_ptr().offset(index as int + 1),
+            self.vals().as_ptr().offset(index as int),
+            self.len() - index
+        );
+
+        ptr::write(self.keys_mut().unsafe_mut(index), key);
+        ptr::write(self.vals_mut().unsafe_mut(index), val);
+
+        self._len += 1;
+
+        self.vals_mut().unsafe_mut(index)
+    }
+
+    // This can only be called immediately after a call to insert_kv.
+    #[inline]
+    unsafe fn insert_edge(&mut self, index: uint, edge: Node<K, V>) {
+        ptr::copy_memory(
+            self.edges_mut().as_mut_ptr().offset(index as int + 1),
+            self.edges().as_ptr().offset(index as int),
+            self.len() - index
+        );
+        ptr::write(self.edges_mut().unsafe_mut(index), edge);
+    }
+
+    // This must be followed by pop_edge on an internal node.
+    #[inline]
+    unsafe fn pop_kv(&mut self) -> (K, V) {
+        let key = ptr::read(self.keys().unsafe_get(self.len() - 1));
+        let val = ptr::read(self.vals().unsafe_get(self.len() - 1));
+
+        self._len -= 1;
+
+        (key, val)
+    }
+
+    // This can only be called immediately after a call to pop_kv.
+    #[inline]
+    unsafe fn pop_edge(&mut self) -> Node<K, V> {
+        let edge = ptr::read(self.edges().unsafe_get(self.len() + 1));
+
+        edge
+    }
+
+    // This must be followed by remove_edge on an internal node.
+    #[inline]
+    unsafe fn remove_kv(&mut self, index: uint) -> (K, V) {
+        let key = ptr::read(self.keys().unsafe_get(index));
+        let val = ptr::read(self.vals().unsafe_get(index));
+
+        ptr::copy_memory(
+            self.keys_mut().as_mut_ptr().offset(index as int),
+            self.keys().as_ptr().offset(index as int + 1),
+            self.len() - index - 1
+        );
+        ptr::copy_memory(
+            self.vals_mut().as_mut_ptr().offset(index as int),
+            self.vals().as_ptr().offset(index as int + 1),
+            self.len() - index - 1
+        );
+
+        self._len -= 1;
+
+        (key, val)
+    }
+
+    // This can only be called immediately after a call to remove_kv.
+    #[inline]
+    unsafe fn remove_edge(&mut self, index: uint) -> Node<K, V> {
+        let edge = ptr::read(self.edges().unsafe_get(index));
+
+        ptr::copy_memory(
+            self.edges_mut().as_mut_ptr().offset(index as int),
+            self.edges().as_ptr().offset(index as int + 1),
+            self.len() - index + 1
+        );
+
+        edge
+    }
+}
+
+// Private implementation details
+impl<K, V> Node<K, V> {
+    /// Node is full, so split it into two nodes, and yield the middle-most key-value pair
+    /// because we have one too many, and our parent now has one too few
+    fn split(&mut self) -> (K, V, Node<K, V>) {
+        // Necessary for correctness, but in a private funtion
+        debug_assert!(self.len() > 0);
+
+        let mut right = if self.is_leaf() {
+            Node::new_leaf(self.capacity())
+        } else {
+            unsafe { Node::new_internal(self.capacity()) }
+        };
+
+        unsafe {
+            right._len = self.len() / 2;
+            let right_offset = self.len() - right.len();
+            ptr::copy_nonoverlapping_memory(
+                right.keys_mut().as_mut_ptr(),
+                self.keys().as_ptr().offset(right_offset as int),
+                right.len()
+            );
+            ptr::copy_nonoverlapping_memory(
+                right.vals_mut().as_mut_ptr(),
+                self.vals().as_ptr().offset(right_offset as int),
+                right.len()
+            );
+            if !self.is_leaf() {
+                ptr::copy_nonoverlapping_memory(
+                    right.edges_mut().as_mut_ptr(),
+                    self.edges().as_ptr().offset(right_offset as int),
+                    right.len() + 1
+                );
+            }
+
+            let key = ptr::read(self.keys().unsafe_get(right_offset - 1));
+            let val = ptr::read(self.vals().unsafe_get(right_offset - 1));
+
+            self._len = right_offset - 1;
+
+            (key, val, right)
+        }
+    }
+
+    /// Take all the values from right, seperated by the given key and value
+    fn absorb(&mut self, key: K, val: V, mut right: Node<K, V>) {
+        // Necessary for correctness, but in a private function
+        // Just as a sanity check, make sure we can fit this guy in
+        debug_assert!(self.len() + right.len() <= self.capacity());
+        debug_assert!(self.is_leaf() == right.is_leaf());
+
+        unsafe {
+            let old_len = self.len();
+            self._len += right.len() + 1;
+
+            ptr::write(self.keys_mut().unsafe_mut(old_len), key);
+            ptr::write(self.vals_mut().unsafe_mut(old_len), val);
+
+            ptr::copy_nonoverlapping_memory(
+                self.keys_mut().as_mut_ptr().offset(old_len as int + 1),
+                right.keys().as_ptr(),
+                right.len()
+            );
+            ptr::copy_nonoverlapping_memory(
+                self.vals_mut().as_mut_ptr().offset(old_len as int + 1),
+                right.vals().as_ptr(),
+                right.len()
+            );
+            if !self.is_leaf() {
+                ptr::copy_nonoverlapping_memory(
+                    self.edges_mut().as_mut_ptr().offset(old_len as int + 1),
+                    right.edges().as_ptr(),
+                    right.len() + 1
+                );
+            }
+
+            right.destroy();
+            mem::forget(right);
+        }
     }
-    right
 }
 
 /// Get the capacity of a node from the order of the parent B-Tree
@@ -497,10 +1316,89 @@ fn min_load_from_capacity(cap: uint) -> uint {
     cap / 2
 }
 
+/// A trait for pairs of `Iterator`s, one over edges and the other over key/value pairs. This is
+/// necessary, as the `MoveTraversalImpl` needs to have a destructor that deallocates the `Node`,
+/// and a pair of `Iterator`s would require two independent destructors.
+trait TraversalImpl<K, V, E> {
+    fn next_kv(&mut self) -> Option<(K, V)>;
+    fn next_kv_back(&mut self) -> Option<(K, V)>;
+
+    fn next_edge(&mut self) -> Option<E>;
+    fn next_edge_back(&mut self) -> Option<E>;
+}
+
+/// A `TraversalImpl` that actually is backed by two iterators. This works in the non-moving case,
+/// as no deallocation needs to be done.
+struct ElemsAndEdges<Elems, Edges>(Elems, Edges);
+
+impl<K, V, E, Elems: DoubleEndedIterator<(K, V)>, Edges: DoubleEndedIterator<E>>
+        TraversalImpl<K, V, E> for ElemsAndEdges<Elems, Edges> {
+
+    fn next_kv(&mut self) -> Option<(K, V)> { self.0.next() }
+    fn next_kv_back(&mut self) -> Option<(K, V)> { self.0.next_back() }
+
+    fn next_edge(&mut self) -> Option<E> { self.1.next() }
+    fn next_edge_back(&mut self) -> Option<E> { self.1.next_back() }
+}
+
+/// A `TraversalImpl` taking a `Node` by value.
+struct MoveTraversalImpl<K, V> {
+    keys: RawItems<K>,
+    vals: RawItems<V>,
+    edges: RawItems<Node<K, V>>,
+
+    // For deallocation when we are done iterating.
+    ptr: *mut u8,
+    capacity: uint,
+    is_leaf: bool
+}
+
+impl<K, V> TraversalImpl<K, V, Node<K, V>> for MoveTraversalImpl<K, V> {
+    fn next_kv(&mut self) -> Option<(K, V)> {
+        match (self.keys.next(), self.vals.next()) {
+            (Some(k), Some(v)) => Some((k, v)),
+            _ => None
+        }
+    }
+
+    fn next_kv_back(&mut self) -> Option<(K, V)> {
+        match (self.keys.next_back(), self.vals.next_back()) {
+            (Some(k), Some(v)) => Some((k, v)),
+            _ => None
+        }
+    }
+
+    fn next_edge(&mut self) -> Option<Node<K, V>> {
+        // Necessary for correctness, but in a private module
+        debug_assert!(!self.is_leaf);
+        self.edges.next()
+    }
+
+    fn next_edge_back(&mut self) -> Option<Node<K, V>> {
+        // Necessary for correctness, but in a private module
+        debug_assert!(!self.is_leaf);
+        self.edges.next_back()
+    }
+}
+
+#[unsafe_destructor]
+impl<K, V> Drop for MoveTraversalImpl<K, V> {
+    fn drop(&mut self) {
+        // We need to cleanup the stored values manually, as the RawItems destructor would run
+        // after our deallocation.
+        for _ in self.keys {}
+        for _ in self.vals {}
+        for _ in self.edges {}
+
+        let (alignment, size) =
+                calculate_allocation_generic::<K, V>(self.capacity, self.is_leaf);
+        unsafe { heap::deallocate(self.ptr, size, alignment) };
+    }
+}
+
 /// An abstraction over all the different kinds of traversals a node supports
-struct AbsTraversal<Elems, Edges> {
-    elems: Elems,
-    edges: Edges,
+struct AbsTraversal<Impl> {
+    inner: Impl,
     head_is_edge: bool,
     tail_is_edge: bool,
     has_edges: bool,
@@ -513,44 +1411,45 @@ pub enum TraversalItem<K, V, E> {
 }
 
 /// A traversal over a node's entries and edges
-pub type Traversal<'a, K, V> = AbsTraversal<Zip<slice::Items<'a, K>, slice::Items<'a, V>>,
-                                            slice::Items<'a, Node<K, V>>>;
+pub type Traversal<'a, K, V> = AbsTraversal<ElemsAndEdges<Zip<slice::Items<'a, K>,
+                                                              slice::Items<'a, V>>,
+                                                              slice::Items<'a, Node<K, V>>>>;
 
 /// A mutable traversal over a node's entries and edges
-pub type MutTraversal<'a, K, V> = AbsTraversal<Zip<slice::Items<'a, K>, slice::MutItems<'a, V>>,
-                                               slice::MutItems<'a, Node<K, V>>>;
+pub type MutTraversal<'a, K, V> = AbsTraversal<ElemsAndEdges<Zip<slice::Items<'a, K>,
+                                                                 slice::MutItems<'a, V>>,
+                                                                 slice::MutItems<'a, Node<K, V>>>>;
 
 /// An owning traversal over a node's entries and edges
-pub type MoveTraversal<K, V> = AbsTraversal<Zip<vec::MoveItems<K>, vec::MoveItems<V>>,
-                                                vec::MoveItems<Node<K, V>>>;
+pub type MoveTraversal<K, V> = AbsTraversal<MoveTraversalImpl<K, V>>;
 
 
-impl<K, V, E, Elems: Iterator<(K, V)>, Edges: Iterator<E>>
-        Iterator<TraversalItem<K, V, E>> for AbsTraversal<Elems, Edges> {
+impl<K, V, E, Impl: TraversalImpl<K, V, E>>
+        Iterator<TraversalItem<K, V, E>> for AbsTraversal<Impl> {
 
     fn next(&mut self) -> Option<TraversalItem<K, V, E>> {
         let head_is_edge = self.head_is_edge;
         self.head_is_edge = !head_is_edge;
 
         if head_is_edge && self.has_edges {
-            self.edges.next().map(|node| Edge(node))
+            self.inner.next_edge().map(|node| Edge(node))
         } else {
-            self.elems.next().map(|(k, v)| Elem(k, v))
+            self.inner.next_kv().map(|(k, v)| Elem(k, v))
         }
     }
 }
 
-impl<K, V, E, Elems: DoubleEndedIterator<(K, V)>, Edges: DoubleEndedIterator<E>>
-        DoubleEndedIterator<TraversalItem<K, V, E>> for AbsTraversal<Elems, Edges> {
+impl<K, V, E, Impl: TraversalImpl<K, V, E>>
+        DoubleEndedIterator<TraversalItem<K, V, E>> for AbsTraversal<Impl> {
 
     fn next_back(&mut self) -> Option<TraversalItem<K, V, E>> {
         let tail_is_edge = self.tail_is_edge;
         self.tail_is_edge = !tail_is_edge;
 
         if tail_is_edge && self.has_edges {
-            self.edges.next_back().map(|node| Edge(node))
+            self.inner.next_edge_back().map(|node| Edge(node))
         } else {
-            self.elems.next_back().map(|(k, v)| Elem(k, v))
+            self.inner.next_kv_back().map(|(k, v)| Elem(k, v))
         }
     }
 }
index 2f9c383660441a8d7fc47b4b09ad8b1da2b81105..cd01c008fe1bc3a92654950c7ebc06dc2f4e1a7b 100644 (file)
@@ -22,7 +22,6 @@
 use core::fmt::Show;
 
 // FIXME(conventions): implement bounded iterators
-// FIXME(conventions): implement BitOr, BitAnd, BitXor, and Sub
 
 /// A set based on a B-Tree.
 ///
@@ -37,7 +36,8 @@ pub struct BTreeSet<T>{
 pub type Items<'a, T> = Keys<'a, T, ()>;
 
 /// An owning iterator over a BTreeSet's items.
-pub type MoveItems<T> = iter::Map<'static, (T, ()), T, MoveEntries<T, ()>>;
+pub type MoveItems<T> =
+    iter::Map<(T, ()), T, MoveEntries<T, ()>, fn((T, ())) -> T>;
 
 /// A lazy iterator producing elements in the set difference (in-order).
 pub struct DifferenceItems<'a, T:'a> {
@@ -88,7 +88,9 @@ pub fn iter<'a>(&'a self) -> Items<'a, T> {
     /// Gets an iterator for moving out the BtreeSet's contents.
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(self) -> MoveItems<T> {
-        self.map.into_iter().map(|(k, _)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.map.into_iter().map(first)
     }
 }
 
@@ -406,6 +408,90 @@ fn default() -> BTreeSet<T> {
     }
 }
 
+#[unstable = "matches collection reform specification, waiting for dust to settle"]
+impl<T: Ord + Clone> Sub<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
+    /// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeSet;
+    ///
+    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
+    /// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
+    ///
+    /// let result: BTreeSet<int> = a - b;
+    /// let result_vec: Vec<int> = result.into_iter().collect();
+    /// assert_eq!(result_vec, vec![1,2]);
+    /// ```
+    fn sub(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
+        self.difference(rhs).cloned().collect()
+    }
+}
+
+#[unstable = "matches collection reform specification, waiting for dust to settle"]
+impl<T: Ord + Clone> BitXor<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
+    /// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeSet;
+    ///
+    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
+    /// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
+    ///
+    /// let result: BTreeSet<int> = a ^ b;
+    /// let result_vec: Vec<int> = result.into_iter().collect();
+    /// assert_eq!(result_vec, vec![1,4]);
+    /// ```
+    fn bitxor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
+        self.symmetric_difference(rhs).cloned().collect()
+    }
+}
+
+#[unstable = "matches collection reform specification, waiting for dust to settle"]
+impl<T: Ord + Clone> BitAnd<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
+    /// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeSet;
+    ///
+    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
+    /// let b: BTreeSet<int> = vec![2,3,4].into_iter().collect();
+    ///
+    /// let result: BTreeSet<int> = a & b;
+    /// let result_vec: Vec<int> = result.into_iter().collect();
+    /// assert_eq!(result_vec, vec![2,3]);
+    /// ```
+    fn bitand(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
+        self.intersection(rhs).cloned().collect()
+    }
+}
+
+#[unstable = "matches collection reform specification, waiting for dust to settle"]
+impl<T: Ord + Clone> BitOr<BTreeSet<T>,BTreeSet<T>> for BTreeSet<T> {
+    /// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::collections::BTreeSet;
+    ///
+    /// let a: BTreeSet<int> = vec![1,2,3].into_iter().collect();
+    /// let b: BTreeSet<int> = vec![3,4,5].into_iter().collect();
+    ///
+    /// let result: BTreeSet<int> = a | b;
+    /// let result_vec: Vec<int> = result.into_iter().collect();
+    /// assert_eq!(result_vec, vec![1,2,3,4,5]);
+    /// ```
+    fn bitor(&self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
+        self.union(rhs).cloned().collect()
+    }
+}
+
 impl<T: Show> Show for BTreeSet<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(f, "{{"));
@@ -517,10 +603,23 @@ fn test_hash() {
       assert!(hash::hash(&x) == hash::hash(&y));
     }
 
-    fn check(a: &[int],
-             b: &[int],
-             expected: &[int],
-             f: |&BTreeSet<int>, &BTreeSet<int>, f: |&int| -> bool| -> bool) {
+    struct Counter<'a, 'b> {
+        i: &'a mut uint,
+        expected: &'b [int],
+    }
+
+    impl<'a, 'b> FnMut(&int) -> bool for Counter<'a, 'b> {
+        extern "rust-call" fn call_mut(&mut self, (&x,): (&int,)) -> bool {
+            assert_eq!(x, self.expected[*self.i]);
+            *self.i += 1;
+            true
+        }
+    }
+
+    fn check<F>(a: &[int], b: &[int], expected: &[int], f: F) where
+        // FIXME Replace Counter with `Box<FnMut(_) -> _>`
+        F: FnOnce(&BTreeSet<int>, &BTreeSet<int>, Counter) -> bool,
+    {
         let mut set_a = BTreeSet::new();
         let mut set_b = BTreeSet::new();
 
@@ -528,11 +627,7 @@ fn check(a: &[int],
         for y in b.iter() { assert!(set_b.insert(*y)) }
 
         let mut i = 0;
-        f(&set_a, &set_b, |x| {
-            assert_eq!(*x, expected[i]);
-            i += 1;
-            true
-        });
+        f(&set_a, &set_b, Counter { i: &mut i, expected: expected });
         assert_eq!(i, expected.len());
     }
 
index b7adaa4227c54dde4318eddeb5f2a07e785ac3d3..df86ac96424b5529cf23f0e5edad29700f823066 100644 (file)
@@ -10,7 +10,8 @@
 
 //! A doubly-linked list with owned nodes.
 //!
-//! The `DList` allows pushing and popping elements at either end.
+//! The `DList` allows pushing and popping elements at either end and is thus
+//! efficiently usable as a double-ended queue.
 
 // DList is constructed like a singly-linked list over the field `next`.
 // including the last link being None; each Node owns its `next` field.
@@ -350,18 +351,16 @@ pub fn prepend(&mut self, mut other: DList<T>) {
     ///     println!("{}", e); // prints 2, then 4, then 11, then 7, then 8
     /// }
     /// ```
-    pub fn insert_when(&mut self, elt: T, f: |&T, &T| -> bool) {
-        {
-            let mut it = self.iter_mut();
-            loop {
-                match it.peek_next() {
-                    None => break,
-                    Some(x) => if f(x, &elt) { break }
-                }
-                it.next();
+    pub fn insert_when<F>(&mut self, elt: T, mut f: F) where F: FnMut(&T, &T) -> bool {
+        let mut it = self.iter_mut();
+        loop {
+            match it.peek_next() {
+                None => break,
+                Some(x) => if f(x, &elt) { break }
             }
-            it.insert_next(elt);
+            it.next();
         }
+        it.insert_next(elt);
     }
 
     /// Merges `other` into this `DList`, using the function `f`.
@@ -370,7 +369,7 @@ pub fn insert_when(&mut self, elt: T, f: |&T, &T| -> bool) {
     /// put `a` in the result if `f(a, b)` is true, and otherwise `b`.
     ///
     /// This operation should compute in O(max(N, M)) time.
-    pub fn merge(&mut self, mut other: DList<T>, f: |&T, &T| -> bool) {
+    pub fn merge<F>(&mut self, mut other: DList<T>, mut f: F) where F: FnMut(&T, &T) -> bool {
         {
             let mut it = self.iter_mut();
             loop {
@@ -1134,7 +1133,7 @@ fn test_mut_rev_iter() {
     #[test]
     fn test_send() {
         let n = list_from(&[1i,2,3]);
-        spawn(proc() {
+        spawn(move || {
             check_links(&n);
             let a: &[_] = &[&1,&2,&3];
             assert_eq!(a, n.iter().collect::<Vec<&int>>());
index 28514b991921180d81fdcab2905dd4a84eda197c..d8dc1f36e056d6e4ab6d310c1cbae730745c30f3 100644 (file)
@@ -20,7 +20,7 @@
 // FIXME(contentions): implement union family of methods? (general design may be wrong here)
 
 #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
-/// A specialized `Set` implementation to use enum types.
+/// A specialized set implementation to use enum types.
 pub struct EnumSet<E> {
     // We must maintain the invariant that no bits are set
     // for which no variant exists
index 1e104b314478dc08675aa4b55c74eb0ced937dd2..039bbcd2b70205a410d5d64f61d89269ab38dd07 100644 (file)
@@ -24,6 +24,7 @@
 #![allow(unknown_features)]
 #![feature(macro_rules, default_type_params, phase, globs)]
 #![feature(unsafe_destructor, import_shadowing, slicing_syntax)]
+#![feature(tuple_indexing, unboxed_closures)]
 #![no_std]
 
 #[phase(plugin, link)] extern crate core;
@@ -114,5 +115,6 @@ mod std {
     pub use core::option;   // necessary for panic!()
     pub use core::clone;    // deriving(Clone)
     pub use core::cmp;      // deriving(Eq, Ord, etc.)
+    pub use core::kinds;    // deriving(Copy)
     pub use hash;           // deriving(Hash)
 }
index 2751156429083027aa5da0ffe1cb9e2a1e293199..084b585d7b99db93ffb4a1fe773b765309cd331a 100644 (file)
@@ -34,7 +34,7 @@
 // FIXME(conventions): implement shrink_to_fit. Awkward with the current design, but it should
 // be scrapped anyway. Defer to rewrite?
 
-/// `RingBuf` is a circular buffer.
+/// `RingBuf` is a circular buffer, which can be used as a double-ended queue efficiently.
 pub struct RingBuf<T> {
     // tail and head are pointers into the buffer. Tail always points
     // to the first element that could be read, Head always points
@@ -99,6 +99,21 @@ fn is_full(&self) -> bool { self.cap - self.len() == 1 }
     /// Returns the index in the underlying buffer for a given logical element index.
     #[inline]
     fn wrap_index(&self, idx: uint) -> uint { wrap_index(idx, self.cap) }
+
+    /// Copies a contiguous block of memory len long from src to dst
+    #[inline]
+    fn copy(&self, dst: uint, src: uint, len: uint) {
+        unsafe {
+            debug_assert!(dst + len <= self.cap, "dst={} src={} len={} cap={}", dst, src, len,
+                          self.cap);
+            debug_assert!(src + len <= self.cap, "dst={} src={} len={} cap={}", dst, src, len,
+                          self.cap);
+            ptr::copy_memory(
+                self.ptr.offset(dst as int),
+                self.ptr.offset(src as int) as *const T,
+                len);
+        }
+    }
 }
 
 impl<T> RingBuf<T> {
@@ -648,6 +663,213 @@ pub fn pop_back(&mut self) -> Option<T> {
             unsafe { Some(self.buffer_read(head)) }
         }
     }
+
+    /// Inserts an element at position `i` within the ringbuf. Whichever
+    /// end is closer to the insertion point will be moved to make room,
+    /// and all the affected elements will be moved to new positions.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `i` is greater than ringbuf's length
+    ///
+    /// # Example
+    /// ```rust
+    /// use std::collections::RingBuf;
+    ///
+    /// let mut buf = RingBuf::new();
+    /// buf.push_back(10i);
+    /// buf.push_back(12);
+    /// buf.insert(1,11);
+    /// assert_eq!(Some(&11), buf.get(1));
+    /// ```
+    pub fn insert(&mut self, i: uint, t: T) {
+        assert!(i <= self.len(), "index out of bounds");
+        if self.is_full() {
+            self.reserve(1);
+            debug_assert!(!self.is_full());
+        }
+
+        // Move the least number of elements in the ring buffer and insert
+        // the given object
+        //
+        // At most len/2 - 1 elements will be moved. O(min(n, n-i))
+        //
+        // There are three main cases:
+        //  Elements are contiguous
+        //      - special case when tail is 0
+        //  Elements are discontiguous and the insert is in the tail section
+        //  Elements are discontiguous and the insert is in the head section
+        //
+        // For each of those there are two more cases:
+        //  Insert is closer to tail
+        //  Insert is closer to head
+        //
+        // Key: H - self.head
+        //      T - self.tail
+        //      o - Valid element
+        //      I - Insertion element
+        //      A - The element that should be after the insertion point
+        //      M - Indicates element was moved
+
+        let idx = self.wrap_index(self.tail + i);
+
+        let distance_to_tail = i;
+        let distance_to_head = self.len() - i;
+
+        let contiguous = self.tail <= self.head;
+
+        match (contiguous, distance_to_tail <= distance_to_head, idx >= self.tail) {
+            (true, true, _) if i == 0 => {
+                // push_front
+                //
+                //       T
+                //       I             H
+                //      [A o o o o o o . . . . . . . . .]
+                //
+                //                       H         T
+                //      [A o o o o o o o . . . . . I]
+                //
+
+                self.tail = self.wrap_index(self.tail - 1);
+            },
+            (true, true, _) => {
+                // contiguous, insert closer to tail:
+                //
+                //             T   I         H
+                //      [. . . o o A o o o o . . . . . .]
+                //
+                //           T               H
+                //      [. . o o I A o o o o . . . . . .]
+                //           M M
+                //
+                // contiguous, insert closer to tail and tail is 0:
+                //
+                //
+                //       T   I         H
+                //      [o o A o o o o . . . . . . . . .]
+                //
+                //                       H             T
+                //      [o I A o o o o o . . . . . . . o]
+                //       M                             M
+
+                let old_tail = self.tail;
+                self.tail = self.wrap_index(self.tail - 1);
+
+                self.copy(self.tail, old_tail, 1);
+                self.copy(old_tail, old_tail + 1, i);
+            },
+            (true, false, _) => {
+                //  contiguous, insert closer to head:
+                //
+                //             T       I     H
+                //      [. . . o o o o A o o . . . . . .]
+                //
+                //             T               H
+                //      [. . . o o o o I A o o . . . . .]
+                //                       M M M
+
+                let old_head = self.head;
+                self.head = self.wrap_index(self.head + 1);
+                self.copy(idx + 1, idx, old_head - idx);
+            },
+            (false, true, true) => {
+                // discontiguous, tail section, insert closer to tail:
+                //
+                //                   H         T   I
+                //      [o o o o o o . . . . . o o A o o]
+                //
+                //                   H       T
+                //      [o o o o o o . . . . o o I A o o]
+                //                           M M
+
+                let old_tail = self.tail;
+                self.tail = self.tail - 1;
+                self.copy(self.tail, old_tail, i);
+            },
+            (false, false, true) => {
+                // discontiguous, tail section, insert closer to head:
+                //
+                //           H             T         I
+                //      [o o . . . . . . . o o o o o A o]
+                //
+                //             H           T
+                //      [o o o . . . . . . o o o o o I A]
+                //       M M M                         M
+
+                let old_head = self.head;
+                self.head = self.head + 1;
+
+                // copy elements up to new head
+                self.copy(1, 0, old_head);
+
+                // copy last element into empty spot at bottom of buffer
+                self.copy(0, self.cap - 1, 1);
+
+                // move elements from idx to end forward not including ^ element
+                self.copy(idx + 1, idx, self.cap - 1 - idx);
+            },
+            (false, true, false) if idx == 0 => {
+                // discontiguous, head section, insert is closer to tail,
+                // and is at index zero in the internal buffer:
+                //
+                //       I                   H     T
+                //      [A o o o o o o o o o . . . o o o]
+                //
+                //                           H   T
+                //      [A o o o o o o o o o . . o o o I]
+                //                               M M M
+
+                let old_tail = self.tail;
+                self.tail = self.tail - 1;
+                // copy elements up to new tail
+                self.copy(old_tail - 1, old_tail, i);
+
+                // copy last element into empty spot at bottom of buffer
+                self.copy(self.cap - 1, 0, 1);
+            },
+            (false, true, false) => {
+                // discontiguous, head section, insert closer to tail:
+                //
+                //             I             H     T
+                //      [o o o A o o o o o o . . . o o o]
+                //
+                //                           H   T
+                //      [o o I A o o o o o o . . o o o o]
+                //       M M                     M M M M
+
+                let old_tail = self.tail;
+                self.tail = self.tail - 1;
+                // copy elements up to new tail
+                self.copy(old_tail - 1, old_tail, i);
+
+                // copy last element into empty spot at bottom of buffer
+                self.copy(self.cap - 1, 0, 1);
+
+                // move elements from idx-1 to end forward not including ^ element
+                self.copy(0, 1, idx - 1);
+            }
+            (false, false, false) => {
+                // discontiguous, head section, insert closer to head:
+                //
+                //               I     H           T
+                //      [o o o o A o o . . . . . . o o o]
+                //
+                //                     H           T
+                //      [o o o o I A o o . . . . . o o o]
+                //                 M M M
+
+                let old_head = self.head;
+                self.head = self.head + 1;
+                self.copy(idx + 1, idx, old_head - idx);
+            }
+        }
+
+        // tail might've been changed so we need to recalculate
+        let new_idx = self.wrap_index(self.tail + i);
+        unsafe {
+            self.buffer_write(new_idx, t);
+        }
+    }
 }
 
 /// Returns the index in the underlying buffer for a given logical element index.
@@ -878,6 +1100,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 #[cfg(test)]
 mod tests {
+    use core::iter;
     use self::Taggy::*;
     use self::Taggypar::*;
     use std::fmt::Show;
@@ -1102,7 +1325,6 @@ fn bench_mut_iter_1000(b: &mut test::Bencher) {
         })
     }
 
-
     #[deriving(Clone, PartialEq, Show)]
     enum Taggy {
         One(int),
@@ -1666,4 +1888,48 @@ fn test_get_mut() {
         assert_eq!(ring.get_mut(1), Some(&mut 2));
         assert_eq!(ring.get_mut(2), None);
     }
+
+    #[test]
+    fn test_insert() {
+        // This test checks that every single combination of tail position, length, and
+        // insertion position is tested. Capacity 7 should be large enough to cover every case.
+
+        let mut tester = RingBuf::with_capacity(7);
+        // can't guarantee we got 7, so have to get what we got.
+        // 7 would be great, but we will definitely get 2^k - 1, for k >= 3, or else
+        // this test isn't covering what it wants to
+        let cap = tester.capacity();
+
+
+        // len is the length *after* insertion
+        for len in range(1, cap) {
+            // 0, 1, 2, .., len - 1
+            let expected = iter::count(0, 1).take(len).collect();
+            for tail_pos in range(0, cap) {
+                for to_insert in range(0, len) {
+                    tester.tail = tail_pos;
+                    tester.head = tail_pos;
+                    for i in range(0, len) {
+                        if i != to_insert {
+                            tester.push_back(i);
+                        }
+                    }
+                    tester.insert(to_insert, to_insert);
+                    assert_eq!(tester, expected);
+                }
+            }
+        }
+    }
+
+    #[test]
+    fn test_front() {
+        let mut ring = RingBuf::new();
+        ring.push_back(10i);
+        ring.push_back(20i);
+        assert_eq!(ring.front(), Some(&10));
+        ring.pop_front();
+        assert_eq!(ring.front(), Some(&20));
+        ring.pop_front();
+        assert_eq!(ring.front(), None);
+    }
 }
index 6bdfa490748fa20c001bfff6ba7095c470c4c321..463e28b420d157c6d7bbf6d72aeae439bd1a070b 100644 (file)
@@ -94,6 +94,7 @@
 use core::kinds::{Copy, Sized};
 use core::mem::size_of;
 use core::mem;
+use core::ops::FnMut;
 use core::prelude::{Clone, Greater, Iterator, IteratorExt, Less, None, Option};
 use core::prelude::{Ord, Ordering, RawPtr, Some, range};
 use core::ptr;
@@ -296,7 +297,7 @@ pub trait CloneSliceAllocPrelude<T> for Sized? {
 
     /// Partitions the vector into two vectors `(a, b)`, where all
     /// elements of `a` satisfy `f` and all elements of `b` do not.
-    fn partitioned(&self, f: |&T| -> bool) -> (Vec<T>, Vec<T>);
+    fn partitioned<F>(&self, f: F) -> (Vec<T>, Vec<T>) where F: FnMut(&T) -> bool;
 
     /// Creates an iterator that yields every possible permutation of the
     /// vector in succession.
@@ -336,7 +337,7 @@ fn to_vec(&self) -> Vec<T> {
 
 
     #[inline]
-    fn partitioned(&self, f: |&T| -> bool) -> (Vec<T>, Vec<T>) {
+    fn partitioned<F>(&self, mut f: F) -> (Vec<T>, Vec<T>) where F: FnMut(&T) -> bool {
         let mut lefts  = Vec::new();
         let mut rights = Vec::new();
 
@@ -361,7 +362,7 @@ fn permutations(&self) -> Permutations<T> {
 
 }
 
-fn insertion_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
+fn insertion_sort<T, F>(v: &mut [T], mut compare: F) where F: FnMut(&T, &T) -> Ordering {
     let len = v.len() as int;
     let buf_v = v.as_mut_ptr();
 
@@ -403,7 +404,7 @@ fn insertion_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
     }
 }
 
-fn merge_sort<T>(v: &mut [T], compare: |&T, &T| -> Ordering) {
+fn merge_sort<T, F>(v: &mut [T], mut compare: F) where F: FnMut(&T, &T) -> Ordering {
     // warning: this wildly uses unsafe.
     static BASE_INSERTION: uint = 32;
     static LARGE_INSERTION: uint = 16;
@@ -611,7 +612,7 @@ pub trait SliceAllocPrelude<T> for Sized? {
     /// v.sort_by(|a, b| b.cmp(a));
     /// assert!(v == [5, 4, 3, 2, 1]);
     /// ```
-    fn sort_by(&mut self, compare: |&T, &T| -> Ordering);
+    fn sort_by<F>(&mut self, compare: F) where F: FnMut(&T, &T) -> Ordering;
 
     /// Consumes `src` and moves as many elements as it can into `self`
     /// from the range [start,end).
@@ -639,7 +640,7 @@ pub trait SliceAllocPrelude<T> for Sized? {
 
 impl<T> SliceAllocPrelude<T> for [T] {
     #[inline]
-    fn sort_by(&mut self, compare: |&T, &T| -> Ordering) {
+    fn sort_by<F>(&mut self, compare: F) where F: FnMut(&T, &T) -> Ordering {
         merge_sort(self, compare)
     }
 
index b4e479b132d2171ba720c08eb74acc7fb3ac70bc..7664fb9c426ae653649335ff5c840394c42b6a63 100644 (file)
@@ -62,7 +62,7 @@
 use core::kinds::Sized;
 use core::prelude::{Char, Clone, Eq, Equiv};
 use core::prelude::{Iterator, IteratorExt, SlicePrelude, None, Option, Ord, Ordering};
-use core::prelude::{PartialEq, PartialOrd, Result, AsSlice, Some, Tuple2};
+use core::prelude::{PartialEq, PartialOrd, Result, AsSlice, Some};
 use core::prelude::{range};
 
 use hash;
@@ -185,8 +185,8 @@ fn canonical_sort(comb: &mut [(char, u8)]) {
     for i in range(0, len) {
         let mut swapped = false;
         for j in range(1, len-i) {
-            let class_a = *comb[j-1].ref1();
-            let class_b = *comb[j].ref1();
+            let class_a = comb[j-1].1;
+            let class_b = comb[j].1;
             if class_a != 0 && class_b != 0 && class_a > class_b {
                 comb.swap(j-1, j);
                 swapped = true;
@@ -876,18 +876,18 @@ fn test_len() {
         assert_eq!("".len(), 0u);
         assert_eq!("hello world".len(), 11u);
         assert_eq!("\x63".len(), 1u);
-        assert_eq!("\u00a2".len(), 2u);
-        assert_eq!("\u03c0".len(), 2u);
-        assert_eq!("\u2620".len(), 3u);
-        assert_eq!("\U0001d11e".len(), 4u);
+        assert_eq!("\u{a2}".len(), 2u);
+        assert_eq!("\u{3c0}".len(), 2u);
+        assert_eq!("\u{2620}".len(), 3u);
+        assert_eq!("\u{1d11e}".len(), 4u);
 
         assert_eq!("".char_len(), 0u);
         assert_eq!("hello world".char_len(), 11u);
         assert_eq!("\x63".char_len(), 1u);
-        assert_eq!("\u00a2".char_len(), 1u);
-        assert_eq!("\u03c0".char_len(), 1u);
-        assert_eq!("\u2620".char_len(), 1u);
-        assert_eq!("\U0001d11e".char_len(), 1u);
+        assert_eq!("\u{a2}".char_len(), 1u);
+        assert_eq!("\u{3c0}".char_len(), 1u);
+        assert_eq!("\u{2620}".char_len(), 1u);
+        assert_eq!("\u{1d11e}".char_len(), 1u);
         assert_eq!("ประเทศไทย中华Việt Nam".char_len(), 19u);
 
         assert_eq!("hello".width(false), 10u);
@@ -896,28 +896,28 @@ fn test_len() {
         assert_eq!("\0\0\0\0\0".width(true), 0u);
         assert_eq!("".width(false), 0u);
         assert_eq!("".width(true), 0u);
-        assert_eq!("\u2081\u2082\u2083\u2084".width(false), 4u);
-        assert_eq!("\u2081\u2082\u2083\u2084".width(true), 8u);
+        assert_eq!("\u{2081}\u{2082}\u{2083}\u{2084}".width(false), 4u);
+        assert_eq!("\u{2081}\u{2082}\u{2083}\u{2084}".width(true), 8u);
     }
 
     #[test]
     fn test_find() {
         assert_eq!("hello".find('l'), Some(2u));
-        assert_eq!("hello".find(|c:char| c == 'o'), Some(4u));
+        assert_eq!("hello".find(|&: c:char| c == 'o'), Some(4u));
         assert!("hello".find('x').is_none());
-        assert!("hello".find(|c:char| c == 'x').is_none());
+        assert!("hello".find(|&: c:char| c == 'x').is_none());
         assert_eq!("ประเทศไทย中华Việt Nam".find('华'), Some(30u));
-        assert_eq!("ประเทศไทย中华Việt Nam".find(|c: char| c == '华'), Some(30u));
+        assert_eq!("ประเทศไทย中华Việt Nam".find(|&: c: char| c == '华'), Some(30u));
     }
 
     #[test]
     fn test_rfind() {
         assert_eq!("hello".rfind('l'), Some(3u));
-        assert_eq!("hello".rfind(|c:char| c == 'o'), Some(4u));
+        assert_eq!("hello".rfind(|&: c:char| c == 'o'), Some(4u));
         assert!("hello".rfind('x').is_none());
-        assert!("hello".rfind(|c:char| c == 'x').is_none());
+        assert!("hello".rfind(|&: c:char| c == 'x').is_none());
         assert_eq!("ประเทศไทย中华Việt Nam".rfind('华'), Some(30u));
-        assert_eq!("ประเทศไทย中华Việt Nam".rfind(|c: char| c == '华'), Some(30u));
+        assert_eq!("ประเทศไทย中华Việt Nam".rfind(|&: c: char| c == '华'), Some(30u));
     }
 
     #[test]
@@ -1193,7 +1193,7 @@ fn test_slice() {
         assert_eq!("ab", "abc".slice(0, 2));
         assert_eq!("bc", "abc".slice(1, 3));
         assert_eq!("", "abc".slice(1, 1));
-        assert_eq!("\u65e5", "\u65e5\u672c".slice(0, 3));
+        assert_eq!("\u{65e5}", "\u{65e5}\u{672c}".slice(0, 3));
 
         let data = "ประเทศไทย中华";
         assert_eq!("ป", data.slice(0, 3));
@@ -1281,7 +1281,7 @@ fn test_trim_left_chars() {
         assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11");
         let chars: &[char] = &['1', '2'];
         assert_eq!("12foo1bar12".trim_left_chars(chars), "foo1bar12");
-        assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123");
+        assert_eq!("123foo1bar123".trim_left_chars(|&: c: char| c.is_numeric()), "foo1bar123");
     }
 
     #[test]
@@ -1296,7 +1296,7 @@ fn test_trim_right_chars() {
         assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar");
         let chars: &[char] = &['1', '2'];
         assert_eq!("12foo1bar12".trim_right_chars(chars), "12foo1bar");
-        assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar");
+        assert_eq!("123foo1bar123".trim_right_chars(|&: c: char| c.is_numeric()), "123foo1bar");
     }
 
     #[test]
@@ -1311,7 +1311,7 @@ fn test_trim_chars() {
         assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar");
         let chars: &[char] = &['1', '2'];
         assert_eq!("12foo1bar12".trim_chars(chars), "foo1bar");
-        assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar");
+        assert_eq!("123foo1bar123".trim_chars(|&: c: char| c.is_numeric()), "foo1bar");
     }
 
     #[test]
@@ -1320,7 +1320,7 @@ fn test_trim_left() {
         assert_eq!("a".trim_left(), "a");
         assert_eq!("    ".trim_left(), "");
         assert_eq!("     blah".trim_left(), "blah");
-        assert_eq!("   \u3000  wut".trim_left(), "wut");
+        assert_eq!("   \u{3000}  wut".trim_left(), "wut");
         assert_eq!("hey ".trim_left(), "hey ");
     }
 
@@ -1330,7 +1330,7 @@ fn test_trim_right() {
         assert_eq!("a".trim_right(), "a");
         assert_eq!("    ".trim_right(), "");
         assert_eq!("blah     ".trim_right(), "blah");
-        assert_eq!("wut   \u3000  ".trim_right(), "wut");
+        assert_eq!("wut   \u{3000}  ".trim_right(), "wut");
         assert_eq!(" hey".trim_right(), " hey");
     }
 
@@ -1340,7 +1340,7 @@ fn test_trim() {
         assert_eq!("a".trim(), "a");
         assert_eq!("    ".trim(), "");
         assert_eq!("    blah     ".trim(), "blah");
-        assert_eq!("\nwut   \u3000  ".trim(), "wut");
+        assert_eq!("\nwut   \u{3000}  ".trim(), "wut");
         assert_eq!(" hey dude ".trim(), "hey dude");
     }
 
@@ -1348,7 +1348,7 @@ fn test_trim() {
     fn test_is_whitespace() {
         assert!("".is_whitespace());
         assert!(" ".is_whitespace());
-        assert!("\u2009".is_whitespace()); // Thin space
+        assert!("\u{2009}".is_whitespace()); // Thin space
         assert!("  \n\t   ".is_whitespace());
         assert!(!"   _   ".is_whitespace());
     }
@@ -1603,13 +1603,13 @@ fn test_escape_unicode() {
         assert_eq!("a c".escape_unicode(), String::from_str("\\x61\\x20\\x63"));
         assert_eq!("\r\n\t".escape_unicode(), String::from_str("\\x0d\\x0a\\x09"));
         assert_eq!("'\"\\".escape_unicode(), String::from_str("\\x27\\x22\\x5c"));
-        assert_eq!("\x00\x01\u00fe\u00ff".escape_unicode(),
+        assert_eq!("\x00\x01\u{fe}\u{ff}".escape_unicode(),
                    String::from_str("\\x00\\x01\\u00fe\\u00ff"));
-        assert_eq!("\u0100\uffff".escape_unicode(), String::from_str("\\u0100\\uffff"));
-        assert_eq!("\U00010000\U0010ffff".escape_unicode(),
+        assert_eq!("\u{100}\u{ffff}".escape_unicode(), String::from_str("\\u0100\\uffff"));
+        assert_eq!("\u{10000}\u{10ffff}".escape_unicode(),
                    String::from_str("\\U00010000\\U0010ffff"));
-        assert_eq!("ab\ufb00".escape_unicode(), String::from_str("\\x61\\x62\\ufb00"));
-        assert_eq!("\U0001d4ea\r".escape_unicode(), String::from_str("\\U0001d4ea\\x0d"));
+        assert_eq!("ab\u{fb00}".escape_unicode(), String::from_str("\\x61\\x62\\ufb00"));
+        assert_eq!("\u{1d4ea}\r".escape_unicode(), String::from_str("\\U0001d4ea\\x0d"));
     }
 
     #[test]
@@ -1618,11 +1618,11 @@ fn test_escape_default() {
         assert_eq!("a c".escape_default(), String::from_str("a c"));
         assert_eq!("\r\n\t".escape_default(), String::from_str("\\r\\n\\t"));
         assert_eq!("'\"\\".escape_default(), String::from_str("\\'\\\"\\\\"));
-        assert_eq!("\u0100\uffff".escape_default(), String::from_str("\\u0100\\uffff"));
-        assert_eq!("\U00010000\U0010ffff".escape_default(),
+        assert_eq!("\u{100}\u{ffff}".escape_default(), String::from_str("\\u0100\\uffff"));
+        assert_eq!("\u{10000}\u{10ffff}".escape_default(),
                    String::from_str("\\U00010000\\U0010ffff"));
-        assert_eq!("ab\ufb00".escape_default(), String::from_str("ab\\ufb00"));
-        assert_eq!("\U0001d4ea\r".escape_default(), String::from_str("\\U0001d4ea\\r"));
+        assert_eq!("ab\u{fb00}".escape_default(), String::from_str("ab\\ufb00"));
+        assert_eq!("\u{1d4ea}\r".escape_default(), String::from_str("\\U0001d4ea\\r"));
     }
 
     #[test]
@@ -1787,14 +1787,14 @@ fn test_splitn_char_iterator() {
         let split: Vec<&str> = data.splitn(3, ' ').collect();
         assert_eq!(split, vec!["\nMäry", "häd", "ä", "little lämb\nLittle lämb\n"]);
 
-        let split: Vec<&str> = data.splitn(3, |c: char| c == ' ').collect();
+        let split: Vec<&str> = data.splitn(3, |&: c: char| c == ' ').collect();
         assert_eq!(split, vec!["\nMäry", "häd", "ä", "little lämb\nLittle lämb\n"]);
 
         // Unicode
         let split: Vec<&str> = data.splitn(3, 'ä').collect();
         assert_eq!(split, vec!["\nM", "ry h", "d ", " little lämb\nLittle lämb\n"]);
 
-        let split: Vec<&str> = data.splitn(3, |c: char| c == 'ä').collect();
+        let split: Vec<&str> = data.splitn(3, |&: c: char| c == 'ä').collect();
         assert_eq!(split, vec!["\nM", "ry h", "d ", " little lämb\nLittle lämb\n"]);
     }
 
@@ -1845,15 +1845,15 @@ macro_rules! t {
             }
         }
         t!("abc", "abc");
-        t!("\u1e0b\u01c4", "d\u0307\u01c4");
-        t!("\u2026", "\u2026");
-        t!("\u2126", "\u03a9");
-        t!("\u1e0b\u0323", "d\u0323\u0307");
-        t!("\u1e0d\u0307", "d\u0323\u0307");
-        t!("a\u0301", "a\u0301");
-        t!("\u0301a", "\u0301a");
-        t!("\ud4db", "\u1111\u1171\u11b6");
-        t!("\uac1c", "\u1100\u1162");
+        t!("\u{1e0b}\u{1c4}", "d\u{307}\u{1c4}");
+        t!("\u{2026}", "\u{2026}");
+        t!("\u{2126}", "\u{3a9}");
+        t!("\u{1e0b}\u{323}", "d\u{323}\u{307}");
+        t!("\u{1e0d}\u{307}", "d\u{323}\u{307}");
+        t!("a\u{301}", "a\u{301}");
+        t!("\u{301}a", "\u{301}a");
+        t!("\u{d4db}", "\u{1111}\u{1171}\u{11b6}");
+        t!("\u{ac1c}", "\u{1100}\u{1162}");
     }
 
     #[test]
@@ -1864,15 +1864,15 @@ macro_rules! t {
             }
         }
         t!("abc", "abc");
-        t!("\u1e0b\u01c4", "d\u0307DZ\u030c");
-        t!("\u2026", "...");
-        t!("\u2126", "\u03a9");
-        t!("\u1e0b\u0323", "d\u0323\u0307");
-        t!("\u1e0d\u0307", "d\u0323\u0307");
-        t!("a\u0301", "a\u0301");
-        t!("\u0301a", "\u0301a");
-        t!("\ud4db", "\u1111\u1171\u11b6");
-        t!("\uac1c", "\u1100\u1162");
+        t!("\u{1e0b}\u{1c4}", "d\u{307}DZ\u{30c}");
+        t!("\u{2026}", "...");
+        t!("\u{2126}", "\u{3a9}");
+        t!("\u{1e0b}\u{323}", "d\u{323}\u{307}");
+        t!("\u{1e0d}\u{307}", "d\u{323}\u{307}");
+        t!("a\u{301}", "a\u{301}");
+        t!("\u{301}a", "\u{301}a");
+        t!("\u{d4db}", "\u{1111}\u{1171}\u{11b6}");
+        t!("\u{ac1c}", "\u{1100}\u{1162}");
     }
 
     #[test]
@@ -1883,16 +1883,16 @@ macro_rules! t {
             }
         }
         t!("abc", "abc");
-        t!("\u1e0b\u01c4", "\u1e0b\u01c4");
-        t!("\u2026", "\u2026");
-        t!("\u2126", "\u03a9");
-        t!("\u1e0b\u0323", "\u1e0d\u0307");
-        t!("\u1e0d\u0307", "\u1e0d\u0307");
-        t!("a\u0301", "\u00e1");
-        t!("\u0301a", "\u0301a");
-        t!("\ud4db", "\ud4db");
-        t!("\uac1c", "\uac1c");
-        t!("a\u0300\u0305\u0315\u05aeb", "\u00e0\u05ae\u0305\u0315b");
+        t!("\u{1e0b}\u{1c4}", "\u{1e0b}\u{1c4}");
+        t!("\u{2026}", "\u{2026}");
+        t!("\u{2126}", "\u{3a9}");
+        t!("\u{1e0b}\u{323}", "\u{1e0d}\u{307}");
+        t!("\u{1e0d}\u{307}", "\u{1e0d}\u{307}");
+        t!("a\u{301}", "\u{e1}");
+        t!("\u{301}a", "\u{301}a");
+        t!("\u{d4db}", "\u{d4db}");
+        t!("\u{ac1c}", "\u{ac1c}");
+        t!("a\u{300}\u{305}\u{315}\u{5ae}b", "\u{e0}\u{5ae}\u{305}\u{315}b");
     }
 
     #[test]
@@ -1903,16 +1903,16 @@ macro_rules! t {
             }
         }
         t!("abc", "abc");
-        t!("\u1e0b\u01c4", "\u1e0bD\u017d");
-        t!("\u2026", "...");
-        t!("\u2126", "\u03a9");
-        t!("\u1e0b\u0323", "\u1e0d\u0307");
-        t!("\u1e0d\u0307", "\u1e0d\u0307");
-        t!("a\u0301", "\u00e1");
-        t!("\u0301a", "\u0301a");
-        t!("\ud4db", "\ud4db");
-        t!("\uac1c", "\uac1c");
-        t!("a\u0300\u0305\u0315\u05aeb", "\u00e0\u05ae\u0305\u0315b");
+        t!("\u{1e0b}\u{1c4}", "\u{1e0b}D\u{17d}");
+        t!("\u{2026}", "...");
+        t!("\u{2126}", "\u{3a9}");
+        t!("\u{1e0b}\u{323}", "\u{1e0d}\u{307}");
+        t!("\u{1e0d}\u{307}", "\u{1e0d}\u{307}");
+        t!("a\u{301}", "\u{e1}");
+        t!("\u{301}a", "\u{301}a");
+        t!("\u{d4db}", "\u{d4db}");
+        t!("\u{ac1c}", "\u{ac1c}");
+        t!("a\u{300}\u{305}\u{315}\u{5ae}b", "\u{e0}\u{5ae}\u{305}\u{315}b");
     }
 
     #[test]
@@ -1932,238 +1932,361 @@ fn test_graphemes() {
         // official Unicode test data
         // from http://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt
         let test_same: [(_, &[_]), .. 325] = [
-            ("\u0020\u0020", &["\u0020", "\u0020"]), ("\u0020\u0308\u0020", &["\u0020\u0308",
-            "\u0020"]), ("\u0020\u000D", &["\u0020", "\u000D"]), ("\u0020\u0308\u000D",
-            &["\u0020\u0308", "\u000D"]), ("\u0020\u000A", &["\u0020", "\u000A"]),
-            ("\u0020\u0308\u000A", &["\u0020\u0308", "\u000A"]), ("\u0020\u0001", &["\u0020",
-            "\u0001"]), ("\u0020\u0308\u0001", &["\u0020\u0308", "\u0001"]), ("\u0020\u0300",
-            &["\u0020\u0300"]), ("\u0020\u0308\u0300", &["\u0020\u0308\u0300"]), ("\u0020\u1100",
-            &["\u0020", "\u1100"]), ("\u0020\u0308\u1100", &["\u0020\u0308", "\u1100"]),
-            ("\u0020\u1160", &["\u0020", "\u1160"]), ("\u0020\u0308\u1160", &["\u0020\u0308",
-            "\u1160"]), ("\u0020\u11A8", &["\u0020", "\u11A8"]), ("\u0020\u0308\u11A8",
-            &["\u0020\u0308", "\u11A8"]), ("\u0020\uAC00", &["\u0020", "\uAC00"]),
-            ("\u0020\u0308\uAC00", &["\u0020\u0308", "\uAC00"]), ("\u0020\uAC01", &["\u0020",
-            "\uAC01"]), ("\u0020\u0308\uAC01", &["\u0020\u0308", "\uAC01"]), ("\u0020\U0001F1E6",
-            &["\u0020", "\U0001F1E6"]), ("\u0020\u0308\U0001F1E6", &["\u0020\u0308",
-            "\U0001F1E6"]), ("\u0020\u0378", &["\u0020", "\u0378"]), ("\u0020\u0308\u0378",
-            &["\u0020\u0308", "\u0378"]), ("\u000D\u0020", &["\u000D", "\u0020"]),
-            ("\u000D\u0308\u0020", &["\u000D", "\u0308", "\u0020"]), ("\u000D\u000D", &["\u000D",
-            "\u000D"]), ("\u000D\u0308\u000D", &["\u000D", "\u0308", "\u000D"]), ("\u000D\u000A",
-            &["\u000D\u000A"]), ("\u000D\u0308\u000A", &["\u000D", "\u0308", "\u000A"]),
-            ("\u000D\u0001", &["\u000D", "\u0001"]), ("\u000D\u0308\u0001", &["\u000D", "\u0308",
-            "\u0001"]), ("\u000D\u0300", &["\u000D", "\u0300"]), ("\u000D\u0308\u0300",
-            &["\u000D", "\u0308\u0300"]), ("\u000D\u0903", &["\u000D", "\u0903"]),
-            ("\u000D\u1100", &["\u000D", "\u1100"]), ("\u000D\u0308\u1100", &["\u000D", "\u0308",
-            "\u1100"]), ("\u000D\u1160", &["\u000D", "\u1160"]), ("\u000D\u0308\u1160",
-            &["\u000D", "\u0308", "\u1160"]), ("\u000D\u11A8", &["\u000D", "\u11A8"]),
-            ("\u000D\u0308\u11A8", &["\u000D", "\u0308", "\u11A8"]), ("\u000D\uAC00", &["\u000D",
-            "\uAC00"]), ("\u000D\u0308\uAC00", &["\u000D", "\u0308", "\uAC00"]), ("\u000D\uAC01",
-            &["\u000D", "\uAC01"]), ("\u000D\u0308\uAC01", &["\u000D", "\u0308", "\uAC01"]),
-            ("\u000D\U0001F1E6", &["\u000D", "\U0001F1E6"]), ("\u000D\u0308\U0001F1E6",
-            &["\u000D", "\u0308", "\U0001F1E6"]), ("\u000D\u0378", &["\u000D", "\u0378"]),
-            ("\u000D\u0308\u0378", &["\u000D", "\u0308", "\u0378"]), ("\u000A\u0020", &["\u000A",
-            "\u0020"]), ("\u000A\u0308\u0020", &["\u000A", "\u0308", "\u0020"]), ("\u000A\u000D",
-            &["\u000A", "\u000D"]), ("\u000A\u0308\u000D", &["\u000A", "\u0308", "\u000D"]),
-            ("\u000A\u000A", &["\u000A", "\u000A"]), ("\u000A\u0308\u000A", &["\u000A", "\u0308",
-            "\u000A"]), ("\u000A\u0001", &["\u000A", "\u0001"]), ("\u000A\u0308\u0001",
-            &["\u000A", "\u0308", "\u0001"]), ("\u000A\u0300", &["\u000A", "\u0300"]),
-            ("\u000A\u0308\u0300", &["\u000A", "\u0308\u0300"]), ("\u000A\u0903", &["\u000A",
-            "\u0903"]), ("\u000A\u1100", &["\u000A", "\u1100"]), ("\u000A\u0308\u1100",
-            &["\u000A", "\u0308", "\u1100"]), ("\u000A\u1160", &["\u000A", "\u1160"]),
-            ("\u000A\u0308\u1160", &["\u000A", "\u0308", "\u1160"]), ("\u000A\u11A8", &["\u000A",
-            "\u11A8"]), ("\u000A\u0308\u11A8", &["\u000A", "\u0308", "\u11A8"]), ("\u000A\uAC00",
-            &["\u000A", "\uAC00"]), ("\u000A\u0308\uAC00", &["\u000A", "\u0308", "\uAC00"]),
-            ("\u000A\uAC01", &["\u000A", "\uAC01"]), ("\u000A\u0308\uAC01", &["\u000A", "\u0308",
-            "\uAC01"]), ("\u000A\U0001F1E6", &["\u000A", "\U0001F1E6"]),
-            ("\u000A\u0308\U0001F1E6", &["\u000A", "\u0308", "\U0001F1E6"]), ("\u000A\u0378",
-            &["\u000A", "\u0378"]), ("\u000A\u0308\u0378", &["\u000A", "\u0308", "\u0378"]),
-            ("\u0001\u0020", &["\u0001", "\u0020"]), ("\u0001\u0308\u0020", &["\u0001", "\u0308",
-            "\u0020"]), ("\u0001\u000D", &["\u0001", "\u000D"]), ("\u0001\u0308\u000D",
-            &["\u0001", "\u0308", "\u000D"]), ("\u0001\u000A", &["\u0001", "\u000A"]),
-            ("\u0001\u0308\u000A", &["\u0001", "\u0308", "\u000A"]), ("\u0001\u0001", &["\u0001",
-            "\u0001"]), ("\u0001\u0308\u0001", &["\u0001", "\u0308", "\u0001"]), ("\u0001\u0300",
-            &["\u0001", "\u0300"]), ("\u0001\u0308\u0300", &["\u0001", "\u0308\u0300"]),
-            ("\u0001\u0903", &["\u0001", "\u0903"]), ("\u0001\u1100", &["\u0001", "\u1100"]),
-            ("\u0001\u0308\u1100", &["\u0001", "\u0308", "\u1100"]), ("\u0001\u1160", &["\u0001",
-            "\u1160"]), ("\u0001\u0308\u1160", &["\u0001", "\u0308", "\u1160"]), ("\u0001\u11A8",
-            &["\u0001", "\u11A8"]), ("\u0001\u0308\u11A8", &["\u0001", "\u0308", "\u11A8"]),
-            ("\u0001\uAC00", &["\u0001", "\uAC00"]), ("\u0001\u0308\uAC00", &["\u0001", "\u0308",
-            "\uAC00"]), ("\u0001\uAC01", &["\u0001", "\uAC01"]), ("\u0001\u0308\uAC01",
-            &["\u0001", "\u0308", "\uAC01"]), ("\u0001\U0001F1E6", &["\u0001", "\U0001F1E6"]),
-            ("\u0001\u0308\U0001F1E6", &["\u0001", "\u0308", "\U0001F1E6"]), ("\u0001\u0378",
-            &["\u0001", "\u0378"]), ("\u0001\u0308\u0378", &["\u0001", "\u0308", "\u0378"]),
-            ("\u0300\u0020", &["\u0300", "\u0020"]), ("\u0300\u0308\u0020", &["\u0300\u0308",
-            "\u0020"]), ("\u0300\u000D", &["\u0300", "\u000D"]), ("\u0300\u0308\u000D",
-            &["\u0300\u0308", "\u000D"]), ("\u0300\u000A", &["\u0300", "\u000A"]),
-            ("\u0300\u0308\u000A", &["\u0300\u0308", "\u000A"]), ("\u0300\u0001", &["\u0300",
-            "\u0001"]), ("\u0300\u0308\u0001", &["\u0300\u0308", "\u0001"]), ("\u0300\u0300",
-            &["\u0300\u0300"]), ("\u0300\u0308\u0300", &["\u0300\u0308\u0300"]), ("\u0300\u1100",
-            &["\u0300", "\u1100"]), ("\u0300\u0308\u1100", &["\u0300\u0308", "\u1100"]),
-            ("\u0300\u1160", &["\u0300", "\u1160"]), ("\u0300\u0308\u1160", &["\u0300\u0308",
-            "\u1160"]), ("\u0300\u11A8", &["\u0300", "\u11A8"]), ("\u0300\u0308\u11A8",
-            &["\u0300\u0308", "\u11A8"]), ("\u0300\uAC00", &["\u0300", "\uAC00"]),
-            ("\u0300\u0308\uAC00", &["\u0300\u0308", "\uAC00"]), ("\u0300\uAC01", &["\u0300",
-            "\uAC01"]), ("\u0300\u0308\uAC01", &["\u0300\u0308", "\uAC01"]), ("\u0300\U0001F1E6",
-            &["\u0300", "\U0001F1E6"]), ("\u0300\u0308\U0001F1E6", &["\u0300\u0308",
-            "\U0001F1E6"]), ("\u0300\u0378", &["\u0300", "\u0378"]), ("\u0300\u0308\u0378",
-            &["\u0300\u0308", "\u0378"]), ("\u0903\u0020", &["\u0903", "\u0020"]),
-            ("\u0903\u0308\u0020", &["\u0903\u0308", "\u0020"]), ("\u0903\u000D", &["\u0903",
-            "\u000D"]), ("\u0903\u0308\u000D", &["\u0903\u0308", "\u000D"]), ("\u0903\u000A",
-            &["\u0903", "\u000A"]), ("\u0903\u0308\u000A", &["\u0903\u0308", "\u000A"]),
-            ("\u0903\u0001", &["\u0903", "\u0001"]), ("\u0903\u0308\u0001", &["\u0903\u0308",
-            "\u0001"]), ("\u0903\u0300", &["\u0903\u0300"]), ("\u0903\u0308\u0300",
-            &["\u0903\u0308\u0300"]), ("\u0903\u1100", &["\u0903", "\u1100"]),
-            ("\u0903\u0308\u1100", &["\u0903\u0308", "\u1100"]), ("\u0903\u1160", &["\u0903",
-            "\u1160"]), ("\u0903\u0308\u1160", &["\u0903\u0308", "\u1160"]), ("\u0903\u11A8",
-            &["\u0903", "\u11A8"]), ("\u0903\u0308\u11A8", &["\u0903\u0308", "\u11A8"]),
-            ("\u0903\uAC00", &["\u0903", "\uAC00"]), ("\u0903\u0308\uAC00", &["\u0903\u0308",
-            "\uAC00"]), ("\u0903\uAC01", &["\u0903", "\uAC01"]), ("\u0903\u0308\uAC01",
-            &["\u0903\u0308", "\uAC01"]), ("\u0903\U0001F1E6", &["\u0903", "\U0001F1E6"]),
-            ("\u0903\u0308\U0001F1E6", &["\u0903\u0308", "\U0001F1E6"]), ("\u0903\u0378",
-            &["\u0903", "\u0378"]), ("\u0903\u0308\u0378", &["\u0903\u0308", "\u0378"]),
-            ("\u1100\u0020", &["\u1100", "\u0020"]), ("\u1100\u0308\u0020", &["\u1100\u0308",
-            "\u0020"]), ("\u1100\u000D", &["\u1100", "\u000D"]), ("\u1100\u0308\u000D",
-            &["\u1100\u0308", "\u000D"]), ("\u1100\u000A", &["\u1100", "\u000A"]),
-            ("\u1100\u0308\u000A", &["\u1100\u0308", "\u000A"]), ("\u1100\u0001", &["\u1100",
-            "\u0001"]), ("\u1100\u0308\u0001", &["\u1100\u0308", "\u0001"]), ("\u1100\u0300",
-            &["\u1100\u0300"]), ("\u1100\u0308\u0300", &["\u1100\u0308\u0300"]), ("\u1100\u1100",
-            &["\u1100\u1100"]), ("\u1100\u0308\u1100", &["\u1100\u0308", "\u1100"]),
-            ("\u1100\u1160", &["\u1100\u1160"]), ("\u1100\u0308\u1160", &["\u1100\u0308",
-            "\u1160"]), ("\u1100\u11A8", &["\u1100", "\u11A8"]), ("\u1100\u0308\u11A8",
-            &["\u1100\u0308", "\u11A8"]), ("\u1100\uAC00", &["\u1100\uAC00"]),
-            ("\u1100\u0308\uAC00", &["\u1100\u0308", "\uAC00"]), ("\u1100\uAC01",
-            &["\u1100\uAC01"]), ("\u1100\u0308\uAC01", &["\u1100\u0308", "\uAC01"]),
-            ("\u1100\U0001F1E6", &["\u1100", "\U0001F1E6"]), ("\u1100\u0308\U0001F1E6",
-            &["\u1100\u0308", "\U0001F1E6"]), ("\u1100\u0378", &["\u1100", "\u0378"]),
-            ("\u1100\u0308\u0378", &["\u1100\u0308", "\u0378"]), ("\u1160\u0020", &["\u1160",
-            "\u0020"]), ("\u1160\u0308\u0020", &["\u1160\u0308", "\u0020"]), ("\u1160\u000D",
-            &["\u1160", "\u000D"]), ("\u1160\u0308\u000D", &["\u1160\u0308", "\u000D"]),
-            ("\u1160\u000A", &["\u1160", "\u000A"]), ("\u1160\u0308\u000A", &["\u1160\u0308",
-            "\u000A"]), ("\u1160\u0001", &["\u1160", "\u0001"]), ("\u1160\u0308\u0001",
-            &["\u1160\u0308", "\u0001"]), ("\u1160\u0300", &["\u1160\u0300"]),
-            ("\u1160\u0308\u0300", &["\u1160\u0308\u0300"]), ("\u1160\u1100", &["\u1160",
-            "\u1100"]), ("\u1160\u0308\u1100", &["\u1160\u0308", "\u1100"]), ("\u1160\u1160",
-            &["\u1160\u1160"]), ("\u1160\u0308\u1160", &["\u1160\u0308", "\u1160"]),
-            ("\u1160\u11A8", &["\u1160\u11A8"]), ("\u1160\u0308\u11A8", &["\u1160\u0308",
-            "\u11A8"]), ("\u1160\uAC00", &["\u1160", "\uAC00"]), ("\u1160\u0308\uAC00",
-            &["\u1160\u0308", "\uAC00"]), ("\u1160\uAC01", &["\u1160", "\uAC01"]),
-            ("\u1160\u0308\uAC01", &["\u1160\u0308", "\uAC01"]), ("\u1160\U0001F1E6", &["\u1160",
-            "\U0001F1E6"]), ("\u1160\u0308\U0001F1E6", &["\u1160\u0308", "\U0001F1E6"]),
-            ("\u1160\u0378", &["\u1160", "\u0378"]), ("\u1160\u0308\u0378", &["\u1160\u0308",
-            "\u0378"]), ("\u11A8\u0020", &["\u11A8", "\u0020"]), ("\u11A8\u0308\u0020",
-            &["\u11A8\u0308", "\u0020"]), ("\u11A8\u000D", &["\u11A8", "\u000D"]),
-            ("\u11A8\u0308\u000D", &["\u11A8\u0308", "\u000D"]), ("\u11A8\u000A", &["\u11A8",
-            "\u000A"]), ("\u11A8\u0308\u000A", &["\u11A8\u0308", "\u000A"]), ("\u11A8\u0001",
-            &["\u11A8", "\u0001"]), ("\u11A8\u0308\u0001", &["\u11A8\u0308", "\u0001"]),
-            ("\u11A8\u0300", &["\u11A8\u0300"]), ("\u11A8\u0308\u0300", &["\u11A8\u0308\u0300"]),
-            ("\u11A8\u1100", &["\u11A8", "\u1100"]), ("\u11A8\u0308\u1100", &["\u11A8\u0308",
-            "\u1100"]), ("\u11A8\u1160", &["\u11A8", "\u1160"]), ("\u11A8\u0308\u1160",
-            &["\u11A8\u0308", "\u1160"]), ("\u11A8\u11A8", &["\u11A8\u11A8"]),
-            ("\u11A8\u0308\u11A8", &["\u11A8\u0308", "\u11A8"]), ("\u11A8\uAC00", &["\u11A8",
-            "\uAC00"]), ("\u11A8\u0308\uAC00", &["\u11A8\u0308", "\uAC00"]), ("\u11A8\uAC01",
-            &["\u11A8", "\uAC01"]), ("\u11A8\u0308\uAC01", &["\u11A8\u0308", "\uAC01"]),
-            ("\u11A8\U0001F1E6", &["\u11A8", "\U0001F1E6"]), ("\u11A8\u0308\U0001F1E6",
-            &["\u11A8\u0308", "\U0001F1E6"]), ("\u11A8\u0378", &["\u11A8", "\u0378"]),
-            ("\u11A8\u0308\u0378", &["\u11A8\u0308", "\u0378"]), ("\uAC00\u0020", &["\uAC00",
-            "\u0020"]), ("\uAC00\u0308\u0020", &["\uAC00\u0308", "\u0020"]), ("\uAC00\u000D",
-            &["\uAC00", "\u000D"]), ("\uAC00\u0308\u000D", &["\uAC00\u0308", "\u000D"]),
-            ("\uAC00\u000A", &["\uAC00", "\u000A"]), ("\uAC00\u0308\u000A", &["\uAC00\u0308",
-            "\u000A"]), ("\uAC00\u0001", &["\uAC00", "\u0001"]), ("\uAC00\u0308\u0001",
-            &["\uAC00\u0308", "\u0001"]), ("\uAC00\u0300", &["\uAC00\u0300"]),
-            ("\uAC00\u0308\u0300", &["\uAC00\u0308\u0300"]), ("\uAC00\u1100", &["\uAC00",
-            "\u1100"]), ("\uAC00\u0308\u1100", &["\uAC00\u0308", "\u1100"]), ("\uAC00\u1160",
-            &["\uAC00\u1160"]), ("\uAC00\u0308\u1160", &["\uAC00\u0308", "\u1160"]),
-            ("\uAC00\u11A8", &["\uAC00\u11A8"]), ("\uAC00\u0308\u11A8", &["\uAC00\u0308",
-            "\u11A8"]), ("\uAC00\uAC00", &["\uAC00", "\uAC00"]), ("\uAC00\u0308\uAC00",
-            &["\uAC00\u0308", "\uAC00"]), ("\uAC00\uAC01", &["\uAC00", "\uAC01"]),
-            ("\uAC00\u0308\uAC01", &["\uAC00\u0308", "\uAC01"]), ("\uAC00\U0001F1E6", &["\uAC00",
-            "\U0001F1E6"]), ("\uAC00\u0308\U0001F1E6", &["\uAC00\u0308", "\U0001F1E6"]),
-            ("\uAC00\u0378", &["\uAC00", "\u0378"]), ("\uAC00\u0308\u0378", &["\uAC00\u0308",
-            "\u0378"]), ("\uAC01\u0020", &["\uAC01", "\u0020"]), ("\uAC01\u0308\u0020",
-            &["\uAC01\u0308", "\u0020"]), ("\uAC01\u000D", &["\uAC01", "\u000D"]),
-            ("\uAC01\u0308\u000D", &["\uAC01\u0308", "\u000D"]), ("\uAC01\u000A", &["\uAC01",
-            "\u000A"]), ("\uAC01\u0308\u000A", &["\uAC01\u0308", "\u000A"]), ("\uAC01\u0001",
-            &["\uAC01", "\u0001"]), ("\uAC01\u0308\u0001", &["\uAC01\u0308", "\u0001"]),
-            ("\uAC01\u0300", &["\uAC01\u0300"]), ("\uAC01\u0308\u0300", &["\uAC01\u0308\u0300"]),
-            ("\uAC01\u1100", &["\uAC01", "\u1100"]), ("\uAC01\u0308\u1100", &["\uAC01\u0308",
-            "\u1100"]), ("\uAC01\u1160", &["\uAC01", "\u1160"]), ("\uAC01\u0308\u1160",
-            &["\uAC01\u0308", "\u1160"]), ("\uAC01\u11A8", &["\uAC01\u11A8"]),
-            ("\uAC01\u0308\u11A8", &["\uAC01\u0308", "\u11A8"]), ("\uAC01\uAC00", &["\uAC01",
-            "\uAC00"]), ("\uAC01\u0308\uAC00", &["\uAC01\u0308", "\uAC00"]), ("\uAC01\uAC01",
-            &["\uAC01", "\uAC01"]), ("\uAC01\u0308\uAC01", &["\uAC01\u0308", "\uAC01"]),
-            ("\uAC01\U0001F1E6", &["\uAC01", "\U0001F1E6"]), ("\uAC01\u0308\U0001F1E6",
-            &["\uAC01\u0308", "\U0001F1E6"]), ("\uAC01\u0378", &["\uAC01", "\u0378"]),
-            ("\uAC01\u0308\u0378", &["\uAC01\u0308", "\u0378"]), ("\U0001F1E6\u0020",
-            &["\U0001F1E6", "\u0020"]), ("\U0001F1E6\u0308\u0020", &["\U0001F1E6\u0308",
-            "\u0020"]), ("\U0001F1E6\u000D", &["\U0001F1E6", "\u000D"]),
-            ("\U0001F1E6\u0308\u000D", &["\U0001F1E6\u0308", "\u000D"]), ("\U0001F1E6\u000A",
-            &["\U0001F1E6", "\u000A"]), ("\U0001F1E6\u0308\u000A", &["\U0001F1E6\u0308",
-            "\u000A"]), ("\U0001F1E6\u0001", &["\U0001F1E6", "\u0001"]),
-            ("\U0001F1E6\u0308\u0001", &["\U0001F1E6\u0308", "\u0001"]), ("\U0001F1E6\u0300",
-            &["\U0001F1E6\u0300"]), ("\U0001F1E6\u0308\u0300", &["\U0001F1E6\u0308\u0300"]),
-            ("\U0001F1E6\u1100", &["\U0001F1E6", "\u1100"]), ("\U0001F1E6\u0308\u1100",
-            &["\U0001F1E6\u0308", "\u1100"]), ("\U0001F1E6\u1160", &["\U0001F1E6", "\u1160"]),
-            ("\U0001F1E6\u0308\u1160", &["\U0001F1E6\u0308", "\u1160"]), ("\U0001F1E6\u11A8",
-            &["\U0001F1E6", "\u11A8"]), ("\U0001F1E6\u0308\u11A8", &["\U0001F1E6\u0308",
-            "\u11A8"]), ("\U0001F1E6\uAC00", &["\U0001F1E6", "\uAC00"]),
-            ("\U0001F1E6\u0308\uAC00", &["\U0001F1E6\u0308", "\uAC00"]), ("\U0001F1E6\uAC01",
-            &["\U0001F1E6", "\uAC01"]), ("\U0001F1E6\u0308\uAC01", &["\U0001F1E6\u0308",
-            "\uAC01"]), ("\U0001F1E6\U0001F1E6", &["\U0001F1E6\U0001F1E6"]),
-            ("\U0001F1E6\u0308\U0001F1E6", &["\U0001F1E6\u0308", "\U0001F1E6"]),
-            ("\U0001F1E6\u0378", &["\U0001F1E6", "\u0378"]), ("\U0001F1E6\u0308\u0378",
-            &["\U0001F1E6\u0308", "\u0378"]), ("\u0378\u0020", &["\u0378", "\u0020"]),
-            ("\u0378\u0308\u0020", &["\u0378\u0308", "\u0020"]), ("\u0378\u000D", &["\u0378",
-            "\u000D"]), ("\u0378\u0308\u000D", &["\u0378\u0308", "\u000D"]), ("\u0378\u000A",
-            &["\u0378", "\u000A"]), ("\u0378\u0308\u000A", &["\u0378\u0308", "\u000A"]),
-            ("\u0378\u0001", &["\u0378", "\u0001"]), ("\u0378\u0308\u0001", &["\u0378\u0308",
-            "\u0001"]), ("\u0378\u0300", &["\u0378\u0300"]), ("\u0378\u0308\u0300",
-            &["\u0378\u0308\u0300"]), ("\u0378\u1100", &["\u0378", "\u1100"]),
-            ("\u0378\u0308\u1100", &["\u0378\u0308", "\u1100"]), ("\u0378\u1160", &["\u0378",
-            "\u1160"]), ("\u0378\u0308\u1160", &["\u0378\u0308", "\u1160"]), ("\u0378\u11A8",
-            &["\u0378", "\u11A8"]), ("\u0378\u0308\u11A8", &["\u0378\u0308", "\u11A8"]),
-            ("\u0378\uAC00", &["\u0378", "\uAC00"]), ("\u0378\u0308\uAC00", &["\u0378\u0308",
-            "\uAC00"]), ("\u0378\uAC01", &["\u0378", "\uAC01"]), ("\u0378\u0308\uAC01",
-            &["\u0378\u0308", "\uAC01"]), ("\u0378\U0001F1E6", &["\u0378", "\U0001F1E6"]),
-            ("\u0378\u0308\U0001F1E6", &["\u0378\u0308", "\U0001F1E6"]), ("\u0378\u0378",
-            &["\u0378", "\u0378"]), ("\u0378\u0308\u0378", &["\u0378\u0308", "\u0378"]),
-            ("\u0061\U0001F1E6\u0062", &["\u0061", "\U0001F1E6", "\u0062"]),
-            ("\U0001F1F7\U0001F1FA", &["\U0001F1F7\U0001F1FA"]),
-            ("\U0001F1F7\U0001F1FA\U0001F1F8", &["\U0001F1F7\U0001F1FA\U0001F1F8"]),
-            ("\U0001F1F7\U0001F1FA\U0001F1F8\U0001F1EA",
-            &["\U0001F1F7\U0001F1FA\U0001F1F8\U0001F1EA"]),
-            ("\U0001F1F7\U0001F1FA\u200B\U0001F1F8\U0001F1EA", &["\U0001F1F7\U0001F1FA", "\u200B",
-            "\U0001F1F8\U0001F1EA"]), ("\U0001F1E6\U0001F1E7\U0001F1E8",
-            &["\U0001F1E6\U0001F1E7\U0001F1E8"]), ("\U0001F1E6\u200D\U0001F1E7\U0001F1E8",
-            &["\U0001F1E6\u200D", "\U0001F1E7\U0001F1E8"]),
-            ("\U0001F1E6\U0001F1E7\u200D\U0001F1E8", &["\U0001F1E6\U0001F1E7\u200D",
-            "\U0001F1E8"]), ("\u0020\u200D\u0646", &["\u0020\u200D", "\u0646"]),
-            ("\u0646\u200D\u0020", &["\u0646\u200D", "\u0020"]),
+            ("\u{20}\u{20}", &["\u{20}", "\u{20}"]),
+            ("\u{20}\u{308}\u{20}", &["\u{20}\u{308}", "\u{20}"]),
+            ("\u{20}\u{D}", &["\u{20}", "\u{D}"]),
+            ("\u{20}\u{308}\u{D}", &["\u{20}\u{308}", "\u{D}"]),
+            ("\u{20}\u{A}", &["\u{20}", "\u{A}"]),
+            ("\u{20}\u{308}\u{A}", &["\u{20}\u{308}", "\u{A}"]),
+            ("\u{20}\u{1}", &["\u{20}", "\u{1}"]),
+            ("\u{20}\u{308}\u{1}", &["\u{20}\u{308}", "\u{1}"]),
+            ("\u{20}\u{300}", &["\u{20}\u{300}"]),
+            ("\u{20}\u{308}\u{300}", &["\u{20}\u{308}\u{300}"]),
+            ("\u{20}\u{1100}", &["\u{20}", "\u{1100}"]),
+            ("\u{20}\u{308}\u{1100}", &["\u{20}\u{308}", "\u{1100}"]),
+            ("\u{20}\u{1160}", &["\u{20}", "\u{1160}"]),
+            ("\u{20}\u{308}\u{1160}", &["\u{20}\u{308}", "\u{1160}"]),
+            ("\u{20}\u{11A8}", &["\u{20}", "\u{11A8}"]),
+            ("\u{20}\u{308}\u{11A8}", &["\u{20}\u{308}", "\u{11A8}"]),
+            ("\u{20}\u{AC00}", &["\u{20}", "\u{AC00}"]),
+            ("\u{20}\u{308}\u{AC00}", &["\u{20}\u{308}", "\u{AC00}"]),
+            ("\u{20}\u{AC01}", &["\u{20}", "\u{AC01}"]),
+            ("\u{20}\u{308}\u{AC01}", &["\u{20}\u{308}", "\u{AC01}"]),
+            ("\u{20}\u{1F1E6}", &["\u{20}", "\u{1F1E6}"]),
+            ("\u{20}\u{308}\u{1F1E6}", &["\u{20}\u{308}", "\u{1F1E6}"]),
+            ("\u{20}\u{378}", &["\u{20}", "\u{378}"]),
+            ("\u{20}\u{308}\u{378}", &["\u{20}\u{308}", "\u{378}"]),
+            ("\u{D}\u{20}", &["\u{D}", "\u{20}"]),
+            ("\u{D}\u{308}\u{20}", &["\u{D}", "\u{308}", "\u{20}"]),
+            ("\u{D}\u{D}", &["\u{D}", "\u{D}"]),
+            ("\u{D}\u{308}\u{D}", &["\u{D}", "\u{308}", "\u{D}"]),
+            ("\u{D}\u{A}", &["\u{D}\u{A}"]),
+            ("\u{D}\u{308}\u{A}", &["\u{D}", "\u{308}", "\u{A}"]),
+            ("\u{D}\u{1}", &["\u{D}", "\u{1}"]),
+            ("\u{D}\u{308}\u{1}", &["\u{D}", "\u{308}", "\u{1}"]),
+            ("\u{D}\u{300}", &["\u{D}", "\u{300}"]),
+            ("\u{D}\u{308}\u{300}", &["\u{D}", "\u{308}\u{300}"]),
+            ("\u{D}\u{903}", &["\u{D}", "\u{903}"]),
+            ("\u{D}\u{1100}", &["\u{D}", "\u{1100}"]),
+            ("\u{D}\u{308}\u{1100}", &["\u{D}", "\u{308}", "\u{1100}"]),
+            ("\u{D}\u{1160}", &["\u{D}", "\u{1160}"]),
+            ("\u{D}\u{308}\u{1160}", &["\u{D}", "\u{308}", "\u{1160}"]),
+            ("\u{D}\u{11A8}", &["\u{D}", "\u{11A8}"]),
+            ("\u{D}\u{308}\u{11A8}", &["\u{D}", "\u{308}", "\u{11A8}"]),
+            ("\u{D}\u{AC00}", &["\u{D}", "\u{AC00}"]),
+            ("\u{D}\u{308}\u{AC00}", &["\u{D}", "\u{308}", "\u{AC00}"]),
+            ("\u{D}\u{AC01}", &["\u{D}", "\u{AC01}"]),
+            ("\u{D}\u{308}\u{AC01}", &["\u{D}", "\u{308}", "\u{AC01}"]),
+            ("\u{D}\u{1F1E6}", &["\u{D}", "\u{1F1E6}"]),
+            ("\u{D}\u{308}\u{1F1E6}", &["\u{D}", "\u{308}", "\u{1F1E6}"]),
+            ("\u{D}\u{378}", &["\u{D}", "\u{378}"]),
+            ("\u{D}\u{308}\u{378}", &["\u{D}", "\u{308}", "\u{378}"]),
+            ("\u{A}\u{20}", &["\u{A}", "\u{20}"]),
+            ("\u{A}\u{308}\u{20}", &["\u{A}", "\u{308}", "\u{20}"]),
+            ("\u{A}\u{D}", &["\u{A}", "\u{D}"]),
+            ("\u{A}\u{308}\u{D}", &["\u{A}", "\u{308}", "\u{D}"]),
+            ("\u{A}\u{A}", &["\u{A}", "\u{A}"]),
+            ("\u{A}\u{308}\u{A}", &["\u{A}", "\u{308}", "\u{A}"]),
+            ("\u{A}\u{1}", &["\u{A}", "\u{1}"]),
+            ("\u{A}\u{308}\u{1}", &["\u{A}", "\u{308}", "\u{1}"]),
+            ("\u{A}\u{300}", &["\u{A}", "\u{300}"]),
+            ("\u{A}\u{308}\u{300}", &["\u{A}", "\u{308}\u{300}"]),
+            ("\u{A}\u{903}", &["\u{A}", "\u{903}"]),
+            ("\u{A}\u{1100}", &["\u{A}", "\u{1100}"]),
+            ("\u{A}\u{308}\u{1100}", &["\u{A}", "\u{308}", "\u{1100}"]),
+            ("\u{A}\u{1160}", &["\u{A}", "\u{1160}"]),
+            ("\u{A}\u{308}\u{1160}", &["\u{A}", "\u{308}", "\u{1160}"]),
+            ("\u{A}\u{11A8}", &["\u{A}", "\u{11A8}"]),
+            ("\u{A}\u{308}\u{11A8}", &["\u{A}", "\u{308}", "\u{11A8}"]),
+            ("\u{A}\u{AC00}", &["\u{A}", "\u{AC00}"]),
+            ("\u{A}\u{308}\u{AC00}", &["\u{A}", "\u{308}", "\u{AC00}"]),
+            ("\u{A}\u{AC01}", &["\u{A}", "\u{AC01}"]),
+            ("\u{A}\u{308}\u{AC01}", &["\u{A}", "\u{308}", "\u{AC01}"]),
+            ("\u{A}\u{1F1E6}", &["\u{A}", "\u{1F1E6}"]),
+            ("\u{A}\u{308}\u{1F1E6}", &["\u{A}", "\u{308}", "\u{1F1E6}"]),
+            ("\u{A}\u{378}", &["\u{A}", "\u{378}"]),
+            ("\u{A}\u{308}\u{378}", &["\u{A}", "\u{308}", "\u{378}"]),
+            ("\u{1}\u{20}", &["\u{1}", "\u{20}"]),
+            ("\u{1}\u{308}\u{20}", &["\u{1}", "\u{308}", "\u{20}"]),
+            ("\u{1}\u{D}", &["\u{1}", "\u{D}"]),
+            ("\u{1}\u{308}\u{D}", &["\u{1}", "\u{308}", "\u{D}"]),
+            ("\u{1}\u{A}", &["\u{1}", "\u{A}"]),
+            ("\u{1}\u{308}\u{A}", &["\u{1}", "\u{308}", "\u{A}"]),
+            ("\u{1}\u{1}", &["\u{1}", "\u{1}"]),
+            ("\u{1}\u{308}\u{1}", &["\u{1}", "\u{308}", "\u{1}"]),
+            ("\u{1}\u{300}", &["\u{1}", "\u{300}"]),
+            ("\u{1}\u{308}\u{300}", &["\u{1}", "\u{308}\u{300}"]),
+            ("\u{1}\u{903}", &["\u{1}", "\u{903}"]),
+            ("\u{1}\u{1100}", &["\u{1}", "\u{1100}"]),
+            ("\u{1}\u{308}\u{1100}", &["\u{1}", "\u{308}", "\u{1100}"]),
+            ("\u{1}\u{1160}", &["\u{1}", "\u{1160}"]),
+            ("\u{1}\u{308}\u{1160}", &["\u{1}", "\u{308}", "\u{1160}"]),
+            ("\u{1}\u{11A8}", &["\u{1}", "\u{11A8}"]),
+            ("\u{1}\u{308}\u{11A8}", &["\u{1}", "\u{308}", "\u{11A8}"]),
+            ("\u{1}\u{AC00}", &["\u{1}", "\u{AC00}"]),
+            ("\u{1}\u{308}\u{AC00}", &["\u{1}", "\u{308}", "\u{AC00}"]),
+            ("\u{1}\u{AC01}", &["\u{1}", "\u{AC01}"]),
+            ("\u{1}\u{308}\u{AC01}", &["\u{1}", "\u{308}", "\u{AC01}"]),
+            ("\u{1}\u{1F1E6}", &["\u{1}", "\u{1F1E6}"]),
+            ("\u{1}\u{308}\u{1F1E6}", &["\u{1}", "\u{308}", "\u{1F1E6}"]),
+            ("\u{1}\u{378}", &["\u{1}", "\u{378}"]),
+            ("\u{1}\u{308}\u{378}", &["\u{1}", "\u{308}", "\u{378}"]),
+            ("\u{300}\u{20}", &["\u{300}", "\u{20}"]),
+            ("\u{300}\u{308}\u{20}", &["\u{300}\u{308}", "\u{20}"]),
+            ("\u{300}\u{D}", &["\u{300}", "\u{D}"]),
+            ("\u{300}\u{308}\u{D}", &["\u{300}\u{308}", "\u{D}"]),
+            ("\u{300}\u{A}", &["\u{300}", "\u{A}"]),
+            ("\u{300}\u{308}\u{A}", &["\u{300}\u{308}", "\u{A}"]),
+            ("\u{300}\u{1}", &["\u{300}", "\u{1}"]),
+            ("\u{300}\u{308}\u{1}", &["\u{300}\u{308}", "\u{1}"]),
+            ("\u{300}\u{300}", &["\u{300}\u{300}"]),
+            ("\u{300}\u{308}\u{300}", &["\u{300}\u{308}\u{300}"]),
+            ("\u{300}\u{1100}", &["\u{300}", "\u{1100}"]),
+            ("\u{300}\u{308}\u{1100}", &["\u{300}\u{308}", "\u{1100}"]),
+            ("\u{300}\u{1160}", &["\u{300}", "\u{1160}"]),
+            ("\u{300}\u{308}\u{1160}", &["\u{300}\u{308}", "\u{1160}"]),
+            ("\u{300}\u{11A8}", &["\u{300}", "\u{11A8}"]),
+            ("\u{300}\u{308}\u{11A8}", &["\u{300}\u{308}", "\u{11A8}"]),
+            ("\u{300}\u{AC00}", &["\u{300}", "\u{AC00}"]),
+            ("\u{300}\u{308}\u{AC00}", &["\u{300}\u{308}", "\u{AC00}"]),
+            ("\u{300}\u{AC01}", &["\u{300}", "\u{AC01}"]),
+            ("\u{300}\u{308}\u{AC01}", &["\u{300}\u{308}", "\u{AC01}"]),
+            ("\u{300}\u{1F1E6}", &["\u{300}", "\u{1F1E6}"]),
+            ("\u{300}\u{308}\u{1F1E6}", &["\u{300}\u{308}", "\u{1F1E6}"]),
+            ("\u{300}\u{378}", &["\u{300}", "\u{378}"]),
+            ("\u{300}\u{308}\u{378}", &["\u{300}\u{308}", "\u{378}"]),
+            ("\u{903}\u{20}", &["\u{903}", "\u{20}"]),
+            ("\u{903}\u{308}\u{20}", &["\u{903}\u{308}", "\u{20}"]),
+            ("\u{903}\u{D}", &["\u{903}", "\u{D}"]),
+            ("\u{903}\u{308}\u{D}", &["\u{903}\u{308}", "\u{D}"]),
+            ("\u{903}\u{A}", &["\u{903}", "\u{A}"]),
+            ("\u{903}\u{308}\u{A}", &["\u{903}\u{308}", "\u{A}"]),
+            ("\u{903}\u{1}", &["\u{903}", "\u{1}"]),
+            ("\u{903}\u{308}\u{1}", &["\u{903}\u{308}", "\u{1}"]),
+            ("\u{903}\u{300}", &["\u{903}\u{300}"]),
+            ("\u{903}\u{308}\u{300}", &["\u{903}\u{308}\u{300}"]),
+            ("\u{903}\u{1100}", &["\u{903}", "\u{1100}"]),
+            ("\u{903}\u{308}\u{1100}", &["\u{903}\u{308}", "\u{1100}"]),
+            ("\u{903}\u{1160}", &["\u{903}", "\u{1160}"]),
+            ("\u{903}\u{308}\u{1160}", &["\u{903}\u{308}", "\u{1160}"]),
+            ("\u{903}\u{11A8}", &["\u{903}", "\u{11A8}"]),
+            ("\u{903}\u{308}\u{11A8}", &["\u{903}\u{308}", "\u{11A8}"]),
+            ("\u{903}\u{AC00}", &["\u{903}", "\u{AC00}"]),
+            ("\u{903}\u{308}\u{AC00}", &["\u{903}\u{308}", "\u{AC00}"]),
+            ("\u{903}\u{AC01}", &["\u{903}", "\u{AC01}"]),
+            ("\u{903}\u{308}\u{AC01}", &["\u{903}\u{308}", "\u{AC01}"]),
+            ("\u{903}\u{1F1E6}", &["\u{903}", "\u{1F1E6}"]),
+            ("\u{903}\u{308}\u{1F1E6}", &["\u{903}\u{308}", "\u{1F1E6}"]),
+            ("\u{903}\u{378}", &["\u{903}", "\u{378}"]),
+            ("\u{903}\u{308}\u{378}", &["\u{903}\u{308}", "\u{378}"]),
+            ("\u{1100}\u{20}", &["\u{1100}", "\u{20}"]),
+            ("\u{1100}\u{308}\u{20}", &["\u{1100}\u{308}", "\u{20}"]),
+            ("\u{1100}\u{D}", &["\u{1100}", "\u{D}"]),
+            ("\u{1100}\u{308}\u{D}", &["\u{1100}\u{308}", "\u{D}"]),
+            ("\u{1100}\u{A}", &["\u{1100}", "\u{A}"]),
+            ("\u{1100}\u{308}\u{A}", &["\u{1100}\u{308}", "\u{A}"]),
+            ("\u{1100}\u{1}", &["\u{1100}", "\u{1}"]),
+            ("\u{1100}\u{308}\u{1}", &["\u{1100}\u{308}", "\u{1}"]),
+            ("\u{1100}\u{300}", &["\u{1100}\u{300}"]),
+            ("\u{1100}\u{308}\u{300}", &["\u{1100}\u{308}\u{300}"]),
+            ("\u{1100}\u{1100}", &["\u{1100}\u{1100}"]),
+            ("\u{1100}\u{308}\u{1100}", &["\u{1100}\u{308}", "\u{1100}"]),
+            ("\u{1100}\u{1160}", &["\u{1100}\u{1160}"]),
+            ("\u{1100}\u{308}\u{1160}", &["\u{1100}\u{308}", "\u{1160}"]),
+            ("\u{1100}\u{11A8}", &["\u{1100}", "\u{11A8}"]),
+            ("\u{1100}\u{308}\u{11A8}", &["\u{1100}\u{308}", "\u{11A8}"]),
+            ("\u{1100}\u{AC00}", &["\u{1100}\u{AC00}"]),
+            ("\u{1100}\u{308}\u{AC00}", &["\u{1100}\u{308}", "\u{AC00}"]),
+            ("\u{1100}\u{AC01}", &["\u{1100}\u{AC01}"]),
+            ("\u{1100}\u{308}\u{AC01}", &["\u{1100}\u{308}", "\u{AC01}"]),
+            ("\u{1100}\u{1F1E6}", &["\u{1100}", "\u{1F1E6}"]),
+            ("\u{1100}\u{308}\u{1F1E6}", &["\u{1100}\u{308}", "\u{1F1E6}"]),
+            ("\u{1100}\u{378}", &["\u{1100}", "\u{378}"]),
+            ("\u{1100}\u{308}\u{378}", &["\u{1100}\u{308}", "\u{378}"]),
+            ("\u{1160}\u{20}", &["\u{1160}", "\u{20}"]),
+            ("\u{1160}\u{308}\u{20}", &["\u{1160}\u{308}", "\u{20}"]),
+            ("\u{1160}\u{D}", &["\u{1160}", "\u{D}"]),
+            ("\u{1160}\u{308}\u{D}", &["\u{1160}\u{308}", "\u{D}"]),
+            ("\u{1160}\u{A}", &["\u{1160}", "\u{A}"]),
+            ("\u{1160}\u{308}\u{A}", &["\u{1160}\u{308}", "\u{A}"]),
+            ("\u{1160}\u{1}", &["\u{1160}", "\u{1}"]),
+            ("\u{1160}\u{308}\u{1}", &["\u{1160}\u{308}", "\u{1}"]),
+            ("\u{1160}\u{300}", &["\u{1160}\u{300}"]),
+            ("\u{1160}\u{308}\u{300}", &["\u{1160}\u{308}\u{300}"]),
+            ("\u{1160}\u{1100}", &["\u{1160}", "\u{1100}"]),
+            ("\u{1160}\u{308}\u{1100}", &["\u{1160}\u{308}", "\u{1100}"]),
+            ("\u{1160}\u{1160}", &["\u{1160}\u{1160}"]),
+            ("\u{1160}\u{308}\u{1160}", &["\u{1160}\u{308}", "\u{1160}"]),
+            ("\u{1160}\u{11A8}", &["\u{1160}\u{11A8}"]),
+            ("\u{1160}\u{308}\u{11A8}", &["\u{1160}\u{308}", "\u{11A8}"]),
+            ("\u{1160}\u{AC00}", &["\u{1160}", "\u{AC00}"]),
+            ("\u{1160}\u{308}\u{AC00}", &["\u{1160}\u{308}", "\u{AC00}"]),
+            ("\u{1160}\u{AC01}", &["\u{1160}", "\u{AC01}"]),
+            ("\u{1160}\u{308}\u{AC01}", &["\u{1160}\u{308}", "\u{AC01}"]),
+            ("\u{1160}\u{1F1E6}", &["\u{1160}", "\u{1F1E6}"]),
+            ("\u{1160}\u{308}\u{1F1E6}", &["\u{1160}\u{308}", "\u{1F1E6}"]),
+            ("\u{1160}\u{378}", &["\u{1160}", "\u{378}"]),
+            ("\u{1160}\u{308}\u{378}", &["\u{1160}\u{308}", "\u{378}"]),
+            ("\u{11A8}\u{20}", &["\u{11A8}", "\u{20}"]),
+            ("\u{11A8}\u{308}\u{20}", &["\u{11A8}\u{308}", "\u{20}"]),
+            ("\u{11A8}\u{D}", &["\u{11A8}", "\u{D}"]),
+            ("\u{11A8}\u{308}\u{D}", &["\u{11A8}\u{308}", "\u{D}"]),
+            ("\u{11A8}\u{A}", &["\u{11A8}", "\u{A}"]),
+            ("\u{11A8}\u{308}\u{A}", &["\u{11A8}\u{308}", "\u{A}"]),
+            ("\u{11A8}\u{1}", &["\u{11A8}", "\u{1}"]),
+            ("\u{11A8}\u{308}\u{1}", &["\u{11A8}\u{308}", "\u{1}"]),
+            ("\u{11A8}\u{300}", &["\u{11A8}\u{300}"]),
+            ("\u{11A8}\u{308}\u{300}", &["\u{11A8}\u{308}\u{300}"]),
+            ("\u{11A8}\u{1100}", &["\u{11A8}", "\u{1100}"]),
+            ("\u{11A8}\u{308}\u{1100}", &["\u{11A8}\u{308}", "\u{1100}"]),
+            ("\u{11A8}\u{1160}", &["\u{11A8}", "\u{1160}"]),
+            ("\u{11A8}\u{308}\u{1160}", &["\u{11A8}\u{308}", "\u{1160}"]),
+            ("\u{11A8}\u{11A8}", &["\u{11A8}\u{11A8}"]),
+            ("\u{11A8}\u{308}\u{11A8}", &["\u{11A8}\u{308}", "\u{11A8}"]),
+            ("\u{11A8}\u{AC00}", &["\u{11A8}", "\u{AC00}"]),
+            ("\u{11A8}\u{308}\u{AC00}", &["\u{11A8}\u{308}", "\u{AC00}"]),
+            ("\u{11A8}\u{AC01}", &["\u{11A8}", "\u{AC01}"]),
+            ("\u{11A8}\u{308}\u{AC01}", &["\u{11A8}\u{308}", "\u{AC01}"]),
+            ("\u{11A8}\u{1F1E6}", &["\u{11A8}", "\u{1F1E6}"]),
+            ("\u{11A8}\u{308}\u{1F1E6}", &["\u{11A8}\u{308}", "\u{1F1E6}"]),
+            ("\u{11A8}\u{378}", &["\u{11A8}", "\u{378}"]),
+            ("\u{11A8}\u{308}\u{378}", &["\u{11A8}\u{308}", "\u{378}"]),
+            ("\u{AC00}\u{20}", &["\u{AC00}", "\u{20}"]),
+            ("\u{AC00}\u{308}\u{20}", &["\u{AC00}\u{308}", "\u{20}"]),
+            ("\u{AC00}\u{D}", &["\u{AC00}", "\u{D}"]),
+            ("\u{AC00}\u{308}\u{D}", &["\u{AC00}\u{308}", "\u{D}"]),
+            ("\u{AC00}\u{A}", &["\u{AC00}", "\u{A}"]),
+            ("\u{AC00}\u{308}\u{A}", &["\u{AC00}\u{308}", "\u{A}"]),
+            ("\u{AC00}\u{1}", &["\u{AC00}", "\u{1}"]),
+            ("\u{AC00}\u{308}\u{1}", &["\u{AC00}\u{308}", "\u{1}"]),
+            ("\u{AC00}\u{300}", &["\u{AC00}\u{300}"]),
+            ("\u{AC00}\u{308}\u{300}", &["\u{AC00}\u{308}\u{300}"]),
+            ("\u{AC00}\u{1100}", &["\u{AC00}", "\u{1100}"]),
+            ("\u{AC00}\u{308}\u{1100}", &["\u{AC00}\u{308}", "\u{1100}"]),
+            ("\u{AC00}\u{1160}", &["\u{AC00}\u{1160}"]),
+            ("\u{AC00}\u{308}\u{1160}", &["\u{AC00}\u{308}", "\u{1160}"]),
+            ("\u{AC00}\u{11A8}", &["\u{AC00}\u{11A8}"]),
+            ("\u{AC00}\u{308}\u{11A8}", &["\u{AC00}\u{308}", "\u{11A8}"]),
+            ("\u{AC00}\u{AC00}", &["\u{AC00}", "\u{AC00}"]),
+            ("\u{AC00}\u{308}\u{AC00}", &["\u{AC00}\u{308}", "\u{AC00}"]),
+            ("\u{AC00}\u{AC01}", &["\u{AC00}", "\u{AC01}"]),
+            ("\u{AC00}\u{308}\u{AC01}", &["\u{AC00}\u{308}", "\u{AC01}"]),
+            ("\u{AC00}\u{1F1E6}", &["\u{AC00}", "\u{1F1E6}"]),
+            ("\u{AC00}\u{308}\u{1F1E6}", &["\u{AC00}\u{308}", "\u{1F1E6}"]),
+            ("\u{AC00}\u{378}", &["\u{AC00}", "\u{378}"]),
+            ("\u{AC00}\u{308}\u{378}", &["\u{AC00}\u{308}", "\u{378}"]),
+            ("\u{AC01}\u{20}", &["\u{AC01}", "\u{20}"]),
+            ("\u{AC01}\u{308}\u{20}", &["\u{AC01}\u{308}", "\u{20}"]),
+            ("\u{AC01}\u{D}", &["\u{AC01}", "\u{D}"]),
+            ("\u{AC01}\u{308}\u{D}", &["\u{AC01}\u{308}", "\u{D}"]),
+            ("\u{AC01}\u{A}", &["\u{AC01}", "\u{A}"]),
+            ("\u{AC01}\u{308}\u{A}", &["\u{AC01}\u{308}", "\u{A}"]),
+            ("\u{AC01}\u{1}", &["\u{AC01}", "\u{1}"]),
+            ("\u{AC01}\u{308}\u{1}", &["\u{AC01}\u{308}", "\u{1}"]),
+            ("\u{AC01}\u{300}", &["\u{AC01}\u{300}"]),
+            ("\u{AC01}\u{308}\u{300}", &["\u{AC01}\u{308}\u{300}"]),
+            ("\u{AC01}\u{1100}", &["\u{AC01}", "\u{1100}"]),
+            ("\u{AC01}\u{308}\u{1100}", &["\u{AC01}\u{308}", "\u{1100}"]),
+            ("\u{AC01}\u{1160}", &["\u{AC01}", "\u{1160}"]),
+            ("\u{AC01}\u{308}\u{1160}", &["\u{AC01}\u{308}", "\u{1160}"]),
+            ("\u{AC01}\u{11A8}", &["\u{AC01}\u{11A8}"]),
+            ("\u{AC01}\u{308}\u{11A8}", &["\u{AC01}\u{308}", "\u{11A8}"]),
+            ("\u{AC01}\u{AC00}", &["\u{AC01}", "\u{AC00}"]),
+            ("\u{AC01}\u{308}\u{AC00}", &["\u{AC01}\u{308}", "\u{AC00}"]),
+            ("\u{AC01}\u{AC01}", &["\u{AC01}", "\u{AC01}"]),
+            ("\u{AC01}\u{308}\u{AC01}", &["\u{AC01}\u{308}", "\u{AC01}"]),
+            ("\u{AC01}\u{1F1E6}", &["\u{AC01}", "\u{1F1E6}"]),
+            ("\u{AC01}\u{308}\u{1F1E6}", &["\u{AC01}\u{308}", "\u{1F1E6}"]),
+            ("\u{AC01}\u{378}", &["\u{AC01}", "\u{378}"]),
+            ("\u{AC01}\u{308}\u{378}", &["\u{AC01}\u{308}", "\u{378}"]),
+            ("\u{1F1E6}\u{20}", &["\u{1F1E6}", "\u{20}"]),
+            ("\u{1F1E6}\u{308}\u{20}", &["\u{1F1E6}\u{308}", "\u{20}"]),
+            ("\u{1F1E6}\u{D}", &["\u{1F1E6}", "\u{D}"]),
+            ("\u{1F1E6}\u{308}\u{D}", &["\u{1F1E6}\u{308}", "\u{D}"]),
+            ("\u{1F1E6}\u{A}", &["\u{1F1E6}", "\u{A}"]),
+            ("\u{1F1E6}\u{308}\u{A}", &["\u{1F1E6}\u{308}", "\u{A}"]),
+            ("\u{1F1E6}\u{1}", &["\u{1F1E6}", "\u{1}"]),
+            ("\u{1F1E6}\u{308}\u{1}", &["\u{1F1E6}\u{308}", "\u{1}"]),
+            ("\u{1F1E6}\u{300}", &["\u{1F1E6}\u{300}"]),
+            ("\u{1F1E6}\u{308}\u{300}", &["\u{1F1E6}\u{308}\u{300}"]),
+            ("\u{1F1E6}\u{1100}", &["\u{1F1E6}", "\u{1100}"]),
+            ("\u{1F1E6}\u{308}\u{1100}", &["\u{1F1E6}\u{308}", "\u{1100}"]),
+            ("\u{1F1E6}\u{1160}", &["\u{1F1E6}", "\u{1160}"]),
+            ("\u{1F1E6}\u{308}\u{1160}", &["\u{1F1E6}\u{308}", "\u{1160}"]),
+            ("\u{1F1E6}\u{11A8}", &["\u{1F1E6}", "\u{11A8}"]),
+            ("\u{1F1E6}\u{308}\u{11A8}", &["\u{1F1E6}\u{308}", "\u{11A8}"]),
+            ("\u{1F1E6}\u{AC00}", &["\u{1F1E6}", "\u{AC00}"]),
+            ("\u{1F1E6}\u{308}\u{AC00}", &["\u{1F1E6}\u{308}", "\u{AC00}"]),
+            ("\u{1F1E6}\u{AC01}", &["\u{1F1E6}", "\u{AC01}"]),
+            ("\u{1F1E6}\u{308}\u{AC01}", &["\u{1F1E6}\u{308}", "\u{AC01}"]),
+            ("\u{1F1E6}\u{1F1E6}", &["\u{1F1E6}\u{1F1E6}"]),
+            ("\u{1F1E6}\u{308}\u{1F1E6}", &["\u{1F1E6}\u{308}", "\u{1F1E6}"]),
+            ("\u{1F1E6}\u{378}", &["\u{1F1E6}", "\u{378}"]),
+            ("\u{1F1E6}\u{308}\u{378}", &["\u{1F1E6}\u{308}", "\u{378}"]),
+            ("\u{378}\u{20}", &["\u{378}", "\u{20}"]),
+            ("\u{378}\u{308}\u{20}", &["\u{378}\u{308}", "\u{20}"]),
+            ("\u{378}\u{D}", &["\u{378}", "\u{D}"]),
+            ("\u{378}\u{308}\u{D}", &["\u{378}\u{308}", "\u{D}"]),
+            ("\u{378}\u{A}", &["\u{378}", "\u{A}"]),
+            ("\u{378}\u{308}\u{A}", &["\u{378}\u{308}", "\u{A}"]),
+            ("\u{378}\u{1}", &["\u{378}", "\u{1}"]),
+            ("\u{378}\u{308}\u{1}", &["\u{378}\u{308}", "\u{1}"]),
+            ("\u{378}\u{300}", &["\u{378}\u{300}"]),
+            ("\u{378}\u{308}\u{300}", &["\u{378}\u{308}\u{300}"]),
+            ("\u{378}\u{1100}", &["\u{378}", "\u{1100}"]),
+            ("\u{378}\u{308}\u{1100}", &["\u{378}\u{308}", "\u{1100}"]),
+            ("\u{378}\u{1160}", &["\u{378}", "\u{1160}"]),
+            ("\u{378}\u{308}\u{1160}", &["\u{378}\u{308}", "\u{1160}"]),
+            ("\u{378}\u{11A8}", &["\u{378}", "\u{11A8}"]),
+            ("\u{378}\u{308}\u{11A8}", &["\u{378}\u{308}", "\u{11A8}"]),
+            ("\u{378}\u{AC00}", &["\u{378}", "\u{AC00}"]),
+            ("\u{378}\u{308}\u{AC00}", &["\u{378}\u{308}", "\u{AC00}"]),
+            ("\u{378}\u{AC01}", &["\u{378}", "\u{AC01}"]),
+            ("\u{378}\u{308}\u{AC01}", &["\u{378}\u{308}", "\u{AC01}"]),
+            ("\u{378}\u{1F1E6}", &["\u{378}", "\u{1F1E6}"]),
+            ("\u{378}\u{308}\u{1F1E6}", &["\u{378}\u{308}", "\u{1F1E6}"]),
+            ("\u{378}\u{378}", &["\u{378}", "\u{378}"]),
+            ("\u{378}\u{308}\u{378}", &["\u{378}\u{308}", "\u{378}"]),
+            ("\u{61}\u{1F1E6}\u{62}", &["\u{61}", "\u{1F1E6}", "\u{62}"]),
+            ("\u{1F1F7}\u{1F1FA}", &["\u{1F1F7}\u{1F1FA}"]),
+            ("\u{1F1F7}\u{1F1FA}\u{1F1F8}", &["\u{1F1F7}\u{1F1FA}\u{1F1F8}"]),
+            ("\u{1F1F7}\u{1F1FA}\u{1F1F8}\u{1F1EA}",
+            &["\u{1F1F7}\u{1F1FA}\u{1F1F8}\u{1F1EA}"]),
+            ("\u{1F1F7}\u{1F1FA}\u{200B}\u{1F1F8}\u{1F1EA}",
+             &["\u{1F1F7}\u{1F1FA}", "\u{200B}", "\u{1F1F8}\u{1F1EA}"]),
+            ("\u{1F1E6}\u{1F1E7}\u{1F1E8}", &["\u{1F1E6}\u{1F1E7}\u{1F1E8}"]),
+            ("\u{1F1E6}\u{200D}\u{1F1E7}\u{1F1E8}", &["\u{1F1E6}\u{200D}",
+             "\u{1F1E7}\u{1F1E8}"]),
+            ("\u{1F1E6}\u{1F1E7}\u{200D}\u{1F1E8}",
+             &["\u{1F1E6}\u{1F1E7}\u{200D}", "\u{1F1E8}"]),
+            ("\u{20}\u{200D}\u{646}", &["\u{20}\u{200D}", "\u{646}"]),
+            ("\u{646}\u{200D}\u{20}", &["\u{646}\u{200D}", "\u{20}"]),
         ];
 
         let test_diff: [(_, &[_], &[_]), .. 23] = [
-            ("\u0020\u0903", &["\u0020\u0903"], &["\u0020", "\u0903"]), ("\u0020\u0308\u0903",
-            &["\u0020\u0308\u0903"], &["\u0020\u0308", "\u0903"]), ("\u000D\u0308\u0903",
-            &["\u000D", "\u0308\u0903"], &["\u000D", "\u0308", "\u0903"]), ("\u000A\u0308\u0903",
-            &["\u000A", "\u0308\u0903"], &["\u000A", "\u0308", "\u0903"]), ("\u0001\u0308\u0903",
-            &["\u0001", "\u0308\u0903"], &["\u0001", "\u0308", "\u0903"]), ("\u0300\u0903",
-            &["\u0300\u0903"], &["\u0300", "\u0903"]), ("\u0300\u0308\u0903",
-            &["\u0300\u0308\u0903"], &["\u0300\u0308", "\u0903"]), ("\u0903\u0903",
-            &["\u0903\u0903"], &["\u0903", "\u0903"]), ("\u0903\u0308\u0903",
-            &["\u0903\u0308\u0903"], &["\u0903\u0308", "\u0903"]), ("\u1100\u0903",
-            &["\u1100\u0903"], &["\u1100", "\u0903"]), ("\u1100\u0308\u0903",
-            &["\u1100\u0308\u0903"], &["\u1100\u0308", "\u0903"]), ("\u1160\u0903",
-            &["\u1160\u0903"], &["\u1160", "\u0903"]), ("\u1160\u0308\u0903",
-            &["\u1160\u0308\u0903"], &["\u1160\u0308", "\u0903"]), ("\u11A8\u0903",
-            &["\u11A8\u0903"], &["\u11A8", "\u0903"]), ("\u11A8\u0308\u0903",
-            &["\u11A8\u0308\u0903"], &["\u11A8\u0308", "\u0903"]), ("\uAC00\u0903",
-            &["\uAC00\u0903"], &["\uAC00", "\u0903"]), ("\uAC00\u0308\u0903",
-            &["\uAC00\u0308\u0903"], &["\uAC00\u0308", "\u0903"]), ("\uAC01\u0903",
-            &["\uAC01\u0903"], &["\uAC01", "\u0903"]), ("\uAC01\u0308\u0903",
-            &["\uAC01\u0308\u0903"], &["\uAC01\u0308", "\u0903"]), ("\U0001F1E6\u0903",
-            &["\U0001F1E6\u0903"], &["\U0001F1E6", "\u0903"]), ("\U0001F1E6\u0308\u0903",
-            &["\U0001F1E6\u0308\u0903"], &["\U0001F1E6\u0308", "\u0903"]), ("\u0378\u0903",
-            &["\u0378\u0903"], &["\u0378", "\u0903"]), ("\u0378\u0308\u0903",
-            &["\u0378\u0308\u0903"], &["\u0378\u0308", "\u0903"]),
+            ("\u{20}\u{903}", &["\u{20}\u{903}"], &["\u{20}", "\u{903}"]), ("\u{20}\u{308}\u{903}",
+            &["\u{20}\u{308}\u{903}"], &["\u{20}\u{308}", "\u{903}"]), ("\u{D}\u{308}\u{903}",
+            &["\u{D}", "\u{308}\u{903}"], &["\u{D}", "\u{308}", "\u{903}"]), ("\u{A}\u{308}\u{903}",
+            &["\u{A}", "\u{308}\u{903}"], &["\u{A}", "\u{308}", "\u{903}"]), ("\u{1}\u{308}\u{903}",
+            &["\u{1}", "\u{308}\u{903}"], &["\u{1}", "\u{308}", "\u{903}"]), ("\u{300}\u{903}",
+            &["\u{300}\u{903}"], &["\u{300}", "\u{903}"]), ("\u{300}\u{308}\u{903}",
+            &["\u{300}\u{308}\u{903}"], &["\u{300}\u{308}", "\u{903}"]), ("\u{903}\u{903}",
+            &["\u{903}\u{903}"], &["\u{903}", "\u{903}"]), ("\u{903}\u{308}\u{903}",
+            &["\u{903}\u{308}\u{903}"], &["\u{903}\u{308}", "\u{903}"]), ("\u{1100}\u{903}",
+            &["\u{1100}\u{903}"], &["\u{1100}", "\u{903}"]), ("\u{1100}\u{308}\u{903}",
+            &["\u{1100}\u{308}\u{903}"], &["\u{1100}\u{308}", "\u{903}"]), ("\u{1160}\u{903}",
+            &["\u{1160}\u{903}"], &["\u{1160}", "\u{903}"]), ("\u{1160}\u{308}\u{903}",
+            &["\u{1160}\u{308}\u{903}"], &["\u{1160}\u{308}", "\u{903}"]), ("\u{11A8}\u{903}",
+            &["\u{11A8}\u{903}"], &["\u{11A8}", "\u{903}"]), ("\u{11A8}\u{308}\u{903}",
+            &["\u{11A8}\u{308}\u{903}"], &["\u{11A8}\u{308}", "\u{903}"]), ("\u{AC00}\u{903}",
+            &["\u{AC00}\u{903}"], &["\u{AC00}", "\u{903}"]), ("\u{AC00}\u{308}\u{903}",
+            &["\u{AC00}\u{308}\u{903}"], &["\u{AC00}\u{308}", "\u{903}"]), ("\u{AC01}\u{903}",
+            &["\u{AC01}\u{903}"], &["\u{AC01}", "\u{903}"]), ("\u{AC01}\u{308}\u{903}",
+            &["\u{AC01}\u{308}\u{903}"], &["\u{AC01}\u{308}", "\u{903}"]), ("\u{1F1E6}\u{903}",
+            &["\u{1F1E6}\u{903}"], &["\u{1F1E6}", "\u{903}"]), ("\u{1F1E6}\u{308}\u{903}",
+            &["\u{1F1E6}\u{308}\u{903}"], &["\u{1F1E6}\u{308}", "\u{903}"]), ("\u{378}\u{903}",
+            &["\u{378}\u{903}"], &["\u{378}", "\u{903}"]), ("\u{378}\u{308}\u{903}",
+            &["\u{378}\u{308}\u{903}"], &["\u{378}\u{308}", "\u{903}"]),
         ];
 
         for &(s, g) in test_same.iter() {
@@ -2465,7 +2588,7 @@ fn split_closure(b: &mut Bencher) {
         let s = "Mary had a little lamb, Little lamb, little-lamb.";
         let len = s.split(' ').count();
 
-        b.iter(|| assert_eq!(s.split(|c: char| c == ' ').count(), len));
+        b.iter(|| assert_eq!(s.split(|&: c: char| c == ' ').count(), len));
     }
 
     #[bench]
index d364f23761caaaff396e36e1b7904cd4af64c0bf..c4659f86680e4426b1cafc8c76cc3a6b240ca114 100644 (file)
@@ -118,7 +118,7 @@ pub fn from_utf8(vec: Vec<u8>) -> Result<String, Vec<u8>> {
     /// ```rust
     /// let input = b"Hello \xF0\x90\x80World";
     /// let output = String::from_utf8_lossy(input);
-    /// assert_eq!(output.as_slice(), "Hello \uFFFDWorld");
+    /// assert_eq!(output.as_slice(), "Hello \u{FFFD}World");
     /// ```
     #[unstable = "return type may change"]
     pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> CowString<'a> {
@@ -276,7 +276,7 @@ pub fn from_utf16(v: &[u16]) -> Option<String> {
     ///           0xD834];
     ///
     /// assert_eq!(String::from_utf16_lossy(v),
-    ///            "𝄞mus\uFFFDic\uFFFD".to_string());
+    ///            "𝄞mus\u{FFFD}ic\u{FFFD}".to_string());
     /// ```
     #[stable]
     pub fn from_utf16_lossy(v: &[u16]) -> String {
@@ -1057,32 +1057,32 @@ fn test_from_utf8_lossy() {
 
         let xs = b"Hello\xC2 There\xFF Goodbye";
         assert_eq!(String::from_utf8_lossy(xs),
-                   String::from_str("Hello\uFFFD There\uFFFD Goodbye").into_cow());
+                   String::from_str("Hello\u{FFFD} There\u{FFFD} Goodbye").into_cow());
 
         let xs = b"Hello\xC0\x80 There\xE6\x83 Goodbye";
         assert_eq!(String::from_utf8_lossy(xs),
-                   String::from_str("Hello\uFFFD\uFFFD There\uFFFD Goodbye").into_cow());
+                   String::from_str("Hello\u{FFFD}\u{FFFD} There\u{FFFD} Goodbye").into_cow());
 
         let xs = b"\xF5foo\xF5\x80bar";
         assert_eq!(String::from_utf8_lossy(xs),
-                   String::from_str("\uFFFDfoo\uFFFD\uFFFDbar").into_cow());
+                   String::from_str("\u{FFFD}foo\u{FFFD}\u{FFFD}bar").into_cow());
 
         let xs = b"\xF1foo\xF1\x80bar\xF1\x80\x80baz";
         assert_eq!(String::from_utf8_lossy(xs),
-                   String::from_str("\uFFFDfoo\uFFFDbar\uFFFDbaz").into_cow());
+                   String::from_str("\u{FFFD}foo\u{FFFD}bar\u{FFFD}baz").into_cow());
 
         let xs = b"\xF4foo\xF4\x80bar\xF4\xBFbaz";
         assert_eq!(String::from_utf8_lossy(xs),
-                   String::from_str("\uFFFDfoo\uFFFDbar\uFFFD\uFFFDbaz").into_cow());
+                   String::from_str("\u{FFFD}foo\u{FFFD}bar\u{FFFD}\u{FFFD}baz").into_cow());
 
         let xs = b"\xF0\x80\x80\x80foo\xF0\x90\x80\x80bar";
-        assert_eq!(String::from_utf8_lossy(xs), String::from_str("\uFFFD\uFFFD\uFFFD\uFFFD\
-                                               foo\U00010000bar").into_cow());
+        assert_eq!(String::from_utf8_lossy(xs), String::from_str("\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\
+                                               foo\u{10000}bar").into_cow());
 
         // surrogates
         let xs = b"\xED\xA0\x80foo\xED\xBF\xBFbar";
-        assert_eq!(String::from_utf8_lossy(xs), String::from_str("\uFFFD\uFFFD\uFFFDfoo\
-                                               \uFFFD\uFFFD\uFFFDbar").into_cow());
+        assert_eq!(String::from_utf8_lossy(xs), String::from_str("\u{FFFD}\u{FFFD}\u{FFFD}foo\
+                                               \u{FFFD}\u{FFFD}\u{FFFD}bar").into_cow());
     }
 
     #[test]
@@ -1124,7 +1124,7 @@ fn test_from_utf16() {
                 0xd801_u16, 0xdc95_u16, 0xd801_u16, 0xdc86_u16,
                 0x000a_u16 ]),
              // Issue #12318, even-numbered non-BMP planes
-             (String::from_str("\U00020000"),
+             (String::from_str("\u{20000}"),
               vec![0xD840, 0xDC00])];
 
         for p in pairs.iter() {
@@ -1162,16 +1162,17 @@ fn test_utf16_invalid() {
     fn test_from_utf16_lossy() {
         // completely positive cases tested above.
         // lead + eof
-        assert_eq!(String::from_utf16_lossy(&[0xD800]), String::from_str("\uFFFD"));
+        assert_eq!(String::from_utf16_lossy(&[0xD800]), String::from_str("\u{FFFD}"));
         // lead + lead
-        assert_eq!(String::from_utf16_lossy(&[0xD800, 0xD800]), String::from_str("\uFFFD\uFFFD"));
+        assert_eq!(String::from_utf16_lossy(&[0xD800, 0xD800]),
+                   String::from_str("\u{FFFD}\u{FFFD}"));
 
         // isolated trail
-        assert_eq!(String::from_utf16_lossy(&[0x0061, 0xDC00]), String::from_str("a\uFFFD"));
+        assert_eq!(String::from_utf16_lossy(&[0x0061, 0xDC00]), String::from_str("a\u{FFFD}"));
 
         // general
         assert_eq!(String::from_utf16_lossy(&[0xD800, 0xd801, 0xdc8b, 0xD800]),
-                   String::from_str("\uFFFD𐒋\uFFFD"));
+                   String::from_str("\u{FFFD}𐒋\u{FFFD}"));
     }
 
     #[test]
@@ -1263,7 +1264,7 @@ fn test_str_truncate_invalid_len() {
     #[test]
     #[should_fail]
     fn test_str_truncate_split_codepoint() {
-        let mut s = String::from_str("\u00FC"); // ü
+        let mut s = String::from_str("\u{FC}"); // ü
         s.truncate(1);
     }
 
index 24395ca64939cfa180651c5d30fb1877ecfe97e7..5c2cf4a81808dd73b4b96c6ce7813d7d73577864 100644 (file)
@@ -234,7 +234,9 @@ pub fn new() -> TreeMap<K, V> { TreeMap{root: None, length: 0} }
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn keys<'a>(&'a self) -> Keys<'a, K, V> {
-        self.iter().map(|(k, _v)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.iter().map(first)
     }
 
     /// Gets a lazy iterator over the values in the map, in ascending order
@@ -256,7 +258,9 @@ pub fn keys<'a>(&'a self) -> Keys<'a, K, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn values<'a>(&'a self) -> Values<'a, K, V> {
-        self.iter().map(|(_k, v)| v)
+        fn second<A, B>((_, b): (A, B)) -> B { b }
+
+        self.iter().map(second)
     }
 
     /// Gets a lazy iterator over the key-value pairs in the map, in ascending order.
@@ -612,7 +616,7 @@ impl<K, V> TreeMap<K, V> {
     /// ```
     #[inline]
     #[experimental = "likely to be renamed, may be removed"]
-    pub fn find_with(&self, f:|&K| -> Ordering) -> Option<&V> {
+    pub fn find_with<F>(&self, f: F) -> Option<&V> where F: FnMut(&K) -> Ordering {
         tree_find_with(&self.root, f)
     }
 
@@ -637,7 +641,9 @@ pub fn find_with(&self, f:|&K| -> Ordering) -> Option<&V> {
     /// ```
     #[inline]
     #[experimental = "likely to be renamed, may be removed"]
-    pub fn find_with_mut<'a>(&'a mut self, f:|&K| -> Ordering) -> Option<&'a mut V> {
+    pub fn find_with_mut<'a, F>(&'a mut self, f: F) -> Option<&'a mut V> where
+        F: FnMut(&K) -> Ordering
+    {
         tree_find_with_mut(&mut self.root, f)
     }
 }
@@ -863,11 +869,11 @@ pub struct RevMutEntries<'a, K:'a, V:'a> {
 
 /// TreeMap keys iterator.
 pub type Keys<'a, K, V> =
-    iter::Map<'static, (&'a K, &'a V), &'a K, Entries<'a, K, V>>;
+    iter::Map<(&'a K, &'a V), &'a K, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>;
 
 /// TreeMap values iterator.
 pub type Values<'a, K, V> =
-    iter::Map<'static, (&'a K, &'a V), &'a V, Entries<'a, K, V>>;
+    iter::Map<(&'a K, &'a V), &'a V, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>;
 
 
 // FIXME #5846 we want to be able to choose between &x and &mut x
@@ -1125,8 +1131,12 @@ fn split<K: Ord, V>(node: &mut Box<TreeNode<K, V>>) {
 // Next 2 functions have the same convention: comparator gets
 // at input current key and returns search_key cmp cur_key
 // (i.e. search_key.cmp(&cur_key))
-fn tree_find_with<'r, K, V>(node: &'r Option<Box<TreeNode<K, V>>>,
-                            f: |&K| -> Ordering) -> Option<&'r V> {
+fn tree_find_with<'r, K, V, F>(
+    node: &'r Option<Box<TreeNode<K, V>>>,
+    mut f: F,
+) -> Option<&'r V> where
+    F: FnMut(&K) -> Ordering,
+{
     let mut current: &'r Option<Box<TreeNode<K, V>>> = node;
     loop {
         match *current {
@@ -1143,8 +1153,12 @@ fn tree_find_with<'r, K, V>(node: &'r Option<Box<TreeNode<K, V>>>,
 }
 
 // See comments above tree_find_with
-fn tree_find_with_mut<'r, K, V>(node: &'r mut Option<Box<TreeNode<K, V>>>,
-                                f: |&K| -> Ordering) -> Option<&'r mut V> {
+fn tree_find_with_mut<'r, K, V, F>(
+    node: &'r mut Option<Box<TreeNode<K, V>>>,
+    mut f: F,
+) -> Option<&'r mut V> where
+    F: FnMut(&K) -> Ordering,
+{
 
     let mut current = node;
     loop {
index 20823a2affc7f5d73fd887a23bf81b9b932089d2..8c8a2c2f78ee989253c1e35cf51f428d76f23f33 100644 (file)
@@ -9,14 +9,13 @@
 // except according to those terms.
 
 //! Maps are collections of unique keys with corresponding values, and sets are
-//! just unique keys without a corresponding value. The `Map` and `Set` traits in
-//! `std::container` define the basic interface.
+//! just unique keys without a corresponding value.
 //!
 //! This crate defines the `TreeMap` and `TreeSet` types. Their keys must implement `Ord`.
 //!
 //! `TreeMap`s are ordered.
 //!
-//! ## Example
+//! # Examples
 //!
 //! ```{rust}
 //! use std::collections::TreeSet;
index ea9aff564483fd94a3fc6932b2a766471b91d17b..b48a610b84999392612b92601e41ce593ec31b27 100644 (file)
 // FIXME(conventions): implement bounded iterators
 // FIXME(conventions): replace rev_iter(_mut) by making iter(_mut) DoubleEnded
 
-/// An implementation of the `Set` trait on top of the `TreeMap` container. The
-/// only requirement is that the type of the elements contained ascribes to the
+/// An implementation of a set on top of the `TreeMap` container. The only
+/// requirement is that the type of the elements contained ascribes to the
 /// `Ord` trait.
 ///
-/// ## Examples
+/// # Examples
 ///
 /// ```{rust}
 /// use std::collections::TreeSet;
@@ -205,7 +205,9 @@ pub fn rev_iter<'a>(&'a self) -> RevSetItems<'a, T> {
     #[inline]
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(self) -> MoveSetItems<T> {
-        self.map.into_iter().map(|(value, _)| value)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.map.into_iter().map(first)
     }
 
     /// Gets a lazy iterator pointing to the first value not less than `v` (greater or equal).
@@ -560,7 +562,7 @@ pub struct RevSetItems<'a, T:'a> {
 }
 
 /// A lazy forward iterator over a set that consumes the set while iterating.
-pub type MoveSetItems<T> = iter::Map<'static, (T, ()), T, MoveEntries<T, ()>>;
+pub type MoveSetItems<T> = iter::Map<(T, ()), T, MoveEntries<T, ()>, fn((T, ())) -> T>;
 
 /// A lazy iterator producing elements in the set difference (in-order).
 pub struct DifferenceItems<'a, T:'a> {
@@ -934,10 +936,23 @@ fn test_hash() {
       assert!(hash::hash(&x) == hash::hash(&y));
     }
 
-    fn check(a: &[int],
-             b: &[int],
-             expected: &[int],
-             f: |&TreeSet<int>, &TreeSet<int>, f: |&int| -> bool| -> bool) {
+    struct Counter<'a, 'b> {
+        i: &'a mut uint,
+        expected: &'b [int],
+    }
+
+    impl<'a, 'b> FnMut(&int) -> bool for Counter<'a, 'b> {
+        extern "rust-call" fn call_mut(&mut self, (&x,): (&int,)) -> bool {
+            assert_eq!(x, self.expected[*self.i]);
+            *self.i += 1;
+            true
+        }
+    }
+
+    fn check<F>(a: &[int], b: &[int], expected: &[int], f: F) where
+        // FIXME Replace `Counter` with `Box<FnMut(&int) -> bool>`
+        F: FnOnce(&TreeSet<int>, &TreeSet<int>, Counter) -> bool,
+    {
         let mut set_a = TreeSet::new();
         let mut set_b = TreeSet::new();
 
@@ -945,11 +960,7 @@ fn check(a: &[int],
         for y in b.iter() { assert!(set_b.insert(*y)) }
 
         let mut i = 0;
-        f(&set_a, &set_b, |x| {
-            assert_eq!(*x, expected[i]);
-            i += 1;
-            true
-        });
+        f(&set_a, &set_b, Counter { i: &mut i, expected: expected });
         assert_eq!(i, expected.len());
     }
 
index 1b087d2e63dd5dfcd175e8e9115f3d57fec81e89..a4dee8076487d142fa0172085398e6c2e7561f6f 100644 (file)
@@ -197,14 +197,18 @@ pub fn each_reverse<'a>(&'a self, f: |&uint, &'a T| -> bool) -> bool {
     /// The iterator's element type is `uint`.
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn keys<'r>(&'r self) -> Keys<'r, T> {
-        self.iter().map(|(k, _v)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.iter().map(first)
     }
 
     /// Gets an iterator visiting all values in ascending order by the keys.
     /// The iterator's element type is `&'r T`.
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn values<'r>(&'r self) -> Values<'r, T> {
-        self.iter().map(|(_k, v)| v)
+        fn second<A, B>((_, b): (A, B)) -> B { b }
+
+        self.iter().map(second)
     }
 
     /// Gets an iterator over the key-value pairs in the map, ordered by keys.
@@ -1091,12 +1095,11 @@ pub struct MutEntries<'a, T:'a> {
 }
 
 /// A forward iterator over the keys of a map.
-pub type Keys<'a, T> =
-    iter::Map<'static, (uint, &'a T), uint, Entries<'a, T>>;
+pub type Keys<'a, T> = iter::Map<(uint, &'a T), uint, Entries<'a, T>, fn((uint, &'a T)) -> uint>;
 
 /// A forward iterator over the values of a map.
 pub type Values<'a, T> =
-    iter::Map<'static, (uint, &'a T), &'a T, Entries<'a, T>>;
+    iter::Map<(uint, &'a T), &'a T, Entries<'a, T>, fn((uint, &'a T)) -> &'a T>;
 
 // FIXME #5846: see `addr!` above.
 macro_rules! item { ($i:item) => {$i}}
index 9dcb182cd267570b259926cb1993bfbdc0f27527..4d9191a65b695fa80946a2431bf35245462b1240 100644 (file)
@@ -9,8 +9,7 @@
 // except according to those terms.
 
 //! Maps are collections of unique keys with corresponding values, and sets are
-//! just unique keys without a corresponding value. The `Map` and `Set` traits in
-//! `std::container` define the basic interface.
+//! just unique keys without a corresponding value.
 //!
 //! This crate defines `TrieMap` and `TrieSet`, which require `uint` keys.
 //!
index 46052ff2f5080c2e488317c097a703dfc782a86b..5621726dc568291368c42f7945575010f2f8db2c 100644 (file)
@@ -743,10 +743,23 @@ fn test_ord() {
         assert!(a < b && a <= b);
     }
 
-    fn check(a: &[uint],
-             b: &[uint],
-             expected: &[uint],
-             f: |&TrieSet, &TrieSet, f: |uint| -> bool| -> bool) {
+    struct Counter<'a, 'b> {
+        i: &'a mut uint,
+        expected: &'b [uint],
+    }
+
+    impl<'a, 'b> FnMut(uint) -> bool for Counter<'a, 'b> {
+        extern "rust-call" fn call_mut(&mut self, (x,): (uint,)) -> bool {
+            assert_eq!(x, self.expected[*self.i]);
+            *self.i += 1;
+            true
+        }
+    }
+
+    fn check<F>(a: &[uint], b: &[uint], expected: &[uint], f: F) where
+        // FIXME Replace `Counter` with `Box<FnMut(&uint) -> bool>`
+        F: FnOnce(&TrieSet, &TrieSet, Counter) -> bool,
+    {
         let mut set_a = TrieSet::new();
         let mut set_b = TrieSet::new();
 
@@ -754,11 +767,7 @@ fn check(a: &[uint],
         for y in b.iter() { assert!(set_b.insert(*y)) }
 
         let mut i = 0;
-        f(&set_a, &set_b, |x| {
-            assert_eq!(x, expected[i]);
-            i += 1;
-            true
-        });
+        f(&set_a, &set_b, Counter { i: &mut i, expected: expected });
         assert_eq!(i, expected.len());
     }
 
index a575d1f4bd294dd8202ee7f56376a41d9a34a94a..2ed8686394c01d4aeebe65edb10d2a8b328ae007 100644 (file)
@@ -206,7 +206,7 @@ pub fn with_capacity(capacity: uint) -> Vec<T> {
     #[inline]
     #[unstable = "the naming is uncertain as well as this migrating to unboxed \
                   closures in the future"]
-    pub fn from_fn(length: uint, op: |uint| -> T) -> Vec<T> {
+    pub fn from_fn<F>(length: uint, mut op: F) -> Vec<T> where F: FnMut(uint) -> T {
         unsafe {
             let mut xs = Vec::with_capacity(length);
             while xs.len < length {
@@ -289,7 +289,7 @@ pub unsafe fn from_raw_buf(ptr: *const T, elts: uint) -> Vec<T> {
     /// ```
     #[inline]
     #[experimental]
-    pub fn partition(self, f: |&T| -> bool) -> (Vec<T>, Vec<T>) {
+    pub fn partition<F>(self, mut f: F) -> (Vec<T>, Vec<T>) where F: FnMut(&T) -> bool {
         let mut lefts  = Vec::new();
         let mut rights = Vec::new();
 
@@ -400,7 +400,7 @@ pub fn grow(&mut self, n: uint, value: T) {
     /// assert_eq!(odd, vec![1i, 3]);
     /// ```
     #[experimental]
-    pub fn partitioned(&self, f: |&T| -> bool) -> (Vec<T>, Vec<T>) {
+    pub fn partitioned<F>(&self, mut f: F) -> (Vec<T>, Vec<T>) where F: FnMut(&T) -> bool {
         let mut lefts = Vec::new();
         let mut rights = Vec::new();
 
@@ -991,7 +991,7 @@ pub fn remove(&mut self, index: uint) -> Option<T> {
     /// assert_eq!(vec, vec![2, 4]);
     /// ```
     #[unstable = "the closure argument may become an unboxed closure"]
-    pub fn retain(&mut self, f: |&T| -> bool) {
+    pub fn retain<F>(&mut self, mut f: F) where F: FnMut(&T) -> bool {
         let len = self.len();
         let mut del = 0u;
         {
@@ -1023,7 +1023,7 @@ pub fn retain(&mut self, f: |&T| -> bool) {
     /// assert_eq!(vec, vec![0, 1, 0, 1, 2]);
     /// ```
     #[unstable = "this function may be renamed or change to unboxed closures"]
-    pub fn grow_fn(&mut self, n: uint, f: |uint| -> T) {
+    pub fn grow_fn<F>(&mut self, n: uint, mut f: F) where F: FnMut(uint) -> T {
         self.reserve(n);
         for i in range(0u, n) {
             self.push(f(i));
@@ -1570,7 +1570,7 @@ impl<T> Vec<T> {
     /// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
     /// assert_eq!(newtyped_bytes.as_slice(), [Newtype(0x11), Newtype(0x22)].as_slice());
     /// ```
-    pub fn map_in_place<U>(self, f: |T| -> U) -> Vec<U> {
+    pub fn map_in_place<U, F>(self, mut f: F) -> Vec<U> where F: FnMut(T) -> U {
         // FIXME: Assert statically that the types `T` and `U` have the same
         // size.
         assert!(mem::size_of::<T>() == mem::size_of::<U>());
@@ -2160,6 +2160,35 @@ fn test_map_in_place_zero_sized() {
         assert_eq!(v.map_in_place(|_| ZeroSized), [ZeroSized, ZeroSized]);
     }
 
+    #[test]
+    fn test_map_in_place_zero_drop_count() {
+        use std::sync::atomic;
+        use std::sync::atomic::AtomicUint;
+
+        #[deriving(Clone, PartialEq, Show)]
+        struct Nothing;
+        impl Drop for Nothing { fn drop(&mut self) { } }
+
+        #[deriving(Clone, PartialEq, Show)]
+        struct ZeroSized;
+        impl Drop for ZeroSized {
+            fn drop(&mut self) {
+                DROP_COUNTER.fetch_add(1, atomic::Relaxed);
+            }
+        }
+        const NUM_ELEMENTS: uint = 2;
+        static DROP_COUNTER: AtomicUint = atomic::INIT_ATOMIC_UINT;
+
+        let v = Vec::from_elem(NUM_ELEMENTS, Nothing);
+
+        DROP_COUNTER.store(0, atomic::Relaxed);
+
+        let v = v.map_in_place(|_| ZeroSized);
+        assert_eq!(DROP_COUNTER.load(atomic::Relaxed), 0);
+        drop(v);
+        assert_eq!(DROP_COUNTER.load(atomic::Relaxed), NUM_ELEMENTS);
+    }
+
     #[test]
     fn test_move_items() {
         let vec = vec![1, 2, 3];
index 3b8c690e0474964642cfbfa4f3d96430cb8fbb60..cc2fd0a66469017fa55ba0fc03c058ac1113a820 100644 (file)
@@ -20,6 +20,7 @@
 use core::iter;
 use core::iter::{Enumerate, FilterMap};
 use core::mem::replace;
+use core::ops::FnOnce;
 
 use hash::{Hash, Writer};
 use {vec, slice};
@@ -141,14 +142,18 @@ pub fn capacity(&self) -> uint {
     /// The iterator's element type is `uint`.
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn keys<'r>(&'r self) -> Keys<'r, V> {
-        self.iter().map(|(k, _v)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.iter().map(first)
     }
 
     /// Returns an iterator visiting all values in ascending order by the keys.
     /// The iterator's element type is `&'r V`.
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn values<'r>(&'r self) -> Values<'r, V> {
-        self.iter().map(|(_k, v)| v)
+        fn second<A, B>((_, b): (A, B)) -> B { b }
+
+        self.iter().map(second)
     }
 
     /// Returns an iterator visiting all key-value pairs in ascending order by the keys.
@@ -230,10 +235,12 @@ pub fn iter_mut<'r>(&'r mut self) -> MutEntries<'r, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(&mut self) -> MoveItems<V> {
-        let values = replace(&mut self.v, vec!());
-        values.into_iter().enumerate().filter_map(|(i, v)| {
+        fn filter<A>((i, v): (uint, Option<A>)) -> Option<(uint, A)> {
             v.map(|v| (i, v))
-        })
+        }
+
+        let values = replace(&mut self.v, vec!());
+        values.into_iter().enumerate().filter_map(filter)
     }
 
     /// Return the number of elements in the map.
@@ -446,8 +453,8 @@ impl<V:Clone> VecMap<V> {
     /// assert!(!map.update(1, vec![3i, 4], |mut old, new| { old.extend(new.into_iter()); old }));
     /// assert_eq!(map[1], vec![1i, 2, 3, 4]);
     /// ```
-    pub fn update(&mut self, key: uint, newval: V, ff: |V, V| -> V) -> bool {
-        self.update_with_key(key, newval, |_k, v, v1| ff(v,v1))
+    pub fn update<F>(&mut self, key: uint, newval: V, ff: F) -> bool where F: FnOnce(V, V) -> V {
+        self.update_with_key(key, newval, move |_k, v, v1| ff(v,v1))
     }
 
     /// Updates a value in the map. If the key already exists in the map,
@@ -470,11 +477,9 @@ pub fn update(&mut self, key: uint, newval: V, ff: |V, V| -> V) -> bool {
     /// assert!(!map.update_with_key(7, 20, |key, old, new| (old + new) % key));
     /// assert_eq!(map[7], 2);
     /// ```
-    pub fn update_with_key(&mut self,
-                           key: uint,
-                           val: V,
-                           ff: |uint, V, V| -> V)
-                           -> bool {
+    pub fn update_with_key<F>(&mut self, key: uint, val: V, ff: F) -> bool where
+        F: FnOnce(uint, V, V) -> V
+    {
         let new_val = match self.get(&key) {
             None => val,
             Some(orig) => ff(key, (*orig).clone(), val)
@@ -620,16 +625,18 @@ pub struct MutEntries<'a, V:'a> {
 double_ended_iterator!(impl MutEntries -> (uint, &'a mut V), as_mut)
 
 /// Forward iterator over the keys of a map
-pub type Keys<'a, V> =
-    iter::Map<'static, (uint, &'a V), uint, Entries<'a, V>>;
+pub type Keys<'a, V> = iter::Map<(uint, &'a V), uint, Entries<'a, V>, fn((uint, &'a V)) -> uint>;
 
 /// Forward iterator over the values of a map
 pub type Values<'a, V> =
-    iter::Map<'static, (uint, &'a V), &'a V, Entries<'a, V>>;
+    iter::Map<(uint, &'a V), &'a V, Entries<'a, V>, fn((uint, &'a V)) -> &'a V>;
 
 /// Iterator over the key-value pairs of a map, the iterator consumes the map
-pub type MoveItems<V> =
-    FilterMap<'static, (uint, Option<V>), (uint, V), Enumerate<vec::MoveItems<Option<V>>>>;
+pub type MoveItems<V> = FilterMap<
+    (uint, Option<V>),
+    (uint, V),
+    Enumerate<vec::MoveItems<Option<V>>>,
+    fn((uint, Option<V>)) -> Option<(uint, V)>>;
 
 #[cfg(test)]
 mod test_map {
index 8485e40819b5b1f1df668d83163b254a21c9f503..75f7991df027b51fc8df78d4feea4433b107dd7a 100644 (file)
@@ -16,6 +16,7 @@
 #![doc(primitive = "char")]
 
 use mem::transmute;
+use ops::FnMut;
 use option::Option;
 use option::Option::{None, Some};
 use iter::{range_step, Iterator, RangeStep};
@@ -65,7 +66,7 @@
 
 /// The highest valid code point
 #[stable]
-pub const MAX: char = '\U0010ffff';
+pub const MAX: char = '\u{10ffff}';
 
 /// Converts from `u32` to a `char`
 #[inline]
@@ -161,11 +162,11 @@ pub fn from_digit(num: uint, radix: uint) -> Option<char> {
 /// The rules are as follows:
 ///
 /// - chars in [0,0xff] get 2-digit escapes: `\\xNN`
-/// - chars in [0x100,0xffff] get 4-digit escapes: `\\uNNNN`
-/// - chars above 0x10000 get 8-digit escapes: `\\UNNNNNNNN`
+/// - chars in [0x100,0xffff] get 4-digit escapes: `\\u{NNNN}`
+/// - chars above 0x10000 get 8-digit escapes: `\\u{{NNN}NNNNN}`
 ///
 #[deprecated = "use the Char::escape_unicode method"]
-pub fn escape_unicode(c: char, f: |char|) {
+pub fn escape_unicode<F>(c: char, mut f: F) where F: FnMut(char) {
     for char in c.escape_unicode() {
         f(char);
     }
@@ -184,7 +185,7 @@ pub fn escape_unicode(c: char, f: |char|) {
 /// - Any other chars are given hex Unicode escapes; see `escape_unicode`.
 ///
 #[deprecated = "use the Char::escape_default method"]
-pub fn escape_default(c: char, f: |char|) {
+pub fn escape_default<F>(c: char, mut f: F) where F: FnMut(char) {
     for c in c.escape_default() {
         f(c);
     }
@@ -269,8 +270,8 @@ pub trait Char {
     /// The rules are as follows:
     ///
     /// * Characters in [0,0xff] get 2-digit escapes: `\\xNN`
-    /// * Characters in [0x100,0xffff] get 4-digit escapes: `\\uNNNN`.
-    /// * Characters above 0x10000 get 8-digit escapes: `\\UNNNNNNNN`.
+    /// * Characters in [0x100,0xffff] get 4-digit escapes: `\\u{NNNN}`.
+    /// * Characters above 0x10000 get 8-digit escapes: `\\u{{NNN}NNNNN}`.
     #[unstable = "pending error conventions, trait organization"]
     fn escape_unicode(self) -> UnicodeEscapedChars;
 
@@ -470,7 +471,7 @@ fn next(&mut self) -> Option<char> {
             }
             UnicodeEscapedCharsState::Type => {
                 let (typechar, pad) = if self.c <= '\x7f' { ('x', 2) }
-                                      else if self.c <= '\uffff' { ('u', 4) }
+                                      else if self.c <= '\u{ffff}' { ('u', 4) }
                                       else { ('U', 8) };
                 self.state = UnicodeEscapedCharsState::Value(range_step(4 * (pad - 1), -1, -4i32));
                 Some(typechar)
index d2b7591b3efa10a32050d348b682602816f63ad9..2b48b2bf81afbd25563ac6b1a07697ebbb239784 100644 (file)
 //! # Example
 //!
 //! ```
+//! # #![feature(unboxed_closures)]
+//!
 //! use std::finally::Finally;
 //!
-//! (|| {
+//! # fn main() {
+//! (|&mut:| {
 //!     // ...
 //! }).finally(|| {
 //!     // this code is always run
 //! })
+//! # }
 //! ```
 
 #![experimental]
 
-use ops::Drop;
+use ops::{Drop, FnMut, FnOnce};
 
 /// A trait for executing a destructor unconditionally after a block of code,
 /// regardless of whether the blocked fails.
 pub trait Finally<T> {
     /// Executes this object, unconditionally running `dtor` after this block of
     /// code has run.
-    fn finally(&mut self, dtor: ||) -> T;
-}
-
-impl<'a,T> Finally<T> for ||: 'a -> T {
-    fn finally(&mut self, dtor: ||) -> T {
-        try_finally(&mut (), self,
-                    |_, f| (*f)(),
-                    |_| dtor())
-    }
+    fn finally<F>(&mut self, dtor: F) -> T where F: FnMut();
 }
 
-impl<T> Finally<T> for fn() -> T {
-    fn finally(&mut self, dtor: ||) -> T {
-        try_finally(&mut (), (),
-                    |_, _| (*self)(),
-                    |_| dtor())
+impl<T, F> Finally<T> for F where F: FnMut() -> T {
+    fn finally<G>(&mut self, mut dtor: G) -> T where G: FnMut() {
+        try_finally(&mut (), self, |_, f| (*f)(), |_| dtor())
     }
 }
 
@@ -86,11 +80,10 @@ fn finally(&mut self, dtor: ||) -> T {
 ///         // use state.buffer, state.len to cleanup
 ///     })
 /// ```
-pub fn try_finally<T,U,R>(mutate: &mut T,
-                          drop: U,
-                          try_fn: |&mut T, U| -> R,
-                          finally_fn: |&mut T|)
-                          -> R {
+pub fn try_finally<T, U, R, F, G>(mutate: &mut T, drop: U, try_fn: F, finally_fn: G) -> R where
+    F: FnOnce(&mut T, U) -> R,
+    G: FnMut(&mut T),
+{
     let f = Finallyalizer {
         mutate: mutate,
         dtor: finally_fn,
@@ -98,13 +91,13 @@ pub fn try_finally<T,U,R>(mutate: &mut T,
     try_fn(&mut *f.mutate, drop)
 }
 
-struct Finallyalizer<'a,A:'a> {
+struct Finallyalizer<'a, A:'a, F> where F: FnMut(&mut A) {
     mutate: &'a mut A,
-    dtor: |&mut A|: 'a
+    dtor: F,
 }
 
 #[unsafe_destructor]
-impl<'a,A> Drop for Finallyalizer<'a,A> {
+impl<'a, A, F> Drop for Finallyalizer<'a, A, F> where F: FnMut(&mut A) {
     #[inline]
     fn drop(&mut self) {
         (self.dtor)(self.mutate);
index 400ce76baa0d27a865a2f1051c6bb36070f363d4..fb4d91e912a3b65c75706dd0d394f1d34d064c58 100644 (file)
@@ -20,6 +20,7 @@
 use iter::{range, DoubleEndedIteratorExt};
 use num::{Float, FPNaN, FPInfinite, ToPrimitive};
 use num::cast;
+use ops::FnOnce;
 use result::Result::Ok;
 use slice::{mod, SlicePrelude};
 use str::StrPrelude;
@@ -84,7 +85,7 @@ pub enum SignFormat {
 ///   between digit and exponent sign `'e'`.
 /// - Panics if `radix` > 25 and `exp_format` is `ExpBin` due to conflict
 ///   between digit and exponent sign `'p'`.
-pub fn float_to_str_bytes_common<T: Float, U>(
+pub fn float_to_str_bytes_common<T: Float, U, F>(
     num: T,
     radix: uint,
     negative_zero: bool,
@@ -92,8 +93,10 @@ pub fn float_to_str_bytes_common<T: Float, U>(
     digits: SignificantDigits,
     exp_format: ExponentFormat,
     exp_upper: bool,
-    f: |&[u8]| -> U
-) -> U {
+    f: F
+) -> U where
+    F: FnOnce(&[u8]) -> U,
+{
     assert!(2 <= radix && radix <= 36);
     match exp_format {
         ExpDec if radix >= DIGIT_E_RADIX       // decimal exponent 'e'
index 88ea811cfd694b25eaeae7e920872d424f860f4e..37a1d4d564d843836b1cd45faffece81fd1a85ca 100644 (file)
@@ -19,7 +19,7 @@
 use mem;
 use option::Option;
 use option::Option::{Some, None};
-use ops::Deref;
+use ops::{Deref, FnOnce};
 use result::Result::{Ok, Err};
 use result;
 use slice::SlicePrelude;
@@ -491,10 +491,9 @@ pub fn pad(&mut self, s: &str) -> Result {
 
     /// Runs a callback, emitting the correct padding either before or
     /// afterwards depending on whether right or left alignment is requested.
-    fn with_padding(&mut self,
-                    padding: uint,
-                    default: rt::Alignment,
-                    f: |&mut Formatter| -> Result) -> Result {
+    fn with_padding<F>(&mut self, padding: uint, default: rt::Alignment, f: F) -> Result where
+        F: FnOnce(&mut Formatter) -> Result,
+    {
         use char::Char;
         let align = match self.align {
             rt::AlignUnknown => default,
index ddca9d36bed7ecfc2d1ecb7a5d43d6277fce3254..8ee2a8874bb0368812675da1994e3a3ebca0d9af 100644 (file)
@@ -62,7 +62,7 @@
 use kinds::Copy;
 use mem;
 use num::{ToPrimitive, Int};
-use ops::{Add, Deref};
+use ops::{Add, Deref, FnMut};
 use option::Option;
 use option::Option::{Some, None};
 use uint;
@@ -165,7 +165,7 @@ fn zip<B, U: Iterator<B>>(self, other: U) -> Zip<Self, U> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn map<'r, B>(self, f: |A|: 'r -> B) -> Map<'r, A, B, Self> {
+    fn map<B, F: FnMut(A) -> B>(self, f: F) -> Map<A, B, Self, F> {
         Map{iter: self, f: f}
     }
 
@@ -183,7 +183,7 @@ fn map<'r, B>(self, f: |A|: 'r -> B) -> Map<'r, A, B, Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn filter<'r>(self, predicate: |&A|: 'r -> bool) -> Filter<'r, A, Self> {
+    fn filter<P>(self, predicate: P) -> Filter<A, Self, P> where P: FnMut(&A) -> bool {
         Filter{iter: self, predicate: predicate}
     }
 
@@ -201,7 +201,7 @@ fn filter<'r>(self, predicate: |&A|: 'r -> bool) -> Filter<'r, A, Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn filter_map<'r, B>(self, f: |A|: 'r -> Option<B>) -> FilterMap<'r, A, B, Self> {
+    fn filter_map<B, F>(self, f: F) -> FilterMap<A, B, Self, F> where F: FnMut(A) -> Option<B> {
         FilterMap { iter: self, f: f }
     }
 
@@ -264,7 +264,7 @@ fn peekable(self) -> Peekable<A, Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn skip_while<'r>(self, predicate: |&A|: 'r -> bool) -> SkipWhile<'r, A, Self> {
+    fn skip_while<P>(self, predicate: P) -> SkipWhile<A, Self, P> where P: FnMut(&A) -> bool {
         SkipWhile{iter: self, flag: false, predicate: predicate}
     }
 
@@ -283,7 +283,7 @@ fn skip_while<'r>(self, predicate: |&A|: 'r -> bool) -> SkipWhile<'r, A, Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures, may want to require peek"]
-    fn take_while<'r>(self, predicate: |&A|: 'r -> bool) -> TakeWhile<'r, A, Self> {
+    fn take_while<P>(self, predicate: P) -> TakeWhile<A, Self, P> where P: FnMut(&A) -> bool {
         TakeWhile{iter: self, flag: false, predicate: predicate}
     }
 
@@ -346,8 +346,9 @@ fn take(self, n: uint) -> Take<Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn scan<'r, St, B>(self, initial_state: St, f: |&mut St, A|: 'r -> Option<B>)
-        -> Scan<'r, A, B, Self, St> {
+    fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<A, B, Self, St, F> where
+        F: FnMut(&mut St, A) -> Option<B>,
+    {
         Scan{iter: self, f: f, state: initial_state}
     }
 
@@ -371,8 +372,10 @@ fn scan<'r, St, B>(self, initial_state: St, f: |&mut St, A|: 'r -> Option<B>)
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn flat_map<'r, B, U: Iterator<B>>(self, f: |A|: 'r -> U)
-        -> FlatMap<'r, A, Self, U> {
+    fn flat_map<B, U, F>(self, f: F) -> FlatMap<A, B, Self, U, F> where
+        U: Iterator<B>,
+        F: FnMut(A) -> U,
+    {
         FlatMap{iter: self, f: f, frontiter: None, backiter: None }
     }
 
@@ -429,7 +432,7 @@ fn fuse(self) -> Fuse<Self> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn inspect<'r>(self, f: |&A|: 'r) -> Inspect<'r, A, Self> {
+    fn inspect<F>(self, f: F) -> Inspect<A, Self, F> where F: FnMut(&A) {
         Inspect{iter: self, f: f}
     }
 
@@ -518,7 +521,7 @@ fn last(mut self) -> Option<A> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures, just changed to take self by value"]
-    fn fold<B>(mut self, init: B, f: |B, A| -> B) -> B {
+    fn fold<B, F>(mut self, init: B, mut f: F) -> B where F: FnMut(B, A) -> B {
         let mut accum = init;
         for x in self {
             accum = f(accum, x);
@@ -552,7 +555,7 @@ fn count(self) -> uint {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures, just changed to take self by value"]
-    fn all(mut self, f: |A| -> bool) -> bool {
+    fn all<F>(mut self, mut f: F) -> bool where F: FnMut(A) -> bool {
         for x in self { if !f(x) { return false; } }
         true
     }
@@ -570,7 +573,7 @@ fn all(mut self, f: |A| -> bool) -> bool {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn any(&mut self, f: |A| -> bool) -> bool {
+    fn any<F>(&mut self, mut f: F) -> bool where F: FnMut(A) -> bool {
         for x in *self { if f(x) { return true; } }
         false
     }
@@ -580,7 +583,7 @@ fn any(&mut self, f: |A| -> bool) -> bool {
     /// Does not consume the iterator past the first found element.
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn find(&mut self, predicate: |&A| -> bool) -> Option<A> {
+    fn find<P>(&mut self, mut predicate: P) -> Option<A> where P: FnMut(&A) -> bool {
         for x in *self {
             if predicate(&x) { return Some(x) }
         }
@@ -590,7 +593,7 @@ fn find(&mut self, predicate: |&A| -> bool) -> Option<A> {
     /// Return the index of the first element satisfying the specified predicate
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    fn position(&mut self, predicate: |A| -> bool) -> Option<uint> {
+    fn position<P>(&mut self, mut predicate: P) -> Option<uint> where P: FnMut(A) -> bool {
         let mut i = 0;
         for x in *self {
             if predicate(x) {
@@ -614,7 +617,7 @@ fn position(&mut self, predicate: |A| -> bool) -> Option<uint> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures, just changed to take self by value"]
-    fn max_by<B: Ord>(self, f: |&A| -> B) -> Option<A> {
+    fn max_by<B: Ord, F>(self, mut f: F) -> Option<A> where F: FnMut(&A) -> B {
         self.fold(None, |max: Option<(A, B)>, x| {
             let x_val = f(&x);
             match max {
@@ -641,7 +644,7 @@ fn max_by<B: Ord>(self, f: |&A| -> B) -> Option<A> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures, just changed to take self by value"]
-    fn min_by<B: Ord>(self, f: |&A| -> B) -> Option<A> {
+    fn min_by<B: Ord, F>(self, mut f: F) -> Option<A> where F: FnMut(&A) -> B {
         self.fold(None, |min: Option<(A, B)>, x| {
             let x_val = f(&x);
             match min {
@@ -746,7 +749,7 @@ pub trait ExactSizeIterator<A> : DoubleEndedIterator<A> {
     ///
     /// If no element matches, None is returned.
     #[inline]
-    fn rposition(&mut self, predicate: |A| -> bool) -> Option<uint> {
+    fn rposition<P>(&mut self, mut predicate: P) -> Option<uint> where P: FnMut(A) -> bool {
         let len = self.len();
         for i in range(0, len).rev() {
             if predicate(self.next_back().expect("rposition: incorrect ExactSizeIterator")) {
@@ -774,11 +777,17 @@ fn len(&self) -> uint {
 #[unstable = "trait is unstable"]
 impl<A, T: ExactSizeIterator<A>> ExactSizeIterator<(uint, A)> for Enumerate<T> {}
 #[unstable = "trait is unstable"]
-impl<'a, A, T: ExactSizeIterator<A>> ExactSizeIterator<A> for Inspect<'a, A, T> {}
+impl<A, I, F> ExactSizeIterator<A> for Inspect<A, I, F> where
+    I: ExactSizeIterator<A>,
+    F: FnMut(&A),
+{}
 #[unstable = "trait is unstable"]
 impl<A, T: ExactSizeIterator<A>> ExactSizeIterator<A> for Rev<T> {}
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: ExactSizeIterator<A>> ExactSizeIterator<B> for Map<'a, A, B, T> {}
+impl<A, B, I, F> ExactSizeIterator<B> for Map<A, B, I, F> where
+    I: ExactSizeIterator<A>,
+    F: FnMut(A) -> B,
+{}
 #[unstable = "trait is unstable"]
 impl<A, B, T, U> ExactSizeIterator<(A, B)> for Zip<T, U>
     where T: ExactSizeIterator<A>, U: ExactSizeIterator<B> {}
@@ -1374,12 +1383,12 @@ fn idx(&mut self, index: uint) -> Option<(A, B)> {
 /// An iterator which maps the values of `iter` with `f`
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-pub struct Map<'a, A, B, T> {
-    iter: T,
-    f: |A|: 'a -> B
+pub struct Map<A, B, I: Iterator<A>, F: FnMut(A) -> B> {
+    iter: I,
+    f: F,
 }
 
-impl<'a, A, B, T> Map<'a, A, B, T> {
+impl<A, B, I, F> Map<A, B, I, F> where I: Iterator<A>, F: FnMut(A) -> B {
     #[inline]
     fn do_map(&mut self, elt: Option<A>) -> Option<B> {
         match elt {
@@ -1390,7 +1399,7 @@ fn do_map(&mut self, elt: Option<A>) -> Option<B> {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: Iterator<A>> Iterator<B> for Map<'a, A, B, T> {
+impl<A, B, I, F> Iterator<B> for Map<A, B, I, F> where I: Iterator<A>, F: FnMut(A) -> B {
     #[inline]
     fn next(&mut self) -> Option<B> {
         let next = self.iter.next();
@@ -1404,7 +1413,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: DoubleEndedIterator<A>> DoubleEndedIterator<B> for Map<'a, A, B, T> {
+impl<A, B, I, F> DoubleEndedIterator<B> for Map<A, B, I, F> where
+    I: DoubleEndedIterator<A>,
+    F: FnMut(A) -> B,
+{
     #[inline]
     fn next_back(&mut self) -> Option<B> {
         let next = self.iter.next_back();
@@ -1413,7 +1425,10 @@ fn next_back(&mut self) -> Option<B> {
 }
 
 #[experimental = "trait is experimental"]
-impl<'a, A, B, T: RandomAccessIterator<A>> RandomAccessIterator<B> for Map<'a, A, B, T> {
+impl<A, B, I, F> RandomAccessIterator<B> for Map<A, B, I, F> where
+    I: RandomAccessIterator<A>,
+    F: FnMut(A) -> B,
+{
     #[inline]
     fn indexable(&self) -> uint {
         self.iter.indexable()
@@ -1429,13 +1444,13 @@ fn idx(&mut self, index: uint) -> Option<B> {
 /// An iterator which filters the elements of `iter` with `predicate`
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-pub struct Filter<'a, A, T> {
-    iter: T,
-    predicate: |&A|: 'a -> bool
+pub struct Filter<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
+    iter: I,
+    predicate: P,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: Iterator<A>> Iterator<A> for Filter<'a, A, T> {
+impl<A, I, P> Iterator<A> for Filter<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
     #[inline]
     fn next(&mut self) -> Option<A> {
         for x in self.iter {
@@ -1456,7 +1471,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for Filter<'a, A, T> {
+impl<A, I, P> DoubleEndedIterator<A> for Filter<A, I, P> where
+    I: DoubleEndedIterator<A>,
+    P: FnMut(&A) -> bool,
+{
     #[inline]
     fn next_back(&mut self) -> Option<A> {
         for x in self.iter.by_ref().rev() {
@@ -1471,13 +1489,16 @@ fn next_back(&mut self) -> Option<A> {
 /// An iterator which uses `f` to both filter and map elements from `iter`
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-pub struct FilterMap<'a, A, B, T> {
-    iter: T,
-    f: |A|: 'a -> Option<B>
+pub struct FilterMap<A, B, I, F> where I: Iterator<A>, F: FnMut(A) -> Option<B> {
+    iter: I,
+    f: F,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: Iterator<A>> Iterator<B> for FilterMap<'a, A, B, T> {
+impl<A, B, I, F> Iterator<B> for FilterMap<A, B, I, F> where
+    I: Iterator<A>,
+    F: FnMut(A) -> Option<B>,
+{
     #[inline]
     fn next(&mut self) -> Option<B> {
         for x in self.iter {
@@ -1497,8 +1518,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: DoubleEndedIterator<A>> DoubleEndedIterator<B>
-for FilterMap<'a, A, B, T> {
+impl<A, B, I, F> DoubleEndedIterator<B> for FilterMap<A, B, I, F> where
+    I: DoubleEndedIterator<A>,
+    F: FnMut(A) -> Option<B>,
+{
     #[inline]
     fn next_back(&mut self) -> Option<B> {
         for x in self.iter.by_ref().rev() {
@@ -1628,14 +1651,14 @@ pub fn is_empty(&mut self) -> bool {
 /// An iterator which rejects elements while `predicate` is true
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-pub struct SkipWhile<'a, A, T> {
-    iter: T,
+pub struct SkipWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
+    iter: I,
     flag: bool,
-    predicate: |&A|: 'a -> bool
+    predicate: P,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: Iterator<A>> Iterator<A> for SkipWhile<'a, A, T> {
+impl<A, I, P> Iterator<A> for SkipWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
     #[inline]
     fn next(&mut self) -> Option<A> {
         for x in self.iter {
@@ -1657,14 +1680,14 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 /// An iterator which only accepts elements while `predicate` is true
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[stable]
-pub struct TakeWhile<'a, A, T> {
-    iter: T,
+pub struct TakeWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
+    iter: I,
     flag: bool,
-    predicate: |&A|: 'a -> bool
+    predicate: P,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: Iterator<A>> Iterator<A> for TakeWhile<'a, A, T> {
+impl<A, I, P> Iterator<A> for TakeWhile<A, I, P> where I: Iterator<A>, P: FnMut(&A) -> bool {
     #[inline]
     fn next(&mut self) -> Option<A> {
         if self.flag {
@@ -1816,16 +1839,19 @@ fn idx(&mut self, index: uint) -> Option<A> {
 /// An iterator to maintain state while iterating another iterator
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[unstable = "waiting for unboxed closures"]
-pub struct Scan<'a, A, B, T, St> {
-    iter: T,
-    f: |&mut St, A|: 'a -> Option<B>,
+pub struct Scan<A, B, I, St, F> where I: Iterator<A>, F: FnMut(&mut St, A) -> Option<B> {
+    iter: I,
+    f: F,
 
     /// The current internal state to be passed to the closure next.
     pub state: St,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, B, T: Iterator<A>, St> Iterator<B> for Scan<'a, A, B, T, St> {
+impl<A, B, I, St, F> Iterator<B> for Scan<A, B, I, St, F> where
+    I: Iterator<A>,
+    F: FnMut(&mut St, A) -> Option<B>,
+{
     #[inline]
     fn next(&mut self) -> Option<B> {
         self.iter.next().and_then(|a| (self.f)(&mut self.state, a))
@@ -1843,15 +1869,19 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 ///
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[unstable = "waiting for unboxed closures"]
-pub struct FlatMap<'a, A, T, U> {
-    iter: T,
-    f: |A|: 'a -> U,
+pub struct FlatMap<A, B, I, U, F> where I: Iterator<A>, U: Iterator<B>, F: FnMut(A) -> U {
+    iter: I,
+    f: F,
     frontiter: Option<U>,
     backiter: Option<U>,
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: Iterator<A>, B, U: Iterator<B>> Iterator<B> for FlatMap<'a, A, T, U> {
+impl<A, B, I, U, F> Iterator<B> for FlatMap<A, B, I, U, F> where
+    I: Iterator<A>,
+    U: Iterator<B>,
+    F: FnMut(A) -> U,
+{
     #[inline]
     fn next(&mut self) -> Option<B> {
         loop {
@@ -1880,10 +1910,11 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a,
-     A, T: DoubleEndedIterator<A>,
-     B, U: DoubleEndedIterator<B>> DoubleEndedIterator<B>
-     for FlatMap<'a, A, T, U> {
+impl<A, B, I, U, F> DoubleEndedIterator<B> for FlatMap<A, B, I, U, F> where
+    I: DoubleEndedIterator<A>,
+    U: DoubleEndedIterator<B>,
+    F: FnMut(A) -> U,
+{
     #[inline]
     fn next_back(&mut self) -> Option<B> {
         loop {
@@ -1984,12 +2015,12 @@ pub fn reset_fuse(&mut self) {
 /// element before yielding it.
 #[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
 #[unstable = "waiting for unboxed closures"]
-pub struct Inspect<'a, A, T> {
-    iter: T,
-    f: |&A|: 'a
+pub struct Inspect<A, I, F> where I: Iterator<A>, F: FnMut(&A) {
+    iter: I,
+    f: F,
 }
 
-impl<'a, A, T> Inspect<'a, A, T> {
+impl<A, I, F> Inspect<A, I, F> where I: Iterator<A>, F: FnMut(&A) {
     #[inline]
     fn do_inspect(&mut self, elt: Option<A>) -> Option<A> {
         match elt {
@@ -2002,7 +2033,7 @@ fn do_inspect(&mut self, elt: Option<A>) -> Option<A> {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: Iterator<A>> Iterator<A> for Inspect<'a, A, T> {
+impl<A, I, F> Iterator<A> for Inspect<A, I, F> where I: Iterator<A>, F: FnMut(&A) {
     #[inline]
     fn next(&mut self) -> Option<A> {
         let next = self.iter.next();
@@ -2016,8 +2047,10 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[unstable = "trait is unstable"]
-impl<'a, A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A>
-for Inspect<'a, A, T> {
+impl<A, I, F> DoubleEndedIterator<A> for Inspect<A, I, F> where
+    I: DoubleEndedIterator<A>,
+    F: FnMut(&A),
+{
     #[inline]
     fn next_back(&mut self) -> Option<A> {
         let next = self.iter.next_back();
@@ -2026,8 +2059,10 @@ fn next_back(&mut self) -> Option<A> {
 }
 
 #[experimental = "trait is experimental"]
-impl<'a, A, T: RandomAccessIterator<A>> RandomAccessIterator<A>
-for Inspect<'a, A, T> {
+impl<A, I, F> RandomAccessIterator<A> for Inspect<A, I, F> where
+    I: RandomAccessIterator<A>,
+    F: FnMut(&A),
+{
     #[inline]
     fn indexable(&self) -> uint {
         self.iter.indexable()
@@ -2073,19 +2108,18 @@ fn idx(&mut self, index: uint) -> Option<A> {
 /// }
 /// ```
 #[experimental]
-pub struct Unfold<'a, A, St> {
-    f: |&mut St|: 'a -> Option<A>,
+pub struct Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
+    f: F,
     /// Internal state that will be passed to the closure on the next iteration
     pub state: St,
 }
 
 #[experimental]
-impl<'a, A, St> Unfold<'a, A, St> {
+impl<A, St, F> Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
     /// Creates a new iterator with the specified closure as the "iterator
     /// function" and an initial state to eventually pass to the closure
     #[inline]
-    pub fn new<'a>(initial_state: St, f: |&mut St|: 'a -> Option<A>)
-               -> Unfold<'a, A, St> {
+    pub fn new(initial_state: St, f: F) -> Unfold<A, St, F> {
         Unfold {
             f: f,
             state: initial_state
@@ -2094,7 +2128,7 @@ pub fn new<'a>(initial_state: St, f: |&mut St|: 'a -> Option<A>)
 }
 
 #[experimental]
-impl<'a, A, St> Iterator<A> for Unfold<'a, A, St> {
+impl<A, St, F> Iterator<A> for Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
     #[inline]
     fn next(&mut self) -> Option<A> {
         (self.f)(&mut self.state)
@@ -2421,18 +2455,24 @@ fn indexable(&self) -> uint { uint::MAX }
     fn idx(&mut self, _: uint) -> Option<A> { Some(self.element.clone()) }
 }
 
-type IterateState<'a, T> = (|T|: 'a -> T, Option<T>, bool);
+type IterateState<T, F> = (F, Option<T>, bool);
 
 /// An iterator that repeatedly applies a given function, starting
 /// from a given seed value.
 #[experimental]
-pub type Iterate<'a, T> = Unfold<'a, T, IterateState<'a, T>>;
+pub type Iterate<T, F> = Unfold<T, IterateState<T, F>, fn(&mut IterateState<T, F>) -> Option<T>>;
 
 /// Create a new iterator that produces an infinite sequence of
 /// repeated applications of the given function `f`.
 #[experimental]
-pub fn iterate<'a, T: Clone>(seed: T, f: |T|: 'a -> T) -> Iterate<'a, T> {
-    Unfold::new((f, Some(seed), true), |st| {
+pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where
+    T: Clone,
+    F: FnMut(T) -> T,
+{
+    fn next<T, F>(st: &mut IterateState<T, F>) -> Option<T> where
+        T: Clone,
+        F: FnMut(T) -> T,
+    {
         let &(ref mut f, ref mut val, ref mut first) = st;
         if *first {
             *first = false;
@@ -2445,7 +2485,9 @@ pub fn iterate<'a, T: Clone>(seed: T, f: |T|: 'a -> T) -> Iterate<'a, T> {
             }
         }
         val.clone()
-    })
+    }
+
+    Unfold::new((f, Some(seed), true), next)
 }
 
 /// Create a new iterator that endlessly repeats the element `elt`.
index f932acffd3c2ddd9a012922eba0acfb4626edbf8..2b92ae8af0ab2d3d29ed2b73dbf47812038b495e 100644 (file)
@@ -19,7 +19,7 @@
 
 /// Types able to be transferred across task boundaries.
 #[lang="send"]
-pub trait Send for Sized? {
+pub trait Send for Sized? : 'static {
     // empty.
 }
 
index 9ad4488081576448f4fb6493fa4bed8f3f75d438..ebe46af516957107d659472283b6ab7231b88c2d 100644 (file)
@@ -864,53 +864,3 @@ extern "rust-call" fn call_once(mut self, args: A) -> R {
         self.call_mut(args)
     }
 }
-
-#[cfg(stage0)]
-mod fn_impls {
-    use super::Fn;
-
-    impl<Result> Fn<(),Result> for extern "Rust" fn() -> Result {
-        #[allow(non_snake_case)]
-        extern "rust-call" fn call(&self, _args: ()) -> Result {
-            (*self)()
-        }
-    }
-
-    impl<Result,A0> Fn<(A0,),Result> for extern "Rust" fn(A0) -> Result {
-        #[allow(non_snake_case)]
-        extern "rust-call" fn call(&self, args: (A0,)) -> Result {
-            let (a0,) = args;
-            (*self)(a0)
-        }
-    }
-
-    macro_rules! def_fn(
-        ($($args:ident)*) => (
-            impl<Result$(,$args)*>
-            Fn<($($args,)*),Result>
-            for extern "Rust" fn($($args: $args,)*) -> Result {
-                #[allow(non_snake_case)]
-                extern "rust-call" fn call(&self, args: ($($args,)*)) -> Result {
-                    let ($($args,)*) = args;
-                    (*self)($($args,)*)
-                }
-            }
-        )
-    )
-
-    def_fn!(A0 A1)
-    def_fn!(A0 A1 A2)
-    def_fn!(A0 A1 A2 A3)
-    def_fn!(A0 A1 A2 A3 A4)
-    def_fn!(A0 A1 A2 A3 A4 A5)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14)
-    def_fn!(A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15)
-}
index 0697dfbb0f2e4bae53f8460de8fb84ca40a40c38..7be47f73e9ee7feef36c4ffee572de7a7fd9cc9b 100644 (file)
 
 #![stable]
 
-#[cfg(stage0)]
-pub use self::Option::*;
-#[cfg(not(stage0))]
 use self::Option::*;
 
 use cmp::{Eq, Ord};
 use slice;
 use slice::AsSlice;
 use clone::Clone;
-use ops::Deref;
+use ops::{Deref, FnOnce};
 
 // Note that this is not a lang item per se, but it has a hidden dependency on
 // `Iterator`, which is one. The compiler assumes that the `next` method of
@@ -392,7 +389,7 @@ pub fn unwrap_or(self, def: T) -> T {
     /// ```
     #[inline]
     #[unstable = "waiting for conventions"]
-    pub fn unwrap_or_else(self, f: || -> T) -> T {
+    pub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T {
         match self {
             Some(x) => x,
             None => f()
@@ -416,7 +413,7 @@ pub fn unwrap_or_else(self, f: || -> T) -> T {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn map<U>(self, f: |T| -> U) -> Option<U> {
+    pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
         match self {
             Some(x) => Some(f(x)),
             None => None
@@ -436,7 +433,7 @@ pub fn map<U>(self, f: |T| -> U) -> Option<U> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn map_or<U>(self, def: U, f: |T| -> U) -> U {
+    pub fn map_or<U, F: FnOnce(T) -> U>(self, def: U, f: F) -> U {
         match self {
             Some(t) => f(t),
             None => def
@@ -458,7 +455,7 @@ pub fn map_or<U>(self, def: U, f: |T| -> U) -> U {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn map_or_else<U>(self, def: || -> U, f: |T| -> U) -> U {
+    pub fn map_or_else<U, D: FnOnce() -> U, F: FnOnce(T) -> U>(self, def: D, f: F) -> U {
         match self {
             Some(t) => f(t),
             None => def()
@@ -500,7 +497,7 @@ pub fn ok_or<E>(self, err: E) -> Result<T, E> {
     /// ```
     #[inline]
     #[experimental]
-    pub fn ok_or_else<E>(self, err: || -> E) -> Result<T, E> {
+    pub fn ok_or_else<E, F: FnOnce() -> E>(self, err: F) -> Result<T, E> {
         match self {
             Some(v) => Ok(v),
             None => Err(err()),
@@ -618,7 +615,7 @@ pub fn and<U>(self, optb: Option<U>) -> Option<U> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn and_then<U>(self, f: |T| -> Option<U>) -> Option<U> {
+    pub fn and_then<U, F: FnOnce(T) -> Option<U>>(self, f: F) -> Option<U> {
         match self {
             Some(x) => f(x),
             None => None,
@@ -670,7 +667,7 @@ pub fn or(self, optb: Option<T>) -> Option<T> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn or_else(self, f: || -> Option<T>) -> Option<T> {
+    pub fn or_else<F: FnOnce() -> Option<T>>(self, f: F) -> Option<T> {
         match self {
             Some(_) => self,
             None => f()
index db1be94b2b83feb53c684e4c367d9347a359af37..be2f4e590a3590d61b81905c2db64352ab6ec089 100644 (file)
@@ -40,15 +40,6 @@ pub struct Closure {
 
 impl Copy for Closure {}
 
-/// The representation of a Rust procedure (`proc()`)
-#[repr(C)]
-pub struct Procedure {
-    pub code: *mut (),
-    pub env: *mut (),
-}
-
-impl Copy for Procedure {}
-
 /// The representation of a Rust trait object.
 ///
 /// This struct does not have a `Repr` implementation
index 8125afee13f586ab31e946cf1f5341d959f8b020..88d33a59b38bd1852b05024619f83687e285f923 100644 (file)
 use iter::{Iterator, IteratorExt, DoubleEndedIterator, FromIterator, ExactSizeIterator};
 use option::Option;
 use option::Option::{None, Some};
+use ops::{FnMut, FnOnce};
 
 /// `Result` is a type that represents either success (`Ok`) or failure (`Err`).
 ///
@@ -466,7 +467,7 @@ pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn map<U>(self, op: |T| -> U) -> Result<U,E> {
+    pub fn map<U, F: FnOnce(T) -> U>(self, op: F) -> Result<U,E> {
         match self {
           Ok(t) => Ok(op(t)),
           Err(e) => Err(e)
@@ -492,7 +493,7 @@ pub fn map<U>(self, op: |T| -> U) -> Result<U,E> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn map_err<F>(self, op: |E| -> F) -> Result<T,F> {
+    pub fn map_err<F, O: FnOnce(E) -> F>(self, op: O) -> Result<T,F> {
         match self {
           Ok(t) => Ok(t),
           Err(e) => Err(op(e))
@@ -612,7 +613,7 @@ pub fn and<U>(self, res: Result<U, E>) -> Result<U, E> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn and_then<U>(self, op: |T| -> Result<U, E>) -> Result<U, E> {
+    pub fn and_then<U, F: FnOnce(T) -> Result<U, E>>(self, op: F) -> Result<U, E> {
         match self {
             Ok(t) => op(t),
             Err(e) => Err(e),
@@ -666,7 +667,7 @@ pub fn or(self, res: Result<T, E>) -> Result<T, E> {
     /// ```
     #[inline]
     #[unstable = "waiting for unboxed closures"]
-    pub fn or_else<F>(self, op: |E| -> Result<T, F>) -> Result<T, F> {
+    pub fn or_else<F, O: FnOnce(E) -> Result<T, F>>(self, op: O) -> Result<T, F> {
         match self {
             Ok(t) => Ok(t),
             Err(e) => op(e),
@@ -708,7 +709,7 @@ pub fn unwrap_or(self, optb: T) -> T {
     /// ```
     #[inline]
     #[unstable = "waiting for conventions"]
-    pub fn unwrap_or_else(self, op: |E| -> T) -> T {
+    pub fn unwrap_or_else<F: FnOnce(E) -> T>(self, op: F) -> T {
         match self {
             Ok(t) => t,
             Err(e) => op(e)
@@ -904,10 +905,11 @@ fn next(&mut self) -> Option<T> {
 pub fn fold<T,
             V,
             E,
+            F: FnMut(V, T) -> V,
             Iter: Iterator<Result<T, E>>>(
             mut iterator: Iter,
             mut init: V,
-            f: |V, T| -> V)
+            mut f: F)
             -> Result<V, E> {
     for t in iterator {
         match t {
@@ -918,6 +920,5 @@ pub fn fold<T,
     Ok(init)
 }
 
-#[cfg(not(stage0))]
 impl<T:Copy,U:Copy> Copy for Result<T,U> {}
 
index 369a7106583070e701c3d695f073a7bcefc58bfa..252a24e3aa913f44e2f1588ce440ed1ff0ee519a 100644 (file)
@@ -29,7 +29,7 @@
 //! }
 //! ```
 //!
-//! ## Stability Note
+//! # Stability Note
 //!
 //! These are all experimental. The interface may change entirely, without
 //! warning.
index 4e3007b55fe04cf0406eecd0f2bf45741ccc15e3..27a4328ba8017fe82e370a0d92c1162e64b36532 100644 (file)
@@ -43,7 +43,7 @@
 use iter::*;
 use kinds::Copy;
 use num::Int;
-use ops;
+use ops::{FnMut, mod};
 use option::Option;
 use option::Option::{None, Some};
 use ptr;
@@ -105,20 +105,23 @@ pub trait SlicePrelude<T> for Sized? {
     /// Returns an iterator over subslices separated by elements that match
     /// `pred`.  The matched element is not contained in the subslices.
     #[unstable = "iterator type may change, waiting on unboxed closures"]
-    fn split<'a>(&'a self, pred: |&T|: 'a -> bool) -> Splits<'a, T>;
+    fn split<'a, P>(&'a self, pred: P) -> Splits<'a, T, P> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over subslices separated by elements that match
     /// `pred`, limited to splitting at most `n` times.  The matched element is
     /// not contained in the subslices.
     #[unstable = "iterator type may change"]
-    fn splitn<'a>(&'a self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<Splits<'a, T>>;
+    fn splitn<'a, P>(&'a self, n: uint, pred: P) -> SplitsN<Splits<'a, T, P>> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over subslices separated by elements that match
     /// `pred` limited to splitting at most `n` times. This starts at the end of
     /// the slice and works backwards.  The matched element is not contained in
     /// the subslices.
     #[unstable = "iterator type may change"]
-    fn rsplitn<'a>(&'a self,  n: uint, pred: |&T|: 'a -> bool) -> SplitsN<Splits<'a, T>>;
+    fn rsplitn<'a, P>(&'a self,  n: uint, pred: P) -> SplitsN<Splits<'a, T, P>> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over all contiguous windows of length
     /// `size`. The windows overlap. If the slice is shorter than
@@ -235,7 +238,7 @@ pub trait SlicePrelude<T> for Sized? {
     /// assert!(match r { Found(1...4) => true, _ => false, });
     /// ```
     #[unstable = "waiting on unboxed closures"]
-    fn binary_search(&self, f: |&T| -> Ordering) -> BinarySearchResult;
+    fn binary_search<F>(&self, f: F) -> BinarySearchResult where F: FnMut(&T) -> Ordering;
 
     /// Return the number of elements in the slice
     ///
@@ -316,20 +319,23 @@ fn is_empty(&self) -> bool { self.len() == 0 }
     /// Returns an iterator over mutable subslices separated by elements that
     /// match `pred`.  The matched element is not contained in the subslices.
     #[unstable = "waiting on unboxed closures, iterator type name conventions"]
-    fn split_mut<'a>(&'a mut self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T>;
+    fn split_mut<'a, P>(&'a mut self, pred: P) -> MutSplits<'a, T, P> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over subslices separated by elements that match
     /// `pred`, limited to splitting at most `n` times.  The matched element is
     /// not contained in the subslices.
     #[unstable = "waiting on unboxed closures, iterator type name conventions"]
-    fn splitn_mut<'a>(&'a mut self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<MutSplits<'a, T>>;
+    fn splitn_mut<'a, P>(&'a mut self, n: uint, pred: P) -> SplitsN<MutSplits<'a, T, P>> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over subslices separated by elements that match
     /// `pred` limited to splitting at most `n` times. This starts at the end of
     /// the slice and works backwards.  The matched element is not contained in
     /// the subslices.
     #[unstable = "waiting on unboxed closures, iterator type name conventions"]
-    fn rsplitn_mut<'a>(&'a mut self,  n: uint, pred: |&T|: 'a -> bool) -> SplitsN<MutSplits<'a, T>>;
+    fn rsplitn_mut<'a, P>(&'a mut self,  n: uint, pred: P) -> SplitsN<MutSplits<'a, T, P>> where
+        P: FnMut(&T) -> bool;
 
     /// Returns an iterator over `chunk_size` elements of the slice at a time.
     /// The chunks are mutable and do not overlap. If `chunk_size` does
@@ -470,7 +476,7 @@ fn iter<'a>(&'a self) -> Items<'a, T> {
     }
 
     #[inline]
-    fn split<'a>(&'a self, pred: |&T|: 'a -> bool) -> Splits<'a, T> {
+    fn split<'a, P>(&'a self, pred: P) -> Splits<'a, T, P> where P: FnMut(&T) -> bool {
         Splits {
             v: self,
             pred: pred,
@@ -479,7 +485,9 @@ fn split<'a>(&'a self, pred: |&T|: 'a -> bool) -> Splits<'a, T> {
     }
 
     #[inline]
-    fn splitn<'a>(&'a self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<Splits<'a, T>> {
+    fn splitn<'a, P>(&'a self, n: uint, pred: P) -> SplitsN<Splits<'a, T, P>> where
+        P: FnMut(&T) -> bool,
+    {
         SplitsN {
             iter: self.split(pred),
             count: n,
@@ -488,7 +496,9 @@ fn splitn<'a>(&'a self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<Splits<'a, T
     }
 
     #[inline]
-    fn rsplitn<'a>(&'a self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<Splits<'a, T>> {
+    fn rsplitn<'a, P>(&'a self, n: uint, pred: P) -> SplitsN<Splits<'a, T, P>> where
+        P: FnMut(&T) -> bool,
+    {
         SplitsN {
             iter: self.split(pred),
             count: n,
@@ -542,7 +552,7 @@ fn as_ptr(&self) -> *const T {
     }
 
     #[unstable]
-    fn binary_search(&self, f: |&T| -> Ordering) -> BinarySearchResult {
+    fn binary_search<F>(&self, mut f: F) -> BinarySearchResult where F: FnMut(&T) -> Ordering {
         let mut base : uint = 0;
         let mut lim : uint = self.len();
 
@@ -637,12 +647,14 @@ fn init_mut(&mut self) -> &mut [T] {
     }
 
     #[inline]
-    fn split_mut<'a>(&'a mut self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T> {
+    fn split_mut<'a, P>(&'a mut self, pred: P) -> MutSplits<'a, T, P> where P: FnMut(&T) -> bool {
         MutSplits { v: self, pred: pred, finished: false }
     }
 
     #[inline]
-    fn splitn_mut<'a>(&'a mut self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<MutSplits<'a, T>> {
+    fn splitn_mut<'a, P>(&'a mut self, n: uint, pred: P) -> SplitsN<MutSplits<'a, T, P>> where
+        P: FnMut(&T) -> bool
+    {
         SplitsN {
             iter: self.split_mut(pred),
             count: n,
@@ -651,7 +663,9 @@ fn splitn_mut<'a>(&'a mut self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<MutS
     }
 
     #[inline]
-    fn rsplitn_mut<'a>(&'a mut self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<MutSplits<'a, T>> {
+    fn rsplitn_mut<'a, P>(&'a mut self, n: uint, pred: P) -> SplitsN<MutSplits<'a, T, P>> where
+        P: FnMut(&T) -> bool,
+    {
         SplitsN {
             iter: self.split_mut(pred),
             count: n,
@@ -1271,14 +1285,14 @@ trait SplitsIter<E>: DoubleEndedIterator<E> {
 /// An iterator over subslices separated by elements that match a predicate
 /// function.
 #[experimental = "needs review"]
-pub struct Splits<'a, T:'a> {
+pub struct Splits<'a, T:'a, P> where P: FnMut(&T) -> bool {
     v: &'a [T],
-    pred: |t: &T|: 'a -> bool,
+    pred: P,
     finished: bool
 }
 
 #[experimental = "needs review"]
-impl<'a, T> Iterator<&'a [T]> for Splits<'a, T> {
+impl<'a, T, P> Iterator<&'a [T]> for Splits<'a, T, P> where P: FnMut(&T) -> bool {
     #[inline]
     fn next(&mut self) -> Option<&'a [T]> {
         if self.finished { return None; }
@@ -1304,7 +1318,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[experimental = "needs review"]
-impl<'a, T> DoubleEndedIterator<&'a [T]> for Splits<'a, T> {
+impl<'a, T, P> DoubleEndedIterator<&'a [T]> for Splits<'a, T, P> where P: FnMut(&T) -> bool {
     #[inline]
     fn next_back(&mut self) -> Option<&'a [T]> {
         if self.finished { return None; }
@@ -1320,7 +1334,7 @@ fn next_back(&mut self) -> Option<&'a [T]> {
     }
 }
 
-impl<'a, T> SplitsIter<&'a [T]> for Splits<'a, T> {
+impl<'a, T, P> SplitsIter<&'a [T]> for Splits<'a, T, P> where P: FnMut(&T) -> bool {
     #[inline]
     fn finish(&mut self) -> Option<&'a [T]> {
         if self.finished { None } else { self.finished = true; Some(self.v) }
@@ -1330,13 +1344,13 @@ fn finish(&mut self) -> Option<&'a [T]> {
 /// An iterator over the subslices of the vector which are separated
 /// by elements that match `pred`.
 #[experimental = "needs review"]
-pub struct MutSplits<'a, T:'a> {
+pub struct MutSplits<'a, T:'a, P> where P: FnMut(&T) -> bool {
     v: &'a mut [T],
-    pred: |t: &T|: 'a -> bool,
+    pred: P,
     finished: bool
 }
 
-impl<'a, T> SplitsIter<&'a mut [T]> for MutSplits<'a, T> {
+impl<'a, T, P> SplitsIter<&'a mut [T]> for MutSplits<'a, T, P> where P: FnMut(&T) -> bool {
     #[inline]
     fn finish(&mut self) -> Option<&'a mut [T]> {
         if self.finished {
@@ -1349,7 +1363,7 @@ fn finish(&mut self) -> Option<&'a mut [T]> {
 }
 
 #[experimental = "needs review"]
-impl<'a, T> Iterator<&'a mut [T]> for MutSplits<'a, T> {
+impl<'a, T, P> Iterator<&'a mut [T]> for MutSplits<'a, T, P> where P: FnMut(&T) -> bool {
     #[inline]
     fn next(&mut self) -> Option<&'a mut [T]> {
         if self.finished { return None; }
@@ -1382,7 +1396,9 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 #[experimental = "needs review"]
-impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutSplits<'a, T> {
+impl<'a, T, P> DoubleEndedIterator<&'a mut [T]> for MutSplits<'a, T, P> where
+    P: FnMut(&T) -> bool,
+{
     #[inline]
     fn next_back(&mut self) -> Option<&'a mut [T]> {
         if self.finished { return None; }
@@ -1709,6 +1725,7 @@ pub mod raw {
     use mem::transmute;
     use ptr::RawPtr;
     use raw::Slice;
+    use ops::FnOnce;
     use option::Option;
     use option::Option::{None, Some};
 
@@ -1716,8 +1733,9 @@ pub mod raw {
     /// not bytes).
     #[inline]
     #[deprecated = "renamed to slice::from_raw_buf"]
-    pub unsafe fn buf_as_slice<T,U>(p: *const T, len: uint, f: |v: &[T]| -> U)
-                               -> U {
+    pub unsafe fn buf_as_slice<T, U, F>(p: *const T, len: uint, f: F) -> U where
+        F: FnOnce(&[T]) -> U,
+    {
         f(transmute(Slice {
             data: p,
             len: len
@@ -1728,12 +1746,9 @@ pub unsafe fn buf_as_slice<T,U>(p: *const T, len: uint, f: |v: &[T]| -> U)
     /// not bytes).
     #[inline]
     #[deprecated = "renamed to slice::from_raw_mut_buf"]
-    pub unsafe fn mut_buf_as_slice<T,
-                                   U>(
-                                   p: *mut T,
-                                   len: uint,
-                                   f: |v: &mut [T]| -> U)
-                                   -> U {
+    pub unsafe fn mut_buf_as_slice<T, U, F>(p: *mut T, len: uint, f: F) -> U where
+        F: FnOnce(&mut [T]) -> U,
+    {
         f(transmute(Slice {
             data: p as *const T,
             len: len
index baa739b06833ce82f9247c75edb0b14dc0cb8f21..e632934782c69e5a72f0da08c814a6b0d1e71578 100644 (file)
@@ -31,6 +31,7 @@
 use num::Int;
 use option::Option;
 use option::Option::{None, Some};
+use ops::FnMut;
 use ptr::RawPtr;
 use raw::{Repr, Slice};
 use slice::{mod, SlicePrelude};
@@ -136,15 +137,7 @@ fn matches(&mut self, c: char) -> bool { *self == c }
     fn only_ascii(&self) -> bool { (*self as uint) < 128 }
 }
 
-impl<'a> CharEq for |char|: 'a -> bool {
-    #[inline]
-    fn matches(&mut self, c: char) -> bool { (*self)(c) }
-
-    #[inline]
-    fn only_ascii(&self) -> bool { false }
-}
-
-impl CharEq for extern "Rust" fn(char) -> bool {
+impl<F> CharEq for F where F: FnMut(char) -> bool {
     #[inline]
     fn matches(&mut self, c: char) -> bool { (*self)(c) }
 
@@ -323,8 +316,7 @@ fn next_back(&mut self) -> Option<(uint, char)> {
 
 /// External iterator for a string's bytes.
 /// Use with the `std::iter` module.
-pub type Bytes<'a> =
-    Map<'a, &'a u8, u8, slice::Items<'a, u8>>;
+pub type Bytes<'a> = Map<&'a u8, u8, slice::Items<'a, u8>, fn(&u8) -> u8>;
 
 /// An iterator over the substrings of a string, separated by `sep`.
 #[deriving(Clone)]
@@ -349,8 +341,7 @@ pub struct CharSplitsN<'a, Sep> {
 }
 
 /// An iterator over the lines of a string, separated by either `\n` or (`\r\n`).
-pub type AnyLines<'a> =
-    Map<'a, &'a str, &'a str, CharSplits<'a, char>>;
+pub type AnyLines<'a> = Map<&'a str, &'a str, CharSplits<'a, char>, fn(&str) -> &str>;
 
 impl<'a, Sep> CharSplits<'a, Sep> {
     #[inline]
@@ -914,13 +905,13 @@ macro_rules! next ( () => {
         if first >= 128 {
             let w = utf8_char_width(first);
             let second = next!();
-            // 2-byte encoding is for codepoints  \u0080 to  \u07ff
+            // 2-byte encoding is for codepoints  \u{0080} to  \u{07ff}
             //        first  C2 80        last DF BF
-            // 3-byte encoding is for codepoints  \u0800 to  \uffff
+            // 3-byte encoding is for codepoints  \u{0800} to  \u{ffff}
             //        first  E0 A0 80     last EF BF BF
-            //   excluding surrogates codepoints  \ud800 to  \udfff
+            //   excluding surrogates codepoints  \u{d800} to  \u{dfff}
             //               ED A0 80 to       ED BF BF
-            // 4-byte encoding is for codepoints \u10000 to \u10ffff
+            // 4-byte encoding is for codepoints \u{1000}0 to \u{10ff}ff
             //        first  F0 90 80 80  last F4 8F BF BF
             //
             // Use the UTF-8 syntax from the RFC
@@ -1007,7 +998,7 @@ impl Utf16Item {
     pub fn to_char_lossy(&self) -> char {
         match *self {
             ScalarValue(c) => c,
-            LoneSurrogate(_) => '\uFFFD'
+            LoneSurrogate(_) => '\u{FFFD}'
         }
     }
 }
@@ -1361,10 +1352,13 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let v: Vec<&str> = "Mary had a little lamb".split(' ').collect();
     /// assert_eq!(v, vec!["Mary", "had", "a", "little", "lamb"]);
     ///
-    /// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_numeric()).collect();
+    /// let v: Vec<&str> = "abc1def2ghi".split(|&: c: char| c.is_numeric()).collect();
     /// assert_eq!(v, vec!["abc", "def", "ghi"]);
     ///
     /// let v: Vec<&str> = "lionXXtigerXleopard".split('X').collect();
@@ -1372,6 +1366,7 @@ pub trait StrPrelude for Sized? {
     ///
     /// let v: Vec<&str> = "".split('X').collect();
     /// assert_eq!(v, vec![""]);
+    /// # }
     /// ```
     fn split<'a, Sep: CharEq>(&'a self, sep: Sep) -> CharSplits<'a, Sep>;
 
@@ -1382,10 +1377,13 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let v: Vec<&str> = "Mary had a little lambda".splitn(2, ' ').collect();
     /// assert_eq!(v, vec!["Mary", "had", "a little lambda"]);
     ///
-    /// let v: Vec<&str> = "abc1def2ghi".splitn(1, |c: char| c.is_numeric()).collect();
+    /// let v: Vec<&str> = "abc1def2ghi".splitn(1, |&: c: char| c.is_numeric()).collect();
     /// assert_eq!(v, vec!["abc", "def2ghi"]);
     ///
     /// let v: Vec<&str> = "lionXXtigerXleopard".splitn(2, 'X').collect();
@@ -1396,6 +1394,7 @@ pub trait StrPrelude for Sized? {
     ///
     /// let v: Vec<&str> = "".splitn(1, 'X').collect();
     /// assert_eq!(v, vec![""]);
+    /// # }
     /// ```
     fn splitn<'a, Sep: CharEq>(&'a self, count: uint, sep: Sep) -> CharSplitsN<'a, Sep>;
 
@@ -1408,6 +1407,9 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let v: Vec<&str> = "A.B.".split_terminator('.').collect();
     /// assert_eq!(v, vec!["A", "B"]);
     ///
@@ -1417,11 +1419,12 @@ pub trait StrPrelude for Sized? {
     /// let v: Vec<&str> = "Mary had a little lamb".split(' ').rev().collect();
     /// assert_eq!(v, vec!["lamb", "little", "a", "had", "Mary"]);
     ///
-    /// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_numeric()).rev().collect();
+    /// let v: Vec<&str> = "abc1def2ghi".split(|&: c: char| c.is_numeric()).rev().collect();
     /// assert_eq!(v, vec!["ghi", "def", "abc"]);
     ///
     /// let v: Vec<&str> = "lionXXtigerXleopard".split('X').rev().collect();
     /// assert_eq!(v, vec!["leopard", "tiger", "", "lion"]);
+    /// # }
     /// ```
     fn split_terminator<'a, Sep: CharEq>(&'a self, sep: Sep) -> CharSplits<'a, Sep>;
 
@@ -1432,14 +1435,18 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let v: Vec<&str> = "Mary had a little lamb".rsplitn(2, ' ').collect();
     /// assert_eq!(v, vec!["lamb", "little", "Mary had a"]);
     ///
-    /// let v: Vec<&str> = "abc1def2ghi".rsplitn(1, |c: char| c.is_numeric()).collect();
+    /// let v: Vec<&str> = "abc1def2ghi".rsplitn(1, |&: c: char| c.is_numeric()).collect();
     /// assert_eq!(v, vec!["ghi", "abc1def"]);
     ///
     /// let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(2, 'X').collect();
     /// assert_eq!(v, vec!["leopard", "tiger", "lionX"]);
+    /// # }
     /// ```
     fn rsplitn<'a, Sep: CharEq>(&'a self, count: uint, sep: Sep) -> CharSplitsN<'a, Sep>;
 
@@ -1523,7 +1530,7 @@ pub trait StrPrelude for Sized? {
     /// // composed forms of `ö` and `é`
     /// let c = "Löwe 老虎 Léopard"; // German, Simplified Chinese, French
     /// // decomposed forms of `ö` and `é`
-    /// let d = "Lo\u0308we 老虎 Le\u0301opard";
+    /// let d = "Lo\u{0308}we 老虎 Le\u{0301}opard";
     ///
     /// assert_eq!(c.char_len(), 15);
     /// assert_eq!(d.char_len(), 17);
@@ -1650,10 +1657,14 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar")
     /// let x: &[_] = &['1', '2'];
     /// assert_eq!("12foo1bar12".trim_chars(x), "foo1bar")
-    /// assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar")
+    /// assert_eq!("123foo1bar123".trim_chars(|&: c: char| c.is_numeric()), "foo1bar")
+    /// # }
     /// ```
     fn trim_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
 
@@ -1666,10 +1677,14 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11")
     /// let x: &[_] = &['1', '2'];
     /// assert_eq!("12foo1bar12".trim_left_chars(x), "foo1bar12")
-    /// assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123")
+    /// assert_eq!("123foo1bar123".trim_left_chars(|&: c: char| c.is_numeric()), "foo1bar123")
+    /// # }
     /// ```
     fn trim_left_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
 
@@ -1682,10 +1697,14 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar")
     /// let x: &[_] = &['1', '2'];
     /// assert_eq!("12foo1bar12".trim_right_chars(x), "12foo1bar")
-    /// assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar")
+    /// assert_eq!("123foo1bar123".trim_right_chars(|&: c: char| c.is_numeric()), "123foo1bar")
+    /// # }
     /// ```
     fn trim_right_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
 
@@ -1738,9 +1757,9 @@ pub trait StrPrelude for Sized? {
     /// }
     /// ```
     ///
-    /// ## Output
+    /// This outputs:
     ///
-    /// ```ignore
+    /// ```text
     /// 0: 中
     /// 3: 华
     /// 6: V
@@ -1826,17 +1845,21 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let s = "Löwe 老虎 Léopard";
     ///
     /// assert_eq!(s.find('L'), Some(0));
     /// assert_eq!(s.find('é'), Some(14));
     ///
     /// // the first space
-    /// assert_eq!(s.find(|c: char| c.is_whitespace()), Some(5));
+    /// assert_eq!(s.find(|&: c: char| c.is_whitespace()), Some(5));
     ///
     /// // neither are found
     /// let x: &[_] = &['1', '2'];
     /// assert_eq!(s.find(x), None);
+    /// # }
     /// ```
     fn find<C: CharEq>(&self, search: C) -> Option<uint>;
 
@@ -1851,17 +1874,21 @@ pub trait StrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
+    /// # #![feature(unboxed_closures)]
+    ///
+    /// # fn main() {
     /// let s = "Löwe 老虎 Léopard";
     ///
     /// assert_eq!(s.rfind('L'), Some(13));
     /// assert_eq!(s.rfind('é'), Some(14));
     ///
     /// // the second space
-    /// assert_eq!(s.rfind(|c: char| c.is_whitespace()), Some(12));
+    /// assert_eq!(s.rfind(|&: c: char| c.is_whitespace()), Some(12));
     ///
     /// // searches for an occurrence of either `1` or `2`, but neither are found
     /// let x: &[_] = &['1', '2'];
     /// assert_eq!(s.rfind(x), None);
+    /// # }
     /// ```
     fn rfind<C: CharEq>(&self, search: C) -> Option<uint>;
 
@@ -1980,7 +2007,9 @@ fn chars(&self) -> Chars {
 
     #[inline]
     fn bytes(&self) -> Bytes {
-        self.as_bytes().iter().map(|&b| b)
+        fn deref(&x: &u8) -> u8 { x }
+
+        self.as_bytes().iter().map(deref)
     }
 
     #[inline]
@@ -2053,11 +2082,13 @@ fn lines(&self) -> CharSplits<char> {
     }
 
     fn lines_any(&self) -> AnyLines {
-        self.lines().map(|line| {
+        fn f(line: &str) -> &str {
             let l = line.len();
             if l > 0 && line.as_bytes()[l - 1] == b'\r' { line.slice(0, l - 1) }
             else { line }
-        })
+        }
+
+        self.lines().map(f)
     }
 
     #[inline]
@@ -2140,11 +2171,11 @@ fn ends_with(&self, needle: &str) -> bool {
 
     #[inline]
     fn trim_chars<C: CharEq>(&self, mut to_trim: C) -> &str {
-        let cur = match self.find(|c: char| !to_trim.matches(c)) {
+        let cur = match self.find(|&mut: c: char| !to_trim.matches(c)) {
             None => "",
             Some(i) => unsafe { self.slice_unchecked(i, self.len()) }
         };
-        match cur.rfind(|c: char| !to_trim.matches(c)) {
+        match cur.rfind(|&mut: c: char| !to_trim.matches(c)) {
             None => "",
             Some(i) => {
                 let right = cur.char_range_at(i).next;
@@ -2155,7 +2186,7 @@ fn trim_chars<C: CharEq>(&self, mut to_trim: C) -> &str {
 
     #[inline]
     fn trim_left_chars<C: CharEq>(&self, mut to_trim: C) -> &str {
-        match self.find(|c: char| !to_trim.matches(c)) {
+        match self.find(|&mut: c: char| !to_trim.matches(c)) {
             None => "",
             Some(first) => unsafe { self.slice_unchecked(first, self.len()) }
         }
@@ -2163,7 +2194,7 @@ fn trim_left_chars<C: CharEq>(&self, mut to_trim: C) -> &str {
 
     #[inline]
     fn trim_right_chars<C: CharEq>(&self, mut to_trim: C) -> &str {
-        match self.rfind(|c: char| !to_trim.matches(c)) {
+        match self.rfind(|&mut: c: char| !to_trim.matches(c)) {
             None => "",
             Some(last) => {
                 let next = self.char_range_at(last).next;
index 5ad01ae67442e6b4abf91bbfe48f43467c8dc80d..8160424be292c116b69e0958da8d8757df88a93e 100644 (file)
 //! Using methods:
 //!
 //! ```
+//! #[allow(deprecated)]
+//! # fn main() {
 //! let pair = ("pi", 3.14f64);
 //! assert_eq!(pair.val0(), "pi");
 //! assert_eq!(pair.val1(), 3.14f64);
+//! # }
 //! ```
 //!
 //! Using traits implemented for tuples:
 use option::Option;
 use option::Option::Some;
 
+// FIXME(#19630) Remove this work-around
+macro_rules! e {
+    ($e:expr) => { $e }
+}
+
 // macro for implementing n-ary tuple functions and operations
 macro_rules! tuple_impls {
     ($(
         $Tuple:ident {
-            $(($valN:ident, $refN:ident, $mutN:ident) -> $T:ident {
-                ($($x:ident),+) => $ret:expr
-            })+
+            $(($valN:ident, $refN:ident, $mutN:ident, $idx:tt) -> $T:ident)+
         }
     )+) => {
         $(
             #[allow(missing_docs)]
-            #[stable]
+            #[deprecated]
             pub trait $Tuple<$($T),+> {
                 $(
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: `tuple.N`"]
                     fn $valN(self) -> $T;
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: `&tuple.N`"]
                     fn $refN<'a>(&'a self) -> &'a $T;
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: `&mut tuple.N`"]
                     fn $mutN<'a>(&'a mut self) -> &'a mut $T;
                  )+
             }
@@ -99,23 +105,23 @@ impl<$($T),+> $Tuple<$($T),+> for ($($T,)+) {
                 $(
                     #[inline]
                     #[allow(unused_variables)]
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: `tuple.N`"]
                     fn $valN(self) -> $T {
-                        let ($($x,)+) = self; $ret
+                        e!(self.$idx)
                     }
 
                     #[inline]
                     #[allow(unused_variables)]
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: `&tuple.N`"]
                     fn $refN<'a>(&'a self) -> &'a $T {
-                        let ($(ref $x,)+) = *self; $ret
+                        e!(&self.$idx)
                     }
 
                     #[inline]
                     #[allow(unused_variables)]
-                    #[unstable = "may rename pending accessor naming conventions"]
+                    #[deprecated = "use tuple indexing: &mut tuple.N"]
                     fn $mutN<'a>(&'a mut self) -> &'a mut $T {
-                        let ($(ref mut $x,)+) = *self; $ret
+                        e!(&mut self.$idx)
                     }
                 )+
             }
@@ -123,7 +129,7 @@ fn $mutN<'a>(&'a mut self) -> &'a mut $T {
             #[unstable = "waiting for Clone to stabilize"]
             impl<$($T:Clone),+> Clone for ($($T,)+) {
                 fn clone(&self) -> ($($T,)+) {
-                    ($(self.$refN().clone(),)+)
+                    ($(e!(self.$idx.clone()),)+)
                 }
             }
 
@@ -131,11 +137,11 @@ fn clone(&self) -> ($($T,)+) {
             impl<$($T:PartialEq),+> PartialEq for ($($T,)+) {
                 #[inline]
                 fn eq(&self, other: &($($T,)+)) -> bool {
-                    $(*self.$refN() == *other.$refN())&&+
+                    e!($(self.$idx == other.$idx)&&+)
                 }
                 #[inline]
                 fn ne(&self, other: &($($T,)+)) -> bool {
-                    $(*self.$refN() != *other.$refN())||+
+                    e!($(self.$idx != other.$idx)||+)
                 }
             }
 
@@ -146,23 +152,23 @@ impl<$($T:Eq),+> Eq for ($($T,)+) {}
             impl<$($T:PartialOrd + PartialEq),+> PartialOrd for ($($T,)+) {
                 #[inline]
                 fn partial_cmp(&self, other: &($($T,)+)) -> Option<Ordering> {
-                    lexical_partial_cmp!($(self.$refN(), other.$refN()),+)
+                    lexical_partial_cmp!($(self.$idx, other.$idx),+)
                 }
                 #[inline]
                 fn lt(&self, other: &($($T,)+)) -> bool {
-                    lexical_ord!(lt, $(self.$refN(), other.$refN()),+)
+                    lexical_ord!(lt, $(self.$idx, other.$idx),+)
                 }
                 #[inline]
                 fn le(&self, other: &($($T,)+)) -> bool {
-                    lexical_ord!(le, $(self.$refN(), other.$refN()),+)
+                    lexical_ord!(le, $(self.$idx, other.$idx),+)
                 }
                 #[inline]
                 fn ge(&self, other: &($($T,)+)) -> bool {
-                    lexical_ord!(ge, $(self.$refN(), other.$refN()),+)
+                    lexical_ord!(ge, $(self.$idx, other.$idx),+)
                 }
                 #[inline]
                 fn gt(&self, other: &($($T,)+)) -> bool {
-                    lexical_ord!(gt, $(self.$refN(), other.$refN()),+)
+                    lexical_ord!(gt, $(self.$idx, other.$idx),+)
                 }
             }
 
@@ -170,7 +176,7 @@ fn gt(&self, other: &($($T,)+)) -> bool {
             impl<$($T:Ord),+> Ord for ($($T,)+) {
                 #[inline]
                 fn cmp(&self, other: &($($T,)+)) -> Ordering {
-                    lexical_cmp!($(self.$refN(), other.$refN()),+)
+                    lexical_cmp!($(self.$idx, other.$idx),+)
                 }
             }
 
@@ -191,134 +197,134 @@ fn default() -> ($($T,)+) {
 // a3, b3)` (and similarly for `lexical_cmp`)
 macro_rules! lexical_ord {
     ($rel: ident, $a:expr, $b:expr, $($rest_a:expr, $rest_b:expr),+) => {
-        if *$a != *$b { lexical_ord!($rel, $a, $b) }
+        if $a != $b { lexical_ord!($rel, $a, $b) }
         else { lexical_ord!($rel, $($rest_a, $rest_b),+) }
     };
-    ($rel: ident, $a:expr, $b:expr) => { (*$a) . $rel ($b) };
+    ($rel: ident, $a:expr, $b:expr) => { ($a) . $rel (& $b) };
 }
 
 macro_rules! lexical_partial_cmp {
     ($a:expr, $b:expr, $($rest_a:expr, $rest_b:expr),+) => {
-        match ($a).partial_cmp($b) {
+        match ($a).partial_cmp(&$b) {
             Some(Equal) => lexical_partial_cmp!($($rest_a, $rest_b),+),
             ordering   => ordering
         }
     };
-    ($a:expr, $b:expr) => { ($a).partial_cmp($b) };
+    ($a:expr, $b:expr) => { ($a).partial_cmp(&$b) };
 }
 
 macro_rules! lexical_cmp {
     ($a:expr, $b:expr, $($rest_a:expr, $rest_b:expr),+) => {
-        match ($a).cmp($b) {
+        match ($a).cmp(&$b) {
             Equal => lexical_cmp!($($rest_a, $rest_b),+),
             ordering   => ordering
         }
     };
-    ($a:expr, $b:expr) => { ($a).cmp($b) };
+    ($a:expr, $b:expr) => { ($a).cmp(&$b) };
 }
 
 tuple_impls! {
     Tuple1 {
-        (val0, ref0, mut0) -> A { (a) => a }
+        (val0, ref0, mut0, 0) -> A
     }
     Tuple2 {
-        (val0, ref0, mut0) -> A { (a, b) => a }
-        (val1, ref1, mut1) -> B { (a, b) => b }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
     }
     Tuple3 {
-        (val0, ref0, mut0) -> A { (a, b, c) => a }
-        (val1, ref1, mut1) -> B { (a, b, c) => b }
-        (val2, ref2, mut2) -> C { (a, b, c) => c }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
     }
     Tuple4 {
-        (val0, ref0, mut0) -> A { (a, b, c, d) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d) => d }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
     }
     Tuple5 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e) => e }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
     }
     Tuple6 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e, f) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e, f) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e, f) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e, f) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e, f) => e }
-        (val5, ref5, mut5) -> F { (a, b, c, d, e, f) => f }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
     }
     Tuple7 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e, f, g) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e, f, g) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e, f, g) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e, f, g) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e, f, g) => e }
-        (val5, ref5, mut5) -> F { (a, b, c, d, e, f, g) => f }
-        (val6, ref6, mut6) -> G { (a, b, c, d, e, f, g) => g }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
     }
     Tuple8 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e, f, g, h) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e, f, g, h) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e, f, g, h) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e, f, g, h) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e, f, g, h) => e }
-        (val5, ref5, mut5) -> F { (a, b, c, d, e, f, g, h) => f }
-        (val6, ref6, mut6) -> G { (a, b, c, d, e, f, g, h) => g }
-        (val7, ref7, mut7) -> H { (a, b, c, d, e, f, g, h) => h }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
+        (val7, ref7, mut7, 7) -> H
     }
     Tuple9 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e, f, g, h, i) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e, f, g, h, i) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e, f, g, h, i) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e, f, g, h, i) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e, f, g, h, i) => e }
-        (val5, ref5, mut5) -> F { (a, b, c, d, e, f, g, h, i) => f }
-        (val6, ref6, mut6) -> G { (a, b, c, d, e, f, g, h, i) => g }
-        (val7, ref7, mut7) -> H { (a, b, c, d, e, f, g, h, i) => h }
-        (val8, ref8, mut8) -> I { (a, b, c, d, e, f, g, h, i) => i }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
+        (val7, ref7, mut7, 7) -> H
+        (val8, ref8, mut8, 8) -> I
     }
     Tuple10 {
-        (val0, ref0, mut0) -> A { (a, b, c, d, e, f, g, h, i, j) => a }
-        (val1, ref1, mut1) -> B { (a, b, c, d, e, f, g, h, i, j) => b }
-        (val2, ref2, mut2) -> C { (a, b, c, d, e, f, g, h, i, j) => c }
-        (val3, ref3, mut3) -> D { (a, b, c, d, e, f, g, h, i, j) => d }
-        (val4, ref4, mut4) -> E { (a, b, c, d, e, f, g, h, i, j) => e }
-        (val5, ref5, mut5) -> F { (a, b, c, d, e, f, g, h, i, j) => f }
-        (val6, ref6, mut6) -> G { (a, b, c, d, e, f, g, h, i, j) => g }
-        (val7, ref7, mut7) -> H { (a, b, c, d, e, f, g, h, i, j) => h }
-        (val8, ref8, mut8) -> I { (a, b, c, d, e, f, g, h, i, j) => i }
-        (val9, ref9, mut9) -> J { (a, b, c, d, e, f, g, h, i, j) => j }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
+        (val7, ref7, mut7, 7) -> H
+        (val8, ref8, mut8, 8) -> I
+        (val9, ref9, mut9, 9) -> J
     }
     Tuple11 {
-        (val0,  ref0,  mut0)  -> A { (a, b, c, d, e, f, g, h, i, j, k) => a }
-        (val1,  ref1,  mut1)  -> B { (a, b, c, d, e, f, g, h, i, j, k) => b }
-        (val2,  ref2,  mut2)  -> C { (a, b, c, d, e, f, g, h, i, j, k) => c }
-        (val3,  ref3,  mut3)  -> D { (a, b, c, d, e, f, g, h, i, j, k) => d }
-        (val4,  ref4,  mut4)  -> E { (a, b, c, d, e, f, g, h, i, j, k) => e }
-        (val5,  ref5,  mut5)  -> F { (a, b, c, d, e, f, g, h, i, j, k) => f }
-        (val6,  ref6,  mut6)  -> G { (a, b, c, d, e, f, g, h, i, j, k) => g }
-        (val7,  ref7,  mut7)  -> H { (a, b, c, d, e, f, g, h, i, j, k) => h }
-        (val8,  ref8,  mut8)  -> I { (a, b, c, d, e, f, g, h, i, j, k) => i }
-        (val9,  ref9,  mut9)  -> J { (a, b, c, d, e, f, g, h, i, j, k) => j }
-        (val10, ref10, mut10) -> K { (a, b, c, d, e, f, g, h, i, j, k) => k }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
+        (val7, ref7, mut7, 7) -> H
+        (val8, ref8, mut8, 8) -> I
+        (val9, ref9, mut9, 9) -> J
+        (val10, ref10, mut10, 10) -> K
     }
     Tuple12 {
-        (val0,  ref0,  mut0)  -> A { (a, b, c, d, e, f, g, h, i, j, k, l) => a }
-        (val1,  ref1,  mut1)  -> B { (a, b, c, d, e, f, g, h, i, j, k, l) => b }
-        (val2,  ref2,  mut2)  -> C { (a, b, c, d, e, f, g, h, i, j, k, l) => c }
-        (val3,  ref3,  mut3)  -> D { (a, b, c, d, e, f, g, h, i, j, k, l) => d }
-        (val4,  ref4,  mut4)  -> E { (a, b, c, d, e, f, g, h, i, j, k, l) => e }
-        (val5,  ref5,  mut5)  -> F { (a, b, c, d, e, f, g, h, i, j, k, l) => f }
-        (val6,  ref6,  mut6)  -> G { (a, b, c, d, e, f, g, h, i, j, k, l) => g }
-        (val7,  ref7,  mut7)  -> H { (a, b, c, d, e, f, g, h, i, j, k, l) => h }
-        (val8,  ref8,  mut8)  -> I { (a, b, c, d, e, f, g, h, i, j, k, l) => i }
-        (val9,  ref9,  mut9)  -> J { (a, b, c, d, e, f, g, h, i, j, k, l) => j }
-        (val10, ref10, mut10) -> K { (a, b, c, d, e, f, g, h, i, j, k, l) => k }
-        (val11, ref11, mut11) -> L { (a, b, c, d, e, f, g, h, i, j, k, l) => l }
+        (val0, ref0, mut0, 0) -> A
+        (val1, ref1, mut1, 1) -> B
+        (val2, ref2, mut2, 2) -> C
+        (val3, ref3, mut3, 3) -> D
+        (val4, ref4, mut4, 4) -> E
+        (val5, ref5, mut5, 5) -> F
+        (val6, ref6, mut6, 6) -> G
+        (val7, ref7, mut7, 7) -> H
+        (val8, ref8, mut8, 8) -> I
+        (val9, ref9, mut9, 9) -> J
+        (val10, ref10, mut10, 10) -> K
+        (val11, ref11, mut11, 11) -> L
     }
 }
 
index 032f5f7194117e8d8596075b1b8c18c4382a2d75..2d77c1bc0978c14248bfe4732fdadb7e9696b7a7 100644 (file)
@@ -45,7 +45,7 @@ fn test_fail() {
 
 #[test]
 fn test_retval() {
-    let mut closure: || -> int = || 10;
+    let mut closure = |&mut:| 10i;
     let i = closure.finally(|| { });
     assert_eq!(i, 10);
 }
index d046faa82d405d04c8c1a8c29fbbe4dd351d91fc..0bcebe073a3ef67f6a1daf2926e1384ebf999cf6 100644 (file)
@@ -221,7 +221,7 @@ fn test_iterator_flat_map() {
 #[test]
 fn test_inspect() {
     let xs = [1u, 2, 3, 4];
-    let mut n = 0;
+    let mut n = 0u;
 
     let ys = xs.iter()
                .map(|&x| x)
@@ -334,7 +334,7 @@ fn test_iterator_size_hint() {
     assert_eq!(vi.size_hint(), (10, Some(10)));
 
     assert_eq!(c.take(5).size_hint(), (5, Some(5)));
-    assert_eq!(c.skip(5).size_hint().val1(), None);
+    assert_eq!(c.skip(5).size_hint().1, None);
     assert_eq!(c.take_while(|_| false).size_hint(), (0, None));
     assert_eq!(c.skip_while(|_| false).size_hint(), (0, None));
     assert_eq!(c.enumerate().size_hint(), (uint::MAX, None));
index 5f31ed35f1b60f6d69767027d3174d7ec5466454..089a2cc880eb624a79a26714d5f1406c2e3da62a 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 #![feature(globs, unsafe_destructor, macro_rules, slicing_syntax)]
+#![feature(unboxed_closures)]
 
 extern crate core;
 extern crate test;
index 9574aeb3762de230f7e2244809796a90aae6a170..763fcccdbfdc8cbdc7d2b568368d7ebfd9fc9da7 100644 (file)
@@ -54,7 +54,7 @@ fn test_rsplitn_char_iterator() {
     split.reverse();
     assert_eq!(split, vec!["\nMäry häd ä", "little", "lämb\nLittle", "lämb\n"]);
 
-    let mut split: Vec<&str> = data.rsplitn(3, |c: char| c == ' ').collect();
+    let mut split: Vec<&str> = data.rsplitn(3, |&: c: char| c == ' ').collect();
     split.reverse();
     assert_eq!(split, vec!["\nMäry häd ä", "little", "lämb\nLittle", "lämb\n"]);
 
@@ -63,7 +63,7 @@ fn test_rsplitn_char_iterator() {
     split.reverse();
     assert_eq!(split, vec!["\nMäry häd ", " little l", "mb\nLittle l", "mb\n"]);
 
-    let mut split: Vec<&str> = data.rsplitn(3, |c: char| c == 'ä').collect();
+    let mut split: Vec<&str> = data.rsplitn(3, |&: c: char| c == 'ä').collect();
     split.reverse();
     assert_eq!(split, vec!["\nMäry häd ", " little l", "mb\nLittle l", "mb\n"]);
 }
@@ -79,10 +79,10 @@ fn test_split_char_iterator() {
     rsplit.reverse();
     assert_eq!(rsplit, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
 
-    let split: Vec<&str> = data.split(|c: char| c == ' ').collect();
+    let split: Vec<&str> = data.split(|&: c: char| c == ' ').collect();
     assert_eq!( split, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
 
-    let mut rsplit: Vec<&str> = data.split(|c: char| c == ' ').rev().collect();
+    let mut rsplit: Vec<&str> = data.split(|&: c: char| c == ' ').rev().collect();
     rsplit.reverse();
     assert_eq!(rsplit, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
 
@@ -94,10 +94,10 @@ fn test_split_char_iterator() {
     rsplit.reverse();
     assert_eq!(rsplit, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
 
-    let split: Vec<&str> = data.split(|c: char| c == 'ä').collect();
+    let split: Vec<&str> = data.split(|&: c: char| c == 'ä').collect();
     assert_eq!( split, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
 
-    let mut rsplit: Vec<&str> = data.split(|c: char| c == 'ä').rev().collect();
+    let mut rsplit: Vec<&str> = data.split(|&: c: char| c == 'ä').rev().collect();
     rsplit.reverse();
     assert_eq!(rsplit, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
 }
index cc36c2eef4552e43d2a90d0a9bac92876334098f..2c8e5638e4949206aea08522c732f7f3c0031024 100644 (file)
@@ -21,7 +21,7 @@
 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/nightly/")]
-#![feature(phase)]
+#![feature(phase, unboxed_closures)]
 
 #[cfg(test)] #[phase(plugin, link)] extern crate log;
 
@@ -59,7 +59,7 @@ fn deflate_bytes_internal(bytes: &[u8], flags: c_int) -> Option<CVec<u8>> {
                                              &mut outsz,
                                              flags);
         if !res.is_null() {
-            Some(CVec::new_with_dtor(res as *mut u8, outsz as uint, proc() libc::free(res)))
+            Some(CVec::new_with_dtor(res as *mut u8, outsz as uint, move|:| libc::free(res)))
         } else {
             None
         }
@@ -84,7 +84,7 @@ fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> Option<CVec<u8>> {
                                                &mut outsz,
                                                flags);
         if !res.is_null() {
-            Some(CVec::new_with_dtor(res as *mut u8, outsz as uint, proc() libc::free(res)))
+            Some(CVec::new_with_dtor(res as *mut u8, outsz as uint, move|:| libc::free(res)))
         } else {
             None
         }
index 9174f8e8456f33908d4ccc2d906f7045b480af9a..79c435f01e4e6b71b5053a64d943bb550570fc23 100644 (file)
@@ -33,7 +33,7 @@
 //!
 //! ```{.rust}
 //! extern crate getopts;
-//! use getopts::{optopt,optflag,getopts,OptGroup};
+//! use getopts::{optopt,optflag,getopts,OptGroup,usage};
 //! use std::os;
 //!
 //! fn do_work(inp: &str, out: Option<String>) {
 //!     }
 //! }
 //!
-//! fn print_usage(program: &str, _opts: &[OptGroup]) {
-//!     println!("Usage: {} [options]", program);
-//!     println!("-o\t\tOutput");
-//!     println!("-h --help\tUsage");
+//! fn print_usage(program: &str, opts: &[OptGroup]) {
+//!     let brief = format!("Usage: {} [options]", program);
+//!     print!("{}", usage(brief.as_slice(), opts));
 //! }
 //!
 //! fn main() {
@@ -88,6 +87,7 @@
        html_playground_url = "http://play.rust-lang.org/")]
 #![feature(globs, phase)]
 #![feature(import_shadowing)]
+#![feature(unboxed_closures)]
 #![deny(missing_docs)]
 
 #[cfg(test)] #[phase(plugin, link)] extern crate log;
@@ -868,8 +868,9 @@ impl Copy for LengthLimit {}
 ///
 /// Panics during iteration if the string contains a non-whitespace
 /// sequence longer than the limit.
-fn each_split_within<'a>(ss: &'a str, lim: uint, it: |&'a str| -> bool)
-                     -> bool {
+fn each_split_within<F>(ss: &str, lim: uint, mut it: F) -> bool where
+    F: FnMut(&str) -> bool
+{
     // Just for fun, let's write this as a state machine:
 
     let mut slice_start = 0;
@@ -1569,10 +1570,10 @@ fn test_usage_description_wrapping() {
     #[test]
     fn test_usage_description_multibyte_handling() {
         let optgroups = vec!(
-            optflag("k", "k\u2013w\u2013",
+            optflag("k", "k\u{2013}w\u{2013}",
                 "The word kiwi is normally spelled with two i's"),
             optflag("a", "apple",
-                "This \u201Cdescription\u201D has some characters that could \
+                "This \u{201C}description\u{201D} has some characters that could \
 confuse the line wrapping; an apple costs 0.51€ in some parts of Europe."));
 
         let expected =
index c1c397db213f64807c88464c4c405e4933540e20..fa048346e99b593d1378d52b6137e3da3975e590 100644 (file)
 //! impl<'a> dot::Labeller<'a, Nd<'a>, Ed<'a>> for Graph {
 //!     fn graph_id(&'a self) -> dot::Id<'a> { dot::Id::new("example3").unwrap() }
 //!     fn node_id(&'a self, n: &Nd<'a>) -> dot::Id<'a> {
-//!         dot::Id::new(format!("N{}", n.val0())).unwrap()
+//!         dot::Id::new(format!("N{}", n.0)).unwrap()
 //!     }
 //!     fn node_label<'a>(&'a self, n: &Nd<'a>) -> dot::LabelText<'a> {
 //!         let &(i, _) = n;
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 #![feature(globs, slicing_syntax)]
+#![feature(unboxed_closures)]
 
 pub use self::LabelText::*;
 
@@ -420,7 +421,7 @@ fn edge_label(&'a self, e: &E) -> LabelText<'a> {
 }
 
 impl<'a> LabelText<'a> {
-    fn escape_char(c: char, f: |char|) {
+    fn escape_char<F>(c: char, mut f: F) where F: FnMut(char) {
         match c {
             // not escaping \\, since Graphviz escString needs to
             // interpret backslashes; see EscStr above.
index 05932db6632ffdcb7aa3d5119ff6ed8b4d2dcb56..7ebf9b633520809d9b249a3fcf1d4d59b4fea0ba 100644 (file)
@@ -142,7 +142,7 @@ fn to_vec(&self) -> Vec<T> {
         self.as_slice().to_vec()
     }
 
-    fn partitioned(&self, f: |&T| -> bool) -> (Vec<T>, Vec<T>) {
+    fn partitioned<F>(&self, f: F) -> (Vec<T>, Vec<T>) where F: FnMut(&T) -> bool {
         self.as_slice().partitioned(f)
     }
 
index 8b79078eac6ad1548f53f6434bf22588138ea30b..0217c5b271388821b7b6ccfc2c60997bfe620a09 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Utilities for program-wide and customizable logging
 //!
-//! ## Example
+//! # Examples
 //!
 //! ```
 //! #![feature(phase)]
@@ -64,8 +64,7 @@
 //! INFO:main: the answer was: 12
 //! ```
 //!
-//!
-//! ## Logging Macros
+//! # Logging Macros
 //!
 //! There are five macros that the logging subsystem uses:
 //!
@@ -86,7 +85,7 @@
 //!
 //! * `log_enabled!(level)` - returns true if logging of the given level is enabled
 //!
-//! ## Enabling logging
+//! # Enabling logging
 //!
 //! Log levels are controlled on a per-module basis, and by default all logging is
 //! disabled except for `error!` (a log level of 1). Logging is controlled via the
 //! * `hello,std::option` turns on hello, and std's option logging
 //! * `error,hello=warn` turn on global error logging and also warn for hello
 //!
-//! ## Filtering results
+//! # Filtering results
 //!
 //! A RUST_LOG directive may include a regex filter. The syntax is to append `/`
 //! followed by a regex. Each message is checked against the regex, and is only
 //!  hello. In both cases the log message must include a single digit number
 //!  followed by 'scopes'
 //!
-//! ## Performance and Side Effects
+//! # Performance and Side Effects
 //!
 //! Each of these macros will expand to code similar to:
 //!
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/nightly/",
        html_playground_url = "http://play.rust-lang.org/")]
-#![feature(macro_rules)]
+#![feature(macro_rules, unboxed_closures)]
 #![deny(missing_docs)]
 
 extern crate regex;
@@ -422,7 +421,7 @@ fn init() {
         DIRECTIVES = mem::transmute(box directives);
 
         // Schedule the cleanup for the globals for when the runtime exits.
-        rt::at_exit(proc() {
+        rt::at_exit(move |:| {
             assert!(!DIRECTIVES.is_null());
             let _directives: Box<Vec<directive::LogDirective>> =
                 mem::transmute(DIRECTIVES);
index ad5884c16c5c1b00c8c8aea3be03ac1f34be1919..5cbc5a0a61cc491b4e890786b5aad82bae209686 100644 (file)
@@ -117,7 +117,7 @@ pub fn set_counter(&mut self, counter_low: u64, counter_high: u64) {
     /// security proof for a more involved example of this.
     ///
     /// The modified word layout is:
-    /// ```ignore
+    /// ```text
     /// constant constant constant constant
     /// key      key      key      key
     /// key      key      key      key
index 0fa989bf0b2b9b4e8713bc1cc2581e5fba7a31bd..a44197c98590c74e720e45b71a19e3c9b13ebeb2 100644 (file)
@@ -208,14 +208,14 @@ fn ind_sample<R: Rng>(&self, rng: &mut R) -> T {
 // the perf improvement (25-50%) is definitely worth the extra code
 // size from force-inlining.
 #[inline(always)]
-fn ziggurat<R:Rng>(
+fn ziggurat<R: Rng, P, Z>(
             rng: &mut R,
             symmetric: bool,
             x_tab: ziggurat_tables::ZigTable,
             f_tab: ziggurat_tables::ZigTable,
-            pdf: |f64|: 'static -> f64,
-            zero_case: |&mut R, f64|: 'static -> f64)
-            -> f64 {
+            mut pdf: P,
+            mut zero_case: Z)
+            -> f64 where P: FnMut(f64) -> f64, Z: FnMut(&mut R, f64) -> f64 {
     static SCALE: f64 = (1u64 << 53) as f64;
     loop {
         // reimplement the f64 generation as an optimisation suggested
index d357f247f1b74eb68a66329e68282ab5234bb06d..4fba3707703a5f6d7ed68e3639431d61acaec32f 100644 (file)
@@ -24,6 +24,7 @@
        html_playground_url = "http://play.rust-lang.org/")]
 
 #![feature(macro_rules, phase, globs)]
+#![feature(unboxed_closures)]
 #![no_std]
 #![experimental]
 
index 426a987d25d1c535165da970919eadc4e602c744..28d5e1812f0902485b91062b30d7d7f61e0f435e 100644 (file)
@@ -25,6 +25,7 @@
        html_playground_url = "http://play.rust-lang.org/")]
 #![allow(unknown_features)]
 #![feature(macro_rules, phase, slicing_syntax, globs)]
+#![feature(unboxed_closures)]
 #![allow(missing_docs)]
 
 extern crate serialize;
@@ -259,7 +260,9 @@ pub fn get_doc<'a>(d: Doc<'a>, tg: uint) -> Doc<'a> {
         }
     }
 
-    pub fn docs<'a>(d: Doc<'a>, it: |uint, Doc<'a>| -> bool) -> bool {
+    pub fn docs<F>(d: Doc, mut it: F) -> bool where
+        F: FnMut(uint, Doc) -> bool,
+    {
         let mut pos = d.start;
         while pos < d.end {
             let elt_tag = try_or!(vuint_at(d.data, pos), false);
@@ -273,7 +276,9 @@ pub fn docs<'a>(d: Doc<'a>, it: |uint, Doc<'a>| -> bool) -> bool {
         return true;
     }
 
-    pub fn tagged_docs<'a>(d: Doc<'a>, tg: uint, it: |Doc<'a>| -> bool) -> bool {
+    pub fn tagged_docs<F>(d: Doc, tg: uint, mut it: F) -> bool where
+        F: FnMut(Doc) -> bool,
+    {
         let mut pos = d.start;
         while pos < d.end {
             let elt_tag = try_or!(vuint_at(d.data, pos), false);
@@ -290,7 +295,9 @@ pub fn tagged_docs<'a>(d: Doc<'a>, tg: uint, it: |Doc<'a>| -> bool) -> bool {
         return true;
     }
 
-    pub fn with_doc_data<'a, T>(d: Doc<'a>, f: |x: &'a [u8]| -> T) -> T {
+    pub fn with_doc_data<T, F>(d: Doc, f: F) -> T where
+        F: FnOnce(&[u8]) -> T,
+    {
         f(d.data[d.start..d.end])
     }
 
@@ -378,8 +385,9 @@ fn next_doc(&mut self, exp_tag: EbmlEncoderTag) -> DecodeResult<Doc<'doc>> {
             Ok(r_doc)
         }
 
-        fn push_doc<T>(&mut self, exp_tag: EbmlEncoderTag,
-                       f: |&mut Decoder<'doc>| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn push_doc<T, F>(&mut self, exp_tag: EbmlEncoderTag, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             let d = try!(self.next_doc(exp_tag));
             let old_parent = self.parent;
             let old_pos = self.pos;
@@ -397,8 +405,9 @@ fn _next_uint(&mut self, exp_tag: EbmlEncoderTag) -> DecodeResult<uint> {
             Ok(r as uint)
         }
 
-        pub fn read_opaque<R>(&mut self,
-                              op: |&mut Decoder<'doc>, Doc| -> DecodeResult<R>) -> DecodeResult<R> {
+        pub fn read_opaque<R, F>(&mut self, op: F) -> DecodeResult<R> where
+            F: FnOnce(&mut Decoder, Doc) -> DecodeResult<R>,
+        {
             let doc = try!(self.next_doc(EsOpaque));
 
             let (old_parent, old_pos) = (self.parent, self.pos);
@@ -471,9 +480,9 @@ fn read_str(&mut self) -> DecodeResult<String> {
         }
 
         // Compound types:
-        fn read_enum<T>(&mut self,
-                        name: &str,
-                        f: |&mut Decoder<'doc>| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_enum<T, F>(&mut self, name: &str, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_enum({})", name);
             try!(self._check_label(name));
 
@@ -490,10 +499,9 @@ fn read_enum<T>(&mut self,
             Ok(result)
         }
 
-        fn read_enum_variant<T>(&mut self,
-                                _: &[&str],
-                                f: |&mut Decoder<'doc>, uint| -> DecodeResult<T>)
-                                -> DecodeResult<T> {
+        fn read_enum_variant<T, F>(&mut self, _: &[&str], f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>, uint) -> DecodeResult<T>,
+        {
             debug!("read_enum_variant()");
             let idx = try!(self._next_uint(EsEnumVid));
             debug!("  idx={}", idx);
@@ -511,17 +519,16 @@ fn read_enum_variant<T>(&mut self,
             Ok(result)
         }
 
-        fn read_enum_variant_arg<T>(&mut self,
-                                    idx: uint,
-                                    f: |&mut Decoder<'doc>| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_enum_variant_arg<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_enum_variant_arg(idx={})", idx);
             f(self)
         }
 
-        fn read_enum_struct_variant<T>(&mut self,
-                                       _: &[&str],
-                                       f: |&mut Decoder<'doc>, uint| -> DecodeResult<T>)
-                                       -> DecodeResult<T> {
+        fn read_enum_struct_variant<T, F>(&mut self, _: &[&str], f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>, uint) -> DecodeResult<T>,
+        {
             debug!("read_enum_struct_variant()");
             let idx = try!(self._next_uint(EsEnumVid));
             debug!("  idx={}", idx);
@@ -539,39 +546,37 @@ fn read_enum_struct_variant<T>(&mut self,
             Ok(result)
         }
 
-        fn read_enum_struct_variant_field<T>(&mut self,
-                                             name: &str,
-                                             idx: uint,
-                                             f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                                             -> DecodeResult<T> {
-            debug!("read_enum_struct_variant_arg(name={}, idx={})", name, idx);
+        fn read_enum_struct_variant_field<T, F>(&mut self,
+                                                name: &str,
+                                                idx: uint,
+                                                f: F)
+                                                -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
+                debug!("read_enum_struct_variant_arg(name={}, idx={})", name, idx);
             f(self)
         }
 
-        fn read_struct<T>(&mut self,
-                          name: &str,
-                          _: uint,
-                          f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                          -> DecodeResult<T> {
+        fn read_struct<T, F>(&mut self, name: &str, _: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_struct(name={})", name);
             f(self)
         }
 
-        fn read_struct_field<T>(&mut self,
-                                name: &str,
-                                idx: uint,
-                                f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                                -> DecodeResult<T> {
+        fn read_struct_field<T, F>(&mut self, name: &str, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_struct_field(name={}, idx={})", name, idx);
             try!(self._check_label(name));
             f(self)
         }
 
-        fn read_tuple<T>(&mut self,
-                         tuple_len: uint,
-                         f: |&mut Decoder<'doc>| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_tuple<T, F>(&mut self, tuple_len: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_tuple()");
-            self.read_seq(|d, len| {
+            self.read_seq(move |d, len| {
                 if len == tuple_len {
                     f(d)
                 } else {
@@ -581,34 +586,36 @@ fn read_tuple<T>(&mut self,
             })
         }
 
-        fn read_tuple_arg<T>(&mut self, idx: uint, f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                             -> DecodeResult<T> {
+        fn read_tuple_arg<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_tuple_arg(idx={})", idx);
             self.read_seq_elt(idx, f)
         }
 
-        fn read_tuple_struct<T>(&mut self,
-                                name: &str,
-                                len: uint,
-                                f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                                -> DecodeResult<T> {
+        fn read_tuple_struct<T, F>(&mut self, name: &str, len: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_tuple_struct(name={})", name);
             self.read_tuple(len, f)
         }
 
-        fn read_tuple_struct_arg<T>(&mut self,
-                                    idx: uint,
-                                    f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                                    -> DecodeResult<T> {
+        fn read_tuple_struct_arg<T, F>(&mut self,
+                                       idx: uint,
+                                       f: F)
+                                       -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_tuple_struct_arg(idx={})", idx);
             self.read_tuple_arg(idx, f)
         }
 
-        fn read_option<T>(&mut self,
-                          f: |&mut Decoder<'doc>, bool| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>, bool) -> DecodeResult<T>,
+        {
             debug!("read_option()");
-            self.read_enum("Option", |this| {
-                this.read_enum_variant(&["None", "Some"], |this, idx| {
+            self.read_enum("Option", move |this| {
+                this.read_enum_variant(&["None", "Some"], move |this, idx| {
                     match idx {
                         0 => f(this, false),
                         1 => f(this, true),
@@ -620,40 +627,45 @@ fn read_option<T>(&mut self,
             })
         }
 
-        fn read_seq<T>(&mut self,
-                       f: |&mut Decoder<'doc>, uint| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>, uint) -> DecodeResult<T>,
+        {
             debug!("read_seq()");
-            self.push_doc(EsVec, |d| {
+            self.push_doc(EsVec, move |d| {
                 let len = try!(d._next_uint(EsVecLen));
                 debug!("  len={}", len);
                 f(d, len)
             })
         }
 
-        fn read_seq_elt<T>(&mut self, idx: uint, f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                           -> DecodeResult<T> {
+        fn read_seq_elt<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_seq_elt(idx={})", idx);
             self.push_doc(EsVecElt, f)
         }
 
-        fn read_map<T>(&mut self,
-                       f: |&mut Decoder<'doc>, uint| -> DecodeResult<T>) -> DecodeResult<T> {
+        fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>, uint) -> DecodeResult<T>,
+        {
             debug!("read_map()");
-            self.push_doc(EsMap, |d| {
+            self.push_doc(EsMap, move |d| {
                 let len = try!(d._next_uint(EsMapLen));
                 debug!("  len={}", len);
                 f(d, len)
             })
         }
 
-        fn read_map_elt_key<T>(&mut self, idx: uint, f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                               -> DecodeResult<T> {
+        fn read_map_elt_key<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_map_elt_key(idx={})", idx);
             self.push_doc(EsMapKey, f)
         }
 
-        fn read_map_elt_val<T>(&mut self, idx: uint, f: |&mut Decoder<'doc>| -> DecodeResult<T>)
-                               -> DecodeResult<T> {
+        fn read_map_elt_val<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+            F: FnOnce(&mut Decoder<'doc>) -> DecodeResult<T>,
+        {
             debug!("read_map_elt_val(idx={})", idx);
             self.push_doc(EsMapVal, f)
         }
@@ -756,7 +768,9 @@ pub fn end_tag(&mut self) -> EncodeResult {
             Ok(r)
         }
 
-        pub fn wr_tag(&mut self, tag_id: uint, blk: || -> EncodeResult) -> EncodeResult {
+        pub fn wr_tag<F>(&mut self, tag_id: uint, blk: F) -> EncodeResult where
+            F: FnOnce() -> EncodeResult,
+        {
             try!(self.start_tag(tag_id));
             try!(blk());
             self.end_tag()
@@ -852,7 +866,9 @@ fn _emit_label(&mut self, label: &str) -> EncodeResult {
             else { Ok(()) }
         }
 
-        pub fn emit_opaque(&mut self, f: |&mut Encoder<W>| -> EncodeResult) -> EncodeResult {
+        pub fn emit_opaque<F>(&mut self, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<W>) -> EncodeResult,
+        {
             try!(self.start_tag(EsOpaque as uint));
             try!(f(self));
             self.end_tag()
@@ -916,102 +932,106 @@ fn emit_str(&mut self, v: &str) -> EncodeResult {
             self.wr_tagged_str(EsStr as uint, v)
         }
 
-        fn emit_enum(&mut self,
-                     name: &str,
-                     f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_enum<F>(&mut self, name: &str, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             try!(self._emit_label(name));
             try!(self.start_tag(EsEnum as uint));
             try!(f(self));
             self.end_tag()
         }
 
-        fn emit_enum_variant(&mut self,
-                             _: &str,
-                             v_id: uint,
-                             _: uint,
-                             f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_enum_variant<F>(&mut self,
+                                _: &str,
+                                v_id: uint,
+                                _: uint,
+                                f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             try!(self._emit_tagged_uint(EsEnumVid, v_id));
             try!(self.start_tag(EsEnumBody as uint));
             try!(f(self));
             self.end_tag()
         }
 
-        fn emit_enum_variant_arg(&mut self,
-                                 _: uint,
-                                 f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_enum_variant_arg<F>(&mut self, _: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             f(self)
         }
 
-        fn emit_enum_struct_variant(&mut self,
-                                    v_name: &str,
-                                    v_id: uint,
-                                    cnt: uint,
-                                    f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_enum_struct_variant<F>(&mut self,
+                                       v_name: &str,
+                                       v_id: uint,
+                                       cnt: uint,
+                                       f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_enum_variant(v_name, v_id, cnt, f)
         }
 
-        fn emit_enum_struct_variant_field(&mut self,
-                                          _: &str,
-                                          idx: uint,
-                                          f: |&mut Encoder<'a, W>| -> EncodeResult)
-            -> EncodeResult {
+        fn emit_enum_struct_variant_field<F>(&mut self,
+                                             _: &str,
+                                             idx: uint,
+                                             f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_enum_variant_arg(idx, f)
         }
 
-        fn emit_struct(&mut self,
-                       _: &str,
-                       _len: uint,
-                       f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_struct<F>(&mut self, _: &str, _len: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             f(self)
         }
 
-        fn emit_struct_field(&mut self,
-                             name: &str,
-                             _: uint,
-                             f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_struct_field<F>(&mut self, name: &str, _: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             try!(self._emit_label(name));
             f(self)
         }
 
-        fn emit_tuple(&mut self,
-                      len: uint,
-                      f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_tuple<F>(&mut self, len: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_seq(len, f)
         }
-        fn emit_tuple_arg(&mut self,
-                          idx: uint,
-                          f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_tuple_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_seq_elt(idx, f)
         }
 
-        fn emit_tuple_struct(&mut self,
-                             _: &str,
-                             len: uint,
-                             f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_tuple_struct<F>(&mut self, _: &str, len: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_seq(len, f)
         }
-        fn emit_tuple_struct_arg(&mut self,
-                                 idx: uint,
-                                 f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_tuple_struct_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_seq_elt(idx, f)
         }
 
-        fn emit_option(&mut self,
-                       f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_option<F>(&mut self, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             self.emit_enum("Option", f)
         }
         fn emit_option_none(&mut self) -> EncodeResult {
             self.emit_enum_variant("None", 0, 0, |_| Ok(()))
         }
-        fn emit_option_some(&mut self,
-                            f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
 
             self.emit_enum_variant("Some", 1, 1, f)
         }
 
-        fn emit_seq(&mut self,
-                    len: uint,
-                    f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_seq<F>(&mut self, len: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
 
             try!(self.start_tag(EsVec as uint));
             try!(self._emit_tagged_uint(EsVecLen, len));
@@ -1019,18 +1039,18 @@ fn emit_seq(&mut self,
             self.end_tag()
         }
 
-        fn emit_seq_elt(&mut self,
-                        _idx: uint,
-                        f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_seq_elt<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
 
             try!(self.start_tag(EsVecElt as uint));
             try!(f(self));
             self.end_tag()
         }
 
-        fn emit_map(&mut self,
-                    len: uint,
-                    f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_map<F>(&mut self, len: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
 
             try!(self.start_tag(EsMap as uint));
             try!(self._emit_tagged_uint(EsMapLen, len));
@@ -1038,18 +1058,18 @@ fn emit_map(&mut self,
             self.end_tag()
         }
 
-        fn emit_map_elt_key(&mut self,
-                            _idx: uint,
-                            f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_map_elt_key<F>(&mut self, _idx: uint, mut f: F) -> EncodeResult where
+            F: FnMut(&mut Encoder<'a, W>) -> EncodeResult,
+        {
 
             try!(self.start_tag(EsMapKey as uint));
             try!(f(self));
             self.end_tag()
         }
 
-        fn emit_map_elt_val(&mut self,
-                            _idx: uint,
-                            f: |&mut Encoder<'a, W>| -> EncodeResult) -> EncodeResult {
+        fn emit_map_elt_val<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
+            F: FnOnce(&mut Encoder<'a, W>) -> EncodeResult,
+        {
             try!(self.start_tag(EsMapVal as uint));
             try!(f(self));
             self.end_tag()
index b35c3879783a028f8b125f0a2b78acef74d98386..05f853a851ea7aa226358eb4d7743dbb4c4fc8b7 100644 (file)
 
 #![allow(unknown_features)]
 #![feature(macro_rules, phase, slicing_syntax, globs)]
+#![feature(unboxed_closures)]
 #![deny(missing_docs)]
 
 #[cfg(test)]
index 55e533aadee7ffc913f789f52570c2eacc872846..f9ae4d2591ab84a43155f72cbb9155e64661472a 100644 (file)
@@ -838,8 +838,9 @@ fn get_next_greedy(&mut self) -> Result<Greed, Error> {
     // Otherwise, an error will be returned.
     // Generally, `allow_start` is only true when you're *not* expecting an
     // opening parenthesis.
-    fn pos_last(&self, allow_start: bool, pred: |&BuildAst| -> bool)
-               -> Result<uint, Error> {
+    fn pos_last<P>(&self, allow_start: bool, pred: P) -> Result<uint, Error> where
+        P: FnMut(&BuildAst) -> bool,
+   {
         let from = match self.stack.iter().rev().position(pred) {
             Some(i) => i,
             None => {
@@ -887,8 +888,9 @@ fn alternate(&mut self, mut from: uint) -> Result<(), Error> {
     // build_from combines all AST elements starting at 'from' in the
     // parser's stack using 'mk' to combine them. If any such element is not an
     // AST then it is popped off the stack and ignored.
-    fn build_from(&mut self, from: uint, mk: |Ast, Ast| -> Ast)
-                 -> Result<Ast, Error> {
+    fn build_from<F>(&mut self, from: uint, mut mk: F) -> Result<Ast, Error> where
+        F: FnMut(Ast, Ast) -> Ast,
+    {
         if from >= self.stack.len() {
             return self.err("Empty group or alternate not allowed.")
         }
@@ -1029,7 +1031,7 @@ fn is_valid_cap(c: char) -> bool {
 
 fn find_class(classes: NamedClasses, name: &str) -> Option<Vec<(char, char)>> {
     match classes.binary_search(|&(s, _)| s.cmp(name)) {
-        BinarySearchResult::Found(i) => Some(classes[i].val1().to_vec()),
+        BinarySearchResult::Found(i) => Some(classes[i].1.to_vec()),
         BinarySearchResult::NotFound(_) => None,
     }
 }
index 2a1fda06431c896944b9f40784fd6fae97cc896a..1504e1919852d8e0058eb0eeec5ee7daeb6a6783 100644 (file)
@@ -429,10 +429,11 @@ pub fn splitn<'r, 't>(&'r self, text: &'t str, limit: uint)
     ///
     /// ```rust
     /// # #![feature(phase)]
+    /// # #![feature(unboxed_closures)]
     /// # extern crate regex; #[phase(plugin)] extern crate regex_macros;
     /// # use regex::Captures; fn main() {
     /// let re = regex!(r"([^,\s]+),\s+(\S+)");
-    /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| {
+    /// let result = re.replace("Springsteen, Bruce", |&: caps: &Captures| {
     ///     format!("{} {}", caps.at(2), caps.at(1))
     /// });
     /// assert_eq!(result.as_slice(), "Bruce Springsteen");
@@ -585,7 +586,7 @@ fn reg_replace<'a>(&'a mut self, caps: &Captures) -> CowString<'a> {
     }
 }
 
-impl<'t> Replacer for |&Captures|: 't -> String {
+impl<F> Replacer for F where F: FnMut(&Captures) -> String {
     fn reg_replace<'a>(&'a mut self, caps: &Captures) -> CowString<'a> {
         (*self)(caps).into_cow()
     }
@@ -767,7 +768,7 @@ pub fn expand(&self, text: &str) -> String {
         // How evil can you get?
         // FIXME: Don't use regexes for this. It's completely unnecessary.
         let re = Regex::new(r"(^|[^$]|\b)\$(\w+)").unwrap();
-        let text = re.replace_all(text, |refs: &Captures| -> String {
+        let text = re.replace_all(text, |&mut: refs: &Captures| -> String {
             let (pre, name) = (refs.at(1), refs.at(2));
             format!("{}{}", pre,
                     match from_str::<uint>(name.as_slice()) {
index 4df8819774319e782e71a96affd38e3fb26aec4a..c1e8677fa8f3d99ccdf2baba0279bdcf6fe289b4 100644 (file)
@@ -19,6 +19,7 @@
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
 #![feature(plugin_registrar, quote)]
+#![feature(unboxed_closures)]
 
 extern crate regex;
 extern crate syntax;
@@ -601,9 +602,10 @@ fn wild_arm_expr(&self, body: P<ast::Expr>) -> ast::Arm {
 
     // Converts `xs` to a `[x1, x2, .., xN]` expression by calling `to_expr`
     // on each element in `xs`.
-    fn vec_expr<T, It: Iterator<T>>(&self, xs: It,
-                                    to_expr: |&ExtCtxt, T| -> P<ast::Expr>)
-                  -> P<ast::Expr> {
+    fn vec_expr<T, It, F>(&self, xs: It, mut to_expr: F) -> P<ast::Expr> where
+        It: Iterator<T>,
+        F: FnMut(&ExtCtxt, T) -> P<ast::Expr>,
+    {
         let exprs = xs.map(|x| to_expr(self.cx, x)).collect();
         self.cx.expr_vec(self.sp, exprs)
     }
index 81209763a0c5aed06a7bb37ea7d40b4b9debf40d..fcac718b3708cbf1576ff7ddf4979975563104d3 100644 (file)
     E0019,
     E0020,
     E0022,
-    E0023,
-    E0024,
-    E0025,
-    E0026,
-    E0027,
-    E0029,
-    E0030,
-    E0031,
-    E0033,
-    E0034,
-    E0035,
-    E0036,
-    E0038,
-    E0040,
-    E0044,
-    E0045,
-    E0046,
-    E0049,
-    E0050,
-    E0051,
-    E0052,
-    E0053,
-    E0054,
-    E0055,
-    E0056,
-    E0057,
-    E0059,
-    E0060,
-    E0061,
-    E0062,
-    E0063,
-    E0066,
-    E0067,
-    E0068,
-    E0069,
-    E0070,
-    E0071,
-    E0072,
-    E0073,
-    E0074,
-    E0075,
-    E0076,
-    E0077,
-    E0079,
-    E0080,
-    E0081,
-    E0082,
-    E0083,
-    E0084,
-    E0085,
-    E0086,
-    E0087,
-    E0088,
-    E0089,
-    E0090,
-    E0091,
-    E0092,
-    E0093,
-    E0094,
-    E0100,
-    E0101,
-    E0102,
-    E0103,
-    E0104,
-    E0106,
-    E0107,
-    E0108,
     E0109,
     E0110,
-    E0116,
-    E0117,
-    E0118,
-    E0119,
-    E0120,
-    E0121,
-    E0122,
-    E0124,
-    E0127,
-    E0128,
-    E0129,
-    E0130,
-    E0131,
-    E0132,
     E0133,
     E0134,
     E0135,
     E0138,
     E0139,
     E0140,
-    E0141,
     E0152,
     E0153,
     E0157,
     E0158,
-    E0159,
     E0161,
     E0162,
-    E0163,
-    E0164,
     E0165,
     E0166,
     E0167,
     E0169,
     E0170,
     E0171,
-    E0172
+    E0172,
+    E0173,
+    E0174,
+    E0177,
+    E0178
 )
index 2af6a4876299b69ba043106133179764f06d39ad..404c7edeb88d6ddfad3dadabcc64dfd668688c49 100644 (file)
       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
       html_root_url = "http://doc.rust-lang.org/nightly/")]
 
-#![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
-#![feature(slicing_syntax, tuple_indexing, unsafe_destructor)]
+#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
+#![feature(slicing_syntax, unsafe_destructor)]
 #![feature(rustc_diagnostic_macros)]
+#![feature(unboxed_closures)]
 
 extern crate arena;
 extern crate flate;
@@ -61,7 +62,6 @@ pub mod back {
 pub mod middle {
     pub mod astconv_util;
     pub mod astencode;
-    pub mod borrowck;
     pub mod cfg;
     pub mod check_const;
     pub mod check_static_recursion;
index e19fa01b2e4e88866385374969884ef4d648bd6f..3040125d97e32a40ecdf77b2b33b5c827084d6d1 100644 (file)
@@ -1721,7 +1721,7 @@ fn check_item(&mut self, cx: &Context, item: &ast::Item) {
         if self.is_internal(cx, item.span) { return }
 
         match item.node {
-            ast::ItemTrait(_, _, ref supertraits, _) => {
+            ast::ItemTrait(_, _, _, ref supertraits, _) => {
                 for t in supertraits.iter() {
                     if let ast::TraitTyParamBound(ref t) = *t {
                         let id = ty::trait_ref_to_def_id(cx.tcx, &t.trait_ref);
@@ -1729,7 +1729,7 @@ fn check_item(&mut self, cx: &Context, item: &ast::Item) {
                     }
                 }
             }
-            ast::ItemImpl(_, Some(ref t), _, _) => {
+            ast::ItemImpl(_, _, Some(ref t), _, _) => {
                 let id = ty::trait_ref_to_def_id(cx.tcx, t);
                 self.lint(cx, id, t.path.span);
             }
index 153a00e56177637caf88b220f08747fbdccdc462..75f2fc81900c463df82d7255eb56dee405ad2a61 100644 (file)
@@ -34,7 +34,6 @@
 use util::nodemap::FnvHashMap;
 
 use std::cell::RefCell;
-use std::tuple::Tuple2;
 use std::mem;
 use syntax::ast_util::IdVisitingOperation;
 use syntax::attr::AttrMetaMethods;
@@ -87,7 +86,7 @@ fn get_level_source(&self, lint: LintId) -> LevelSource {
     }
 
     fn set_level(&mut self, lint: LintId, lvlsrc: LevelSource) {
-        if lvlsrc.val0() == Allow {
+        if lvlsrc.0 == Allow {
             self.levels.remove(&lint);
         } else {
             self.levels.insert(lint, lvlsrc);
@@ -110,8 +109,8 @@ pub fn get_lints<'t>(&'t self) -> &'t [(&'static Lint, bool)] {
 
     pub fn get_lint_groups<'t>(&'t self) -> Vec<(&'static str, Vec<LintId>, bool)> {
         self.lint_groups.iter().map(|(k, v)| (*k,
-                                              v.ref0().clone(),
-                                              *v.ref1())).collect()
+                                              v.0.clone(),
+                                              v.1)).collect()
     }
 
     pub fn register_pass(&mut self, sess: Option<&Session>,
@@ -275,7 +274,7 @@ pub fn process_command_line(&mut self, sess: &Session) {
             match self.find_lint(lint_name.as_slice(), sess, None) {
                 Some(lint_id) => self.set_level(lint_id, (level, CommandLine)),
                 None => {
-                    match self.lint_groups.iter().map(|(&x, pair)| (x, pair.ref0().clone()))
+                    match self.lint_groups.iter().map(|(&x, pair)| (x, pair.0.clone()))
                                                  .collect::<FnvHashMap<&'static str,
                                                                        Vec<LintId>>>()
                                                  .get(lint_name.as_slice()) {
@@ -443,7 +442,7 @@ fn lookup_and_emit(&self, lint: &'static Lint, span: Option<Span>, msg: &str) {
             None => return,
             Some(&(Warn, src)) => {
                 let lint_id = LintId::of(builtin::WARNINGS);
-                (self.lints.get_level_source(lint_id).val0(), src)
+                (self.lints.get_level_source(lint_id).0, src)
             }
             Some(&pair) => pair,
         };
@@ -464,9 +463,11 @@ pub fn span_lint(&self, lint: &'static Lint, span: Span, msg: &str) {
     /// Merge the lints specified by any lint attributes into the
     /// current lint context, call the provided function, then reset the
     /// lints in effect to their previous state.
-    fn with_lint_attrs(&mut self,
-                       attrs: &[ast::Attribute],
-                       f: |&mut Context|) {
+    fn with_lint_attrs<F>(&mut self,
+                          attrs: &[ast::Attribute],
+                          f: F) where
+        F: FnOnce(&mut Context),
+    {
         // Parse all of the lint attributes, and then add them all to the
         // current dictionary of lint information. Along the way, keep a history
         // of what we changed so we can roll everything back after invoking the
@@ -501,7 +502,7 @@ fn with_lint_attrs(&mut self,
             };
 
             for (lint_id, level, span) in v.into_iter() {
-                let now = self.lints.get_level_source(lint_id).val0();
+                let now = self.lints.get_level_source(lint_id).0;
                 if now == Forbid && level != Forbid {
                     let lint_name = lint_id.as_str();
                     self.tcx.sess.span_err(span,
@@ -509,7 +510,7 @@ fn with_lint_attrs(&mut self,
                                                    level.as_str(), lint_name,
                                                    lint_name).as_slice());
                 } else if now != level {
-                    let src = self.lints.get_level_source(lint_id).val1();
+                    let src = self.lints.get_level_source(lint_id).1;
                     self.level_stack.push((lint_id, (now, src)));
                     pushed += 1;
                     self.lints.set_level(lint_id, (level, Node(span)));
@@ -528,7 +529,9 @@ fn with_lint_attrs(&mut self,
         }
     }
 
-    fn visit_ids(&mut self, f: |&mut ast_util::IdVisitor<Context>|) {
+    fn visit_ids<F>(&mut self, f: F) where
+        F: FnOnce(&mut ast_util::IdVisitor<Context>)
+    {
         let mut v = ast_util::IdVisitor {
             operation: self,
             pass_through_items: false,
index 315e0eea9b763efe21221a80bb3716b6cbd11485..b698e4fcc7f7bc6719f79bd781940fddf71958a7 100644 (file)
@@ -251,3 +251,9 @@ pub struct LinkMeta {
 
 pub const tag_item_generics: uint = 0xa6;
 pub const tag_method_ty_generics: uint = 0xa7;
+
+pub const tag_predicate: uint = 0xa8;
+pub const tag_predicate_space: uint = 0xa9;
+pub const tag_predicate_data: uint = 0xb0;
+
+pub const tag_unsafety: uint = 0xb1;
index b864dc39603644486733f83ab58570fc2a41a75d..4cbb1babf9a2cbf8e9b5bc01790a8b14e78f440d 100644 (file)
@@ -21,7 +21,6 @@
 use middle::lang_items;
 use middle::resolve;
 use middle::ty;
-use middle::subst::VecPerParamSpace;
 
 use rbml;
 use rbml::reader;
@@ -48,20 +47,22 @@ pub fn get_symbol(cstore: &cstore::CStore, def: ast::DefId) -> String {
 }
 
 /// Iterates over all the language items in the given crate.
-pub fn each_lang_item(cstore: &cstore::CStore,
-                      cnum: ast::CrateNum,
-                      f: |ast::NodeId, uint| -> bool)
-                      -> bool {
+pub fn each_lang_item<F>(cstore: &cstore::CStore,
+                         cnum: ast::CrateNum,
+                         f: F)
+                         -> bool where
+    F: FnMut(ast::NodeId, uint) -> bool,
+{
     let crate_data = cstore.get_crate_data(cnum);
     decoder::each_lang_item(&*crate_data, f)
 }
 
 /// Iterates over each child of the given item.
-pub fn each_child_of_item(cstore: &cstore::CStore,
-                          def_id: ast::DefId,
-                          callback: |decoder::DefLike,
-                                     ast::Name,
-                                     ast::Visibility|) {
+pub fn each_child_of_item<F>(cstore: &cstore::CStore,
+                             def_id: ast::DefId,
+                             callback: F) where
+    F: FnMut(decoder::DefLike, ast::Name, ast::Visibility),
+{
     let crate_data = cstore.get_crate_data(def_id.krate);
     let get_crate_data: decoder::GetCrateDataCb = |cnum| {
         cstore.get_crate_data(cnum)
@@ -74,11 +75,11 @@ pub fn each_child_of_item(cstore: &cstore::CStore,
 }
 
 /// Iterates over each top-level crate item.
-pub fn each_top_level_item_of_crate(cstore: &cstore::CStore,
-                                    cnum: ast::CrateNum,
-                                    callback: |decoder::DefLike,
-                                               ast::Name,
-                                               ast::Visibility|) {
+pub fn each_top_level_item_of_crate<F>(cstore: &cstore::CStore,
+                                       cnum: ast::CrateNum,
+                                       callback: F) where
+    F: FnMut(decoder::DefLike, ast::Name, ast::Visibility),
+{
     let crate_data = cstore.get_crate_data(cnum);
     let get_crate_data: decoder::GetCrateDataCb = |cnum| {
         cstore.get_crate_data(cnum)
@@ -196,9 +197,11 @@ pub fn get_methods_if_impl(cstore: &cstore::CStore,
     decoder::get_methods_if_impl(cstore.intr.clone(), &*cdata, def.node)
 }
 
-pub fn get_item_attrs(cstore: &cstore::CStore,
-                      def_id: ast::DefId,
-                      f: |Vec<ast::Attribute>|) {
+pub fn get_item_attrs<F>(cstore: &cstore::CStore,
+                         def_id: ast::DefId,
+                         f: F) where
+    F: FnOnce(Vec<ast::Attribute>),
+{
     let cdata = cstore.get_crate_data(def_id.krate);
     decoder::get_item_attrs(&*cdata, def_id.node, f)
 }
@@ -250,9 +253,8 @@ pub fn get_field_type<'tcx>(tcx: &ty::ctxt<'tcx>, class_id: ast::DefId,
         });
     let ty = decoder::item_type(def, the_field, tcx, &*cdata);
     ty::Polytype {
-        generics: ty::Generics {types: VecPerParamSpace::empty(),
-                                regions: VecPerParamSpace::empty()},
-        ty: ty
+        generics: ty::Generics::empty(),
+        ty: ty,
     }
 }
 
@@ -281,23 +283,29 @@ pub fn get_native_libraries(cstore: &cstore::CStore, crate_num: ast::CrateNum)
     decoder::get_native_libraries(&*cdata)
 }
 
-pub fn each_impl(cstore: &cstore::CStore,
-                 crate_num: ast::CrateNum,
-                 callback: |ast::DefId|) {
+pub fn each_impl<F>(cstore: &cstore::CStore,
+                    crate_num: ast::CrateNum,
+                    callback: F) where
+    F: FnMut(ast::DefId),
+{
     let cdata = cstore.get_crate_data(crate_num);
     decoder::each_impl(&*cdata, callback)
 }
 
-pub fn each_implementation_for_type(cstore: &cstore::CStore,
-                                    def_id: ast::DefId,
-                                    callback: |ast::DefId|) {
+pub fn each_implementation_for_type<F>(cstore: &cstore::CStore,
+                                       def_id: ast::DefId,
+                                       callback: F) where
+    F: FnMut(ast::DefId),
+{
     let cdata = cstore.get_crate_data(def_id.krate);
     decoder::each_implementation_for_type(&*cdata, def_id.node, callback)
 }
 
-pub fn each_implementation_for_trait(cstore: &cstore::CStore,
-                                     def_id: ast::DefId,
-                                     callback: |ast::DefId|) {
+pub fn each_implementation_for_trait<F>(cstore: &cstore::CStore,
+                                        def_id: ast::DefId,
+                                        callback: F) where
+    F: FnMut(ast::DefId),
+{
     let cdata = cstore.get_crate_data(def_id.krate);
     decoder::each_implementation_for_trait(&*cdata, def_id.node, callback)
 }
index bb1c75b075c2b2f3ce2e24d74cab849ec00b36ad..c0642f29abc90fe534c55f6d76d9ea168345df2c 100644 (file)
@@ -113,16 +113,18 @@ pub fn set_crate_data(&self, cnum: ast::CrateNum, data: Rc<crate_metadata>) {
         self.metas.borrow_mut().insert(cnum, data);
     }
 
-    pub fn iter_crate_data(&self, i: |ast::CrateNum, &crate_metadata|) {
+    pub fn iter_crate_data<I>(&self, mut i: I) where
+        I: FnMut(ast::CrateNum, &crate_metadata),
+    {
         for (&k, v) in self.metas.borrow().iter() {
             i(k, &**v);
         }
     }
 
     /// Like `iter_crate_data`, but passes source paths (if available) as well.
-    pub fn iter_crate_data_origins(&self, i: |ast::CrateNum,
-                                              &crate_metadata,
-                                              Option<CrateSource>|) {
+    pub fn iter_crate_data_origins<I>(&self, mut i: I) where
+        I: FnMut(ast::CrateNum, &crate_metadata, Option<CrateSource>),
+    {
         for (&k, v) in self.metas.borrow().iter() {
             let origin = self.get_used_crate_source(k);
             origin.as_ref().map(|cs| { assert!(k == cs.cnum); });
index 0d51e044de9cc2015df1df1b944448b7de107ece..b78112f1f78508a893460f88d3863fa33d4af8e2 100644 (file)
@@ -23,7 +23,8 @@
 use metadata::cstore;
 use metadata::tydecode::{parse_ty_data, parse_region_data, parse_def_id,
                          parse_type_param_def_data, parse_bounds_data,
-                         parse_bare_fn_ty_data, parse_trait_ref_data};
+                         parse_bare_fn_ty_data, parse_trait_ref_data,
+                         parse_predicate_data};
 use middle::def;
 use middle::lang_items;
 use middle::resolve::{TraitItemKind, TypeTraitItemKind};
@@ -59,8 +60,9 @@
 // what crate that's in and give us a def_id that makes sense for the current
 // build.
 
-fn lookup_hash<'a>(d: rbml::Doc<'a>, eq_fn: |&[u8]| -> bool,
-                   hash: u64) -> Option<rbml::Doc<'a>> {
+fn lookup_hash<'a, F>(d: rbml::Doc<'a>, mut eq_fn: F, hash: u64) -> Option<rbml::Doc<'a>> where
+    F: FnMut(&[u8]) -> bool,
+{
     let index = reader::get_doc(d, tag_index);
     let table = reader::get_doc(index, tag_index_table);
     let hash_pos = table.start + (hash % 256 * 4) as uint;
@@ -211,7 +213,9 @@ fn get_provided_source(d: rbml::Doc, cdata: Cmd) -> Option<ast::DefId> {
     })
 }
 
-fn each_reexport(d: rbml::Doc, f: |rbml::Doc| -> bool) -> bool {
+fn each_reexport<F>(d: rbml::Doc, f: F) -> bool where
+    F: FnMut(rbml::Doc) -> bool,
+{
     reader::tagged_docs(d, tag_items_data_item_reexport, f)
 }
 
@@ -357,6 +361,15 @@ fn item_to_def_like(item: rbml::Doc, did: ast::DefId, cnum: ast::CrateNum)
     }
 }
 
+fn parse_unsafety(item_doc: rbml::Doc) -> ast::Unsafety {
+    let unsafety_doc = reader::get_doc(item_doc, tag_unsafety);
+    if reader::doc_as_u8(unsafety_doc) != 0 {
+        ast::Unsafety::Unsafe
+    } else {
+        ast::Unsafety::Normal
+    }
+}
+
 pub fn get_trait_def<'tcx>(cdata: Cmd,
                            item_id: ast::NodeId,
                            tcx: &ty::ctxt<'tcx>) -> ty::TraitDef<'tcx>
@@ -364,8 +377,10 @@ pub fn get_trait_def<'tcx>(cdata: Cmd,
     let item_doc = lookup_item(item_id, cdata.data());
     let generics = doc_generics(item_doc, tcx, cdata, tag_item_generics);
     let bounds = trait_def_bounds(item_doc, tcx, cdata);
+    let unsafety = parse_unsafety(item_doc);
 
     ty::TraitDef {
+        unsafety: unsafety,
         generics: generics,
         bounds: bounds,
         trait_ref: Rc::new(item_trait_ref(item_doc, tcx, cdata))
@@ -435,7 +450,7 @@ pub fn get_symbol(data: &[u8], id: ast::NodeId) -> String {
 }
 
 // Something that a name can resolve to.
-#[deriving(Clone)]
+#[deriving(Clone,Show)]
 pub enum DefLike {
     DlDef(def::Def),
     DlImpl(ast::DefId),
@@ -445,7 +460,9 @@ pub enum DefLike {
 impl Copy for DefLike {}
 
 /// Iterates over the language items in the given crate.
-pub fn each_lang_item(cdata: Cmd, f: |ast::NodeId, uint| -> bool) -> bool {
+pub fn each_lang_item<F>(cdata: Cmd, mut f: F) -> bool where
+    F: FnMut(ast::NodeId, uint) -> bool,
+{
     let root = rbml::Doc::new(cdata.data());
     let lang_items = reader::get_doc(root, tag_lang_items);
     reader::tagged_docs(lang_items, tag_lang_items_item, |item_doc| {
@@ -461,13 +478,13 @@ pub fn each_lang_item(cdata: Cmd, f: |ast::NodeId, uint| -> bool) -> bool {
 
 pub type GetCrateDataCb<'a> = |ast::CrateNum|: 'a -> Rc<crate_metadata>;
 
-fn each_child_of_item_or_crate(intr: Rc<IdentInterner>,
-                               cdata: Cmd,
-                               item_doc: rbml::Doc,
-                               get_crate_data: GetCrateDataCb,
-                               callback: |DefLike,
-                                          ast::Name,
-                                          ast::Visibility|) {
+fn each_child_of_item_or_crate<F>(intr: Rc<IdentInterner>,
+                                  cdata: Cmd,
+                                  item_doc: rbml::Doc,
+                                  get_crate_data: GetCrateDataCb,
+                                  mut callback: F) where
+    F: FnMut(DefLike, ast::Name, ast::Visibility),
+{
     // Iterate over all children.
     let _ = reader::tagged_docs(item_doc, tag_mod_child, |child_info_doc| {
         let child_def_id = reader::with_doc_data(child_info_doc,
@@ -580,11 +597,13 @@ fn each_child_of_item_or_crate(intr: Rc<IdentInterner>,
 }
 
 /// Iterates over each child of the given item.
-pub fn each_child_of_item(intr: Rc<IdentInterner>,
-                          cdata: Cmd,
-                          id: ast::NodeId,
-                          get_crate_data: GetCrateDataCb,
-                          callback: |DefLike, ast::Name, ast::Visibility|) {
+pub fn each_child_of_item<F>(intr: Rc<IdentInterner>,
+                             cdata: Cmd,
+                             id: ast::NodeId,
+                             get_crate_data: GetCrateDataCb,
+                             callback: F) where
+    F: FnMut(DefLike, ast::Name, ast::Visibility),
+{
     // Find the item.
     let root_doc = rbml::Doc::new(cdata.data());
     let items = reader::get_doc(root_doc, tag_items);
@@ -601,12 +620,12 @@ pub fn each_child_of_item(intr: Rc<IdentInterner>,
 }
 
 /// Iterates over all the top-level crate items.
-pub fn each_top_level_item_of_crate(intr: Rc<IdentInterner>,
-                                    cdata: Cmd,
-                                    get_crate_data: GetCrateDataCb,
-                                    callback: |DefLike,
-                                               ast::Name,
-                                               ast::Visibility|) {
+pub fn each_top_level_item_of_crate<F>(intr: Rc<IdentInterner>,
+                                       cdata: Cmd,
+                                       get_crate_data: GetCrateDataCb,
+                                       callback: F) where
+    F: FnMut(DefLike, ast::Name, ast::Visibility),
+{
     let root_doc = rbml::Doc::new(cdata.data());
     let misc_info_doc = reader::get_doc(root_doc, tag_misc_info);
     let crate_items_doc = reader::get_doc(misc_info_doc,
@@ -683,14 +702,22 @@ pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::Nod
         let ctor_ty = item_type(ast::DefId { krate: cdata.cnum, node: id},
                                 item, tcx, cdata);
         let name = item_name(&*intr, item);
-        let (ctor_ty, arg_tys) = match ctor_ty.sty {
+        let (ctor_ty, arg_tys, arg_names) = match ctor_ty.sty {
             ty::ty_bare_fn(ref f) =>
-                (Some(ctor_ty), f.sig.inputs.clone()),
-            _ => // Nullary or struct enum variant.
-                (None, get_struct_fields(intr.clone(), cdata, did.node)
+                (Some(ctor_ty), f.sig.inputs.clone(), None),
+            _ => { // Nullary or struct enum variant.
+                let mut arg_names = Vec::new();
+                let arg_tys = get_struct_fields(intr.clone(), cdata, did.node)
                     .iter()
-                    .map(|field_ty| get_type(cdata, field_ty.id.node, tcx).ty)
-                    .collect())
+                    .map(|field_ty| {
+                        arg_names.push(ast::Ident::new(field_ty.name));
+                        get_type(cdata, field_ty.id.node, tcx).ty
+                    })
+                    .collect();
+                let arg_names = if arg_names.len() == 0 { None } else { Some(arg_names) };
+
+                (None, arg_tys, arg_names)
+            }
         };
         match variant_disr_val(item) {
             Some(val) => { disr_val = val; }
@@ -700,7 +727,7 @@ pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::Nod
         disr_val += 1;
         Rc::new(ty::VariantInfo {
             args: arg_tys,
-            arg_names: None,
+            arg_names: arg_names,
             ctor_ty: ctor_ty,
             name: name,
             // I'm not even sure if we encode visibility
@@ -971,9 +998,11 @@ pub fn get_tuple_struct_definition_if_ctor(cdata: Cmd,
     ret
 }
 
-pub fn get_item_attrs(cdata: Cmd,
-                      orig_node_id: ast::NodeId,
-                      f: |Vec<ast::Attribute>|) {
+pub fn get_item_attrs<F>(cdata: Cmd,
+                         orig_node_id: ast::NodeId,
+                         f: F) where
+    F: FnOnce(Vec<ast::Attribute>),
+{
     // The attributes for a tuple struct are attached to the definition, not the ctor;
     // we assume that someone passing in a tuple struct ctor is actually wanting to
     // look at the definition
@@ -1213,7 +1242,9 @@ pub fn translate_def_id(cdata: Cmd, did: ast::DefId) -> ast::DefId {
     }
 }
 
-pub fn each_impl(cdata: Cmd, callback: |ast::DefId|) {
+pub fn each_impl<F>(cdata: Cmd, mut callback: F) where
+    F: FnMut(ast::DefId),
+{
     let impls_doc = reader::get_doc(rbml::Doc::new(cdata.data()), tag_impls);
     let _ = reader::tagged_docs(impls_doc, tag_impls_impl, |impl_doc| {
         callback(item_def_id(impl_doc, cdata));
@@ -1221,9 +1252,11 @@ pub fn each_impl(cdata: Cmd, callback: |ast::DefId|) {
     });
 }
 
-pub fn each_implementation_for_type(cdata: Cmd,
+pub fn each_implementation_for_type<F>(cdata: Cmd,
                                     id: ast::NodeId,
-                                    callback: |ast::DefId|) {
+                                    mut callback: F) where
+    F: FnMut(ast::DefId),
+{
     let item_doc = lookup_item(id, cdata.data());
     reader::tagged_docs(item_doc,
                         tag_items_data_item_inherent_impl,
@@ -1234,9 +1267,11 @@ pub fn each_implementation_for_type(cdata: Cmd,
     });
 }
 
-pub fn each_implementation_for_trait(cdata: Cmd,
-                                     id: ast::NodeId,
-                                     callback: |ast::DefId|) {
+pub fn each_implementation_for_trait<F>(cdata: Cmd,
+                                        id: ast::NodeId,
+                                        mut callback: F) where
+    F: FnMut(ast::DefId),
+{
     let item_doc = lookup_item(id, cdata.data());
 
     let _ = reader::tagged_docs(item_doc,
@@ -1429,7 +1464,20 @@ fn doc_generics<'tcx>(base_doc: rbml::Doc,
         true
     });
 
-    ty::Generics { types: types, regions: regions }
+    let mut predicates = subst::VecPerParamSpace::empty();
+    reader::tagged_docs(doc, tag_predicate, |predicate_doc| {
+        let space_doc = reader::get_doc(predicate_doc, tag_predicate_space);
+        let space = subst::ParamSpace::from_uint(reader::doc_as_u8(space_doc) as uint);
+
+        let data_doc = reader::get_doc(predicate_doc, tag_predicate_data);
+        let data = parse_predicate_data(data_doc.data, data_doc.start, cdata.cnum, tcx,
+                                        |_, did| translate_def_id(cdata, did));
+
+        predicates.push(space, data);
+        true
+    });
+
+    ty::Generics { types: types, regions: regions, predicates: predicates }
 }
 
 pub fn is_associated_type(cdata: Cmd, id: ast::NodeId) -> bool {
index a3f56f7f655f5ee31d787254bc5916ab617c95a5..a1f04b7412b32d660a98781f674ddd4c409d24c0 100644 (file)
@@ -493,7 +493,9 @@ fn encode_reexported_static_methods(ecx: &EncodeContext,
 /// top-level items that are sub-items of the given item. Specifically:
 ///
 /// * For newtype structs, iterates through the node ID of the constructor.
-fn each_auxiliary_node_id(item: &ast::Item, callback: |NodeId| -> bool) -> bool {
+fn each_auxiliary_node_id<F>(item: &ast::Item, callback: F) -> bool where
+    F: FnOnce(NodeId) -> bool,
+{
     let mut continue_ = true;
     match item.node {
         ast::ItemStruct(ref struct_def, _) => {
@@ -803,6 +805,18 @@ fn encode_generics<'a, 'tcx>(rbml_w: &mut Encoder,
         rbml_w.end_tag();
     }
 
+    for (space, _, predicate) in generics.predicates.iter_enumerated() {
+        rbml_w.start_tag(tag_predicate);
+
+        rbml_w.wr_tagged_u8(tag_predicate_space, space as u8);
+
+        rbml_w.start_tag(tag_predicate_data);
+        tyencode::enc_predicate(rbml_w.writer, ty_str_ctxt, predicate);
+        rbml_w.end_tag();
+
+        rbml_w.end_tag();
+    }
+
     rbml_w.end_tag();
 }
 
@@ -1191,7 +1205,7 @@ fn add_to_index(item: &ast::Item, rbml_w: &Encoder,
             None => {}
         }
       }
-      ast::ItemImpl(_, ref opt_trait, ref ty, ref ast_items) => {
+      ast::ItemImpl(unsafety, _, ref opt_trait, ref ty, ref ast_items) => {
         // We need to encode information about the default methods we
         // have inherited, so we drive this based on the impl structure.
         let impl_items = tcx.impl_items.borrow();
@@ -1204,6 +1218,7 @@ fn add_to_index(item: &ast::Item, rbml_w: &Encoder,
         encode_bounds_and_type(rbml_w, ecx, &lookup_item_type(tcx, def_id));
         encode_name(rbml_w, item.ident.name);
         encode_attributes(rbml_w, item.attrs.as_slice());
+        encode_unsafety(rbml_w, unsafety);
         match ty.node {
             ast::TyPath(ref path, _) if path.segments
                                                         .len() == 1 => {
@@ -1294,13 +1309,14 @@ fn add_to_index(item: &ast::Item, rbml_w: &Encoder,
             }
         }
       }
-      ast::ItemTrait(_, _, _, ref ms) => {
+      ast::ItemTrait(_, _, _, _, ref ms) => {
         add_to_index(item, rbml_w, index);
         rbml_w.start_tag(tag_items_data_item);
         encode_def_id(rbml_w, def_id);
         encode_family(rbml_w, 'I');
         encode_item_variances(rbml_w, ecx, item.id);
         let trait_def = ty::lookup_trait_def(tcx, def_id);
+        encode_unsafety(rbml_w, trait_def.unsafety);
         encode_generics(rbml_w, ecx, &trait_def.generics, tag_item_generics);
         encode_trait_ref(rbml_w, ecx, &*trait_def.trait_ref, tag_item_trait_ref);
         encode_name(rbml_w, item.ident.name);
@@ -1567,8 +1583,10 @@ fn encode_info_for_items(ecx: &EncodeContext,
 
 // Path and definition ID indexing
 
-fn encode_index<T: Hash>(rbml_w: &mut Encoder, index: Vec<entry<T>>,
-                         write_fn: |&mut SeekableMemWriter, &T|) {
+fn encode_index<T, F>(rbml_w: &mut Encoder, index: Vec<entry<T>>, mut write_fn: F) where
+    F: FnMut(&mut SeekableMemWriter, &T),
+    T: Hash,
+{
     let mut buckets: Vec<Vec<entry<T>>> = Vec::from_fn(256, |_| Vec::new());
     for elt in index.into_iter() {
         let h = hash::hash(&elt.val) as uint;
@@ -1658,6 +1676,14 @@ fn encode_attributes(rbml_w: &mut Encoder, attrs: &[ast::Attribute]) {
     rbml_w.end_tag();
 }
 
+fn encode_unsafety(rbml_w: &mut Encoder, unsafety: ast::Unsafety) {
+    let byte: u8 = match unsafety {
+        ast::Unsafety::Normal => 0,
+        ast::Unsafety::Unsafe => 1,
+    };
+    rbml_w.wr_tagged_u8(tag_unsafety, byte);
+}
+
 fn encode_crate_deps(rbml_w: &mut Encoder, cstore: &cstore::CStore) {
     fn get_ordered_deps(cstore: &cstore::CStore) -> Vec<decoder::CrateDep> {
         // Pull the cnums and name,vers,hash out of cstore
@@ -1839,7 +1865,7 @@ struct ImplVisitor<'a, 'b:'a, 'c:'a, 'tcx:'b> {
 
 impl<'a, 'b, 'c, 'tcx, 'v> Visitor<'v> for ImplVisitor<'a, 'b, 'c, 'tcx> {
     fn visit_item(&mut self, item: &ast::Item) {
-        if let ast::ItemImpl(_, Some(ref trait_ref), _, _) = item.node {
+        if let ast::ItemImpl(_, _, Some(ref trait_ref), _, _) = item.node {
             let def_map = &self.ecx.tcx.def_map;
             let trait_def = def_map.borrow()[trait_ref.ref_id].clone();
             let def_id = trait_def.def_id();
index 2d23a61813a9c2a4d9223cf5cb468967c475218a..507fb751303f9fcff5161db02295d18b1f66e604 100644 (file)
@@ -42,7 +42,9 @@ pub struct FileSearch<'a> {
 }
 
 impl<'a> FileSearch<'a> {
-    pub fn for_each_lib_search_path(&self, f: |&Path| -> FileMatch) {
+    pub fn for_each_lib_search_path<F>(&self, mut f: F) where
+        F: FnMut(&Path) -> FileMatch,
+    {
         let mut visited_dirs = HashSet::new();
         let mut found = false;
 
index 77c0a8abe6466cdfb50485c55ead831e916ba313..e83f69b1e318ee5725281202557319ceaebfc930 100644 (file)
 //!
 //! The compiler accepts a flag of this form a number of times:
 //!
-//! ```ignore
+//! ```text
 //! --extern crate-name=path/to/the/crate.rlib
 //! ```
 //!
 //!
 //! and the compiler would be invoked as:
 //!
-//! ```ignore
+//! ```text
 //! rustc a.rs --extern b1=path/to/libb1.rlib --extern b2=path/to/libb2.rlib
 //! ```
 //!
 //! dependencies, not the upstream transitive dependencies. Consider this
 //! dependency graph:
 //!
-//! ```ignore
+//! ```text
 //! A.1   A.2
 //! |     |
 //! |     |
@@ -364,7 +364,7 @@ fn find_library_crate(&mut self) -> Option<Library> {
         let dypair = self.dylibname();
 
         // want: crate_name.dir_part() + prefix + crate_name.file_part + "-"
-        let dylib_prefix = format!("{}{}", dypair.ref0(), self.crate_name);
+        let dylib_prefix = format!("{}{}", dypair.0, self.crate_name);
         let rlib_prefix = format!("lib{}", self.crate_name);
 
         let mut candidates = HashMap::new();
@@ -392,8 +392,8 @@ fn find_library_crate(&mut self) -> Option<Library> {
                 (file.slice(rlib_prefix.len(), file.len() - ".rlib".len()),
                  true)
             } else if file.starts_with(dylib_prefix.as_slice()) &&
-                      file.ends_with(dypair.ref1().as_slice()) {
-                (file.slice(dylib_prefix.len(), file.len() - dypair.ref1().len()),
+                      file.ends_with(dypair.1.as_slice()) {
+                (file.slice(dylib_prefix.len(), file.len() - dypair.1.len()),
                  false)
             } else {
                 return FileDoesntMatch
index e29741fb4a1298d18df59ab82135958aabc6d983..d649c6491314c2e5b4a0ad7123aef8bf396b48a9 100644 (file)
@@ -89,7 +89,10 @@ fn next_byte(st: &mut PState) -> u8 {
     return b;
 }
 
-fn scan<R>(st: &mut PState, is_last: |char| -> bool, op: |&[u8]| -> R) -> R {
+fn scan<R, F, G>(st: &mut PState, mut is_last: F, op: G) -> R where
+    F: FnMut(char) -> bool,
+    G: FnOnce(&[u8]) -> R,
+{
     let start_pos = st.pos;
     debug!("scan: '{}' (start)", st.data[st.pos] as char);
     while !is_last(st.data[st.pos] as char) {
@@ -110,7 +113,9 @@ pub fn parse_name(st: &mut PState, last: char) -> ast::Name {
     parse_name_(st, |a| is_last(last, a) )
 }
 
-fn parse_name_(st: &mut PState, is_last: |char| -> bool) -> ast::Name {
+fn parse_name_<F>(st: &mut PState, is_last: F) -> ast::Name where
+    F: FnMut(char) -> bool,
+{
     scan(st, is_last, |bytes| {
         token::intern(str::from_utf8(bytes).unwrap())
     })
@@ -234,9 +239,10 @@ fn parse_trait_store(st: &mut PState, conv: conv_did) -> ty::TraitStore {
     }
 }
 
-fn parse_vec_per_param_space<'a, 'tcx, T>(st: &mut PState<'a, 'tcx>,
-                                          f: |&mut PState<'a, 'tcx>| -> T)
-                                          -> VecPerParamSpace<T>
+fn parse_vec_per_param_space<'a, 'tcx, T, F>(st: &mut PState<'a, 'tcx>,
+                                             mut f: F)
+                                             -> VecPerParamSpace<T> where
+    F: FnMut(&mut PState<'a, 'tcx>) -> T,
 {
     let mut r = VecPerParamSpace::empty();
     for &space in subst::ParamSpace::all().iter() {
@@ -350,8 +356,9 @@ fn parse_scope(st: &mut PState) -> region::CodeExtent {
     }
 }
 
-fn parse_opt<'a, 'tcx, T>(st: &mut PState<'a, 'tcx>, f: |&mut PState<'a, 'tcx>| -> T)
-                          -> Option<T> {
+fn parse_opt<'a, 'tcx, T, F>(st: &mut PState<'a, 'tcx>, f: F) -> Option<T> where
+    F: FnOnce(&mut PState<'a, 'tcx>) -> T,
+{
     match next(st) {
       'n' => None,
       's' => Some(f(st)),
@@ -470,7 +477,7 @@ fn parse_ty<'a, 'tcx>(st: &mut PState<'a, 'tcx>, conv: conv_did) -> Ty<'tcx> {
         st.tcx.rcache.borrow_mut().insert(key, tt);
         return tt;
       }
-      '"' => {
+      '\"' => {
         let _ = parse_def(st, TypeWithId, |x,y| conv(x,y));
         let inner = parse_ty(st, |x,y| conv(x,y));
         inner
@@ -542,11 +549,11 @@ fn parse_hex(st: &mut PState) -> uint {
     };
 }
 
-fn parse_fn_style(c: char) -> ast::FnStyle {
+fn parse_unsafety(c: char) -> ast::Unsafety {
     match c {
-        'u' => ast::UnsafeFn,
-        'n' => ast::NormalFn,
-        _ => panic!("parse_fn_style: bad fn_style {}", c)
+        'u' => ast::Unsafety::Unsafe,
+        'n' => ast::Unsafety::Normal,
+        _ => panic!("parse_unsafety: bad unsafety {}", c)
     }
 }
 
@@ -568,14 +575,14 @@ fn parse_onceness(c: char) -> ast::Onceness {
 
 fn parse_closure_ty<'a, 'tcx>(st: &mut PState<'a, 'tcx>,
                               conv: conv_did) -> ty::ClosureTy<'tcx> {
-    let fn_style = parse_fn_style(next(st));
+    let unsafety = parse_unsafety(next(st));
     let onceness = parse_onceness(next(st));
     let store = parse_trait_store(st, |x,y| conv(x,y));
     let bounds = parse_existential_bounds(st, |x,y| conv(x,y));
     let sig = parse_sig(st, |x,y| conv(x,y));
     let abi = parse_abi_set(st);
     ty::ClosureTy {
-        fn_style: fn_style,
+        unsafety: unsafety,
         onceness: onceness,
         store: store,
         bounds: bounds,
@@ -586,11 +593,11 @@ fn parse_closure_ty<'a, 'tcx>(st: &mut PState<'a, 'tcx>,
 
 fn parse_bare_fn_ty<'a, 'tcx>(st: &mut PState<'a, 'tcx>,
                               conv: conv_did) -> ty::BareFnTy<'tcx> {
-    let fn_style = parse_fn_style(next(st));
+    let unsafety = parse_unsafety(next(st));
     let abi = parse_abi_set(st);
     let sig = parse_sig(st, |x,y| conv(x,y));
     ty::BareFnTy {
-        fn_style: fn_style,
+        unsafety: unsafety,
         abi: abi,
         sig: sig
     }
@@ -646,6 +653,33 @@ pub fn parse_def_id(buf: &[u8]) -> ast::DefId {
     ast::DefId { krate: crate_num, node: def_num }
 }
 
+pub fn parse_predicate_data<'tcx>(data: &[u8],
+                                  start: uint,
+                                  crate_num: ast::CrateNum,
+                                  tcx: &ty::ctxt<'tcx>,
+                                  conv: conv_did)
+                                  -> ty::Predicate<'tcx>
+{
+    let mut st = parse_state_from_data(data, crate_num, start, tcx);
+    parse_predicate(&mut st, conv)
+}
+
+pub fn parse_predicate<'a,'tcx>(st: &mut PState<'a, 'tcx>,
+                                conv: conv_did)
+                                -> ty::Predicate<'tcx>
+{
+    match next(st) {
+        't' => ty::Predicate::Trait(Rc::new(parse_trait_ref(st, conv))),
+        'e' => ty::Predicate::Equate(parse_ty(st, |x,y| conv(x,y)),
+                                     parse_ty(st, |x,y| conv(x,y))),
+        'r' => ty::Predicate::RegionOutlives(parse_region(st, |x,y| conv(x,y)),
+                                             parse_region(st, |x,y| conv(x,y))),
+        'o' => ty::Predicate::TypeOutlives(parse_ty(st, |x,y| conv(x,y)),
+                                           parse_region(st, |x,y| conv(x,y))),
+        c => panic!("Encountered invalid character in metadata: {}", c)
+    }
+}
+
 pub fn parse_type_param_def_data<'tcx>(data: &[u8], start: uint,
                                        crate_num: ast::CrateNum, tcx: &ty::ctxt<'tcx>,
                                        conv: conv_did) -> ty::TypeParameterDef<'tcx>
index bbb2faaae0691619eb283587f7771df97e735c42..9b9d2ab42df2b8976c8688609d17d7c84329f976 100644 (file)
@@ -86,7 +86,9 @@ fn enc_mt<'a, 'tcx>(w: &mut SeekableMemWriter, cx: &ctxt<'a, 'tcx>,
     enc_ty(w, cx, mt.ty);
 }
 
-fn enc_opt<T>(w: &mut SeekableMemWriter, t: Option<T>, enc_f: |&mut SeekableMemWriter, T|) {
+fn enc_opt<T, F>(w: &mut SeekableMemWriter, t: Option<T>, enc_f: F) where
+    F: FnOnce(&mut SeekableMemWriter, T),
+{
     match t {
         None => mywrite!(w, "n"),
         Some(v) => {
@@ -96,10 +98,12 @@ fn enc_opt<T>(w: &mut SeekableMemWriter, t: Option<T>, enc_f: |&mut SeekableMemW
     }
 }
 
-fn enc_vec_per_param_space<'a, 'tcx, T>(w: &mut SeekableMemWriter,
-                                        cx: &ctxt<'a, 'tcx>,
-                                        v: &VecPerParamSpace<T>,
-                                        op: |&mut SeekableMemWriter, &ctxt<'a, 'tcx>, &T|) {
+fn enc_vec_per_param_space<'a, 'tcx, T, F>(w: &mut SeekableMemWriter,
+                                           cx: &ctxt<'a, 'tcx>,
+                                           v: &VecPerParamSpace<T>,
+                                           mut op: F) where
+    F: FnMut(&mut SeekableMemWriter, &ctxt<'a, 'tcx>, &T),
+{
     for &space in subst::ParamSpace::all().iter() {
         mywrite!(w, "[");
         for t in v.get_slice(space).iter() {
@@ -309,10 +313,10 @@ fn enc_sty<'a, 'tcx>(w: &mut SeekableMemWriter, cx: &ctxt<'a, 'tcx>,
     }
 }
 
-fn enc_fn_style(w: &mut SeekableMemWriter, p: ast::FnStyle) {
+fn enc_unsafety(w: &mut SeekableMemWriter, p: ast::Unsafety) {
     match p {
-        ast::NormalFn => mywrite!(w, "n"),
-        ast::UnsafeFn => mywrite!(w, "u"),
+        ast::Unsafety::Normal => mywrite!(w, "n"),
+        ast::Unsafety::Unsafe => mywrite!(w, "u"),
     }
 }
 
@@ -331,14 +335,14 @@ fn enc_onceness(w: &mut SeekableMemWriter, o: ast::Onceness) {
 
 pub fn enc_bare_fn_ty<'a, 'tcx>(w: &mut SeekableMemWriter, cx: &ctxt<'a, 'tcx>,
                                 ft: &ty::BareFnTy<'tcx>) {
-    enc_fn_style(w, ft.fn_style);
+    enc_unsafety(w, ft.unsafety);
     enc_abi(w, ft.abi);
     enc_fn_sig(w, cx, &ft.sig);
 }
 
 pub fn enc_closure_ty<'a, 'tcx>(w: &mut SeekableMemWriter, cx: &ctxt<'a, 'tcx>,
                                 ft: &ty::ClosureTy<'tcx>) {
-    enc_fn_style(w, ft.fn_style);
+    enc_unsafety(w, ft.unsafety);
     enc_onceness(w, ft.onceness);
     enc_trait_store(w, cx, ft.store);
     enc_existential_bounds(w, cx, &ft.bounds);
@@ -413,3 +417,30 @@ pub fn enc_type_param_def<'a, 'tcx>(w: &mut SeekableMemWriter, cx: &ctxt<'a, 'tc
     enc_bounds(w, cx, &v.bounds);
     enc_opt(w, v.default, |w, t| enc_ty(w, cx, t));
 }
+
+pub fn enc_predicate<'a, 'tcx>(w: &mut SeekableMemWriter,
+                               cx: &ctxt<'a, 'tcx>,
+                               p: &ty::Predicate<'tcx>)
+{
+    match *p {
+        ty::Predicate::Trait(ref trait_ref) => {
+            mywrite!(w, "t");
+            enc_trait_ref(w, cx, &**trait_ref);
+        }
+        ty::Predicate::Equate(a, b) => {
+            mywrite!(w, "e");
+            enc_ty(w, cx, a);
+            enc_ty(w, cx, b);
+        }
+        ty::Predicate::RegionOutlives(a, b) => {
+            mywrite!(w, "r");
+            enc_region(w, cx, a);
+            enc_region(w, cx, b);
+        }
+        ty::Predicate::TypeOutlives(a, b) => {
+            mywrite!(w, "o");
+            enc_ty(w, cx, a);
+            enc_region(w, cx, b);
+        }
+    }
+}
index 113d127503f023df929e793c24613a0b74ec2e60..26d70502a5b1677cb01b3970f850d70b849f3de8 100644 (file)
@@ -680,9 +680,8 @@ pub fn encode_unboxed_closure_kind(ebml_w: &mut Encoder,
 }
 
 pub trait vtable_decoder_helpers<'tcx> {
-    fn read_vec_per_param_space<T>(&mut self,
-                                   f: |&mut Self| -> T)
-                                   -> VecPerParamSpace<T>;
+    fn read_vec_per_param_space<T, F>(&mut self, f: F) -> VecPerParamSpace<T> where
+        F: FnMut(&mut Self) -> T;
     fn read_vtable_res_with_key(&mut self,
                                 tcx: &ty::ctxt<'tcx>,
                                 cdata: &cstore::crate_metadata)
@@ -699,9 +698,8 @@ fn read_vtable_origin(&mut self,
 }
 
 impl<'tcx, 'a> vtable_decoder_helpers<'tcx> for reader::Decoder<'a> {
-    fn read_vec_per_param_space<T>(&mut self,
-                                   f: |&mut reader::Decoder<'a>| -> T)
-                                   -> VecPerParamSpace<T>
+    fn read_vec_per_param_space<T, F>(&mut self, mut f: F) -> VecPerParamSpace<T> where
+        F: FnMut(&mut reader::Decoder<'a>) -> T,
     {
         let types = self.read_to_vec(|this| Ok(f(this))).unwrap();
         let selfs = self.read_to_vec(|this| Ok(f(this))).unwrap();
@@ -793,9 +791,11 @@ fn read_vtable_origin(&mut self,
 // ___________________________________________________________________________
 //
 
-fn encode_vec_per_param_space<T>(rbml_w: &mut Encoder,
-                                 v: &subst::VecPerParamSpace<T>,
-                                 f: |&mut Encoder, &T|) {
+fn encode_vec_per_param_space<T, F>(rbml_w: &mut Encoder,
+                                    v: &subst::VecPerParamSpace<T>,
+                                    mut f: F) where
+    F: FnMut(&mut Encoder, &T),
+{
     for &space in subst::ParamSpace::all().iter() {
         rbml_w.emit_from_vec(v.get_slice(space),
                              |rbml_w, n| Ok(f(rbml_w, n))).unwrap();
@@ -830,6 +830,8 @@ fn emit_method_origin<'a>(&mut self,
     fn emit_tys<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>, tys: &[Ty<'tcx>]);
     fn emit_type_param_def<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
                                type_param_def: &ty::TypeParameterDef<'tcx>);
+    fn emit_predicate<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
+                          predicate: &ty::Predicate<'tcx>);
     fn emit_trait_ref<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
                           ty: &ty::TraitRef<'tcx>);
     fn emit_polytype<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
@@ -936,6 +938,15 @@ fn emit_type_param_def<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
         });
     }
 
+    fn emit_predicate<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
+                          predicate: &ty::Predicate<'tcx>) {
+        self.emit_opaque(|this| {
+            Ok(tyencode::enc_predicate(this.writer,
+                                       &ecx.ty_str_ctxt(),
+                                       predicate))
+        });
+    }
+
     fn emit_polytype<'a>(&mut self,
                          ecx: &e::EncodeContext<'a, 'tcx>,
                          pty: ty::Polytype<'tcx>) {
@@ -953,6 +964,11 @@ fn emit_polytype<'a>(&mut self,
                         Ok(encode_vec_per_param_space(
                             this, &pty.generics.regions,
                             |this, def| def.encode(this).unwrap()))
+                    });
+                    this.emit_struct_field("predicates", 2, |this| {
+                        Ok(encode_vec_per_param_space(
+                            this, &pty.generics.predicates,
+                            |this, def| this.emit_predicate(ecx, def)))
                     })
                 })
             });
@@ -1108,14 +1124,16 @@ fn emit_unsize_kind<'a>(&mut self, ecx: &e::EncodeContext<'a, 'tcx>,
 }
 
 trait write_tag_and_id {
-    fn tag(&mut self, tag_id: c::astencode_tag, f: |&mut Self|);
+    fn tag<F>(&mut self, tag_id: c::astencode_tag, f: F) where F: FnOnce(&mut Self);
     fn id(&mut self, id: ast::NodeId);
 }
 
 impl<'a> write_tag_and_id for Encoder<'a> {
-    fn tag(&mut self,
-           tag_id: c::astencode_tag,
-           f: |&mut Encoder<'a>|) {
+    fn tag<F>(&mut self,
+              tag_id: c::astencode_tag,
+              f: F) where
+        F: FnOnce(&mut Encoder<'a>),
+    {
         self.start_tag(tag_id as uint);
         f(self);
         self.end_tag();
@@ -1336,6 +1354,8 @@ fn read_trait_ref<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
                               -> Rc<ty::TraitRef<'tcx>>;
     fn read_type_param_def<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
                                    -> ty::TypeParameterDef<'tcx>;
+    fn read_predicate<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
+                              -> ty::Predicate<'tcx>;
     fn read_polytype<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
                              -> ty::Polytype<'tcx>;
     fn read_existential_bounds<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
@@ -1536,6 +1556,15 @@ fn read_type_param_def<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
         }).unwrap()
     }
 
+    fn read_predicate<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
+                              -> ty::Predicate<'tcx>
+    {
+        self.read_opaque(|this, doc| {
+            Ok(tydecode::parse_predicate_data(doc.data, doc.start, dcx.cdata.cnum, dcx.tcx,
+                                              |s, a| this.convert_def_id(dcx, s, a)))
+        }).unwrap()
+    }
+
     fn read_polytype<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
                              -> ty::Polytype<'tcx> {
         self.read_struct("Polytype", 2, |this| {
@@ -1553,7 +1582,13 @@ fn read_polytype<'a, 'b>(&mut self, dcx: &DecodeContext<'a, 'b, 'tcx>)
                             this.read_struct_field("regions", 1, |this| {
                                 Ok(this.read_vec_per_param_space(
                                     |this| Decodable::decode(this).unwrap()))
-                            }).unwrap()
+                            }).unwrap(),
+
+                            predicates:
+                            this.read_struct_field("predicates", 2, |this| {
+                                Ok(this.read_vec_per_param_space(
+                                    |this| this.read_predicate(dcx)))
+                            }).unwrap(),
                         })
                     })
                 }).unwrap(),
diff --git a/src/librustc/middle/borrowck/check_loans.rs b/src/librustc/middle/borrowck/check_loans.rs
deleted file mode 100644 (file)
index 5f03032..0000000
+++ /dev/null
@@ -1,969 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ----------------------------------------------------------------------
-// Checking loans
-//
-// Phase 2 of check: we walk down the tree and check that:
-// 1. assignments are always made to mutable locations;
-// 2. loans made in overlapping scopes do not conflict
-// 3. assignments do not affect things loaned out as immutable
-// 4. moves do not affect things loaned out in any way
-use self::UseError::*;
-
-use middle::borrowck::*;
-use middle::borrowck::LoanPathElem::*;
-use middle::borrowck::LoanPathKind::*;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::region;
-use middle::ty::ParameterEnvironment;
-use middle::ty;
-use syntax::ast::NodeId;
-use syntax::ast;
-use syntax::codemap::Span;
-use util::ppaux::Repr;
-
-use std::rc::Rc;
-
-// FIXME (#16118): These functions are intended to allow the borrow checker to
-// be less precise in its handling of Box while still allowing moves out of a
-// Box. They should be removed when OwnedPtr is removed from LoanPath.
-
-fn owned_ptr_base_path<'a, 'tcx>(loan_path: &'a LoanPath<'tcx>) -> &'a LoanPath<'tcx> {
-    //! Returns the base of the leftmost dereference of an OwnedPtr in
-    //! `loan_path`. If there is no dereference of an OwnedPtr in `loan_path`,
-    //! then it just returns `loan_path` itself.
-
-    return match helper(loan_path) {
-        Some(new_loan_path) => new_loan_path,
-        None => loan_path.clone()
-    };
-
-    fn helper<'a, 'tcx>(loan_path: &'a LoanPath<'tcx>) -> Option<&'a LoanPath<'tcx>> {
-        match loan_path.kind {
-            LpVar(_) | LpUpvar(_) => None,
-            LpExtend(ref lp_base, _, LpDeref(mc::OwnedPtr)) => {
-                match helper(&**lp_base) {
-                    v @ Some(_) => v,
-                    None => Some(&**lp_base)
-                }
-            }
-            LpDowncast(ref lp_base, _) |
-            LpExtend(ref lp_base, _, _) => helper(&**lp_base)
-        }
-    }
-}
-
-fn owned_ptr_base_path_rc<'tcx>(loan_path: &Rc<LoanPath<'tcx>>) -> Rc<LoanPath<'tcx>> {
-    //! The equivalent of `owned_ptr_base_path` for an &Rc<LoanPath> rather than
-    //! a &LoanPath.
-
-    return match helper(loan_path) {
-        Some(new_loan_path) => new_loan_path,
-        None => loan_path.clone()
-    };
-
-    fn helper<'tcx>(loan_path: &Rc<LoanPath<'tcx>>) -> Option<Rc<LoanPath<'tcx>>> {
-        match loan_path.kind {
-            LpVar(_) | LpUpvar(_) => None,
-            LpExtend(ref lp_base, _, LpDeref(mc::OwnedPtr)) => {
-                match helper(lp_base) {
-                    v @ Some(_) => v,
-                    None => Some(lp_base.clone())
-                }
-            }
-            LpDowncast(ref lp_base, _) |
-            LpExtend(ref lp_base, _, _) => helper(lp_base)
-        }
-    }
-}
-
-struct CheckLoanCtxt<'a, 'tcx: 'a> {
-    bccx: &'a BorrowckCtxt<'a, 'tcx>,
-    dfcx_loans: &'a LoanDataFlow<'a, 'tcx>,
-    move_data: move_data::FlowedMoveData<'a, 'tcx>,
-    all_loans: &'a [Loan<'tcx>],
-    param_env: &'a ParameterEnvironment<'tcx>,
-}
-
-impl<'a, 'tcx> euv::Delegate<'tcx> for CheckLoanCtxt<'a, 'tcx> {
-    fn consume(&mut self,
-               consume_id: ast::NodeId,
-               consume_span: Span,
-               cmt: mc::cmt<'tcx>,
-               mode: euv::ConsumeMode) {
-        debug!("consume(consume_id={}, cmt={}, mode={})",
-               consume_id, cmt.repr(self.tcx()), mode);
-
-        self.consume_common(consume_id, consume_span, cmt, mode);
-    }
-
-    fn matched_pat(&mut self,
-                   _matched_pat: &ast::Pat,
-                   _cmt: mc::cmt,
-                   _mode: euv::MatchMode) { }
-
-    fn consume_pat(&mut self,
-                   consume_pat: &ast::Pat,
-                   cmt: mc::cmt<'tcx>,
-                   mode: euv::ConsumeMode) {
-        debug!("consume_pat(consume_pat={}, cmt={}, mode={})",
-               consume_pat.repr(self.tcx()),
-               cmt.repr(self.tcx()),
-               mode);
-
-        self.consume_common(consume_pat.id, consume_pat.span, cmt, mode);
-    }
-
-    fn borrow(&mut self,
-              borrow_id: ast::NodeId,
-              borrow_span: Span,
-              cmt: mc::cmt<'tcx>,
-              loan_region: ty::Region,
-              bk: ty::BorrowKind,
-              loan_cause: euv::LoanCause)
-    {
-        debug!("borrow(borrow_id={}, cmt={}, loan_region={}, \
-               bk={}, loan_cause={})",
-               borrow_id, cmt.repr(self.tcx()), loan_region,
-               bk, loan_cause);
-
-        match opt_loan_path(&cmt) {
-            Some(lp) => {
-                let moved_value_use_kind = match loan_cause {
-                    euv::ClosureCapture(_) => MovedInCapture,
-                    _ => MovedInUse,
-                };
-                self.check_if_path_is_moved(borrow_id, borrow_span, moved_value_use_kind, &lp);
-            }
-            None => { }
-        }
-
-        self.check_for_conflicting_loans(region::CodeExtent::from_node_id(borrow_id));
-    }
-
-    fn mutate(&mut self,
-              assignment_id: ast::NodeId,
-              assignment_span: Span,
-              assignee_cmt: mc::cmt<'tcx>,
-              mode: euv::MutateMode)
-    {
-        debug!("mutate(assignment_id={}, assignee_cmt={})",
-               assignment_id, assignee_cmt.repr(self.tcx()));
-
-        match opt_loan_path(&assignee_cmt) {
-            Some(lp) => {
-                match mode {
-                    euv::Init | euv::JustWrite => {
-                        // In a case like `path = 1`, then path does not
-                        // have to be *FULLY* initialized, but we still
-                        // must be careful lest it contains derefs of
-                        // pointers.
-                        self.check_if_assigned_path_is_moved(assignee_cmt.id,
-                                                             assignment_span,
-                                                             MovedInUse,
-                                                             &lp);
-                    }
-                    euv::WriteAndRead => {
-                        // In a case like `path += 1`, then path must be
-                        // fully initialized, since we will read it before
-                        // we write it.
-                        self.check_if_path_is_moved(assignee_cmt.id,
-                                                    assignment_span,
-                                                    MovedInUse,
-                                                    &lp);
-                    }
-                }
-            }
-            None => { }
-        }
-
-        self.check_assignment(assignment_id, assignment_span, assignee_cmt, mode);
-    }
-
-    fn decl_without_init(&mut self, _id: ast::NodeId, _span: Span) { }
-}
-
-pub fn check_loans<'a, 'b, 'c, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                     dfcx_loans: &LoanDataFlow<'b, 'tcx>,
-                                     move_data: move_data::FlowedMoveData<'c, 'tcx>,
-                                     all_loans: &[Loan<'tcx>],
-                                     fn_id: NodeId,
-                                     decl: &ast::FnDecl,
-                                     body: &ast::Block) {
-    debug!("check_loans(body id={})", body.id);
-
-    let param_env = ParameterEnvironment::for_item(bccx.tcx, fn_id);
-
-    let mut clcx = CheckLoanCtxt {
-        bccx: bccx,
-        dfcx_loans: dfcx_loans,
-        move_data: move_data,
-        all_loans: all_loans,
-        param_env: &param_env,
-    };
-
-    {
-        let mut euv = euv::ExprUseVisitor::new(&mut clcx,
-                                               bccx.tcx,
-                                               param_env.clone());
-        euv.walk_fn(decl, body);
-    }
-}
-
-#[deriving(PartialEq)]
-enum UseError<'tcx> {
-    UseOk,
-    UseWhileBorrowed(/*loan*/Rc<LoanPath<'tcx>>, /*loan*/Span)
-}
-
-fn compatible_borrow_kinds(borrow_kind1: ty::BorrowKind,
-                           borrow_kind2: ty::BorrowKind)
-                           -> bool {
-    borrow_kind1 == ty::ImmBorrow && borrow_kind2 == ty::ImmBorrow
-}
-
-impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
-    pub fn tcx(&self) -> &'a ty::ctxt<'tcx> { self.bccx.tcx }
-
-    pub fn each_issued_loan(&self, scope: region::CodeExtent, op: |&Loan<'tcx>| -> bool)
-                            -> bool {
-        //! Iterates over each loan that has been issued
-        //! on entrance to `scope`, regardless of whether it is
-        //! actually *in scope* at that point.  Sometimes loans
-        //! are issued for future scopes and thus they may have been
-        //! *issued* but not yet be in effect.
-
-        self.dfcx_loans.each_bit_on_entry(scope.node_id(), |loan_index| {
-            let loan = &self.all_loans[loan_index];
-            op(loan)
-        })
-    }
-
-    pub fn each_in_scope_loan(&self,
-                              scope: region::CodeExtent,
-                              op: |&Loan<'tcx>| -> bool)
-                              -> bool {
-        //! Like `each_issued_loan()`, but only considers loans that are
-        //! currently in scope.
-
-        let tcx = self.tcx();
-        self.each_issued_loan(scope, |loan| {
-            if tcx.region_maps.is_subscope_of(scope, loan.kill_scope) {
-                op(loan)
-            } else {
-                true
-            }
-        })
-    }
-
-    fn each_in_scope_loan_affecting_path(&self,
-                                         scope: region::CodeExtent,
-                                         loan_path: &LoanPath<'tcx>,
-                                         op: |&Loan<'tcx>| -> bool)
-                                         -> bool {
-        //! Iterates through all of the in-scope loans affecting `loan_path`,
-        //! calling `op`, and ceasing iteration if `false` is returned.
-
-        // First, we check for a loan restricting the path P being used. This
-        // accounts for borrows of P but also borrows of subpaths, like P.a.b.
-        // Consider the following example:
-        //
-        //     let x = &mut a.b.c; // Restricts a, a.b, and a.b.c
-        //     let y = a;          // Conflicts with restriction
-
-        let loan_path = owned_ptr_base_path(loan_path);
-        let cont = self.each_in_scope_loan(scope, |loan| {
-            let mut ret = true;
-            for restr_path in loan.restricted_paths.iter() {
-                if **restr_path == *loan_path {
-                    if !op(loan) {
-                        ret = false;
-                        break;
-                    }
-                }
-            }
-            ret
-        });
-
-        if !cont {
-            return false;
-        }
-
-        // Next, we must check for *loans* (not restrictions) on the path P or
-        // any base path. This rejects examples like the following:
-        //
-        //     let x = &mut a.b;
-        //     let y = a.b.c;
-        //
-        // Limiting this search to *loans* and not *restrictions* means that
-        // examples like the following continue to work:
-        //
-        //     let x = &mut a.b;
-        //     let y = a.c;
-
-        let mut loan_path = loan_path;
-        loop {
-            match loan_path.kind {
-                LpVar(_) | LpUpvar(_) => {
-                    break;
-                }
-                LpDowncast(ref lp_base, _) |
-                LpExtend(ref lp_base, _, _) => {
-                    loan_path = &**lp_base;
-                }
-            }
-
-            let cont = self.each_in_scope_loan(scope, |loan| {
-                if *loan.loan_path == *loan_path {
-                    op(loan)
-                } else {
-                    true
-                }
-            });
-
-            if !cont {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    pub fn loans_generated_by(&self, scope: region::CodeExtent) -> Vec<uint> {
-        //! Returns a vector of the loans that are generated as
-        //! we enter `scope`.
-
-        let mut result = Vec::new();
-        self.dfcx_loans.each_gen_bit(scope.node_id(), |loan_index| {
-            result.push(loan_index);
-            true
-        });
-        return result;
-    }
-
-    pub fn check_for_conflicting_loans(&self, scope: region::CodeExtent) {
-        //! Checks to see whether any of the loans that are issued
-        //! on entrance to `scope` conflict with loans that have already been
-        //! issued when we enter `scope` (for example, we do not
-        //! permit two `&mut` borrows of the same variable).
-        //!
-        //! (Note that some loans can be *issued* without necessarily
-        //! taking effect yet.)
-
-        debug!("check_for_conflicting_loans(scope={})", scope);
-
-        let new_loan_indices = self.loans_generated_by(scope);
-        debug!("new_loan_indices = {}", new_loan_indices);
-
-        self.each_issued_loan(scope, |issued_loan| {
-            for &new_loan_index in new_loan_indices.iter() {
-                let new_loan = &self.all_loans[new_loan_index];
-                self.report_error_if_loans_conflict(issued_loan, new_loan);
-            }
-            true
-        });
-
-        for (i, &x) in new_loan_indices.iter().enumerate() {
-            let old_loan = &self.all_loans[x];
-            for &y in new_loan_indices.slice_from(i+1).iter() {
-                let new_loan = &self.all_loans[y];
-                self.report_error_if_loans_conflict(old_loan, new_loan);
-            }
-        }
-    }
-
-    pub fn report_error_if_loans_conflict(&self,
-                                          old_loan: &Loan<'tcx>,
-                                          new_loan: &Loan<'tcx>) {
-        //! Checks whether `old_loan` and `new_loan` can safely be issued
-        //! simultaneously.
-
-        debug!("report_error_if_loans_conflict(old_loan={}, new_loan={})",
-               old_loan.repr(self.tcx()),
-               new_loan.repr(self.tcx()));
-
-        // Should only be called for loans that are in scope at the same time.
-        assert!(self.tcx().region_maps.scopes_intersect(old_loan.kill_scope,
-                                                        new_loan.kill_scope));
-
-        self.report_error_if_loan_conflicts_with_restriction(
-            old_loan, new_loan, old_loan, new_loan) &&
-        self.report_error_if_loan_conflicts_with_restriction(
-            new_loan, old_loan, old_loan, new_loan);
-    }
-
-    pub fn report_error_if_loan_conflicts_with_restriction(&self,
-                                                           loan1: &Loan<'tcx>,
-                                                           loan2: &Loan<'tcx>,
-                                                           old_loan: &Loan<'tcx>,
-                                                           new_loan: &Loan<'tcx>)
-                                                           -> bool {
-        //! Checks whether the restrictions introduced by `loan1` would
-        //! prohibit `loan2`. Returns false if an error is reported.
-
-        debug!("report_error_if_loan_conflicts_with_restriction(\
-                loan1={}, loan2={})",
-               loan1.repr(self.tcx()),
-               loan2.repr(self.tcx()));
-
-        if compatible_borrow_kinds(loan1.kind, loan2.kind) {
-            return true;
-        }
-
-        let loan2_base_path = owned_ptr_base_path_rc(&loan2.loan_path);
-        for restr_path in loan1.restricted_paths.iter() {
-            if *restr_path != loan2_base_path { continue; }
-
-            // If new_loan is something like `x.a`, and old_loan is something like `x.b`, we would
-            // normally generate a rather confusing message (in this case, for multiple mutable
-            // borrows):
-            //
-            //     error: cannot borrow `x.b` as mutable more than once at a time
-            //     note: previous borrow of `x.a` occurs here; the mutable borrow prevents
-            //     subsequent moves, borrows, or modification of `x.a` until the borrow ends
-            //
-            // What we want to do instead is get the 'common ancestor' of the two borrow paths and
-            // use that for most of the message instead, giving is something like this:
-            //
-            //     error: cannot borrow `x` as mutable more than once at a time
-            //     note: previous borrow of `x` occurs here (through borrowing `x.a`); the mutable
-            //     borrow prevents subsequent moves, borrows, or modification of `x` until the
-            //     borrow ends
-
-            let common = new_loan.loan_path.common(&*old_loan.loan_path);
-            let (nl, ol, new_loan_msg, old_loan_msg) =
-                if new_loan.loan_path.has_fork(&*old_loan.loan_path) && common.is_some() {
-                    let nl = self.bccx.loan_path_to_string(&common.unwrap());
-                    let ol = nl.clone();
-                    let new_loan_msg = format!(" (here through borrowing `{}`)",
-                                               self.bccx.loan_path_to_string(
-                                                   &*new_loan.loan_path));
-                    let old_loan_msg = format!(" (through borrowing `{}`)",
-                                               self.bccx.loan_path_to_string(
-                                                   &*old_loan.loan_path));
-                    (nl, ol, new_loan_msg, old_loan_msg)
-                } else {
-                    (self.bccx.loan_path_to_string(&*new_loan.loan_path),
-                     self.bccx.loan_path_to_string(&*old_loan.loan_path),
-                     String::new(), String::new())
-                };
-
-            let ol_pronoun = if new_loan.loan_path == old_loan.loan_path {
-                "it".to_string()
-            } else {
-                format!("`{}`", ol)
-            };
-
-            match (new_loan.kind, old_loan.kind) {
-                (ty::MutBorrow, ty::MutBorrow) => {
-                    self.bccx.span_err(
-                        new_loan.span,
-                        format!("cannot borrow `{}`{} as mutable \
-                                more than once at a time",
-                                nl, new_loan_msg).as_slice())
-                }
-
-                (ty::UniqueImmBorrow, _) => {
-                    self.bccx.span_err(
-                        new_loan.span,
-                        format!("closure requires unique access to `{}` \
-                                but {} is already borrowed{}",
-                                nl, ol_pronoun, old_loan_msg).as_slice());
-                }
-
-                (_, ty::UniqueImmBorrow) => {
-                    self.bccx.span_err(
-                        new_loan.span,
-                        format!("cannot borrow `{}`{} as {} because \
-                                previous closure requires unique access",
-                                nl, new_loan_msg, new_loan.kind.to_user_str()).as_slice());
-                }
-
-                (_, _) => {
-                    self.bccx.span_err(
-                        new_loan.span,
-                        format!("cannot borrow `{}`{} as {} because \
-                                {} is also borrowed as {}{}",
-                                nl,
-                                new_loan_msg,
-                                new_loan.kind.to_user_str(),
-                                ol_pronoun,
-                                old_loan.kind.to_user_str(),
-                                old_loan_msg).as_slice());
-                }
-            }
-
-            match new_loan.cause {
-                euv::ClosureCapture(span) => {
-                    self.bccx.span_note(
-                        span,
-                        format!("borrow occurs due to use of `{}` in closure",
-                                nl).as_slice());
-                }
-                _ => { }
-            }
-
-            let rule_summary = match old_loan.kind {
-                ty::MutBorrow => {
-                    format!("the mutable borrow prevents subsequent \
-                            moves, borrows, or modification of `{0}` \
-                            until the borrow ends",
-                            ol)
-                }
-
-                ty::ImmBorrow => {
-                    format!("the immutable borrow prevents subsequent \
-                            moves or mutable borrows of `{0}` \
-                            until the borrow ends",
-                            ol)
-                }
-
-                ty::UniqueImmBorrow => {
-                    format!("the unique capture prevents subsequent \
-                            moves or borrows of `{0}` \
-                            until the borrow ends",
-                            ol)
-                }
-            };
-
-            let borrow_summary = match old_loan.cause {
-                euv::ClosureCapture(_) => {
-                    format!("previous borrow of `{}` occurs here{} due to \
-                            use in closure",
-                            ol, old_loan_msg)
-                }
-
-                euv::OverloadedOperator(..) |
-                euv::AddrOf(..) |
-                euv::AutoRef(..) |
-                euv::ClosureInvocation(..) |
-                euv::ForLoop(..) |
-                euv::RefBinding(..) |
-                euv::MatchDiscriminant(..) => {
-                    format!("previous borrow of `{}` occurs here{}",
-                            ol, old_loan_msg)
-                }
-            };
-
-            self.bccx.span_note(
-                old_loan.span,
-                format!("{}; {}", borrow_summary, rule_summary).as_slice());
-
-            let old_loan_span = self.tcx().map.span(old_loan.kill_scope.node_id());
-            self.bccx.span_end_note(old_loan_span,
-                                    "previous borrow ends here");
-
-            return false;
-        }
-
-        true
-    }
-
-    fn is_local_variable_or_arg(&self, cmt: mc::cmt<'tcx>) -> bool {
-        match cmt.cat {
-          mc::cat_local(_) => true,
-          _ => false
-        }
-    }
-
-    fn consume_common(&self,
-                      id: ast::NodeId,
-                      span: Span,
-                      cmt: mc::cmt<'tcx>,
-                      mode: euv::ConsumeMode) {
-        match opt_loan_path(&cmt) {
-            Some(lp) => {
-                let moved_value_use_kind = match mode {
-                    euv::Copy => {
-                        self.check_for_copy_of_frozen_path(id, span, &*lp);
-                        MovedInUse
-                    }
-                    euv::Move(_) => {
-                        match self.move_data.kind_of_move_of_path(id, &lp) {
-                            None => {
-                                // Sometimes moves don't have a move kind;
-                                // this either means that the original move
-                                // was from something illegal to move,
-                                // or was moved from referent of an unsafe
-                                // pointer or something like that.
-                                MovedInUse
-                            }
-                            Some(move_kind) => {
-                                self.check_for_move_of_borrowed_path(id, span,
-                                                                     &*lp, move_kind);
-                                if move_kind == move_data::Captured {
-                                    MovedInCapture
-                                } else {
-                                    MovedInUse
-                                }
-                            }
-                        }
-                    }
-                };
-
-                self.check_if_path_is_moved(id, span, moved_value_use_kind, &lp);
-            }
-            None => { }
-        }
-    }
-
-    fn check_for_copy_of_frozen_path(&self,
-                                     id: ast::NodeId,
-                                     span: Span,
-                                     copy_path: &LoanPath<'tcx>) {
-        match self.analyze_restrictions_on_use(id, copy_path, ty::ImmBorrow) {
-            UseOk => { }
-            UseWhileBorrowed(loan_path, loan_span) => {
-                self.bccx.span_err(
-                    span,
-                    format!("cannot use `{}` because it was mutably borrowed",
-                            self.bccx.loan_path_to_string(copy_path).as_slice())
-                    .as_slice());
-                self.bccx.span_note(
-                    loan_span,
-                    format!("borrow of `{}` occurs here",
-                            self.bccx.loan_path_to_string(&*loan_path).as_slice())
-                    .as_slice());
-            }
-        }
-    }
-
-    fn check_for_move_of_borrowed_path(&self,
-                                       id: ast::NodeId,
-                                       span: Span,
-                                       move_path: &LoanPath<'tcx>,
-                                       move_kind: move_data::MoveKind) {
-        // We want to detect if there are any loans at all, so we search for
-        // any loans incompatible with MutBorrrow, since all other kinds of
-        // loans are incompatible with that.
-        match self.analyze_restrictions_on_use(id, move_path, ty::MutBorrow) {
-            UseOk => { }
-            UseWhileBorrowed(loan_path, loan_span) => {
-                let err_message = match move_kind {
-                    move_data::Captured =>
-                        format!("cannot move `{}` into closure because it is borrowed",
-                                self.bccx.loan_path_to_string(move_path).as_slice()),
-                    move_data::Declared |
-                    move_data::MoveExpr |
-                    move_data::MovePat =>
-                        format!("cannot move out of `{}` because it is borrowed",
-                                self.bccx.loan_path_to_string(move_path).as_slice())
-                };
-
-                self.bccx.span_err(span, err_message.as_slice());
-                self.bccx.span_note(
-                    loan_span,
-                    format!("borrow of `{}` occurs here",
-                            self.bccx.loan_path_to_string(&*loan_path).as_slice())
-                    .as_slice());
-            }
-        }
-    }
-
-    pub fn analyze_restrictions_on_use(&self,
-                                       expr_id: ast::NodeId,
-                                       use_path: &LoanPath<'tcx>,
-                                       borrow_kind: ty::BorrowKind)
-                                       -> UseError<'tcx> {
-        debug!("analyze_restrictions_on_use(expr_id={}, use_path={})",
-               self.tcx().map.node_to_string(expr_id),
-               use_path.repr(self.tcx()));
-
-        let mut ret = UseOk;
-
-        self.each_in_scope_loan_affecting_path(
-            region::CodeExtent::from_node_id(expr_id), use_path, |loan| {
-            if !compatible_borrow_kinds(loan.kind, borrow_kind) {
-                ret = UseWhileBorrowed(loan.loan_path.clone(), loan.span);
-                false
-            } else {
-                true
-            }
-        });
-
-        return ret;
-    }
-
-    /// Reports an error if `expr` (which should be a path)
-    /// is using a moved/uninitialized value
-    fn check_if_path_is_moved(&self,
-                              id: ast::NodeId,
-                              span: Span,
-                              use_kind: MovedValueUseKind,
-                              lp: &Rc<LoanPath<'tcx>>) {
-        debug!("check_if_path_is_moved(id={}, use_kind={}, lp={})",
-               id, use_kind, lp.repr(self.bccx.tcx));
-        let base_lp = owned_ptr_base_path_rc(lp);
-        self.move_data.each_move_of(id, &base_lp, |the_move, moved_lp| {
-            self.bccx.report_use_of_moved_value(
-                span,
-                use_kind,
-                &**lp,
-                the_move,
-                moved_lp,
-                self.param_env);
-            false
-        });
-    }
-
-    /// Reports an error if assigning to `lp` will use a
-    /// moved/uninitialized value. Mainly this is concerned with
-    /// detecting derefs of uninitialized pointers.
-    ///
-    /// For example:
-    ///
-    /// ```
-    /// let a: int;
-    /// a = 10; // ok, even though a is uninitialized
-    ///
-    /// struct Point { x: uint, y: uint }
-    /// let p: Point;
-    /// p.x = 22; // ok, even though `p` is uninitialized
-    ///
-    /// let p: ~Point;
-    /// (*p).x = 22; // not ok, p is uninitialized, can't deref
-    /// ```
-    fn check_if_assigned_path_is_moved(&self,
-                                       id: ast::NodeId,
-                                       span: Span,
-                                       use_kind: MovedValueUseKind,
-                                       lp: &Rc<LoanPath<'tcx>>)
-    {
-        match lp.kind {
-            LpVar(_) | LpUpvar(_) => {
-                // assigning to `x` does not require that `x` is initialized
-            }
-            LpDowncast(ref lp_base, _) => {
-                // assigning to `(P->Variant).f` is ok if assigning to `P` is ok
-                self.check_if_assigned_path_is_moved(id, span,
-                                                     use_kind, lp_base);
-            }
-            LpExtend(ref lp_base, _, LpInterior(_)) => {
-                // assigning to `P.f` is ok if assigning to `P` is ok
-                self.check_if_assigned_path_is_moved(id, span,
-                                                     use_kind, lp_base);
-            }
-            LpExtend(ref lp_base, _, LpDeref(_)) => {
-                // assigning to `(*P)` requires that `P` be initialized
-                self.check_if_path_is_moved(id, span,
-                                            use_kind, lp_base);
-            }
-        }
-    }
-
-    fn check_assignment(&self,
-                        assignment_id: ast::NodeId,
-                        assignment_span: Span,
-                        assignee_cmt: mc::cmt<'tcx>,
-                        mode: euv::MutateMode) {
-        debug!("check_assignment(assignee_cmt={})", assignee_cmt.repr(self.tcx()));
-
-        // Mutable values can be assigned, as long as they obey loans
-        // and aliasing restrictions:
-        if assignee_cmt.mutbl.is_mutable() {
-            if check_for_aliasable_mutable_writes(self, assignment_span, assignee_cmt.clone()) {
-                if mode != euv::Init {
-                    check_for_assignment_to_borrowed_path(
-                        self, assignment_id, assignment_span, assignee_cmt.clone());
-                    mark_variable_as_used_mut(self, assignee_cmt);
-                }
-            }
-            return;
-        }
-
-        // Initializations are OK.
-        if mode == euv::Init {
-            return
-        }
-
-        // For immutable local variables, assignments are legal
-        // if they cannot already have been assigned
-        if self.is_local_variable_or_arg(assignee_cmt.clone()) {
-            assert!(assignee_cmt.mutbl.is_immutable()); // no "const" locals
-            let lp = opt_loan_path(&assignee_cmt).unwrap();
-            self.move_data.each_assignment_of(assignment_id, &lp, |assign| {
-                self.bccx.report_reassigned_immutable_variable(
-                    assignment_span,
-                    &*lp,
-                    assign);
-                false
-            });
-            return;
-        }
-
-        // Otherwise, just a plain error.
-        match assignee_cmt.note {
-            mc::NoteClosureEnv(upvar_id) => {
-                // If this is an `Fn` closure, it simply can't mutate upvars.
-                // If it's an `FnMut` closure, the original variable was declared immutable.
-                // We need to determine which is the case here.
-                let kind = match assignee_cmt.upvar().unwrap().cat {
-                    mc::cat_upvar(mc::Upvar { kind, .. }) => kind,
-                    _ => unreachable!()
-                };
-                if kind == ty::FnUnboxedClosureKind {
-                    self.bccx.span_err(
-                        assignment_span,
-                        format!("cannot assign to {}",
-                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
-                    self.bccx.span_help(
-                        self.tcx().map.span(upvar_id.closure_expr_id),
-                        "consider changing this closure to take self by mutable reference");
-                } else {
-                    self.bccx.span_err(
-                        assignment_span,
-                        format!("cannot assign to {} {}",
-                                assignee_cmt.mutbl.to_user_str(),
-                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
-                }
-            }
-            _ => match opt_loan_path(&assignee_cmt) {
-                Some(lp) => {
-                    self.bccx.span_err(
-                        assignment_span,
-                        format!("cannot assign to {} {} `{}`",
-                                assignee_cmt.mutbl.to_user_str(),
-                                self.bccx.cmt_to_string(&*assignee_cmt),
-                                self.bccx.loan_path_to_string(&*lp)).as_slice());
-                }
-                None => {
-                    self.bccx.span_err(
-                        assignment_span,
-                        format!("cannot assign to {} {}",
-                                assignee_cmt.mutbl.to_user_str(),
-                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
-                }
-            }
-        }
-        return;
-
-        fn mark_variable_as_used_mut<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
-                                               mut cmt: mc::cmt<'tcx>) {
-            //! If the mutability of the `cmt` being written is inherited
-            //! from a local variable, liveness will
-            //! not have been able to detect that this variable's mutability
-            //! is important, so we must add the variable to the
-            //! `used_mut_nodes` table here.
-
-            loop {
-                debug!("mark_variable_as_used_mut(cmt={})", cmt.repr(this.tcx()));
-                match cmt.cat.clone() {
-                    mc::cat_upvar(mc::Upvar { id: ty::UpvarId { var_id: id, .. }, .. }) |
-                    mc::cat_local(id) => {
-                        this.tcx().used_mut_nodes.borrow_mut().insert(id);
-                        return;
-                    }
-
-                    mc::cat_rvalue(..) |
-                    mc::cat_static_item |
-                    mc::cat_deref(_, _, mc::UnsafePtr(..)) |
-                    mc::cat_deref(_, _, mc::Implicit(..)) => {
-                        assert_eq!(cmt.mutbl, mc::McDeclared);
-                        return;
-                    }
-
-                    mc::cat_deref(_, _, mc::BorrowedPtr(..)) => {
-                        assert_eq!(cmt.mutbl, mc::McDeclared);
-                        // We need to drill down to upvar if applicable
-                        match cmt.upvar() {
-                            Some(b) => cmt = b,
-                            None => return
-                        }
-                    }
-
-                    mc::cat_deref(b, _, mc::OwnedPtr) => {
-                        assert_eq!(cmt.mutbl, mc::McInherited);
-                        cmt = b;
-                    }
-
-                    mc::cat_downcast(b, _) |
-                    mc::cat_interior(b, _) => {
-                        assert_eq!(cmt.mutbl, mc::McInherited);
-                        cmt = b;
-                    }
-                }
-            }
-        }
-
-        fn check_for_aliasable_mutable_writes<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
-                                                        span: Span,
-                                                        cmt: mc::cmt<'tcx>) -> bool {
-            //! Safety checks related to writes to aliasable, mutable locations
-
-            let guarantor = cmt.guarantor();
-            debug!("check_for_aliasable_mutable_writes(cmt={}, guarantor={})",
-                   cmt.repr(this.tcx()), guarantor.repr(this.tcx()));
-            if let mc::cat_deref(ref b, _, mc::BorrowedPtr(ty::MutBorrow, _)) = guarantor.cat {
-                // Statically prohibit writes to `&mut` when aliasable
-                check_for_aliasability_violation(this, span, b.clone());
-            }
-
-            return true; // no errors reported
-        }
-
-        fn check_for_aliasability_violation<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
-                                                      span: Span,
-                                                      cmt: mc::cmt<'tcx>)
-                                                      -> bool {
-            match cmt.freely_aliasable(this.tcx()) {
-                None => {
-                    return true;
-                }
-                Some(mc::AliasableStaticMut(..)) => {
-                    return true;
-                }
-                Some(cause) => {
-                    this.bccx.report_aliasability_violation(
-                        span,
-                        MutabilityViolation,
-                        cause);
-                    return false;
-                }
-            }
-        }
-
-        fn check_for_assignment_to_borrowed_path<'a, 'tcx>(
-            this: &CheckLoanCtxt<'a, 'tcx>,
-            assignment_id: ast::NodeId,
-            assignment_span: Span,
-            assignee_cmt: mc::cmt<'tcx>)
-        {
-            //! Check for assignments that violate the terms of an
-            //! outstanding loan.
-
-            let loan_path = match opt_loan_path(&assignee_cmt) {
-                Some(lp) => lp,
-                None => { return; /* no loan path, can't be any loans */ }
-            };
-
-            let scope = region::CodeExtent::from_node_id(assignment_id);
-            this.each_in_scope_loan_affecting_path(scope, &*loan_path, |loan| {
-                this.report_illegal_mutation(assignment_span, &*loan_path, loan);
-                false
-            });
-        }
-    }
-
-    pub fn report_illegal_mutation(&self,
-                                   span: Span,
-                                   loan_path: &LoanPath<'tcx>,
-                                   loan: &Loan) {
-        self.bccx.span_err(
-            span,
-            format!("cannot assign to `{}` because it is borrowed",
-                    self.bccx.loan_path_to_string(loan_path)).as_slice());
-        self.bccx.span_note(
-            loan.span,
-            format!("borrow of `{}` occurs here",
-                    self.bccx.loan_path_to_string(loan_path)).as_slice());
-    }
-}
diff --git a/src/librustc/middle/borrowck/doc.rs b/src/librustc/middle/borrowck/doc.rs
deleted file mode 100644 (file)
index c6db534..0000000
+++ /dev/null
@@ -1,1222 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! # The Borrow Checker
-//!
-//! This pass has the job of enforcing memory safety. This is a subtle
-//! topic. This docs aim to explain both the practice and the theory
-//! behind the borrow checker. They start with a high-level overview of
-//! how it works, and then proceed to dive into the theoretical
-//! background. Finally, they go into detail on some of the more subtle
-//! aspects.
-//!
-//! # Table of contents
-//!
-//! These docs are long. Search for the section you are interested in.
-//!
-//! - Overview
-//! - Formal model
-//! - Borrowing and loans
-//! - Moves and initialization
-//! - Drop flags and structural fragments
-//! - Future work
-//!
-//! # Overview
-//!
-//! The borrow checker checks one function at a time. It operates in two
-//! passes. The first pass, called `gather_loans`, walks over the function
-//! and identifies all of the places where borrows (e.g., `&` expressions
-//! and `ref` bindings) and moves (copies or captures of a linear value)
-//! occur. It also tracks initialization sites. For each borrow and move,
-//! it checks various basic safety conditions at this time (for example,
-//! that the lifetime of the borrow doesn't exceed the lifetime of the
-//! value being borrowed, or that there is no move out of an `&T`
-//! referent).
-//!
-//! It then uses the dataflow module to propagate which of those borrows
-//! may be in scope at each point in the procedure. A loan is considered
-//! to come into scope at the expression that caused it and to go out of
-//! scope when the lifetime of the resulting reference expires.
-//!
-//! Once the in-scope loans are known for each point in the program, the
-//! borrow checker walks the IR again in a second pass called
-//! `check_loans`. This pass examines each statement and makes sure that
-//! it is safe with respect to the in-scope loans.
-//!
-//! # Formal model
-//!
-//! Throughout the docs we'll consider a simple subset of Rust in which
-//! you can only borrow from lvalues, defined like so:
-//!
-//! ```text
-//! LV = x | LV.f | *LV
-//! ```
-//!
-//! Here `x` represents some variable, `LV.f` is a field reference,
-//! and `*LV` is a pointer dereference. There is no auto-deref or other
-//! niceties. This means that if you have a type like:
-//!
-//! ```text
-//! struct S { f: uint }
-//! ```
-//!
-//! and a variable `a: Box<S>`, then the rust expression `a.f` would correspond
-//! to an `LV` of `(*a).f`.
-//!
-//! Here is the formal grammar for the types we'll consider:
-//!
-//! ```text
-//! TY = () | S<'LT...> | Box<TY> | & 'LT MQ TY
-//! MQ = mut | imm | const
-//! ```
-//!
-//! Most of these types should be pretty self explanatory. Here `S` is a
-//! struct name and we assume structs are declared like so:
-//!
-//! ```text
-//! SD = struct S<'LT...> { (f: TY)... }
-//! ```
-//!
-//! # Borrowing and loans
-//!
-//! ## An intuitive explanation
-//!
-//! ### Issuing loans
-//!
-//! Now, imagine we had a program like this:
-//!
-//! ```text
-//! struct Foo { f: uint, g: uint }
-//! ...
-//! 'a: {
-//!   let mut x: Box<Foo> = ...;
-//!   let y = &mut (*x).f;
-//!   x = ...;
-//! }
-//! ```
-//!
-//! This is of course dangerous because mutating `x` will free the old
-//! value and hence invalidate `y`. The borrow checker aims to prevent
-//! this sort of thing.
-//!
-//! #### Loans and restrictions
-//!
-//! The way the borrow checker works is that it analyzes each borrow
-//! expression (in our simple model, that's stuff like `&LV`, though in
-//! real life there are a few other cases to consider). For each borrow
-//! expression, it computes a `Loan`, which is a data structure that
-//! records (1) the value being borrowed, (2) the mutability and scope of
-//! the borrow, and (3) a set of restrictions. In the code, `Loan` is a
-//! struct defined in `middle::borrowck`. Formally, we define `LOAN` as
-//! follows:
-//!
-//! ```text
-//! LOAN = (LV, LT, MQ, RESTRICTION*)
-//! RESTRICTION = (LV, ACTION*)
-//! ACTION = MUTATE | CLAIM | FREEZE
-//! ```
-//!
-//! Here the `LOAN` tuple defines the lvalue `LV` being borrowed; the
-//! lifetime `LT` of that borrow; the mutability `MQ` of the borrow; and a
-//! list of restrictions. The restrictions indicate actions which, if
-//! taken, could invalidate the loan and lead to type safety violations.
-//!
-//! Each `RESTRICTION` is a pair of a restrictive lvalue `LV` (which will
-//! either be the path that was borrowed or some prefix of the path that
-//! was borrowed) and a set of restricted actions.  There are three kinds
-//! of actions that may be restricted for the path `LV`:
-//!
-//! - `MUTATE` means that `LV` cannot be assigned to;
-//! - `CLAIM` means that the `LV` cannot be borrowed mutably;
-//! - `FREEZE` means that the `LV` cannot be borrowed immutably;
-//!
-//! Finally, it is never possible to move from an lvalue that appears in a
-//! restriction. This implies that the "empty restriction" `(LV, [])`,
-//! which contains an empty set of actions, still has a purpose---it
-//! prevents moves from `LV`. I chose not to make `MOVE` a fourth kind of
-//! action because that would imply that sometimes moves are permitted
-//! from restrictived values, which is not the case.
-//!
-//! #### Example
-//!
-//! To give you a better feeling for what kind of restrictions derived
-//! from a loan, let's look at the loan `L` that would be issued as a
-//! result of the borrow `&mut (*x).f` in the example above:
-//!
-//! ```text
-//! L = ((*x).f, 'a, mut, RS) where
-//!     RS = [((*x).f, [MUTATE, CLAIM, FREEZE]),
-//!           (*x, [MUTATE, CLAIM, FREEZE]),
-//!           (x, [MUTATE, CLAIM, FREEZE])]
-//! ```
-//!
-//! The loan states that the expression `(*x).f` has been loaned as
-//! mutable for the lifetime `'a`. Because the loan is mutable, that means
-//! that the value `(*x).f` may be mutated via the newly created reference
-//! (and *only* via that pointer). This is reflected in the
-//! restrictions `RS` that accompany the loan.
-//!
-//! The first restriction `((*x).f, [MUTATE, CLAIM, FREEZE])` states that
-//! the lender may not mutate, freeze, nor alias `(*x).f`. Mutation is
-//! illegal because `(*x).f` is only supposed to be mutated via the new
-//! reference, not by mutating the original path `(*x).f`. Freezing is
-//! illegal because the path now has an `&mut` alias; so even if we the
-//! lender were to consider `(*x).f` to be immutable, it might be mutated
-//! via this alias. They will be enforced for the lifetime `'a` of the
-//! loan. After the loan expires, the restrictions no longer apply.
-//!
-//! The second restriction on `*x` is interesting because it does not
-//! apply to the path that was lent (`(*x).f`) but rather to a prefix of
-//! the borrowed path. This is due to the rules of inherited mutability:
-//! if the user were to assign to (or freeze) `*x`, they would indirectly
-//! overwrite (or freeze) `(*x).f`, and thus invalidate the reference
-//! that was created. In general it holds that when a path is
-//! lent, restrictions are issued for all the owning prefixes of that
-//! path. In this case, the path `*x` owns the path `(*x).f` and,
-//! because `x` is an owned pointer, the path `x` owns the path `*x`.
-//! Therefore, borrowing `(*x).f` yields restrictions on both
-//! `*x` and `x`.
-//!
-//! ### Checking for illegal assignments, moves, and reborrows
-//!
-//! Once we have computed the loans introduced by each borrow, the borrow
-//! checker uses a data flow propagation to compute the full set of loans
-//! in scope at each expression and then uses that set to decide whether
-//! that expression is legal.  Remember that the scope of loan is defined
-//! by its lifetime LT.  We sometimes say that a loan which is in-scope at
-//! a particular point is an "outstanding loan", and the set of
-//! restrictions included in those loans as the "outstanding
-//! restrictions".
-//!
-//! The kinds of expressions which in-scope loans can render illegal are:
-//! - *assignments* (`lv = v`): illegal if there is an in-scope restriction
-//!   against mutating `lv`;
-//! - *moves*: illegal if there is any in-scope restriction on `lv` at all;
-//! - *mutable borrows* (`&mut lv`): illegal there is an in-scope restriction
-//!   against claiming `lv`;
-//! - *immutable borrows* (`&lv`): illegal there is an in-scope restriction
-//!   against freezing `lv`.
-//!
-//! ## Formal rules
-//!
-//! Now that we hopefully have some kind of intuitive feeling for how the
-//! borrow checker works, let's look a bit more closely now at the precise
-//! conditions that it uses. For simplicity I will ignore const loans.
-//!
-//! I will present the rules in a modified form of standard inference
-//! rules, which looks as follows:
-//!
-//! ```text
-//! PREDICATE(X, Y, Z)                  // Rule-Name
-//!   Condition 1
-//!   Condition 2
-//!   Condition 3
-//! ```
-//!
-//! The initial line states the predicate that is to be satisfied.  The
-//! indented lines indicate the conditions that must be met for the
-//! predicate to be satisfied. The right-justified comment states the name
-//! of this rule: there are comments in the borrowck source referencing
-//! these names, so that you can cross reference to find the actual code
-//! that corresponds to the formal rule.
-//!
-//! ### Invariants
-//!
-//! I want to collect, at a high-level, the invariants the borrow checker
-//! maintains. I will give them names and refer to them throughout the
-//! text. Together these invariants are crucial for the overall soundness
-//! of the system.
-//!
-//! **Mutability requires uniqueness.** To mutate a path
-//!
-//! **Unique mutability.** There is only one *usable* mutable path to any
-//! given memory at any given time. This implies that when claiming memory
-//! with an expression like `p = &mut x`, the compiler must guarantee that
-//! the borrowed value `x` can no longer be mutated so long as `p` is
-//! live. (This is done via restrictions, read on.)
-//!
-//! **.**
-//!
-//!
-//! ### The `gather_loans` pass
-//!
-//! We start with the `gather_loans` pass, which walks the AST looking for
-//! borrows.  For each borrow, there are three bits of information: the
-//! lvalue `LV` being borrowed and the mutability `MQ` and lifetime `LT`
-//! of the resulting pointer. Given those, `gather_loans` applies four
-//! validity tests:
-//!
-//! 1. `MUTABILITY(LV, MQ)`: The mutability of the reference is
-//! compatible with the mutability of `LV` (i.e., not borrowing immutable
-//! data as mutable).
-//!
-//! 2. `ALIASABLE(LV, MQ)`: The aliasability of the reference is
-//! compatible with the aliasability of `LV`. The goal is to prevent
-//! `&mut` borrows of aliasability data.
-//!
-//! 3. `LIFETIME(LV, LT, MQ)`: The lifetime of the borrow does not exceed
-//! the lifetime of the value being borrowed.
-//!
-//! 4. `RESTRICTIONS(LV, LT, ACTIONS) = RS`: This pass checks and computes the
-//! restrictions to maintain memory safety. These are the restrictions
-//! that will go into the final loan. We'll discuss in more detail below.
-//!
-//! ## Checking mutability
-//!
-//! Checking mutability is fairly straightforward. We just want to prevent
-//! immutable data from being borrowed as mutable. Note that it is ok to
-//! borrow mutable data as immutable, since that is simply a
-//! freeze. Formally we define a predicate `MUTABLE(LV, MQ)` which, if
-//! defined, means that "borrowing `LV` with mutability `MQ` is ok. The
-//! Rust code corresponding to this predicate is the function
-//! `check_mutability` in `middle::borrowck::gather_loans`.
-//!
-//! ### Checking mutability of variables
-//!
-//! *Code pointer:* Function `check_mutability()` in `gather_loans/mod.rs`,
-//! but also the code in `mem_categorization`.
-//!
-//! Let's begin with the rules for variables, which state that if a
-//! variable is declared as mutable, it may be borrowed any which way, but
-//! otherwise the variable must be borrowed as immutable or const:
-//!
-//! ```text
-//! MUTABILITY(X, MQ)                   // M-Var-Mut
-//!   DECL(X) = mut
-//!
-//! MUTABILITY(X, MQ)                   // M-Var-Imm
-//!   DECL(X) = imm
-//!   MQ = imm | const
-//! ```
-//!
-//! ### Checking mutability of owned content
-//!
-//! Fields and owned pointers inherit their mutability from
-//! their base expressions, so both of their rules basically
-//! delegate the check to the base expression `LV`:
-//!
-//! ```text
-//! MUTABILITY(LV.f, MQ)                // M-Field
-//!   MUTABILITY(LV, MQ)
-//!
-//! MUTABILITY(*LV, MQ)                 // M-Deref-Unique
-//!   TYPE(LV) = Box<Ty>
-//!   MUTABILITY(LV, MQ)
-//! ```
-//!
-//! ### Checking mutability of immutable pointer types
-//!
-//! Immutable pointer types like `&T` can only
-//! be borrowed if MQ is immutable or const:
-//!
-//! ```text
-//! MUTABILITY(*LV, MQ)                // M-Deref-Borrowed-Imm
-//!   TYPE(LV) = &Ty
-//!   MQ == imm | const
-//! ```
-//!
-//! ### Checking mutability of mutable pointer types
-//!
-//! `&mut T` can be frozen, so it is acceptable to borrow it as either imm or mut:
-//!
-//! ```text
-//! MUTABILITY(*LV, MQ)                 // M-Deref-Borrowed-Mut
-//!   TYPE(LV) = &mut Ty
-//! ```
-//!
-//! ## Checking aliasability
-//!
-//! The goal of the aliasability check is to ensure that we never permit
-//! `&mut` borrows of aliasable data. Formally we define a predicate
-//! `ALIASABLE(LV, MQ)` which if defined means that
-//! "borrowing `LV` with mutability `MQ` is ok". The
-//! Rust code corresponding to this predicate is the function
-//! `check_aliasability()` in `middle::borrowck::gather_loans`.
-//!
-//! ### Checking aliasability of variables
-//!
-//! Local variables are never aliasable as they are accessible only within
-//! the stack frame.
-//!
-//! ```text
-//!     ALIASABLE(X, MQ)                   // M-Var-Mut
-//! ```
-//!
-//! ### Checking aliasable of owned content
-//!
-//! Owned content is aliasable if it is found in an aliasable location:
-//!
-//! ```text
-//! ALIASABLE(LV.f, MQ)                // M-Field
-//!   ALIASABLE(LV, MQ)
-//!
-//! ALIASABLE(*LV, MQ)                 // M-Deref-Unique
-//!   ALIASABLE(LV, MQ)
-//! ```
-//!
-//! ### Checking mutability of immutable pointer types
-//!
-//! Immutable pointer types like `&T` are aliasable, and hence can only be
-//! borrowed immutably:
-//!
-//! ```text
-//! ALIASABLE(*LV, imm)                // M-Deref-Borrowed-Imm
-//!   TYPE(LV) = &Ty
-//! ```
-//!
-//! ### Checking mutability of mutable pointer types
-//!
-//! `&mut T` can be frozen, so it is acceptable to borrow it as either imm or mut:
-//!
-//! ```text
-//! ALIASABLE(*LV, MQ)                 // M-Deref-Borrowed-Mut
-//!   TYPE(LV) = &mut Ty
-//! ```
-//!
-//! ## Checking lifetime
-//!
-//! These rules aim to ensure that no data is borrowed for a scope that exceeds
-//! its lifetime. These two computations wind up being intimately related.
-//! Formally, we define a predicate `LIFETIME(LV, LT, MQ)`, which states that
-//! "the lvalue `LV` can be safely borrowed for the lifetime `LT` with mutability
-//! `MQ`". The Rust code corresponding to this predicate is the module
-//! `middle::borrowck::gather_loans::lifetime`.
-//!
-//! ### The Scope function
-//!
-//! Several of the rules refer to a helper function `SCOPE(LV)=LT`.  The
-//! `SCOPE(LV)` yields the lifetime `LT` for which the lvalue `LV` is
-//! guaranteed to exist, presuming that no mutations occur.
-//!
-//! The scope of a local variable is the block where it is declared:
-//!
-//! ```text
-//!   SCOPE(X) = block where X is declared
-//! ```
-//!
-//! The scope of a field is the scope of the struct:
-//!
-//! ```text
-//!   SCOPE(LV.f) = SCOPE(LV)
-//! ```
-//!
-//! The scope of a unique referent is the scope of the pointer, since
-//! (barring mutation or moves) the pointer will not be freed until
-//! the pointer itself `LV` goes out of scope:
-//!
-//! ```text
-//!   SCOPE(*LV) = SCOPE(LV) if LV has type Box<T>
-//! ```
-//!
-//! The scope of a borrowed referent is the scope associated with the
-//! pointer.  This is a conservative approximation, since the data that
-//! the pointer points at may actually live longer:
-//!
-//! ```text
-//!   SCOPE(*LV) = LT if LV has type &'LT T or &'LT mut T
-//! ```
-//!
-//! ### Checking lifetime of variables
-//!
-//! The rule for variables states that a variable can only be borrowed a
-//! lifetime `LT` that is a subregion of the variable's scope:
-//!
-//! ```text
-//! LIFETIME(X, LT, MQ)                 // L-Local
-//!   LT <= SCOPE(X)
-//! ```
-//!
-//! ### Checking lifetime for owned content
-//!
-//! The lifetime of a field or owned pointer is the same as the lifetime
-//! of its owner:
-//!
-//! ```text
-//! LIFETIME(LV.f, LT, MQ)              // L-Field
-//!   LIFETIME(LV, LT, MQ)
-//!
-//! LIFETIME(*LV, LT, MQ)               // L-Deref-Send
-//!   TYPE(LV) = Box<Ty>
-//!   LIFETIME(LV, LT, MQ)
-//! ```
-//!
-//! ### Checking lifetime for derefs of references
-//!
-//! References have a lifetime `LT'` associated with them.  The
-//! data they point at has been guaranteed to be valid for at least this
-//! lifetime. Therefore, the borrow is valid so long as the lifetime `LT`
-//! of the borrow is shorter than the lifetime `LT'` of the pointer
-//! itself:
-//!
-//! ```text
-//! LIFETIME(*LV, LT, MQ)               // L-Deref-Borrowed
-//!   TYPE(LV) = &LT' Ty OR &LT' mut Ty
-//!   LT <= LT'
-//! ```
-//!
-//! ## Computing the restrictions
-//!
-//! The final rules govern the computation of *restrictions*, meaning that
-//! we compute the set of actions that will be illegal for the life of the
-//! loan. The predicate is written `RESTRICTIONS(LV, LT, ACTIONS) =
-//! RESTRICTION*`, which can be read "in order to prevent `ACTIONS` from
-//! occurring on `LV`, the restrictions `RESTRICTION*` must be respected
-//! for the lifetime of the loan".
-//!
-//! Note that there is an initial set of restrictions: these restrictions
-//! are computed based on the kind of borrow:
-//!
-//! ```text
-//! &mut LV =>   RESTRICTIONS(LV, LT, MUTATE|CLAIM|FREEZE)
-//! &LV =>       RESTRICTIONS(LV, LT, MUTATE|CLAIM)
-//! &const LV => RESTRICTIONS(LV, LT, [])
-//! ```
-//!
-//! The reasoning here is that a mutable borrow must be the only writer,
-//! therefore it prevents other writes (`MUTATE`), mutable borrows
-//! (`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
-//! permits other immutable borrows but forbids writes and mutable borrows.
-//! Finally, a const borrow just wants to be sure that the value is not
-//! moved out from under it, so no actions are forbidden.
-//!
-//! ### Restrictions for loans of a local variable
-//!
-//! The simplest case is a borrow of a local variable `X`:
-//!
-//! ```text
-//! RESTRICTIONS(X, LT, ACTIONS) = (X, ACTIONS)            // R-Variable
-//! ```
-//!
-//! In such cases we just record the actions that are not permitted.
-//!
-//! ### Restrictions for loans of fields
-//!
-//! Restricting a field is the same as restricting the owner of that
-//! field:
-//!
-//! ```text
-//! RESTRICTIONS(LV.f, LT, ACTIONS) = RS, (LV.f, ACTIONS)  // R-Field
-//!   RESTRICTIONS(LV, LT, ACTIONS) = RS
-//! ```
-//!
-//! The reasoning here is as follows. If the field must not be mutated,
-//! then you must not mutate the owner of the field either, since that
-//! would indirectly modify the field. Similarly, if the field cannot be
-//! frozen or aliased, we cannot allow the owner to be frozen or aliased,
-//! since doing so indirectly freezes/aliases the field. This is the
-//! origin of inherited mutability.
-//!
-//! ### Restrictions for loans of owned referents
-//!
-//! Because the mutability of owned referents is inherited, restricting an
-//! owned referent is similar to restricting a field, in that it implies
-//! restrictions on the pointer. However, owned pointers have an important
-//! twist: if the owner `LV` is mutated, that causes the owned referent
-//! `*LV` to be freed! So whenever an owned referent `*LV` is borrowed, we
-//! must prevent the owned pointer `LV` from being mutated, which means
-//! that we always add `MUTATE` and `CLAIM` to the restriction set imposed
-//! on `LV`:
-//!
-//! ```text
-//! RESTRICTIONS(*LV, LT, ACTIONS) = RS, (*LV, ACTIONS)    // R-Deref-Send-Pointer
-//!   TYPE(LV) = Box<Ty>
-//!   RESTRICTIONS(LV, LT, ACTIONS|MUTATE|CLAIM) = RS
-//! ```
-//!
-//! ### Restrictions for loans of immutable borrowed referents
-//!
-//! Immutable borrowed referents are freely aliasable, meaning that
-//! the compiler does not prevent you from copying the pointer.  This
-//! implies that issuing restrictions is useless. We might prevent the
-//! user from acting on `*LV` itself, but there could be another path
-//! `*LV1` that refers to the exact same memory, and we would not be
-//! restricting that path. Therefore, the rule for `&Ty` pointers
-//! always returns an empty set of restrictions, and it only permits
-//! restricting `MUTATE` and `CLAIM` actions:
-//!
-//! ```text
-//! RESTRICTIONS(*LV, LT, ACTIONS) = []                    // R-Deref-Imm-Borrowed
-//!   TYPE(LV) = &LT' Ty
-//!   LT <= LT'                                            // (1)
-//!   ACTIONS subset of [MUTATE, CLAIM]
-//! ```
-//!
-//! The reason that we can restrict `MUTATE` and `CLAIM` actions even
-//! without a restrictions list is that it is never legal to mutate nor to
-//! borrow mutably the contents of a `&Ty` pointer. In other words,
-//! those restrictions are already inherent in the type.
-//!
-//! Clause (1) in the rule for `&Ty` deserves mention. Here I
-//! specify that the lifetime of the loan must be less than the lifetime
-//! of the `&Ty` pointer. In simple cases, this clause is redundant, since
-//! the `LIFETIME()` function will already enforce the required rule:
-//!
-//! ```
-//! fn foo(point: &'a Point) -> &'static f32 {
-//!     &point.x // Error
-//! }
-//! ```
-//!
-//! The above example fails to compile both because of clause (1) above
-//! but also by the basic `LIFETIME()` check. However, in more advanced
-//! examples involving multiple nested pointers, clause (1) is needed:
-//!
-//! ```
-//! fn foo(point: &'a &'b mut Point) -> &'b f32 {
-//!     &point.x // Error
-//! }
-//! ```
-//!
-//! The `LIFETIME` rule here would accept `'b` because, in fact, the
-//! *memory is* guaranteed to remain valid (i.e., not be freed) for the
-//! lifetime `'b`, since the `&mut` pointer is valid for `'b`. However, we
-//! are returning an immutable reference, so we need the memory to be both
-//! valid and immutable. Even though `point.x` is referenced by an `&mut`
-//! pointer, it can still be considered immutable so long as that `&mut`
-//! pointer is found in an aliased location. That means the memory is
-//! guaranteed to be *immutable* for the lifetime of the `&` pointer,
-//! which is only `'a`, not `'b`. Hence this example yields an error.
-//!
-//! As a final twist, consider the case of two nested *immutable*
-//! pointers, rather than a mutable pointer within an immutable one:
-//!
-//! ```
-//! fn foo(point: &'a &'b Point) -> &'b f32 {
-//!     &point.x // OK
-//! }
-//! ```
-//!
-//! This function is legal. The reason for this is that the inner pointer
-//! (`*point : &'b Point`) is enough to guarantee the memory is immutable
-//! and valid for the lifetime `'b`.  This is reflected in
-//! `RESTRICTIONS()` by the fact that we do not recurse (i.e., we impose
-//! no restrictions on `LV`, which in this particular case is the pointer
-//! `point : &'a &'b Point`).
-//!
-//! #### Why both `LIFETIME()` and `RESTRICTIONS()`?
-//!
-//! Given the previous text, it might seem that `LIFETIME` and
-//! `RESTRICTIONS` should be folded together into one check, but there is
-//! a reason that they are separated. They answer separate concerns.
-//! The rules pertaining to `LIFETIME` exist to ensure that we don't
-//! create a borrowed pointer that outlives the memory it points at. So
-//! `LIFETIME` prevents a function like this:
-//!
-//! ```
-//! fn get_1<'a>() -> &'a int {
-//!     let x = 1;
-//!     &x
-//! }
-//! ```
-//!
-//! Here we would be returning a pointer into the stack. Clearly bad.
-//!
-//! However, the `RESTRICTIONS` rules are more concerned with how memory
-//! is used. The example above doesn't generate an error according to
-//! `RESTRICTIONS` because, for local variables, we don't require that the
-//! loan lifetime be a subset of the local variable lifetime. The idea
-//! here is that we *can* guarantee that `x` is not (e.g.) mutated for the
-//! lifetime `'a`, even though `'a` exceeds the function body and thus
-//! involves unknown code in the caller -- after all, `x` ceases to exist
-//! after we return and hence the remaining code in `'a` cannot possibly
-//! mutate it. This distinction is important for type checking functions
-//! like this one:
-//!
-//! ```
-//! fn inc_and_get<'a>(p: &'a mut Point) -> &'a int {
-//!     p.x += 1;
-//!     &p.x
-//! }
-//! ```
-//!
-//! In this case, we take in a `&mut` and return a frozen borrowed pointer
-//! with the same lifetime. So long as the lifetime of the returned value
-//! doesn't exceed the lifetime of the `&mut` we receive as input, this is
-//! fine, though it may seem surprising at first (it surprised me when I
-//! first worked it through). After all, we're guaranteeing that `*p`
-//! won't be mutated for the lifetime `'a`, even though we can't "see" the
-//! entirety of the code during that lifetime, since some of it occurs in
-//! our caller. But we *do* know that nobody can mutate `*p` except
-//! through `p`. So if we don't mutate `*p` and we don't return `p`, then
-//! we know that the right to mutate `*p` has been lost to our caller --
-//! in terms of capability, the caller passed in the ability to mutate
-//! `*p`, and we never gave it back. (Note that we can't return `p` while
-//! `*p` is borrowed since that would be a move of `p`, as `&mut` pointers
-//! are affine.)
-//!
-//! ### Restrictions for loans of const aliasable referents
-//!
-//! Freeze pointers are read-only. There may be `&mut` or `&` aliases, and
-//! we can not prevent *anything* but moves in that case. So the
-//! `RESTRICTIONS` function is only defined if `ACTIONS` is the empty set.
-//! Because moves from a `&const` lvalue are never legal, it is not
-//! necessary to add any restrictions at all to the final result.
-//!
-//! ```text
-//!     RESTRICTIONS(*LV, LT, []) = []                         // R-Deref-Freeze-Borrowed
-//!       TYPE(LV) = &const Ty
-//! ```
-//!
-//! ### Restrictions for loans of mutable borrowed referents
-//!
-//! Mutable borrowed pointers are guaranteed to be the only way to mutate
-//! their referent. This permits us to take greater license with them; for
-//! example, the referent can be frozen simply be ensuring that we do not
-//! use the original pointer to perform mutate. Similarly, we can allow
-//! the referent to be claimed, so long as the original pointer is unused
-//! while the new claimant is live.
-//!
-//! The rule for mutable borrowed pointers is as follows:
-//!
-//! ```text
-//! RESTRICTIONS(*LV, LT, ACTIONS) = RS, (*LV, ACTIONS)    // R-Deref-Mut-Borrowed
-//!   TYPE(LV) = &LT' mut Ty
-//!   LT <= LT'                                            // (1)
-//!   RESTRICTIONS(LV, LT, ACTIONS) = RS                   // (2)
-//! ```
-//!
-//! Let's examine the two numbered clauses:
-//!
-//! Clause (1) specifies that the lifetime of the loan (`LT`) cannot
-//! exceed the lifetime of the `&mut` pointer (`LT'`). The reason for this
-//! is that the `&mut` pointer is guaranteed to be the only legal way to
-//! mutate its referent -- but only for the lifetime `LT'`.  After that
-//! lifetime, the loan on the referent expires and hence the data may be
-//! modified by its owner again. This implies that we are only able to
-//! guarantee that the referent will not be modified or aliased for a
-//! maximum of `LT'`.
-//!
-//! Here is a concrete example of a bug this rule prevents:
-//!
-//! ```
-//! // Test region-reborrow-from-shorter-mut-ref.rs:
-//! fn copy_pointer<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
-//!     &mut **p // ERROR due to clause (1)
-//! }
-//! fn main() {
-//!     let mut x = 1;
-//!     let mut y = &mut x; // <-'b-----------------------------+
-//!     //      +-'a--------------------+                       |
-//!     //      v                       v                       |
-//!     let z = copy_borrowed_ptr(&mut y); // y is lent         |
-//!     *y += 1; // Here y==z, so both should not be usable...  |
-//!     *z += 1; // ...and yet they would be, but for clause 1. |
-//! } // <------------------------------------------------------+
-//! ```
-//!
-//! Clause (2) propagates the restrictions on the referent to the pointer
-//! itself. This is the same as with an owned pointer, though the
-//! reasoning is mildly different. The basic goal in all cases is to
-//! prevent the user from establishing another route to the same data. To
-//! see what I mean, let's examine various cases of what can go wrong and
-//! show how it is prevented.
-//!
-//! **Example danger 1: Moving the base pointer.** One of the simplest
-//! ways to violate the rules is to move the base pointer to a new name
-//! and access it via that new name, thus bypassing the restrictions on
-//! the old name. Here is an example:
-//!
-//! ```
-//! // src/test/compile-fail/borrowck-move-mut-base-ptr.rs
-//! fn foo(t0: &mut int) {
-//!     let p: &int = &*t0; // Freezes `*t0`
-//!     let t1 = t0;        //~ ERROR cannot move out of `t0`
-//!     *t1 = 22;           // OK, not a write through `*t0`
-//! }
-//! ```
-//!
-//! Remember that `&mut` pointers are linear, and hence `let t1 = t0` is a
-//! move of `t0` -- or would be, if it were legal. Instead, we get an
-//! error, because clause (2) imposes restrictions on `LV` (`t0`, here),
-//! and any restrictions on a path make it impossible to move from that
-//! path.
-//!
-//! **Example danger 2: Claiming the base pointer.** Another possible
-//! danger is to mutably borrow the base path. This can lead to two bad
-//! scenarios. The most obvious is that the mutable borrow itself becomes
-//! another path to access the same data, as shown here:
-//!
-//! ```
-//! // src/test/compile-fail/borrowck-mut-borrow-of-mut-base-ptr.rs
-//! fn foo<'a>(mut t0: &'a mut int,
-//!            mut t1: &'a mut int) {
-//!     let p: &int = &*t0;     // Freezes `*t0`
-//!     let mut t2 = &mut t0;   //~ ERROR cannot borrow `t0`
-//!     **t2 += 1;              // Mutates `*t0`
-//! }
-//! ```
-//!
-//! In this example, `**t2` is the same memory as `*t0`. Because `t2` is
-//! an `&mut` pointer, `**t2` is a unique path and hence it would be
-//! possible to mutate `**t2` even though that memory was supposed to be
-//! frozen by the creation of `p`. However, an error is reported -- the
-//! reason is that the freeze `&*t0` will restrict claims and mutation
-//! against `*t0` which, by clause 2, in turn prevents claims and mutation
-//! of `t0`. Hence the claim `&mut t0` is illegal.
-//!
-//! Another danger with an `&mut` pointer is that we could swap the `t0`
-//! value away to create a new path:
-//!
-//! ```
-//! // src/test/compile-fail/borrowck-swap-mut-base-ptr.rs
-//! fn foo<'a>(mut t0: &'a mut int,
-//!            mut t1: &'a mut int) {
-//!     let p: &int = &*t0;     // Freezes `*t0`
-//!     swap(&mut t0, &mut t1); //~ ERROR cannot borrow `t0`
-//!     *t1 = 22;
-//! }
-//! ```
-//!
-//! This is illegal for the same reason as above. Note that if we added
-//! back a swap operator -- as we used to have -- we would want to be very
-//! careful to ensure this example is still illegal.
-//!
-//! **Example danger 3: Freeze the base pointer.** In the case where the
-//! referent is claimed, even freezing the base pointer can be dangerous,
-//! as shown in the following example:
-//!
-//! ```
-//! // src/test/compile-fail/borrowck-borrow-of-mut-base-ptr.rs
-//! fn foo<'a>(mut t0: &'a mut int,
-//!            mut t1: &'a mut int) {
-//!     let p: &mut int = &mut *t0; // Claims `*t0`
-//!     let mut t2 = &t0;           //~ ERROR cannot borrow `t0`
-//!     let q: &int = &*t2;         // Freezes `*t0` but not through `*p`
-//!     *p += 1;                    // violates type of `*q`
-//! }
-//! ```
-//!
-//! Here the problem is that `*t0` is claimed by `p`, and hence `p` wants
-//! to be the controlling pointer through which mutation or freezes occur.
-//! But `t2` would -- if it were legal -- have the type `& &mut int`, and
-//! hence would be a mutable pointer in an aliasable location, which is
-//! considered frozen (since no one can write to `**t2` as it is not a
-//! unique path). Therefore, we could reasonably create a frozen `&int`
-//! pointer pointing at `*t0` that coexists with the mutable pointer `p`,
-//! which is clearly unsound.
-//!
-//! However, it is not always unsafe to freeze the base pointer. In
-//! particular, if the referent is frozen, there is no harm in it:
-//!
-//! ```
-//! // src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs
-//! fn foo<'a>(mut t0: &'a mut int,
-//!            mut t1: &'a mut int) {
-//!     let p: &int = &*t0; // Freezes `*t0`
-//!     let mut t2 = &t0;
-//!     let q: &int = &*t2; // Freezes `*t0`, but that's ok...
-//!     let r: &int = &*t0; // ...after all, could do same thing directly.
-//! }
-//! ```
-//!
-//! In this case, creating the alias `t2` of `t0` is safe because the only
-//! thing `t2` can be used for is to further freeze `*t0`, which is
-//! already frozen. In particular, we cannot assign to `*t0` through the
-//! new alias `t2`, as demonstrated in this test case:
-//!
-//! ```
-//! // src/test/run-pass/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
-//! fn foo(t0: & &mut int) {
-//!     let t1 = t0;
-//!     let p: &int = &**t0;
-//!     **t1 = 22; //~ ERROR cannot assign
-//! }
-//! ```
-//!
-//! This distinction is reflected in the rules. When doing an `&mut`
-//! borrow -- as in the first example -- the set `ACTIONS` will be
-//! `CLAIM|MUTATE|FREEZE`, because claiming the referent implies that it
-//! cannot be claimed, mutated, or frozen by anyone else. These
-//! restrictions are propagated back to the base path and hence the base
-//! path is considered unfreezable.
-//!
-//! In contrast, when the referent is merely frozen -- as in the second
-//! example -- the set `ACTIONS` will be `CLAIM|MUTATE`, because freezing
-//! the referent implies that it cannot be claimed or mutated but permits
-//! others to freeze. Hence when these restrictions are propagated back to
-//! the base path, it will still be considered freezable.
-//!
-//!
-//!
-//! **FIXME #10520: Restrictions against mutating the base pointer.** When
-//! an `&mut` pointer is frozen or claimed, we currently pass along the
-//! restriction against MUTATE to the base pointer. I do not believe this
-//! restriction is needed. It dates from the days when we had a way to
-//! mutate that preserved the value being mutated (i.e., swap). Nowadays
-//! the only form of mutation is assignment, which destroys the pointer
-//! being mutated -- therefore, a mutation cannot create a new path to the
-//! same data. Rather, it removes an existing path. This implies that not
-//! only can we permit mutation, we can have mutation kill restrictions in
-//! the dataflow sense.
-//!
-//! **WARNING:** We do not currently have `const` borrows in the
-//! language. If they are added back in, we must ensure that they are
-//! consistent with all of these examples. The crucial question will be
-//! what sorts of actions are permitted with a `&const &mut` pointer. I
-//! would suggest that an `&mut` referent found in an `&const` location be
-//! prohibited from both freezes and claims. This would avoid the need to
-//! prevent `const` borrows of the base pointer when the referent is
-//! borrowed.
-//!
-//! # Moves and initialization
-//!
-//! The borrow checker is also in charge of ensuring that:
-//!
-//! - all memory which is accessed is initialized
-//! - immutable local variables are assigned at most once.
-//!
-//! These are two separate dataflow analyses built on the same
-//! framework. Let's look at checking that memory is initialized first;
-//! the checking of immutable local variable assignments works in a very
-//! similar way.
-//!
-//! To track the initialization of memory, we actually track all the
-//! points in the program that *create uninitialized memory*, meaning
-//! moves and the declaration of uninitialized variables. For each of
-//! these points, we create a bit in the dataflow set. Assignments to a
-//! variable `x` or path `a.b.c` kill the move/uninitialization bits for
-//! those paths and any subpaths (e.g., `x`, `x.y`, `a.b.c`, `*a.b.c`).
-//! Bits are unioned when two control-flow paths join. Thus, the
-//! presence of a bit indicates that the move may have occurred without an
-//! intervening assignment to the same memory. At each use of a variable,
-//! we examine the bits in scope, and check that none of them are
-//! moves/uninitializations of the variable that is being used.
-//!
-//! Let's look at a simple example:
-//!
-//! ```
-//! fn foo(a: Box<int>) {
-//!     let b: Box<int>;   // Gen bit 0.
-//!
-//!     if cond {          // Bits: 0
-//!         use(&*a);
-//!         b = a;         // Gen bit 1, kill bit 0.
-//!         use(&*b);
-//!     } else {
-//!                        // Bits: 0
-//!     }
-//!                        // Bits: 0,1
-//!     use(&*a);          // Error.
-//!     use(&*b);          // Error.
-//! }
-//!
-//! fn use(a: &int) { }
-//! ```
-//!
-//! In this example, the variable `b` is created uninitialized. In one
-//! branch of an `if`, we then move the variable `a` into `b`. Once we
-//! exit the `if`, therefore, it is an error to use `a` or `b` since both
-//! are only conditionally initialized. I have annotated the dataflow
-//! state using comments. There are two dataflow bits, with bit 0
-//! corresponding to the creation of `b` without an initializer, and bit 1
-//! corresponding to the move of `a`. The assignment `b = a` both
-//! generates bit 1, because it is a move of `a`, and kills bit 0, because
-//! `b` is now initialized. On the else branch, though, `b` is never
-//! initialized, and so bit 0 remains untouched. When the two flows of
-//! control join, we union the bits from both sides, resulting in both
-//! bits 0 and 1 being set. Thus any attempt to use `a` uncovers the bit 1
-//! from the "then" branch, showing that `a` may be moved, and any attempt
-//! to use `b` uncovers bit 0, from the "else" branch, showing that `b`
-//! may not be initialized.
-//!
-//! ## Initialization of immutable variables
-//!
-//! Initialization of immutable variables works in a very similar way,
-//! except that:
-//!
-//! 1. we generate bits for each assignment to a variable;
-//! 2. the bits are never killed except when the variable goes out of scope.
-//!
-//! Thus the presence of an assignment bit indicates that the assignment
-//! may have occurred. Note that assignments are only killed when the
-//! variable goes out of scope, as it is not relevant whether or not there
-//! has been a move in the meantime. Using these bits, we can declare that
-//! an assignment to an immutable variable is legal iff there is no other
-//! assignment bit to that same variable in scope.
-//!
-//! ## Why is the design made this way?
-//!
-//! It may seem surprising that we assign dataflow bits to *each move*
-//! rather than *each path being moved*. This is somewhat less efficient,
-//! since on each use, we must iterate through all moves and check whether
-//! any of them correspond to the path in question. Similar concerns apply
-//! to the analysis for double assignments to immutable variables. The
-//! main reason to do it this way is that it allows us to print better
-//! error messages, because when a use occurs, we can print out the
-//! precise move that may be in scope, rather than simply having to say
-//! "the variable may not be initialized".
-//!
-//! ## Data structures used in the move analysis
-//!
-//! The move analysis maintains several data structures that enable it to
-//! cross-reference moves and assignments to determine when they may be
-//! moving/assigning the same memory. These are all collected into the
-//! `MoveData` and `FlowedMoveData` structs. The former represents the set
-//! of move paths, moves, and assignments, and the latter adds in the
-//! results of a dataflow computation.
-//!
-//! ### Move paths
-//!
-//! The `MovePath` tree tracks every path that is moved or assigned to.
-//! These paths have the same form as the `LoanPath` data structure, which
-//! in turn is the "real world version of the lvalues `LV` that we
-//! introduced earlier. The difference between a `MovePath` and a `LoanPath`
-//! is that move paths are:
-//!
-//! 1. Canonicalized, so that we have exactly one copy of each, and
-//!    we can refer to move paths by index;
-//! 2. Cross-referenced with other paths into a tree, so that given a move
-//!    path we can efficiently find all parent move paths and all
-//!    extensions (e.g., given the `a.b` move path, we can easily find the
-//!    move path `a` and also the move paths `a.b.c`)
-//! 3. Cross-referenced with moves and assignments, so that we can
-//!    easily find all moves and assignments to a given path.
-//!
-//! The mechanism that we use is to create a `MovePath` record for each
-//! move path. These are arranged in an array and are referenced using
-//! `MovePathIndex` values, which are newtype'd indices. The `MovePath`
-//! structs are arranged into a tree, representing using the standard
-//! Knuth representation where each node has a child 'pointer' and a "next
-//! sibling" 'pointer'. In addition, each `MovePath` has a parent
-//! 'pointer'.  In this case, the 'pointers' are just `MovePathIndex`
-//! values.
-//!
-//! In this way, if we want to find all base paths of a given move path,
-//! we can just iterate up the parent pointers (see `each_base_path()` in
-//! the `move_data` module). If we want to find all extensions, we can
-//! iterate through the subtree (see `each_extending_path()`).
-//!
-//! ### Moves and assignments
-//!
-//! There are structs to represent moves (`Move`) and assignments
-//! (`Assignment`), and these are also placed into arrays and referenced
-//! by index. All moves of a particular path are arranged into a linked
-//! lists, beginning with `MovePath.first_move` and continuing through
-//! `Move.next_move`.
-//!
-//! We distinguish between "var" assignments, which are assignments to a
-//! variable like `x = foo`, and "path" assignments (`x.f = foo`).  This
-//! is because we need to assign dataflows to the former, but not the
-//! latter, so as to check for double initialization of immutable
-//! variables.
-//!
-//! ### Gathering and checking moves
-//!
-//! Like loans, we distinguish two phases. The first, gathering, is where
-//! we uncover all the moves and assignments. As with loans, we do some
-//! basic sanity checking in this phase, so we'll report errors if you
-//! attempt to move out of a borrowed pointer etc. Then we do the dataflow
-//! (see `FlowedMoveData::new`). Finally, in the `check_loans.rs` code, we
-//! walk back over, identify all uses, assignments, and captures, and
-//! check that they are legal given the set of dataflow bits we have
-//! computed for that program point.
-//!
-//! # Drop flags and structural fragments
-//!
-//! In addition to the job of enforcing memory safety, the borrow checker
-//! code is also responsible for identifying the *structural fragments* of
-//! data in the function, to support out-of-band dynamic drop flags
-//! allocated on the stack. (For background, see [RFC PR #320].)
-//!
-//! [RFC PR #320]: https://github.com/rust-lang/rfcs/pull/320
-//!
-//! Semantically, each piece of data that has a destructor may need a
-//! boolean flag to indicate whether or not its destructor has been run
-//! yet. However, in many cases there is no need to actually maintain such
-//! a flag: It can be apparent from the code itself that a given path is
-//! always initialized (or always deinitialized) when control reaches the
-//! end of its owner's scope, and thus we can unconditionally emit (or
-//! not) the destructor invocation for that path.
-//!
-//! A simple example of this is the following:
-//!
-//! ```rust
-//! struct D { p: int }
-//! impl D { fn new(x: int) -> D { ... }
-//! impl Drop for D { ... }
-//!
-//! fn foo(a: D, b: D, t: || -> bool) {
-//!     let c: D;
-//!     let d: D;
-//!     if t() { c = b; }
-//! }
-//! ```
-//!
-//! At the end of the body of `foo`, the compiler knows that `a` is
-//! initialized, introducing a drop obligation (deallocating the boxed
-//! integer) for the end of `a`'s scope that is run unconditionally.
-//! Likewise the compiler knows that `d` is not initialized, and thus it
-//! leave out the drop code for `d`.
-//!
-//! The compiler cannot statically know the drop-state of `b` nor `c` at
-//! the end of their scope, since that depends on the value of
-//! `t`. Therefore, we need to insert boolean flags to track whether we
-//! need to drop `b` and `c`.
-//!
-//! However, the matter is not as simple as just mapping local variables
-//! to their corresponding drop flags when necessary. In particular, in
-//! addition to being able to move data out of local variables, Rust
-//! allows one to move values in and out of structured data.
-//!
-//! Consider the following:
-//!
-//! ```rust
-//! struct S { x: D, y: D, z: D }
-//!
-//! fn foo(a: S, mut b: S, t: || -> bool) {
-//!     let mut c: S;
-//!     let d: S;
-//!     let e: S = a.clone();
-//!     if t() {
-//!         c = b;
-//!         b.x = e.y;
-//!     }
-//!     if t() { c.y = D::new(4); }
-//! }
-//! ```
-//!
-//! As before, the drop obligations of `a` and `d` can be statically
-//! determined, and again the state of `b` and `c` depend on dynamic
-//! state. But additionally, the dynamic drop obligations introduced by
-//! `b` and `c` are not just per-local boolean flags. For example, if the
-//! first call to `t` returns `false` and the second call `true`, then at
-//! the end of their scope, `b` will be completely initialized, but only
-//! `c.y` in `c` will be initialized.  If both calls to `t` return `true`,
-//! then at the end of their scope, `c` will be completely initialized,
-//! but only `b.x` will be initialized in `b`, and only `e.x` and `e.z`
-//! will be initialized in `e`.
-//!
-//! Note that we need to cover the `z` field in each case in some way,
-//! since it may (or may not) need to be dropped, even though `z` is never
-//! directly mentioned in the body of the `foo` function. We call a path
-//! like `b.z` a *fragment sibling* of `b.x`, since the field `z` comes
-//! from the same structure `S` that declared the field `x` in `b.x`.
-//!
-//! In general we need to maintain boolean flags that match the
-//! `S`-structure of both `b` and `c`.  In addition, we need to consult
-//! such a flag when doing an assignment (such as `c.y = D::new(4);`
-//! above), in order to know whether or not there is a previous value that
-//! needs to be dropped before we do the assignment.
-//!
-//! So for any given function, we need to determine what flags are needed
-//! to track its drop obligations. Our strategy for determining the set of
-//! flags is to represent the fragmentation of the structure explicitly:
-//! by starting initially from the paths that are explicitly mentioned in
-//! moves and assignments (such as `b.x` and `c.y` above), and then
-//! traversing the structure of the path's type to identify leftover
-//! *unmoved fragments*: assigning into `c.y` means that `c.x` and `c.z`
-//! are leftover unmoved fragments. Each fragment represents a drop
-//! obligation that may need to be tracked. Paths that are only moved or
-//! assigned in their entirety (like `a` and `d`) are treated as a single
-//! drop obligation.
-//!
-//! The fragment construction process works by piggy-backing on the
-//! existing `move_data` module. We already have callbacks that visit each
-//! direct move and assignment; these form the basis for the sets of
-//! moved_leaf_paths and assigned_leaf_paths. From these leaves, we can
-//! walk up their parent chain to identify all of their parent paths.
-//! We need to identify the parents because of cases like the following:
-//!
-//! ```rust
-//! struct Pair<X,Y>{ x: X, y: Y }
-//! fn foo(dd_d_d: Pair<Pair<Pair<D, D>, D>, D>) {
-//!     other_function(dd_d_d.x.y);
-//! }
-//! ```
-//!
-//! In this code, the move of the path `dd_d.x.y` leaves behind not only
-//! the fragment drop-obligation `dd_d.x.x` but also `dd_d.y` as well.
-//!
-//! Once we have identified the directly-referenced leaves and their
-//! parents, we compute the left-over fragments, in the function
-//! `fragments::add_fragment_siblings`. As of this writing this works by
-//! looking at each directly-moved or assigned path P, and blindly
-//! gathering all sibling fields of P (as well as siblings for the parents
-//! of P, etc). After accumulating all such siblings, we filter out the
-//! entries added as siblings of P that turned out to be
-//! directly-referenced paths (or parents of directly referenced paths)
-//! themselves, thus leaving the never-referenced "left-overs" as the only
-//! thing left from the gathering step.
-//!
-//! ## Array structural fragments
-//!
-//! A special case of the structural fragments discussed above are
-//! the elements of an array that has been passed by value, such as
-//! the following:
-//!
-//! ```rust
-//! fn foo(a: [D, ..10], i: uint) -> D {
-//!     a[i]
-//! }
-//! ```
-//!
-//! The above code moves a single element out of the input array `a`.
-//! The remainder of the array still needs to be dropped; i.e., it
-//! is a structural fragment. Note that after performing such a move,
-//! it is not legal to read from the array `a`. There are a number of
-//! ways to deal with this, but the important thing to note is that
-//! the semantics needs to distinguish in some manner between a
-//! fragment that is the *entire* array versus a fragment that represents
-//! all-but-one element of the array.  A place where that distinction
-//! would arise is the following:
-//!
-//! ```rust
-//! fn foo(a: [D, ..10], b: [D, ..10], i: uint, t: bool) -> D {
-//!     if t {
-//!         a[i]
-//!     } else {
-//!         b[i]
-//!     }
-//!
-//!     // When control exits, we will need either to drop all of `a`
-//!     // and all-but-one of `b`, or to drop all of `b` and all-but-one
-//!     // of `a`.
-//! }
-//! ```
-//!
-//! There are a number of ways that the trans backend could choose to
-//! compile this (e.g. a `[bool, ..10]` array for each such moved array;
-//! or an `Option<uint>` for each moved array).  From the viewpoint of the
-//! borrow-checker, the important thing is to record what kind of fragment
-//! is implied by the relevant moves.
-//!
-//! # Future work
-//!
-//! While writing up these docs, I encountered some rules I believe to be
-//! stricter than necessary:
-//!
-//! - I think restricting the `&mut` LV against moves and `ALIAS` is sufficient,
-//!   `MUTATE` and `CLAIM` are overkill. `MUTATE` was necessary when swap was
-//!   a built-in operator, but as it is not, it is implied by `CLAIM`,
-//!   and `CLAIM` is implied by `ALIAS`. The only net effect of this is an
-//!   extra error message in some cases, though.
-//! - I have not described how closures interact. Current code is unsound.
-//!   I am working on describing and implementing the fix.
-//! - If we wish, we can easily extend the move checking to allow finer-grained
-//!   tracking of what is initialized and what is not, enabling code like
-//!   this:
-//!
-//!       a = x.f.g; // x.f.g is now uninitialized
-//!       // here, x and x.f are not usable, but x.f.h *is*
-//!       x.f.g = b; // x.f.g is not initialized
-//!       // now x, x.f, x.f.g, x.f.h are all usable
-//!
-//!   What needs to change here, most likely, is that the `moves` module
-//!   should record not only what paths are moved, but what expressions
-//!   are actual *uses*. For example, the reference to `x` in `x.f.g = b`
-//!   is not a true *use* in the sense that it requires `x` to be fully
-//!   initialized. This is in fact why the above code produces an error
-//!   today: the reference to `x` in `x.f.g = b` is considered illegal
-//!   because `x` is not fully initialized.
-//!
-//! There are also some possible refactorings:
-//!
-//! - It might be nice to replace all loan paths with the MovePath mechanism,
-//!   since they allow lightweight comparison using an integer.
diff --git a/src/librustc/middle/borrowck/fragments.rs b/src/librustc/middle/borrowck/fragments.rs
deleted file mode 100644 (file)
index 5785972..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Helper routines used for fragmenting structural paths due to moves for
-//! tracking drop obligations. Please see the extensive comments in the
-//! section "Structural fragments" in `doc.rs`.
-
-use self::Fragment::*;
-
-use session::config;
-use middle::borrowck::{LoanPath};
-use middle::borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
-use middle::borrowck::LoanPathElem::{LpDeref, LpInterior};
-use middle::borrowck::move_data::{InvalidMovePathIndex};
-use middle::borrowck::move_data::{MoveData, MovePathIndex};
-use middle::ty;
-use middle::mem_categorization as mc;
-use util::ppaux::{Repr, UserString};
-
-use std::mem;
-use std::rc::Rc;
-use std::slice;
-use syntax::ast;
-use syntax::ast_map;
-use syntax::attr::AttrMetaMethods;
-use syntax::codemap::Span;
-
-#[deriving(PartialEq, Eq, PartialOrd, Ord)]
-enum Fragment {
-    // This represents the path described by the move path index
-    Just(MovePathIndex),
-
-    // This represents the collection of all but one of the elements
-    // from an array at the path described by the move path index.
-    // Note that attached MovePathIndex should have mem_categorization
-    // of InteriorElement (i.e. array dereference `[]`).
-    AllButOneFrom(MovePathIndex),
-}
-
-impl Fragment {
-    fn loan_path_repr<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
-        let repr = |mpi| move_data.path_loan_path(mpi).repr(tcx);
-        match *self {
-            Just(mpi) => repr(mpi),
-            AllButOneFrom(mpi) => format!("$(allbutone {})", repr(mpi)),
-        }
-    }
-
-    fn loan_path_user_string<'tcx>(&self,
-                                   move_data: &MoveData<'tcx>,
-                                   tcx: &ty::ctxt<'tcx>) -> String {
-        let user_string = |mpi| move_data.path_loan_path(mpi).user_string(tcx);
-        match *self {
-            Just(mpi) => user_string(mpi),
-            AllButOneFrom(mpi) => format!("$(allbutone {})", user_string(mpi)),
-        }
-    }
-}
-
-pub struct FragmentSets {
-    /// During move_data construction, `moved_leaf_paths` tracks paths
-    /// that have been used directly by being moved out of.  When
-    /// move_data construction has been completed, `moved_leaf_paths`
-    /// tracks such paths that are *leaf fragments* (e.g. `a.j` if we
-    /// never move out any child like `a.j.x`); any parent paths
-    /// (e.g. `a` for the `a.j` example) are moved over to
-    /// `parents_of_fragments`.
-    moved_leaf_paths: Vec<MovePathIndex>,
-
-    /// `assigned_leaf_paths` tracks paths that have been used
-    /// directly by being overwritten, but is otherwise much like
-    /// `moved_leaf_paths`.
-    assigned_leaf_paths: Vec<MovePathIndex>,
-
-    /// `parents_of_fragments` tracks paths that are definitely
-    /// parents of paths that have been moved.
-    ///
-    /// FIXME(pnkfelix) probably do not want/need
-    /// `parents_of_fragments` at all, if we can avoid it.
-    ///
-    /// Update: I do not see a way to to avoid it.  Maybe just remove
-    /// above fixme, or at least document why doing this may be hard.
-    parents_of_fragments: Vec<MovePathIndex>,
-
-    /// During move_data construction (specifically the
-    /// fixup_fragment_sets call), `unmoved_fragments` tracks paths
-    /// that have been "left behind" after a sibling has been moved or
-    /// assigned.  When move_data construction has been completed,
-    /// `unmoved_fragments` tracks paths that were *only* results of
-    /// being left-behind, and never directly moved themselves.
-    unmoved_fragments: Vec<Fragment>,
-}
-
-impl FragmentSets {
-    pub fn new() -> FragmentSets {
-        FragmentSets {
-            unmoved_fragments: Vec::new(),
-            moved_leaf_paths: Vec::new(),
-            assigned_leaf_paths: Vec::new(),
-            parents_of_fragments: Vec::new(),
-        }
-    }
-
-    pub fn add_move(&mut self, path_index: MovePathIndex) {
-        self.moved_leaf_paths.push(path_index);
-    }
-
-    pub fn add_assignment(&mut self, path_index: MovePathIndex) {
-        self.assigned_leaf_paths.push(path_index);
-    }
-}
-
-pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
-                                       tcx: &ty::ctxt<'tcx>,
-                                       sp: Span,
-                                       id: ast::NodeId) {
-    let (span_err, print) = {
-        let attrs : &[ast::Attribute];
-        attrs = match tcx.map.find(id) {
-            Some(ast_map::NodeItem(ref item)) =>
-                item.attrs.as_slice(),
-            Some(ast_map::NodeImplItem(&ast::MethodImplItem(ref m))) =>
-                m.attrs.as_slice(),
-            Some(ast_map::NodeTraitItem(&ast::ProvidedMethod(ref m))) =>
-                m.attrs.as_slice(),
-            _ => [].as_slice(),
-        };
-
-        let span_err =
-            attrs.iter().any(|a| a.check_name("rustc_move_fragments"));
-        let print = tcx.sess.debugging_opt(config::PRINT_MOVE_FRAGMENTS);
-
-        (span_err, print)
-    };
-
-    if !span_err && !print { return; }
-
-    let instrument_all_paths = |kind, vec_rc: &Vec<MovePathIndex>| {
-        for (i, mpi) in vec_rc.iter().enumerate() {
-            let render = || this.path_loan_path(*mpi).user_string(tcx);
-            if span_err {
-                tcx.sess.span_err(sp, format!("{}: `{}`", kind, render()).as_slice());
-            }
-            if print {
-                println!("id:{} {}[{}] `{}`", id, kind, i, render());
-            }
-        }
-    };
-
-    let instrument_all_fragments = |kind, vec_rc: &Vec<Fragment>| {
-        for (i, f) in vec_rc.iter().enumerate() {
-            let render = || f.loan_path_user_string(this, tcx);
-            if span_err {
-                tcx.sess.span_err(sp, format!("{}: `{}`", kind, render()).as_slice());
-            }
-            if print {
-                println!("id:{} {}[{}] `{}`", id, kind, i, render());
-            }
-        }
-    };
-
-    let fragments = this.fragments.borrow();
-    instrument_all_paths("moved_leaf_path", &fragments.moved_leaf_paths);
-    instrument_all_fragments("unmoved_fragment", &fragments.unmoved_fragments);
-    instrument_all_paths("parent_of_fragments", &fragments.parents_of_fragments);
-    instrument_all_paths("assigned_leaf_path", &fragments.assigned_leaf_paths);
-}
-
-/// Normalizes the fragment sets in `this`; i.e., removes duplicate entries, constructs the set of
-/// parents, and constructs the left-over fragments.
-///
-/// Note: "left-over fragments" means paths that were not directly referenced in moves nor
-/// assignments, but must nonetheless be tracked as potential drop obligations.
-pub fn fixup_fragment_sets<'tcx>(this: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) {
-
-    let mut fragments = this.fragments.borrow_mut();
-
-    // Swap out contents of fragments so that we can modify the fields
-    // without borrowing the common fragments.
-    let mut unmoved = mem::replace(&mut fragments.unmoved_fragments, vec![]);
-    let mut parents = mem::replace(&mut fragments.parents_of_fragments, vec![]);
-    let mut moved = mem::replace(&mut fragments.moved_leaf_paths, vec![]);
-    let mut assigned = mem::replace(&mut fragments.assigned_leaf_paths, vec![]);
-
-    let path_lps = |mpis: &[MovePathIndex]| -> Vec<String> {
-        mpis.iter().map(|mpi| this.path_loan_path(*mpi).repr(tcx)).collect()
-    };
-
-    let frag_lps = |fs: &[Fragment]| -> Vec<String> {
-        fs.iter().map(|f| f.loan_path_repr(this, tcx)).collect()
-    };
-
-    // First, filter out duplicates
-    moved.sort();
-    moved.dedup();
-    debug!("fragments 1 moved: {}", path_lps(moved.as_slice()));
-
-    assigned.sort();
-    assigned.dedup();
-    debug!("fragments 1 assigned: {}", path_lps(assigned.as_slice()));
-
-    // Second, build parents from the moved and assigned.
-    for m in moved.iter() {
-        let mut p = this.path_parent(*m);
-        while p != InvalidMovePathIndex {
-            parents.push(p);
-            p = this.path_parent(p);
-        }
-    }
-    for a in assigned.iter() {
-        let mut p = this.path_parent(*a);
-        while p != InvalidMovePathIndex {
-            parents.push(p);
-            p = this.path_parent(p);
-        }
-    }
-
-    parents.sort();
-    parents.dedup();
-    debug!("fragments 2 parents: {}", path_lps(parents.as_slice()));
-
-    // Third, filter the moved and assigned fragments down to just the non-parents
-    moved.retain(|f| non_member(*f, parents.as_slice()));
-    debug!("fragments 3 moved: {}", path_lps(moved.as_slice()));
-
-    assigned.retain(|f| non_member(*f, parents.as_slice()));
-    debug!("fragments 3 assigned: {}", path_lps(assigned.as_slice()));
-
-    // Fourth, build the leftover from the moved, assigned, and parents.
-    for m in moved.iter() {
-        let lp = this.path_loan_path(*m);
-        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
-    }
-    for a in assigned.iter() {
-        let lp = this.path_loan_path(*a);
-        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
-    }
-    for p in parents.iter() {
-        let lp = this.path_loan_path(*p);
-        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
-    }
-
-    unmoved.sort();
-    unmoved.dedup();
-    debug!("fragments 4 unmoved: {}", frag_lps(unmoved.as_slice()));
-
-    // Fifth, filter the leftover fragments down to its core.
-    unmoved.retain(|f| match *f {
-        AllButOneFrom(_) => true,
-        Just(mpi) => non_member(mpi, parents.as_slice()) &&
-            non_member(mpi, moved.as_slice()) &&
-            non_member(mpi, assigned.as_slice())
-    });
-    debug!("fragments 5 unmoved: {}", frag_lps(unmoved.as_slice()));
-
-    // Swap contents back in.
-    fragments.unmoved_fragments = unmoved;
-    fragments.parents_of_fragments = parents;
-    fragments.moved_leaf_paths = moved;
-    fragments.assigned_leaf_paths = assigned;
-
-    return;
-
-    fn non_member(elem: MovePathIndex, set: &[MovePathIndex]) -> bool {
-        match set.binary_search_elem(&elem) {
-            slice::BinarySearchResult::Found(_) => false,
-            slice::BinarySearchResult::NotFound(_) => true,
-        }
-    }
-}
-
-/// Adds all of the precisely-tracked siblings of `lp` as potential move paths of interest. For
-/// example, if `lp` represents `s.x.j`, then adds moves paths for `s.x.i` and `s.x.k`, the
-/// siblings of `s.x.j`.
-fn add_fragment_siblings<'tcx>(this: &MoveData<'tcx>,
-                               tcx: &ty::ctxt<'tcx>,
-                               gathered_fragments: &mut Vec<Fragment>,
-                               lp: Rc<LoanPath<'tcx>>,
-                               origin_id: Option<ast::NodeId>) {
-    match lp.kind {
-        LpVar(_) | LpUpvar(..) => {} // Local variables have no siblings.
-
-        // Consuming a downcast is like consuming the original value, so propage inward.
-        LpDowncast(ref loan_parent, _) => {
-            add_fragment_siblings(this, tcx, gathered_fragments, loan_parent.clone(), origin_id);
-        }
-
-        // *LV for OwnedPtr consumes the contents of the box (at
-        // least when it is non-copy...), so propagate inward.
-        LpExtend(ref loan_parent, _, LpDeref(mc::OwnedPtr)) => {
-            add_fragment_siblings(this, tcx, gathered_fragments, loan_parent.clone(), origin_id);
-        }
-
-        // *LV for unsafe and borrowed pointers do not consume their loan path, so stop here.
-        LpExtend(_, _, LpDeref(mc::UnsafePtr(..)))   |
-        LpExtend(_, _, LpDeref(mc::Implicit(..)))    |
-        LpExtend(_, _, LpDeref(mc::BorrowedPtr(..))) => {}
-
-        // FIXME(pnkfelix): LV[j] should be tracked, at least in the
-        // sense of we will track the remaining drop obligation of the
-        // rest of the array.
-        //
-        // LV[j] is not tracked precisely
-        LpExtend(_, _, LpInterior(mc::InteriorElement(_))) => {
-            let mp = this.move_path(tcx, lp.clone());
-            gathered_fragments.push(AllButOneFrom(mp));
-        }
-
-        // field access LV.x and tuple access LV#k are the cases
-        // we are interested in
-        LpExtend(ref loan_parent, mc,
-                 LpInterior(mc::InteriorField(ref field_name))) => {
-            let enum_variant_info = match loan_parent.kind {
-                LpDowncast(ref loan_parent_2, variant_def_id) =>
-                    Some((variant_def_id, loan_parent_2.clone())),
-                LpExtend(..) | LpVar(..) | LpUpvar(..) =>
-                    None,
-            };
-            add_fragment_siblings_for_extension(
-                this,
-                tcx,
-                gathered_fragments,
-                loan_parent, mc, field_name, &lp, origin_id, enum_variant_info);
-        }
-    }
-}
-
-/// We have determined that `origin_lp` destructures to LpExtend(parent, original_field_name).
-/// Based on this, add move paths for all of the siblings of `origin_lp`.
-fn add_fragment_siblings_for_extension<'tcx>(this: &MoveData<'tcx>,
-                                             tcx: &ty::ctxt<'tcx>,
-                                             gathered_fragments: &mut Vec<Fragment>,
-                                             parent_lp: &Rc<LoanPath<'tcx>>,
-                                             mc: mc::MutabilityCategory,
-                                             origin_field_name: &mc::FieldName,
-                                             origin_lp: &Rc<LoanPath<'tcx>>,
-                                             origin_id: Option<ast::NodeId>,
-                                             enum_variant_info: Option<(ast::DefId,
-                                                                        Rc<LoanPath<'tcx>>)>) {
-    let parent_ty = parent_lp.to_type();
-
-    let add_fragment_sibling_local = |field_name| {
-        add_fragment_sibling_core(
-            this, tcx, gathered_fragments, parent_lp.clone(), mc, field_name, origin_lp);
-    };
-
-    match (&parent_ty.sty, enum_variant_info) {
-        (&ty::ty_tup(ref v), None) => {
-            let tuple_idx = match *origin_field_name {
-                mc::PositionalField(tuple_idx) => tuple_idx,
-                mc::NamedField(_) =>
-                    panic!("tuple type {} should not have named fields.",
-                           parent_ty.repr(tcx)),
-            };
-            let tuple_len = v.len();
-            for i in range(0, tuple_len) {
-                if i == tuple_idx { continue }
-                let field_name = mc::PositionalField(i);
-                add_fragment_sibling_local(field_name);
-            }
-        }
-
-        (&ty::ty_struct(def_id, ref _substs), None) => {
-            let fields = ty::lookup_struct_fields(tcx, def_id);
-            match *origin_field_name {
-                mc::NamedField(ast_name) => {
-                    for f in fields.iter() {
-                        if f.name == ast_name {
-                            continue;
-                        }
-                        let field_name = mc::NamedField(f.name);
-                        add_fragment_sibling_local(field_name);
-                    }
-                }
-                mc::PositionalField(tuple_idx) => {
-                    for (i, _f) in fields.iter().enumerate() {
-                        if i == tuple_idx {
-                            continue
-                        }
-                        let field_name = mc::PositionalField(i);
-                        add_fragment_sibling_local(field_name);
-                    }
-                }
-            }
-        }
-
-        (&ty::ty_enum(enum_def_id, ref substs), ref enum_variant_info) => {
-            let variant_info = {
-                let mut variants = ty::substd_enum_variants(tcx, enum_def_id, substs);
-                match *enum_variant_info {
-                    Some((variant_def_id, ref _lp2)) =>
-                        variants.iter()
-                        .find(|variant| variant.id == variant_def_id)
-                        .expect("enum_variant_with_id(): no variant exists with that ID")
-                        .clone(),
-                    None => {
-                        assert_eq!(variants.len(), 1);
-                        variants.pop().unwrap()
-                    }
-                }
-            };
-            match *origin_field_name {
-                mc::NamedField(ast_name) => {
-                    let variant_arg_names = variant_info.arg_names.as_ref().unwrap();
-                    for variant_arg_ident in variant_arg_names.iter() {
-                        if variant_arg_ident.name == ast_name {
-                            continue;
-                        }
-                        let field_name = mc::NamedField(variant_arg_ident.name);
-                        add_fragment_sibling_local(field_name);
-                    }
-                }
-                mc::PositionalField(tuple_idx) => {
-                    let variant_arg_types = &variant_info.args;
-                    for (i, _variant_arg_ty) in variant_arg_types.iter().enumerate() {
-                        if tuple_idx == i {
-                            continue;
-                        }
-                        let field_name = mc::PositionalField(i);
-                        add_fragment_sibling_local(field_name);
-                    }
-                }
-            }
-        }
-
-        ref sty_and_variant_info => {
-            let msg = format!("type {} ({}) is not fragmentable",
-                              parent_ty.repr(tcx), sty_and_variant_info);
-            let opt_span = origin_id.and_then(|id|tcx.map.opt_span(id));
-            tcx.sess.opt_span_bug(opt_span, msg.as_slice())
-        }
-    }
-}
-
-/// Adds the single sibling `LpExtend(parent, new_field_name)` of `origin_lp` (the original
-/// loan-path).
-fn add_fragment_sibling_core<'tcx>(this: &MoveData<'tcx>,
-                                   tcx: &ty::ctxt<'tcx>,
-                                   gathered_fragments: &mut Vec<Fragment>,
-                                   parent: Rc<LoanPath<'tcx>>,
-                                   mc: mc::MutabilityCategory,
-                                   new_field_name: mc::FieldName,
-                                   origin_lp: &Rc<LoanPath<'tcx>>) -> MovePathIndex {
-    let opt_variant_did = match parent.kind {
-        LpDowncast(_, variant_did) => Some(variant_did),
-        LpVar(..) | LpUpvar(..) | LpExtend(..) => None,
-    };
-
-    let loan_path_elem = LpInterior(mc::InteriorField(new_field_name));
-    let new_lp_type = match new_field_name {
-        mc::NamedField(ast_name) =>
-            ty::named_element_ty(tcx, parent.to_type(), ast_name, opt_variant_did),
-        mc::PositionalField(idx) =>
-            ty::positional_element_ty(tcx, parent.to_type(), idx, opt_variant_did),
-    };
-    let new_lp_variant = LpExtend(parent, mc, loan_path_elem);
-    let new_lp = LoanPath::new(new_lp_variant, new_lp_type.unwrap());
-    debug!("add_fragment_sibling_core(new_lp={}, origin_lp={})",
-           new_lp.repr(tcx), origin_lp.repr(tcx));
-    let mp = this.move_path(tcx, Rc::new(new_lp));
-
-    // Do not worry about checking for duplicates here; we will sort
-    // and dedup after all are added.
-    gathered_fragments.push(Just(mp));
-
-    mp
-}
diff --git a/src/librustc/middle/borrowck/gather_loans/gather_moves.rs b/src/librustc/middle/borrowck/gather_loans/gather_moves.rs
deleted file mode 100644 (file)
index 6511416..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Computes moves.
-
-use middle::borrowck::*;
-use middle::borrowck::LoanPathKind::*;
-use middle::borrowck::gather_loans::move_error::MoveSpanAndPath;
-use middle::borrowck::gather_loans::move_error::{MoveError, MoveErrorCollector};
-use middle::borrowck::move_data::*;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::ty;
-use syntax::ast;
-use syntax::codemap::Span;
-use util::ppaux::Repr;
-
-use std::rc::Rc;
-
-struct GatherMoveInfo<'tcx> {
-    id: ast::NodeId,
-    kind: MoveKind,
-    cmt: mc::cmt<'tcx>,
-    span_path_opt: Option<MoveSpanAndPath>
-}
-
-pub fn gather_decl<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                             move_data: &MoveData<'tcx>,
-                             decl_id: ast::NodeId,
-                             _decl_span: Span,
-                             var_id: ast::NodeId) {
-    let ty = ty::node_id_to_type(bccx.tcx, var_id);
-    let loan_path = Rc::new(LoanPath::new(LpVar(var_id), ty));
-    move_data.add_move(bccx.tcx, loan_path, decl_id, Declared);
-}
-
-pub fn gather_move_from_expr<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                       move_data: &MoveData<'tcx>,
-                                       move_error_collector: &MoveErrorCollector<'tcx>,
-                                       move_expr_id: ast::NodeId,
-                                       cmt: mc::cmt<'tcx>,
-                                       move_reason: euv::MoveReason) {
-    let kind = match move_reason {
-        euv::DirectRefMove | euv::PatBindingMove => MoveExpr,
-        euv::CaptureMove => Captured
-    };
-    let move_info = GatherMoveInfo {
-        id: move_expr_id,
-        kind: kind,
-        cmt: cmt,
-        span_path_opt: None,
-    };
-    gather_move(bccx, move_data, move_error_collector, move_info);
-}
-
-pub fn gather_match_variant<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                      move_data: &MoveData<'tcx>,
-                                      _move_error_collector: &MoveErrorCollector<'tcx>,
-                                      move_pat: &ast::Pat,
-                                      cmt: mc::cmt<'tcx>,
-                                      mode: euv::MatchMode) {
-    let tcx = bccx.tcx;
-    debug!("gather_match_variant(move_pat={}, cmt={}, mode={})",
-           move_pat.id, cmt.repr(tcx), mode);
-
-    let opt_lp = opt_loan_path(&cmt);
-    match opt_lp {
-        Some(lp) => {
-            match lp.kind {
-                LpDowncast(ref base_lp, _) =>
-                    move_data.add_variant_match(
-                        tcx, lp.clone(), move_pat.id, base_lp.clone(), mode),
-                _ => panic!("should only call gather_match_variant \
-                             for cat_downcast cmt"),
-            }
-        }
-        None => {
-            // We get None when input to match is non-path (e.g.
-            // temporary result like a function call). Since no
-            // loan-path is being matched, no need to record a
-            // downcast.
-            return;
-        }
-    }
-}
-
-pub fn gather_move_from_pat<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                      move_data: &MoveData<'tcx>,
-                                      move_error_collector: &MoveErrorCollector<'tcx>,
-                                      move_pat: &ast::Pat,
-                                      cmt: mc::cmt<'tcx>) {
-    let pat_span_path_opt = match move_pat.node {
-        ast::PatIdent(_, ref path1, _) => {
-            Some(MoveSpanAndPath{span: move_pat.span,
-                                 ident: path1.node})
-        },
-        _ => None,
-    };
-    let move_info = GatherMoveInfo {
-        id: move_pat.id,
-        kind: MovePat,
-        cmt: cmt,
-        span_path_opt: pat_span_path_opt,
-    };
-    gather_move(bccx, move_data, move_error_collector, move_info);
-}
-
-fn gather_move<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                         move_data: &MoveData<'tcx>,
-                         move_error_collector: &MoveErrorCollector<'tcx>,
-                         move_info: GatherMoveInfo<'tcx>) {
-    debug!("gather_move(move_id={}, cmt={})",
-           move_info.id, move_info.cmt.repr(bccx.tcx));
-
-    let potentially_illegal_move =
-                check_and_get_illegal_move_origin(bccx, &move_info.cmt);
-    match potentially_illegal_move {
-        Some(illegal_move_origin) => {
-            debug!("illegal_move_origin={}", illegal_move_origin.repr(bccx.tcx));
-            let error = MoveError::with_move_info(illegal_move_origin,
-                                                  move_info.span_path_opt);
-            move_error_collector.add_error(error);
-            return
-        }
-        None => ()
-    }
-
-    match opt_loan_path(&move_info.cmt) {
-        Some(loan_path) => {
-            move_data.add_move(bccx.tcx, loan_path,
-                               move_info.id, move_info.kind);
-        }
-        None => {
-            // move from rvalue or unsafe pointer, hence ok
-        }
-    }
-}
-
-pub fn gather_assignment<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                   move_data: &MoveData<'tcx>,
-                                   assignment_id: ast::NodeId,
-                                   assignment_span: Span,
-                                   assignee_loan_path: Rc<LoanPath<'tcx>>,
-                                   assignee_id: ast::NodeId,
-                                   mode: euv::MutateMode) {
-    move_data.add_assignment(bccx.tcx,
-                             assignee_loan_path,
-                             assignment_id,
-                             assignment_span,
-                             assignee_id,
-                             mode);
-}
-
-fn check_and_get_illegal_move_origin<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                               cmt: &mc::cmt<'tcx>)
-                                               -> Option<mc::cmt<'tcx>> {
-    match cmt.cat {
-        mc::cat_deref(_, _, mc::BorrowedPtr(..)) |
-        mc::cat_deref(_, _, mc::Implicit(..)) |
-        mc::cat_deref(_, _, mc::UnsafePtr(..)) |
-        mc::cat_static_item => {
-            Some(cmt.clone())
-        }
-
-        mc::cat_rvalue(..) |
-        mc::cat_local(..) |
-        mc::cat_upvar(..) => {
-            None
-        }
-
-        mc::cat_downcast(ref b, _) |
-        mc::cat_interior(ref b, _) => {
-            match b.ty.sty {
-                ty::ty_struct(did, _) | ty::ty_enum(did, _) => {
-                    if ty::has_dtor(bccx.tcx, did) {
-                        Some(cmt.clone())
-                    } else {
-                        check_and_get_illegal_move_origin(bccx, b)
-                    }
-                }
-                _ => {
-                    check_and_get_illegal_move_origin(bccx, b)
-                }
-            }
-        }
-
-        mc::cat_deref(ref b, _, mc::OwnedPtr) => {
-            check_and_get_illegal_move_origin(bccx, b)
-        }
-    }
-}
diff --git a/src/librustc/middle/borrowck/gather_loans/lifetime.rs b/src/librustc/middle/borrowck/gather_loans/lifetime.rs
deleted file mode 100644 (file)
index e6a7c15..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This module implements the check that the lifetime of a borrow
-//! does not exceed the lifetime of the value being borrowed.
-
-use middle::borrowck::*;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::region;
-use middle::ty;
-use util::ppaux::Repr;
-use syntax::ast;
-use syntax::codemap::Span;
-
-type R = Result<(),()>;
-
-pub fn guarantee_lifetime<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                    item_scope: region::CodeExtent,
-                                    span: Span,
-                                    cause: euv::LoanCause,
-                                    cmt: mc::cmt<'tcx>,
-                                    loan_region: ty::Region,
-                                    _: ty::BorrowKind)
-                                    -> Result<(),()> {
-    //! Reports error if `loan_region` is larger than S
-    //! where S is `item_scope` if `cmt` is an upvar,
-    //! and is scope of `cmt` otherwise.
-    debug!("guarantee_lifetime(cmt={}, loan_region={})",
-           cmt.repr(bccx.tcx), loan_region.repr(bccx.tcx));
-    let ctxt = GuaranteeLifetimeContext {bccx: bccx,
-                                         item_scope: item_scope,
-                                         span: span,
-                                         cause: cause,
-                                         loan_region: loan_region,
-                                         cmt_original: cmt.clone()};
-    ctxt.check(&cmt, None)
-}
-
-///////////////////////////////////////////////////////////////////////////
-// Private
-
-struct GuaranteeLifetimeContext<'a, 'tcx: 'a> {
-    bccx: &'a BorrowckCtxt<'a, 'tcx>,
-
-    // the scope of the function body for the enclosing item
-    item_scope: region::CodeExtent,
-
-    span: Span,
-    cause: euv::LoanCause,
-    loan_region: ty::Region,
-    cmt_original: mc::cmt<'tcx>
-}
-
-impl<'a, 'tcx> GuaranteeLifetimeContext<'a, 'tcx> {
-
-    fn check(&self, cmt: &mc::cmt<'tcx>, discr_scope: Option<ast::NodeId>) -> R {
-        //! Main routine. Walks down `cmt` until we find the
-        //! "guarantor".  Reports an error if `self.loan_region` is
-        //! larger than scope of `cmt`.
-        debug!("guarantee_lifetime.check(cmt={}, loan_region={})",
-               cmt.repr(self.bccx.tcx),
-               self.loan_region.repr(self.bccx.tcx));
-
-        match cmt.cat {
-            mc::cat_rvalue(..) |
-            mc::cat_local(..) |                         // L-Local
-            mc::cat_upvar(..) |
-            mc::cat_deref(_, _, mc::BorrowedPtr(..)) |  // L-Deref-Borrowed
-            mc::cat_deref(_, _, mc::Implicit(..)) |
-            mc::cat_deref(_, _, mc::UnsafePtr(..)) => {
-                self.check_scope(self.scope(cmt))
-            }
-
-            mc::cat_static_item => {
-                Ok(())
-            }
-
-            mc::cat_downcast(ref base, _) |
-            mc::cat_deref(ref base, _, mc::OwnedPtr) |     // L-Deref-Send
-            mc::cat_interior(ref base, _) => {             // L-Field
-                self.check(base, discr_scope)
-            }
-        }
-    }
-
-    fn check_scope(&self, max_scope: ty::Region) -> R {
-        //! Reports an error if `loan_region` is larger than `max_scope`
-
-        if !self.bccx.is_subregion_of(self.loan_region, max_scope) {
-            Err(self.report_error(err_out_of_scope(max_scope, self.loan_region)))
-        } else {
-            Ok(())
-        }
-    }
-
-    fn scope(&self, cmt: &mc::cmt) -> ty::Region {
-        //! Returns the maximal region scope for the which the
-        //! lvalue `cmt` is guaranteed to be valid without any
-        //! rooting etc, and presuming `cmt` is not mutated.
-
-        // See the SCOPE(LV) function in doc.rs
-
-        match cmt.cat {
-            mc::cat_rvalue(temp_scope) => {
-                temp_scope
-            }
-            mc::cat_upvar(..) => {
-                ty::ReScope(self.item_scope)
-            }
-            mc::cat_static_item => {
-                ty::ReStatic
-            }
-            mc::cat_local(local_id) => {
-                ty::ReScope(self.bccx.tcx.region_maps.var_scope(local_id))
-            }
-            mc::cat_deref(_, _, mc::UnsafePtr(..)) => {
-                ty::ReStatic
-            }
-            mc::cat_deref(_, _, mc::BorrowedPtr(_, r)) |
-            mc::cat_deref(_, _, mc::Implicit(_, r)) => {
-                r
-            }
-            mc::cat_downcast(ref cmt, _) |
-            mc::cat_deref(ref cmt, _, mc::OwnedPtr) |
-            mc::cat_interior(ref cmt, _) => {
-                self.scope(cmt)
-            }
-        }
-    }
-
-    fn report_error(&self, code: bckerr_code) {
-        self.bccx.report(BckError { cmt: self.cmt_original.clone(),
-                                    span: self.span,
-                                    cause: self.cause,
-                                    code: code });
-    }
-}
diff --git a/src/librustc/middle/borrowck/gather_loans/mod.rs b/src/librustc/middle/borrowck/gather_loans/mod.rs
deleted file mode 100644 (file)
index ca9d4b5..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ----------------------------------------------------------------------
-// Gathering loans
-//
-// The borrow check proceeds in two phases. In phase one, we gather the full
-// set of loans that are required at any point.  These are sorted according to
-// their associated scopes.  In phase two, checking loans, we will then make
-// sure that all of these loans are honored.
-
-use middle::borrowck::*;
-use middle::borrowck::LoanPathKind::*;
-use middle::borrowck::move_data::MoveData;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::region;
-use middle::ty::ParameterEnvironment;
-use middle::ty;
-use util::ppaux::{Repr};
-
-use syntax::ast;
-use syntax::codemap::Span;
-use syntax::visit;
-use syntax::visit::Visitor;
-use syntax::ast::{Expr, FnDecl, Block, NodeId, Pat};
-
-mod lifetime;
-mod restrictions;
-mod gather_moves;
-mod move_error;
-
-pub fn gather_loans_in_fn<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                    fn_id: NodeId,
-                                    decl: &ast::FnDecl,
-                                    body: &ast::Block)
-                                    -> (Vec<Loan<'tcx>>,
-                                        move_data::MoveData<'tcx>) {
-    let mut glcx = GatherLoanCtxt {
-        bccx: bccx,
-        all_loans: Vec::new(),
-        item_ub: region::CodeExtent::from_node_id(body.id),
-        move_data: MoveData::new(),
-        move_error_collector: move_error::MoveErrorCollector::new(),
-    };
-
-    let param_env = ParameterEnvironment::for_item(bccx.tcx, fn_id);
-
-    {
-        let mut euv = euv::ExprUseVisitor::new(&mut glcx,
-                                               bccx.tcx,
-                                               param_env);
-        euv.walk_fn(decl, body);
-    }
-
-    glcx.report_potential_errors();
-    let GatherLoanCtxt { all_loans, move_data, .. } = glcx;
-    (all_loans, move_data)
-}
-
-struct GatherLoanCtxt<'a, 'tcx: 'a> {
-    bccx: &'a BorrowckCtxt<'a, 'tcx>,
-    move_data: move_data::MoveData<'tcx>,
-    move_error_collector: move_error::MoveErrorCollector<'tcx>,
-    all_loans: Vec<Loan<'tcx>>,
-    /// `item_ub` is used as an upper-bound on the lifetime whenever we
-    /// ask for the scope of an expression categorized as an upvar.
-    item_ub: region::CodeExtent,
-}
-
-impl<'a, 'tcx> euv::Delegate<'tcx> for GatherLoanCtxt<'a, 'tcx> {
-    fn consume(&mut self,
-               consume_id: ast::NodeId,
-               _consume_span: Span,
-               cmt: mc::cmt<'tcx>,
-               mode: euv::ConsumeMode) {
-        debug!("consume(consume_id={}, cmt={}, mode={})",
-               consume_id, cmt.repr(self.tcx()), mode);
-
-        match mode {
-            euv::Move(move_reason) => {
-                gather_moves::gather_move_from_expr(
-                    self.bccx, &self.move_data, &self.move_error_collector,
-                    consume_id, cmt, move_reason);
-            }
-            euv::Copy => { }
-        }
-    }
-
-    fn matched_pat(&mut self,
-                   matched_pat: &ast::Pat,
-                   cmt: mc::cmt<'tcx>,
-                   mode: euv::MatchMode) {
-        debug!("matched_pat(matched_pat={}, cmt={}, mode={})",
-               matched_pat.repr(self.tcx()),
-               cmt.repr(self.tcx()),
-               mode);
-
-        if let mc::cat_downcast(..) = cmt.cat {
-            gather_moves::gather_match_variant(
-                self.bccx, &self.move_data, &self.move_error_collector,
-                matched_pat, cmt, mode);
-        }
-    }
-
-    fn consume_pat(&mut self,
-                   consume_pat: &ast::Pat,
-                   cmt: mc::cmt<'tcx>,
-                   mode: euv::ConsumeMode) {
-        debug!("consume_pat(consume_pat={}, cmt={}, mode={})",
-               consume_pat.repr(self.tcx()),
-               cmt.repr(self.tcx()),
-               mode);
-
-        match mode {
-            euv::Copy => { return; }
-            euv::Move(_) => { }
-        }
-
-        gather_moves::gather_move_from_pat(
-            self.bccx, &self.move_data, &self.move_error_collector,
-            consume_pat, cmt);
-    }
-
-    fn borrow(&mut self,
-              borrow_id: ast::NodeId,
-              borrow_span: Span,
-              cmt: mc::cmt<'tcx>,
-              loan_region: ty::Region,
-              bk: ty::BorrowKind,
-              loan_cause: euv::LoanCause)
-    {
-        debug!("borrow(borrow_id={}, cmt={}, loan_region={}, \
-               bk={}, loan_cause={})",
-               borrow_id, cmt.repr(self.tcx()), loan_region,
-               bk, loan_cause);
-
-        self.guarantee_valid(borrow_id,
-                             borrow_span,
-                             cmt,
-                             bk,
-                             loan_region,
-                             loan_cause);
-    }
-
-    fn mutate(&mut self,
-              assignment_id: ast::NodeId,
-              assignment_span: Span,
-              assignee_cmt: mc::cmt<'tcx>,
-              mode: euv::MutateMode)
-    {
-        debug!("mutate(assignment_id={}, assignee_cmt={})",
-               assignment_id, assignee_cmt.repr(self.tcx()));
-
-        match opt_loan_path(&assignee_cmt) {
-            Some(lp) => {
-                gather_moves::gather_assignment(self.bccx, &self.move_data,
-                                                assignment_id, assignment_span,
-                                                lp, assignee_cmt.id, mode);
-            }
-            None => {
-                // This can occur with e.g. `*foo() = 5`.  In such
-                // cases, there is no need to check for conflicts
-                // with moves etc, just ignore.
-            }
-        }
-    }
-
-    fn decl_without_init(&mut self, id: ast::NodeId, span: Span) {
-        gather_moves::gather_decl(self.bccx, &self.move_data, id, span, id);
-    }
-}
-
-/// Implements the A-* rules in doc.rs.
-fn check_aliasability<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                borrow_span: Span,
-                                loan_cause: euv::LoanCause,
-                                cmt: mc::cmt<'tcx>,
-                                req_kind: ty::BorrowKind)
-                                -> Result<(),()> {
-
-    match (cmt.freely_aliasable(bccx.tcx), req_kind) {
-        (None, _) => {
-            /* Uniquely accessible path -- OK for `&` and `&mut` */
-            Ok(())
-        }
-        (Some(mc::AliasableStatic(safety)), ty::ImmBorrow) => {
-            // Borrow of an immutable static item:
-            match safety {
-                mc::InteriorUnsafe => {
-                    // If the static item contains an Unsafe<T>, it has interior
-                    // mutability.  In such cases, another phase of the compiler
-                    // will ensure that the type is `Sync` and then trans will
-                    // not put it in rodata, so this is ok to allow.
-                    Ok(())
-                }
-                mc::InteriorSafe => {
-                    // Immutable static can be borrowed, no problem.
-                    Ok(())
-                }
-            }
-        }
-        (Some(mc::AliasableStaticMut(..)), _) => {
-            // Even touching a static mut is considered unsafe. We assume the
-            // user knows what they're doing in these cases.
-            Ok(())
-        }
-        (Some(alias_cause), ty::UniqueImmBorrow) |
-        (Some(alias_cause), ty::MutBorrow) => {
-            bccx.report_aliasability_violation(
-                        borrow_span,
-                        BorrowViolation(loan_cause),
-                        alias_cause);
-            Err(())
-        }
-        (_, _) => {
-            Ok(())
-        }
-    }
-}
-
-impl<'a, 'tcx> GatherLoanCtxt<'a, 'tcx> {
-    pub fn tcx(&self) -> &'a ty::ctxt<'tcx> { self.bccx.tcx }
-
-    /// Guarantees that `addr_of(cmt)` will be valid for the duration of `static_scope_r`, or
-    /// reports an error.  This may entail taking out loans, which will be added to the
-    /// `req_loan_map`.
-    fn guarantee_valid(&mut self,
-                       borrow_id: ast::NodeId,
-                       borrow_span: Span,
-                       cmt: mc::cmt<'tcx>,
-                       req_kind: ty::BorrowKind,
-                       loan_region: ty::Region,
-                       cause: euv::LoanCause) {
-        debug!("guarantee_valid(borrow_id={}, cmt={}, \
-                req_mutbl={}, loan_region={})",
-               borrow_id,
-               cmt.repr(self.tcx()),
-               req_kind,
-               loan_region);
-
-        // a loan for the empty region can never be dereferenced, so
-        // it is always safe
-        if loan_region == ty::ReEmpty {
-            return;
-        }
-
-        // Check that the lifetime of the borrow does not exceed
-        // the lifetime of the data being borrowed.
-        if lifetime::guarantee_lifetime(self.bccx, self.item_ub,
-                                        borrow_span, cause, cmt.clone(), loan_region,
-                                        req_kind).is_err() {
-            return; // reported an error, no sense in reporting more.
-        }
-
-        // Check that we don't allow mutable borrows of non-mutable data.
-        if check_mutability(self.bccx, borrow_span, cause,
-                            cmt.clone(), req_kind).is_err() {
-            return; // reported an error, no sense in reporting more.
-        }
-
-        // Check that we don't allow mutable borrows of aliasable data.
-        if check_aliasability(self.bccx, borrow_span, cause,
-                              cmt.clone(), req_kind).is_err() {
-            return; // reported an error, no sense in reporting more.
-        }
-
-        // Compute the restrictions that are required to enforce the
-        // loan is safe.
-        let restr = restrictions::compute_restrictions(
-            self.bccx, borrow_span, cause,
-            cmt.clone(), loan_region);
-
-        debug!("guarantee_valid(): restrictions={}", restr);
-
-        // Create the loan record (if needed).
-        let loan = match restr {
-            restrictions::Safe => {
-                // No restrictions---no loan record necessary
-                return;
-            }
-
-            restrictions::SafeIf(loan_path, restricted_paths) => {
-                let loan_scope = match loan_region {
-                    ty::ReScope(scope) => scope,
-
-                    ty::ReFree(ref fr) => fr.scope,
-
-                    ty::ReStatic => {
-                        // If we get here, an error must have been
-                        // reported in
-                        // `lifetime::guarantee_lifetime()`, because
-                        // the only legal ways to have a borrow with a
-                        // static lifetime should not require
-                        // restrictions. To avoid reporting derived
-                        // errors, we just return here without adding
-                        // any loans.
-                        return;
-                    }
-
-                    ty::ReEmpty |
-                    ty::ReLateBound(..) |
-                    ty::ReEarlyBound(..) |
-                    ty::ReInfer(..) => {
-                        self.tcx().sess.span_bug(
-                            cmt.span,
-                            format!("invalid borrow lifetime: {}",
-                                    loan_region).as_slice());
-                    }
-                };
-                debug!("loan_scope = {}", loan_scope);
-
-                let borrow_scope = region::CodeExtent::from_node_id(borrow_id);
-                let gen_scope = self.compute_gen_scope(borrow_scope, loan_scope);
-                debug!("gen_scope = {}", gen_scope);
-
-                let kill_scope = self.compute_kill_scope(loan_scope, &*loan_path);
-                debug!("kill_scope = {}", kill_scope);
-
-                if req_kind == ty::MutBorrow {
-                    self.mark_loan_path_as_mutated(&*loan_path);
-                }
-
-                Loan {
-                    index: self.all_loans.len(),
-                    loan_path: loan_path,
-                    kind: req_kind,
-                    gen_scope: gen_scope,
-                    kill_scope: kill_scope,
-                    span: borrow_span,
-                    restricted_paths: restricted_paths,
-                    cause: cause,
-                }
-            }
-        };
-
-        debug!("guarantee_valid(borrow_id={}), loan={}",
-               borrow_id, loan.repr(self.tcx()));
-
-        // let loan_path = loan.loan_path;
-        // let loan_gen_scope = loan.gen_scope;
-        // let loan_kill_scope = loan.kill_scope;
-        self.all_loans.push(loan);
-
-        // if loan_gen_scope != borrow_id {
-            // FIXME(#6268) Nested method calls
-            //
-            // Typically, the scope of the loan includes the point at
-            // which the loan is originated. This
-            // This is a subtle case. See the test case
-            // <compile-fail/borrowck-bad-nested-calls-free.rs>
-            // to see what we are guarding against.
-
-            //let restr = restrictions::compute_restrictions(
-            //    self.bccx, borrow_span, cmt, RESTR_EMPTY);
-            //let loan = {
-            //    let all_loans = &mut *self.all_loans; // FIXME(#5074)
-            //    Loan {
-            //        index: all_loans.len(),
-            //        loan_path: loan_path,
-            //        cmt: cmt,
-            //        mutbl: ConstMutability,
-            //        gen_scope: borrow_id,
-            //        kill_scope: kill_scope,
-            //        span: borrow_span,
-            //        restrictions: restrictions
-            //    }
-        // }
-
-        fn check_mutability<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                      borrow_span: Span,
-                                      cause: euv::LoanCause,
-                                      cmt: mc::cmt<'tcx>,
-                                      req_kind: ty::BorrowKind)
-                                      -> Result<(),()> {
-            //! Implements the M-* rules in doc.rs.
-
-            match req_kind {
-                ty::UniqueImmBorrow | ty::ImmBorrow => {
-                    match cmt.mutbl {
-                        // I am intentionally leaving this here to help
-                        // refactoring if, in the future, we should add new
-                        // kinds of mutability.
-                        mc::McImmutable | mc::McDeclared | mc::McInherited => {
-                            // both imm and mut data can be lent as imm;
-                            // for mutable data, this is a freeze
-                            Ok(())
-                        }
-                    }
-                }
-
-                ty::MutBorrow => {
-                    // Only mutable data can be lent as mutable.
-                    if !cmt.mutbl.is_mutable() {
-                        Err(bccx.report(BckError { span: borrow_span,
-                                                   cause: cause,
-                                                   cmt: cmt,
-                                                   code: err_mutbl }))
-                    } else {
-                        Ok(())
-                    }
-                }
-            }
-        }
-    }
-
-    pub fn mark_loan_path_as_mutated(&self, loan_path: &LoanPath) {
-        //! For mutable loans of content whose mutability derives
-        //! from a local variable, mark the mutability decl as necessary.
-
-        match loan_path.kind {
-            LpVar(local_id) |
-            LpUpvar(ty::UpvarId{ var_id: local_id, closure_expr_id: _ }) => {
-                self.tcx().used_mut_nodes.borrow_mut().insert(local_id);
-            }
-            LpDowncast(ref base, _) |
-            LpExtend(ref base, mc::McInherited, _) |
-            LpExtend(ref base, mc::McDeclared, _) => {
-                self.mark_loan_path_as_mutated(&**base);
-            }
-            LpExtend(_, mc::McImmutable, _) => {
-                // Nothing to do.
-            }
-        }
-    }
-
-    pub fn compute_gen_scope(&self,
-                             borrow_scope: region::CodeExtent,
-                             loan_scope: region::CodeExtent)
-                             -> region::CodeExtent {
-        //! Determine when to introduce the loan. Typically the loan
-        //! is introduced at the point of the borrow, but in some cases,
-        //! notably method arguments, the loan may be introduced only
-        //! later, once it comes into scope.
-
-        if self.bccx.tcx.region_maps.is_subscope_of(borrow_scope, loan_scope) {
-            borrow_scope
-        } else {
-            loan_scope
-        }
-    }
-
-    pub fn compute_kill_scope(&self, loan_scope: region::CodeExtent, lp: &LoanPath<'tcx>)
-                              -> region::CodeExtent {
-        //! Determine when the loan restrictions go out of scope.
-        //! This is either when the lifetime expires or when the
-        //! local variable which roots the loan-path goes out of scope,
-        //! whichever happens faster.
-        //!
-        //! It may seem surprising that we might have a loan region
-        //! larger than the variable which roots the loan-path; this can
-        //! come about when variables of `&mut` type are re-borrowed,
-        //! as in this example:
-        //!
-        //!     fn counter<'a>(v: &'a mut Foo) -> &'a mut uint {
-        //!         &mut v.counter
-        //!     }
-        //!
-        //! In this case, the reference (`'a`) outlives the
-        //! variable `v` that hosts it. Note that this doesn't come up
-        //! with immutable `&` pointers, because borrows of such pointers
-        //! do not require restrictions and hence do not cause a loan.
-
-        let lexical_scope = lp.kill_scope(self.bccx.tcx);
-        let rm = &self.bccx.tcx.region_maps;
-        if rm.is_subscope_of(lexical_scope, loan_scope) {
-            lexical_scope
-        } else {
-            assert!(self.bccx.tcx.region_maps.is_subscope_of(loan_scope, lexical_scope));
-            loan_scope
-        }
-    }
-
-    pub fn report_potential_errors(&self) {
-        self.move_error_collector.report_potential_errors(self.bccx);
-    }
-}
-
-/// Context used while gathering loans on static initializers
-///
-/// This visitor walks static initializer's expressions and makes
-/// sure the loans being taken are sound.
-struct StaticInitializerCtxt<'a, 'tcx: 'a> {
-    bccx: &'a BorrowckCtxt<'a, 'tcx>
-}
-
-impl<'a, 'tcx, 'v> Visitor<'v> for StaticInitializerCtxt<'a, 'tcx> {
-    fn visit_expr(&mut self, ex: &Expr) {
-        if let ast::ExprAddrOf(mutbl, ref base) = ex.node {
-            let base_cmt = self.bccx.cat_expr(&**base);
-            let borrow_kind = ty::BorrowKind::from_mutbl(mutbl);
-            // Check that we don't allow borrows of unsafe static items.
-            if check_aliasability(self.bccx, ex.span, euv::AddrOf,
-                                  base_cmt, borrow_kind).is_err() {
-                return; // reported an error, no sense in reporting more.
-            }
-        }
-
-        visit::walk_expr(self, ex);
-    }
-}
-
-pub fn gather_loans_in_static_initializer(bccx: &mut BorrowckCtxt, expr: &ast::Expr) {
-
-    debug!("gather_loans_in_static_initializer(expr={})", expr.repr(bccx.tcx));
-
-    let mut sicx = StaticInitializerCtxt {
-        bccx: bccx
-    };
-
-    sicx.visit_expr(expr);
-}
diff --git a/src/librustc/middle/borrowck/gather_loans/move_error.rs b/src/librustc/middle/borrowck/gather_loans/move_error.rs
deleted file mode 100644 (file)
index aaa0fa8..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use middle::mem_categorization as mc;
-use middle::borrowck::BorrowckCtxt;
-use middle::ty;
-
-use std::cell::RefCell;
-use syntax::ast;
-use syntax::codemap;
-use syntax::print::pprust;
-use util::ppaux::UserString;
-
-pub struct MoveErrorCollector<'tcx> {
-    errors: RefCell<Vec<MoveError<'tcx>>>
-}
-
-impl<'tcx> MoveErrorCollector<'tcx> {
-    pub fn new() -> MoveErrorCollector<'tcx> {
-        MoveErrorCollector {
-            errors: RefCell::new(Vec::new())
-        }
-    }
-
-    pub fn add_error(&self, error: MoveError<'tcx>) {
-        self.errors.borrow_mut().push(error);
-    }
-
-    pub fn report_potential_errors<'a>(&self, bccx: &BorrowckCtxt<'a, 'tcx>) {
-        report_move_errors(bccx, self.errors.borrow().deref())
-    }
-}
-
-pub struct MoveError<'tcx> {
-    move_from: mc::cmt<'tcx>,
-    move_to: Option<MoveSpanAndPath>
-}
-
-impl<'tcx> MoveError<'tcx> {
-    pub fn with_move_info(move_from: mc::cmt<'tcx>,
-                          move_to: Option<MoveSpanAndPath>)
-                          -> MoveError<'tcx> {
-        MoveError {
-            move_from: move_from,
-            move_to: move_to,
-        }
-    }
-}
-
-#[deriving(Clone)]
-pub struct MoveSpanAndPath {
-    pub span: codemap::Span,
-    pub ident: ast::Ident
-}
-
-pub struct GroupedMoveErrors<'tcx> {
-    move_from: mc::cmt<'tcx>,
-    move_to_places: Vec<MoveSpanAndPath>
-}
-
-fn report_move_errors<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                errors: &Vec<MoveError<'tcx>>) {
-    let grouped_errors = group_errors_with_same_origin(errors);
-    for error in grouped_errors.iter() {
-        report_cannot_move_out_of(bccx, error.move_from.clone());
-        let mut is_first_note = true;
-        for move_to in error.move_to_places.iter() {
-            note_move_destination(bccx, move_to.span,
-                                  &move_to.ident, is_first_note);
-            is_first_note = false;
-        }
-    }
-}
-
-fn group_errors_with_same_origin<'tcx>(errors: &Vec<MoveError<'tcx>>)
-                                       -> Vec<GroupedMoveErrors<'tcx>> {
-    let mut grouped_errors = Vec::new();
-    for error in errors.iter() {
-        append_to_grouped_errors(&mut grouped_errors, error)
-    }
-    return grouped_errors;
-
-    fn append_to_grouped_errors<'tcx>(grouped_errors: &mut Vec<GroupedMoveErrors<'tcx>>,
-                                      error: &MoveError<'tcx>) {
-        let move_from_id = error.move_from.id;
-        debug!("append_to_grouped_errors(move_from_id={})", move_from_id);
-        let move_to = if error.move_to.is_some() {
-            vec!(error.move_to.clone().unwrap())
-        } else {
-            Vec::new()
-        };
-        for ge in grouped_errors.iter_mut() {
-            if move_from_id == ge.move_from.id && error.move_to.is_some() {
-                debug!("appending move_to to list");
-                ge.move_to_places.extend(move_to.into_iter());
-                return
-            }
-        }
-        debug!("found a new move from location");
-        grouped_errors.push(GroupedMoveErrors {
-            move_from: error.move_from.clone(),
-            move_to_places: move_to
-        })
-    }
-}
-
-fn report_cannot_move_out_of<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                       move_from: mc::cmt<'tcx>) {
-    match move_from.cat {
-        mc::cat_deref(_, _, mc::BorrowedPtr(..)) |
-        mc::cat_deref(_, _, mc::Implicit(..)) |
-        mc::cat_deref(_, _, mc::UnsafePtr(..)) |
-        mc::cat_static_item => {
-            bccx.span_err(
-                move_from.span,
-                format!("cannot move out of {}",
-                        bccx.cmt_to_string(&*move_from)).as_slice());
-        }
-
-        mc::cat_downcast(ref b, _) |
-        mc::cat_interior(ref b, _) => {
-            match b.ty.sty {
-                ty::ty_struct(did, _)
-                | ty::ty_enum(did, _) if ty::has_dtor(bccx.tcx, did) => {
-                    bccx.span_err(
-                        move_from.span,
-                        format!("cannot move out of type `{}`, \
-                                 which defines the `Drop` trait",
-                                b.ty.user_string(bccx.tcx)).as_slice());
-                },
-                _ => panic!("this path should not cause illegal move")
-            }
-        }
-        _ => panic!("this path should not cause illegal move")
-    }
-}
-
-fn note_move_destination(bccx: &BorrowckCtxt,
-                         move_to_span: codemap::Span,
-                         pat_ident: &ast::Ident,
-                         is_first_note: bool) {
-    let pat_name = pprust::ident_to_string(pat_ident);
-    if is_first_note {
-        bccx.span_note(
-            move_to_span,
-            "attempting to move value to here");
-        bccx.span_help(
-            move_to_span,
-            format!("to prevent the move, \
-                     use `ref {0}` or `ref mut {0}` to capture value by \
-                     reference",
-                    pat_name).as_slice());
-    } else {
-        bccx.span_note(move_to_span,
-                       format!("and here (use `ref {0}` or `ref mut {0}`)",
-                               pat_name).as_slice());
-    }
-}
diff --git a/src/librustc/middle/borrowck/gather_loans/restrictions.rs b/src/librustc/middle/borrowck/gather_loans/restrictions.rs
deleted file mode 100644 (file)
index bd9cf8f..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Computes the restrictions that result from a borrow.
-
-pub use self::RestrictionResult::*;
-
-use middle::borrowck::*;
-use middle::borrowck::LoanPathElem::*;
-use middle::borrowck::LoanPathKind::*;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::ty;
-use syntax::codemap::Span;
-use util::ppaux::Repr;
-
-use std::rc::Rc;
-
-#[deriving(Show)]
-pub enum RestrictionResult<'tcx> {
-    Safe,
-    SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>)
-}
-
-pub fn compute_restrictions<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
-                                      span: Span,
-                                      cause: euv::LoanCause,
-                                      cmt: mc::cmt<'tcx>,
-                                      loan_region: ty::Region)
-                                      -> RestrictionResult<'tcx> {
-    let ctxt = RestrictionsContext {
-        bccx: bccx,
-        span: span,
-        cause: cause,
-        loan_region: loan_region,
-    };
-
-    ctxt.restrict(cmt)
-}
-
-///////////////////////////////////////////////////////////////////////////
-// Private
-
-struct RestrictionsContext<'a, 'tcx: 'a> {
-    bccx: &'a BorrowckCtxt<'a, 'tcx>,
-    span: Span,
-    loan_region: ty::Region,
-    cause: euv::LoanCause,
-}
-
-impl<'a, 'tcx> RestrictionsContext<'a, 'tcx> {
-    fn restrict(&self,
-                cmt: mc::cmt<'tcx>) -> RestrictionResult<'tcx> {
-        debug!("restrict(cmt={})", cmt.repr(self.bccx.tcx));
-
-        let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
-
-        match cmt.cat.clone() {
-            mc::cat_rvalue(..) => {
-                // Effectively, rvalues are stored into a
-                // non-aliasable temporary on the stack. Since they
-                // are inherently non-aliasable, they can only be
-                // accessed later through the borrow itself and hence
-                // must inherently comply with its terms.
-                Safe
-            }
-
-            mc::cat_local(local_id) => {
-                // R-Variable, locally declared
-                let lp = new_lp(LpVar(local_id));
-                SafeIf(lp.clone(), vec![lp])
-            }
-
-            mc::cat_upvar(mc::Upvar { id, .. }) => {
-                // R-Variable, captured into closure
-                let lp = new_lp(LpUpvar(id));
-                SafeIf(lp.clone(), vec![lp])
-            }
-
-            mc::cat_downcast(cmt_base, _) => {
-                // When we borrow the interior of an enum, we have to
-                // ensure the enum itself is not mutated, because that
-                // could cause the type of the memory to change.
-                self.restrict(cmt_base)
-            }
-
-            mc::cat_interior(cmt_base, i) => {
-                // R-Field
-                //
-                // Overwriting the base would not change the type of
-                // the memory, so no additional restrictions are
-                // needed.
-                let result = self.restrict(cmt_base);
-                self.extend(result, &cmt, LpInterior(i))
-            }
-
-            mc::cat_static_item(..) => {
-                Safe
-            }
-
-            mc::cat_deref(cmt_base, _, pk) => {
-                match pk {
-                    mc::OwnedPtr => {
-                        // R-Deref-Send-Pointer
-                        //
-                        // When we borrow the interior of an owned pointer, we
-                        // cannot permit the base to be mutated, because that
-                        // would cause the unique pointer to be freed.
-                        //
-                        // Eventually we should make these non-special and
-                        // just rely on Deref<T> implementation.
-                        let result = self.restrict(cmt_base);
-                        self.extend(result, &cmt, LpDeref(pk))
-                    }
-                    mc::Implicit(bk, lt) | mc::BorrowedPtr(bk, lt) => {
-                        // R-Deref-[Mut-]Borrowed
-                        if !self.bccx.is_subregion_of(self.loan_region, lt) {
-                            self.bccx.report(
-                                BckError {
-                                    span: self.span,
-                                    cause: self.cause,
-                                    cmt: cmt_base,
-                                    code: err_borrowed_pointer_too_short(
-                                        self.loan_region, lt)});
-                            return Safe;
-                        }
-
-                        match bk {
-                            ty::ImmBorrow => Safe,
-                            ty::MutBorrow | ty::UniqueImmBorrow => {
-                                // R-Deref-Mut-Borrowed
-                                //
-                                // The referent can be aliased after the
-                                // references lifetime ends (by a newly-unfrozen
-                                // borrow).
-                                let result = self.restrict(cmt_base);
-                                self.extend(result, &cmt, LpDeref(pk))
-                            }
-                        }
-                    }
-                    // Borrowck is not relevant for unsafe pointers
-                    mc::UnsafePtr(..) => Safe
-                }
-            }
-        }
-    }
-
-    fn extend(&self,
-              result: RestrictionResult<'tcx>,
-              cmt: &mc::cmt<'tcx>,
-              elem: LoanPathElem) -> RestrictionResult<'tcx> {
-        match result {
-            Safe => Safe,
-            SafeIf(base_lp, mut base_vec) => {
-                let v = LpExtend(base_lp, cmt.mutbl, elem);
-                let lp = Rc::new(LoanPath::new(v, cmt.ty));
-                base_vec.push(lp.clone());
-                SafeIf(lp, base_vec)
-            }
-        }
-    }
-}
diff --git a/src/librustc/middle/borrowck/graphviz.rs b/src/librustc/middle/borrowck/graphviz.rs
deleted file mode 100644 (file)
index 32fa5f8..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This module provides linkage between rustc::middle::graph and
-//! libgraphviz traits, specialized to attaching borrowck analysis
-//! data to rendered labels.
-
-pub use self::Variant::*;
-
-/// For clarity, rename the graphviz crate locally to dot.
-use graphviz as dot;
-pub use middle::cfg::graphviz::{Node, Edge};
-use middle::cfg::graphviz as cfg_dot;
-
-use middle::borrowck;
-use middle::borrowck::{BorrowckCtxt, LoanPath};
-use middle::cfg::{CFGIndex};
-use middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
-use middle::dataflow;
-
-use std::rc::Rc;
-
-#[deriving(Show)]
-pub enum Variant {
-    Loans,
-    Moves,
-    Assigns,
-}
-
-impl Copy for Variant {}
-
-impl Variant {
-    pub fn short_name(&self) -> &'static str {
-        match *self {
-            Loans   => "loans",
-            Moves   => "moves",
-            Assigns => "assigns",
-        }
-    }
-}
-
-pub struct DataflowLabeller<'a, 'tcx: 'a> {
-    pub inner: cfg_dot::LabelledCFG<'a, 'tcx>,
-    pub variants: Vec<Variant>,
-    pub borrowck_ctxt: &'a BorrowckCtxt<'a, 'tcx>,
-    pub analysis_data: &'a borrowck::AnalysisData<'a, 'tcx>,
-}
-
-impl<'a, 'tcx> DataflowLabeller<'a, 'tcx> {
-    fn dataflow_for(&self, e: EntryOrExit, n: &Node<'a>) -> String {
-        let id = n.val1().data.id;
-        debug!("dataflow_for({}, id={}) {}", e, id, self.variants);
-        let mut sets = "".to_string();
-        let mut seen_one = false;
-        for &variant in self.variants.iter() {
-            if seen_one { sets.push_str(" "); } else { seen_one = true; }
-            sets.push_str(variant.short_name());
-            sets.push_str(": ");
-            sets.push_str(self.dataflow_for_variant(e, n, variant).as_slice());
-        }
-        sets
-    }
-
-    fn dataflow_for_variant(&self, e: EntryOrExit, n: &Node, v: Variant) -> String {
-        let cfgidx = n.val0();
-        match v {
-            Loans   => self.dataflow_loans_for(e, cfgidx),
-            Moves   => self.dataflow_moves_for(e, cfgidx),
-            Assigns => self.dataflow_assigns_for(e, cfgidx),
-        }
-    }
-
-    fn build_set<O:DataFlowOperator>(&self,
-                                     e: EntryOrExit,
-                                     cfgidx: CFGIndex,
-                                     dfcx: &DataFlowContext<'a, 'tcx, O>,
-                                     to_lp: |uint| -> Rc<LoanPath<'tcx>>) -> String {
-        let mut saw_some = false;
-        let mut set = "{".to_string();
-        dfcx.each_bit_for_node(e, cfgidx, |index| {
-            let lp = to_lp(index);
-            if saw_some {
-                set.push_str(", ");
-            }
-            let loan_str = self.borrowck_ctxt.loan_path_to_string(&*lp);
-            set.push_str(loan_str.as_slice());
-            saw_some = true;
-            true
-        });
-        set.push_str("}");
-        set
-    }
-
-    fn dataflow_loans_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
-        let dfcx = &self.analysis_data.loans;
-        let loan_index_to_path = |loan_index| {
-            let all_loans = &self.analysis_data.all_loans;
-            all_loans[loan_index].loan_path()
-        };
-        self.build_set(e, cfgidx, dfcx, loan_index_to_path)
-    }
-
-    fn dataflow_moves_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
-        let dfcx = &self.analysis_data.move_data.dfcx_moves;
-        let move_index_to_path = |move_index| {
-            let move_data = &self.analysis_data.move_data.move_data;
-            let moves = move_data.moves.borrow();
-            let the_move = &(*moves)[move_index];
-            move_data.path_loan_path(the_move.path)
-        };
-        self.build_set(e, cfgidx, dfcx, move_index_to_path)
-    }
-
-    fn dataflow_assigns_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
-        let dfcx = &self.analysis_data.move_data.dfcx_assign;
-        let assign_index_to_path = |assign_index| {
-            let move_data = &self.analysis_data.move_data.move_data;
-            let assignments = move_data.var_assignments.borrow();
-            let assignment = &(*assignments)[assign_index];
-            move_data.path_loan_path(assignment.path)
-        };
-        self.build_set(e, cfgidx, dfcx, assign_index_to_path)
-    }
-}
-
-impl<'a, 'tcx> dot::Labeller<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 'tcx> {
-    fn graph_id(&'a self) -> dot::Id<'a> { self.inner.graph_id() }
-    fn node_id(&'a self, n: &Node<'a>) -> dot::Id<'a> { self.inner.node_id(n) }
-    fn node_label(&'a self, n: &Node<'a>) -> dot::LabelText<'a> {
-        let prefix = self.dataflow_for(dataflow::Entry, n);
-        let suffix = self.dataflow_for(dataflow::Exit, n);
-        let inner_label = self.inner.node_label(n);
-        inner_label
-            .prefix_line(dot::LabelStr(prefix.into_cow()))
-            .suffix_line(dot::LabelStr(suffix.into_cow()))
-    }
-    fn edge_label(&'a self, e: &Edge<'a>) -> dot::LabelText<'a> { self.inner.edge_label(e) }
-}
-
-impl<'a, 'tcx> dot::GraphWalk<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 'tcx> {
-    fn nodes(&'a self) -> dot::Nodes<'a, Node<'a>> { self.inner.nodes() }
-    fn edges(&'a self) -> dot::Edges<'a, Edge<'a>> { self.inner.edges() }
-    fn source(&'a self, edge: &Edge<'a>) -> Node<'a> { self.inner.source(edge) }
-    fn target(&'a self, edge: &Edge<'a>) -> Node<'a> { self.inner.target(edge) }
-}
diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs
deleted file mode 100644 (file)
index e90de1b..0000000
+++ /dev/null
@@ -1,1126 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! See doc.rs for a thorough explanation of the borrow checker
-
-#![allow(non_camel_case_types)]
-
-pub use self::LoanPathKind::*;
-pub use self::LoanPathElem::*;
-pub use self::bckerr_code::*;
-pub use self::AliasableViolationKind::*;
-pub use self::MovedValueUseKind::*;
-
-use middle::cfg;
-use middle::dataflow::DataFlowContext;
-use middle::dataflow::BitwiseOperator;
-use middle::dataflow::DataFlowOperator;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::region;
-use middle::ty::{mod, ParameterEnvironment, Ty};
-use util::ppaux::{note_and_explain_region, Repr, UserString};
-
-use std::rc::Rc;
-use std::string::String;
-use syntax::ast;
-use syntax::ast_map;
-use syntax::ast_map::blocks::{FnLikeNode, FnParts};
-use syntax::ast_util;
-use syntax::codemap::Span;
-use syntax::parse::token;
-use syntax::visit;
-use syntax::visit::{Visitor, FnKind};
-use syntax::ast::{FnDecl, Block, NodeId};
-
-macro_rules! if_ok(
-    ($inp: expr) => (
-        match $inp {
-            Ok(v) => { v }
-            Err(e) => { return Err(e); }
-        }
-    )
-)
-
-pub mod doc;
-
-pub mod check_loans;
-
-pub mod gather_loans;
-
-pub mod graphviz;
-
-pub mod move_data;
-
-#[deriving(Clone)]
-pub struct LoanDataFlowOperator;
-
-impl Copy for LoanDataFlowOperator {}
-
-pub type LoanDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, LoanDataFlowOperator>;
-
-impl<'a, 'tcx, 'v> Visitor<'v> for BorrowckCtxt<'a, 'tcx> {
-    fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl,
-                b: &'v Block, s: Span, id: ast::NodeId) {
-        borrowck_fn(self, fk, fd, b, s, id);
-    }
-
-    fn visit_item(&mut self, item: &ast::Item) {
-        borrowck_item(self, item);
-    }
-}
-
-pub fn check_crate(tcx: &ty::ctxt) {
-    let mut bccx = BorrowckCtxt {
-        tcx: tcx,
-        stats: BorrowStats {
-            loaned_paths_same: 0,
-            loaned_paths_imm: 0,
-            stable_paths: 0,
-            guaranteed_paths: 0
-        }
-    };
-
-    visit::walk_crate(&mut bccx, tcx.map.krate());
-
-    if tcx.sess.borrowck_stats() {
-        println!("--- borrowck stats ---");
-        println!("paths requiring guarantees: {}",
-                 bccx.stats.guaranteed_paths);
-        println!("paths requiring loans     : {}",
-                 make_stat(&bccx, bccx.stats.loaned_paths_same));
-        println!("paths requiring imm loans : {}",
-                 make_stat(&bccx, bccx.stats.loaned_paths_imm));
-        println!("stable paths              : {}",
-                 make_stat(&bccx, bccx.stats.stable_paths));
-    }
-
-    fn make_stat(bccx: &BorrowckCtxt, stat: uint) -> String {
-        let total = bccx.stats.guaranteed_paths as f64;
-        let perc = if total == 0.0 { 0.0 } else { stat as f64 * 100.0 / total };
-        format!("{} ({:.0}%)", stat, perc)
-    }
-}
-
-fn borrowck_item(this: &mut BorrowckCtxt, item: &ast::Item) {
-    // Gather loans for items. Note that we don't need
-    // to check loans for single expressions. The check
-    // loan step is intended for things that have a data
-    // flow dependent conditions.
-    match item.node {
-        ast::ItemStatic(_, _, ref ex) |
-        ast::ItemConst(_, ref ex) => {
-            gather_loans::gather_loans_in_static_initializer(this, &**ex);
-        }
-        _ => {
-            visit::walk_item(this, item);
-        }
-    }
-}
-
-/// Collection of conclusions determined via borrow checker analyses.
-pub struct AnalysisData<'a, 'tcx: 'a> {
-    pub all_loans: Vec<Loan<'tcx>>,
-    pub loans: DataFlowContext<'a, 'tcx, LoanDataFlowOperator>,
-    pub move_data: move_data::FlowedMoveData<'a, 'tcx>,
-}
-
-fn borrowck_fn(this: &mut BorrowckCtxt,
-               fk: FnKind,
-               decl: &ast::FnDecl,
-               body: &ast::Block,
-               sp: Span,
-               id: ast::NodeId) {
-    debug!("borrowck_fn(id={})", id);
-    let cfg = cfg::CFG::new(this.tcx, body);
-    let AnalysisData { all_loans,
-                       loans: loan_dfcx,
-                       move_data:flowed_moves } =
-        build_borrowck_dataflow_data(this, fk, decl, &cfg, body, sp, id);
-
-    move_data::fragments::instrument_move_fragments(&flowed_moves.move_data,
-                                                    this.tcx, sp, id);
-
-    check_loans::check_loans(this,
-                             &loan_dfcx,
-                             flowed_moves,
-                             all_loans.as_slice(),
-                             id,
-                             decl,
-                             body);
-
-    visit::walk_fn(this, fk, decl, body, sp);
-}
-
-fn build_borrowck_dataflow_data<'a, 'tcx>(this: &mut BorrowckCtxt<'a, 'tcx>,
-                                          fk: FnKind,
-                                          decl: &ast::FnDecl,
-                                          cfg: &cfg::CFG,
-                                          body: &ast::Block,
-                                          sp: Span,
-                                          id: ast::NodeId) -> AnalysisData<'a, 'tcx> {
-    // Check the body of fn items.
-    let id_range = ast_util::compute_id_range_for_fn_body(fk, decl, body, sp, id);
-    let (all_loans, move_data) =
-        gather_loans::gather_loans_in_fn(this, id, decl, body);
-
-    let mut loan_dfcx =
-        DataFlowContext::new(this.tcx,
-                             "borrowck",
-                             Some(decl),
-                             cfg,
-                             LoanDataFlowOperator,
-                             id_range,
-                             all_loans.len());
-    for (loan_idx, loan) in all_loans.iter().enumerate() {
-        loan_dfcx.add_gen(loan.gen_scope.node_id(), loan_idx);
-        loan_dfcx.add_kill(loan.kill_scope.node_id(), loan_idx);
-    }
-    loan_dfcx.add_kills_from_flow_exits(cfg);
-    loan_dfcx.propagate(cfg, body);
-
-    let flowed_moves = move_data::FlowedMoveData::new(move_data,
-                                                      this.tcx,
-                                                      cfg,
-                                                      id_range,
-                                                      decl,
-                                                      body);
-
-    AnalysisData { all_loans: all_loans,
-                   loans: loan_dfcx,
-                   move_data:flowed_moves }
-}
-
-/// This and a `ty::ctxt` is all you need to run the dataflow analyses
-/// used in the borrow checker.
-pub struct FnPartsWithCFG<'a> {
-    pub fn_parts: FnParts<'a>,
-    pub cfg:  &'a cfg::CFG,
-}
-
-impl<'a> FnPartsWithCFG<'a> {
-    pub fn from_fn_like(f: &'a FnLikeNode,
-                        g: &'a cfg::CFG) -> FnPartsWithCFG<'a> {
-        FnPartsWithCFG { fn_parts: f.to_fn_parts(), cfg: g }
-    }
-}
-
-/// Accessor for introspective clients inspecting `AnalysisData` and
-/// the `BorrowckCtxt` itself , e.g. the flowgraph visualizer.
-pub fn build_borrowck_dataflow_data_for_fn<'a, 'tcx>(
-    tcx: &'a ty::ctxt<'tcx>,
-    input: FnPartsWithCFG<'a>) -> (BorrowckCtxt<'a, 'tcx>, AnalysisData<'a, 'tcx>) {
-
-    let mut bccx = BorrowckCtxt {
-        tcx: tcx,
-        stats: BorrowStats {
-            loaned_paths_same: 0,
-            loaned_paths_imm: 0,
-            stable_paths: 0,
-            guaranteed_paths: 0
-        }
-    };
-
-    let p = input.fn_parts;
-
-    let dataflow_data = build_borrowck_dataflow_data(&mut bccx,
-                                                     p.kind,
-                                                     &*p.decl,
-                                                     input.cfg,
-                                                     &*p.body,
-                                                     p.span,
-                                                     p.id);
-
-    (bccx, dataflow_data)
-}
-
-// ----------------------------------------------------------------------
-// Type definitions
-
-pub struct BorrowckCtxt<'a, 'tcx: 'a> {
-    tcx: &'a ty::ctxt<'tcx>,
-
-    // Statistics:
-    stats: BorrowStats
-}
-
-struct BorrowStats {
-    loaned_paths_same: uint,
-    loaned_paths_imm: uint,
-    stable_paths: uint,
-    guaranteed_paths: uint
-}
-
-pub type BckResult<'tcx, T> = Result<T, BckError<'tcx>>;
-
-///////////////////////////////////////////////////////////////////////////
-// Loans and loan paths
-
-/// Record of a loan that was issued.
-pub struct Loan<'tcx> {
-    index: uint,
-    loan_path: Rc<LoanPath<'tcx>>,
-    kind: ty::BorrowKind,
-    restricted_paths: Vec<Rc<LoanPath<'tcx>>>,
-
-    /// gen_scope indicates where loan is introduced. Typically the
-    /// loan is introduced at the point of the borrow, but in some
-    /// cases, notably method arguments, the loan may be introduced
-    /// only later, once it comes into scope.  See also
-    /// `GatherLoanCtxt::compute_gen_scope`.
-    gen_scope: region::CodeExtent,
-
-    /// kill_scope indicates when the loan goes out of scope.  This is
-    /// either when the lifetime expires or when the local variable
-    /// which roots the loan-path goes out of scope, whichever happens
-    /// faster. See also `GatherLoanCtxt::compute_kill_scope`.
-    kill_scope: region::CodeExtent,
-    span: Span,
-    cause: euv::LoanCause,
-}
-
-impl<'tcx> Loan<'tcx> {
-    pub fn loan_path(&self) -> Rc<LoanPath<'tcx>> {
-        self.loan_path.clone()
-    }
-}
-
-#[deriving(Eq, Hash, Show)]
-pub struct LoanPath<'tcx> {
-    kind: LoanPathKind<'tcx>,
-    ty: ty::Ty<'tcx>,
-}
-
-impl<'tcx> LoanPath<'tcx> {
-    pub fn eq_debug(&self, that: &LoanPath<'tcx>, tcx: &ty::ctxt<'tcx>) -> bool {
-        let r = self.kind == that.kind;
-        if r && self.ty != that.ty {
-            panic!("eq variants ineq types: {} == {}, {} != {}",
-                   self.repr(tcx), that.repr(tcx),
-                   self.ty.repr(tcx), that.ty.repr(tcx));
-        }
-        r
-    }
-}
-
-impl<'tcx> PartialEq for LoanPath<'tcx> {
-    fn eq(&self, that: &LoanPath<'tcx>) -> bool {
-        let r = self.kind == that.kind;
-        debug_assert!(self.ty == that.ty || !r,
-                      "Somehow loan paths are equal though their tys are not.");
-        r
-    }
-}
-
-#[deriving(PartialEq, Eq, Hash, Show)]
-pub enum LoanPathKind<'tcx> {
-    LpVar(ast::NodeId),                         // `x` in doc.rs
-    LpUpvar(ty::UpvarId),                       // `x` captured by-value into closure
-    LpDowncast(Rc<LoanPath<'tcx>>, ast::DefId), // `x` downcast to particular enum variant
-    LpExtend(Rc<LoanPath<'tcx>>, mc::MutabilityCategory, LoanPathElem)
-}
-
-impl<'tcx> LoanPath<'tcx> {
-    fn new(kind: LoanPathKind<'tcx>, ty: ty::Ty<'tcx>) -> LoanPath<'tcx> {
-        LoanPath { kind: kind, ty: ty }
-    }
-
-    fn to_type(&self) -> ty::Ty<'tcx> { self.ty }
-}
-
-// FIXME (pnkfelix): See discussion here
-// https://github.com/pnkfelix/rust/commit/
-//     b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
-static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
-
-#[deriving(PartialEq, Eq, Hash, Show)]
-pub enum LoanPathElem {
-    LpDeref(mc::PointerKind),    // `*LV` in doc.rs
-    LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
-}
-
-impl Copy for LoanPathElem {}
-
-pub fn closure_to_block(closure_id: ast::NodeId,
-                        tcx: &ty::ctxt) -> ast::NodeId {
-    match tcx.map.get(closure_id) {
-        ast_map::NodeExpr(expr) => match expr.node {
-            ast::ExprProc(_, ref block) |
-            ast::ExprClosure(_, _, _, ref block) => {
-                block.id
-            }
-            _ => {
-                panic!("encountered non-closure id: {}", closure_id)
-            }
-        },
-        _ => panic!("encountered non-expr id: {}", closure_id)
-    }
-}
-
-impl<'tcx> LoanPath<'tcx> {
-    pub fn kill_scope(&self, tcx: &ty::ctxt<'tcx>) -> region::CodeExtent {
-        match self.kind {
-            LpVar(local_id) => tcx.region_maps.var_scope(local_id),
-            LpUpvar(upvar_id) => {
-                let block_id = closure_to_block(upvar_id.closure_expr_id, tcx);
-                region::CodeExtent::from_node_id(block_id)
-            }
-            LpDowncast(ref base, _) |
-            LpExtend(ref base, _, _) => base.kill_scope(tcx),
-        }
-    }
-
-    fn has_fork(&self, other: &LoanPath<'tcx>) -> bool {
-        match (&self.kind, &other.kind) {
-            (&LpExtend(ref base, _, LpInterior(id)), &LpExtend(ref base2, _, LpInterior(id2))) =>
-                if id == id2 {
-                    base.has_fork(&**base2)
-                } else {
-                    true
-                },
-            (&LpExtend(ref base, _, LpDeref(_)), _) => base.has_fork(other),
-            (_, &LpExtend(ref base, _, LpDeref(_))) => self.has_fork(&**base),
-            _ => false,
-        }
-    }
-
-    fn depth(&self) -> uint {
-        match self.kind {
-            LpExtend(ref base, _, LpDeref(_)) => base.depth(),
-            LpExtend(ref base, _, LpInterior(_)) => base.depth() + 1,
-            _ => 0,
-        }
-    }
-
-    fn common(&self, other: &LoanPath<'tcx>) -> Option<LoanPath<'tcx>> {
-        match (&self.kind, &other.kind) {
-            (&LpExtend(ref base, a, LpInterior(id)),
-             &LpExtend(ref base2, _, LpInterior(id2))) => {
-                if id == id2 {
-                    base.common(&**base2).map(|x| {
-                        let xd = x.depth();
-                        if base.depth() == xd && base2.depth() == xd {
-                            assert_eq!(base.ty, base2.ty);
-                            assert_eq!(self.ty, other.ty);
-                            LoanPath {
-                                kind: LpExtend(Rc::new(x), a, LpInterior(id)),
-                                ty: self.ty,
-                            }
-                        } else {
-                            x
-                        }
-                    })
-                } else {
-                    base.common(&**base2)
-                }
-            }
-            (&LpExtend(ref base, _, LpDeref(_)), _) => base.common(other),
-            (_, &LpExtend(ref other, _, LpDeref(_))) => self.common(&**other),
-            (&LpVar(id), &LpVar(id2)) => {
-                if id == id2 {
-                    assert_eq!(self.ty, other.ty);
-                    Some(LoanPath { kind: LpVar(id), ty: self.ty })
-                } else {
-                    None
-                }
-            }
-            (&LpUpvar(id), &LpUpvar(id2)) => {
-                if id == id2 {
-                    assert_eq!(self.ty, other.ty);
-                    Some(LoanPath { kind: LpUpvar(id), ty: self.ty })
-                } else {
-                    None
-                }
-            }
-            _ => None,
-        }
-    }
-}
-
-pub fn opt_loan_path<'tcx>(cmt: &mc::cmt<'tcx>) -> Option<Rc<LoanPath<'tcx>>> {
-    //! Computes the `LoanPath` (if any) for a `cmt`.
-    //! Note that this logic is somewhat duplicated in
-    //! the method `compute()` found in `gather_loans::restrictions`,
-    //! which allows it to share common loan path pieces as it
-    //! traverses the CMT.
-
-    let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
-
-    match cmt.cat {
-        mc::cat_rvalue(..) |
-        mc::cat_static_item => {
-            None
-        }
-
-        mc::cat_local(id) => {
-            Some(new_lp(LpVar(id)))
-        }
-
-        mc::cat_upvar(mc::Upvar { id, .. }) => {
-            Some(new_lp(LpUpvar(id)))
-        }
-
-        mc::cat_deref(ref cmt_base, _, pk) => {
-            opt_loan_path(cmt_base).map(|lp| {
-                new_lp(LpExtend(lp, cmt.mutbl, LpDeref(pk)))
-            })
-        }
-
-        mc::cat_interior(ref cmt_base, ik) => {
-            opt_loan_path(cmt_base).map(|lp| {
-                new_lp(LpExtend(lp, cmt.mutbl, LpInterior(ik)))
-            })
-        }
-
-        mc::cat_downcast(ref cmt_base, variant_def_id) =>
-            opt_loan_path(cmt_base)
-            .map(|lp| {
-                new_lp(LpDowncast(lp, variant_def_id))
-            }),
-
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////
-// Errors
-
-// Errors that can occur
-#[deriving(PartialEq)]
-#[allow(missing_copy_implementations)]
-pub enum bckerr_code {
-    err_mutbl,
-    err_out_of_scope(ty::Region, ty::Region), // superscope, subscope
-    err_borrowed_pointer_too_short(ty::Region, ty::Region), // loan, ptr
-}
-
-// Combination of an error code and the categorization of the expression
-// that caused it
-#[deriving(PartialEq)]
-pub struct BckError<'tcx> {
-    span: Span,
-    cause: euv::LoanCause,
-    cmt: mc::cmt<'tcx>,
-    code: bckerr_code
-}
-
-pub enum AliasableViolationKind {
-    MutabilityViolation,
-    BorrowViolation(euv::LoanCause)
-}
-
-impl Copy for AliasableViolationKind {}
-
-#[deriving(Show)]
-pub enum MovedValueUseKind {
-    MovedInUse,
-    MovedInCapture,
-}
-
-impl Copy for MovedValueUseKind {}
-
-///////////////////////////////////////////////////////////////////////////
-// Misc
-
-impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
-    pub fn is_subregion_of(&self, r_sub: ty::Region, r_sup: ty::Region)
-                           -> bool {
-        self.tcx.region_maps.is_subregion_of(r_sub, r_sup)
-    }
-
-    pub fn mc(&self) -> mc::MemCategorizationContext<'a, ty::ctxt<'tcx>> {
-        mc::MemCategorizationContext::new(self.tcx)
-    }
-
-    pub fn cat_expr(&self, expr: &ast::Expr) -> mc::cmt<'tcx> {
-        match self.mc().cat_expr(expr) {
-            Ok(c) => c,
-            Err(()) => {
-                self.tcx.sess.span_bug(expr.span, "error in mem categorization");
-            }
-        }
-    }
-
-    pub fn report(&self, err: BckError<'tcx>) {
-        self.span_err(
-            err.span,
-            self.bckerr_to_string(&err).as_slice());
-        self.note_and_explain_bckerr(err);
-    }
-
-    pub fn report_use_of_moved_value(&self,
-                                     use_span: Span,
-                                     use_kind: MovedValueUseKind,
-                                     lp: &LoanPath<'tcx>,
-                                     the_move: &move_data::Move,
-                                     moved_lp: &LoanPath<'tcx>,
-                                     param_env: &ParameterEnvironment<'tcx>) {
-        let verb = match use_kind {
-            MovedInUse => "use",
-            MovedInCapture => "capture",
-        };
-
-        let (ol, moved_lp_msg) = match the_move.kind {
-            move_data::Declared => {
-                self.tcx.sess.span_err(
-                    use_span,
-                    format!("{} of possibly uninitialized variable: `{}`",
-                            verb,
-                            self.loan_path_to_string(lp)).as_slice());
-                (self.loan_path_to_string(moved_lp),
-                 String::new())
-            }
-            _ => {
-                // If moved_lp is something like `x.a`, and lp is something like `x.b`, we would
-                // normally generate a rather confusing message:
-                //
-                //     error: use of moved value: `x.b`
-                //     note: `x.a` moved here...
-                //
-                // What we want to do instead is get the 'common ancestor' of the two moves and
-                // use that for most of the message instead, giving is something like this:
-                //
-                //     error: use of moved value: `x`
-                //     note: `x` moved here (through moving `x.a`)...
-
-                let common = moved_lp.common(lp);
-                let has_common = common.is_some();
-                let has_fork = moved_lp.has_fork(lp);
-                let (nl, ol, moved_lp_msg) =
-                    if has_fork && has_common {
-                        let nl = self.loan_path_to_string(&common.unwrap());
-                        let ol = nl.clone();
-                        let moved_lp_msg = format!(" (through moving `{}`)",
-                                                   self.loan_path_to_string(moved_lp));
-                        (nl, ol, moved_lp_msg)
-                    } else {
-                        (self.loan_path_to_string(lp),
-                         self.loan_path_to_string(moved_lp),
-                         String::new())
-                    };
-
-                let partial = moved_lp.depth() > lp.depth();
-                let msg = if !has_fork && partial { "partially " }
-                          else if has_fork && !has_common { "collaterally "}
-                          else { "" };
-                self.tcx.sess.span_err(
-                    use_span,
-                    format!("{} of {}moved value: `{}`",
-                            verb,
-                            msg,
-                            nl).as_slice());
-                (ol, moved_lp_msg)
-            }
-        };
-
-        match the_move.kind {
-            move_data::Declared => {}
-
-            move_data::MoveExpr => {
-                let (expr_ty, expr_span) = match self.tcx
-                                                     .map
-                                                     .find(the_move.id) {
-                    Some(ast_map::NodeExpr(expr)) => {
-                        (ty::expr_ty_adjusted(self.tcx, &*expr), expr.span)
-                    }
-                    r => {
-                        self.tcx.sess.bug(format!("MoveExpr({}) maps to \
-                                                   {}, not Expr",
-                                                  the_move.id,
-                                                  r).as_slice())
-                    }
-                };
-                let (suggestion, _) = move_suggestion(self.tcx, param_env, expr_ty,
-                        ("moved by default", ""));
-                self.tcx.sess.span_note(
-                    expr_span,
-                    format!("`{}` moved here{} because it has type `{}`, which is {}",
-                            ol,
-                            moved_lp_msg,
-                            expr_ty.user_string(self.tcx),
-                            suggestion).as_slice());
-            }
-
-            move_data::MovePat => {
-                let pat_ty = ty::node_id_to_type(self.tcx, the_move.id);
-                let span = self.tcx.map.span(the_move.id);
-                self.tcx.sess.span_note(span,
-                    format!("`{}` moved here{} because it has type `{}`, \
-                             which is moved by default",
-                            ol,
-                            moved_lp_msg,
-                            pat_ty.user_string(self.tcx)).as_slice());
-                self.tcx.sess.span_help(span,
-                    "use `ref` to override");
-            }
-
-            move_data::Captured => {
-                let (expr_ty, expr_span) = match self.tcx
-                                                     .map
-                                                     .find(the_move.id) {
-                    Some(ast_map::NodeExpr(expr)) => {
-                        (ty::expr_ty_adjusted(self.tcx, &*expr), expr.span)
-                    }
-                    r => {
-                        self.tcx.sess.bug(format!("Captured({}) maps to \
-                                                   {}, not Expr",
-                                                  the_move.id,
-                                                  r).as_slice())
-                    }
-                };
-                let (suggestion, help) = move_suggestion(self.tcx,
-                                                         param_env,
-                                                         expr_ty,
-                        ("moved by default", "make a copy and \
-                         capture that instead to override"));
-                self.tcx.sess.span_note(
-                    expr_span,
-                    format!("`{}` moved into closure environment here{} because it \
-                            has type `{}`, which is {}",
-                            ol,
-                            moved_lp_msg,
-                            expr_ty.user_string(self.tcx),
-                            suggestion).as_slice());
-                self.tcx.sess.span_help(expr_span, help);
-            }
-        }
-
-        fn move_suggestion<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                 param_env: &ty::ParameterEnvironment<'tcx>,
-                                 ty: Ty<'tcx>,
-                                 default_msgs: (&'static str, &'static str))
-                                 -> (&'static str, &'static str) {
-            match ty.sty {
-                ty::ty_closure(box ty::ClosureTy {
-                        store: ty::RegionTraitStore(..),
-                        ..
-                    }) =>
-                    ("a non-copyable stack closure",
-                     "capture it in a new closure, e.g. `|x| f(x)`, to override"),
-                _ if ty::type_moves_by_default(tcx, ty, param_env) =>
-                    ("non-copyable",
-                     "perhaps you meant to use `clone()`?"),
-                _ => default_msgs,
-            }
-        }
-    }
-
-    pub fn report_reassigned_immutable_variable(&self,
-                                                span: Span,
-                                                lp: &LoanPath<'tcx>,
-                                                assign:
-                                                &move_data::Assignment) {
-        self.tcx.sess.span_err(
-            span,
-            format!("re-assignment of immutable variable `{}`",
-                    self.loan_path_to_string(lp)).as_slice());
-        self.tcx.sess.span_note(assign.span, "prior assignment occurs here");
-    }
-
-    pub fn span_err(&self, s: Span, m: &str) {
-        self.tcx.sess.span_err(s, m);
-    }
-
-    pub fn span_note(&self, s: Span, m: &str) {
-        self.tcx.sess.span_note(s, m);
-    }
-
-    pub fn span_end_note(&self, s: Span, m: &str) {
-        self.tcx.sess.span_end_note(s, m);
-    }
-
-    pub fn span_help(&self, s: Span, m: &str) {
-        self.tcx.sess.span_help(s, m);
-    }
-
-    pub fn bckerr_to_string(&self, err: &BckError<'tcx>) -> String {
-        match err.code {
-            err_mutbl => {
-                let descr = match err.cmt.note {
-                    mc::NoteClosureEnv(_) | mc::NoteUpvarRef(_) => {
-                        self.cmt_to_string(&*err.cmt)
-                    }
-                    _ => match opt_loan_path(&err.cmt) {
-                        None => {
-                            format!("{} {}",
-                                    err.cmt.mutbl.to_user_str(),
-                                    self.cmt_to_string(&*err.cmt))
-                        }
-                        Some(lp) => {
-                            format!("{} {} `{}`",
-                                    err.cmt.mutbl.to_user_str(),
-                                    self.cmt_to_string(&*err.cmt),
-                                    self.loan_path_to_string(&*lp))
-                        }
-                    }
-                };
-
-                match err.cause {
-                    euv::ClosureCapture(_) => {
-                        format!("closure cannot assign to {}", descr)
-                    }
-                    euv::OverloadedOperator |
-                    euv::AddrOf |
-                    euv::RefBinding |
-                    euv::AutoRef |
-                    euv::ForLoop |
-                    euv::MatchDiscriminant => {
-                        format!("cannot borrow {} as mutable", descr)
-                    }
-                    euv::ClosureInvocation => {
-                        self.tcx.sess.span_bug(err.span,
-                            "err_mutbl with a closure invocation");
-                    }
-                }
-            }
-            err_out_of_scope(..) => {
-                let msg = match opt_loan_path(&err.cmt) {
-                    None => "borrowed value".to_string(),
-                    Some(lp) => {
-                        format!("`{}`", self.loan_path_to_string(&*lp))
-                    }
-                };
-                format!("{} does not live long enough", msg)
-            }
-            err_borrowed_pointer_too_short(..) => {
-                let descr = match opt_loan_path(&err.cmt) {
-                    Some(lp) => {
-                        format!("`{}`", self.loan_path_to_string(&*lp))
-                    }
-                    None => self.cmt_to_string(&*err.cmt),
-                };
-
-                format!("lifetime of {} is too short to guarantee \
-                                its contents can be safely reborrowed",
-                               descr)
-            }
-        }
-    }
-
-    pub fn report_aliasability_violation(&self,
-                                         span: Span,
-                                         kind: AliasableViolationKind,
-                                         cause: mc::AliasableReason) {
-        let mut is_closure = false;
-        let prefix = match kind {
-            MutabilityViolation => {
-                "cannot assign to data"
-            }
-            BorrowViolation(euv::ClosureCapture(_)) => {
-                // I don't think we can get aliasability violations
-                // with closure captures, so no need to come up with a
-                // good error message. The reason this cannot happen
-                // is because we only capture local variables in
-                // closures, and those are never aliasable.
-                self.tcx.sess.span_bug(
-                    span,
-                    "aliasability violation with closure");
-            }
-            BorrowViolation(euv::OverloadedOperator) |
-            BorrowViolation(euv::AddrOf) |
-            BorrowViolation(euv::AutoRef) |
-            BorrowViolation(euv::RefBinding) |
-            BorrowViolation(euv::MatchDiscriminant) => {
-                "cannot borrow data mutably"
-            }
-
-            BorrowViolation(euv::ClosureInvocation) => {
-                is_closure = true;
-                "closure invocation"
-            }
-
-            BorrowViolation(euv::ForLoop) => {
-                "`for` loop"
-            }
-        };
-
-        match cause {
-            mc::AliasableOther => {
-                self.tcx.sess.span_err(
-                    span,
-                    format!("{} in an aliasable location",
-                             prefix).as_slice());
-            }
-            mc::AliasableClosure(id) => {
-                self.tcx.sess.span_err(span,
-                                       format!("{} in a captured outer \
-                                               variable in an `Fn` closure", prefix).as_slice());
-                span_help!(self.tcx.sess, self.tcx.map.span(id),
-                           "consider changing this closure to take self by mutable reference");
-            }
-            mc::AliasableStatic(..) |
-            mc::AliasableStaticMut(..) => {
-                self.tcx.sess.span_err(
-                    span,
-                    format!("{} in a static location", prefix).as_slice());
-            }
-            mc::AliasableBorrowed => {
-                self.tcx.sess.span_err(
-                    span,
-                    format!("{} in a `&` reference", prefix).as_slice());
-            }
-        }
-
-        if is_closure {
-            self.tcx.sess.span_help(
-                span,
-                "closures behind references must be called via `&mut`");
-        }
-    }
-
-    pub fn note_and_explain_bckerr(&self, err: BckError<'tcx>) {
-        let code = err.code;
-        match code {
-            err_mutbl(..) => {
-                match err.cmt.note {
-                    mc::NoteClosureEnv(upvar_id) | mc::NoteUpvarRef(upvar_id) => {
-                        // If this is an `Fn` closure, it simply can't mutate upvars.
-                        // If it's an `FnMut` closure, the original variable was declared immutable.
-                        // We need to determine which is the case here.
-                        let kind = match err.cmt.upvar().unwrap().cat {
-                            mc::cat_upvar(mc::Upvar { kind, .. }) => kind,
-                            _ => unreachable!()
-                        };
-                        if kind == ty::FnUnboxedClosureKind {
-                            self.tcx.sess.span_help(
-                                self.tcx.map.span(upvar_id.closure_expr_id),
-                                "consider changing this closure to take \
-                                 self by mutable reference");
-                        }
-                    }
-                    _ => {}
-                }
-            }
-
-            err_out_of_scope(super_scope, sub_scope) => {
-                note_and_explain_region(
-                    self.tcx,
-                    "reference must be valid for ",
-                    sub_scope,
-                    "...");
-                let suggestion = if is_statement_scope(self.tcx, super_scope) {
-                    Some("consider using a `let` binding to increase its lifetime")
-                } else {
-                    None
-                };
-                let span = note_and_explain_region(
-                    self.tcx,
-                    "...but borrowed value is only valid for ",
-                    super_scope,
-                    "");
-                match (span, suggestion) {
-                    (_, None) => {},
-                    (Some(span), Some(msg)) => self.tcx.sess.span_help(span, msg),
-                    (None, Some(msg)) => self.tcx.sess.help(msg),
-                }
-            }
-
-            err_borrowed_pointer_too_short(loan_scope, ptr_scope) => {
-                let descr = match opt_loan_path(&err.cmt) {
-                    Some(lp) => {
-                        format!("`{}`", self.loan_path_to_string(&*lp))
-                    }
-                    None => self.cmt_to_string(&*err.cmt),
-                };
-                note_and_explain_region(
-                    self.tcx,
-                    format!("{} would have to be valid for ",
-                            descr).as_slice(),
-                    loan_scope,
-                    "...");
-                note_and_explain_region(
-                    self.tcx,
-                    format!("...but {} is only valid for ", descr).as_slice(),
-                    ptr_scope,
-                    "");
-            }
-        }
-    }
-
-    pub fn append_loan_path_to_string(&self,
-                                      loan_path: &LoanPath<'tcx>,
-                                      out: &mut String) {
-        match loan_path.kind {
-            LpUpvar(ty::UpvarId{ var_id: id, closure_expr_id: _ }) |
-            LpVar(id) => {
-                out.push_str(ty::local_var_name_str(self.tcx, id).get());
-            }
-
-            LpDowncast(ref lp_base, variant_def_id) => {
-                out.push('(');
-                self.append_loan_path_to_string(&**lp_base, out);
-                out.push_str(DOWNCAST_PRINTED_OPERATOR);
-                out.push_str(ty::item_path_str(self.tcx, variant_def_id).as_slice());
-                out.push(')');
-            }
-
-
-            LpExtend(ref lp_base, _, LpInterior(mc::InteriorField(fname))) => {
-                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
-                match fname {
-                    mc::NamedField(fname) => {
-                        out.push('.');
-                        out.push_str(token::get_name(fname).get());
-                    }
-                    mc::PositionalField(idx) => {
-                        out.push('.');
-                        out.push_str(idx.to_string().as_slice());
-                    }
-                }
-            }
-
-            LpExtend(ref lp_base, _, LpInterior(mc::InteriorElement(_))) => {
-                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
-                out.push_str("[..]");
-            }
-
-            LpExtend(ref lp_base, _, LpDeref(_)) => {
-                out.push('*');
-                self.append_loan_path_to_string(&**lp_base, out);
-            }
-        }
-    }
-
-    pub fn append_autoderefd_loan_path_to_string(&self,
-                                                 loan_path: &LoanPath<'tcx>,
-                                                 out: &mut String) {
-        match loan_path.kind {
-            LpExtend(ref lp_base, _, LpDeref(_)) => {
-                // For a path like `(*x).f` or `(*x)[3]`, autoderef
-                // rules would normally allow users to omit the `*x`.
-                // So just serialize such paths to `x.f` or x[3]` respectively.
-                self.append_autoderefd_loan_path_to_string(&**lp_base, out)
-            }
-
-            LpDowncast(ref lp_base, variant_def_id) => {
-                out.push('(');
-                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
-                out.push(':');
-                out.push_str(ty::item_path_str(self.tcx, variant_def_id).as_slice());
-                out.push(')');
-            }
-
-            LpVar(..) | LpUpvar(..) | LpExtend(_, _, LpInterior(..)) => {
-                self.append_loan_path_to_string(loan_path, out)
-            }
-        }
-    }
-
-    pub fn loan_path_to_string(&self, loan_path: &LoanPath<'tcx>) -> String {
-        let mut result = String::new();
-        self.append_loan_path_to_string(loan_path, &mut result);
-        result
-    }
-
-    pub fn cmt_to_string(&self, cmt: &mc::cmt_<'tcx>) -> String {
-        self.mc().cmt_to_string(cmt)
-    }
-}
-
-fn is_statement_scope(tcx: &ty::ctxt, region: ty::Region) -> bool {
-     match region {
-         ty::ReScope(scope) => {
-             match tcx.map.find(scope.node_id()) {
-                 Some(ast_map::NodeStmt(_)) => true,
-                 _ => false
-             }
-         }
-         _ => false
-     }
-}
-
-impl BitwiseOperator for LoanDataFlowOperator {
-    #[inline]
-    fn join(&self, succ: uint, pred: uint) -> uint {
-        succ | pred // loans from both preds are in scope
-    }
-}
-
-impl DataFlowOperator for LoanDataFlowOperator {
-    #[inline]
-    fn initial_value(&self) -> bool {
-        false // no loans in scope by default
-    }
-}
-
-impl<'tcx> Repr<'tcx> for Loan<'tcx> {
-    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("Loan_{}({}, {}, {}-{}, {})",
-                 self.index,
-                 self.loan_path.repr(tcx),
-                 self.kind,
-                 self.gen_scope,
-                 self.kill_scope,
-                 self.restricted_paths.repr(tcx))
-    }
-}
-
-impl<'tcx> Repr<'tcx> for LoanPath<'tcx> {
-    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
-        match self.kind {
-            LpVar(id) => {
-                format!("$({})", tcx.map.node_to_string(id))
-            }
-
-            LpUpvar(ty::UpvarId{ var_id, closure_expr_id }) => {
-                let s = tcx.map.node_to_string(var_id);
-                format!("$({} captured by id={})", s, closure_expr_id)
-            }
-
-            LpDowncast(ref lp, variant_def_id) => {
-                let variant_str = if variant_def_id.krate == ast::LOCAL_CRATE {
-                    ty::item_path_str(tcx, variant_def_id)
-                } else {
-                    variant_def_id.repr(tcx)
-                };
-                format!("({}{}{})", lp.repr(tcx), DOWNCAST_PRINTED_OPERATOR, variant_str)
-            }
-
-            LpExtend(ref lp, _, LpDeref(_)) => {
-                format!("{}.*", lp.repr(tcx))
-            }
-
-            LpExtend(ref lp, _, LpInterior(ref interior)) => {
-                format!("{}.{}", lp.repr(tcx), interior.repr(tcx))
-            }
-        }
-    }
-}
-
-impl<'tcx> UserString<'tcx> for LoanPath<'tcx> {
-    fn user_string(&self, tcx: &ty::ctxt<'tcx>) -> String {
-        match self.kind {
-            LpVar(id) => {
-                format!("$({})", tcx.map.node_to_user_string(id))
-            }
-
-            LpUpvar(ty::UpvarId{ var_id, closure_expr_id: _ }) => {
-                let s = tcx.map.node_to_user_string(var_id);
-                format!("$({} captured by closure)", s)
-            }
-
-            LpDowncast(ref lp, variant_def_id) => {
-                let variant_str = if variant_def_id.krate == ast::LOCAL_CRATE {
-                    ty::item_path_str(tcx, variant_def_id)
-                } else {
-                    variant_def_id.repr(tcx)
-                };
-                format!("({}{}{})", lp.user_string(tcx), DOWNCAST_PRINTED_OPERATOR, variant_str)
-            }
-
-            LpExtend(ref lp, _, LpDeref(_)) => {
-                format!("{}.*", lp.user_string(tcx))
-            }
-
-            LpExtend(ref lp, _, LpInterior(ref interior)) => {
-                format!("{}.{}", lp.user_string(tcx), interior.repr(tcx))
-            }
-        }
-    }
-}
diff --git a/src/librustc/middle/borrowck/move_data.rs b/src/librustc/middle/borrowck/move_data.rs
deleted file mode 100644 (file)
index 3bb6145..0000000
+++ /dev/null
@@ -1,802 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Data structures used for tracking moves. Please see the extensive
-//! comments in the section "Moves and initialization" in `doc.rs`.
-
-pub use self::MoveKind::*;
-
-use std::cell::RefCell;
-use std::rc::Rc;
-use std::uint;
-use middle::borrowck::*;
-use middle::borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
-use middle::borrowck::LoanPathElem::{LpInterior};
-use middle::cfg;
-use middle::dataflow::DataFlowContext;
-use middle::dataflow::BitwiseOperator;
-use middle::dataflow::DataFlowOperator;
-use middle::expr_use_visitor as euv;
-use middle::mem_categorization as mc;
-use middle::ty;
-use syntax::ast;
-use syntax::ast_util;
-use syntax::codemap::Span;
-use util::nodemap::{FnvHashMap, NodeSet};
-use util::ppaux::Repr;
-
-#[path="fragments.rs"]
-pub mod fragments;
-
-pub struct MoveData<'tcx> {
-    /// Move paths. See section "Move paths" in `doc.rs`.
-    pub paths: RefCell<Vec<MovePath<'tcx>>>,
-
-    /// Cache of loan path to move path index, for easy lookup.
-    pub path_map: RefCell<FnvHashMap<Rc<LoanPath<'tcx>>, MovePathIndex>>,
-
-    /// Each move or uninitialized variable gets an entry here.
-    pub moves: RefCell<Vec<Move>>,
-
-    /// Assignments to a variable, like `x = foo`. These are assigned
-    /// bits for dataflow, since we must track them to ensure that
-    /// immutable variables are assigned at most once along each path.
-    pub var_assignments: RefCell<Vec<Assignment>>,
-
-    /// Assignments to a path, like `x.f = foo`. These are not
-    /// assigned dataflow bits, but we track them because they still
-    /// kill move bits.
-    pub path_assignments: RefCell<Vec<Assignment>>,
-
-    /// Enum variant matched within a pattern on some match arm, like
-    /// `SomeStruct{ f: Variant1(x, y) } => ...`
-    pub variant_matches: RefCell<Vec<VariantMatch>>,
-
-    /// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
-    pub assignee_ids: RefCell<NodeSet>,
-
-    /// Path-fragments from moves in to or out of parts of structured data.
-    pub fragments: RefCell<fragments::FragmentSets>,
-}
-
-pub struct FlowedMoveData<'a, 'tcx: 'a> {
-    pub move_data: MoveData<'tcx>,
-
-    pub dfcx_moves: MoveDataFlow<'a, 'tcx>,
-
-    // We could (and maybe should, for efficiency) combine both move
-    // and assign data flow into one, but this way it's easier to
-    // distinguish the bits that correspond to moves and assignments.
-    pub dfcx_assign: AssignDataFlow<'a, 'tcx>
-}
-
-/// Index into `MoveData.paths`, used like a pointer
-#[deriving(PartialEq, Eq, PartialOrd, Ord, Show)]
-pub struct MovePathIndex(uint);
-
-impl Copy for MovePathIndex {}
-
-impl MovePathIndex {
-    fn get(&self) -> uint {
-        let MovePathIndex(v) = *self; v
-    }
-}
-
-impl Clone for MovePathIndex {
-    fn clone(&self) -> MovePathIndex {
-        MovePathIndex(self.get())
-    }
-}
-
-#[allow(non_upper_case_globals)]
-static InvalidMovePathIndex: MovePathIndex =
-    MovePathIndex(uint::MAX);
-
-/// Index into `MoveData.moves`, used like a pointer
-#[deriving(PartialEq)]
-pub struct MoveIndex(uint);
-
-impl Copy for MoveIndex {}
-
-impl MoveIndex {
-    fn get(&self) -> uint {
-        let MoveIndex(v) = *self; v
-    }
-}
-
-#[allow(non_upper_case_globals)]
-static InvalidMoveIndex: MoveIndex =
-    MoveIndex(uint::MAX);
-
-pub struct MovePath<'tcx> {
-    /// Loan path corresponding to this move path
-    pub loan_path: Rc<LoanPath<'tcx>>,
-
-    /// Parent pointer, `InvalidMovePathIndex` if root
-    pub parent: MovePathIndex,
-
-    /// Head of linked list of moves to this path,
-    /// `InvalidMoveIndex` if not moved
-    pub first_move: MoveIndex,
-
-    /// First node in linked list of children, `InvalidMovePathIndex` if leaf
-    pub first_child: MovePathIndex,
-
-    /// Next node in linked list of parent's children (siblings),
-    /// `InvalidMovePathIndex` if none.
-    pub next_sibling: MovePathIndex,
-}
-
-#[deriving(PartialEq, Show)]
-pub enum MoveKind {
-    Declared,   // When declared, variables start out "moved".
-    MoveExpr,   // Expression or binding that moves a variable
-    MovePat,    // By-move binding
-    Captured    // Closure creation that moves a value
-}
-
-impl Copy for MoveKind {}
-
-pub struct Move {
-    /// Path being moved.
-    pub path: MovePathIndex,
-
-    /// id of node that is doing the move.
-    pub id: ast::NodeId,
-
-    /// Kind of move, for error messages.
-    pub kind: MoveKind,
-
-    /// Next node in linked list of moves from `path`, or `InvalidMoveIndex`
-    pub next_move: MoveIndex
-}
-
-impl Copy for Move {}
-
-pub struct Assignment {
-    /// Path being assigned.
-    pub path: MovePathIndex,
-
-    /// id where assignment occurs
-    pub id: ast::NodeId,
-
-    /// span of node where assignment occurs
-    pub span: Span,
-}
-
-impl Copy for Assignment {}
-
-pub struct VariantMatch {
-    /// downcast to the variant.
-    pub path: MovePathIndex,
-
-    /// path being downcast to the variant.
-    pub base_path: MovePathIndex,
-
-    /// id where variant's pattern occurs
-    pub id: ast::NodeId,
-
-    /// says if variant established by move (and why), by copy, or by borrow.
-    pub mode: euv::MatchMode
-}
-
-impl Copy for VariantMatch {}
-
-#[deriving(Clone)]
-pub struct MoveDataFlowOperator;
-
-impl Copy for MoveDataFlowOperator {}
-
-pub type MoveDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, MoveDataFlowOperator>;
-
-#[deriving(Clone)]
-pub struct AssignDataFlowOperator;
-
-impl Copy for AssignDataFlowOperator {}
-
-pub type AssignDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, AssignDataFlowOperator>;
-
-fn loan_path_is_precise(loan_path: &LoanPath) -> bool {
-    match loan_path.kind {
-        LpVar(_) | LpUpvar(_) => {
-            true
-        }
-        LpExtend(_, _, LpInterior(mc::InteriorElement(_))) => {
-            // Paths involving element accesses do not refer to a unique
-            // location, as there is no accurate tracking of the indices.
-            false
-        }
-        LpDowncast(ref lp_base, _) |
-        LpExtend(ref lp_base, _, _) => {
-            loan_path_is_precise(&**lp_base)
-        }
-    }
-}
-
-impl Move {
-    pub fn to_string<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("Move{} path: {}, id: {}, kind: {} {}",
-                "{",
-                move_data.path_loan_path(self.path).repr(tcx),
-                self.id,
-                self.kind,
-                "}")
-    }
-}
-
-impl Assignment {
-    pub fn to_string<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("Assignment{} path: {}, id: {} {}",
-                "{",
-                move_data.path_loan_path(self.path).repr(tcx),
-                self.id,
-                "}")
-    }
-}
-
-impl VariantMatch {
-    pub fn to_string<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("VariantMatch{} path: {}, id: {} {}",
-                "{",
-                move_data.path_loan_path(self.path).repr(tcx),
-                self.id,
-                "}")
-    }
-}
-
-impl<'tcx> MoveData<'tcx> {
-    pub fn new() -> MoveData<'tcx> {
-        MoveData {
-            paths: RefCell::new(Vec::new()),
-            path_map: RefCell::new(FnvHashMap::new()),
-            moves: RefCell::new(Vec::new()),
-            path_assignments: RefCell::new(Vec::new()),
-            var_assignments: RefCell::new(Vec::new()),
-            variant_matches: RefCell::new(Vec::new()),
-            assignee_ids: RefCell::new(NodeSet::new()),
-            fragments: RefCell::new(fragments::FragmentSets::new()),
-        }
-    }
-
-    pub fn path_loan_path(&self, index: MovePathIndex) -> Rc<LoanPath<'tcx>> {
-        (*self.paths.borrow())[index.get()].loan_path.clone()
-    }
-
-    fn path_parent(&self, index: MovePathIndex) -> MovePathIndex {
-        (*self.paths.borrow())[index.get()].parent
-    }
-
-    fn path_first_move(&self, index: MovePathIndex) -> MoveIndex {
-        (*self.paths.borrow())[index.get()].first_move
-    }
-
-    /// Returns the index of first child, or `InvalidMovePathIndex` if
-    /// `index` is leaf.
-    fn path_first_child(&self, index: MovePathIndex) -> MovePathIndex {
-        (*self.paths.borrow())[index.get()].first_child
-    }
-
-    fn path_next_sibling(&self, index: MovePathIndex) -> MovePathIndex {
-        (*self.paths.borrow())[index.get()].next_sibling
-    }
-
-    fn set_path_first_move(&self,
-                           index: MovePathIndex,
-                           first_move: MoveIndex) {
-        (*self.paths.borrow_mut())[index.get()].first_move = first_move
-    }
-
-    fn set_path_first_child(&self,
-                            index: MovePathIndex,
-                            first_child: MovePathIndex) {
-        (*self.paths.borrow_mut())[index.get()].first_child = first_child
-    }
-
-    fn move_next_move(&self, index: MoveIndex) -> MoveIndex {
-        //! Type safe indexing operator
-        (*self.moves.borrow())[index.get()].next_move
-    }
-
-    fn is_var_path(&self, index: MovePathIndex) -> bool {
-        //! True if `index` refers to a variable
-        self.path_parent(index) == InvalidMovePathIndex
-    }
-
-    /// Returns the existing move path index for `lp`, if any, and otherwise adds a new index for
-    /// `lp` and any of its base paths that do not yet have an index.
-    pub fn move_path(&self,
-                     tcx: &ty::ctxt<'tcx>,
-                     lp: Rc<LoanPath<'tcx>>) -> MovePathIndex {
-        match self.path_map.borrow().get(&lp) {
-            Some(&index) => {
-                return index;
-            }
-            None => {}
-        }
-
-        let index = match lp.kind {
-            LpVar(..) | LpUpvar(..) => {
-                let index = MovePathIndex(self.paths.borrow().len());
-
-                self.paths.borrow_mut().push(MovePath {
-                    loan_path: lp.clone(),
-                    parent: InvalidMovePathIndex,
-                    first_move: InvalidMoveIndex,
-                    first_child: InvalidMovePathIndex,
-                    next_sibling: InvalidMovePathIndex,
-                });
-
-                index
-            }
-
-            LpDowncast(ref base, _) |
-            LpExtend(ref base, _, _) => {
-                let parent_index = self.move_path(tcx, base.clone());
-
-                let index = MovePathIndex(self.paths.borrow().len());
-
-                let next_sibling = self.path_first_child(parent_index);
-                self.set_path_first_child(parent_index, index);
-
-                self.paths.borrow_mut().push(MovePath {
-                    loan_path: lp.clone(),
-                    parent: parent_index,
-                    first_move: InvalidMoveIndex,
-                    first_child: InvalidMovePathIndex,
-                    next_sibling: next_sibling,
-                });
-
-                index
-            }
-        };
-
-        debug!("move_path(lp={}, index={})",
-               lp.repr(tcx),
-               index);
-
-        assert_eq!(index.get(), self.paths.borrow().len() - 1);
-        self.path_map.borrow_mut().insert(lp, index);
-        return index;
-    }
-
-    fn existing_move_path(&self, lp: &Rc<LoanPath<'tcx>>)
-                          -> Option<MovePathIndex> {
-        self.path_map.borrow().get(lp).cloned()
-    }
-
-    fn existing_base_paths(&self, lp: &Rc<LoanPath<'tcx>>)
-                           -> Vec<MovePathIndex> {
-        let mut result = vec!();
-        self.add_existing_base_paths(lp, &mut result);
-        result
-    }
-
-    /// Adds any existing move path indices for `lp` and any base paths of `lp` to `result`, but
-    /// does not add new move paths
-    fn add_existing_base_paths(&self, lp: &Rc<LoanPath<'tcx>>,
-                               result: &mut Vec<MovePathIndex>) {
-        match self.path_map.borrow().get(lp).cloned() {
-            Some(index) => {
-                self.each_base_path(index, |p| {
-                    result.push(p);
-                    true
-                });
-            }
-            None => {
-                match lp.kind {
-                    LpVar(..) | LpUpvar(..) => { }
-                    LpDowncast(ref b, _) |
-                    LpExtend(ref b, _, _) => {
-                        self.add_existing_base_paths(b, result);
-                    }
-                }
-            }
-        }
-
-    }
-
-    /// Adds a new move entry for a move of `lp` that occurs at location `id` with kind `kind`.
-    pub fn add_move(&self,
-                    tcx: &ty::ctxt<'tcx>,
-                    lp: Rc<LoanPath<'tcx>>,
-                    id: ast::NodeId,
-                    kind: MoveKind) {
-        debug!("add_move(lp={}, id={}, kind={})",
-               lp.repr(tcx),
-               id,
-               kind);
-
-        let path_index = self.move_path(tcx, lp.clone());
-        let move_index = MoveIndex(self.moves.borrow().len());
-
-        self.fragments.borrow_mut().add_move(path_index);
-
-        let next_move = self.path_first_move(path_index);
-        self.set_path_first_move(path_index, move_index);
-
-        self.moves.borrow_mut().push(Move {
-            path: path_index,
-            id: id,
-            kind: kind,
-            next_move: next_move
-        });
-    }
-
-    /// Adds a new record for an assignment to `lp` that occurs at location `id` with the given
-    /// `span`.
-    pub fn add_assignment(&self,
-                          tcx: &ty::ctxt<'tcx>,
-                          lp: Rc<LoanPath<'tcx>>,
-                          assign_id: ast::NodeId,
-                          span: Span,
-                          assignee_id: ast::NodeId,
-                          mode: euv::MutateMode) {
-        debug!("add_assignment(lp={}, assign_id={}, assignee_id={}",
-               lp.repr(tcx), assign_id, assignee_id);
-
-        let path_index = self.move_path(tcx, lp.clone());
-
-        self.fragments.borrow_mut().add_assignment(path_index);
-
-        match mode {
-            euv::Init | euv::JustWrite => {
-                self.assignee_ids.borrow_mut().insert(assignee_id);
-            }
-            euv::WriteAndRead => { }
-        }
-
-        let assignment = Assignment {
-            path: path_index,
-            id: assign_id,
-            span: span,
-        };
-
-        if self.is_var_path(path_index) {
-            debug!("add_assignment[var](lp={}, assignment={}, path_index={})",
-                   lp.repr(tcx), self.var_assignments.borrow().len(), path_index);
-
-            self.var_assignments.borrow_mut().push(assignment);
-        } else {
-            debug!("add_assignment[path](lp={}, path_index={})",
-                   lp.repr(tcx), path_index);
-
-            self.path_assignments.borrow_mut().push(assignment);
-        }
-    }
-
-    /// Adds a new record for a match of `base_lp`, downcast to
-    /// variant `lp`, that occurs at location `pattern_id`.  (One
-    /// should be able to recover the span info from the
-    /// `pattern_id` and the ast_map, I think.)
-    pub fn add_variant_match(&self,
-                             tcx: &ty::ctxt<'tcx>,
-                             lp: Rc<LoanPath<'tcx>>,
-                             pattern_id: ast::NodeId,
-                             base_lp: Rc<LoanPath<'tcx>>,
-                             mode: euv::MatchMode) {
-        debug!("add_variant_match(lp={}, pattern_id={})",
-               lp.repr(tcx), pattern_id);
-
-        let path_index = self.move_path(tcx, lp.clone());
-        let base_path_index = self.move_path(tcx, base_lp.clone());
-
-        self.fragments.borrow_mut().add_assignment(path_index);
-
-        let variant_match = VariantMatch {
-            path: path_index,
-            base_path: base_path_index,
-            id: pattern_id,
-            mode: mode,
-        };
-
-        self.variant_matches.borrow_mut().push(variant_match);
-    }
-
-    fn fixup_fragment_sets(&self, tcx: &ty::ctxt<'tcx>) {
-        fragments::fixup_fragment_sets(self, tcx)
-    }
-
-    /// Adds the gen/kills for the various moves and
-    /// assignments into the provided data flow contexts.
-    /// Moves are generated by moves and killed by assignments and
-    /// scoping. Assignments are generated by assignment to variables and
-    /// killed by scoping. See `doc.rs` for more details.
-    fn add_gen_kills(&self,
-                     tcx: &ty::ctxt<'tcx>,
-                     dfcx_moves: &mut MoveDataFlow,
-                     dfcx_assign: &mut AssignDataFlow) {
-        for (i, the_move) in self.moves.borrow().iter().enumerate() {
-            dfcx_moves.add_gen(the_move.id, i);
-        }
-
-        for (i, assignment) in self.var_assignments.borrow().iter().enumerate() {
-            dfcx_assign.add_gen(assignment.id, i);
-            self.kill_moves(assignment.path, assignment.id, dfcx_moves);
-        }
-
-        for assignment in self.path_assignments.borrow().iter() {
-            self.kill_moves(assignment.path, assignment.id, dfcx_moves);
-        }
-
-        // Kill all moves related to a variable `x` when
-        // it goes out of scope:
-        for path in self.paths.borrow().iter() {
-            match path.loan_path.kind {
-                LpVar(..) | LpUpvar(..) | LpDowncast(..) => {
-                    let kill_scope = path.loan_path.kill_scope(tcx);
-                    let path = self.path_map.borrow()[path.loan_path];
-                    self.kill_moves(path, kill_scope.node_id(), dfcx_moves);
-                }
-                LpExtend(..) => {}
-            }
-        }
-
-        // Kill all assignments when the variable goes out of scope:
-        for (assignment_index, assignment) in
-                self.var_assignments.borrow().iter().enumerate() {
-            let lp = self.path_loan_path(assignment.path);
-            match lp.kind {
-                LpVar(..) | LpUpvar(..) | LpDowncast(..) => {
-                    let kill_scope = lp.kill_scope(tcx);
-                    dfcx_assign.add_kill(kill_scope.node_id(), assignment_index);
-                }
-                LpExtend(..) => {
-                    tcx.sess.bug("var assignment for non var path");
-                }
-            }
-        }
-    }
-
-    fn each_base_path(&self, index: MovePathIndex, f: |MovePathIndex| -> bool)
-                      -> bool {
-        let mut p = index;
-        while p != InvalidMovePathIndex {
-            if !f(p) {
-                return false;
-            }
-            p = self.path_parent(p);
-        }
-        return true;
-    }
-
-    fn each_extending_path(&self,
-                           index: MovePathIndex,
-                           f: |MovePathIndex| -> bool)
-                           -> bool {
-        if !f(index) {
-            return false;
-        }
-
-        let mut p = self.path_first_child(index);
-        while p != InvalidMovePathIndex {
-            if !self.each_extending_path(p, |x| f(x)) {
-                return false;
-            }
-            p = self.path_next_sibling(p);
-        }
-
-        return true;
-    }
-
-    fn each_applicable_move(&self,
-                            index0: MovePathIndex,
-                            f: |MoveIndex| -> bool)
-                            -> bool {
-        let mut ret = true;
-        self.each_extending_path(index0, |index| {
-            let mut p = self.path_first_move(index);
-            while p != InvalidMoveIndex {
-                if !f(p) {
-                    ret = false;
-                    break;
-                }
-                p = self.move_next_move(p);
-            }
-            ret
-        });
-        ret
-    }
-
-    fn kill_moves(&self,
-                  path: MovePathIndex,
-                  kill_id: ast::NodeId,
-                  dfcx_moves: &mut MoveDataFlow) {
-        // We can only perform kills for paths that refer to a unique location,
-        // since otherwise we may kill a move from one location with an
-        // assignment referring to another location.
-
-        let loan_path = self.path_loan_path(path);
-        if loan_path_is_precise(&*loan_path) {
-            self.each_applicable_move(path, |move_index| {
-                dfcx_moves.add_kill(kill_id, move_index.get());
-                true
-            });
-        }
-    }
-}
-
-impl<'a, 'tcx> FlowedMoveData<'a, 'tcx> {
-    pub fn new(move_data: MoveData<'tcx>,
-               tcx: &'a ty::ctxt<'tcx>,
-               cfg: &cfg::CFG,
-               id_range: ast_util::IdRange,
-               decl: &ast::FnDecl,
-               body: &ast::Block)
-               -> FlowedMoveData<'a, 'tcx> {
-        let mut dfcx_moves =
-            DataFlowContext::new(tcx,
-                                 "flowed_move_data_moves",
-                                 Some(decl),
-                                 cfg,
-                                 MoveDataFlowOperator,
-                                 id_range,
-                                 move_data.moves.borrow().len());
-        let mut dfcx_assign =
-            DataFlowContext::new(tcx,
-                                 "flowed_move_data_assigns",
-                                 Some(decl),
-                                 cfg,
-                                 AssignDataFlowOperator,
-                                 id_range,
-                                 move_data.var_assignments.borrow().len());
-
-        move_data.fixup_fragment_sets(tcx);
-
-        move_data.add_gen_kills(tcx,
-                                &mut dfcx_moves,
-                                &mut dfcx_assign);
-
-        dfcx_moves.add_kills_from_flow_exits(cfg);
-        dfcx_assign.add_kills_from_flow_exits(cfg);
-
-        dfcx_moves.propagate(cfg, body);
-        dfcx_assign.propagate(cfg, body);
-
-        FlowedMoveData {
-            move_data: move_data,
-            dfcx_moves: dfcx_moves,
-            dfcx_assign: dfcx_assign,
-        }
-    }
-
-    pub fn kind_of_move_of_path(&self,
-                                id: ast::NodeId,
-                                loan_path: &Rc<LoanPath<'tcx>>)
-                                -> Option<MoveKind> {
-        //! Returns the kind of a move of `loan_path` by `id`, if one exists.
-
-        let mut ret = None;
-        for loan_path_index in self.move_data.path_map.borrow().get(&*loan_path).iter() {
-            self.dfcx_moves.each_gen_bit(id, |move_index| {
-                let the_move = self.move_data.moves.borrow();
-                let the_move = (*the_move)[move_index];
-                if the_move.path == **loan_path_index {
-                    ret = Some(the_move.kind);
-                    false
-                } else {
-                    true
-                }
-            });
-        }
-        ret
-    }
-
-    /// Iterates through each move of `loan_path` (or some base path of `loan_path`) that *may*
-    /// have occurred on entry to `id` without an intervening assignment. In other words, any moves
-    /// that would invalidate a reference to `loan_path` at location `id`.
-    pub fn each_move_of(&self,
-                        id: ast::NodeId,
-                        loan_path: &Rc<LoanPath<'tcx>>,
-                        f: |&Move, &LoanPath<'tcx>| -> bool)
-                        -> bool {
-        // Bad scenarios:
-        //
-        // 1. Move of `a.b.c`, use of `a.b.c`
-        // 2. Move of `a.b.c`, use of `a.b.c.d`
-        // 3. Move of `a.b.c`, use of `a` or `a.b`
-        //
-        // OK scenario:
-        //
-        // 4. move of `a.b.c`, use of `a.b.d`
-
-        let base_indices = self.move_data.existing_base_paths(loan_path);
-        if base_indices.is_empty() {
-            return true;
-        }
-
-        let opt_loan_path_index = self.move_data.existing_move_path(loan_path);
-
-        let mut ret = true;
-
-        self.dfcx_moves.each_bit_on_entry(id, |index| {
-            let the_move = self.move_data.moves.borrow();
-            let the_move = &(*the_move)[index];
-            let moved_path = the_move.path;
-            if base_indices.iter().any(|x| x == &moved_path) {
-                // Scenario 1 or 2: `loan_path` or some base path of
-                // `loan_path` was moved.
-                if !f(the_move, &*self.move_data.path_loan_path(moved_path)) {
-                    ret = false;
-                }
-            } else {
-                for &loan_path_index in opt_loan_path_index.iter() {
-                    let cont = self.move_data.each_base_path(moved_path, |p| {
-                        if p == loan_path_index {
-                            // Scenario 3: some extension of `loan_path`
-                            // was moved
-                            f(the_move,
-                              &*self.move_data.path_loan_path(moved_path))
-                        } else {
-                            true
-                        }
-                    });
-                    if !cont { ret = false; break }
-                }
-            }
-            ret
-        })
-    }
-
-    /// Iterates through every assignment to `loan_path` that may have occurred on entry to `id`.
-    /// `loan_path` must be a single variable.
-    pub fn each_assignment_of(&self,
-                              id: ast::NodeId,
-                              loan_path: &Rc<LoanPath<'tcx>>,
-                              f: |&Assignment| -> bool)
-                              -> bool {
-        let loan_path_index = {
-            match self.move_data.existing_move_path(loan_path) {
-                Some(i) => i,
-                None => {
-                    // if there were any assignments, it'd have an index
-                    return true;
-                }
-            }
-        };
-
-        self.dfcx_assign.each_bit_on_entry(id, |index| {
-            let assignment = self.move_data.var_assignments.borrow();
-            let assignment = &(*assignment)[index];
-            if assignment.path == loan_path_index && !f(assignment) {
-                false
-            } else {
-                true
-            }
-        })
-    }
-}
-
-impl BitwiseOperator for MoveDataFlowOperator {
-    #[inline]
-    fn join(&self, succ: uint, pred: uint) -> uint {
-        succ | pred // moves from both preds are in scope
-    }
-}
-
-impl DataFlowOperator for MoveDataFlowOperator {
-    #[inline]
-    fn initial_value(&self) -> bool {
-        false // no loans in scope by default
-    }
-}
-
-impl BitwiseOperator for AssignDataFlowOperator {
-    #[inline]
-    fn join(&self, succ: uint, pred: uint) -> uint {
-        succ | pred // moves from both preds are in scope
-    }
-}
-
-impl DataFlowOperator for AssignDataFlowOperator {
-    #[inline]
-    fn initial_value(&self) -> bool {
-        false // no assignments in scope by default
-    }
-}
index 0dcb78f6bb04c3e7100deb322a1993f403a67a99..b6347278bffda63db464be532e936ee8bd1e2ffd 100644 (file)
@@ -498,7 +498,6 @@ fn expr(&mut self, expr: &ast::Expr, pred: CFGIndex) -> CFGIndex {
 
             ast::ExprMac(..) |
             ast::ExprClosure(..) |
-            ast::ExprProc(..) |
             ast::ExprLit(..) |
             ast::ExprPath(..) => {
                 self.straightline(expr, pred, None::<ast::Expr>.iter())
index de140fd5c306c5bed9efb706ba261603b18392f0..a91ea8bfef8c77d93bd793ea0376c4b3fc054456 100644 (file)
@@ -24,16 +24,22 @@ struct CheckCrateVisitor<'a, 'tcx: 'a> {
 }
 
 impl<'a, 'tcx> CheckCrateVisitor<'a, 'tcx> {
-    fn with_const(&mut self, in_const: bool, f: |&mut CheckCrateVisitor<'a, 'tcx>|) {
+    fn with_const<F>(&mut self, in_const: bool, f: F) where
+        F: FnOnce(&mut CheckCrateVisitor<'a, 'tcx>),
+    {
         let was_const = self.in_const;
         self.in_const = in_const;
         f(self);
         self.in_const = was_const;
     }
-    fn inside_const(&mut self, f: |&mut CheckCrateVisitor<'a, 'tcx>|) {
+    fn inside_const<F>(&mut self, f: F) where
+        F: FnOnce(&mut CheckCrateVisitor<'a, 'tcx>),
+    {
         self.with_const(true, f);
     }
-    fn outside_const(&mut self, f: |&mut CheckCrateVisitor<'a, 'tcx>|) {
+    fn outside_const<F>(&mut self, f: F) where
+        F: FnOnce(&mut CheckCrateVisitor<'a, 'tcx>),
+    {
         self.with_const(false, f);
     }
 }
index eb073e07b02f1429eac02989b277867d3d89d1d9..c4ad089d76e6e84384c7ed1b96e62ff627d98bfc 100644 (file)
@@ -52,8 +52,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
                 self.visit_expr(&**e);
                 self.with_context(Loop, |v| v.visit_block(&**b));
             }
-            ast::ExprClosure(_, _, _, ref b) |
-            ast::ExprProc(_, ref b) => {
+            ast::ExprClosure(_, _, _, ref b) => {
                 self.with_context(Closure, |v| v.visit_block(&**b));
             }
             ast::ExprBreak(_) => self.require_loop("break", e.span),
@@ -64,7 +63,9 @@ fn visit_expr(&mut self, e: &ast::Expr) {
 }
 
 impl<'a> CheckLoopVisitor<'a> {
-    fn with_context(&mut self, cx: Context, f: |&mut CheckLoopVisitor<'a>|) {
+    fn with_context<F>(&mut self, cx: Context, f: F) where
+        F: FnOnce(&mut CheckLoopVisitor<'a>),
+    {
         let old_cx = self.cx;
         self.cx = cx;
         f(self);
index 2c437ae046b46deee7f56efc4b3164e5c364dabb..669f4ee6ec81c4c030c05caec66952c2421216dd 100644 (file)
@@ -220,7 +220,7 @@ fn check_expr(cx: &mut MatchCheckCtxt, ex: &ast::Expr) {
             let matrix: Matrix = inlined_arms
                 .iter()
                 .filter(|&&(_, guard)| guard.is_none())
-                .flat_map(|arm| arm.ref0().iter())
+                .flat_map(|arm| arm.0.iter())
                 .map(|pat| vec![&**pat])
                 .collect();
             check_exhaustive(cx, ex.span, &matrix);
@@ -980,7 +980,9 @@ fn check_fn(cx: &mut MatchCheckCtxt,
     }
 }
 
-fn is_refutable<A>(cx: &MatchCheckCtxt, pat: &Pat, refutable: |&Pat| -> A) -> Option<A> {
+fn is_refutable<A, F>(cx: &MatchCheckCtxt, pat: &Pat, refutable: F) -> Option<A> where
+    F: FnOnce(&Pat) -> A,
+{
     let pats = Matrix(vec!(vec!(pat)));
     match is_useful(cx, &pats, &[DUMMY_WILD_PAT], ConstructWitness) {
         UsefulWithWitness(pats) => {
index a495d1e049d17601ac8386d4983d27de20dbfe6d..65412ff8effc96c5547f9213e409a51da80113de 100644 (file)
 use middle::traits;
 use middle::mem_categorization as mc;
 use middle::expr_use_visitor as euv;
+use util::common::ErrorReported;
 use util::nodemap::NodeSet;
 
 use syntax::ast;
 use syntax::print::pprust;
 use syntax::visit::Visitor;
-use syntax::codemap::{DUMMY_SP, Span};
+use syntax::codemap::Span;
 use syntax::visit;
 
 #[deriving(Eq, PartialEq)]
@@ -84,7 +85,9 @@ pub fn check_crate(tcx: &ty::ctxt) {
 }
 
 impl<'a, 'tcx> CheckStaticVisitor<'a, 'tcx> {
-    fn with_mode(&mut self, mode: Mode, f: |&mut CheckStaticVisitor<'a, 'tcx>|) {
+    fn with_mode<F>(&mut self, mode: Mode, f: F) where
+        F: FnOnce(&mut CheckStaticVisitor<'a, 'tcx>),
+    {
         let old = self.mode;
         self.mode = mode;
         f(self);
@@ -119,15 +122,17 @@ fn check_static_type(&self, e: &ast::Expr) {
         let ty = ty::node_id_to_type(self.tcx, e.id);
         let infcx = infer::new_infer_ctxt(self.tcx);
         let mut fulfill_cx = traits::FulfillmentContext::new();
-        let cause = traits::ObligationCause::misc(DUMMY_SP);
-        let obligation = traits::obligation_for_builtin_bound(self.tcx, cause, ty,
-                                                              ty::BoundSync);
-        fulfill_cx.register_obligation(self.tcx, obligation.unwrap());
-        let env = ty::empty_parameter_environment();
-        let result = fulfill_cx.select_all_or_error(&infcx, &env, self.tcx).is_ok();
-        if !result {
-            self.tcx.sess.span_err(e.span, "shared static items must have a \
-                                            type which implements Sync");
+        match traits::trait_ref_for_builtin_bound(self.tcx, ty::BoundSync, ty) {
+            Ok(trait_ref) => {
+                fulfill_cx.register_trait_ref(self.tcx, trait_ref,
+                                              traits::ObligationCause::dummy());
+                let env = ty::empty_parameter_environment();
+                if !fulfill_cx.select_all_or_error(&infcx, &env, self.tcx).is_ok() {
+                    self.tcx.sess.span_err(e.span, "shared static items must have a \
+                                                    type which implements Sync");
+                }
+            }
+            Err(ErrorReported) => { }
         }
     }
 }
index db8fd999f380bb605ae596189e46aadd3891d48b..9373a5704b2b0b6401a9a2cf5c7725b0064d9732 100644 (file)
@@ -280,10 +280,9 @@ fn compute_id_range(&self, cfgidx: CFGIndex) -> (uint, uint) {
     }
 
 
-    pub fn each_bit_on_entry(&self,
-                             id: ast::NodeId,
-                             f: |uint| -> bool)
-                             -> bool {
+    pub fn each_bit_on_entry<F>(&self, id: ast::NodeId, f: F) -> bool where
+        F: FnMut(uint) -> bool,
+    {
         //! Iterates through each bit that is set on entry to `id`.
         //! Only useful after `propagate()` has been called.
         if !self.has_bitset_for_nodeid(id) {
@@ -293,11 +292,9 @@ pub fn each_bit_on_entry(&self,
         self.each_bit_for_node(Entry, cfgidx, f)
     }
 
-    pub fn each_bit_for_node(&self,
-                             e: EntryOrExit,
-                             cfgidx: CFGIndex,
-                             f: |uint| -> bool)
-                             -> bool {
+    pub fn each_bit_for_node<F>(&self, e: EntryOrExit, cfgidx: CFGIndex, f: F) -> bool where
+        F: FnMut(uint) -> bool,
+    {
         //! Iterates through each bit that is set on entry/exit to `cfgidx`.
         //! Only useful after `propagate()` has been called.
 
@@ -324,8 +321,9 @@ pub fn each_bit_for_node(&self,
         self.each_bit(slice, f)
     }
 
-    pub fn each_gen_bit(&self, id: ast::NodeId, f: |uint| -> bool)
-                        -> bool {
+    pub fn each_gen_bit<F>(&self, id: ast::NodeId, f: F) -> bool where
+        F: FnMut(uint) -> bool,
+    {
         //! Iterates through each bit in the gen set for `id`.
         if !self.has_bitset_for_nodeid(id) {
             return true;
@@ -345,7 +343,9 @@ pub fn each_gen_bit(&self, id: ast::NodeId, f: |uint| -> bool)
         self.each_bit(gens, f)
     }
 
-    fn each_bit(&self, words: &[uint], f: |uint| -> bool) -> bool {
+    fn each_bit<F>(&self, words: &[uint], mut f: F) -> bool where
+        F: FnMut(uint) -> bool,
+    {
         //! Helper for iterating over the bits in a bit set.
         //! Returns false on the first call to `f` that returns false;
         //! if all calls to `f` return true, then returns true.
index d2f43faa003559c8d5fe32b971db959289a7c4e0..939775e7507130eeec8b011f904d370eb5beb696 100644 (file)
@@ -355,7 +355,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             ast::ItemEnum(ref enum_def, _) if allow_dead_code => {
                 self.worklist.extend(enum_def.variants.iter().map(|variant| variant.node.id));
             }
-            ast::ItemImpl(_, Some(ref _trait_ref), _, ref impl_items) => {
+            ast::ItemImpl(_, _, Some(ref _trait_ref), _, ref impl_items) => {
                 for impl_item in impl_items.iter() {
                     match *impl_item {
                         ast::MethodImplItem(ref method) => {
index b3e4dd25adc7aaa78a0e6956dd85c7d5bd8c4b1c..ca60ac45e266a8bafe98148a80e281fb01ff52eb 100644 (file)
@@ -61,7 +61,9 @@ pub enum MethodProvenance {
 }
 
 impl MethodProvenance {
-    pub fn map(self, f: |ast::DefId| -> ast::DefId) -> MethodProvenance {
+    pub fn map<F>(self, f: F) -> MethodProvenance where
+        F: FnOnce(ast::DefId) -> ast::DefId,
+    {
         match self {
             FromTrait(did) => FromTrait(f(did)),
             FromImpl(did) => FromImpl(f(did))
index 8bf43c70c26d91cac9af4cb4cf39c6dd4b2ea2db..d16ce3ad678b34d8c1bd1e121d77aa328c7427a3 100644 (file)
@@ -34,8 +34,8 @@ impl Copy for UnsafeContext {}
 
 fn type_is_unsafe_function(ty: Ty) -> bool {
     match ty.sty {
-        ty::ty_bare_fn(ref f) => f.fn_style == ast::UnsafeFn,
-        ty::ty_closure(ref f) => f.fn_style == ast::UnsafeFn,
+        ty::ty_bare_fn(ref f) => f.unsafety == ast::Unsafety::Unsafe,
+        ty::ty_closure(ref f) => f.unsafety == ast::Unsafety::Unsafe,
         _ => false,
     }
 }
@@ -92,9 +92,9 @@ fn visit_fn(&mut self, fn_kind: visit::FnKind<'v>, fn_decl: &'v ast::FnDecl,
 
         let (is_item_fn, is_unsafe_fn) = match fn_kind {
             visit::FkItemFn(_, _, fn_style, _) =>
-                (true, fn_style == ast::UnsafeFn),
+                (true, fn_style == ast::Unsafety::Unsafe),
             visit::FkMethod(_, _, method) =>
-                (true, method.pe_fn_style() == ast::UnsafeFn),
+                (true, method.pe_unsafety() == ast::Unsafety::Unsafe),
             _ => (false, false),
         };
 
index 8e00c96535b1e2c79a54db5491c85753f4ddcde0..6501d8d6eb4306db79a4049a22e9c2a73966a49c 100644 (file)
@@ -613,8 +613,7 @@ pub fn walk_expr(&mut self, expr: &ast::Expr) {
                 self.consume_expr(&**count);
             }
 
-            ast::ExprClosure(..) |
-            ast::ExprProc(..) => {
+            ast::ExprClosure(..) => {
                 self.walk_captures(expr)
             }
 
index e45232a3c303879ef35972346e07e4fccc240f0a..4c03ed2a480efd501949706acfdb706ee2884756 100644 (file)
@@ -221,39 +221,43 @@ pub fn next_adjacent(&self, edge: EdgeIndex, dir: Direction) -> EdgeIndex {
     ///////////////////////////////////////////////////////////////////////////
     // Iterating over nodes, edges
 
-    pub fn each_node<'a>(&'a self, f: |NodeIndex, &'a Node<N>| -> bool) -> bool {
+    pub fn each_node<'a, F>(&'a self, mut f: F) -> bool where
+        F: FnMut(NodeIndex, &'a Node<N>) -> bool,
+    {
         //! Iterates over all edges defined in the graph.
         self.nodes.iter().enumerate().all(|(i, node)| f(NodeIndex(i), node))
     }
 
-    pub fn each_edge<'a>(&'a self, f: |EdgeIndex, &'a Edge<E>| -> bool) -> bool {
+    pub fn each_edge<'a, F>(&'a self, mut f: F) -> bool where
+        F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
+    {
         //! Iterates over all edges defined in the graph
         self.edges.iter().enumerate().all(|(i, edge)| f(EdgeIndex(i), edge))
     }
 
-    pub fn each_outgoing_edge<'a>(&'a self,
-                                  source: NodeIndex,
-                                  f: |EdgeIndex, &'a Edge<E>| -> bool)
-                                  -> bool {
+    pub fn each_outgoing_edge<'a, F>(&'a self, source: NodeIndex, f: F) -> bool where
+        F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
+    {
         //! Iterates over all outgoing edges from the node `from`
 
         self.each_adjacent_edge(source, Outgoing, f)
     }
 
-    pub fn each_incoming_edge<'a>(&'a self,
-                                  target: NodeIndex,
-                                  f: |EdgeIndex, &'a Edge<E>| -> bool)
-                                  -> bool {
+    pub fn each_incoming_edge<'a, F>(&'a self, target: NodeIndex, f: F) -> bool where
+        F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
+    {
         //! Iterates over all incoming edges to the node `target`
 
         self.each_adjacent_edge(target, Incoming, f)
     }
 
-    pub fn each_adjacent_edge<'a>(&'a self,
-                                  node: NodeIndex,
-                                  dir: Direction,
-                                  f: |EdgeIndex, &'a Edge<E>| -> bool)
-                                  -> bool {
+    pub fn each_adjacent_edge<'a, F>(&'a self,
+                                     node: NodeIndex,
+                                     dir: Direction,
+                                     mut f: F)
+                                     -> bool where
+        F: FnMut(EdgeIndex, &'a Edge<E>) -> bool,
+    {
         //! Iterates over all edges adjacent to the node `node`
         //! in the direction `dir` (either `Outgoing` or `Incoming)
 
@@ -277,11 +281,9 @@ pub fn each_adjacent_edge<'a>(&'a self,
     // variables or other bitsets. This method facilitates such a
     // computation.
 
-    pub fn iterate_until_fixed_point<'a>(&'a self,
-                                         op: |iter_index: uint,
-                                              edge_index: EdgeIndex,
-                                              edge: &'a Edge<E>|
-                                              -> bool) {
+    pub fn iterate_until_fixed_point<'a, F>(&'a self, mut op: F) where
+        F: FnMut(uint, EdgeIndex, &'a Edge<E>) -> bool,
+    {
         let mut iteration = 0;
         let mut changed = true;
         while changed {
@@ -294,7 +296,9 @@ pub fn iterate_until_fixed_point<'a>(&'a self,
     }
 }
 
-pub fn each_edge_index(max_edge_index: EdgeIndex, f: |EdgeIndex| -> bool) {
+pub fn each_edge_index<F>(max_edge_index: EdgeIndex, mut f: F) where
+    F: FnMut(EdgeIndex) -> bool,
+{
     let mut i = 0;
     let n = max_edge_index.get();
     while i < n {
index f04c519badc8c2d28aa607264bdd77a7af9a7329..1d1ee39d6843552024072d5f712c432768885ba5 100644 (file)
@@ -194,8 +194,9 @@ pub fn subtype(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> CoerceResult<'tcx> {
         }
     }
 
-    pub fn unpack_actual_value<T>(&self, a: Ty<'tcx>, f: |&ty::sty<'tcx>| -> T)
-                                  -> T {
+    pub fn unpack_actual_value<T, F>(&self, a: Ty<'tcx>, f: F) -> T where
+        F: FnOnce(&ty::sty<'tcx>) -> T,
+    {
         match resolve_type(self.get_ref().infcx, None,
                            a, try_resolve_tvar_shallow) {
             Ok(t) => {
@@ -458,13 +459,15 @@ fn coerce_unsafe_object(&self,
                            || AutoUnsafe(b_mutbl, None))
     }
 
-    fn coerce_object(&self,
-                     a: Ty<'tcx>,
-                     sty_a: &ty::sty<'tcx>,
-                     b: Ty<'tcx>,
-                     b_mutbl: ast::Mutability,
-                     mk_ty: |Ty<'tcx>| -> Ty<'tcx>,
-                     mk_adjust: || -> ty::AutoRef<'tcx>) -> CoerceResult<'tcx>
+    fn coerce_object<F, G>(&self,
+                           a: Ty<'tcx>,
+                           sty_a: &ty::sty<'tcx>,
+                           b: Ty<'tcx>,
+                           b_mutbl: ast::Mutability,
+                           mk_ty: F,
+                           mk_adjust: G) -> CoerceResult<'tcx> where
+        F: FnOnce(Ty<'tcx>) -> Ty<'tcx>,
+        G: FnOnce() -> ty::AutoRef<'tcx>,
     {
         let tcx = self.get_ref().infcx.tcx;
 
@@ -518,7 +521,7 @@ fn coerce_from_bare_fn(&self, a: Ty<'tcx>, fn_ty_a: &ty::BareFnTy<'tcx>, b: Ty<'
             debug!("coerce_from_bare_fn(a={}, b={})",
                    a.repr(self.get_ref().infcx.tcx), b.repr(self.get_ref().infcx.tcx));
 
-            if fn_ty_a.abi != abi::Rust || fn_ty_a.fn_style != ast::NormalFn {
+            if fn_ty_a.abi != abi::Rust || fn_ty_a.unsafety != ast::Unsafety::Normal {
                 return self.subtype(a, b);
             }
 
index ab9c5b86aeb6292d84a97f0bd1dfc41dd7c9e5d4..26bba55594b5e365c7561b5a9a9faf54b29c210a 100644 (file)
@@ -51,7 +51,7 @@
 use middle::ty_fold::{TypeFoldable};
 use util::ppaux::Repr;
 
-use syntax::ast::{Onceness, FnStyle};
+use syntax::ast::{Onceness, Unsafety};
 use syntax::ast;
 use syntax::abi;
 use syntax::codemap::Span;
@@ -193,12 +193,12 @@ fn relate_region_params<'tcx, C: Combine<'tcx>>(this: &C,
 
     fn bare_fn_tys(&self, a: &ty::BareFnTy<'tcx>,
                    b: &ty::BareFnTy<'tcx>) -> cres<'tcx, ty::BareFnTy<'tcx>> {
-        let fn_style = try!(self.fn_styles(a.fn_style, b.fn_style));
+        let unsafety = try!(self.unsafeties(a.unsafety, b.unsafety));
         let abi = try!(self.abi(a.abi, b.abi));
         let sig = try!(self.fn_sigs(&a.sig, &b.sig));
-        Ok(ty::BareFnTy {fn_style: fn_style,
-                abi: abi,
-                sig: sig})
+        Ok(ty::BareFnTy {unsafety: unsafety,
+                         abi: abi,
+                         sig: sig})
     }
 
     fn closure_tys(&self, a: &ty::ClosureTy<'tcx>,
@@ -219,13 +219,13 @@ fn closure_tys(&self, a: &ty::ClosureTy<'tcx>,
                 return Err(ty::terr_sigil_mismatch(expected_found(self, a.store, b.store)))
             }
         };
-        let fn_style = try!(self.fn_styles(a.fn_style, b.fn_style));
+        let unsafety = try!(self.unsafeties(a.unsafety, b.unsafety));
         let onceness = try!(self.oncenesses(a.onceness, b.onceness));
         let bounds = try!(self.existential_bounds(a.bounds, b.bounds));
         let sig = try!(self.fn_sigs(&a.sig, &b.sig));
         let abi = try!(self.abi(a.abi, b.abi));
         Ok(ty::ClosureTy {
-            fn_style: fn_style,
+            unsafety: unsafety,
             onceness: onceness,
             store: store,
             bounds: bounds,
@@ -240,7 +240,7 @@ fn args(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> cres<'tcx, Ty<'tcx>> {
         self.contratys(a, b).and_then(|t| Ok(t))
     }
 
-    fn fn_styles(&self, a: FnStyle, b: FnStyle) -> cres<'tcx, FnStyle>;
+    fn unsafeties(&self, a: Unsafety, b: Unsafety) -> cres<'tcx, Unsafety>;
 
     fn abi(&self, a: abi::Abi, b: abi::Abi) -> cres<'tcx, abi::Abi> {
         if a == b {
index a79a50b1781eb41ccea0d0eaa262d7dcebf9e019..1738b8db99b37d59fee2b81a137e2a972fb7dfe8 100644 (file)
@@ -21,7 +21,7 @@
 use middle::infer::type_variable::{EqTo};
 use util::ppaux::{Repr};
 
-use syntax::ast::{Onceness, FnStyle};
+use syntax::ast::{Onceness, Unsafety};
 
 pub struct Equate<'f, 'tcx: 'f> {
     fields: CombineFields<'f, 'tcx>
@@ -70,9 +70,9 @@ fn mts(&self, a: &ty::mt<'tcx>, b: &ty::mt<'tcx>) -> cres<'tcx, ty::mt<'tcx>> {
         Ok(ty::mt { mutbl: a.mutbl, ty: t })
     }
 
-    fn fn_styles(&self, a: FnStyle, b: FnStyle) -> cres<'tcx, FnStyle> {
+    fn unsafeties(&self, a: Unsafety, b: Unsafety) -> cres<'tcx, Unsafety> {
         if a != b {
-            Err(ty::terr_fn_style_mismatch(expected_found(self, a, b)))
+            Err(ty::terr_unsafety_mismatch(expected_found(self, a, b)))
         } else {
             Ok(a)
         }
index 657ee088758d17c6e4f1a4b9c6753d52b1c35b7e..5c2944f898ed29053a1442272f11ccd7eea75a1a 100644 (file)
@@ -157,7 +157,7 @@ fn note_region_origin(&self,
 
     fn give_expl_lifetime_param(&self,
                                 decl: &ast::FnDecl,
-                                fn_style: ast::FnStyle,
+                                unsafety: ast::Unsafety,
                                 ident: ast::Ident,
                                 opt_explicit_self: Option<&ast::ExplicitSelf_>,
                                 generics: &ast::Generics,
@@ -366,6 +366,7 @@ fn report_type_error(&self, trace: TypeTrace<'tcx>, terr: &ty::type_err<'tcx>) {
             infer::MatchExpressionArm(_, _) => "match arms have incompatible types",
             infer::IfExpression(_) => "if and else have incompatible types",
             infer::IfExpressionWithNoElse(_) => "if may be missing an else clause",
+            infer::EquatePredicate(_) => "equality predicate not satisfied",
         };
 
         self.tcx.sess.span_err(
@@ -586,19 +587,6 @@ fn report_concrete_failure(&self,
                     sub,
                     "");
             }
-            infer::ProcCapture(span, id) => {
-                self.tcx.sess.span_err(
-                    span,
-                    format!("captured variable `{}` must be 'static \
-                             to be captured in a proc",
-                            ty::local_var_name_str(self.tcx, id).get())
-                        .as_slice());
-                note_and_explain_region(
-                    self.tcx,
-                    "captured variable is only valid for ",
-                    sup,
-                    "");
-            }
             infer::IndexSlice(span) => {
                 self.tcx.sess.span_err(span,
                                        "index of slice outside its lifetime");
@@ -624,28 +612,6 @@ fn report_concrete_failure(&self,
                     sup,
                     "");
             }
-            infer::RelateProcBound(span, var_node_id, ty) => {
-                self.tcx.sess.span_err(
-                    span,
-                    format!(
-                        "the type `{}` of captured variable `{}` \
-                         outlives the `proc()` it \
-                         is captured in",
-                        self.ty_to_string(ty),
-                        ty::local_var_name_str(self.tcx,
-                                               var_node_id)).as_slice());
-                note_and_explain_region(
-                    self.tcx,
-                    "`proc()` is valid for ",
-                    sub,
-                    "");
-                note_and_explain_region(
-                    self.tcx,
-                    format!("the type `{}` is only valid for ",
-                            self.ty_to_string(ty)).as_slice(),
-                    sup,
-                    "");
-            }
             infer::RelateParamBound(span, ty) => {
                 self.tcx.sess.span_err(
                     span,
@@ -862,7 +828,7 @@ fn give_suggestion(&self, same_regions: &[SameRegions]) {
                         ast::MethodImplItem(ref m) => {
                             Some((m.pe_fn_decl(),
                                   m.pe_generics(),
-                                  m.pe_fn_style(),
+                                  m.pe_unsafety(),
                                   m.pe_ident(),
                                   Some(&m.pe_explicit_self().node),
                                   m.span))
@@ -875,7 +841,7 @@ fn give_suggestion(&self, same_regions: &[SameRegions]) {
                         ast::ProvidedMethod(ref m) => {
                             Some((m.pe_fn_decl(),
                                   m.pe_generics(),
-                                  m.pe_fn_style(),
+                                  m.pe_unsafety(),
                                   m.pe_ident(),
                                   Some(&m.pe_explicit_self().node),
                                   m.span))
@@ -887,14 +853,14 @@ fn give_suggestion(&self, same_regions: &[SameRegions]) {
             },
             None => None
         };
-        let (fn_decl, generics, fn_style, ident, expl_self, span)
+        let (fn_decl, generics, unsafety, ident, expl_self, span)
                                     = node_inner.expect("expect item fn");
         let taken = lifetimes_in_scope(self.tcx, scope_id);
         let life_giver = LifeGiver::with_taken(taken.as_slice());
         let rebuilder = Rebuilder::new(self.tcx, fn_decl, expl_self,
                                        generics, same_regions, &life_giver);
         let (fn_decl, expl_self, generics) = rebuilder.rebuild();
-        self.give_expl_lifetime_param(&fn_decl, fn_style, ident,
+        self.give_expl_lifetime_param(&fn_decl, unsafety, ident,
                                       expl_self.as_ref(), &generics, span);
     }
 }
@@ -1405,10 +1371,22 @@ fn rebuild_path(&self,
                 let new_types = data.types.map(|t| {
                     self.rebuild_arg_ty_or_output(&**t, lifetime, anon_nums, region_names)
                 });
+                let new_bindings = data.bindings.map(|b| {
+                    P(ast::TypeBinding {
+                        id: b.id,
+                        ident: b.ident,
+                        ty: self.rebuild_arg_ty_or_output(&*b.ty,
+                                                          lifetime,
+                                                          anon_nums,
+                                                          region_names),
+                        span: b.span
+                    })
+                });
                 ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                     lifetimes: new_lts,
-                    types: new_types
-                })
+                    types: new_types,
+                    bindings: new_bindings,
+               })
             }
         };
         let new_seg = ast::PathSegment {
@@ -1429,12 +1407,12 @@ fn rebuild_path(&self,
 impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
     fn give_expl_lifetime_param(&self,
                                 decl: &ast::FnDecl,
-                                fn_style: ast::FnStyle,
+                                unsafety: ast::Unsafety,
                                 ident: ast::Ident,
                                 opt_explicit_self: Option<&ast::ExplicitSelf_>,
                                 generics: &ast::Generics,
                                 span: codemap::Span) {
-        let suggested_fn = pprust::fun_to_string(decl, fn_style, ident,
+        let suggested_fn = pprust::fun_to_string(decl, unsafety, ident,
                                               opt_explicit_self, generics);
         let msg = format!("consider using an explicit lifetime \
                            parameter as shown: {}", suggested_fn);
@@ -1511,6 +1489,9 @@ fn note_region_origin(&self, origin: &SubregionOrigin<'tcx>) {
                     infer::IfExpressionWithNoElse(_) => {
                         format!("if may be missing an else clause")
                     }
+                    infer::EquatePredicate(_) => {
+                        format!("equality where clause is satisfied")
+                    }
                 };
 
                 match self.values_str(&trace.values) {
@@ -1571,15 +1552,6 @@ fn note_region_origin(&self, origin: &SubregionOrigin<'tcx>) {
                                 self.tcx,
                                 id).get().to_string()).as_slice());
             }
-            infer::ProcCapture(span, id) => {
-                self.tcx.sess.span_note(
-                    span,
-                    format!("...so that captured variable `{}` \
-                            is 'static",
-                            ty::local_var_name_str(
-                                self.tcx,
-                                id).get()).as_slice());
-            }
             infer::IndexSlice(span) => {
                 self.tcx.sess.span_note(
                     span,
@@ -1590,15 +1562,6 @@ fn note_region_origin(&self, origin: &SubregionOrigin<'tcx>) {
                     span,
                     "...so that it can be closed over into an object");
             }
-            infer::RelateProcBound(span, var_node_id, _ty) => {
-                self.tcx.sess.span_note(
-                    span,
-                    format!(
-                        "...so that the variable `{}` can be captured \
-                         into a proc",
-                        ty::local_var_name_str(self.tcx,
-                                               var_node_id)).as_slice());
-            }
             infer::CallRcvr(span) => {
                 self.tcx.sess.span_note(
                     span,
@@ -1727,7 +1690,7 @@ fn lifetimes_in_scope(tcx: &ty::ctxt,
         match tcx.map.find(parent) {
             Some(node) => match node {
                 ast_map::NodeItem(item) => match item.node {
-                    ast::ItemImpl(ref gen, _, _, _) => {
+                    ast::ItemImpl(_, ref gen, _, _, _) => {
                         taken.push_all(gen.lifetimes.as_slice());
                     }
                     _ => ()
index 4237a7af32fc157cfa01c7ba1dee8382d6f9dcb5..9fc4e095c43bdf9c7c2044dda9908b3ed59bdd80 100644 (file)
@@ -20,8 +20,7 @@
 use middle::ty::{BuiltinBounds};
 use middle::ty::{mod, Ty};
 use syntax::ast::{Many, Once, MutImmutable, MutMutable};
-use syntax::ast::{NormalFn, UnsafeFn};
-use syntax::ast::{Onceness, FnStyle};
+use syntax::ast::{Onceness, Unsafety};
 use util::ppaux::mt_to_string;
 use util::ppaux::Repr;
 
@@ -81,10 +80,10 @@ fn contratys(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> cres<'tcx, Ty<'tcx>> {
         self.lub().tys(a, b)
     }
 
-    fn fn_styles(&self, a: FnStyle, b: FnStyle) -> cres<'tcx, FnStyle> {
+    fn unsafeties(&self, a: Unsafety, b: Unsafety) -> cres<'tcx, Unsafety> {
         match (a, b) {
-          (NormalFn, _) | (_, NormalFn) => Ok(NormalFn),
-          (UnsafeFn, UnsafeFn) => Ok(UnsafeFn)
+          (Unsafety::Normal, _) | (_, Unsafety::Normal) => Ok(Unsafety::Normal),
+          (Unsafety::Unsafe, Unsafety::Unsafe) => Ok(Unsafety::Unsafe)
         }
     }
 
index 95805ef8b944d5e130a8904b853e90e5a9511add..be053afcca43660574a93cf6e75ae7ea13c416a4 100644 (file)
@@ -426,11 +426,9 @@ fn is_var_in_set(new_vars: &[ty::RegionVid], r: ty::Region) -> bool {
     }
 }
 
-fn fold_regions_in<'tcx, T>(tcx: &ty::ctxt<'tcx>,
-                            value: &T,
-                            fldr: |ty::Region, ty::DebruijnIndex| -> ty::Region)
-                            -> T
-    where T: HigherRankedFoldable<'tcx>
+fn fold_regions_in<'tcx, T, F>(tcx: &ty::ctxt<'tcx>, value: &T, mut fldr: F) -> T where
+    T: HigherRankedFoldable<'tcx>,
+    F: FnMut(ty::Region, ty::DebruijnIndex) -> ty::Region,
 {
     value.fold_contents(&mut ty_fold::RegionFolder::new(tcx, |region, current_depth| {
         // we should only be encountering "escaping" late-bound regions here,
index f53ba571062b2972140b04a1c028f81878a73623..f27b07c9c9d45db79d80e01da15c62bbe39e4b3e 100644 (file)
@@ -20,8 +20,7 @@
 use middle::ty::{BuiltinBounds};
 use middle::ty::{mod, Ty};
 use syntax::ast::{Many, Once};
-use syntax::ast::{NormalFn, UnsafeFn};
-use syntax::ast::{Onceness, FnStyle};
+use syntax::ast::{Onceness, Unsafety};
 use syntax::ast::{MutMutable, MutImmutable};
 use util::ppaux::mt_to_string;
 use util::ppaux::Repr;
@@ -77,10 +76,10 @@ fn contratys(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> cres<'tcx, Ty<'tcx>> {
         self.glb().tys(a, b)
     }
 
-    fn fn_styles(&self, a: FnStyle, b: FnStyle) -> cres<'tcx, FnStyle> {
+    fn unsafeties(&self, a: Unsafety, b: Unsafety) -> cres<'tcx, Unsafety> {
         match (a, b) {
-          (UnsafeFn, _) | (_, UnsafeFn) => Ok(UnsafeFn),
-          (NormalFn, NormalFn) => Ok(NormalFn),
+          (Unsafety::Unsafe, _) | (_, Unsafety::Unsafe) => Ok(Unsafety::Unsafe),
+          (Unsafety::Normal, Unsafety::Normal) => Ok(Unsafety::Normal),
         }
     }
 
index 81cd8dd20d20c6c0761a8b403feac54817941c4f..2b1d8776365ecfb9ae4a0a43055a20db66a1a19b 100644 (file)
@@ -129,7 +129,10 @@ pub enum TypeOrigin {
     IfExpression(Span),
 
     // Computing common supertype of an if expression with no else counter-part
-    IfExpressionWithNoElse(Span)
+    IfExpressionWithNoElse(Span),
+
+    // `where a == b`
+    EquatePredicate(Span),
 }
 
 impl Copy for TypeOrigin {}
@@ -172,9 +175,6 @@ pub enum SubregionOrigin<'tcx> {
     // Closure bound must not outlive captured free variables
     FreeVariable(Span, ast::NodeId),
 
-    // Proc upvars must be 'static
-    ProcCapture(Span, ast::NodeId),
-
     // Index into slice must be within its lifetime
     IndexSlice(Span),
 
@@ -182,10 +182,6 @@ pub enum SubregionOrigin<'tcx> {
     // relating `'a` to `'b`
     RelateObjectBound(Span),
 
-    // When closing over a variable in a closure/proc, ensure that the
-    // type of the variable outlives the lifetime bound.
-    RelateProcBound(Span, ast::NodeId, Ty<'tcx>),
-
     // Some type parameter was instantiated with the given type,
     // and that type must outlive some region.
     RelateParamBound(Span, Ty<'tcx>),
@@ -474,14 +470,17 @@ pub fn resolve_region(cx: &InferCtxt, r: ty::Region, modes: uint)
 }
 
 trait then<'tcx> {
-    fn then<T:Clone>(&self, f: || -> Result<T,ty::type_err<'tcx>>)
-        -> Result<T,ty::type_err<'tcx>>;
+    fn then<T, F>(&self, f: F) -> Result<T, ty::type_err<'tcx>> where
+        T: Clone,
+        F: FnOnce() -> Result<T, ty::type_err<'tcx>>;
 }
 
 impl<'tcx> then<'tcx> for ures<'tcx> {
-    fn then<T:Clone>(&self, f: || -> Result<T,ty::type_err<'tcx>>)
-        -> Result<T,ty::type_err<'tcx>> {
-        self.and_then(|_i| f())
+    fn then<T, F>(&self, f: F) -> Result<T, ty::type_err<'tcx>> where
+        T: Clone,
+        F: FnOnce() -> Result<T, ty::type_err<'tcx>>,
+    {
+        self.and_then(move |_| f())
     }
 }
 
@@ -499,12 +498,15 @@ fn to_ures(&self) -> ures<'tcx> {
 }
 
 trait CresCompare<'tcx, T> {
-    fn compare(&self, t: T, f: || -> ty::type_err<'tcx>) -> cres<'tcx, T>;
+    fn compare<F>(&self, t: T, f: F) -> cres<'tcx, T> where
+        F: FnOnce() -> ty::type_err<'tcx>;
 }
 
 impl<'tcx, T:Clone + PartialEq> CresCompare<'tcx, T> for cres<'tcx, T> {
-    fn compare(&self, t: T, f: || -> ty::type_err<'tcx>) -> cres<'tcx, T> {
-        (*self).clone().and_then(|s| {
+    fn compare<F>(&self, t: T, f: F) -> cres<'tcx, T> where
+        F: FnOnce() -> ty::type_err<'tcx>,
+    {
+        (*self).clone().and_then(move |s| {
             if s == t {
                 (*self).clone()
             } else {
@@ -613,7 +615,9 @@ fn commit_from(&self, snapshot: CombinedSnapshot) {
     }
 
     /// Execute `f` and commit the bindings
-    pub fn commit_unconditionally<R>(&self, f: || -> R) -> R {
+    pub fn commit_unconditionally<R, F>(&self, f: F) -> R where
+        F: FnOnce() -> R,
+    {
         debug!("commit()");
         let snapshot = self.start_snapshot();
         let r = f();
@@ -622,12 +626,16 @@ pub fn commit_unconditionally<R>(&self, f: || -> R) -> R {
     }
 
     /// Execute `f` and commit the bindings if successful
-    pub fn commit_if_ok<T,E>(&self, f: || -> Result<T,E>) -> Result<T,E> {
-        self.commit_unconditionally(|| self.try(|| f()))
+    pub fn commit_if_ok<T, E, F>(&self, f: F) -> Result<T, E> where
+        F: FnOnce() -> Result<T, E>
+    {
+        self.commit_unconditionally(move || self.try(move || f()))
     }
 
     /// Execute `f`, unroll bindings on panic
-    pub fn try<T,E>(&self, f: || -> Result<T,E>) -> Result<T,E> {
+    pub fn try<T, E, F>(&self, f: F) -> Result<T, E> where
+        F: FnOnce() -> Result<T, E>
+    {
         debug!("try()");
         let snapshot = self.start_snapshot();
         let r = f();
@@ -644,7 +652,9 @@ pub fn try<T,E>(&self, f: || -> Result<T,E>) -> Result<T,E> {
     }
 
     /// Execute `f` then unroll any bindings it creates
-    pub fn probe<R>(&self, f: || -> R) -> R {
+    pub fn probe<R, F>(&self, f: F) -> R where
+        F: FnOnce() -> R,
+    {
         debug!("probe()");
         let snapshot = self.start_snapshot();
         let r = f();
@@ -899,22 +909,24 @@ pub fn resolve_type_vars_in_trait_ref_if_possible(&self,
     // in this case. The typechecker should only ever report type errors involving mismatched
     // types using one of these four methods, and should not call span_err directly for such
     // errors.
-    pub fn type_error_message_str(&self,
-                                  sp: Span,
-                                  mk_msg: |Option<String>, String| -> String,
-                                  actual_ty: String,
-                                  err: Option<&ty::type_err<'tcx>>) {
+    pub fn type_error_message_str<M>(&self,
+                                     sp: Span,
+                                     mk_msg: M,
+                                     actual_ty: String,
+                                     err: Option<&ty::type_err<'tcx>>) where
+        M: FnOnce(Option<String>, String) -> String,
+    {
         self.type_error_message_str_with_expected(sp, mk_msg, None, actual_ty, err)
     }
 
-    pub fn type_error_message_str_with_expected(&self,
-                                                sp: Span,
-                                                mk_msg: |Option<String>,
-                                                         String|
-                                                         -> String,
-                                                expected_ty: Option<Ty<'tcx>>,
-                                                actual_ty: String,
-                                                err: Option<&ty::type_err<'tcx>>) {
+    pub fn type_error_message_str_with_expected<M>(&self,
+                                                   sp: Span,
+                                                   mk_msg: M,
+                                                   expected_ty: Option<Ty<'tcx>>,
+                                                   actual_ty: String,
+                                                   err: Option<&ty::type_err<'tcx>>) where
+        M: FnOnce(Option<String>, String) -> String,
+    {
         debug!("hi! expected_ty = {}, actual_ty = {}", expected_ty, actual_ty);
 
         let resolved_expected = expected_ty.map(|e_ty| {
@@ -939,11 +951,13 @@ pub fn type_error_message_str_with_expected(&self,
         }
     }
 
-    pub fn type_error_message(&self,
-                              sp: Span,
-                              mk_msg: |String| -> String,
-                              actual_ty: Ty<'tcx>,
-                              err: Option<&ty::type_err<'tcx>>) {
+    pub fn type_error_message<M>(&self,
+                                 sp: Span,
+                                 mk_msg: M,
+                                 actual_ty: Ty<'tcx>,
+                                 err: Option<&ty::type_err<'tcx>>) where
+        M: FnOnce(String) -> String,
+    {
         let actual_ty = self.resolve_type_vars_if_possible(actual_ty);
 
         // Don't report an error if actual type is ty_err.
@@ -951,7 +965,9 @@ pub fn type_error_message(&self,
             return;
         }
 
-        self.type_error_message_str(sp, |_e, a| { mk_msg(a) }, self.ty_to_string(actual_ty), err);
+        self.type_error_message_str(sp,
+            move |_e, a| { mk_msg(a) },
+            self.ty_to_string(actual_ty), err);
     }
 
     pub fn report_mismatched_types(&self,
@@ -1017,7 +1033,8 @@ pub fn span(&self) -> Span {
             RelateOutputImplTypes(span) => span,
             MatchExpressionArm(match_span, _) => match_span,
             IfExpression(span) => span,
-            IfExpressionWithNoElse(span) => span
+            IfExpressionWithNoElse(span) => span,
+            EquatePredicate(span) => span,
         }
     }
 }
@@ -1050,6 +1067,9 @@ fn repr(&self, tcx: &ty::ctxt) -> String {
             IfExpressionWithNoElse(a) => {
                 format!("IfExpressionWithNoElse({})", a.repr(tcx))
             }
+            EquatePredicate(a) => {
+                format!("EquatePredicate({})", a.repr(tcx))
+            }
         }
     }
 }
@@ -1062,10 +1082,8 @@ pub fn span(&self) -> Span {
             InvokeClosure(a) => a,
             DerefPointer(a) => a,
             FreeVariable(a, _) => a,
-            ProcCapture(a, _) => a,
             IndexSlice(a) => a,
             RelateObjectBound(a) => a,
-            RelateProcBound(a, _, _) => a,
             RelateParamBound(a, _) => a,
             RelateRegionParamBound(a) => a,
             RelateDefaultParamBound(a, _) => a,
@@ -1101,21 +1119,12 @@ fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
             FreeVariable(a, b) => {
                 format!("FreeVariable({}, {})", a.repr(tcx), b)
             }
-            ProcCapture(a, b) => {
-                format!("ProcCapture({}, {})", a.repr(tcx), b)
-            }
             IndexSlice(a) => {
                 format!("IndexSlice({})", a.repr(tcx))
             }
             RelateObjectBound(a) => {
                 format!("RelateObjectBound({})", a.repr(tcx))
             }
-            RelateProcBound(a, b, c) => {
-                format!("RelateProcBound({},{},{})",
-                        a.repr(tcx),
-                        b,
-                        c.repr(tcx))
-            }
             RelateParamBound(a, b) => {
                 format!("RelateParamBound({},{})",
                         a.repr(tcx),
index 391e37e8b9c965398612b8b206aeca67e902a46f..98f69f66b27fc4536b91d96947e1db8dff1442c0 100644 (file)
@@ -569,15 +569,15 @@ fn combine_map<'a>(&'a self, t: CombineMapType)
         }
     }
 
-    pub fn combine_vars(&self,
-                        t: CombineMapType,
-                        a: Region,
-                        b: Region,
-                        origin: SubregionOrigin<'tcx>,
-                        relate: |this: &RegionVarBindings<'a, 'tcx>,
-                                 old_r: Region,
-                                 new_r: Region|)
-                        -> Region {
+    pub fn combine_vars<F>(&self,
+                           t: CombineMapType,
+                           a: Region,
+                           b: Region,
+                           origin: SubregionOrigin<'tcx>,
+                           mut relate: F)
+                           -> Region where
+        F: FnMut(&RegionVarBindings<'a, 'tcx>, Region, Region),
+    {
         let vars = TwoRegions { a: a, b: b };
         match self.combine_map(t).borrow().get(&vars) {
             Some(&c) => {
@@ -1539,9 +1539,9 @@ fn process_edges<'a, 'tcx>(this: &RegionVarBindings<'a, 'tcx>,
         }
     }
 
-    fn iterate_until_fixed_point(&self,
-                                 tag: &str,
-                                 body: |constraint: &Constraint| -> bool) {
+    fn iterate_until_fixed_point<F>(&self, tag: &str, mut body: F) where
+        F: FnMut(&Constraint) -> bool,
+    {
         let mut iteration = 0u;
         let mut changed = true;
         while changed {
index 62bf1d0126a59d156442f1260ecd98b47d21dae2..705b0ae730d498070c5b1374ee4ef068c9f9c6d5 100644 (file)
@@ -54,11 +54,12 @@ pub fn new<'tcx>(infcx: &'a InferCtxt<'a, 'tcx>) -> TypeSkolemizer<'a, 'tcx> {
         }
     }
 
-    fn skolemize(&mut self,
-                 opt_ty: Option<Ty<'tcx>>,
-                 key: ty::InferTy,
-                 skolemizer: |uint| -> ty::InferTy)
-                 -> Ty<'tcx>
+    fn skolemize<F>(&mut self,
+                    opt_ty: Option<Ty<'tcx>>,
+                    key: ty::InferTy,
+                    skolemizer: F)
+                    -> Ty<'tcx> where
+        F: FnOnce(uint) -> ty::InferTy,
     {
         match opt_ty {
             Some(ty) => { return ty.fold_with(self); }
index c470b2488273a37952a4060ac24158ed9220d1bd..00c79bc726cf699bdddc2415a66c5bafd0e5dc3f 100644 (file)
@@ -23,7 +23,7 @@
 use middle::ty::TyVar;
 use util::ppaux::{Repr};
 
-use syntax::ast::{Onceness, FnStyle, MutImmutable, MutMutable};
+use syntax::ast::{Onceness, MutImmutable, MutMutable, Unsafety};
 
 
 /// "Greatest lower bound" (common subtype)
@@ -93,9 +93,9 @@ fn mts(&self, a: &ty::mt<'tcx>, b: &ty::mt<'tcx>) -> cres<'tcx, ty::mt<'tcx>> {
         Ok(*a) // return is meaningless in sub, just return *a
     }
 
-    fn fn_styles(&self, a: FnStyle, b: FnStyle) -> cres<'tcx, FnStyle> {
-        self.lub().fn_styles(a, b).compare(b, || {
-            ty::terr_fn_style_mismatch(expected_found(self, a, b))
+    fn unsafeties(&self, a: Unsafety, b: Unsafety) -> cres<'tcx, Unsafety> {
+        self.lub().unsafeties(a, b).compare(b, || {
+            ty::terr_unsafety_mismatch(expected_found(self, a, b))
         })
     }
 
index 4a20c92d8e21e5bc3002b61e6b1b6dc0a1301ae0..8d5528b3709ad1a7c608fc10810735acefd57aa6 100644 (file)
@@ -114,6 +114,22 @@ pub fn to_builtin_kind(&self, id: ast::DefId) -> Option<ty::BuiltinBound> {
         }
     }
 
+    pub fn fn_trait_kind(&self, id: ast::DefId) -> Option<ty::UnboxedClosureKind> {
+        let def_id_kinds = [
+            (self.fn_trait(), ty::FnUnboxedClosureKind),
+            (self.fn_mut_trait(), ty::FnMutUnboxedClosureKind),
+            (self.fn_once_trait(), ty::FnOnceUnboxedClosureKind),
+            ];
+
+        for &(opt_def_id, kind) in def_id_kinds.iter() {
+            if Some(id) == opt_def_id {
+                return Some(kind);
+            }
+        }
+
+        None
+    }
+
     $(
         #[allow(dead_code)]
         pub fn $method(&self) -> Option<ast::DefId> {
index 5edbafc4e0bee4e7bf47b95451662c20b364f892..31bcdff9cd59370705567f8a4bc8ddd994439654 100644 (file)
@@ -461,7 +461,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
         }
         visit::walk_expr(ir, expr);
       }
-      ast::ExprClosure(..) | ast::ExprProc(..) => {
+      ast::ExprClosure(..) => {
         // Interesting control flow (for loops can contain labeled
         // breaks or continues)
         ir.add_live_node_for_node(expr.id, ExprNode(expr.span));
@@ -616,9 +616,9 @@ fn variable(&self, node_id: NodeId, span: Span) -> Variable {
         self.ir.variable(node_id, span)
     }
 
-    fn pat_bindings(&mut self,
-                    pat: &ast::Pat,
-                    f: |&mut Liveness<'a, 'tcx>, LiveNode, Variable, Span, NodeId|) {
+    fn pat_bindings<F>(&mut self, pat: &ast::Pat, mut f: F) where
+        F: FnMut(&mut Liveness<'a, 'tcx>, LiveNode, Variable, Span, NodeId),
+    {
         pat_util::pat_bindings(&self.ir.tcx.def_map, pat, |_bm, p_id, sp, _n| {
             let ln = self.live_node(p_id, sp);
             let var = self.variable(p_id, sp);
@@ -626,9 +626,9 @@ fn pat_bindings(&mut self,
         })
     }
 
-    fn arm_pats_bindings(&mut self,
-                         pat: Option<&ast::Pat>,
-                         f: |&mut Liveness<'a, 'tcx>, LiveNode, Variable, Span, NodeId|) {
+    fn arm_pats_bindings<F>(&mut self, pat: Option<&ast::Pat>, f: F) where
+        F: FnMut(&mut Liveness<'a, 'tcx>, LiveNode, Variable, Span, NodeId),
+    {
         match pat {
             Some(pat) => {
                 self.pat_bindings(pat, f);
@@ -691,10 +691,9 @@ fn assigned_on_exit(&self, ln: LiveNode, var: Variable)
         self.assigned_on_entry(successor, var)
     }
 
-    fn indices2(&mut self,
-                ln: LiveNode,
-                succ_ln: LiveNode,
-                op: |&mut Liveness<'a, 'tcx>, uint, uint|) {
+    fn indices2<F>(&mut self, ln: LiveNode, succ_ln: LiveNode, mut op: F) where
+        F: FnMut(&mut Liveness<'a, 'tcx>, uint, uint),
+    {
         let node_base_idx = self.idx(ln, Variable(0u));
         let succ_base_idx = self.idx(succ_ln, Variable(0u));
         for var_idx in range(0u, self.ir.num_vars) {
@@ -702,10 +701,13 @@ fn indices2(&mut self,
         }
     }
 
-    fn write_vars(&self,
-                  wr: &mut io::Writer,
-                  ln: LiveNode,
-                  test: |uint| -> LiveNode) -> io::IoResult<()> {
+    fn write_vars<F>(&self,
+                     wr: &mut io::Writer,
+                     ln: LiveNode,
+                     mut test: F)
+                     -> io::IoResult<()> where
+        F: FnMut(uint) -> LiveNode,
+    {
         let node_base_idx = self.idx(ln, Variable(0));
         for var_idx in range(0u, self.ir.num_vars) {
             let idx = node_base_idx + var_idx;
@@ -979,9 +981,8 @@ fn propagate_through_expr(&mut self, expr: &Expr, succ: LiveNode)
               self.propagate_through_expr(&**e, succ)
           }
 
-          ast::ExprClosure(_, _, _, ref blk) |
-          ast::ExprProc(_, ref blk) => {
-              debug!("{} is an ExprClosure or ExprProc",
+          ast::ExprClosure(_, _, _, ref blk) => {
+              debug!("{} is an ExprClosure",
                      expr_to_string(expr));
 
               /*
@@ -1408,12 +1409,14 @@ fn propagate_through_loop(&mut self,
         cond_ln
     }
 
-    fn with_loop_nodes<R>(&mut self,
-                          loop_node_id: NodeId,
-                          break_ln: LiveNode,
-                          cont_ln: LiveNode,
-                          f: |&mut Liveness<'a, 'tcx>| -> R)
-                          -> R {
+    fn with_loop_nodes<R, F>(&mut self,
+                             loop_node_id: NodeId,
+                             break_ln: LiveNode,
+                             cont_ln: LiveNode,
+                             f: F)
+                             -> R where
+        F: FnOnce(&mut Liveness<'a, 'tcx>) -> R,
+    {
         debug!("with_loop_nodes: {} {}", loop_node_id, break_ln.get());
         self.loop_scope.push(loop_node_id);
         self.break_ln.insert(loop_node_id, break_ln);
@@ -1498,8 +1501,7 @@ fn check_expr(this: &mut Liveness, expr: &Expr) {
       ast::ExprBreak(..) | ast::ExprAgain(..) | ast::ExprLit(_) |
       ast::ExprBlock(..) | ast::ExprMac(..) | ast::ExprAddrOf(..) |
       ast::ExprStruct(..) | ast::ExprRepeat(..) | ast::ExprParen(..) |
-      ast::ExprClosure(..) | ast::ExprProc(..) |
-      ast::ExprPath(..) | ast::ExprBox(..) | ast::ExprSlice(..) => {
+      ast::ExprClosure(..) | ast::ExprPath(..) | ast::ExprBox(..) | ast::ExprSlice(..) => {
         visit::walk_expr(this, expr);
       }
       ast::ExprIfLet(..) => {
index 302fbd53dd5302f1fce3a6daa4738ba997967614..652847a63436defe3525fd2401d39d214a645857 100644 (file)
@@ -555,8 +555,7 @@ pub fn cat_expr_unadjusted(&self, expr: &ast::Expr) -> McResult<cmt<'tcx>> {
 
           ast::ExprAddrOf(..) | ast::ExprCall(..) |
           ast::ExprAssign(..) | ast::ExprAssignOp(..) |
-          ast::ExprClosure(..) | ast::ExprProc(..) |
-          ast::ExprRet(..) |
+          ast::ExprClosure(..) | ast::ExprRet(..) |
           ast::ExprUnary(..) | ast::ExprSlice(..) |
           ast::ExprMethodCall(..) | ast::ExprCast(..) |
           ast::ExprVec(..) | ast::ExprTup(..) | ast::ExprIf(..) |
@@ -728,7 +727,6 @@ fn cat_upvar(&self,
                 };
 
                 match fn_expr.node {
-                    ast::ExprProc(_, ref body) |
                     ast::ExprClosure(_, _, _, ref body) => body.id,
                     _ => unreachable!()
                 }
@@ -1142,12 +1140,11 @@ pub fn cat_downcast<N:ast_node>(&self,
         })
     }
 
+    // FIXME(#19596) unbox `op`
     pub fn cat_pattern(&self,
                        cmt: cmt<'tcx>,
                        pat: &ast::Pat,
-                       op: |&MemCategorizationContext<'t,TYPER>,
-                            cmt<'tcx>,
-                            &ast::Pat|)
+                       op: |&MemCategorizationContext<'t, TYPER>, cmt<'tcx>, &ast::Pat|)
                        -> McResult<()> {
         // Here, `cmt` is the categorization for the value being
         // matched and pat is the pattern it is being matched against.
index 8d4fbfd4cbcccea6740ed68fddd447b5cb2208f3..8ef8e091c94858aeda905d049380ae50944c6c66 100644 (file)
@@ -91,9 +91,9 @@ pub fn pat_is_binding_or_wild(dm: &resolve::DefMap, pat: &ast::Pat) -> bool {
 
 /// Call `it` on every "binding" in a pattern, e.g., on `a` in
 /// `match foo() { Some(a) => (), None => () }`
-pub fn pat_bindings(dm: &resolve::DefMap,
-                    pat: &ast::Pat,
-                    it: |ast::BindingMode, ast::NodeId, Span, &ast::SpannedIdent|) {
+pub fn pat_bindings<I>(dm: &resolve::DefMap, pat: &ast::Pat, mut it: I) where
+    I: FnMut(ast::BindingMode, ast::NodeId, Span, &ast::SpannedIdent),
+{
     walk_pat(pat, |p| {
         match p.node {
           ast::PatIdent(binding_mode, ref pth, _) if pat_is_binding(dm, p) => {
index 5770b601a69ce44ad6a68074d561b6ad4df6da63..8cce1321d728bdc7b9ae770f35cd219b01aaf0c9 100644 (file)
@@ -76,7 +76,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             // method to the root. In this case, if the trait is private, then
             // parent all the methods to the trait to indicate that they're
             // private.
-            ast::ItemTrait(_, _, _, ref methods) if item.vis != ast::Public => {
+            ast::ItemTrait(_, _, _, _, ref methods) if item.vis != ast::Public => {
                 for m in methods.iter() {
                     match *m {
                         ast::ProvidedMethod(ref m) => {
@@ -241,7 +241,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             //   undefined symbols at linkage time if this case is not handled.
             //
             // * Private trait impls for private types can be completely ignored
-            ast::ItemImpl(_, _, ref ty, ref impl_items) => {
+            ast::ItemImpl(_, _, _, ref ty, ref impl_items) => {
                 let public_ty = match ty.node {
                     ast::TyPath(_, id) => {
                         match self.tcx.def_map.borrow()[id].clone() {
@@ -282,7 +282,7 @@ fn visit_item(&mut self, item: &ast::Item) {
 
             // Default methods on traits are all public so long as the trait
             // is public
-            ast::ItemTrait(_, _, _, ref methods) if public_first => {
+            ast::ItemTrait(_, _, _, _, ref methods) if public_first => {
                 for method in methods.iter() {
                     match *method {
                         ast::ProvidedMethod(ref m) => {
@@ -611,7 +611,7 @@ fn ensure_public(&self, span: Span, to_check: ast::DefId,
                     // invoked, and the struct/enum itself is private. Crawl
                     // back up the chains to find the relevant struct/enum that
                     // was private.
-                    ast::ItemImpl(_, _, ref ty, _) => {
+                    ast::ItemImpl(_, _, _, ref ty, _) => {
                         let id = match ty.node {
                             ast::TyPath(_, id) => id,
                             _ => return Some((err_span, err_msg, None)),
@@ -1096,7 +1096,7 @@ fn check_sane_privacy(&self, item: &ast::Item) {
         match item.node {
             // implementations of traits don't need visibility qualifiers because
             // that's controlled by having the trait in scope.
-            ast::ItemImpl(_, Some(..), _, ref impl_items) => {
+            ast::ItemImpl(_, _, Some(..), _, ref impl_items) => {
                 check_inherited(item.span, item.vis,
                                 "visibility qualifiers have no effect on trait \
                                  impls");
@@ -1134,7 +1134,7 @@ fn check_sane_privacy(&self, item: &ast::Item) {
                 }
             }
 
-            ast::ItemTrait(_, _, _, ref methods) => {
+            ast::ItemTrait(_, _, _, _, ref methods) => {
                 for m in methods.iter() {
                     match *m {
                         ast::ProvidedMethod(ref m) => {
@@ -1175,7 +1175,7 @@ fn check_inherited(tcx: &ty::ctxt, sp: Span, vis: ast::Visibility) {
         };
         check_inherited(tcx, item.span, item.vis);
         match item.node {
-            ast::ItemImpl(_, _, _, ref impl_items) => {
+            ast::ItemImpl(_, _, _, _, ref impl_items) => {
                 for impl_item in impl_items.iter() {
                     match *impl_item {
                         ast::MethodImplItem(ref m) => {
@@ -1198,7 +1198,7 @@ fn check_inherited(tcx: &ty::ctxt, sp: Span, vis: ast::Visibility) {
 
             ast::ItemStruct(ref def, _) => check_struct(&**def),
 
-            ast::ItemTrait(_, _, _, ref methods) => {
+            ast::ItemTrait(_, _, _, _, ref methods) => {
                 for m in methods.iter() {
                     match *m {
                         ast::RequiredMethod(..) => {}
@@ -1305,7 +1305,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             // namespace (the contents have their own privacies).
             ast::ItemForeignMod(_) => {}
 
-            ast::ItemTrait(_, _, ref bounds, _) => {
+            ast::ItemTrait(_, _, _, ref bounds, _) => {
                 if !self.trait_is_public(item.id) {
                     return
                 }
@@ -1320,7 +1320,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             // (i.e. we could just return here to not check them at
             // all, or some worse estimation of whether an impl is
             // publicly visible.
-            ast::ItemImpl(ref g, ref trait_ref, ref self_, ref impl_items) => {
+            ast::ItemImpl(_, ref g, ref trait_ref, ref self_, ref impl_items) => {
                 // `impl [... for] Private` is never visible.
                 let self_contains_private;
                 // impl [... for] Public<...>, but not `impl [... for]
@@ -1453,8 +1453,15 @@ fn visit_generics(&mut self, generics: &ast::Generics) {
             }
         }
         for predicate in generics.where_clause.predicates.iter() {
-            for bound in predicate.bounds.iter() {
-                self.check_ty_param_bound(predicate.span, bound)
+            match predicate {
+                &ast::WherePredicate::BoundPredicate(ref bound_pred) => {
+                    for bound in bound_pred.bounds.iter() {
+                        self.check_ty_param_bound(bound_pred.span, bound)
+                    }
+                }
+                &ast::WherePredicate::EqPredicate(ref eq_pred) => {
+                    self.visit_ty(&*eq_pred.ty);
+                }
             }
         }
     }
index fa02c940aa75426d28813587015b4e030bfd67b5..38d3b859c9d228689e0ddcab4852cbc3f70e88f7 100644 (file)
@@ -55,7 +55,7 @@ fn item_might_be_inlined(item: &ast::Item) -> bool {
     }
 
     match item.node {
-        ast::ItemImpl(ref generics, _, _, _) |
+        ast::ItemImpl(_, ref generics, _, _, _) |
         ast::ItemFn(_, _, _, ref generics, _) => {
             generics_require_inlining(generics)
         }
@@ -216,7 +216,7 @@ fn def_id_represents_local_inlined_item(&self, def_id: ast::DefId) -> bool {
                                       .map
                                       .expect_item(impl_did.node)
                                       .node {
-                                ast::ItemImpl(ref generics, _, _, _) => {
+                                ast::ItemImpl(_, ref generics, _, _, _) => {
                                     generics_require_inlining(generics)
                                 }
                                 _ => false
index 370097004e92c54d5b445c662d741cd7ae7307a3..390729df0125d1ba7a5241354e5a5114f7dd5e9a 100644 (file)
@@ -62,7 +62,9 @@ pub fn node_id(&self) -> ast::NodeId {
 
     /// Maps this scope to a potentially new one according to the
     /// NodeId transformer `f_id`.
-    pub fn map_id(&self, f_id: |ast::NodeId| -> ast::NodeId) -> CodeExtent {
+    pub fn map_id<F>(&self, f_id: F) -> CodeExtent where
+        F: FnOnce(ast::NodeId) -> ast::NodeId,
+    {
         match *self {
             CodeExtent::Misc(node_id) => CodeExtent::Misc(f_id(node_id)),
         }
index 36b87bbd42392081592acb0511a5ee165130eee3..30bad840e17cd98ebc416c81655452a930d437f4 100644 (file)
@@ -51,7 +51,7 @@
 use syntax::ast::{Arm, BindByRef, BindByValue, BindingMode, Block, Crate, CrateNum};
 use syntax::ast::{DeclItem, DefId, Expr, ExprAgain, ExprBreak, ExprField};
 use syntax::ast::{ExprClosure, ExprForLoop, ExprLoop, ExprWhile, ExprMethodCall};
-use syntax::ast::{ExprPath, ExprProc, ExprStruct, FnDecl};
+use syntax::ast::{ExprPath, ExprStruct, FnDecl};
 use syntax::ast::{ForeignItem, ForeignItemFn, ForeignItemStatic, Generics};
 use syntax::ast::{Ident, ImplItem, Item, ItemEnum, ItemFn, ItemForeignMod};
 use syntax::ast::{ItemImpl, ItemMac, ItemMod, ItemStatic, ItemStruct};
@@ -64,7 +64,7 @@
 use syntax::ast::{StructVariantKind, TraitRef, TraitTyParamBound};
 use syntax::ast::{TupleVariantKind, Ty, TyBool, TyChar, TyClosure, TyF32};
 use syntax::ast::{TyF64, TyFloat, TyI, TyI8, TyI16, TyI32, TyI64, TyInt, TyObjectSum};
-use syntax::ast::{TyParam, TyParamBound, TyPath, TyPtr, TyPolyTraitRef, TyProc, TyQPath};
+use syntax::ast::{TyParam, TyParamBound, TyPath, TyPtr, TyPolyTraitRef, TyQPath};
 use syntax::ast::{TyRptr, TyStr, TyU, TyU8, TyU16, TyU32, TyU64, TyUint};
 use syntax::ast::{TypeImplItem, UnnamedField};
 use syntax::ast::{Variant, ViewItem, ViewItemExternCrate};
@@ -108,7 +108,7 @@ impl Copy for binding_info {}
 
 pub struct Export2 {
     pub name: String,        // The name of the target.
-    pub def_id: DefId,     // The definition of the target.
+    pub def_id: DefId,       // The definition of the target.
 }
 
 // This set contains all exported definitions from external crates. The set does
@@ -314,7 +314,7 @@ impl<'a> Copy for TypeParameters<'a> {}
 
 // The rib kind controls the translation of local
 // definitions (`DefLocal`) to upvars (`DefUpvar`).
-
+#[deriving(Show)]
 enum RibKind {
     // No translation needs to be applied.
     NormalRibKind,
@@ -340,6 +340,7 @@ enum RibKind {
 impl Copy for RibKind {}
 
 // Methods can be required or provided. RequiredMethod methods only occur in traits.
+#[deriving(Show)]
 enum MethodSort {
     RequiredMethod,
     ProvidedMethod(NodeId)
@@ -414,6 +415,7 @@ enum DuplicateCheckingMode {
 impl Copy for DuplicateCheckingMode {}
 
 /// One local scope.
+#[deriving(Show)]
 struct Rib {
     bindings: HashMap<Name, DefLike>,
     kind: RibKind,
@@ -633,8 +635,6 @@ fn all_imports_resolved(&self) -> bool {
     }
 }
 
-impl Copy for DefModifiers {}
-
 // Records a possibly-private type definition.
 #[deriving(Clone)]
 struct TypeNsDef {
@@ -728,8 +728,11 @@ fn set_module_kind(&self,
         let type_def = self.type_def.borrow().clone();
         match type_def {
             None => {
-                let module = Module::new(parent_link, def_id, kind,
-                                         external, is_public);
+                let module = Module::new(parent_link,
+                                         def_id,
+                                         kind,
+                                         external,
+                                         is_public);
                 *self.type_def.borrow_mut() = Some(TypeNsDef {
                     modifiers: modifiers,
                     module_def: Some(Rc::new(module)),
@@ -774,9 +777,9 @@ fn define_type(&self, def: Def, sp: Span, modifiers: DefModifiers) {
             }
             Some(type_def) => {
                 *self.type_def.borrow_mut() = Some(TypeNsDef {
+                    module_def: type_def.module_def,
                     type_def: Some(def),
                     type_span: Some(sp),
-                    module_def: type_def.module_def,
                     modifiers: modifiers,
                 });
             }
@@ -1286,7 +1289,7 @@ fn block_needs_anonymous_module(&mut self, block: &Block) -> bool {
     }
 
     fn get_parent_link(&mut self, parent: ReducedGraphParent, name: Name)
-                           -> ParentLink {
+                       -> ParentLink {
         match parent {
             ModuleReducedGraphParent(module_) => {
                 return ModuleParentLink(module_.downgrade(), name);
@@ -1427,7 +1430,7 @@ fn build_reduced_graph_for_item(&mut self,
                 parent
             }
 
-            ItemImpl(_, None, ref ty, ref impl_items) => {
+            ItemImpl(_, _, None, ref ty, ref impl_items) => {
                 // If this implements an anonymous trait, then add all the
                 // methods within to a new module, if the type was defined
                 // within this module.
@@ -1576,16 +1579,16 @@ fn build_reduced_graph_for_item(&mut self,
                 parent
             }
 
-            ItemImpl(_, Some(_), _, _) => parent,
+            ItemImpl(_, _, Some(_), _, _) => parent,
 
-            ItemTrait(_, _, _, ref methods) => {
+            ItemTrait(_, _, _, _, ref items) => {
                 let name_bindings =
                     self.add_child(name,
                                    parent.clone(),
                                    ForbidDuplicateTypesAndModules,
                                    sp);
 
-                // Add all the methods within to a new module.
+                // Add all the items within to a new module.
                 let parent_link = self.get_parent_link(parent.clone(), name);
                 name_bindings.define_module(parent_link,
                                             Some(local_def(item.id)),
@@ -1598,13 +1601,12 @@ fn build_reduced_graph_for_item(&mut self,
 
                 let def_id = local_def(item.id);
 
-                // Add the names of all the methods to the trait info.
-                for method in methods.iter() {
-                    let (name, kind) = match *method {
+                // Add the names of all the items to the trait info.
+                for trait_item in items.iter() {
+                    let (name, kind) = match *trait_item {
                         ast::RequiredMethod(_) |
                         ast::ProvidedMethod(_) => {
-                            let ty_m =
-                                ast_util::trait_item_to_ty_method(method);
+                            let ty_m = ast_util::trait_item_to_ty_method(trait_item);
 
                             let name = ty_m.ident.name;
 
@@ -1833,10 +1835,12 @@ fn build_reduced_graph_for_view_item(&mut self, view_item: &ViewItem,
     }
 
     /// Constructs the reduced graph for one foreign item.
-    fn build_reduced_graph_for_foreign_item(&mut self,
-                                            foreign_item: &ForeignItem,
-                                            parent: ReducedGraphParent,
-                                            f: |&mut Resolver|) {
+    fn build_reduced_graph_for_foreign_item<F>(&mut self,
+                                               foreign_item: &ForeignItem,
+                                               parent: ReducedGraphParent,
+                                               f: F) where
+        F: FnOnce(&mut Resolver),
+    {
         let name = foreign_item.ident.name;
         let is_public = foreign_item.vis == ast::Public;
         let modifiers = if is_public { PUBLIC } else { DefModifiers::empty() } | IMPORTABLE;
@@ -3353,7 +3357,7 @@ fn resolve_module_path(&mut self,
                            use_lexical_scope: UseLexicalScopeFlag,
                            span: Span,
                            name_search_type: NameSearchType)
-                               -> ResolveResult<(Rc<Module>, LastPrivate)> {
+                           -> ResolveResult<(Rc<Module>, LastPrivate)> {
         let module_path_len = module_path.len();
         assert!(module_path_len > 0);
 
@@ -3382,7 +3386,9 @@ fn resolve_module_path(&mut self,
                                             mpath.slice_to(idx - 1));
                         return Failed(Some((span, msg)));
                     },
-                    None => return Failed(None),
+                    None => {
+                        return Failed(None)
+                    }
                 }
             }
             Failed(err) => return Failed(err),
@@ -3407,9 +3413,8 @@ fn resolve_module_path(&mut self,
                         // This is not a crate-relative path. We resolve the
                         // first component of the path in the current lexical
                         // scope and then proceed to resolve below that.
-                        match self.resolve_module_in_lexical_scope(
-                                                            module_,
-                                                            module_path[0]) {
+                        match self.resolve_module_in_lexical_scope(module_,
+                                                                   module_path[0]) {
                             Failed(err) => return Failed(err),
                             Indeterminate => {
                                 debug!("(resolving module path for import) \
@@ -3576,8 +3581,7 @@ fn resolve_module_in_lexical_scope(&mut self,
                                 -> ResolveResult<Rc<Module>> {
         // If this module is an anonymous module, resolve the item in the
         // lexical scope. Otherwise, resolve the item from the crate root.
-        let resolve_result = self.resolve_item_in_lexical_scope(
-            module_, name, TypeNS);
+        let resolve_result = self.resolve_item_in_lexical_scope(module_, name, TypeNS);
         match resolve_result {
             Success((target, _)) => {
                 let bindings = &*target.bindings;
@@ -3966,7 +3970,9 @@ fn add_exports_for_module(&mut self,
     // generate a fake "implementation scope" containing all the
     // implementations thus found, for compatibility with old resolve pass.
 
-    fn with_scope(&mut self, name: Option<Name>, f: |&mut Resolver|) {
+    fn with_scope<F>(&mut self, name: Option<Name>, f: F) where
+        F: FnOnce(&mut Resolver),
+    {
         let orig_module = self.current_module.clone();
 
         // Move down in the graph.
@@ -4222,7 +4228,8 @@ fn resolve_item(&mut self, item: &Item) {
                 });
             }
 
-            ItemImpl(ref generics,
+            ItemImpl(_,
+                     ref generics,
                      ref implemented_traits,
                      ref self_type,
                      ref impl_items) => {
@@ -4233,7 +4240,7 @@ fn resolve_item(&mut self, item: &Item) {
                                             impl_items.as_slice());
             }
 
-            ItemTrait(ref generics, ref unbound, ref bounds, ref trait_items) => {
+            ItemTrait(_, ref generics, ref unbound, ref bounds, ref trait_items) => {
                 // Create a new rib for the self type.
                 let mut self_type_rib = Rib::new(ItemRibKind);
 
@@ -4369,9 +4376,9 @@ fn resolve_item(&mut self, item: &Item) {
         }
     }
 
-    fn with_type_parameter_rib(&mut self,
-                               type_parameters: TypeParameters,
-                               f: |&mut Resolver|) {
+    fn with_type_parameter_rib<F>(&mut self, type_parameters: TypeParameters, f: F) where
+        F: FnOnce(&mut Resolver),
+    {
         match type_parameters {
             HasTypeParameters(generics, space, node_id, rib_kind) => {
                 let mut function_type_rib = Rib::new(rib_kind);
@@ -4418,13 +4425,17 @@ fn with_type_parameter_rib(&mut self,
         }
     }
 
-    fn with_label_rib(&mut self, f: |&mut Resolver|) {
+    fn with_label_rib<F>(&mut self, f: F) where
+        F: FnOnce(&mut Resolver),
+    {
         self.label_ribs.push(Rib::new(NormalRibKind));
         f(self);
         self.label_ribs.pop();
     }
 
-    fn with_constant_rib(&mut self, f: |&mut Resolver|) {
+    fn with_constant_rib<F>(&mut self, f: F) where
+        F: FnOnce(&mut Resolver),
+    {
         self.value_ribs.push(Rib::new(ConstantItemRibKind));
         self.type_ribs.push(Rib::new(ConstantItemRibKind));
         f(self);
@@ -4590,25 +4601,42 @@ fn resolve_trait_reference(&mut self,
 
     fn resolve_where_clause(&mut self, where_clause: &ast::WhereClause) {
         for predicate in where_clause.predicates.iter() {
-            match self.resolve_identifier(predicate.ident,
-                                          TypeNS,
-                                          true,
-                                          predicate.span) {
-                Some((def @ DefTyParam(_, _, _), last_private)) => {
-                    self.record_def(predicate.id, (def, last_private));
-                }
-                _ => {
-                    self.resolve_error(
-                        predicate.span,
-                        format!("undeclared type parameter `{}`",
-                                token::get_ident(
-                                    predicate.ident)).as_slice());
+            match predicate {
+                &ast::WherePredicate::BoundPredicate(ref bound_pred) => {
+                    match self.resolve_identifier(bound_pred.ident,
+                                                  TypeNS,
+                                                  true,
+                                                  bound_pred.span) {
+                        Some((def @ DefTyParam(..), last_private)) => {
+                            self.record_def(bound_pred.id, (def, last_private));
+                        }
+                        _ => {
+                            self.resolve_error(
+                                bound_pred.span,
+                                format!("undeclared type parameter `{}`",
+                                        token::get_ident(
+                                            bound_pred.ident)).as_slice());
+                        }
+                    }
+
+                    for bound in bound_pred.bounds.iter() {
+                        self.resolve_type_parameter_bound(bound_pred.id, bound,
+                                                          TraitBoundingTypeParameter);
+                    }
                 }
-            }
+                &ast::WherePredicate::EqPredicate(ref eq_pred) => {
+                    match self.resolve_path(eq_pred.id, &eq_pred.path, TypeNS, true) {
+                        Some((def @ DefTyParam(..), last_private)) => {
+                            self.record_def(eq_pred.id, (def, last_private));
+                        }
+                        _ => {
+                            self.resolve_error(eq_pred.path.span,
+                                               "undeclared associated type");
+                        }
+                    }
 
-            for bound in predicate.bounds.iter() {
-                self.resolve_type_parameter_bound(predicate.id, bound,
-                                                  TraitBoundingTypeParameter);
+                    self.resolve_type(&*eq_pred.ty);
+                }
             }
         }
     }
@@ -4655,7 +4683,9 @@ fn resolve_method(&mut self,
                               method.pe_body());
     }
 
-    fn with_current_self_type<T>(&mut self, self_type: &Ty, f: |&mut Resolver| -> T) -> T {
+    fn with_current_self_type<T, F>(&mut self, self_type: &Ty, f: F) -> T where
+        F: FnOnce(&mut Resolver) -> T,
+    {
         // Handle nested impls (inside fn bodies)
         let previous_value = replace(&mut self.current_self_type, Some(self_type.clone()));
         let result = f(self);
@@ -4663,9 +4693,11 @@ fn with_current_self_type<T>(&mut self, self_type: &Ty, f: |&mut Resolver| -> T)
         result
     }
 
-    fn with_optional_trait_ref<T>(&mut self, id: NodeId,
-                                  opt_trait_ref: &Option<TraitRef>,
-                                  f: |&mut Resolver| -> T) -> T {
+    fn with_optional_trait_ref<T, F>(&mut self, id: NodeId,
+                                     opt_trait_ref: &Option<TraitRef>,
+                                     f: F) -> T where
+        F: FnOnce(&mut Resolver) -> T,
+    {
         let new_val = match *opt_trait_ref {
             Some(ref trait_ref) => {
                 self.resolve_trait_reference(id, trait_ref, TraitImplementation);
@@ -4994,7 +5026,7 @@ fn resolve_type(&mut self, ty: &Ty) {
                 self.resolve_trait_reference(ty.id, &*qpath.trait_ref, TraitQPath);
             }
 
-            TyClosure(ref c) | TyProc(ref c) => {
+            TyClosure(ref c) => {
                 self.resolve_type_parameter_bounds(
                     ty.id,
                     &c.bounds,
@@ -5269,15 +5301,19 @@ fn resolve_path(&mut self,
                     path: &Path,
                     namespace: Namespace,
                     check_ribs: bool) -> Option<(Def, LastPrivate)> {
-        // First, resolve the types.
+        // First, resolve the types and associated type bindings.
         for ty in path.segments.iter().flat_map(|s| s.parameters.types().into_iter()) {
             self.resolve_type(&**ty);
         }
+        for binding in path.segments.iter().flat_map(|s| s.parameters.bindings().into_iter()) {
+            self.resolve_type(&*binding.ty);
+        }
 
         if path.global {
             return self.resolve_crate_relative_path(path, namespace);
         }
 
+        // Try to find a path to an item in a module.
         let unqualified_def =
                 self.resolve_identifier(path.segments
                                             .last().unwrap()
@@ -5307,15 +5343,15 @@ fn resolve_path(&mut self,
 
     // resolve a single identifier (used as a varref)
     fn resolve_identifier(&mut self,
-                              identifier: Ident,
-                              namespace: Namespace,
-                              check_ribs: bool,
-                              span: Span)
-                              -> Option<(Def, LastPrivate)> {
+                          identifier: Ident,
+                          namespace: Namespace,
+                          check_ribs: bool,
+                          span: Span)
+                          -> Option<(Def, LastPrivate)> {
         if check_ribs {
             match self.resolve_identifier_in_local_ribs(identifier,
-                                                      namespace,
-                                                      span) {
+                                                        namespace,
+                                                        span) {
                 Some(def) => {
                     return Some((def, LastMod(AllPublic)));
                 }
@@ -5333,7 +5369,7 @@ fn resolve_definition_of_name_in_module(&mut self,
                                             containing_module: Rc<Module>,
                                             name: Name,
                                             namespace: Namespace)
-                                                -> NameDefinition {
+                                            -> NameDefinition {
         // First, search children.
         self.populate_module_if_necessary(&containing_module);
 
@@ -5403,9 +5439,9 @@ fn resolve_definition_of_name_in_module(&mut self,
 
     // resolve a "module-relative" path, e.g. a::b::c
     fn resolve_module_relative_path(&mut self,
-                                        path: &Path,
-                                        namespace: Namespace)
-                                        -> Option<(Def, LastPrivate)> {
+                                    path: &Path,
+                                    namespace: Namespace)
+                                    -> Option<(Def, LastPrivate)> {
         let module_path = path.segments.init().iter()
                                               .map(|ps| ps.identifier.name)
                                               .collect::<Vec<_>>();
@@ -5422,9 +5458,8 @@ fn resolve_module_relative_path(&mut self,
                 let (span, msg) = match err {
                     Some((span, msg)) => (span, msg),
                     None => {
-                        let msg = format!("Use of undeclared module `{}`",
-                                          self.names_to_string(
-                                               module_path.as_slice()));
+                        let msg = format!("Use of undeclared type or module `{}`",
+                                          self.names_to_string(module_path.as_slice()));
                         (path.span, msg)
                     }
                 };
@@ -5518,10 +5553,10 @@ fn resolve_crate_relative_path(&mut self,
     }
 
     fn resolve_identifier_in_local_ribs(&mut self,
-                                            ident: Ident,
-                                            namespace: Namespace,
-                                            span: Span)
-                                            -> Option<Def> {
+                                        ident: Ident,
+                                        namespace: Namespace,
+                                        span: Span)
+                                        -> Option<Def> {
         // Check the local set of ribs.
         let search_result = match namespace {
             ValueNS => {
@@ -5596,7 +5631,9 @@ fn resolve_item_by_name_in_lexical_scope(&mut self,
         }
     }
 
-    fn with_no_errors<T>(&mut self, f: |&mut Resolver| -> T) -> T {
+    fn with_no_errors<T, F>(&mut self, f: F) -> T where
+        F: FnOnce(&mut Resolver) -> T,
+    {
         self.emit_errors = false;
         let rs = f(self);
         self.emit_errors = true;
@@ -5769,16 +5806,30 @@ fn resolve_expr(&mut self, expr: &Expr) {
                 // This is a local path in the value namespace. Walk through
                 // scopes looking for it.
 
+                let path_name = self.path_names_to_string(path);
+
                 match self.resolve_path(expr.id, path, ValueNS, true) {
+                    // Check if struct variant
+                    Some((DefVariant(_, _, true), _)) => {
+                        self.resolve_error(expr.span,
+                                format!("`{}` is a struct variant name, but \
+                                         this expression \
+                                         uses it like a function name",
+                                        path_name).as_slice());
+
+                        self.session.span_help(expr.span,
+                            format!("Did you mean to write: \
+                                    `{} {{ /* fields */ }}`?",
+                                    path_name).as_slice());
+                    }
                     Some(def) => {
                         // Write the result into the def map.
                         debug!("(resolving expr) resolved `{}`",
-                               self.path_names_to_string(path));
+                               path_name);
 
                         self.record_def(expr.id, def);
                     }
                     None => {
-                        let wrong_name = self.path_names_to_string(path);
                         // Be helpful if the name refers to a struct
                         // (The pattern matching def_tys where the id is in self.structs
                         // matches on regular structs while excluding tuple- and enum-like
@@ -5791,12 +5842,12 @@ fn resolve_expr(&mut self, expr: &Expr) {
                                         format!("`{}` is a structure name, but \
                                                  this expression \
                                                  uses it like a function name",
-                                                wrong_name).as_slice());
+                                                path_name).as_slice());
 
                                 self.session.span_help(expr.span,
                                     format!("Did you mean to write: \
                                             `{} {{ /* fields */ }}`?",
-                                            wrong_name).as_slice());
+                                            path_name).as_slice());
 
                             }
                             _ => {
@@ -5813,7 +5864,7 @@ fn resolve_expr(&mut self, expr: &Expr) {
                                 });
 
                                 if method_scope && token::get_name(self.self_name).get()
-                                                                   == wrong_name {
+                                                                   == path_name {
                                         self.resolve_error(
                                             expr.span,
                                             "`self` is not available \
@@ -5825,18 +5876,18 @@ fn resolve_expr(&mut self, expr: &Expr) {
                                         NoSuggestion => {
                                             // limit search to 5 to reduce the number
                                             // of stupid suggestions
-                                            self.find_best_match_for_name(wrong_name.as_slice(), 5)
+                                            self.find_best_match_for_name(path_name.as_slice(), 5)
                                                                 .map_or("".to_string(),
                                                                         |x| format!("`{}`", x))
                                         }
                                         Field =>
-                                            format!("`self.{}`", wrong_name),
+                                            format!("`self.{}`", path_name),
                                         Method
                                         | TraitItem =>
-                                            format!("to call `self.{}`", wrong_name),
+                                            format!("to call `self.{}`", path_name),
                                         TraitMethod(path_str)
                                         | StaticMethod(path_str) =>
-                                            format!("to call `{}::{}`", path_str, wrong_name)
+                                            format!("to call `{}::{}`", path_str, path_name)
                                     };
 
                                     if msg.len() > 0 {
@@ -5846,7 +5897,7 @@ fn resolve_expr(&mut self, expr: &Expr) {
                                     self.resolve_error(
                                         expr.span,
                                         format!("unresolved name `{}`{}",
-                                                wrong_name,
+                                                path_name,
                                                 msg).as_slice());
                                 }
                             }
@@ -5864,13 +5915,6 @@ fn resolve_expr(&mut self, expr: &Expr) {
                                       &**block);
             }
 
-            ExprProc(ref fn_decl, ref block) => {
-                self.capture_mode_map.insert(expr.id, ast::CaptureByValue);
-                self.resolve_function(ClosureRibKind(expr.id, block.id),
-                                      Some(&**fn_decl), NoTypeParameters,
-                                      &**block);
-            }
-
             ExprStruct(ref path, _, _) => {
                 // Resolve the path to the structure it goes to. We don't
                 // check to ensure that the path is actually a structure; that
index 2ba9ba5631d6a5aa41bacc43b6123dc9e8dc0692..48d6ac847d8d02b66a562eddc2c960414aae1b98 100644 (file)
@@ -106,7 +106,7 @@ fn visit_item(&mut self, item: &ast::Item) {
             ast::ItemTy(_, ref generics) |
             ast::ItemEnum(_, ref generics) |
             ast::ItemStruct(_, ref generics) |
-            ast::ItemTrait(ref generics, _, _, _) => {
+            ast::ItemTrait(_, ref generics, _, _, _) => {
                 // These kinds of items have only early bound lifetime parameters.
                 let lifetimes = &generics.lifetimes;
                 self.with(EarlyScope(subst::TypeSpace, lifetimes, &ROOT_SCOPE), |this| {
@@ -114,7 +114,7 @@ fn visit_item(&mut self, item: &ast::Item) {
                     visit::walk_item(this, item);
                 });
             }
-            ast::ItemImpl(ref generics, _, _, _) => {
+            ast::ItemImpl(_, ref generics, _, _, _) => {
                 // Impls have both early- and late-bound lifetimes.
                 self.visit_early_late(subst::TypeSpace, generics, |this| {
                     this.check_lifetime_defs(&generics.lifetimes);
@@ -141,7 +141,7 @@ fn visit_fn(&mut self, fk: visit::FnKind<'v>, fd: &'v ast::FnDecl,
 
     fn visit_ty(&mut self, ty: &ast::Ty) {
         match ty.node {
-            ast::TyClosure(ref c) | ast::TyProc(ref c) => {
+            ast::TyClosure(ref c)  => {
                 // Careful, the bounds on a closure/proc are *not* within its binder.
                 visit::walk_ty_param_bounds_helper(self, &c.bounds);
                 visit::walk_lifetime_decls_helper(self, &c.lifetimes);
@@ -210,8 +210,22 @@ fn visit_generics(&mut self, generics: &ast::Generics) {
             }
         }
         for predicate in generics.where_clause.predicates.iter() {
-            self.visit_ident(predicate.span, predicate.ident);
-            visit::walk_ty_param_bounds_helper(self, &predicate.bounds);
+            match predicate {
+                &ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate{ ident,
+                                                                               ref bounds,
+                                                                               span,
+                                                                               .. }) => {
+                    self.visit_ident(span, ident);
+                    visit::walk_ty_param_bounds_helper(self, bounds);
+                }
+                &ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{ id,
+                                                                         ref path,
+                                                                         ref ty,
+                                                                         .. }) => {
+                    self.visit_path(path, id);
+                    self.visit_ty(&**ty);
+                }
+            }
         }
     }
 
@@ -233,7 +247,9 @@ fn visit_trait_ref(&mut self, trait_ref: &ast::TraitRef) {
 }
 
 impl<'a> LifetimeContext<'a> {
-    fn with(&mut self, wrap_scope: ScopeChain, f: |&mut LifetimeContext|) {
+    fn with<F>(&mut self, wrap_scope: ScopeChain, f: F) where
+        F: FnOnce(&mut LifetimeContext),
+    {
         let LifetimeContext {sess, ref mut named_region_map, ..} = *self;
         let mut this = LifetimeContext {
             sess: sess,
@@ -264,10 +280,12 @@ fn with(&mut self, wrap_scope: ScopeChain, f: |&mut LifetimeContext|) {
     /// already in scope (for a fn item, that will be 0, but for a method it might not be). Late
     /// bound lifetimes are resolved by name and associated with a binder id (`binder_id`), so the
     /// ordering is not important there.
-    fn visit_early_late(&mut self,
-                        early_space: subst::ParamSpace,
-                        generics: &ast::Generics,
-                        walk: |&mut LifetimeContext|) {
+    fn visit_early_late<F>(&mut self,
+                           early_space: subst::ParamSpace,
+                           generics: &ast::Generics,
+                           walk: F) where
+        F: FnOnce(&mut LifetimeContext),
+    {
         let referenced_idents = early_bound_lifetime_names(generics);
 
         debug!("visit_early_late: referenced_idents={}",
@@ -276,8 +294,8 @@ fn visit_early_late(&mut self,
         let (early, late) = generics.lifetimes.clone().partition(
             |l| referenced_idents.iter().any(|&i| i == l.lifetime.name));
 
-        self.with(EarlyScope(early_space, &early, self.scope), |this| {
-            this.with(LateScope(&late, this.scope), |this| {
+        self.with(EarlyScope(early_space, &early, self.scope), move |this| {
+            this.with(LateScope(&late, this.scope), move |this| {
                 this.check_lifetime_defs(&generics.lifetimes);
                 walk(this);
             });
@@ -486,7 +504,12 @@ fn early_bound_lifetime_names(generics: &ast::Generics) -> Vec<ast::Name> {
             visit::walk_ty_param_bounds_helper(&mut collector, &ty_param.bounds);
         }
         for predicate in generics.where_clause.predicates.iter() {
-            visit::walk_ty_param_bounds_helper(&mut collector, &predicate.bounds);
+            match predicate {
+                &ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate{ref bounds, ..}) => {
+                    visit::walk_ty_param_bounds_helper(&mut collector, bounds);
+                }
+                &ast::WherePredicate::EqPredicate(_) => unimplemented!()
+            }
         }
     }
 
index 994fe2e9e27c4a21bd7b73019eede78a154928ea..ca8029fdfca3b418babf952d150a6c8c9d97343b 100644 (file)
@@ -43,7 +43,9 @@ struct Annotator {
 impl Annotator {
     // Determine the stability for a node based on its attributes and inherited
     // stability. The stability is recorded in the index and used as the parent.
-    fn annotate(&mut self, id: NodeId, attrs: &Vec<Attribute>, f: |&mut Annotator|) {
+    fn annotate<F>(&mut self, id: NodeId, attrs: &Vec<Attribute>, f: F) where
+        F: FnOnce(&mut Annotator),
+    {
         match attr::find_stability(attrs.as_slice()) {
             Some(stab) => {
                 self.index.local.insert(id, stab.clone());
index bcc762a9640f7310e12baca0b047d5f78b7981cc..2098aa3db533af673ae4f31110b4c1ca0f766e15 100644 (file)
@@ -112,7 +112,7 @@ pub fn has_regions_escaping_depth(&self, depth: uint) -> bool {
         }
     }
 
-pub fn self_ty(&self) -> Option<Ty<'tcx>> {
+    pub fn self_ty(&self) -> Option<Ty<'tcx>> {
         self.types.get_self().map(|&t| t)
     }
 
@@ -123,6 +123,13 @@ pub fn with_self_ty(&self, self_ty: Ty<'tcx>) -> Substs<'tcx> {
         s
     }
 
+    pub fn with_assoc_tys(&self, assoc_tys: Vec<Ty<'tcx>>) -> Substs<'tcx> {
+        assert!(self.types.is_empty_in(AssocSpace));
+        let mut s = (*self).clone();
+        s.types.replace(AssocSpace, assoc_tys);
+        s
+    }
+
     pub fn erase_regions(self) -> Substs<'tcx> {
         let Substs { types, regions: _ } = self;
         Substs { types: types, regions: ErasedRegions }
@@ -160,10 +167,9 @@ pub fn with_method(self,
 }
 
 impl RegionSubsts {
-    fn map<A>(self,
-              a: A,
-              op: |VecPerParamSpace<ty::Region>, A| -> VecPerParamSpace<ty::Region>)
-              -> RegionSubsts {
+    fn map<A, F>(self, a: A, op: F) -> RegionSubsts where
+        F: FnOnce(VecPerParamSpace<ty::Region>, A) -> VecPerParamSpace<ty::Region>,
+    {
         match self {
             ErasedRegions => ErasedRegions,
             NonerasedRegions(r) => NonerasedRegions(op(r, a))
@@ -408,16 +414,18 @@ pub fn as_slice(&self) -> &[T] {
         self.content.as_slice()
     }
 
-    pub fn all_vecs(&self, pred: |&[T]| -> bool) -> bool {
+    pub fn all_vecs<P>(&self, mut pred: P) -> bool where
+        P: FnMut(&[T]) -> bool,
+    {
         let spaces = [TypeSpace, SelfSpace, FnSpace];
         spaces.iter().all(|&space| { pred(self.get_slice(space)) })
     }
 
-    pub fn all(&self, pred: |&T| -> bool) -> bool {
+    pub fn all<P>(&self, pred: P) -> bool where P: FnMut(&T) -> bool {
         self.iter().all(pred)
     }
 
-    pub fn any(&self, pred: |&T| -> bool) -> bool {
+    pub fn any<P>(&self, pred: P) -> bool where P: FnMut(&T) -> bool {
         self.iter().any(pred)
     }
 
@@ -425,7 +433,7 @@ pub fn is_empty(&self) -> bool {
         self.all_vecs(|v| v.is_empty())
     }
 
-    pub fn map<U>(&self, pred: |&T| -> U) -> VecPerParamSpace<U> {
+    pub fn map<U, P>(&self, pred: P) -> VecPerParamSpace<U> where P: FnMut(&T) -> U {
         let result = self.iter().map(pred).collect();
         VecPerParamSpace::new_internal(result,
                                        self.type_limit,
@@ -433,7 +441,9 @@ pub fn map<U>(&self, pred: |&T| -> U) -> VecPerParamSpace<U> {
                                        self.assoc_limit)
     }
 
-    pub fn map_enumerated<U>(&self, pred: |(ParamSpace, uint, &T)| -> U) -> VecPerParamSpace<U> {
+    pub fn map_enumerated<U, P>(&self, pred: P) -> VecPerParamSpace<U> where
+        P: FnMut((ParamSpace, uint, &T)) -> U,
+    {
         let result = self.iter_enumerated().map(pred).collect();
         VecPerParamSpace::new_internal(result,
                                        self.type_limit,
@@ -441,7 +451,9 @@ pub fn map_enumerated<U>(&self, pred: |(ParamSpace, uint, &T)| -> U) -> VecPerPa
                                        self.assoc_limit)
     }
 
-    pub fn map_move<U>(self, pred: |T| -> U) -> VecPerParamSpace<U> {
+    pub fn map_move<U, F>(self, mut pred: F) -> VecPerParamSpace<U> where
+        F: FnMut(T) -> U,
+    {
         let SeparateVecsPerParamSpace {
             types: t,
             selfs: s,
index 1bce353cb0cfe986b9662f0de630a1ca41a8f6e8..822979c86017b22aa2fc81af6c0ffcda5d59d032 100644 (file)
@@ -11,7 +11,7 @@
 //! See `doc.rs` for high-level documentation
 
 use super::SelectionContext;
-use super::Obligation;
+use super::{Obligation, ObligationCause};
 use super::util;
 
 use middle::subst;
@@ -48,7 +48,7 @@ pub fn impl_can_satisfy(infcx: &InferCtxt,
     // same types.
     let param_env = ty::empty_parameter_environment();
     let mut selcx = SelectionContext::intercrate(infcx, &param_env, infcx.tcx);
-    let obligation = Obligation::misc(DUMMY_SP, impl1_trait_ref);
+    let obligation = Obligation::new(ObligationCause::dummy(), impl1_trait_ref);
     debug!("impl_can_satisfy(obligation={})", obligation.repr(infcx.tcx));
     selcx.evaluate_impl(impl2_def_id, &obligation)
 }
index 653c686ab197c3ea2a30d54486632bfe31947c66..412c188f5f4ae04d8862bdc69b009c4880440aca 100644 (file)
@@ -9,17 +9,27 @@
 // except according to those terms.
 
 use middle::mem_categorization::Typer;
-use middle::ty;
-use middle::infer::InferCtxt;
+use middle::ty::{mod, Ty};
+use middle::infer::{mod, InferCtxt};
 use std::collections::HashSet;
+use std::collections::hash_map::{Occupied, Vacant};
+use std::default::Default;
 use std::rc::Rc;
+use syntax::ast;
+use util::common::ErrorReported;
 use util::ppaux::Repr;
+use util::nodemap::NodeMap;
 
 use super::CodeAmbiguity;
-use super::Obligation;
-use super::FulfillmentError;
 use super::CodeSelectionError;
+use super::FulfillmentError;
+use super::Obligation;
+use super::ObligationCause;
+use super::PredicateObligation;
+use super::Selection;
 use super::select::SelectionContext;
+use super::trait_ref_for_builtin_bound;
+use super::Unimplemented;
 
 /// The fulfillment context is used to drive trait resolution.  It
 /// consists of a list of obligations that must be (eventually)
@@ -37,37 +47,118 @@ pub struct FulfillmentContext<'tcx> {
     // than the `SelectionCache`: it avoids duplicate errors and
     // permits recursive obligations, which are often generated from
     // traits like `Send` et al.
-    duplicate_set: HashSet<Rc<ty::TraitRef<'tcx>>>,
+    duplicate_set: HashSet<ty::Predicate<'tcx>>,
 
     // A list of all obligations that have been registered with this
     // fulfillment context.
-    trait_obligations: Vec<Obligation<'tcx>>,
+    predicates: Vec<PredicateObligation<'tcx>>,
 
     // Remembers the count of trait obligations that we have already
     // attempted to select. This is used to avoid repeating work
     // when `select_new_obligations` is called.
     attempted_mark: uint,
+
+    // A set of constraints that regionck must validate. Each
+    // constraint has the form `T:'a`, meaning "some type `T` must
+    // outlive the lifetime 'a". These constraints derive from
+    // instantiated type parameters. So if you had a struct defined
+    // like
+    //
+    //     struct Foo<T:'static> { ... }
+    //
+    // then in some expression `let x = Foo { ... }` it will
+    // instantiate the type parameter `T` with a fresh type `$0`. At
+    // the same time, it will record a region obligation of
+    // `$0:'static`. This will get checked later by regionck. (We
+    // can't generally check these things right away because we have
+    // to wait until types are resolved.)
+    //
+    // These are stored in a map keyed to the id of the innermost
+    // enclosing fn body / static initializer expression. This is
+    // because the location where the obligation was incurred can be
+    // relevant with respect to which sublifetime assumptions are in
+    // place. The reason that we store under the fn-id, and not
+    // something more fine-grained, is so that it is easier for
+    // regionck to be sure that it has found *all* the region
+    // obligations (otherwise, it's easy to fail to walk to a
+    // particular node-id).
+    region_obligations: NodeMap<Vec<RegionObligation<'tcx>>>,
+}
+
+pub struct RegionObligation<'tcx> {
+    pub sub_region: ty::Region,
+    pub sup_type: Ty<'tcx>,
+    pub cause: ObligationCause<'tcx>,
 }
 
 impl<'tcx> FulfillmentContext<'tcx> {
     pub fn new() -> FulfillmentContext<'tcx> {
         FulfillmentContext {
             duplicate_set: HashSet::new(),
-            trait_obligations: Vec::new(),
+            predicates: Vec::new(),
             attempted_mark: 0,
+            region_obligations: NodeMap::new(),
         }
     }
 
-    pub fn register_obligation(&mut self,
-                               tcx: &ty::ctxt<'tcx>,
-                               obligation: Obligation<'tcx>)
+    pub fn register_builtin_bound(&mut self,
+                                  tcx: &ty::ctxt<'tcx>,
+                                  ty: Ty<'tcx>,
+                                  builtin_bound: ty::BuiltinBound,
+                                  cause: ObligationCause<'tcx>)
     {
-        if self.duplicate_set.insert(obligation.trait_ref.clone()) {
-            debug!("register_obligation({})", obligation.repr(tcx));
-            assert!(!obligation.trait_ref.has_escaping_regions());
-            self.trait_obligations.push(obligation);
-        } else {
-            debug!("register_obligation({}) -- already seen, skip", obligation.repr(tcx));
+        match trait_ref_for_builtin_bound(tcx, builtin_bound, ty) {
+            Ok(trait_ref) => {
+                self.register_trait_ref(tcx, trait_ref, cause);
+            }
+            Err(ErrorReported) => { }
+        }
+    }
+
+    pub fn register_trait_ref<'a>(&mut self,
+                                  tcx: &ty::ctxt<'tcx>,
+                                  trait_ref: Rc<ty::TraitRef<'tcx>>,
+                                  cause: ObligationCause<'tcx>)
+    {
+        /*!
+         * A convenience function for registering trait obligations.
+         */
+
+        let trait_obligation = Obligation { cause: cause,
+                                            recursion_depth: 0,
+                                            trait_ref: ty::Predicate::Trait(trait_ref) };
+        self.register_predicate(tcx, trait_obligation)
+    }
+
+    pub fn register_region_obligation(&mut self,
+                                      tcx: &ty::ctxt<'tcx>,
+                                      t_a: Ty<'tcx>,
+                                      r_b: ty::Region,
+                                      cause: ObligationCause<'tcx>)
+    {
+        register_region_obligation(tcx, t_a, r_b, cause, &mut self.region_obligations);
+    }
+
+    pub fn register_predicate<'a>(&mut self,
+                                  tcx: &ty::ctxt<'tcx>,
+                                  predicate: PredicateObligation<'tcx>)
+    {
+        if !self.duplicate_set.insert(predicate.trait_ref.clone()) {
+            debug!("register_predicate({}) -- already seen, skip", predicate.repr(tcx));
+            return;
+        }
+
+        debug!("register_predicate({})", predicate.repr(tcx));
+        self.predicates.push(predicate);
+    }
+
+    pub fn region_obligations(&self,
+                              body_id: ast::NodeId)
+                              -> &[RegionObligation<'tcx>]
+    {
+        match self.region_obligations.get(&body_id) {
+            None => Default::default(),
+            Some(vec) => vec.as_slice(),
         }
     }
 
@@ -81,7 +172,7 @@ pub fn select_all_or_error<'a>(&mut self,
 
         // Anything left is ambiguous.
         let errors: Vec<FulfillmentError> =
-            self.trait_obligations
+            self.predicates
             .iter()
             .map(|o| FulfillmentError::new((*o).clone(), CodeAmbiguity))
             .collect();
@@ -117,8 +208,8 @@ pub fn select_where_possible<'a>(&mut self,
         self.select(&mut selcx, false)
     }
 
-    pub fn pending_trait_obligations(&self) -> &[Obligation<'tcx>] {
-        self.trait_obligations[]
+    pub fn pending_obligations(&self) -> &[PredicateObligation<'tcx>] {
+        self.predicates[]
     }
 
     /// Attempts to select obligations using `selcx`. If `only_new_obligations` is true, then it
@@ -129,14 +220,14 @@ fn select<'a>(&mut self,
                   -> Result<(),Vec<FulfillmentError<'tcx>>>
     {
         debug!("select({} obligations, only_new_obligations={}) start",
-               self.trait_obligations.len(),
+               self.predicates.len(),
                only_new_obligations);
 
         let tcx = selcx.tcx();
         let mut errors = Vec::new();
 
         loop {
-            let count = self.trait_obligations.len();
+            let count = self.predicates.len();
 
             debug!("select_where_possible({} obligations) iteration",
                    count);
@@ -154,37 +245,26 @@ fn select<'a>(&mut self,
 
             // First pass: walk each obligation, retaining
             // only those that we cannot yet process.
-            self.trait_obligations.retain(|obligation| {
-                // Hack: Retain does not pass in the index, but we want
-                // to avoid processing the first `start_count` entries.
-                if skip > 0 {
-                    skip -= 1;
-                    true
-                } else {
-                    match selcx.select(obligation) {
-                        Ok(None) => {
-                            true
-                        }
-                        Ok(Some(s)) => {
-                            selections.push(s);
-                            false
-                        }
-                        Err(selection_err) => {
-                            debug!("obligation: {} error: {}",
-                                   obligation.repr(tcx),
-                                   selection_err.repr(tcx));
-                            errors.push(FulfillmentError::new(
-                                (*obligation).clone(),
-                                CodeSelectionError(selection_err)));
+            {
+                let region_obligations = &mut self.region_obligations;
+                self.predicates.retain(|predicate| {
+                    // Hack: Retain does not pass in the index, but we want
+                    // to avoid processing the first `start_count` entries.
+                    let processed =
+                        if skip == 0 {
+                            process_predicate(selcx, predicate,
+                                              &mut selections, &mut errors, region_obligations)
+                        } else {
+                            skip -= 1;
                             false
-                        }
-                    }
-                }
-            });
+                        };
+                    !processed
+                });
+            }
 
-            self.attempted_mark = self.trait_obligations.len();
+            self.attempted_mark = self.predicates.len();
 
-            if self.trait_obligations.len() == count {
+            if self.predicates.len() == count {
                 // Nothing changed.
                 break;
             }
@@ -192,13 +272,12 @@ fn select<'a>(&mut self,
             // Now go through all the successful ones,
             // registering any nested obligations for the future.
             for selection in selections.into_iter() {
-                selection.map_move_nested(
-                    |o| self.register_obligation(tcx, o));
+                selection.map_move_nested(|p| self.register_predicate(tcx, p));
             }
         }
 
         debug!("select({} obligations, {} errors) done",
-               self.trait_obligations.len(),
+               self.predicates.len(),
                errors.len());
 
         if errors.len() == 0 {
@@ -208,3 +287,101 @@ fn select<'a>(&mut self,
         }
     }
 }
+
+fn process_predicate<'a,'tcx>(selcx: &mut SelectionContext<'a,'tcx>,
+                              predicate: &PredicateObligation<'tcx>,
+                              selections: &mut Vec<Selection<'tcx>>,
+                              errors: &mut Vec<FulfillmentError<'tcx>>,
+                              region_obligations: &mut NodeMap<Vec<RegionObligation<'tcx>>>)
+                              -> bool
+{
+    /*!
+     * Processes a predicate obligation and modifies the appropriate
+     * output array with the successful/error result.  Returns `false`
+     * if the predicate could not be processed due to insufficient
+     * type inference.
+     */
+
+    let tcx = selcx.tcx();
+    match predicate.trait_ref {
+        ty::Predicate::Trait(ref trait_ref) => {
+            let trait_obligation = Obligation { cause: predicate.cause,
+                                                recursion_depth: predicate.recursion_depth,
+                                                trait_ref: trait_ref.clone() };
+            match selcx.select(&trait_obligation) {
+                Ok(None) => {
+                    false
+                }
+                Ok(Some(s)) => {
+                    selections.push(s);
+                    true
+                }
+                Err(selection_err) => {
+                    debug!("predicate: {} error: {}",
+                           predicate.repr(tcx),
+                           selection_err.repr(tcx));
+                    errors.push(
+                        FulfillmentError::new(
+                            predicate.clone(),
+                            CodeSelectionError(selection_err)));
+                    true
+                }
+            }
+        }
+
+        ty::Predicate::Equate(a, b) => {
+            let origin = infer::EquatePredicate(predicate.cause.span);
+            match infer::mk_eqty(selcx.infcx(), false, origin, a, b) {
+                Ok(()) => {
+                    true
+                }
+                Err(_) => {
+                    errors.push(
+                        FulfillmentError::new(
+                            predicate.clone(),
+                            CodeSelectionError(Unimplemented)));
+                    true
+                }
+            }
+        }
+
+        ty::Predicate::RegionOutlives(r_a, r_b) => {
+            let origin = infer::RelateRegionParamBound(predicate.cause.span);
+            let () = infer::mk_subr(selcx.infcx(), origin, r_b, r_a); // `b : a` ==> `a <= b`
+            true
+        }
+
+        ty::Predicate::TypeOutlives(t_a, r_b) => {
+            register_region_obligation(tcx, t_a, r_b, predicate.cause, region_obligations);
+            true
+        }
+    }
+}
+
+impl<'tcx> Repr<'tcx> for RegionObligation<'tcx> {
+    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
+        format!("RegionObligation(sub_region={}, sup_type={})",
+                self.sub_region.repr(tcx),
+                self.sup_type.repr(tcx))
+    }
+}
+
+fn register_region_obligation<'tcx>(tcx: &ty::ctxt<'tcx>,
+                                    t_a: Ty<'tcx>,
+                                    r_b: ty::Region,
+                                    cause: ObligationCause<'tcx>,
+                                    region_obligations: &mut NodeMap<Vec<RegionObligation<'tcx>>>)
+{
+    let region_obligation = RegionObligation { sup_type: t_a,
+                                               sub_region: r_b,
+                                               cause: cause };
+
+    debug!("register_region_obligation({})",
+           region_obligation.repr(tcx));
+
+    match region_obligations.entry(region_obligation.cause.body_id) {
+        Vacant(entry) => { entry.set(vec![region_obligation]); },
+        Occupied(mut entry) => { entry.get_mut().push(region_obligation); },
+    }
+
+}
index d410a456dc913d01e8df8853c13a12daae78e7cd..936304c5eb483d980ad1b0c3d5ee6c2047c05167 100644 (file)
@@ -15,7 +15,6 @@
 pub use self::Vtable::*;
 pub use self::ObligationCauseCode::*;
 
-use middle::mem_categorization::Typer;
 use middle::subst;
 use middle::ty::{mod, Ty};
 use middle::infer::InferCtxt;
 use std::slice::Items;
 use syntax::ast;
 use syntax::codemap::{Span, DUMMY_SP};
-use util::common::ErrorReported;
 
-pub use self::fulfill::FulfillmentContext;
+pub use self::fulfill::{FulfillmentContext, RegionObligation};
 pub use self::select::SelectionContext;
 pub use self::select::SelectionCache;
 pub use self::select::{MethodMatchResult, MethodMatched, MethodAmbiguous, MethodDidNotMatch};
 pub use self::select::{MethodMatchedData}; // intentionally don't export variants
+pub use self::util::elaborate_predicates;
 pub use self::util::supertraits;
-pub use self::util::transitive_bounds;
 pub use self::util::Supertraits;
 pub use self::util::search_trait_and_supertraits_from_bound;
+pub use self::util::transitive_bounds;
+pub use self::util::trait_ref_for_builtin_bound;
 
 mod coherence;
 mod fulfill;
 /// provides the required vtable, or else finding a bound that is in
 /// scope. The eventual result is usually a `Selection` (defined below).
 #[deriving(Clone)]
-pub struct Obligation<'tcx> {
+pub struct Obligation<'tcx, T> {
     pub cause: ObligationCause<'tcx>,
     pub recursion_depth: uint,
-    pub trait_ref: Rc<ty::TraitRef<'tcx>>,
+    pub trait_ref: T,
 }
 
+pub type PredicateObligation<'tcx> = Obligation<'tcx, ty::Predicate<'tcx>>;
+pub type TraitObligation<'tcx> = Obligation<'tcx, Rc<ty::TraitRef<'tcx>>>;
+
 /// Why did we incur this obligation? Used for error reporting.
-#[deriving(Clone)]
+#[deriving(Copy, Clone)]
 pub struct ObligationCause<'tcx> {
     pub span: Span,
+
+    // The id of the fn body that triggered this obligation. This is
+    // used for region obligations to determine the precise
+    // environment in which the region obligation should be evaluated
+    // (in particular, closures can add new assumptions). See the
+    // field `region_obligations` of the `FulfillmentContext` for more
+    // information.
+    pub body_id: ast::NodeId,
+
     pub code: ObligationCauseCode<'tcx>
 }
 
-impl<'tcx> Copy for ObligationCause<'tcx> {}
-
-#[deriving(Clone)]
+#[deriving(Copy, Clone)]
 pub enum ObligationCauseCode<'tcx> {
     /// Not well classified or should be obvious from span.
     MiscObligation,
@@ -86,7 +96,7 @@ pub enum ObligationCauseCode<'tcx> {
 
     // Captures of variable the given id by a closure (span is the
     // span of the closure)
-    ClosureCapture(ast::NodeId, Span),
+    ClosureCapture(ast::NodeId, Span, ty::BuiltinBound),
 
     // Types of fields (other than the last) in a struct must be sized.
     FieldSized,
@@ -95,21 +105,21 @@ pub enum ObligationCauseCode<'tcx> {
     ObjectSized,
 }
 
-pub type Obligations<'tcx> = subst::VecPerParamSpace<Obligation<'tcx>>;
+pub type Obligations<'tcx, O> = subst::VecPerParamSpace<Obligation<'tcx, O>>;
+pub type PredicateObligations<'tcx> = subst::VecPerParamSpace<PredicateObligation<'tcx>>;
+pub type TraitObligations<'tcx> = subst::VecPerParamSpace<TraitObligation<'tcx>>;
 
-impl<'tcx> Copy for ObligationCauseCode<'tcx> {}
-
-pub type Selection<'tcx> = Vtable<'tcx, Obligation<'tcx>>;
+pub type Selection<'tcx> = Vtable<'tcx, PredicateObligation<'tcx>>;
 
 #[deriving(Clone,Show)]
 pub enum SelectionError<'tcx> {
     Unimplemented,
     Overflow,
-    OutputTypeParameterMismatch(Rc<ty::TraitRef<'tcx>>, ty::type_err<'tcx>)
+    OutputTypeParameterMismatch(Rc<ty::TraitRef<'tcx>>, Rc<ty::TraitRef<'tcx>>, ty::type_err<'tcx>),
 }
 
 pub struct FulfillmentError<'tcx> {
-    pub obligation: Obligation<'tcx>,
+    pub obligation: PredicateObligation<'tcx>,
     pub code: FulfillmentErrorCode<'tcx>
 }
 
@@ -219,33 +229,6 @@ pub struct VtableParamData<'tcx> {
     pub bound: Rc<ty::TraitRef<'tcx>>,
 }
 
-/// Matches the self type of the inherent impl `impl_def_id`
-/// against `self_ty` and returns the resulting resolution.  This
-/// routine may modify the surrounding type context (for example,
-/// it may unify variables).
-pub fn select_inherent_impl<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
-                                     param_env: &ty::ParameterEnvironment<'tcx>,
-                                     typer: &Typer<'tcx>,
-                                     cause: ObligationCause<'tcx>,
-                                     impl_def_id: ast::DefId,
-                                     self_ty: Ty<'tcx>)
-                                     -> SelectionResult<'tcx,
-                                            VtableImplData<'tcx, Obligation<'tcx>>>
-{
-    // This routine is only suitable for inherent impls. This is
-    // because it does not attempt to unify the output type parameters
-    // from the trait ref against the values from the obligation.
-    // (These things do not apply to inherent impls, for which there
-    // is no trait ref nor obligation.)
-    //
-    // Matching against non-inherent impls should be done with
-    // `try_resolve_obligation()`.
-    assert!(ty::impl_trait_ref(infcx.tcx, impl_def_id).is_none());
-
-    let mut selcx = select::SelectionContext::new(infcx, param_env, typer);
-    selcx.select_inherent_impl(impl_def_id, cause, self_ty)
-}
-
 /// True if neither the trait nor self type is local. Note that `impl_def_id` must refer to an impl
 /// of a trait, not an inherent impl.
 pub fn is_orphan_impl(tcx: &ty::ctxt,
@@ -265,63 +248,56 @@ pub fn overlapping_impls(infcx: &InferCtxt,
     coherence::impl_can_satisfy(infcx, impl2_def_id, impl1_def_id)
 }
 
-/// Given generic bounds from an impl like:
-///
-///    impl<A:Foo, B:Bar+Qux> ...
-///
-/// along with the bindings for the types `A` and `B` (e.g., `<A=A0, B=B0>`), yields a result like
-///
-///    [[Foo for A0, Bar for B0, Qux for B0], [], []]
-///
-/// Expects that `generic_bounds` have already been fully substituted, late-bound regions liberated
-/// and so forth, so that they are in the same namespace as `type_substs`.
-pub fn obligations_for_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                      cause: ObligationCause<'tcx>,
-                                      generic_bounds: &ty::GenericBounds<'tcx>,
-                                      type_substs: &subst::VecPerParamSpace<Ty<'tcx>>)
-                                      -> subst::VecPerParamSpace<Obligation<'tcx>>
-{
-    util::obligations_for_generics(tcx, cause, 0, generic_bounds, type_substs)
-}
-
-pub fn obligation_for_builtin_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                          cause: ObligationCause<'tcx>,
-                                          source_ty: Ty<'tcx>,
-                                          builtin_bound: ty::BuiltinBound)
-                                          -> Result<Obligation<'tcx>, ErrorReported>
+/// Creates predicate obligations from the generic bounds.
+pub fn predicates_for_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
+                                     cause: ObligationCause<'tcx>,
+                                     generic_bounds: &ty::GenericBounds<'tcx>)
+                                     -> PredicateObligations<'tcx>
 {
-    util::obligation_for_builtin_bound(tcx, cause, builtin_bound, 0, source_ty)
+    util::predicates_for_generics(tcx, cause, 0, generic_bounds)
 }
 
-impl<'tcx> Obligation<'tcx> {
-    pub fn new(cause: ObligationCause<'tcx>, trait_ref: Rc<ty::TraitRef<'tcx>>)
-               -> Obligation<'tcx> {
+impl<'tcx,O> Obligation<'tcx,O> {
+    pub fn new(cause: ObligationCause<'tcx>,
+               trait_ref: O)
+               -> Obligation<'tcx, O>
+    {
         Obligation { cause: cause,
                      recursion_depth: 0,
                      trait_ref: trait_ref }
     }
 
-    pub fn misc(span: Span, trait_ref: Rc<ty::TraitRef<'tcx>>) -> Obligation<'tcx> {
-        Obligation::new(ObligationCause::misc(span), trait_ref)
+    pub fn misc(span: Span, body_id: ast::NodeId, trait_ref: O) -> Obligation<'tcx, O> {
+        Obligation::new(ObligationCause::misc(span, body_id), trait_ref)
     }
 
+    pub fn with<P>(&self, value: P) -> Obligation<'tcx,P> {
+        Obligation { cause: self.cause.clone(),
+                     recursion_depth: self.recursion_depth,
+                     trait_ref: value }
+    }
+}
+
+impl<'tcx> Obligation<'tcx,Rc<ty::TraitRef<'tcx>>> {
     pub fn self_ty(&self) -> Ty<'tcx> {
         self.trait_ref.self_ty()
     }
 }
 
 impl<'tcx> ObligationCause<'tcx> {
-    pub fn new(span: Span, code: ObligationCauseCode<'tcx>)
+    pub fn new(span: Span,
+               body_id: ast::NodeId,
+               code: ObligationCauseCode<'tcx>)
                -> ObligationCause<'tcx> {
-        ObligationCause { span: span, code: code }
+        ObligationCause { span: span, body_id: body_id, code: code }
     }
 
-    pub fn misc(span: Span) -> ObligationCause<'tcx> {
-        ObligationCause { span: span, code: MiscObligation }
+    pub fn misc(span: Span, body_id: ast::NodeId) -> ObligationCause<'tcx> {
+        ObligationCause { span: span, body_id: body_id, code: MiscObligation }
     }
 
     pub fn dummy() -> ObligationCause<'tcx> {
-        ObligationCause { span: DUMMY_SP, code: MiscObligation }
+        ObligationCause { span: DUMMY_SP, body_id: 0, code: MiscObligation }
     }
 }
 
@@ -336,7 +312,7 @@ pub fn iter_nested(&self) -> Items<N> {
         }
     }
 
-    pub fn map_nested<M>(&self, op: |&N| -> M) -> Vtable<'tcx, M> {
+    pub fn map_nested<M, F>(&self, op: F) -> Vtable<'tcx, M> where F: FnMut(&N) -> M {
         match *self {
             VtableImpl(ref i) => VtableImpl(i.map_nested(op)),
             VtableFnPointer(ref sig) => VtableFnPointer((*sig).clone()),
@@ -346,7 +322,9 @@ pub fn map_nested<M>(&self, op: |&N| -> M) -> Vtable<'tcx, M> {
         }
     }
 
-    pub fn map_move_nested<M>(self, op: |N| -> M) -> Vtable<'tcx, M> {
+    pub fn map_move_nested<M, F>(self, op: F) -> Vtable<'tcx, M> where
+        F: FnMut(N) -> M,
+    {
         match self {
             VtableImpl(i) => VtableImpl(i.map_move_nested(op)),
             VtableFnPointer(sig) => VtableFnPointer(sig),
@@ -362,9 +340,8 @@ pub fn iter_nested(&self) -> Items<N> {
         self.nested.iter()
     }
 
-    pub fn map_nested<M>(&self,
-                         op: |&N| -> M)
-                         -> VtableImplData<'tcx, M>
+    pub fn map_nested<M, F>(&self, op: F) -> VtableImplData<'tcx, M> where
+        F: FnMut(&N) -> M,
     {
         VtableImplData {
             impl_def_id: self.impl_def_id,
@@ -373,8 +350,9 @@ pub fn map_nested<M>(&self,
         }
     }
 
-    pub fn map_move_nested<M>(self, op: |N| -> M)
-                              -> VtableImplData<'tcx, M> {
+    pub fn map_move_nested<M, F>(self, op: F) -> VtableImplData<'tcx, M> where
+        F: FnMut(N) -> M,
+    {
         let VtableImplData { impl_def_id, substs, nested } = self;
         VtableImplData {
             impl_def_id: impl_def_id,
@@ -389,16 +367,15 @@ pub fn iter_nested(&self) -> Items<N> {
         self.nested.iter()
     }
 
-    pub fn map_nested<M>(&self,
-                         op: |&N| -> M)
-                         -> VtableBuiltinData<M>
-    {
+    pub fn map_nested<M, F>(&self, op: F) -> VtableBuiltinData<M> where F: FnMut(&N) -> M {
         VtableBuiltinData {
             nested: self.nested.map(op)
         }
     }
 
-    pub fn map_move_nested<M>(self, op: |N| -> M) -> VtableBuiltinData<M> {
+    pub fn map_move_nested<M, F>(self, op: F) -> VtableBuiltinData<M> where
+        F: FnMut(N) -> M,
+    {
         VtableBuiltinData {
             nested: self.nested.map_move(op)
         }
@@ -406,7 +383,8 @@ pub fn map_move_nested<M>(self, op: |N| -> M) -> VtableBuiltinData<M> {
 }
 
 impl<'tcx> FulfillmentError<'tcx> {
-    fn new(obligation: Obligation<'tcx>, code: FulfillmentErrorCode<'tcx>)
+    fn new(obligation: PredicateObligation<'tcx>,
+           code: FulfillmentErrorCode<'tcx>)
            -> FulfillmentError<'tcx>
     {
         FulfillmentError { obligation: obligation, code: code }
index 06f8cbf1a6a60e88b02770b4c24d879580b0541c..8b31132f7362184e196409e60b7ebc657efe0909 100644 (file)
@@ -17,9 +17,8 @@
 use self::BuiltinBoundConditions::*;
 use self::EvaluationResult::*;
 
-use super::{Obligation, ObligationCause};
-use super::{SelectionError, Unimplemented, Overflow,
-            OutputTypeParameterMismatch};
+use super::{PredicateObligation, Obligation, TraitObligation, ObligationCause};
+use super::{SelectionError, Unimplemented, Overflow, OutputTypeParameterMismatch};
 use super::{Selection};
 use super::{SelectionResult};
 use super::{VtableBuiltin, VtableImpl, VtableParam, VtableUnboxedClosure, VtableFnPointer};
@@ -70,14 +69,14 @@ pub struct SelectionContext<'cx, 'tcx:'cx> {
 }
 
 // A stack that walks back up the stack frame.
-struct ObligationStack<'prev, 'tcx: 'prev> {
-    obligation: &'prev Obligation<'tcx>,
+struct TraitObligationStack<'prev, 'tcx: 'prev> {
+    obligation: &'prev TraitObligation<'tcx>,
 
     /// Trait ref from `obligation` but skolemized with the
     /// selection-context's skolemizer. Used to check for recursion.
     skol_trait_ref: Rc<ty::TraitRef<'tcx>>,
 
-    previous: Option<&'prev ObligationStack<'prev, 'tcx>>
+    previous: Option<&'prev TraitObligationStack<'prev, 'tcx>>
 }
 
 #[deriving(Clone)]
@@ -191,6 +190,10 @@ pub fn intercrate(infcx: &'cx InferCtxt<'cx, 'tcx>,
         }
     }
 
+    pub fn infcx(&self) -> &'cx InferCtxt<'cx, 'tcx> {
+        self.infcx
+    }
+
     pub fn tcx(&self) -> &'cx ty::ctxt<'tcx> {
         self.infcx.tcx
     }
@@ -213,7 +216,7 @@ pub fn tcx(&self) -> &'cx ty::ctxt<'tcx> {
     /// Evaluates whether the obligation can be satisfied. Returns an indication of whether the
     /// obligation can be satisfied and, if so, by what means. Never affects surrounding typing
     /// environment.
-    pub fn select(&mut self, obligation: &Obligation<'tcx>)
+    pub fn select(&mut self, obligation: &TraitObligation<'tcx>)
                   -> SelectionResult<'tcx, Selection<'tcx>> {
         debug!("select({})", obligation.repr(self.tcx()));
         assert!(!obligation.trait_ref.has_escaping_regions());
@@ -225,29 +228,6 @@ pub fn select(&mut self, obligation: &Obligation<'tcx>)
         }
     }
 
-    pub fn select_inherent_impl(&mut self,
-                                impl_def_id: ast::DefId,
-                                obligation_cause: ObligationCause<'tcx>,
-                                obligation_self_ty: Ty<'tcx>)
-                                -> SelectionResult<'tcx, VtableImplData<'tcx, Obligation<'tcx>>>
-    {
-        debug!("select_inherent_impl(impl_def_id={}, obligation_self_ty={})",
-               impl_def_id.repr(self.tcx()),
-               obligation_self_ty.repr(self.tcx()));
-
-        match self.match_inherent_impl(impl_def_id,
-                                       obligation_cause,
-                                       obligation_self_ty) {
-            Ok(substs) => {
-                let vtable_impl = self.vtable_impl(impl_def_id, substs, obligation_cause, 0);
-                Ok(Some(vtable_impl))
-            }
-            Err(()) => {
-                Err(Unimplemented)
-            }
-        }
-    }
-
     ///////////////////////////////////////////////////////////////////////////
     // EVALUATION
     //
@@ -260,25 +240,23 @@ pub fn select_inherent_impl(&mut self,
 
     /// Evaluates whether the obligation `obligation` can be satisfied (by any means).
     pub fn evaluate_obligation(&mut self,
-                               obligation: &Obligation<'tcx>)
+                               obligation: &PredicateObligation<'tcx>)
                                -> bool
     {
         debug!("evaluate_obligation({})",
                obligation.repr(self.tcx()));
-        assert!(!obligation.trait_ref.has_escaping_regions());
 
-        let stack = self.push_stack(None, obligation);
-        self.evaluate_stack(&stack).may_apply()
+        self.evaluate_predicate_recursively(None, obligation).may_apply()
     }
 
     fn evaluate_builtin_bound_recursively<'o>(&mut self,
                                               bound: ty::BuiltinBound,
-                                              previous_stack: &ObligationStack<'o, 'tcx>,
+                                              previous_stack: &TraitObligationStack<'o, 'tcx>,
                                               ty: Ty<'tcx>)
                                               -> EvaluationResult<'tcx>
     {
         let obligation =
-            util::obligation_for_builtin_bound(
+            util::predicate_for_builtin_bound(
                 self.tcx(),
                 previous_stack.obligation.cause,
                 bound,
@@ -287,7 +265,7 @@ fn evaluate_builtin_bound_recursively<'o>(&mut self,
 
         match obligation {
             Ok(obligation) => {
-                self.evaluate_obligation_recursively(Some(previous_stack), &obligation)
+                self.evaluate_predicate_recursively(Some(previous_stack), &obligation)
             }
             Err(ErrorReported) => {
                 EvaluatedToOk
@@ -295,9 +273,39 @@ fn evaluate_builtin_bound_recursively<'o>(&mut self,
         }
     }
 
+    fn evaluate_predicate_recursively<'o>(&mut self,
+                                          previous_stack: Option<&TraitObligationStack<'o, 'tcx>>,
+                                          obligation: &PredicateObligation<'tcx>)
+                                           -> EvaluationResult<'tcx>
+    {
+        debug!("evaluate_predicate_recursively({})",
+               obligation.repr(self.tcx()));
+
+        match obligation.trait_ref {
+            ty::Predicate::Trait(ref t) => {
+                assert!(!t.has_escaping_regions());
+                let obligation = obligation.with(t.clone());
+                self.evaluate_obligation_recursively(previous_stack, &obligation)
+            }
+
+            ty::Predicate::Equate(a, b) => {
+                match infer::can_mk_eqty(self.infcx, a, b) {
+                    Ok(()) => EvaluatedToOk,
+                    Err(_) => EvaluatedToErr(Unimplemented),
+                }
+            }
+
+            ty::Predicate::TypeOutlives(..) | ty::Predicate::RegionOutlives(..) => {
+                // we do not consider region relationships when
+                // evaluating trait matches
+                EvaluatedToOk
+            }
+        }
+    }
+
     fn evaluate_obligation_recursively<'o>(&mut self,
-                                           previous_stack: Option<&ObligationStack<'o, 'tcx>>,
-                                           obligation: &Obligation<'tcx>)
+                                           previous_stack: Option<&TraitObligationStack<'o, 'tcx>>,
+                                           obligation: &TraitObligation<'tcx>)
                                            -> EvaluationResult<'tcx>
     {
         debug!("evaluate_obligation_recursively({})",
@@ -312,7 +320,7 @@ fn evaluate_obligation_recursively<'o>(&mut self,
     }
 
     fn evaluate_stack<'o>(&mut self,
-                          stack: &ObligationStack<'o, 'tcx>)
+                          stack: &TraitObligationStack<'o, 'tcx>)
                           -> EvaluationResult<'tcx>
     {
         // In intercrate mode, whenever any of the types are unbound,
@@ -347,7 +355,7 @@ fn evaluate_stack<'o>(&mut self,
               stack.iter().skip(1).any(
                   |prev| stack.skol_trait_ref.def_id == prev.skol_trait_ref.def_id))
         {
-            debug!("evaluate_stack_intracrate({}) --> unbound argument, recursion -->  ambiguous",
+            debug!("evaluate_stack({}) --> unbound argument, recursion -->  ambiguous",
                    stack.skol_trait_ref.repr(self.tcx()));
             return EvaluatedToAmbig;
         }
@@ -376,7 +384,7 @@ fn evaluate_stack<'o>(&mut self,
             .skip(1) // skip top-most frame
             .any(|prev| stack.skol_trait_ref == prev.skol_trait_ref)
         {
-            debug!("evaluate_stack_intracrate({}) --> recursive",
+            debug!("evaluate_stack({}) --> recursive",
                    stack.skol_trait_ref.repr(self.tcx()));
             return EvaluatedToOk;
         }
@@ -392,7 +400,7 @@ fn evaluate_stack<'o>(&mut self,
     /// `obligation_self_ty`. This can be used either for trait or inherent impls.
     pub fn evaluate_impl(&mut self,
                          impl_def_id: ast::DefId,
-                         obligation: &Obligation<'tcx>)
+                         obligation: &TraitObligation<'tcx>)
                          -> bool
     {
         debug!("evaluate_impl(impl_def_id={}, obligation={})",
@@ -423,7 +431,7 @@ pub fn evaluate_impl(&mut self,
     // candidates. See `doc.rs` and the `Candidate` type for more details.
 
     fn candidate_from_obligation<'o>(&mut self,
-                                     stack: &ObligationStack<'o, 'tcx>)
+                                     stack: &TraitObligationStack<'o, 'tcx>)
                                      -> SelectionResult<'tcx, Candidate<'tcx>>
     {
         // Watch out for overflow. This intentionally bypasses (and does
@@ -466,7 +474,7 @@ fn candidate_from_obligation<'o>(&mut self,
     }
 
     fn candidate_from_obligation_no_cache<'o>(&mut self,
-                                              stack: &ObligationStack<'o, 'tcx>)
+                                              stack: &TraitObligationStack<'o, 'tcx>)
                                               -> SelectionResult<'tcx, Candidate<'tcx>>
     {
         if ty::type_is_error(stack.obligation.self_ty()) {
@@ -595,8 +603,7 @@ fn pick_candidate_cache(&self,
         // common case, then we can use the global environment.
         // See the discussion in doc.rs for more details.
         if
-            !self.param_env.caller_obligations.is_empty()
-            &&
+            !self.param_env.caller_bounds.is_empty() &&
             cache_skol_trait_ref.input_types().iter().any(
                 |&t| ty::type_has_ty_infer(t))
         {
@@ -626,12 +633,12 @@ fn insert_candidate_cache(&mut self,
     }
 
     fn assemble_candidates<'o>(&mut self,
-                               stack: &ObligationStack<'o, 'tcx>)
+                               stack: &TraitObligationStack<'o, 'tcx>)
                                -> Result<CandidateSet<'tcx>, SelectionError<'tcx>>
     {
         // Check for overflow.
 
-        let ObligationStack { obligation, .. } = *stack;
+        let TraitObligationStack { obligation, .. } = *stack;
 
         let mut candidates = CandidateSet {
             vec: Vec::new(),
@@ -682,7 +689,7 @@ fn assemble_candidates<'o>(&mut self,
     ///
     /// Never affects inference environment.
     fn assemble_candidates_from_caller_bounds(&mut self,
-                                              obligation: &Obligation<'tcx>,
+                                              obligation: &TraitObligation<'tcx>,
                                               candidates: &mut CandidateSet<'tcx>)
                                               -> Result<(),SelectionError<'tcx>>
     {
@@ -690,8 +697,8 @@ fn assemble_candidates_from_caller_bounds(&mut self,
                obligation.repr(self.tcx()));
 
         let caller_trait_refs: Vec<Rc<ty::TraitRef>> =
-            self.param_env.caller_obligations.iter()
-            .map(|o| o.trait_ref.clone())
+            self.param_env.caller_bounds.predicates.iter()
+            .filter_map(|o| o.to_trait())
             .collect();
 
         let all_bounds =
@@ -720,7 +727,7 @@ fn assemble_candidates_from_caller_bounds(&mut self,
     /// parameters and hence do not affect whether this trait is a match or not. They will be
     /// unified during the confirmation step.
     fn assemble_unboxed_closure_candidates(&mut self,
-                                           obligation: &Obligation<'tcx>,
+                                           obligation: &TraitObligation<'tcx>,
                                            candidates: &mut CandidateSet<'tcx>)
                                            -> Result<(),SelectionError<'tcx>>
     {
@@ -739,8 +746,9 @@ fn assemble_unboxed_closure_candidates(&mut self,
             _ => { return Ok(()); }
         };
 
-        debug!("assemble_unboxed_candidates: self_ty={} obligation={}",
+        debug!("assemble_unboxed_candidates: self_ty={} kind={} obligation={}",
                self_ty.repr(self.tcx()),
+               kind,
                obligation.repr(self.tcx()));
 
         let closure_kind = match self.typer.unboxed_closures().borrow().get(&closure_def_id) {
@@ -753,6 +761,8 @@ fn assemble_unboxed_closure_candidates(&mut self,
             }
         };
 
+        debug!("closure_kind = {}", closure_kind);
+
         if closure_kind == kind {
             candidates.vec.push(UnboxedClosureCandidate(closure_def_id, substs.clone()));
         }
@@ -762,7 +772,7 @@ fn assemble_unboxed_closure_candidates(&mut self,
 
     /// Implement one of the `Fn()` family for a fn pointer.
     fn assemble_fn_pointer_candidates(&mut self,
-                                      obligation: &Obligation<'tcx>,
+                                      obligation: &TraitObligation<'tcx>,
                                       candidates: &mut CandidateSet<'tcx>)
                                       -> Result<(),SelectionError<'tcx>>
     {
@@ -781,7 +791,7 @@ fn assemble_fn_pointer_candidates(&mut self,
 
             // provide an impl, but only for suitable `fn` pointers
             ty::ty_bare_fn(ty::BareFnTy {
-                fn_style: ast::NormalFn,
+                unsafety: ast::Unsafety::Normal,
                 abi: abi::Rust,
                 sig: ty::FnSig {
                     inputs: _,
@@ -800,7 +810,7 @@ fn assemble_fn_pointer_candidates(&mut self,
 
     /// Search for impls that might apply to `obligation`.
     fn assemble_candidates_from_impls(&mut self,
-                                      obligation: &Obligation<'tcx>,
+                                      obligation: &TraitObligation<'tcx>,
                                       candidates: &mut CandidateSet<'tcx>)
                                       -> Result<(), SelectionError<'tcx>>
     {
@@ -831,28 +841,38 @@ fn assemble_candidates_from_impls(&mut self,
     /// obligations are met. Returns true if `candidate` remains viable after this further
     /// scrutiny.
     fn winnow_candidate<'o>(&mut self,
-                            stack: &ObligationStack<'o, 'tcx>,
+                            stack: &TraitObligationStack<'o, 'tcx>,
                             candidate: &Candidate<'tcx>)
                             -> EvaluationResult<'tcx>
     {
-        debug!("winnow_candidate: candidate={}", candidate.repr(self.tcx()));
-        self.infcx.probe(|| {
+        /*!
+         * Further evaluate `candidate` to decide whether all type parameters match
+         * and whether nested obligations are met. Returns true if `candidate` remains
+         * viable after this further scrutiny.
+         */
+
+        debug!("winnow_candidate: depth={} candidate={}",
+               stack.obligation.recursion_depth, candidate.repr(self.tcx()));
+        let result = self.infcx.probe(|| {
             let candidate = (*candidate).clone();
             match self.confirm_candidate(stack.obligation, candidate) {
                 Ok(selection) => self.winnow_selection(Some(stack), selection),
                 Err(error) => EvaluatedToErr(error),
             }
-        })
+        });
+        debug!("winnow_candidate depth={} result={}",
+               stack.obligation.recursion_depth, result);
+        result
     }
 
     fn winnow_selection<'o>(&mut self,
-                            stack: Option<&ObligationStack<'o, 'tcx>>,
+                            stack: Option<&TraitObligationStack<'o, 'tcx>>,
                             selection: Selection<'tcx>)
                             -> EvaluationResult<'tcx>
     {
         let mut result = EvaluatedToOk;
         for obligation in selection.iter_nested() {
-            match self.evaluate_obligation_recursively(stack, obligation) {
+            match self.evaluate_predicate_recursively(stack, obligation) {
                 EvaluatedToErr(e) => { return EvaluatedToErr(e); }
                 EvaluatedToAmbig => { result = EvaluatedToAmbig; }
                 EvaluatedToOk => { }
@@ -885,7 +905,7 @@ fn winnow_selection<'o>(&mut self,
     /// essentially harmless.  See issue #18453 for more details of
     /// a case where doing the opposite caused us harm.
     fn candidate_should_be_dropped_in_favor_of<'o>(&mut self,
-                                                   stack: &ObligationStack<'o, 'tcx>,
+                                                   stack: &TraitObligationStack<'o, 'tcx>,
                                                    candidate_i: &Candidate<'tcx>,
                                                    candidate_j: &Candidate<'tcx>)
                                                    -> bool
@@ -928,12 +948,12 @@ fn candidate_should_be_dropped_in_favor_of<'o>(&mut self,
 
     fn assemble_builtin_bound_candidates<'o>(&mut self,
                                              bound: ty::BuiltinBound,
-                                             stack: &ObligationStack<'o, 'tcx>,
+                                             stack: &TraitObligationStack<'o, 'tcx>,
                                              candidates: &mut CandidateSet<'tcx>)
                                              -> Result<(),SelectionError<'tcx>>
     {
-        match self.builtin_bound(bound, stack.obligation.self_ty()) {
-            Ok(If(_)) => {
+        match self.builtin_bound(bound, stack.obligation) {
+            Ok(If(..)) => {
                 debug!("builtin_bound: bound={}",
                        bound.repr(self.tcx()));
                 candidates.vec.push(BuiltinCandidate(bound));
@@ -947,10 +967,10 @@ fn assemble_builtin_bound_candidates<'o>(&mut self,
 
     fn builtin_bound(&mut self,
                      bound: ty::BuiltinBound,
-                     self_ty: Ty<'tcx>)
+                     obligation: &TraitObligation<'tcx>)
                      -> Result<BuiltinBoundConditions<'tcx>,SelectionError<'tcx>>
     {
-        let self_ty = self.infcx.shallow_resolve(self_ty);
+        let self_ty = self.infcx.shallow_resolve(obligation.trait_ref.self_ty());
         return match self_ty.sty {
             ty::ty_infer(ty::IntVar(_)) |
             ty::ty_infer(ty::FloatVar(_)) |
@@ -1023,8 +1043,14 @@ fn builtin_bound(&mut self,
                         match bound {
                             ty::BoundCopy => {
                                 match mutbl {
-                                    ast::MutMutable => Err(Unimplemented),  // &mut T is affine
-                                    ast::MutImmutable => Ok(If(Vec::new())),  // &T is copyable
+                                    ast::MutMutable => {
+                                        // &mut T is affine
+                                        Err(Unimplemented)
+                                    }
+                                    ast::MutImmutable => {
+                                        // &T is copyable, no matter what T is
+                                        Ok(If(Vec::new()))
+                                    }
                                 }
                             }
 
@@ -1083,10 +1109,14 @@ fn builtin_bound(&mut self,
                     ty::BoundCopy => {
                         match mutbl {
                             // &mut T is affine and hence never `Copy`
-                            ast::MutMutable => Err(Unimplemented),
+                            ast::MutMutable => {
+                                Err(Unimplemented)
+                            }
 
                             // &T is always copyable
-                            ast::MutImmutable => Ok(If(Vec::new())),
+                            ast::MutImmutable => {
+                                Ok(If(Vec::new()))
+                            }
                         }
                     }
 
@@ -1122,8 +1152,14 @@ fn builtin_bound(&mut self,
                 match bound {
                     ty::BoundCopy => {
                         match *len {
-                            Some(_) => Ok(If(vec![element_ty])), // [T, ..n] is copy iff T is copy
-                            None => Err(Unimplemented), // [T] is unsized and hence affine
+                            Some(_) => {
+                                // [T, ..n] is copy iff T is copy
+                                Ok(If(vec![element_ty]))
+                            }
+                            None => {
+                                // [T] is unsized and hence affine
+                                Err(Unimplemented)
+                            }
                         }
                     }
 
@@ -1256,7 +1292,7 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>,
                         Some(def_id) == tcx.lang_items.no_send_bound() ||
                         Some(def_id) == tcx.lang_items.managed_bound()
                     {
-                        return Err(Unimplemented);
+                        return Err(Unimplemented)
                     }
                 }
 
@@ -1266,6 +1302,15 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>,
                     // don't supply any form of builtin impl.
                     if !this.tcx().sess.features.borrow().opt_out_copy {
                         return Ok(ParameterBuiltin)
+                    } else {
+                        // Older, backwards compatibility behavior:
+                        if
+                            Some(def_id) == tcx.lang_items.no_copy_bound() ||
+                            Some(def_id) == tcx.lang_items.managed_bound() ||
+                            ty::has_dtor(tcx, def_id)
+                        {
+                            return Err(Unimplemented);
+                        }
                     }
                 }
 
@@ -1274,7 +1319,7 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>,
                         Some(def_id) == tcx.lang_items.no_sync_bound() ||
                         Some(def_id) == tcx.lang_items.managed_bound()
                     {
-                        return Err(Unimplemented);
+                        return Err(Unimplemented)
                     } else if
                         Some(def_id) == tcx.lang_items.unsafe_type()
                     {
@@ -1300,7 +1345,7 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>,
     // type error.  See `doc.rs` for more details.
 
     fn confirm_candidate(&mut self,
-                         obligation: &Obligation<'tcx>,
+                         obligation: &TraitObligation<'tcx>,
                          candidate: Candidate<'tcx>)
                          -> Result<Selection<'tcx>,SelectionError<'tcx>>
     {
@@ -1343,7 +1388,7 @@ fn confirm_candidate(&mut self,
     }
 
     fn confirm_param_candidate(&mut self,
-                               obligation: &Obligation<'tcx>,
+                               obligation: &TraitObligation<'tcx>,
                                param: VtableParamData<'tcx>)
                                -> Result<VtableParamData<'tcx>,
                                          SelectionError<'tcx>>
@@ -1359,15 +1404,15 @@ fn confirm_param_candidate(&mut self,
     }
 
     fn confirm_builtin_candidate(&mut self,
-                                 obligation: &Obligation<'tcx>,
+                                 obligation: &TraitObligation<'tcx>,
                                  bound: ty::BuiltinBound)
-                                 -> Result<VtableBuiltinData<Obligation<'tcx>>,
+                                 -> Result<VtableBuiltinData<PredicateObligation<'tcx>>,
                                            SelectionError<'tcx>>
     {
         debug!("confirm_builtin_candidate({})",
                obligation.repr(self.tcx()));
 
-        match try!(self.builtin_bound(bound, obligation.self_ty())) {
+        match try!(self.builtin_bound(bound, obligation)) {
             If(nested) => Ok(self.vtable_builtin_data(obligation, bound, nested)),
             AmbiguousBuiltin | ParameterBuiltin => {
                 self.tcx().sess.span_bug(
@@ -1379,32 +1424,47 @@ fn confirm_builtin_candidate(&mut self,
     }
 
     fn vtable_builtin_data(&mut self,
-                           obligation: &Obligation<'tcx>,
+                           obligation: &TraitObligation<'tcx>,
                            bound: ty::BuiltinBound,
                            nested: Vec<Ty<'tcx>>)
-                           -> VtableBuiltinData<Obligation<'tcx>>
+                           -> VtableBuiltinData<PredicateObligation<'tcx>>
     {
         let obligations = nested.iter().map(|&t| {
-            util::obligation_for_builtin_bound(
+            util::predicate_for_builtin_bound(
                 self.tcx(),
                 obligation.cause,
                 bound,
                 obligation.recursion_depth + 1,
                 t)
         }).collect::<Result<_, _>>();
-        let obligations = match obligations {
+        let mut obligations = match obligations {
             Ok(o) => o,
             Err(ErrorReported) => Vec::new()
         };
+
+        // as a special case, `Send` requires `'static`
+        if bound == ty::BoundSend {
+            obligations.push(Obligation {
+                cause: obligation.cause,
+                recursion_depth: obligation.recursion_depth+1,
+                trait_ref: ty::Predicate::TypeOutlives(obligation.self_ty(),
+                                                       ty::ReStatic)
+            });
+        }
+
         let obligations = VecPerParamSpace::new(obligations, Vec::new(),
                                                 Vec::new(), Vec::new());
+
+        debug!("vtable_builtin_data: obligations={}",
+               obligations.repr(self.tcx()));
+
         VtableBuiltinData { nested: obligations }
     }
 
     fn confirm_impl_candidate(&mut self,
-                              obligation: &Obligation<'tcx>,
+                              obligation: &TraitObligation<'tcx>,
                               impl_def_id: ast::DefId)
-                              -> Result<VtableImplData<'tcx, Obligation<'tcx>>,
+                              -> Result<VtableImplData<'tcx, PredicateObligation<'tcx>>,
                                         SelectionError<'tcx>>
     {
         debug!("confirm_impl_candidate({},{})",
@@ -1414,6 +1474,7 @@ fn confirm_impl_candidate(&mut self,
         // First, create the substitutions by matching the impl again,
         // this time not in a probe.
         let substs = self.rematch_impl(impl_def_id, obligation);
+        debug!("confirm_impl_candidate substs={}", substs);
         Ok(self.vtable_impl(impl_def_id, substs, obligation.cause, obligation.recursion_depth + 1))
     }
 
@@ -1422,20 +1483,20 @@ fn vtable_impl(&mut self,
                    substs: Substs<'tcx>,
                    cause: ObligationCause<'tcx>,
                    recursion_depth: uint)
-                   -> VtableImplData<'tcx, Obligation<'tcx>>
+                   -> VtableImplData<'tcx, PredicateObligation<'tcx>>
     {
-        let impl_obligations =
-            self.impl_obligations(cause,
-                                  recursion_depth,
-                                  impl_def_id,
-                                  &substs);
+        let impl_predicates =
+            self.impl_predicates(cause,
+                                 recursion_depth,
+                                 impl_def_id,
+                                 &substs);
         VtableImplData { impl_def_id: impl_def_id,
                          substs: substs,
-                         nested: impl_obligations }
+                         nested: impl_predicates }
     }
 
     fn confirm_fn_pointer_candidate(&mut self,
-                                    obligation: &Obligation<'tcx>)
+                                    obligation: &TraitObligation<'tcx>)
                                     -> Result<ty::Ty<'tcx>,SelectionError<'tcx>>
     {
         debug!("confirm_fn_pointer_candidate({})",
@@ -1444,7 +1505,7 @@ fn confirm_fn_pointer_candidate(&mut self,
         let self_ty = self.infcx.shallow_resolve(obligation.self_ty());
         let sig = match self_ty.sty {
             ty::ty_bare_fn(ty::BareFnTy {
-                fn_style: ast::NormalFn,
+                unsafety: ast::Unsafety::Normal,
                 abi: abi::Rust,
                 ref sig
             }) => {
@@ -1480,7 +1541,7 @@ fn confirm_fn_pointer_candidate(&mut self,
     }
 
     fn confirm_unboxed_closure_candidate(&mut self,
-                                         obligation: &Obligation<'tcx>,
+                                         obligation: &TraitObligation<'tcx>,
                                          closure_def_id: ast::DefId,
                                          substs: &Substs<'tcx>)
                                          -> Result<(),SelectionError<'tcx>>
@@ -1514,6 +1575,10 @@ fn confirm_unboxed_closure_candidate(&mut self,
             substs: substs,
         });
 
+        debug!("confirm_unboxed_closure_candidate(closure_def_id={}, trait_ref={})",
+               closure_def_id.repr(self.tcx()),
+               trait_ref.repr(self.tcx()));
+
         self.confirm(obligation.cause,
                      obligation.trait_ref.clone(),
                      trait_ref)
@@ -1531,7 +1596,7 @@ fn confirm_unboxed_closure_candidate(&mut self,
 
     fn rematch_impl(&mut self,
                     impl_def_id: ast::DefId,
-                    obligation: &Obligation<'tcx>)
+                    obligation: &TraitObligation<'tcx>)
                     -> Substs<'tcx>
     {
         match self.match_impl(impl_def_id, obligation) {
@@ -1550,7 +1615,7 @@ fn rematch_impl(&mut self,
 
     fn match_impl(&mut self,
                   impl_def_id: ast::DefId,
-                  obligation: &Obligation<'tcx>)
+                  obligation: &TraitObligation<'tcx>)
                   -> Result<Substs<'tcx>, ()>
     {
         let impl_trait_ref = ty::impl_trait_ref(self.tcx(),
@@ -1577,7 +1642,7 @@ fn match_impl(&mut self,
     }
 
     fn fast_reject_trait_refs(&mut self,
-                              obligation: &Obligation,
+                              obligation: &TraitObligation,
                               impl_trait_ref: &ty::TraitRef)
                               -> bool
     {
@@ -1600,7 +1665,7 @@ fn fast_reject_trait_refs(&mut self,
     }
 
     fn match_trait_refs(&mut self,
-                        obligation: &Obligation<'tcx>,
+                        obligation: &TraitObligation<'tcx>,
                         trait_ref: Rc<ty::TraitRef<'tcx>>)
                         -> Result<(),()>
     {
@@ -1752,9 +1817,9 @@ fn confirm(&mut self,
         match self.infcx.sub_trait_refs(false,
                                         origin,
                                         expected_trait_ref.clone(),
-                                        obligation_trait_ref) {
+                                        obligation_trait_ref.clone()) {
             Ok(()) => Ok(()),
-            Err(e) => Err(OutputTypeParameterMismatch(expected_trait_ref, e))
+            Err(e) => Err(OutputTypeParameterMismatch(expected_trait_ref, obligation_trait_ref, e))
         }
     }
 
@@ -1762,13 +1827,13 @@ fn confirm(&mut self,
     // Miscellany
 
     fn push_stack<'o,'s:'o>(&mut self,
-                            previous_stack: Option<&'s ObligationStack<'s, 'tcx>>,
-                            obligation: &'o Obligation<'tcx>)
-                            -> ObligationStack<'o, 'tcx>
+                            previous_stack: Option<&'s TraitObligationStack<'s, 'tcx>>,
+                            obligation: &'o TraitObligation<'tcx>)
+                            -> TraitObligationStack<'o, 'tcx>
     {
         let skol_trait_ref = obligation.trait_ref.fold_with(&mut self.skolemizer);
 
-        ObligationStack {
+        TraitObligationStack {
             obligation: obligation,
             skol_trait_ref: skol_trait_ref,
             previous: previous_stack.map(|p| p), // FIXME variance
@@ -1785,17 +1850,16 @@ fn all_impls(&self, trait_def_id: ast::DefId) -> Vec<ast::DefId> {
         }
     }
 
-    fn impl_obligations(&self,
-                        cause: ObligationCause<'tcx>,
-                        recursion_depth: uint,
-                        impl_def_id: ast::DefId,
-                        impl_substs: &Substs<'tcx>)
-                        -> VecPerParamSpace<Obligation<'tcx>>
+    fn impl_predicates(&self,
+                       cause: ObligationCause<'tcx>,
+                       recursion_depth: uint,
+                       impl_def_id: ast::DefId,
+                       impl_substs: &Substs<'tcx>)
+                       -> VecPerParamSpace<PredicateObligation<'tcx>>
     {
         let impl_generics = ty::lookup_item_type(self.tcx(), impl_def_id).generics;
         let bounds = impl_generics.to_bounds(self.tcx(), impl_substs);
-        util::obligations_for_generics(self.tcx(), cause, recursion_depth,
-                                       &bounds, &impl_substs.types)
+        util::predicates_for_generics(self.tcx(), cause, recursion_depth, &bounds)
     }
 
     fn fn_family_trait_kind(&self,
@@ -1840,14 +1904,16 @@ pub fn new() -> SelectionCache<'tcx> {
     }
 }
 
-impl<'o, 'tcx> ObligationStack<'o, 'tcx> {
-    fn iter(&self) -> Option<&ObligationStack<'o, 'tcx>> {
+impl<'o, 'tcx> TraitObligationStack<'o, 'tcx> {
+    fn iter(&self) -> Option<&TraitObligationStack<'o, 'tcx>> {
         Some(self)
     }
 }
 
-impl<'o, 'tcx> Iterator<&'o ObligationStack<'o, 'tcx>> for Option<&'o ObligationStack<'o, 'tcx>> {
-    fn next(&mut self) -> Option<&'o ObligationStack<'o, 'tcx>> {
+impl<'o, 'tcx> Iterator<&'o TraitObligationStack<'o,'tcx>>
+           for Option<&'o TraitObligationStack<'o, 'tcx>>
+{
+    fn next(&mut self) -> Option<&'o TraitObligationStack<'o, 'tcx>> {
         match *self {
             Some(o) => {
                 *self = o.previous;
@@ -1860,9 +1926,9 @@ fn next(&mut self) -> Option<&'o ObligationStack<'o, 'tcx>> {
     }
 }
 
-impl<'o, 'tcx> Repr<'tcx> for ObligationStack<'o, 'tcx> {
+impl<'o, 'tcx> Repr<'tcx> for TraitObligationStack<'o, 'tcx> {
     fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("ObligationStack({})",
+        format!("TraitObligationStack({})",
                 self.obligation.repr(tcx))
     }
 }
index 1b7998a92638c2c111ba06052752933ecb947921..d8956246d326fd41e989bf3c9dafbc8c6b8283ee 100644 (file)
@@ -9,8 +9,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use middle::subst;
-use middle::subst::{ParamSpace, Substs, VecPerParamSpace};
+use middle::subst::{Subst, Substs, VecPerParamSpace};
 use middle::infer::InferCtxt;
 use middle::ty::{mod, Ty};
 use std::collections::HashSet;
 use util::common::ErrorReported;
 use util::ppaux::Repr;
 
-use super::{Obligation, ObligationCause, VtableImpl,
-            VtableParam, VtableParamData, VtableImplData};
+use super::{Obligation, ObligationCause, PredicateObligation,
+            VtableImpl, VtableParam, VtableParamData, VtableImplData};
 
 ///////////////////////////////////////////////////////////////////////////
-// Supertrait iterator
+// `Elaboration` iterator
+///////////////////////////////////////////////////////////////////////////
 
-pub struct Supertraits<'cx, 'tcx:'cx> {
+/// "Elaboration" is the process of identifying all the predicates that
+/// are implied by a source predicate. Currently this basically means
+/// walking the "supertraits" and other similar assumptions. For
+/// example, if we know that `T : Ord`, the elaborator would deduce
+/// that `T : PartialOrd` holds as well. Similarly, if we have `trait
+/// Foo : 'static`, and we know that `T : Foo`, then we know that `T :
+/// 'static`.
+pub struct Elaborator<'cx, 'tcx:'cx> {
     tcx: &'cx ty::ctxt<'tcx>,
-    stack: Vec<SupertraitEntry<'tcx>>,
-    visited: HashSet<Rc<ty::TraitRef<'tcx>>>,
+    stack: Vec<StackEntry<'tcx>>,
+    visited: HashSet<ty::Predicate<'tcx>>,
 }
 
-struct SupertraitEntry<'tcx> {
+struct StackEntry<'tcx> {
     position: uint,
-    supertraits: Vec<Rc<ty::TraitRef<'tcx>>>,
+    predicates: Vec<ty::Predicate<'tcx>>,
 }
 
-pub fn supertraits<'cx, 'tcx>(tcx: &'cx ty::ctxt<'tcx>,
-                              trait_ref: Rc<ty::TraitRef<'tcx>>)
-                              -> Supertraits<'cx, 'tcx>
+pub fn elaborate_trait_ref<'cx, 'tcx>(
+    tcx: &'cx ty::ctxt<'tcx>,
+    trait_ref: Rc<ty::TraitRef<'tcx>>)
+    -> Elaborator<'cx, 'tcx>
 {
-    //! Returns an iterator over the trait reference `T` and all of its supertrait references. May
-    //! contain duplicates. In general the ordering is not defined.
-    //!
-    //! Example:
-    //!
-    //! ```
-    //! trait Foo { ... }
-    //! trait Bar : Foo { ... }
-    //! trait Baz : Bar+Foo { ... }
-    //! ```
-    //!
-    //! `supertraits(Baz)` yields `[Baz, Bar, Foo, Foo]` in some order.
-
-    transitive_bounds(tcx, &[trait_ref])
+    elaborate_predicates(tcx, vec![ty::Predicate::Trait(trait_ref)])
 }
 
-pub fn transitive_bounds<'cx, 'tcx>(tcx: &'cx ty::ctxt<'tcx>,
-                                    bounds: &[Rc<ty::TraitRef<'tcx>>])
-                                    -> Supertraits<'cx, 'tcx>
+pub fn elaborate_trait_refs<'cx, 'tcx>(
+    tcx: &'cx ty::ctxt<'tcx>,
+    trait_refs: &[Rc<ty::TraitRef<'tcx>>])
+    -> Elaborator<'cx, 'tcx>
 {
-    let bounds = Vec::from_fn(bounds.len(), |i| bounds[i].clone());
+    let predicates = trait_refs.iter()
+                               .map(|trait_ref| ty::Predicate::Trait((*trait_ref).clone()))
+                               .collect();
+    elaborate_predicates(tcx, predicates)
+}
 
-    let visited: HashSet<Rc<ty::TraitRef>> =
-        bounds.iter()
-              .map(|b| (*b).clone())
-              .collect();
+pub fn elaborate_predicates<'cx, 'tcx>(
+    tcx: &'cx ty::ctxt<'tcx>,
+    predicates: Vec<ty::Predicate<'tcx>>)
+    -> Elaborator<'cx, 'tcx>
+{
+    let visited: HashSet<ty::Predicate<'tcx>> =
+        predicates.iter()
+                  .map(|b| (*b).clone())
+                  .collect();
 
-    let entry = SupertraitEntry { position: 0, supertraits: bounds };
-    Supertraits { tcx: tcx, stack: vec![entry], visited: visited }
+    let entry = StackEntry { position: 0, predicates: predicates };
+    Elaborator { tcx: tcx, stack: vec![entry], visited: visited }
 }
 
-impl<'cx, 'tcx> Supertraits<'cx, 'tcx> {
-    fn push(&mut self, trait_ref: &ty::TraitRef<'tcx>) {
-        let ty::ParamBounds { builtin_bounds, mut trait_bounds, .. } =
-            ty::bounds_for_trait_ref(self.tcx, trait_ref);
-        for builtin_bound in builtin_bounds.iter() {
-            let bound_trait_ref = trait_ref_for_builtin_bound(self.tcx,
-                                                              builtin_bound,
-                                                              trait_ref.self_ty());
-            bound_trait_ref.map(|trait_ref| trait_bounds.push(trait_ref));
+impl<'cx, 'tcx> Elaborator<'cx, 'tcx> {
+    fn push(&mut self, predicate: &ty::Predicate<'tcx>) {
+        match *predicate {
+            ty::Predicate::Trait(ref trait_ref) => {
+                let mut predicates =
+                    ty::predicates_for_trait_ref(self.tcx, &**trait_ref);
+
+                // Only keep those bounds that we haven't already
+                // seen.  This is necessary to prevent infinite
+                // recursion in some cases.  One common case is when
+                // people define `trait Sized { }` rather than `trait
+                // Sized for Sized? { }`.
+                predicates.retain(|r| self.visited.insert((*r).clone()));
+
+                self.stack.push(StackEntry { position: 0,
+                                             predicates: predicates });
+            }
+            ty::Predicate::Equate(..) => {
+            }
+            ty::Predicate::RegionOutlives(..) |
+            ty::Predicate::TypeOutlives(..) => {
+                // Currently, we do not "elaborate" predicates like
+                // `'a : 'b` or `T : 'a`.  We could conceivably do
+                // more here.  For example,
+                //
+                //     &'a int : 'b
+                //
+                // implies that
+                //
+                //     'a : 'b
+                //
+                // and we could get even more if we took WF
+                // constraints into account. For example,
+                //
+                //     &'a &'b int : 'c
+                //
+                // implies that
+                //
+                //     'b : 'a
+                //     'a : 'c
+            }
         }
-
-        // Only keep those bounds that we haven't already seen.  This
-        // is necessary to prevent infinite recursion in some cases.
-        // One common case is when people define `trait Sized { }`
-        // rather than `trait Sized for Sized? { }`.
-        trait_bounds.retain(|r| self.visited.insert((*r).clone()));
-
-        let entry = SupertraitEntry { position: 0, supertraits: trait_bounds };
-        self.stack.push(entry);
-    }
-
-    /// Returns the path taken through the trait supertraits to reach the current point.
-    pub fn indices(&self) -> Vec<uint> {
-        self.stack.iter().map(|e| e.position).collect()
     }
 }
 
-impl<'cx, 'tcx> Iterator<Rc<ty::TraitRef<'tcx>>> for Supertraits<'cx, 'tcx> {
-    fn next(&mut self) -> Option<Rc<ty::TraitRef<'tcx>>> {
+impl<'cx, 'tcx> Iterator<ty::Predicate<'tcx>> for Elaborator<'cx, 'tcx> {
+    fn next(&mut self) -> Option<ty::Predicate<'tcx>> {
         loop {
             // Extract next item from top-most stack frame, if any.
-            let next_trait = match self.stack.last_mut() {
+            let next_predicate = match self.stack.last_mut() {
                 None => {
                     // No more stack frames. Done.
                     return None;
                 }
                 Some(entry) => {
                     let p = entry.position;
-                    if p < entry.supertraits.len() {
-                        // Still more supertraits left in the top stack frame.
+                    if p < entry.predicates.len() {
+                        // Still more predicates left in the top stack frame.
                         entry.position += 1;
 
-                        let next_trait = entry.supertraits[p].clone();
-                        Some(next_trait)
+                        let next_predicate =
+                            entry.predicates[p].clone();
+
+                        Some(next_predicate)
                     } else {
                         None
                     }
                 }
             };
 
-            match next_trait {
-                Some(next_trait) => {
-                    self.push(&*next_trait);
-                    return Some(next_trait);
+            match next_predicate {
+                Some(next_predicate) => {
+                    self.push(&next_predicate);
+                    return Some(next_predicate);
                 }
 
                 None => {
@@ -138,8 +163,57 @@ fn next(&mut self) -> Option<Rc<ty::TraitRef<'tcx>>> {
     }
 }
 
+///////////////////////////////////////////////////////////////////////////
+// Supertrait iterator
+///////////////////////////////////////////////////////////////////////////
+
+/// A filter around the `Elaborator` that just yields up supertrait references,
+/// not other kinds of predicates.
+pub struct Supertraits<'cx, 'tcx:'cx> {
+    elaborator: Elaborator<'cx, 'tcx>,
+}
+
+pub fn supertraits<'cx, 'tcx>(tcx: &'cx ty::ctxt<'tcx>,
+                              trait_ref: Rc<ty::TraitRef<'tcx>>)
+                              -> Supertraits<'cx, 'tcx>
+{
+    let elaborator = elaborate_trait_ref(tcx, trait_ref);
+    Supertraits { elaborator: elaborator }
+}
+
+pub fn transitive_bounds<'cx, 'tcx>(tcx: &'cx ty::ctxt<'tcx>,
+                                    bounds: &[Rc<ty::TraitRef<'tcx>>])
+                                    -> Supertraits<'cx, 'tcx>
+{
+    let elaborator = elaborate_trait_refs(tcx, bounds);
+    Supertraits { elaborator: elaborator }
+}
+
+impl<'cx, 'tcx> Iterator<Rc<ty::TraitRef<'tcx>>> for Supertraits<'cx, 'tcx> {
+    fn next(&mut self) -> Option<Rc<ty::TraitRef<'tcx>>> {
+        loop {
+            match self.elaborator.next() {
+                None => {
+                    return None;
+                }
+                Some(ty::Predicate::Trait(trait_ref)) => {
+                    return Some(trait_ref);
+                }
+                Some(ty::Predicate::Equate(..)) |
+                Some(ty::Predicate::RegionOutlives(..)) |
+                Some(ty::Predicate::TypeOutlives(..)) => {
+                }
+            }
+        }
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Other
+///////////////////////////////////////////////////////////////////////////
+
 // determine the `self` type, using fresh variables for all variables
-// declared on the impl declaration e.g., `impl<A,B> for ~[(A,B)]`
+// declared on the impl declaration e.g., `impl<A,B> for Box<[(A,B)]>`
 // would return ($0, $1) where $0 and $1 are freshly instantiated type
 // variables.
 pub fn fresh_substs_for_impl<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
@@ -149,7 +223,18 @@ pub fn fresh_substs_for_impl<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
 {
     let tcx = infcx.tcx;
     let impl_generics = ty::lookup_item_type(tcx, impl_def_id).generics;
-    infcx.fresh_substs_for_generics(span, &impl_generics)
+    let input_substs = infcx.fresh_substs_for_generics(span, &impl_generics);
+
+    // Add substs for the associated types bound in the impl.
+    let ref items = tcx.impl_items.borrow()[impl_def_id];
+    let mut assoc_tys = Vec::new();
+    for item in items.iter() {
+        if let &ty::ImplOrTraitItemId::TypeTraitItemId(id) = item {
+            assoc_tys.push(tcx.tcache.borrow()[id].ty.subst(tcx, &input_substs));
+        }
+    }
+
+    input_substs.with_assoc_tys(assoc_tys)
 }
 
 impl<'tcx, N> fmt::Show for VtableImplData<'tcx, N> {
@@ -165,113 +250,67 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 /// See `super::obligations_for_generics`
-pub fn obligations_for_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                      cause: ObligationCause<'tcx>,
-                                      recursion_depth: uint,
-                                      generic_bounds: &ty::GenericBounds<'tcx>,
-                                      type_substs: &VecPerParamSpace<Ty<'tcx>>)
-                                      -> VecPerParamSpace<Obligation<'tcx>>
+pub fn predicates_for_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
+                                     cause: ObligationCause<'tcx>,
+                                     recursion_depth: uint,
+                                     generic_bounds: &ty::GenericBounds<'tcx>)
+                                     -> VecPerParamSpace<PredicateObligation<'tcx>>
 {
-
-    debug!("obligations_for_generics(generic_bounds={}, type_substs={})",
-           generic_bounds.repr(tcx), type_substs.repr(tcx));
-
-    let mut obligations = VecPerParamSpace::empty();
-
-    for (space, index, bounds) in generic_bounds.types.iter_enumerated() {
-        push_obligations_for_param_bounds(tcx,
-                                          cause,
-                                          recursion_depth,
-                                          space,
-                                          index,
-                                          bounds,
-                                          type_substs,
-                                          &mut obligations);
-    }
-
-    debug!("obligations() ==> {}", obligations.repr(tcx));
-
-    return obligations;
-}
-
-fn push_obligations_for_param_bounds<'tcx>(
-    tcx: &ty::ctxt<'tcx>,
-    cause: ObligationCause<'tcx>,
-    recursion_depth: uint,
-    space: subst::ParamSpace,
-    index: uint,
-    param_bounds: &ty::ParamBounds<'tcx>,
-    param_type_substs: &VecPerParamSpace<Ty<'tcx>>,
-    obligations: &mut VecPerParamSpace<Obligation<'tcx>>)
-{
-    let param_ty = *param_type_substs.get(space, index);
-    for builtin_bound in param_bounds.builtin_bounds.iter() {
-        let obligation = obligation_for_builtin_bound(tcx,
-                                                      cause,
-                                                      builtin_bound,
-                                                      recursion_depth,
-                                                      param_ty);
-        if let Ok(ob) = obligation {
-            obligations.push(space, ob);
-        }
-    }
-
-    for bound_trait_ref in param_bounds.trait_bounds.iter() {
-        obligations.push(
-            space,
-            Obligation { cause: cause,
-                         recursion_depth: recursion_depth,
-                         trait_ref: (*bound_trait_ref).clone() });
-    }
+    debug!("predicates_for_generics(generic_bounds={})",
+           generic_bounds.repr(tcx));
+
+    generic_bounds.predicates.map(|predicate| {
+        Obligation { cause: cause,
+                     recursion_depth: recursion_depth,
+                     trait_ref: predicate.clone() }
+    })
 }
 
 pub fn trait_ref_for_builtin_bound<'tcx>(
     tcx: &ty::ctxt<'tcx>,
     builtin_bound: ty::BuiltinBound,
     param_ty: Ty<'tcx>)
-    -> Option<Rc<ty::TraitRef<'tcx>>>
+    -> Result<Rc<ty::TraitRef<'tcx>>, ErrorReported>
 {
     match tcx.lang_items.from_builtin_kind(builtin_bound) {
         Ok(def_id) => {
-            Some(Rc::new(ty::TraitRef {
+            Ok(Rc::new(ty::TraitRef {
                 def_id: def_id,
                 substs: Substs::empty().with_self_ty(param_ty)
             }))
         }
         Err(e) => {
             tcx.sess.err(e.as_slice());
-            None
+            Err(ErrorReported)
         }
     }
 }
 
-pub fn obligation_for_builtin_bound<'tcx>(
+pub fn predicate_for_builtin_bound<'tcx>(
     tcx: &ty::ctxt<'tcx>,
     cause: ObligationCause<'tcx>,
     builtin_bound: ty::BuiltinBound,
     recursion_depth: uint,
     param_ty: Ty<'tcx>)
-    -> Result<Obligation<'tcx>, ErrorReported>
+    -> Result<PredicateObligation<'tcx>, ErrorReported>
 {
-    let trait_ref = trait_ref_for_builtin_bound(tcx, builtin_bound, param_ty);
-    match trait_ref {
-        Some(trait_ref) => Ok(Obligation {
-                cause: cause,
-                recursion_depth: recursion_depth,
-                trait_ref: trait_ref
-            }),
-        None => Err(ErrorReported)
-    }
+    let trait_ref = try!(trait_ref_for_builtin_bound(tcx, builtin_bound, param_ty));
+    Ok(Obligation {
+        cause: cause,
+        recursion_depth: recursion_depth,
+        trait_ref: ty::Predicate::Trait(trait_ref),
+    })
 }
 
 /// Starting from a caller obligation `caller_bound` (which has coordinates `space`/`i` in the list
 /// of caller obligations), search through the trait and supertraits to find one where `test(d)` is
 /// true, where `d` is the def-id of the trait/supertrait. If any is found, return `Some(p)` where
 /// `p` is the path to that trait/supertrait. Else `None`.
-pub fn search_trait_and_supertraits_from_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                                     caller_bound: Rc<ty::TraitRef<'tcx>>,
-                                                     test: |ast::DefId| -> bool)
-                                                     -> Option<VtableParamData<'tcx>>
+pub fn search_trait_and_supertraits_from_bound<'tcx, F>(tcx: &ty::ctxt<'tcx>,
+                                                        caller_bound: Rc<ty::TraitRef<'tcx>>,
+                                                        mut test: F)
+                                                        -> Option<VtableParamData<'tcx>> where
+    F: FnMut(ast::DefId) -> bool,
 {
     for bound in transitive_bounds(tcx, &[caller_bound]) {
         if test(bound.def_id) {
@@ -283,7 +322,7 @@ pub fn search_trait_and_supertraits_from_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
     return None;
 }
 
-impl<'tcx> Repr<'tcx> for super::Obligation<'tcx> {
+impl<'tcx,O:Repr<'tcx>> Repr<'tcx> for super::Obligation<'tcx, O> {
     fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
         format!("Obligation(trait_ref={},depth={})",
                 self.trait_ref.repr(tcx),
@@ -347,10 +386,11 @@ fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
             super::Unimplemented =>
                 format!("Unimplemented"),
 
-            super::OutputTypeParameterMismatch(ref t, ref e) =>
-                format!("OutputTypeParameterMismatch({}, {})",
-                        t.repr(tcx),
-                        e.repr(tcx)),
+            super::OutputTypeParameterMismatch(ref a, ref b, ref c) =>
+                format!("OutputTypeParameterMismatch({},{},{})",
+                        a.repr(tcx),
+                        b.repr(tcx),
+                        c.repr(tcx)),
         }
     }
 }
index 4c4b5d07f50ac21892065addc9bbd83954fa2ed4..9e7316a75b982545d3144e40be508abaa00b5019 100644 (file)
@@ -44,6 +44,7 @@
 use session::Session;
 use lint;
 use metadata::csearch;
+use middle;
 use middle::const_eval;
 use middle::def;
 use middle::dependency_format;
 use middle::traits;
 use middle::ty;
 use middle::ty_fold::{mod, TypeFoldable, TypeFolder, HigherRankedFoldable};
-use middle;
 use util::ppaux::{note_and_explain_region, bound_region_ptr_to_string};
 use util::ppaux::{trait_store_to_string, ty_to_string};
 use util::ppaux::{Repr, UserString};
-use util::common::{indenter, memoized};
+use util::common::{indenter, memoized, ErrorReported};
 use util::nodemap::{NodeMap, NodeSet, DefIdMap, DefIdSet};
 use util::nodemap::{FnvHashMap, FnvHashSet};
+
+use arena::TypedArena;
 use std::borrow::BorrowFrom;
 use std::cell::{Cell, RefCell};
 use std::cmp;
 use std::mem;
 use std::ops;
 use std::rc::Rc;
+use std::collections::enum_set::{EnumSet, CLike};
 use std::collections::hash_map::{HashMap, Occupied, Vacant};
-use arena::TypedArena;
 use syntax::abi;
-use syntax::ast::{CrateNum, DefId, FnStyle, Ident, ItemTrait, LOCAL_CRATE};
+use syntax::ast::{CrateNum, DefId, DUMMY_NODE_ID, Ident, ItemTrait, LOCAL_CRATE};
 use syntax::ast::{MutImmutable, MutMutable, Name, NamedField, NodeId};
 use syntax::ast::{Onceness, StmtExpr, StmtSemi, StructField, UnnamedField};
 use syntax::ast::{Visibility};
@@ -87,7 +89,6 @@
 use syntax::codemap::{DUMMY_SP, Span};
 use syntax::parse::token::{mod, InternedString};
 use syntax::{ast, ast_map};
-use std::collections::enum_set::{EnumSet, CLike};
 
 pub type Disr = u64;
 
@@ -800,8 +801,6 @@ pub struct ctxt<'tcx> {
     }
 }
 
-impl Copy for TypeFlags {}
-
 #[deriving(Show)]
 pub struct TyS<'tcx> {
     pub sty: sty<'tcx>,
@@ -907,14 +906,14 @@ pub fn type_escapes_depth(ty: Ty, depth: uint) -> bool {
 
 #[deriving(Clone, PartialEq, Eq, Hash, Show)]
 pub struct BareFnTy<'tcx> {
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub abi: abi::Abi,
     pub sig: FnSig<'tcx>,
 }
 
 #[deriving(Clone, PartialEq, Eq, Hash, Show)]
 pub struct ClosureTy<'tcx> {
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub onceness: ast::Onceness,
     pub store: TraitStore,
     pub bounds: ExistentialBounds,
@@ -1379,7 +1378,7 @@ impl<T:Copy> Copy for expected_found<T> {}
 #[deriving(Clone, Show)]
 pub enum type_err<'tcx> {
     terr_mismatch,
-    terr_fn_style_mismatch(expected_found<FnStyle>),
+    terr_unsafety_mismatch(expected_found<ast::Unsafety>),
     terr_onceness_mismatch(expected_found<Onceness>),
     terr_abi_mismatch(expected_found<abi::Abi>),
     terr_mutability,
@@ -1613,18 +1612,28 @@ pub struct RegionParameterDef {
     pub bounds: Vec<ty::Region>,
 }
 
-/// Information about the type/lifetime parameters associated with an
-/// item or method. Analogous to ast::Generics.
+impl RegionParameterDef {
+    pub fn to_early_bound_region(&self) -> ty::Region {
+        ty::ReEarlyBound(self.def_id.node, self.space, self.index, self.name)
+    }
+}
+
+/// Information about the formal type/lifetime parameters associated
+/// with an item or method. Analogous to ast::Generics.
 #[deriving(Clone, Show)]
 pub struct Generics<'tcx> {
     pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
     pub regions: VecPerParamSpace<RegionParameterDef>,
+    pub predicates: VecPerParamSpace<Predicate<'tcx>>,
 }
 
 impl<'tcx> Generics<'tcx> {
     pub fn empty() -> Generics<'tcx> {
-        Generics { types: VecPerParamSpace::empty(),
-                   regions: VecPerParamSpace::empty() }
+        Generics {
+            types: VecPerParamSpace::empty(),
+            regions: VecPerParamSpace::empty(),
+            predicates: VecPerParamSpace::empty(),
+        }
     }
 
     pub fn has_type_params(&self, space: subst::ParamSpace) -> bool {
@@ -1638,8 +1647,49 @@ pub fn has_region_params(&self, space: subst::ParamSpace) -> bool {
     pub fn to_bounds(&self, tcx: &ty::ctxt<'tcx>, substs: &Substs<'tcx>)
                      -> GenericBounds<'tcx> {
         GenericBounds {
-            types: self.types.map(|d| d.bounds.subst(tcx, substs)),
-            regions: self.regions.map(|d| d.bounds.subst(tcx, substs)),
+            predicates: self.predicates.subst(tcx, substs),
+        }
+    }
+}
+
+#[deriving(Clone, PartialEq, Eq, Hash, Show)]
+pub enum Predicate<'tcx> {
+    /// Corresponds to `where Foo : Bar<A,B,C>`. `Foo` here would be
+    /// the `Self` type of the trait reference and `A`, `B`, and `C`
+    /// would be the parameters in the `TypeSpace`.
+    Trait(Rc<TraitRef<'tcx>>),
+
+    /// where `T1 == T2`.
+    Equate(/* T1 */ Ty<'tcx>, /* T2 */ Ty<'tcx>),
+
+    /// where 'a : 'b
+    RegionOutlives(/* 'a */ Region, /* 'b */ Region),
+
+    /// where T : 'a
+    TypeOutlives(Ty<'tcx>, Region),
+}
+
+impl<'tcx> Predicate<'tcx> {
+    pub fn has_escaping_regions(&self) -> bool {
+        match *self {
+            Predicate::Trait(ref trait_ref) => trait_ref.has_escaping_regions(),
+            Predicate::Equate(a, b) => (ty::type_has_escaping_regions(a) ||
+                                        ty::type_has_escaping_regions(b)),
+            Predicate::RegionOutlives(a, b) => a.escapes_depth(0) || b.escapes_depth(0),
+            Predicate::TypeOutlives(a, b) => ty::type_has_escaping_regions(a) || b.escapes_depth(0),
+        }
+    }
+
+    pub fn to_trait(&self) -> Option<Rc<TraitRef<'tcx>>> {
+        match *self {
+            Predicate::Trait(ref t) => {
+                Some(t.clone())
+            }
+            Predicate::Equate(..) |
+            Predicate::RegionOutlives(..) |
+            Predicate::TypeOutlives(..) => {
+                None
+            }
         }
     }
 }
@@ -1665,19 +1715,20 @@ pub fn to_bounds(&self, tcx: &ty::ctxt<'tcx>, substs: &Substs<'tcx>)
 /// [uint:Bar<int>]]`.
 #[deriving(Clone, Show)]
 pub struct GenericBounds<'tcx> {
-    pub types: VecPerParamSpace<ParamBounds<'tcx>>,
-    pub regions: VecPerParamSpace<Vec<Region>>,
+    pub predicates: VecPerParamSpace<Predicate<'tcx>>,
 }
 
 impl<'tcx> GenericBounds<'tcx> {
     pub fn empty() -> GenericBounds<'tcx> {
-        GenericBounds { types: VecPerParamSpace::empty(),
-                        regions: VecPerParamSpace::empty() }
+        GenericBounds { predicates: VecPerParamSpace::empty() }
     }
 
     pub fn has_escaping_regions(&self) -> bool {
-        self.types.any(|pb| pb.trait_bounds.iter().any(|tr| tr.has_escaping_regions())) ||
-            self.regions.any(|rs| rs.iter().any(|r| r.escapes_depth(0)))
+        self.predicates.any(|p| p.has_escaping_regions())
+    }
+
+    pub fn is_empty(&self) -> bool {
+        self.predicates.is_empty()
     }
 }
 
@@ -1728,9 +1779,6 @@ pub struct ParameterEnvironment<'tcx> {
     /// parameters in the same way, this only has an effect on regions.
     pub free_substs: Substs<'tcx>,
 
-    /// Bounds on the various type parameters
-    pub bounds: VecPerParamSpace<ParamBounds<'tcx>>,
-
     /// Each type parameter has an implicit region bound that
     /// indicates it must outlive at least the function body (the user
     /// may specify stronger requirements). This field indicates the
@@ -1740,10 +1788,7 @@ pub struct ParameterEnvironment<'tcx> {
     /// Obligations that the caller must satisfy. This is basically
     /// the set of bounds on the in-scope type parameters, translated
     /// into Obligations.
-    ///
-    /// Note: This effectively *duplicates* the `bounds` array for
-    /// now.
-    pub caller_obligations: VecPerParamSpace<traits::Obligation<'tcx>>,
+    pub caller_bounds: ty::GenericBounds<'tcx>,
 
     /// Caches the results of trait selection. This cache is used
     /// for things that have to do with the parameters in scope.
@@ -1762,7 +1807,6 @@ pub fn for_item(cx: &ctxt<'tcx>, id: NodeId) -> ParameterEnvironment<'tcx> {
                                 let method_generics = &method_ty.generics;
                                 construct_parameter_environment(
                                     cx,
-                                    method.span,
                                     method_generics,
                                     method.pe_body().id)
                             }
@@ -1797,7 +1841,6 @@ pub fn for_item(cx: &ctxt<'tcx>, id: NodeId) -> ParameterEnvironment<'tcx> {
                                 let method_generics = &method_ty.generics;
                                 construct_parameter_environment(
                                     cx,
-                                    method.span,
                                     method_generics,
                                     method.pe_body().id)
                             }
@@ -1824,7 +1867,6 @@ pub fn for_item(cx: &ctxt<'tcx>, id: NodeId) -> ParameterEnvironment<'tcx> {
                         let fn_pty = ty::lookup_item_type(cx, fn_def_id);
 
                         construct_parameter_environment(cx,
-                                                        item.span,
                                                         &fn_pty.generics,
                                                         body.id)
                     }
@@ -1835,8 +1877,7 @@ pub fn for_item(cx: &ctxt<'tcx>, id: NodeId) -> ParameterEnvironment<'tcx> {
                     ast::ItemStatic(..) => {
                         let def_id = ast_util::local_def(id);
                         let pty = ty::lookup_item_type(cx, def_id);
-                        construct_parameter_environment(cx, item.span,
-                                                        &pty.generics, id)
+                        construct_parameter_environment(cx, &pty.generics, id)
                     }
                     _ => {
                         cx.sess.span_bug(item.span,
@@ -1872,6 +1913,8 @@ pub struct Polytype<'tcx> {
 
 /// As `Polytype` but for a trait ref.
 pub struct TraitDef<'tcx> {
+    pub unsafety: ast::Unsafety,
+
     /// Generic type definitions. Note that `Self` is listed in here
     /// as having a single bound, the trait itself (e.g., in the trait
     /// `Eq`, there is a single bound `Self : Eq`). This is so that
@@ -2311,7 +2354,7 @@ pub fn mk_ctor_fn<'tcx>(cx: &ctxt<'tcx>,
     let input_args = input_tys.iter().map(|ty| *ty).collect();
     mk_bare_fn(cx,
                BareFnTy {
-                   fn_style: ast::NormalFn,
+                   unsafety: ast::Unsafety::Normal,
                    abi: abi::Rust,
                    sig: FnSig {
                     inputs: input_args,
@@ -2377,10 +2420,13 @@ pub fn mk_param_from_def<'tcx>(cx: &ctxt<'tcx>, def: &TypeParameterDef) -> Ty<'t
 
 pub fn mk_open<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { mk_t(cx, ty_open(ty)) }
 
-pub fn walk_ty<'tcx>(ty: Ty<'tcx>, f: |Ty<'tcx>|) {
+pub fn walk_ty<'tcx, F>(ty: Ty<'tcx>, mut f: F) where
+    F: FnMut(Ty<'tcx>),
+{
     maybe_walk_ty(ty, |ty| { f(ty); true });
 }
 
+// FIXME(#19596) unbox `f`
 pub fn maybe_walk_ty<'tcx>(ty: Ty<'tcx>, f: |Ty<'tcx>| -> bool) {
     if !f(ty) {
         return;
@@ -2421,9 +2467,11 @@ pub fn maybe_walk_ty<'tcx>(ty: Ty<'tcx>, f: |Ty<'tcx>| -> bool) {
 }
 
 // Folds types from the bottom up.
-pub fn fold_ty<'tcx>(cx: &ctxt<'tcx>, t0: Ty<'tcx>,
-                     fldop: |Ty<'tcx>| -> Ty<'tcx>)
-                     -> Ty<'tcx> {
+pub fn fold_ty<'tcx, F>(cx: &ctxt<'tcx>, t0: Ty<'tcx>,
+                        fldop: F)
+                        -> Ty<'tcx> where
+    F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
+{
     let mut f = ty_fold::BottomUpFolder {tcx: cx, fldop: fldop};
     f.fold_ty(t0)
 }
@@ -2800,7 +2848,9 @@ pub fn unsafe_pointer(&self) -> TypeContents {
         *self & TC::ReachesAll
     }
 
-    pub fn union<T>(v: &[T], f: |&T| -> TypeContents) -> TypeContents {
+    pub fn union<T, F>(v: &[T], mut f: F) -> TypeContents where
+        F: FnMut(&T) -> TypeContents,
+    {
         v.iter().fold(TC::None, |tc, ty| tc | f(ty))
     }
 
@@ -3119,10 +3169,12 @@ fn kind_bounds_to_contents<'tcx>(cx: &ctxt<'tcx>,
 
         // Iterates over all builtin bounds on the type parameter def, including
         // those inherited from traits with builtin-kind-supertraits.
-        fn each_inherited_builtin_bound<'tcx>(cx: &ctxt<'tcx>,
-                                              bounds: BuiltinBounds,
-                                              traits: &[Rc<TraitRef<'tcx>>],
-                                              f: |BuiltinBound|) {
+        fn each_inherited_builtin_bound<'tcx, F>(cx: &ctxt<'tcx>,
+                                                 bounds: BuiltinBounds,
+                                                 traits: &[Rc<TraitRef<'tcx>>],
+                                                 mut f: F) where
+            F: FnMut(BuiltinBound),
+        {
             for bound in bounds.iter() {
                 f(bound);
             }
@@ -3141,7 +3193,8 @@ fn each_inherited_builtin_bound<'tcx>(cx: &ctxt<'tcx>,
 pub fn type_moves_by_default<'tcx>(cx: &ctxt<'tcx>,
                                    ty: Ty<'tcx>,
                                    param_env: &ParameterEnvironment<'tcx>)
-                                    -> bool {
+                                   -> bool
+{
     if !type_has_params(ty) && !type_has_self(ty) {
         match cx.type_moves_by_default_cache.borrow().get(&ty) {
             None => {}
@@ -3156,20 +3209,26 @@ pub fn type_moves_by_default<'tcx>(cx: &ctxt<'tcx>,
 
     let infcx = infer::new_infer_ctxt(cx);
     let mut fulfill_cx = traits::FulfillmentContext::new();
-    let obligation = traits::obligation_for_builtin_bound(
-        cx,
-        ObligationCause::misc(DUMMY_SP),
-        ty,
-        ty::BoundCopy).unwrap();
-    fulfill_cx.register_obligation(cx, obligation);
-    let result = !fulfill_cx.select_all_or_error(&infcx,
-                                                 param_env,
-                                                 cx).is_ok();
-    cx.type_moves_by_default_cache.borrow_mut().insert(ty, result);
+
+    // we can use dummy values here because we won't report any errors
+    // that result nor will we pay any mind to region obligations that arise
+    // (there shouldn't really be any anyhow)
+    let cause = ObligationCause::misc(DUMMY_SP, DUMMY_NODE_ID);
+
+    fulfill_cx.register_builtin_bound(cx, ty, ty::BoundCopy, cause);
+
+    // Note: we only assuming something is `Copy` if we can
+    // *definitively* show that it implements `Copy`. Otherwise,
+    // assume it is move; linear is always ok.
+    let is_copy = fulfill_cx.select_all_or_error(&infcx, param_env, cx).is_ok();
+    let is_move = !is_copy;
+
     debug!("determined whether {} moves by default: {}",
            ty_to_string(cx, ty),
-           result);
-    result
+           is_move);
+
+    cx.type_moves_by_default_cache.borrow_mut().insert(ty, is_move);
+    is_move
 }
 
 pub fn is_ffi_safe<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> bool {
@@ -3909,14 +3968,15 @@ pub fn local_var_name_str(cx: &ctxt, id: NodeId) -> InternedString {
 }
 
 /// See `expr_ty_adjusted`
-pub fn adjust_ty<'tcx>(cx: &ctxt<'tcx>,
-                       span: Span,
-                       expr_id: ast::NodeId,
-                       unadjusted_ty: Ty<'tcx>,
-                       adjustment: Option<&AutoAdjustment<'tcx>>,
-                       method_type: |MethodCall| -> Option<Ty<'tcx>>)
-                       -> Ty<'tcx> {
-
+pub fn adjust_ty<'tcx, F>(cx: &ctxt<'tcx>,
+                          span: Span,
+                          expr_id: ast::NodeId,
+                          unadjusted_ty: Ty<'tcx>,
+                          adjustment: Option<&AutoAdjustment<'tcx>>,
+                          mut method_type: F)
+                          -> Ty<'tcx> where
+    F: FnMut(MethodCall) -> Option<Ty<'tcx>>,
+{
     if let ty_err = unadjusted_ty.sty {
         return unadjusted_ty;
     }
@@ -3934,7 +3994,7 @@ pub fn adjust_ty<'tcx>(cx: &ctxt<'tcx>,
 
                             ty::mk_closure(
                                 cx,
-                                ty::ClosureTy {fn_style: b.fn_style,
+                                ty::ClosureTy {unsafety: b.unsafety,
                                                onceness: ast::Many,
                                                store: store,
                                                bounds: bounds,
@@ -4176,7 +4236,6 @@ pub fn expr_kind(tcx: &ctxt, expr: &ast::Expr) -> ExprKind {
         ast::ExprIf(..) |
         ast::ExprMatch(..) |
         ast::ExprClosure(..) |
-        ast::ExprProc(..) |
         ast::ExprBlock(..) |
         ast::ExprRepeat(..) |
         ast::ExprVec(..) => {
@@ -4345,7 +4404,7 @@ fn tstore_to_closure(s: &TraitStore) -> String {
     match *err {
         terr_cyclic_ty => "cyclic type of infinite size".to_string(),
         terr_mismatch => "types differ".to_string(),
-        terr_fn_style_mismatch(values) => {
+        terr_unsafety_mismatch(values) => {
             format!("expected {} fn, found {} fn",
                     values.expected.to_string(),
                     values.found.to_string())
@@ -4513,7 +4572,7 @@ pub fn provided_trait_methods<'tcx>(cx: &ctxt<'tcx>, id: ast::DefId)
         match cx.map.find(id.node) {
             Some(ast_map::NodeItem(item)) => {
                 match item.node {
-                    ItemTrait(_, _, _, ref ms) => {
+                    ItemTrait(_, _, _, _, ref ms) => {
                         let (_, p) =
                             ast_util::split_trait_methods(ms.as_slice());
                         p.iter()
@@ -4554,11 +4613,13 @@ pub fn provided_trait_methods<'tcx>(cx: &ctxt<'tcx>, id: ast::DefId)
 /// id is local, it should have been loaded into the map by the `typeck::collect` phase.  If the
 /// def-id is external, then we have to go consult the crate loading code (and cache the result for
 /// the future).
-fn lookup_locally_or_in_crate_store<V:Clone>(
-                                    descr: &str,
-                                    def_id: ast::DefId,
-                                    map: &mut DefIdMap<V>,
-                                    load_external: || -> V) -> V {
+fn lookup_locally_or_in_crate_store<V, F>(descr: &str,
+                                          def_id: ast::DefId,
+                                          map: &mut DefIdMap<V>,
+                                          load_external: F) -> V where
+    V: Clone,
+    F: FnOnce() -> V,
+{
     match map.get(&def_id).cloned() {
         Some(v) => { return v; }
         None => { }
@@ -4678,7 +4739,7 @@ pub fn impl_trait_ref<'tcx>(cx: &ctxt<'tcx>, id: ast::DefId)
             match cx.map.find(id.node) {
                 Some(ast_map::NodeItem(item)) => {
                     match item.node {
-                        ast::ItemImpl(_, ref opt_trait, _, _) => {
+                        ast::ItemImpl(_, _, ref opt_trait, _, _) => {
                             match opt_trait {
                                 &Some(ref t) => {
                                     Some(ty::node_id_to_trait_ref(cx, t.ref_id))
@@ -4866,7 +4927,9 @@ pub fn has_dtor(cx: &ctxt, struct_id: DefId) -> bool {
     cx.destructor_for_type.borrow().contains_key(&struct_id)
 }
 
-pub fn with_path<T>(cx: &ctxt, id: ast::DefId, f: |ast_map::PathElems| -> T) -> T {
+pub fn with_path<T, F>(cx: &ctxt, id: ast::DefId, f: F) -> T where
+    F: FnOnce(ast_map::PathElems) -> T,
+{
     if id.krate == ast::LOCAL_CRATE {
         cx.map.with_path(id.node, f)
     } else {
@@ -4979,11 +5042,11 @@ pub fn lookup_trait_def<'tcx>(cx: &ctxt<'tcx>, did: ast::DefId)
     })
 }
 
-/// Given a reference to a trait, returns the bounds declared on the
-/// trait, with appropriate substitutions applied.
-pub fn bounds_for_trait_ref<'tcx>(tcx: &ctxt<'tcx>,
-                                  trait_ref: &TraitRef<'tcx>)
-                                  -> ty::ParamBounds<'tcx>
+/// Given a reference to a trait, returns the "superbounds" declared
+/// on the trait, with appropriate substitutions applied.
+pub fn predicates_for_trait_ref<'tcx>(tcx: &ctxt<'tcx>,
+                                      trait_ref: &TraitRef<'tcx>)
+                                      -> Vec<ty::Predicate<'tcx>>
 {
     let trait_def = lookup_trait_def(tcx, trait_ref.def_id);
 
@@ -5074,17 +5137,47 @@ pub fn bounds_for_trait_ref<'tcx>(tcx: &ctxt<'tcx>,
     let builtin_bounds =
         trait_def.bounds.builtin_bounds.subst(tcx, &trait_ref.substs);
 
-    ty::ParamBounds {
+    let bounds = ty::ParamBounds {
         trait_bounds: trait_bounds,
         region_bounds: region_bounds,
         builtin_bounds: builtin_bounds,
+    };
+
+    predicates(tcx, trait_ref.self_ty(), &bounds)
+}
+
+pub fn predicates<'tcx>(
+    tcx: &ctxt<'tcx>,
+    param_ty: Ty<'tcx>,
+    bounds: &ParamBounds<'tcx>)
+    -> Vec<Predicate<'tcx>>
+{
+    let mut vec = Vec::new();
+
+    for builtin_bound in bounds.builtin_bounds.iter() {
+        match traits::trait_ref_for_builtin_bound(tcx, builtin_bound, param_ty) {
+            Ok(trait_ref) => { vec.push(Predicate::Trait(trait_ref)); }
+            Err(ErrorReported) => { }
+        }
+    }
+
+    for &region_bound in bounds.region_bounds.iter() {
+        vec.push(Predicate::TypeOutlives(param_ty, region_bound));
+    }
+
+    for bound_trait_ref in bounds.trait_bounds.iter() {
+        vec.push(Predicate::Trait((*bound_trait_ref).clone()));
     }
+
+    vec
 }
 
 /// Iterate over attributes of a definition.
 // (This should really be an iterator, but that would require csearch and
 // decoder to use iterators instead of higher-order functions.)
-pub fn each_attr(tcx: &ctxt, did: DefId, f: |&ast::Attribute| -> bool) -> bool {
+pub fn each_attr<F>(tcx: &ctxt, did: DefId, mut f: F) -> bool where
+    F: FnMut(&ast::Attribute) -> bool,
+{
     if is_local(did) {
         let item = tcx.map.expect_item(did.node);
         item.attrs.iter().all(|attr| f(attr))
@@ -5423,10 +5516,11 @@ pub fn eval_repeat_count(tcx: &ctxt, count_expr: &ast::Expr) -> uint {
 // Here, the supertraits are the transitive closure of the supertrait
 // relation on the supertraits from each bounded trait's constraint
 // list.
-pub fn each_bound_trait_and_supertraits<'tcx>(tcx: &ctxt<'tcx>,
-                                              bounds: &[Rc<TraitRef<'tcx>>],
-                                              f: |Rc<TraitRef<'tcx>>| -> bool)
-                                              -> bool
+pub fn each_bound_trait_and_supertraits<'tcx, F>(tcx: &ctxt<'tcx>,
+                                                 bounds: &[Rc<TraitRef<'tcx>>],
+                                                 mut f: F)
+                                                 -> bool where
+    F: FnMut(Rc<TraitRef<'tcx>>) -> bool,
 {
     for bound_trait_ref in traits::transitive_bounds(tcx, bounds) {
         if !f(bound_trait_ref) {
@@ -5436,56 +5530,62 @@ pub fn each_bound_trait_and_supertraits<'tcx>(tcx: &ctxt<'tcx>,
     return true;
 }
 
+pub fn object_region_bounds<'tcx>(tcx: &ctxt<'tcx>,
+                                  opt_principal: Option<&TraitRef<'tcx>>, // None for boxed closures
+                                  others: BuiltinBounds)
+                                  -> Vec<ty::Region>
+{
+    // Since we don't actually *know* the self type for an object,
+    // this "open(err)" serves as a kind of dummy standin -- basically
+    // a skolemized type.
+    let open_ty = ty::mk_infer(tcx, SkolemizedTy(0));
+
+    let opt_trait_ref = opt_principal.map_or(Vec::new(), |principal| {
+        let substs = principal.substs.with_self_ty(open_ty);
+        vec!(Rc::new(ty::TraitRef::new(principal.def_id, substs)))
+    });
+
+    let param_bounds = ty::ParamBounds {
+        region_bounds: Vec::new(),
+        builtin_bounds: others,
+        trait_bounds: opt_trait_ref,
+    };
+
+    let predicates = ty::predicates(tcx, open_ty, &param_bounds);
+    ty::required_region_bounds(tcx, open_ty, predicates)
+}
+
 /// Given a type which must meet the builtin bounds and trait bounds, returns a set of lifetimes
 /// which the type must outlive.
 ///
 /// Requires that trait definitions have been processed.
 pub fn required_region_bounds<'tcx>(tcx: &ctxt<'tcx>,
-                                    region_bounds: &[ty::Region],
-                                    builtin_bounds: BuiltinBounds,
-                                    trait_bounds: &[Rc<TraitRef<'tcx>>])
+                                    param_ty: Ty<'tcx>,
+                                    predicates: Vec<ty::Predicate<'tcx>>)
                                     -> Vec<ty::Region>
 {
-    let mut all_bounds = Vec::new();
-
-    debug!("required_region_bounds(builtin_bounds={}, trait_bounds={})",
-           builtin_bounds.repr(tcx),
-           trait_bounds.repr(tcx));
-
-    all_bounds.push_all(region_bounds);
-
-    push_region_bounds(&[],
-                       builtin_bounds,
-                       &mut all_bounds);
-
-    debug!("from builtin bounds: all_bounds={}", all_bounds.repr(tcx));
-
-    each_bound_trait_and_supertraits(
-        tcx,
-        trait_bounds,
-        |trait_ref| {
-            let bounds = ty::bounds_for_trait_ref(tcx, &*trait_ref);
-            push_region_bounds(bounds.region_bounds.as_slice(),
-                               bounds.builtin_bounds,
-                               &mut all_bounds);
-            debug!("from {}: bounds={} all_bounds={}",
-                   trait_ref.repr(tcx),
-                   bounds.repr(tcx),
-                   all_bounds.repr(tcx));
-            true
-        });
-
-    return all_bounds;
-
-    fn push_region_bounds(region_bounds: &[ty::Region],
-                          builtin_bounds: ty::BuiltinBounds,
-                          all_bounds: &mut Vec<ty::Region>) {
-        all_bounds.push_all(region_bounds.as_slice());
-
-        if builtin_bounds.contains(&ty::BoundSend) {
-            all_bounds.push(ty::ReStatic);
-        }
-    }
+    debug!("required_region_bounds(param_ty={}, predicates={})",
+           param_ty.repr(tcx),
+           predicates.repr(tcx));
+
+    traits::elaborate_predicates(tcx, predicates)
+        .filter_map(|predicate| {
+            match predicate {
+                ty::Predicate::Trait(..) |
+                ty::Predicate::Equate(..) |
+                ty::Predicate::RegionOutlives(..) => {
+                    None
+                }
+                ty::Predicate::TypeOutlives(t, r) => {
+                    if t == param_ty {
+                        Some(r)
+                    } else {
+                        None
+                    }
+                }
+            }
+        })
+        .collect()
 }
 
 pub fn get_tydesc_ty<'tcx>(tcx: &ctxt<'tcx>) -> Result<Ty<'tcx>, String> {
@@ -5620,7 +5720,7 @@ pub fn trait_id_of_impl(tcx: &ctxt,
     match node {
         ast_map::NodeItem(item) => {
             match item.node {
-                ast::ItemImpl(_, Some(ref trait_ref), _, _) => {
+                ast::ItemImpl(_, _, Some(ref trait_ref), _, _) => {
                     Some(node_id_to_trait_ref(tcx, trait_ref.ref_id).def_id)
                 }
                 _ => None
@@ -5771,12 +5871,12 @@ pub fn hash_crate_independent(tcx: &ctxt, ty: Ty, svh: &Svh) -> u64 {
             }
             ty_bare_fn(ref b) => {
                 byte!(14);
-                hash!(b.fn_style);
+                hash!(b.unsafety);
                 hash!(b.abi);
             }
             ty_closure(ref c) => {
                 byte!(15);
-                hash!(c.fn_style);
+                hash!(c.unsafety);
                 hash!(c.onceness);
                 hash!(c.bounds);
                 match c.store {
@@ -5835,8 +5935,7 @@ pub fn to_string(self) -> &'static str {
 /// are no free type/lifetime parameters in scope.
 pub fn empty_parameter_environment<'tcx>() -> ParameterEnvironment<'tcx> {
     ty::ParameterEnvironment { free_substs: Substs::empty(),
-                               bounds: VecPerParamSpace::empty(),
-                               caller_obligations: VecPerParamSpace::empty(),
+                               caller_bounds: GenericBounds::empty(),
                                implicit_region_bound: ty::ReEmpty,
                                selection_cache: traits::SelectionCache::new(), }
 }
@@ -5844,7 +5943,6 @@ pub fn empty_parameter_environment<'tcx>() -> ParameterEnvironment<'tcx> {
 /// See `ParameterEnvironment` struct def'n for details
 pub fn construct_parameter_environment<'tcx>(
     tcx: &ctxt<'tcx>,
-    span: Span,
     generics: &ty::Generics<'tcx>,
     free_id: ast::NodeId)
     -> ParameterEnvironment<'tcx>
@@ -5881,11 +5979,6 @@ pub fn construct_parameter_environment<'tcx>(
 
     let bounds = generics.to_bounds(tcx, &free_substs);
     let bounds = liberate_late_bound_regions(tcx, free_id_scope, &bind(bounds)).value;
-    let obligations = traits::obligations_for_generics(tcx,
-                                                       traits::ObligationCause::misc(span),
-                                                       &bounds,
-                                                       &free_substs.types);
-    let type_bounds = bounds.types.subst(tcx, &free_substs);
 
     //
     // Compute region bounds. For now, these relations are stored in a
@@ -5893,23 +5986,17 @@ pub fn construct_parameter_environment<'tcx>(
     // crazy about this scheme, but it's convenient, at least.
     //
 
-    for &space in subst::ParamSpace::all().iter() {
-        record_region_bounds(tcx, space, &free_substs, bounds.regions.get_slice(space));
-    }
-
+    record_region_bounds(tcx, &bounds);
 
-    debug!("construct_parameter_environment: free_id={} free_subst={} \
-           obligations={} type_bounds={}",
+    debug!("construct_parameter_environment: free_id={} free_subst={} bounds={}",
            free_id,
            free_substs.repr(tcx),
-           obligations.repr(tcx),
-           type_bounds.repr(tcx));
+           bounds.repr(tcx));
 
     return ty::ParameterEnvironment {
         free_substs: free_substs,
-        bounds: bounds.types,
         implicit_region_bound: ty::ReScope(free_id_scope),
-        caller_obligations: obligations,
+        caller_bounds: bounds,
         selection_cache: traits::SelectionCache::new(),
     };
 
@@ -5938,31 +6025,24 @@ fn push_types_from_defs<'tcx>(tcx: &ty::ctxt<'tcx>,
         }
     }
 
-    fn record_region_bounds<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                  space: subst::ParamSpace,
-                                  free_substs: &Substs<'tcx>,
-                                  bound_sets: &[Vec<ty::Region>]) {
-        for (subst_region, bound_set) in
-            free_substs.regions().get_slice(space).iter().zip(
-                bound_sets.iter())
-        {
-            // For each region parameter 'subst...
-            for bound_region in bound_set.iter() {
-                // Which is declared with a bound like 'subst:'bound...
-                match (subst_region, bound_region) {
-                    (&ty::ReFree(subst_fr), &ty::ReFree(bound_fr)) => {
-                        // Record that 'subst outlives 'bound. Or, put
-                        // another way, 'bound <= 'subst.
-                        tcx.region_maps.relate_free_regions(bound_fr, subst_fr);
-                    },
-                    _ => {
-                        // All named regions are instantiated with free regions.
-                        tcx.sess.bug(
-                            format!("record_region_bounds: \
-                                     non free region: {} / {}",
-                                    subst_region.repr(tcx),
-                                    bound_region.repr(tcx)).as_slice());
-                    }
+    fn record_region_bounds<'tcx>(tcx: &ty::ctxt<'tcx>, bounds: &GenericBounds<'tcx>) {
+        debug!("record_region_bounds(bounds={})", bounds.repr(tcx));
+
+        for predicate in bounds.predicates.iter() {
+            match *predicate {
+                Predicate::Trait(..) | Predicate::Equate(..) | Predicate::TypeOutlives(..) => {
+                    // No region bounds here
+                }
+                Predicate::RegionOutlives(ty::ReFree(fr_a), ty::ReFree(fr_b)) => {
+                    // Record that `'a:'b`. Or, put another way, `'b <= 'a`.
+                    tcx.region_maps.relate_free_regions(fr_b, fr_a);
+                }
+                Predicate::RegionOutlives(r_a, r_b) => {
+                    // All named regions are instantiated with free regions.
+                    tcx.sess.bug(
+                        format!("record_region_bounds: non free region: {} / {}",
+                                r_a.repr(tcx),
+                                r_b.repr(tcx)).as_slice());
                 }
             }
         }
@@ -6128,7 +6208,9 @@ impl Copy for Freevar {}
 
 pub type CaptureModeMap = NodeMap<ast::CaptureClause>;
 
-pub fn with_freevars<T>(tcx: &ty::ctxt, fid: ast::NodeId, f: |&[Freevar]| -> T) -> T {
+pub fn with_freevars<T, F>(tcx: &ty::ctxt, fid: ast::NodeId, f: F) -> T where
+    F: FnOnce(&[Freevar]) -> T,
+{
     match tcx.freevars.borrow().get(&fid) {
         None => f(&[]),
         Some(d) => f(d.as_slice())
@@ -6176,12 +6258,13 @@ pub fn erase_late_bound_regions<'tcx, HR>(
 }
 
 /// Replaces the late-bound-regions in `value` that are bound by `value`.
-pub fn replace_late_bound_regions<'tcx, HR>(
+pub fn replace_late_bound_regions<'tcx, HR, F>(
     tcx: &ty::ctxt<'tcx>,
     value: &HR,
-    mapf: |BoundRegion, DebruijnIndex| -> ty::Region)
-    -> (HR, FnvHashMap<ty::BoundRegion,ty::Region>)
-    where HR : HigherRankedFoldable<'tcx>
+    mut mapf: F)
+-> (HR, FnvHashMap<ty::BoundRegion, ty::Region>) where
+    HR : HigherRankedFoldable<'tcx>,
+    F: FnMut(BoundRegion, DebruijnIndex) -> ty::Region,
 {
     debug!("replace_late_bound_regions({})", value.repr(tcx));
 
@@ -6281,6 +6364,17 @@ fn repr(&self, tcx: &ctxt<'tcx>) -> String {
     }
 }
 
+impl<'tcx> Repr<'tcx> for ty::Predicate<'tcx> {
+    fn repr(&self, tcx: &ctxt<'tcx>) -> String {
+        match *self {
+            Predicate::Trait(ref a) => a.repr(tcx),
+            Predicate::Equate(a, b) => format!("Equate({},{})", a.repr(tcx), b.repr(tcx)),
+            Predicate::RegionOutlives(a, b) => format!("Outlives({}:{})", a.repr(tcx), b.repr(tcx)),
+            Predicate::TypeOutlives(a, b) => format!("Outlives({}:{})", a.repr(tcx), b.repr(tcx)),
+        }
+    }
+}
+
 impl<'tcx> Repr<'tcx> for vtable_origin<'tcx> {
     fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
         match *self {
index 77092025349e783c64251b034c23e93c5d3fb34f..5d0c584864dbcdd5415c9cd2539139ed598ccf22 100644 (file)
@@ -137,11 +137,6 @@ fn fold_autoref(&mut self, ar: &ty::AutoRef<'tcx>) -> ty::AutoRef<'tcx> {
     fn fold_item_substs(&mut self, i: ty::ItemSubsts<'tcx>) -> ty::ItemSubsts<'tcx> {
         super_fold_item_substs(self, i)
     }
-
-    fn fold_obligation(&mut self, o: &traits::Obligation<'tcx>)
-                       -> traits::Obligation<'tcx> {
-        super_fold_obligation(self, o)
-    }
 }
 
 ///////////////////////////////////////////////////////////////////////////
@@ -404,6 +399,25 @@ fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::Generics<'tcx> {
         ty::Generics {
             types: self.types.fold_with(folder),
             regions: self.regions.fold_with(folder),
+            predicates: self.predicates.fold_with(folder),
+        }
+    }
+}
+
+impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
+    fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::Predicate<'tcx> {
+        match *self {
+            ty::Predicate::Trait(ref a) =>
+                ty::Predicate::Trait(a.fold_with(folder)),
+            ty::Predicate::Equate(ref a, ref b) =>
+                ty::Predicate::Equate(a.fold_with(folder),
+                                        b.fold_with(folder)),
+            ty::Predicate::RegionOutlives(ref a, ref b) =>
+                ty::Predicate::RegionOutlives(a.fold_with(folder),
+                                                b.fold_with(folder)),
+            ty::Predicate::TypeOutlives(ref a, ref b) =>
+                ty::Predicate::TypeOutlives(a.fold_with(folder),
+                                              b.fold_with(folder)),
         }
     }
 }
@@ -411,8 +425,7 @@ fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::Generics<'tcx> {
 impl<'tcx> TypeFoldable<'tcx> for ty::GenericBounds<'tcx> {
     fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::GenericBounds<'tcx> {
         ty::GenericBounds {
-            types: self.types.fold_with(folder),
-            regions: self.regions.fold_with(folder),
+            predicates: self.predicates.fold_with(folder),
         }
     }
 }
@@ -434,9 +447,15 @@ fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> ty::UnsizeKind<'tcx>
     }
 }
 
-impl<'tcx> TypeFoldable<'tcx> for traits::Obligation<'tcx> {
-    fn fold_with<F:TypeFolder<'tcx>>(&self, folder: &mut F) -> traits::Obligation<'tcx> {
-        folder.fold_obligation(self)
+impl<'tcx,O> TypeFoldable<'tcx> for traits::Obligation<'tcx,O>
+    where O : TypeFoldable<'tcx>
+{
+    fn fold_with<F:TypeFolder<'tcx>>(&self, folder: &mut F) -> traits::Obligation<'tcx, O> {
+        traits::Obligation {
+            cause: self.cause,
+            recursion_depth: self.recursion_depth,
+            trait_ref: self.trait_ref.fold_with(folder),
+        }
     }
 }
 
@@ -544,7 +563,7 @@ pub fn super_fold_bare_fn_ty<'tcx, T: TypeFolder<'tcx>>(this: &mut T,
 {
     ty::BareFnTy { sig: fty.sig.fold_with(this),
                    abi: fty.abi,
-                   fn_style: fty.fn_style }
+                   unsafety: fty.unsafety }
 }
 
 pub fn super_fold_closure_ty<'tcx, T: TypeFolder<'tcx>>(this: &mut T,
@@ -554,7 +573,7 @@ pub fn super_fold_closure_ty<'tcx, T: TypeFolder<'tcx>>(this: &mut T,
     ty::ClosureTy {
         store: fty.store.fold_with(this),
         sig: fty.sig.fold_with(this),
-        fn_style: fty.fn_style,
+        unsafety: fty.unsafety,
         onceness: fty.onceness,
         bounds: fty.bounds.fold_with(this),
         abi: fty.abi,
@@ -687,17 +706,6 @@ pub fn super_fold_item_substs<'tcx, T: TypeFolder<'tcx>>(this: &mut T,
     }
 }
 
-pub fn super_fold_obligation<'tcx, T:TypeFolder<'tcx>>(this: &mut T,
-                                                       obligation: &traits::Obligation<'tcx>)
-                                                       -> traits::Obligation<'tcx>
-{
-    traits::Obligation {
-        cause: obligation.cause,
-        recursion_depth: obligation.recursion_depth,
-        trait_ref: obligation.trait_ref.fold_with(this),
-    }
-}
-
 ///////////////////////////////////////////////////////////////////////////
 // Higher-ranked things
 
@@ -735,12 +743,14 @@ fn fold_contents<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Rc<T> {
 ///////////////////////////////////////////////////////////////////////////
 // Some sample folders
 
-pub struct BottomUpFolder<'a, 'tcx: 'a> {
+pub struct BottomUpFolder<'a, 'tcx: 'a, F> where F: FnMut(Ty<'tcx>) -> Ty<'tcx> {
     pub tcx: &'a ty::ctxt<'tcx>,
-    pub fldop: |Ty<'tcx>|: 'a -> Ty<'tcx>,
+    pub fldop: F,
 }
 
-impl<'a, 'tcx> TypeFolder<'tcx> for BottomUpFolder<'a, 'tcx> {
+impl<'a, 'tcx, F> TypeFolder<'tcx> for BottomUpFolder<'a, 'tcx, F> where
+    F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
+{
     fn tcx<'a>(&'a self) -> &'a ty::ctxt<'tcx> { self.tcx }
 
     fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
@@ -764,15 +774,14 @@ fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
 /// (The distinction between "free" and "bound" is represented by
 /// keeping track of each `FnSig` in the lexical context of the
 /// current position of the fold.)
-pub struct RegionFolder<'a, 'tcx: 'a> {
+pub struct RegionFolder<'a, 'tcx: 'a, F> where F: FnMut(ty::Region, uint) -> ty::Region {
     tcx: &'a ty::ctxt<'tcx>,
     current_depth: uint,
-    fld_r: |ty::Region, uint|: 'a -> ty::Region,
+    fld_r: F,
 }
 
-impl<'a, 'tcx> RegionFolder<'a, 'tcx> {
-    pub fn new(tcx: &'a ty::ctxt<'tcx>, fld_r: |ty::Region, uint|: 'a -> ty::Region)
-               -> RegionFolder<'a, 'tcx> {
+impl<'a, 'tcx, F> RegionFolder<'a, 'tcx, F> where F: FnMut(ty::Region, uint) -> ty::Region {
+    pub fn new(tcx: &'a ty::ctxt<'tcx>, fld_r: F) -> RegionFolder<'a, 'tcx, F> {
         RegionFolder {
             tcx: tcx,
             current_depth: 1,
@@ -781,7 +790,9 @@ pub fn new(tcx: &'a ty::ctxt<'tcx>, fld_r: |ty::Region, uint|: 'a -> ty::Region)
     }
 }
 
-impl<'a, 'tcx> TypeFolder<'tcx> for RegionFolder<'a, 'tcx> {
+impl<'a, 'tcx, F> TypeFolder<'tcx> for RegionFolder<'a, 'tcx, F> where
+    F: FnMut(ty::Region, uint) -> ty::Region,
+{
     fn tcx<'a>(&'a self) -> &'a ty::ctxt<'tcx> { self.tcx }
 
     fn enter_region_binder(&mut self) {
index e4d34e09d330a5cc64bc00e8c6ad4576fdbdcc63..8516ece202c7598edd331e8ef3334879c891177f 100644 (file)
@@ -288,7 +288,9 @@ pub fn build_session_(sopts: config::Options,
 }
 
 // Seems out of place, but it uses session, so I'm putting it here
-pub fn expect<T>(sess: &Session, opt: Option<T>, msg: || -> String) -> T {
+pub fn expect<T, M>(sess: &Session, opt: Option<T>, msg: M) -> T where
+    M: FnOnce() -> String,
+{
     diagnostic::expect(sess.diagnostic(), opt, msg)
 }
 
index 30318cc129cacb2ef1f7f36af510bee471d16873..51e18c80d0584dbd94508d8d5cfdcd5f8e91a184 100644 (file)
@@ -27,7 +27,9 @@
 
 impl Copy for ErrorReported {}
 
-pub fn time<T, U>(do_it: bool, what: &str, u: U, f: |U| -> T) -> T {
+pub fn time<T, U, F>(do_it: bool, what: &str, u: U, f: F) -> T where
+    F: FnOnce(U) -> T,
+{
     thread_local!(static DEPTH: Cell<uint> = Cell::new(0));
     if !do_it { return f(u); }
 
@@ -39,9 +41,13 @@ pub fn time<T, U>(do_it: bool, what: &str, u: U, f: |U| -> T) -> T {
 
     let mut u = Some(u);
     let mut rv = None;
-    let dur = Duration::span(|| {
-        rv = Some(f(u.take().unwrap()))
-    });
+    let dur = {
+        let ref mut rvp = rv;
+
+        Duration::span(move || {
+            *rvp = Some(f(u.take().unwrap()))
+        })
+    };
     let rv = rv.unwrap();
 
     println!("{}time: {}.{:03} \t{}", "  ".repeat(old),
@@ -51,7 +57,10 @@ pub fn time<T, U>(do_it: bool, what: &str, u: U, f: |U| -> T) -> T {
     rv
 }
 
-pub fn indent<R: Show>(op: || -> R) -> R {
+pub fn indent<R, F>(op: F) -> R where
+    R: Show,
+    F: FnOnce() -> R,
+{
     // Use in conjunction with the log post-processor like `src/etc/indenter`
     // to make debug output more readable.
     debug!(">>");
@@ -73,12 +82,12 @@ pub fn indenter() -> Indenter {
     Indenter { _cannot_construct_outside_of_this_module: () }
 }
 
-struct LoopQueryVisitor<'a> {
-    p: |&ast::Expr_|: 'a -> bool,
+struct LoopQueryVisitor<P> where P: FnMut(&ast::Expr_) -> bool {
+    p: P,
     flag: bool,
 }
 
-impl<'a, 'v> Visitor<'v> for LoopQueryVisitor<'a> {
+impl<'v, P> Visitor<'v> for LoopQueryVisitor<P> where P: FnMut(&ast::Expr_) -> bool {
     fn visit_expr(&mut self, e: &ast::Expr) {
         self.flag |= (self.p)(&e.node);
         match e.node {
@@ -92,7 +101,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
 
 // Takes a predicate p, returns true iff p is true for any subexpressions
 // of b -- skipping any inner loops (loop, while, loop_body)
-pub fn loop_query(b: &ast::Block, p: |&ast::Expr_| -> bool) -> bool {
+pub fn loop_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr_) -> bool {
     let mut v = LoopQueryVisitor {
         p: p,
         flag: false,
@@ -101,12 +110,12 @@ pub fn loop_query(b: &ast::Block, p: |&ast::Expr_| -> bool) -> bool {
     return v.flag;
 }
 
-struct BlockQueryVisitor<'a> {
-    p: |&ast::Expr|: 'a -> bool,
+struct BlockQueryVisitor<P> where P: FnMut(&ast::Expr) -> bool {
+    p: P,
     flag: bool,
 }
 
-impl<'a, 'v> Visitor<'v> for BlockQueryVisitor<'a> {
+impl<'v, P> Visitor<'v> for BlockQueryVisitor<P> where P: FnMut(&ast::Expr) -> bool {
     fn visit_expr(&mut self, e: &ast::Expr) {
         self.flag |= (self.p)(e);
         visit::walk_expr(self, e)
@@ -115,7 +124,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
 
 // Takes a predicate p, returns true iff p is true for any subexpressions
 // of b -- skipping any inner loops (loop, while, loop_body)
-pub fn block_query(b: &ast::Block, p: |&ast::Expr| -> bool) -> bool {
+pub fn block_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr) -> bool {
     let mut v = BlockQueryVisitor {
         p: p,
         flag: false,
@@ -194,11 +203,12 @@ pub fn can_reach<S,H:Hasher<S>,T:Eq+Clone+Hash<S>>(
 /// }
 /// ```
 #[inline(always)]
-pub fn memoized<T: Clone + Hash<S> + Eq, U: Clone, S, H: Hasher<S>>(
-    cache: &RefCell<HashMap<T, U, H>>,
-    arg: T,
-    f: |T| -> U
-) -> U {
+pub fn memoized<T, U, S, H, F>(cache: &RefCell<HashMap<T, U, H>>, arg: T, f: F) -> U where
+    T: Clone + Hash<S> + Eq,
+    U: Clone,
+    H: Hasher<S>,
+    F: FnOnce(T) -> U,
+{
     let key = arg.clone();
     let result = cache.borrow().get(&key).map(|result| result.clone());
     match result {
index 3895a1137267433b93468922e8aa041c5d2ee43d..74e312803f31ae03856e09024959d31f1db3d3bc 100644 (file)
@@ -241,7 +241,9 @@ pub fn trait_store_to_string(cx: &ctxt, s: ty::TraitStore) -> String {
     }
 }
 
-pub fn vec_map_to_string<T>(ts: &[T], f: |t: &T| -> String) -> String {
+pub fn vec_map_to_string<T, F>(ts: &[T], f: F) -> String where
+    F: FnMut(&T) -> String,
+{
     let tstrs = ts.iter().map(f).collect::<Vec<String>>();
     format!("[{}]", tstrs.connect(", "))
 }
@@ -257,16 +259,16 @@ pub fn trait_ref_to_string<'tcx>(cx: &ctxt<'tcx>,
 
 pub fn ty_to_string<'tcx>(cx: &ctxt<'tcx>, typ: &ty::TyS<'tcx>) -> String {
     fn bare_fn_to_string<'tcx>(cx: &ctxt<'tcx>,
-                               fn_style: ast::FnStyle,
+                               unsafety: ast::Unsafety,
                                abi: abi::Abi,
                                ident: Option<ast::Ident>,
                                sig: &ty::FnSig<'tcx>)
                                -> String {
         let mut s = String::new();
-        match fn_style {
-            ast::NormalFn => {}
-            _ => {
-                s.push_str(fn_style.to_string().as_slice());
+        match unsafety {
+            ast::Unsafety::Normal => {}
+            ast::Unsafety::Unsafe => {
+                s.push_str(unsafety.to_string().as_slice());
                 s.push(' ');
             }
         };
@@ -300,10 +302,10 @@ fn closure_to_string<'tcx>(cx: &ctxt<'tcx>, cty: &ty::ClosureTy<'tcx>) -> String
             }
         }
 
-        match cty.fn_style {
-            ast::NormalFn => {}
-            _ => {
-                s.push_str(cty.fn_style.to_string().as_slice());
+        match cty.unsafety {
+            ast::Unsafety::Normal => {}
+            ast::Unsafety::Unsafe => {
+                s.push_str(cty.unsafety.to_string().as_slice());
                 s.push(' ');
             }
         };
@@ -412,7 +414,7 @@ fn infer_ty_to_string(cx: &ctxt, ty: ty::InferTy) -> String {
             closure_to_string(cx, &**f)
         }
         ty_bare_fn(ref f) => {
-            bare_fn_to_string(cx, f.fn_style, f.abi, None, &f.sig)
+            bare_fn_to_string(cx, f.unsafety, f.abi, None, &f.sig)
         }
         ty_infer(infer_ty) => infer_ty_to_string(cx, infer_ty),
         ty_err => "[type error]".to_string(),
@@ -447,7 +449,14 @@ fn infer_ty_to_string(cx: &ctxt, ty: ty::InferTy) -> String {
             let unboxed_closures = cx.unboxed_closures.borrow();
             unboxed_closures.get(did).map(|cl| {
                 closure_to_string(cx, &cl.closure_type.subst(cx, substs))
-            }).unwrap_or_else(|| "closure".to_string())
+            }).unwrap_or_else(|| {
+                if did.krate == ast::LOCAL_CRATE {
+                    let span = cx.map.span(did.node);
+                    format!("closure[{}]", span.repr(cx))
+                } else {
+                    format!("closure")
+                }
+            })
         }
         ty_vec(t, sz) => {
             let inner_str = ty_to_string(cx, t);
@@ -914,17 +923,17 @@ fn repr(&self, tcx: &ctxt<'tcx>) -> String {
 
 impl<'tcx> Repr<'tcx> for ty::Generics<'tcx> {
     fn repr(&self, tcx: &ctxt<'tcx>) -> String {
-        format!("Generics(types: {}, regions: {})",
+        format!("Generics(types: {}, regions: {}, predicates: {})",
                 self.types.repr(tcx),
-                self.regions.repr(tcx))
+                self.regions.repr(tcx),
+                self.predicates.repr(tcx))
     }
 }
 
 impl<'tcx> Repr<'tcx> for ty::GenericBounds<'tcx> {
     fn repr(&self, tcx: &ctxt<'tcx>) -> String {
-        format!("GenericBounds(types: {}, regions: {})",
-                self.types.repr(tcx),
-                self.regions.repr(tcx))
+        format!("GenericBounds({})",
+                self.predicates.repr(tcx))
     }
 }
 
@@ -992,8 +1001,8 @@ fn repr(&self, _tcx: &ctxt) -> String {
 
 impl<'tcx> Repr<'tcx> for ty::BareFnTy<'tcx> {
     fn repr(&self, tcx: &ctxt<'tcx>) -> String {
-        format!("BareFnTy {{fn_style: {}, abi: {}, sig: {}}}",
-                self.fn_style,
+        format!("BareFnTy {{unsafety: {}, abi: {}, sig: {}}}",
+                self.unsafety,
                 self.abi.to_string(),
                 self.sig.repr(tcx))
     }
index a88bcafaa64b389aba7a7a9c8a8093994f21e47f..3a4510703166c84a835b983ceaf0746b86c5ee95 100644 (file)
@@ -279,8 +279,9 @@ pub fn build(self) -> Archive<'a> {
         self.archive
     }
 
-    fn add_archive(&mut self, archive: &Path, name: &str,
-                   skip: |&str| -> bool) -> io::IoResult<()> {
+    fn add_archive<F>(&mut self, archive: &Path, name: &str, mut skip: F) -> io::IoResult<()> where
+        F: FnMut(&str) -> bool,
+    {
         let loc = TempDir::new("rsar").unwrap();
 
         // First, extract the contents of the archive to a temporary directory.
index fc98a5cd6b559e1dc87a223eac374d4f6fa5dac7..cb547df7d9cd83a9cc8a710eb586730431d2e899 100644 (file)
@@ -31,6 +31,7 @@
 
 #![allow(unknown_features)]
 #![feature(globs, phase, macro_rules, slicing_syntax)]
+#![feature(unboxed_closures)]
 
 #[phase(plugin, link)]
 extern crate log;
index a90b49ba101fa57c426ed54a63ce92aa2686edc7..1f8549098d949f044c4768d295b5baa3eb5eaeb4 100644 (file)
 use std::io::IoError;
 use syntax::ast;
 
-pub struct RPathConfig<'a> {
+pub struct RPathConfig<F, G> where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     pub used_crates: Vec<(ast::CrateNum, Option<Path>)>,
     pub out_filename: Path,
     pub is_like_osx: bool,
     pub has_rpath: bool,
-    pub get_install_prefix_lib_path: ||:'a -> Path,
-    pub realpath: |&Path|:'a -> Result<Path, IoError>
+    pub get_install_prefix_lib_path: F,
+    pub realpath: G,
 }
 
-pub fn get_rpath_flags(config: RPathConfig) -> Vec<String> {
-
+pub fn get_rpath_flags<F, G>(config: RPathConfig<F, G>) -> Vec<String> where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     // No rpath on windows
     if !config.has_rpath {
         return Vec::new();
@@ -52,8 +57,10 @@ fn rpaths_to_flags(rpaths: &[String]) -> Vec<String> {
     return ret;
 }
 
-fn get_rpaths(mut config: RPathConfig,
-              libs: &[Path]) -> Vec<String> {
+fn get_rpaths<F, G>(mut config: RPathConfig<F, G>, libs: &[Path]) -> Vec<String> where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     debug!("output: {}", config.out_filename.display());
     debug!("libs:");
     for libpath in libs.iter() {
@@ -86,13 +93,18 @@ fn log_rpaths(desc: &str, rpaths: &[String]) {
     return rpaths;
 }
 
-fn get_rpaths_relative_to_output(config: &mut RPathConfig,
-                                 libs: &[Path]) -> Vec<String> {
+fn get_rpaths_relative_to_output<F, G>(config: &mut RPathConfig<F, G>,
+                                       libs: &[Path]) -> Vec<String> where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     libs.iter().map(|a| get_rpath_relative_to_output(config, a)).collect()
 }
 
-fn get_rpath_relative_to_output(config: &mut RPathConfig,
-                                lib: &Path) -> String {
+fn get_rpath_relative_to_output<F, G>(config: &mut RPathConfig<F, G>, lib: &Path) -> String where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     use std::os;
 
     // Mac doesn't appear to support $ORIGIN
@@ -114,7 +126,10 @@ fn get_rpath_relative_to_output(config: &mut RPathConfig,
             relative.as_str().expect("non-utf8 component in path"))
 }
 
-fn get_install_prefix_rpath(config: RPathConfig) -> String {
+fn get_install_prefix_rpath<F, G>(config: RPathConfig<F, G>) -> String where
+    F: FnOnce() -> Path,
+    G: FnMut(&Path) -> Result<Path, IoError>,
+{
     let path = (config.get_install_prefix_lib_path)();
     let path = os::make_absolute(&path).unwrap();
     // FIXME (#9639): This needs to handle non-utf8 paths
index 1b662ef17876007c53c34385c25ca138f93ca417..1587104ca49d16443664352c8fc3c5677d76e4ab 100644 (file)
@@ -82,7 +82,8 @@ fn add_bytes_to_bits<T: Int + ToBits>(bits: T, bytes: T) -> T {
 trait FixedBuffer {
     /// Input a vector of bytes. If the buffer becomes full, process it with the provided
     /// function and then clear the buffer.
-    fn input(&mut self, input: &[u8], func: |&[u8]|);
+    fn input<F>(&mut self, input: &[u8], func: F) where
+        F: FnMut(&[u8]);
 
     /// Reset the buffer.
     fn reset(&mut self);
@@ -125,7 +126,9 @@ fn new() -> FixedBuffer64 {
 }
 
 impl FixedBuffer for FixedBuffer64 {
-    fn input(&mut self, input: &[u8], func: |&[u8]|) {
+    fn input<F>(&mut self, input: &[u8], mut func: F) where
+        F: FnMut(&[u8]),
+    {
         let mut i = 0;
 
         let size = self.size();
@@ -201,11 +204,11 @@ trait StandardPadding {
     /// guaranteed to have exactly rem remaining bytes when it returns. If there are not at least
     /// rem bytes available, the buffer will be zero padded, processed, cleared, and then filled
     /// with zeros again until only rem bytes are remaining.
-    fn standard_padding(&mut self, rem: uint, func: |&[u8]|);
+    fn standard_padding<F>(&mut self, rem: uint, func: F) where F: FnMut(&[u8]);
 }
 
 impl <T: FixedBuffer> StandardPadding for T {
-    fn standard_padding(&mut self, rem: uint, func: |&[u8]|) {
+    fn standard_padding<F>(&mut self, rem: uint, mut func: F) where F: FnMut(&[u8]) {
         let size = self.size();
 
         self.next(1)[0] = 128;
index 549d636e8cb564ac0ee977841f368e38faf2e7b9..116cff49153beecdad9be2d5c9117d5a0c77fd20 100644 (file)
@@ -242,7 +242,6 @@ pub enum SawExprComponent<'a> {
         SawExprWhile,
         SawExprMatch,
         SawExprClosure,
-        SawExprProc,
         SawExprBlock,
         SawExprAssign,
         SawExprAssignOp(ast::BinOp),
@@ -274,7 +273,6 @@ fn saw_expr<'a>(node: &'a Expr_) -> SawExprComponent<'a> {
             ExprLoop(_, id)          => SawExprLoop(id.map(content)),
             ExprMatch(..)            => SawExprMatch,
             ExprClosure(..)          => SawExprClosure,
-            ExprProc(..)             => SawExprProc,
             ExprBlock(..)            => SawExprBlock,
             ExprAssign(..)           => SawExprAssign,
             ExprAssignOp(op, _, _)   => SawExprAssignOp(op),
diff --git a/src/librustc_borrowck/borrowck/check_loans.rs b/src/librustc_borrowck/borrowck/check_loans.rs
new file mode 100644 (file)
index 0000000..3bf817b
--- /dev/null
@@ -0,0 +1,969 @@
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ----------------------------------------------------------------------
+// Checking loans
+//
+// Phase 2 of check: we walk down the tree and check that:
+// 1. assignments are always made to mutable locations;
+// 2. loans made in overlapping scopes do not conflict
+// 3. assignments do not affect things loaned out as immutable
+// 4. moves do not affect things loaned out in any way
+use self::UseError::*;
+
+use borrowck::*;
+use borrowck::LoanPathElem::*;
+use borrowck::LoanPathKind::*;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::region;
+use rustc::middle::ty;
+use rustc::util::ppaux::Repr;
+use syntax::ast;
+use syntax::codemap::Span;
+
+use std::rc::Rc;
+
+// FIXME (#16118): These functions are intended to allow the borrow checker to
+// be less precise in its handling of Box while still allowing moves out of a
+// Box. They should be removed when OwnedPtr is removed from LoanPath.
+
+fn owned_ptr_base_path<'a, 'tcx>(loan_path: &'a LoanPath<'tcx>) -> &'a LoanPath<'tcx> {
+    //! Returns the base of the leftmost dereference of an OwnedPtr in
+    //! `loan_path`. If there is no dereference of an OwnedPtr in `loan_path`,
+    //! then it just returns `loan_path` itself.
+
+    return match helper(loan_path) {
+        Some(new_loan_path) => new_loan_path,
+        None => loan_path.clone()
+    };
+
+    fn helper<'a, 'tcx>(loan_path: &'a LoanPath<'tcx>) -> Option<&'a LoanPath<'tcx>> {
+        match loan_path.kind {
+            LpVar(_) | LpUpvar(_) => None,
+            LpExtend(ref lp_base, _, LpDeref(mc::OwnedPtr)) => {
+                match helper(&**lp_base) {
+                    v @ Some(_) => v,
+                    None => Some(&**lp_base)
+                }
+            }
+            LpDowncast(ref lp_base, _) |
+            LpExtend(ref lp_base, _, _) => helper(&**lp_base)
+        }
+    }
+}
+
+fn owned_ptr_base_path_rc<'tcx>(loan_path: &Rc<LoanPath<'tcx>>) -> Rc<LoanPath<'tcx>> {
+    //! The equivalent of `owned_ptr_base_path` for an &Rc<LoanPath> rather than
+    //! a &LoanPath.
+
+    return match helper(loan_path) {
+        Some(new_loan_path) => new_loan_path,
+        None => loan_path.clone()
+    };
+
+    fn helper<'tcx>(loan_path: &Rc<LoanPath<'tcx>>) -> Option<Rc<LoanPath<'tcx>>> {
+        match loan_path.kind {
+            LpVar(_) | LpUpvar(_) => None,
+            LpExtend(ref lp_base, _, LpDeref(mc::OwnedPtr)) => {
+                match helper(lp_base) {
+                    v @ Some(_) => v,
+                    None => Some(lp_base.clone())
+                }
+            }
+            LpDowncast(ref lp_base, _) |
+            LpExtend(ref lp_base, _, _) => helper(lp_base)
+        }
+    }
+}
+
+struct CheckLoanCtxt<'a, 'tcx: 'a> {
+    bccx: &'a BorrowckCtxt<'a, 'tcx>,
+    dfcx_loans: &'a LoanDataFlow<'a, 'tcx>,
+    move_data: move_data::FlowedMoveData<'a, 'tcx>,
+    all_loans: &'a [Loan<'tcx>],
+    param_env: &'a ty::ParameterEnvironment<'tcx>,
+}
+
+impl<'a, 'tcx> euv::Delegate<'tcx> for CheckLoanCtxt<'a, 'tcx> {
+    fn consume(&mut self,
+               consume_id: ast::NodeId,
+               consume_span: Span,
+               cmt: mc::cmt<'tcx>,
+               mode: euv::ConsumeMode) {
+        debug!("consume(consume_id={}, cmt={}, mode={})",
+               consume_id, cmt.repr(self.tcx()), mode);
+
+        self.consume_common(consume_id, consume_span, cmt, mode);
+    }
+
+    fn matched_pat(&mut self,
+                   _matched_pat: &ast::Pat,
+                   _cmt: mc::cmt,
+                   _mode: euv::MatchMode) { }
+
+    fn consume_pat(&mut self,
+                   consume_pat: &ast::Pat,
+                   cmt: mc::cmt<'tcx>,
+                   mode: euv::ConsumeMode) {
+        debug!("consume_pat(consume_pat={}, cmt={}, mode={})",
+               consume_pat.repr(self.tcx()),
+               cmt.repr(self.tcx()),
+               mode);
+
+        self.consume_common(consume_pat.id, consume_pat.span, cmt, mode);
+    }
+
+    fn borrow(&mut self,
+              borrow_id: ast::NodeId,
+              borrow_span: Span,
+              cmt: mc::cmt<'tcx>,
+              loan_region: ty::Region,
+              bk: ty::BorrowKind,
+              loan_cause: euv::LoanCause)
+    {
+        debug!("borrow(borrow_id={}, cmt={}, loan_region={}, \
+               bk={}, loan_cause={})",
+               borrow_id, cmt.repr(self.tcx()), loan_region,
+               bk, loan_cause);
+
+        match opt_loan_path(&cmt) {
+            Some(lp) => {
+                let moved_value_use_kind = match loan_cause {
+                    euv::ClosureCapture(_) => MovedInCapture,
+                    _ => MovedInUse,
+                };
+                self.check_if_path_is_moved(borrow_id, borrow_span, moved_value_use_kind, &lp);
+            }
+            None => { }
+        }
+
+        self.check_for_conflicting_loans(region::CodeExtent::from_node_id(borrow_id));
+    }
+
+    fn mutate(&mut self,
+              assignment_id: ast::NodeId,
+              assignment_span: Span,
+              assignee_cmt: mc::cmt<'tcx>,
+              mode: euv::MutateMode)
+    {
+        debug!("mutate(assignment_id={}, assignee_cmt={})",
+               assignment_id, assignee_cmt.repr(self.tcx()));
+
+        match opt_loan_path(&assignee_cmt) {
+            Some(lp) => {
+                match mode {
+                    euv::Init | euv::JustWrite => {
+                        // In a case like `path = 1`, then path does not
+                        // have to be *FULLY* initialized, but we still
+                        // must be careful lest it contains derefs of
+                        // pointers.
+                        self.check_if_assigned_path_is_moved(assignee_cmt.id,
+                                                             assignment_span,
+                                                             MovedInUse,
+                                                             &lp);
+                    }
+                    euv::WriteAndRead => {
+                        // In a case like `path += 1`, then path must be
+                        // fully initialized, since we will read it before
+                        // we write it.
+                        self.check_if_path_is_moved(assignee_cmt.id,
+                                                    assignment_span,
+                                                    MovedInUse,
+                                                    &lp);
+                    }
+                }
+            }
+            None => { }
+        }
+
+        self.check_assignment(assignment_id, assignment_span, assignee_cmt, mode);
+    }
+
+    fn decl_without_init(&mut self, _id: ast::NodeId, _span: Span) { }
+}
+
+pub fn check_loans<'a, 'b, 'c, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                     dfcx_loans: &LoanDataFlow<'b, 'tcx>,
+                                     move_data: move_data::FlowedMoveData<'c, 'tcx>,
+                                     all_loans: &[Loan<'tcx>],
+                                     fn_id: ast::NodeId,
+                                     decl: &ast::FnDecl,
+                                     body: &ast::Block) {
+    debug!("check_loans(body id={})", body.id);
+
+    let param_env = ty::ParameterEnvironment::for_item(bccx.tcx, fn_id);
+
+    let mut clcx = CheckLoanCtxt {
+        bccx: bccx,
+        dfcx_loans: dfcx_loans,
+        move_data: move_data,
+        all_loans: all_loans,
+        param_env: &param_env,
+    };
+
+    {
+        let mut euv = euv::ExprUseVisitor::new(&mut clcx,
+                                               bccx.tcx,
+                                               param_env.clone());
+        euv.walk_fn(decl, body);
+    }
+}
+
+#[deriving(PartialEq)]
+enum UseError<'tcx> {
+    UseOk,
+    UseWhileBorrowed(/*loan*/Rc<LoanPath<'tcx>>, /*loan*/Span)
+}
+
+fn compatible_borrow_kinds(borrow_kind1: ty::BorrowKind,
+                           borrow_kind2: ty::BorrowKind)
+                           -> bool {
+    borrow_kind1 == ty::ImmBorrow && borrow_kind2 == ty::ImmBorrow
+}
+
+impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
+    pub fn tcx(&self) -> &'a ty::ctxt<'tcx> { self.bccx.tcx }
+
+    pub fn each_issued_loan<F>(&self, scope: region::CodeExtent, mut op: F) -> bool where
+        F: FnMut(&Loan<'tcx>) -> bool,
+    {
+        //! Iterates over each loan that has been issued
+        //! on entrance to `scope`, regardless of whether it is
+        //! actually *in scope* at that point.  Sometimes loans
+        //! are issued for future scopes and thus they may have been
+        //! *issued* but not yet be in effect.
+
+        self.dfcx_loans.each_bit_on_entry(scope.node_id(), |loan_index| {
+            let loan = &self.all_loans[loan_index];
+            op(loan)
+        })
+    }
+
+    pub fn each_in_scope_loan<F>(&self, scope: region::CodeExtent, mut op: F) -> bool where
+        F: FnMut(&Loan<'tcx>) -> bool,
+    {
+        //! Like `each_issued_loan()`, but only considers loans that are
+        //! currently in scope.
+
+        let tcx = self.tcx();
+        self.each_issued_loan(scope, |loan| {
+            if tcx.region_maps.is_subscope_of(scope, loan.kill_scope) {
+                op(loan)
+            } else {
+                true
+            }
+        })
+    }
+
+    fn each_in_scope_loan_affecting_path<F>(&self,
+                                            scope: region::CodeExtent,
+                                            loan_path: &LoanPath<'tcx>,
+                                            mut op: F)
+                                            -> bool where
+        F: FnMut(&Loan<'tcx>) -> bool,
+    {
+        //! Iterates through all of the in-scope loans affecting `loan_path`,
+        //! calling `op`, and ceasing iteration if `false` is returned.
+
+        // First, we check for a loan restricting the path P being used. This
+        // accounts for borrows of P but also borrows of subpaths, like P.a.b.
+        // Consider the following example:
+        //
+        //     let x = &mut a.b.c; // Restricts a, a.b, and a.b.c
+        //     let y = a;          // Conflicts with restriction
+
+        let loan_path = owned_ptr_base_path(loan_path);
+        let cont = self.each_in_scope_loan(scope, |loan| {
+            let mut ret = true;
+            for restr_path in loan.restricted_paths.iter() {
+                if **restr_path == *loan_path {
+                    if !op(loan) {
+                        ret = false;
+                        break;
+                    }
+                }
+            }
+            ret
+        });
+
+        if !cont {
+            return false;
+        }
+
+        // Next, we must check for *loans* (not restrictions) on the path P or
+        // any base path. This rejects examples like the following:
+        //
+        //     let x = &mut a.b;
+        //     let y = a.b.c;
+        //
+        // Limiting this search to *loans* and not *restrictions* means that
+        // examples like the following continue to work:
+        //
+        //     let x = &mut a.b;
+        //     let y = a.c;
+
+        let mut loan_path = loan_path;
+        loop {
+            match loan_path.kind {
+                LpVar(_) | LpUpvar(_) => {
+                    break;
+                }
+                LpDowncast(ref lp_base, _) |
+                LpExtend(ref lp_base, _, _) => {
+                    loan_path = &**lp_base;
+                }
+            }
+
+            let cont = self.each_in_scope_loan(scope, |loan| {
+                if *loan.loan_path == *loan_path {
+                    op(loan)
+                } else {
+                    true
+                }
+            });
+
+            if !cont {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    pub fn loans_generated_by(&self, scope: region::CodeExtent) -> Vec<uint> {
+        //! Returns a vector of the loans that are generated as
+        //! we enter `scope`.
+
+        let mut result = Vec::new();
+        self.dfcx_loans.each_gen_bit(scope.node_id(), |loan_index| {
+            result.push(loan_index);
+            true
+        });
+        return result;
+    }
+
+    pub fn check_for_conflicting_loans(&self, scope: region::CodeExtent) {
+        //! Checks to see whether any of the loans that are issued
+        //! on entrance to `scope` conflict with loans that have already been
+        //! issued when we enter `scope` (for example, we do not
+        //! permit two `&mut` borrows of the same variable).
+        //!
+        //! (Note that some loans can be *issued* without necessarily
+        //! taking effect yet.)
+
+        debug!("check_for_conflicting_loans(scope={})", scope);
+
+        let new_loan_indices = self.loans_generated_by(scope);
+        debug!("new_loan_indices = {}", new_loan_indices);
+
+        self.each_issued_loan(scope, |issued_loan| {
+            for &new_loan_index in new_loan_indices.iter() {
+                let new_loan = &self.all_loans[new_loan_index];
+                self.report_error_if_loans_conflict(issued_loan, new_loan);
+            }
+            true
+        });
+
+        for (i, &x) in new_loan_indices.iter().enumerate() {
+            let old_loan = &self.all_loans[x];
+            for &y in new_loan_indices.slice_from(i+1).iter() {
+                let new_loan = &self.all_loans[y];
+                self.report_error_if_loans_conflict(old_loan, new_loan);
+            }
+        }
+    }
+
+    pub fn report_error_if_loans_conflict(&self,
+                                          old_loan: &Loan<'tcx>,
+                                          new_loan: &Loan<'tcx>) {
+        //! Checks whether `old_loan` and `new_loan` can safely be issued
+        //! simultaneously.
+
+        debug!("report_error_if_loans_conflict(old_loan={}, new_loan={})",
+               old_loan.repr(self.tcx()),
+               new_loan.repr(self.tcx()));
+
+        // Should only be called for loans that are in scope at the same time.
+        assert!(self.tcx().region_maps.scopes_intersect(old_loan.kill_scope,
+                                                        new_loan.kill_scope));
+
+        self.report_error_if_loan_conflicts_with_restriction(
+            old_loan, new_loan, old_loan, new_loan) &&
+        self.report_error_if_loan_conflicts_with_restriction(
+            new_loan, old_loan, old_loan, new_loan);
+    }
+
+    pub fn report_error_if_loan_conflicts_with_restriction(&self,
+                                                           loan1: &Loan<'tcx>,
+                                                           loan2: &Loan<'tcx>,
+                                                           old_loan: &Loan<'tcx>,
+                                                           new_loan: &Loan<'tcx>)
+                                                           -> bool {
+        //! Checks whether the restrictions introduced by `loan1` would
+        //! prohibit `loan2`. Returns false if an error is reported.
+
+        debug!("report_error_if_loan_conflicts_with_restriction(\
+                loan1={}, loan2={})",
+               loan1.repr(self.tcx()),
+               loan2.repr(self.tcx()));
+
+        if compatible_borrow_kinds(loan1.kind, loan2.kind) {
+            return true;
+        }
+
+        let loan2_base_path = owned_ptr_base_path_rc(&loan2.loan_path);
+        for restr_path in loan1.restricted_paths.iter() {
+            if *restr_path != loan2_base_path { continue; }
+
+            // If new_loan is something like `x.a`, and old_loan is something like `x.b`, we would
+            // normally generate a rather confusing message (in this case, for multiple mutable
+            // borrows):
+            //
+            //     error: cannot borrow `x.b` as mutable more than once at a time
+            //     note: previous borrow of `x.a` occurs here; the mutable borrow prevents
+            //     subsequent moves, borrows, or modification of `x.a` until the borrow ends
+            //
+            // What we want to do instead is get the 'common ancestor' of the two borrow paths and
+            // use that for most of the message instead, giving is something like this:
+            //
+            //     error: cannot borrow `x` as mutable more than once at a time
+            //     note: previous borrow of `x` occurs here (through borrowing `x.a`); the mutable
+            //     borrow prevents subsequent moves, borrows, or modification of `x` until the
+            //     borrow ends
+
+            let common = new_loan.loan_path.common(&*old_loan.loan_path);
+            let (nl, ol, new_loan_msg, old_loan_msg) =
+                if new_loan.loan_path.has_fork(&*old_loan.loan_path) && common.is_some() {
+                    let nl = self.bccx.loan_path_to_string(&common.unwrap());
+                    let ol = nl.clone();
+                    let new_loan_msg = format!(" (here through borrowing `{}`)",
+                                               self.bccx.loan_path_to_string(
+                                                   &*new_loan.loan_path));
+                    let old_loan_msg = format!(" (through borrowing `{}`)",
+                                               self.bccx.loan_path_to_string(
+                                                   &*old_loan.loan_path));
+                    (nl, ol, new_loan_msg, old_loan_msg)
+                } else {
+                    (self.bccx.loan_path_to_string(&*new_loan.loan_path),
+                     self.bccx.loan_path_to_string(&*old_loan.loan_path),
+                     String::new(), String::new())
+                };
+
+            let ol_pronoun = if new_loan.loan_path == old_loan.loan_path {
+                "it".to_string()
+            } else {
+                format!("`{}`", ol)
+            };
+
+            match (new_loan.kind, old_loan.kind) {
+                (ty::MutBorrow, ty::MutBorrow) => {
+                    self.bccx.span_err(
+                        new_loan.span,
+                        format!("cannot borrow `{}`{} as mutable \
+                                more than once at a time",
+                                nl, new_loan_msg).as_slice())
+                }
+
+                (ty::UniqueImmBorrow, _) => {
+                    self.bccx.span_err(
+                        new_loan.span,
+                        format!("closure requires unique access to `{}` \
+                                but {} is already borrowed{}",
+                                nl, ol_pronoun, old_loan_msg).as_slice());
+                }
+
+                (_, ty::UniqueImmBorrow) => {
+                    self.bccx.span_err(
+                        new_loan.span,
+                        format!("cannot borrow `{}`{} as {} because \
+                                previous closure requires unique access",
+                                nl, new_loan_msg, new_loan.kind.to_user_str()).as_slice());
+                }
+
+                (_, _) => {
+                    self.bccx.span_err(
+                        new_loan.span,
+                        format!("cannot borrow `{}`{} as {} because \
+                                {} is also borrowed as {}{}",
+                                nl,
+                                new_loan_msg,
+                                new_loan.kind.to_user_str(),
+                                ol_pronoun,
+                                old_loan.kind.to_user_str(),
+                                old_loan_msg).as_slice());
+                }
+            }
+
+            match new_loan.cause {
+                euv::ClosureCapture(span) => {
+                    self.bccx.span_note(
+                        span,
+                        format!("borrow occurs due to use of `{}` in closure",
+                                nl).as_slice());
+                }
+                _ => { }
+            }
+
+            let rule_summary = match old_loan.kind {
+                ty::MutBorrow => {
+                    format!("the mutable borrow prevents subsequent \
+                            moves, borrows, or modification of `{0}` \
+                            until the borrow ends",
+                            ol)
+                }
+
+                ty::ImmBorrow => {
+                    format!("the immutable borrow prevents subsequent \
+                            moves or mutable borrows of `{0}` \
+                            until the borrow ends",
+                            ol)
+                }
+
+                ty::UniqueImmBorrow => {
+                    format!("the unique capture prevents subsequent \
+                            moves or borrows of `{0}` \
+                            until the borrow ends",
+                            ol)
+                }
+            };
+
+            let borrow_summary = match old_loan.cause {
+                euv::ClosureCapture(_) => {
+                    format!("previous borrow of `{}` occurs here{} due to \
+                            use in closure",
+                            ol, old_loan_msg)
+                }
+
+                euv::OverloadedOperator(..) |
+                euv::AddrOf(..) |
+                euv::AutoRef(..) |
+                euv::ClosureInvocation(..) |
+                euv::ForLoop(..) |
+                euv::RefBinding(..) |
+                euv::MatchDiscriminant(..) => {
+                    format!("previous borrow of `{}` occurs here{}",
+                            ol, old_loan_msg)
+                }
+            };
+
+            self.bccx.span_note(
+                old_loan.span,
+                format!("{}; {}", borrow_summary, rule_summary).as_slice());
+
+            let old_loan_span = self.tcx().map.span(old_loan.kill_scope.node_id());
+            self.bccx.span_end_note(old_loan_span,
+                                    "previous borrow ends here");
+
+            return false;
+        }
+
+        true
+    }
+
+    fn is_local_variable_or_arg(&self, cmt: mc::cmt<'tcx>) -> bool {
+        match cmt.cat {
+          mc::cat_local(_) => true,
+          _ => false
+        }
+    }
+
+    fn consume_common(&self,
+                      id: ast::NodeId,
+                      span: Span,
+                      cmt: mc::cmt<'tcx>,
+                      mode: euv::ConsumeMode) {
+        match opt_loan_path(&cmt) {
+            Some(lp) => {
+                let moved_value_use_kind = match mode {
+                    euv::Copy => {
+                        self.check_for_copy_of_frozen_path(id, span, &*lp);
+                        MovedInUse
+                    }
+                    euv::Move(_) => {
+                        match self.move_data.kind_of_move_of_path(id, &lp) {
+                            None => {
+                                // Sometimes moves don't have a move kind;
+                                // this either means that the original move
+                                // was from something illegal to move,
+                                // or was moved from referent of an unsafe
+                                // pointer or something like that.
+                                MovedInUse
+                            }
+                            Some(move_kind) => {
+                                self.check_for_move_of_borrowed_path(id, span,
+                                                                     &*lp, move_kind);
+                                if move_kind == move_data::Captured {
+                                    MovedInCapture
+                                } else {
+                                    MovedInUse
+                                }
+                            }
+                        }
+                    }
+                };
+
+                self.check_if_path_is_moved(id, span, moved_value_use_kind, &lp);
+            }
+            None => { }
+        }
+    }
+
+    fn check_for_copy_of_frozen_path(&self,
+                                     id: ast::NodeId,
+                                     span: Span,
+                                     copy_path: &LoanPath<'tcx>) {
+        match self.analyze_restrictions_on_use(id, copy_path, ty::ImmBorrow) {
+            UseOk => { }
+            UseWhileBorrowed(loan_path, loan_span) => {
+                self.bccx.span_err(
+                    span,
+                    format!("cannot use `{}` because it was mutably borrowed",
+                            self.bccx.loan_path_to_string(copy_path).as_slice())
+                    .as_slice());
+                self.bccx.span_note(
+                    loan_span,
+                    format!("borrow of `{}` occurs here",
+                            self.bccx.loan_path_to_string(&*loan_path).as_slice())
+                    .as_slice());
+            }
+        }
+    }
+
+    fn check_for_move_of_borrowed_path(&self,
+                                       id: ast::NodeId,
+                                       span: Span,
+                                       move_path: &LoanPath<'tcx>,
+                                       move_kind: move_data::MoveKind) {
+        // We want to detect if there are any loans at all, so we search for
+        // any loans incompatible with MutBorrrow, since all other kinds of
+        // loans are incompatible with that.
+        match self.analyze_restrictions_on_use(id, move_path, ty::MutBorrow) {
+            UseOk => { }
+            UseWhileBorrowed(loan_path, loan_span) => {
+                let err_message = match move_kind {
+                    move_data::Captured =>
+                        format!("cannot move `{}` into closure because it is borrowed",
+                                self.bccx.loan_path_to_string(move_path).as_slice()),
+                    move_data::Declared |
+                    move_data::MoveExpr |
+                    move_data::MovePat =>
+                        format!("cannot move out of `{}` because it is borrowed",
+                                self.bccx.loan_path_to_string(move_path).as_slice())
+                };
+
+                self.bccx.span_err(span, err_message.as_slice());
+                self.bccx.span_note(
+                    loan_span,
+                    format!("borrow of `{}` occurs here",
+                            self.bccx.loan_path_to_string(&*loan_path).as_slice())
+                    .as_slice());
+            }
+        }
+    }
+
+    pub fn analyze_restrictions_on_use(&self,
+                                       expr_id: ast::NodeId,
+                                       use_path: &LoanPath<'tcx>,
+                                       borrow_kind: ty::BorrowKind)
+                                       -> UseError<'tcx> {
+        debug!("analyze_restrictions_on_use(expr_id={}, use_path={})",
+               self.tcx().map.node_to_string(expr_id),
+               use_path.repr(self.tcx()));
+
+        let mut ret = UseOk;
+
+        self.each_in_scope_loan_affecting_path(
+            region::CodeExtent::from_node_id(expr_id), use_path, |loan| {
+            if !compatible_borrow_kinds(loan.kind, borrow_kind) {
+                ret = UseWhileBorrowed(loan.loan_path.clone(), loan.span);
+                false
+            } else {
+                true
+            }
+        });
+
+        return ret;
+    }
+
+    /// Reports an error if `expr` (which should be a path)
+    /// is using a moved/uninitialized value
+    fn check_if_path_is_moved(&self,
+                              id: ast::NodeId,
+                              span: Span,
+                              use_kind: MovedValueUseKind,
+                              lp: &Rc<LoanPath<'tcx>>) {
+        debug!("check_if_path_is_moved(id={}, use_kind={}, lp={})",
+               id, use_kind, lp.repr(self.bccx.tcx));
+        let base_lp = owned_ptr_base_path_rc(lp);
+        self.move_data.each_move_of(id, &base_lp, |the_move, moved_lp| {
+            self.bccx.report_use_of_moved_value(
+                span,
+                use_kind,
+                &**lp,
+                the_move,
+                moved_lp,
+                self.param_env);
+            false
+        });
+    }
+
+    /// Reports an error if assigning to `lp` will use a
+    /// moved/uninitialized value. Mainly this is concerned with
+    /// detecting derefs of uninitialized pointers.
+    ///
+    /// For example:
+    ///
+    /// ```
+    /// let a: int;
+    /// a = 10; // ok, even though a is uninitialized
+    ///
+    /// struct Point { x: uint, y: uint }
+    /// let p: Point;
+    /// p.x = 22; // ok, even though `p` is uninitialized
+    ///
+    /// let p: ~Point;
+    /// (*p).x = 22; // not ok, p is uninitialized, can't deref
+    /// ```
+    fn check_if_assigned_path_is_moved(&self,
+                                       id: ast::NodeId,
+                                       span: Span,
+                                       use_kind: MovedValueUseKind,
+                                       lp: &Rc<LoanPath<'tcx>>)
+    {
+        match lp.kind {
+            LpVar(_) | LpUpvar(_) => {
+                // assigning to `x` does not require that `x` is initialized
+            }
+            LpDowncast(ref lp_base, _) => {
+                // assigning to `(P->Variant).f` is ok if assigning to `P` is ok
+                self.check_if_assigned_path_is_moved(id, span,
+                                                     use_kind, lp_base);
+            }
+            LpExtend(ref lp_base, _, LpInterior(_)) => {
+                // assigning to `P.f` is ok if assigning to `P` is ok
+                self.check_if_assigned_path_is_moved(id, span,
+                                                     use_kind, lp_base);
+            }
+            LpExtend(ref lp_base, _, LpDeref(_)) => {
+                // assigning to `(*P)` requires that `P` be initialized
+                self.check_if_path_is_moved(id, span,
+                                            use_kind, lp_base);
+            }
+        }
+    }
+
+    fn check_assignment(&self,
+                        assignment_id: ast::NodeId,
+                        assignment_span: Span,
+                        assignee_cmt: mc::cmt<'tcx>,
+                        mode: euv::MutateMode) {
+        debug!("check_assignment(assignee_cmt={})", assignee_cmt.repr(self.tcx()));
+
+        // Mutable values can be assigned, as long as they obey loans
+        // and aliasing restrictions:
+        if assignee_cmt.mutbl.is_mutable() {
+            if check_for_aliasable_mutable_writes(self, assignment_span, assignee_cmt.clone()) {
+                if mode != euv::Init {
+                    check_for_assignment_to_borrowed_path(
+                        self, assignment_id, assignment_span, assignee_cmt.clone());
+                    mark_variable_as_used_mut(self, assignee_cmt);
+                }
+            }
+            return;
+        }
+
+        // Initializations are OK.
+        if mode == euv::Init {
+            return
+        }
+
+        // For immutable local variables, assignments are legal
+        // if they cannot already have been assigned
+        if self.is_local_variable_or_arg(assignee_cmt.clone()) {
+            assert!(assignee_cmt.mutbl.is_immutable()); // no "const" locals
+            let lp = opt_loan_path(&assignee_cmt).unwrap();
+            self.move_data.each_assignment_of(assignment_id, &lp, |assign| {
+                self.bccx.report_reassigned_immutable_variable(
+                    assignment_span,
+                    &*lp,
+                    assign);
+                false
+            });
+            return;
+        }
+
+        // Otherwise, just a plain error.
+        match assignee_cmt.note {
+            mc::NoteClosureEnv(upvar_id) => {
+                // If this is an `Fn` closure, it simply can't mutate upvars.
+                // If it's an `FnMut` closure, the original variable was declared immutable.
+                // We need to determine which is the case here.
+                let kind = match assignee_cmt.upvar().unwrap().cat {
+                    mc::cat_upvar(mc::Upvar { kind, .. }) => kind,
+                    _ => unreachable!()
+                };
+                if kind == ty::FnUnboxedClosureKind {
+                    self.bccx.span_err(
+                        assignment_span,
+                        format!("cannot assign to {}",
+                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
+                    self.bccx.span_help(
+                        self.tcx().map.span(upvar_id.closure_expr_id),
+                        "consider changing this closure to take self by mutable reference");
+                } else {
+                    self.bccx.span_err(
+                        assignment_span,
+                        format!("cannot assign to {} {}",
+                                assignee_cmt.mutbl.to_user_str(),
+                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
+                }
+            }
+            _ => match opt_loan_path(&assignee_cmt) {
+                Some(lp) => {
+                    self.bccx.span_err(
+                        assignment_span,
+                        format!("cannot assign to {} {} `{}`",
+                                assignee_cmt.mutbl.to_user_str(),
+                                self.bccx.cmt_to_string(&*assignee_cmt),
+                                self.bccx.loan_path_to_string(&*lp)).as_slice());
+                }
+                None => {
+                    self.bccx.span_err(
+                        assignment_span,
+                        format!("cannot assign to {} {}",
+                                assignee_cmt.mutbl.to_user_str(),
+                                self.bccx.cmt_to_string(&*assignee_cmt)).as_slice());
+                }
+            }
+        }
+        return;
+
+        fn mark_variable_as_used_mut<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
+                                               mut cmt: mc::cmt<'tcx>) {
+            //! If the mutability of the `cmt` being written is inherited
+            //! from a local variable, liveness will
+            //! not have been able to detect that this variable's mutability
+            //! is important, so we must add the variable to the
+            //! `used_mut_nodes` table here.
+
+            loop {
+                debug!("mark_variable_as_used_mut(cmt={})", cmt.repr(this.tcx()));
+                match cmt.cat.clone() {
+                    mc::cat_upvar(mc::Upvar { id: ty::UpvarId { var_id: id, .. }, .. }) |
+                    mc::cat_local(id) => {
+                        this.tcx().used_mut_nodes.borrow_mut().insert(id);
+                        return;
+                    }
+
+                    mc::cat_rvalue(..) |
+                    mc::cat_static_item |
+                    mc::cat_deref(_, _, mc::UnsafePtr(..)) |
+                    mc::cat_deref(_, _, mc::Implicit(..)) => {
+                        assert_eq!(cmt.mutbl, mc::McDeclared);
+                        return;
+                    }
+
+                    mc::cat_deref(_, _, mc::BorrowedPtr(..)) => {
+                        assert_eq!(cmt.mutbl, mc::McDeclared);
+                        // We need to drill down to upvar if applicable
+                        match cmt.upvar() {
+                            Some(b) => cmt = b,
+                            None => return
+                        }
+                    }
+
+                    mc::cat_deref(b, _, mc::OwnedPtr) => {
+                        assert_eq!(cmt.mutbl, mc::McInherited);
+                        cmt = b;
+                    }
+
+                    mc::cat_downcast(b, _) |
+                    mc::cat_interior(b, _) => {
+                        assert_eq!(cmt.mutbl, mc::McInherited);
+                        cmt = b;
+                    }
+                }
+            }
+        }
+
+        fn check_for_aliasable_mutable_writes<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
+                                                        span: Span,
+                                                        cmt: mc::cmt<'tcx>) -> bool {
+            //! Safety checks related to writes to aliasable, mutable locations
+
+            let guarantor = cmt.guarantor();
+            debug!("check_for_aliasable_mutable_writes(cmt={}, guarantor={})",
+                   cmt.repr(this.tcx()), guarantor.repr(this.tcx()));
+            if let mc::cat_deref(ref b, _, mc::BorrowedPtr(ty::MutBorrow, _)) = guarantor.cat {
+                // Statically prohibit writes to `&mut` when aliasable
+                check_for_aliasability_violation(this, span, b.clone());
+            }
+
+            return true; // no errors reported
+        }
+
+        fn check_for_aliasability_violation<'a, 'tcx>(this: &CheckLoanCtxt<'a, 'tcx>,
+                                                      span: Span,
+                                                      cmt: mc::cmt<'tcx>)
+                                                      -> bool {
+            match cmt.freely_aliasable(this.tcx()) {
+                None => {
+                    return true;
+                }
+                Some(mc::AliasableStaticMut(..)) => {
+                    return true;
+                }
+                Some(cause) => {
+                    this.bccx.report_aliasability_violation(
+                        span,
+                        MutabilityViolation,
+                        cause);
+                    return false;
+                }
+            }
+        }
+
+        fn check_for_assignment_to_borrowed_path<'a, 'tcx>(
+            this: &CheckLoanCtxt<'a, 'tcx>,
+            assignment_id: ast::NodeId,
+            assignment_span: Span,
+            assignee_cmt: mc::cmt<'tcx>)
+        {
+            //! Check for assignments that violate the terms of an
+            //! outstanding loan.
+
+            let loan_path = match opt_loan_path(&assignee_cmt) {
+                Some(lp) => lp,
+                None => { return; /* no loan path, can't be any loans */ }
+            };
+
+            let scope = region::CodeExtent::from_node_id(assignment_id);
+            this.each_in_scope_loan_affecting_path(scope, &*loan_path, |loan| {
+                this.report_illegal_mutation(assignment_span, &*loan_path, loan);
+                false
+            });
+        }
+    }
+
+    pub fn report_illegal_mutation(&self,
+                                   span: Span,
+                                   loan_path: &LoanPath<'tcx>,
+                                   loan: &Loan) {
+        self.bccx.span_err(
+            span,
+            format!("cannot assign to `{}` because it is borrowed",
+                    self.bccx.loan_path_to_string(loan_path)).as_slice());
+        self.bccx.span_note(
+            loan.span,
+            format!("borrow of `{}` occurs here",
+                    self.bccx.loan_path_to_string(loan_path)).as_slice());
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/doc.rs b/src/librustc_borrowck/borrowck/doc.rs
new file mode 100644 (file)
index 0000000..c6db534
--- /dev/null
@@ -0,0 +1,1222 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! # The Borrow Checker
+//!
+//! This pass has the job of enforcing memory safety. This is a subtle
+//! topic. This docs aim to explain both the practice and the theory
+//! behind the borrow checker. They start with a high-level overview of
+//! how it works, and then proceed to dive into the theoretical
+//! background. Finally, they go into detail on some of the more subtle
+//! aspects.
+//!
+//! # Table of contents
+//!
+//! These docs are long. Search for the section you are interested in.
+//!
+//! - Overview
+//! - Formal model
+//! - Borrowing and loans
+//! - Moves and initialization
+//! - Drop flags and structural fragments
+//! - Future work
+//!
+//! # Overview
+//!
+//! The borrow checker checks one function at a time. It operates in two
+//! passes. The first pass, called `gather_loans`, walks over the function
+//! and identifies all of the places where borrows (e.g., `&` expressions
+//! and `ref` bindings) and moves (copies or captures of a linear value)
+//! occur. It also tracks initialization sites. For each borrow and move,
+//! it checks various basic safety conditions at this time (for example,
+//! that the lifetime of the borrow doesn't exceed the lifetime of the
+//! value being borrowed, or that there is no move out of an `&T`
+//! referent).
+//!
+//! It then uses the dataflow module to propagate which of those borrows
+//! may be in scope at each point in the procedure. A loan is considered
+//! to come into scope at the expression that caused it and to go out of
+//! scope when the lifetime of the resulting reference expires.
+//!
+//! Once the in-scope loans are known for each point in the program, the
+//! borrow checker walks the IR again in a second pass called
+//! `check_loans`. This pass examines each statement and makes sure that
+//! it is safe with respect to the in-scope loans.
+//!
+//! # Formal model
+//!
+//! Throughout the docs we'll consider a simple subset of Rust in which
+//! you can only borrow from lvalues, defined like so:
+//!
+//! ```text
+//! LV = x | LV.f | *LV
+//! ```
+//!
+//! Here `x` represents some variable, `LV.f` is a field reference,
+//! and `*LV` is a pointer dereference. There is no auto-deref or other
+//! niceties. This means that if you have a type like:
+//!
+//! ```text
+//! struct S { f: uint }
+//! ```
+//!
+//! and a variable `a: Box<S>`, then the rust expression `a.f` would correspond
+//! to an `LV` of `(*a).f`.
+//!
+//! Here is the formal grammar for the types we'll consider:
+//!
+//! ```text
+//! TY = () | S<'LT...> | Box<TY> | & 'LT MQ TY
+//! MQ = mut | imm | const
+//! ```
+//!
+//! Most of these types should be pretty self explanatory. Here `S` is a
+//! struct name and we assume structs are declared like so:
+//!
+//! ```text
+//! SD = struct S<'LT...> { (f: TY)... }
+//! ```
+//!
+//! # Borrowing and loans
+//!
+//! ## An intuitive explanation
+//!
+//! ### Issuing loans
+//!
+//! Now, imagine we had a program like this:
+//!
+//! ```text
+//! struct Foo { f: uint, g: uint }
+//! ...
+//! 'a: {
+//!   let mut x: Box<Foo> = ...;
+//!   let y = &mut (*x).f;
+//!   x = ...;
+//! }
+//! ```
+//!
+//! This is of course dangerous because mutating `x` will free the old
+//! value and hence invalidate `y`. The borrow checker aims to prevent
+//! this sort of thing.
+//!
+//! #### Loans and restrictions
+//!
+//! The way the borrow checker works is that it analyzes each borrow
+//! expression (in our simple model, that's stuff like `&LV`, though in
+//! real life there are a few other cases to consider). For each borrow
+//! expression, it computes a `Loan`, which is a data structure that
+//! records (1) the value being borrowed, (2) the mutability and scope of
+//! the borrow, and (3) a set of restrictions. In the code, `Loan` is a
+//! struct defined in `middle::borrowck`. Formally, we define `LOAN` as
+//! follows:
+//!
+//! ```text
+//! LOAN = (LV, LT, MQ, RESTRICTION*)
+//! RESTRICTION = (LV, ACTION*)
+//! ACTION = MUTATE | CLAIM | FREEZE
+//! ```
+//!
+//! Here the `LOAN` tuple defines the lvalue `LV` being borrowed; the
+//! lifetime `LT` of that borrow; the mutability `MQ` of the borrow; and a
+//! list of restrictions. The restrictions indicate actions which, if
+//! taken, could invalidate the loan and lead to type safety violations.
+//!
+//! Each `RESTRICTION` is a pair of a restrictive lvalue `LV` (which will
+//! either be the path that was borrowed or some prefix of the path that
+//! was borrowed) and a set of restricted actions.  There are three kinds
+//! of actions that may be restricted for the path `LV`:
+//!
+//! - `MUTATE` means that `LV` cannot be assigned to;
+//! - `CLAIM` means that the `LV` cannot be borrowed mutably;
+//! - `FREEZE` means that the `LV` cannot be borrowed immutably;
+//!
+//! Finally, it is never possible to move from an lvalue that appears in a
+//! restriction. This implies that the "empty restriction" `(LV, [])`,
+//! which contains an empty set of actions, still has a purpose---it
+//! prevents moves from `LV`. I chose not to make `MOVE` a fourth kind of
+//! action because that would imply that sometimes moves are permitted
+//! from restrictived values, which is not the case.
+//!
+//! #### Example
+//!
+//! To give you a better feeling for what kind of restrictions derived
+//! from a loan, let's look at the loan `L` that would be issued as a
+//! result of the borrow `&mut (*x).f` in the example above:
+//!
+//! ```text
+//! L = ((*x).f, 'a, mut, RS) where
+//!     RS = [((*x).f, [MUTATE, CLAIM, FREEZE]),
+//!           (*x, [MUTATE, CLAIM, FREEZE]),
+//!           (x, [MUTATE, CLAIM, FREEZE])]
+//! ```
+//!
+//! The loan states that the expression `(*x).f` has been loaned as
+//! mutable for the lifetime `'a`. Because the loan is mutable, that means
+//! that the value `(*x).f` may be mutated via the newly created reference
+//! (and *only* via that pointer). This is reflected in the
+//! restrictions `RS` that accompany the loan.
+//!
+//! The first restriction `((*x).f, [MUTATE, CLAIM, FREEZE])` states that
+//! the lender may not mutate, freeze, nor alias `(*x).f`. Mutation is
+//! illegal because `(*x).f` is only supposed to be mutated via the new
+//! reference, not by mutating the original path `(*x).f`. Freezing is
+//! illegal because the path now has an `&mut` alias; so even if we the
+//! lender were to consider `(*x).f` to be immutable, it might be mutated
+//! via this alias. They will be enforced for the lifetime `'a` of the
+//! loan. After the loan expires, the restrictions no longer apply.
+//!
+//! The second restriction on `*x` is interesting because it does not
+//! apply to the path that was lent (`(*x).f`) but rather to a prefix of
+//! the borrowed path. This is due to the rules of inherited mutability:
+//! if the user were to assign to (or freeze) `*x`, they would indirectly
+//! overwrite (or freeze) `(*x).f`, and thus invalidate the reference
+//! that was created. In general it holds that when a path is
+//! lent, restrictions are issued for all the owning prefixes of that
+//! path. In this case, the path `*x` owns the path `(*x).f` and,
+//! because `x` is an owned pointer, the path `x` owns the path `*x`.
+//! Therefore, borrowing `(*x).f` yields restrictions on both
+//! `*x` and `x`.
+//!
+//! ### Checking for illegal assignments, moves, and reborrows
+//!
+//! Once we have computed the loans introduced by each borrow, the borrow
+//! checker uses a data flow propagation to compute the full set of loans
+//! in scope at each expression and then uses that set to decide whether
+//! that expression is legal.  Remember that the scope of loan is defined
+//! by its lifetime LT.  We sometimes say that a loan which is in-scope at
+//! a particular point is an "outstanding loan", and the set of
+//! restrictions included in those loans as the "outstanding
+//! restrictions".
+//!
+//! The kinds of expressions which in-scope loans can render illegal are:
+//! - *assignments* (`lv = v`): illegal if there is an in-scope restriction
+//!   against mutating `lv`;
+//! - *moves*: illegal if there is any in-scope restriction on `lv` at all;
+//! - *mutable borrows* (`&mut lv`): illegal there is an in-scope restriction
+//!   against claiming `lv`;
+//! - *immutable borrows* (`&lv`): illegal there is an in-scope restriction
+//!   against freezing `lv`.
+//!
+//! ## Formal rules
+//!
+//! Now that we hopefully have some kind of intuitive feeling for how the
+//! borrow checker works, let's look a bit more closely now at the precise
+//! conditions that it uses. For simplicity I will ignore const loans.
+//!
+//! I will present the rules in a modified form of standard inference
+//! rules, which looks as follows:
+//!
+//! ```text
+//! PREDICATE(X, Y, Z)                  // Rule-Name
+//!   Condition 1
+//!   Condition 2
+//!   Condition 3
+//! ```
+//!
+//! The initial line states the predicate that is to be satisfied.  The
+//! indented lines indicate the conditions that must be met for the
+//! predicate to be satisfied. The right-justified comment states the name
+//! of this rule: there are comments in the borrowck source referencing
+//! these names, so that you can cross reference to find the actual code
+//! that corresponds to the formal rule.
+//!
+//! ### Invariants
+//!
+//! I want to collect, at a high-level, the invariants the borrow checker
+//! maintains. I will give them names and refer to them throughout the
+//! text. Together these invariants are crucial for the overall soundness
+//! of the system.
+//!
+//! **Mutability requires uniqueness.** To mutate a path
+//!
+//! **Unique mutability.** There is only one *usable* mutable path to any
+//! given memory at any given time. This implies that when claiming memory
+//! with an expression like `p = &mut x`, the compiler must guarantee that
+//! the borrowed value `x` can no longer be mutated so long as `p` is
+//! live. (This is done via restrictions, read on.)
+//!
+//! **.**
+//!
+//!
+//! ### The `gather_loans` pass
+//!
+//! We start with the `gather_loans` pass, which walks the AST looking for
+//! borrows.  For each borrow, there are three bits of information: the
+//! lvalue `LV` being borrowed and the mutability `MQ` and lifetime `LT`
+//! of the resulting pointer. Given those, `gather_loans` applies four
+//! validity tests:
+//!
+//! 1. `MUTABILITY(LV, MQ)`: The mutability of the reference is
+//! compatible with the mutability of `LV` (i.e., not borrowing immutable
+//! data as mutable).
+//!
+//! 2. `ALIASABLE(LV, MQ)`: The aliasability of the reference is
+//! compatible with the aliasability of `LV`. The goal is to prevent
+//! `&mut` borrows of aliasability data.
+//!
+//! 3. `LIFETIME(LV, LT, MQ)`: The lifetime of the borrow does not exceed
+//! the lifetime of the value being borrowed.
+//!
+//! 4. `RESTRICTIONS(LV, LT, ACTIONS) = RS`: This pass checks and computes the
+//! restrictions to maintain memory safety. These are the restrictions
+//! that will go into the final loan. We'll discuss in more detail below.
+//!
+//! ## Checking mutability
+//!
+//! Checking mutability is fairly straightforward. We just want to prevent
+//! immutable data from being borrowed as mutable. Note that it is ok to
+//! borrow mutable data as immutable, since that is simply a
+//! freeze. Formally we define a predicate `MUTABLE(LV, MQ)` which, if
+//! defined, means that "borrowing `LV` with mutability `MQ` is ok. The
+//! Rust code corresponding to this predicate is the function
+//! `check_mutability` in `middle::borrowck::gather_loans`.
+//!
+//! ### Checking mutability of variables
+//!
+//! *Code pointer:* Function `check_mutability()` in `gather_loans/mod.rs`,
+//! but also the code in `mem_categorization`.
+//!
+//! Let's begin with the rules for variables, which state that if a
+//! variable is declared as mutable, it may be borrowed any which way, but
+//! otherwise the variable must be borrowed as immutable or const:
+//!
+//! ```text
+//! MUTABILITY(X, MQ)                   // M-Var-Mut
+//!   DECL(X) = mut
+//!
+//! MUTABILITY(X, MQ)                   // M-Var-Imm
+//!   DECL(X) = imm
+//!   MQ = imm | const
+//! ```
+//!
+//! ### Checking mutability of owned content
+//!
+//! Fields and owned pointers inherit their mutability from
+//! their base expressions, so both of their rules basically
+//! delegate the check to the base expression `LV`:
+//!
+//! ```text
+//! MUTABILITY(LV.f, MQ)                // M-Field
+//!   MUTABILITY(LV, MQ)
+//!
+//! MUTABILITY(*LV, MQ)                 // M-Deref-Unique
+//!   TYPE(LV) = Box<Ty>
+//!   MUTABILITY(LV, MQ)
+//! ```
+//!
+//! ### Checking mutability of immutable pointer types
+//!
+//! Immutable pointer types like `&T` can only
+//! be borrowed if MQ is immutable or const:
+//!
+//! ```text
+//! MUTABILITY(*LV, MQ)                // M-Deref-Borrowed-Imm
+//!   TYPE(LV) = &Ty
+//!   MQ == imm | const
+//! ```
+//!
+//! ### Checking mutability of mutable pointer types
+//!
+//! `&mut T` can be frozen, so it is acceptable to borrow it as either imm or mut:
+//!
+//! ```text
+//! MUTABILITY(*LV, MQ)                 // M-Deref-Borrowed-Mut
+//!   TYPE(LV) = &mut Ty
+//! ```
+//!
+//! ## Checking aliasability
+//!
+//! The goal of the aliasability check is to ensure that we never permit
+//! `&mut` borrows of aliasable data. Formally we define a predicate
+//! `ALIASABLE(LV, MQ)` which if defined means that
+//! "borrowing `LV` with mutability `MQ` is ok". The
+//! Rust code corresponding to this predicate is the function
+//! `check_aliasability()` in `middle::borrowck::gather_loans`.
+//!
+//! ### Checking aliasability of variables
+//!
+//! Local variables are never aliasable as they are accessible only within
+//! the stack frame.
+//!
+//! ```text
+//!     ALIASABLE(X, MQ)                   // M-Var-Mut
+//! ```
+//!
+//! ### Checking aliasable of owned content
+//!
+//! Owned content is aliasable if it is found in an aliasable location:
+//!
+//! ```text
+//! ALIASABLE(LV.f, MQ)                // M-Field
+//!   ALIASABLE(LV, MQ)
+//!
+//! ALIASABLE(*LV, MQ)                 // M-Deref-Unique
+//!   ALIASABLE(LV, MQ)
+//! ```
+//!
+//! ### Checking mutability of immutable pointer types
+//!
+//! Immutable pointer types like `&T` are aliasable, and hence can only be
+//! borrowed immutably:
+//!
+//! ```text
+//! ALIASABLE(*LV, imm)                // M-Deref-Borrowed-Imm
+//!   TYPE(LV) = &Ty
+//! ```
+//!
+//! ### Checking mutability of mutable pointer types
+//!
+//! `&mut T` can be frozen, so it is acceptable to borrow it as either imm or mut:
+//!
+//! ```text
+//! ALIASABLE(*LV, MQ)                 // M-Deref-Borrowed-Mut
+//!   TYPE(LV) = &mut Ty
+//! ```
+//!
+//! ## Checking lifetime
+//!
+//! These rules aim to ensure that no data is borrowed for a scope that exceeds
+//! its lifetime. These two computations wind up being intimately related.
+//! Formally, we define a predicate `LIFETIME(LV, LT, MQ)`, which states that
+//! "the lvalue `LV` can be safely borrowed for the lifetime `LT` with mutability
+//! `MQ`". The Rust code corresponding to this predicate is the module
+//! `middle::borrowck::gather_loans::lifetime`.
+//!
+//! ### The Scope function
+//!
+//! Several of the rules refer to a helper function `SCOPE(LV)=LT`.  The
+//! `SCOPE(LV)` yields the lifetime `LT` for which the lvalue `LV` is
+//! guaranteed to exist, presuming that no mutations occur.
+//!
+//! The scope of a local variable is the block where it is declared:
+//!
+//! ```text
+//!   SCOPE(X) = block where X is declared
+//! ```
+//!
+//! The scope of a field is the scope of the struct:
+//!
+//! ```text
+//!   SCOPE(LV.f) = SCOPE(LV)
+//! ```
+//!
+//! The scope of a unique referent is the scope of the pointer, since
+//! (barring mutation or moves) the pointer will not be freed until
+//! the pointer itself `LV` goes out of scope:
+//!
+//! ```text
+//!   SCOPE(*LV) = SCOPE(LV) if LV has type Box<T>
+//! ```
+//!
+//! The scope of a borrowed referent is the scope associated with the
+//! pointer.  This is a conservative approximation, since the data that
+//! the pointer points at may actually live longer:
+//!
+//! ```text
+//!   SCOPE(*LV) = LT if LV has type &'LT T or &'LT mut T
+//! ```
+//!
+//! ### Checking lifetime of variables
+//!
+//! The rule for variables states that a variable can only be borrowed a
+//! lifetime `LT` that is a subregion of the variable's scope:
+//!
+//! ```text
+//! LIFETIME(X, LT, MQ)                 // L-Local
+//!   LT <= SCOPE(X)
+//! ```
+//!
+//! ### Checking lifetime for owned content
+//!
+//! The lifetime of a field or owned pointer is the same as the lifetime
+//! of its owner:
+//!
+//! ```text
+//! LIFETIME(LV.f, LT, MQ)              // L-Field
+//!   LIFETIME(LV, LT, MQ)
+//!
+//! LIFETIME(*LV, LT, MQ)               // L-Deref-Send
+//!   TYPE(LV) = Box<Ty>
+//!   LIFETIME(LV, LT, MQ)
+//! ```
+//!
+//! ### Checking lifetime for derefs of references
+//!
+//! References have a lifetime `LT'` associated with them.  The
+//! data they point at has been guaranteed to be valid for at least this
+//! lifetime. Therefore, the borrow is valid so long as the lifetime `LT`
+//! of the borrow is shorter than the lifetime `LT'` of the pointer
+//! itself:
+//!
+//! ```text
+//! LIFETIME(*LV, LT, MQ)               // L-Deref-Borrowed
+//!   TYPE(LV) = &LT' Ty OR &LT' mut Ty
+//!   LT <= LT'
+//! ```
+//!
+//! ## Computing the restrictions
+//!
+//! The final rules govern the computation of *restrictions*, meaning that
+//! we compute the set of actions that will be illegal for the life of the
+//! loan. The predicate is written `RESTRICTIONS(LV, LT, ACTIONS) =
+//! RESTRICTION*`, which can be read "in order to prevent `ACTIONS` from
+//! occurring on `LV`, the restrictions `RESTRICTION*` must be respected
+//! for the lifetime of the loan".
+//!
+//! Note that there is an initial set of restrictions: these restrictions
+//! are computed based on the kind of borrow:
+//!
+//! ```text
+//! &mut LV =>   RESTRICTIONS(LV, LT, MUTATE|CLAIM|FREEZE)
+//! &LV =>       RESTRICTIONS(LV, LT, MUTATE|CLAIM)
+//! &const LV => RESTRICTIONS(LV, LT, [])
+//! ```
+//!
+//! The reasoning here is that a mutable borrow must be the only writer,
+//! therefore it prevents other writes (`MUTATE`), mutable borrows
+//! (`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
+//! permits other immutable borrows but forbids writes and mutable borrows.
+//! Finally, a const borrow just wants to be sure that the value is not
+//! moved out from under it, so no actions are forbidden.
+//!
+//! ### Restrictions for loans of a local variable
+//!
+//! The simplest case is a borrow of a local variable `X`:
+//!
+//! ```text
+//! RESTRICTIONS(X, LT, ACTIONS) = (X, ACTIONS)            // R-Variable
+//! ```
+//!
+//! In such cases we just record the actions that are not permitted.
+//!
+//! ### Restrictions for loans of fields
+//!
+//! Restricting a field is the same as restricting the owner of that
+//! field:
+//!
+//! ```text
+//! RESTRICTIONS(LV.f, LT, ACTIONS) = RS, (LV.f, ACTIONS)  // R-Field
+//!   RESTRICTIONS(LV, LT, ACTIONS) = RS
+//! ```
+//!
+//! The reasoning here is as follows. If the field must not be mutated,
+//! then you must not mutate the owner of the field either, since that
+//! would indirectly modify the field. Similarly, if the field cannot be
+//! frozen or aliased, we cannot allow the owner to be frozen or aliased,
+//! since doing so indirectly freezes/aliases the field. This is the
+//! origin of inherited mutability.
+//!
+//! ### Restrictions for loans of owned referents
+//!
+//! Because the mutability of owned referents is inherited, restricting an
+//! owned referent is similar to restricting a field, in that it implies
+//! restrictions on the pointer. However, owned pointers have an important
+//! twist: if the owner `LV` is mutated, that causes the owned referent
+//! `*LV` to be freed! So whenever an owned referent `*LV` is borrowed, we
+//! must prevent the owned pointer `LV` from being mutated, which means
+//! that we always add `MUTATE` and `CLAIM` to the restriction set imposed
+//! on `LV`:
+//!
+//! ```text
+//! RESTRICTIONS(*LV, LT, ACTIONS) = RS, (*LV, ACTIONS)    // R-Deref-Send-Pointer
+//!   TYPE(LV) = Box<Ty>
+//!   RESTRICTIONS(LV, LT, ACTIONS|MUTATE|CLAIM) = RS
+//! ```
+//!
+//! ### Restrictions for loans of immutable borrowed referents
+//!
+//! Immutable borrowed referents are freely aliasable, meaning that
+//! the compiler does not prevent you from copying the pointer.  This
+//! implies that issuing restrictions is useless. We might prevent the
+//! user from acting on `*LV` itself, but there could be another path
+//! `*LV1` that refers to the exact same memory, and we would not be
+//! restricting that path. Therefore, the rule for `&Ty` pointers
+//! always returns an empty set of restrictions, and it only permits
+//! restricting `MUTATE` and `CLAIM` actions:
+//!
+//! ```text
+//! RESTRICTIONS(*LV, LT, ACTIONS) = []                    // R-Deref-Imm-Borrowed
+//!   TYPE(LV) = &LT' Ty
+//!   LT <= LT'                                            // (1)
+//!   ACTIONS subset of [MUTATE, CLAIM]
+//! ```
+//!
+//! The reason that we can restrict `MUTATE` and `CLAIM` actions even
+//! without a restrictions list is that it is never legal to mutate nor to
+//! borrow mutably the contents of a `&Ty` pointer. In other words,
+//! those restrictions are already inherent in the type.
+//!
+//! Clause (1) in the rule for `&Ty` deserves mention. Here I
+//! specify that the lifetime of the loan must be less than the lifetime
+//! of the `&Ty` pointer. In simple cases, this clause is redundant, since
+//! the `LIFETIME()` function will already enforce the required rule:
+//!
+//! ```
+//! fn foo(point: &'a Point) -> &'static f32 {
+//!     &point.x // Error
+//! }
+//! ```
+//!
+//! The above example fails to compile both because of clause (1) above
+//! but also by the basic `LIFETIME()` check. However, in more advanced
+//! examples involving multiple nested pointers, clause (1) is needed:
+//!
+//! ```
+//! fn foo(point: &'a &'b mut Point) -> &'b f32 {
+//!     &point.x // Error
+//! }
+//! ```
+//!
+//! The `LIFETIME` rule here would accept `'b` because, in fact, the
+//! *memory is* guaranteed to remain valid (i.e., not be freed) for the
+//! lifetime `'b`, since the `&mut` pointer is valid for `'b`. However, we
+//! are returning an immutable reference, so we need the memory to be both
+//! valid and immutable. Even though `point.x` is referenced by an `&mut`
+//! pointer, it can still be considered immutable so long as that `&mut`
+//! pointer is found in an aliased location. That means the memory is
+//! guaranteed to be *immutable* for the lifetime of the `&` pointer,
+//! which is only `'a`, not `'b`. Hence this example yields an error.
+//!
+//! As a final twist, consider the case of two nested *immutable*
+//! pointers, rather than a mutable pointer within an immutable one:
+//!
+//! ```
+//! fn foo(point: &'a &'b Point) -> &'b f32 {
+//!     &point.x // OK
+//! }
+//! ```
+//!
+//! This function is legal. The reason for this is that the inner pointer
+//! (`*point : &'b Point`) is enough to guarantee the memory is immutable
+//! and valid for the lifetime `'b`.  This is reflected in
+//! `RESTRICTIONS()` by the fact that we do not recurse (i.e., we impose
+//! no restrictions on `LV`, which in this particular case is the pointer
+//! `point : &'a &'b Point`).
+//!
+//! #### Why both `LIFETIME()` and `RESTRICTIONS()`?
+//!
+//! Given the previous text, it might seem that `LIFETIME` and
+//! `RESTRICTIONS` should be folded together into one check, but there is
+//! a reason that they are separated. They answer separate concerns.
+//! The rules pertaining to `LIFETIME` exist to ensure that we don't
+//! create a borrowed pointer that outlives the memory it points at. So
+//! `LIFETIME` prevents a function like this:
+//!
+//! ```
+//! fn get_1<'a>() -> &'a int {
+//!     let x = 1;
+//!     &x
+//! }
+//! ```
+//!
+//! Here we would be returning a pointer into the stack. Clearly bad.
+//!
+//! However, the `RESTRICTIONS` rules are more concerned with how memory
+//! is used. The example above doesn't generate an error according to
+//! `RESTRICTIONS` because, for local variables, we don't require that the
+//! loan lifetime be a subset of the local variable lifetime. The idea
+//! here is that we *can* guarantee that `x` is not (e.g.) mutated for the
+//! lifetime `'a`, even though `'a` exceeds the function body and thus
+//! involves unknown code in the caller -- after all, `x` ceases to exist
+//! after we return and hence the remaining code in `'a` cannot possibly
+//! mutate it. This distinction is important for type checking functions
+//! like this one:
+//!
+//! ```
+//! fn inc_and_get<'a>(p: &'a mut Point) -> &'a int {
+//!     p.x += 1;
+//!     &p.x
+//! }
+//! ```
+//!
+//! In this case, we take in a `&mut` and return a frozen borrowed pointer
+//! with the same lifetime. So long as the lifetime of the returned value
+//! doesn't exceed the lifetime of the `&mut` we receive as input, this is
+//! fine, though it may seem surprising at first (it surprised me when I
+//! first worked it through). After all, we're guaranteeing that `*p`
+//! won't be mutated for the lifetime `'a`, even though we can't "see" the
+//! entirety of the code during that lifetime, since some of it occurs in
+//! our caller. But we *do* know that nobody can mutate `*p` except
+//! through `p`. So if we don't mutate `*p` and we don't return `p`, then
+//! we know that the right to mutate `*p` has been lost to our caller --
+//! in terms of capability, the caller passed in the ability to mutate
+//! `*p`, and we never gave it back. (Note that we can't return `p` while
+//! `*p` is borrowed since that would be a move of `p`, as `&mut` pointers
+//! are affine.)
+//!
+//! ### Restrictions for loans of const aliasable referents
+//!
+//! Freeze pointers are read-only. There may be `&mut` or `&` aliases, and
+//! we can not prevent *anything* but moves in that case. So the
+//! `RESTRICTIONS` function is only defined if `ACTIONS` is the empty set.
+//! Because moves from a `&const` lvalue are never legal, it is not
+//! necessary to add any restrictions at all to the final result.
+//!
+//! ```text
+//!     RESTRICTIONS(*LV, LT, []) = []                         // R-Deref-Freeze-Borrowed
+//!       TYPE(LV) = &const Ty
+//! ```
+//!
+//! ### Restrictions for loans of mutable borrowed referents
+//!
+//! Mutable borrowed pointers are guaranteed to be the only way to mutate
+//! their referent. This permits us to take greater license with them; for
+//! example, the referent can be frozen simply be ensuring that we do not
+//! use the original pointer to perform mutate. Similarly, we can allow
+//! the referent to be claimed, so long as the original pointer is unused
+//! while the new claimant is live.
+//!
+//! The rule for mutable borrowed pointers is as follows:
+//!
+//! ```text
+//! RESTRICTIONS(*LV, LT, ACTIONS) = RS, (*LV, ACTIONS)    // R-Deref-Mut-Borrowed
+//!   TYPE(LV) = &LT' mut Ty
+//!   LT <= LT'                                            // (1)
+//!   RESTRICTIONS(LV, LT, ACTIONS) = RS                   // (2)
+//! ```
+//!
+//! Let's examine the two numbered clauses:
+//!
+//! Clause (1) specifies that the lifetime of the loan (`LT`) cannot
+//! exceed the lifetime of the `&mut` pointer (`LT'`). The reason for this
+//! is that the `&mut` pointer is guaranteed to be the only legal way to
+//! mutate its referent -- but only for the lifetime `LT'`.  After that
+//! lifetime, the loan on the referent expires and hence the data may be
+//! modified by its owner again. This implies that we are only able to
+//! guarantee that the referent will not be modified or aliased for a
+//! maximum of `LT'`.
+//!
+//! Here is a concrete example of a bug this rule prevents:
+//!
+//! ```
+//! // Test region-reborrow-from-shorter-mut-ref.rs:
+//! fn copy_pointer<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
+//!     &mut **p // ERROR due to clause (1)
+//! }
+//! fn main() {
+//!     let mut x = 1;
+//!     let mut y = &mut x; // <-'b-----------------------------+
+//!     //      +-'a--------------------+                       |
+//!     //      v                       v                       |
+//!     let z = copy_borrowed_ptr(&mut y); // y is lent         |
+//!     *y += 1; // Here y==z, so both should not be usable...  |
+//!     *z += 1; // ...and yet they would be, but for clause 1. |
+//! } // <------------------------------------------------------+
+//! ```
+//!
+//! Clause (2) propagates the restrictions on the referent to the pointer
+//! itself. This is the same as with an owned pointer, though the
+//! reasoning is mildly different. The basic goal in all cases is to
+//! prevent the user from establishing another route to the same data. To
+//! see what I mean, let's examine various cases of what can go wrong and
+//! show how it is prevented.
+//!
+//! **Example danger 1: Moving the base pointer.** One of the simplest
+//! ways to violate the rules is to move the base pointer to a new name
+//! and access it via that new name, thus bypassing the restrictions on
+//! the old name. Here is an example:
+//!
+//! ```
+//! // src/test/compile-fail/borrowck-move-mut-base-ptr.rs
+//! fn foo(t0: &mut int) {
+//!     let p: &int = &*t0; // Freezes `*t0`
+//!     let t1 = t0;        //~ ERROR cannot move out of `t0`
+//!     *t1 = 22;           // OK, not a write through `*t0`
+//! }
+//! ```
+//!
+//! Remember that `&mut` pointers are linear, and hence `let t1 = t0` is a
+//! move of `t0` -- or would be, if it were legal. Instead, we get an
+//! error, because clause (2) imposes restrictions on `LV` (`t0`, here),
+//! and any restrictions on a path make it impossible to move from that
+//! path.
+//!
+//! **Example danger 2: Claiming the base pointer.** Another possible
+//! danger is to mutably borrow the base path. This can lead to two bad
+//! scenarios. The most obvious is that the mutable borrow itself becomes
+//! another path to access the same data, as shown here:
+//!
+//! ```
+//! // src/test/compile-fail/borrowck-mut-borrow-of-mut-base-ptr.rs
+//! fn foo<'a>(mut t0: &'a mut int,
+//!            mut t1: &'a mut int) {
+//!     let p: &int = &*t0;     // Freezes `*t0`
+//!     let mut t2 = &mut t0;   //~ ERROR cannot borrow `t0`
+//!     **t2 += 1;              // Mutates `*t0`
+//! }
+//! ```
+//!
+//! In this example, `**t2` is the same memory as `*t0`. Because `t2` is
+//! an `&mut` pointer, `**t2` is a unique path and hence it would be
+//! possible to mutate `**t2` even though that memory was supposed to be
+//! frozen by the creation of `p`. However, an error is reported -- the
+//! reason is that the freeze `&*t0` will restrict claims and mutation
+//! against `*t0` which, by clause 2, in turn prevents claims and mutation
+//! of `t0`. Hence the claim `&mut t0` is illegal.
+//!
+//! Another danger with an `&mut` pointer is that we could swap the `t0`
+//! value away to create a new path:
+//!
+//! ```
+//! // src/test/compile-fail/borrowck-swap-mut-base-ptr.rs
+//! fn foo<'a>(mut t0: &'a mut int,
+//!            mut t1: &'a mut int) {
+//!     let p: &int = &*t0;     // Freezes `*t0`
+//!     swap(&mut t0, &mut t1); //~ ERROR cannot borrow `t0`
+//!     *t1 = 22;
+//! }
+//! ```
+//!
+//! This is illegal for the same reason as above. Note that if we added
+//! back a swap operator -- as we used to have -- we would want to be very
+//! careful to ensure this example is still illegal.
+//!
+//! **Example danger 3: Freeze the base pointer.** In the case where the
+//! referent is claimed, even freezing the base pointer can be dangerous,
+//! as shown in the following example:
+//!
+//! ```
+//! // src/test/compile-fail/borrowck-borrow-of-mut-base-ptr.rs
+//! fn foo<'a>(mut t0: &'a mut int,
+//!            mut t1: &'a mut int) {
+//!     let p: &mut int = &mut *t0; // Claims `*t0`
+//!     let mut t2 = &t0;           //~ ERROR cannot borrow `t0`
+//!     let q: &int = &*t2;         // Freezes `*t0` but not through `*p`
+//!     *p += 1;                    // violates type of `*q`
+//! }
+//! ```
+//!
+//! Here the problem is that `*t0` is claimed by `p`, and hence `p` wants
+//! to be the controlling pointer through which mutation or freezes occur.
+//! But `t2` would -- if it were legal -- have the type `& &mut int`, and
+//! hence would be a mutable pointer in an aliasable location, which is
+//! considered frozen (since no one can write to `**t2` as it is not a
+//! unique path). Therefore, we could reasonably create a frozen `&int`
+//! pointer pointing at `*t0` that coexists with the mutable pointer `p`,
+//! which is clearly unsound.
+//!
+//! However, it is not always unsafe to freeze the base pointer. In
+//! particular, if the referent is frozen, there is no harm in it:
+//!
+//! ```
+//! // src/test/run-pass/borrowck-borrow-of-mut-base-ptr-safe.rs
+//! fn foo<'a>(mut t0: &'a mut int,
+//!            mut t1: &'a mut int) {
+//!     let p: &int = &*t0; // Freezes `*t0`
+//!     let mut t2 = &t0;
+//!     let q: &int = &*t2; // Freezes `*t0`, but that's ok...
+//!     let r: &int = &*t0; // ...after all, could do same thing directly.
+//! }
+//! ```
+//!
+//! In this case, creating the alias `t2` of `t0` is safe because the only
+//! thing `t2` can be used for is to further freeze `*t0`, which is
+//! already frozen. In particular, we cannot assign to `*t0` through the
+//! new alias `t2`, as demonstrated in this test case:
+//!
+//! ```
+//! // src/test/run-pass/borrowck-borrow-mut-base-ptr-in-aliasable-loc.rs
+//! fn foo(t0: & &mut int) {
+//!     let t1 = t0;
+//!     let p: &int = &**t0;
+//!     **t1 = 22; //~ ERROR cannot assign
+//! }
+//! ```
+//!
+//! This distinction is reflected in the rules. When doing an `&mut`
+//! borrow -- as in the first example -- the set `ACTIONS` will be
+//! `CLAIM|MUTATE|FREEZE`, because claiming the referent implies that it
+//! cannot be claimed, mutated, or frozen by anyone else. These
+//! restrictions are propagated back to the base path and hence the base
+//! path is considered unfreezable.
+//!
+//! In contrast, when the referent is merely frozen -- as in the second
+//! example -- the set `ACTIONS` will be `CLAIM|MUTATE`, because freezing
+//! the referent implies that it cannot be claimed or mutated but permits
+//! others to freeze. Hence when these restrictions are propagated back to
+//! the base path, it will still be considered freezable.
+//!
+//!
+//!
+//! **FIXME #10520: Restrictions against mutating the base pointer.** When
+//! an `&mut` pointer is frozen or claimed, we currently pass along the
+//! restriction against MUTATE to the base pointer. I do not believe this
+//! restriction is needed. It dates from the days when we had a way to
+//! mutate that preserved the value being mutated (i.e., swap). Nowadays
+//! the only form of mutation is assignment, which destroys the pointer
+//! being mutated -- therefore, a mutation cannot create a new path to the
+//! same data. Rather, it removes an existing path. This implies that not
+//! only can we permit mutation, we can have mutation kill restrictions in
+//! the dataflow sense.
+//!
+//! **WARNING:** We do not currently have `const` borrows in the
+//! language. If they are added back in, we must ensure that they are
+//! consistent with all of these examples. The crucial question will be
+//! what sorts of actions are permitted with a `&const &mut` pointer. I
+//! would suggest that an `&mut` referent found in an `&const` location be
+//! prohibited from both freezes and claims. This would avoid the need to
+//! prevent `const` borrows of the base pointer when the referent is
+//! borrowed.
+//!
+//! # Moves and initialization
+//!
+//! The borrow checker is also in charge of ensuring that:
+//!
+//! - all memory which is accessed is initialized
+//! - immutable local variables are assigned at most once.
+//!
+//! These are two separate dataflow analyses built on the same
+//! framework. Let's look at checking that memory is initialized first;
+//! the checking of immutable local variable assignments works in a very
+//! similar way.
+//!
+//! To track the initialization of memory, we actually track all the
+//! points in the program that *create uninitialized memory*, meaning
+//! moves and the declaration of uninitialized variables. For each of
+//! these points, we create a bit in the dataflow set. Assignments to a
+//! variable `x` or path `a.b.c` kill the move/uninitialization bits for
+//! those paths and any subpaths (e.g., `x`, `x.y`, `a.b.c`, `*a.b.c`).
+//! Bits are unioned when two control-flow paths join. Thus, the
+//! presence of a bit indicates that the move may have occurred without an
+//! intervening assignment to the same memory. At each use of a variable,
+//! we examine the bits in scope, and check that none of them are
+//! moves/uninitializations of the variable that is being used.
+//!
+//! Let's look at a simple example:
+//!
+//! ```
+//! fn foo(a: Box<int>) {
+//!     let b: Box<int>;   // Gen bit 0.
+//!
+//!     if cond {          // Bits: 0
+//!         use(&*a);
+//!         b = a;         // Gen bit 1, kill bit 0.
+//!         use(&*b);
+//!     } else {
+//!                        // Bits: 0
+//!     }
+//!                        // Bits: 0,1
+//!     use(&*a);          // Error.
+//!     use(&*b);          // Error.
+//! }
+//!
+//! fn use(a: &int) { }
+//! ```
+//!
+//! In this example, the variable `b` is created uninitialized. In one
+//! branch of an `if`, we then move the variable `a` into `b`. Once we
+//! exit the `if`, therefore, it is an error to use `a` or `b` since both
+//! are only conditionally initialized. I have annotated the dataflow
+//! state using comments. There are two dataflow bits, with bit 0
+//! corresponding to the creation of `b` without an initializer, and bit 1
+//! corresponding to the move of `a`. The assignment `b = a` both
+//! generates bit 1, because it is a move of `a`, and kills bit 0, because
+//! `b` is now initialized. On the else branch, though, `b` is never
+//! initialized, and so bit 0 remains untouched. When the two flows of
+//! control join, we union the bits from both sides, resulting in both
+//! bits 0 and 1 being set. Thus any attempt to use `a` uncovers the bit 1
+//! from the "then" branch, showing that `a` may be moved, and any attempt
+//! to use `b` uncovers bit 0, from the "else" branch, showing that `b`
+//! may not be initialized.
+//!
+//! ## Initialization of immutable variables
+//!
+//! Initialization of immutable variables works in a very similar way,
+//! except that:
+//!
+//! 1. we generate bits for each assignment to a variable;
+//! 2. the bits are never killed except when the variable goes out of scope.
+//!
+//! Thus the presence of an assignment bit indicates that the assignment
+//! may have occurred. Note that assignments are only killed when the
+//! variable goes out of scope, as it is not relevant whether or not there
+//! has been a move in the meantime. Using these bits, we can declare that
+//! an assignment to an immutable variable is legal iff there is no other
+//! assignment bit to that same variable in scope.
+//!
+//! ## Why is the design made this way?
+//!
+//! It may seem surprising that we assign dataflow bits to *each move*
+//! rather than *each path being moved*. This is somewhat less efficient,
+//! since on each use, we must iterate through all moves and check whether
+//! any of them correspond to the path in question. Similar concerns apply
+//! to the analysis for double assignments to immutable variables. The
+//! main reason to do it this way is that it allows us to print better
+//! error messages, because when a use occurs, we can print out the
+//! precise move that may be in scope, rather than simply having to say
+//! "the variable may not be initialized".
+//!
+//! ## Data structures used in the move analysis
+//!
+//! The move analysis maintains several data structures that enable it to
+//! cross-reference moves and assignments to determine when they may be
+//! moving/assigning the same memory. These are all collected into the
+//! `MoveData` and `FlowedMoveData` structs. The former represents the set
+//! of move paths, moves, and assignments, and the latter adds in the
+//! results of a dataflow computation.
+//!
+//! ### Move paths
+//!
+//! The `MovePath` tree tracks every path that is moved or assigned to.
+//! These paths have the same form as the `LoanPath` data structure, which
+//! in turn is the "real world version of the lvalues `LV` that we
+//! introduced earlier. The difference between a `MovePath` and a `LoanPath`
+//! is that move paths are:
+//!
+//! 1. Canonicalized, so that we have exactly one copy of each, and
+//!    we can refer to move paths by index;
+//! 2. Cross-referenced with other paths into a tree, so that given a move
+//!    path we can efficiently find all parent move paths and all
+//!    extensions (e.g., given the `a.b` move path, we can easily find the
+//!    move path `a` and also the move paths `a.b.c`)
+//! 3. Cross-referenced with moves and assignments, so that we can
+//!    easily find all moves and assignments to a given path.
+//!
+//! The mechanism that we use is to create a `MovePath` record for each
+//! move path. These are arranged in an array and are referenced using
+//! `MovePathIndex` values, which are newtype'd indices. The `MovePath`
+//! structs are arranged into a tree, representing using the standard
+//! Knuth representation where each node has a child 'pointer' and a "next
+//! sibling" 'pointer'. In addition, each `MovePath` has a parent
+//! 'pointer'.  In this case, the 'pointers' are just `MovePathIndex`
+//! values.
+//!
+//! In this way, if we want to find all base paths of a given move path,
+//! we can just iterate up the parent pointers (see `each_base_path()` in
+//! the `move_data` module). If we want to find all extensions, we can
+//! iterate through the subtree (see `each_extending_path()`).
+//!
+//! ### Moves and assignments
+//!
+//! There are structs to represent moves (`Move`) and assignments
+//! (`Assignment`), and these are also placed into arrays and referenced
+//! by index. All moves of a particular path are arranged into a linked
+//! lists, beginning with `MovePath.first_move` and continuing through
+//! `Move.next_move`.
+//!
+//! We distinguish between "var" assignments, which are assignments to a
+//! variable like `x = foo`, and "path" assignments (`x.f = foo`).  This
+//! is because we need to assign dataflows to the former, but not the
+//! latter, so as to check for double initialization of immutable
+//! variables.
+//!
+//! ### Gathering and checking moves
+//!
+//! Like loans, we distinguish two phases. The first, gathering, is where
+//! we uncover all the moves and assignments. As with loans, we do some
+//! basic sanity checking in this phase, so we'll report errors if you
+//! attempt to move out of a borrowed pointer etc. Then we do the dataflow
+//! (see `FlowedMoveData::new`). Finally, in the `check_loans.rs` code, we
+//! walk back over, identify all uses, assignments, and captures, and
+//! check that they are legal given the set of dataflow bits we have
+//! computed for that program point.
+//!
+//! # Drop flags and structural fragments
+//!
+//! In addition to the job of enforcing memory safety, the borrow checker
+//! code is also responsible for identifying the *structural fragments* of
+//! data in the function, to support out-of-band dynamic drop flags
+//! allocated on the stack. (For background, see [RFC PR #320].)
+//!
+//! [RFC PR #320]: https://github.com/rust-lang/rfcs/pull/320
+//!
+//! Semantically, each piece of data that has a destructor may need a
+//! boolean flag to indicate whether or not its destructor has been run
+//! yet. However, in many cases there is no need to actually maintain such
+//! a flag: It can be apparent from the code itself that a given path is
+//! always initialized (or always deinitialized) when control reaches the
+//! end of its owner's scope, and thus we can unconditionally emit (or
+//! not) the destructor invocation for that path.
+//!
+//! A simple example of this is the following:
+//!
+//! ```rust
+//! struct D { p: int }
+//! impl D { fn new(x: int) -> D { ... }
+//! impl Drop for D { ... }
+//!
+//! fn foo(a: D, b: D, t: || -> bool) {
+//!     let c: D;
+//!     let d: D;
+//!     if t() { c = b; }
+//! }
+//! ```
+//!
+//! At the end of the body of `foo`, the compiler knows that `a` is
+//! initialized, introducing a drop obligation (deallocating the boxed
+//! integer) for the end of `a`'s scope that is run unconditionally.
+//! Likewise the compiler knows that `d` is not initialized, and thus it
+//! leave out the drop code for `d`.
+//!
+//! The compiler cannot statically know the drop-state of `b` nor `c` at
+//! the end of their scope, since that depends on the value of
+//! `t`. Therefore, we need to insert boolean flags to track whether we
+//! need to drop `b` and `c`.
+//!
+//! However, the matter is not as simple as just mapping local variables
+//! to their corresponding drop flags when necessary. In particular, in
+//! addition to being able to move data out of local variables, Rust
+//! allows one to move values in and out of structured data.
+//!
+//! Consider the following:
+//!
+//! ```rust
+//! struct S { x: D, y: D, z: D }
+//!
+//! fn foo(a: S, mut b: S, t: || -> bool) {
+//!     let mut c: S;
+//!     let d: S;
+//!     let e: S = a.clone();
+//!     if t() {
+//!         c = b;
+//!         b.x = e.y;
+//!     }
+//!     if t() { c.y = D::new(4); }
+//! }
+//! ```
+//!
+//! As before, the drop obligations of `a` and `d` can be statically
+//! determined, and again the state of `b` and `c` depend on dynamic
+//! state. But additionally, the dynamic drop obligations introduced by
+//! `b` and `c` are not just per-local boolean flags. For example, if the
+//! first call to `t` returns `false` and the second call `true`, then at
+//! the end of their scope, `b` will be completely initialized, but only
+//! `c.y` in `c` will be initialized.  If both calls to `t` return `true`,
+//! then at the end of their scope, `c` will be completely initialized,
+//! but only `b.x` will be initialized in `b`, and only `e.x` and `e.z`
+//! will be initialized in `e`.
+//!
+//! Note that we need to cover the `z` field in each case in some way,
+//! since it may (or may not) need to be dropped, even though `z` is never
+//! directly mentioned in the body of the `foo` function. We call a path
+//! like `b.z` a *fragment sibling* of `b.x`, since the field `z` comes
+//! from the same structure `S` that declared the field `x` in `b.x`.
+//!
+//! In general we need to maintain boolean flags that match the
+//! `S`-structure of both `b` and `c`.  In addition, we need to consult
+//! such a flag when doing an assignment (such as `c.y = D::new(4);`
+//! above), in order to know whether or not there is a previous value that
+//! needs to be dropped before we do the assignment.
+//!
+//! So for any given function, we need to determine what flags are needed
+//! to track its drop obligations. Our strategy for determining the set of
+//! flags is to represent the fragmentation of the structure explicitly:
+//! by starting initially from the paths that are explicitly mentioned in
+//! moves and assignments (such as `b.x` and `c.y` above), and then
+//! traversing the structure of the path's type to identify leftover
+//! *unmoved fragments*: assigning into `c.y` means that `c.x` and `c.z`
+//! are leftover unmoved fragments. Each fragment represents a drop
+//! obligation that may need to be tracked. Paths that are only moved or
+//! assigned in their entirety (like `a` and `d`) are treated as a single
+//! drop obligation.
+//!
+//! The fragment construction process works by piggy-backing on the
+//! existing `move_data` module. We already have callbacks that visit each
+//! direct move and assignment; these form the basis for the sets of
+//! moved_leaf_paths and assigned_leaf_paths. From these leaves, we can
+//! walk up their parent chain to identify all of their parent paths.
+//! We need to identify the parents because of cases like the following:
+//!
+//! ```rust
+//! struct Pair<X,Y>{ x: X, y: Y }
+//! fn foo(dd_d_d: Pair<Pair<Pair<D, D>, D>, D>) {
+//!     other_function(dd_d_d.x.y);
+//! }
+//! ```
+//!
+//! In this code, the move of the path `dd_d.x.y` leaves behind not only
+//! the fragment drop-obligation `dd_d.x.x` but also `dd_d.y` as well.
+//!
+//! Once we have identified the directly-referenced leaves and their
+//! parents, we compute the left-over fragments, in the function
+//! `fragments::add_fragment_siblings`. As of this writing this works by
+//! looking at each directly-moved or assigned path P, and blindly
+//! gathering all sibling fields of P (as well as siblings for the parents
+//! of P, etc). After accumulating all such siblings, we filter out the
+//! entries added as siblings of P that turned out to be
+//! directly-referenced paths (or parents of directly referenced paths)
+//! themselves, thus leaving the never-referenced "left-overs" as the only
+//! thing left from the gathering step.
+//!
+//! ## Array structural fragments
+//!
+//! A special case of the structural fragments discussed above are
+//! the elements of an array that has been passed by value, such as
+//! the following:
+//!
+//! ```rust
+//! fn foo(a: [D, ..10], i: uint) -> D {
+//!     a[i]
+//! }
+//! ```
+//!
+//! The above code moves a single element out of the input array `a`.
+//! The remainder of the array still needs to be dropped; i.e., it
+//! is a structural fragment. Note that after performing such a move,
+//! it is not legal to read from the array `a`. There are a number of
+//! ways to deal with this, but the important thing to note is that
+//! the semantics needs to distinguish in some manner between a
+//! fragment that is the *entire* array versus a fragment that represents
+//! all-but-one element of the array.  A place where that distinction
+//! would arise is the following:
+//!
+//! ```rust
+//! fn foo(a: [D, ..10], b: [D, ..10], i: uint, t: bool) -> D {
+//!     if t {
+//!         a[i]
+//!     } else {
+//!         b[i]
+//!     }
+//!
+//!     // When control exits, we will need either to drop all of `a`
+//!     // and all-but-one of `b`, or to drop all of `b` and all-but-one
+//!     // of `a`.
+//! }
+//! ```
+//!
+//! There are a number of ways that the trans backend could choose to
+//! compile this (e.g. a `[bool, ..10]` array for each such moved array;
+//! or an `Option<uint>` for each moved array).  From the viewpoint of the
+//! borrow-checker, the important thing is to record what kind of fragment
+//! is implied by the relevant moves.
+//!
+//! # Future work
+//!
+//! While writing up these docs, I encountered some rules I believe to be
+//! stricter than necessary:
+//!
+//! - I think restricting the `&mut` LV against moves and `ALIAS` is sufficient,
+//!   `MUTATE` and `CLAIM` are overkill. `MUTATE` was necessary when swap was
+//!   a built-in operator, but as it is not, it is implied by `CLAIM`,
+//!   and `CLAIM` is implied by `ALIAS`. The only net effect of this is an
+//!   extra error message in some cases, though.
+//! - I have not described how closures interact. Current code is unsound.
+//!   I am working on describing and implementing the fix.
+//! - If we wish, we can easily extend the move checking to allow finer-grained
+//!   tracking of what is initialized and what is not, enabling code like
+//!   this:
+//!
+//!       a = x.f.g; // x.f.g is now uninitialized
+//!       // here, x and x.f are not usable, but x.f.h *is*
+//!       x.f.g = b; // x.f.g is not initialized
+//!       // now x, x.f, x.f.g, x.f.h are all usable
+//!
+//!   What needs to change here, most likely, is that the `moves` module
+//!   should record not only what paths are moved, but what expressions
+//!   are actual *uses*. For example, the reference to `x` in `x.f.g = b`
+//!   is not a true *use* in the sense that it requires `x` to be fully
+//!   initialized. This is in fact why the above code produces an error
+//!   today: the reference to `x` in `x.f.g = b` is considered illegal
+//!   because `x` is not fully initialized.
+//!
+//! There are also some possible refactorings:
+//!
+//! - It might be nice to replace all loan paths with the MovePath mechanism,
+//!   since they allow lightweight comparison using an integer.
diff --git a/src/librustc_borrowck/borrowck/fragments.rs b/src/librustc_borrowck/borrowck/fragments.rs
new file mode 100644 (file)
index 0000000..25ed518
--- /dev/null
@@ -0,0 +1,475 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Helper routines used for fragmenting structural paths due to moves for
+//! tracking drop obligations. Please see the extensive comments in the
+//! section "Structural fragments" in `doc.rs`.
+
+use self::Fragment::*;
+
+use borrowck::{LoanPath};
+use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
+use borrowck::LoanPathElem::{LpDeref, LpInterior};
+use borrowck::move_data::{InvalidMovePathIndex};
+use borrowck::move_data::{MoveData, MovePathIndex};
+use rustc::session::config;
+use rustc::middle::ty;
+use rustc::middle::mem_categorization as mc;
+use rustc::util::ppaux::{Repr, UserString};
+use std::mem;
+use std::rc::Rc;
+use std::slice;
+use syntax::ast;
+use syntax::ast_map;
+use syntax::attr::AttrMetaMethods;
+use syntax::codemap::Span;
+
+#[deriving(PartialEq, Eq, PartialOrd, Ord)]
+enum Fragment {
+    // This represents the path described by the move path index
+    Just(MovePathIndex),
+
+    // This represents the collection of all but one of the elements
+    // from an array at the path described by the move path index.
+    // Note that attached MovePathIndex should have mem_categorization
+    // of InteriorElement (i.e. array dereference `[]`).
+    AllButOneFrom(MovePathIndex),
+}
+
+impl Fragment {
+    fn loan_path_repr<'tcx>(&self, move_data: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) -> String {
+        let repr = |mpi| move_data.path_loan_path(mpi).repr(tcx);
+        match *self {
+            Just(mpi) => repr(mpi),
+            AllButOneFrom(mpi) => format!("$(allbutone {})", repr(mpi)),
+        }
+    }
+
+    fn loan_path_user_string<'tcx>(&self,
+                                   move_data: &MoveData<'tcx>,
+                                   tcx: &ty::ctxt<'tcx>) -> String {
+        let user_string = |mpi| move_data.path_loan_path(mpi).user_string(tcx);
+        match *self {
+            Just(mpi) => user_string(mpi),
+            AllButOneFrom(mpi) => format!("$(allbutone {})", user_string(mpi)),
+        }
+    }
+}
+
+pub struct FragmentSets {
+    /// During move_data construction, `moved_leaf_paths` tracks paths
+    /// that have been used directly by being moved out of.  When
+    /// move_data construction has been completed, `moved_leaf_paths`
+    /// tracks such paths that are *leaf fragments* (e.g. `a.j` if we
+    /// never move out any child like `a.j.x`); any parent paths
+    /// (e.g. `a` for the `a.j` example) are moved over to
+    /// `parents_of_fragments`.
+    moved_leaf_paths: Vec<MovePathIndex>,
+
+    /// `assigned_leaf_paths` tracks paths that have been used
+    /// directly by being overwritten, but is otherwise much like
+    /// `moved_leaf_paths`.
+    assigned_leaf_paths: Vec<MovePathIndex>,
+
+    /// `parents_of_fragments` tracks paths that are definitely
+    /// parents of paths that have been moved.
+    ///
+    /// FIXME(pnkfelix) probably do not want/need
+    /// `parents_of_fragments` at all, if we can avoid it.
+    ///
+    /// Update: I do not see a way to to avoid it.  Maybe just remove
+    /// above fixme, or at least document why doing this may be hard.
+    parents_of_fragments: Vec<MovePathIndex>,
+
+    /// During move_data construction (specifically the
+    /// fixup_fragment_sets call), `unmoved_fragments` tracks paths
+    /// that have been "left behind" after a sibling has been moved or
+    /// assigned.  When move_data construction has been completed,
+    /// `unmoved_fragments` tracks paths that were *only* results of
+    /// being left-behind, and never directly moved themselves.
+    unmoved_fragments: Vec<Fragment>,
+}
+
+impl FragmentSets {
+    pub fn new() -> FragmentSets {
+        FragmentSets {
+            unmoved_fragments: Vec::new(),
+            moved_leaf_paths: Vec::new(),
+            assigned_leaf_paths: Vec::new(),
+            parents_of_fragments: Vec::new(),
+        }
+    }
+
+    pub fn add_move(&mut self, path_index: MovePathIndex) {
+        self.moved_leaf_paths.push(path_index);
+    }
+
+    pub fn add_assignment(&mut self, path_index: MovePathIndex) {
+        self.assigned_leaf_paths.push(path_index);
+    }
+}
+
+pub fn instrument_move_fragments<'tcx>(this: &MoveData<'tcx>,
+                                       tcx: &ty::ctxt<'tcx>,
+                                       sp: Span,
+                                       id: ast::NodeId) {
+    let (span_err, print) = {
+        let attrs : &[ast::Attribute];
+        attrs = match tcx.map.find(id) {
+            Some(ast_map::NodeItem(ref item)) =>
+                item.attrs.as_slice(),
+            Some(ast_map::NodeImplItem(&ast::MethodImplItem(ref m))) =>
+                m.attrs.as_slice(),
+            Some(ast_map::NodeTraitItem(&ast::ProvidedMethod(ref m))) =>
+                m.attrs.as_slice(),
+            _ => [].as_slice(),
+        };
+
+        let span_err =
+            attrs.iter().any(|a| a.check_name("rustc_move_fragments"));
+        let print = tcx.sess.debugging_opt(config::PRINT_MOVE_FRAGMENTS);
+
+        (span_err, print)
+    };
+
+    if !span_err && !print { return; }
+
+    let instrument_all_paths = |kind, vec_rc: &Vec<MovePathIndex>| {
+        for (i, mpi) in vec_rc.iter().enumerate() {
+            let render = || this.path_loan_path(*mpi).user_string(tcx);
+            if span_err {
+                tcx.sess.span_err(sp, format!("{}: `{}`", kind, render()).as_slice());
+            }
+            if print {
+                println!("id:{} {}[{}] `{}`", id, kind, i, render());
+            }
+        }
+    };
+
+    let instrument_all_fragments = |kind, vec_rc: &Vec<Fragment>| {
+        for (i, f) in vec_rc.iter().enumerate() {
+            let render = || f.loan_path_user_string(this, tcx);
+            if span_err {
+                tcx.sess.span_err(sp, format!("{}: `{}`", kind, render()).as_slice());
+            }
+            if print {
+                println!("id:{} {}[{}] `{}`", id, kind, i, render());
+            }
+        }
+    };
+
+    let fragments = this.fragments.borrow();
+    instrument_all_paths("moved_leaf_path", &fragments.moved_leaf_paths);
+    instrument_all_fragments("unmoved_fragment", &fragments.unmoved_fragments);
+    instrument_all_paths("parent_of_fragments", &fragments.parents_of_fragments);
+    instrument_all_paths("assigned_leaf_path", &fragments.assigned_leaf_paths);
+}
+
+/// Normalizes the fragment sets in `this`; i.e., removes duplicate entries, constructs the set of
+/// parents, and constructs the left-over fragments.
+///
+/// Note: "left-over fragments" means paths that were not directly referenced in moves nor
+/// assignments, but must nonetheless be tracked as potential drop obligations.
+pub fn fixup_fragment_sets<'tcx>(this: &MoveData<'tcx>, tcx: &ty::ctxt<'tcx>) {
+
+    let mut fragments = this.fragments.borrow_mut();
+
+    // Swap out contents of fragments so that we can modify the fields
+    // without borrowing the common fragments.
+    let mut unmoved = mem::replace(&mut fragments.unmoved_fragments, vec![]);
+    let mut parents = mem::replace(&mut fragments.parents_of_fragments, vec![]);
+    let mut moved = mem::replace(&mut fragments.moved_leaf_paths, vec![]);
+    let mut assigned = mem::replace(&mut fragments.assigned_leaf_paths, vec![]);
+
+    let path_lps = |mpis: &[MovePathIndex]| -> Vec<String> {
+        mpis.iter().map(|mpi| this.path_loan_path(*mpi).repr(tcx)).collect()
+    };
+
+    let frag_lps = |fs: &[Fragment]| -> Vec<String> {
+        fs.iter().map(|f| f.loan_path_repr(this, tcx)).collect()
+    };
+
+    // First, filter out duplicates
+    moved.sort();
+    moved.dedup();
+    debug!("fragments 1 moved: {}", path_lps(moved.as_slice()));
+
+    assigned.sort();
+    assigned.dedup();
+    debug!("fragments 1 assigned: {}", path_lps(assigned.as_slice()));
+
+    // Second, build parents from the moved and assigned.
+    for m in moved.iter() {
+        let mut p = this.path_parent(*m);
+        while p != InvalidMovePathIndex {
+            parents.push(p);
+            p = this.path_parent(p);
+        }
+    }
+    for a in assigned.iter() {
+        let mut p = this.path_parent(*a);
+        while p != InvalidMovePathIndex {
+            parents.push(p);
+            p = this.path_parent(p);
+        }
+    }
+
+    parents.sort();
+    parents.dedup();
+    debug!("fragments 2 parents: {}", path_lps(parents.as_slice()));
+
+    // Third, filter the moved and assigned fragments down to just the non-parents
+    moved.retain(|f| non_member(*f, parents.as_slice()));
+    debug!("fragments 3 moved: {}", path_lps(moved.as_slice()));
+
+    assigned.retain(|f| non_member(*f, parents.as_slice()));
+    debug!("fragments 3 assigned: {}", path_lps(assigned.as_slice()));
+
+    // Fourth, build the leftover from the moved, assigned, and parents.
+    for m in moved.iter() {
+        let lp = this.path_loan_path(*m);
+        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
+    }
+    for a in assigned.iter() {
+        let lp = this.path_loan_path(*a);
+        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
+    }
+    for p in parents.iter() {
+        let lp = this.path_loan_path(*p);
+        add_fragment_siblings(this, tcx, &mut unmoved, lp, None);
+    }
+
+    unmoved.sort();
+    unmoved.dedup();
+    debug!("fragments 4 unmoved: {}", frag_lps(unmoved.as_slice()));
+
+    // Fifth, filter the leftover fragments down to its core.
+    unmoved.retain(|f| match *f {
+        AllButOneFrom(_) => true,
+        Just(mpi) => non_member(mpi, parents.as_slice()) &&
+            non_member(mpi, moved.as_slice()) &&
+            non_member(mpi, assigned.as_slice())
+    });
+    debug!("fragments 5 unmoved: {}", frag_lps(unmoved.as_slice()));
+
+    // Swap contents back in.
+    fragments.unmoved_fragments = unmoved;
+    fragments.parents_of_fragments = parents;
+    fragments.moved_leaf_paths = moved;
+    fragments.assigned_leaf_paths = assigned;
+
+    return;
+
+    fn non_member(elem: MovePathIndex, set: &[MovePathIndex]) -> bool {
+        match set.binary_search_elem(&elem) {
+            slice::BinarySearchResult::Found(_) => false,
+            slice::BinarySearchResult::NotFound(_) => true,
+        }
+    }
+}
+
+/// Adds all of the precisely-tracked siblings of `lp` as potential move paths of interest. For
+/// example, if `lp` represents `s.x.j`, then adds moves paths for `s.x.i` and `s.x.k`, the
+/// siblings of `s.x.j`.
+fn add_fragment_siblings<'tcx>(this: &MoveData<'tcx>,
+                               tcx: &ty::ctxt<'tcx>,
+                               gathered_fragments: &mut Vec<Fragment>,
+                               lp: Rc<LoanPath<'tcx>>,
+                               origin_id: Option<ast::NodeId>) {
+    match lp.kind {
+        LpVar(_) | LpUpvar(..) => {} // Local variables have no siblings.
+
+        // Consuming a downcast is like consuming the original value, so propage inward.
+        LpDowncast(ref loan_parent, _) => {
+            add_fragment_siblings(this, tcx, gathered_fragments, loan_parent.clone(), origin_id);
+        }
+
+        // *LV for OwnedPtr consumes the contents of the box (at
+        // least when it is non-copy...), so propagate inward.
+        LpExtend(ref loan_parent, _, LpDeref(mc::OwnedPtr)) => {
+            add_fragment_siblings(this, tcx, gathered_fragments, loan_parent.clone(), origin_id);
+        }
+
+        // *LV for unsafe and borrowed pointers do not consume their loan path, so stop here.
+        LpExtend(_, _, LpDeref(mc::UnsafePtr(..)))   |
+        LpExtend(_, _, LpDeref(mc::Implicit(..)))    |
+        LpExtend(_, _, LpDeref(mc::BorrowedPtr(..))) => {}
+
+        // FIXME(pnkfelix): LV[j] should be tracked, at least in the
+        // sense of we will track the remaining drop obligation of the
+        // rest of the array.
+        //
+        // LV[j] is not tracked precisely
+        LpExtend(_, _, LpInterior(mc::InteriorElement(_))) => {
+            let mp = this.move_path(tcx, lp.clone());
+            gathered_fragments.push(AllButOneFrom(mp));
+        }
+
+        // field access LV.x and tuple access LV#k are the cases
+        // we are interested in
+        LpExtend(ref loan_parent, mc,
+                 LpInterior(mc::InteriorField(ref field_name))) => {
+            let enum_variant_info = match loan_parent.kind {
+                LpDowncast(ref loan_parent_2, variant_def_id) =>
+                    Some((variant_def_id, loan_parent_2.clone())),
+                LpExtend(..) | LpVar(..) | LpUpvar(..) =>
+                    None,
+            };
+            add_fragment_siblings_for_extension(
+                this,
+                tcx,
+                gathered_fragments,
+                loan_parent, mc, field_name, &lp, origin_id, enum_variant_info);
+        }
+    }
+}
+
+/// We have determined that `origin_lp` destructures to LpExtend(parent, original_field_name).
+/// Based on this, add move paths for all of the siblings of `origin_lp`.
+fn add_fragment_siblings_for_extension<'tcx>(this: &MoveData<'tcx>,
+                                             tcx: &ty::ctxt<'tcx>,
+                                             gathered_fragments: &mut Vec<Fragment>,
+                                             parent_lp: &Rc<LoanPath<'tcx>>,
+                                             mc: mc::MutabilityCategory,
+                                             origin_field_name: &mc::FieldName,
+                                             origin_lp: &Rc<LoanPath<'tcx>>,
+                                             origin_id: Option<ast::NodeId>,
+                                             enum_variant_info: Option<(ast::DefId,
+                                                                        Rc<LoanPath<'tcx>>)>) {
+    let parent_ty = parent_lp.to_type();
+
+    let add_fragment_sibling_local = |field_name, variant_did| {
+        add_fragment_sibling_core(
+            this, tcx, gathered_fragments, parent_lp.clone(), mc, field_name, origin_lp,
+            variant_did);
+    };
+
+    match (&parent_ty.sty, enum_variant_info) {
+        (&ty::ty_tup(ref v), None) => {
+            let tuple_idx = match *origin_field_name {
+                mc::PositionalField(tuple_idx) => tuple_idx,
+                mc::NamedField(_) =>
+                    panic!("tuple type {} should not have named fields.",
+                           parent_ty.repr(tcx)),
+            };
+            let tuple_len = v.len();
+            for i in range(0, tuple_len) {
+                if i == tuple_idx { continue }
+                let field_name = mc::PositionalField(i);
+                add_fragment_sibling_local(field_name, None);
+            }
+        }
+
+        (&ty::ty_struct(def_id, ref _substs), None) => {
+            let fields = ty::lookup_struct_fields(tcx, def_id);
+            match *origin_field_name {
+                mc::NamedField(ast_name) => {
+                    for f in fields.iter() {
+                        if f.name == ast_name {
+                            continue;
+                        }
+                        let field_name = mc::NamedField(f.name);
+                        add_fragment_sibling_local(field_name, None);
+                    }
+                }
+                mc::PositionalField(tuple_idx) => {
+                    for (i, _f) in fields.iter().enumerate() {
+                        if i == tuple_idx {
+                            continue
+                        }
+                        let field_name = mc::PositionalField(i);
+                        add_fragment_sibling_local(field_name, None);
+                    }
+                }
+            }
+        }
+
+        (&ty::ty_enum(enum_def_id, ref substs), ref enum_variant_info) => {
+            let variant_info = {
+                let mut variants = ty::substd_enum_variants(tcx, enum_def_id, substs);
+                match *enum_variant_info {
+                    Some((variant_def_id, ref _lp2)) =>
+                        variants.iter()
+                        .find(|variant| variant.id == variant_def_id)
+                        .expect("enum_variant_with_id(): no variant exists with that ID")
+                        .clone(),
+                    None => {
+                        assert_eq!(variants.len(), 1);
+                        variants.pop().unwrap()
+                    }
+                }
+            };
+            match *origin_field_name {
+                mc::NamedField(ast_name) => {
+                    let variant_arg_names = variant_info.arg_names.as_ref().unwrap();
+                    for variant_arg_ident in variant_arg_names.iter() {
+                        if variant_arg_ident.name == ast_name {
+                            continue;
+                        }
+                        let field_name = mc::NamedField(variant_arg_ident.name);
+                        add_fragment_sibling_local(field_name, Some(variant_info.id));
+                    }
+                }
+                mc::PositionalField(tuple_idx) => {
+                    let variant_arg_types = &variant_info.args;
+                    for (i, _variant_arg_ty) in variant_arg_types.iter().enumerate() {
+                        if tuple_idx == i {
+                            continue;
+                        }
+                        let field_name = mc::PositionalField(i);
+                        add_fragment_sibling_local(field_name, None);
+                    }
+                }
+            }
+        }
+
+        ref sty_and_variant_info => {
+            let msg = format!("type {} ({}) is not fragmentable",
+                              parent_ty.repr(tcx), sty_and_variant_info);
+            let opt_span = origin_id.and_then(|id|tcx.map.opt_span(id));
+            tcx.sess.opt_span_bug(opt_span, msg.as_slice())
+        }
+    }
+}
+
+/// Adds the single sibling `LpExtend(parent, new_field_name)` of `origin_lp` (the original
+/// loan-path).
+fn add_fragment_sibling_core<'tcx>(this: &MoveData<'tcx>,
+                                   tcx: &ty::ctxt<'tcx>,
+                                   gathered_fragments: &mut Vec<Fragment>,
+                                   parent: Rc<LoanPath<'tcx>>,
+                                   mc: mc::MutabilityCategory,
+                                   new_field_name: mc::FieldName,
+                                   origin_lp: &Rc<LoanPath<'tcx>>,
+                                   enum_variant_did: Option<ast::DefId>) -> MovePathIndex {
+    let opt_variant_did = match parent.kind {
+        LpDowncast(_, variant_did) => Some(variant_did),
+        LpVar(..) | LpUpvar(..) | LpExtend(..) => enum_variant_did,
+    };
+
+    let loan_path_elem = LpInterior(mc::InteriorField(new_field_name));
+    let new_lp_type = match new_field_name {
+        mc::NamedField(ast_name) =>
+            ty::named_element_ty(tcx, parent.to_type(), ast_name, opt_variant_did),
+        mc::PositionalField(idx) =>
+            ty::positional_element_ty(tcx, parent.to_type(), idx, opt_variant_did),
+    };
+    let new_lp_variant = LpExtend(parent, mc, loan_path_elem);
+    let new_lp = LoanPath::new(new_lp_variant, new_lp_type.unwrap());
+    debug!("add_fragment_sibling_core(new_lp={}, origin_lp={})",
+           new_lp.repr(tcx), origin_lp.repr(tcx));
+    let mp = this.move_path(tcx, Rc::new(new_lp));
+
+    // Do not worry about checking for duplicates here; we will sort
+    // and dedup after all are added.
+    gathered_fragments.push(Just(mp));
+
+    mp
+}
diff --git a/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs b/src/librustc_borrowck/borrowck/gather_loans/gather_moves.rs
new file mode 100644 (file)
index 0000000..01cbab6
--- /dev/null
@@ -0,0 +1,197 @@
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Computes moves.
+
+use borrowck::*;
+use borrowck::LoanPathKind::*;
+use borrowck::gather_loans::move_error::MoveSpanAndPath;
+use borrowck::gather_loans::move_error::{MoveError, MoveErrorCollector};
+use borrowck::move_data::*;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::ty;
+use rustc::util::ppaux::Repr;
+use std::rc::Rc;
+use syntax::ast;
+use syntax::codemap::Span;
+
+struct GatherMoveInfo<'tcx> {
+    id: ast::NodeId,
+    kind: MoveKind,
+    cmt: mc::cmt<'tcx>,
+    span_path_opt: Option<MoveSpanAndPath>
+}
+
+pub fn gather_decl<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                             move_data: &MoveData<'tcx>,
+                             decl_id: ast::NodeId,
+                             _decl_span: Span,
+                             var_id: ast::NodeId) {
+    let ty = ty::node_id_to_type(bccx.tcx, var_id);
+    let loan_path = Rc::new(LoanPath::new(LpVar(var_id), ty));
+    move_data.add_move(bccx.tcx, loan_path, decl_id, Declared);
+}
+
+pub fn gather_move_from_expr<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                       move_data: &MoveData<'tcx>,
+                                       move_error_collector: &MoveErrorCollector<'tcx>,
+                                       move_expr_id: ast::NodeId,
+                                       cmt: mc::cmt<'tcx>,
+                                       move_reason: euv::MoveReason) {
+    let kind = match move_reason {
+        euv::DirectRefMove | euv::PatBindingMove => MoveExpr,
+        euv::CaptureMove => Captured
+    };
+    let move_info = GatherMoveInfo {
+        id: move_expr_id,
+        kind: kind,
+        cmt: cmt,
+        span_path_opt: None,
+    };
+    gather_move(bccx, move_data, move_error_collector, move_info);
+}
+
+pub fn gather_match_variant<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                      move_data: &MoveData<'tcx>,
+                                      _move_error_collector: &MoveErrorCollector<'tcx>,
+                                      move_pat: &ast::Pat,
+                                      cmt: mc::cmt<'tcx>,
+                                      mode: euv::MatchMode) {
+    let tcx = bccx.tcx;
+    debug!("gather_match_variant(move_pat={}, cmt={}, mode={})",
+           move_pat.id, cmt.repr(tcx), mode);
+
+    let opt_lp = opt_loan_path(&cmt);
+    match opt_lp {
+        Some(lp) => {
+            match lp.kind {
+                LpDowncast(ref base_lp, _) =>
+                    move_data.add_variant_match(
+                        tcx, lp.clone(), move_pat.id, base_lp.clone(), mode),
+                _ => panic!("should only call gather_match_variant \
+                             for cat_downcast cmt"),
+            }
+        }
+        None => {
+            // We get None when input to match is non-path (e.g.
+            // temporary result like a function call). Since no
+            // loan-path is being matched, no need to record a
+            // downcast.
+            return;
+        }
+    }
+}
+
+pub fn gather_move_from_pat<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                      move_data: &MoveData<'tcx>,
+                                      move_error_collector: &MoveErrorCollector<'tcx>,
+                                      move_pat: &ast::Pat,
+                                      cmt: mc::cmt<'tcx>) {
+    let pat_span_path_opt = match move_pat.node {
+        ast::PatIdent(_, ref path1, _) => {
+            Some(MoveSpanAndPath{span: move_pat.span,
+                                 ident: path1.node})
+        },
+        _ => None,
+    };
+    let move_info = GatherMoveInfo {
+        id: move_pat.id,
+        kind: MovePat,
+        cmt: cmt,
+        span_path_opt: pat_span_path_opt,
+    };
+    gather_move(bccx, move_data, move_error_collector, move_info);
+}
+
+fn gather_move<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                         move_data: &MoveData<'tcx>,
+                         move_error_collector: &MoveErrorCollector<'tcx>,
+                         move_info: GatherMoveInfo<'tcx>) {
+    debug!("gather_move(move_id={}, cmt={})",
+           move_info.id, move_info.cmt.repr(bccx.tcx));
+
+    let potentially_illegal_move =
+                check_and_get_illegal_move_origin(bccx, &move_info.cmt);
+    match potentially_illegal_move {
+        Some(illegal_move_origin) => {
+            debug!("illegal_move_origin={}", illegal_move_origin.repr(bccx.tcx));
+            let error = MoveError::with_move_info(illegal_move_origin,
+                                                  move_info.span_path_opt);
+            move_error_collector.add_error(error);
+            return
+        }
+        None => ()
+    }
+
+    match opt_loan_path(&move_info.cmt) {
+        Some(loan_path) => {
+            move_data.add_move(bccx.tcx, loan_path,
+                               move_info.id, move_info.kind);
+        }
+        None => {
+            // move from rvalue or unsafe pointer, hence ok
+        }
+    }
+}
+
+pub fn gather_assignment<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                   move_data: &MoveData<'tcx>,
+                                   assignment_id: ast::NodeId,
+                                   assignment_span: Span,
+                                   assignee_loan_path: Rc<LoanPath<'tcx>>,
+                                   assignee_id: ast::NodeId,
+                                   mode: euv::MutateMode) {
+    move_data.add_assignment(bccx.tcx,
+                             assignee_loan_path,
+                             assignment_id,
+                             assignment_span,
+                             assignee_id,
+                             mode);
+}
+
+fn check_and_get_illegal_move_origin<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                               cmt: &mc::cmt<'tcx>)
+                                               -> Option<mc::cmt<'tcx>> {
+    match cmt.cat {
+        mc::cat_deref(_, _, mc::BorrowedPtr(..)) |
+        mc::cat_deref(_, _, mc::Implicit(..)) |
+        mc::cat_deref(_, _, mc::UnsafePtr(..)) |
+        mc::cat_static_item => {
+            Some(cmt.clone())
+        }
+
+        mc::cat_rvalue(..) |
+        mc::cat_local(..) |
+        mc::cat_upvar(..) => {
+            None
+        }
+
+        mc::cat_downcast(ref b, _) |
+        mc::cat_interior(ref b, _) => {
+            match b.ty.sty {
+                ty::ty_struct(did, _) | ty::ty_enum(did, _) => {
+                    if ty::has_dtor(bccx.tcx, did) {
+                        Some(cmt.clone())
+                    } else {
+                        check_and_get_illegal_move_origin(bccx, b)
+                    }
+                }
+                _ => {
+                    check_and_get_illegal_move_origin(bccx, b)
+                }
+            }
+        }
+
+        mc::cat_deref(ref b, _, mc::OwnedPtr) => {
+            check_and_get_illegal_move_origin(bccx, b)
+        }
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/gather_loans/lifetime.rs b/src/librustc_borrowck/borrowck/gather_loans/lifetime.rs
new file mode 100644 (file)
index 0000000..d7c9634
--- /dev/null
@@ -0,0 +1,145 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! This module implements the check that the lifetime of a borrow
+//! does not exceed the lifetime of the value being borrowed.
+
+use borrowck::*;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::region;
+use rustc::middle::ty;
+use rustc::util::ppaux::Repr;
+use syntax::ast;
+use syntax::codemap::Span;
+
+type R = Result<(),()>;
+
+pub fn guarantee_lifetime<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                    item_scope: region::CodeExtent,
+                                    span: Span,
+                                    cause: euv::LoanCause,
+                                    cmt: mc::cmt<'tcx>,
+                                    loan_region: ty::Region,
+                                    _: ty::BorrowKind)
+                                    -> Result<(),()> {
+    //! Reports error if `loan_region` is larger than S
+    //! where S is `item_scope` if `cmt` is an upvar,
+    //! and is scope of `cmt` otherwise.
+    debug!("guarantee_lifetime(cmt={}, loan_region={})",
+           cmt.repr(bccx.tcx), loan_region.repr(bccx.tcx));
+    let ctxt = GuaranteeLifetimeContext {bccx: bccx,
+                                         item_scope: item_scope,
+                                         span: span,
+                                         cause: cause,
+                                         loan_region: loan_region,
+                                         cmt_original: cmt.clone()};
+    ctxt.check(&cmt, None)
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Private
+
+struct GuaranteeLifetimeContext<'a, 'tcx: 'a> {
+    bccx: &'a BorrowckCtxt<'a, 'tcx>,
+
+    // the scope of the function body for the enclosing item
+    item_scope: region::CodeExtent,
+
+    span: Span,
+    cause: euv::LoanCause,
+    loan_region: ty::Region,
+    cmt_original: mc::cmt<'tcx>
+}
+
+impl<'a, 'tcx> GuaranteeLifetimeContext<'a, 'tcx> {
+
+    fn check(&self, cmt: &mc::cmt<'tcx>, discr_scope: Option<ast::NodeId>) -> R {
+        //! Main routine. Walks down `cmt` until we find the
+        //! "guarantor".  Reports an error if `self.loan_region` is
+        //! larger than scope of `cmt`.
+        debug!("guarantee_lifetime.check(cmt={}, loan_region={})",
+               cmt.repr(self.bccx.tcx),
+               self.loan_region.repr(self.bccx.tcx));
+
+        match cmt.cat {
+            mc::cat_rvalue(..) |
+            mc::cat_local(..) |                         // L-Local
+            mc::cat_upvar(..) |
+            mc::cat_deref(_, _, mc::BorrowedPtr(..)) |  // L-Deref-Borrowed
+            mc::cat_deref(_, _, mc::Implicit(..)) |
+            mc::cat_deref(_, _, mc::UnsafePtr(..)) => {
+                self.check_scope(self.scope(cmt))
+            }
+
+            mc::cat_static_item => {
+                Ok(())
+            }
+
+            mc::cat_downcast(ref base, _) |
+            mc::cat_deref(ref base, _, mc::OwnedPtr) |     // L-Deref-Send
+            mc::cat_interior(ref base, _) => {             // L-Field
+                self.check(base, discr_scope)
+            }
+        }
+    }
+
+    fn check_scope(&self, max_scope: ty::Region) -> R {
+        //! Reports an error if `loan_region` is larger than `max_scope`
+
+        if !self.bccx.is_subregion_of(self.loan_region, max_scope) {
+            Err(self.report_error(err_out_of_scope(max_scope, self.loan_region)))
+        } else {
+            Ok(())
+        }
+    }
+
+    fn scope(&self, cmt: &mc::cmt) -> ty::Region {
+        //! Returns the maximal region scope for the which the
+        //! lvalue `cmt` is guaranteed to be valid without any
+        //! rooting etc, and presuming `cmt` is not mutated.
+
+        // See the SCOPE(LV) function in doc.rs
+
+        match cmt.cat {
+            mc::cat_rvalue(temp_scope) => {
+                temp_scope
+            }
+            mc::cat_upvar(..) => {
+                ty::ReScope(self.item_scope)
+            }
+            mc::cat_static_item => {
+                ty::ReStatic
+            }
+            mc::cat_local(local_id) => {
+                ty::ReScope(self.bccx.tcx.region_maps.var_scope(local_id))
+            }
+            mc::cat_deref(_, _, mc::UnsafePtr(..)) => {
+                ty::ReStatic
+            }
+            mc::cat_deref(_, _, mc::BorrowedPtr(_, r)) |
+            mc::cat_deref(_, _, mc::Implicit(_, r)) => {
+                r
+            }
+            mc::cat_downcast(ref cmt, _) |
+            mc::cat_deref(ref cmt, _, mc::OwnedPtr) |
+            mc::cat_interior(ref cmt, _) => {
+                self.scope(cmt)
+            }
+        }
+    }
+
+    fn report_error(&self, code: bckerr_code) {
+        self.bccx.report(BckError { cmt: self.cmt_original.clone(),
+                                    span: self.span,
+                                    cause: self.cause,
+                                    code: code });
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/gather_loans/mod.rs b/src/librustc_borrowck/borrowck/gather_loans/mod.rs
new file mode 100644 (file)
index 0000000..08d12f8
--- /dev/null
@@ -0,0 +1,517 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// ----------------------------------------------------------------------
+// Gathering loans
+//
+// The borrow check proceeds in two phases. In phase one, we gather the full
+// set of loans that are required at any point.  These are sorted according to
+// their associated scopes.  In phase two, checking loans, we will then make
+// sure that all of these loans are honored.
+
+use borrowck::*;
+use borrowck::LoanPathKind::*;
+use borrowck::move_data::MoveData;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::region;
+use rustc::middle::ty;
+use rustc::util::ppaux::{Repr};
+use syntax::ast;
+use syntax::codemap::Span;
+use syntax::visit;
+use syntax::visit::Visitor;
+use syntax::ast::{Expr, FnDecl, Block, NodeId, Pat};
+
+mod lifetime;
+mod restrictions;
+mod gather_moves;
+mod move_error;
+
+pub fn gather_loans_in_fn<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                    fn_id: NodeId,
+                                    decl: &ast::FnDecl,
+                                    body: &ast::Block)
+                                    -> (Vec<Loan<'tcx>>,
+                                        move_data::MoveData<'tcx>) {
+    let mut glcx = GatherLoanCtxt {
+        bccx: bccx,
+        all_loans: Vec::new(),
+        item_ub: region::CodeExtent::from_node_id(body.id),
+        move_data: MoveData::new(),
+        move_error_collector: move_error::MoveErrorCollector::new(),
+    };
+
+    let param_env = ty::ParameterEnvironment::for_item(bccx.tcx, fn_id);
+
+    {
+        let mut euv = euv::ExprUseVisitor::new(&mut glcx,
+                                               bccx.tcx,
+                                               param_env);
+        euv.walk_fn(decl, body);
+    }
+
+    glcx.report_potential_errors();
+    let GatherLoanCtxt { all_loans, move_data, .. } = glcx;
+    (all_loans, move_data)
+}
+
+struct GatherLoanCtxt<'a, 'tcx: 'a> {
+    bccx: &'a BorrowckCtxt<'a, 'tcx>,
+    move_data: move_data::MoveData<'tcx>,
+    move_error_collector: move_error::MoveErrorCollector<'tcx>,
+    all_loans: Vec<Loan<'tcx>>,
+    /// `item_ub` is used as an upper-bound on the lifetime whenever we
+    /// ask for the scope of an expression categorized as an upvar.
+    item_ub: region::CodeExtent,
+}
+
+impl<'a, 'tcx> euv::Delegate<'tcx> for GatherLoanCtxt<'a, 'tcx> {
+    fn consume(&mut self,
+               consume_id: ast::NodeId,
+               _consume_span: Span,
+               cmt: mc::cmt<'tcx>,
+               mode: euv::ConsumeMode) {
+        debug!("consume(consume_id={}, cmt={}, mode={})",
+               consume_id, cmt.repr(self.tcx()), mode);
+
+        match mode {
+            euv::Move(move_reason) => {
+                gather_moves::gather_move_from_expr(
+                    self.bccx, &self.move_data, &self.move_error_collector,
+                    consume_id, cmt, move_reason);
+            }
+            euv::Copy => { }
+        }
+    }
+
+    fn matched_pat(&mut self,
+                   matched_pat: &ast::Pat,
+                   cmt: mc::cmt<'tcx>,
+                   mode: euv::MatchMode) {
+        debug!("matched_pat(matched_pat={}, cmt={}, mode={})",
+               matched_pat.repr(self.tcx()),
+               cmt.repr(self.tcx()),
+               mode);
+
+        if let mc::cat_downcast(..) = cmt.cat {
+            gather_moves::gather_match_variant(
+                self.bccx, &self.move_data, &self.move_error_collector,
+                matched_pat, cmt, mode);
+        }
+    }
+
+    fn consume_pat(&mut self,
+                   consume_pat: &ast::Pat,
+                   cmt: mc::cmt<'tcx>,
+                   mode: euv::ConsumeMode) {
+        debug!("consume_pat(consume_pat={}, cmt={}, mode={})",
+               consume_pat.repr(self.tcx()),
+               cmt.repr(self.tcx()),
+               mode);
+
+        match mode {
+            euv::Copy => { return; }
+            euv::Move(_) => { }
+        }
+
+        gather_moves::gather_move_from_pat(
+            self.bccx, &self.move_data, &self.move_error_collector,
+            consume_pat, cmt);
+    }
+
+    fn borrow(&mut self,
+              borrow_id: ast::NodeId,
+              borrow_span: Span,
+              cmt: mc::cmt<'tcx>,
+              loan_region: ty::Region,
+              bk: ty::BorrowKind,
+              loan_cause: euv::LoanCause)
+    {
+        debug!("borrow(borrow_id={}, cmt={}, loan_region={}, \
+               bk={}, loan_cause={})",
+               borrow_id, cmt.repr(self.tcx()), loan_region,
+               bk, loan_cause);
+
+        self.guarantee_valid(borrow_id,
+                             borrow_span,
+                             cmt,
+                             bk,
+                             loan_region,
+                             loan_cause);
+    }
+
+    fn mutate(&mut self,
+              assignment_id: ast::NodeId,
+              assignment_span: Span,
+              assignee_cmt: mc::cmt<'tcx>,
+              mode: euv::MutateMode)
+    {
+        debug!("mutate(assignment_id={}, assignee_cmt={})",
+               assignment_id, assignee_cmt.repr(self.tcx()));
+
+        match opt_loan_path(&assignee_cmt) {
+            Some(lp) => {
+                gather_moves::gather_assignment(self.bccx, &self.move_data,
+                                                assignment_id, assignment_span,
+                                                lp, assignee_cmt.id, mode);
+            }
+            None => {
+                // This can occur with e.g. `*foo() = 5`.  In such
+                // cases, there is no need to check for conflicts
+                // with moves etc, just ignore.
+            }
+        }
+    }
+
+    fn decl_without_init(&mut self, id: ast::NodeId, span: Span) {
+        gather_moves::gather_decl(self.bccx, &self.move_data, id, span, id);
+    }
+}
+
+/// Implements the A-* rules in doc.rs.
+fn check_aliasability<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                borrow_span: Span,
+                                loan_cause: euv::LoanCause,
+                                cmt: mc::cmt<'tcx>,
+                                req_kind: ty::BorrowKind)
+                                -> Result<(),()> {
+
+    match (cmt.freely_aliasable(bccx.tcx), req_kind) {
+        (None, _) => {
+            /* Uniquely accessible path -- OK for `&` and `&mut` */
+            Ok(())
+        }
+        (Some(mc::AliasableStatic(safety)), ty::ImmBorrow) => {
+            // Borrow of an immutable static item:
+            match safety {
+                mc::InteriorUnsafe => {
+                    // If the static item contains an Unsafe<T>, it has interior
+                    // mutability.  In such cases, another phase of the compiler
+                    // will ensure that the type is `Sync` and then trans will
+                    // not put it in rodata, so this is ok to allow.
+                    Ok(())
+                }
+                mc::InteriorSafe => {
+                    // Immutable static can be borrowed, no problem.
+                    Ok(())
+                }
+            }
+        }
+        (Some(mc::AliasableStaticMut(..)), _) => {
+            // Even touching a static mut is considered unsafe. We assume the
+            // user knows what they're doing in these cases.
+            Ok(())
+        }
+        (Some(alias_cause), ty::UniqueImmBorrow) |
+        (Some(alias_cause), ty::MutBorrow) => {
+            bccx.report_aliasability_violation(
+                        borrow_span,
+                        BorrowViolation(loan_cause),
+                        alias_cause);
+            Err(())
+        }
+        (_, _) => {
+            Ok(())
+        }
+    }
+}
+
+impl<'a, 'tcx> GatherLoanCtxt<'a, 'tcx> {
+    pub fn tcx(&self) -> &'a ty::ctxt<'tcx> { self.bccx.tcx }
+
+    /// Guarantees that `addr_of(cmt)` will be valid for the duration of `static_scope_r`, or
+    /// reports an error.  This may entail taking out loans, which will be added to the
+    /// `req_loan_map`.
+    fn guarantee_valid(&mut self,
+                       borrow_id: ast::NodeId,
+                       borrow_span: Span,
+                       cmt: mc::cmt<'tcx>,
+                       req_kind: ty::BorrowKind,
+                       loan_region: ty::Region,
+                       cause: euv::LoanCause) {
+        debug!("guarantee_valid(borrow_id={}, cmt={}, \
+                req_mutbl={}, loan_region={})",
+               borrow_id,
+               cmt.repr(self.tcx()),
+               req_kind,
+               loan_region);
+
+        // a loan for the empty region can never be dereferenced, so
+        // it is always safe
+        if loan_region == ty::ReEmpty {
+            return;
+        }
+
+        // Check that the lifetime of the borrow does not exceed
+        // the lifetime of the data being borrowed.
+        if lifetime::guarantee_lifetime(self.bccx, self.item_ub,
+                                        borrow_span, cause, cmt.clone(), loan_region,
+                                        req_kind).is_err() {
+            return; // reported an error, no sense in reporting more.
+        }
+
+        // Check that we don't allow mutable borrows of non-mutable data.
+        if check_mutability(self.bccx, borrow_span, cause,
+                            cmt.clone(), req_kind).is_err() {
+            return; // reported an error, no sense in reporting more.
+        }
+
+        // Check that we don't allow mutable borrows of aliasable data.
+        if check_aliasability(self.bccx, borrow_span, cause,
+                              cmt.clone(), req_kind).is_err() {
+            return; // reported an error, no sense in reporting more.
+        }
+
+        // Compute the restrictions that are required to enforce the
+        // loan is safe.
+        let restr = restrictions::compute_restrictions(
+            self.bccx, borrow_span, cause,
+            cmt.clone(), loan_region);
+
+        debug!("guarantee_valid(): restrictions={}", restr);
+
+        // Create the loan record (if needed).
+        let loan = match restr {
+            restrictions::Safe => {
+                // No restrictions---no loan record necessary
+                return;
+            }
+
+            restrictions::SafeIf(loan_path, restricted_paths) => {
+                let loan_scope = match loan_region {
+                    ty::ReScope(scope) => scope,
+
+                    ty::ReFree(ref fr) => fr.scope,
+
+                    ty::ReStatic => {
+                        // If we get here, an error must have been
+                        // reported in
+                        // `lifetime::guarantee_lifetime()`, because
+                        // the only legal ways to have a borrow with a
+                        // static lifetime should not require
+                        // restrictions. To avoid reporting derived
+                        // errors, we just return here without adding
+                        // any loans.
+                        return;
+                    }
+
+                    ty::ReEmpty |
+                    ty::ReLateBound(..) |
+                    ty::ReEarlyBound(..) |
+                    ty::ReInfer(..) => {
+                        self.tcx().sess.span_bug(
+                            cmt.span,
+                            format!("invalid borrow lifetime: {}",
+                                    loan_region).as_slice());
+                    }
+                };
+                debug!("loan_scope = {}", loan_scope);
+
+                let borrow_scope = region::CodeExtent::from_node_id(borrow_id);
+                let gen_scope = self.compute_gen_scope(borrow_scope, loan_scope);
+                debug!("gen_scope = {}", gen_scope);
+
+                let kill_scope = self.compute_kill_scope(loan_scope, &*loan_path);
+                debug!("kill_scope = {}", kill_scope);
+
+                if req_kind == ty::MutBorrow {
+                    self.mark_loan_path_as_mutated(&*loan_path);
+                }
+
+                Loan {
+                    index: self.all_loans.len(),
+                    loan_path: loan_path,
+                    kind: req_kind,
+                    gen_scope: gen_scope,
+                    kill_scope: kill_scope,
+                    span: borrow_span,
+                    restricted_paths: restricted_paths,
+                    cause: cause,
+                }
+            }
+        };
+
+        debug!("guarantee_valid(borrow_id={}), loan={}",
+               borrow_id, loan.repr(self.tcx()));
+
+        // let loan_path = loan.loan_path;
+        // let loan_gen_scope = loan.gen_scope;
+        // let loan_kill_scope = loan.kill_scope;
+        self.all_loans.push(loan);
+
+        // if loan_gen_scope != borrow_id {
+            // FIXME(#6268) Nested method calls
+            //
+            // Typically, the scope of the loan includes the point at
+            // which the loan is originated. This
+            // This is a subtle case. See the test case
+            // <compile-fail/borrowck-bad-nested-calls-free.rs>
+            // to see what we are guarding against.
+
+            //let restr = restrictions::compute_restrictions(
+            //    self.bccx, borrow_span, cmt, RESTR_EMPTY);
+            //let loan = {
+            //    let all_loans = &mut *self.all_loans; // FIXME(#5074)
+            //    Loan {
+            //        index: all_loans.len(),
+            //        loan_path: loan_path,
+            //        cmt: cmt,
+            //        mutbl: ConstMutability,
+            //        gen_scope: borrow_id,
+            //        kill_scope: kill_scope,
+            //        span: borrow_span,
+            //        restrictions: restrictions
+            //    }
+        // }
+
+        fn check_mutability<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                      borrow_span: Span,
+                                      cause: euv::LoanCause,
+                                      cmt: mc::cmt<'tcx>,
+                                      req_kind: ty::BorrowKind)
+                                      -> Result<(),()> {
+            //! Implements the M-* rules in doc.rs.
+
+            match req_kind {
+                ty::UniqueImmBorrow | ty::ImmBorrow => {
+                    match cmt.mutbl {
+                        // I am intentionally leaving this here to help
+                        // refactoring if, in the future, we should add new
+                        // kinds of mutability.
+                        mc::McImmutable | mc::McDeclared | mc::McInherited => {
+                            // both imm and mut data can be lent as imm;
+                            // for mutable data, this is a freeze
+                            Ok(())
+                        }
+                    }
+                }
+
+                ty::MutBorrow => {
+                    // Only mutable data can be lent as mutable.
+                    if !cmt.mutbl.is_mutable() {
+                        Err(bccx.report(BckError { span: borrow_span,
+                                                   cause: cause,
+                                                   cmt: cmt,
+                                                   code: err_mutbl }))
+                    } else {
+                        Ok(())
+                    }
+                }
+            }
+        }
+    }
+
+    pub fn mark_loan_path_as_mutated(&self, loan_path: &LoanPath) {
+        //! For mutable loans of content whose mutability derives
+        //! from a local variable, mark the mutability decl as necessary.
+
+        match loan_path.kind {
+            LpVar(local_id) |
+            LpUpvar(ty::UpvarId{ var_id: local_id, closure_expr_id: _ }) => {
+                self.tcx().used_mut_nodes.borrow_mut().insert(local_id);
+            }
+            LpDowncast(ref base, _) |
+            LpExtend(ref base, mc::McInherited, _) |
+            LpExtend(ref base, mc::McDeclared, _) => {
+                self.mark_loan_path_as_mutated(&**base);
+            }
+            LpExtend(_, mc::McImmutable, _) => {
+                // Nothing to do.
+            }
+        }
+    }
+
+    pub fn compute_gen_scope(&self,
+                             borrow_scope: region::CodeExtent,
+                             loan_scope: region::CodeExtent)
+                             -> region::CodeExtent {
+        //! Determine when to introduce the loan. Typically the loan
+        //! is introduced at the point of the borrow, but in some cases,
+        //! notably method arguments, the loan may be introduced only
+        //! later, once it comes into scope.
+
+        if self.bccx.tcx.region_maps.is_subscope_of(borrow_scope, loan_scope) {
+            borrow_scope
+        } else {
+            loan_scope
+        }
+    }
+
+    pub fn compute_kill_scope(&self, loan_scope: region::CodeExtent, lp: &LoanPath<'tcx>)
+                              -> region::CodeExtent {
+        //! Determine when the loan restrictions go out of scope.
+        //! This is either when the lifetime expires or when the
+        //! local variable which roots the loan-path goes out of scope,
+        //! whichever happens faster.
+        //!
+        //! It may seem surprising that we might have a loan region
+        //! larger than the variable which roots the loan-path; this can
+        //! come about when variables of `&mut` type are re-borrowed,
+        //! as in this example:
+        //!
+        //!     fn counter<'a>(v: &'a mut Foo) -> &'a mut uint {
+        //!         &mut v.counter
+        //!     }
+        //!
+        //! In this case, the reference (`'a`) outlives the
+        //! variable `v` that hosts it. Note that this doesn't come up
+        //! with immutable `&` pointers, because borrows of such pointers
+        //! do not require restrictions and hence do not cause a loan.
+
+        let lexical_scope = lp.kill_scope(self.bccx.tcx);
+        let rm = &self.bccx.tcx.region_maps;
+        if rm.is_subscope_of(lexical_scope, loan_scope) {
+            lexical_scope
+        } else {
+            assert!(self.bccx.tcx.region_maps.is_subscope_of(loan_scope, lexical_scope));
+            loan_scope
+        }
+    }
+
+    pub fn report_potential_errors(&self) {
+        self.move_error_collector.report_potential_errors(self.bccx);
+    }
+}
+
+/// Context used while gathering loans on static initializers
+///
+/// This visitor walks static initializer's expressions and makes
+/// sure the loans being taken are sound.
+struct StaticInitializerCtxt<'a, 'tcx: 'a> {
+    bccx: &'a BorrowckCtxt<'a, 'tcx>
+}
+
+impl<'a, 'tcx, 'v> Visitor<'v> for StaticInitializerCtxt<'a, 'tcx> {
+    fn visit_expr(&mut self, ex: &Expr) {
+        if let ast::ExprAddrOf(mutbl, ref base) = ex.node {
+            let base_cmt = self.bccx.cat_expr(&**base);
+            let borrow_kind = ty::BorrowKind::from_mutbl(mutbl);
+            // Check that we don't allow borrows of unsafe static items.
+            if check_aliasability(self.bccx, ex.span, euv::AddrOf,
+                                  base_cmt, borrow_kind).is_err() {
+                return; // reported an error, no sense in reporting more.
+            }
+        }
+
+        visit::walk_expr(self, ex);
+    }
+}
+
+pub fn gather_loans_in_static_initializer(bccx: &mut BorrowckCtxt, expr: &ast::Expr) {
+
+    debug!("gather_loans_in_static_initializer(expr={})", expr.repr(bccx.tcx));
+
+    let mut sicx = StaticInitializerCtxt {
+        bccx: bccx
+    };
+
+    sicx.visit_expr(expr);
+}
diff --git a/src/librustc_borrowck/borrowck/gather_loans/move_error.rs b/src/librustc_borrowck/borrowck/gather_loans/move_error.rs
new file mode 100644 (file)
index 0000000..fbe7815
--- /dev/null
@@ -0,0 +1,164 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use borrowck::BorrowckCtxt;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::ty;
+use rustc::util::ppaux::UserString;
+use std::cell::RefCell;
+use syntax::ast;
+use syntax::codemap;
+use syntax::print::pprust;
+
+pub struct MoveErrorCollector<'tcx> {
+    errors: RefCell<Vec<MoveError<'tcx>>>
+}
+
+impl<'tcx> MoveErrorCollector<'tcx> {
+    pub fn new() -> MoveErrorCollector<'tcx> {
+        MoveErrorCollector {
+            errors: RefCell::new(Vec::new())
+        }
+    }
+
+    pub fn add_error(&self, error: MoveError<'tcx>) {
+        self.errors.borrow_mut().push(error);
+    }
+
+    pub fn report_potential_errors<'a>(&self, bccx: &BorrowckCtxt<'a, 'tcx>) {
+        report_move_errors(bccx, self.errors.borrow().deref())
+    }
+}
+
+pub struct MoveError<'tcx> {
+    move_from: mc::cmt<'tcx>,
+    move_to: Option<MoveSpanAndPath>
+}
+
+impl<'tcx> MoveError<'tcx> {
+    pub fn with_move_info(move_from: mc::cmt<'tcx>,
+                          move_to: Option<MoveSpanAndPath>)
+                          -> MoveError<'tcx> {
+        MoveError {
+            move_from: move_from,
+            move_to: move_to,
+        }
+    }
+}
+
+#[deriving(Clone)]
+pub struct MoveSpanAndPath {
+    pub span: codemap::Span,
+    pub ident: ast::Ident
+}
+
+pub struct GroupedMoveErrors<'tcx> {
+    move_from: mc::cmt<'tcx>,
+    move_to_places: Vec<MoveSpanAndPath>
+}
+
+fn report_move_errors<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                errors: &Vec<MoveError<'tcx>>) {
+    let grouped_errors = group_errors_with_same_origin(errors);
+    for error in grouped_errors.iter() {
+        report_cannot_move_out_of(bccx, error.move_from.clone());
+        let mut is_first_note = true;
+        for move_to in error.move_to_places.iter() {
+            note_move_destination(bccx, move_to.span,
+                                  &move_to.ident, is_first_note);
+            is_first_note = false;
+        }
+    }
+}
+
+fn group_errors_with_same_origin<'tcx>(errors: &Vec<MoveError<'tcx>>)
+                                       -> Vec<GroupedMoveErrors<'tcx>> {
+    let mut grouped_errors = Vec::new();
+    for error in errors.iter() {
+        append_to_grouped_errors(&mut grouped_errors, error)
+    }
+    return grouped_errors;
+
+    fn append_to_grouped_errors<'tcx>(grouped_errors: &mut Vec<GroupedMoveErrors<'tcx>>,
+                                      error: &MoveError<'tcx>) {
+        let move_from_id = error.move_from.id;
+        debug!("append_to_grouped_errors(move_from_id={})", move_from_id);
+        let move_to = if error.move_to.is_some() {
+            vec!(error.move_to.clone().unwrap())
+        } else {
+            Vec::new()
+        };
+        for ge in grouped_errors.iter_mut() {
+            if move_from_id == ge.move_from.id && error.move_to.is_some() {
+                debug!("appending move_to to list");
+                ge.move_to_places.extend(move_to.into_iter());
+                return
+            }
+        }
+        debug!("found a new move from location");
+        grouped_errors.push(GroupedMoveErrors {
+            move_from: error.move_from.clone(),
+            move_to_places: move_to
+        })
+    }
+}
+
+fn report_cannot_move_out_of<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                       move_from: mc::cmt<'tcx>) {
+    match move_from.cat {
+        mc::cat_deref(_, _, mc::BorrowedPtr(..)) |
+        mc::cat_deref(_, _, mc::Implicit(..)) |
+        mc::cat_deref(_, _, mc::UnsafePtr(..)) |
+        mc::cat_static_item => {
+            bccx.span_err(
+                move_from.span,
+                format!("cannot move out of {}",
+                        bccx.cmt_to_string(&*move_from)).as_slice());
+        }
+
+        mc::cat_downcast(ref b, _) |
+        mc::cat_interior(ref b, _) => {
+            match b.ty.sty {
+                ty::ty_struct(did, _)
+                | ty::ty_enum(did, _) if ty::has_dtor(bccx.tcx, did) => {
+                    bccx.span_err(
+                        move_from.span,
+                        format!("cannot move out of type `{}`, \
+                                 which defines the `Drop` trait",
+                                b.ty.user_string(bccx.tcx)).as_slice());
+                },
+                _ => panic!("this path should not cause illegal move")
+            }
+        }
+        _ => panic!("this path should not cause illegal move")
+    }
+}
+
+fn note_move_destination(bccx: &BorrowckCtxt,
+                         move_to_span: codemap::Span,
+                         pat_ident: &ast::Ident,
+                         is_first_note: bool) {
+    let pat_name = pprust::ident_to_string(pat_ident);
+    if is_first_note {
+        bccx.span_note(
+            move_to_span,
+            "attempting to move value to here");
+        bccx.span_help(
+            move_to_span,
+            format!("to prevent the move, \
+                     use `ref {0}` or `ref mut {0}` to capture value by \
+                     reference",
+                    pat_name).as_slice());
+    } else {
+        bccx.span_note(move_to_span,
+                       format!("and here (use `ref {0}` or `ref mut {0}`)",
+                               pat_name).as_slice());
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs b/src/librustc_borrowck/borrowck/gather_loans/restrictions.rs
new file mode 100644 (file)
index 0000000..c783489
--- /dev/null
@@ -0,0 +1,169 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Computes the restrictions that result from a borrow.
+
+pub use self::RestrictionResult::*;
+
+use borrowck::*;
+use borrowck::LoanPathElem::*;
+use borrowck::LoanPathKind::*;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::ty;
+use rustc::util::ppaux::Repr;
+use syntax::codemap::Span;
+
+use std::rc::Rc;
+
+#[deriving(Show)]
+pub enum RestrictionResult<'tcx> {
+    Safe,
+    SafeIf(Rc<LoanPath<'tcx>>, Vec<Rc<LoanPath<'tcx>>>)
+}
+
+pub fn compute_restrictions<'a, 'tcx>(bccx: &BorrowckCtxt<'a, 'tcx>,
+                                      span: Span,
+                                      cause: euv::LoanCause,
+                                      cmt: mc::cmt<'tcx>,
+                                      loan_region: ty::Region)
+                                      -> RestrictionResult<'tcx> {
+    let ctxt = RestrictionsContext {
+        bccx: bccx,
+        span: span,
+        cause: cause,
+        loan_region: loan_region,
+    };
+
+    ctxt.restrict(cmt)
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Private
+
+struct RestrictionsContext<'a, 'tcx: 'a> {
+    bccx: &'a BorrowckCtxt<'a, 'tcx>,
+    span: Span,
+    loan_region: ty::Region,
+    cause: euv::LoanCause,
+}
+
+impl<'a, 'tcx> RestrictionsContext<'a, 'tcx> {
+    fn restrict(&self,
+                cmt: mc::cmt<'tcx>) -> RestrictionResult<'tcx> {
+        debug!("restrict(cmt={})", cmt.repr(self.bccx.tcx));
+
+        let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
+
+        match cmt.cat.clone() {
+            mc::cat_rvalue(..) => {
+                // Effectively, rvalues are stored into a
+                // non-aliasable temporary on the stack. Since they
+                // are inherently non-aliasable, they can only be
+                // accessed later through the borrow itself and hence
+                // must inherently comply with its terms.
+                Safe
+            }
+
+            mc::cat_local(local_id) => {
+                // R-Variable, locally declared
+                let lp = new_lp(LpVar(local_id));
+                SafeIf(lp.clone(), vec![lp])
+            }
+
+            mc::cat_upvar(mc::Upvar { id, .. }) => {
+                // R-Variable, captured into closure
+                let lp = new_lp(LpUpvar(id));
+                SafeIf(lp.clone(), vec![lp])
+            }
+
+            mc::cat_downcast(cmt_base, _) => {
+                // When we borrow the interior of an enum, we have to
+                // ensure the enum itself is not mutated, because that
+                // could cause the type of the memory to change.
+                self.restrict(cmt_base)
+            }
+
+            mc::cat_interior(cmt_base, i) => {
+                // R-Field
+                //
+                // Overwriting the base would not change the type of
+                // the memory, so no additional restrictions are
+                // needed.
+                let result = self.restrict(cmt_base);
+                self.extend(result, &cmt, LpInterior(i))
+            }
+
+            mc::cat_static_item(..) => {
+                Safe
+            }
+
+            mc::cat_deref(cmt_base, _, pk) => {
+                match pk {
+                    mc::OwnedPtr => {
+                        // R-Deref-Send-Pointer
+                        //
+                        // When we borrow the interior of an owned pointer, we
+                        // cannot permit the base to be mutated, because that
+                        // would cause the unique pointer to be freed.
+                        //
+                        // Eventually we should make these non-special and
+                        // just rely on Deref<T> implementation.
+                        let result = self.restrict(cmt_base);
+                        self.extend(result, &cmt, LpDeref(pk))
+                    }
+                    mc::Implicit(bk, lt) | mc::BorrowedPtr(bk, lt) => {
+                        // R-Deref-[Mut-]Borrowed
+                        if !self.bccx.is_subregion_of(self.loan_region, lt) {
+                            self.bccx.report(
+                                BckError {
+                                    span: self.span,
+                                    cause: self.cause,
+                                    cmt: cmt_base,
+                                    code: err_borrowed_pointer_too_short(
+                                        self.loan_region, lt)});
+                            return Safe;
+                        }
+
+                        match bk {
+                            ty::ImmBorrow => Safe,
+                            ty::MutBorrow | ty::UniqueImmBorrow => {
+                                // R-Deref-Mut-Borrowed
+                                //
+                                // The referent can be aliased after the
+                                // references lifetime ends (by a newly-unfrozen
+                                // borrow).
+                                let result = self.restrict(cmt_base);
+                                self.extend(result, &cmt, LpDeref(pk))
+                            }
+                        }
+                    }
+                    // Borrowck is not relevant for unsafe pointers
+                    mc::UnsafePtr(..) => Safe
+                }
+            }
+        }
+    }
+
+    fn extend(&self,
+              result: RestrictionResult<'tcx>,
+              cmt: &mc::cmt<'tcx>,
+              elem: LoanPathElem) -> RestrictionResult<'tcx> {
+        match result {
+            Safe => Safe,
+            SafeIf(base_lp, mut base_vec) => {
+                let v = LpExtend(base_lp, cmt.mutbl, elem);
+                let lp = Rc::new(LoanPath::new(v, cmt.ty));
+                base_vec.push(lp.clone());
+                SafeIf(lp, base_vec)
+            }
+        }
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs
new file mode 100644 (file)
index 0000000..a3fb91a
--- /dev/null
@@ -0,0 +1,1110 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! See doc.rs for a thorough explanation of the borrow checker
+
+#![allow(non_camel_case_types)]
+
+pub use self::LoanPathKind::*;
+pub use self::LoanPathElem::*;
+pub use self::bckerr_code::*;
+pub use self::AliasableViolationKind::*;
+pub use self::MovedValueUseKind::*;
+
+use rustc::middle::cfg;
+use rustc::middle::dataflow::DataFlowContext;
+use rustc::middle::dataflow::BitwiseOperator;
+use rustc::middle::dataflow::DataFlowOperator;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::region;
+use rustc::middle::ty::{mod, Ty};
+use rustc::util::ppaux::{note_and_explain_region, Repr, UserString};
+use std::rc::Rc;
+use std::string::String;
+use syntax::ast;
+use syntax::ast_map;
+use syntax::ast_map::blocks::{FnLikeNode, FnParts};
+use syntax::ast_util;
+use syntax::codemap::Span;
+use syntax::parse::token;
+use syntax::visit;
+use syntax::visit::{Visitor, FnKind};
+use syntax::ast::{FnDecl, Block, NodeId};
+
+macro_rules! if_ok(
+    ($inp: expr) => (
+        match $inp {
+            Ok(v) => { v }
+            Err(e) => { return Err(e); }
+        }
+    )
+)
+
+pub mod doc;
+
+pub mod check_loans;
+
+pub mod gather_loans;
+
+pub mod move_data;
+
+#[deriving(Clone)]
+pub struct LoanDataFlowOperator;
+
+impl Copy for LoanDataFlowOperator {}
+
+pub type LoanDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, LoanDataFlowOperator>;
+
+impl<'a, 'tcx, 'v> Visitor<'v> for BorrowckCtxt<'a, 'tcx> {
+    fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl,
+                b: &'v Block, s: Span, id: ast::NodeId) {
+        borrowck_fn(self, fk, fd, b, s, id);
+    }
+
+    fn visit_item(&mut self, item: &ast::Item) {
+        borrowck_item(self, item);
+    }
+}
+
+pub fn check_crate(tcx: &ty::ctxt) {
+    let mut bccx = BorrowckCtxt {
+        tcx: tcx,
+        stats: BorrowStats {
+            loaned_paths_same: 0,
+            loaned_paths_imm: 0,
+            stable_paths: 0,
+            guaranteed_paths: 0
+        }
+    };
+
+    visit::walk_crate(&mut bccx, tcx.map.krate());
+
+    if tcx.sess.borrowck_stats() {
+        println!("--- borrowck stats ---");
+        println!("paths requiring guarantees: {}",
+                 bccx.stats.guaranteed_paths);
+        println!("paths requiring loans     : {}",
+                 make_stat(&bccx, bccx.stats.loaned_paths_same));
+        println!("paths requiring imm loans : {}",
+                 make_stat(&bccx, bccx.stats.loaned_paths_imm));
+        println!("stable paths              : {}",
+                 make_stat(&bccx, bccx.stats.stable_paths));
+    }
+
+    fn make_stat(bccx: &BorrowckCtxt, stat: uint) -> String {
+        let total = bccx.stats.guaranteed_paths as f64;
+        let perc = if total == 0.0 { 0.0 } else { stat as f64 * 100.0 / total };
+        format!("{} ({:.0}%)", stat, perc)
+    }
+}
+
+fn borrowck_item(this: &mut BorrowckCtxt, item: &ast::Item) {
+    // Gather loans for items. Note that we don't need
+    // to check loans for single expressions. The check
+    // loan step is intended for things that have a data
+    // flow dependent conditions.
+    match item.node {
+        ast::ItemStatic(_, _, ref ex) |
+        ast::ItemConst(_, ref ex) => {
+            gather_loans::gather_loans_in_static_initializer(this, &**ex);
+        }
+        _ => {
+            visit::walk_item(this, item);
+        }
+    }
+}
+
+/// Collection of conclusions determined via borrow checker analyses.
+pub struct AnalysisData<'a, 'tcx: 'a> {
+    pub all_loans: Vec<Loan<'tcx>>,
+    pub loans: DataFlowContext<'a, 'tcx, LoanDataFlowOperator>,
+    pub move_data: move_data::FlowedMoveData<'a, 'tcx>,
+}
+
+fn borrowck_fn(this: &mut BorrowckCtxt,
+               fk: FnKind,
+               decl: &ast::FnDecl,
+               body: &ast::Block,
+               sp: Span,
+               id: ast::NodeId) {
+    debug!("borrowck_fn(id={})", id);
+    let cfg = cfg::CFG::new(this.tcx, body);
+    let AnalysisData { all_loans,
+                       loans: loan_dfcx,
+                       move_data:flowed_moves } =
+        build_borrowck_dataflow_data(this, fk, decl, &cfg, body, sp, id);
+
+    move_data::fragments::instrument_move_fragments(&flowed_moves.move_data,
+                                                    this.tcx, sp, id);
+
+    check_loans::check_loans(this,
+                             &loan_dfcx,
+                             flowed_moves,
+                             all_loans.as_slice(),
+                             id,
+                             decl,
+                             body);
+
+    visit::walk_fn(this, fk, decl, body, sp);
+}
+
+fn build_borrowck_dataflow_data<'a, 'tcx>(this: &mut BorrowckCtxt<'a, 'tcx>,
+                                          fk: FnKind,
+                                          decl: &ast::FnDecl,
+                                          cfg: &cfg::CFG,
+                                          body: &ast::Block,
+                                          sp: Span,
+                                          id: ast::NodeId) -> AnalysisData<'a, 'tcx> {
+    // Check the body of fn items.
+    let id_range = ast_util::compute_id_range_for_fn_body(fk, decl, body, sp, id);
+    let (all_loans, move_data) =
+        gather_loans::gather_loans_in_fn(this, id, decl, body);
+
+    let mut loan_dfcx =
+        DataFlowContext::new(this.tcx,
+                             "borrowck",
+                             Some(decl),
+                             cfg,
+                             LoanDataFlowOperator,
+                             id_range,
+                             all_loans.len());
+    for (loan_idx, loan) in all_loans.iter().enumerate() {
+        loan_dfcx.add_gen(loan.gen_scope.node_id(), loan_idx);
+        loan_dfcx.add_kill(loan.kill_scope.node_id(), loan_idx);
+    }
+    loan_dfcx.add_kills_from_flow_exits(cfg);
+    loan_dfcx.propagate(cfg, body);
+
+    let flowed_moves = move_data::FlowedMoveData::new(move_data,
+                                                      this.tcx,
+                                                      cfg,
+                                                      id_range,
+                                                      decl,
+                                                      body);
+
+    AnalysisData { all_loans: all_loans,
+                   loans: loan_dfcx,
+                   move_data:flowed_moves }
+}
+
+/// This and a `ty::ctxt` is all you need to run the dataflow analyses
+/// used in the borrow checker.
+pub struct FnPartsWithCFG<'a> {
+    pub fn_parts: FnParts<'a>,
+    pub cfg:  &'a cfg::CFG,
+}
+
+impl<'a> FnPartsWithCFG<'a> {
+    pub fn from_fn_like(f: &'a FnLikeNode,
+                        g: &'a cfg::CFG) -> FnPartsWithCFG<'a> {
+        FnPartsWithCFG { fn_parts: f.to_fn_parts(), cfg: g }
+    }
+}
+
+/// Accessor for introspective clients inspecting `AnalysisData` and
+/// the `BorrowckCtxt` itself , e.g. the flowgraph visualizer.
+pub fn build_borrowck_dataflow_data_for_fn<'a, 'tcx>(
+    tcx: &'a ty::ctxt<'tcx>,
+    input: FnPartsWithCFG<'a>) -> (BorrowckCtxt<'a, 'tcx>, AnalysisData<'a, 'tcx>) {
+
+    let mut bccx = BorrowckCtxt {
+        tcx: tcx,
+        stats: BorrowStats {
+            loaned_paths_same: 0,
+            loaned_paths_imm: 0,
+            stable_paths: 0,
+            guaranteed_paths: 0
+        }
+    };
+
+    let p = input.fn_parts;
+
+    let dataflow_data = build_borrowck_dataflow_data(&mut bccx,
+                                                     p.kind,
+                                                     &*p.decl,
+                                                     input.cfg,
+                                                     &*p.body,
+                                                     p.span,
+                                                     p.id);
+
+    (bccx, dataflow_data)
+}
+
+// ----------------------------------------------------------------------
+// Type definitions
+
+pub struct BorrowckCtxt<'a, 'tcx: 'a> {
+    tcx: &'a ty::ctxt<'tcx>,
+
+    // Statistics:
+    stats: BorrowStats
+}
+
+struct BorrowStats {
+    loaned_paths_same: uint,
+    loaned_paths_imm: uint,
+    stable_paths: uint,
+    guaranteed_paths: uint
+}
+
+pub type BckResult<'tcx, T> = Result<T, BckError<'tcx>>;
+
+///////////////////////////////////////////////////////////////////////////
+// Loans and loan paths
+
+/// Record of a loan that was issued.
+pub struct Loan<'tcx> {
+    index: uint,
+    loan_path: Rc<LoanPath<'tcx>>,
+    kind: ty::BorrowKind,
+    restricted_paths: Vec<Rc<LoanPath<'tcx>>>,
+
+    /// gen_scope indicates where loan is introduced. Typically the
+    /// loan is introduced at the point of the borrow, but in some
+    /// cases, notably method arguments, the loan may be introduced
+    /// only later, once it comes into scope.  See also
+    /// `GatherLoanCtxt::compute_gen_scope`.
+    gen_scope: region::CodeExtent,
+
+    /// kill_scope indicates when the loan goes out of scope.  This is
+    /// either when the lifetime expires or when the local variable
+    /// which roots the loan-path goes out of scope, whichever happens
+    /// faster. See also `GatherLoanCtxt::compute_kill_scope`.
+    kill_scope: region::CodeExtent,
+    span: Span,
+    cause: euv::LoanCause,
+}
+
+impl<'tcx> Loan<'tcx> {
+    pub fn loan_path(&self) -> Rc<LoanPath<'tcx>> {
+        self.loan_path.clone()
+    }
+}
+
+#[deriving(Eq, Hash, Show)]
+pub struct LoanPath<'tcx> {
+    kind: LoanPathKind<'tcx>,
+    ty: ty::Ty<'tcx>,
+}
+
+impl<'tcx> PartialEq for LoanPath<'tcx> {
+    fn eq(&self, that: &LoanPath<'tcx>) -> bool {
+        let r = self.kind == that.kind;
+        debug_assert!(self.ty == that.ty || !r,
+                      "Somehow loan paths are equal though their tys are not.");
+        r
+    }
+}
+
+#[deriving(PartialEq, Eq, Hash, Show)]
+pub enum LoanPathKind<'tcx> {
+    LpVar(ast::NodeId),                         // `x` in doc.rs
+    LpUpvar(ty::UpvarId),                       // `x` captured by-value into closure
+    LpDowncast(Rc<LoanPath<'tcx>>, ast::DefId), // `x` downcast to particular enum variant
+    LpExtend(Rc<LoanPath<'tcx>>, mc::MutabilityCategory, LoanPathElem)
+}
+
+impl<'tcx> LoanPath<'tcx> {
+    fn new(kind: LoanPathKind<'tcx>, ty: ty::Ty<'tcx>) -> LoanPath<'tcx> {
+        LoanPath { kind: kind, ty: ty }
+    }
+
+    fn to_type(&self) -> ty::Ty<'tcx> { self.ty }
+}
+
+// FIXME (pnkfelix): See discussion here
+// https://github.com/pnkfelix/rust/commit/
+//     b2b39e8700e37ad32b486b9a8409b50a8a53aa51#commitcomment-7892003
+static DOWNCAST_PRINTED_OPERATOR : &'static str = " as ";
+
+#[deriving(PartialEq, Eq, Hash, Show)]
+pub enum LoanPathElem {
+    LpDeref(mc::PointerKind),    // `*LV` in doc.rs
+    LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
+}
+
+impl Copy for LoanPathElem {}
+
+pub fn closure_to_block(closure_id: ast::NodeId,
+                        tcx: &ty::ctxt) -> ast::NodeId {
+    match tcx.map.get(closure_id) {
+        ast_map::NodeExpr(expr) => match expr.node {
+            ast::ExprClosure(_, _, _, ref block) => {
+                block.id
+            }
+            _ => {
+                panic!("encountered non-closure id: {}", closure_id)
+            }
+        },
+        _ => panic!("encountered non-expr id: {}", closure_id)
+    }
+}
+
+impl<'tcx> LoanPath<'tcx> {
+    pub fn kill_scope(&self, tcx: &ty::ctxt<'tcx>) -> region::CodeExtent {
+        match self.kind {
+            LpVar(local_id) => tcx.region_maps.var_scope(local_id),
+            LpUpvar(upvar_id) => {
+                let block_id = closure_to_block(upvar_id.closure_expr_id, tcx);
+                region::CodeExtent::from_node_id(block_id)
+            }
+            LpDowncast(ref base, _) |
+            LpExtend(ref base, _, _) => base.kill_scope(tcx),
+        }
+    }
+
+    fn has_fork(&self, other: &LoanPath<'tcx>) -> bool {
+        match (&self.kind, &other.kind) {
+            (&LpExtend(ref base, _, LpInterior(id)), &LpExtend(ref base2, _, LpInterior(id2))) =>
+                if id == id2 {
+                    base.has_fork(&**base2)
+                } else {
+                    true
+                },
+            (&LpExtend(ref base, _, LpDeref(_)), _) => base.has_fork(other),
+            (_, &LpExtend(ref base, _, LpDeref(_))) => self.has_fork(&**base),
+            _ => false,
+        }
+    }
+
+    fn depth(&self) -> uint {
+        match self.kind {
+            LpExtend(ref base, _, LpDeref(_)) => base.depth(),
+            LpExtend(ref base, _, LpInterior(_)) => base.depth() + 1,
+            _ => 0,
+        }
+    }
+
+    fn common(&self, other: &LoanPath<'tcx>) -> Option<LoanPath<'tcx>> {
+        match (&self.kind, &other.kind) {
+            (&LpExtend(ref base, a, LpInterior(id)),
+             &LpExtend(ref base2, _, LpInterior(id2))) => {
+                if id == id2 {
+                    base.common(&**base2).map(|x| {
+                        let xd = x.depth();
+                        if base.depth() == xd && base2.depth() == xd {
+                            assert_eq!(base.ty, base2.ty);
+                            assert_eq!(self.ty, other.ty);
+                            LoanPath {
+                                kind: LpExtend(Rc::new(x), a, LpInterior(id)),
+                                ty: self.ty,
+                            }
+                        } else {
+                            x
+                        }
+                    })
+                } else {
+                    base.common(&**base2)
+                }
+            }
+            (&LpExtend(ref base, _, LpDeref(_)), _) => base.common(other),
+            (_, &LpExtend(ref other, _, LpDeref(_))) => self.common(&**other),
+            (&LpVar(id), &LpVar(id2)) => {
+                if id == id2 {
+                    assert_eq!(self.ty, other.ty);
+                    Some(LoanPath { kind: LpVar(id), ty: self.ty })
+                } else {
+                    None
+                }
+            }
+            (&LpUpvar(id), &LpUpvar(id2)) => {
+                if id == id2 {
+                    assert_eq!(self.ty, other.ty);
+                    Some(LoanPath { kind: LpUpvar(id), ty: self.ty })
+                } else {
+                    None
+                }
+            }
+            _ => None,
+        }
+    }
+}
+
+pub fn opt_loan_path<'tcx>(cmt: &mc::cmt<'tcx>) -> Option<Rc<LoanPath<'tcx>>> {
+    //! Computes the `LoanPath` (if any) for a `cmt`.
+    //! Note that this logic is somewhat duplicated in
+    //! the method `compute()` found in `gather_loans::restrictions`,
+    //! which allows it to share common loan path pieces as it
+    //! traverses the CMT.
+
+    let new_lp = |v: LoanPathKind<'tcx>| Rc::new(LoanPath::new(v, cmt.ty));
+
+    match cmt.cat {
+        mc::cat_rvalue(..) |
+        mc::cat_static_item => {
+            None
+        }
+
+        mc::cat_local(id) => {
+            Some(new_lp(LpVar(id)))
+        }
+
+        mc::cat_upvar(mc::Upvar { id, .. }) => {
+            Some(new_lp(LpUpvar(id)))
+        }
+
+        mc::cat_deref(ref cmt_base, _, pk) => {
+            opt_loan_path(cmt_base).map(|lp| {
+                new_lp(LpExtend(lp, cmt.mutbl, LpDeref(pk)))
+            })
+        }
+
+        mc::cat_interior(ref cmt_base, ik) => {
+            opt_loan_path(cmt_base).map(|lp| {
+                new_lp(LpExtend(lp, cmt.mutbl, LpInterior(ik)))
+            })
+        }
+
+        mc::cat_downcast(ref cmt_base, variant_def_id) =>
+            opt_loan_path(cmt_base)
+            .map(|lp| {
+                new_lp(LpDowncast(lp, variant_def_id))
+            }),
+
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Errors
+
+// Errors that can occur
+#[deriving(PartialEq)]
+#[allow(missing_copy_implementations)]
+pub enum bckerr_code {
+    err_mutbl,
+    err_out_of_scope(ty::Region, ty::Region), // superscope, subscope
+    err_borrowed_pointer_too_short(ty::Region, ty::Region), // loan, ptr
+}
+
+// Combination of an error code and the categorization of the expression
+// that caused it
+#[deriving(PartialEq)]
+pub struct BckError<'tcx> {
+    span: Span,
+    cause: euv::LoanCause,
+    cmt: mc::cmt<'tcx>,
+    code: bckerr_code
+}
+
+pub enum AliasableViolationKind {
+    MutabilityViolation,
+    BorrowViolation(euv::LoanCause)
+}
+
+impl Copy for AliasableViolationKind {}
+
+#[deriving(Show)]
+pub enum MovedValueUseKind {
+    MovedInUse,
+    MovedInCapture,
+}
+
+impl Copy for MovedValueUseKind {}
+
+///////////////////////////////////////////////////////////////////////////
+// Misc
+
+impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
+    pub fn is_subregion_of(&self, r_sub: ty::Region, r_sup: ty::Region)
+                           -> bool {
+        self.tcx.region_maps.is_subregion_of(r_sub, r_sup)
+    }
+
+    pub fn mc(&self) -> mc::MemCategorizationContext<'a, ty::ctxt<'tcx>> {
+        mc::MemCategorizationContext::new(self.tcx)
+    }
+
+    pub fn cat_expr(&self, expr: &ast::Expr) -> mc::cmt<'tcx> {
+        match self.mc().cat_expr(expr) {
+            Ok(c) => c,
+            Err(()) => {
+                self.tcx.sess.span_bug(expr.span, "error in mem categorization");
+            }
+        }
+    }
+
+    pub fn report(&self, err: BckError<'tcx>) {
+        self.span_err(
+            err.span,
+            self.bckerr_to_string(&err).as_slice());
+        self.note_and_explain_bckerr(err);
+    }
+
+    pub fn report_use_of_moved_value(&self,
+                                     use_span: Span,
+                                     use_kind: MovedValueUseKind,
+                                     lp: &LoanPath<'tcx>,
+                                     the_move: &move_data::Move,
+                                     moved_lp: &LoanPath<'tcx>,
+                                     param_env: &ty::ParameterEnvironment<'tcx>) {
+        let verb = match use_kind {
+            MovedInUse => "use",
+            MovedInCapture => "capture",
+        };
+
+        let (ol, moved_lp_msg) = match the_move.kind {
+            move_data::Declared => {
+                self.tcx.sess.span_err(
+                    use_span,
+                    format!("{} of possibly uninitialized variable: `{}`",
+                            verb,
+                            self.loan_path_to_string(lp)).as_slice());
+                (self.loan_path_to_string(moved_lp),
+                 String::new())
+            }
+            _ => {
+                // If moved_lp is something like `x.a`, and lp is something like `x.b`, we would
+                // normally generate a rather confusing message:
+                //
+                //     error: use of moved value: `x.b`
+                //     note: `x.a` moved here...
+                //
+                // What we want to do instead is get the 'common ancestor' of the two moves and
+                // use that for most of the message instead, giving is something like this:
+                //
+                //     error: use of moved value: `x`
+                //     note: `x` moved here (through moving `x.a`)...
+
+                let common = moved_lp.common(lp);
+                let has_common = common.is_some();
+                let has_fork = moved_lp.has_fork(lp);
+                let (nl, ol, moved_lp_msg) =
+                    if has_fork && has_common {
+                        let nl = self.loan_path_to_string(&common.unwrap());
+                        let ol = nl.clone();
+                        let moved_lp_msg = format!(" (through moving `{}`)",
+                                                   self.loan_path_to_string(moved_lp));
+                        (nl, ol, moved_lp_msg)
+                    } else {
+                        (self.loan_path_to_string(lp),
+                         self.loan_path_to_string(moved_lp),
+                         String::new())
+                    };
+
+                let partial = moved_lp.depth() > lp.depth();
+                let msg = if !has_fork && partial { "partially " }
+                          else if has_fork && !has_common { "collaterally "}
+                          else { "" };
+                self.tcx.sess.span_err(
+                    use_span,
+                    format!("{} of {}moved value: `{}`",
+                            verb,
+                            msg,
+                            nl).as_slice());
+                (ol, moved_lp_msg)
+            }
+        };
+
+        match the_move.kind {
+            move_data::Declared => {}
+
+            move_data::MoveExpr => {
+                let (expr_ty, expr_span) = match self.tcx
+                                                     .map
+                                                     .find(the_move.id) {
+                    Some(ast_map::NodeExpr(expr)) => {
+                        (ty::expr_ty_adjusted(self.tcx, &*expr), expr.span)
+                    }
+                    r => {
+                        self.tcx.sess.bug(format!("MoveExpr({}) maps to \
+                                                   {}, not Expr",
+                                                  the_move.id,
+                                                  r).as_slice())
+                    }
+                };
+                let (suggestion, _) = move_suggestion(self.tcx, param_env, expr_ty,
+                        ("moved by default", ""));
+                self.tcx.sess.span_note(
+                    expr_span,
+                    format!("`{}` moved here{} because it has type `{}`, which is {}",
+                            ol,
+                            moved_lp_msg,
+                            expr_ty.user_string(self.tcx),
+                            suggestion).as_slice());
+            }
+
+            move_data::MovePat => {
+                let pat_ty = ty::node_id_to_type(self.tcx, the_move.id);
+                let span = self.tcx.map.span(the_move.id);
+                self.tcx.sess.span_note(span,
+                    format!("`{}` moved here{} because it has type `{}`, \
+                             which is moved by default",
+                            ol,
+                            moved_lp_msg,
+                            pat_ty.user_string(self.tcx)).as_slice());
+                self.tcx.sess.span_help(span,
+                    "use `ref` to override");
+            }
+
+            move_data::Captured => {
+                let (expr_ty, expr_span) = match self.tcx
+                                                     .map
+                                                     .find(the_move.id) {
+                    Some(ast_map::NodeExpr(expr)) => {
+                        (ty::expr_ty_adjusted(self.tcx, &*expr), expr.span)
+                    }
+                    r => {
+                        self.tcx.sess.bug(format!("Captured({}) maps to \
+                                                   {}, not Expr",
+                                                  the_move.id,
+                                                  r).as_slice())
+                    }
+                };
+                let (suggestion, help) = move_suggestion(self.tcx,
+                                                         param_env,
+                                                         expr_ty,
+                        ("moved by default", "make a copy and \
+                         capture that instead to override"));
+                self.tcx.sess.span_note(
+                    expr_span,
+                    format!("`{}` moved into closure environment here{} because it \
+                            has type `{}`, which is {}",
+                            ol,
+                            moved_lp_msg,
+                            expr_ty.user_string(self.tcx),
+                            suggestion).as_slice());
+                self.tcx.sess.span_help(expr_span, help);
+            }
+        }
+
+        fn move_suggestion<'tcx>(tcx: &ty::ctxt<'tcx>,
+                                 param_env: &ty::ParameterEnvironment<'tcx>,
+                                 ty: Ty<'tcx>,
+                                 default_msgs: (&'static str, &'static str))
+                                 -> (&'static str, &'static str) {
+            match ty.sty {
+                ty::ty_closure(box ty::ClosureTy {
+                        store: ty::RegionTraitStore(..),
+                        ..
+                    }) =>
+                    ("a non-copyable stack closure",
+                     "capture it in a new closure, e.g. `|x| f(x)`, to override"),
+                _ if ty::type_moves_by_default(tcx, ty, param_env) =>
+                    ("non-copyable",
+                     "perhaps you meant to use `clone()`?"),
+                _ => default_msgs,
+            }
+        }
+    }
+
+    pub fn report_reassigned_immutable_variable(&self,
+                                                span: Span,
+                                                lp: &LoanPath<'tcx>,
+                                                assign:
+                                                &move_data::Assignment) {
+        self.tcx.sess.span_err(
+            span,
+            format!("re-assignment of immutable variable `{}`",
+                    self.loan_path_to_string(lp)).as_slice());
+        self.tcx.sess.span_note(assign.span, "prior assignment occurs here");
+    }
+
+    pub fn span_err(&self, s: Span, m: &str) {
+        self.tcx.sess.span_err(s, m);
+    }
+
+    pub fn span_note(&self, s: Span, m: &str) {
+        self.tcx.sess.span_note(s, m);
+    }
+
+    pub fn span_end_note(&self, s: Span, m: &str) {
+        self.tcx.sess.span_end_note(s, m);
+    }
+
+    pub fn span_help(&self, s: Span, m: &str) {
+        self.tcx.sess.span_help(s, m);
+    }
+
+    pub fn bckerr_to_string(&self, err: &BckError<'tcx>) -> String {
+        match err.code {
+            err_mutbl => {
+                let descr = match err.cmt.note {
+                    mc::NoteClosureEnv(_) | mc::NoteUpvarRef(_) => {
+                        self.cmt_to_string(&*err.cmt)
+                    }
+                    _ => match opt_loan_path(&err.cmt) {
+                        None => {
+                            format!("{} {}",
+                                    err.cmt.mutbl.to_user_str(),
+                                    self.cmt_to_string(&*err.cmt))
+                        }
+                        Some(lp) => {
+                            format!("{} {} `{}`",
+                                    err.cmt.mutbl.to_user_str(),
+                                    self.cmt_to_string(&*err.cmt),
+                                    self.loan_path_to_string(&*lp))
+                        }
+                    }
+                };
+
+                match err.cause {
+                    euv::ClosureCapture(_) => {
+                        format!("closure cannot assign to {}", descr)
+                    }
+                    euv::OverloadedOperator |
+                    euv::AddrOf |
+                    euv::RefBinding |
+                    euv::AutoRef |
+                    euv::ForLoop |
+                    euv::MatchDiscriminant => {
+                        format!("cannot borrow {} as mutable", descr)
+                    }
+                    euv::ClosureInvocation => {
+                        self.tcx.sess.span_bug(err.span,
+                            "err_mutbl with a closure invocation");
+                    }
+                }
+            }
+            err_out_of_scope(..) => {
+                let msg = match opt_loan_path(&err.cmt) {
+                    None => "borrowed value".to_string(),
+                    Some(lp) => {
+                        format!("`{}`", self.loan_path_to_string(&*lp))
+                    }
+                };
+                format!("{} does not live long enough", msg)
+            }
+            err_borrowed_pointer_too_short(..) => {
+                let descr = match opt_loan_path(&err.cmt) {
+                    Some(lp) => {
+                        format!("`{}`", self.loan_path_to_string(&*lp))
+                    }
+                    None => self.cmt_to_string(&*err.cmt),
+                };
+
+                format!("lifetime of {} is too short to guarantee \
+                                its contents can be safely reborrowed",
+                               descr)
+            }
+        }
+    }
+
+    pub fn report_aliasability_violation(&self,
+                                         span: Span,
+                                         kind: AliasableViolationKind,
+                                         cause: mc::AliasableReason) {
+        let mut is_closure = false;
+        let prefix = match kind {
+            MutabilityViolation => {
+                "cannot assign to data"
+            }
+            BorrowViolation(euv::ClosureCapture(_)) => {
+                // I don't think we can get aliasability violations
+                // with closure captures, so no need to come up with a
+                // good error message. The reason this cannot happen
+                // is because we only capture local variables in
+                // closures, and those are never aliasable.
+                self.tcx.sess.span_bug(
+                    span,
+                    "aliasability violation with closure");
+            }
+            BorrowViolation(euv::OverloadedOperator) |
+            BorrowViolation(euv::AddrOf) |
+            BorrowViolation(euv::AutoRef) |
+            BorrowViolation(euv::RefBinding) |
+            BorrowViolation(euv::MatchDiscriminant) => {
+                "cannot borrow data mutably"
+            }
+
+            BorrowViolation(euv::ClosureInvocation) => {
+                is_closure = true;
+                "closure invocation"
+            }
+
+            BorrowViolation(euv::ForLoop) => {
+                "`for` loop"
+            }
+        };
+
+        match cause {
+            mc::AliasableOther => {
+                self.tcx.sess.span_err(
+                    span,
+                    format!("{} in an aliasable location",
+                             prefix).as_slice());
+            }
+            mc::AliasableClosure(id) => {
+                self.tcx.sess.span_err(span,
+                                       format!("{} in a captured outer \
+                                               variable in an `Fn` closure", prefix).as_slice());
+                span_help!(self.tcx.sess, self.tcx.map.span(id),
+                           "consider changing this closure to take self by mutable reference");
+            }
+            mc::AliasableStatic(..) |
+            mc::AliasableStaticMut(..) => {
+                self.tcx.sess.span_err(
+                    span,
+                    format!("{} in a static location", prefix).as_slice());
+            }
+            mc::AliasableBorrowed => {
+                self.tcx.sess.span_err(
+                    span,
+                    format!("{} in a `&` reference", prefix).as_slice());
+            }
+        }
+
+        if is_closure {
+            self.tcx.sess.span_help(
+                span,
+                "closures behind references must be called via `&mut`");
+        }
+    }
+
+    pub fn note_and_explain_bckerr(&self, err: BckError<'tcx>) {
+        let code = err.code;
+        match code {
+            err_mutbl(..) => {
+                match err.cmt.note {
+                    mc::NoteClosureEnv(upvar_id) | mc::NoteUpvarRef(upvar_id) => {
+                        // If this is an `Fn` closure, it simply can't mutate upvars.
+                        // If it's an `FnMut` closure, the original variable was declared immutable.
+                        // We need to determine which is the case here.
+                        let kind = match err.cmt.upvar().unwrap().cat {
+                            mc::cat_upvar(mc::Upvar { kind, .. }) => kind,
+                            _ => unreachable!()
+                        };
+                        if kind == ty::FnUnboxedClosureKind {
+                            self.tcx.sess.span_help(
+                                self.tcx.map.span(upvar_id.closure_expr_id),
+                                "consider changing this closure to take \
+                                 self by mutable reference");
+                        }
+                    }
+                    _ => {}
+                }
+            }
+
+            err_out_of_scope(super_scope, sub_scope) => {
+                note_and_explain_region(
+                    self.tcx,
+                    "reference must be valid for ",
+                    sub_scope,
+                    "...");
+                let suggestion = if is_statement_scope(self.tcx, super_scope) {
+                    Some("consider using a `let` binding to increase its lifetime")
+                } else {
+                    None
+                };
+                let span = note_and_explain_region(
+                    self.tcx,
+                    "...but borrowed value is only valid for ",
+                    super_scope,
+                    "");
+                match (span, suggestion) {
+                    (_, None) => {},
+                    (Some(span), Some(msg)) => self.tcx.sess.span_help(span, msg),
+                    (None, Some(msg)) => self.tcx.sess.help(msg),
+                }
+            }
+
+            err_borrowed_pointer_too_short(loan_scope, ptr_scope) => {
+                let descr = match opt_loan_path(&err.cmt) {
+                    Some(lp) => {
+                        format!("`{}`", self.loan_path_to_string(&*lp))
+                    }
+                    None => self.cmt_to_string(&*err.cmt),
+                };
+                note_and_explain_region(
+                    self.tcx,
+                    format!("{} would have to be valid for ",
+                            descr).as_slice(),
+                    loan_scope,
+                    "...");
+                note_and_explain_region(
+                    self.tcx,
+                    format!("...but {} is only valid for ", descr).as_slice(),
+                    ptr_scope,
+                    "");
+            }
+        }
+    }
+
+    pub fn append_loan_path_to_string(&self,
+                                      loan_path: &LoanPath<'tcx>,
+                                      out: &mut String) {
+        match loan_path.kind {
+            LpUpvar(ty::UpvarId{ var_id: id, closure_expr_id: _ }) |
+            LpVar(id) => {
+                out.push_str(ty::local_var_name_str(self.tcx, id).get());
+            }
+
+            LpDowncast(ref lp_base, variant_def_id) => {
+                out.push('(');
+                self.append_loan_path_to_string(&**lp_base, out);
+                out.push_str(DOWNCAST_PRINTED_OPERATOR);
+                out.push_str(ty::item_path_str(self.tcx, variant_def_id).as_slice());
+                out.push(')');
+            }
+
+
+            LpExtend(ref lp_base, _, LpInterior(mc::InteriorField(fname))) => {
+                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
+                match fname {
+                    mc::NamedField(fname) => {
+                        out.push('.');
+                        out.push_str(token::get_name(fname).get());
+                    }
+                    mc::PositionalField(idx) => {
+                        out.push('.');
+                        out.push_str(idx.to_string().as_slice());
+                    }
+                }
+            }
+
+            LpExtend(ref lp_base, _, LpInterior(mc::InteriorElement(_))) => {
+                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
+                out.push_str("[..]");
+            }
+
+            LpExtend(ref lp_base, _, LpDeref(_)) => {
+                out.push('*');
+                self.append_loan_path_to_string(&**lp_base, out);
+            }
+        }
+    }
+
+    pub fn append_autoderefd_loan_path_to_string(&self,
+                                                 loan_path: &LoanPath<'tcx>,
+                                                 out: &mut String) {
+        match loan_path.kind {
+            LpExtend(ref lp_base, _, LpDeref(_)) => {
+                // For a path like `(*x).f` or `(*x)[3]`, autoderef
+                // rules would normally allow users to omit the `*x`.
+                // So just serialize such paths to `x.f` or x[3]` respectively.
+                self.append_autoderefd_loan_path_to_string(&**lp_base, out)
+            }
+
+            LpDowncast(ref lp_base, variant_def_id) => {
+                out.push('(');
+                self.append_autoderefd_loan_path_to_string(&**lp_base, out);
+                out.push(':');
+                out.push_str(ty::item_path_str(self.tcx, variant_def_id).as_slice());
+                out.push(')');
+            }
+
+            LpVar(..) | LpUpvar(..) | LpExtend(_, _, LpInterior(..)) => {
+                self.append_loan_path_to_string(loan_path, out)
+            }
+        }
+    }
+
+    pub fn loan_path_to_string(&self, loan_path: &LoanPath<'tcx>) -> String {
+        let mut result = String::new();
+        self.append_loan_path_to_string(loan_path, &mut result);
+        result
+    }
+
+    pub fn cmt_to_string(&self, cmt: &mc::cmt_<'tcx>) -> String {
+        self.mc().cmt_to_string(cmt)
+    }
+}
+
+fn is_statement_scope(tcx: &ty::ctxt, region: ty::Region) -> bool {
+     match region {
+         ty::ReScope(scope) => {
+             match tcx.map.find(scope.node_id()) {
+                 Some(ast_map::NodeStmt(_)) => true,
+                 _ => false
+             }
+         }
+         _ => false
+     }
+}
+
+impl BitwiseOperator for LoanDataFlowOperator {
+    #[inline]
+    fn join(&self, succ: uint, pred: uint) -> uint {
+        succ | pred // loans from both preds are in scope
+    }
+}
+
+impl DataFlowOperator for LoanDataFlowOperator {
+    #[inline]
+    fn initial_value(&self) -> bool {
+        false // no loans in scope by default
+    }
+}
+
+impl<'tcx> Repr<'tcx> for Loan<'tcx> {
+    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
+        format!("Loan_{}({}, {}, {}-{}, {})",
+                 self.index,
+                 self.loan_path.repr(tcx),
+                 self.kind,
+                 self.gen_scope,
+                 self.kill_scope,
+                 self.restricted_paths.repr(tcx))
+    }
+}
+
+impl<'tcx> Repr<'tcx> for LoanPath<'tcx> {
+    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
+        match self.kind {
+            LpVar(id) => {
+                format!("$({})", tcx.map.node_to_string(id))
+            }
+
+            LpUpvar(ty::UpvarId{ var_id, closure_expr_id }) => {
+                let s = tcx.map.node_to_string(var_id);
+                format!("$({} captured by id={})", s, closure_expr_id)
+            }
+
+            LpDowncast(ref lp, variant_def_id) => {
+                let variant_str = if variant_def_id.krate == ast::LOCAL_CRATE {
+                    ty::item_path_str(tcx, variant_def_id)
+                } else {
+                    variant_def_id.repr(tcx)
+                };
+                format!("({}{}{})", lp.repr(tcx), DOWNCAST_PRINTED_OPERATOR, variant_str)
+            }
+
+            LpExtend(ref lp, _, LpDeref(_)) => {
+                format!("{}.*", lp.repr(tcx))
+            }
+
+            LpExtend(ref lp, _, LpInterior(ref interior)) => {
+                format!("{}.{}", lp.repr(tcx), interior.repr(tcx))
+            }
+        }
+    }
+}
+
+impl<'tcx> UserString<'tcx> for LoanPath<'tcx> {
+    fn user_string(&self, tcx: &ty::ctxt<'tcx>) -> String {
+        match self.kind {
+            LpVar(id) => {
+                format!("$({})", tcx.map.node_to_user_string(id))
+            }
+
+            LpUpvar(ty::UpvarId{ var_id, closure_expr_id: _ }) => {
+                let s = tcx.map.node_to_user_string(var_id);
+                format!("$({} captured by closure)", s)
+            }
+
+            LpDowncast(ref lp, variant_def_id) => {
+                let variant_str = if variant_def_id.krate == ast::LOCAL_CRATE {
+                    ty::item_path_str(tcx, variant_def_id)
+                } else {
+                    variant_def_id.repr(tcx)
+                };
+                format!("({}{}{})", lp.user_string(tcx), DOWNCAST_PRINTED_OPERATOR, variant_str)
+            }
+
+            LpExtend(ref lp, _, LpDeref(_)) => {
+                format!("{}.*", lp.user_string(tcx))
+            }
+
+            LpExtend(ref lp, _, LpInterior(ref interior)) => {
+                format!("{}.{}", lp.user_string(tcx), interior.repr(tcx))
+            }
+        }
+    }
+}
diff --git a/src/librustc_borrowck/borrowck/move_data.rs b/src/librustc_borrowck/borrowck/move_data.rs
new file mode 100644 (file)
index 0000000..00b1377
--- /dev/null
@@ -0,0 +1,773 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Data structures used for tracking moves. Please see the extensive
+//! comments in the section "Moves and initialization" in `doc.rs`.
+
+pub use self::MoveKind::*;
+
+use borrowck::*;
+use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
+use borrowck::LoanPathElem::{LpInterior};
+use rustc::middle::cfg;
+use rustc::middle::dataflow::DataFlowContext;
+use rustc::middle::dataflow::BitwiseOperator;
+use rustc::middle::dataflow::DataFlowOperator;
+use rustc::middle::expr_use_visitor as euv;
+use rustc::middle::mem_categorization as mc;
+use rustc::middle::ty;
+use rustc::util::nodemap::{FnvHashMap, NodeSet};
+use rustc::util::ppaux::Repr;
+use std::cell::RefCell;
+use std::rc::Rc;
+use std::uint;
+use syntax::ast;
+use syntax::ast_util;
+use syntax::codemap::Span;
+
+#[path="fragments.rs"]
+pub mod fragments;
+
+pub struct MoveData<'tcx> {
+    /// Move paths. See section "Move paths" in `doc.rs`.
+    pub paths: RefCell<Vec<MovePath<'tcx>>>,
+
+    /// Cache of loan path to move path index, for easy lookup.
+    pub path_map: RefCell<FnvHashMap<Rc<LoanPath<'tcx>>, MovePathIndex>>,
+
+    /// Each move or uninitialized variable gets an entry here.
+    pub moves: RefCell<Vec<Move>>,
+
+    /// Assignments to a variable, like `x = foo`. These are assigned
+    /// bits for dataflow, since we must track them to ensure that
+    /// immutable variables are assigned at most once along each path.
+    pub var_assignments: RefCell<Vec<Assignment>>,
+
+    /// Assignments to a path, like `x.f = foo`. These are not
+    /// assigned dataflow bits, but we track them because they still
+    /// kill move bits.
+    pub path_assignments: RefCell<Vec<Assignment>>,
+
+    /// Enum variant matched within a pattern on some match arm, like
+    /// `SomeStruct{ f: Variant1(x, y) } => ...`
+    pub variant_matches: RefCell<Vec<VariantMatch>>,
+
+    /// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
+    pub assignee_ids: RefCell<NodeSet>,
+
+    /// Path-fragments from moves in to or out of parts of structured data.
+    pub fragments: RefCell<fragments::FragmentSets>,
+}
+
+pub struct FlowedMoveData<'a, 'tcx: 'a> {
+    pub move_data: MoveData<'tcx>,
+
+    pub dfcx_moves: MoveDataFlow<'a, 'tcx>,
+
+    // We could (and maybe should, for efficiency) combine both move
+    // and assign data flow into one, but this way it's easier to
+    // distinguish the bits that correspond to moves and assignments.
+    pub dfcx_assign: AssignDataFlow<'a, 'tcx>
+}
+
+/// Index into `MoveData.paths`, used like a pointer
+#[deriving(PartialEq, Eq, PartialOrd, Ord, Show)]
+pub struct MovePathIndex(uint);
+
+impl Copy for MovePathIndex {}
+
+impl MovePathIndex {
+    fn get(&self) -> uint {
+        let MovePathIndex(v) = *self; v
+    }
+}
+
+impl Clone for MovePathIndex {
+    fn clone(&self) -> MovePathIndex {
+        MovePathIndex(self.get())
+    }
+}
+
+#[allow(non_upper_case_globals)]
+static InvalidMovePathIndex: MovePathIndex =
+    MovePathIndex(uint::MAX);
+
+/// Index into `MoveData.moves`, used like a pointer
+#[deriving(PartialEq)]
+pub struct MoveIndex(uint);
+
+impl Copy for MoveIndex {}
+
+impl MoveIndex {
+    fn get(&self) -> uint {
+        let MoveIndex(v) = *self; v
+    }
+}
+
+#[allow(non_upper_case_globals)]
+static InvalidMoveIndex: MoveIndex =
+    MoveIndex(uint::MAX);
+
+pub struct MovePath<'tcx> {
+    /// Loan path corresponding to this move path
+    pub loan_path: Rc<LoanPath<'tcx>>,
+
+    /// Parent pointer, `InvalidMovePathIndex` if root
+    pub parent: MovePathIndex,
+
+    /// Head of linked list of moves to this path,
+    /// `InvalidMoveIndex` if not moved
+    pub first_move: MoveIndex,
+
+    /// First node in linked list of children, `InvalidMovePathIndex` if leaf
+    pub first_child: MovePathIndex,
+
+    /// Next node in linked list of parent's children (siblings),
+    /// `InvalidMovePathIndex` if none.
+    pub next_sibling: MovePathIndex,
+}
+
+#[deriving(PartialEq, Show)]
+pub enum MoveKind {
+    Declared,   // When declared, variables start out "moved".
+    MoveExpr,   // Expression or binding that moves a variable
+    MovePat,    // By-move binding
+    Captured    // Closure creation that moves a value
+}
+
+impl Copy for MoveKind {}
+
+pub struct Move {
+    /// Path being moved.
+    pub path: MovePathIndex,
+
+    /// id of node that is doing the move.
+    pub id: ast::NodeId,
+
+    /// Kind of move, for error messages.
+    pub kind: MoveKind,
+
+    /// Next node in linked list of moves from `path`, or `InvalidMoveIndex`
+    pub next_move: MoveIndex
+}
+
+impl Copy for Move {}
+
+pub struct Assignment {
+    /// Path being assigned.
+    pub path: MovePathIndex,
+
+    /// id where assignment occurs
+    pub id: ast::NodeId,
+
+    /// span of node where assignment occurs
+    pub span: Span,
+}
+
+impl Copy for Assignment {}
+
+pub struct VariantMatch {
+    /// downcast to the variant.
+    pub path: MovePathIndex,
+
+    /// path being downcast to the variant.
+    pub base_path: MovePathIndex,
+
+    /// id where variant's pattern occurs
+    pub id: ast::NodeId,
+
+    /// says if variant established by move (and why), by copy, or by borrow.
+    pub mode: euv::MatchMode
+}
+
+impl Copy for VariantMatch {}
+
+#[deriving(Clone)]
+pub struct MoveDataFlowOperator;
+
+impl Copy for MoveDataFlowOperator {}
+
+pub type MoveDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, MoveDataFlowOperator>;
+
+#[deriving(Clone)]
+pub struct AssignDataFlowOperator;
+
+impl Copy for AssignDataFlowOperator {}
+
+pub type AssignDataFlow<'a, 'tcx> = DataFlowContext<'a, 'tcx, AssignDataFlowOperator>;
+
+fn loan_path_is_precise(loan_path: &LoanPath) -> bool {
+    match loan_path.kind {
+        LpVar(_) | LpUpvar(_) => {
+            true
+        }
+        LpExtend(_, _, LpInterior(mc::InteriorElement(_))) => {
+            // Paths involving element accesses do not refer to a unique
+            // location, as there is no accurate tracking of the indices.
+            false
+        }
+        LpDowncast(ref lp_base, _) |
+        LpExtend(ref lp_base, _, _) => {
+            loan_path_is_precise(&**lp_base)
+        }
+    }
+}
+
+impl<'tcx> MoveData<'tcx> {
+    pub fn new() -> MoveData<'tcx> {
+        MoveData {
+            paths: RefCell::new(Vec::new()),
+            path_map: RefCell::new(FnvHashMap::new()),
+            moves: RefCell::new(Vec::new()),
+            path_assignments: RefCell::new(Vec::new()),
+            var_assignments: RefCell::new(Vec::new()),
+            variant_matches: RefCell::new(Vec::new()),
+            assignee_ids: RefCell::new(NodeSet::new()),
+            fragments: RefCell::new(fragments::FragmentSets::new()),
+        }
+    }
+
+    pub fn path_loan_path(&self, index: MovePathIndex) -> Rc<LoanPath<'tcx>> {
+        (*self.paths.borrow())[index.get()].loan_path.clone()
+    }
+
+    fn path_parent(&self, index: MovePathIndex) -> MovePathIndex {
+        (*self.paths.borrow())[index.get()].parent
+    }
+
+    fn path_first_move(&self, index: MovePathIndex) -> MoveIndex {
+        (*self.paths.borrow())[index.get()].first_move
+    }
+
+    /// Returns the index of first child, or `InvalidMovePathIndex` if
+    /// `index` is leaf.
+    fn path_first_child(&self, index: MovePathIndex) -> MovePathIndex {
+        (*self.paths.borrow())[index.get()].first_child
+    }
+
+    fn path_next_sibling(&self, index: MovePathIndex) -> MovePathIndex {
+        (*self.paths.borrow())[index.get()].next_sibling
+    }
+
+    fn set_path_first_move(&self,
+                           index: MovePathIndex,
+                           first_move: MoveIndex) {
+        (*self.paths.borrow_mut())[index.get()].first_move = first_move
+    }
+
+    fn set_path_first_child(&self,
+                            index: MovePathIndex,
+                            first_child: MovePathIndex) {
+        (*self.paths.borrow_mut())[index.get()].first_child = first_child
+    }
+
+    fn move_next_move(&self, index: MoveIndex) -> MoveIndex {
+        //! Type safe indexing operator
+        (*self.moves.borrow())[index.get()].next_move
+    }
+
+    fn is_var_path(&self, index: MovePathIndex) -> bool {
+        //! True if `index` refers to a variable
+        self.path_parent(index) == InvalidMovePathIndex
+    }
+
+    /// Returns the existing move path index for `lp`, if any, and otherwise adds a new index for
+    /// `lp` and any of its base paths that do not yet have an index.
+    pub fn move_path(&self,
+                     tcx: &ty::ctxt<'tcx>,
+                     lp: Rc<LoanPath<'tcx>>) -> MovePathIndex {
+        match self.path_map.borrow().get(&lp) {
+            Some(&index) => {
+                return index;
+            }
+            None => {}
+        }
+
+        let index = match lp.kind {
+            LpVar(..) | LpUpvar(..) => {
+                let index = MovePathIndex(self.paths.borrow().len());
+
+                self.paths.borrow_mut().push(MovePath {
+                    loan_path: lp.clone(),
+                    parent: InvalidMovePathIndex,
+                    first_move: InvalidMoveIndex,
+                    first_child: InvalidMovePathIndex,
+                    next_sibling: InvalidMovePathIndex,
+                });
+
+                index
+            }
+
+            LpDowncast(ref base, _) |
+            LpExtend(ref base, _, _) => {
+                let parent_index = self.move_path(tcx, base.clone());
+
+                let index = MovePathIndex(self.paths.borrow().len());
+
+                let next_sibling = self.path_first_child(parent_index);
+                self.set_path_first_child(parent_index, index);
+
+                self.paths.borrow_mut().push(MovePath {
+                    loan_path: lp.clone(),
+                    parent: parent_index,
+                    first_move: InvalidMoveIndex,
+                    first_child: InvalidMovePathIndex,
+                    next_sibling: next_sibling,
+                });
+
+                index
+            }
+        };
+
+        debug!("move_path(lp={}, index={})",
+               lp.repr(tcx),
+               index);
+
+        assert_eq!(index.get(), self.paths.borrow().len() - 1);
+        self.path_map.borrow_mut().insert(lp, index);
+        return index;
+    }
+
+    fn existing_move_path(&self, lp: &Rc<LoanPath<'tcx>>)
+                          -> Option<MovePathIndex> {
+        self.path_map.borrow().get(lp).cloned()
+    }
+
+    fn existing_base_paths(&self, lp: &Rc<LoanPath<'tcx>>)
+                           -> Vec<MovePathIndex> {
+        let mut result = vec!();
+        self.add_existing_base_paths(lp, &mut result);
+        result
+    }
+
+    /// Adds any existing move path indices for `lp` and any base paths of `lp` to `result`, but
+    /// does not add new move paths
+    fn add_existing_base_paths(&self, lp: &Rc<LoanPath<'tcx>>,
+                               result: &mut Vec<MovePathIndex>) {
+        match self.path_map.borrow().get(lp).cloned() {
+            Some(index) => {
+                self.each_base_path(index, |p| {
+                    result.push(p);
+                    true
+                });
+            }
+            None => {
+                match lp.kind {
+                    LpVar(..) | LpUpvar(..) => { }
+                    LpDowncast(ref b, _) |
+                    LpExtend(ref b, _, _) => {
+                        self.add_existing_base_paths(b, result);
+                    }
+                }
+            }
+        }
+
+    }
+
+    /// Adds a new move entry for a move of `lp` that occurs at location `id` with kind `kind`.
+    pub fn add_move(&self,
+                    tcx: &ty::ctxt<'tcx>,
+                    lp: Rc<LoanPath<'tcx>>,
+                    id: ast::NodeId,
+                    kind: MoveKind) {
+        debug!("add_move(lp={}, id={}, kind={})",
+               lp.repr(tcx),
+               id,
+               kind);
+
+        let path_index = self.move_path(tcx, lp.clone());
+        let move_index = MoveIndex(self.moves.borrow().len());
+
+        self.fragments.borrow_mut().add_move(path_index);
+
+        let next_move = self.path_first_move(path_index);
+        self.set_path_first_move(path_index, move_index);
+
+        self.moves.borrow_mut().push(Move {
+            path: path_index,
+            id: id,
+            kind: kind,
+            next_move: next_move
+        });
+    }
+
+    /// Adds a new record for an assignment to `lp` that occurs at location `id` with the given
+    /// `span`.
+    pub fn add_assignment(&self,
+                          tcx: &ty::ctxt<'tcx>,
+                          lp: Rc<LoanPath<'tcx>>,
+                          assign_id: ast::NodeId,
+                          span: Span,
+                          assignee_id: ast::NodeId,
+                          mode: euv::MutateMode) {
+        debug!("add_assignment(lp={}, assign_id={}, assignee_id={}",
+               lp.repr(tcx), assign_id, assignee_id);
+
+        let path_index = self.move_path(tcx, lp.clone());
+
+        self.fragments.borrow_mut().add_assignment(path_index);
+
+        match mode {
+            euv::Init | euv::JustWrite => {
+                self.assignee_ids.borrow_mut().insert(assignee_id);
+            }
+            euv::WriteAndRead => { }
+        }
+
+        let assignment = Assignment {
+            path: path_index,
+            id: assign_id,
+            span: span,
+        };
+
+        if self.is_var_path(path_index) {
+            debug!("add_assignment[var](lp={}, assignment={}, path_index={})",
+                   lp.repr(tcx), self.var_assignments.borrow().len(), path_index);
+
+            self.var_assignments.borrow_mut().push(assignment);
+        } else {
+            debug!("add_assignment[path](lp={}, path_index={})",
+                   lp.repr(tcx), path_index);
+
+            self.path_assignments.borrow_mut().push(assignment);
+        }
+    }
+
+    /// Adds a new record for a match of `base_lp`, downcast to
+    /// variant `lp`, that occurs at location `pattern_id`.  (One
+    /// should be able to recover the span info from the
+    /// `pattern_id` and the ast_map, I think.)
+    pub fn add_variant_match(&self,
+                             tcx: &ty::ctxt<'tcx>,
+                             lp: Rc<LoanPath<'tcx>>,
+                             pattern_id: ast::NodeId,
+                             base_lp: Rc<LoanPath<'tcx>>,
+                             mode: euv::MatchMode) {
+        debug!("add_variant_match(lp={}, pattern_id={})",
+               lp.repr(tcx), pattern_id);
+
+        let path_index = self.move_path(tcx, lp.clone());
+        let base_path_index = self.move_path(tcx, base_lp.clone());
+
+        self.fragments.borrow_mut().add_assignment(path_index);
+
+        let variant_match = VariantMatch {
+            path: path_index,
+            base_path: base_path_index,
+            id: pattern_id,
+            mode: mode,
+        };
+
+        self.variant_matches.borrow_mut().push(variant_match);
+    }
+
+    fn fixup_fragment_sets(&self, tcx: &ty::ctxt<'tcx>) {
+        fragments::fixup_fragment_sets(self, tcx)
+    }
+
+    /// Adds the gen/kills for the various moves and
+    /// assignments into the provided data flow contexts.
+    /// Moves are generated by moves and killed by assignments and
+    /// scoping. Assignments are generated by assignment to variables and
+    /// killed by scoping. See `doc.rs` for more details.
+    fn add_gen_kills(&self,
+                     tcx: &ty::ctxt<'tcx>,
+                     dfcx_moves: &mut MoveDataFlow,
+                     dfcx_assign: &mut AssignDataFlow) {
+        for (i, the_move) in self.moves.borrow().iter().enumerate() {
+            dfcx_moves.add_gen(the_move.id, i);
+        }
+
+        for (i, assignment) in self.var_assignments.borrow().iter().enumerate() {
+            dfcx_assign.add_gen(assignment.id, i);
+            self.kill_moves(assignment.path, assignment.id, dfcx_moves);
+        }
+
+        for assignment in self.path_assignments.borrow().iter() {
+            self.kill_moves(assignment.path, assignment.id, dfcx_moves);
+        }
+
+        // Kill all moves related to a variable `x` when
+        // it goes out of scope:
+        for path in self.paths.borrow().iter() {
+            match path.loan_path.kind {
+                LpVar(..) | LpUpvar(..) | LpDowncast(..) => {
+                    let kill_scope = path.loan_path.kill_scope(tcx);
+                    let path = self.path_map.borrow()[path.loan_path];
+                    self.kill_moves(path, kill_scope.node_id(), dfcx_moves);
+                }
+                LpExtend(..) => {}
+            }
+        }
+
+        // Kill all assignments when the variable goes out of scope:
+        for (assignment_index, assignment) in
+                self.var_assignments.borrow().iter().enumerate() {
+            let lp = self.path_loan_path(assignment.path);
+            match lp.kind {
+                LpVar(..) | LpUpvar(..) | LpDowncast(..) => {
+                    let kill_scope = lp.kill_scope(tcx);
+                    dfcx_assign.add_kill(kill_scope.node_id(), assignment_index);
+                }
+                LpExtend(..) => {
+                    tcx.sess.bug("var assignment for non var path");
+                }
+            }
+        }
+    }
+
+    fn each_base_path<F>(&self, index: MovePathIndex, mut f: F) -> bool where
+        F: FnMut(MovePathIndex) -> bool,
+    {
+        let mut p = index;
+        while p != InvalidMovePathIndex {
+            if !f(p) {
+                return false;
+            }
+            p = self.path_parent(p);
+        }
+        return true;
+    }
+
+    // FIXME(#19596) unbox `f`
+    fn each_extending_path(&self, index: MovePathIndex, f: |MovePathIndex| -> bool) -> bool {
+        if !f(index) {
+            return false;
+        }
+
+        let mut p = self.path_first_child(index);
+        while p != InvalidMovePathIndex {
+            if !self.each_extending_path(p, |x| f(x)) {
+                return false;
+            }
+            p = self.path_next_sibling(p);
+        }
+
+        return true;
+    }
+
+    fn each_applicable_move<F>(&self, index0: MovePathIndex, mut f: F) -> bool where
+        F: FnMut(MoveIndex) -> bool,
+    {
+        let mut ret = true;
+        self.each_extending_path(index0, |index| {
+            let mut p = self.path_first_move(index);
+            while p != InvalidMoveIndex {
+                if !f(p) {
+                    ret = false;
+                    break;
+                }
+                p = self.move_next_move(p);
+            }
+            ret
+        });
+        ret
+    }
+
+    fn kill_moves(&self,
+                  path: MovePathIndex,
+                  kill_id: ast::NodeId,
+                  dfcx_moves: &mut MoveDataFlow) {
+        // We can only perform kills for paths that refer to a unique location,
+        // since otherwise we may kill a move from one location with an
+        // assignment referring to another location.
+
+        let loan_path = self.path_loan_path(path);
+        if loan_path_is_precise(&*loan_path) {
+            self.each_applicable_move(path, |move_index| {
+                dfcx_moves.add_kill(kill_id, move_index.get());
+                true
+            });
+        }
+    }
+}
+
+impl<'a, 'tcx> FlowedMoveData<'a, 'tcx> {
+    pub fn new(move_data: MoveData<'tcx>,
+               tcx: &'a ty::ctxt<'tcx>,
+               cfg: &cfg::CFG,
+               id_range: ast_util::IdRange,
+               decl: &ast::FnDecl,
+               body: &ast::Block)
+               -> FlowedMoveData<'a, 'tcx> {
+        let mut dfcx_moves =
+            DataFlowContext::new(tcx,
+                                 "flowed_move_data_moves",
+                                 Some(decl),
+                                 cfg,
+                                 MoveDataFlowOperator,
+                                 id_range,
+                                 move_data.moves.borrow().len());
+        let mut dfcx_assign =
+            DataFlowContext::new(tcx,
+                                 "flowed_move_data_assigns",
+                                 Some(decl),
+                                 cfg,
+                                 AssignDataFlowOperator,
+                                 id_range,
+                                 move_data.var_assignments.borrow().len());
+
+        move_data.fixup_fragment_sets(tcx);
+
+        move_data.add_gen_kills(tcx,
+                                &mut dfcx_moves,
+                                &mut dfcx_assign);
+
+        dfcx_moves.add_kills_from_flow_exits(cfg);
+        dfcx_assign.add_kills_from_flow_exits(cfg);
+
+        dfcx_moves.propagate(cfg, body);
+        dfcx_assign.propagate(cfg, body);
+
+        FlowedMoveData {
+            move_data: move_data,
+            dfcx_moves: dfcx_moves,
+            dfcx_assign: dfcx_assign,
+        }
+    }
+
+    pub fn kind_of_move_of_path(&self,
+                                id: ast::NodeId,
+                                loan_path: &Rc<LoanPath<'tcx>>)
+                                -> Option<MoveKind> {
+        //! Returns the kind of a move of `loan_path` by `id`, if one exists.
+
+        let mut ret = None;
+        for loan_path_index in self.move_data.path_map.borrow().get(&*loan_path).iter() {
+            self.dfcx_moves.each_gen_bit(id, |move_index| {
+                let the_move = self.move_data.moves.borrow();
+                let the_move = (*the_move)[move_index];
+                if the_move.path == **loan_path_index {
+                    ret = Some(the_move.kind);
+                    false
+                } else {
+                    true
+                }
+            });
+        }
+        ret
+    }
+
+    /// Iterates through each move of `loan_path` (or some base path of `loan_path`) that *may*
+    /// have occurred on entry to `id` without an intervening assignment. In other words, any moves
+    /// that would invalidate a reference to `loan_path` at location `id`.
+    pub fn each_move_of<F>(&self,
+                           id: ast::NodeId,
+                           loan_path: &Rc<LoanPath<'tcx>>,
+                           mut f: F)
+                           -> bool where
+        F: FnMut(&Move, &LoanPath<'tcx>) -> bool,
+    {
+        // Bad scenarios:
+        //
+        // 1. Move of `a.b.c`, use of `a.b.c`
+        // 2. Move of `a.b.c`, use of `a.b.c.d`
+        // 3. Move of `a.b.c`, use of `a` or `a.b`
+        //
+        // OK scenario:
+        //
+        // 4. move of `a.b.c`, use of `a.b.d`
+
+        let base_indices = self.move_data.existing_base_paths(loan_path);
+        if base_indices.is_empty() {
+            return true;
+        }
+
+        let opt_loan_path_index = self.move_data.existing_move_path(loan_path);
+
+        let mut ret = true;
+
+        self.dfcx_moves.each_bit_on_entry(id, |index| {
+            let the_move = self.move_data.moves.borrow();
+            let the_move = &(*the_move)[index];
+            let moved_path = the_move.path;
+            if base_indices.iter().any(|x| x == &moved_path) {
+                // Scenario 1 or 2: `loan_path` or some base path of
+                // `loan_path` was moved.
+                if !f(the_move, &*self.move_data.path_loan_path(moved_path)) {
+                    ret = false;
+                }
+            } else {
+                for &loan_path_index in opt_loan_path_index.iter() {
+                    let cont = self.move_data.each_base_path(moved_path, |p| {
+                        if p == loan_path_index {
+                            // Scenario 3: some extension of `loan_path`
+                            // was moved
+                            f(the_move,
+                              &*self.move_data.path_loan_path(moved_path))
+                        } else {
+                            true
+                        }
+                    });
+                    if !cont { ret = false; break }
+                }
+            }
+            ret
+        })
+    }
+
+    /// Iterates through every assignment to `loan_path` that may have occurred on entry to `id`.
+    /// `loan_path` must be a single variable.
+    pub fn each_assignment_of<F>(&self,
+                                 id: ast::NodeId,
+                                 loan_path: &Rc<LoanPath<'tcx>>,
+                                 mut f: F)
+                                 -> bool where
+        F: FnMut(&Assignment) -> bool,
+    {
+        let loan_path_index = {
+            match self.move_data.existing_move_path(loan_path) {
+                Some(i) => i,
+                None => {
+                    // if there were any assignments, it'd have an index
+                    return true;
+                }
+            }
+        };
+
+        self.dfcx_assign.each_bit_on_entry(id, |index| {
+            let assignment = self.move_data.var_assignments.borrow();
+            let assignment = &(*assignment)[index];
+            if assignment.path == loan_path_index && !f(assignment) {
+                false
+            } else {
+                true
+            }
+        })
+    }
+}
+
+impl BitwiseOperator for MoveDataFlowOperator {
+    #[inline]
+    fn join(&self, succ: uint, pred: uint) -> uint {
+        succ | pred // moves from both preds are in scope
+    }
+}
+
+impl DataFlowOperator for MoveDataFlowOperator {
+    #[inline]
+    fn initial_value(&self) -> bool {
+        false // no loans in scope by default
+    }
+}
+
+impl BitwiseOperator for AssignDataFlowOperator {
+    #[inline]
+    fn join(&self, succ: uint, pred: uint) -> uint {
+        succ | pred // moves from both preds are in scope
+    }
+}
+
+impl DataFlowOperator for AssignDataFlowOperator {
+    #[inline]
+    fn initial_value(&self) -> bool {
+        false // no assignments in scope by default
+    }
+}
diff --git a/src/librustc_borrowck/graphviz.rs b/src/librustc_borrowck/graphviz.rs
new file mode 100644 (file)
index 0000000..9d41efd
--- /dev/null
@@ -0,0 +1,152 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! This module provides linkage between rustc::middle::graph and
+//! libgraphviz traits, specialized to attaching borrowck analysis
+//! data to rendered labels.
+
+pub use self::Variant::*;
+
+pub use rustc::middle::cfg::graphviz::{Node, Edge};
+use rustc::middle::cfg::graphviz as cfg_dot;
+
+use borrowck;
+use borrowck::{BorrowckCtxt, LoanPath};
+use dot;
+use rustc::middle::cfg::{CFGIndex};
+use rustc::middle::dataflow::{DataFlowOperator, DataFlowContext, EntryOrExit};
+use rustc::middle::dataflow;
+use std::rc::Rc;
+
+#[deriving(Show)]
+pub enum Variant {
+    Loans,
+    Moves,
+    Assigns,
+}
+
+impl Copy for Variant {}
+
+impl Variant {
+    pub fn short_name(&self) -> &'static str {
+        match *self {
+            Loans   => "loans",
+            Moves   => "moves",
+            Assigns => "assigns",
+        }
+    }
+}
+
+pub struct DataflowLabeller<'a, 'tcx: 'a> {
+    pub inner: cfg_dot::LabelledCFG<'a, 'tcx>,
+    pub variants: Vec<Variant>,
+    pub borrowck_ctxt: &'a BorrowckCtxt<'a, 'tcx>,
+    pub analysis_data: &'a borrowck::AnalysisData<'a, 'tcx>,
+}
+
+impl<'a, 'tcx> DataflowLabeller<'a, 'tcx> {
+    fn dataflow_for(&self, e: EntryOrExit, n: &Node<'a>) -> String {
+        let id = n.1.data.id;
+        debug!("dataflow_for({}, id={}) {}", e, id, self.variants);
+        let mut sets = "".to_string();
+        let mut seen_one = false;
+        for &variant in self.variants.iter() {
+            if seen_one { sets.push_str(" "); } else { seen_one = true; }
+            sets.push_str(variant.short_name());
+            sets.push_str(": ");
+            sets.push_str(self.dataflow_for_variant(e, n, variant).as_slice());
+        }
+        sets
+    }
+
+    fn dataflow_for_variant(&self, e: EntryOrExit, n: &Node, v: Variant) -> String {
+        let cfgidx = n.0;
+        match v {
+            Loans   => self.dataflow_loans_for(e, cfgidx),
+            Moves   => self.dataflow_moves_for(e, cfgidx),
+            Assigns => self.dataflow_assigns_for(e, cfgidx),
+        }
+    }
+
+    fn build_set<O:DataFlowOperator, F>(&self,
+                                        e: EntryOrExit,
+                                        cfgidx: CFGIndex,
+                                        dfcx: &DataFlowContext<'a, 'tcx, O>,
+                                        mut to_lp: F) -> String where
+        F: FnMut(uint) -> Rc<LoanPath<'tcx>>,
+    {
+        let mut saw_some = false;
+        let mut set = "{".to_string();
+        dfcx.each_bit_for_node(e, cfgidx, |index| {
+            let lp = to_lp(index);
+            if saw_some {
+                set.push_str(", ");
+            }
+            let loan_str = self.borrowck_ctxt.loan_path_to_string(&*lp);
+            set.push_str(loan_str.as_slice());
+            saw_some = true;
+            true
+        });
+        set.push_str("}");
+        set
+    }
+
+    fn dataflow_loans_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
+        let dfcx = &self.analysis_data.loans;
+        let loan_index_to_path = |&mut: loan_index| {
+            let all_loans = &self.analysis_data.all_loans;
+            all_loans[loan_index].loan_path()
+        };
+        self.build_set(e, cfgidx, dfcx, loan_index_to_path)
+    }
+
+    fn dataflow_moves_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
+        let dfcx = &self.analysis_data.move_data.dfcx_moves;
+        let move_index_to_path = |&mut: move_index| {
+            let move_data = &self.analysis_data.move_data.move_data;
+            let moves = move_data.moves.borrow();
+            let the_move = &(*moves)[move_index];
+            move_data.path_loan_path(the_move.path)
+        };
+        self.build_set(e, cfgidx, dfcx, move_index_to_path)
+    }
+
+    fn dataflow_assigns_for(&self, e: EntryOrExit, cfgidx: CFGIndex) -> String {
+        let dfcx = &self.analysis_data.move_data.dfcx_assign;
+        let assign_index_to_path = |&mut: assign_index| {
+            let move_data = &self.analysis_data.move_data.move_data;
+            let assignments = move_data.var_assignments.borrow();
+            let assignment = &(*assignments)[assign_index];
+            move_data.path_loan_path(assignment.path)
+        };
+        self.build_set(e, cfgidx, dfcx, assign_index_to_path)
+    }
+}
+
+impl<'a, 'tcx> dot::Labeller<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 'tcx> {
+    fn graph_id(&'a self) -> dot::Id<'a> { self.inner.graph_id() }
+    fn node_id(&'a self, n: &Node<'a>) -> dot::Id<'a> { self.inner.node_id(n) }
+    fn node_label(&'a self, n: &Node<'a>) -> dot::LabelText<'a> {
+        let prefix = self.dataflow_for(dataflow::Entry, n);
+        let suffix = self.dataflow_for(dataflow::Exit, n);
+        let inner_label = self.inner.node_label(n);
+        inner_label
+            .prefix_line(dot::LabelStr(prefix.into_cow()))
+            .suffix_line(dot::LabelStr(suffix.into_cow()))
+    }
+    fn edge_label(&'a self, e: &Edge<'a>) -> dot::LabelText<'a> { self.inner.edge_label(e) }
+}
+
+impl<'a, 'tcx> dot::GraphWalk<'a, Node<'a>, Edge<'a>> for DataflowLabeller<'a, 'tcx> {
+    fn nodes(&'a self) -> dot::Nodes<'a, Node<'a>> { self.inner.nodes() }
+    fn edges(&'a self) -> dot::Edges<'a, Edge<'a>> { self.inner.edges() }
+    fn source(&'a self, edge: &Edge<'a>) -> Node<'a> { self.inner.source(edge) }
+    fn target(&'a self, edge: &Edge<'a>) -> Node<'a> { self.inner.target(edge) }
+}
diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs
new file mode 100644 (file)
index 0000000..db19a09
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "rustc_borrowck"]
+#![experimental]
+#![crate_type = "dylib"]
+#![crate_type = "rlib"]
+#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+      html_favicon_url = "http://www.rust-lang.org/favicon.ico",
+      html_root_url = "http://doc.rust-lang.org/nightly/")]
+
+#![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
+#![feature(slicing_syntax, tuple_indexing, unsafe_destructor)]
+#![feature(rustc_diagnostic_macros)]
+#![feature(unboxed_closures)]
+#![allow(non_camel_case_types)]
+
+#[phase(plugin, link)] extern crate log;
+#[phase(plugin, link)] extern crate syntax;
+
+// for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
+// refers to the borrowck-specific graphviz adapter traits.
+extern crate "graphviz" as dot;
+extern crate rustc;
+
+pub use borrowck::check_crate;
+pub use borrowck::build_borrowck_dataflow_data_for_fn;
+pub use borrowck::FnPartsWithCFG;
+
+mod borrowck;
+
+pub mod graphviz;
+
index 749bed15e38e05cc05a4c293d35f667327f1fed3..9ed4f46c16884ae08e439c6211b127d69a632909 100644 (file)
@@ -19,6 +19,7 @@
 use rustc::plugin::registry::Registry;
 use rustc::plugin;
 use rustc::util::common::time;
+use rustc_borrowck as borrowck;
 use rustc_trans::back::link;
 use rustc_trans::back::write;
 use rustc_trans::save;
@@ -46,12 +47,6 @@ pub fn compile_input(sess: Session,
                      outdir: &Option<Path>,
                      output: &Option<Path>,
                      addl_plugins: Option<Plugins>) {
-    // These may be left in an incoherent state after a previous compile.
-    // `clear_tables` and `get_ident_interner().clear()` can be used to free
-    // memory, but they do not restore the initial state.
-    syntax::ext::mtwt::reset_tables();
-    token::reset_ident_interner();
-
     // We need nested scopes here, because the intermediate results can keep
     // large chunks of memory alive and we want to free them as soon as
     // possible to keep the peak memory usage low
@@ -115,6 +110,12 @@ pub fn source_name(input: &Input) -> String {
 
 pub fn phase_1_parse_input(sess: &Session, cfg: ast::CrateConfig, input: &Input)
     -> ast::Crate {
+    // These may be left in an incoherent state after a previous compile.
+    // `clear_tables` and `get_ident_interner().clear()` can be used to free
+    // memory, but they do not restore the initial state.
+    syntax::ext::mtwt::reset_tables();
+    token::reset_ident_interner();
+
     let krate = time(sess.time_passes(), "parsing", (), |_| {
         match *input {
             Input::File(ref file) => {
@@ -420,7 +421,7 @@ pub fn phase_3_run_analysis_passes<'tcx>(sess: Session,
          middle::liveness::check_crate(&ty_cx));
 
     time(time_passes, "borrow checking", (), |_|
-         middle::borrowck::check_crate(&ty_cx));
+         borrowck::check_crate(&ty_cx));
 
     time(time_passes, "rvalue checking", (), |_|
          middle::check_rvalues::check_crate(&ty_cx, krate));
index 7f15f5e87d9dd3372db2171b21972cbb4ad4ac61..b0f8b3bdbe7df8970b367f2a93a00627570baef3 100644 (file)
       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
       html_root_url = "http://doc.rust-lang.org/nightly/")]
 
-#![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
+#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
 #![feature(slicing_syntax, unsafe_destructor)]
 #![feature(rustc_diagnostic_macros)]
+#![feature(unboxed_closures)]
 
 extern crate arena;
 extern crate flate;
 extern crate graphviz;
 extern crate libc;
 extern crate rustc;
-extern crate rustc_typeck;
 extern crate rustc_back;
+extern crate rustc_borrowck;
 extern crate rustc_trans;
+extern crate rustc_typeck;
 #[phase(plugin, link)] extern crate log;
 #[phase(plugin, link)] extern crate syntax;
 extern crate serialize;
@@ -69,7 +71,7 @@
 pub mod pretty;
 
 pub fn run(args: Vec<String>) -> int {
-    monitor(proc() run_compiler(args.as_slice()));
+    monitor(move |:| run_compiler(args.as_slice()));
     0
 }
 
@@ -469,7 +471,7 @@ pub fn list_metadata(sess: &Session, path: &Path,
 ///
 /// The diagnostic emitter yielded to the procedure should be used for reporting
 /// errors of the compiler.
-pub fn monitor(f: proc():Send) {
+pub fn monitor<F:FnOnce()+Send>(f: F) {
     static STACK_SIZE: uint = 32000000; // 32MB
 
     let (tx, rx) = channel();
index d143d05acfe4b9b5ec05c489e0e1ff34398d02bf..7ec05b6a0306e3c331732067c587e069fb801c50 100644 (file)
 use driver;
 
 use rustc::middle::ty;
-use rustc::middle::borrowck::{mod, FnPartsWithCFG};
-use rustc::middle::borrowck::graphviz as borrowck_dot;
 use rustc::middle::cfg;
 use rustc::middle::cfg::graphviz::LabelledCFG;
 use rustc::session::Session;
 use rustc::session::config::{mod, Input};
 use rustc::util::ppaux;
+use rustc_borrowck as borrowck;
+use rustc_borrowck::graphviz as borrowck_dot;
 
 use syntax::ast;
 use syntax::ast_map::{mod, blocks, NodePrinter};
@@ -78,7 +78,7 @@ pub fn parse_pretty(sess: &Session, name: &str) -> (PpMode, Option<UserIdentifie
                  or `expanded,identified`; got {}", name).as_slice());
         }
     };
-    let opt_second = opt_second.and_then::<UserIdentifiedItem>(from_str);
+    let opt_second = opt_second.and_then::<UserIdentifiedItem, _>(from_str);
     (first, opt_second)
 }
 
@@ -99,13 +99,15 @@ pub fn parse_pretty(sess: &Session, name: &str) -> (PpMode, Option<UserIdentifie
 
 impl PpSourceMode {
     /// Constructs a `PrinterSupport` object and passes it to `f`.
-    fn call_with_pp_support<'tcx, A, B>(&self,
-                                        sess: Session,
-                                        ast_map: Option<ast_map::Map<'tcx>>,
-                                        type_arena: &'tcx TypedArena<ty::TyS<'tcx>>,
-                                        id: String,
-                                        payload: B,
-                                        f: |&PrinterSupport, B| -> A) -> A {
+    fn call_with_pp_support<'tcx, A, B, F>(&self,
+                                           sess: Session,
+                                           ast_map: Option<ast_map::Map<'tcx>>,
+                                           type_arena: &'tcx TypedArena<ty::TyS<'tcx>>,
+                                           id: String,
+                                           payload: B,
+                                           f: F) -> A where
+        F: FnOnce(&PrinterSupport, B) -> A,
+    {
         match *self {
             PpmNormal | PpmExpanded => {
                 let annotation = NoAnn { sess: sess, ast_map: ast_map };
@@ -313,14 +315,12 @@ pub enum UserIdentifiedItem {
 
 impl FromStr for UserIdentifiedItem {
     fn from_str(s: &str) -> Option<UserIdentifiedItem> {
-        let extract_path_parts = || {
+        from_str(s).map(ItemViaNode).or_else(|| {
             let v : Vec<_> = s.split_str("::")
                 .map(|x|x.to_string())
                 .collect();
             Some(ItemViaPath(v))
-        };
-
-        from_str(s).map(ItemViaNode).or_else(extract_path_parts)
+        })
     }
 }
 
@@ -565,7 +565,7 @@ fn print_flowgraph<W:io::Writer>(variants: Vec<borrowck_dot::Variant>,
             return Ok(())
         }
         blocks::FnLikeCode(fn_like) => {
-            let fn_parts = FnPartsWithCFG::from_fn_like(&fn_like, &cfg);
+            let fn_parts = borrowck::FnPartsWithCFG::from_fn_like(&fn_like, &cfg);
             let (bccx, analysis_data) =
                 borrowck::build_borrowck_dataflow_data_for_fn(ty_cx, fn_parts);
 
index 9404802cb681bd63f612fa70deb90cfd1cd9c398..6a50af3bc799208adcda6d2d57a466c9058f9415 100644 (file)
@@ -93,9 +93,11 @@ fn errors(msgs: &[&str]) -> (Box<Emitter+Send>, uint) {
     (box ExpectErrorEmitter { messages: v } as Box<Emitter+Send>, msgs.len())
 }
 
-fn test_env(source_string: &str,
-            (emitter, expected_err_count): (Box<Emitter+Send>, uint),
-            body: |Env|) {
+fn test_env<F>(source_string: &str,
+               (emitter, expected_err_count): (Box<Emitter+Send>, uint),
+               body: F) where
+    F: FnOnce(Env),
+{
     let mut options =
         config::basic_options();
     options.debugging_opts |= config::VERBOSE;
@@ -268,7 +270,7 @@ pub fn t_closure(&self,
                      -> Ty<'tcx>
     {
         ty::mk_closure(self.infcx.tcx, ty::ClosureTy {
-            fn_style: ast::NormalFn,
+            unsafety: ast::Unsafety::Normal,
             onceness: ast::Many,
             store: ty::RegionTraitStore(region_bound, ast::MutMutable),
             bounds: ty::region_existential_bound(region_bound),
index 23dad21e5303f8c179e64f992243d30c244a7178..b052c8755cb75bbebe0bfc4dcd1182b4627c272b 100644 (file)
@@ -23,6 +23,7 @@
 
 #![feature(globs)]
 #![feature(link_args)]
+#![feature(unboxed_closures)]
 
 extern crate libc;
 
@@ -149,7 +150,6 @@ impl Copy for DiagnosticSeverity {}
     }
 }
 
-impl Copy for Attribute {}
 
 #[repr(u64)]
 pub enum OtherAttribute {
@@ -466,6 +466,9 @@ pub enum Builder_opaque {}
 pub enum ExecutionEngine_opaque {}
 pub type ExecutionEngineRef = *mut ExecutionEngine_opaque;
 #[allow(missing_copy_implementations)]
+pub enum RustJITMemoryManager_opaque {}
+pub type RustJITMemoryManagerRef = *mut RustJITMemoryManager_opaque;
+#[allow(missing_copy_implementations)]
 pub enum MemoryBuffer_opaque {}
 pub type MemoryBufferRef = *mut MemoryBuffer_opaque;
 #[allow(missing_copy_implementations)]
@@ -1064,7 +1067,18 @@ pub fn LLVMInsertIntoBuilderWithName(Builder: BuilderRef,
                                          Instr: ValueRef,
                                          Name: *const c_char);
     pub fn LLVMDisposeBuilder(Builder: BuilderRef);
+
+    /* Execution engine */
+    pub fn LLVMRustCreateJITMemoryManager(morestack: *const ())
+                                          -> RustJITMemoryManagerRef;
+    pub fn LLVMBuildExecutionEngine(Mod: ModuleRef,
+                                    MM: RustJITMemoryManagerRef) -> ExecutionEngineRef;
     pub fn LLVMDisposeExecutionEngine(EE: ExecutionEngineRef);
+    pub fn LLVMExecutionEngineFinalizeObject(EE: ExecutionEngineRef);
+    pub fn LLVMRustLoadDynamicLibrary(path: *const c_char) -> Bool;
+    pub fn LLVMExecutionEngineAddModule(EE: ExecutionEngineRef, M: ModuleRef);
+    pub fn LLVMExecutionEngineRemoveModule(EE: ExecutionEngineRef, M: ModuleRef)
+                                           -> Bool;
 
     /* Metadata */
     pub fn LLVMSetCurrentDebugLocation(Builder: BuilderRef, L: ValueRef);
@@ -2206,7 +2220,7 @@ pub enum RustString_opaque {}
     (*sr).borrow_mut().push_all(slice);
 }
 
-pub fn build_string(f: |RustStringRef|) -> Option<String> {
+pub fn build_string<F>(f: F) -> Option<String> where F: FnOnce(RustStringRef){
     let mut buf = RefCell::new(Vec::new());
     f(&mut buf as RustStringRepr as RustStringRef);
     String::from_utf8(buf.into_inner()).ok()
index 62f8177ed758d36dd313ee49d08a73d7187b9988..5617110bfecf774f5c89b5a767a91b6d51ca18bf 100644 (file)
@@ -1002,7 +1002,7 @@ fn link_args(cmd: &mut Command,
     if sess.opts.cg.rpath {
         let sysroot = sess.sysroot();
         let target_triple = sess.opts.target_triple.as_slice();
-        let get_install_prefix_lib_path = || {
+        let get_install_prefix_lib_path = |:| {
             let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");
             let tlib = filesearch::relative_target_lib_path(sysroot, target_triple);
             let mut path = Path::new(install_prefix);
index a715849ddf62f607fcd17b26230889a58bbcbeb6..fb4d6de5f282c20728bca4e3925a175386e2fa13 100644 (file)
@@ -81,8 +81,9 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
                     break;
                 },
             };
-            let bc_extractor = if is_versioned_bytecode_format(bc_encoded) {
-                |_| {
+
+            let bc_decoded = if is_versioned_bytecode_format(bc_encoded) {
+                time(sess.time_passes(), format!("decode {}.{}.bc", file, i).as_slice(), (), |_| {
                     // Read the version
                     let version = extract_bytecode_format_version(bc_encoded);
 
@@ -104,11 +105,11 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
                         sess.fatal(format!("Unsupported bytecode format version {}",
                                            version).as_slice())
                     }
-                }
+                })
             } else {
+                time(sess.time_passes(), format!("decode {}.{}.bc", file, i).as_slice(), (), |_| {
                 // the object must be in the old, pre-versioning format, so simply
                 // inflate everything and let LLVM decide if it can make sense of it
-                |_| {
                     match flate::inflate_bytes(bc_encoded) {
                         Some(bc) => bc,
                         None => {
@@ -116,14 +117,9 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
                                                name).as_slice())
                         }
                     }
-                }
+                })
             };
 
-            let bc_decoded = time(sess.time_passes(),
-                                  format!("decode {}.{}.bc", file, i).as_slice(),
-                                  (),
-                                  bc_extractor);
-
             let ptr = bc_decoded.as_slice().as_ptr();
             debug!("linking {}, part {}", name, i);
             time(sess.time_passes(),
index 0ed6ae311711fc747b79cd4ddbcdb1f37a5138da..24dfe600f2a56f2320bc5e665eac6d360789d153 100644 (file)
@@ -488,8 +488,12 @@ unsafe fn optimize_and_codegen(cgcx: &CodegenContext,
     // pass manager passed to the closure should be ensured to not
     // escape the closure itself, and the manager should only be
     // used once.
-    unsafe fn with_codegen(tm: TargetMachineRef, llmod: ModuleRef,
-                    no_builtins: bool, f: |PassManagerRef|) {
+    unsafe fn with_codegen<F>(tm: TargetMachineRef,
+                              llmod: ModuleRef,
+                              no_builtins: bool,
+                              f: F) where
+        F: FnOnce(PassManagerRef),
+    {
         let cpm = llvm::LLVMCreatePassManager();
         llvm::LLVMRustAddAnalysisPasses(tm, cpm, llmod);
         llvm::LLVMRustAddLibraryInfo(cpm, llmod, no_builtins);
@@ -838,18 +842,31 @@ pub fn run_passes(sess: &Session,
     //if sess.time_llvm_passes() { llvm::LLVMRustPrintPassTimings(); }
 }
 
-type WorkItem = proc(&CodegenContext):Send;
+struct WorkItem {
+    mtrans: ModuleTranslation,
+    config: ModuleConfig,
+    output_names: OutputFilenames,
+    name_extra: String
+}
 
 fn build_work_item(sess: &Session,
                    mtrans: ModuleTranslation,
                    config: ModuleConfig,
                    output_names: OutputFilenames,
-                   name_extra: String) -> WorkItem {
+                   name_extra: String)
+                   -> WorkItem
+{
     let mut config = config;
     config.tm = create_target_machine(sess);
+    WorkItem { mtrans: mtrans, config: config, output_names: output_names,
+               name_extra: name_extra }
+}
 
-    proc(cgcx) unsafe {
-        optimize_and_codegen(cgcx, mtrans, config, name_extra, output_names);
+fn execute_work_item(cgcx: &CodegenContext,
+                     work_item: WorkItem) {
+    unsafe {
+        optimize_and_codegen(cgcx, work_item.mtrans, work_item.config,
+                             work_item.name_extra, work_item.output_names);
     }
 }
 
@@ -862,7 +879,7 @@ fn run_work_singlethreaded(sess: &Session,
     // Since we're running single-threaded, we can pass the session to
     // the proc, allowing `optimize_and_codegen` to perform LTO.
     for work in Unfold::new((), |_| work_items.pop()) {
-        work(&cgcx);
+        execute_work_item(&cgcx, work);
     }
 }
 
@@ -879,7 +896,7 @@ fn run_work_multithreaded(sess: &Session,
         let diag_emitter = diag_emitter.clone();
         let remark = sess.opts.cg.remark.clone();
 
-        let future = TaskBuilder::new().named(format!("codegen-{}", i)).try_future(proc() {
+        let future = TaskBuilder::new().named(format!("codegen-{}", i)).try_future(move |:| {
             let diag_handler = mk_handler(box diag_emitter);
 
             // Must construct cgcx inside the proc because it has non-Send
@@ -895,7 +912,7 @@ fn run_work_multithreaded(sess: &Session,
                 let maybe_work = work_items_arc.lock().pop();
                 match maybe_work {
                     Some(work) => {
-                        work(&cgcx);
+                        execute_work_item(&cgcx, work);
 
                         // Make sure to fail the worker so the main thread can
                         // tell that there were errors.
index 4e25921e0b29bda68f21906847e660d0994a1273..05b1a86b72b05171a3f88ce1b2408ca3a3c220a8 100644 (file)
       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
       html_root_url = "http://doc.rust-lang.org/nightly/")]
 
-#![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
+#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
 #![feature(slicing_syntax, unsafe_destructor)]
 #![feature(rustc_diagnostic_macros)]
+#![feature(unboxed_closures)]
 
 extern crate arena;
 extern crate flate;
index 2a698a898fe871a91d390def4097447100eafc28..712d6217dde81fd9ba237ef91435bbdd932b7b95 100644 (file)
@@ -79,7 +79,9 @@ struct DxrVisitor<'l, 'tcx: 'l> {
 }
 
 impl <'l, 'tcx> DxrVisitor<'l, 'tcx> {
-    fn nest(&mut self, scope_id: NodeId, f: |&mut DxrVisitor<'l, 'tcx>|) {
+    fn nest<F>(&mut self, scope_id: NodeId, f: F) where
+        F: FnOnce(&mut DxrVisitor<'l, 'tcx>),
+    {
         let parent_scope = self.cur_scope;
         self.cur_scope = scope_id;
         f(self);
@@ -280,7 +282,7 @@ fn process_method(&mut self, method: &ast::Method) {
                 NodeItem(item) => {
                     scope_id = item.id;
                     match item.node {
-                        ast::ItemImpl(_, _, ref ty, _) => {
+                        ast::ItemImpl(_, _, _, ref ty, _) => {
                             let mut result = String::from_str("<");
                             result.push_str(ty_to_string(&**ty).as_slice());
 
@@ -1038,7 +1040,8 @@ fn visit_item(&mut self, item: &ast::Item) {
                 self.process_const(item, &**typ, &**expr),
             ast::ItemStruct(ref def, ref ty_params) => self.process_struct(item, &**def, ty_params),
             ast::ItemEnum(ref def, ref ty_params) => self.process_enum(item, def, ty_params),
-            ast::ItemImpl(ref ty_params,
+            ast::ItemImpl(_,
+                          ref ty_params,
                           ref trait_ref,
                           ref typ,
                           ref impl_items) => {
@@ -1048,7 +1051,7 @@ fn visit_item(&mut self, item: &ast::Item) {
                                   &**typ,
                                   impl_items)
             }
-            ast::ItemTrait(ref generics, _, ref trait_refs, ref methods) =>
+            ast::ItemTrait(_, ref generics, _, ref trait_refs, ref methods) =>
                 self.process_trait(item, generics, trait_refs, methods),
             ast::ItemMod(ref m) => self.process_mod(item, m),
             ast::ItemTy(ref ty, ref ty_params) => {
index 1ed06938e95c878e8fcc1044aa6465676bb81105..b051292571980fe47987f7cdf79ed9c75a00d0d0 100644 (file)
@@ -771,7 +771,7 @@ fn pat_score(def_map: &DefMap, pat: &ast::Pat) -> uint {
         }
     };
 
-    let column_contains_any_nonwild_patterns: |&uint| -> bool = |&col| {
+    let column_contains_any_nonwild_patterns = |&: &col: &uint| -> bool {
         m.iter().any(|row| match row.pats[col].node {
             ast::PatWild(_) => false,
             _ => true
@@ -1578,14 +1578,15 @@ pub fn store_for_loop_binding<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     bind_irrefutable_pat(bcx, pat, llvalue, body_scope)
 }
 
-fn mk_binding_alloca<'blk, 'tcx, A>(bcx: Block<'blk, 'tcx>,
-                                    p_id: ast::NodeId,
-                                    ident: &ast::Ident,
-                                    cleanup_scope: cleanup::ScopeId,
-                                    arg: A,
-                                    populate: |A, Block<'blk, 'tcx>, ValueRef, Ty<'tcx>|
-                                              -> Block<'blk, 'tcx>)
-                                    -> Block<'blk, 'tcx> {
+fn mk_binding_alloca<'blk, 'tcx, A, F>(bcx: Block<'blk, 'tcx>,
+                                       p_id: ast::NodeId,
+                                       ident: &ast::Ident,
+                                       cleanup_scope: cleanup::ScopeId,
+                                       arg: A,
+                                       populate: F)
+                                       -> Block<'blk, 'tcx> where
+    F: FnOnce(A, Block<'blk, 'tcx>, ValueRef, Ty<'tcx>) -> Block<'blk, 'tcx>,
+{
     let var_ty = node_id_type(bcx, p_id);
 
     // Allocate memory on stack for the binding.
index e273a56ce025b2b33f616b4f63cbde4373ab833a..991333d8f07ddb9a9b4d97b27058641783a2952a 100644 (file)
@@ -858,10 +858,13 @@ pub fn struct_field_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, st: &Struct<'tcx>, v
     GEPi(bcx, val, &[0, ix])
 }
 
-pub fn fold_variants<'blk, 'tcx>(
-        bcx: Block<'blk, 'tcx>, r: &Repr<'tcx>, value: ValueRef,
-        f: |Block<'blk, 'tcx>, &Struct<'tcx>, ValueRef| -> Block<'blk, 'tcx>)
-        -> Block<'blk, 'tcx> {
+pub fn fold_variants<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
+                                    r: &Repr<'tcx>,
+                                    value: ValueRef,
+                                    mut f: F)
+                                    -> Block<'blk, 'tcx> where
+    F: FnMut(Block<'blk, 'tcx>, &Struct<'tcx>, ValueRef) -> Block<'blk, 'tcx>,
+{
     let fcx = bcx.fcx;
     match *r {
         Univariant(ref st, _) => {
index cef12616cf267178b2301fc5c196488ffdd02afc..83779ffbe161c8935c317ba0c3e1744d3993c449 100644 (file)
     RefCell::new(None)
 })
 
-pub fn with_insn_ctxt(blk: |&[&'static str]|) {
-    TASK_LOCAL_INSN_KEY.with(|slot| {
-        slot.borrow().as_ref().map(|s| blk(s.as_slice()));
+pub fn with_insn_ctxt<F>(blk: F) where
+    F: FnOnce(&[&'static str]),
+{
+    TASK_LOCAL_INSN_KEY.with(move |slot| {
+        slot.borrow().as_ref().map(move |s| blk(s.as_slice()));
     })
 }
 
@@ -841,12 +843,15 @@ pub fn cast_shift_const_rhs(op: ast::BinOp,
                    |a, b| unsafe { llvm::LLVMConstZExt(a, b.to_ref()) })
 }
 
-pub fn cast_shift_rhs(op: ast::BinOp,
-                      lhs: ValueRef,
-                      rhs: ValueRef,
-                      trunc: |ValueRef, Type| -> ValueRef,
-                      zext: |ValueRef, Type| -> ValueRef)
-                      -> ValueRef {
+pub fn cast_shift_rhs<F, G>(op: ast::BinOp,
+                            lhs: ValueRef,
+                            rhs: ValueRef,
+                            trunc: F,
+                            zext: G)
+                            -> ValueRef where
+    F: FnOnce(ValueRef, Type) -> ValueRef,
+    G: FnOnce(ValueRef, Type) -> ValueRef,
+{
     // Shifts may have any size int on the rhs
     unsafe {
         if ast_util::is_shift_binop(op) {
@@ -1101,10 +1106,12 @@ pub fn raw_block<'blk, 'tcx>(fcx: &'blk FunctionContext<'blk, 'tcx>,
     common::BlockS::new(llbb, is_lpad, None, fcx)
 }
 
-pub fn with_cond<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
-                             val: ValueRef,
-                             f: |Block<'blk, 'tcx>| -> Block<'blk, 'tcx>)
-                             -> Block<'blk, 'tcx> {
+pub fn with_cond<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
+                                val: ValueRef,
+                                f: F)
+                                -> Block<'blk, 'tcx> where
+    F: FnOnce(Block<'blk, 'tcx>) -> Block<'blk, 'tcx>,
+{
     let _icx = push_ctxt("with_cond");
     let fcx = bcx.fcx;
     let next_cx = fcx.new_temp_block("next");
@@ -1389,8 +1396,7 @@ fn has_nested_returns(tcx: &ty::ctxt, id: ast::NodeId) -> bool {
         }
         Some(ast_map::NodeExpr(e)) => {
             match e.node {
-                ast::ExprClosure(_, _, _, ref blk) |
-                ast::ExprProc(_, ref blk) => {
+                ast::ExprClosure(_, _, _, ref blk) => {
                     let mut explicit = CheckForNestedReturnsVisitor::explicit();
                     let mut implicit = CheckForNestedReturnsVisitor::implicit();
                     visit::walk_expr(&mut explicit, e);
@@ -2298,7 +2304,7 @@ pub fn trans_item(ccx: &CrateContext, item: &ast::Item) {
         let mut v = TransItemVisitor{ ccx: ccx };
         v.visit_block(&**body);
       }
-      ast::ItemImpl(ref generics, _, _, ref impl_items) => {
+      ast::ItemImpl(_, ref generics, _, _, ref impl_items) => {
         meth::trans_impl(ccx,
                          item.ident,
                          impl_items.as_slice(),
index b55c268d9a909d22191bcb726012a559a34b9932..dca106a3897fb3fc68eeb52a254b4f2254dce8e2 100644 (file)
 
 impl Copy for BasicBlock {}
 
-pub type Preds<'a> = Map<'a, Value, BasicBlock, Filter<'a, Value, Users>>;
+pub type Preds = Map<
+    Value,
+    BasicBlock,
+    Filter<Value, Users, fn(&Value) -> bool>,
+    fn(Value) -> BasicBlock,
+>;
 
 /// Wrapper for LLVM BasicBlockRef
 impl BasicBlock {
@@ -31,10 +36,13 @@ pub fn as_value(self) -> Value {
         }
     }
 
-    pub fn pred_iter(self) -> Preds<'static> {
+    pub fn pred_iter(self) -> Preds {
+        fn is_a_terminator_inst(user: &Value) -> bool { user.is_a_terminator_inst() }
+        fn get_parent(user: Value) -> BasicBlock { user.get_parent().unwrap() }
+
         self.as_value().user_iter()
-            .filter(|user| user.is_a_terminator_inst())
-            .map(|user| user.get_parent().unwrap())
+            .filter(is_a_terminator_inst)
+            .map(get_parent)
     }
 
     pub fn get_single_predecessor(self) -> Option<BasicBlock> {
index 00c91ddebb38ebf31331f1974d1f0bbbd534c95e..4a6bc58051c57aa9b4132d56b332c0d9c2d2c690 100644 (file)
@@ -342,11 +342,13 @@ pub fn compute_abi_info(ccx: &CrateContext,
                         atys: &[Type],
                         rty: Type,
                         ret_def: bool) -> FnType {
-    fn x86_64_ty(ccx: &CrateContext,
-                 ty: Type,
-                 is_mem_cls: |cls: &[RegClass]| -> bool,
-                 ind_attr: Attribute)
-                 -> ArgType {
+    fn x86_64_ty<F>(ccx: &CrateContext,
+                    ty: Type,
+                    is_mem_cls: F,
+                    ind_attr: Attribute)
+                    -> ArgType where
+        F: FnOnce(&[RegClass]) -> bool,
+    {
         if !ty.is_reg_ty() {
             let cls = classify_ty(ty);
             if is_mem_cls(cls.as_slice()) {
index ff7ab91c39a58edbecc42b4d0466b96eb97937fa..81d44d84414798e7e402b27e75950f188bf8fe00 100644 (file)
@@ -19,8 +19,7 @@
 pub use self::CallArgs::*;
 
 use arena::TypedArena;
-use back::abi;
-use back::link;
+use back::{abi,link};
 use session;
 use llvm::{ValueRef, get_param};
 use llvm;
@@ -279,7 +278,7 @@ pub fn trans_fn_pointer_shim<'a, 'tcx>(
     // which is the fn pointer, and `args`, which is the arguments tuple.
     let (input_tys, output_ty) =
         match bare_fn_ty.sty {
-            ty::ty_bare_fn(ty::BareFnTy { fn_style: ast::NormalFn,
+            ty::ty_bare_fn(ty::BareFnTy { unsafety: ast::Unsafety::Normal,
                                           abi: synabi::Rust,
                                           sig: ty::FnSig { inputs: ref input_tys,
                                                            output: output_ty,
@@ -295,7 +294,7 @@ pub fn trans_fn_pointer_shim<'a, 'tcx>(
         };
     let tuple_input_ty = ty::mk_tup(tcx, input_tys.to_vec());
     let tuple_fn_ty = ty::mk_bare_fn(tcx,
-                                     ty::BareFnTy { fn_style: ast::NormalFn,
+                                     ty::BareFnTy { unsafety: ast::Unsafety::Normal,
                                                     abi: synabi::RustCall,
                                                     sig: ty::FnSig {
                                                         inputs: vec![bare_fn_ty_ref,
@@ -357,153 +356,6 @@ pub fn trans_fn_pointer_shim<'a, 'tcx>(
     llfn
 }
 
-/// Translates the adapter that deconstructs a `Box<Trait>` object into
-/// `Trait` so that a by-value self method can be called.
-pub fn trans_unboxing_shim<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
-                                       llshimmedfn: ValueRef,
-                                       fty: &ty::BareFnTy<'tcx>,
-                                       method_id: ast::DefId,
-                                       substs: &subst::Substs<'tcx>)
-                                       -> ValueRef {
-    let _icx = push_ctxt("trans_unboxing_shim");
-    let ccx = bcx.ccx();
-    let tcx = bcx.tcx();
-
-    let fty = fty.subst(tcx, substs);
-
-    // Transform the self type to `Box<self_type>`.
-    let self_type = fty.sig.inputs[0];
-    let boxed_self_type = ty::mk_uniq(tcx, self_type);
-    let boxed_function_type = ty::FnSig {
-        inputs: fty.sig.inputs.iter().enumerate().map(|(i, typ)| {
-            if i == 0 {
-                boxed_self_type
-            } else {
-                *typ
-            }
-        }).collect(),
-        output: fty.sig.output,
-        variadic: false,
-    };
-    let boxed_function_type = ty::BareFnTy {
-        fn_style: fty.fn_style,
-        abi: fty.abi,
-        sig: boxed_function_type,
-    };
-    let boxed_function_type = ty::mk_bare_fn(tcx, boxed_function_type);
-    let function_type = match fty.abi {
-        synabi::RustCall => {
-            // We're passing through to a RustCall ABI function, but
-            // because the shim will already perform untupling, we
-            // need to pretend the shimmed function does not use
-            // RustCall so the untupled arguments can be passed
-            // through verbatim.  This is kind of ugly.
-            let fake_ty = ty::FnSig {
-                inputs: type_of::untuple_arguments_if_necessary(ccx,
-                                                                fty.sig.inputs.as_slice(),
-                                                                fty.abi),
-                output: fty.sig.output,
-                variadic: false,
-            };
-            let fake_ty = ty::BareFnTy {
-                fn_style: fty.fn_style,
-                abi: synabi::Rust,
-                sig: fake_ty,
-            };
-            ty::mk_bare_fn(tcx, fake_ty)
-        }
-        _ => {
-            ty::mk_bare_fn(tcx, fty)
-        }
-    };
-
-    let function_name = ty::with_path(tcx, method_id, |path| {
-        link::mangle_internal_name_by_path_and_seq(path, "unboxing_shim")
-    });
-    let llfn = decl_internal_rust_fn(ccx,
-                                     boxed_function_type,
-                                     function_name.as_slice());
-
-    let block_arena = TypedArena::new();
-    let empty_param_substs = Substs::trans_empty();
-    let return_type = ty::ty_fn_ret(boxed_function_type);
-    let fcx = new_fn_ctxt(ccx,
-                          llfn,
-                          ast::DUMMY_NODE_ID,
-                          false,
-                          return_type,
-                          &empty_param_substs,
-                          None,
-                          &block_arena);
-    let mut bcx = init_function(&fcx, false, return_type);
-
-    // Create the substituted versions of the self type.
-    let arg_scope = fcx.push_custom_cleanup_scope();
-    let arg_scope_id = cleanup::CustomScope(arg_scope);
-    let boxed_self_type = ty::ty_fn_args(boxed_function_type)[0];
-    let arg_types = ty::ty_fn_args(function_type);
-    let self_type = arg_types[0];
-    let boxed_self_kind = arg_kind(&fcx, boxed_self_type);
-
-    // Create a datum for self.
-    let llboxedself = get_param(fcx.llfn, fcx.arg_pos(0) as u32);
-    let llboxedself = Datum::new(llboxedself,
-                                 boxed_self_type,
-                                 boxed_self_kind);
-    let boxed_self =
-        unpack_datum!(bcx,
-                      llboxedself.to_lvalue_datum_in_scope(bcx,
-                                                           "boxedself",
-                                                           arg_scope_id));
-
-    // This `Load` is needed because lvalue data are always by-ref.
-    let llboxedself = Load(bcx, boxed_self.val);
-
-    let llself = if type_is_immediate(ccx, self_type) {
-        let llboxedself = Load(bcx, llboxedself);
-        immediate_rvalue(llboxedself, self_type)
-    } else {
-        let llself = rvalue_scratch_datum(bcx, self_type, "self");
-        memcpy_ty(bcx, llself.val, llboxedself, self_type);
-        llself
-    };
-
-    // Make sure we don't free the box twice!
-    boxed_self.kind.post_store(bcx, boxed_self.val, boxed_self_type);
-
-    // Schedule a cleanup to free the box.
-    fcx.schedule_free_value(arg_scope_id,
-                            llboxedself,
-                            cleanup::HeapExchange,
-                            self_type);
-
-    // Now call the function.
-    let mut llshimmedargs = vec!(llself.val);
-    for i in range(1, arg_types.len()) {
-        llshimmedargs.push(get_param(fcx.llfn, fcx.arg_pos(i) as u32));
-    }
-    assert!(!fcx.needs_ret_allocas);
-    let dest = fcx.llretslotptr.get().map(|_|
-        expr::SaveIn(fcx.get_ret_slot(bcx, return_type, "ret_slot"))
-    );
-    bcx = trans_call_inner(bcx,
-                           None,
-                           function_type,
-                           |bcx, _| {
-                               Callee {
-                                   bcx: bcx,
-                                   data: Fn(llshimmedfn),
-                               }
-                           },
-                           ArgVals(llshimmedargs.as_slice()),
-                           dest).bcx;
-
-    bcx = fcx.pop_and_trans_custom_cleanup_scope(bcx, arg_scope);
-    finish_fn(&fcx, bcx, return_type);
-
-    llfn
-}
-
 /// Translates a reference to a fn/method item, monomorphizing and
 /// inlining as it goes.
 ///
@@ -781,15 +633,15 @@ pub fn trans_lang_call<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
 ///
 /// For non-lang items, `dest` is always Some, and hence the result is written into memory
 /// somewhere. Nonetheless we return the actual return value of the function.
-pub fn trans_call_inner<'a, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
-                                        call_info: Option<NodeInfo>,
-                                        callee_ty: Ty<'tcx>,
-                                        get_callee: |bcx: Block<'blk, 'tcx>,
-                                                     arg_cleanup_scope: cleanup::ScopeId|
-                                                     -> Callee<'blk, 'tcx>,
-                                        args: CallArgs<'a, 'tcx>,
-                                        dest: Option<expr::Dest>)
-                                        -> Result<'blk, 'tcx> {
+pub fn trans_call_inner<'a, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
+                                           call_info: Option<NodeInfo>,
+                                           callee_ty: Ty<'tcx>,
+                                           get_callee: F,
+                                           args: CallArgs<'a, 'tcx>,
+                                           dest: Option<expr::Dest>)
+                                           -> Result<'blk, 'tcx> where
+    F: FnOnce(Block<'blk, 'tcx>, cleanup::ScopeId) -> Callee<'blk, 'tcx>,
+{
     // Introduce a temporary cleanup scope that will contain cleanups
     // for the arguments while they are being evaluated. The purpose
     // this cleanup is to ensure that, should a panic occur while
index ba3e70fe036fc475720784055f64b2c34b82cf23..2fd6551409e90e734f288039805cd98862820da0 100644 (file)
@@ -527,7 +527,7 @@ fn pop_scope(&self) -> CleanupScope<'blk, 'tcx> {
         self.scopes.borrow_mut().pop().unwrap()
     }
 
-    fn top_scope<R>(&self, f: |&CleanupScope<'blk, 'tcx>| -> R) -> R {
+    fn top_scope<R, F>(&self, f: F) -> R where F: FnOnce(&CleanupScope<'blk, 'tcx>) -> R {
         f(self.scopes.borrow().last().unwrap())
     }
 
@@ -1145,5 +1145,5 @@ fn trans_cleanups_to_exit_scope(&'blk self,
     fn scopes_len(&self) -> uint;
     fn push_scope(&self, scope: CleanupScope<'blk, 'tcx>);
     fn pop_scope(&self) -> CleanupScope<'blk, 'tcx>;
-    fn top_scope<R>(&self, f: |&CleanupScope<'blk, 'tcx>| -> R) -> R;
+    fn top_scope<R, F>(&self, f: F) -> R where F: FnOnce(&CleanupScope<'blk, 'tcx>) -> R;
 }
index 77412b00299ba672ef2a38676498d68e09ca521f..83938fa335708fe8d174ce4a3942c2e24e53cbb8 100644 (file)
@@ -793,7 +793,8 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
     // Do the initial selection for the obligation. This yields the
     // shallow result we are looking for -- that is, what specific impl.
     let mut selcx = traits::SelectionContext::new(&infcx, &param_env, tcx);
-    let obligation = traits::Obligation::misc(span, trait_ref.clone());
+    let obligation = traits::Obligation::new(traits::ObligationCause::dummy(),
+                                             trait_ref.clone());
     let selection = match selcx.select(&obligation) {
         Ok(Some(selection)) => selection,
         Ok(None) => {
@@ -826,8 +827,8 @@ pub fn fulfill_obligation<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
     // fully bound. It could be a slight optimization to stop
     // iterating early.
     let mut fulfill_cx = traits::FulfillmentContext::new();
-    let vtable = selection.map_move_nested(|obligation| {
-        fulfill_cx.register_obligation(tcx, obligation);
+    let vtable = selection.map_move_nested(|predicate| {
+        fulfill_cx.register_predicate(infcx.tcx, predicate);
     });
     match fulfill_cx.select_all_or_error(&infcx, &param_env, tcx) {
         Ok(()) => { }
index 42daf71881605342c5a672395091cd346d7a4a0a..e4f0543b5e70fccd12ebb21f49e0de48209c7006 100644 (file)
@@ -91,7 +91,7 @@ fn const_vec(cx: &CrateContext, e: &ast::Expr,
     let vec_ty = ty::expr_ty(cx.tcx(), e);
     let unit_ty = ty::sequence_element_type(cx.tcx(), vec_ty);
     let llunitty = type_of::type_of(cx, unit_ty);
-    let vs = es.iter().map(|e| const_expr(cx, &**e).val0())
+    let vs = es.iter().map(|e| const_expr(cx, &**e).0)
                       .collect::<Vec<_>>();
     // If the vector contains enums, an LLVM array won't work.
     let v = if vs.iter().any(|vi| val_ty(*vi) != llunitty) {
@@ -302,7 +302,7 @@ pub fn const_expr<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, e: &ast::Expr)
 // if it's assigned to a static.
 fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
     let map_list = |exprs: &[P<ast::Expr>]| {
-        exprs.iter().map(|e| const_expr(cx, &**e).val0())
+        exprs.iter().map(|e| const_expr(cx, &**e).0)
              .fold(Vec::new(), |mut l, val| { l.push(val); l })
     };
     unsafe {
@@ -575,7 +575,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
                   let cs = field_tys.iter().enumerate()
                                     .map(|(ix, &field_ty)| {
                       match fs.iter().find(|f| field_ty.name == f.ident.node.name) {
-                          Some(ref f) => const_expr(cx, &*f.expr).val0(),
+                          Some(ref f) => const_expr(cx, &*f.expr).0,
                           None => {
                               match base_val {
                                   Some((bv, _)) => {
@@ -594,7 +594,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
               })
           }
           ast::ExprVec(ref es) => {
-            const_vec(cx, e, es.as_slice()).val0()
+            const_vec(cx, e, es.as_slice()).0
           }
           ast::ExprRepeat(ref elem, ref count) => {
             let vec_ty = ty::expr_ty(cx.tcx(), e);
@@ -605,7 +605,7 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
                 const_eval::const_uint(i) => i as uint,
                 _ => cx.sess().span_bug(count.span, "count must be integral const expression.")
             };
-            let vs = Vec::from_elem(n, const_expr(cx, &**elem).val0());
+            let vs = Vec::from_elem(n, const_expr(cx, &**elem).0);
             if vs.iter().any(|vi| val_ty(*vi) != llunitty) {
                 C_struct(cx, vs.as_slice(), false)
             } else {
@@ -673,10 +673,10 @@ fn const_expr_unadjusted(cx: &CrateContext, e: &ast::Expr) -> ValueRef {
                   _ => cx.sess().span_bug(e.span, "expected a struct or variant def")
               }
           }
-          ast::ExprParen(ref e) => const_expr(cx, &**e).val0(),
+          ast::ExprParen(ref e) => const_expr(cx, &**e).0,
           ast::ExprBlock(ref block) => {
             match block.expr {
-                Some(ref expr) => const_expr(cx, &**expr).val0(),
+                Some(ref expr) => const_expr(cx, &**expr).0,
                 None => C_nil(cx)
             }
           }
index 23a261842b2d57443889fbf4a787674c8fb277b7..531b22c8fb5f2d221c0757c8d2ad1fe7ea8c3f53 100644 (file)
@@ -113,15 +113,16 @@ pub fn immediate_rvalue_bcx<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
 /// it. The memory will be dropped upon exit from `scope`. The callback `populate` should
 /// initialize the memory. If `zero` is true, the space will be zeroed when it is allocated; this
 /// is not necessary unless `bcx` does not dominate the end of `scope`.
-pub fn lvalue_scratch_datum<'blk, 'tcx, A>(bcx: Block<'blk, 'tcx>,
-                                           ty: Ty<'tcx>,
-                                           name: &str,
-                                           zero: bool,
-                                           scope: cleanup::ScopeId,
-                                           arg: A,
-                                           populate: |A, Block<'blk, 'tcx>, ValueRef|
-                                                      -> Block<'blk, 'tcx>)
-                                          -> DatumBlock<'blk, 'tcx, Lvalue> {
+pub fn lvalue_scratch_datum<'blk, 'tcx, A, F>(bcx: Block<'blk, 'tcx>,
+                                              ty: Ty<'tcx>,
+                                              name: &str,
+                                              zero: bool,
+                                              scope: cleanup::ScopeId,
+                                              arg: A,
+                                              populate: F)
+                                              -> DatumBlock<'blk, 'tcx, Lvalue> where
+    F: FnOnce(A, Block<'blk, 'tcx>, ValueRef) -> Block<'blk, 'tcx>,
+{
     let scratch = if zero {
         alloca_zeroed(bcx, ty, name)
     } else {
@@ -339,10 +340,10 @@ pub fn to_appropriate_datum<'blk>(self, bcx: Block<'blk, 'tcx>)
 /// here since we can `match self.kind` rather than having to implement
 /// generic methods in `KindOps`.)
 impl<'tcx> Datum<'tcx, Expr> {
-    fn match_kind<R>(self,
-                     if_lvalue: |Datum<'tcx, Lvalue>| -> R,
-                     if_rvalue: |Datum<'tcx, Rvalue>| -> R)
-                     -> R {
+    fn match_kind<R, F, G>(self, if_lvalue: F, if_rvalue: G) -> R where
+        F: FnOnce(Datum<'tcx, Lvalue>) -> R,
+        G: FnOnce(Datum<'tcx, Rvalue>) -> R,
+    {
         let Datum { val, ty, kind } = self;
         match kind {
             LvalueExpr => if_lvalue(Datum::new(val, ty, Lvalue)),
@@ -455,9 +456,11 @@ pub fn to_llref(self) -> ValueRef {
     // datum may also be unsized _without the size information_. It is the
     // callers responsibility to package the result in some way to make a valid
     // datum in that case (e.g., by making a fat pointer or opened pair).
-    pub fn get_element<'blk>(&self, bcx: Block<'blk, 'tcx>, ty: Ty<'tcx>,
-                             gep: |ValueRef| -> ValueRef)
-                             -> Datum<'tcx, Lvalue> {
+    pub fn get_element<'blk, F>(&self, bcx: Block<'blk, 'tcx>, ty: Ty<'tcx>,
+                                gep: F)
+                                -> Datum<'tcx, Lvalue> where
+        F: FnOnce(ValueRef) -> ValueRef,
+    {
         let val = match self.ty.sty {
             _ if ty::type_is_sized(bcx.tcx(), self.ty) => gep(self.val),
             ty::ty_open(_) => {
@@ -535,10 +538,10 @@ fn shallow_copy_raw<'blk>(&self,
     /// Copies the value into a new location. This function always preserves the existing datum as
     /// a valid value. Therefore, it does not consume `self` and, also, cannot be applied to affine
     /// values (since they must never be duplicated).
-    pub fn shallow_copy<'blk, 'tcx>(&self,
-                                    bcx: Block<'blk, 'tcx>,
-                                    dst: ValueRef)
-                                    -> Block<'blk, 'tcx> {
+    pub fn shallow_copy<'blk>(&self,
+                              bcx: Block<'blk, 'tcx>,
+                              dst: ValueRef)
+                              -> Block<'blk, 'tcx> {
         /*!
          * Copies the value into a new location. This function always
          * preserves the existing datum as a valid value. Therefore,
index f6c4ba64576f76d656efae22d1a556861501fffb..3f8c951786dfaff5c6e470cd0e87c144730973a0 100644 (file)
@@ -433,8 +433,8 @@ fn get_unique_type_id_of_type<'a>(&mut self, cx: &CrateContext<'a, 'tcx>,
                                        &trait_data.principal.substs,
                                        &mut unique_type_id);
             },
-            ty::ty_bare_fn(ty::BareFnTy{ fn_style, abi, ref sig } ) => {
-                if fn_style == ast::UnsafeFn {
+            ty::ty_bare_fn(ty::BareFnTy{ unsafety, abi, ref sig } ) => {
+                if unsafety == ast::Unsafety::Unsafe {
                     unique_type_id.push_str("unsafe ");
                 }
 
@@ -551,13 +551,13 @@ fn get_unique_type_id_of_closure_type<'a>(&mut self,
                                               cx: &CrateContext<'a, 'tcx>,
                                               closure_ty: ty::ClosureTy<'tcx>,
                                               unique_type_id: &mut String) {
-        let ty::ClosureTy { fn_style,
+        let ty::ClosureTy { unsafety,
                             onceness,
                             store,
                             ref bounds,
                             ref sig,
                             abi: _ } = closure_ty;
-        if fn_style == ast::UnsafeFn {
+        if unsafety == ast::Unsafety::Unsafe {
             unique_type_id.push_str("unsafe ");
         }
 
@@ -1239,7 +1239,6 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
         }
         ast_map::NodeExpr(ref expr) => {
             match expr.node {
-                ast::ExprProc(ref fn_decl, ref top_level_block) |
                 ast::ExprClosure(_, _, ref fn_decl, ref top_level_block) => {
                     let name = format!("fn{}", token::gensym("fn"));
                     let name = token::str_to_ident(name.as_slice());
@@ -3212,13 +3211,13 @@ struct ScopeStackEntry {
     });
 
     // local helper functions for walking the AST.
-    fn with_new_scope(cx: &CrateContext,
-                      scope_span: Span,
-                      scope_stack: &mut Vec<ScopeStackEntry> ,
-                      scope_map: &mut NodeMap<DIScope>,
-                      inner_walk: |&CrateContext,
-                                   &mut Vec<ScopeStackEntry> ,
-                                   &mut NodeMap<DIScope>|) {
+    fn with_new_scope<F>(cx: &CrateContext,
+                         scope_span: Span,
+                         scope_stack: &mut Vec<ScopeStackEntry> ,
+                         scope_map: &mut NodeMap<DIScope>,
+                         inner_walk: F) where
+        F: FnOnce(&CrateContext, &mut Vec<ScopeStackEntry>, &mut NodeMap<DIScope>),
+    {
         // Create a new lexical scope and push it onto the stack
         let loc = cx.sess().codemap().lookup_char_pos(scope_span.lo);
         let file_metadata = file_metadata(cx, loc.file.name.as_slice());
@@ -3588,7 +3587,6 @@ fn walk_expr(cx: &CrateContext,
                 })
             }
 
-            ast::ExprProc(ref decl, ref block) |
             ast::ExprClosure(_, _, ref decl, ref block) => {
                 with_new_scope(cx,
                                block.span,
@@ -3769,8 +3767,8 @@ fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
             push_item_name(cx, trait_data.principal.def_id, false, output);
             push_type_params(cx, &trait_data.principal.substs, output);
         },
-        ty::ty_bare_fn(ty::BareFnTy{ fn_style, abi, ref sig } ) => {
-            if fn_style == ast::UnsafeFn {
+        ty::ty_bare_fn(ty::BareFnTy{ unsafety, abi, ref sig } ) => {
+            if unsafety == ast::Unsafety::Unsafe {
                 output.push_str("unsafe ");
             }
 
@@ -3812,13 +3810,13 @@ fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
                 }
             }
         },
-        ty::ty_closure(box ty::ClosureTy { fn_style,
+        ty::ty_closure(box ty::ClosureTy { unsafety,
                                            onceness,
                                            store,
                                            ref sig,
                                            .. // omitting bounds ...
                                            }) => {
-            if fn_style == ast::UnsafeFn {
+            if unsafety == ast::Unsafety::Unsafe {
                 output.push_str("unsafe ");
             }
 
index e3e6fff723410ad29d4caacd8028aacaa59b2b01..5b9a1d499910e62f299c170819ff507f7e544a9e 100644 (file)
@@ -295,6 +295,7 @@ fn ref_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     // into a type to be destructed. If we want to end up with a Box pointer,
     // then mk_ty should make a Box pointer (T -> Box<T>), if we want a
     // borrowed reference then it should be T -> &T.
+    // FIXME(#19596) unbox `mk_ty`
     fn unsized_info<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                 kind: &ty::UnsizeKind<'tcx>,
                                 id: ast::NodeId,
@@ -341,27 +342,30 @@ fn unsize_expr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         debug!("dest_ty={}", unsized_ty.repr(bcx.tcx()));
         // Closures for extracting and manipulating the data and payload parts of
         // the fat pointer.
-        let base = match k {
-            &ty::UnsizeStruct(..) =>
-                |bcx, val| PointerCast(bcx,
-                                       val,
-                                       type_of::type_of(bcx.ccx(), unsized_ty).ptr_to()),
-            &ty::UnsizeLength(..) =>
-                |bcx, val| GEPi(bcx, val, &[0u, 0u]),
-            &ty::UnsizeVtable(..) =>
-                |_bcx, val| PointerCast(bcx, val, Type::i8p(bcx.ccx()))
-        };
-        let info = |bcx, _val| unsized_info(bcx,
-                                            k,
-                                            expr.id,
-                                            datum_ty,
-                                            |t| ty::mk_rptr(tcx,
-                                                            ty::ReStatic,
-                                                            ty::mt{
-                                                                ty: t,
-                                                                mutbl: ast::MutImmutable
-                                                            }));
-        into_fat_ptr(bcx, expr, datum, dest_ty, base, info)
+        let info = |: bcx, _val| unsized_info(bcx,
+                                              k,
+                                              expr.id,
+                                              datum_ty,
+                                              |t| ty::mk_rptr(tcx,
+                                                              ty::ReStatic,
+                                                              ty::mt{
+                                                                  ty: t,
+                                                                  mutbl: ast::MutImmutable
+                                                              }));
+        match *k {
+            ty::UnsizeStruct(..) =>
+                into_fat_ptr(bcx, expr, datum, dest_ty, |bcx, val| {
+                    PointerCast(bcx, val, type_of::type_of(bcx.ccx(), unsized_ty).ptr_to())
+                }, info),
+            ty::UnsizeLength(..) =>
+                into_fat_ptr(bcx, expr, datum, dest_ty, |bcx, val| {
+                    GEPi(bcx, val, &[0u, 0u])
+                }, info),
+            ty::UnsizeVtable(..) =>
+                into_fat_ptr(bcx, expr, datum, dest_ty, |_bcx, val| {
+                    PointerCast(bcx, val, Type::i8p(bcx.ccx()))
+                }, info),
+        }
     }
 
     fn ref_fat_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
@@ -370,18 +374,21 @@ fn ref_fat_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                -> DatumBlock<'blk, 'tcx, Expr> {
         let tcx = bcx.tcx();
         let dest_ty = ty::close_type(tcx, datum.ty);
-        let base = |bcx, val| Load(bcx, get_dataptr(bcx, val));
-        let len = |bcx, val| Load(bcx, get_len(bcx, val));
+        let base = |bcx, val| Load(bcx, get_dataptr(bcx, val));
+        let len = |bcx, val| Load(bcx, get_len(bcx, val));
         into_fat_ptr(bcx, expr, datum, dest_ty, base, len)
     }
 
-    fn into_fat_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
-                                expr: &ast::Expr,
-                                datum: Datum<'tcx, Expr>,
-                                dest_ty: Ty<'tcx>,
-                                base: |Block<'blk, 'tcx>, ValueRef| -> ValueRef,
-                                info: |Block<'blk, 'tcx>, ValueRef| -> ValueRef)
-                                -> DatumBlock<'blk, 'tcx, Expr> {
+    fn into_fat_ptr<'blk, 'tcx, F, G>(bcx: Block<'blk, 'tcx>,
+                                      expr: &ast::Expr,
+                                      datum: Datum<'tcx, Expr>,
+                                      dest_ty: Ty<'tcx>,
+                                      base: F,
+                                      info: G)
+                                      -> DatumBlock<'blk, 'tcx, Expr> where
+        F: FnOnce(Block<'blk, 'tcx>, ValueRef) -> ValueRef,
+        G: FnOnce(Block<'blk, 'tcx>, ValueRef) -> ValueRef,
+    {
         let mut bcx = bcx;
 
         // Arrange cleanup
@@ -659,17 +666,19 @@ fn trans_datum_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
     }
 }
 
-fn trans_field<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
-                           base: &ast::Expr,
-                           get_idx: |&'blk ty::ctxt<'tcx>, &[ty::field<'tcx>]| -> uint)
-                           -> DatumBlock<'blk, 'tcx, Expr> {
+fn trans_field<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
+                              base: &ast::Expr,
+                              get_idx: F)
+                              -> DatumBlock<'blk, 'tcx, Expr> where
+    F: FnOnce(&'blk ty::ctxt<'tcx>, &[ty::field<'tcx>]) -> uint,
+{
     let mut bcx = bcx;
     let _icx = push_ctxt("trans_rec_field");
 
     let base_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, base, "field"));
     let bare_ty = ty::unopen_type(base_datum.ty);
     let repr = adt::represent_type(bcx.ccx(), bare_ty);
-    with_field_tys(bcx.tcx(), bare_ty, None, |discr, field_tys| {
+    with_field_tys(bcx.tcx(), bare_ty, None, move |discr, field_tys| {
         let ix = get_idx(bcx.tcx(), field_tys);
         let d = base_datum.get_element(
             bcx,
@@ -1043,8 +1052,7 @@ fn trans_rvalue_dps_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         ast::ExprVec(..) | ast::ExprRepeat(..) => {
             tvec::trans_fixed_vstore(bcx, expr, dest)
         }
-        ast::ExprClosure(_, _, ref decl, ref body) |
-        ast::ExprProc(ref decl, ref body) => {
+        ast::ExprClosure(_, _, ref decl, ref body) => {
             // Check the side-table to see whether this is an unboxed
             // closure or an older, legacy style closure. Store this
             // into a variable to ensure the the RefCell-lock is
@@ -1254,11 +1262,13 @@ pub fn trans_local_var<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
 /// Helper for enumerating the field types of structs, enums, or records. The optional node ID here
 /// is the node ID of the path identifying the enum variant in use. If none, this cannot possibly
 /// an enum variant (so, if it is and `node_id_opt` is none, this function panics).
-pub fn with_field_tys<'tcx, R>(tcx: &ty::ctxt<'tcx>,
-                               ty: Ty<'tcx>,
-                               node_id_opt: Option<ast::NodeId>,
-                               op: |ty::Disr, (&[ty::field<'tcx>])| -> R)
-                               -> R {
+pub fn with_field_tys<'tcx, R, F>(tcx: &ty::ctxt<'tcx>,
+                                  ty: Ty<'tcx>,
+                                  node_id_opt: Option<ast::NodeId>,
+                                  op: F)
+                                  -> R where
+    F: FnOnce(ty::Disr, &[ty::field<'tcx>]) -> R,
+{
     match ty.sty {
         ty::ty_struct(did, ref substs) => {
             op(0, struct_fields(tcx, did, substs).as_slice())
index 6bdb35f8d6074dc345f03e62a63492f6391b0401..890652401d7eb11cfe9605be74e14133d2dd8ac7 100644 (file)
@@ -11,7 +11,7 @@
 #![allow(non_upper_case_globals)]
 
 use llvm;
-use llvm::{SequentiallyConsistent, Acquire, Release, AtomicXchg, ValueRef};
+use llvm::{SequentiallyConsistent, Acquire, Release, AtomicXchg, ValueRef, TypeKind};
 use middle::subst;
 use middle::subst::FnSpace;
 use trans::base::*;
@@ -174,12 +174,65 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
                 // This should be caught by the intrinsicck pass
                 assert_eq!(in_type_size, out_type_size);
 
-                // We need to cast the dest so the types work out
-                let dest = match dest {
-                    expr::SaveIn(d) => expr::SaveIn(PointerCast(bcx, d, llintype.ptr_to())),
-                    expr::Ignore => expr::Ignore
+                let nonpointer_nonaggregate = |llkind: TypeKind| -> bool {
+                    use llvm::TypeKind::*;
+                    match llkind {
+                        Half | Float | Double | X86_FP80 | FP128 |
+                            PPC_FP128 | Integer | Vector | X86_MMX => true,
+                        _ => false
+                    }
+                };
+
+                // An approximation to which types can be directly cast via
+                // LLVM's bitcast.  This doesn't cover pointer -> pointer casts,
+                // but does, importantly, cover SIMD types.
+                let in_kind = llintype.kind();
+                let ret_kind = llret_ty.kind();
+                let bitcast_compatible =
+                    (nonpointer_nonaggregate(in_kind) && nonpointer_nonaggregate(ret_kind)) || {
+                        in_kind == TypeKind::Pointer && ret_kind == TypeKind::Pointer
+                    };
+
+                let dest = if bitcast_compatible {
+                    // if we're here, the type is scalar-like (a primitive, a
+                    // SIMD type or a pointer), and so can be handled as a
+                    // by-value ValueRef and can also be directly bitcast to the
+                    // target type.  Doing this special case makes conversions
+                    // like `u32x4` -> `u64x2` much nicer for LLVM and so more
+                    // efficient (these are done efficiently implicitly in C
+                    // with the `__m128i` type and so this means Rust doesn't
+                    // lose out there).
+                    let expr = &*arg_exprs[0];
+                    let datum = unpack_datum!(bcx, expr::trans(bcx, expr));
+                    let datum = unpack_datum!(bcx, datum.to_rvalue_datum(bcx, "transmute_temp"));
+                    let val = if datum.kind.is_by_ref() {
+                        load_ty(bcx, datum.val, datum.ty)
+                    } else {
+                        datum.val
+                    };
+
+                    let cast_val = BitCast(bcx, val, llret_ty);
+
+                    match dest {
+                        expr::SaveIn(d) => {
+                            // this often occurs in a sequence like `Store(val,
+                            // d); val2 = Load(d)`, so disappears easily.
+                            Store(bcx, cast_val, d);
+                        }
+                        expr::Ignore => {}
+                    }
+                    dest
+                } else {
+                    // The types are too complicated to do with a by-value
+                    // bitcast, so pointer cast instead. We need to cast the
+                    // dest so the types work out.
+                    let dest = match dest {
+                        expr::SaveIn(d) => expr::SaveIn(PointerCast(bcx, d, llintype.ptr_to())),
+                        expr::Ignore => expr::Ignore
+                    };
+                    bcx = expr::trans_into(bcx, &*arg_exprs[0], dest);
+                    dest
                 };
-                bcx = expr::trans_into(bcx, &*arg_exprs[0], dest);
 
                 fcx.pop_custom_cleanup_scope(cleanup_scope);
 
index 94ff526debd1e8f0a3fd74558279206af3a08035..9a2bc38acdfdcb9841a3baeb9ba0825755df2603 100644 (file)
@@ -550,68 +550,12 @@ pub fn get_vtable<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                 emit_vtable_methods(bcx, id, substs).into_iter()
             }
             traits::VtableUnboxedClosure(closure_def_id, substs) => {
-                // Look up closure type
-                let self_ty = ty::node_id_to_type(bcx.tcx(), closure_def_id.node);
-                // Apply substitutions from closure param environment.
-                // The substitutions should have no type parameters
-                // remaining after passing through fulfill_obligation
-                let self_ty = self_ty.subst(bcx.tcx(), &substs);
-
-                let mut llfn = trans_fn_ref_with_substs(
+                let llfn = trans_fn_ref_with_substs(
                     bcx,
                     closure_def_id,
                     ExprId(0),
                     substs.clone());
 
-                {
-                    let unboxed_closures = bcx.tcx()
-                                              .unboxed_closures
-                                              .borrow();
-                    let closure_info =
-                        unboxed_closures.get(&closure_def_id)
-                                        .expect("get_vtable(): didn't find \
-                                                 unboxed closure");
-                    if closure_info.kind == ty::FnOnceUnboxedClosureKind {
-                        // Untuple the arguments and create an unboxing shim.
-                        let (new_inputs, new_output) = match self_ty.sty {
-                            ty::ty_unboxed_closure(_, _, ref substs) => {
-                                let mut new_inputs = vec![self_ty.clone()];
-                                match closure_info.closure_type.sig.inputs[0].sty {
-                                    ty::ty_tup(ref elements) => {
-                                        for element in elements.iter() {
-                                            new_inputs.push(element.subst(bcx.tcx(), substs));
-                                        }
-                                    }
-                                    _ => {
-                                        bcx.tcx().sess.bug("get_vtable(): closure \
-                                                            type wasn't a tuple")
-                                    }
-                                }
-                                (new_inputs,
-                                 closure_info.closure_type.sig.output.subst(bcx.tcx(), substs))
-                            },
-                            _ => bcx.tcx().sess.bug("get_vtable(): def wasn't an unboxed closure")
-                        };
-
-                        let closure_type = ty::BareFnTy {
-                            fn_style: closure_info.closure_type.fn_style,
-                            abi: Rust,
-                            sig: ty::FnSig {
-                                inputs: new_inputs,
-                                output: new_output,
-                                variadic: false,
-                            },
-                        };
-                        debug!("get_vtable(): closure type is {}",
-                               closure_type.repr(bcx.tcx()));
-                        llfn = trans_unboxing_shim(bcx,
-                                                   llfn,
-                                                   &closure_type,
-                                                   closure_def_id,
-                                                   &substs);
-                    }
-                }
-
                 (vec!(llfn)).into_iter()
             }
             traits::VtableFnPointer(bare_fn_ty) => {
@@ -701,18 +645,15 @@ fn emit_vtable_methods<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                            token::get_name(name));
                     Some(C_null(Type::nil(ccx).ptr_to())).into_iter()
                 } else {
-                    let mut fn_ref = trans_fn_ref_with_substs(
+                    let fn_ref = trans_fn_ref_with_substs(
                         bcx,
                         m_id,
                         ExprId(0),
                         substs.clone());
-                    if m.explicit_self == ty::ByValueExplicitSelfCategory {
-                        fn_ref = trans_unboxing_shim(bcx,
-                                                     fn_ref,
-                                                     &m.fty,
-                                                     m_id,
-                                                     &substs);
-                    }
+
+                    // currently, at least, by-value self is not object safe
+                    assert!(m.explicit_self != ty::ByValueExplicitSelfCategory);
+
                     Some(fn_ref).into_iter()
                 }
             }
index fa06e039023e1b7596e708689ba2bca231d06ba2..81488b99b67890b0bd90f0e2e7ed20264de0bc2e 100644 (file)
@@ -130,9 +130,6 @@ pub fn is_a_terminator_inst(self) -> bool {
 
 impl Copy for Use {}
 
-/**
- * Wrapper for LLVM UseRef
- */
 impl Use {
     pub fn get(&self) -> UseRef {
         let Use(v) = *self; v
index 7f1aad8ca77c56f81fb7dae5d1e2113e1b7239e7..b3272a14753511f1e8fe6fd81f0e59eb723abbff 100644 (file)
@@ -54,6 +54,7 @@
 use middle::subst::{FnSpace, TypeSpace, AssocSpace, SelfSpace, Subst, Substs};
 use middle::subst::{VecPerParamSpace};
 use middle::ty::{mod, Ty};
+use middle::ty_fold;
 use rscope::{mod, UnelidableRscope, RegionScope, SpecificRscope,
              ShiftedRscope, BindingRscope};
 use TypeAndSubsts;
@@ -83,13 +84,18 @@ fn associated_types_of_trait_are_valid(&self,
                                            trait_id: ast::DefId)
                                            -> bool;
 
-    /// Returns the binding of the given associated type for some type.
+    /// Returns the concrete type bound to the given associated type (indicated
+    /// by associated_type_id) in the current context. For example,
+    /// in `trait Foo { type A; }` looking up `A` will give a type variable;
+    /// in `impl Foo for ... { type A = int; ... }` looking up `A` will give `int`.
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
+                               // DefId for the declaration of the trait
+                               // in which the associated type is declared.
                                trait_id: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx>;
+                               -> Option<Ty<'tcx>>;
 }
 
 pub fn ast_region_to_region(tcx: &ty::ctxt, lifetime: &ast::Lifetime)
@@ -207,7 +213,6 @@ fn ast_path_substs_for_ty<'tcx,AC,RS>(
     rscope: &RS,
     decl_def_id: ast::DefId,
     decl_generics: &ty::Generics<'tcx>,
-    self_ty: Option<Ty<'tcx>>,
     path: &ast::Path)
     -> Substs<'tcx>
     where AC: AstConv<'tcx>, RS: RegionScope
@@ -225,19 +230,27 @@ fn ast_path_substs_for_ty<'tcx,AC,RS>(
     assert!(decl_generics.regions.all(|d| d.space == TypeSpace));
     assert!(decl_generics.types.all(|d| d.space != FnSpace));
 
-    let (regions, types) = match path.segments.last().unwrap().parameters {
+    let (regions, types, assoc_bindings) = match path.segments.last().unwrap().parameters {
         ast::AngleBracketedParameters(ref data) => {
             convert_angle_bracketed_parameters(this, rscope, data)
         }
         ast::ParenthesizedParameters(ref data) => {
-            span_err!(tcx.sess, path.span, E0169,
-                      "parenthesized parameters may only be used with a trait");
-            (Vec::new(), convert_parenthesized_parameters(this, data))
+            tcx.sess.span_err(
+                path.span,
+                "parenthesized parameters may only be used with a trait");
+            (Vec::new(), convert_parenthesized_parameters(this, data), Vec::new())
         }
     };
 
-    create_substs_for_ast_path(this, rscope, path.span, decl_def_id,
-                               decl_generics, self_ty, types, regions)
+    create_substs_for_ast_path(this,
+                               rscope,
+                               path.span,
+                               decl_def_id,
+                               decl_generics,
+                               None,
+                               types,
+                               regions,
+                               assoc_bindings)
 }
 
 fn create_substs_for_ast_path<'tcx,AC,RS>(
@@ -248,7 +261,8 @@ fn create_substs_for_ast_path<'tcx,AC,RS>(
     decl_generics: &ty::Generics<'tcx>,
     self_ty: Option<Ty<'tcx>>,
     types: Vec<Ty<'tcx>>,
-    regions: Vec<ty::Region>)
+    regions: Vec<ty::Region>,
+    assoc_bindings: Vec<(ast::Ident, Ty<'tcx>)>)
     -> Substs<'tcx>
     where AC: AstConv<'tcx>, RS: RegionScope
 {
@@ -355,13 +369,41 @@ fn create_substs_for_ast_path<'tcx,AC,RS>(
         }
     }
 
-    for param in decl_generics.types.get_slice(AssocSpace).iter() {
-        substs.types.push(
-            AssocSpace,
-            this.associated_type_binding(span,
-                                         self_ty,
-                                         decl_def_id,
-                                         param.def_id));
+    for formal_assoc in decl_generics.types.get_slice(AssocSpace).iter() {
+        let mut found = false;
+        for &(ident, ty) in assoc_bindings.iter() {
+            if formal_assoc.name.ident() == ident {
+                substs.types.push(AssocSpace, ty);
+                found = true;
+                break;
+            }
+        }
+        if !found {
+            match this.associated_type_binding(span,
+                                               self_ty,
+                                               decl_def_id,
+                                               formal_assoc.def_id) {
+                Some(ty) => {
+                    substs.types.push(AssocSpace, ty);
+                }
+                None => {
+                    substs.types.push(AssocSpace, ty::mk_err());
+                    span_err!(this.tcx().sess, span, E0171,
+                              "missing type for associated type `{}`",
+                              token::get_ident(formal_assoc.name.ident()));
+                }
+            }
+        }
+    }
+
+    for &(ident, _) in assoc_bindings.iter() {
+        let mut formal_idents = decl_generics.types.get_slice(AssocSpace)
+                                .iter().map(|t| t.name.ident());
+        if !formal_idents.any(|i| i == ident) {
+            span_err!(this.tcx().sess, span, E0177,
+                      "associated type `{}` does not exist",
+                      token::get_ident(ident));
+        }
     }
 
     return substs;
@@ -370,7 +412,9 @@ fn create_substs_for_ast_path<'tcx,AC,RS>(
 fn convert_angle_bracketed_parameters<'tcx, AC, RS>(this: &AC,
                                                     rscope: &RS,
                                                     data: &ast::AngleBracketedParameterData)
-                                                    -> (Vec<ty::Region>, Vec<Ty<'tcx>>)
+                                                    -> (Vec<ty::Region>,
+                                                        Vec<Ty<'tcx>>,
+                                                        Vec<(ast::Ident, Ty<'tcx>)>)
     where AC: AstConv<'tcx>, RS: RegionScope
 {
     let regions: Vec<_> =
@@ -383,7 +427,12 @@ fn convert_angle_bracketed_parameters<'tcx, AC, RS>(this: &AC,
         .map(|t| ast_ty_to_ty(this, rscope, &**t))
         .collect();
 
-    (regions, types)
+    let assoc_bindings: Vec<_> =
+        data.bindings.iter()
+        .map(|b| (b.ident, ast_ty_to_ty(this, rscope, &*b.ty)))
+        .collect();
+
+    (regions, types, assoc_bindings)
 }
 
 /// Returns the appropriate lifetime to use for any output lifetimes
@@ -467,16 +516,6 @@ fn convert_parenthesized_parameters<'tcx,AC>(this: &AC,
     vec![input_ty, output]
 }
 
-pub fn instantiate_poly_trait_ref<'tcx,AC,RS>(
-    this: &AC,
-    rscope: &RS,
-    ast_trait_ref: &ast::PolyTraitRef,
-    self_ty: Option<Ty<'tcx>>)
-    -> Rc<ty::TraitRef<'tcx>>
-    where AC: AstConv<'tcx>, RS: RegionScope
-{
-    instantiate_trait_ref(this, rscope, &ast_trait_ref.trait_ref, self_ty)
-}
 
 /// Instantiates the path for the given trait reference, assuming that it's bound to a valid trait
 /// type. Returns the def_id for the defining trait. Fails if the type is a type other than a trait
@@ -484,7 +523,8 @@ pub fn instantiate_poly_trait_ref<'tcx,AC,RS>(
 pub fn instantiate_trait_ref<'tcx,AC,RS>(this: &AC,
                                          rscope: &RS,
                                          ast_trait_ref: &ast::TraitRef,
-                                         self_ty: Option<Ty<'tcx>>)
+                                         self_ty: Option<Ty<'tcx>>,
+                                         allow_eq: AllowEqConstraints)
                                          -> Rc<ty::TraitRef<'tcx>>
                                          where AC: AstConv<'tcx>,
                                                RS: RegionScope
@@ -493,8 +533,12 @@ pub fn instantiate_trait_ref<'tcx,AC,RS>(this: &AC,
                            ast_trait_ref.path.span,
                            ast_trait_ref.ref_id) {
         def::DefTrait(trait_def_id) => {
-            let trait_ref = Rc::new(ast_path_to_trait_ref(this, rscope, trait_def_id,
-                                                          self_ty, &ast_trait_ref.path));
+            let trait_ref = Rc::new(ast_path_to_trait_ref(this,
+                                                          rscope,
+                                                          trait_def_id,
+                                                          self_ty,
+                                                          &ast_trait_ref.path,
+                                                          allow_eq));
             this.tcx().trait_refs.borrow_mut().insert(ast_trait_ref.ref_id,
                                                       trait_ref.clone());
             trait_ref
@@ -507,15 +551,23 @@ pub fn instantiate_trait_ref<'tcx,AC,RS>(this: &AC,
     }
 }
 
+#[deriving(PartialEq,Show)]
+pub enum AllowEqConstraints {
+    Allow,
+    DontAllow
+}
+
 fn ast_path_to_trait_ref<'tcx,AC,RS>(
     this: &AC,
     rscope: &RS,
     trait_def_id: ast::DefId,
     self_ty: Option<Ty<'tcx>>,
-    path: &ast::Path)
+    path: &ast::Path,
+    allow_eq: AllowEqConstraints)
     -> ty::TraitRef<'tcx>
     where AC: AstConv<'tcx>, RS: RegionScope
 {
+    debug!("ast_path_to_trait_ref {}", path);
     let trait_def = this.get_trait_def(trait_def_id);
 
     // the trait reference introduces a binding level here, so
@@ -525,15 +577,33 @@ fn ast_path_to_trait_ref<'tcx,AC,RS>(
     // lifetimes. Oh well, not there yet.
     let shifted_rscope = ShiftedRscope::new(rscope);
 
-    let (regions, types) = match path.segments.last().unwrap().parameters {
+    let (regions, types, assoc_bindings) = match path.segments.last().unwrap().parameters {
         ast::AngleBracketedParameters(ref data) => {
             convert_angle_bracketed_parameters(this, &shifted_rscope, data)
         }
         ast::ParenthesizedParameters(ref data) => {
-            (Vec::new(), convert_parenthesized_parameters(this, data))
+            // For now, require that parenthetical notation be used
+            // only with `Fn()` etc.
+            if !this.tcx().sess.features.borrow().unboxed_closures &&
+                this.tcx().lang_items.fn_trait_kind(trait_def_id).is_none()
+            {
+                this.tcx().sess.span_err(path.span,
+                                         "parenthetical notation is only stable when \
+                                         used with the `Fn` family of traits");
+                span_help!(this.tcx().sess, path.span,
+                           "add `#![feature(unboxed_closures)]` to \
+                            the crate attributes to enable");
+            }
+
+            (Vec::new(), convert_parenthesized_parameters(this, data), Vec::new())
         }
     };
 
+    if allow_eq == AllowEqConstraints::DontAllow && assoc_bindings.len() > 0 {
+        span_err!(this.tcx().sess, path.span, E0173,
+                  "equality constraints are not allowed in this position");
+    }
+
     let substs = create_substs_for_ast_path(this,
                                             &shifted_rscope,
                                             path.span,
@@ -541,7 +611,8 @@ fn ast_path_to_trait_ref<'tcx,AC,RS>(
                                             &trait_def.generics,
                                             self_ty,
                                             types,
-                                            regions);
+                                            regions,
+                                            assoc_bindings);
 
     ty::TraitRef::new(trait_def_id, substs)
 }
@@ -563,7 +634,6 @@ pub fn ast_path_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
                                         rscope,
                                         did,
                                         &generics,
-                                        None,
                                         path);
     let ty = decl_ty.subst(tcx, &substs);
     TypeAndSubsts { substs: substs, ty: ty }
@@ -604,7 +674,7 @@ pub fn ast_path_to_ty_relaxed<'tcx,AC,RS>(
         Substs::new(VecPerParamSpace::params_from_type(type_params),
                     VecPerParamSpace::params_from_type(region_params))
     } else {
-        ast_path_substs_for_ty(this, rscope, did, &generics, None, path)
+        ast_path_substs_for_ty(this, rscope, did, &generics, path)
     };
 
     let ty = decl_ty.subst(tcx, &substs);
@@ -693,7 +763,8 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
                                                     rscope,
                                                     trait_def_id,
                                                     None,
-                                                    path));
+                                                    path,
+                                                    AllowEqConstraints::Allow));
                 }
                 _ => {
                     span_err!(this.tcx().sess, ty.span, E0172, "expected a reference to a trait");
@@ -702,7 +773,7 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
             }
         }
         _ => {
-            span_err!(this.tcx().sess, ty.span, E0171,
+            span_err!(this.tcx().sess, ty.span, E0178,
                       "expected a path on the left-hand side of `+`, not `{}`",
                       pprust::ty_to_string(ty));
             match ty.node {
@@ -713,8 +784,7 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
                                pprust::ty_to_string(&*mut_ty.ty),
                                pprust::bounds_to_string(bounds));
                 }
-
-                ast::TyRptr(Some(ref lt), ref mut_ty) => {
+               ast::TyRptr(Some(ref lt), ref mut_ty) => {
                     span_note!(this.tcx().sess, ty.span,
                                "perhaps you meant `&{} {}({} +{})`? (per RFC 248)",
                                pprust::lifetime_to_string(lt),
@@ -731,7 +801,6 @@ fn ast_ty_to_trait_ref<'tcx,AC,RS>(this: &AC,
             Err(ErrorReported)
         }
     }
-
 }
 
 fn trait_ref_to_object_type<'tcx,AC,RS>(this: &AC,
@@ -745,7 +814,7 @@ fn trait_ref_to_object_type<'tcx,AC,RS>(this: &AC,
     let existential_bounds = conv_existential_bounds(this,
                                                      rscope,
                                                      span,
-                                                     &[Rc::new(trait_ref.clone())],
+                                                     Some(&trait_ref),
                                                      bounds);
 
     let result = ty::mk_trait(this.tcx(), trait_ref, existential_bounds);
@@ -772,7 +841,8 @@ fn qpath_to_ty<'tcx,AC,RS>(this: &AC,
     let trait_ref = instantiate_trait_ref(this,
                                           rscope,
                                           &*qpath.trait_ref,
-                                          Some(self_type));
+                                          Some(self_type),
+                                          AllowEqConstraints::DontAllow);
 
     debug!("qpath_to_ty: trait_ref={}", trait_ref.repr(this.tcx()));
 
@@ -854,7 +924,7 @@ pub fn ast_ty_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
                     tcx.sess.span_err(ast_ty.span,
                                       "variadic function must have C calling convention");
                 }
-                ty::mk_bare_fn(tcx, ty_of_bare_fn(this, bf.fn_style, bf.abi, &*bf.decl))
+                ty::mk_bare_fn(tcx, ty_of_bare_fn(this, bf.unsafety, bf.abi, &*bf.decl))
             }
             ast::TyClosure(ref f) => {
                 // Use corresponding trait store to figure out default bounds
@@ -862,10 +932,10 @@ pub fn ast_ty_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
                 let bounds = conv_existential_bounds(this,
                                                      rscope,
                                                      ast_ty.span,
-                                                     [].as_slice(),
+                                                     None,
                                                      f.bounds.as_slice());
                 let fn_decl = ty_of_closure(this,
-                                            f.fn_style,
+                                            f.unsafety,
                                             f.onceness,
                                             bounds,
                                             ty::RegionTraitStore(
@@ -876,25 +946,6 @@ pub fn ast_ty_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
                                             None);
                 ty::mk_closure(tcx, fn_decl)
             }
-            ast::TyProc(ref f) => {
-                // Use corresponding trait store to figure out default bounds
-                // if none were specified.
-                let bounds = conv_existential_bounds(this, rscope,
-                                                     ast_ty.span,
-                                                     [].as_slice(),
-                                                     f.bounds.as_slice());
-
-                let fn_decl = ty_of_closure(this,
-                                            f.fn_style,
-                                            f.onceness,
-                                            bounds,
-                                            ty::UniqTraitStore,
-                                            &*f.decl,
-                                            abi::Rust,
-                                            None);
-
-                ty::mk_closure(tcx, fn_decl)
-            }
             ast::TyPolyTraitRef(ref bounds) => {
                 conv_ty_poly_trait_ref(this, rscope, ast_ty.span, bounds.as_slice())
             }
@@ -916,7 +967,8 @@ pub fn ast_ty_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
                                                            rscope,
                                                            trait_def_id,
                                                            None,
-                                                           path);
+                                                           path,
+                                                           AllowEqConstraints::Allow);
                         trait_ref_to_object_type(this, rscope, path.span, result, &[])
                     }
                     def::DefTy(did, _) | def::DefStruct(did) => {
@@ -1000,7 +1052,7 @@ pub fn ast_ty_to_ty<'tcx, AC: AstConv<'tcx>, RS: RegionScope>(
             }
             ast::TyInfer => {
                 // TyInfer also appears as the type of arguments or return
-                // values in a ExprClosure or ExprProc, or as
+                // values in a ExprClosure, or as
                 // the type of local variables. Both of these cases are
                 // handled specially and will not descend into this routine.
                 this.ty_infer(ast_ty.span)
@@ -1030,7 +1082,7 @@ struct SelfInfo<'a, 'tcx> {
 
 pub fn ty_of_method<'tcx, AC: AstConv<'tcx>>(
                     this: &AC,
-                    fn_style: ast::FnStyle,
+                    unsafety: ast::Unsafety,
                     untransformed_self_ty: Ty<'tcx>,
                     explicit_self: &ast::ExplicitSelf,
                     decl: &ast::FnDecl,
@@ -1042,27 +1094,28 @@ pub fn ty_of_method<'tcx, AC: AstConv<'tcx>>(
     });
     let (bare_fn_ty, optional_explicit_self_category) =
         ty_of_method_or_bare_fn(this,
-                                fn_style,
+                                unsafety,
                                 abi,
                                 self_info,
                                 decl);
     (bare_fn_ty, optional_explicit_self_category.unwrap())
 }
 
-pub fn ty_of_bare_fn<'tcx, AC: AstConv<'tcx>>(this: &AC, fn_style: ast::FnStyle, abi: abi::Abi,
+pub fn ty_of_bare_fn<'tcx, AC: AstConv<'tcx>>(this: &AC, unsafety: ast::Unsafety, abi: abi::Abi,
                                               decl: &ast::FnDecl) -> ty::BareFnTy<'tcx> {
-    let (bare_fn_ty, _) = ty_of_method_or_bare_fn(this, fn_style, abi, None, decl);
+    let (bare_fn_ty, _) = ty_of_method_or_bare_fn(this, unsafety, abi, None, decl);
     bare_fn_ty
 }
 
 fn ty_of_method_or_bare_fn<'a, 'tcx, AC: AstConv<'tcx>>(
                            this: &AC,
-                           fn_style: ast::FnStyle,
+                           unsafety: ast::Unsafety,
                            abi: abi::Abi,
                            opt_self_info: Option<SelfInfo<'a, 'tcx>>,
                            decl: &ast::FnDecl)
                            -> (ty::BareFnTy<'tcx>,
-                               Option<ty::ExplicitSelfCategory>) {
+                               Option<ty::ExplicitSelfCategory>)
+{
     debug!("ty_of_method_or_bare_fn");
 
     // New region names that appear inside of the arguments of the function
@@ -1078,6 +1131,11 @@ fn ty_of_method_or_bare_fn<'a, 'tcx, AC: AstConv<'tcx>>(
     let (self_ty, mut implied_output_region) = match opt_self_info {
         None => (None, None),
         Some(self_info) => {
+            // Shift regions in the self type by 1 to account for the binding
+            // level introduced by the function itself.
+            let untransformed_self_ty =
+                ty_fold::shift_regions(this.tcx(), 1, &self_info.untransformed_self_ty);
+
             // Figure out and record the explicit self category.
             let explicit_self_category =
                 determine_explicit_self_category(this, &rb, &self_info);
@@ -1087,21 +1145,19 @@ fn ty_of_method_or_bare_fn<'a, 'tcx, AC: AstConv<'tcx>>(
                     (None, None)
                 }
                 ty::ByValueExplicitSelfCategory => {
-                    (Some(self_info.untransformed_self_ty), None)
+                    (Some(untransformed_self_ty), None)
                 }
                 ty::ByReferenceExplicitSelfCategory(region, mutability) => {
                     (Some(ty::mk_rptr(this.tcx(),
                                       region,
                                       ty::mt {
-                                        ty: self_info.untransformed_self_ty,
+                                        ty: untransformed_self_ty,
                                         mutbl: mutability
                                       })),
                      Some(region))
                 }
                 ty::ByBoxExplicitSelfCategory => {
-                    (Some(ty::mk_uniq(this.tcx(),
-                                      self_info.untransformed_self_ty)),
-                     None)
+                    (Some(ty::mk_uniq(this.tcx(), untransformed_self_ty)), None)
                 }
             }
         }
@@ -1151,7 +1207,7 @@ fn ty_of_method_or_bare_fn<'a, 'tcx, AC: AstConv<'tcx>>(
     };
 
     (ty::BareFnTy {
-        fn_style: fn_style,
+        unsafety: unsafety,
         abi: abi,
         sig: ty::FnSig {
             inputs: self_and_input_tys,
@@ -1245,7 +1301,7 @@ fn count_modifiers(ty: Ty) -> uint {
 
 pub fn ty_of_closure<'tcx, AC: AstConv<'tcx>>(
     this: &AC,
-    fn_style: ast::FnStyle,
+    unsafety: ast::Unsafety,
     onceness: ast::Onceness,
     bounds: ty::ExistentialBounds,
     store: ty::TraitStore,
@@ -1290,7 +1346,7 @@ pub fn ty_of_closure<'tcx, AC: AstConv<'tcx>>(
     debug!("ty_of_closure: output_ty={}", output_ty.repr(this.tcx()));
 
     ty::ClosureTy {
-        fn_style: fn_style,
+        unsafety: unsafety,
         onceness: onceness,
         store: store,
         bounds: bounds,
@@ -1309,7 +1365,7 @@ pub fn conv_existential_bounds<'tcx, AC: AstConv<'tcx>, RS:RegionScope>(
     this: &AC,
     rscope: &RS,
     span: Span,
-    main_trait_refs: &[Rc<ty::TraitRef<'tcx>>],
+    principal_trait_ref: Option<&ty::TraitRef<'tcx>>, // None for boxed closures
     ast_bounds: &[ast::TyParamBound])
     -> ty::ExistentialBounds
 {
@@ -1320,7 +1376,7 @@ pub fn conv_existential_bounds<'tcx, AC: AstConv<'tcx>, RS:RegionScope>(
         partition_bounds(this.tcx(), span, ast_bound_refs.as_slice());
 
     conv_existential_bounds_from_partitioned_bounds(
-        this, rscope, span, main_trait_refs, partitioned_bounds)
+        this, rscope, span, principal_trait_ref, partitioned_bounds)
 }
 
 fn conv_ty_poly_trait_ref<'tcx, AC, RS>(
@@ -1336,7 +1392,11 @@ fn conv_ty_poly_trait_ref<'tcx, AC, RS>(
 
     let main_trait_bound = match partitioned_bounds.trait_bounds.remove(0) {
         Some(trait_bound) => {
-            Some(instantiate_poly_trait_ref(this, rscope, trait_bound, None))
+            Some(instantiate_trait_ref(this,
+                                       rscope,
+                                       &trait_bound.trait_ref,
+                                       None,
+                                       AllowEqConstraints::Allow))
         }
         None => {
             this.tcx().sess.span_err(
@@ -1346,11 +1406,12 @@ fn conv_ty_poly_trait_ref<'tcx, AC, RS>(
         }
     };
 
-    let bounds = conv_existential_bounds_from_partitioned_bounds(this,
-                                                                 rscope,
-                                                                 span,
-                                                                 main_trait_bound.as_slice(),
-                                                                 partitioned_bounds);
+    let bounds =
+        conv_existential_bounds_from_partitioned_bounds(this,
+                                                        rscope,
+                                                        span,
+                                                        main_trait_bound.as_ref().map(|tr| &**tr),
+                                                        partitioned_bounds);
 
     match main_trait_bound {
         None => ty::mk_err(),
@@ -1362,7 +1423,7 @@ pub fn conv_existential_bounds_from_partitioned_bounds<'tcx, AC, RS>(
     this: &AC,
     rscope: &RS,
     span: Span,
-    main_trait_refs: &[Rc<ty::TraitRef<'tcx>>],
+    principal_trait_ref: Option<&ty::TraitRef<'tcx>>, // None for boxed closures
     partitioned_bounds: PartitionedBounds)
     -> ty::ExistentialBounds
     where AC: AstConv<'tcx>, RS:RegionScope
@@ -1380,28 +1441,12 @@ pub fn conv_existential_bounds_from_partitioned_bounds<'tcx, AC, RS>(
                      as closure or object bounds").as_slice());
     }
 
-    // The "main trait refs", rather annoyingly, have no type
-    // specified for the `Self` parameter of the trait. The reason for
-    // this is that they are, after all, *existential* types, and
-    // hence that type is unknown. However, leaving this type missing
-    // causes the substitution code to go all awry when walking the
-    // bounds, so here we clone those trait refs and insert ty::err as
-    // the self type. Perhaps we should do this more generally, it'd
-    // be convenient (or perhaps something else, i.e., ty::erased).
-    let main_trait_refs: Vec<Rc<ty::TraitRef>> =
-        main_trait_refs.iter()
-        .map(|t|
-             Rc::new(ty::TraitRef {
-                 def_id: t.def_id,
-                 substs: t.substs.with_self_ty(ty::mk_err()) }))
-        .collect();
-
     let region_bound = compute_region_bound(this,
                                             rscope,
                                             span,
-                                            builtin_bounds,
                                             region_bounds.as_slice(),
-                                            main_trait_refs.as_slice());
+                                            principal_trait_ref,
+                                            builtin_bounds);
 
     ty::ExistentialBounds {
         region_bound: region_bound,
@@ -1413,33 +1458,35 @@ pub fn conv_existential_bounds_from_partitioned_bounds<'tcx, AC, RS>(
 /// (if any) we can use to summarize this type. The basic idea is that we will use the bound the
 /// user provided, if they provided one, and otherwise search the supertypes of trait bounds for
 /// region bounds. It may be that we can derive no bound at all, in which case we return `None`.
-pub fn compute_opt_region_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
-                                      span: Span,
-                                      builtin_bounds: ty::BuiltinBounds,
-                                      region_bounds: &[&ast::Lifetime],
-                                      trait_bounds: &[Rc<ty::TraitRef<'tcx>>])
-                                      -> Option<ty::Region>
+fn compute_opt_region_bound<'tcx>(tcx: &ty::ctxt<'tcx>,
+                                  span: Span,
+                                  explicit_region_bounds: &[&ast::Lifetime],
+                                  principal_trait_ref: Option<&ty::TraitRef<'tcx>>,
+                                  builtin_bounds: ty::BuiltinBounds)
+                                  -> Option<ty::Region>
 {
-    if region_bounds.len() > 1 {
+    debug!("compute_opt_region_bound(explicit_region_bounds={}, \
+           principal_trait_ref={}, builtin_bounds={})",
+           explicit_region_bounds,
+           principal_trait_ref.repr(tcx),
+           builtin_bounds.repr(tcx));
+
+    if explicit_region_bounds.len() > 1 {
         tcx.sess.span_err(
-            region_bounds[1].span,
+            explicit_region_bounds[1].span,
             format!("only a single explicit lifetime bound is permitted").as_slice());
     }
 
-    if region_bounds.len() != 0 {
+    if explicit_region_bounds.len() != 0 {
         // Explicitly specified region bound. Use that.
-        let r = region_bounds[0];
+        let r = explicit_region_bounds[0];
         return Some(ast_region_to_region(tcx, r));
     }
 
     // No explicit region bound specified. Therefore, examine trait
     // bounds and see if we can derive region bounds from those.
     let derived_region_bounds =
-        ty::required_region_bounds(
-            tcx,
-            &[],
-            builtin_bounds,
-            trait_bounds);
+        ty::object_region_bounds(tcx, principal_trait_ref, builtin_bounds);
 
     // If there are no derived region bounds, then report back that we
     // can find no region bound.
@@ -1473,13 +1520,13 @@ fn compute_region_bound<'tcx, AC: AstConv<'tcx>, RS:RegionScope>(
     this: &AC,
     rscope: &RS,
     span: Span,
-    builtin_bounds: ty::BuiltinBounds,
     region_bounds: &[&ast::Lifetime],
-    trait_bounds: &[Rc<ty::TraitRef<'tcx>>])
+    principal_trait_ref: Option<&ty::TraitRef<'tcx>>, // None for closures
+    builtin_bounds: ty::BuiltinBounds)
     -> ty::Region
 {
-    match compute_opt_region_bound(this.tcx(), span, builtin_bounds,
-                                   region_bounds, trait_bounds) {
+    match compute_opt_region_bound(this.tcx(), span, region_bounds,
+                                   principal_trait_ref, builtin_bounds) {
         Some(r) => r,
         None => {
             match rscope.default_region_bound(span) {
index 34030ae4493a2cbbe57ef80b8af9c6e058c29c1e..e3fec2c8b1df2623bf936f54040d6fbed6fdb374 100644 (file)
@@ -89,7 +89,7 @@ fn check_unboxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
 
     let mut fn_ty = astconv::ty_of_closure(
         fcx,
-        ast::NormalFn,
+        ast::Unsafety::Normal,
         ast::Many,
 
         // The `RegionTraitStore` and region_existential_bounds
@@ -119,7 +119,7 @@ fn check_unboxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
     fcx.write_ty(expr.id, closure_type);
 
     check_fn(fcx.ccx,
-             ast::NormalFn,
+             ast::Unsafety::Normal,
              expr.id,
              &fn_ty.sig,
              decl,
@@ -188,42 +188,35 @@ fn deduce_unboxed_closure_expectations_from_trait_ref<'a,'tcx>(
     debug!("deduce_unboxed_closure_expectations_from_object_type({})",
            trait_ref.repr(tcx));
 
-    let def_id_kinds = [
-        (tcx.lang_items.fn_trait(), ty::FnUnboxedClosureKind),
-        (tcx.lang_items.fn_mut_trait(), ty::FnMutUnboxedClosureKind),
-        (tcx.lang_items.fn_once_trait(), ty::FnOnceUnboxedClosureKind),
-    ];
-
-    for &(def_id, kind) in def_id_kinds.iter() {
-        if Some(trait_ref.def_id) == def_id {
-            debug!("found object type {}", kind);
+    let kind = match tcx.lang_items.fn_trait_kind(trait_ref.def_id) {
+        Some(k) => k,
+        None => { return None; }
+    };
 
-            let arg_param_ty = *trait_ref.substs.types.get(subst::TypeSpace, 0);
-            let arg_param_ty = fcx.infcx().resolve_type_vars_if_possible(arg_param_ty);
-            debug!("arg_param_ty {}", arg_param_ty.repr(tcx));
+    debug!("found object type {}", kind);
 
-            let input_tys = match arg_param_ty.sty {
-                ty::ty_tup(ref tys) => { (*tys).clone() }
-                _ => { continue; }
-            };
-            debug!("input_tys {}", input_tys.repr(tcx));
+    let arg_param_ty = *trait_ref.substs.types.get(subst::TypeSpace, 0);
+    let arg_param_ty = fcx.infcx().resolve_type_vars_if_possible(arg_param_ty);
+    debug!("arg_param_ty {}", arg_param_ty.repr(tcx));
 
-            let ret_param_ty = *trait_ref.substs.types.get(subst::TypeSpace, 1);
-            let ret_param_ty = fcx.infcx().resolve_type_vars_if_possible(ret_param_ty);
-            debug!("ret_param_ty {}", ret_param_ty.repr(tcx));
+    let input_tys = match arg_param_ty.sty {
+        ty::ty_tup(ref tys) => { (*tys).clone() }
+        _ => { return None; }
+    };
+    debug!("input_tys {}", input_tys.repr(tcx));
 
-            let fn_sig = ty::FnSig {
-                inputs: input_tys,
-                output: ty::FnConverging(ret_param_ty),
-                variadic: false
-            };
-            debug!("fn_sig {}", fn_sig.repr(tcx));
+    let ret_param_ty = *trait_ref.substs.types.get(subst::TypeSpace, 1);
+    let ret_param_ty = fcx.infcx().resolve_type_vars_if_possible(ret_param_ty);
+    debug!("ret_param_ty {}", ret_param_ty.repr(tcx));
 
-            return Some((fn_sig, kind));
-        }
-    }
+    let fn_sig = ty::FnSig {
+        inputs: input_tys,
+        output: ty::FnConverging(ret_param_ty),
+        variadic: false
+    };
+    debug!("fn_sig {}", fn_sig.repr(tcx));
 
-    None
+    return Some((fn_sig, kind));
 }
 
 fn deduce_unboxed_closure_expectations_from_obligations<'a,'tcx>(
@@ -232,16 +225,24 @@ fn deduce_unboxed_closure_expectations_from_obligations<'a,'tcx>(
     -> Option<(ty::FnSig<'tcx>, ty::UnboxedClosureKind)>
 {
     // Here `expected_ty` is known to be a type inference variable.
-    for obligation in fcx.inh.fulfillment_cx.borrow().pending_trait_obligations().iter() {
-        let obligation_self_ty = fcx.infcx().shallow_resolve(obligation.self_ty());
-        match obligation_self_ty.sty {
-            ty::ty_infer(ty::TyVar(v)) if expected_vid == v => { }
-            _ => { continue; }
-        }
+    for obligation in fcx.inh.fulfillment_cx.borrow().pending_obligations().iter() {
+        match obligation.trait_ref {
+            ty::Predicate::Trait(ref trait_ref) => {
+                let self_ty = fcx.infcx().shallow_resolve(trait_ref.self_ty());
+                match self_ty.sty {
+                    ty::ty_infer(ty::TyVar(v)) if expected_vid == v => { }
+                    _ => { continue; }
+                }
 
-        match deduce_unboxed_closure_expectations_from_trait_ref(fcx, &*obligation.trait_ref) {
-            Some(e) => { return Some(e); }
-            None => { }
+                match deduce_unboxed_closure_expectations_from_trait_ref(fcx, &**trait_ref) {
+                    Some(e) => { return Some(e); }
+                    None => { }
+                }
+            }
+            ty::Predicate::Equate(..) |
+            ty::Predicate::RegionOutlives(..) |
+            ty::Predicate::TypeOutlives(..) => {
+            }
         }
     }
 
@@ -249,12 +250,12 @@ fn deduce_unboxed_closure_expectations_from_obligations<'a,'tcx>(
 }
 
 
-pub fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
-                                    expr: &ast::Expr,
-                                    store: ty::TraitStore,
-                                    decl: &ast::FnDecl,
-                                    body: &ast::Block,
-                                    expected: Expectation<'tcx>) {
+fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
+                                expr: &ast::Expr,
+                                store: ty::TraitStore,
+                                decl: &ast::FnDecl,
+                                body: &ast::Block,
+                                expected: Expectation<'tcx>) {
     let tcx = fcx.ccx.tcx;
 
     // Find the expected input/output types (if any). Substitute
@@ -292,18 +293,10 @@ pub fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
             }
             _ => {
                 // Not an error! Means we're inferring the closure type
-                let (bounds, onceness) = match expr.node {
-                    ast::ExprProc(..) => {
-                        let mut bounds = ty::region_existential_bound(ty::ReStatic);
-                        bounds.builtin_bounds.insert(ty::BoundSend); // FIXME
-                        (bounds, ast::Once)
-                    }
-                    _ => {
-                        let region = fcx.infcx().next_region_var(
-                            infer::AddrOfRegion(expr.span));
-                        (ty::region_existential_bound(region), ast::Many)
-                    }
-                };
+                let region = fcx.infcx().next_region_var(
+                    infer::AddrOfRegion(expr.span));
+                let bounds = ty::region_existential_bound(region);
+                let onceness = ast::Many;
                 (None, onceness, bounds)
             }
         }
@@ -311,7 +304,7 @@ pub fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
 
     // construct the function type
     let fn_ty = astconv::ty_of_closure(fcx,
-                                       ast::NormalFn,
+                                       ast::Unsafety::Normal,
                                        expected_onceness,
                                        expected_bounds,
                                        store,
@@ -328,9 +321,9 @@ pub fn check_boxed_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>,
     // style inferred for it, then check it under its parent's style.
     // Otherwise, use its own
     let (inherited_style, inherited_style_id) = match store {
-        ty::RegionTraitStore(..) => (fcx.ps.borrow().fn_style,
+        ty::RegionTraitStore(..) => (fcx.ps.borrow().unsafety,
                                      fcx.ps.borrow().def),
-        ty::UniqTraitStore => (ast::NormalFn, expr.id)
+        ty::UniqTraitStore => (ast::Unsafety::Normal, expr.id)
     };
 
     check_fn(fcx.ccx,
index 9eb0e17b8e5beafe3fd7efafcb8b01094f6766c1..980097eaead997648819ae2d6a529115a2bf650c 100644 (file)
@@ -28,12 +28,14 @@ pub fn suptype<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, sp: Span,
         |sp, e, a, s| { fcx.report_mismatched_types(sp, e, a, s) })
 }
 
-pub fn suptype_with_fn<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
-                                 sp: Span,
-                                 b_is_expected: bool,
-                                 ty_a: Ty<'tcx>,
-                                 ty_b: Ty<'tcx>,
-                                 handle_err: |Span, Ty<'tcx>, Ty<'tcx>, &ty::type_err<'tcx>|) {
+pub fn suptype_with_fn<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
+                                    sp: Span,
+                                    b_is_expected: bool,
+                                    ty_a: Ty<'tcx>,
+                                    ty_b: Ty<'tcx>,
+                                    handle_err: F) where
+    F: FnOnce(Span, Ty<'tcx>, Ty<'tcx>, &ty::type_err<'tcx>),
+{
     // n.b.: order of actual, expected is reversed
     match infer::mk_subty(fcx.infcx(), b_is_expected, infer::Misc(sp),
                           ty_b, ty_a) {
index b6a9e2cbc59eae956c6874d780a4832ea65c9022..7463652a931360a2320c9d30ed5f1f6e73c5c162 100644 (file)
@@ -115,7 +115,7 @@ fn confirm(&mut self,
         // Create the final `MethodCallee`.
         let fty = ty::mk_bare_fn(self.tcx(), ty::BareFnTy {
             sig: method_sig,
-            fn_style: pick.method_ty.fty.fn_style,
+            unsafety: pick.method_ty.fty.unsafety,
             abi: pick.method_ty.fty.abi.clone(),
         });
         let callee = MethodCallee {
@@ -286,11 +286,8 @@ fn fresh_receiver_substs(&mut self,
         }
     }
 
-    fn extract_trait_ref<R>(&mut self,
-                            self_ty: Ty<'tcx>,
-                            closure: |&mut ConfirmContext<'a,'tcx>,
-                                      Ty<'tcx>, &ty::TyTrait<'tcx>| -> R)
-                            -> R
+    fn extract_trait_ref<R, F>(&mut self, self_ty: Ty<'tcx>, mut closure: F) -> R where
+        F: FnMut(&mut ConfirmContext<'a, 'tcx>, Ty<'tcx>, &ty::TyTrait<'tcx>) -> R,
     {
         // If we specified that this is an object method, then the
         // self-type ought to be something that can be dereferenced to
@@ -462,8 +459,7 @@ fn add_obligations(&mut self,
                method_bounds.repr(self.tcx()));
 
         self.fcx.add_obligations_for_parameters(
-            traits::ObligationCause::misc(self.span),
-            method_bounds_substs,
+            traits::ObligationCause::misc(self.span, self.fcx.body_id),
             method_bounds);
 
         self.fcx.add_default_region_param_bounds(
@@ -666,9 +662,11 @@ fn replace_late_bound_regions_with_fresh_var<T>(&self, value: &T) -> T
     }
 }
 
-fn wrap_autoref<'tcx>(mut deref: ty::AutoDerefRef<'tcx>,
-                      base_fn: |Option<Box<ty::AutoRef<'tcx>>>| -> ty::AutoRef<'tcx>)
-                      -> ty::AutoDerefRef<'tcx> {
+fn wrap_autoref<'tcx, F>(mut deref: ty::AutoDerefRef<'tcx>,
+                         base_fn: F)
+                         -> ty::AutoDerefRef<'tcx> where
+    F: FnOnce(Option<Box<ty::AutoRef<'tcx>>>) -> ty::AutoRef<'tcx>,
+{
     let autoref = mem::replace(&mut deref.autoref, None);
     let autoref = autoref.map(|r| box r);
     deref.autoref = Some(base_fn(autoref));
index b6c9d8b2d2176fcb8438706b201ad0b3bd0e66b1..d97a9c9e39b19c9844032053135131fca7c85aeb 100644 (file)
@@ -100,6 +100,7 @@ pub fn lookup<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
            call_expr.repr(fcx.tcx()),
            self_expr.repr(fcx.tcx()));
 
+    let self_ty = fcx.infcx().resolve_type_vars_if_possible(self_ty);
     let pick = try!(probe::probe(fcx, span, method_name, self_ty, call_expr.id));
     Ok(confirm::confirm(fcx, span, self_expr, call_expr, self_ty, pick, supplied_method_types))
 }
@@ -168,7 +169,9 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
     let trait_ref = Rc::new(ty::TraitRef::new(trait_def_id, substs));
 
     // Construct an obligation
-    let obligation = traits::Obligation::misc(span, trait_ref.clone());
+    let obligation = traits::Obligation::misc(span,
+                                              fcx.body_id,
+                                              ty::Predicate::Trait(trait_ref.clone()));
 
     // Now we want to know if this can be matched
     let mut selcx = traits::SelectionContext::new(fcx.infcx(),
@@ -186,6 +189,9 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
     assert_eq!(method_ty.generics.types.len(subst::FnSpace), 0);
     assert_eq!(method_ty.generics.regions.len(subst::FnSpace), 0);
 
+    debug!("lookup_in_trait_adjusted: method_num={} method_ty={}",
+           method_num, method_ty.repr(fcx.tcx()));
+
     // Substitute the trait parameters into the method type and
     // instantiate late-bound regions to get the actual method type.
     //
@@ -199,11 +205,11 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
     let transformed_self_ty = fn_sig.inputs[0];
     let fty = ty::mk_bare_fn(tcx, ty::BareFnTy {
         sig: fn_sig,
-        fn_style: bare_fn_ty.fn_style,
+        unsafety: bare_fn_ty.unsafety,
         abi: bare_fn_ty.abi.clone(),
     });
 
-    debug!("matched method fty={} obligation={}",
+    debug!("lookup_in_trait_adjusted: matched method fty={} obligation={}",
            fty.repr(fcx.tcx()),
            obligation.repr(fcx.tcx()));
 
@@ -218,8 +224,7 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
     let method_bounds = method_ty.generics.to_bounds(fcx.tcx(), &trait_ref.substs);
     assert!(!method_bounds.has_escaping_regions());
     fcx.add_obligations_for_parameters(
-        traits::ObligationCause::misc(span),
-        &trait_ref.substs,
+        traits::ObligationCause::misc(span, fcx.body_id),
         &method_bounds);
 
     // FIXME(#18653) -- Try to resolve obligations, giving us more
@@ -232,8 +237,8 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
         None => { }
 
         Some(self_expr) => {
-            debug!("inserting adjustment if needed (self-id = {}, \
-                   base adjustment = {}, explicit self = {})",
+            debug!("lookup_in_trait_adjusted: inserting adjustment if needed \
+                   (self-id={}, base adjustment={}, explicit_self={})",
                    self_expr.id, autoderefref, method_ty.explicit_self);
 
             match method_ty.explicit_self {
index 6ff276edbce7ebf79a28d014fdb92a7beef441c0..d3879e49034b19df674b54cf13aa161b7135fa4b 100644 (file)
@@ -168,7 +168,7 @@ fn create_steps<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
         check::autoderef(
             fcx, span, self_ty, None, NoPreference,
             |t, d| {
-                let adjustment = consider_reborrow(t, d);
+                let adjustment = AutoDeref(d);
                 steps.push(CandidateStep { self_ty: t, adjustment: adjustment });
                 None::<()> // keep iterating until we can't anymore
             });
@@ -185,14 +185,6 @@ fn create_steps<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
     }
 
     return steps;
-
-    fn consider_reborrow(ty: Ty, d: uint) -> PickAdjustment {
-        // Insert a `&*` or `&mut *` if this is a reference type:
-        match ty.sty {
-            ty::ty_rptr(_, ref mt) => AutoRef(mt.mutbl, box AutoDeref(d+1)),
-            _ => AutoDeref(d),
-        }
-    }
 }
 
 impl<'a,'tcx> ProbeContext<'a,'tcx> {
@@ -318,28 +310,11 @@ fn assemble_inherent_candidates_from_object(&mut self,
             substs: rcvr_substs.clone()
         });
 
-        self.elaborate_bounds(&[trait_ref.clone()], |this, new_trait_ref, m, method_num| {
+        self.elaborate_bounds(&[trait_ref.clone()], false, |this, new_trait_ref, m, method_num| {
             let vtable_index =
                 get_method_index(tcx, &*new_trait_ref,
                                  trait_ref.clone(), method_num);
 
-            // FIXME Hacky. By-value `self` methods in objects ought to be
-            // just a special case of passing ownership of a DST value
-            // as a parameter. *But* we currently hack them in and tie them to
-            // the particulars of the `Box` type. So basically for a `fn foo(self,...)`
-            // method invoked on an object, we don't want the receiver type to be
-            // `TheTrait`, but rather `Box<TheTrait>`. Yuck.
-            let mut m = m;
-            match m.explicit_self {
-                ty::ByValueExplicitSelfCategory => {
-                    let mut n = (*m).clone();
-                    let self_ty = n.fty.sig.inputs[0];
-                    n.fty.sig.inputs[0] = ty::mk_uniq(tcx, self_ty);
-                    m = Rc::new(n);
-                }
-                _ => { }
-            }
-
             let xform_self_ty =
                 this.xform_self_ty(&m, &new_trait_ref.substs);
 
@@ -361,11 +336,27 @@ fn assemble_inherent_candidates_from_param(&mut self,
                                                param_ty: ty::ParamTy) {
         // FIXME -- Do we want to commit to this behavior for param bounds?
 
-        let ty::ParamTy { space, idx: index, .. } = param_ty;
-        let bounds =
-            self.fcx.inh.param_env.bounds.get(space, index).trait_bounds
-            .as_slice();
-        self.elaborate_bounds(bounds, |this, trait_ref, m, method_num| {
+        let bounds: Vec<_> =
+            self.fcx.inh.param_env.caller_bounds.predicates
+            .iter()
+            .filter_map(|predicate| {
+                match *predicate {
+                    ty::Predicate::Trait(ref trait_ref) => {
+                        match trait_ref.self_ty().sty {
+                            ty::ty_param(ref p) if *p == param_ty => Some(trait_ref.clone()),
+                            _ => None
+                        }
+                    }
+                    ty::Predicate::Equate(..) |
+                    ty::Predicate::RegionOutlives(..) |
+                    ty::Predicate::TypeOutlives(..) => {
+                        None
+                    }
+                }
+            })
+            .collect();
+
+        self.elaborate_bounds(bounds.as_slice(), true, |this, trait_ref, m, method_num| {
             let xform_self_ty =
                 this.xform_self_ty(&m, &trait_ref.substs);
 
@@ -402,11 +393,14 @@ fn assemble_inherent_candidates_from_param(&mut self,
     fn elaborate_bounds(
         &mut self,
         bounds: &[Rc<ty::TraitRef<'tcx>>],
+        num_includes_types: bool,
         mk_cand: for<'a> |this: &mut ProbeContext<'a, 'tcx>,
                           tr: Rc<ty::TraitRef<'tcx>>,
                           m: Rc<ty::Method<'tcx>>,
                           method_num: uint|)
     {
+        debug!("elaborate_bounds(bounds={})", bounds.repr(self.tcx()));
+
         let tcx = self.tcx();
         let mut cache = HashSet::new();
         for bound_trait_ref in traits::transitive_bounds(tcx, bounds) {
@@ -415,7 +409,10 @@ fn elaborate_bounds(
                 continue;
             }
 
-            let (pos, method) = match trait_method(tcx, bound_trait_ref.def_id, self.method_name) {
+            let (pos, method) = match trait_method(tcx,
+                                                   bound_trait_ref.def_id,
+                                                   self.method_name,
+                                                   num_includes_types) {
                 Some(v) => v,
                 None => { continue; }
             };
@@ -626,7 +623,7 @@ fn pick_step(&mut self, step: &CandidateStep<'tcx>) -> Option<PickResult<'tcx>>
             return None;
         }
 
-        match self.pick_adjusted_method(step) {
+        match self.pick_by_value_method(step) {
             Some(result) => return Some(result),
             None => {}
         }
@@ -644,11 +641,34 @@ fn pick_step(&mut self, step: &CandidateStep<'tcx>) -> Option<PickResult<'tcx>>
         }
     }
 
-    fn pick_adjusted_method(&mut self,
+    fn pick_by_value_method(&mut self,
                             step: &CandidateStep<'tcx>)
                             -> Option<PickResult<'tcx>>
     {
-        self.pick_method(step.self_ty).map(|r| self.adjust(r, step.adjustment.clone()))
+        /*!
+         * For each type `T` in the step list, this attempts to find a
+         * method where the (transformed) self type is exactly `T`. We
+         * do however do one transformation on the adjustment: if we
+         * are passing a region pointer in, we will potentially
+         * *reborrow* it to a shorter lifetime. This allows us to
+         * transparently pass `&mut` pointers, in particular, without
+         * consuming them for their entire lifetime.
+         */
+
+        let adjustment = match step.adjustment {
+            AutoDeref(d) => consider_reborrow(step.self_ty, d),
+            AutoUnsizeLength(..) | AutoRef(..) => step.adjustment.clone(),
+        };
+
+        return self.pick_method(step.self_ty).map(|r| self.adjust(r, adjustment.clone()));
+
+        fn consider_reborrow(ty: Ty, d: uint) -> PickAdjustment {
+            // Insert a `&*` or `&mut *` if this is a reference type:
+            match ty.sty {
+                ty::ty_rptr(_, ref mt) => AutoRef(mt.mutbl, box AutoDeref(d+1)),
+                _ => AutoDeref(d),
+            }
+        }
     }
 
     fn pick_autorefd_method(&mut self,
@@ -673,10 +693,12 @@ fn pick_autorefrefd_method(&mut self,
                                                mutbl: m }))
     }
 
-    fn search_mutabilities(&mut self,
-                           mk_adjustment: |ast::Mutability| -> PickAdjustment,
-                           mk_autoref_ty: |ast::Mutability, ty::Region| -> Ty<'tcx>)
-                           -> Option<PickResult<'tcx>>
+    fn search_mutabilities<F, G>(&mut self,
+                                 mut mk_adjustment: F,
+                                 mut mk_autoref_ty: G)
+                                 -> Option<PickResult<'tcx>> where
+        F: FnMut(ast::Mutability) -> PickAdjustment,
+        G: FnMut(ast::Mutability, ty::Region) -> Ty<'tcx>,
     {
         // In general, during probing we erase regions. See
         // `impl_self_ty()` for an explanation.
@@ -783,11 +805,10 @@ fn consider_probe(&self, self_ty: Ty<'tcx>, probe: &Candidate<'tcx>) -> bool {
 
                     // Convert the bounds into obligations.
                     let obligations =
-                        traits::obligations_for_generics(
+                        traits::predicates_for_generics(
                             self.tcx(),
-                            traits::ObligationCause::misc(self.span),
-                            &impl_bounds,
-                            &substs.types);
+                            traits::ObligationCause::misc(self.span, self.fcx.body_id),
+                            &impl_bounds);
                     debug!("impl_obligations={}", obligations.repr(self.tcx()));
 
                     // Evaluate those obligations to see if they might possibly hold.
@@ -988,12 +1009,18 @@ fn impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
 /// index (or `None`, if no such method).
 fn trait_method<'tcx>(tcx: &ty::ctxt<'tcx>,
                       trait_def_id: ast::DefId,
-                      method_name: ast::Name)
+                      method_name: ast::Name,
+                      num_includes_types: bool)
                       -> Option<(uint, Rc<ty::Method<'tcx>>)>
 {
     let trait_items = ty::trait_items(tcx, trait_def_id);
     trait_items
         .iter()
+        .filter(|item|
+            num_includes_types || match *item {
+                &ty::MethodTraitItem(_) => true,
+                &ty::TypeTraitItem(_) => false
+            })
         .enumerate()
         .find(|&(_, ref item)| item.name() == method_name)
         .and_then(|(idx, item)| item.as_opt_method().map(|m| (idx, m)))
@@ -1010,7 +1037,7 @@ fn get_method_index<'tcx>(tcx: &ty::ctxt<'tcx>,
     // iterating down the supertraits of the object's trait until
     // we find the trait the method came from, counting up the
     // methods from them.
-    let mut method_count = 0;
+    let mut method_count = n_method;
     ty::each_bound_trait_and_supertraits(tcx, &[subtrait], |bound_ref| {
         if bound_ref.def_id == trait_ref.def_id {
             false
@@ -1025,7 +1052,7 @@ fn get_method_index<'tcx>(tcx: &ty::ctxt<'tcx>,
             true
         }
     });
-    method_count + n_method
+    method_count
 }
 
 impl<'tcx> Candidate<'tcx> {
index 1a8b06ec12def077c28f31fc7cdcaa652a38f8b4..e0df94745d6a906e2156dc5135d02c06bccfea29 100644 (file)
 
 use astconv::{mod, ast_region_to_region, ast_ty_to_ty, AstConv};
 use check::_match::pat_ctxt;
-use middle::{const_eval, def, traits};
+use middle::{const_eval, def};
 use middle::infer;
 use middle::lang_items::IteratorItem;
 use middle::mem_categorization::{mod, McResult};
 use middle::pat_util::{mod, pat_id_map};
 use middle::region::CodeExtent;
 use middle::subst::{mod, Subst, Substs, VecPerParamSpace, ParamSpace};
+use middle::traits;
 use middle::ty::{FnSig, VariantInfo, Polytype};
 use middle::ty::{Disr, ParamTy, ParameterEnvironment};
 use middle::ty::{mod, Ty};
 use util::nodemap::{DefIdMap, FnvHashMap, NodeMap};
 
 use std::cell::{Cell, Ref, RefCell};
-use std::collections::hash_map::{Occupied, Vacant};
 use std::mem::replace;
 use std::rc::Rc;
 use syntax::{mod, abi, attr};
-use syntax::ast::{mod, ProvidedMethod, RequiredMethod, TypeTraitItem};
+use syntax::ast::{mod, ProvidedMethod, RequiredMethod, TypeTraitItem, DefId};
 use syntax::ast_util::{mod, local_def, PostExpansionMethod};
 use syntax::codemap::{mod, Span};
 use syntax::owned_slice::OwnedSlice;
 /// closures defined within the function.  For example:
 ///
 ///     fn foo() {
-///         bar(proc() { ... })
+///         bar(move|| { ... })
 ///     }
 ///
 /// Here, the function `foo()` and the closure passed to
@@ -161,42 +161,10 @@ pub struct Inherited<'a, 'tcx: 'a> {
     // one is never copied into the tcx: it is only used by regionck.
     fn_sig_map: RefCell<NodeMap<Vec<Ty<'tcx>>>>,
 
-    // A set of constraints that regionck must validate. Each
-    // constraint has the form `T:'a`, meaning "some type `T` must
-    // outlive the lifetime 'a". These constraints derive from
-    // instantiated type parameters. So if you had a struct defined
-    // like
-    //
-    //     struct Foo<T:'static> { ... }
-    //
-    // then in some expression `let x = Foo { ... }` it will
-    // instantiate the type parameter `T` with a fresh type `$0`. At
-    // the same time, it will record a region obligation of
-    // `$0:'static`. This will get checked later by regionck. (We
-    // can't generally check these things right away because we have
-    // to wait until types are resolved.)
-    //
-    // These are stored in a map keyed to the id of the innermost
-    // enclosing fn body / static initializer expression. This is
-    // because the location where the obligation was incurred can be
-    // relevant with respect to which sublifetime assumptions are in
-    // place. The reason that we store under the fn-id, and not
-    // something more fine-grained, is so that it is easier for
-    // regionck to be sure that it has found *all* the region
-    // obligations (otherwise, it's easy to fail to walk to a
-    // particular node-id).
-    region_obligations: RefCell<NodeMap<Vec<RegionObligation<'tcx>>>>,
-
     // Tracks trait obligations incurred during this function body.
     fulfillment_cx: RefCell<traits::FulfillmentContext<'tcx>>,
 }
 
-struct RegionObligation<'tcx> {
-    sub_region: ty::Region,
-    sup_type: Ty<'tcx>,
-    origin: infer::SubregionOrigin<'tcx>,
-}
-
 /// When type-checking an expression, we propagate downward
 /// whatever type hint we are able in the form of an `Expectation`.
 enum Expectation<'tcx> {
@@ -212,35 +180,33 @@ enum Expectation<'tcx> {
 
 impl<'tcx> Copy for Expectation<'tcx> {}
 
-#[deriving(Clone)]
-pub struct FnStyleState {
+#[deriving(Copy, Clone)]
+pub struct UnsafetyState {
     pub def: ast::NodeId,
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     from_fn: bool
 }
 
-impl Copy for FnStyleState {}
-
-impl FnStyleState {
-    pub fn function(fn_style: ast::FnStyle, def: ast::NodeId) -> FnStyleState {
-        FnStyleState { def: def, fn_style: fn_style, from_fn: true }
+impl UnsafetyState {
+    pub fn function(unsafety: ast::Unsafety, def: ast::NodeId) -> UnsafetyState {
+        UnsafetyState { def: def, unsafety: unsafety, from_fn: true }
     }
 
-    pub fn recurse(&mut self, blk: &ast::Block) -> FnStyleState {
-        match self.fn_style {
+    pub fn recurse(&mut self, blk: &ast::Block) -> UnsafetyState {
+        match self.unsafety {
             // If this unsafe, then if the outer function was already marked as
             // unsafe we shouldn't attribute the unsafe'ness to the block. This
             // way the block can be warned about instead of ignoring this
             // extraneous block (functions are never warned about).
-            ast::UnsafeFn if self.from_fn => *self,
+            ast::Unsafety::Unsafe if self.from_fn => *self,
 
-            fn_style => {
-                let (fn_style, def) = match blk.rules {
-                    ast::UnsafeBlock(..) => (ast::UnsafeFn, blk.id),
-                    ast::DefaultBlock => (fn_style, self.def),
+            unsafety => {
+                let (unsafety, def) = match blk.rules {
+                    ast::UnsafeBlock(..) => (ast::Unsafety::Unsafe, blk.id),
+                    ast::DefaultBlock => (unsafety, self.def),
                 };
-                FnStyleState{ def: def,
-                             fn_style: fn_style,
+                UnsafetyState{ def: def,
+                             unsafety: unsafety,
                              from_fn: false }
             }
         }
@@ -272,7 +238,7 @@ pub struct FnCtxt<'a, 'tcx: 'a> {
 
     ret_ty: ty::FnOutput<'tcx>,
 
-    ps: RefCell<FnStyleState>,
+    ps: RefCell<UnsafetyState>,
 
     inh: &'a Inherited<'a, 'tcx>,
 
@@ -328,7 +294,6 @@ fn new(tcx: &'a ty::ctxt<'tcx>,
             upvar_borrow_map: RefCell::new(FnvHashMap::new()),
             unboxed_closures: RefCell::new(DefIdMap::new()),
             fn_sig_map: RefCell::new(NodeMap::new()),
-            region_obligations: RefCell::new(NodeMap::new()),
             fulfillment_cx: RefCell::new(traits::FulfillmentContext::new()),
         }
     }
@@ -345,7 +310,7 @@ pub fn blank_fn_ctxt<'a, 'tcx>(ccx: &'a CrateCtxt<'a, 'tcx>,
         writeback_errors: Cell::new(false),
         err_count_on_creation: ccx.tcx.sess.err_count(),
         ret_ty: rty,
-        ps: RefCell::new(FnStyleState::function(ast::NormalFn, 0)),
+        ps: RefCell::new(UnsafetyState::function(ast::Unsafety::Normal, 0)),
         inh: inh,
         ccx: ccx
     }
@@ -407,7 +372,7 @@ fn check_bare_fn<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
     match fty.sty {
         ty::ty_bare_fn(ref fn_ty) => {
             let inh = Inherited::new(ccx.tcx, param_env);
-            let fcx = check_fn(ccx, fn_ty.fn_style, id, &fn_ty.sig,
+            let fcx = check_fn(ccx, fn_ty.unsafety, id, &fn_ty.sig,
                                decl, id, body, &inh);
 
             vtable::select_all_fcx_obligations_or_error(&fcx);
@@ -509,8 +474,8 @@ fn visit_item(&mut self, _: &ast::Item) { }
 /// * ...
 /// * inherited: other fields inherited from the enclosing fn (if any)
 fn check_fn<'a, 'tcx>(ccx: &'a CrateCtxt<'a, 'tcx>,
-                      fn_style: ast::FnStyle,
-                      fn_style_id: ast::NodeId,
+                      unsafety: ast::Unsafety,
+                      unsafety_id: ast::NodeId,
                       fn_sig: &ty::FnSig<'tcx>,
                       decl: &ast::FnDecl,
                       fn_id: ast::NodeId,
@@ -539,7 +504,7 @@ fn check_fn<'a, 'tcx>(ccx: &'a CrateCtxt<'a, 'tcx>,
         writeback_errors: Cell::new(false),
         err_count_on_creation: err_count_on_creation,
         ret_ty: ret_ty,
-        ps: RefCell::new(FnStyleState::function(fn_style, fn_style_id)),
+        ps: RefCell::new(UnsafetyState::function(unsafety, unsafety_id)),
         inh: inherited,
         ccx: ccx
     };
@@ -630,7 +595,7 @@ pub fn check_item(ccx: &CrateCtxt, it: &ast::Item) {
         let param_env = ParameterEnvironment::for_item(ccx.tcx, it.id);
         check_bare_fn(ccx, &**decl, &**body, it.id, fn_pty.ty, param_env);
       }
-      ast::ItemImpl(_, ref opt_trait_ref, _, ref impl_items) => {
+      ast::ItemImpl(_, _, ref opt_trait_ref, _, ref impl_items) => {
         debug!("ItemImpl {} with id {}", token::get_ident(it.ident), it.id);
 
         let impl_pty = ty::lookup_item_type(ccx.tcx, ast_util::local_def(it.id));
@@ -660,7 +625,7 @@ pub fn check_item(ccx: &CrateCtxt, it: &ast::Item) {
         }
 
       }
-      ast::ItemTrait(_, _, _, ref trait_methods) => {
+      ast::ItemTrait(_, _, _, _, ref trait_methods) => {
         let trait_def = ty::lookup_trait_def(ccx.tcx, local_def(it.id));
         for trait_method in trait_methods.iter() {
             match *trait_method {
@@ -1585,9 +1550,9 @@ fn associated_type_binding(&self,
                                _: Option<Ty<'tcx>>,
                                _: ast::DefId,
                                _: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         self.tcx().sess.span_err(span, "unsupported associated type binding");
-        ty::mk_err()
+        Some(ty::mk_err())
     }
 }
 
@@ -1762,8 +1727,10 @@ fn register_unsize_obligations(&self,
 
                 // If the type is `Foo+'a`, ensures that the type
                 // being cast to `Foo+'a` outlives `'a`:
-                let origin = infer::RelateObjectBound(span);
-                self.register_region_obligation(origin, self_ty, ty_trait.bounds.region_bound);
+                let cause = traits::ObligationCause { span: span,
+                                                      body_id: self.body_id,
+                                                      code: traits::ObjectCastObligation(self_ty) };
+                self.register_region_obligation(self_ty, ty_trait.bounds.region_bound, cause);
             }
         }
     }
@@ -1790,8 +1757,8 @@ pub fn instantiate_type(&self,
         self.add_obligations_for_parameters(
             traits::ObligationCause::new(
                 span,
+                self.body_id,
                 traits::ItemObligation(def_id)),
-            &substs,
             &bounds);
         let monotype =
             polytype.ty.subst(self.tcx(), &substs);
@@ -1815,14 +1782,10 @@ pub fn require_type_meets(&self,
                               code: traits::ObligationCauseCode<'tcx>,
                               bound: ty::BuiltinBound)
     {
-        let obligation = traits::obligation_for_builtin_bound(
-            self.tcx(),
-            traits::ObligationCause::new(span, code),
+        self.register_builtin_bound(
             ty,
-            bound);
-        if let Ok(ob) = obligation {
-            self.register_obligation(ob);
-        }
+            bound,
+            traits::ObligationCause::new(span, self.body_id, code));
     }
 
     pub fn require_type_is_sized(&self,
@@ -1840,15 +1803,24 @@ pub fn require_expr_have_sized_type(&self,
         self.require_type_is_sized(self.expr_ty(expr), expr.span, code);
     }
 
-    pub fn register_obligation(&self,
-                               obligation: traits::Obligation<'tcx>)
+    pub fn register_builtin_bound(&self,
+                                  ty: Ty<'tcx>,
+                                  builtin_bound: ty::BuiltinBound,
+                                  cause: traits::ObligationCause<'tcx>)
     {
-        debug!("register_obligation({})",
+        self.inh.fulfillment_cx.borrow_mut()
+            .register_builtin_bound(self.tcx(), ty, builtin_bound, cause);
+    }
+
+    pub fn register_predicate(&self,
+                              obligation: traits::PredicateObligation<'tcx>)
+    {
+        debug!("register_predicate({})",
                obligation.repr(self.tcx()));
 
         self.inh.fulfillment_cx
             .borrow_mut()
-            .register_obligation(self.tcx(), obligation);
+            .register_predicate(self.tcx(), obligation);
     }
 
     pub fn to_ty(&self, ast_t: &ast::Ty) -> Ty<'tcx> {
@@ -1911,9 +1883,11 @@ pub fn item_substs<'a>(&'a self) -> Ref<'a, NodeMap<ty::ItemSubsts<'tcx>>> {
         self.inh.item_substs.borrow()
     }
 
-    pub fn opt_node_ty_substs(&self,
-                              id: ast::NodeId,
-                              f: |&ty::ItemSubsts<'tcx>|) {
+    pub fn opt_node_ty_substs<F>(&self,
+                                 id: ast::NodeId,
+                                 f: F) where
+        F: FnOnce(&ty::ItemSubsts<'tcx>),
+    {
         match self.inh.item_substs.borrow().get(&id) {
             Some(s) => { f(s) }
             None => { }
@@ -1964,11 +1938,13 @@ pub fn mk_subr(&self,
         infer::mk_subr(self.infcx(), origin, sub, sup)
     }
 
-    pub fn type_error_message(&self,
-                              sp: Span,
-                              mk_msg: |String| -> String,
-                              actual_ty: Ty<'tcx>,
-                              err: Option<&ty::type_err<'tcx>>) {
+    pub fn type_error_message<M>(&self,
+                                 sp: Span,
+                                 mk_msg: M,
+                                 actual_ty: Ty<'tcx>,
+                                 err: Option<&ty::type_err<'tcx>>) where
+        M: FnOnce(String) -> String,
+    {
         self.infcx().type_error_message(sp, mk_msg, actual_ty, err);
     }
 
@@ -1983,19 +1959,12 @@ pub fn report_mismatched_types(&self,
     /// Registers an obligation for checking later, during regionck, that the type `ty` must
     /// outlive the region `r`.
     pub fn register_region_obligation(&self,
-                                      origin: infer::SubregionOrigin<'tcx>,
                                       ty: Ty<'tcx>,
-                                      r: ty::Region)
+                                      region: ty::Region,
+                                      cause: traits::ObligationCause<'tcx>)
     {
-        let mut region_obligations = self.inh.region_obligations.borrow_mut();
-        let region_obligation = RegionObligation { sub_region: r,
-                                                   sup_type: ty,
-                                                   origin: origin };
-
-        match region_obligations.entry(self.body_id) {
-            Vacant(entry) => { entry.set(vec![region_obligation]); },
-            Occupied(mut entry) => { entry.get_mut().push(region_obligation); },
-        }
+        let mut fulfillment_cx = self.inh.fulfillment_cx.borrow_mut();
+        fulfillment_cx.register_region_obligation(self.tcx(), ty, region, cause);
     }
 
     pub fn add_default_region_param_bounds(&self,
@@ -2004,8 +1973,9 @@ pub fn add_default_region_param_bounds(&self,
     {
         for &ty in substs.types.iter() {
             let default_bound = ty::ReScope(CodeExtent::from_node_id(expr.id));
-            let origin = infer::RelateDefaultParamBound(expr.span, ty);
-            self.register_region_obligation(origin, ty, default_bound);
+            let cause = traits::ObligationCause::new(expr.span, self.body_id,
+                                                     traits::MiscObligation);
+            self.register_region_obligation(ty, default_bound, cause);
         }
     }
 
@@ -2029,90 +1999,18 @@ pub fn add_default_region_param_bounds(&self,
     /// and `T`. This routine will add a region obligation `$1:'$0` and register it locally.
     pub fn add_obligations_for_parameters(&self,
                                           cause: traits::ObligationCause<'tcx>,
-                                          substs: &Substs<'tcx>,
                                           generic_bounds: &ty::GenericBounds<'tcx>)
     {
         assert!(!generic_bounds.has_escaping_regions());
 
-        debug!("add_obligations_for_parameters(substs={}, generic_bounds={})",
-               substs.repr(self.tcx()),
+        debug!("add_obligations_for_parameters(generic_bounds={})",
                generic_bounds.repr(self.tcx()));
 
-        self.add_trait_obligations_for_generics(cause, substs, generic_bounds);
-        self.add_region_obligations_for_generics(cause, substs, generic_bounds);
-    }
-
-    fn add_trait_obligations_for_generics(&self,
-                                          cause: traits::ObligationCause<'tcx>,
-                                          substs: &Substs<'tcx>,
-                                          generic_bounds: &ty::GenericBounds<'tcx>) {
-        assert!(!generic_bounds.has_escaping_regions());
-        assert!(!substs.has_regions_escaping_depth(0));
-
-        let obligations =
-            traits::obligations_for_generics(self.tcx(),
-                                             cause,
-                                             generic_bounds,
-                                             &substs.types);
-        obligations.map_move(|o| self.register_obligation(o));
-    }
-
-    fn add_region_obligations_for_generics(&self,
-                                           cause: traits::ObligationCause<'tcx>,
-                                           substs: &Substs<'tcx>,
-                                           generic_bounds: &ty::GenericBounds<'tcx>)
-    {
-        assert!(!generic_bounds.has_escaping_regions());
-        assert_eq!(generic_bounds.types.iter().len(), substs.types.iter().len());
-
-        for (type_bounds, &type_param) in
-            generic_bounds.types.iter().zip(
-                substs.types.iter())
-        {
-            self.add_region_obligations_for_type_parameter(
-                cause.span, type_bounds, type_param);
-        }
-
-        assert_eq!(generic_bounds.regions.iter().len(),
-                   substs.regions().iter().len());
-        for (region_bounds, &region_param) in
-            generic_bounds.regions.iter().zip(
-                substs.regions().iter())
-        {
-            self.add_region_obligations_for_region_parameter(
-                cause.span, region_bounds.as_slice(), region_param);
-        }
-    }
+        let obligations = traits::predicates_for_generics(self.tcx(),
+                                                          cause,
+                                                          generic_bounds);
 
-    fn add_region_obligations_for_type_parameter(&self,
-                                                 span: Span,
-                                                 param_bound: &ty::ParamBounds<'tcx>,
-                                                 ty: Ty<'tcx>)
-    {
-        // For each declared region bound `T:r`, `T` must outlive `r`.
-        let region_bounds =
-            ty::required_region_bounds(
-                self.tcx(),
-                param_bound.region_bounds.as_slice(),
-                param_bound.builtin_bounds,
-                param_bound.trait_bounds.as_slice());
-        for &r in region_bounds.iter() {
-            let origin = infer::RelateParamBound(span, ty);
-            self.register_region_obligation(origin, ty, r);
-        }
-    }
-
-    fn add_region_obligations_for_region_parameter(&self,
-                                                   span: Span,
-                                                   region_bounds: &[ty::Region],
-                                                   region_param: ty::Region)
-    {
-        for &b in region_bounds.iter() {
-            // For each bound `region:b`, `b <= region` must hold
-            // (i.e., `region` must outlive `b`).
-            let origin = infer::RelateRegionParamBound(span);
-            self.mk_subr(origin, b, region_param);
-        }
+        obligations.map_move(|o| self.register_predicate(o));
     }
 }
 
@@ -2129,12 +2027,14 @@ impl Copy for LvaluePreference {}
 ///
 /// Note: this method does not modify the adjustments table. The caller is responsible for
 /// inserting an AutoAdjustment record into the `fcx` using one of the suitable methods.
-pub fn autoderef<'a, 'tcx, T>(fcx: &FnCtxt<'a, 'tcx>, sp: Span,
-                              base_ty: Ty<'tcx>,
-                              expr_id: Option<ast::NodeId>,
-                              mut lvalue_pref: LvaluePreference,
-                              should_stop: |Ty<'tcx>, uint| -> Option<T>)
-                              -> (Ty<'tcx>, uint, Option<T>) {
+pub fn autoderef<'a, 'tcx, T, F>(fcx: &FnCtxt<'a, 'tcx>, sp: Span,
+                                 base_ty: Ty<'tcx>,
+                                 expr_id: Option<ast::NodeId>,
+                                 mut lvalue_pref: LvaluePreference,
+                                 mut should_stop: F)
+                                 -> (Ty<'tcx>, uint, Option<T>) where
+    F: FnMut(Ty<'tcx>, uint) -> Option<T>,
+{
     let mut t = base_ty;
     for autoderefs in range(0, fcx.tcx().sess.recursion_limit.get()) {
         let resolved_t = structurally_resolved_type(fcx, sp, t);
@@ -2220,14 +2120,6 @@ fn try_overloaded_call<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
         fcx.inh.method_map.borrow_mut().insert(method_call, method_callee);
         write_call(fcx, call_expression, output_type);
 
-        if !fcx.tcx().sess.features.borrow().unboxed_closures {
-            span_err!(fcx.tcx().sess, call_expression.span, E0056,
-                "overloaded calls are experimental");
-            span_help!(fcx.tcx().sess, call_expression.span,
-                "add `#![feature(unboxed_closures)]` to \
-                the crate attributes to enable");
-        }
-
         return true
     }
 
@@ -2296,12 +2188,13 @@ fn make_overloaded_lvalue_return_type<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
     }
 }
 
-fn autoderef_for_index<'a, 'tcx, T>(fcx: &FnCtxt<'a, 'tcx>,
-                                    base_expr: &ast::Expr,
-                                    base_ty: Ty<'tcx>,
-                                    lvalue_pref: LvaluePreference,
-                                    step: |Ty<'tcx>, ty::AutoDerefRef<'tcx>| -> Option<T>)
-                                    -> Option<T>
+fn autoderef_for_index<'a, 'tcx, T, F>(fcx: &FnCtxt<'a, 'tcx>,
+                                       base_expr: &ast::Expr,
+                                       base_ty: Ty<'tcx>,
+                                       lvalue_pref: LvaluePreference,
+                                       mut step: F)
+                                       -> Option<T> where
+    F: FnMut(Ty<'tcx>, ty::AutoDerefRef<'tcx>) -> Option<T>,
 {
     // FIXME(#18741) -- this is almost but not quite the same as the
     // autoderef that normal method probing does. They could likely be
@@ -2763,7 +2656,7 @@ fn check_argument_types<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
         };
         for (i, arg) in args.iter().take(t).enumerate() {
             let is_block = match arg.node {
-                ast::ExprClosure(..) | ast::ExprProc(..) => true,
+                ast::ExprClosure(..) => true,
                 _ => false
             };
 
@@ -3040,11 +2933,12 @@ enum TupleArgumentsFlag {
 /// Note that inspecting a type's structure *directly* may expose the fact
 /// that there are actually multiple representations for `ty_err`, so avoid
 /// that when err needs to be handled differently.
-fn check_expr_with_unifier<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
-                                     expr: &ast::Expr,
-                                     expected: Expectation<'tcx>,
-                                     lvalue_pref: LvaluePreference,
-                                     unifier: ||)
+fn check_expr_with_unifier<'a, 'tcx, F>(fcx: &FnCtxt<'a, 'tcx>,
+                                        expr: &ast::Expr,
+                                        expected: Expectation<'tcx>,
+                                        lvalue_pref: LvaluePreference,
+                                        unifier: F) where
+    F: FnOnce(),
 {
     debug!(">> typechecking: expr={} expected={}",
            expr.repr(fcx.tcx()), expected.repr(fcx.tcx()));
@@ -3219,14 +3113,16 @@ fn check_then_else<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
         fcx.write_ty(id, if_ty);
     }
 
-    fn lookup_op_method<'a, 'tcx>(fcx: &'a FnCtxt<'a, 'tcx>,
-                                  op_ex: &ast::Expr,
-                                  lhs_ty: Ty<'tcx>,
-                                  opname: ast::Name,
-                                  trait_did: Option<ast::DefId>,
-                                  lhs: &'a ast::Expr,
-                                  rhs: Option<&P<ast::Expr>>,
-                                  unbound_method: ||) -> Ty<'tcx> {
+    fn lookup_op_method<'a, 'tcx, F>(fcx: &'a FnCtxt<'a, 'tcx>,
+                                     op_ex: &ast::Expr,
+                                     lhs_ty: Ty<'tcx>,
+                                     opname: ast::Name,
+                                     trait_did: Option<ast::DefId>,
+                                     lhs: &'a ast::Expr,
+                                     rhs: Option<&P<ast::Expr>>,
+                                     unbound_method: F) -> Ty<'tcx> where
+        F: FnOnce(),
+    {
         let method = match trait_did {
             Some(trait_did) => {
                 // We do eager coercions to make using operators
@@ -4065,6 +3961,9 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
         let typ = lookup_method_for_for_loop(fcx, &**head, expr.id);
         vtable::select_new_fcx_obligations(fcx);
 
+        debug!("ExprForLoop each item has type {}",
+               fcx.infcx().resolve_type_vars_if_possible(typ).repr(fcx.tcx()));
+
         let pcx = pat_ctxt {
             fcx: fcx,
             map: pat_id_map(&tcx.def_map, &**pat),
@@ -4088,14 +3987,6 @@ fn check_struct_fields_on_error(fcx: &FnCtxt,
       ast::ExprClosure(_, opt_kind, ref decl, ref body) => {
           closure::check_expr_closure(fcx, expr, opt_kind, &**decl, &**body, expected);
       }
-      ast::ExprProc(ref decl, ref body) => {
-          closure::check_boxed_closure(fcx,
-                                       expr,
-                                       ty::UniqTraitStore,
-                                       &**decl,
-                                       &**body,
-                                       expected);
-      }
       ast::ExprBlock(ref b) => {
         check_block_with_expected(fcx, &**b, expected);
         fcx.write_ty(id, fcx.node_ty(b.id));
@@ -4475,19 +4366,17 @@ fn resolve<'a>(self, fcx: &FnCtxt<'a, 'tcx>) -> Expectation<'tcx> {
         }
     }
 
-    fn map<'a>(self, fcx: &FnCtxt<'a, 'tcx>,
-               unpack: |&ty::sty<'tcx>| -> Expectation<'tcx>)
-               -> Expectation<'tcx> {
+    fn map<'a, F>(self, fcx: &FnCtxt<'a, 'tcx>, unpack: F) -> Expectation<'tcx> where
+        F: FnOnce(&ty::sty<'tcx>) -> Expectation<'tcx>
+    {
         match self.resolve(fcx) {
             NoExpectation => NoExpectation,
             ExpectCastableToType(t) | ExpectHasType(t) => unpack(&t.sty),
         }
     }
 
-    fn map_to_option<'a, O>(self,
-                            fcx: &FnCtxt<'a, 'tcx>,
-                            unpack: |&ty::sty<'tcx>| -> Option<O>)
-                            -> Option<O>
+    fn map_to_option<'a, O, F>(self, fcx: &FnCtxt<'a, 'tcx>, unpack: F) -> Option<O> where
+        F: FnOnce(&ty::sty<'tcx>) -> Option<O>,
     {
         match self.resolve(fcx) {
             NoExpectation => None,
@@ -4602,8 +4491,8 @@ fn check_block_with_expected<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                                        expected: Expectation<'tcx>) {
     let prev = {
         let mut fcx_ps = fcx.ps.borrow_mut();
-        let fn_style_state = fcx_ps.recurse(blk);
-        replace(&mut *fcx_ps, fn_style_state)
+        let unsafety_state = fcx_ps.recurse(blk);
+        replace(&mut *fcx_ps, unsafety_state)
     };
 
     let mut warned = false;
@@ -5197,8 +5086,7 @@ pub fn instantiate_path<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
     debug!("after late-bounds have been replaced: bounds={}", bounds.repr(fcx.tcx()));
 
     fcx.add_obligations_for_parameters(
-        traits::ObligationCause::new(span, traits::ItemObligation(def.def_id())),
-        &substs,
+        traits::ObligationCause::new(span, fcx.body_id, traits::ItemObligation(def.def_id())),
         &bounds);
 
     // Substitute the values for the type parameters into the type of
@@ -5253,6 +5141,9 @@ fn push_explicit_parameters_from_segment_to_substs<'a, 'tcx>(
             }
 
             ast::ParenthesizedParameters(ref data) => {
+                fcx.tcx().sess.span_err(
+                    span,
+                    "parenthesized parameters may only be used with a trait");
                 push_explicit_parenthesized_parameters_from_segment_to_substs(
                     fcx, space, span, type_defs, data, substs);
             }
@@ -5281,10 +5172,18 @@ fn push_explicit_angle_bracketed_parameters_from_segment_to_substs<'a, 'tcx>(
                          found {} parameter(s)",
                          type_count, data.types.len());
                     substs.types.truncate(space, 0);
+                    break;
                 }
             }
         }
 
+        if data.bindings.len() > 0 {
+            span_err!(fcx.tcx().sess, data.bindings[0].span, E0182,
+                      "unexpected binding of associated item in expression path \
+                       (only allowed in type paths)");
+            substs.types.truncate(subst::ParamSpace::AssocSpace, 0);
+        }
+
         {
             let region_count = region_defs.len(space);
             assert_eq!(substs.regions().len(space), 0);
@@ -5299,6 +5198,7 @@ fn push_explicit_angle_bracketed_parameters_from_segment_to_substs<'a, 'tcx>(
                         region_count,
                         data.lifetimes.len());
                     substs.mut_regions().truncate(space, 0);
+                    break;
                 }
             }
         }
@@ -5794,7 +5694,7 @@ fn param<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, n: uint) -> Ty<'tcx> {
         (n_tps, inputs, ty::FnConverging(output))
     };
     let fty = ty::mk_bare_fn(tcx, ty::BareFnTy {
-        fn_style: ast::UnsafeFn,
+        unsafety: ast::Unsafety::Unsafe,
         abi: abi::RustIntrinsic,
         sig: FnSig {
             inputs: inputs,
@@ -5823,11 +5723,3 @@ fn param<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, n: uint) -> Ty<'tcx> {
     }
 }
 
-impl<'tcx> Repr<'tcx> for RegionObligation<'tcx> {
-    fn repr(&self, tcx: &ty::ctxt<'tcx>) -> String {
-        format!("RegionObligation(sub_region={}, sup_type={}, origin={})",
-                self.sub_region.repr(tcx),
-                self.sup_type.repr(tcx),
-                self.origin.repr(tcx))
-    }
-}
index 80ee2cce4ce709e954df33a1c15ae33367e01e6c..9f75b9764ebd8581df6f83dc1d8da3d640eac2e7 100644 (file)
@@ -353,18 +353,13 @@ fn visit_fn_body(&mut self,
     fn visit_region_obligations(&mut self, node_id: ast::NodeId)
     {
         debug!("visit_region_obligations: node_id={}", node_id);
-        let region_obligations = self.fcx.inh.region_obligations.borrow();
-        match region_obligations.get(&node_id) {
-            None => { }
-            Some(vec) => {
-                for r_o in vec.iter() {
-                    debug!("visit_region_obligations: r_o={}",
-                           r_o.repr(self.tcx()));
-                    let sup_type = self.resolve_type(r_o.sup_type);
-                    type_must_outlive(self, r_o.origin.clone(),
-                                      sup_type, r_o.sub_region);
-                }
-            }
+        let fulfillment_cx = self.fcx.inh.fulfillment_cx.borrow();
+        for r_o in fulfillment_cx.region_obligations(node_id).iter() {
+            debug!("visit_region_obligations: r_o={}",
+                   r_o.repr(self.tcx()));
+            let sup_type = self.resolve_type(r_o.sup_type);
+            let origin = infer::RelateRegionParamBound(r_o.cause.span);
+            type_must_outlive(self, origin, sup_type, r_o.sub_region);
         }
     }
 
@@ -719,7 +714,6 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) {
             visit::walk_expr(rcx, expr);
         }
 
-        ast::ExprProc(_, ref body) |
         ast::ExprClosure(_, _, _, ref body) => {
             check_expr_fn_block(rcx, expr, &**body);
         }
@@ -937,17 +931,13 @@ fn ensure_free_variable_types_outlive_closure_bound(
 
             // Check that the type meets the criteria of the existential bounds:
             for builtin_bound in bounds.builtin_bounds.iter() {
-                let code = traits::ClosureCapture(var_node_id, expr.span);
-                let cause = traits::ObligationCause::new(freevar.span, code);
-                let obligation = traits::obligation_for_builtin_bound(rcx.tcx(), cause,
-                                                                      var_ty, builtin_bound);
-                if let Ok(obligation) = obligation {
-                    rcx.fcx.inh.fulfillment_cx.borrow_mut().register_obligation(rcx.tcx(),
-                                                                                obligation)
-                }
+                let code = traits::ClosureCapture(var_node_id, expr.span, builtin_bound);
+                let cause = traits::ObligationCause::new(freevar.span, rcx.fcx.body_id, code);
+                rcx.fcx.register_builtin_bound(var_ty, builtin_bound, cause);
             }
+
             type_must_outlive(
-                rcx, infer::RelateProcBound(expr.span, var_node_id, var_ty),
+                rcx, infer::FreeVariable(expr.span, var_node_id),
                 var_ty, bounds.region_bound);
         }
     }
@@ -1864,20 +1854,14 @@ fn param_must_outlive<'a, 'tcx>(rcx: &Rcx<'a, 'tcx>,
            region.repr(rcx.tcx()),
            param_ty.repr(rcx.tcx()));
 
-    // Collect all regions that `param_ty` is known to outlive into
-    // this vector:
-    let mut param_bounds;
-
     // To start, collect bounds from user:
-    let param_bound = param_env.bounds.get(param_ty.space, param_ty.idx);
-    param_bounds =
+    let mut param_bounds =
         ty::required_region_bounds(rcx.tcx(),
-                                   param_bound.region_bounds.as_slice(),
-                                   param_bound.builtin_bounds,
-                                   param_bound.trait_bounds.as_slice());
+                                   param_ty.to_ty(rcx.tcx()),
+                                   param_env.caller_bounds.predicates.as_slice().to_vec());
 
-    // Collect default bound of fn body that applies to all in scope
-    // type parameters:
+    // Add in the default bound of fn body that applies to all in
+    // scope type parameters:
     param_bounds.push(param_env.implicit_region_bound);
 
     // Finally, collect regions we scraped from the well-formedness
index 92dfd8b5f56d272842fa9cb6ce563f82ada53fd2..112ad1fb5b9b8c81e5cbdafe70b2731851d8df3c 100644 (file)
@@ -97,7 +97,9 @@ fn accumulate_from_ty(&mut self, ty: Ty<'tcx>) {
             }
 
             ty::ty_trait(ref t) => {
-                self.accumulate_from_object_ty(ty, &t.bounds)
+                let required_region_bounds =
+                    ty::object_region_bounds(self.tcx, Some(&t.principal), t.bounds.builtin_bounds);
+                self.accumulate_from_object_ty(ty, t.bounds.region_bound, required_region_bounds)
             }
 
             ty::ty_enum(def_id, ref substs) |
@@ -321,12 +323,15 @@ fn accumulate_from_closure_ty(&mut self,
             ty::UniqTraitStore => { }
         }
 
-        self.accumulate_from_object_ty(ty, &c.bounds)
+        let required_region_bounds =
+            ty::object_region_bounds(self.tcx, None, c.bounds.builtin_bounds);
+        self.accumulate_from_object_ty(ty, c.bounds.region_bound, required_region_bounds);
     }
 
     fn accumulate_from_object_ty(&mut self,
                                  ty: Ty<'tcx>,
-                                 bounds: &ty::ExistentialBounds)
+                                 region_bound: ty::Region,
+                                 required_region_bounds: Vec<ty::Region>)
     {
         // Imagine a type like this:
         //
@@ -362,17 +367,12 @@ fn accumulate_from_object_ty(&mut self,
 
         // The content of this object type must outlive
         // `bounds.region_bound`:
-        let r_c = bounds.region_bound;
+        let r_c = region_bound;
         self.push_region_constraint_from_top(r_c);
 
         // And then, in turn, to be well-formed, the
         // `region_bound` that user specified must imply the
         // region bounds required from all of the trait types:
-        let required_region_bounds =
-            ty::required_region_bounds(self.tcx,
-                                       &[],
-                                       bounds.builtin_bounds,
-                                       &[]);
         for &r_d in required_region_bounds.iter() {
             // Each of these is an instance of the `'c <= 'b`
             // constraint above
index 80363055a4bf0ea6206dc7bde15a49063dbc9bdb..415a3d53fb28448c8a5f08fb2814b6fa67a98d70 100644 (file)
 use middle::subst::{SelfSpace, FnSpace};
 use middle::traits;
 use middle::traits::{SelectionError, OutputTypeParameterMismatch, Overflow, Unimplemented};
-use middle::traits::{Obligation, obligation_for_builtin_bound};
+use middle::traits::{Obligation, ObligationCause};
 use middle::traits::{FulfillmentError, CodeSelectionError, CodeAmbiguity};
-use middle::traits::{ObligationCause};
+use middle::traits::{PredicateObligation};
 use middle::ty::{mod, Ty};
 use middle::infer;
 use std::rc::Rc;
 use syntax::ast;
 use syntax::codemap::Span;
-use util::common::ErrorReported;
 use util::ppaux::{UserString, Repr, ty_to_string};
 
 pub fn check_object_cast<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
@@ -150,14 +149,6 @@ pub fn check_object_safety<'tcx>(tcx: &ty::ctxt<'tcx>,
 fn check_object_safety_inner<'tcx>(tcx: &ty::ctxt<'tcx>,
                                  object_trait: &ty::TraitRef<'tcx>,
                                  span: Span) {
-    // Skip the fn_once lang item trait since only the compiler should call
-    // `call_once` which is the method which takes self by value. What could go
-    // wrong?
-    match tcx.lang_items.fn_once_trait() {
-        Some(def_id) if def_id == object_trait.def_id => return,
-        _ => {}
-    }
-
     let trait_items = ty::trait_items(tcx, object_trait.def_id);
 
     let mut errors = Vec::new();
@@ -249,18 +240,10 @@ pub fn register_object_cast_obligations<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                                                   -> Rc<ty::TraitRef<'tcx>>
 {
     // We can only make objects from sized types.
-    let sized_obligation =
-        traits::obligation_for_builtin_bound(
-            fcx.tcx(),
-            traits::ObligationCause::new(span, traits::ObjectSized),
-            referent_ty,
-            ty::BoundSized);
-    match sized_obligation {
-        Ok(sized_obligation) => {
-            fcx.register_obligation(sized_obligation);
-        }
-        Err(ErrorReported) => { }
-    }
+    fcx.register_builtin_bound(
+        referent_ty,
+        ty::BoundSized,
+        traits::ObligationCause::new(span, fcx.body_id, traits::ObjectSized));
 
     // This is just for better error reporting. Kinda goofy. The object type stuff
     // needs some refactoring so there is a more convenient type to pass around.
@@ -287,24 +270,20 @@ pub fn register_object_cast_obligations<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
     let object_obligation =
         Obligation::new(
             ObligationCause::new(span,
+                                 fcx.body_id,
                                  traits::ObjectCastObligation(object_trait_ty)),
-            object_trait_ref.clone());
-    fcx.register_obligation(object_obligation);
+            ty::Predicate::Trait(object_trait_ref.clone()));
+    fcx.register_predicate(object_obligation);
 
     // Create additional obligations for all the various builtin
     // bounds attached to the object cast. (In other words, if the
     // object type is Foo+Send, this would create an obligation
     // for the Send check.)
     for builtin_bound in object_trait.bounds.builtin_bounds.iter() {
-            let obligation = obligation_for_builtin_bound(
-                fcx.tcx(),
-                ObligationCause::new(span,
-                                     traits::ObjectCastObligation(object_trait_ty)),
-                referent_ty,
-                builtin_bound);
-        if let Ok(obligation) = obligation {
-            fcx.register_obligation(obligation);
-        }
+        fcx.register_builtin_bound(
+            referent_ty,
+            builtin_bound,
+            ObligationCause::new(span, fcx.body_id, traits::ObjectCastObligation(object_trait_ty)));
     }
 
     object_trait_ref
@@ -323,17 +302,6 @@ pub fn select_all_fcx_obligations_or_error(fcx: &FnCtxt) {
     }
 }
 
-fn resolve_trait_ref<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, obligation: &Obligation<'tcx>)
-                               -> (Rc<ty::TraitRef<'tcx>>, Ty<'tcx>)
-{
-    let trait_ref =
-        fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(
-            &*obligation.trait_ref);
-    let self_ty =
-        trait_ref.substs.self_ty().unwrap();
-    (Rc::new(trait_ref), self_ty)
-}
-
 pub fn report_fulfillment_errors<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                                            errors: &Vec<FulfillmentError<'tcx>>) {
     for error in errors.iter() {
@@ -354,18 +322,42 @@ pub fn report_fulfillment_error<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
 }
 
 pub fn report_selection_error<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
-                                        obligation: &Obligation<'tcx>,
+                                        obligation: &PredicateObligation<'tcx>,
                                         error: &SelectionError<'tcx>)
 {
     match *error {
         Overflow => {
-            let (trait_ref, self_ty) = resolve_trait_ref(fcx, obligation);
-            fcx.tcx().sess.span_err(
-                obligation.cause.span,
-                format!(
-                    "overflow evaluating the trait `{}` for the type `{}`",
-                    trait_ref.user_string(fcx.tcx()),
-                    self_ty.user_string(fcx.tcx())).as_slice());
+            // We could track the stack here more precisely if we wanted, I imagine.
+            match obligation.trait_ref {
+                ty::Predicate::Trait(ref trait_ref) => {
+                    let trait_ref =
+                        fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(&**trait_ref);
+                    fcx.tcx().sess.span_err(
+                        obligation.cause.span,
+                        format!(
+                            "overflow evaluating the trait `{}` for the type `{}`",
+                            trait_ref.user_string(fcx.tcx()),
+                            trait_ref.self_ty().user_string(fcx.tcx())).as_slice());
+                }
+
+                ty::Predicate::Equate(a, b) => {
+                    let a = fcx.infcx().resolve_type_vars_if_possible(a);
+                    let b = fcx.infcx().resolve_type_vars_if_possible(b);
+                    fcx.tcx().sess.span_err(
+                        obligation.cause.span,
+                        format!(
+                            "overflow checking whether the types `{}` and `{}` are equal",
+                            a.user_string(fcx.tcx()),
+                            b.user_string(fcx.tcx())).as_slice());
+                }
+
+                ty::Predicate::TypeOutlives(..) |
+                ty::Predicate::RegionOutlives(..) => {
+                    fcx.tcx().sess.span_err(
+                        obligation.cause.span,
+                        format!("overflow evaluating lifetime predicate").as_slice());
+                }
+            }
 
             let current_limit = fcx.tcx().sess.recursion_limit.get();
             let suggested_limit = current_limit * 2;
@@ -378,31 +370,63 @@ pub fn report_selection_error<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
             note_obligation_cause(fcx, obligation);
         }
         Unimplemented => {
-            let (trait_ref, self_ty) = resolve_trait_ref(fcx, obligation);
-            if !ty::type_is_error(self_ty) {
-                fcx.tcx().sess.span_err(
-                    obligation.cause.span,
-                    format!(
-                        "the trait `{}` is not implemented for the type `{}`",
-                        trait_ref.user_string(fcx.tcx()),
-                        self_ty.user_string(fcx.tcx())).as_slice());
-                note_obligation_cause(fcx, obligation);
+            match obligation.trait_ref {
+                ty::Predicate::Trait(ref trait_ref) => {
+                    let trait_ref =
+                        fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(
+                            &**trait_ref);
+                    if !ty::type_is_error(trait_ref.self_ty()) {
+                        fcx.tcx().sess.span_err(
+                            obligation.cause.span,
+                            format!(
+                                "the trait `{}` is not implemented for the type `{}`",
+                                trait_ref.user_string(fcx.tcx()),
+                                trait_ref.self_ty().user_string(fcx.tcx())).as_slice());
+                        note_obligation_cause(fcx, obligation);
+                    }
+                }
+
+                ty::Predicate::Equate(a, b) => {
+                    let a = fcx.infcx().resolve_type_vars_if_possible(a);
+                    let b = fcx.infcx().resolve_type_vars_if_possible(b);
+                    let err = infer::can_mk_eqty(fcx.infcx(), a, b).unwrap_err();
+                    fcx.tcx().sess.span_err(
+                        obligation.cause.span,
+                        format!(
+                            "mismatched types: the types `{}` and `{}` are not equal ({})",
+                            a.user_string(fcx.tcx()),
+                            b.user_string(fcx.tcx()),
+                            ty::type_err_to_str(fcx.tcx(), &err)).as_slice());
+                }
+
+                ty::Predicate::TypeOutlives(..) |
+                ty::Predicate::RegionOutlives(..) => {
+                    // these kinds of predicates turn into
+                    // constraints, and hence errors show up in region
+                    // inference.
+                    fcx.tcx().sess.span_bug(
+                        obligation.cause.span,
+                        format!("region predicate error {}",
+                                obligation.repr(fcx.tcx())).as_slice());
+                }
             }
         }
-        OutputTypeParameterMismatch(ref expected_trait_ref, ref e) => {
+        OutputTypeParameterMismatch(ref expected_trait_ref, ref actual_trait_ref, ref e) => {
             let expected_trait_ref =
                 fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(
                     &**expected_trait_ref);
-            let (trait_ref, self_ty) = resolve_trait_ref(fcx, obligation);
-            if !ty::type_is_error(self_ty) {
+            let actual_trait_ref =
+                fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(
+                    &**actual_trait_ref);
+            if !ty::type_is_error(actual_trait_ref.self_ty()) {
                 fcx.tcx().sess.span_err(
                     obligation.cause.span,
                     format!(
                         "type mismatch: the type `{}` implements the trait `{}`, \
                          but the trait `{}` is required ({})",
-                        self_ty.user_string(fcx.tcx()),
+                        expected_trait_ref.self_ty().user_string(fcx.tcx()),
                         expected_trait_ref.user_string(fcx.tcx()),
-                        trait_ref.user_string(fcx.tcx()),
+                        actual_trait_ref.user_string(fcx.tcx()),
                         ty::type_err_to_str(fcx.tcx(), e)).as_slice());
                 note_obligation_cause(fcx, obligation);
             }
@@ -411,12 +435,25 @@ pub fn report_selection_error<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
 }
 
 pub fn maybe_report_ambiguity<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
-                                        obligation: &Obligation<'tcx>) {
+                                        obligation: &PredicateObligation<'tcx>) {
     // Unable to successfully determine, probably means
     // insufficient type information, but could mean
     // ambiguous impls. The latter *ought* to be a
     // coherence violation, so we don't report it here.
-    let (trait_ref, self_ty) = resolve_trait_ref(fcx, obligation);
+
+    let trait_ref = match obligation.trait_ref {
+        ty::Predicate::Trait(ref trait_ref) => {
+            fcx.infcx().resolve_type_vars_in_trait_ref_if_possible(&**trait_ref)
+        }
+        _ => {
+            fcx.tcx().sess.span_bug(
+                obligation.cause.span,
+                format!("ambiguity from something other than a trait: {}",
+                        obligation.trait_ref.repr(fcx.tcx())).as_slice());
+        }
+    };
+    let self_ty = trait_ref.self_ty();
+
     debug!("maybe_report_ambiguity(trait_ref={}, self_ty={}, obligation={})",
            trait_ref.repr(fcx.tcx()),
            self_ty.repr(fcx.tcx()),
@@ -473,8 +510,8 @@ pub fn maybe_report_ambiguity<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
 }
 
 /// Select as many obligations as we can at present.
-pub fn select_fcx_obligations_where_possible(fcx: &FnCtxt) {
-
+pub fn select_fcx_obligations_where_possible(fcx: &FnCtxt)
+{
     match
         fcx.inh.fulfillment_cx
         .borrow_mut()
@@ -500,9 +537,8 @@ pub fn select_new_fcx_obligations(fcx: &FnCtxt) {
 }
 
 fn note_obligation_cause<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
-                                   obligation: &Obligation<'tcx>) {
+                                   obligation: &PredicateObligation<'tcx>) {
     let tcx = fcx.tcx();
-    let trait_name = ty::item_path_str(tcx, obligation.trait_ref.def_id);
     match obligation.cause.code {
         traits::MiscObligation => { }
         traits::ItemObligation(item_def_id) => {
@@ -510,17 +546,14 @@ fn note_obligation_cause<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
             tcx.sess.span_note(
                 obligation.cause.span,
                 format!(
-                    "the trait `{}` must be implemented because it is required by `{}`",
-                    trait_name,
+                    "required by `{}`",
                     item_name).as_slice());
         }
         traits::ObjectCastObligation(object_ty) => {
             tcx.sess.span_note(
                 obligation.cause.span,
                 format!(
-                    "the trait `{}` must be implemented for the cast \
-                     to the object type `{}`",
-                    trait_name,
+                    "required for the cast to the object type `{}`",
                     fcx.infcx().ty_to_string(object_ty)).as_slice());
         }
         traits::RepeatVec => {
@@ -558,7 +591,9 @@ fn note_obligation_cause<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
                        "use \"#[unsafe_destructor]\" on the implementation \
                        to force the compiler to allow this");
         }
-        traits::ClosureCapture(var_id, closure_span) => {
+        traits::ClosureCapture(var_id, closure_span, builtin_bound) => {
+            let def_id = tcx.lang_items.from_builtin_kind(builtin_bound).unwrap();
+            let trait_name = ty::item_path_str(tcx, def_id);
             let name = ty::local_var_name_str(tcx, var_id);
             span_note!(tcx.sess, closure_span,
                        "the closure that captures `{}` requires that all captured variables \"
index a011982a1fc53b2613e412ed1c2636e5c66909aa..8c82429e1c226cc4282e06bbb1a5ca001f21a7d2 100644 (file)
@@ -91,7 +91,6 @@ fn with_fcx(&mut self,
         let polytype = ty::lookup_item_type(ccx.tcx, item_def_id);
         let param_env =
             ty::construct_parameter_environment(ccx.tcx,
-                                                item.span,
                                                 &polytype.generics,
                                                 item.id);
         let inh = Inherited::new(ccx.tcx, param_env);
@@ -122,14 +121,12 @@ fn check_type_defn(&mut self,
                 // For DST, all intermediate types must be sized.
                 if variant.fields.len() > 0 {
                     for field in variant.fields.init().iter() {
-                        let cause = traits::ObligationCause::new(field.span, traits::FieldSized);
-                        let obligation = traits::obligation_for_builtin_bound(fcx.tcx(),
-                                                                              cause,
-                                                                              field.ty,
-                                                                              ty::BoundSized);
-                        if let Ok(obligation) = obligation {
-                            fcx.register_obligation(obligation);
-                        }
+                        fcx.register_builtin_bound(
+                            field.ty,
+                            ty::BoundSized,
+                            traits::ObligationCause::new(field.span,
+                                                         fcx.body_id,
+                                                         traits::FieldSized));
                     }
                 }
             }
@@ -218,33 +215,16 @@ fn check_impl(&mut self,
             // the same way as we treat the self-type.
             bounds_checker.check_trait_ref(&trait_ref);
 
-            let trait_def = ty::lookup_trait_def(fcx.tcx(), trait_ref.def_id);
-
             let cause =
                 traits::ObligationCause::new(
                     item.span,
+                    fcx.body_id,
                     traits::ItemObligation(trait_ref.def_id));
 
             // Find the supertrait bounds. This will add `int:Bar`.
-            //
-            // FIXME -- This is a bit ill-factored. There is very similar
-            // code in traits::util::obligations_for_generics.
-            fcx.add_region_obligations_for_type_parameter(item.span,
-                                                          &trait_def.bounds,
-                                                          trait_ref.self_ty());
-            for builtin_bound in trait_def.bounds.builtin_bounds.iter() {
-                let obligation = traits::obligation_for_builtin_bound(fcx.tcx(),
-                                                                      cause,
-                                                                      trait_ref.self_ty(),
-                                                                      builtin_bound);
-                if let Ok(obligation) = obligation {
-                    fcx.register_obligation(obligation);
-                }
-            }
-            for trait_bound in trait_def.bounds.trait_bounds.iter() {
-                let trait_bound = trait_bound.subst(fcx.tcx(), &trait_ref.substs);
-                fcx.register_obligation(
-                    traits::Obligation::new(cause, trait_bound));
+            let predicates = ty::predicates_for_trait_ref(fcx.tcx(), &trait_ref);
+            for predicate in predicates.into_iter() {
+                fcx.register_predicate(traits::Obligation::new(cause, predicate));
             }
         });
     }
@@ -291,8 +271,8 @@ pub fn check_trait_ref(&mut self, trait_ref: &ty::TraitRef<'tcx>) {
         self.fcx.add_obligations_for_parameters(
             traits::ObligationCause::new(
                 self.span,
+                self.fcx.body_id,
                 traits::ItemObligation(trait_ref.def_id)),
-            &trait_ref.substs,
             &bounds);
 
         for &ty in trait_ref.substs.types.iter() {
@@ -341,8 +321,8 @@ fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
                 if self.binding_count == 0 {
                     self.fcx.add_obligations_for_parameters(
                         traits::ObligationCause::new(self.span,
+                                                     self.fcx.body_id,
                                                      traits::ItemObligation(type_id)),
-                        substs,
                         &polytype.generics.to_bounds(self.tcx(), substs));
                 } else {
                     // There are two circumstances in which we ignore
@@ -367,11 +347,13 @@ fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
                     //
                     // (I believe we should do the same for traits, but
                     // that will require an RFC. -nmatsakis)
-                    self.fcx.add_trait_obligations_for_generics(
+                    let bounds = polytype.generics.to_bounds(self.tcx(), substs);
+                    let bounds = filter_to_trait_obligations(bounds);
+                    self.fcx.add_obligations_for_parameters(
                         traits::ObligationCause::new(self.span,
+                                                     self.fcx.body_id,
                                                      traits::ItemObligation(type_id)),
-                        substs,
-                        &polytype.generics.to_bounds(self.tcx(), substs));
+                        &bounds);
                 }
 
                 self.fold_substs(substs);
@@ -458,6 +440,24 @@ fn enum_variants<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
         .collect()
 }
 
+fn filter_to_trait_obligations<'tcx>(bounds: ty::GenericBounds<'tcx>)
+                                     -> ty::GenericBounds<'tcx>
+{
+    let mut result = ty::GenericBounds::empty();
+    for (space, _, predicate) in bounds.predicates.iter_enumerated() {
+        match *predicate {
+            ty::Predicate::Trait(..) => {
+                result.predicates.push(space, predicate.clone())
+            }
+            ty::Predicate::Equate(..) |
+            ty::Predicate::TypeOutlives(..) |
+            ty::Predicate::RegionOutlives(..) => {
+            }
+        }
+    }
+    result
+}
+
 ///////////////////////////////////////////////////////////////////////////
 // Special drop trait checking
 
@@ -469,14 +469,8 @@ fn check_struct_safe_for_destructor<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
     if !struct_tpt.generics.has_type_params(subst::TypeSpace)
         && !struct_tpt.generics.has_region_params(subst::TypeSpace)
     {
-        let cause = traits::ObligationCause::new(span, traits::DropTrait);
-        let obligation = traits::obligation_for_builtin_bound(fcx.tcx(),
-                                                              cause,
-                                                              self_ty,
-                                                              ty::BoundSend);
-        if let Ok(obligation) = obligation {
-            fcx.register_obligation(obligation);
-        }
+        let cause = traits::ObligationCause::new(span, fcx.body_id, traits::DropTrait);
+        fcx.register_builtin_bound(self_ty, ty::BoundSend, cause);
     } else {
         span_err!(fcx.tcx().sess, span, E0141,
                   "cannot implement a destructor on a structure \
index 48f1ef8da1d54672cc6fb4b1264f6d1aab3cbc82..8d94cf5dd5e96f1fb3e03b3d2590e81bfbf23414 100644 (file)
@@ -121,8 +121,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
                                     MethodCall::expr(e.id));
 
         match e.node {
-            ast::ExprClosure(_, _, ref decl, _) |
-            ast::ExprProc(ref decl, _) => {
+            ast::ExprClosure(_, _, ref decl, _) => {
                 for input in decl.inputs.iter() {
                     let _ = self.visit_node_id(ResolvingExpr(e.span),
                                                input.id);
index c4e1f6fe8eb180cfc5a7be8db2383d0da13778ce..a55f3c61919402a15c7d14716c77618c839da960 100644 (file)
@@ -50,6 +50,7 @@
 
 mod orphan;
 mod overlap;
+mod unsafety;
 
 fn get_base_type<'a, 'tcx>(inference_context: &InferCtxt<'a, 'tcx>,
                            span: Span,
@@ -145,7 +146,7 @@ fn visit_item(&mut self, item: &Item) {
         //debug!("(checking coherence) item '{}'", token::get_ident(item.ident));
 
         match item.node {
-            ItemImpl(_, ref opt_trait, _, _) => {
+            ItemImpl(_, _, ref opt_trait, _, _) => {
                 match opt_trait.clone() {
                     Some(opt_trait) => {
                         self.cc.check_implementation(item, &[opt_trait]);
@@ -325,7 +326,7 @@ fn get_self_type_for_implementation(&self, impl_did: DefId)
     // Converts an implementation in the AST to a vector of items.
     fn create_impl_from_item(&self, item: &Item) -> Vec<ImplOrTraitItemId> {
         match item.node {
-            ItemImpl(_, ref trait_refs, _, ref ast_items) => {
+            ItemImpl(_, _, ref trait_refs, _, ref ast_items) => {
                 let mut items: Vec<ImplOrTraitItemId> =
                         ast_items.iter()
                                  .map(|ast_item| {
@@ -562,7 +563,7 @@ fn enforce_trait_manually_implementable(tcx: &ty::ctxt, sp: Span, trait_def_id:
     } else {
         return // everything OK
     };
-    span_err!(tcx.sess, sp, E0173, "manual implementations of `{}` are experimental", trait_name);
+    span_err!(tcx.sess, sp, E0183, "manual implementations of `{}` are experimental", trait_name);
     span_help!(tcx.sess, sp,
                "add `#![feature(unboxed_closures)]` to the crate attributes to enable");
 }
@@ -620,6 +621,7 @@ pub fn check_coherence(crate_context: &CrateCtxt) {
         inference_context: new_infer_ctxt(crate_context.tcx),
         inherent_impls: RefCell::new(FnvHashMap::new()),
     }.check(crate_context.tcx.map.krate());
+    unsafety::check(crate_context.tcx);
     orphan::check(crate_context.tcx);
     overlap::check(crate_context.tcx);
 }
index dc3afaae35f615800056ddbfef49787cadf128c6..1803bf766dda1042788334c5943627bd41be46ad 100644 (file)
@@ -44,7 +44,7 @@ impl<'cx, 'tcx,'v> visit::Visitor<'v> for OrphanChecker<'cx, 'tcx> {
     fn visit_item(&mut self, item: &'v ast::Item) {
         let def_id = ast_util::local_def(item.id);
         match item.node {
-            ast::ItemImpl(_, None, _, _) => {
+            ast::ItemImpl(_, _, None, _, _) => {
                 // For inherent impls, self type must be a nominal type
                 // defined in this crate.
                 debug!("coherence2::orphan check: inherent impl {}", item.repr(self.tcx));
@@ -64,7 +64,7 @@ fn visit_item(&mut self, item: &'v ast::Item) {
                     }
                 }
             }
-            ast::ItemImpl(_, Some(_), _, _) => {
+            ast::ItemImpl(_, _, Some(_), _, _) => {
                 // "Trait" impl
                 debug!("coherence2::orphan check: trait impl {}", item.repr(self.tcx));
                 if traits::is_orphan_impl(self.tcx, def_id) {
diff --git a/src/librustc_typeck/coherence/unsafety.rs b/src/librustc_typeck/coherence/unsafety.rs
new file mode 100644 (file)
index 0000000..07a8484
--- /dev/null
@@ -0,0 +1,77 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Unsafety checker: every impl either implements a trait defined in this
+//! crate or pertains to a type defined in this crate.
+
+use middle::ty;
+use syntax::ast::{Item, ItemImpl};
+use syntax::ast;
+use syntax::ast_util;
+use syntax::visit;
+use util::ppaux::UserString;
+
+pub fn check(tcx: &ty::ctxt) {
+    let mut orphan = UnsafetyChecker { tcx: tcx };
+    visit::walk_crate(&mut orphan, tcx.map.krate());
+}
+
+struct UnsafetyChecker<'cx, 'tcx:'cx> {
+    tcx: &'cx ty::ctxt<'tcx>
+}
+
+impl<'cx, 'tcx,'v> visit::Visitor<'v> for UnsafetyChecker<'cx, 'tcx> {
+    fn visit_item(&mut self, item: &'v ast::Item) {
+        match item.node {
+            ast::ItemImpl(unsafety, _, _, _, _) => {
+                match ty::impl_trait_ref(self.tcx, ast_util::local_def(item.id)) {
+                    None => {
+                        // Inherent impl.
+                        match unsafety {
+                            ast::Unsafety::Normal => { /* OK */ }
+                            ast::Unsafety::Unsafe => {
+                                self.tcx.sess.span_err(
+                                    item.span,
+                                    "inherent impls cannot be declared as unsafe");
+                            }
+                        }
+                    }
+
+                    Some(trait_ref) => {
+                        let trait_def = ty::lookup_trait_def(self.tcx, trait_ref.def_id);
+                        match (trait_def.unsafety, unsafety) {
+                            (ast::Unsafety::Normal, ast::Unsafety::Unsafe) => {
+                                self.tcx.sess.span_err(
+                                    item.span,
+                                    format!("implementing the trait `{}` is not unsafe",
+                                            trait_ref.user_string(self.tcx)).as_slice());
+                            }
+
+                            (ast::Unsafety::Unsafe, ast::Unsafety::Normal) => {
+                                self.tcx.sess.span_err(
+                                    item.span,
+                                    format!("the trait `{}` requires an `unsafe impl` declaration",
+                                            trait_ref.user_string(self.tcx)).as_slice());
+                            }
+
+                            (ast::Unsafety::Unsafe, ast::Unsafety::Unsafe) |
+                            (ast::Unsafety::Normal, ast::Unsafety::Normal) => {
+                                /* OK */
+                            }
+                        }
+                    }
+                }
+            }
+            _ => { }
+        }
+
+        visit::walk_item(self, item);
+    }
+}
index 74ac9c480defecc280fecc9305903a370895a168..61b8e6c956cabb2244f2efc967e8dd18d3c03ccb 100644 (file)
@@ -32,7 +32,7 @@
 use self::ConvertMethodContext::*;
 use self::CreateTypeParametersForAssociatedTypesFlag::*;
 
-use astconv::{AstConv, ty_of_arg};
+use astconv::{AstConv, ty_of_arg, AllowEqConstraints};
 use astconv::{ast_ty_to_ty, ast_region_to_region};
 use astconv;
 use metadata::csearch;
@@ -197,10 +197,10 @@ fn associated_type_binding(&self,
                                _: Option<Ty<'tcx>>,
                                _: ast::DefId,
                                _: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         self.tcx().sess.span_err(span, "associated types may not be \
                                         referenced here");
-        ty::mk_err()
+        Some(ty::mk_err())
     }
 }
 
@@ -258,7 +258,7 @@ fn collect_trait_methods<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                                    trait_def: &ty::TraitDef<'tcx>) {
     let tcx = ccx.tcx;
     if let ast_map::NodeItem(item) = tcx.map.get(trait_id) {
-        if let ast::ItemTrait(_, _, _, ref trait_items) = item.node {
+        if let ast::ItemTrait(_, _, _, _, ref trait_items) = item.node {
             // For each method, construct a suitable ty::Method and
             // store it into the `tcx.impl_or_trait_items` table:
             for trait_item in trait_items.iter() {
@@ -277,7 +277,7 @@ fn collect_trait_methods<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                                     &m.explicit_self,
                                     m.abi,
                                     &m.generics,
-                                    &m.fn_style,
+                                    &m.unsafety,
                                     &*m.decl)
                             }
                             ast::ProvidedMethod(ref m) => {
@@ -291,7 +291,7 @@ fn collect_trait_methods<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                                     m.pe_explicit_self(),
                                     m.pe_abi(),
                                     m.pe_generics(),
-                                    &m.pe_fn_style(),
+                                    &m.pe_unsafety(),
                                     &*m.pe_fn_decl())
                             }
                             ast::TypeTraitItem(ref at) => {
@@ -366,7 +366,7 @@ fn ty_method_of_trait_method<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                                            m_explicit_self: &ast::ExplicitSelf,
                                            m_abi: abi::Abi,
                                            m_generics: &ast::Generics,
-                                           m_fn_style: &ast::FnStyle,
+                                           m_unsafety: &ast::Unsafety,
                                            m_decl: &ast::FnDecl)
                                            -> ty::Method<'tcx> {
         let ty_generics =
@@ -386,7 +386,7 @@ fn ty_method_of_trait_method<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
             let trait_self_ty = ty::mk_self_type(tmcx.tcx(),
                                                  local_def(trait_id));
             astconv::ty_of_method(&tmcx,
-                                  *m_fn_style,
+                                  *m_unsafety,
                                   trait_self_ty,
                                   m_explicit_self,
                                   m_decl,
@@ -572,7 +572,7 @@ fn ty_of_method<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                     method_generics: &m_ty_generics,
                 };
                 astconv::ty_of_method(&imcx,
-                                      m.pe_fn_style(),
+                                      m.pe_unsafety(),
                                       untransformed_rcvr_ty,
                                       m.pe_explicit_self(),
                                       &*m.pe_fn_decl(),
@@ -586,7 +586,7 @@ fn ty_of_method<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                     method_generics: &m_ty_generics,
                 };
                 astconv::ty_of_method(&tmcx,
-                                      m.pe_fn_style(),
+                                      m.pe_unsafety(),
                                       untransformed_rcvr_ty,
                                       m.pe_explicit_self(),
                                       &*m.pe_fn_decl(),
@@ -663,48 +663,43 @@ fn is_associated_type_valid_for_param(ty: Ty,
 
 fn find_associated_type_in_generics<'tcx>(tcx: &ty::ctxt<'tcx>,
                                           span: Span,
-                                          ty: Option<Ty<'tcx>>,
+                                          self_ty: Option<Ty<'tcx>>,
                                           associated_type_id: ast::DefId,
                                           generics: &ty::Generics<'tcx>)
-                                          -> Ty<'tcx>
+                                          -> Option<Ty<'tcx>>
 {
     debug!("find_associated_type_in_generics(ty={}, associated_type_id={}, generics={}",
-           ty.repr(tcx), associated_type_id.repr(tcx), generics.repr(tcx));
+           self_ty.repr(tcx), associated_type_id.repr(tcx), generics.repr(tcx));
 
-    let ty = match ty {
+    let self_ty = match self_ty {
         None => {
-            tcx.sess.span_bug(span,
-                              "find_associated_type_in_generics(): no self \
-                               type")
+            return None;
         }
         Some(ty) => ty,
     };
 
-    match ty.sty {
+    match self_ty.sty {
         ty::ty_param(ref param_ty) => {
-            /*let type_parameter = generics.types.get(param_ty.space,
-                                                    param_ty.idx);
-            let param_id = type_parameter.def_id;*/
             let param_id = param_ty.def_id;
             for type_parameter in generics.types.iter() {
                 if type_parameter.def_id == associated_type_id
                     && type_parameter.associated_with == Some(param_id) {
-                    return ty::mk_param_from_def(tcx, type_parameter);
+                    return Some(ty::mk_param_from_def(tcx, type_parameter));
                 }
             }
 
             tcx.sess.span_err(
                 span,
                 format!("no suitable bound on `{}`",
-                        ty.user_string(tcx))[]);
-            ty::mk_err()
+                        self_ty.user_string(tcx))[]);
+            Some(ty::mk_err())
         }
         _ => {
             tcx.sess.span_err(
                 span,
                 "it is currently unsupported to access associated types except \
                  through a type parameter; this restriction will be lifted in time");
-            ty::mk_err()
+            Some(ty::mk_err())
         }
     }
 }
@@ -762,16 +757,16 @@ fn associated_types_of_trait_are_valid(&self,
 
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
                                trait_id: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx>
+                               -> Option<Ty<'tcx>>
     {
-        let trait_def = ty::lookup_trait_def(self.tcx(), trait_id);
         match self.opt_trait_ref_id {
+            // It's an associated type on the trait that we're
+            // implementing.
             Some(trait_ref_id) if trait_ref_id == trait_id => {
-                // It's an associated type on the trait that we're
-                // implementing.
+                let trait_def = ty::lookup_trait_def(self.tcx(), trait_id);
                 assert!(trait_def.generics.types
                         .get_slice(subst::AssocSpace)
                         .iter()
@@ -782,7 +777,7 @@ fn associated_type_binding(&self,
                         ast::MethodImplItem(_) => {}
                         ast::TypeImplItem(ref typedef) => {
                             if associated_type.name() == typedef.ident.name {
-                                return self.ccx.to_ty(&ExplicitRscope, &*typedef.typ)
+                                return Some(self.ccx.to_ty(&ExplicitRscope, &*typedef.typ))
                             }
                         }
                     }
@@ -801,7 +796,7 @@ fn associated_type_binding(&self,
         // our bounds.
         find_associated_type_in_generics(self.ccx.tcx,
                                          span,
-                                         ty,
+                                         self_ty,
                                          associated_type_id,
                                          self.impl_generics)
     }
@@ -840,17 +835,17 @@ fn associated_types_of_trait_are_valid(&self,
 
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
                                _: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         debug!("collect::FnCtxt::associated_type_binding()");
 
         // The ID should map to an associated type on one of the traits in
         // our bounds.
         find_associated_type_in_generics(self.ccx.tcx,
                                          span,
-                                         ty,
+                                         self_ty,
                                          associated_type_id,
                                          self.generics)
     }
@@ -887,17 +882,17 @@ fn associated_types_of_trait_are_valid(&self,
 
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
                                _: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         debug!("collect::ImplMethodCtxt::associated_type_binding()");
 
         // The ID should map to an associated type on one of the traits in
         // our bounds.
         find_associated_type_in_generics(self.ccx.tcx,
                                          span,
-                                         ty,
+                                         self_ty,
                                          associated_type_id,
                                          self.method_generics)
     }
@@ -943,10 +938,10 @@ fn associated_types_of_trait_are_valid(&self,
 
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
                                trait_id: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         debug!("collect::TraitMethodCtxt::associated_type_binding()");
 
         // If this is one of our own associated types, return it.
@@ -957,10 +952,10 @@ fn associated_type_binding(&self,
                     ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {}
                     ast::TypeTraitItem(ref item) => {
                         if local_def(item.ty_param.id) == associated_type_id {
-                            return ty::mk_param(self.tcx(),
-                                                subst::AssocSpace,
-                                                index,
-                                                associated_type_id)
+                            return Some(ty::mk_param(self.tcx(),
+                                                     subst::AssocSpace,
+                                                     index,
+                                                     associated_type_id))
                         }
                         index += 1;
                     }
@@ -979,7 +974,7 @@ fn associated_type_binding(&self,
         // our bounds.
         find_associated_type_in_generics(self.ccx.tcx,
                                          span,
-                                         ty,
+                                         self_ty,
                                          associated_type_id,
                                          self.method_generics)
     }
@@ -1020,17 +1015,17 @@ fn associated_types_of_trait_are_valid(&self,
 
     fn associated_type_binding(&self,
                                span: Span,
-                               ty: Option<Ty<'tcx>>,
+                               self_ty: Option<Ty<'tcx>>,
                                _: ast::DefId,
                                associated_type_id: ast::DefId)
-                               -> Ty<'tcx> {
+                               -> Option<Ty<'tcx>> {
         debug!("collect::GenericsCtxt::associated_type_binding()");
 
         // The ID should map to an associated type on one of the traits in
         // our bounds.
         find_associated_type_in_generics(self.chain.tcx(),
                                          span,
-                                         ty,
+                                         self_ty,
                                          associated_type_id,
                                          self.associated_types_generics)
     }
@@ -1050,12 +1045,13 @@ pub fn convert(ccx: &CrateCtxt, it: &ast::Item) {
                                    enum_definition.variants.as_slice(),
                                    generics);
         },
-        ast::ItemImpl(ref generics,
+        ast::ItemImpl(_,
+                      ref generics,
                       ref opt_trait_ref,
                       ref selfty,
                       ref impl_items) => {
             // Create generics from the generics specified in the impl head.
-            let ty_generics = ty_generics_for_type(
+            let ty_generics = ty_generics_for_impl(
                     ccx,
                     generics,
                     CreateTypeParametersForAssociatedTypes);
@@ -1142,11 +1138,14 @@ pub fn convert(ccx: &CrateCtxt, it: &ast::Item) {
                             parent_visibility);
 
             for trait_ref in opt_trait_ref.iter() {
-                astconv::instantiate_trait_ref(&icx, &ExplicitRscope, trait_ref,
-                                               Some(selfty));
+                astconv::instantiate_trait_ref(&icx,
+                                               &ExplicitRscope,
+                                               trait_ref,
+                                               Some(selfty),
+                                               AllowEqConstraints::DontAllow);
             }
         },
-        ast::ItemTrait(_, _, _, ref trait_methods) => {
+        ast::ItemTrait(_, _, _, _, ref trait_methods) => {
             let trait_def = trait_def_of_item(ccx, it);
 
             debug!("trait_def: ident={} trait_def={}",
@@ -1337,12 +1336,13 @@ pub fn trait_def_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
         return def.clone();
     }
 
-    let (generics, unbound, bounds, items) = match it.node {
-        ast::ItemTrait(ref generics,
+    let (unsafety, generics, unbound, bounds, items) = match it.node {
+        ast::ItemTrait(unsafety,
+                       ref generics,
                        ref unbound,
                        ref supertraits,
                        ref items) => {
-            (generics, unbound, supertraits, items.as_slice())
+            (unsafety, generics, unbound, supertraits, items.as_slice())
         }
         ref s => {
             tcx.sess.span_bug(
@@ -1361,12 +1361,17 @@ pub fn trait_def_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
 
     let self_param_ty = ty::ParamTy::for_self(def_id);
 
-    let bounds = compute_bounds(ccx, token::SELF_KEYWORD_NAME, self_param_ty,
-                                bounds.as_slice(), unbound, it.span,
+    let bounds = compute_bounds(ccx,
+                                token::SELF_KEYWORD_NAME,
+                                self_param_ty,
+                                bounds.as_slice(),
+                                unbound,
+                                it.span,
                                 &generics.where_clause);
 
     let substs = mk_item_substs(ccx, &ty_generics);
     let trait_def = Rc::new(ty::TraitDef {
+        unsafety: unsafety,
         generics: ty_generics,
         bounds: bounds,
         trait_ref: Rc::new(ty::TraitRef {
@@ -1405,14 +1410,15 @@ fn mk_trait_substs<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                     .collect();
 
         // ...and also create generics synthesized from the associated types.
+        let mut index = 0;
         let assoc_types: Vec<_> =
             items.iter()
             .flat_map(|item| match *item {
                 ast::TypeTraitItem(ref trait_item) => {
-                    let index = types.len();
+                    index += 1;
                     Some(ty::mk_param(ccx.tcx,
                                       subst::AssocSpace,
-                                      index,
+                                      index - 1,
                                       local_def(trait_item.ty_param.id))).into_iter()
                 }
                 ast::RequiredMethod(_) | ast::ProvidedMethod(_) => {
@@ -1443,7 +1449,7 @@ pub fn ty_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, it: &ast::Item)
             tcx.tcache.borrow_mut().insert(local_def(it.id), pty.clone());
             return pty;
         }
-        ast::ItemFn(ref decl, fn_style, abi, ref generics, _) => {
+        ast::ItemFn(ref decl, unsafety, abi, ref generics, _) => {
             let ty_generics = ty_generics_for_fn_or_method(
                 ccx,
                 generics,
@@ -1454,7 +1460,7 @@ pub fn ty_of_item<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, it: &ast::Item)
                     ccx: ccx,
                     generics: &ty_generics,
                 };
-                astconv::ty_of_bare_fn(&fcx, fn_style, abi, &**decl)
+                astconv::ty_of_bare_fn(&fcx, unsafety, abi, &**decl)
             };
             let pty = Polytype {
                 generics: ty_generics,
@@ -1594,7 +1600,8 @@ fn ty_generics_for_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
                                    substs: &subst::Substs<'tcx>,
                                    ast_generics: &ast::Generics,
                                    items: &[ast::TraitItem])
-                                   -> ty::Generics<'tcx> {
+                                   -> ty::Generics<'tcx>
+{
     let mut generics =
         ty_generics(ccx,
                     subst::TypeSpace,
@@ -1642,7 +1649,7 @@ fn ty_generics_for_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
         bounds: ty::ParamBounds {
             region_bounds: vec!(),
             builtin_bounds: ty::empty_builtin_bounds(),
-            trait_bounds: vec!(self_trait_ref),
+            trait_bounds: vec!(self_trait_ref.clone()),
         },
         associated_with: None,
         default: None
@@ -1652,9 +1659,30 @@ fn ty_generics_for_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
 
     generics.types.push(subst::SelfSpace, def);
 
+    generics.predicates.push(subst::SelfSpace,
+                             ty::Predicate::Trait(self_trait_ref));
+
     generics
 }
 
+fn ty_generics_for_impl<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
+                                  generics: &ast::Generics,
+                                  create_type_parameters_for_associated_types:
+                                      CreateTypeParametersForAssociatedTypesFlag)
+                                  -> ty::Generics<'tcx>
+{
+    let early_lifetimes = resolve_lifetime::early_bound_lifetimes(generics);
+    debug!("ty_generics_for_impl: early_lifetimes={}",
+           early_lifetimes);
+    ty_generics(ccx,
+                subst::TypeSpace,
+                early_lifetimes.as_slice(),
+                generics.ty_params.as_slice(),
+                ty::Generics::empty(),
+                &generics.where_clause,
+                create_type_parameters_for_associated_types)
+}
+
 fn ty_generics_for_fn_or_method<'tcx,AC>(
         this: &AC,
         generics: &ast::Generics,
@@ -1786,9 +1814,13 @@ fn ty_generics<'tcx,AC>(this: &AC,
         result.types.push(space, (*associated_type_param).clone());
     }
 
+    // Just for fun, also push the bounds from the type parameters
+    // into the predicates list. This is currently kind of non-DRY.
+    create_predicates(this.tcx(), &mut result, space);
+
     return result;
 
-    fn create_type_parameters_for_associated_types<'tcx,AC>(
+    fn create_type_parameters_for_associated_types<'tcx, AC>(
         this: &AC,
         space: subst::ParamSpace,
         types: &[ast::TyParam],
@@ -1838,8 +1870,17 @@ fn create_type_parameters_for_associated_types<'tcx,AC>(
                 let trait_def = ty::lookup_trait_def(this.tcx(), trait_def_id);
                 let associated_type_defs = trait_def.generics.types.get_slice(subst::AssocSpace);
 
+                // Find any associated type bindings in the bound.
+                let ref segments = ast_trait_ref.trait_ref.path.segments;
+                let bindings = segments[segments.len() -1].parameters.bindings();
+
                 // Iterate over each associated type `Elem`
                 for associated_type_def in associated_type_defs.iter() {
+                    if bindings.iter().any(|b| associated_type_def.name.ident() == b.ident) {
+                        // Don't add a variable for a bound associated type.
+                        continue;
+                    }
+
                     // Create the fresh type parameter `A`
                     let def = ty::TypeParameterDef {
                         name: associated_type_def.name,
@@ -1863,6 +1904,27 @@ fn create_type_parameters_for_associated_types<'tcx,AC>(
             }
         }
     }
+
+    fn create_predicates<'tcx>(
+        tcx: &ty::ctxt<'tcx>,
+        result: &mut ty::Generics<'tcx>,
+        space: subst::ParamSpace)
+    {
+        for type_param_def in result.types.get_slice(space).iter() {
+            let param_ty = ty::mk_param_from_def(tcx, type_param_def);
+            for predicate in ty::predicates(tcx, param_ty, &type_param_def.bounds).into_iter() {
+                result.predicates.push(space, predicate);
+            }
+        }
+
+        for region_param_def in result.regions.get_slice(space).iter() {
+            let region = region_param_def.to_early_bound_region();
+            for &bound_region in region_param_def.bounds.iter() {
+                result.predicates.push(space, ty::Predicate::RegionOutlives(region,
+                                                                            bound_region));
+            }
+        }
+    }
 }
 
 fn get_or_create_type_parameter_def<'tcx,AC>(this: &AC,
@@ -1998,10 +2060,11 @@ fn conv_param_bounds<'tcx,AC>(this: &AC,
     let trait_bounds: Vec<Rc<ty::TraitRef>> =
         trait_bounds.into_iter()
         .map(|bound| {
-            astconv::instantiate_poly_trait_ref(this,
-                                                &ExplicitRscope,
-                                                bound,
-                                                Some(param_ty.to_ty(this.tcx())))
+            astconv::instantiate_trait_ref(this,
+                                           &ExplicitRscope,
+                                           &bound.trait_ref,
+                                           Some(param_ty.to_ty(this.tcx())),
+                                           AllowEqConstraints::Allow)
         })
         .collect();
     let region_bounds: Vec<ty::Region> =
@@ -2029,18 +2092,23 @@ fn merge_param_bounds<'a>(tcx: &ty::ctxt,
     }
 
     for predicate in where_clause.predicates.iter() {
-        let predicate_param_id =
-            tcx.def_map
-               .borrow()
-               .get(&predicate.id)
-               .expect("compute_bounds(): resolve didn't resolve the type \
-                        parameter identifier in a `where` clause")
-               .def_id();
-        if param_ty.def_id != predicate_param_id {
-            continue
-        }
-        for bound in predicate.bounds.iter() {
-            result.push(bound);
+        match predicate {
+            &ast::WherePredicate::BoundPredicate(ref bound_pred) => {
+                let predicate_param_id =
+                    tcx.def_map
+                       .borrow()
+                       .get(&bound_pred.id)
+                       .expect("merge_param_bounds(): resolve didn't resolve the \
+                                type parameter identifier in a `where` clause")
+                       .def_id();
+                if param_ty.def_id != predicate_param_id {
+                    continue
+                }
+                for bound in bound_pred.bounds.iter() {
+                    result.push(bound);
+                }
+            }
+            &ast::WherePredicate::EqPredicate(_) => panic!("not implemented")
         }
     }
 
@@ -2086,7 +2154,7 @@ pub fn ty_of_foreign_fn_decl<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
         ccx.tcx,
         ty::BareFnTy {
             abi: abi,
-            fn_style: ast::UnsafeFn,
+            unsafety: ast::Unsafety::Unsafe,
             sig: ty::FnSig {inputs: input_tys,
                             output: output,
                             variadic: decl.variadic}
@@ -2110,8 +2178,7 @@ pub fn mk_item_substs<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
 
     let regions =
         ty_generics.regions.map(
-            |def| ty::ReEarlyBound(def.def_id.node, def.space,
-                                   def.index, def.name));
+            |def| def.to_early_bound_region());
 
     subst::Substs::new(types, regions)
 }
index e026fbd05c7f039c5ca6e4fc9c83d4f7a07744de..ecd3cafd91f1617b24fa1b8d962ac1e9ac85b562 100644 (file)
     E0171,
     E0172,
     E0173, // manual implementations of unboxed closure traits are experimental
-    E0174 // explicit use of unboxed closure methods are experimental
+    E0174, // explicit use of unboxed closure methods are experimental
+    E0177,
+    E0178,
+    E0180,
+    E0181,
+    E0182,
+    E0183
 )
index 2f5b473567faa62f69e1f1b45df72fd7f9752760..d55d642f746514709a6616e3a3fb7f3bcb5164cf 100644 (file)
       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
       html_root_url = "http://doc.rust-lang.org/nightly/")]
 
-#![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
-#![feature(slicing_syntax, tuple_indexing, unsafe_destructor)]
+#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
+#![feature(slicing_syntax, unsafe_destructor)]
 #![feature(rustc_diagnostic_macros)]
+#![feature(unboxed_closures)]
 #![allow(non_camel_case_types)]
 
 #[phase(plugin, link)] extern crate log;
@@ -160,20 +161,25 @@ fn lookup_def_ccx(ccx: &CrateCtxt, sp: Span, id: ast::NodeId)
 
 fn no_params<'tcx>(t: Ty<'tcx>) -> ty::Polytype<'tcx> {
     ty::Polytype {
-        generics: ty::Generics {types: VecPerParamSpace::empty(),
-                                regions: VecPerParamSpace::empty()},
+        generics: ty::Generics {
+            types: VecPerParamSpace::empty(),
+            regions: VecPerParamSpace::empty(),
+            predicates: VecPerParamSpace::empty(),
+        },
         ty: t
     }
 }
 
-fn require_same_types<'a, 'tcx>(tcx: &ty::ctxt<'tcx>,
-                                    maybe_infcx: Option<&infer::InferCtxt<'a, 'tcx>>,
-                                    t1_is_expected: bool,
-                                    span: Span,
-                                    t1: Ty<'tcx>,
-                                    t2: Ty<'tcx>,
-                                    msg: || -> String)
-                                    -> bool {
+fn require_same_types<'a, 'tcx, M>(tcx: &ty::ctxt<'tcx>,
+                                   maybe_infcx: Option<&infer::InferCtxt<'a, 'tcx>>,
+                                   t1_is_expected: bool,
+                                   span: Span,
+                                   t1: Ty<'tcx>,
+                                   t2: Ty<'tcx>,
+                                   msg: M)
+                                   -> bool where
+    M: FnOnce() -> String,
+{
     let result = match maybe_infcx {
         None => {
             let infcx = infer::new_infer_ctxt(tcx);
@@ -220,7 +226,7 @@ fn check_main_fn_ty(ccx: &CrateCtxt,
                 _ => ()
             }
             let se_ty = ty::mk_bare_fn(tcx, ty::BareFnTy {
-                fn_style: ast::NormalFn,
+                unsafety: ast::Unsafety::Normal,
                 abi: abi::Rust,
                 sig: ty::FnSig {
                     inputs: Vec::new(),
@@ -268,7 +274,7 @@ fn check_start_fn_ty(ccx: &CrateCtxt,
             }
 
             let se_ty = ty::mk_bare_fn(tcx, ty::BareFnTy {
-                fn_style: ast::NormalFn,
+                unsafety: ast::Unsafety::Normal,
                 abi: abi::Rust,
                 sig: ty::FnSig {
                     inputs: vec!(
index 56f974ad665c6a27cfef5a721ebb136c938e5589..8fe14bae0f5bc00b7b96d2ab0ee54cfaaa80987f 100644 (file)
@@ -246,7 +246,7 @@ impl<'a> fmt::Show for VarianceTerm<'a> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
             ConstantTerm(c1) => write!(f, "{}", c1),
-            TransformTerm(v1, v2) => write!(f, "({} \u00D7 {})", v1, v2),
+            TransformTerm(v1, v2) => write!(f, "({} \u{00D7} {})", v1, v2),
             InferredTerm(id) => write!(f, "[{}]", { let InferredIndex(i) = id; i })
         }
     }
@@ -358,7 +358,7 @@ fn visit_item(&mut self, item: &ast::Item) {
         match item.node {
             ast::ItemEnum(_, ref generics) |
             ast::ItemStruct(_, ref generics) |
-            ast::ItemTrait(ref generics, _, _, _) => {
+            ast::ItemTrait(_, ref generics, _, _, _) => {
                 for (i, p) in generics.lifetimes.iter().enumerate() {
                     let id = p.lifetime.id;
                     self.add_inferred(item.id, RegionParam, TypeSpace, i, id);
index 3ee07df6ed447d38336a711143678a98f7768382..a7d7c5207550b88a552acf65d6becfab7fe2bfe0 100644 (file)
@@ -161,6 +161,7 @@ pub fn build_external_trait(cx: &DocContext, tcx: &ty::ctxt,
     let trait_def = ty::lookup_trait_def(tcx, did);
     let (bounds, default_unbound) = trait_def.bounds.clean(cx);
     clean::Trait {
+        unsafety: def.unsafety,
         generics: (&def.generics, subst::TypeSpace).clean(cx),
         items: items.collect(),
         bounds: bounds,
@@ -171,13 +172,13 @@ pub fn build_external_trait(cx: &DocContext, tcx: &ty::ctxt,
 fn build_external_function(cx: &DocContext, tcx: &ty::ctxt, did: ast::DefId) -> clean::Function {
     let t = ty::lookup_item_type(tcx, did);
     let (decl, style) = match t.ty.sty {
-        ty::ty_bare_fn(ref f) => ((did, &f.sig).clean(cx), f.fn_style),
+        ty::ty_bare_fn(ref f) => ((did, &f.sig).clean(cx), f.unsafety),
         _ => panic!("bad function"),
     };
     clean::Function {
         decl: decl,
         generics: (&t.generics, subst::FnSpace).clean(cx),
-        fn_style: style,
+        unsafety: style,
     }
 }
 
@@ -299,10 +300,10 @@ fn build_impl(cx: &DocContext, tcx: &ty::ctxt,
                 let mut item = method.clean(cx);
                 item.inner = match item.inner.clone() {
                     clean::TyMethodItem(clean::TyMethod {
-                        fn_style, decl, self_, generics
+                        unsafety, decl, self_, generics
                     }) => {
                         clean::MethodItem(clean::Method {
-                            fn_style: fn_style,
+                            unsafety: unsafety,
                             decl: decl,
                             self_: self_,
                             generics: generics,
index df7b922bd1abc31a4884633a13d4e6c433affb4a..92184ce93deeca2188f40ec2ac1dcfc49fbf720b 100644 (file)
@@ -693,9 +693,16 @@ pub struct WherePredicate {
 
 impl Clean<WherePredicate> for ast::WherePredicate {
     fn clean(&self, cx: &DocContext) -> WherePredicate {
-        WherePredicate {
-            name: self.ident.clean(cx),
-            bounds: self.bounds.clean(cx)
+        match *self {
+            ast::WherePredicate::BoundPredicate(ref wbp) => {
+                WherePredicate {
+                    name: wbp.ident.clean(cx),
+                    bounds: wbp.bounds.clean(cx)
+                }
+            }
+            ast::WherePredicate::EqPredicate(_) => {
+                unimplemented!();
+            }
         }
     }
 }
@@ -733,7 +740,7 @@ fn clean(&self, cx: &DocContext) -> Generics {
 pub struct Method {
     pub generics: Generics,
     pub self_: SelfTy,
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub decl: FnDecl,
 }
 
@@ -761,7 +768,7 @@ fn clean(&self, cx: &DocContext) -> Item {
             inner: MethodItem(Method {
                 generics: self.pe_generics().clean(cx),
                 self_: self.pe_explicit_self().node.clean(cx),
-                fn_style: self.pe_fn_style().clone(),
+                unsafety: self.pe_unsafety().clone(),
                 decl: decl,
             }),
         }
@@ -770,7 +777,7 @@ fn clean(&self, cx: &DocContext) -> Item {
 
 #[deriving(Clone, Encodable, Decodable)]
 pub struct TyMethod {
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub decl: FnDecl,
     pub generics: Generics,
     pub self_: SelfTy,
@@ -797,7 +804,7 @@ fn clean(&self, cx: &DocContext) -> Item {
             visibility: None,
             stability: get_stability(cx, ast_util::local_def(self.id)),
             inner: TyMethodItem(TyMethod {
-                fn_style: self.fn_style.clone(),
+                unsafety: self.unsafety.clone(),
                 decl: decl,
                 self_: self.explicit_self.node.clean(cx),
                 generics: self.generics.clean(cx),
@@ -831,7 +838,7 @@ fn clean(&self, cx: &DocContext) -> SelfTy {
 pub struct Function {
     pub decl: FnDecl,
     pub generics: Generics,
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
 }
 
 impl Clean<Item> for doctree::Function {
@@ -846,7 +853,7 @@ fn clean(&self, cx: &DocContext) -> Item {
             inner: FunctionItem(Function {
                 decl: self.decl.clean(cx),
                 generics: self.generics.clean(cx),
-                fn_style: self.fn_style,
+                unsafety: self.unsafety,
             }),
         }
     }
@@ -857,7 +864,7 @@ pub struct ClosureDecl {
     pub lifetimes: Vec<Lifetime>,
     pub decl: FnDecl,
     pub onceness: ast::Onceness,
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub bounds: Vec<TyParamBound>,
 }
 
@@ -867,7 +874,7 @@ fn clean(&self, cx: &DocContext) -> ClosureDecl {
             lifetimes: self.lifetimes.clean(cx),
             decl: self.decl.clean(cx),
             onceness: self.onceness,
-            fn_style: self.fn_style,
+            unsafety: self.unsafety,
             bounds: self.bounds.clean(cx)
         }
     }
@@ -967,6 +974,7 @@ fn clean(&self, cx: &DocContext) -> FunctionRetTy {
 
 #[deriving(Clone, Encodable, Decodable)]
 pub struct Trait {
+    pub unsafety: ast::Unsafety,
     pub items: Vec<TraitMethod>,
     pub generics: Generics,
     pub bounds: Vec<TyParamBound>,
@@ -984,6 +992,7 @@ fn clean(&self, cx: &DocContext) -> Item {
             visibility: self.vis.clean(cx),
             stability: self.stab.clean(cx),
             inner: TraitItem(Trait {
+                unsafety: self.unsafety,
                 items: self.items.clean(cx),
                 generics: self.generics.clean(cx),
                 bounds: self.bounds.clean(cx),
@@ -1104,7 +1113,7 @@ fn clean(&self, cx: &DocContext) -> Item {
             attrs: inline::load_attrs(cx, cx.tcx(), self.def_id),
             source: Span::empty(),
             inner: TyMethodItem(TyMethod {
-                fn_style: self.fty.fn_style,
+                unsafety: self.fty.unsafety,
                 generics: (&self.generics, subst::FnSpace).clean(cx),
                 self_: self_,
                 decl: (self.def_id, &sig).clean(cx),
@@ -1158,12 +1167,19 @@ pub enum Type {
         mutability: Mutability,
         type_: Box<Type>,
     },
+
+    // <Type as Trait>::Name
     QPath {
         name: String,
         self_type: Box<Type>,
         trait_: Box<Type>
     },
-    // region, raw, other boxes, mutable
+
+    // _
+    Infer,
+
+    // for<'a> Foo(&'a)
+    PolyTraitRef(Vec<TyParamBound>),
 }
 
 #[deriving(Clone, Encodable, Decodable, PartialEq, Eq, Hash)]
@@ -1300,11 +1316,18 @@ fn clean(&self, cx: &DocContext) -> Type {
                 }
             }
             TyClosure(ref c) => Closure(box c.clean(cx)),
-            TyProc(ref c) => Proc(box c.clean(cx)),
             TyBareFn(ref barefn) => BareFunction(box barefn.clean(cx)),
             TyParen(ref ty) => ty.clean(cx),
             TyQPath(ref qp) => qp.clean(cx),
-            ref x => panic!("Unimplemented type {}", x),
+            TyPolyTraitRef(ref bounds) => {
+                PolyTraitRef(bounds.clean(cx))
+            },
+            TyInfer(..) => {
+                Infer
+            },
+            TyTypeof(..) => {
+                panic!("Unimplemented type {}", self.node)
+            },
         }
     }
 }
@@ -1343,7 +1366,7 @@ fn clean(&self, cx: &DocContext) -> Type {
                 type_: box mt.ty.clean(cx),
             },
             ty::ty_bare_fn(ref fty) => BareFunction(box BareFunctionDecl {
-                fn_style: fty.fn_style,
+                unsafety: fty.unsafety,
                 generics: Generics {
                     lifetimes: Vec::new(),
                     type_params: Vec::new(),
@@ -1357,7 +1380,7 @@ fn clean(&self, cx: &DocContext) -> Type {
                     lifetimes: Vec::new(), // FIXME: this looks wrong...
                     decl: (ast_util::local_def(0), &fty.sig).clean(cx),
                     onceness: fty.onceness,
-                    fn_style: fty.fn_style,
+                    unsafety: fty.unsafety,
                     bounds: fty.bounds.clean(cx),
                 };
                 match fty.store {
@@ -1768,7 +1791,7 @@ fn clean(&self, cx: &DocContext) -> Item {
 
 #[deriving(Clone, Encodable, Decodable, PartialEq)]
 pub struct BareFunctionDecl {
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub generics: Generics,
     pub decl: FnDecl,
     pub abi: String,
@@ -1777,7 +1800,7 @@ pub struct BareFunctionDecl {
 impl Clean<BareFunctionDecl> for ast::BareFnTy {
     fn clean(&self, cx: &DocContext) -> BareFunctionDecl {
         BareFunctionDecl {
-            fn_style: self.fn_style,
+            unsafety: self.unsafety,
             generics: Generics {
                 lifetimes: self.lifetimes.clean(cx),
                 type_params: Vec::new(),
@@ -2050,7 +2073,7 @@ fn clean(&self, cx: &DocContext) -> Item {
                 ForeignFunctionItem(Function {
                     decl: decl.clean(cx),
                     generics: generics.clean(cx),
-                    fn_style: ast::UnsafeFn,
+                    unsafety: ast::Unsafety::Unsafe,
                 })
             }
             ast::ForeignItemStatic(ref ty, mutbl) => {
index 1aac91c4a5c7ac96b8a71a6c0ad29432260ba7f4..6592ca498dc646708ca7c73e97c9a662e11f48c4 100644 (file)
@@ -129,7 +129,7 @@ pub struct Function {
     pub name: Ident,
     pub vis: ast::Visibility,
     pub stab: Option<attr::Stability>,
-    pub fn_style: ast::FnStyle,
+    pub unsafety: ast::Unsafety,
     pub whence: Span,
     pub generics: ast::Generics,
 }
@@ -170,6 +170,7 @@ pub struct Constant {
 }
 
 pub struct Trait {
+    pub unsafety: ast::Unsafety,
     pub name: Ident,
     pub items: Vec<ast::TraitItem>, //should be TraitItem
     pub generics: ast::Generics,
@@ -183,6 +184,7 @@ pub struct Trait {
 }
 
 pub struct Impl {
+    pub unsafety: ast::Unsafety,
     pub generics: ast::Generics,
     pub trait_: Option<ast::TraitRef>,
     pub for_: P<ast::Ty>,
index 173b50dfc5ff0d7a3c37fb5c379a215d6560dafb..5623c0f0e535fb880b704cde3d6aeb8c91b9e12a 100644 (file)
@@ -79,8 +79,7 @@ fn vtrm<T: DocFolder>(this: &mut T, trm: TraitMethod)
                     StructVariant(mut j) => {
                         let mut foo = Vec::new(); swap(&mut foo, &mut j.fields);
                         let num_fields = foo.len();
-                        let c = |x| self.fold_item(x);
-                        j.fields.extend(foo.into_iter().filter_map(c));
+                        j.fields.extend(foo.into_iter().filter_map(|x| self.fold_item(x)));
                         j.fields_stripped |= num_fields != j.fields.len();
                         VariantItem(Variant {kind: StructVariant(j), ..i2})
                     },
index 68ff2ddbcb0e194440e174e5a2c8adff4fec142b..6a2929beca22e7f5469daf5111a5f8b895f44358 100644 (file)
@@ -32,7 +32,7 @@
 pub struct VisSpace(pub Option<ast::Visibility>);
 /// Similarly to VisSpace, this structure is used to render a function style with a
 /// space after it.
-pub struct FnStyleSpace(pub ast::FnStyle);
+pub struct UnsafetySpace(pub ast::Unsafety);
 /// Wrapper struct for properly emitting a method declaration.
 pub struct Method<'a>(pub &'a clean::SelfTy, pub &'a clean::FnDecl);
 /// Similar to VisSpace, but used for mutability
@@ -49,7 +49,7 @@
 pub struct TyParamBounds<'a>(pub &'a [clean::TyParamBound]);
 
 impl Copy for VisSpace {}
-impl Copy for FnStyleSpace {}
+impl Copy for UnsafetySpace {}
 impl Copy for MutableSpace {}
 impl Copy for RawMutableSpace {}
 
@@ -59,9 +59,9 @@ pub fn get(&self) -> Option<ast::Visibility> {
     }
 }
 
-impl FnStyleSpace {
-    pub fn get(&self) -> ast::FnStyle {
-        let FnStyleSpace(v) = *self; v
+impl UnsafetySpace {
+    pub fn get(&self) -> ast::Unsafety {
+        let UnsafetySpace(v) = *self; v
     }
 }
 
@@ -218,10 +218,14 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
         })
 }
 
-fn path(w: &mut fmt::Formatter, path: &clean::Path, print_all: bool,
-        root: |&render::Cache, &[String]| -> Option<String>,
-        info: |&render::Cache| -> Option<(Vec<String> , ItemType)>)
-    -> fmt::Result
+fn path<F, G>(w: &mut fmt::Formatter,
+              path: &clean::Path,
+              print_all: bool,
+              root: F,
+              info: G)
+              -> fmt::Result where
+    F: FnOnce(&render::Cache, &[String]) -> Option<String>,
+    G: FnOnce(&render::Cache) -> Option<(Vec<String>, ItemType)>,
 {
     // The generics will get written to both the title and link
     let mut generics = String::new();
@@ -342,7 +346,7 @@ fn primitive_link(f: &mut fmt::Formatter,
                 Some(root) => {
                     try!(write!(f, "<a href='{}{}/primitive.{}.html'>",
                                 root,
-                                path.ref0().head().unwrap(),
+                                path.0.head().unwrap(),
                                 prim.to_url_str()));
                     needs_termination = true;
                 }
@@ -386,11 +390,21 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                 try!(resolved_path(f, did, path, false));
                 tybounds(f, typarams)
             }
+            clean::PolyTraitRef(ref bounds) => {
+                for (i, bound) in bounds.iter().enumerate() {
+                    if i != 0 {
+                        try!(write!(f, " + "));
+                    }
+                    try!(write!(f, "{}", *bound));
+                }
+                Ok(())
+            }
+            clean::Infer => write!(f, "_"),
             clean::Self(..) => f.write("Self".as_bytes()),
             clean::Primitive(prim) => primitive_link(f, prim, prim.to_string()),
             clean::Closure(ref decl) => {
                 write!(f, "{style}{lifetimes}|{args}|{bounds}{arrow}",
-                       style = FnStyleSpace(decl.fn_style),
+                       style = UnsafetySpace(decl.unsafety),
                        lifetimes = if decl.lifetimes.len() == 0 {
                            "".to_string()
                        } else {
@@ -419,7 +433,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             }
             clean::Proc(ref decl) => {
                 write!(f, "{style}{lifetimes}proc({args}){bounds}{arrow}",
-                       style = FnStyleSpace(decl.fn_style),
+                       style = UnsafetySpace(decl.unsafety),
                        lifetimes = if decl.lifetimes.len() == 0 {
                            "".to_string()
                        } else {
@@ -440,7 +454,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
             }
             clean::BareFunction(ref decl) => {
                 write!(f, "{}{}fn{}{}",
-                       FnStyleSpace(decl.fn_style),
+                       UnsafetySpace(decl.unsafety),
                        match decl.abi.as_slice() {
                            "" => " extern ".to_string(),
                            "\"Rust\"" => "".to_string(),
@@ -570,11 +584,11 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
     }
 }
 
-impl fmt::Show for FnStyleSpace {
+impl fmt::Show for UnsafetySpace {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match self.get() {
-            ast::UnsafeFn => write!(f, "unsafe "),
-            ast::NormalFn => Ok(())
+            ast::Unsafety::Unsafe => write!(f, "unsafe "),
+            ast::Unsafety::Normal => Ok(())
         }
     }
 }
index 10563c61e1465d93bd095ecaa93c97e7850a6b3c..cba58db7c7f733516f2db8ec161bbc8c1fe55fd1 100644 (file)
@@ -393,7 +393,7 @@ fn parse(string: &str) -> LangString {
         let mut seen_other_tags = false;
         let mut data = LangString::all_false();
 
-        let mut tokens = string.split(|c: char|
+        let mut tokens = string.split(|&: c: char|
             !(c == '_' || c == '-' || c.is_alphanumeric())
         );
 
index 296493f3ba30012d052b8b2097016056ff1a4b3f..1977b6320d0ecade3cd69627d2bc01e7d1aed454 100644 (file)
@@ -58,7 +58,7 @@
 use clean;
 use doctree;
 use fold::DocFolder;
-use html::format::{VisSpace, Method, FnStyleSpace, MutableSpace, Stability};
+use html::format::{VisSpace, Method, UnsafetySpace, MutableSpace, Stability};
 use html::format::{ConciseStability, TyParamBounds, WhereClause};
 use html::highlight;
 use html::item_type::ItemType;
@@ -323,7 +323,7 @@ pub fn run(mut krate: clean::Crate,
       }).unwrap_or(HashMap::new());
     let mut cache = Cache {
         impls: HashMap::new(),
-        external_paths: paths.iter().map(|(&k, v)| (k, v.ref0().clone()))
+        external_paths: paths.iter().map(|(&k, v)| (k, v.0.clone()))
                              .collect(),
         paths: paths,
         implementors: HashMap::new(),
@@ -646,7 +646,9 @@ fn shortty(item: &clean::Item) -> ItemType {
 /// static HTML tree.
 // FIXME (#9639): The closure should deal with &[u8] instead of &str
 // FIXME (#9639): This is too conservative, rejecting non-UTF-8 paths
-fn clean_srcpath(src_root: &Path, src: &[u8], f: |&str|) {
+fn clean_srcpath<F>(src_root: &Path, src: &[u8], mut f: F) where
+    F: FnMut(&str),
+{
     let p = Path::new(src);
 
     // make it relative, if possible
@@ -748,7 +750,7 @@ fn emit_source(&mut self, filename: &str) -> io::IoResult<()> {
         let contents = str::from_utf8(contents.as_slice()).unwrap();
 
         // Remove the utf-8 BOM if any
-        let contents = if contents.starts_with("\ufeff") {
+        let contents = if contents.starts_with("\u{feff}") {
             contents.slice_from(3)
         } else {
             contents
@@ -1051,7 +1053,9 @@ fn generics(&mut self, generics: &clean::Generics) {
 impl Context {
     /// Recurse in the directory structure and change the "root path" to make
     /// sure it always points to the top (relatively)
-    fn recurse<T>(&mut self, s: String, f: |&mut Context| -> T) -> T {
+    fn recurse<T, F>(&mut self, s: String, f: F) -> T where
+        F: FnOnce(&mut Context) -> T,
+    {
         if s.len() == 0 {
             panic!("Unexpected empty destination: {}", self.current);
         }
@@ -1131,8 +1135,9 @@ fn krate(mut self, mut krate: clean::Crate,
     /// all sub-items which need to be rendered.
     ///
     /// The rendering driver uses this closure to queue up more work.
-    fn item(&mut self, item: clean::Item,
-            f: |&mut Context, clean::Item|) -> io::IoResult<()> {
+    fn item<F>(&mut self, item: clean::Item, mut f: F) -> io::IoResult<()> where
+        F: FnMut(&mut Context, clean::Item),
+    {
         fn render(w: io::File, cx: &Context, it: &clean::Item,
                   pushname: bool) -> io::IoResult<()> {
             info!("Rendering an item to {}", w.path().display());
@@ -1659,10 +1664,10 @@ fn item_static(w: &mut fmt::Formatter, it: &clean::Item,
 
 fn item_function(w: &mut fmt::Formatter, it: &clean::Item,
                  f: &clean::Function) -> fmt::Result {
-    try!(write!(w, "<pre class='rust fn'>{vis}{fn_style}fn \
+    try!(write!(w, "<pre class='rust fn'>{vis}{unsafety}fn \
                     {name}{generics}{decl}{where_clause}</pre>",
            vis = VisSpace(it.visibility),
-           fn_style = FnStyleSpace(f.fn_style),
+           unsafety = UnsafetySpace(f.unsafety),
            name = it.name.as_ref().unwrap().as_slice(),
            generics = f.generics,
            where_clause = WhereClause(&f.generics),
@@ -1688,8 +1693,9 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
     }
 
     // Output the trait definition
-    try!(write!(w, "<pre class='rust trait'>{}trait {}{}{}{} ",
+    try!(write!(w, "<pre class='rust trait'>{}{}trait {}{}{}{} ",
                   VisSpace(it.visibility),
+                  UnsafetySpace(t.unsafety),
                   it.name.as_ref().unwrap().as_slice(),
                   t.generics,
                   bounds,
@@ -1808,13 +1814,13 @@ fn trait_item(w: &mut fmt::Formatter, m: &clean::TraitMethod)
 }
 
 fn render_method(w: &mut fmt::Formatter, meth: &clean::Item) -> fmt::Result {
-    fn method(w: &mut fmt::Formatter, it: &clean::Item, fn_style: ast::FnStyle,
+    fn method(w: &mut fmt::Formatter, it: &clean::Item, unsafety: ast::Unsafety,
            g: &clean::Generics, selfty: &clean::SelfTy,
            d: &clean::FnDecl) -> fmt::Result {
         write!(w, "{}fn <a href='#{ty}.{name}' class='fnname'>{name}</a>\
                    {generics}{decl}{where_clause}",
-               match fn_style {
-                   ast::UnsafeFn => "unsafe ",
+               match unsafety {
+                   ast::Unsafety::Unsafe => "unsafe ",
                    _ => "",
                },
                ty = shortty(it),
@@ -1836,10 +1842,10 @@ fn assoc_type(w: &mut fmt::Formatter, it: &clean::Item,
     }
     match meth.inner {
         clean::TyMethodItem(ref m) => {
-            method(w, meth, m.fn_style, &m.generics, &m.self_, &m.decl)
+            method(w, meth, m.unsafety, &m.generics, &m.self_, &m.decl)
         }
         clean::MethodItem(ref m) => {
-            method(w, meth, m.fn_style, &m.generics, &m.self_, &m.decl)
+            method(w, meth, m.unsafety, &m.generics, &m.self_, &m.decl)
         }
         clean::AssociatedTypeItem(ref typ) => {
             assoc_type(w, meth, typ)
index 4d2f23e1c314e7d173dbdb4f0876be5c5b03c2f5..82081a01956bb1530cae707f10599fa351875bfa 100644 (file)
@@ -24,9 +24,11 @@ pub struct Toc {
     /// both of which end up in the same `Toc` as they have the same
     /// parent (Main).
     ///
+    /// ```text
     /// # Main
     /// ### A
     /// ## B
+    /// ```
     entries: Vec<TocEntry>
 }
 
@@ -78,6 +80,7 @@ pub fn into_toc(mut self) -> Toc {
     ///
     /// Example:
     ///
+    /// ```text
     /// ## A
     /// # B
     /// # C
@@ -86,6 +89,7 @@ pub fn into_toc(mut self) -> Toc {
     /// ### F
     /// #### G
     /// ### H
+    /// ```
     ///
     /// If we are considering H (i.e. level 3), then A and B are in
     /// self.top_level, D is in C.children, and C, E, F, G are in
index 6d9e8dc722f8a6b09850a7fdd3d7370a077f80b5..78117c9cb06d43b5c1249ada912af35317e13e83 100644 (file)
@@ -18,7 +18,8 @@
        html_playground_url = "http://play.rust-lang.org/")]
 
 #![allow(unknown_features)]
-#![feature(globs, if_let, macro_rules, phase, slicing_syntax, tuple_indexing)]
+#![feature(globs, macro_rules, phase, slicing_syntax)]
+#![feature(unboxed_closures)]
 
 extern crate arena;
 extern crate getopts;
@@ -341,7 +342,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
 
     let cr = Path::new(cratefile);
     info!("starting to run rustc");
-    let (mut krate, analysis) = std::task::try(proc() {
+    let (mut krate, analysis) = std::task::try(move |:| {
         let cr = cr;
         core::run_core(libs, cfgs, externs, &cr, triple)
     }).map_err(|_| "rustc failed").unwrap();
@@ -399,7 +400,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
                                  .position(|&(p, _, _)| {
                                      p == *pass
                                  }) {
-            Some(i) => PASSES[i].val1(),
+            Some(i) => PASSES[i].1,
             None => {
                 error!("unknown pass {}, skipping", *pass);
                 continue
index 881270afe140c304a14c1108b6e2e5712328939b..70cabb24397056c4f51f365a3fee2fc1cd60b5af 100644 (file)
@@ -151,14 +151,14 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
         ImplItem(Impl { items: ref subitems, trait_: None, .. }) => {
             let subcounts = subitems.iter().filter(|i| visible(*i))
                                            .map(summarize_item)
-                                           .map(|s| s.val0())
+                                           .map(|s| s.0)
                                            .fold(Counts::zero(), |acc, x| acc + x);
             (subcounts, None)
         }
         // `pub` automatically
         EnumItem(Enum { variants: ref subitems, .. }) => {
             let subcounts = subitems.iter().map(summarize_item)
-                                           .map(|s| s.val0())
+                                           .map(|s| s.0)
                                            .fold(Counts::zero(), |acc, x| acc + x);
             (item_counts + subcounts, None)
         }
@@ -176,7 +176,7 @@ fn extract_item<'a>(trait_item: &'a TraitMethod) -> &'a Item {
             let subcounts = trait_items.iter()
                                        .map(extract_item)
                                        .map(summarize_item)
-                                       .map(|s| s.val0())
+                                       .map(|s| s.0)
                                        .fold(Counts::zero(), |acc, x| acc + x);
             (item_counts + subcounts, None)
         }
@@ -212,7 +212,7 @@ pub fn build(krate: &Crate) -> ModuleSummary {
             submodules: Vec::new(),
         },
         Some(ref item) => ModuleSummary {
-            name: krate.name.clone(), .. summarize_item(item).val1().unwrap()
+            name: krate.name.clone(), .. summarize_item(item).1.unwrap()
         }
     }
 }
index 5759adf32440ee90ed0753674e4fda87621d5b78..0c64a0d29dffe71ba4caed1877535fdd4792e244 100644 (file)
@@ -15,6 +15,7 @@
 use std::os;
 use std::str;
 use std::string::String;
+use std::thunk::Thunk;
 
 use std::collections::{HashSet, HashMap};
 use testing;
@@ -142,7 +143,7 @@ fn runtest(test: &str, cratename: &str, libs: Vec<Path>, externs: core::Externs,
     let w1 = io::ChanWriter::new(tx);
     let w2 = w1.clone();
     let old = io::stdio::set_stderr(box w1);
-    spawn(proc() {
+    spawn(move |:| {
         let mut p = io::ChanReader::new(rx);
         let mut err = match old {
             Some(old) => {
@@ -282,7 +283,7 @@ pub fn add_test(&mut self, test: String,
                 ignore: should_ignore,
                 should_fail: testing::ShouldFail::No, // compiler failures are test failures
             },
-            testfn: testing::DynTestFn(proc() {
+            testfn: testing::DynTestFn(Thunk::new(move|| {
                 runtest(test.as_slice(),
                         cratename.as_slice(),
                         libs,
@@ -290,7 +291,7 @@ pub fn add_test(&mut self, test: String,
                         should_fail,
                         no_run,
                         as_test_harness);
-            }),
+            }))
         });
     }
 
index b5b34ef6efe6a69dde651b0145991770f62957ca..4374ce5deef4ecde2d6fbb305005437395b07244 100644 (file)
@@ -121,7 +121,7 @@ pub fn visit_enum_def(&mut self, it: &ast::Item,
 
     pub fn visit_fn(&mut self, item: &ast::Item,
                     name: ast::Ident, fd: &ast::FnDecl,
-                    fn_style: &ast::FnStyle, _abi: &abi::Abi,
+                    unsafety: &ast::Unsafety, _abi: &abi::Abi,
                     gen: &ast::Generics) -> Function {
         debug!("Visiting fn");
         Function {
@@ -133,7 +133,7 @@ pub fn visit_fn(&mut self, item: &ast::Item,
             name: name,
             whence: item.span,
             generics: gen.clone(),
-            fn_style: *fn_style,
+            unsafety: *unsafety,
         }
     }
 
@@ -322,8 +322,9 @@ pub fn visit_item(&mut self, item: &ast::Item,
                 };
                 om.constants.push(s);
             },
-            ast::ItemTrait(ref gen, ref def_ub, ref b, ref items) => {
+            ast::ItemTrait(unsafety, ref gen, ref def_ub, ref b, ref items) => {
                 let t = Trait {
+                    unsafety: unsafety,
                     name: name,
                     items: items.clone(),
                     generics: gen.clone(),
@@ -337,8 +338,9 @@ pub fn visit_item(&mut self, item: &ast::Item,
                 };
                 om.traits.push(t);
             },
-            ast::ItemImpl(ref gen, ref tr, ref ty, ref items) => {
+            ast::ItemImpl(unsafety, ref gen, ref tr, ref ty, ref items) => {
                 let i = Impl {
+                    unsafety: unsafety,
                     generics: gen.clone(),
                     trait_: tr.clone(),
                     for_: ty.clone(),
index d94f731e75c6450e3e24aeaf4fb9296b12440e64..c1b48e989a1c142ff85bc32bbc677fe4ff31877d 100644 (file)
@@ -89,7 +89,7 @@ pub fn clone() -> Option<Vec<Vec<u8>>> {
         })
     }
 
-    fn with_lock<T>(f: || -> T) -> T {
+    fn with_lock<T, F>(f: F) -> T where F: FnOnce() -> T {
         unsafe {
             let _guard = LOCK.lock();
             f()
@@ -128,7 +128,7 @@ fn smoke_test() {
             assert!(take() == Some(expected.clone()));
             assert!(take() == None);
 
-            (|| {
+            (|&mut:| {
             }).finally(|| {
                 // Restore the actual global state.
                 match saved_value {
index ce27decb136c06a6b55ec873b3824ab2e2e7d36a..8be77d9b34dddff5fdd8d9c49e7cabd1b05c3814 100644 (file)
 use collections::vec::Vec;
 use core::atomic;
 use core::mem;
+use thunk::{Thunk};
 
 use exclusive::Exclusive;
 
-type Queue = Exclusive<Vec<proc():Send>>;
+type Queue = Exclusive<Vec<Thunk>>;
 
 static QUEUE: atomic::AtomicUint = atomic::INIT_ATOMIC_UINT;
 static RUNNING: atomic::AtomicBool = atomic::INIT_ATOMIC_BOOL;
@@ -34,7 +35,7 @@ pub fn init() {
     }
 }
 
-pub fn push(f: proc():Send) {
+pub fn push(f: Thunk) {
     unsafe {
         // Note that the check against 0 for the queue pointer is not atomic at
         // all with respect to `run`, meaning that this could theoretically be a
@@ -59,6 +60,6 @@ pub fn run() {
     };
 
     for to_run in cur.into_iter() {
-        to_run();
+        to_run.invoke(());
     }
 }
index 07094f08c5de9684bf7986b5d76d803f72ddbaea..bba81383f7b2ec772fc51f8b06764edf452556cb 100644 (file)
@@ -72,6 +72,7 @@
 use core::fmt;
 use core::kinds::{Sized, marker};
 use core::mem;
+use core::ops::{FnMut, FnOnce};
 use core::prelude::{Clone, Drop, Eq, Iterator};
 use core::prelude::{SlicePrelude, None, Option, Ordering, PartialEq};
 use core::prelude::{PartialOrd, RawPtr, Some, StrPrelude, range};
@@ -319,14 +320,18 @@ pub trait ToCStr for Sized? {
     ///
     /// Panics the task if the receiver has an interior null.
     #[inline]
-    fn with_c_str<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    fn with_c_str<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         let c_str = self.to_c_str();
         f(c_str.as_ptr())
     }
 
     /// Unsafe variant of `with_c_str()` that doesn't check for nulls.
     #[inline]
-    unsafe fn with_c_str_unchecked<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    unsafe fn with_c_str_unchecked<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         let c_str = self.to_c_str_unchecked();
         f(c_str.as_ptr())
     }
@@ -344,12 +349,16 @@ unsafe fn to_c_str_unchecked(&self) -> CString {
     }
 
     #[inline]
-    fn with_c_str<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    fn with_c_str<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         self.as_bytes().with_c_str(f)
     }
 
     #[inline]
-    unsafe fn with_c_str_unchecked<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    unsafe fn with_c_str_unchecked<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         self.as_bytes().with_c_str_unchecked(f)
     }
 }
@@ -366,12 +375,16 @@ unsafe fn to_c_str_unchecked(&self) -> CString {
     }
 
     #[inline]
-    fn with_c_str<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    fn with_c_str<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         self.as_bytes().with_c_str(f)
     }
 
     #[inline]
-    unsafe fn with_c_str_unchecked<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    unsafe fn with_c_str_unchecked<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         self.as_bytes().with_c_str_unchecked(f)
     }
 }
@@ -397,11 +410,15 @@ unsafe fn to_c_str_unchecked(&self) -> CString {
         CString::new(buf as *const libc::c_char, true)
     }
 
-    fn with_c_str<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    fn with_c_str<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         unsafe { with_c_str(self, true, f) }
     }
 
-    unsafe fn with_c_str_unchecked<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    unsafe fn with_c_str_unchecked<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         with_c_str(self, false, f)
     }
 }
@@ -418,19 +435,24 @@ unsafe fn to_c_str_unchecked(&self) -> CString {
     }
 
     #[inline]
-    fn with_c_str<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    fn with_c_str<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         (**self).with_c_str(f)
     }
 
     #[inline]
-    unsafe fn with_c_str_unchecked<T>(&self, f: |*const libc::c_char| -> T) -> T {
+    unsafe fn with_c_str_unchecked<T, F>(&self, f: F) -> T where
+        F: FnOnce(*const libc::c_char) -> T,
+    {
         (**self).with_c_str_unchecked(f)
     }
 }
 
 // Unsafe function that handles possibly copying the &[u8] into a stack array.
-unsafe fn with_c_str<T>(v: &[u8], checked: bool,
-                        f: |*const libc::c_char| -> T) -> T {
+unsafe fn with_c_str<T, F>(v: &[u8], checked: bool, f: F) -> T where
+    F: FnOnce(*const libc::c_char) -> T,
+{
     let c_str = if v.len() < BUF_LEN {
         let mut buf: [u8, .. BUF_LEN] = mem::uninitialized();
         slice::bytes::copy_memory(&mut buf, v);
@@ -489,9 +511,12 @@ fn next(&mut self) -> Option<libc::c_char> {
 ///
 /// The specified closure is invoked with each string that
 /// is found, and the number of strings found is returned.
-pub unsafe fn from_c_multistring(buf: *const libc::c_char,
-                                 count: Option<uint>,
-                                 f: |&CString|) -> uint {
+pub unsafe fn from_c_multistring<F>(buf: *const libc::c_char,
+                                    count: Option<uint>,
+                                    mut f: F)
+                                    -> uint where
+    F: FnMut(&CString),
+{
 
     let mut curr_ptr: uint = buf as uint;
     let mut ctr = 0;
@@ -614,7 +639,7 @@ fn test_iterator() {
 
     #[test]
     fn test_to_c_str_fail() {
-        assert!(task::try(proc() { "he\x00llo".to_c_str() }).is_err());
+        assert!(task::try(move|| { "he\x00llo".to_c_str() }).is_err());
     }
 
     #[test]
@@ -678,7 +703,7 @@ fn test_clone() {
 
     #[test]
     fn test_clone_noleak() {
-        fn foo(f: |c: &CString|) {
+        fn foo<F>(f: F) where F: FnOnce(&CString) {
             let s = "test".to_string();
             let c = s.to_c_str();
             // give the closure a non-owned CString
index d40f149a2a1f8316a5cd4514efae81eb26d00d14..9adcc0a844dffb072b6abf616fdbb7ec2af90269 100644 (file)
@@ -99,7 +99,7 @@ fn exclusive_new_arc() {
                 let (tx, rx) = channel();
                 futures.push(rx);
 
-                task::spawn(proc() {
+                task::spawn(move || {
                     for _ in range(0u, count) {
                         **total.lock() += 1;
                     }
index 066e8c51aef0b3b21a86b8a53fee3c6d0428a3f5..f12f8e49801191d6ffbbdcf86704f7e7fb61e480 100644 (file)
@@ -19,6 +19,7 @@
 #![feature(macro_rules, phase, globs, thread_local, asm)]
 #![feature(linkage, lang_items, unsafe_destructor, default_type_params)]
 #![feature(import_shadowing, slicing_syntax)]
+#![feature(unboxed_closures)]
 #![no_std]
 #![experimental]
 
@@ -45,6 +46,7 @@
 mod util;
 mod libunwind;
 mod stack_overflow;
+pub mod thunk;
 
 pub mod args;
 pub mod bookkeeping;
@@ -94,8 +96,8 @@ pub fn init(argc: int, argv: *const *const u8) {
 ///
 /// It is forbidden for procedures to register more `at_exit` handlers when they
 /// are running, and doing so will lead to a process abort.
-pub fn at_exit(f: proc():Send) {
-    at_exit_imp::push(f);
+pub fn at_exit<F:FnOnce()+Send>(f: F) {
+    at_exit_imp::push(thunk::Thunk::new(f));
 }
 
 /// One-time runtime cleanup.
index b1d387a9cc358239d02342c62b296585d78244d4..df733d7ee225be4a3b71e9c7bdb20e7211732ed9 100644 (file)
@@ -59,7 +59,7 @@ mod test {
 
     #[test]
     fn thread_local_task_smoke_test() {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let task = box Task::new(None, None);
             Local::put(task);
             let task: Box<Task> = Local::take();
@@ -69,7 +69,7 @@ fn thread_local_task_smoke_test() {
 
     #[test]
     fn thread_local_task_two_instances() {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let task = box Task::new(None, None);
             Local::put(task);
             let task: Box<Task> = Local::take();
@@ -83,7 +83,7 @@ fn thread_local_task_two_instances() {
 
     #[test]
     fn borrow_smoke_test() {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let task = box Task::new(None, None);
             Local::put(task);
 
@@ -97,7 +97,7 @@ fn borrow_smoke_test() {
 
     #[test]
     fn borrow_with_return() {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let task = box Task::new(None, None);
             Local::put(task);
 
@@ -112,7 +112,7 @@ fn borrow_with_return() {
 
     #[test]
     fn try_take() {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let task = box Task::new(None, None);
             Local::put(task);
 
index 5b58ec8fd3a8bb4e834cdeff52cdfebc27bca8e5..cbfb86a6ac7b2ac7ada773d9afa131ae587108d4 100644 (file)
@@ -680,7 +680,7 @@ fn smoke_cond() {
         static LK: StaticNativeMutex = NATIVE_MUTEX_INIT;
         unsafe {
             let guard = LK.lock();
-            let t = Thread::start(proc() {
+            let t = Thread::start(move|| {
                 let guard = LK.lock();
                 guard.signal();
             });
@@ -705,7 +705,7 @@ fn smoke_cond_noguard() {
         static LK: StaticNativeMutex = NATIVE_MUTEX_INIT;
         unsafe {
             LK.lock_noguard();
-            let t = Thread::start(proc() {
+            let t = Thread::start(move|| {
                 LK.lock_noguard();
                 LK.signal_noguard();
                 LK.unlock_noguard();
index 325bdc284acfc8a08e576d0e05515c34357f474f..37632f509c14a089f166b3ab7d8ce22ba946cbeb 100644 (file)
@@ -21,7 +21,9 @@
 use core::atomic::{AtomicUint, SeqCst};
 use core::iter::{IteratorExt, Take};
 use core::kinds::marker;
+use core::ops::FnOnce;
 use core::mem;
+use core::ops::FnMut;
 use core::prelude::{Clone, Drop, Err, Iterator, None, Ok, Option, Send, Some};
 use core::prelude::{drop};
 
@@ -33,6 +35,7 @@
 use unwind;
 use unwind::Unwinder;
 use collections::str::SendStr;
+use thunk::Thunk;
 
 /// State associated with Rust tasks.
 ///
@@ -66,7 +69,7 @@ enum TaskState {
 
 pub struct TaskOpts {
     /// Invoke this procedure with the result of the task when it finishes.
-    pub on_exit: Option<proc(Result): Send>,
+    pub on_exit: Option<Thunk<Result>>,
     /// A name for the task-to-be, for identification in panic messages
     pub name: Option<SendStr>,
     /// The size of the stack for the spawned task
@@ -91,7 +94,7 @@ pub enum BlockedTask {
 
 /// Per-task state related to task death, killing, panic, etc.
 pub struct Death {
-    pub on_exit: Option<proc(Result):Send>,
+    pub on_exit: Option<Thunk<Result>>,
     marker: marker::NoCopy,
 }
 
@@ -115,7 +118,13 @@ pub fn new(stack_bounds: Option<(uint, uint)>, stack_guard: Option<uint>) -> Tas
         }
     }
 
-    pub fn spawn(opts: TaskOpts, f: proc():Send) {
+    pub fn spawn<F>(opts: TaskOpts, f: F)
+        where F : FnOnce(), F : Send
+    {
+        Task::spawn_thunk(opts, Thunk::new(f))
+    }
+
+    fn spawn_thunk(opts: TaskOpts, f: Thunk) {
         let TaskOpts { name, stack_size, on_exit } = opts;
 
         let mut task = box Task::new(None, None);
@@ -137,7 +146,7 @@ pub fn spawn(opts: TaskOpts, f: proc():Send) {
         // because by the time that this function is executing we've already
         // consumed at least a little bit of stack (we don't know the exact byte
         // address at which our stack started).
-        Thread::spawn_stack(stack, proc() {
+        Thread::spawn_stack(stack, move|| {
             let something_around_the_top_of_the_stack = 1;
             let addr = &something_around_the_top_of_the_stack as *const int;
             let my_stack = addr as uint;
@@ -149,7 +158,7 @@ pub fn spawn(opts: TaskOpts, f: proc():Send) {
             task.stack_bounds = (my_stack - stack + 1024, my_stack);
 
             let mut f = Some(f);
-            drop(task.run(|| { f.take().unwrap()() }).destroy());
+            drop(task.run(|| { f.take().unwrap().invoke(()) }).destroy());
             drop(token);
         })
     }
@@ -240,7 +249,7 @@ fn cleanup(mut self: Box<Task>, result: Result) -> Box<Task> {
         //        reconsideration to whether it's a reasonable thing to let a
         //        task to do or not.
         match what_to_do {
-            Some(f) => { f(result) }
+            Some(f) => { f.invoke(result) }
             None => { drop(result) }
         }
 
@@ -297,9 +306,9 @@ pub fn is_destroyed(&self) -> bool { self.state == Destroyed }
     // `awoken` field which indicates whether we were actually woken up via some
     // invocation of `reawaken`. This flag is only ever accessed inside the
     // lock, so there's no need to make it atomic.
-    pub fn deschedule(mut self: Box<Task>,
-                      times: uint,
-                      f: |BlockedTask| -> ::core::result::Result<(), BlockedTask>) {
+    pub fn deschedule<F>(mut self: Box<Task>, times: uint, mut f: F) where
+        F: FnMut(BlockedTask) -> ::core::result::Result<(), BlockedTask>,
+    {
         unsafe {
             let me = &mut *self as *mut Task;
             let task = BlockedTask::block(self);
@@ -499,14 +508,13 @@ mod test {
     use super::*;
     use std::prelude::*;
     use std::task;
-    use unwind;
 
     #[test]
     fn unwind() {
-        let result = task::try(proc()());
+        let result = task::try(move|| ());
         rtdebug!("trying first assert");
         assert!(result.is_ok());
-        let result = task::try::<()>(proc() panic!());
+        let result = task::try(move|| -> () panic!());
         rtdebug!("trying second assert");
         assert!(result.is_err());
     }
index 9f3f45ba0981c47b1c0f40507cbd7137547d8af5..175e057c22f2ea3e5f70b3147a778a6dc17c24e9 100644 (file)
@@ -22,6 +22,7 @@
 use core::mem;
 use core::uint;
 use libc;
+use thunk::{Thunk};
 
 use stack;
 use stack_overflow;
@@ -60,8 +61,8 @@ fn start_thread(main: *mut libc::c_void) -> imp::rust_thread_return {
     unsafe {
         stack::record_os_managed_stack_bounds(0, uint::MAX);
         let handler = stack_overflow::Handler::new();
-        let f: Box<proc()> = mem::transmute(main);
-        (*f)();
+        let f: Box<Thunk> = mem::transmute(main);
+        f.invoke(());
         drop(handler);
         mem::transmute(0 as imp::rust_thread_return)
     }
@@ -113,14 +114,17 @@ impl Thread<()> {
     /// to finish executing. This means that even if `join` is not explicitly
     /// called, when the `Thread` falls out of scope its destructor will block
     /// waiting for the OS thread.
-    pub fn start<T: Send>(main: proc():Send -> T) -> Thread<T> {
+    pub fn start<T,F>(main: F) -> Thread<T>
+        where T:Send, F:FnOnce() -> T, F:Send
+    {
         Thread::start_stack(DEFAULT_STACK_SIZE, main)
     }
 
     /// Performs the same functionality as `start`, but specifies an explicit
     /// stack size for the new thread.
-    pub fn start_stack<T: Send>(stack: uint, main: proc():Send -> T) -> Thread<T> {
-
+    pub fn start_stack<T, F>(stack: uint, main: F) -> Thread<T>
+        where T:Send, F:FnOnce() -> T, F:Send
+    {
         // We need the address of the packet to fill in to be stable so when
         // `main` fills it in it's still valid, so allocate an extra box to do
         // so.
@@ -128,8 +132,11 @@ pub fn start_stack<T: Send>(stack: uint, main: proc():Send -> T) -> Thread<T> {
         let packet2: *mut Option<T> = unsafe {
             *mem::transmute::<&Box<Option<T>>, *const *mut Option<T>>(&packet)
         };
-        let main = proc() unsafe { *packet2 = Some(main()); };
-        let native = unsafe { imp::create(stack, box main) };
+        let native = unsafe {
+            imp::create(stack, Thunk::new(move |:| {
+                *packet2 = Some(main.call_once(()));
+            }))
+        };
 
         Thread {
             native: native,
@@ -144,15 +151,19 @@ pub fn start_stack<T: Send>(stack: uint, main: proc():Send -> T) -> Thread<T> {
     /// This corresponds to creating threads in the 'detached' state on unix
     /// systems. Note that platforms may not keep the main program alive even if
     /// there are detached thread still running around.
-    pub fn spawn(main: proc():Send) {
+    pub fn spawn<F>(main: F)
+        where F : FnOnce() + Send
+    {
         Thread::spawn_stack(DEFAULT_STACK_SIZE, main)
     }
 
     /// Performs the same functionality as `spawn`, but explicitly specifies a
     /// stack size for the new thread.
-    pub fn spawn_stack(stack: uint, main: proc():Send) {
+    pub fn spawn_stack<F>(stack: uint, main: F)
+        where F : FnOnce() + Send
+    {
         unsafe {
-            let handle = imp::create(stack, box main);
+            let handle = imp::create(stack, Thunk::new(main));
             imp::detach(handle);
         }
     }
@@ -190,8 +201,6 @@ fn drop(&mut self) {
 #[cfg(windows)]
 #[allow(non_snake_case)]
 mod imp {
-    use core::prelude::*;
-
     use alloc::boxed::Box;
     use core::cmp;
     use core::mem;
@@ -200,6 +209,7 @@ mod imp {
     use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES, SIZE_T, BOOL,
                                        LPVOID, DWORD, LPDWORD, HANDLE};
     use stack::RED_ZONE;
+    use thunk::Thunk;
 
     pub type rust_thread = HANDLE;
     pub type rust_thread_return = DWORD;
@@ -217,8 +227,9 @@ pub unsafe fn init() {
         }
     }
 
-    pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
-        let arg: *mut libc::c_void = mem::transmute(p);
+    pub unsafe fn create(stack: uint, p: Thunk) -> rust_thread {
+        let arg: *mut libc::c_void = mem::transmute(box p);
+
         // FIXME On UNIX, we guard against stack sizes that are too small but
         // that's because pthreads enforces that stacks are at least
         // PTHREAD_STACK_MIN bytes big.  Windows has no such lower limit, it's
@@ -234,7 +245,7 @@ pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
 
         if ret as uint == 0 {
             // be sure to not leak the closure
-            let _p: Box<proc():Send> = mem::transmute(arg);
+            let _p: Box<Thunk> = mem::transmute(arg);
             panic!("failed to spawn native thread: {}", ret);
         }
         return ret;
@@ -279,6 +290,7 @@ mod imp {
     use core::ptr;
     use libc::consts::os::posix01::{PTHREAD_CREATE_JOINABLE, PTHREAD_STACK_MIN};
     use libc;
+    use thunk::Thunk;
 
     use stack::RED_ZONE;
 
@@ -409,7 +421,7 @@ pub unsafe fn current() -> uint {
         }
     }
 
-    pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
+    pub unsafe fn create(stack: uint, p: Thunk) -> rust_thread {
         let mut native: libc::pthread_t = mem::zeroed();
         let mut attr: libc::pthread_attr_t = mem::zeroed();
         assert_eq!(pthread_attr_init(&mut attr), 0);
@@ -437,13 +449,13 @@ pub unsafe fn create(stack: uint, p: Box<proc():Send>) -> rust_thread {
             },
         };
 
-        let arg: *mut libc::c_void = mem::transmute(p);
+        let arg: *mut libc::c_void = mem::transmute(box p); // must box since sizeof(p)=2*uint
         let ret = pthread_create(&mut native, &attr, super::thread_start, arg);
         assert_eq!(pthread_attr_destroy(&mut attr), 0);
 
         if ret != 0 {
             // be sure to not leak the closure
-            let _p: Box<proc():Send> = mem::transmute(arg);
+            let _p: Box<Box<FnOnce()+Send>> = mem::transmute(arg);
             panic!("failed to spawn native thread: {}", ret);
         }
         native
@@ -531,17 +543,17 @@ mod tests {
     use super::Thread;
 
     #[test]
-    fn smoke() { Thread::start(proc (){}).join(); }
+    fn smoke() { Thread::start(move|| {}).join(); }
 
     #[test]
-    fn data() { assert_eq!(Thread::start(proc () { 1i }).join(), 1); }
+    fn data() { assert_eq!(Thread::start(move|| { 1i }).join(), 1); }
 
     #[test]
-    fn detached() { Thread::spawn(proc () {}) }
+    fn detached() { Thread::spawn(move|| {}) }
 
     #[test]
     fn small_stacks() {
-        assert_eq!(42i, Thread::start_stack(0, proc () 42i).join());
-        assert_eq!(42i, Thread::start_stack(1, proc () 42i).join());
+        assert_eq!(42i, Thread::start_stack(0, move|| 42i).join());
+        assert_eq!(42i, Thread::start_stack(1, move|| 42i).join());
     }
 }
diff --git a/src/librustrt/thunk.rs b/src/librustrt/thunk.rs
new file mode 100644 (file)
index 0000000..42e7849
--- /dev/null
@@ -0,0 +1,52 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use alloc::boxed::Box;
+use core::kinds::Send;
+use core::ops::FnOnce;
+
+pub struct Thunk<A=(),R=()> {
+    invoke: Box<Invoke<A,R>+Send>
+}
+
+impl<R> Thunk<(),R> {
+    pub fn new<F>(func: F) -> Thunk<(),R>
+        where F : FnOnce() -> R, F : Send
+    {
+        Thunk::with_arg(move|: ()| func())
+    }
+}
+
+impl<A,R> Thunk<A,R> {
+    pub fn with_arg<F>(func: F) -> Thunk<A,R>
+        where F : FnOnce(A) -> R, F : Send
+    {
+        Thunk {
+            invoke: box func
+        }
+    }
+
+    pub fn invoke(self, arg: A) -> R {
+        self.invoke.invoke(arg)
+    }
+}
+
+pub trait Invoke<A=(),R=()> {
+    fn invoke(self: Box<Self>, arg: A) -> R;
+}
+
+impl<A,R,F> Invoke<A,R> for F
+    where F : FnOnce(A) -> R
+{
+    fn invoke(self: Box<F>, arg: A) -> R {
+        let f = *self;
+        f(arg)
+    }
+}
index fd30c3a48d2d5e8870703617990c745179f51984..74f918b8ee3b46c8f6e6a2c49df91947d8483f44 100644 (file)
@@ -31,7 +31,7 @@
 #[allow(non_upper_case_globals)]
 impl Copy for Stdio {}
 
-#[allow(non_uppercase_statics)]
+#[allow(non_upper_case_globals)]
 pub const Stdout: Stdio = Stdio(libc::STDOUT_FILENO);
 #[allow(non_upper_case_globals)]
 pub const Stderr: Stdio = Stdio(libc::STDERR_FILENO);
index d28bd1b9df040bd912fc3c84739d549b9e8d060c..d34828ccee328e58822e2a6262963d9ce4393b06 100644 (file)
@@ -284,8 +284,8 @@ pub fn error_str(error: ErrorCode) -> &'static str {
         TrailingCharacters => "trailing characters",
         TrailingComma => "trailing comma",
         InvalidEscape => "invalid escape",
-        UnrecognizedHex => "invalid \\u escape (unrecognized hex)",
-        NotFourDigit => "invalid \\u escape (not four digits)",
+        UnrecognizedHex => "invalid \\u{ esc}ape (unrecognized hex)",
+        NotFourDigit => "invalid \\u{ esc}ape (not four digits)",
         NotUtf8 => "contents not utf-8",
         InvalidUnicodeCodePoint => "invalid Unicode code point",
         LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape",
@@ -458,17 +458,19 @@ fn emit_str(&mut self, v: &str) -> EncodeResult {
         escape_str(self.writer, v)
     }
 
-    fn emit_enum(&mut self,
-                 _name: &str,
-                 f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum<F>(&mut self, _name: &str, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
 
-    fn emit_enum_variant(&mut self,
-                         name: &str,
-                         _id: uint,
-                         cnt: uint,
-                         f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_variant<F>(&mut self,
+                            name: &str,
+                            _id: uint,
+                            cnt: uint,
+                            f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         // enums are encoded as strings or objects
         // Bunny => "Bunny"
         // Kangaroo(34,"William") => {"variant": "Kangaroo", "fields": [34,"William"]}
@@ -483,100 +485,113 @@ fn emit_enum_variant(&mut self,
         }
     }
 
-    fn emit_enum_variant_arg(&mut self,
-                             idx: uint,
-                             f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_variant_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         if idx != 0 {
             try!(write!(self.writer, ","));
         }
         f(self)
     }
 
-    fn emit_enum_struct_variant(&mut self,
-                                name: &str,
-                                id: uint,
-                                cnt: uint,
-                                f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_struct_variant<F>(&mut self,
+                                   name: &str,
+                                   id: uint,
+                                   cnt: uint,
+                                   f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_enum_variant(name, id, cnt, f)
     }
 
-    fn emit_enum_struct_variant_field(&mut self,
-                                      _: &str,
-                                      idx: uint,
-                                      f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_struct_variant_field<F>(&mut self,
+                                         _: &str,
+                                         idx: uint,
+                                         f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_enum_variant_arg(idx, f)
     }
 
-    fn emit_struct(&mut self,
-                   _: &str,
-                   _: uint,
-                   f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_struct<F>(&mut self, _: &str, _: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         try!(write!(self.writer, "{{"));
         try!(f(self));
         write!(self.writer, "}}")
     }
 
-    fn emit_struct_field(&mut self,
-                         name: &str,
-                         idx: uint,
-                         f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_struct_field<F>(&mut self, name: &str, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         if idx != 0 { try!(write!(self.writer, ",")); }
         try!(escape_str(self.writer, name));
         try!(write!(self.writer, ":"));
         f(self)
     }
 
-    fn emit_tuple(&mut self, len: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple<F>(&mut self, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_seq(len, f)
     }
-    fn emit_tuple_arg(&mut self,
-                      idx: uint,
-                      f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_seq_elt(idx, f)
     }
 
-    fn emit_tuple_struct(&mut self,
-                         _name: &str,
-                         len: uint,
-                         f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_struct<F>(&mut self, _name: &str, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_seq(len, f)
     }
-    fn emit_tuple_struct_arg(&mut self,
-                             idx: uint,
-                             f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_struct_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         self.emit_seq_elt(idx, f)
     }
 
-    fn emit_option(&mut self, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_option<F>(&mut self, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
     fn emit_option_none(&mut self) -> EncodeResult { self.emit_nil() }
-    fn emit_option_some(&mut self, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
 
-    fn emit_seq(&mut self, _len: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_seq<F>(&mut self, _len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         try!(write!(self.writer, "["));
         try!(f(self));
         write!(self.writer, "]")
     }
 
-    fn emit_seq_elt(&mut self, idx: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_seq_elt<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         if idx != 0 {
             try!(write!(self.writer, ","));
         }
         f(self)
     }
 
-    fn emit_map(&mut self, _len: uint, f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map<F>(&mut self, _len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         try!(write!(self.writer, "{{"));
         try!(f(self));
         write!(self.writer, "}}")
     }
 
-    fn emit_map_elt_key(&mut self,
-                        idx: uint,
-                        f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map_elt_key<F>(&mut self, idx: uint, mut f: F) -> EncodeResult where
+        F: FnMut(&mut Encoder<'a>) -> EncodeResult,
+    {
         if idx != 0 { try!(write!(self.writer, ",")) }
         // ref #12967, make sure to wrap a key in double quotes,
         // in the event that its of a type that omits them (eg numbers)
@@ -594,9 +609,9 @@ fn emit_map_elt_key(&mut self,
         Ok(())
     }
 
-    fn emit_map_elt_val(&mut self,
-                        _idx: uint,
-                        f: |&mut Encoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map_elt_val<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut Encoder<'a>) -> EncodeResult,
+    {
         try!(write!(self.writer, ":"));
         f(self)
     }
@@ -663,17 +678,20 @@ fn emit_str(&mut self, v: &str) -> EncodeResult {
         escape_str(self.writer, v)
     }
 
-    fn emit_enum(&mut self,
-                 _name: &str,
-                 f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum<F>(&mut self, _name: &str, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
 
-    fn emit_enum_variant(&mut self,
-                         name: &str,
-                         _id: uint,
-                         cnt: uint,
-                         f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_variant<F>(&mut self,
+                            name: &str,
+                            _id: uint,
+                            cnt: uint,
+                            f: F)
+                            -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if cnt == 0 {
             escape_str(self.writer, name)
         } else {
@@ -697,9 +715,9 @@ fn emit_enum_variant(&mut self,
         }
     }
 
-    fn emit_enum_variant_arg(&mut self,
-                             idx: uint,
-                             f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_variant_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if idx != 0 {
             try!(write!(self.writer, ",\n"));
         }
@@ -707,26 +725,29 @@ fn emit_enum_variant_arg(&mut self,
         f(self)
     }
 
-    fn emit_enum_struct_variant(&mut self,
-                                name: &str,
-                                id: uint,
-                                cnt: uint,
-                                f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_struct_variant<F>(&mut self,
+                                   name: &str,
+                                   id: uint,
+                                   cnt: uint,
+                                   f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_enum_variant(name, id, cnt, f)
     }
 
-    fn emit_enum_struct_variant_field(&mut self,
-                                      _: &str,
-                                      idx: uint,
-                                      f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_enum_struct_variant_field<F>(&mut self,
+                                         _: &str,
+                                         idx: uint,
+                                         f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_enum_variant_arg(idx, f)
     }
 
 
-    fn emit_struct(&mut self,
-                   _: &str,
-                   len: uint,
-                   f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_struct<F>(&mut self, _: &str, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if len == 0 {
             write!(self.writer, "{{}}")
         } else {
@@ -740,10 +761,9 @@ fn emit_struct(&mut self,
         }
     }
 
-    fn emit_struct_field(&mut self,
-                         name: &str,
-                         idx: uint,
-                         f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_struct_field<F>(&mut self, name: &str, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if idx == 0 {
             try!(write!(self.writer, "\n"));
         } else {
@@ -755,40 +775,43 @@ fn emit_struct_field(&mut self,
         f(self)
     }
 
-    fn emit_tuple(&mut self,
-                  len: uint,
-                  f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple<F>(&mut self, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_seq(len, f)
     }
-    fn emit_tuple_arg(&mut self,
-                      idx: uint,
-                      f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_seq_elt(idx, f)
     }
 
-    fn emit_tuple_struct(&mut self,
-                         _: &str,
-                         len: uint,
-                         f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_struct<F>(&mut self, _: &str, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_seq(len, f)
     }
-    fn emit_tuple_struct_arg(&mut self,
-                             idx: uint,
-                             f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_tuple_struct_arg<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         self.emit_seq_elt(idx, f)
     }
 
-    fn emit_option(&mut self, f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_option<F>(&mut self, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
     fn emit_option_none(&mut self) -> EncodeResult { self.emit_nil() }
-    fn emit_option_some(&mut self, f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_option_some<F>(&mut self, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         f(self)
     }
 
-    fn emit_seq(&mut self,
-                len: uint,
-                f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_seq<F>(&mut self, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if len == 0 {
             write!(self.writer, "[]")
         } else {
@@ -802,9 +825,9 @@ fn emit_seq(&mut self,
         }
     }
 
-    fn emit_seq_elt(&mut self,
-                    idx: uint,
-                    f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_seq_elt<F>(&mut self, idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if idx == 0 {
             try!(write!(self.writer, "\n"));
         } else {
@@ -814,9 +837,9 @@ fn emit_seq_elt(&mut self,
         f(self)
     }
 
-    fn emit_map(&mut self,
-                len: uint,
-                f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map<F>(&mut self, len: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if len == 0 {
             write!(self.writer, "{{}}")
         } else {
@@ -830,9 +853,9 @@ fn emit_map(&mut self,
         }
     }
 
-    fn emit_map_elt_key(&mut self,
-                        idx: uint,
-                        f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map_elt_key<F>(&mut self, idx: uint, mut f: F) -> EncodeResult where
+        F: FnMut(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         if idx == 0 {
             try!(write!(self.writer, "\n"));
         } else {
@@ -855,9 +878,9 @@ fn emit_map_elt_key(&mut self,
         Ok(())
     }
 
-    fn emit_map_elt_val(&mut self,
-                        _idx: uint,
-                        f: |&mut PrettyEncoder<'a>| -> EncodeResult) -> EncodeResult {
+    fn emit_map_elt_val<F>(&mut self, _idx: uint, f: F) -> EncodeResult where
+        F: FnOnce(&mut PrettyEncoder<'a>) -> EncodeResult,
+    {
         try!(write!(self.writer, ": "));
         f(self)
     }
@@ -2052,17 +2075,16 @@ fn read_str(&mut self) -> DecodeResult<string::String> {
         expect!(self.pop(), String)
     }
 
-    fn read_enum<T>(&mut self,
-                    name: &str,
-                    f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_enum<T, F>(&mut self, name: &str, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_enum({})", name);
         f(self)
     }
 
-    fn read_enum_variant<T>(&mut self,
-                            names: &[&str],
-                            f: |&mut Decoder, uint| -> DecodeResult<T>)
-                            -> DecodeResult<T> {
+    fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder, uint) -> DecodeResult<T>,
+    {
         debug!("read_enum_variant(names={})", names);
         let name = match self.pop() {
             Json::String(s) => s,
@@ -2103,46 +2125,48 @@ fn read_enum_variant<T>(&mut self,
         f(self, idx)
     }
 
-    fn read_enum_variant_arg<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>)
-                                -> DecodeResult<T> {
+    fn read_enum_variant_arg<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_enum_variant_arg(idx={})", idx);
         f(self)
     }
 
-    fn read_enum_struct_variant<T>(&mut self,
-                                   names: &[&str],
-                                   f: |&mut Decoder, uint| -> DecodeResult<T>)
-                                   -> DecodeResult<T> {
+    fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder, uint) -> DecodeResult<T>,
+    {
         debug!("read_enum_struct_variant(names={})", names);
         self.read_enum_variant(names, f)
     }
 
 
-    fn read_enum_struct_variant_field<T>(&mut self,
+    fn read_enum_struct_variant_field<T, F>(&mut self,
                                          name: &str,
                                          idx: uint,
-                                         f: |&mut Decoder| -> DecodeResult<T>)
-                                         -> DecodeResult<T> {
+                                         f: F)
+                                         -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_enum_struct_variant_field(name={}, idx={})", name, idx);
         self.read_enum_variant_arg(idx, f)
     }
 
-    fn read_struct<T>(&mut self,
-                      name: &str,
-                      len: uint,
-                      f: |&mut Decoder| -> DecodeResult<T>)
-                      -> DecodeResult<T> {
+    fn read_struct<T, F>(&mut self, name: &str, len: uint, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_struct(name={}, len={})", name, len);
         let value = try!(f(self));
         self.pop();
         Ok(value)
     }
 
-    fn read_struct_field<T>(&mut self,
-                            name: &str,
-                            idx: uint,
-                            f: |&mut Decoder| -> DecodeResult<T>)
-                            -> DecodeResult<T> {
+    fn read_struct_field<T, F>(&mut self,
+                               name: &str,
+                               idx: uint,
+                               f: F)
+                               -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_struct_field(name={}, idx={})", name, idx);
         let mut obj = try!(expect!(self.pop(), Object));
 
@@ -2165,12 +2189,11 @@ fn read_struct_field<T>(&mut self,
         Ok(value)
     }
 
-    fn read_tuple<T>(&mut self,
-                     tuple_len: uint,
-                     f: |&mut Decoder| -> DecodeResult<T>)
-                     -> DecodeResult<T> {
+    fn read_tuple<T, F>(&mut self, tuple_len: uint, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_tuple()");
-        self.read_seq(|d, len| {
+        self.read_seq(move |d, len| {
             if len == tuple_len {
                 f(d)
             } else {
@@ -2179,31 +2202,37 @@ fn read_tuple<T>(&mut self,
         })
     }
 
-    fn read_tuple_arg<T>(&mut self,
-                         idx: uint,
-                         f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_tuple_arg<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_tuple_arg(idx={})", idx);
         self.read_seq_elt(idx, f)
     }
 
-    fn read_tuple_struct<T>(&mut self,
-                            name: &str,
-                            len: uint,
-                            f: |&mut Decoder| -> DecodeResult<T>)
-                            -> DecodeResult<T> {
+    fn read_tuple_struct<T, F>(&mut self,
+                               name: &str,
+                               len: uint,
+                               f: F)
+                               -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_tuple_struct(name={})", name);
         self.read_tuple(len, f)
     }
 
-    fn read_tuple_struct_arg<T>(&mut self,
-                                idx: uint,
-                                f: |&mut Decoder| -> DecodeResult<T>)
-                                -> DecodeResult<T> {
+    fn read_tuple_struct_arg<T, F>(&mut self,
+                                   idx: uint,
+                                   f: F)
+                                   -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_tuple_struct_arg(idx={})", idx);
         self.read_tuple_arg(idx, f)
     }
 
-    fn read_option<T>(&mut self, f: |&mut Decoder, bool| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_option<T, F>(&mut self, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder, bool) -> DecodeResult<T>,
+    {
         debug!("read_option()");
         match self.pop() {
             Json::Null => f(self, false),
@@ -2211,7 +2240,9 @@ fn read_option<T>(&mut self, f: |&mut Decoder, bool| -> DecodeResult<T>) -> Deco
         }
     }
 
-    fn read_seq<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder, uint) -> DecodeResult<T>,
+    {
         debug!("read_seq()");
         let array = try!(expect!(self.pop(), Array));
         let len = array.len();
@@ -2221,14 +2252,16 @@ fn read_seq<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeR
         f(self, len)
     }
 
-    fn read_seq_elt<T>(&mut self,
-                       idx: uint,
-                       f: |&mut Decoder| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_seq_elt<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_seq_elt(idx={})", idx);
         f(self)
     }
 
-    fn read_map<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeResult<T> {
+    fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
+        F: FnOnce(&mut Decoder, uint) -> DecodeResult<T>,
+    {
         debug!("read_map()");
         let obj = try!(expect!(self.pop(), Object));
         let len = obj.len();
@@ -2239,14 +2272,16 @@ fn read_map<T>(&mut self, f: |&mut Decoder, uint| -> DecodeResult<T>) -> DecodeR
         f(self, len)
     }
 
-    fn read_map_elt_key<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>)
-                           -> DecodeResult<T> {
+    fn read_map_elt_key<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+       F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_map_elt_key(idx={})", idx);
         f(self)
     }
 
-    fn read_map_elt_val<T>(&mut self, idx: uint, f: |&mut Decoder| -> DecodeResult<T>)
-                           -> DecodeResult<T> {
+    fn read_map_elt_val<T, F>(&mut self, idx: uint, f: F) -> DecodeResult<T> where
+       F: FnOnce(&mut Decoder) -> DecodeResult<T>,
+    {
         debug!("read_map_elt_val(idx={})", idx);
         f(self)
     }
@@ -2645,7 +2680,7 @@ fn test_write_object() {
                    from_str(a.to_pretty_str().as_slice()).unwrap());
     }
 
-    fn with_str_writer(f: |&mut io::Writer|) -> string::String {
+    fn with_str_writer<F>(f: F) -> string::String where F: FnOnce(&mut io::Writer){
         use std::str;
 
         let mut m = Vec::new();
@@ -2846,8 +2881,8 @@ fn test_read_str() {
         assert_eq!(from_str("\"\\r\""), Ok(String("\r".into_string())));
         assert_eq!(from_str("\"\\t\""), Ok(String("\t".into_string())));
         assert_eq!(from_str(" \"foo\" "), Ok(String("foo".into_string())));
-        assert_eq!(from_str("\"\\u12ab\""), Ok(String("\u12ab".into_string())));
-        assert_eq!(from_str("\"\\uAB12\""), Ok(String("\uAB12".into_string())));
+        assert_eq!(from_str("\"\\u12ab\""), Ok(String("\u{12ab}".into_string())));
+        assert_eq!(from_str("\"\\uAB12\""), Ok(String("\u{AB12}".into_string())));
     }
 
     #[test]
@@ -2859,8 +2894,8 @@ fn test_decode_str() {
                  ("\"\\n\"", "\n"),
                  ("\"\\r\"", "\r"),
                  ("\"\\t\"", "\t"),
-                 ("\"\\u12ab\"", "\u12ab"),
-                 ("\"\\uAB12\"", "\uAB12")];
+                 ("\"\\u12ab\"", "\u{12ab}"),
+                 ("\"\\uAB12\"", "\u{AB12}")];
 
         for &(i, o) in s.iter() {
             let v: string::String = super::decode(i).unwrap();
index 1cff4c334e7430d1d8827e6e89281e0c862dc934..390b3976562ffacbb00d3a127e76f7f8ae20a9f1 100644 (file)
@@ -23,7 +23,8 @@
        html_root_url = "http://doc.rust-lang.org/nightly/",
        html_playground_url = "http://play.rust-lang.org/")]
 #![allow(unknown_features)]
-#![feature(macro_rules, default_type_params, phase, slicing_syntax, globs, if_let)]
+#![feature(macro_rules, default_type_params, phase, slicing_syntax, globs)]
+#![feature(unboxed_closures)]
 
 // test harness access
 #[cfg(test)]
index 7539a6dc3486b285ea54f31313f8c971c31ef342..98bd2f6bc930f68ff09a4724486a35fb8dd69333 100644 (file)
@@ -39,58 +39,61 @@ pub trait Encoder<E> {
     fn emit_str(&mut self, v: &str) -> Result<(), E>;
 
     // Compound types:
-    fn emit_enum(&mut self, name: &str, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-
-    fn emit_enum_variant(&mut self,
-                         v_name: &str,
-                         v_id: uint,
-                         len: uint,
-                         f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_enum_variant_arg(&mut self,
-                             a_idx: uint,
-                             f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-
-    fn emit_enum_struct_variant(&mut self,
-                                v_name: &str,
-                                v_id: uint,
-                                len: uint,
-                                f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_enum_struct_variant_field(&mut self,
-                                      f_name: &str,
-                                      f_idx: uint,
-                                      f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-
-    fn emit_struct(&mut self,
-                   name: &str,
-                   len: uint,
-                   f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_struct_field(&mut self,
-                         f_name: &str,
-                         f_idx: uint,
-                         f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-
-    fn emit_tuple(&mut self, len: uint, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_tuple_arg(&mut self, idx: uint, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-
-    fn emit_tuple_struct(&mut self,
-                         name: &str,
-                         len: uint,
-                         f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_tuple_struct_arg(&mut self,
-                             f_idx: uint,
-                             f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
+    fn emit_enum<F>(&mut self, name: &str, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+
+    fn emit_enum_variant<F>(&mut self, v_name: &str,
+                            v_id: uint,
+                            len: uint,
+                            f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_enum_variant_arg<F>(&mut self, a_idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+
+    fn emit_enum_struct_variant<F>(&mut self, v_name: &str,
+                                   v_id: uint,
+                                   len: uint,
+                                   f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_enum_struct_variant_field<F>(&mut self,
+                                         f_name: &str,
+                                         f_idx: uint,
+                                         f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+
+    fn emit_struct<F>(&mut self, name: &str, len: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_struct_field<F>(&mut self, f_name: &str, f_idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+
+    fn emit_tuple<F>(&mut self, len: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_tuple_arg<F>(&mut self, idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+
+    fn emit_tuple_struct<F>(&mut self, name: &str, len: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_tuple_struct_arg<F>(&mut self, f_idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
 
     // Specialized types:
-    fn emit_option(&mut self, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
+    fn emit_option<F>(&mut self, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
     fn emit_option_none(&mut self) -> Result<(), E>;
-    fn emit_option_some(&mut self, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
+    fn emit_option_some<F>(&mut self, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
 
-    fn emit_seq(&mut self, len: uint, f: |this: &mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_seq_elt(&mut self, idx: uint, f: |this: &mut Self| -> Result<(), E>) -> Result<(), E>;
+    fn emit_seq<F>(&mut self, len: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_seq_elt<F>(&mut self, idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
 
-    fn emit_map(&mut self, len: uint, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_map_elt_key(&mut self, idx: uint, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
-    fn emit_map_elt_val(&mut self, idx: uint, f: |&mut Self| -> Result<(), E>) -> Result<(), E>;
+    fn emit_map<F>(&mut self, len: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
+    fn emit_map_elt_key<F>(&mut self, idx: uint, f: F) -> Result<(), E> where
+        F: FnMut(&mut Self) -> Result<(), E>;
+    fn emit_map_elt_val<F>(&mut self, idx: uint, f: F) -> Result<(), E> where
+        F: FnOnce(&mut Self) -> Result<(), E>;
 }
 
 pub trait Decoder<E> {
@@ -113,57 +116,57 @@ pub trait Decoder<E> {
     fn read_str(&mut self) -> Result<String, E>;
 
     // Compound types:
-    fn read_enum<T>(&mut self, name: &str, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
-
-    fn read_enum_variant<T>(&mut self,
-                            names: &[&str],
-                            f: |&mut Self, uint| -> Result<T, E>)
-                            -> Result<T, E>;
-    fn read_enum_variant_arg<T>(&mut self,
-                                a_idx: uint,
-                                f: |&mut Self| -> Result<T, E>)
-                                -> Result<T, E>;
-
-    fn read_enum_struct_variant<T>(&mut self,
-                                   names: &[&str],
-                                   f: |&mut Self, uint| -> Result<T, E>)
-                                   -> Result<T, E>;
-    fn read_enum_struct_variant_field<T>(&mut self,
-                                         &f_name: &str,
-                                         f_idx: uint,
-                                         f: |&mut Self| -> Result<T, E>)
-                                         -> Result<T, E>;
-
-    fn read_struct<T>(&mut self, s_name: &str, len: uint, f: |&mut Self| -> Result<T, E>)
-                      -> Result<T, E>;
-    fn read_struct_field<T>(&mut self,
-                            f_name: &str,
-                            f_idx: uint,
-                            f: |&mut Self| -> Result<T, E>)
-                            -> Result<T, E>;
-
-    fn read_tuple<T>(&mut self, len: uint, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
-    fn read_tuple_arg<T>(&mut self, a_idx: uint, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
-
-    fn read_tuple_struct<T>(&mut self,
-                            s_name: &str,
-                            len: uint,
-                            f: |&mut Self| -> Result<T, E>)
-                            -> Result<T, E>;
-    fn read_tuple_struct_arg<T>(&mut self,
-                                a_idx: uint,
-                                f: |&mut Self| -> Result<T, E>)
-                                -> Result<T, E>;
+    fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+
+    fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self, uint) -> Result<T, E>;
+    fn read_enum_variant_arg<T, F>(&mut self, a_idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+
+    fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self, uint) -> Result<T, E>;
+    fn read_enum_struct_variant_field<T, F>(&mut self,
+                                            &f_name: &str,
+                                            f_idx: uint,
+                                            f: F)
+                                            -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+
+    fn read_struct<T, F>(&mut self, s_name: &str, len: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+    fn read_struct_field<T, F>(&mut self,
+                               f_name: &str,
+                               f_idx: uint,
+                               f: F)
+                               -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+
+    fn read_tuple<T, F>(&mut self, len: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+    fn read_tuple_arg<T, F>(&mut self, a_idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+
+    fn read_tuple_struct<T, F>(&mut self, s_name: &str, len: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+    fn read_tuple_struct_arg<T, F>(&mut self, a_idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
 
     // Specialized types:
-    fn read_option<T>(&mut self, f: |&mut Self, bool| -> Result<T, E>) -> Result<T, E>;
+    fn read_option<T, F>(&mut self, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self, bool) -> Result<T, E>;
 
-    fn read_seq<T>(&mut self, f: |&mut Self, uint| -> Result<T, E>) -> Result<T, E>;
-    fn read_seq_elt<T>(&mut self, idx: uint, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
+    fn read_seq<T, F>(&mut self, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self, uint) -> Result<T, E>;
+    fn read_seq_elt<T, F>(&mut self, idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
 
-    fn read_map<T>(&mut self, f: |&mut Self, uint| -> Result<T, E>) -> Result<T, E>;
-    fn read_map_elt_key<T>(&mut self, idx: uint, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
-    fn read_map_elt_val<T>(&mut self, idx: uint, f: |&mut Self| -> Result<T, E>) -> Result<T, E>;
+    fn read_map<T, F>(&mut self, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self, uint) -> Result<T, E>;
+    fn read_map_elt_key<T, F>(&mut self, idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
+    fn read_map_elt_val<T, F>(&mut self, idx: uint, f: F) -> Result<T, E> where
+        F: FnOnce(&mut Self) -> Result<T, E>;
 
     // Failure
     fn error(&mut self, err: &str) -> E;
@@ -585,13 +588,14 @@ fn decode(d: &mut D) -> Result<Arc<T>, E> {
 // Helper routines
 
 pub trait EncoderHelpers<E> {
-    fn emit_from_vec<T>(&mut self,
-                        v: &[T],
-                        f: |&mut Self, v: &T| -> Result<(), E>) -> Result<(), E>;
+    fn emit_from_vec<T, F>(&mut self, v: &[T], f: F) -> Result<(), E> where
+        F: FnMut(&mut Self, &T) -> Result<(), E>;
 }
 
 impl<E, S:Encoder<E>> EncoderHelpers<E> for S {
-    fn emit_from_vec<T>(&mut self, v: &[T], f: |&mut S, &T| -> Result<(), E>) -> Result<(), E> {
+    fn emit_from_vec<T, F>(&mut self, v: &[T], mut f: F) -> Result<(), E> where
+        F: FnMut(&mut S, &T) -> Result<(), E>,
+    {
         self.emit_seq(v.len(), |this| {
             for (i, e) in v.iter().enumerate() {
                 try!(this.emit_seq_elt(i, |this| {
@@ -604,11 +608,14 @@ fn emit_from_vec<T>(&mut self, v: &[T], f: |&mut S, &T| -> Result<(), E>) -> Res
 }
 
 pub trait DecoderHelpers<E> {
-    fn read_to_vec<T>(&mut self, f: |&mut Self| -> Result<T, E>) -> Result<Vec<T>, E>;
+    fn read_to_vec<T, F>(&mut self, f: F) -> Result<Vec<T>, E> where
+        F: FnMut(&mut Self) -> Result<T, E>;
 }
 
 impl<E, D:Decoder<E>> DecoderHelpers<E> for D {
-    fn read_to_vec<T>(&mut self, f: |&mut D| -> Result<T, E>) -> Result<Vec<T>, E> {
+    fn read_to_vec<T, F>(&mut self, mut f: F) -> Result<Vec<T>, E> where F:
+        FnMut(&mut D) -> Result<T, E>,
+    {
         self.read_seq(|this, len| {
             let mut v = Vec::with_capacity(len);
             for i in range(0, len) {
index 23eb367dbd10a94d9f292fb9b8b8dfb25c78a9e1..ad2167214a7d413c8e688fb70f78e47954b46250 100644 (file)
@@ -20,6 +20,7 @@
 use iter::IteratorExt;
 use kinds::Copy;
 use mem;
+use ops::FnMut;
 use option::Option;
 use option::Option::{Some, None};
 use slice::{SlicePrelude, AsSlice};
@@ -527,7 +528,9 @@ fn into_ascii_lower(mut self) -> Vec<u8> {
 /// - Any other chars are given hex escapes.
 /// - Unicode escapes are never generated by this function.
 #[unstable = "needs to be updated to use an iterator"]
-pub fn escape_default(c: u8, f: |u8|) {
+pub fn escape_default<F>(c: u8, mut f: F) where
+    F: FnMut(u8),
+{
     match c {
         b'\t' => { f(b'\\'); f(b't'); }
         b'\r' => { f(b'\\'); f(b'r'); }
@@ -696,7 +699,7 @@ fn test_ascii_vec() {
 
         assert!("".is_ascii());
         assert!("a".is_ascii());
-        assert!(!"\u2009".is_ascii());
+        assert!(!"\u{2009}".is_ascii());
 
     }
 
index ffcd6505dadd1cab7a67fe42553de9c6f8e2dc10..8a6d329ec466aeb7071fb95b1f4b751292db4653 100644 (file)
@@ -33,8 +33,6 @@
 ///     }
 /// }
 ///
-/// impl Copy for Flags {}
-///
 /// fn main() {
 ///     let e1 = FLAG_A | FLAG_C;
 ///     let e2 = FLAG_B | FLAG_C;
@@ -57,8 +55,6 @@
 ///     }
 /// }
 ///
-/// impl Copy for Flags {}
-///
 /// impl Flags {
 ///     pub fn clear(&mut self) {
 ///         self.bits = 0;  // The `bits` field can be accessed from within the
@@ -121,7 +117,7 @@ macro_rules! bitflags {
     ($(#[$attr:meta])* flags $BitFlags:ident: $T:ty {
         $($(#[$Flag_attr:meta])* const $Flag:ident = $value:expr),+
     }) => {
-        #[deriving(PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
+        #[deriving(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)]
         $(#[$attr])*
         pub struct $BitFlags {
             bits: $T,
@@ -288,16 +284,12 @@ mod tests {
         }
     }
 
-    impl Copy for Flags {}
-
     bitflags! {
         flags AnotherSetOfFlags: i8 {
             const AnotherFlag = -1_i8,
         }
     }
 
-    impl Copy for AnotherSetOfFlags {}
-
     #[test]
     fn test_bits(){
         assert_eq!(Flags::empty().bits(), 0x00000000);
index f89876f7245e60c861a73df35ce717f58d1df24e..44e7291150ef9e0a9c27567a08ab91828a3b27a9 100644 (file)
 
 use kinds::Send;
 use mem;
-use ops::Drop;
+use ops::{Drop, FnOnce};
 use option::Option;
 use option::Option::{Some, None};
 use ptr::RawPtr;
 use ptr;
 use raw;
 use slice::AsSlice;
+use thunk::{Thunk};
 
 /// The type representing a foreign chunk of memory
 pub struct CVec<T> {
     base: *mut T,
     len: uint,
-    dtor: Option<proc():Send>,
+    dtor: Option<Thunk>,
 }
 
 #[unsafe_destructor]
@@ -57,7 +58,7 @@ impl<T> Drop for CVec<T> {
     fn drop(&mut self) {
         match self.dtor.take() {
             None => (),
-            Some(f) => f()
+            Some(f) => f.invoke(())
         }
     }
 }
@@ -90,15 +91,20 @@ pub unsafe fn new(base: *mut T, len: uint) -> CVec<T> {
     ///
     /// * base - A foreign pointer to a buffer
     /// * len - The number of elements in the buffer
-    /// * dtor - A proc to run when the value is destructed, useful
+    /// * dtor - A fn to run when the value is destructed, useful
     ///          for freeing the buffer, etc.
-    pub unsafe fn new_with_dtor(base: *mut T, len: uint,
-                                dtor: proc():Send) -> CVec<T> {
+    pub unsafe fn new_with_dtor<F>(base: *mut T,
+                                   len: uint,
+                                   dtor: F)
+                                   -> CVec<T>
+        where F : FnOnce(), F : Send
+    {
         assert!(base != ptr::null_mut());
+        let dtor: Thunk = Thunk::new(dtor);
         CVec {
             base: base,
             len: len,
-            dtor: Some(dtor),
+            dtor: Some(dtor)
         }
     }
 
@@ -177,8 +183,9 @@ fn malloc(n: uint) -> CVec<u8> {
             let mem = libc::malloc(n as libc::size_t);
             if mem.is_null() { ::alloc::oom() }
 
-            CVec::new_with_dtor(mem as *mut u8, n,
-                proc() { libc::free(mem as *mut libc::c_void); })
+            CVec::new_with_dtor(mem as *mut u8,
+                                n,
+                                move|| { libc::free(mem as *mut libc::c_void); })
         }
     }
 
@@ -218,8 +225,9 @@ fn test_overrun_set() {
     #[test]
     fn test_unwrap() {
         unsafe {
-            let cv = CVec::new_with_dtor(1 as *mut int, 0,
-                proc() { panic!("Don't run this destructor!") });
+            let cv = CVec::new_with_dtor(1 as *mut int,
+                                         0,
+                                         move|:| panic!("Don't run this destructor!"));
             let p = cv.unwrap();
             assert_eq!(p, 1 as *mut int);
         }
index a8dce232d26d576f72c4dc0bdfdf1c055579323d..2a8d97eed05bced13bee11796db34d89d8677858 100644 (file)
@@ -24,7 +24,7 @@
 use kinds::Sized;
 use mem::{mod, replace};
 use num::{Int, UnsignedInt};
-use ops::{Deref, Index, IndexMut};
+use ops::{Deref, FnMut, Index, IndexMut};
 use option::Option;
 use option::Option::{Some, None};
 use result::Result;
@@ -296,10 +296,13 @@ pub struct HashMap<K, V, H = RandomSipHasher> {
 }
 
 /// Search for a pre-hashed key.
-fn search_hashed<K, V, M: Deref<RawTable<K, V>>>(table: M,
-                                                 hash: &SafeHash,
-                                                 is_match: |&K| -> bool)
-                                                 -> SearchResult<K, V, M> {
+fn search_hashed<K, V, M, F>(table: M,
+                             hash: &SafeHash,
+                             mut is_match: F)
+                             -> SearchResult<K, V, M> where
+    M: Deref<RawTable<K, V>>,
+    F: FnMut(&K) -> bool,
+{
     let size = table.size();
     let mut probe = Bucket::new(table, hash);
     let ib = probe.index();
@@ -749,12 +752,14 @@ fn insert_hashed_nocheck(&mut self, hash: SafeHash, k: K, v: V) -> &mut V {
         self.insert_or_replace_with(hash, k, v, |_, _, _| ())
     }
 
-    fn insert_or_replace_with<'a>(&'a mut self,
-                                  hash: SafeHash,
-                                  k: K,
-                                  v: V,
-                                  found_existing: |&mut K, &mut V, V|)
-                                  -> &'a mut V {
+    fn insert_or_replace_with<'a, F>(&'a mut self,
+                                     hash: SafeHash,
+                                     k: K,
+                                     v: V,
+                                     mut found_existing: F)
+                                     -> &'a mut V where
+        F: FnMut(&mut K, &mut V, V),
+    {
         // Worst case, we'll find one empty bucket among `size + 1` buckets.
         let size = self.table.size();
         let mut probe = Bucket::new(&mut self.table, &hash);
@@ -852,7 +857,9 @@ pub fn pop_equiv<Sized? Q:Hash<S> + Equiv<K>>(&mut self, k: &Q) -> Option<V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn keys(&self) -> Keys<K, V> {
-        self.iter().map(|(k, _v)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.iter().map(first)
     }
 
     /// An iterator visiting all values in arbitrary order.
@@ -874,7 +881,9 @@ pub fn keys(&self) -> Keys<K, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn values(&self) -> Values<K, V> {
-        self.iter().map(|(_k, v)| v)
+        fn second<A, B>((_, b): (A, B)) -> B { b }
+
+        self.iter().map(second)
     }
 
     /// An iterator visiting all key-value pairs in arbitrary order.
@@ -946,8 +955,10 @@ pub fn iter_mut(&mut self) -> MutEntries<K, V> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(self) -> MoveEntries<K, V> {
+        fn last_two<A, B, C>((_, b, c): (A, B, C)) -> (B, C) { (b, c) }
+
         MoveEntries {
-            inner: self.table.into_iter().map(|(_, k, v)| (k, v))
+            inner: self.table.into_iter().map(last_two)
         }
     }
 
@@ -1316,7 +1327,12 @@ pub struct MutEntries<'a, K: 'a, V: 'a> {
 
 /// HashMap move iterator
 pub struct MoveEntries<K, V> {
-    inner: iter::Map<'static, (SafeHash, K, V), (K, V), table::MoveEntries<K, V>>
+    inner: iter::Map<
+        (SafeHash, K, V),
+        (K, V),
+        table::MoveEntries<K, V>,
+        fn((SafeHash, K, V)) -> (K, V),
+    >
 }
 
 /// A view into a single occupied location in a HashMap
@@ -1434,11 +1450,11 @@ pub fn set(self, value: V) -> &'a mut V {
 
 /// HashMap keys iterator
 pub type Keys<'a, K, V> =
-    iter::Map<'static, (&'a K, &'a V), &'a K, Entries<'a, K, V>>;
+    iter::Map<(&'a K, &'a V), &'a K, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a K>;
 
 /// HashMap values iterator
 pub type Values<'a, K, V> =
-    iter::Map<'static, (&'a K, &'a V), &'a V, Entries<'a, K, V>>;
+    iter::Map<(&'a K, &'a V), &'a V, Entries<'a, K, V>, fn((&'a K, &'a V)) -> &'a V>;
 
 impl<K: Eq + Hash<S>, V, S, H: Hasher<S> + Default> FromIterator<(K, V)> for HashMap<K, V, H> {
     fn from_iter<T: Iterator<(K, V)>>(iter: T) -> HashMap<K, V, H> {
index b3ccfdbb47cceaad5f883e4cfe4406b0b8f83341..745a8298ee8a5890bd0b0ae68a778772174d738f 100644 (file)
@@ -19,7 +19,7 @@
 use hash::{Hash, Hasher, RandomSipHasher};
 use iter::{Iterator, IteratorExt, FromIterator, FilterMap, Chain, Repeat, Zip, Extend, repeat};
 use iter;
-use option::Option::{Some, None};
+use option::Option::{Some, None, mod};
 use result::Result::{Ok, Err};
 
 use super::map::{HashMap, Entries, MoveEntries, INITIAL_CAPACITY};
@@ -277,7 +277,9 @@ pub fn iter<'a>(&'a self) -> SetItems<'a, T> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn into_iter(self) -> SetMoveItems<T> {
-        self.map.into_iter().map(|(k, _)| k)
+        fn first<A, B>((a, _): (A, B)) -> A { a }
+
+        self.map.into_iter().map(first)
     }
 
     /// Visit the values representing the difference.
@@ -304,10 +306,13 @@ pub fn into_iter(self) -> SetMoveItems<T> {
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
     pub fn difference<'a>(&'a self, other: &'a HashSet<T, H>) -> SetAlgebraItems<'a, T, H> {
-        repeat(other).zip(self.iter())
-            .filter_map(|(other, elt)| {
-                if !other.contains(elt) { Some(elt) } else { None }
-            })
+        fn filter<'a, T, S, H>((other, elt): (&HashSet<T, H>, &'a T)) -> Option<&'a T> where
+            T: Eq + Hash<S>, H: Hasher<S>
+        {
+            if !other.contains(elt) { Some(elt) } else { None }
+        }
+
+        repeat(other).zip(self.iter()).filter_map(filter)
     }
 
     /// Visit the values representing the symmetric difference.
@@ -354,12 +359,14 @@ pub fn symmetric_difference<'a>(&'a self, other: &'a HashSet<T, H>)
     /// assert_eq!(diff, [2i, 3].iter().map(|&x| x).collect());
     /// ```
     #[unstable = "matches collection reform specification, waiting for dust to settle"]
-    pub fn intersection<'a>(&'a self, other: &'a HashSet<T, H>)
-        -> SetAlgebraItems<'a, T, H> {
-        repeat(other).zip(self.iter())
-            .filter_map(|(other, elt)| {
-                if other.contains(elt) { Some(elt) } else { None }
-            })
+    pub fn intersection<'a>(&'a self, other: &'a HashSet<T, H>) -> SetAlgebraItems<'a, T, H> {
+        fn filter<'a, T, S, H>((other, elt): (&HashSet<T, H>, &'a T)) -> Option<&'a T> where
+            T: Eq + Hash<S>, H: Hasher<S>
+        {
+            if other.contains(elt) { Some(elt) } else { None }
+        }
+
+        repeat(other).zip(self.iter()).filter_map(filter)
     }
 
     /// Visit the values representing the union.
@@ -611,18 +618,20 @@ fn default() -> HashSet<T, H> {
 
 /// HashSet iterator
 pub type SetItems<'a, K> =
-    iter::Map<'static, (&'a K, &'a ()), &'a K, Entries<'a, K, ()>>;
+    iter::Map<(&'a K, &'a ()), &'a K, Entries<'a, K, ()>, fn((&'a K, &'a ())) -> &'a K>;
 
 /// HashSet move iterator
-pub type SetMoveItems<K> =
-    iter::Map<'static, (K, ()), K, MoveEntries<K, ()>>;
+pub type SetMoveItems<K> = iter::Map<(K, ()), K, MoveEntries<K, ()>, fn((K, ())) -> K>;
 
 // `Repeat` is used to feed the filter closure an explicit capture
 // of a reference to the other set
 /// Set operations iterator
-pub type SetAlgebraItems<'a, T, H> =
-    FilterMap<'static, (&'a HashSet<T, H>, &'a T), &'a T,
-              Zip<Repeat<&'a HashSet<T, H>>, SetItems<'a, T>>>;
+pub type SetAlgebraItems<'a, T, H> = FilterMap<
+    (&'a HashSet<T, H>, &'a T),
+    &'a T,
+    Zip<Repeat<&'a HashSet<T, H>>, SetItems<'a, T>>,
+    for<'b> fn((&HashSet<T, H>, &'b T)) -> Option<&'b T>,
+>;
 
 #[cfg(test)]
 mod test_set {
index 6cff5a3dd239dd15586491116bd1da1c79678008..0a5b3e5771b79d8d10d32a5493d03242aeff320e 100644 (file)
@@ -72,7 +72,7 @@
 //! ```
 //! // Create a simple streaming channel
 //! let (tx, rx) = channel();
-//! spawn(proc() {
+//! spawn(move|| {
 //!     tx.send(10i);
 //! });
 //! assert_eq!(rx.recv(), 10i);
@@ -87,7 +87,7 @@
 //! let (tx, rx) = channel();
 //! for i in range(0i, 10i) {
 //!     let tx = tx.clone();
-//!     spawn(proc() {
+//!     spawn(move|| {
 //!         tx.send(i);
 //!     })
 //! }
 //!
 //! ```
 //! let (tx, rx) = sync_channel::<int>(0);
-//! spawn(proc() {
+//! spawn(move|| {
 //!     // This will wait for the parent task to start receiving
 //!     tx.send(53);
 //! });
@@ -465,7 +465,7 @@ fn inner_unsafe<'a>(&'a self) -> &'a UnsafeCell<Flavor<T>> {
 /// let (tx, rx) = channel();
 ///
 /// // Spawn off an expensive computation
-/// spawn(proc() {
+/// spawn(move|| {
 /// #   fn expensive_computation() {}
 ///     tx.send(expensive_computation());
 /// });
@@ -504,7 +504,7 @@ pub fn channel<T: Send>() -> (Sender<T>, Receiver<T>) {
 /// // this returns immediately
 /// tx.send(1i);
 ///
-/// spawn(proc() {
+/// spawn(move|| {
 ///     // this will block until the previous message has been received
 ///     tx.send(2i);
 /// });
@@ -1065,7 +1065,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn smoke_threads() {
         let (tx, rx) = channel::<int>();
-        spawn(proc() {
+        spawn(move|| {
             tx.send(1);
         });
         assert_eq!(rx.recv(), 1);
@@ -1093,7 +1093,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn port_gone_concurrent() {
         let (tx, rx) = channel::<int>();
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
         });
         loop { tx.send(1) }
@@ -1102,7 +1102,7 @@ pub fn stress_factor() -> uint {
     test!(fn port_gone_concurrent_shared() {
         let (tx, rx) = channel::<int>();
         let tx2 = tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
         });
         loop {
@@ -1127,7 +1127,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn chan_gone_concurrent() {
         let (tx, rx) = channel::<int>();
-        spawn(proc() {
+        spawn(move|| {
             tx.send(1);
             tx.send(1);
         });
@@ -1136,7 +1136,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn stress() {
         let (tx, rx) = channel::<int>();
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 10000) { tx.send(1i); }
         });
         for _ in range(0u, 10000) {
@@ -1150,7 +1150,7 @@ pub fn stress_factor() -> uint {
         let (tx, rx) = channel::<int>();
         let (dtx, drx) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0, AMT * NTHREADS) {
                 assert_eq!(rx.recv(), 1);
             }
@@ -1163,7 +1163,7 @@ pub fn stress_factor() -> uint {
 
         for _ in range(0, NTHREADS) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 for _ in range(0, AMT) { tx.send(1); }
             });
         }
@@ -1177,7 +1177,7 @@ fn send_from_outside_runtime() {
         let (tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
         let tx4 = tx3.clone();
-        spawn(proc() {
+        spawn(move|| {
             tx1.send(());
             for _ in range(0i, 40) {
                 assert_eq!(rx2.recv(), 1);
@@ -1185,7 +1185,7 @@ fn send_from_outside_runtime() {
             tx3.send(());
         });
         rx1.recv();
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0i, 40) {
                 tx2.send(1);
             }
@@ -1199,7 +1199,7 @@ fn send_from_outside_runtime() {
     fn recv_from_outside_runtime() {
         let (tx, rx) = channel::<int>();
         let (dtx, drx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0i, 40) {
                 assert_eq!(rx.recv(), 1);
             }
@@ -1217,12 +1217,12 @@ fn no_runtime() {
         let (tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
         let tx4 = tx3.clone();
-        spawn(proc() {
+        spawn(move|| {
             assert_eq!(rx1.recv(), 1);
             tx2.send(2);
             tx4.send(());
         });
-        spawn(proc() {
+        spawn(move|| {
             tx1.send(1);
             assert_eq!(rx2.recv(), 2);
             tx3.send(());
@@ -1252,7 +1252,7 @@ fn no_runtime() {
 
     test!(fn oneshot_single_thread_recv_chan_close() {
         // Receiving on a closed chan will panic
-        let res = task::try(proc() {
+        let res = task::try(move|| {
             let (tx, rx) = channel::<int>();
             drop(tx);
             rx.recv();
@@ -1312,7 +1312,7 @@ fn no_runtime() {
 
     test!(fn oneshot_multi_task_recv_then_send() {
         let (tx, rx) = channel::<Box<int>>();
-        spawn(proc() {
+        spawn(move|| {
             assert!(rx.recv() == box 10);
         });
 
@@ -1321,10 +1321,10 @@ fn no_runtime() {
 
     test!(fn oneshot_multi_task_recv_then_close() {
         let (tx, rx) = channel::<Box<int>>();
-        spawn(proc() {
+        spawn(move|| {
             drop(tx);
         });
-        let res = task::try(proc() {
+        let res = task::try(move|| {
             assert!(rx.recv() == box 10);
         });
         assert!(res.is_err());
@@ -1333,7 +1333,7 @@ fn no_runtime() {
     test!(fn oneshot_multi_thread_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = channel::<int>();
-            spawn(proc() {
+            spawn(move|| {
                 drop(rx);
             });
             drop(tx);
@@ -1343,10 +1343,10 @@ fn no_runtime() {
     test!(fn oneshot_multi_thread_send_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = channel::<int>();
-            spawn(proc() {
+            spawn(move|| {
                 drop(rx);
             });
-            let _ = task::try(proc() {
+            let _ = task::try(move|| {
                 tx.send(1);
             });
         }
@@ -1355,14 +1355,14 @@ fn no_runtime() {
     test!(fn oneshot_multi_thread_recv_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = channel::<int>();
-            spawn(proc() {
-                let res = task::try(proc() {
+            spawn(move|| {
+                let res = task::try(move|| {
                     rx.recv();
                 });
                 assert!(res.is_err());
             });
-            spawn(proc() {
-                spawn(proc() {
+            spawn(move|| {
+                spawn(move|| {
                     drop(tx);
                 });
             });
@@ -1372,10 +1372,10 @@ fn no_runtime() {
     test!(fn oneshot_multi_thread_send_recv_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = channel();
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(box 10i);
             });
-            spawn(proc() {
+            spawn(move|| {
                 assert!(rx.recv() == box 10i);
             });
         }
@@ -1391,7 +1391,7 @@ fn no_runtime() {
             fn send(tx: Sender<Box<int>>, i: int) {
                 if i == 10 { return }
 
-                spawn(proc() {
+                spawn(move|| {
                     tx.send(box i);
                     send(tx, i + 1);
                 });
@@ -1400,7 +1400,7 @@ fn send(tx: Sender<Box<int>>, i: int) {
             fn recv(rx: Receiver<Box<int>>, i: int) {
                 if i == 10 { return }
 
-                spawn(proc() {
+                spawn(move|| {
                     assert!(rx.recv() == box i);
                     recv(rx, i + 1);
                 });
@@ -1420,7 +1420,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let total = stress_factor() + 100;
         for _ in range(0, total) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(());
             });
         }
@@ -1434,7 +1434,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx, rx) = channel::<int>();
         let (total_tx, total_rx) = channel::<int>();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acc = 0;
             for x in rx.iter() {
                 acc += x;
@@ -1453,7 +1453,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx, rx) = channel::<int>();
         let (count_tx, count_rx) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut count = 0;
             for x in rx.iter() {
                 if count >= 3 {
@@ -1477,7 +1477,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx1, rx1) = channel::<int>();
         let (tx2, rx2) = channel::<()>();
         let (tx3, rx3) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             rx2.recv();
             tx1.send(1);
             tx3.send(());
@@ -1501,7 +1501,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
     test!(fn destroy_upgraded_shared_port_when_sender_still_active() {
         let (tx, rx) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             rx.recv(); // wait on a oneshot
             drop(rx);  // destroy a shared
             tx2.send(());
@@ -1522,7 +1522,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         use rustrt::thread::Thread;
 
         let (tx, rx) = channel();
-        let t = Thread::start(proc() {
+        let t = Thread::start(move|| {
             for _ in range(0u, 1000) {
                 tx.send(());
             }
@@ -1538,7 +1538,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
 
         let (tx, rx) = channel();
         let (cdone, pdone) = channel();
-        let t = Thread::start(proc() {
+        let t = Thread::start(move|| {
             let mut hits = 0u;
             while hits < 10 {
                 match rx.try_recv() {
@@ -1591,7 +1591,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn smoke_threads() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             tx.send(1);
         });
         assert_eq!(rx.recv(), 1);
@@ -1613,7 +1613,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn port_gone_concurrent() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
         });
         loop { tx.send(1) }
@@ -1622,7 +1622,7 @@ pub fn stress_factor() -> uint {
     test!(fn port_gone_concurrent_shared() {
         let (tx, rx) = sync_channel::<int>(0);
         let tx2 = tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
         });
         loop {
@@ -1647,7 +1647,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn chan_gone_concurrent() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             tx.send(1);
             tx.send(1);
         });
@@ -1656,7 +1656,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn stress() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 10000) { tx.send(1); }
         });
         for _ in range(0u, 10000) {
@@ -1670,7 +1670,7 @@ pub fn stress_factor() -> uint {
         let (tx, rx) = sync_channel::<int>(0);
         let (dtx, drx) = sync_channel::<()>(0);
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0, AMT * NTHREADS) {
                 assert_eq!(rx.recv(), 1);
             }
@@ -1683,7 +1683,7 @@ pub fn stress_factor() -> uint {
 
         for _ in range(0, NTHREADS) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 for _ in range(0, AMT) { tx.send(1); }
             });
         }
@@ -1712,7 +1712,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn oneshot_single_thread_recv_chan_close() {
         // Receiving on a closed chan will panic
-        let res = task::try(proc() {
+        let res = task::try(move|| {
             let (tx, rx) = sync_channel::<int>(0);
             drop(tx);
             rx.recv();
@@ -1777,7 +1777,7 @@ pub fn stress_factor() -> uint {
 
     test!(fn oneshot_multi_task_recv_then_send() {
         let (tx, rx) = sync_channel::<Box<int>>(0);
-        spawn(proc() {
+        spawn(move|| {
             assert!(rx.recv() == box 10);
         });
 
@@ -1786,10 +1786,10 @@ pub fn stress_factor() -> uint {
 
     test!(fn oneshot_multi_task_recv_then_close() {
         let (tx, rx) = sync_channel::<Box<int>>(0);
-        spawn(proc() {
+        spawn(move|| {
             drop(tx);
         });
-        let res = task::try(proc() {
+        let res = task::try(move|| {
             assert!(rx.recv() == box 10);
         });
         assert!(res.is_err());
@@ -1798,7 +1798,7 @@ pub fn stress_factor() -> uint {
     test!(fn oneshot_multi_thread_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = sync_channel::<int>(0);
-            spawn(proc() {
+            spawn(move|| {
                 drop(rx);
             });
             drop(tx);
@@ -1808,10 +1808,10 @@ pub fn stress_factor() -> uint {
     test!(fn oneshot_multi_thread_send_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = sync_channel::<int>(0);
-            spawn(proc() {
+            spawn(move|| {
                 drop(rx);
             });
-            let _ = task::try(proc() {
+            let _ = task::try(move|| {
                 tx.send(1);
             });
         }
@@ -1820,14 +1820,14 @@ pub fn stress_factor() -> uint {
     test!(fn oneshot_multi_thread_recv_close_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = sync_channel::<int>(0);
-            spawn(proc() {
-                let res = task::try(proc() {
+            spawn(move|| {
+                let res = task::try(move|| {
                     rx.recv();
                 });
                 assert!(res.is_err());
             });
-            spawn(proc() {
-                spawn(proc() {
+            spawn(move|| {
+                spawn(move|| {
                     drop(tx);
                 });
             });
@@ -1837,10 +1837,10 @@ pub fn stress_factor() -> uint {
     test!(fn oneshot_multi_thread_send_recv_stress() {
         for _ in range(0, stress_factor()) {
             let (tx, rx) = sync_channel::<Box<int>>(0);
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(box 10i);
             });
-            spawn(proc() {
+            spawn(move|| {
                 assert!(rx.recv() == box 10i);
             });
         }
@@ -1856,7 +1856,7 @@ pub fn stress_factor() -> uint {
             fn send(tx: SyncSender<Box<int>>, i: int) {
                 if i == 10 { return }
 
-                spawn(proc() {
+                spawn(move|| {
                     tx.send(box i);
                     send(tx, i + 1);
                 });
@@ -1865,7 +1865,7 @@ fn send(tx: SyncSender<Box<int>>, i: int) {
             fn recv(rx: Receiver<Box<int>>, i: int) {
                 if i == 10 { return }
 
-                spawn(proc() {
+                spawn(move|| {
                     assert!(rx.recv() == box i);
                     recv(rx, i + 1);
                 });
@@ -1885,7 +1885,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let total = stress_factor() + 100;
         for _ in range(0, total) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(());
             });
         }
@@ -1899,7 +1899,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx, rx) = sync_channel::<int>(0);
         let (total_tx, total_rx) = sync_channel::<int>(0);
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acc = 0;
             for x in rx.iter() {
                 acc += x;
@@ -1918,7 +1918,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx, rx) = sync_channel::<int>(0);
         let (count_tx, count_rx) = sync_channel(0);
 
-        spawn(proc() {
+        spawn(move|| {
             let mut count = 0;
             for x in rx.iter() {
                 if count >= 3 {
@@ -1942,7 +1942,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let (tx1, rx1) = sync_channel::<int>(1);
         let (tx2, rx2) = sync_channel::<()>(1);
         let (tx3, rx3) = sync_channel::<()>(1);
-        spawn(proc() {
+        spawn(move|| {
             rx2.recv();
             tx1.send(1);
             tx3.send(());
@@ -1966,7 +1966,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
     test!(fn destroy_upgraded_shared_port_when_sender_still_active() {
         let (tx, rx) = sync_channel::<()>(0);
         let (tx2, rx2) = sync_channel::<()>(0);
-        spawn(proc() {
+        spawn(move|| {
             rx.recv(); // wait on a oneshot
             drop(rx);  // destroy a shared
             tx2.send(());
@@ -1988,7 +1988,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
 
         let (tx, rx) = sync_channel::<()>(0);
         let (cdone, pdone) = channel();
-        let t = Thread::start(proc() {
+        let t = Thread::start(move|| {
             let mut hits = 0u;
             while hits < 10 {
                 match rx.try_recv() {
@@ -2008,20 +2008,20 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
 
     test!(fn send_opt1() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() { rx.recv(); });
+        spawn(move|| { rx.recv(); });
         assert_eq!(tx.send_opt(1), Ok(()));
     })
 
     test!(fn send_opt2() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() { drop(rx); });
+        spawn(move|| { drop(rx); });
         assert_eq!(tx.send_opt(1), Err(1));
     })
 
     test!(fn send_opt3() {
         let (tx, rx) = sync_channel::<int>(1);
         assert_eq!(tx.send_opt(1), Ok(()));
-        spawn(proc() { drop(rx); });
+        spawn(move|| { drop(rx); });
         assert_eq!(tx.send_opt(1), Err(1));
     })
 
@@ -2030,11 +2030,11 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
         let tx2 = tx.clone();
         let (done, donerx) = channel();
         let done2 = done.clone();
-        spawn(proc() {
+        spawn(move|| {
             assert_eq!(tx.send_opt(1), Err(1));
             done.send(());
         });
-        spawn(proc() {
+        spawn(move|| {
             assert_eq!(tx2.send_opt(2), Err(2));
             done2.send(());
         });
@@ -2063,7 +2063,7 @@ fn recv(rx: Receiver<Box<int>>, i: int) {
 
     test!(fn try_send4() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 1000) { task::deschedule(); }
             assert_eq!(tx.try_send(1), Ok(()));
         });
@@ -2075,7 +2075,7 @@ fn repro() {
             let (tx1, rx1) = sync_channel::<()>(3);
             let (tx2, rx2) = sync_channel::<()>(3);
 
-            spawn(proc() {
+            spawn(move|| {
                 rx1.recv();
                 tx2.try_send(()).unwrap();
             });
index d4249abc3dda1188715d076f48b409a5c4cff36a..db4e3eac449507992df1bb8932c5ec6d6c732cf4 100644 (file)
@@ -178,7 +178,7 @@ fn test() {
         for _ in range(0, nthreads) {
             let tx = tx.clone();
             let q = q.clone();
-            spawn(proc() {
+            spawn(move|| {
                 for i in range(0, nmsgs) {
                     q.push(i);
                 }
index 3191519815ae46ed6801162eb76260dfb96cfbde..e145b0df7f32acfafff418965f02fe4092a19e94 100644 (file)
@@ -403,7 +403,7 @@ macro_rules! select {
         let (_tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<int>();
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 20) { task::deschedule(); }
             tx1.send(1);
             rx3.recv();
@@ -426,7 +426,7 @@ macro_rules! select {
         let (tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 20) { task::deschedule(); }
             tx1.send(1);
             tx2.send(2);
@@ -452,7 +452,7 @@ macro_rules! select {
         let (tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             for i in range(0, AMT) {
                 if i % 2 == 0 {
                     tx1.send(i);
@@ -477,7 +477,7 @@ macro_rules! select {
         let (_tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             rx3.recv();
             tx1.clone();
             assert_eq!(rx3.try_recv(), Err(Empty));
@@ -498,7 +498,7 @@ macro_rules! select {
         let (_tx2, rx2) = channel::<int>();
         let (tx3, rx3) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             rx3.recv();
             tx1.clone();
             assert_eq!(rx3.try_recv(), Err(Empty));
@@ -518,7 +518,7 @@ macro_rules! select {
         let (tx1, rx1) = channel::<()>();
         let (tx2, rx2) = channel::<()>();
         let (tx3, rx3) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let s = Select::new();
             let mut h1 = s.handle(&rx1);
             let mut h2 = s.handle(&rx2);
@@ -624,7 +624,7 @@ macro_rules! select {
     test!(fn oneshot_data_waiting() {
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             select! {
                 () = rx1.recv() => {}
             }
@@ -643,7 +643,7 @@ macro_rules! select {
         tx1.send(());
         rx1.recv();
         rx1.recv();
-        spawn(proc() {
+        spawn(move|| {
             select! {
                 () = rx1.recv() => {}
             }
@@ -661,7 +661,7 @@ macro_rules! select {
         drop(tx1.clone());
         tx1.send(());
         rx1.recv();
-        spawn(proc() {
+        spawn(move|| {
             select! {
                 () = rx1.recv() => {}
             }
@@ -683,7 +683,7 @@ macro_rules! select {
 
     test!(fn sync2() {
         let (tx, rx) = sync_channel::<int>(0);
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, 100) { task::deschedule() }
             tx.send(1);
         });
@@ -695,8 +695,8 @@ macro_rules! select {
     test!(fn sync3() {
         let (tx1, rx1) = sync_channel::<int>(0);
         let (tx2, rx2): (Sender<int>, Receiver<int>) = channel();
-        spawn(proc() { tx1.send(1); });
-        spawn(proc() { tx2.send(2); });
+        spawn(move|| { tx1.send(1); });
+        spawn(move|| { tx2.send(2); });
         select! {
             n = rx1.recv() => {
                 assert_eq!(n, 1);
index a6b4ab71bacc1be1acabe6fc15192f63c15146cd..db8fff772a4d3a6b97e432b23fd911b38a1e7ada 100644 (file)
@@ -316,7 +316,7 @@ unsafe fn stress_bound(bound: uint) {
 
             let (tx, rx) = channel();
             let q2 = q.clone();
-            spawn(proc() {
+            spawn(move|| {
                 for _ in range(0u, 100000) {
                     loop {
                         match q2.pop() {
index 96b075ab569bf35827d0201ddcc472b64111f2c0..059ad7537193f72d39e27b4f333f72940829681f 100644 (file)
@@ -216,6 +216,7 @@ pub mod dl {
     use c_str::{CString, ToCStr};
     use libc;
     use kinds::Copy;
+    use ops::FnOnce;
     use ptr;
     use result::*;
     use result::Result::{Err, Ok};
@@ -231,7 +232,9 @@ pub unsafe fn open_internal() -> *mut u8 {
         dlopen(ptr::null(), Lazy as libc::c_int) as *mut u8
     }
 
-    pub fn check_for_errors_in<T>(f: || -> T) -> Result<T, String> {
+    pub fn check_for_errors_in<T, F>(f: F) -> Result<T, String> where
+        F: FnOnce() -> T,
+    {
         use sync::{StaticMutex, MUTEX_INIT};
         static LOCK: StaticMutex = MUTEX_INIT;
         unsafe {
@@ -287,6 +290,7 @@ pub mod dl {
     use c_str::ToCStr;
     use iter::IteratorExt;
     use libc;
+    use ops::FnOnce;
     use os;
     use ptr;
     use result::Result;
@@ -312,7 +316,9 @@ pub unsafe fn open_internal() -> *mut u8 {
         handle as *mut u8
     }
 
-    pub fn check_for_errors_in<T>(f: || -> T) -> Result<T, String> {
+    pub fn check_for_errors_in<T, F>(f: F) -> Result<T, String> where
+        F: FnOnce() -> T,
+    {
         unsafe {
             SetLastError(0);
 
index a8de7356fe7d1a762ceb14d21eb3751f44be1916..a16b84d0c167e285e53851f7d55641fde6270b47 100644 (file)
@@ -80,7 +80,7 @@ pub fn get_ref<'a>(&self) -> &R { &self.inner }
 
     /// Gets a mutable reference to the underlying reader.
     ///
-    /// ## Warning
+    /// # Warning
     ///
     /// It is inadvisable to directly read from the underlying reader.
     pub fn get_mut(&mut self) -> &mut R { &mut self.inner }
@@ -185,7 +185,7 @@ pub fn get_ref(&self) -> &W { self.inner.as_ref().unwrap() }
 
     /// Gets a mutable reference to the underlying write.
     ///
-    /// ## Warning
+    /// # Warning
     ///
     /// It is inadvisable to directly read from the underlying writer.
     pub fn get_mut(&mut self) -> &mut W { self.inner.as_mut().unwrap() }
@@ -357,7 +357,7 @@ pub fn get_ref(&self) -> &S {
 
     /// Gets a mutable reference to the underlying stream.
     ///
-    /// ## Warning
+    /// # Warning
     ///
     /// It is inadvisable to read directly from or write directly to the
     /// underlying stream.
index 4ec1a3764db66ca94ec9ce6ce682cfbbbc105a18..308dc0941013818b619adf070da157988b193ebf 100644 (file)
@@ -161,7 +161,7 @@ mod test {
     #[test]
     fn test_rx_reader() {
         let (tx, rx) = channel();
-        task::spawn(proc() {
+        task::spawn(move|| {
           tx.send(vec![1u8, 2u8]);
           tx.send(vec![]);
           tx.send(vec![3u8, 4u8]);
@@ -203,7 +203,7 @@ fn test_rx_reader() {
     #[test]
     fn test_rx_buffer() {
         let (tx, rx) = channel();
-        task::spawn(proc() {
+        task::spawn(move|| {
           tx.send(b"he".to_vec());
           tx.send(b"llo wo".to_vec());
           tx.send(b"".to_vec());
@@ -229,7 +229,7 @@ fn test_chan_writer() {
         writer.write_be_u32(42).unwrap();
 
         let wanted = vec![0u8, 0u8, 0u8, 42u8];
-        let got = match task::try(proc() { rx.recv() }) {
+        let got = match task::try(move|| { rx.recv() }) {
             Ok(got) => got,
             Err(_) => panic!(),
         };
index 1bdf99f6d6dce82d1048c0a1173fdd209df641e8..69712e39d910851830a5507596f1e7663e5c3950 100644 (file)
@@ -19,6 +19,7 @@
 use io;
 use iter::Iterator;
 use num::Int;
+use ops::FnOnce;
 use option::Option;
 use option::Option::{Some, None};
 use ptr::RawPtr;
@@ -76,7 +77,9 @@ fn next(&mut self) -> Option<IoResult<u8>> {
 /// * `f`: A callback that receives the value.
 ///
 /// This function returns the value returned by the callback, for convenience.
-pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
+pub fn u64_to_le_bytes<T, F>(n: u64, size: uint, f: F) -> T where
+    F: FnOnce(&[u8]) -> T,
+{
     use mem::transmute;
 
     // LLVM fails to properly optimize this when using shifts instead of the to_le* intrinsics
@@ -115,7 +118,9 @@ pub fn u64_to_le_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
 /// * `f`: A callback that receives the value.
 ///
 /// This function returns the value returned by the callback, for convenience.
-pub fn u64_to_be_bytes<T>(n: u64, size: uint, f: |v: &[u8]| -> T) -> T {
+pub fn u64_to_be_bytes<T, F>(n: u64, size: uint, f: F) -> T where
+    F: FnOnce(&[u8]) -> T,
+{
     use mem::transmute;
 
     // LLVM fails to properly optimize this when using shifts instead of the to_be* intrinsics
index 5611c6526ad3d58267e637d598cbaf6a4e978778..da0834dc9ef37d5616e6f54942d21009d15b2f1f 100644 (file)
@@ -1215,7 +1215,7 @@ fn unicode_path_is_dir() {
         assert!(dirpath.is_dir());
 
         let mut filepath = dirpath;
-        filepath.push("unicode-file-\uac00\u4e00\u30fc\u4f60\u597d.rs");
+        filepath.push("unicode-file-\u{ac00}\u{4e00}\u{30fc}\u{4f60}\u{597d}.rs");
         check!(File::create(&filepath)); // ignore return; touch only
         assert!(!filepath.is_dir());
         assert!(filepath.exists());
index dc212e7cab3aed33a3c88b10e0acecb322f3f331..4baeaabc6c6a5655d43c9e35853736315e4a9498 100644 (file)
 //!     for stream in acceptor.incoming() {
 //!         match stream {
 //!             Err(e) => { /* connection failed */ }
-//!             Ok(stream) => spawn(proc() {
+//!             Ok(stream) => spawn(move|| {
 //!                 // connection succeeded
 //!                 handle_client(stream)
 //!             })
 use iter::{Iterator, IteratorExt};
 use kinds::Copy;
 use mem::transmute;
-use ops::{BitOr, BitXor, BitAnd, Sub, Not};
+use ops::{BitOr, BitXor, BitAnd, Sub, Not, FnOnce};
 use option::Option;
 use option::Option::{Some, None};
 use os;
@@ -426,18 +426,22 @@ impl Copy for IoErrorKind {}
 /// A trait that lets you add a `detail` to an IoError easily
 trait UpdateIoError<T> {
     /// Returns an IoError with updated description and detail
-    fn update_err(self, desc: &'static str, detail: |&IoError| -> String) -> Self;
+    fn update_err<D>(self, desc: &'static str, detail: D) -> Self where
+        D: FnOnce(&IoError) -> String;
 
     /// Returns an IoError with updated detail
-    fn update_detail(self, detail: |&IoError| -> String) -> Self;
+    fn update_detail<D>(self, detail: D) -> Self where
+        D: FnOnce(&IoError) -> String;
 
     /// Returns an IoError with update description
     fn update_desc(self, desc: &'static str) -> Self;
 }
 
 impl<T> UpdateIoError<T> for IoResult<T> {
-    fn update_err(self, desc: &'static str, detail: |&IoError| -> String) -> IoResult<T> {
-        self.map_err(|mut e| {
+    fn update_err<D>(self, desc: &'static str, detail: D) -> IoResult<T> where
+        D: FnOnce(&IoError) -> String,
+    {
+        self.map_err(move |mut e| {
             let detail = detail(&e);
             e.desc = desc;
             e.detail = Some(detail);
@@ -445,8 +449,10 @@ fn update_err(self, desc: &'static str, detail: |&IoError| -> String) -> IoResul
         })
     }
 
-    fn update_detail(self, detail: |&IoError| -> String) -> IoResult<T> {
-        self.map_err(|mut e| { e.detail = Some(detail(&e)); e })
+    fn update_detail<D>(self, detail: D) -> IoResult<T> where
+        D: FnOnce(&IoError) -> String,
+    {
+        self.map_err(move |mut e| { e.detail = Some(detail(&e)); e })
     }
 
     fn update_desc(self, desc: &'static str) -> IoResult<T> {
@@ -1904,7 +1910,6 @@ impl Copy for UnstableFileStat {}
     }
 }
 
-impl Copy for FilePermission {}
 
 impl Default for FilePermission {
     #[inline]
index f59dd37c0da16cb493c3be5681e6f28924744ccf..62965c48a2680cffa18ac51025ef516b0af72944 100644 (file)
@@ -22,6 +22,7 @@
 use io::{mod, IoResult, IoError};
 use io::net;
 use iter::{Iterator, IteratorExt};
+use ops::FnOnce;
 use option::Option;
 use option::Option::{None, Some};
 use result::Result::{Ok, Err};
@@ -100,8 +101,9 @@ fn is_eof(&self) -> bool {
     }
 
     // Commit only if parser returns Some
-    fn read_atomically<T>(&mut self, cb: |&mut Parser| -> Option<T>)
-                       -> Option<T> {
+    fn read_atomically<T, F>(&mut self, cb: F) -> Option<T> where
+        F: FnOnce(&mut Parser) -> Option<T>,
+    {
         let pos = self.pos;
         let r = cb(self);
         if r.is_none() {
@@ -111,9 +113,10 @@ fn read_atomically<T>(&mut self, cb: |&mut Parser| -> Option<T>)
     }
 
     // Commit only if parser read till EOF
-    fn read_till_eof<T>(&mut self, cb: |&mut Parser| -> Option<T>)
-                     -> Option<T> {
-        self.read_atomically(|p| {
+    fn read_till_eof<T, F>(&mut self, cb: F) -> Option<T> where
+        F: FnOnce(&mut Parser) -> Option<T>,
+    {
+        self.read_atomically(move |p| {
             match cb(p) {
                 Some(x) => if p.is_eof() {Some(x)} else {None},
                 None => None,
@@ -134,15 +137,16 @@ fn read_or<T>(&mut self, parsers: &mut [|&mut Parser| -> Option<T>])
     }
 
     // Apply 3 parsers sequentially
-    fn read_seq_3<A,
-                  B,
-                  C>(
-                  &mut self,
-                  pa: |&mut Parser| -> Option<A>,
-                  pb: |&mut Parser| -> Option<B>,
-                  pc: |&mut Parser| -> Option<C>)
-                  -> Option<(A, B, C)> {
-        self.read_atomically(|p| {
+    fn read_seq_3<A, B, C, PA, PB, PC>(&mut self,
+                                       pa: PA,
+                                       pb: PB,
+                                       pc: PC)
+                                       -> Option<(A, B, C)> where
+        PA: FnOnce(&mut Parser) -> Option<A>,
+        PB: FnOnce(&mut Parser) -> Option<B>,
+        PC: FnOnce(&mut Parser) -> Option<C>,
+    {
+        self.read_atomically(move |p| {
             let a = pa(p);
             let b = if a.is_some() { pb(p) } else { None };
             let c = if b.is_some() { pc(p) } else { None };
@@ -327,22 +331,22 @@ fn read_ip_addr(&mut self) -> Option<IpAddr> {
     }
 
     fn read_socket_addr(&mut self) -> Option<SocketAddr> {
-        let ip_addr = |p: &mut Parser| {
+        let ip_addr = |&: p: &mut Parser| {
             let ipv4_p = |p: &mut Parser| p.read_ip_addr();
             let ipv6_p = |p: &mut Parser| {
-                let open_br = |p: &mut Parser| p.read_given_char('[');
-                let ip_addr = |p: &mut Parser| p.read_ipv6_addr();
-                let clos_br = |p: &mut Parser| p.read_given_char(']');
-                p.read_seq_3::<char, IpAddr, char>(open_br, ip_addr, clos_br)
+                let open_br = |&: p: &mut Parser| p.read_given_char('[');
+                let ip_addr = |&: p: &mut Parser| p.read_ipv6_addr();
+                let clos_br = |&: p: &mut Parser| p.read_given_char(']');
+                p.read_seq_3::<char, IpAddr, char, _, _, _>(open_br, ip_addr, clos_br)
                         .map(|t| match t { (_, ip, _) => ip })
             };
             p.read_or(&mut [ipv4_p, ipv6_p])
         };
-        let colon = |p: &mut Parser| p.read_given_char(':');
-        let port  = |p: &mut Parser| p.read_number(10, 5, 0x10000).map(|n| n as u16);
+        let colon = |&: p: &mut Parser| p.read_given_char(':');
+        let port  = |&: p: &mut Parser| p.read_number(10, 5, 0x10000).map(|n| n as u16);
 
         // host, colon, port
-        self.read_seq_3::<IpAddr, char, u16>(ip_addr, colon, port)
+        self.read_seq_3::<IpAddr, char, u16, _, _, _>(ip_addr, colon, port)
                 .map(|t| match t { (ip, _, port) => SocketAddr { ip: ip, port: port } })
     }
 }
index 09e5639bea9440424c339f8ae5bf97286a0e8c76..2056933e6df6f1ba01a9881898b379b9e481d497 100644 (file)
@@ -11,6 +11,7 @@
 //! Networking I/O
 
 use io::{IoError, IoResult, InvalidInput};
+use ops::FnMut;
 use option::Option::None;
 use result::Result::{Ok, Err};
 use self::ip::{SocketAddr, ToSocketAddr};
 pub mod ip;
 pub mod pipe;
 
-fn with_addresses<A: ToSocketAddr, T>(addr: A, action: |SocketAddr| -> IoResult<T>)
-    -> IoResult<T> {
+fn with_addresses<A, T, F>(addr: A, mut action: F) -> IoResult<T> where
+    A: ToSocketAddr,
+    F: FnMut(SocketAddr) -> IoResult<T>,
+{
     const DEFAULT_ERROR: IoError = IoError {
         kind: InvalidInput,
         desc: "no addresses found for hostname",
index ec997b71986cc4782471827e2dee86a72a5d2a66..9f2f41c002108425e16c3eaa3e9bd2602ee272a8 100644 (file)
@@ -273,13 +273,16 @@ mod tests {
     use io::fs::PathExtensions;
     use time::Duration;
 
-    pub fn smalltest(server: proc(UnixStream):Send, client: proc(UnixStream):Send) {
+    pub fn smalltest<F,G>(server: F, client: G)
+        where F : FnOnce(UnixStream), F : Send,
+              G : FnOnce(UnixStream), G : Send
+    {
         let path1 = next_test_unix();
         let path2 = path1.clone();
 
         let mut acceptor = UnixListener::bind(&path1).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             match UnixStream::connect(&path2) {
                 Ok(c) => client(c),
                 Err(e) => panic!("failed connect: {}", e),
@@ -321,11 +324,11 @@ fn connect_error() {
 
     #[test]
     fn smoke() {
-        smalltest(proc(mut server) {
+        smalltest(move |mut server| {
             let mut buf = [0];
             server.read(&mut buf).unwrap();
             assert!(buf[0] == 99);
-        }, proc(mut client) {
+        }, move|mut client| {
             client.write(&[99]).unwrap();
         })
     }
@@ -333,18 +336,18 @@ fn smoke() {
     #[cfg_attr(windows, ignore)] // FIXME(#12516)
     #[test]
     fn read_eof() {
-        smalltest(proc(mut server) {
+        smalltest(move|mut server| {
             let mut buf = [0];
             assert!(server.read(&mut buf).is_err());
             assert!(server.read(&mut buf).is_err());
-        }, proc(_client) {
+        }, move|_client| {
             // drop the client
         })
     }
 
     #[test]
     fn write_begone() {
-        smalltest(proc(mut server) {
+        smalltest(move|mut server| {
             let buf = [0];
             loop {
                 match server.write(&buf) {
@@ -358,7 +361,7 @@ fn write_begone() {
                     }
                 }
             }
-        }, proc(_client) {
+        }, move|_client| {
             // drop the client
         })
     }
@@ -374,7 +377,7 @@ fn accept_lots() {
             Err(e) => panic!("failed listen: {}", e),
         };
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0u, times) {
                 let mut stream = UnixStream::connect(&path2);
                 match stream.write(&[100]) {
@@ -408,7 +411,7 @@ fn unix_clone_smoke() {
         let addr = next_test_unix();
         let mut acceptor = UnixListener::bind(&addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr);
             let mut buf = [0, 0];
             debug!("client reading");
@@ -424,7 +427,7 @@ fn unix_clone_smoke() {
 
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             rx1.recv();
             debug!("writer writing");
@@ -447,7 +450,7 @@ fn unix_clone_two_read() {
         let (tx1, rx) = channel();
         let tx2 = tx1.clone();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr);
             s.write(&[1]).unwrap();
             rx.recv();
@@ -459,7 +462,7 @@ fn unix_clone_two_read() {
         let s2 = s1.clone();
 
         let (done, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             let mut buf = [0, 0];
             s2.read(&mut buf).unwrap();
@@ -478,7 +481,7 @@ fn unix_clone_two_write() {
         let addr = next_test_unix();
         let mut acceptor = UnixListener::bind(&addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr);
             let buf = &mut [0, 1];
             s.read(buf).unwrap();
@@ -489,7 +492,7 @@ fn unix_clone_two_write() {
         let s2 = s1.clone();
 
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             s2.write(&[1]).unwrap();
             tx.send(());
@@ -536,7 +539,7 @@ fn accept_timeout() {
         // continue to receive any pending connections.
         let (tx, rx) = channel();
         let addr2 = addr.clone();
-        spawn(proc() {
+        spawn(move|| {
             tx.send(UnixStream::connect(&addr2).unwrap());
         });
         let l = rx.recv();
@@ -554,7 +557,7 @@ fn accept_timeout() {
         // Unset the timeout and make sure that this always blocks.
         a.set_timeout(None);
         let addr2 = addr.clone();
-        spawn(proc() {
+        spawn(move|| {
             drop(UnixStream::connect(&addr2).unwrap());
         });
         a.accept().unwrap();
@@ -592,7 +595,7 @@ fn close_readwrite_smoke() {
         let addr = next_test_unix();
         let a = UnixListener::bind(&addr).listen().unwrap();
         let (_tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             let _s = a.accept().unwrap();
             let _ = rx.recv_opt();
@@ -629,7 +632,7 @@ fn close_read_wakes_up() {
         let addr = next_test_unix();
         let a = UnixListener::bind(&addr).listen().unwrap();
         let (_tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             let _s = a.accept().unwrap();
             let _ = rx.recv_opt();
@@ -638,7 +641,7 @@ fn close_read_wakes_up() {
         let mut s = UnixStream::connect(&addr).unwrap();
         let s2 = s.clone();
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             assert!(s2.read(&mut [0]).is_err());
             tx.send(());
@@ -655,7 +658,7 @@ fn readwrite_timeouts() {
         let addr = next_test_unix();
         let mut a = UnixListener::bind(&addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr).unwrap();
             rx.recv();
             assert!(s.write(&[0]).is_ok());
@@ -693,7 +696,7 @@ fn read_timeouts() {
         let addr = next_test_unix();
         let mut a = UnixListener::bind(&addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr).unwrap();
             rx.recv();
             let mut amt = 0;
@@ -722,7 +725,7 @@ fn write_timeouts() {
         let addr = next_test_unix();
         let mut a = UnixListener::bind(&addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr).unwrap();
             rx.recv();
             assert!(s.write(&[0]).is_ok());
@@ -749,7 +752,7 @@ fn timeout_concurrent_read() {
         let addr = next_test_unix();
         let mut a = UnixListener::bind(&addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = UnixStream::connect(&addr).unwrap();
             rx.recv();
             assert!(s.write(&[0]).is_ok());
@@ -759,7 +762,7 @@ fn timeout_concurrent_read() {
         let mut s = a.accept().unwrap();
         let s2 = s.clone();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             assert!(s2.read(&mut [0]).is_ok());
             tx2.send(());
@@ -781,10 +784,10 @@ fn clone_accept_smoke() {
         let mut a2 = a.clone();
 
         let addr2 = addr.clone();
-        spawn(proc() {
+        spawn(move|| {
             let _ = UnixStream::connect(&addr2);
         });
-        spawn(proc() {
+        spawn(move|| {
             let _ = UnixStream::connect(&addr);
         });
 
@@ -804,14 +807,14 @@ fn clone_accept_concurrent() {
         let (tx, rx) = channel();
         let tx2 = tx.clone();
 
-        spawn(proc() { let mut a = a; tx.send(a.accept()) });
-        spawn(proc() { let mut a = a2; tx2.send(a.accept()) });
+        spawn(move|| { let mut a = a; tx.send(a.accept()) });
+        spawn(move|| { let mut a = a2; tx2.send(a.accept()) });
 
         let addr2 = addr.clone();
-        spawn(proc() {
+        spawn(move|| {
             let _ = UnixStream::connect(&addr2);
         });
-        spawn(proc() {
+        spawn(move|| {
             let _ = UnixStream::connect(&addr);
         });
 
@@ -837,7 +840,7 @@ fn close_accept_concurrent() {
         let mut a2 = a.clone();
 
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             tx.send(a.accept());
         });
index a7b1b077eff0b1b46cc7d88828a38c6ccbaabe4c..3c38e23183fe7e3e840ef920a15f44d6cde2afd0 100644 (file)
@@ -140,7 +140,7 @@ pub fn set_keepalive(&mut self, delay_in_seconds: Option<uint>) -> IoResult<()>
     /// let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap();
     /// let stream2 = stream.clone();
     ///
-    /// spawn(proc() {
+    /// spawn(move|| {
     ///     // close this stream after one second
     ///     timer::sleep(Duration::seconds(1));
     ///     let mut stream = stream2;
@@ -293,7 +293,7 @@ fn as_inner(&self) -> &TcpStreamImp {
 /// for stream in acceptor.incoming() {
 ///     match stream {
 ///         Err(e) => { /* connection failed */ }
-///         Ok(stream) => spawn(proc() {
+///         Ok(stream) => spawn(move|| {
 ///             // connection succeeded
 ///             handle_client(stream)
 ///         })
@@ -420,7 +420,7 @@ impl TcpAcceptor {
     /// let mut a = TcpListener::bind("127.0.0.1:8482").listen().unwrap();
     /// let a2 = a.clone();
     ///
-    /// spawn(proc() {
+    /// spawn(move|| {
     ///     let mut a2 = a2;
     ///     for socket in a2.incoming() {
     ///         match socket {
@@ -509,7 +509,7 @@ fn listen_ip4_localhost() {
         let listener = TcpListener::bind(socket_addr);
         let mut acceptor = listener.listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(("localhost", socket_addr.port));
             stream.write(&[144]).unwrap();
         });
@@ -525,7 +525,7 @@ fn connect_localhost() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(("localhost", addr.port));
             stream.write(&[64]).unwrap();
         });
@@ -541,7 +541,7 @@ fn connect_ip4_loopback() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(("127.0.0.1", addr.port));
             stream.write(&[44]).unwrap();
         });
@@ -557,7 +557,7 @@ fn connect_ip6_loopback() {
         let addr = next_test_ip6();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(("::1", addr.port));
             stream.write(&[66]).unwrap();
         });
@@ -573,7 +573,7 @@ fn smoke_test_ip4() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(addr);
             stream.write(&[99]).unwrap();
         });
@@ -589,7 +589,7 @@ fn smoke_test_ip6() {
         let addr = next_test_ip6();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut stream = TcpStream::connect(addr);
             stream.write(&[99]).unwrap();
         });
@@ -605,7 +605,7 @@ fn read_eof_ip4() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let _stream = TcpStream::connect(addr);
             // Close
         });
@@ -621,7 +621,7 @@ fn read_eof_ip6() {
         let addr = next_test_ip6();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let _stream = TcpStream::connect(addr);
             // Close
         });
@@ -637,7 +637,7 @@ fn read_eof_twice_ip4() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let _stream = TcpStream::connect(addr);
             // Close
         });
@@ -661,7 +661,7 @@ fn read_eof_twice_ip6() {
         let addr = next_test_ip6();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let _stream = TcpStream::connect(addr);
             // Close
         });
@@ -686,7 +686,7 @@ fn write_close_ip4() {
         let mut acceptor = TcpListener::bind(addr).listen();
 
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             drop(TcpStream::connect(addr));
             tx.send(());
         });
@@ -711,7 +711,7 @@ fn write_close_ip6() {
         let mut acceptor = TcpListener::bind(addr).listen();
 
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             drop(TcpStream::connect(addr));
             tx.send(());
         });
@@ -736,7 +736,7 @@ fn multiple_connect_serial_ip4() {
         let max = 10u;
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0, max) {
                 let mut stream = TcpStream::connect(addr);
                 stream.write(&[99]).unwrap();
@@ -756,7 +756,7 @@ fn multiple_connect_serial_ip6() {
         let max = 10u;
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0, max) {
                 let mut stream = TcpStream::connect(addr);
                 stream.write(&[99]).unwrap();
@@ -776,11 +776,11 @@ fn multiple_connect_interleaved_greedy_schedule_ip4() {
         static MAX: int = 10;
         let acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acceptor = acceptor;
             for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
                 // Start another task to handle the connection
-                spawn(proc() {
+                spawn(move|| {
                     let mut stream = stream;
                     let mut buf = [0];
                     stream.read(&mut buf).unwrap();
@@ -795,7 +795,7 @@ fn multiple_connect_interleaved_greedy_schedule_ip4() {
         fn connect(i: int, addr: SocketAddr) {
             if i == MAX { return }
 
-            spawn(proc() {
+            spawn(move|| {
                 debug!("connecting");
                 let mut stream = TcpStream::connect(addr);
                 // Connect again before writing
@@ -812,11 +812,11 @@ fn multiple_connect_interleaved_greedy_schedule_ip6() {
         static MAX: int = 10;
         let acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acceptor = acceptor;
             for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
                 // Start another task to handle the connection
-                spawn(proc() {
+                spawn(move|| {
                     let mut stream = stream;
                     let mut buf = [0];
                     stream.read(&mut buf).unwrap();
@@ -831,7 +831,7 @@ fn multiple_connect_interleaved_greedy_schedule_ip6() {
         fn connect(i: int, addr: SocketAddr) {
             if i == MAX { return }
 
-            spawn(proc() {
+            spawn(move|| {
                 debug!("connecting");
                 let mut stream = TcpStream::connect(addr);
                 // Connect again before writing
@@ -848,11 +848,11 @@ fn multiple_connect_interleaved_lazy_schedule_ip4() {
         let addr = next_test_ip4();
         let acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acceptor = acceptor;
             for stream in acceptor.incoming().take(MAX as uint) {
                 // Start another task to handle the connection
-                spawn(proc() {
+                spawn(move|| {
                     let mut stream = stream;
                     let mut buf = [0];
                     stream.read(&mut buf).unwrap();
@@ -867,7 +867,7 @@ fn multiple_connect_interleaved_lazy_schedule_ip4() {
         fn connect(i: int, addr: SocketAddr) {
             if i == MAX { return }
 
-            spawn(proc() {
+            spawn(move|| {
                 debug!("connecting");
                 let mut stream = TcpStream::connect(addr);
                 // Connect again before writing
@@ -884,11 +884,11 @@ fn multiple_connect_interleaved_lazy_schedule_ip6() {
         let addr = next_test_ip6();
         let acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut acceptor = acceptor;
             for stream in acceptor.incoming().take(MAX as uint) {
                 // Start another task to handle the connection
-                spawn(proc() {
+                spawn(move|| {
                     let mut stream = stream;
                     let mut buf = [0];
                     stream.read(&mut buf).unwrap();
@@ -903,7 +903,7 @@ fn multiple_connect_interleaved_lazy_schedule_ip6() {
         fn connect(i: int, addr: SocketAddr) {
             if i == MAX { return }
 
-            spawn(proc() {
+            spawn(move|| {
                 debug!("connecting");
                 let mut stream = TcpStream::connect(addr);
                 // Connect again before writing
@@ -926,7 +926,7 @@ pub fn socket_name(addr: SocketAddr) {
 
     pub fn peer_name(addr: SocketAddr) {
         let acceptor = TcpListener::bind(addr).listen();
-        spawn(proc() {
+        spawn(move|| {
             let mut acceptor = acceptor;
             acceptor.accept().unwrap();
         });
@@ -961,7 +961,7 @@ fn socket_and_peer_name_ip6() {
     fn partial_read() {
         let addr = next_test_ip4();
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut srv = TcpListener::bind(addr).listen().unwrap();
             tx.send(());
             let mut cl = srv.accept().unwrap();
@@ -998,7 +998,7 @@ fn fast_rebind() {
         let addr = next_test_ip4();
         let (tx, rx) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
             let _stream = TcpStream::connect(addr).unwrap();
             // Close
@@ -1023,7 +1023,7 @@ fn tcp_clone_smoke() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr);
             let mut buf = [0, 0];
             assert_eq!(s.read(&mut buf), Ok(1));
@@ -1036,7 +1036,7 @@ fn tcp_clone_smoke() {
 
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             rx1.recv();
             s2.write(&[1]).unwrap();
@@ -1055,7 +1055,7 @@ fn tcp_clone_two_read() {
         let (tx1, rx) = channel();
         let tx2 = tx1.clone();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr);
             s.write(&[1]).unwrap();
             rx.recv();
@@ -1067,7 +1067,7 @@ fn tcp_clone_two_read() {
         let s2 = s1.clone();
 
         let (done, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             let mut buf = [0, 0];
             s2.read(&mut buf).unwrap();
@@ -1086,7 +1086,7 @@ fn tcp_clone_two_write() {
         let addr = next_test_ip4();
         let mut acceptor = TcpListener::bind(addr).listen();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr);
             let mut buf = [0, 1];
             s.read(&mut buf).unwrap();
@@ -1097,7 +1097,7 @@ fn tcp_clone_two_write() {
         let s2 = s1.clone();
 
         let (done, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             s2.write(&[1]).unwrap();
             done.send(());
@@ -1111,7 +1111,7 @@ fn tcp_clone_two_write() {
     fn shutdown_smoke() {
         let addr = next_test_ip4();
         let a = TcpListener::bind(addr).unwrap().listen();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             let mut c = a.accept().unwrap();
             assert_eq!(c.read_to_end(), Ok(vec!()));
@@ -1145,7 +1145,7 @@ fn accept_timeout() {
         //        flakiness.
         if !cfg!(target_os = "freebsd") {
             let (tx, rx) = channel();
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(TcpStream::connect(addr).unwrap());
             });
             let _l = rx.recv();
@@ -1162,7 +1162,7 @@ fn accept_timeout() {
 
         // Unset the timeout and make sure that this always blocks.
         a.set_timeout(None);
-        spawn(proc() {
+        spawn(move|| {
             drop(TcpStream::connect(addr).unwrap());
         });
         a.accept().unwrap();
@@ -1173,7 +1173,7 @@ fn close_readwrite_smoke() {
         let addr = next_test_ip4();
         let a = TcpListener::bind(addr).listen().unwrap();
         let (_tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             let _s = a.accept().unwrap();
             let _ = rx.recv_opt();
@@ -1210,7 +1210,7 @@ fn close_read_wakes_up() {
         let addr = next_test_ip4();
         let a = TcpListener::bind(addr).listen().unwrap();
         let (_tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             let _s = a.accept().unwrap();
             let _ = rx.recv_opt();
@@ -1219,7 +1219,7 @@ fn close_read_wakes_up() {
         let mut s = TcpStream::connect(addr).unwrap();
         let s2 = s.clone();
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             assert!(s2.read(&mut [0]).is_err());
             tx.send(());
@@ -1236,7 +1236,7 @@ fn readwrite_timeouts() {
         let addr = next_test_ip6();
         let mut a = TcpListener::bind(addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr).unwrap();
             rx.recv();
             assert!(s.write(&[0]).is_ok());
@@ -1269,7 +1269,7 @@ fn read_timeouts() {
         let addr = next_test_ip6();
         let mut a = TcpListener::bind(addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr).unwrap();
             rx.recv();
             let mut amt = 0;
@@ -1298,7 +1298,7 @@ fn write_timeouts() {
         let addr = next_test_ip6();
         let mut a = TcpListener::bind(addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr).unwrap();
             rx.recv();
             assert!(s.write(&[0]).is_ok());
@@ -1326,7 +1326,7 @@ fn timeout_concurrent_read() {
         let addr = next_test_ip6();
         let mut a = TcpListener::bind(addr).listen().unwrap();
         let (tx, rx) = channel::<()>();
-        spawn(proc() {
+        spawn(move|| {
             let mut s = TcpStream::connect(addr).unwrap();
             rx.recv();
             assert_eq!(s.write(&[0]), Ok(()));
@@ -1336,7 +1336,7 @@ fn timeout_concurrent_read() {
         let mut s = a.accept().unwrap();
         let s2 = s.clone();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut s2 = s2;
             assert_eq!(s2.read(&mut [0]), Ok(1));
             tx2.send(());
@@ -1359,7 +1359,7 @@ fn clone_while_reading() {
         let (tx, rx) = channel();
         let (txdone, rxdone) = channel();
         let txdone2 = txdone.clone();
-        spawn(proc() {
+        spawn(move|| {
             let mut tcp = TcpStream::connect(addr).unwrap();
             rx.recv();
             tcp.write_u8(0).unwrap();
@@ -1370,7 +1370,7 @@ fn clone_while_reading() {
         let tcp = accept.accept().unwrap();
         let tcp2 = tcp.clone();
         let txdone3 = txdone.clone();
-        spawn(proc() {
+        spawn(move|| {
             let mut tcp2 = tcp2;
             tcp2.read_u8().unwrap();
             txdone3.send(());
@@ -1396,10 +1396,10 @@ fn clone_accept_smoke() {
         let mut a = l.listen().unwrap();
         let mut a2 = a.clone();
 
-        spawn(proc() {
+        spawn(move|| {
             let _ = TcpStream::connect(addr);
         });
-        spawn(proc() {
+        spawn(move|| {
             let _ = TcpStream::connect(addr);
         });
 
@@ -1417,13 +1417,13 @@ fn clone_accept_concurrent() {
         let (tx, rx) = channel();
         let tx2 = tx.clone();
 
-        spawn(proc() { let mut a = a; tx.send(a.accept()) });
-        spawn(proc() { let mut a = a2; tx2.send(a.accept()) });
+        spawn(move|| { let mut a = a; tx.send(a.accept()) });
+        spawn(move|| { let mut a = a2; tx2.send(a.accept()) });
 
-        spawn(proc() {
+        spawn(move|| {
             let _ = TcpStream::connect(addr);
         });
-        spawn(proc() {
+        spawn(move|| {
             let _ = TcpStream::connect(addr);
         });
 
@@ -1449,7 +1449,7 @@ fn close_accept_concurrent() {
         let mut a2 = a.clone();
 
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             tx.send(a.accept());
         });
index a2ad365dd2a0e2f64ff02eb0c36a06b614687ee6..78951b8dae2b041246689810491fd256f90dbfa5 100644 (file)
@@ -18,6 +18,7 @@
 use clone::Clone;
 use io::net::ip::{SocketAddr, IpAddr, ToSocketAddr};
 use io::{Reader, Writer, IoResult};
+use ops::FnOnce;
 use option::Option;
 use result::Result::{Ok, Err};
 use sys::udp::UdpSocket as UdpSocketImp;
@@ -210,7 +211,9 @@ impl UdpStream {
     /// Allows access to the underlying UDP socket owned by this stream. This
     /// is useful to, for example, use the socket to send data to hosts other
     /// than the one that this stream is connected to.
-    pub fn as_socket<T>(&mut self, f: |&mut UdpSocket| -> T) -> T {
+    pub fn as_socket<T, F>(&mut self, f: F) -> T where
+        F: FnOnce(&mut UdpSocket) -> T,
+    {
         f(&mut self.socket)
     }
 
@@ -269,7 +272,7 @@ fn socket_smoke_test_ip4() {
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             match UdpSocket::bind(client_ip) {
                 Ok(ref mut client) => {
                     rx1.recv();
@@ -304,7 +307,7 @@ fn socket_smoke_test_ip6() {
         let client_ip = next_test_ip6();
         let (tx, rx) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             match UdpSocket::bind(client_ip) {
                 Ok(ref mut client) => {
                     rx.recv();
@@ -340,7 +343,7 @@ fn stream_smoke_test_ip4() {
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             let send_as = |ip, val: &[u8]| {
                 match UdpSocket::bind(ip) {
                     Ok(client) => {
@@ -384,7 +387,7 @@ fn stream_smoke_test_ip6() {
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             match UdpSocket::bind(client_ip) {
                 Ok(client) => {
                     let client = box client;
@@ -446,7 +449,7 @@ fn udp_clone_smoke() {
         let mut sock1 = UdpSocket::bind(addr1).unwrap();
         let sock2 = UdpSocket::bind(addr2).unwrap();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut sock2 = sock2;
             let mut buf = [0, 0];
             assert_eq!(sock2.recv_from(&mut buf), Ok((1, addr1)));
@@ -458,7 +461,7 @@ fn udp_clone_smoke() {
 
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut sock3 = sock3;
             rx1.recv();
             sock3.send_to(&[1], addr2).unwrap();
@@ -479,7 +482,7 @@ fn udp_clone_two_read() {
         let (tx1, rx) = channel();
         let tx2 = tx1.clone();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut sock2 = sock2;
             sock2.send_to(&[1], addr1).unwrap();
             rx.recv();
@@ -490,7 +493,7 @@ fn udp_clone_two_read() {
         let sock3 = sock1.clone();
 
         let (done, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut sock3 = sock3;
             let mut buf = [0, 0];
             sock3.recv_from(&mut buf).unwrap();
@@ -514,7 +517,7 @@ fn udp_clone_two_write() {
         let (tx, rx) = channel();
         let (serv_tx, serv_rx) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             let mut sock2 = sock2;
             let mut buf = [0, 1];
 
@@ -530,7 +533,7 @@ fn udp_clone_two_write() {
 
         let (done, rx) = channel();
         let tx2 = tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             let mut sock3 = sock3;
             match sock3.send_to(&[1], addr2) {
                 Ok(..) => { let _ = tx2.send_opt(()); }
@@ -557,7 +560,7 @@ fn recv_from_timeout() {
 
         let (tx, rx) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = UdpSocket::bind(addr2).unwrap();
             assert_eq!(a.recv_from(&mut [0]), Ok((1, addr1)));
             assert_eq!(a.send_to(&[0], addr1), Ok(()));
index 41676cdf6e9cc704e8fc3d1d6014dfd05e51c328..73a893c4f2dcddd64196f5719af557e3ec42e034 100644 (file)
@@ -123,7 +123,7 @@ fn partial_read() {
         let out = PipeStream::open(writer);
         let mut input = PipeStream::open(reader);
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let mut out = out;
             out.write(&[10]).unwrap();
             rx.recv(); // don't close the pipe until the other read has finished
index c46a6e82e448661d3181b0f29535377fc1498760..9ba6381c8c3b3941b78400eccf0e3882c7407ff1 100644 (file)
@@ -693,7 +693,7 @@ pub fn wait_with_output(mut self) -> IoResult<ProcessOutput> {
         fn read(stream: Option<io::PipeStream>) -> Receiver<IoResult<Vec<u8>>> {
             let (tx, rx) = channel();
             match stream {
-                Some(stream) => spawn(proc() {
+                Some(stream) => spawn(move |:| {
                     let mut stream = stream;
                     tx.send(stream.read_to_end())
                 }),
@@ -1155,14 +1155,14 @@ fn wait_timeout() {
     fn wait_timeout2() {
         let (tx, rx) = channel();
         let tx2 = tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             let mut p = sleeper();
             p.set_timeout(Some(10));
             assert_eq!(p.wait().err().unwrap().kind, TimedOut);
             p.signal_kill().unwrap();
             tx.send(());
         });
-        spawn(proc() {
+        spawn(move|| {
             let mut p = sleeper();
             p.set_timeout(Some(10));
             assert_eq!(p.wait().err().unwrap().kind, TimedOut);
index 48c333f0733a5f038e97972b073b74134159f72a..53fac3fd3c94de12c9581b3949e8c5a2210fb63c 100644 (file)
@@ -39,7 +39,7 @@
 use mem;
 use option::Option;
 use option::Option::{Some, None};
-use ops::{Deref, DerefMut};
+use ops::{Deref, DerefMut, FnOnce};
 use result::Result::{Ok, Err};
 use rustrt;
 use rustrt::local::Local;
@@ -85,7 +85,9 @@ enum StdSource {
     File(fs::FileDesc),
 }
 
-fn src<T>(fd: libc::c_int, _readable: bool, f: |StdSource| -> T) -> T {
+fn src<T, F>(fd: libc::c_int, _readable: bool, f: F) -> T where
+    F: FnOnce(StdSource) -> T,
+{
     match tty::TTY::new(fd) {
         Ok(tty) => f(TTY(tty)),
         Err(_) => f(File(fs::FileDesc::new(fd, false))),
@@ -125,7 +127,7 @@ impl StdinReader {
     ///
     /// This provides access to methods like `chars` and `lines`.
     ///
-    /// ## Example
+    /// # Examples
     ///
     /// ```rust
     /// use std::io;
@@ -318,7 +320,9 @@ pub fn set_stderr(stderr: Box<Writer + Send>) -> Option<Box<Writer + Send>> {
 //          // io1 aliases io2
 //      })
 //  })
-fn with_task_stdout(f: |&mut Writer| -> IoResult<()>) {
+fn with_task_stdout<F>(f: F) where
+    F: FnOnce(&mut Writer) -> IoResult<()>,
+{
     let result = if Local::exists(None::<Task>) {
         let mut my_stdout = LOCAL_STDOUT.with(|slot| {
             slot.borrow_mut().take()
@@ -524,7 +528,7 @@ fn capture_stdout() {
 
         let (tx, rx) = channel();
         let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx));
-        spawn(proc() {
+        spawn(move|| {
             set_stdout(box w);
             println!("hello!");
         });
@@ -538,7 +542,7 @@ fn capture_stderr() {
 
         let (tx, rx) = channel();
         let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx));
-        spawn(proc() {
+        spawn(move|| {
             ::realstd::io::stdio::set_stderr(box w);
             panic!("my special message");
         });
index ad02b534d04c647de4572bc41c4748519882a906..79048c37ab5bbb5bb22017ea965c0ce52149736b 100644 (file)
@@ -357,7 +357,7 @@ fn closing_channel_during_drop_doesnt_kill_everything() {
         let mut timer = Timer::new().unwrap();
         let timer_rx = timer.periodic(Duration::milliseconds(1000));
 
-        spawn(proc() {
+        spawn(move|| {
             let _ = timer_rx.recv_opt();
         });
 
@@ -371,7 +371,7 @@ fn reset_doesnt_switch_tasks() {
         let mut timer = Timer::new().unwrap();
         let timer_rx = timer.periodic(Duration::milliseconds(1000));
 
-        spawn(proc() {
+        spawn(move|| {
             let _ = timer_rx.recv_opt();
         });
 
@@ -384,7 +384,7 @@ fn reset_doesnt_switch_tasks2() {
         let mut timer = Timer::new().unwrap();
         let timer_rx = timer.periodic(Duration::milliseconds(1000));
 
-        spawn(proc() {
+        spawn(move|| {
             let _ = timer_rx.recv_opt();
         });
 
index d4274d7e4017e2a1b8dd9a461957f57099dc339a..e99aba9b673804db7736d9508a4b581286ffb85d 100644 (file)
 #![allow(unknown_features)]
 #![feature(macro_rules, globs, linkage)]
 #![feature(default_type_params, phase, lang_items, unsafe_destructor)]
-#![feature(import_shadowing, slicing_syntax, tuple_indexing)]
+#![feature(import_shadowing, slicing_syntax)]
+#![feature(unboxed_closures)]
 
 // Don't link to std. We are std.
 #![no_std]
 
 pub use unicode::char;
 
+pub use rustrt::thunk;
+
 /* Exported macros */
 
 pub mod macros;
index 76419bee41c221c26aa8d6407fd65ae090572959..900c223c70bd319319818abe3a4ed6b3e00bce4e 100644 (file)
@@ -358,8 +358,8 @@ macro_rules! vec[
 /// # fn long_running_task() {}
 /// # fn calculate_the_answer() -> int { 42i }
 ///
-/// spawn(proc() { long_running_task(); tx1.send(()) });
-/// spawn(proc() { tx2.send(calculate_the_answer()) });
+/// spawn(move|| { long_running_task(); tx1.send(()) });
+/// spawn(move|| { tx2.send(calculate_the_answer()) });
 ///
 /// select! (
 ///     () = rx1.recv() => println!("the long running task finished first"),
index 1c9826ff5aca38be186c4d65b544b405ca73cd1c..d5c27c7fbf82af8f7a6ff5dfa9247f6e2e827476 100644 (file)
@@ -21,6 +21,7 @@
 use kinds::Copy;
 use num;
 use num::{Int, Float, FPNaN, FPInfinite, ToPrimitive};
+use ops::FnMut;
 use slice::{SlicePrelude, CloneSliceAllocPrelude};
 use str::StrPrelude;
 use string::String;
@@ -74,32 +75,29 @@ pub enum SignFormat {
 
 impl Copy for SignFormat {}
 
-/**
- * Converts an integral number to its string representation as a byte vector.
- * This is meant to be a common base implementation for all integral string
- * conversion functions like `to_string()` or `to_str_radix()`.
- *
- * # Arguments
- * - `num`           - The number to convert. Accepts any number that
- *                     implements the numeric traits.
- * - `radix`         - Base to use. Accepts only the values 2-36.
- * - `sign`          - How to emit the sign. Options are:
- *     - `SignNone`: No sign at all. Basically emits `abs(num)`.
- *     - `SignNeg`:  Only `-` on negative values.
- *     - `SignAll`:  Both `+` on positive, and `-` on negative numbers.
- * - `f`             - a callback which will be invoked for each ascii character
- *                     which composes the string representation of this integer
- *
- * # Return value
- * A tuple containing the byte vector, and a boolean flag indicating
- * whether it represents a special value like `inf`, `-inf`, `NaN` or not.
- * It returns a tuple because there can be ambiguity between a special value
- * and a number representation at higher bases.
- *
- * # Failure
- * - Fails if `radix` < 2 or `radix` > 36.
- */
-fn int_to_str_bytes_common<T: Int>(num: T, radix: uint, sign: SignFormat, f: |u8|) {
+/// Converts an integral number to its string representation as a byte vector.
+/// This is meant to be a common base implementation for all integral string
+/// conversion functions like `to_string()` or `to_str_radix()`.
+///
+/// # Arguments
+///
+/// - `num`           - The number to convert. Accepts any number that
+///                     implements the numeric traits.
+/// - `radix`         - Base to use. Accepts only the values 2-36.
+/// - `sign`          - How to emit the sign. Options are:
+///     - `SignNone`: No sign at all. Basically emits `abs(num)`.
+///     - `SignNeg`:  Only `-` on negative values.
+///     - `SignAll`:  Both `+` on positive, and `-` on negative numbers.
+/// - `f`             - a callback which will be invoked for each ascii character
+///                     which composes the string representation of this integer
+///
+/// # Panics
+///
+/// - Panics if `radix` < 2 or `radix` > 36.
+fn int_to_str_bytes_common<T, F>(num: T, radix: uint, sign: SignFormat, mut f: F) where
+    T: Int,
+    F: FnMut(u8),
+{
     assert!(2 <= radix && radix <= 36);
 
     let _0: T = Int::zero();
@@ -415,10 +413,8 @@ pub fn float_to_str_bytes_common<T: Float>(
     (buf, false)
 }
 
-/**
- * Converts a number to its string representation. This is a wrapper for
- * `to_str_bytes_common()`, for details see there.
- */
+/// Converts a number to its string representation. This is a wrapper for
+/// `to_str_bytes_common()`, for details see there.
 #[inline]
 pub fn float_to_str_common<T: Float>(
         num: T, radix: uint, negative_zero: bool,
index a83a66c23a526a851091b9c2406cb08856ed29dd..6d9b177574afc1d8ee49e94fba290f14d3ca956d 100644 (file)
@@ -15,4 +15,6 @@
 
 pub use core::u16::{BITS, BYTES, MIN, MAX};
 
+use ops::FnOnce;
+
 uint_module!(u16)
index 7271203b23b6c505e90cd6cb85eb21a38dd6f52b..0d6d17fa007bf5eb46a02c419ce4b704720520df 100644 (file)
@@ -15,4 +15,6 @@
 
 pub use core::u32::{BITS, BYTES, MIN, MAX};
 
+use ops::FnOnce;
+
 uint_module!(u32)
index 25de2f3b255659cdebdbda824a888108f67622e6..ebb5d2946c5314dfc09e410d8fe229705e11c460 100644 (file)
@@ -15,4 +15,6 @@
 
 pub use core::u64::{BITS, BYTES, MIN, MAX};
 
+use ops::FnOnce;
+
 uint_module!(u64)
index 22dedeecf3b109101c9c575cc78c1b978a4c710e..59aea214aae0ccdad679ecfba6da6d81b56892e4 100644 (file)
@@ -15,4 +15,6 @@
 
 pub use core::u8::{BITS, BYTES, MIN, MAX};
 
+use ops::FnOnce;
+
 uint_module!(u8)
index a425aab3aa10c5529380d530eab152cebc010fcb..484d28dfed05813089edd7a66c15896744d5a66b 100644 (file)
@@ -15,4 +15,6 @@
 
 pub use core::uint::{BITS, BYTES, MIN, MAX};
 
+use ops::FnOnce;
+
 uint_module!(uint)
index 0baefb11cf8f2a8ff593493a5760d5133a0b10a7..bd6f3d4bb286bff2b8058985ba673b9a4cda7450 100644 (file)
@@ -32,7 +32,9 @@ macro_rules! uint_module (($T:ty) => (
 /// ```
 #[inline]
 #[deprecated = "just use .to_string(), or a BufWriter with write! if you mustn't allocate"]
-pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U {
+pub fn to_str_bytes<U, F>(n: $T, radix: uint, f: F) -> U where
+    F: FnOnce(&[u8]) -> U,
+{
     use io::{Writer, Seek};
     // The radix can be as low as 2, so we need at least 64 characters for a
     // base 2 number, and then we need another for a possible '-' character.
index 6c91010f4cb35730c82ff2dc5a804e06f134a0b1..a8d854a7555993ffbde6cd21f46cdeb6af1bac6b 100644 (file)
@@ -40,7 +40,7 @@
 use libc::{c_void, c_int};
 use libc;
 use boxed::Box;
-use ops::Drop;
+use ops::{Drop, FnOnce};
 use option::Option;
 use option::Option::{Some, None};
 use os;
@@ -163,6 +163,7 @@ pub fn getcwd() -> IoResult<Path> {
 pub mod windoze {
     use libc::types::os::arch::extra::DWORD;
     use libc;
+    use ops::FnMut;
     use option::Option;
     use option::Option::None;
     use option;
@@ -172,8 +173,9 @@ pub mod windoze {
     use str::StrPrelude;
     use vec::Vec;
 
-    pub fn fill_utf16_buf_and_decode(f: |*mut u16, DWORD| -> DWORD)
-        -> Option<String> {
+    pub fn fill_utf16_buf_and_decode<F>(mut f: F) -> Option<String> where
+        F: FnMut(*mut u16, DWORD) -> DWORD,
+    {
 
         unsafe {
             let mut n = TMPBUF_SZ as DWORD;
@@ -212,7 +214,9 @@ pub fn fill_utf16_buf_and_decode(f: |*mut u16, DWORD| -> DWORD)
 Accessing environment variables is not generally threadsafe.
 Serialize access through a global lock.
 */
-fn with_env_lock<T>(f: || -> T) -> T {
+fn with_env_lock<T, F>(f: F) -> T where
+    F: FnOnce() -> T,
+{
     use sync::{StaticMutex, MUTEX_INIT};
 
     static LOCK: StaticMutex = MUTEX_INIT;
@@ -1182,15 +1186,13 @@ pub fn page_size() -> uint {
 ///
 /// The memory map is released (unmapped) when the destructor is run, so don't
 /// let it leave scope by accident if you want it to stick around.
+#[allow(missing_copy_implementations)]
 pub struct MemoryMap {
     data: *mut u8,
     len: uint,
     kind: MemoryMapKind,
 }
 
-#[cfg(not(stage0))]
-impl Copy for MemoryMap {}
-
 /// Type of memory map
 pub enum MemoryMapKind {
     /// Virtual memory map. Usually used to change the permissions of a given
@@ -1235,7 +1237,7 @@ impl Copy for MapOption {}
 
 /// Possible errors when creating a map.
 pub enum MapError {
-    /// ## The following are POSIX-specific
+    /// # The following are POSIX-specific
     ///
     /// fd was not open for reading or, if using `MapWritable`, was not open for
     /// writing.
@@ -1257,7 +1259,7 @@ pub enum MapError {
     ErrZeroLength,
     /// Unrecognized error. The inner value is the unrecognized errno.
     ErrUnknown(int),
-    /// ## The following are Windows-specific
+    /// # The following are Windows-specific
     ///
     /// Unsupported combination of protection flags
     /// (`MapReadable`/`MapWritable`/`MapExecutable`).
index ba2c89bf1ce1a0c166a173ea799a214241a419e5..4041a6f60d71d06ebd1c8f450db56bd95879a16b 100644 (file)
 use super::{BytesContainer, GenericPath, GenericPathUnsafe};
 
 /// Iterator that yields successive components of a Path as &[u8]
-pub type Components<'a> = Splits<'a, u8>;
+pub type Components<'a> = Splits<'a, u8, fn(&u8) -> bool>;
 
 /// Iterator that yields successive components of a Path as Option<&str>
-pub type StrComponents<'a> = Map<'a, &'a [u8], Option<&'a str>,
-                                       Components<'a>>;
+pub type StrComponents<'a> =
+    Map<&'a [u8], Option<&'a str>, Components<'a>, fn(&[u8]) -> Option<&str>>;
 
 /// Represents a POSIX file path
 #[deriving(Clone)]
@@ -515,17 +515,17 @@ fn test_opt_paths() {
     #[test]
     fn test_null_byte() {
         use task;
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new(b"foo/bar\0")
         });
         assert!(result.is_err());
 
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new("test").set_filename(b"f\0o")
         });
         assert!(result.is_err());
 
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new("test").push(b"f\0o");
         });
         assert!(result.is_err());
@@ -542,10 +542,10 @@ macro_rules! t(
             )
         )
         t!("foo", display, "foo");
-        t!(b"foo\x80", display, "foo\uFFFD");
-        t!(b"foo\xFFbar", display, "foo\uFFFDbar");
+        t!(b"foo\x80", display, "foo\u{FFFD}");
+        t!(b"foo\xFFbar", display, "foo\u{FFFD}bar");
         t!(b"foo\xFF/bar", filename_display, "bar");
-        t!(b"foo/\xFFbar", filename_display, "\uFFFDbar");
+        t!(b"foo/\xFFbar", filename_display, "\u{FFFD}bar");
         t!(b"/", filename_display, "");
 
         macro_rules! t(
@@ -566,10 +566,10 @@ macro_rules! t(
         )
 
         t!("foo", "foo");
-        t!(b"foo\x80", "foo\uFFFD");
-        t!(b"foo\xFFbar", "foo\uFFFDbar");
+        t!(b"foo\x80", "foo\u{FFFD}");
+        t!(b"foo\xFFbar", "foo\u{FFFD}bar");
         t!(b"foo\xFF/bar", "bar", filename);
-        t!(b"foo/\xFFbar", "\uFFFDbar", filename);
+        t!(b"foo/\xFFbar", "\u{FFFD}bar", filename);
         t!(b"/", "", filename);
     }
 
@@ -590,10 +590,10 @@ macro_rules! t(
         t!(b"foo", "foo", "foo");
         t!(b"foo/bar", "foo/bar", "bar");
         t!(b"/", "/", "");
-        t!(b"foo\xFF", "foo\uFFFD", "foo\uFFFD");
-        t!(b"foo\xFF/bar", "foo\uFFFD/bar", "bar");
-        t!(b"foo/\xFFbar", "foo/\uFFFDbar", "\uFFFDbar");
-        t!(b"\xFFfoo/bar\xFF", "\uFFFDfoo/bar\uFFFD", "bar\uFFFD");
+        t!(b"foo\xFF", "foo\u{FFFD}", "foo\u{FFFD}");
+        t!(b"foo\xFF/bar", "foo\u{FFFD}/bar", "bar");
+        t!(b"foo/\xFFbar", "foo/\u{FFFD}bar", "\u{FFFD}bar");
+        t!(b"\xFFfoo/bar\xFF", "\u{FFFD}foo/bar\u{FFFD}", "bar\u{FFFD}");
     }
 
     #[test]
index ea522536d22fd5f9b78fc839c5dd10466be8309e..3983e365ae1f6cb6a7b89d54afbbd3a40d4165e1 100644 (file)
 ///
 /// Each component is yielded as Option<&str> for compatibility with PosixPath, but
 /// every component in WindowsPath is guaranteed to be Some.
-pub type StrComponents<'a> = Map<'a, &'a str, Option<&'a str>,
-                                       CharSplits<'a, char>>;
+pub type StrComponents<'a> =
+    Map<&'a str, Option<&'a str>, CharSplits<'a, char>, fn(&'a str) -> Option<&'a str>>;
 
 /// Iterator that yields successive components of a Path as &[u8]
-pub type Components<'a> = Map<'a, Option<&'a str>, &'a [u8],
-                                    StrComponents<'a>>;
+pub type Components<'a> =
+    Map<Option<&'a str>, &'a [u8], StrComponents<'a>, fn(Option<&str>) -> &[u8]>;
 
 /// Represents a Windows path
 // Notes for Windows path impl:
@@ -1038,9 +1038,8 @@ fn parse_prefix<'a>(mut path: &'a str) -> Option<PathPrefix> {
     }
     return None;
 
-    fn parse_two_comps<'a>(mut path: &'a str, f: |char| -> bool)
-                       -> Option<(uint, uint)> {
-        let idx_a = match path.find(|x| f(x)) {
+    fn parse_two_comps(mut path: &str, f: fn(char) -> bool) -> Option<(uint, uint)> {
+        let idx_a = match path.find(f) {
             None => return None,
             Some(x) => x
         };
@@ -1300,17 +1299,17 @@ fn test_opt_paths() {
     #[test]
     fn test_null_byte() {
         use task;
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new(b"foo/bar\0")
         });
         assert!(result.is_err());
 
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new("test").set_filename(b"f\0o")
         });
         assert!(result.is_err());
 
-        let result = task::try(proc() {
+        let result = task::try(move|| {
             Path::new("test").push(b"f\0o");
         });
         assert!(result.is_err());
index 37628b65388e7d20266838e50c06072e7fd0fd50..5405892535cfec99e99d1dd335c4521c78ac5e51 100644 (file)
@@ -355,7 +355,7 @@ fn test_os_rng_tasks() {
         for _ in range(0u, 20) {
             let (tx, rx) = channel();
             txs.push(tx);
-            task::spawn(proc() {
+            task::spawn(move|| {
                 // wait until all the tasks are ready to go.
                 rx.recv();
 
index 5ecd3ff04f1cd95c00ac9939f7b9ff0eb1cae64c..eb517047ddc0b84011a98db9017c9cf4e17fc5ee 100644 (file)
@@ -52,6 +52,7 @@
 use failure;
 use rustrt;
 use os;
+use thunk::Thunk;
 
 // Reexport some of our utilities which are expected by other crates.
 pub use self::util::{default_sched_threads, min_stack, running_on_valgrind};
@@ -87,10 +88,10 @@ pub fn init(argc: int, argv: *const *const u8) {
 #[lang = "start"]
 fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int {
     use mem;
-    start(argc, argv, proc() {
+    start(argc, argv, Thunk::new(move|| {
         let main: extern "Rust" fn() = unsafe { mem::transmute(main) };
         main();
-    })
+    }))
 }
 
 /// Executes the given procedure after initializing the runtime with the given
@@ -102,7 +103,7 @@ fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int {
 ///
 /// This function will only return once *all* native threads in the system have
 /// exited.
-pub fn start(argc: int, argv: *const *const u8, main: proc()) -> int {
+pub fn start(argc: int, argv: *const *const u8, main: Thunk) -> int {
     use prelude::*;
     use rt;
     use rustrt::task::Task;
@@ -144,7 +145,7 @@ pub fn start(argc: int, argv: *const *const u8, main: proc()) -> int {
         unsafe {
             rustrt::stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top);
         }
-        (main.take().unwrap())();
+        (main.take().unwrap()).invoke(());
         exit_code = Some(os::get_exit_status());
     }).destroy());
     unsafe { rt::cleanup(); }
index 2bb551881138284d11e77c26ae0347a4a182e9b2..fe5b962fa4b7499d402d16987b47c0a0aaf10c7d 100644 (file)
@@ -47,7 +47,7 @@
 //!     let spinlock = Arc::new(AtomicUint::new(1));
 //!
 //!     let spinlock_clone = spinlock.clone();
-//!     spawn(proc() {
+//!     spawn(move|| {
 //!         spinlock_clone.store(0, SeqCst);
 //!     });
 //!
@@ -68,7 +68,7 @@
 //!     let shared_big_object = Arc::new(AtomicOption::empty());
 //!
 //!     let shared_big_object_clone = shared_big_object.clone();
-//!     spawn(proc() {
+//!     spawn(move|| {
 //!         let unwrapped_big_object = shared_big_object_clone.take(SeqCst);
 //!         if unwrapped_big_object.is_some() {
 //!             println!("got a big object from another task");
index 5e6dc6ec650836ebe204a9d90d591ca5b631587c..1b8574604a0c1a8d22ea046d02d7b40990cfa77c 100644 (file)
@@ -21,7 +21,7 @@
 ///     let c = barrier.clone();
 ///     // The same messages will be printed together.
 ///     // You will NOT see any interleaving.
-///     spawn(proc() {
+///     spawn(move|| {
 ///         println!("before wait");
 ///         c.wait();
 ///         println!("after wait");
@@ -94,7 +94,7 @@ fn test_barrier() {
         for _ in range(0u, 9) {
             let c = barrier.clone();
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 c.wait();
                 tx.send(true);
             });
index 0fdd57b27922c50d5e9068eb8a20bc413e1f45cb..3bdab261e1957c21c8fe3e249d33de046d5748aa 100644 (file)
@@ -41,7 +41,7 @@
 /// let pair2 = pair.clone();
 ///
 /// // Inside of our lock, spawn a new thread, and then wait for it to start
-/// spawn(proc() {
+/// spawn(move|| {
 ///     let &(ref lock, ref cvar) = &*pair2;
 ///     let mut started = lock.lock();
 ///     *started = true;
@@ -282,7 +282,7 @@ fn notify_one() {
         static M: StaticMutex = MUTEX_INIT;
 
         let g = M.lock();
-        spawn(proc() {
+        spawn(move|| {
             let _g = M.lock();
             C.notify_one();
         });
@@ -300,7 +300,7 @@ fn notify_all() {
         for _ in range(0, N) {
             let data = data.clone();
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 let &(ref lock, ref cond) = &*data;
                 let mut cnt = lock.lock();
                 *cnt += 1;
@@ -334,7 +334,7 @@ fn wait_timeout() {
 
         let g = M.lock();
         assert!(!C.wait_timeout(&g, Duration::nanoseconds(1000)));
-        spawn(proc() {
+        spawn(move|| {
             let _g = M.lock();
             C.notify_one();
         });
@@ -351,7 +351,7 @@ fn two_mutexes() {
         static C: StaticCondvar = CONDVAR_INIT;
 
         let g = M1.lock();
-        spawn(proc() {
+        spawn(move|| {
             let _g = M1.lock();
             C.notify_one();
         });
index a8c9983e5aac56e30c9f0e369d6968c76549a625..e5a1e09967ce9d33913ad42826abfd33066a9a02 100644 (file)
@@ -17,7 +17,7 @@
 //! use std::sync::Future;
 //! # fn fib(n: uint) -> uint {42};
 //! # fn make_a_sandwich() {};
-//! let mut delayed_fib = Future::spawn(proc() { fib(5000) });
+//! let mut delayed_fib = Future::spawn(move|| { fib(5000) });
 //! make_a_sandwich();
 //! println!("fib(5000) = {}", delayed_fib.get())
 //! ```
@@ -30,6 +30,7 @@
 use self::FutureState::*;
 use comm::{Receiver, channel};
 use task::spawn;
+use thunk::{Thunk};
 
 /// A type encapsulating the result of a computation which may not be complete
 pub struct Future<A> {
@@ -37,7 +38,7 @@ pub struct Future<A> {
 }
 
 enum FutureState<A> {
-    Pending(proc():Send -> A),
+    Pending(Thunk<(),A>),
     Evaluating,
     Forced(A)
 }
@@ -78,7 +79,7 @@ pub fn get_ref<'a>(&'a mut self) -> &'a A {
                 match replace(&mut self.state, Evaluating) {
                     Forced(_) | Evaluating => panic!("Logic error."),
                     Pending(f) => {
-                        self.state = Forced(f());
+                        self.state = Forced(f.invoke(()));
                         self.get_ref()
                     }
                 }
@@ -97,7 +98,9 @@ pub fn from_value(val: A) -> Future<A> {
         Future {state: Forced(val)}
     }
 
-    pub fn from_fn(f: proc():Send -> A) -> Future<A> {
+    pub fn from_fn<F>(f: F) -> Future<A>
+        where F : FnOnce() -> A, F : Send
+    {
         /*!
          * Create a future from a function.
          *
@@ -106,7 +109,7 @@ pub fn from_fn(f: proc():Send -> A) -> Future<A> {
          * function. It is not spawned into another task.
          */
 
-        Future {state: Pending(f)}
+        Future {state: Pending(Thunk::new(f))}
     }
 }
 
@@ -119,12 +122,14 @@ pub fn from_receiver(rx: Receiver<A>) -> Future<A> {
          * waiting for the result to be received on the port.
          */
 
-        Future::from_fn(proc() {
+        Future::from_fn(move|:| {
             rx.recv()
         })
     }
 
-    pub fn spawn(blk: proc():Send -> A) -> Future<A> {
+    pub fn spawn<F>(blk: F) -> Future<A>
+        where F : FnOnce() -> A, F : Send
+    {
         /*!
          * Create a future from a unique closure.
          *
@@ -134,7 +139,7 @@ pub fn spawn(blk: proc():Send -> A) -> Future<A> {
 
         let (tx, rx) = channel();
 
-        spawn(proc() {
+        spawn(move |:| {
             // Don't panic if the other end has hung up
             let _ = tx.send_opt(blk());
         });
@@ -166,7 +171,7 @@ fn test_from_receiver() {
 
     #[test]
     fn test_from_fn() {
-        let mut f = Future::from_fn(proc() "brail".to_string());
+        let mut f = Future::from_fn(move|| "brail".to_string());
         assert_eq!(f.get(), "brail");
     }
 
@@ -190,14 +195,14 @@ fn test_get_ref_method() {
 
     #[test]
     fn test_spawn() {
-        let mut f = Future::spawn(proc() "bale".to_string());
+        let mut f = Future::spawn(move|| "bale".to_string());
         assert_eq!(f.get(), "bale");
     }
 
     #[test]
     #[should_fail]
     fn test_future_panic() {
-        let mut f = Future::spawn(proc() panic!());
+        let mut f = Future::spawn(move|| panic!());
         let _x: String = f.get();
     }
 
@@ -205,8 +210,8 @@ fn test_future_panic() {
     fn test_sendable_future() {
         let expected = "schlorf";
         let (tx, rx) = channel();
-        let f = Future::spawn(proc() { expected });
-        task::spawn(proc() {
+        let f = Future::spawn(move|| { expected });
+        task::spawn(move|| {
             let mut f = f;
             tx.send(f.get());
         });
index 4e07d54c57e7d6b79b20be42006e4492180b05d1..33f8d254c71a41e1e1f2197dbd8eef9bac45fdef 100644 (file)
@@ -47,7 +47,7 @@
 /// let (tx, rx) = channel();
 /// for _ in range(0u, 10) {
 ///     let (data, tx) = (data.clone(), tx.clone());
-///     spawn(proc() {
+///     spawn(move|| {
 ///         // The shared static can only be accessed once the lock is held.
 ///         // Our non-atomic increment is safe because we're the only thread
 ///         // which can access the shared state when the lock is held.
@@ -313,9 +313,9 @@ fn inc() {
         let (tx, rx) = channel();
         for _ in range(0, K) {
             let tx2 = tx.clone();
-            spawn(proc() { inc(); tx2.send(()); });
+            spawn(move|| { inc(); tx2.send(()); });
             let tx2 = tx.clone();
-            spawn(proc() { inc(); tx2.send(()); });
+            spawn(move|| { inc(); tx2.send(()); });
         }
 
         drop(tx);
@@ -339,7 +339,7 @@ fn test_mutex_arc_condvar() {
         let arc = Arc::new((Mutex::new(false), Condvar::new()));
         let arc2 = arc.clone();
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             // wait until parent gets in
             rx.recv();
             let &(ref lock, ref cvar) = &*arc2;
@@ -364,7 +364,7 @@ fn test_arc_condvar_poison() {
         let arc2 = arc.clone();
         let (tx, rx) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             rx.recv();
             let &(ref lock, ref cvar) = &*arc2;
             let _g = lock.lock();
@@ -386,7 +386,7 @@ fn test_arc_condvar_poison() {
     fn test_mutex_arc_poison() {
         let arc = Arc::new(Mutex::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try(proc() {
+        let _ = task::try(move|| {
             let lock = arc2.lock();
             assert_eq!(*lock, 2);
         });
@@ -401,7 +401,7 @@ fn test_mutex_arc_nested() {
         let arc = Arc::new(Mutex::new(1i));
         let arc2 = Arc::new(Mutex::new(arc));
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let lock = arc2.lock();
             let lock2 = lock.deref().lock();
             assert_eq!(*lock2, 1);
@@ -414,7 +414,7 @@ fn test_mutex_arc_nested() {
     fn test_mutex_arc_access_in_unwind() {
         let arc = Arc::new(Mutex::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try::<()>(proc() {
+        let _ = task::try(move|| -> () {
             struct Unwinder {
                 i: Arc<Mutex<int>>,
             }
index a75088120f869f73e0db460b0d1f04dd98224aee..263937c5cbec75e3941a8556301a1e4c98aa67cb 100644 (file)
@@ -15,6 +15,7 @@
 
 use int;
 use mem::drop;
+use ops::FnOnce;
 use sync::atomic;
 use sync::{StaticMutex, MUTEX_INIT};
 
@@ -57,7 +58,7 @@ impl Once {
     ///
     /// When this function returns, it is guaranteed that some initialization
     /// has run and completed (it may not be the closure specified).
-    pub fn doit(&'static self, f: ||) {
+    pub fn doit<F>(&'static self, f: F) where F: FnOnce() {
         // Optimize common path: load is much cheaper than fetch_add.
         if self.cnt.load(atomic::SeqCst) < 0 {
             return
@@ -141,7 +142,7 @@ fn stampede_once() {
         let (tx, rx) = channel();
         for _ in range(0u, 10) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 for _ in range(0u, 4) { task::deschedule() }
                 unsafe {
                     O.doit(|| {
index a4f8b1df6af527a188db0e848c9886fca164e4ec..b6d6aa989c58e7e163531a1f07176c21ed5a4726 100644 (file)
@@ -387,7 +387,7 @@ fn frob() {
         let (tx, rx) = channel::<()>();
         for _ in range(0, N) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 let mut rng = rand::task_rng();
                 for _ in range(0, M) {
                     if rng.gen_weighted_bool(N) {
@@ -409,7 +409,7 @@ fn frob() {
     fn test_rw_arc_poison_wr() {
         let arc = Arc::new(RWLock::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try(proc() {
+        let _ = task::try(move|| {
             let lock = arc2.write();
             assert_eq!(*lock, 2);
         });
@@ -422,7 +422,7 @@ fn test_rw_arc_poison_wr() {
     fn test_rw_arc_poison_ww() {
         let arc = Arc::new(RWLock::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try(proc() {
+        let _ = task::try(move|| {
             let lock = arc2.write();
             assert_eq!(*lock, 2);
         });
@@ -434,7 +434,7 @@ fn test_rw_arc_poison_ww() {
     fn test_rw_arc_no_poison_rr() {
         let arc = Arc::new(RWLock::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try(proc() {
+        let _ = task::try(move|| {
             let lock = arc2.read();
             assert_eq!(*lock, 2);
         });
@@ -445,7 +445,7 @@ fn test_rw_arc_no_poison_rr() {
     fn test_rw_arc_no_poison_rw() {
         let arc = Arc::new(RWLock::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try(proc() {
+        let _ = task::try(move|| {
             let lock = arc2.read();
             assert_eq!(*lock, 2);
         });
@@ -459,7 +459,7 @@ fn test_rw_arc() {
         let arc2 = arc.clone();
         let (tx, rx) = channel();
 
-        task::spawn(proc() {
+        task::spawn(move|| {
             let mut lock = arc2.write();
             for _ in range(0u, 10) {
                 let tmp = *lock;
@@ -474,7 +474,7 @@ fn test_rw_arc() {
         let mut children = Vec::new();
         for _ in range(0u, 5) {
             let arc3 = arc.clone();
-            children.push(task::try_future(proc() {
+            children.push(task::try_future(move|| {
                 let lock = arc3.read();
                 assert!(*lock >= 0);
             }));
@@ -495,7 +495,7 @@ fn test_rw_arc() {
     fn test_rw_arc_access_in_unwind() {
         let arc = Arc::new(RWLock::new(1i));
         let arc2 = arc.clone();
-        let _ = task::try::<()>(proc() {
+        let _ = task::try(move|| -> () {
             struct Unwinder {
                 i: Arc<RWLock<int>>,
             }
index 03fb84c38d470889ee04909afb8e758f38c3869b..574b0f22bee00ab40e30ac3219553f5fab90ceba 100644 (file)
@@ -127,7 +127,7 @@ fn test_sem_basic() {
     fn test_sem_as_mutex() {
         let s = Arc::new(Semaphore::new(1));
         let s2 = s.clone();
-        spawn(proc() {
+        spawn(move|| {
             let _g = s2.access();
         });
         let _g = s.access();
@@ -139,7 +139,7 @@ fn test_sem_as_cvar() {
         let (tx, rx) = channel();
         let s = Arc::new(Semaphore::new(0));
         let s2 = s.clone();
-        spawn(proc() {
+        spawn(move|| {
             s2.acquire();
             tx.send(());
         });
@@ -150,7 +150,7 @@ fn test_sem_as_cvar() {
         let (tx, rx) = channel();
         let s = Arc::new(Semaphore::new(0));
         let s2 = s.clone();
-        spawn(proc() {
+        spawn(move|| {
             s2.release();
             let _ = rx.recv();
         });
@@ -166,7 +166,7 @@ fn test_sem_multi_resource() {
         let s2 = s.clone();
         let (tx1, rx1) = channel();
         let (tx2, rx2) = channel();
-        spawn(proc() {
+        spawn(move|| {
             let _g = s2.access();
             let _ = rx2.recv();
             tx1.send(());
@@ -183,7 +183,7 @@ fn test_sem_runtime_friendly_blocking() {
         let (tx, rx) = channel();
         {
             let _g = s.access();
-            spawn(proc() {
+            spawn(move|| {
                 tx.send(());
                 drop(s2.access());
                 tx.send(());
index 4ae5cd054f6208695d51cd004e17e1e37c67e992..fa5b62a202bfdcb9223125010f6da41fd47efb33 100644 (file)
 
 use core::prelude::*;
 
-use task::spawn;
+use task::{spawn};
 use comm::{channel, Sender, Receiver};
 use sync::{Arc, Mutex};
+use thunk::Thunk;
 
 struct Sentinel<'a> {
-    jobs: &'a Arc<Mutex<Receiver<proc(): Send>>>,
+    jobs: &'a Arc<Mutex<Receiver<Thunk>>>,
     active: bool
 }
 
 impl<'a> Sentinel<'a> {
-    fn new(jobs: &Arc<Mutex<Receiver<proc(): Send>>>) -> Sentinel {
+    fn new(jobs: &Arc<Mutex<Receiver<Thunk>>>) -> Sentinel {
         Sentinel {
             jobs: jobs,
             active: true
@@ -60,7 +61,7 @@ fn drop(&mut self) {
 /// let (tx, rx) = channel();
 /// for _ in range(0, 8u) {
 ///     let tx = tx.clone();
-///     pool.execute(proc() {
+///     pool.execute(move|| {
 ///         tx.send(1u);
 ///     });
 /// }
@@ -72,7 +73,7 @@ pub struct TaskPool {
     //
     // This is the only such Sender, so when it is dropped all subtasks will
     // quit.
-    jobs: Sender<proc(): Send>
+    jobs: Sender<Thunk>
 }
 
 impl TaskPool {
@@ -84,7 +85,7 @@ impl TaskPool {
     pub fn new(tasks: uint) -> TaskPool {
         assert!(tasks >= 1);
 
-        let (tx, rx) = channel::<proc(): Send>();
+        let (tx, rx) = channel::<Thunk>();
         let rx = Arc::new(Mutex::new(rx));
 
         // Taskpool tasks.
@@ -96,13 +97,15 @@ pub fn new(tasks: uint) -> TaskPool {
     }
 
     /// Executes the function `job` on a task in the pool.
-    pub fn execute(&self, job: proc():Send) {
-        self.jobs.send(job);
+    pub fn execute<F>(&self, job: F)
+        where F : FnOnce(), F : Send
+    {
+        self.jobs.send(Thunk::new(job));
     }
 }
 
-fn spawn_in_pool(jobs: Arc<Mutex<Receiver<proc(): Send>>>) {
-    spawn(proc() {
+fn spawn_in_pool(jobs: Arc<Mutex<Receiver<Thunk>>>) {
+    spawn(move |:| {
         // Will spawn a new task on panic unless it is cancelled.
         let sentinel = Sentinel::new(&jobs);
 
@@ -115,7 +118,7 @@ fn spawn_in_pool(jobs: Arc<Mutex<Receiver<proc(): Send>>>) {
             };
 
             match message {
-                Ok(job) => job(),
+                Ok(job) => job.invoke(()),
 
                 // The Taskpool was dropped.
                 Err(..) => break
@@ -144,7 +147,7 @@ fn test_works() {
         let (tx, rx) = channel();
         for _ in range(0, TEST_TASKS) {
             let tx = tx.clone();
-            pool.execute(proc() {
+            pool.execute(move|| {
                 tx.send(1u);
             });
         }
@@ -166,14 +169,14 @@ fn test_recovery_from_subtask_panic() {
 
         // Panic all the existing tasks.
         for _ in range(0, TEST_TASKS) {
-            pool.execute(proc() { panic!() });
+            pool.execute(move|| -> () { panic!() });
         }
 
         // Ensure new tasks were spawned to compensate.
         let (tx, rx) = channel();
         for _ in range(0, TEST_TASKS) {
             let tx = tx.clone();
-            pool.execute(proc() {
+            pool.execute(move|| {
                 tx.send(1u);
             });
         }
@@ -191,7 +194,7 @@ fn test_should_not_panic_on_drop_if_subtasks_panic_after_drop() {
         // Panic all the existing tasks in a bit.
         for _ in range(0, TEST_TASKS) {
             let waiter = waiter.clone();
-            pool.execute(proc() {
+            pool.execute(move|| {
                 waiter.wait();
                 panic!();
             });
index c0018c5d970421086eb86d70ad6ef17bf7f6254c..96b4accd4bd03e9da10f262a7b1afe2be4f42bee 100644 (file)
@@ -70,9 +70,10 @@ impl<M: Send> Helper<M> {
     /// passed to the helper thread in a separate task.
     ///
     /// This function is safe to be called many times.
-    pub fn boot<T: Send>(&'static self,
-                         f: || -> T,
-                         helper: fn(helper_signal::signal, Receiver<M>, T)) {
+    pub fn boot<T, F>(&'static self, f: F, helper: fn(helper_signal::signal, Receiver<M>, T)) where
+        T: Send,
+        F: FnOnce() -> T,
+    {
         unsafe {
             let _guard = self.lock.lock();
             if !*self.initialized.get() {
@@ -82,7 +83,7 @@ pub fn boot<T: Send>(&'static self,
                 *self.signal.get() = send as uint;
 
                 let t = f();
-                task::spawn(proc() {
+                task::spawn(move |:| {
                     bookkeeping::decrement();
                     helper(receive, rx, t);
                     let _g = self.lock.lock();
@@ -90,7 +91,7 @@ pub fn boot<T: Send>(&'static self,
                     self.cond.notify_one()
                 });
 
-                rustrt::at_exit(proc() { self.shutdown() });
+                rustrt::at_exit(move|:| { self.shutdown() });
                 *self.initialized.get() = true;
             }
         }
index f8861c20464dd50599854aaff6d30eb9578eef3c..73e1c7bd9e5e0e596505dad79445ef2ca3fee9f9 100644 (file)
@@ -69,7 +69,9 @@ pub fn mkerr_libc<T: Int>(ret: T) -> IoResult<()> {
     }
 }
 
-pub fn keep_going(data: &[u8], f: |*const u8, uint| -> i64) -> i64 {
+pub fn keep_going<F>(data: &[u8], mut f: F) -> i64 where
+    F: FnMut(*const u8, uint) -> i64,
+{
     let origamt = data.len();
     let mut data = data.as_ptr();
     let mut amt = origamt;
index ddc6dd021c30f7b178b2e7623e70639a6dc5b3c3..73da200e1623828eec709345afb7bd4b48dfce80 100644 (file)
@@ -344,10 +344,10 @@ pub fn get_host_addresses(host: Option<&str>, servname: Option<&str>,
 // [1] http://twistedmatrix.com/pipermail/twisted-commits/2012-April/034692.html
 // [2] http://stackoverflow.com/questions/19819198/does-send-msg-dontwait
 
-pub fn read<T>(fd: sock_t,
-               deadline: u64,
-               lock: || -> T,
-               read: |bool| -> libc::c_int) -> IoResult<uint> {
+pub fn read<T, L, R>(fd: sock_t, deadline: u64, mut lock: L, mut read: R) -> IoResult<uint> where
+    L: FnMut() -> T,
+    R: FnMut(bool) -> libc::c_int,
+{
     let mut ret = -1;
     if deadline == 0 {
         ret = retry(|| read(false));
@@ -386,12 +386,15 @@ pub fn read<T>(fd: sock_t,
     }
 }
 
-pub fn write<T>(fd: sock_t,
-                deadline: u64,
-                buf: &[u8],
-                write_everything: bool,
-                lock: || -> T,
-                write: |bool, *const u8, uint| -> i64) -> IoResult<uint> {
+pub fn write<T, L, W>(fd: sock_t,
+                      deadline: u64,
+                      buf: &[u8],
+                      write_everything: bool,
+                      mut lock: L,
+                      mut write: W) -> IoResult<uint> where
+    L: FnMut() -> T,
+    W: FnMut(bool, *const u8, uint) -> i64,
+{
     let mut ret = -1;
     let mut written = 0;
     if deadline == 0 {
@@ -674,8 +677,8 @@ fn lock_nonblocking<'a>(&'a self) -> Guard<'a> {
 
     pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
         let fd = self.fd();
-        let dolock = || self.lock_nonblocking();
-        let doread = |nb| unsafe {
+        let dolock = |&:| self.lock_nonblocking();
+        let doread = |&mut: nb| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::recv(fd,
                        buf.as_mut_ptr() as *mut libc::c_void,
@@ -687,8 +690,8 @@ pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 
     pub fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         let fd = self.fd();
-        let dolock = || self.lock_nonblocking();
-        let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe {
+        let dolock = |&:| self.lock_nonblocking();
+        let dowrite = |&: nb: bool, buf: *const u8, len: uint| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::send(fd,
                        buf as *const _,
@@ -822,7 +825,7 @@ pub fn recv_from(&mut self, buf: &mut [u8]) -> IoResult<(uint, SocketAddr)> {
         let mut addrlen: libc::socklen_t =
                 mem::size_of::<libc::sockaddr_storage>() as libc::socklen_t;
 
-        let dolock = || self.lock_nonblocking();
+        let dolock = |&:| self.lock_nonblocking();
         let n = try!(read(fd, self.read_deadline, dolock, |nb| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::recvfrom(fd,
@@ -843,8 +846,8 @@ pub fn send_to(&mut self, buf: &[u8], dst: SocketAddr) -> IoResult<()> {
         let dstp = &storage as *const _ as *const libc::sockaddr;
 
         let fd = self.fd();
-        let dolock = || self.lock_nonblocking();
-        let dowrite = |nb, buf: *const u8, len: uint| unsafe {
+        let dolock = |&: | self.lock_nonblocking();
+        let dowrite = |&mut: nb, buf: *const u8, len: uint| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::sendto(fd,
                          buf as *const libc::c_void,
index 4effedbe3abd83635f0107bc2988572d74b25ee4..107263c31a7665585c69a399595fec295858ec82 100644 (file)
@@ -125,7 +125,10 @@ pub fn decode_error_detailed(errno: i32) -> IoError {
 }
 
 #[inline]
-pub fn retry<T: SignedInt> (f: || -> T) -> T {
+pub fn retry<T, F> (mut f: F) -> T where
+    T: SignedInt,
+    F: FnMut() -> T,
+{
     let one: T = Int::one();
     loop {
         let n = f();
index 08e6f7059d8c678c4d843f2faa1a3af3366b6ea0..26fd410a7a9b61c19bb41426230d1e1bbbb12913 100644 (file)
@@ -149,8 +149,8 @@ fn lock_nonblocking<'a>(&'a self) -> Guard<'a> {
 
     pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
         let fd = self.fd();
-        let dolock = || self.lock_nonblocking();
-        let doread = |nb| unsafe {
+        let dolock = |&:| self.lock_nonblocking();
+        let doread = |&mut: nb| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::recv(fd,
                        buf.as_mut_ptr() as *mut libc::c_void,
@@ -162,8 +162,8 @@ pub fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 
     pub fn write(&mut self, buf: &[u8]) -> IoResult<()> {
         let fd = self.fd();
-        let dolock = || self.lock_nonblocking();
-        let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe {
+        let dolock = |&: | self.lock_nonblocking();
+        let dowrite = |&: nb: bool, buf: *const u8, len: uint| unsafe {
             let flags = if nb {c::MSG_DONTWAIT} else {0};
             libc::send(fd,
                        buf as *const _,
index 7dde19a64762ab37dac09a8591d113ce2553a62b..4ef1757cc3acae855d46e4d28cc78556ee1d66ba 100644 (file)
@@ -94,8 +94,8 @@ unsafe fn set_cloexec(fd: c_int) {
             mem::transmute::<&ProcessConfig<K,V>,&'static ProcessConfig<K,V>>(cfg)
         };
 
-        with_envp(cfg.env(), proc(envp) {
-            with_argv(cfg.program(), cfg.args(), proc(argv) unsafe {
+        with_envp(cfg.env(), move|: envp: *const c_void| {
+            with_argv(cfg.program(), cfg.args(), move|: argv: *const *const libc::c_char| unsafe {
                 let (input, mut output) = try!(sys::os::pipe());
 
                 // We may use this in the child, so perform allocations before the
@@ -379,8 +379,8 @@ fn waitpid_helper(input: libc::c_int,
                 // wait indefinitely for a message to arrive.
                 //
                 // FIXME: sure would be nice to not have to scan the entire array
-                let min = active.iter().map(|a| *a.ref2()).enumerate().min_by(|p| {
-                    p.val1()
+                let min = active.iter().map(|a| a.2).enumerate().min_by(|p| {
+                    p.1
                 });
                 let (p, idx) = match min {
                     Some((idx, deadline)) => {
@@ -531,8 +531,11 @@ pub fn try_wait(&self) -> Option<ProcessExit> {
     }
 }
 
-fn with_argv<T>(prog: &CString, args: &[CString],
-                cb: proc(*const *const libc::c_char) -> T) -> T {
+fn with_argv<T,F>(prog: &CString, args: &[CString],
+                  cb: F)
+                  -> T
+    where F : FnOnce(*const *const libc::c_char) -> T
+{
     let mut ptrs: Vec<*const libc::c_char> = Vec::with_capacity(args.len()+1);
 
     // Convert the CStrings into an array of pointers. Note: the
@@ -549,9 +552,12 @@ fn with_argv<T>(prog: &CString, args: &[CString],
     cb(ptrs.as_ptr())
 }
 
-fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
-                      cb: proc(*const c_void) -> T) -> T
-    where K: BytesContainer + Eq + Hash, V: BytesContainer
+fn with_envp<K,V,T,F>(env: Option<&collections::HashMap<K, V>>,
+                      cb: F)
+                      -> T
+    where F : FnOnce(*const c_void) -> T,
+          K : BytesContainer + Eq + Hash,
+          V : BytesContainer
 {
     // On posixy systems we can pass a char** for envp, which is a
     // null-terminated array of "k=v\0" strings. Since we must create
@@ -564,9 +570,9 @@ fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
 
             for pair in env.iter() {
                 let mut kv = Vec::new();
-                kv.push_all(pair.ref0().container_as_bytes());
+                kv.push_all(pair.0.container_as_bytes());
                 kv.push('=' as u8);
-                kv.push_all(pair.ref1().container_as_bytes());
+                kv.push_all(pair.1.container_as_bytes());
                 kv.push(0); // terminating null
                 tmps.push(kv);
             }
index 9fce308cb9468cad60def633aa6a3825ff412858..41361a0cde695a5b9cf887125865a18ef69af3d5 100644 (file)
@@ -138,7 +138,7 @@ pub fn decode_error_detailed(errno: i32) -> IoError {
 }
 
 #[inline]
-pub fn retry<I> (f: || -> I) -> I { f() } // PR rust-lang/rust/#17020
+pub fn retry<I, F>(f: F) -> I where F: FnOnce() -> I { f() } // PR rust-lang/rust/#17020
 
 pub fn ms_to_timeval(ms: u64) -> libc::timeval {
     libc::timeval {
index 02548bedf028be1b4c4829d73d1c5828c0eb2b9f..bbfd32ee76bfab72b273127eacc9b88b7af24f72 100644 (file)
@@ -418,9 +418,8 @@ fn backslash_run_ends_in_quote(s: &[char], mut i: uint) -> bool {
     }
 }
 
-fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
-                      cb: |*mut c_void| -> T) -> T
-    where K: BytesContainer + Eq + Hash, V: BytesContainer
+fn with_envp<K, V, T, F>(env: Option<&collections::HashMap<K, V>>, cb: F) -> T where
+    K: BytesContainer + Eq + Hash, V: BytesContainer, F: FnOnce(*mut c_void) -> T,
 {
     // On Windows we pass an "environment block" which is not a char**, but
     // rather a concatenation of null-terminated k=v\0 sequences, with a final
@@ -431,8 +430,8 @@ fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
 
             for pair in env.iter() {
                 let kv = format!("{}={}",
-                                 pair.ref0().container_as_str().unwrap(),
-                                 pair.ref1().container_as_str().unwrap());
+                                 pair.0.container_as_str().unwrap(),
+                                 pair.1.container_as_str().unwrap());
                 blk.extend(kv.utf16_units());
                 blk.push(0);
             }
@@ -445,7 +444,9 @@ fn with_envp<K, V, T>(env: Option<&collections::HashMap<K, V>>,
     }
 }
 
-fn with_dirp<T>(d: Option<&CString>, cb: |*const u16| -> T) -> T {
+fn with_dirp<T, F>(d: Option<&CString>, cb: F) -> T where
+    F: FnOnce(*const u16) -> T,
+{
     match d {
       Some(dir) => {
           let dir_str = dir.as_str()
@@ -500,8 +501,8 @@ fn test_wrapper(prog: &str, args: &[&str]) -> String {
             "echo \"a b c\""
         );
         assert_eq!(
-            test_wrapper("\u03c0\u042f\u97f3\u00e6\u221e", &[]),
-            "\u03c0\u042f\u97f3\u00e6\u221e"
+            test_wrapper("\u{03c0}\u{042f}\u{97f3}\u{00e6}\u{221e}", &[]),
+            "\u{03c0}\u{042f}\u{97f3}\u{00e6}\u{221e}"
         );
     }
 }
index b841f6d3a2b2ff68199e83f1193ddec9cf5aa203..969b322af991f0a81a29675394e1fdb9dbc0393a 100644 (file)
@@ -131,7 +131,7 @@ fn init_dtors() {
         DTORS = mem::transmute(dtors);
     }
 
-    rustrt::at_exit(proc() unsafe {
+    rustrt::at_exit(move|| unsafe {
         mem::transmute::<_, Box<Exclusive<Vec<(Key, Dtor)>>>>(DTORS);
         DTORS = 0 as *mut _;
     });
index c91417e611ed1165fe6a574d37ea24b943dcdd7c..562afd33e2fc20cbb1753810bc038542b7542e8f 100644 (file)
 //! the main task panics the application will exit with a non-zero
 //! exit code.
 //!
-//! ## Example
+//! # Examples
 //!
 //! ```rust
-//! spawn(proc() {
+//! spawn(move|| {
 //!     println!("Hello, World!");
 //! })
 //! ```
@@ -47,6 +47,7 @@
 use borrow::IntoCow;
 use boxed::Box;
 use comm::channel;
+use core::ops::FnOnce;
 use io::{Writer, stdio};
 use kinds::{Send, marker};
 use option::Option;
@@ -57,6 +58,7 @@
 use rustrt::task;
 use str::SendStr;
 use string::{String, ToString};
+use thunk::{Thunk};
 use sync::Future;
 
 /// The task builder type.
@@ -80,7 +82,7 @@ pub struct TaskBuilder {
     // Task-local stderr
     stderr: Option<Box<Writer + Send>>,
     // Optionally wrap the eventual task body
-    gen_body: Option<proc(v: proc():Send):Send -> proc():Send>,
+    gen_body: Option<Thunk<Thunk, Thunk>>,
     nocopy: marker::NoCopy,
 }
 
@@ -129,41 +131,46 @@ pub fn stderr(mut self, stderr: Box<Writer + Send>) -> TaskBuilder {
     }
 
     // Where spawning actually happens (whether yielding a future or not)
-    fn spawn_internal(self, f: proc():Send,
-                      on_exit: Option<proc(Result<(), Box<Any + Send>>):Send>) {
+    fn spawn_internal(
+        self,
+        f: Thunk,
+        on_exit: Option<Thunk<task::Result>>)
+    {
         let TaskBuilder {
             name, stack_size, stdout, stderr, mut gen_body, nocopy: _
         } = self;
+
         let f = match gen_body.take() {
-            Some(gen) => gen(f),
+            Some(gen) => gen.invoke(f),
             None => f
         };
+
         let opts = task::TaskOpts {
             on_exit: on_exit,
             name: name,
             stack_size: stack_size,
         };
         if stdout.is_some() || stderr.is_some() {
-            Task::spawn(opts, proc() {
+            Task::spawn(opts, move|:| {
                 let _ = stdout.map(stdio::set_stdout);
                 let _ = stderr.map(stdio::set_stderr);
-                f();
-            })
+                f.invoke(());
+            });
         } else {
-            Task::spawn(opts, f)
+            Task::spawn(opts, move|:| f.invoke(()))
         }
     }
 
     /// Creates and executes a new child task.
     ///
     /// Sets up a new task with its own call stack and schedules it to run
-    /// the provided proc. The task has the properties and behavior
+    /// the provided function. The task has the properties and behavior
     /// specified by the `TaskBuilder`.
-    pub fn spawn(self, f: proc():Send) {
-        self.spawn_internal(f, None)
+    pub fn spawn<F:FnOnce()+Send>(self, f: F) {
+        self.spawn_internal(Thunk::new(f), None)
     }
 
-    /// Execute a proc in a newly-spawned task and return a future representing
+    /// Execute a function in a newly-spawned task and return a future representing
     /// the task's result. The task has the properties and behavior
     /// specified by the `TaskBuilder`.
     ///
@@ -178,20 +185,22 @@ pub fn spawn(self, f: proc():Send) {
     /// `result::Result::Err` containing the argument to `panic!(...)` as an
     /// `Any` trait object.
     #[experimental = "Futures are experimental."]
-    pub fn try_future<T:Send>(self, f: proc():Send -> T)
-                              -> Future<Result<T, Box<Any + Send>>> {
-        // currently, the on_exit proc provided by librustrt only works for unit
+    pub fn try_future<T:Send,F:FnOnce()->(T)+Send>(self, f: F)
+                                                   -> Future<Result<T, Box<Any + Send>>> {
+        // currently, the on_exit fn provided by librustrt only works for unit
         // results, so we use an additional side-channel to communicate the
         // result.
 
         let (tx_done, rx_done) = channel(); // signal that task has exited
         let (tx_retv, rx_retv) = channel(); // return value from task
 
-        let on_exit = proc(res) { let _ = tx_done.send_opt(res); };
-        self.spawn_internal(proc() { let _ = tx_retv.send_opt(f()); },
+        let on_exit: Thunk<task::Result> = Thunk::with_arg(move |: res: task::Result| {
+            let _ = tx_done.send_opt(res);
+        });
+        self.spawn_internal(Thunk::new(move |:| { let _ = tx_retv.send_opt(f()); }),
                             Some(on_exit));
 
-        Future::from_fn(proc() {
+        Future::from_fn(move|:| {
             rx_done.recv().map(|_| rx_retv.recv())
         })
     }
@@ -199,7 +208,9 @@ pub fn try_future<T:Send>(self, f: proc():Send -> T)
     /// Execute a function in a newly-spawnedtask and block until the task
     /// completes or panics. Equivalent to `.try_future(f).unwrap()`.
     #[unstable = "Error type may change."]
-    pub fn try<T:Send>(self, f: proc():Send -> T) -> Result<T, Box<Any + Send>> {
+    pub fn try<T,F>(self, f: F) -> Result<T, Box<Any + Send>>
+        where F : FnOnce() -> T, F : Send, T : Send
+    {
         self.try_future(f).into_inner()
     }
 }
@@ -212,7 +223,7 @@ pub fn try<T:Send>(self, f: proc():Send -> T) -> Result<T, Box<Any + Send>> {
 /// the provided unique closure.
 ///
 /// This function is equivalent to `TaskBuilder::new().spawn(f)`.
-pub fn spawn(f: proc(): Send) {
+pub fn spawn<F:FnOnce()+Send>(f: F) {
     TaskBuilder::new().spawn(f)
 }
 
@@ -221,7 +232,9 @@ pub fn spawn(f: proc(): Send) {
 ///
 /// This is equivalent to `TaskBuilder::new().try`.
 #[unstable = "Error type may change."]
-pub fn try<T: Send>(f: proc(): Send -> T) -> Result<T, Box<Any + Send>> {
+pub fn try<T,F>(f: F) -> Result<T, Box<Any + Send>>
+    where T : Send, F : FnOnce() -> T, F : Send
+{
     TaskBuilder::new().try(f)
 }
 
@@ -230,11 +243,12 @@ pub fn try<T: Send>(f: proc(): Send -> T) -> Result<T, Box<Any + Send>> {
 ///
 /// This is equivalent to `TaskBuilder::new().try_future`.
 #[experimental = "Futures are experimental."]
-pub fn try_future<T:Send>(f: proc():Send -> T) -> Future<Result<T, Box<Any + Send>>> {
+pub fn try_future<T,F>(f: F) -> Future<Result<T, Box<Any + Send>>>
+    where T:Send, F:FnOnce()->T, F:Send
+{
     TaskBuilder::new().try_future(f)
 }
 
-
 /* Lifecycle functions */
 
 /// Read the name of the current task.
@@ -274,6 +288,8 @@ mod test {
     use result;
     use std::io::{ChanReader, ChanWriter};
     use string::String;
+    use thunk::Thunk;
+    use prelude::*;
     use super::*;
 
     // !!! These tests are dangerous. If something is buggy, they will hang, !!!
@@ -281,28 +297,28 @@ mod test {
 
     #[test]
     fn test_unnamed_task() {
-        try(proc() {
+        try(move|| {
             assert!(name().is_none());
         }).map_err(|_| ()).unwrap();
     }
 
     #[test]
     fn test_owned_named_task() {
-        TaskBuilder::new().named("ada lovelace".to_string()).try(proc() {
+        TaskBuilder::new().named("ada lovelace".to_string()).try(move|| {
             assert!(name().unwrap() == "ada lovelace");
         }).map_err(|_| ()).unwrap();
     }
 
     #[test]
     fn test_static_named_task() {
-        TaskBuilder::new().named("ada lovelace").try(proc() {
+        TaskBuilder::new().named("ada lovelace").try(move|| {
             assert!(name().unwrap() == "ada lovelace");
         }).map_err(|_| ()).unwrap();
     }
 
     #[test]
     fn test_send_named_task() {
-        TaskBuilder::new().named("ada lovelace".into_cow()).try(proc() {
+        TaskBuilder::new().named("ada lovelace".into_cow()).try(move|| {
             assert!(name().unwrap() == "ada lovelace");
         }).map_err(|_| ()).unwrap();
     }
@@ -310,7 +326,7 @@ fn test_send_named_task() {
     #[test]
     fn test_run_basic() {
         let (tx, rx) = channel();
-        TaskBuilder::new().spawn(proc() {
+        TaskBuilder::new().spawn(move|| {
             tx.send(());
         });
         rx.recv();
@@ -318,10 +334,10 @@ fn test_run_basic() {
 
     #[test]
     fn test_try_future() {
-        let result = TaskBuilder::new().try_future(proc() {});
+        let result = TaskBuilder::new().try_future(move|| {});
         assert!(result.unwrap().is_ok());
 
-        let result = TaskBuilder::new().try_future(proc() -> () {
+        let result = TaskBuilder::new().try_future(move|| -> () {
             panic!();
         });
         assert!(result.unwrap().is_err());
@@ -329,7 +345,7 @@ fn test_try_future() {
 
     #[test]
     fn test_try_success() {
-        match try(proc() {
+        match try(move|| {
             "Success!".to_string()
         }).as_ref().map(|s| s.as_slice()) {
             result::Result::Ok("Success!") => (),
@@ -339,7 +355,7 @@ fn test_try_success() {
 
     #[test]
     fn test_try_panic() {
-        match try(proc() {
+        match try(move|| {
             panic!()
         }) {
             result::Result::Err(_) => (),
@@ -355,7 +371,7 @@ fn test_spawn_sched() {
 
         fn f(i: int, tx: Sender<()>) {
             let tx = tx.clone();
-            spawn(proc() {
+            spawn(move|| {
                 if i == 0 {
                     tx.send(());
                 } else {
@@ -372,8 +388,8 @@ fn f(i: int, tx: Sender<()>) {
     fn test_spawn_sched_childs_on_default_sched() {
         let (tx, rx) = channel();
 
-        spawn(proc() {
-            spawn(proc() {
+        spawn(move|| {
+            spawn(move|| {
                 tx.send(());
             });
         });
@@ -381,16 +397,18 @@ fn test_spawn_sched_childs_on_default_sched() {
         rx.recv();
     }
 
-    fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
+    fn avoid_copying_the_body<F>(spawnfn: F) where
+        F: FnOnce(Thunk),
+    {
         let (tx, rx) = channel::<uint>();
 
         let x = box 1;
         let x_in_parent = (&*x) as *const int as uint;
 
-        spawnfn(proc() {
+        spawnfn(Thunk::new(move|| {
             let x_in_child = (&*x) as *const int as uint;
             tx.send(x_in_child);
-        });
+        }));
 
         let x_in_child = rx.recv();
         assert_eq!(x_in_parent, x_in_child);
@@ -398,25 +416,21 @@ fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
 
     #[test]
     fn test_avoid_copying_the_body_spawn() {
-        avoid_copying_the_body(spawn);
+        avoid_copying_the_body(|t| spawn(move|| t.invoke(())));
     }
 
     #[test]
     fn test_avoid_copying_the_body_task_spawn() {
         avoid_copying_the_body(|f| {
             let builder = TaskBuilder::new();
-            builder.spawn(proc() {
-                f();
-            });
+            builder.spawn(move|| f.invoke(()));
         })
     }
 
     #[test]
     fn test_avoid_copying_the_body_try() {
         avoid_copying_the_body(|f| {
-            let _ = try(proc() {
-                f()
-            });
+            let _ = try(move|| f.invoke(()));
         })
     }
 
@@ -427,24 +441,24 @@ fn test_child_doesnt_ref_parent() {
         // (well, it would if the constant were 8000+ - I lowered it to be more
         // valgrind-friendly. try this at home, instead..!)
         static GENERATIONS: uint = 16;
-        fn child_no(x: uint) -> proc(): Send {
-            return proc() {
+        fn child_no(x: uint) -> Thunk {
+            return Thunk::new(move|| {
                 if x < GENERATIONS {
-                    TaskBuilder::new().spawn(child_no(x+1));
+                    TaskBuilder::new().spawn(move|| child_no(x+1).invoke(()));
                 }
-            }
+            });
         }
-        TaskBuilder::new().spawn(child_no(0));
+        TaskBuilder::new().spawn(|| child_no(0).invoke(()));
     }
 
     #[test]
     fn test_simple_newsched_spawn() {
-        spawn(proc()())
+        spawn(move|| ())
     }
 
     #[test]
     fn test_try_panic_message_static_str() {
-        match try(proc() {
+        match try(move|| {
             panic!("static string");
         }) {
             Err(e) => {
@@ -458,7 +472,7 @@ fn test_try_panic_message_static_str() {
 
     #[test]
     fn test_try_panic_message_owned_str() {
-        match try(proc() {
+        match try(move|| {
             panic!("owned string".to_string());
         }) {
             Err(e) => {
@@ -472,7 +486,7 @@ fn test_try_panic_message_owned_str() {
 
     #[test]
     fn test_try_panic_message_any() {
-        match try(proc() {
+        match try(move|| {
             panic!(box 413u16 as Box<Any + Send>);
         }) {
             Err(e) => {
@@ -490,7 +504,7 @@ fn test_try_panic_message_any() {
     fn test_try_panic_message_unit_struct() {
         struct Juju;
 
-        match try(proc() {
+        match try(move|| {
             panic!(Juju)
         }) {
             Err(ref e) if e.is::<Juju>() => {}
@@ -505,7 +519,7 @@ fn test_stdout() {
         let stdout = ChanWriter::new(tx);
 
         let r = TaskBuilder::new().stdout(box stdout as Box<Writer + Send>)
-                                  .try(proc() {
+                                  .try(move|| {
                 print!("Hello, world!");
             });
         assert!(r.is_ok());
@@ -525,7 +539,7 @@ fn task_abort_no_kill_runtime() {
     use mem;
 
     let tb = TaskBuilder::new();
-    let rx = tb.try_future(proc() {});
+    let rx = tb.try_future(move|| {});
     mem::drop(rx);
     timer::sleep(Duration::milliseconds(1000));
 }
index 029b8bf1138779a6fab4b2c15e01317c125df14f..2d5766c2393c97831ce5fe94334ae9d13fa135ef 100644 (file)
@@ -77,7 +77,7 @@
 /// });
 ///
 /// // each thread starts out with the initial value of 1
-/// spawn(proc() {
+/// spawn(move|| {
 ///     FOO.with(|f| {
 ///         assert_eq!(*f.borrow(), 1);
 ///         *f.borrow_mut() = 3;
@@ -218,7 +218,9 @@ impl<T: 'static> Key<T> {
     /// This function will `panic!()` if the key currently has its
     /// destructor running, and it **may** panic if the destructor has
     /// previously been run for this thread.
-    pub fn with<R>(&'static self, f: |&T| -> R) -> R {
+    pub fn with<R, F>(&'static self, f: F) -> R where
+        F: FnOnce(&T) -> R,
+    {
         let slot = (self.inner)();
         unsafe {
             let slot = slot.get().expect("cannot access a TLS value during or \
@@ -469,7 +471,7 @@ fn smoke_no_dtor() {
             *f.get() = 2;
         });
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             FOO.with(|f| unsafe {
                 assert_eq!(*f.get(), 1);
             });
@@ -489,7 +491,7 @@ fn smoke_dtor() {
         })
 
         let (tx, rx) = channel();
-        spawn(proc() unsafe {
+        spawn(move|| unsafe {
             let mut tx = Some(tx);
             FOO.with(|f| {
                 *f.get() = Some(Foo(tx.take().unwrap()));
@@ -537,7 +539,7 @@ fn drop(&mut self) {
             }
         }
 
-        Thread::start(proc() {
+        Thread::start(move|| {
             drop(S1);
         }).join();
     }
@@ -555,7 +557,7 @@ fn drop(&mut self) {
             }
         }
 
-        Thread::start(proc() unsafe {
+        Thread::start(move|| unsafe {
             K1.with(|s| *s.get() = Some(S1));
         }).join();
     }
@@ -582,7 +584,7 @@ fn drop(&mut self) {
         }
 
         let (tx, rx) = channel();
-        spawn(proc() unsafe {
+        spawn(move|| unsafe {
             let mut tx = Some(tx);
             K1.with(|s| *s.get() = Some(S1(tx.take().unwrap())));
         });
index 11d539c4f9fa8e4adea6b13e420f1b114a62b54e..ee742ab83751d94cd025e12acbe85dbd7f271462 100644 (file)
@@ -135,7 +135,9 @@ impl<T> Key<T> {
     ///     assert_eq!(val, 100);
     /// });
     /// ```
-    pub fn set<R>(&'static self, t: &T, cb: || -> R) -> R {
+    pub fn set<R, F>(&'static self, t: &T, cb: F) -> R where
+        F: FnOnce() -> R,
+    {
         struct Reset<'a, T: 'a> {
             key: &'a KeyInner<T>,
             val: *mut T,
@@ -175,7 +177,9 @@ fn drop(&mut self) {
     ///     // work with `slot`
     /// });
     /// ```
-    pub fn with<R>(&'static self, cb: |&T| -> R) -> R {
+    pub fn with<R, F>(&'static self, cb: F) -> R where
+        F: FnOnce(&T) -> R
+    {
         unsafe {
             let ptr = self.inner.get();
             assert!(!ptr.is_null(), "cannot access a scoped thread local \
index 7e6065129a384ad81bfe36ae5b973a23034b55cc..34a3d6aa2753645b2fcd39d69765c5fe480b5c68 100644 (file)
@@ -14,7 +14,7 @@
 
 use {fmt, i64};
 use kinds::Copy;
-use ops::{Add, Sub, Mul, Div, Neg};
+use ops::{Add, Sub, Mul, Div, Neg, FnOnce};
 use option::Option;
 use option::Option::{Some, None};
 use num::Int;
@@ -141,7 +141,7 @@ pub fn nanoseconds(nanos: i64) -> Duration {
 
     /// Runs a closure, returning the duration of time it took to run the
     /// closure.
-    pub fn span(f: ||) -> Duration {
+    pub fn span<F>(f: F) -> Duration where F: FnOnce() {
         let before = super::precise_time_ns();
         f();
         Duration::nanoseconds((super::precise_time_ns() - before) as i64)
index 0a04a953b314fdd465637117e1adfef90a2b8a28..206fb26eb55cb94826b47b7b54649c50b984b33f 100644 (file)
@@ -20,7 +20,6 @@
 pub use self::ExplicitSelf_::*;
 pub use self::Expr_::*;
 pub use self::FloatTy::*;
-pub use self::FnStyle::*;
 pub use self::FunctionRetTy::*;
 pub use self::ForeignItem_::*;
 pub use self::ImplItem::*;
@@ -255,6 +254,7 @@ pub fn none() -> PathParameters {
         AngleBracketedParameters(AngleBracketedParameterData {
             lifetimes: Vec::new(),
             types: OwnedSlice::empty(),
+            bindings: OwnedSlice::empty(),
         })
     }
 
@@ -307,6 +307,17 @@ pub fn lifetimes(&self) -> Vec<&Lifetime> {
             }
         }
     }
+
+    pub fn bindings(&self) -> Vec<&P<TypeBinding>> {
+        match *self {
+            AngleBracketedParameters(ref data) => {
+                data.bindings.iter().collect()
+            }
+            ParenthesizedParameters(_) => {
+                Vec::new()
+            }
+        }
+    }
 }
 
 /// A path like `Foo<'a, T>`
@@ -316,11 +327,14 @@ pub struct AngleBracketedParameterData {
     pub lifetimes: Vec<Lifetime>,
     /// The type parameters for this path segment, if present.
     pub types: OwnedSlice<P<Ty>>,
+    /// Bindings (equality constraints) on associated types, if present.
+    /// E.g., `Foo<A=Bar>`.
+    pub bindings: OwnedSlice<P<TypeBinding>>,
 }
 
 impl AngleBracketedParameterData {
     fn is_empty(&self) -> bool {
-        self.lifetimes.is_empty() && self.types.is_empty()
+        self.lifetimes.is_empty() && self.types.is_empty() && self.bindings.is_empty()
     }
 }
 
@@ -406,13 +420,27 @@ pub struct WhereClause {
 }
 
 #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
-pub struct WherePredicate {
+pub enum WherePredicate {
+    BoundPredicate(WhereBoundPredicate),
+    EqPredicate(WhereEqPredicate)
+}
+
+#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
+pub struct WhereBoundPredicate {
     pub id: NodeId,
     pub span: Span,
     pub ident: Ident,
     pub bounds: OwnedSlice<TyParamBound>,
 }
 
+#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
+pub struct WhereEqPredicate {
+    pub id: NodeId,
+    pub span: Span,
+    pub path: Path,
+    pub ty: P<Ty>,
+}
+
 /// The set of MetaItems that define the compilation environment of the crate,
 /// used to drive conditional compilation
 pub type CrateConfig = Vec<P<MetaItem>> ;
@@ -562,7 +590,6 @@ pub enum BinOp {
     BiGt,
 }
 
-#[cfg(not(stage0))]
 impl Copy for BinOp {}
 
 #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
@@ -691,7 +718,6 @@ pub enum Expr_ {
     ExprLoop(P<Block>, Option<Ident>),
     ExprMatch(P<Expr>, Vec<Arm>, MatchSource),
     ExprClosure(CaptureClause, Option<UnboxedClosureKind>, P<FnDecl>, P<Block>),
-    ExprProc(P<FnDecl>, P<Block>),
     ExprBlock(P<Block>),
 
     ExprAssign(P<Expr>, P<Expr>),
@@ -1000,7 +1026,7 @@ pub struct TypeField {
 pub struct TypeMethod {
     pub ident: Ident,
     pub attrs: Vec<Attribute>,
-    pub fn_style: FnStyle,
+    pub unsafety: Unsafety,
     pub abi: Abi,
     pub decl: P<FnDecl>,
     pub generics: Generics,
@@ -1119,6 +1145,16 @@ pub fn suffix_len(&self) -> uint {
     }
 }
 
+// Bind a type to an associated type: `A=Foo`.
+#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
+pub struct TypeBinding {
+    pub id: NodeId,
+    pub ident: Ident,
+    pub ty: P<Ty>,
+    pub span: Span,
+}
+
+
 // NB PartialEq method appears below.
 #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
 pub struct Ty {
@@ -1161,7 +1197,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
 pub struct ClosureTy {
     pub lifetimes: Vec<LifetimeDef>,
-    pub fn_style: FnStyle,
+    pub unsafety: Unsafety,
     pub onceness: Onceness,
     pub decl: P<FnDecl>,
     pub bounds: TyParamBounds,
@@ -1169,7 +1205,7 @@ pub struct ClosureTy {
 
 #[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
 pub struct BareFnTy {
-    pub fn_style: FnStyle,
+    pub unsafety: Unsafety,
     pub abi: Abi,
     pub lifetimes: Vec<LifetimeDef>,
     pub decl: P<FnDecl>
@@ -1187,8 +1223,6 @@ pub enum Ty_ {
     TyRptr(Option<Lifetime>, MutTy),
     /// A closure (e.g. `|uint| -> bool`)
     TyClosure(P<ClosureTy>),
-    /// A procedure (e.g `proc(uint) -> bool`)
-    TyProc(P<ClosureTy>),
     /// A bare function (e.g. `fn(uint) -> bool`)
     TyBareFn(P<BareFnTy>),
     /// A tuple (`(A, B, C, D,...)`)
@@ -1269,21 +1303,17 @@ pub struct FnDecl {
     pub variadic: bool
 }
 
-#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash)]
-pub enum FnStyle {
-    /// Declared with "unsafe fn"
-    UnsafeFn,
-    /// Declared with "fn"
-    NormalFn,
+#[deriving(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Hash)]
+pub enum Unsafety {
+    Unsafe,
+    Normal,
 }
 
-impl Copy for FnStyle {}
-
-impl fmt::Show for FnStyle {
+impl fmt::Show for Unsafety {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
-            NormalFn => "normal".fmt(f),
-            UnsafeFn => "unsafe".fmt(f),
+            Unsafety::Normal => "normal".fmt(f),
+            Unsafety::Unsafe => "unsafe".fmt(f),
         }
     }
 }
@@ -1336,7 +1366,7 @@ pub enum Method_ {
              Generics,
              Abi,
              ExplicitSelf,
-             FnStyle,
+             Unsafety,
              P<FnDecl>,
              P<Block>,
              Visibility),
@@ -1574,19 +1604,21 @@ pub struct Item {
 pub enum Item_ {
     ItemStatic(P<Ty>, Mutability, P<Expr>),
     ItemConst(P<Ty>, P<Expr>),
-    ItemFn(P<FnDecl>, FnStyle, Abi, Generics, P<Block>),
+    ItemFn(P<FnDecl>, Unsafety, Abi, Generics, P<Block>),
     ItemMod(Mod),
     ItemForeignMod(ForeignMod),
     ItemTy(P<Ty>, Generics),
     ItemEnum(EnumDef, Generics),
     ItemStruct(P<StructDef>, Generics),
     /// Represents a Trait Declaration
-    ItemTrait(Generics,
+    ItemTrait(Unsafety,
+              Generics,
               Option<TraitRef>, // (optional) default bound not required for Self.
                                 // Currently, only Sized makes sense here.
               TyParamBounds,
               Vec<TraitItem>),
-    ItemImpl(Generics,
+    ItemImpl(Unsafety,
+             Generics,
              Option<TraitRef>, // (optional) trait this impl implements
              P<Ty>, // self
              Vec<ImplItem>),
index 639a33a806395ed967212a87d58541a0fb1e1020..6decfd1c3addc22fa6d0e69563c2b48ef60843a9 100644 (file)
@@ -37,7 +37,7 @@
 ///
 /// More specifically, it is one of either:
 ///   - A function item,
-///   - A closure expr (i.e. an ExprClosure or ExprProc), or
+///   - A closure expr (i.e. an ExprClosure), or
 ///   - The default implementation for a trait method.
 ///
 /// To construct one, use the `Code::from_node` function.
@@ -73,7 +73,7 @@ fn is_fn_like(&self) -> bool {
 impl MaybeFnLike for ast::Expr {
     fn is_fn_like(&self) -> bool {
         match self.node {
-            ast::ExprClosure(..) | ast::ExprProc(..) => true,
+            ast::ExprClosure(..) => true,
             _ => false,
         }
     }
@@ -122,7 +122,7 @@ fn new(node: Node) -> FnLikeNode { FnLikeNode { node: node } }
 struct ItemFnParts<'a> {
     ident:    ast::Ident,
     decl:     &'a ast::FnDecl,
-    style:    ast::FnStyle,
+    unsafety: ast::Unsafety,
     abi:      abi::Abi,
     generics: &'a ast::Generics,
     body:     &'a Block,
@@ -181,27 +181,28 @@ pub fn id(self) -> NodeId {
     }
 
     pub fn kind(self) -> visit::FnKind<'a> {
-        let item = |p: ItemFnParts<'a>| -> visit::FnKind<'a> {
-            visit::FkItemFn(p.ident, p.generics, p.style, p.abi)
+        let item = |p: ItemFnParts<'a>| -> visit::FnKind<'a> {
+            visit::FkItemFn(p.ident, p.generics, p.unsafety, p.abi)
         };
-        let closure = |_: ClosureParts| {
+        let closure = |_: ClosureParts| {
             visit::FkFnBlock
         };
-        let method = |m: &'a ast::Method| {
+        let method = |m: &'a ast::Method| {
             visit::FkMethod(m.pe_ident(), m.pe_generics(), m)
         };
         self.handle(item, method, closure)
     }
 
-    fn handle<A>(self,
-                 item_fn: |ItemFnParts<'a>| -> A,
-                 method: |&'a ast::Method| -> A,
-                 closure: |ClosureParts<'a>| -> A) -> A {
+    fn handle<A, I, M, C>(self, item_fn: I, method: M, closure: C) -> A where
+        I: FnOnce(ItemFnParts<'a>) -> A,
+        M: FnOnce(&'a ast::Method) -> A,
+        C: FnOnce(ClosureParts<'a>) -> A,
+    {
         match self.node {
             ast_map::NodeItem(i) => match i.node {
-                ast::ItemFn(ref decl, style, abi, ref generics, ref block) =>
+                ast::ItemFn(ref decl, unsafety, abi, ref generics, ref block) =>
                     item_fn(ItemFnParts{
-                        ident: i.ident, decl: &**decl, style: style, body: &**block,
+                        ident: i.ident, decl: &**decl, unsafety: unsafety, body: &**block,
                         generics: generics, abi: abi, id: i.id, span: i.span
                     }),
                 _ => panic!("item FnLikeNode that is not fn-like"),
@@ -221,8 +222,6 @@ fn handle<A>(self,
             ast_map::NodeExpr(e) => match e.node {
                 ast::ExprClosure(_, _, ref decl, ref block) =>
                     closure(ClosureParts::new(&**decl, &**block, e.id, e.span)),
-                ast::ExprProc(ref decl, ref block) =>
-                    closure(ClosureParts::new(&**decl, &**block, e.id, e.span)),
                 _ => panic!("expr FnLikeNode that is not fn-like"),
             },
             _ => panic!("other FnLikeNode that is not fn-like"),
index 2c985f403f8516a452aebefb1dad39ac0f7c0930..6089f39e828b140e63d13a1255e5dda4855591d8 100644 (file)
@@ -424,7 +424,9 @@ pub fn get_path_elem(&self, id: NodeId) -> PathElem {
         }
     }
 
-    pub fn with_path<T>(&self, id: NodeId, f: |PathElems| -> T) -> T {
+    pub fn with_path<T, F>(&self, id: NodeId, f: F) -> T where
+        F: FnOnce(PathElems) -> T,
+    {
         self.with_path_next(id, None, f)
     }
 
@@ -438,7 +440,9 @@ fn path_to_str_with_ident(&self, id: NodeId, i: Ident) -> String {
         })
     }
 
-    fn with_path_next<T>(&self, id: NodeId, next: LinkedPath, f: |PathElems| -> T) -> T {
+    fn with_path_next<T, F>(&self, id: NodeId, next: LinkedPath, f: F) -> T where
+        F: FnOnce(PathElems) -> T,
+    {
         let parent = self.get_parent(id);
         let parent = match self.find_entry(id) {
             Some(EntryForeignItem(..)) | Some(EntryVariant(..)) => {
@@ -470,7 +474,9 @@ fn with_path_next<T>(&self, id: NodeId, next: LinkedPath, f: |PathElems| -> T) -
 
     /// Given a node ID and a closure, apply the closure to the array
     /// of attributes associated with the AST corresponding to the Node ID
-    pub fn with_attrs<T>(&self, id: NodeId, f: |Option<&[Attribute]>| -> T) -> T {
+    pub fn with_attrs<T, F>(&self, id: NodeId, f: F) -> T where
+        F: FnOnce(Option<&[Attribute]>) -> T,
+    {
         let attrs = match self.get(id) {
             NodeItem(i) => Some(i.attrs.as_slice()),
             NodeForeignItem(fi) => Some(fi.attrs.as_slice()),
@@ -749,7 +755,7 @@ fn visit_item(&mut self, i: &'ast Item) {
         let parent = self.parent;
         self.parent = i.id;
         match i.node {
-            ItemImpl(_, _, _, ref impl_items) => {
+            ItemImpl(_, _, _, _, ref impl_items) => {
                 for impl_item in impl_items.iter() {
                     match *impl_item {
                         MethodImplItem(ref m) => {
@@ -780,7 +786,7 @@ fn visit_item(&mut self, i: &'ast Item) {
                     None => {}
                 }
             }
-            ItemTrait(_, _, ref bounds, ref trait_items) => {
+            ItemTrait(_, _, _, ref bounds, ref trait_items) => {
                 for b in bounds.iter() {
                     if let TraitTyParamBound(ref t) = *b {
                         self.insert(t.trait_ref.ref_id, NodeItem(i));
@@ -853,7 +859,7 @@ fn visit_fn(&mut self, fk: visit::FnKind<'ast>, fd: &'ast FnDecl,
 
     fn visit_ty(&mut self, ty: &'ast Ty) {
         match ty.node {
-            TyClosure(ref fd) | TyProc(ref fd) => {
+            TyClosure(ref fd) => {
                 self.visit_fn_decl(&*fd.decl);
             }
             TyBareFn(ref fd) => {
index 7dba6a57fc4c9ee2ae4dc8afaeb37ab4c2f0c0eb..63c95a976d47d1d17630e921842db38cec5a6e2a 100644 (file)
@@ -174,12 +174,28 @@ pub fn ident_to_path(s: Span, identifier: Ident) -> Path {
                 parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                     lifetimes: Vec::new(),
                     types: OwnedSlice::empty(),
+                    bindings: OwnedSlice::empty(),
                 })
             }
         ),
     }
 }
 
+// If path is a single segment ident path, return that ident. Otherwise, return
+// None.
+pub fn path_to_ident(path: &Path) -> Option<Ident> {
+    if path.segments.len() != 1 {
+        return None;
+    }
+
+    let segment = &path.segments[0];
+    if !segment.parameters.is_empty() {
+        return None;
+    }
+
+    Some(segment.identifier)
+}
+
 pub fn ident_to_pat(id: NodeId, s: Span, i: Ident) -> P<Pat> {
     P(Pat {
         id: id,
@@ -217,14 +233,14 @@ pub fn trait_method_to_ty_method(method: &Method) -> TypeMethod {
                  ref generics,
                  abi,
                  ref explicit_self,
-                 fn_style,
+                 unsafety,
                  ref decl,
                  _,
                  vis) => {
             TypeMethod {
                 ident: ident,
                 attrs: method.attrs.clone(),
-                fn_style: fn_style,
+                unsafety: unsafety,
                 decl: (*decl).clone(),
                 generics: generics.clone(),
                 explicit_self: (*explicit_self).clone(),
@@ -586,6 +602,7 @@ pub fn compute_id_range_for_fn_body(fk: visit::FnKind,
     id_visitor.operation.result
 }
 
+// FIXME(#19596) unbox `it`
 pub fn walk_pat(pat: &Pat, it: |&Pat| -> bool) -> bool {
     if !it(pat) {
         return false;
@@ -616,21 +633,21 @@ pub fn walk_pat(pat: &Pat, it: |&Pat| -> bool) -> bool {
 }
 
 pub trait EachViewItem {
-    fn each_view_item(&self, f: |&ast::ViewItem| -> bool) -> bool;
+    fn each_view_item<F>(&self, f: F) -> bool where F: FnMut(&ast::ViewItem) -> bool;
 }
 
-struct EachViewItemData<'a> {
-    callback: |&ast::ViewItem|: 'a -> bool,
+struct EachViewItemData<F> where F: FnMut(&ast::ViewItem) -> bool {
+    callback: F,
 }
 
-impl<'a, 'v> Visitor<'v> for EachViewItemData<'a> {
+impl<'v, F> Visitor<'v> for EachViewItemData<F> where F: FnMut(&ast::ViewItem) -> bool {
     fn visit_view_item(&mut self, view_item: &ast::ViewItem) {
         let _ = (self.callback)(view_item);
     }
 }
 
 impl EachViewItem for ast::Crate {
-    fn each_view_item(&self, f: |&ast::ViewItem| -> bool) -> bool {
+    fn each_view_item<F>(&self, f: F) -> bool where F: FnMut(&ast::ViewItem) -> bool {
         let mut visit = EachViewItemData {
             callback: f,
         };
@@ -705,7 +722,7 @@ pub trait PostExpansionMethod {
     fn pe_generics<'a>(&'a self) -> &'a ast::Generics;
     fn pe_abi(&self) -> Abi;
     fn pe_explicit_self<'a>(&'a self) -> &'a ast::ExplicitSelf;
-    fn pe_fn_style(&self) -> ast::FnStyle;
+    fn pe_unsafety(&self) -> ast::Unsafety;
     fn pe_fn_decl<'a>(&'a self) -> &'a ast::FnDecl;
     fn pe_body<'a>(&'a self) -> &'a ast::Block;
     fn pe_vis(&self) -> ast::Visibility;
@@ -732,7 +749,7 @@ impl PostExpansionMethod for Method {
     mf_method!(pe_abi,Abi,MethDecl(_,_,abi,_,_,_,_,_),abi)
     mf_method!(pe_explicit_self,&'a ast::ExplicitSelf,
                MethDecl(_,_,_,ref explicit_self,_,_,_,_),explicit_self)
-    mf_method!(pe_fn_style,ast::FnStyle,MethDecl(_,_,_,_,fn_style,_,_,_),fn_style)
+    mf_method!(pe_unsafety,ast::Unsafety,MethDecl(_,_,_,_,unsafety,_,_,_),unsafety)
     mf_method!(pe_fn_decl,&'a ast::FnDecl,MethDecl(_,_,_,_,_,ref decl,_,_),&**decl)
     mf_method!(pe_body,&'a ast::Block,MethDecl(_,_,_,_,_,_,ref body,_),&**body)
     mf_method!(pe_vis,ast::Visibility,MethDecl(_,_,_,_,_,_,_,vis),vis)
index 5894a88ece65ab8fb326d50208784ffebfd182a1..8248eae4b8cdd4cb4b1d225a7d20dcadf93d4125 100644 (file)
@@ -115,7 +115,8 @@ fn meta_item_list<'a>(&'a self) -> Option<&'a [P<MetaItem>]> {
 
 pub trait AttributeMethods {
     fn meta<'a>(&'a self) -> &'a MetaItem;
-    fn with_desugared_doc<T>(&self, f: |&Attribute| -> T) -> T;
+    fn with_desugared_doc<T, F>(&self, f: F) -> T where
+        F: FnOnce(&Attribute) -> T;
 }
 
 impl AttributeMethods for Attribute {
@@ -127,7 +128,9 @@ fn meta<'a>(&'a self) -> &'a MetaItem {
     /// Convert self to a normal #[doc="foo"] comment, if it is a
     /// comment like `///` or `/** */`. (Returns self unchanged for
     /// non-sugared doc attributes.)
-    fn with_desugared_doc<T>(&self, f: |&Attribute| -> T) -> T {
+    fn with_desugared_doc<T, F>(&self, f: F) -> T where
+        F: FnOnce(&Attribute) -> T,
+    {
         if self.node.is_sugared_doc {
             let comment = self.value_str().unwrap();
             let meta = mk_name_value_item_str(
index 50b4f3423688cdf71e5ebcf48628955afa5c2602..d2fe667339c848b932daa7860c73f928b9193d5f 100644 (file)
@@ -350,7 +350,7 @@ pub fn new_filemap(&self, filename: FileName, src: String) -> Rc<FileMap> {
         // Remove utf-8 BOM if any.
         // FIXME #12884: no efficient/safe way to remove from the start of a string
         // and reuse the allocation.
-        let mut src = if src.starts_with("\ufeff") {
+        let mut src = if src.starts_with("\u{feff}") {
             String::from_str(src.slice_from(3))
         } else {
             String::from_str(src.as_slice())
@@ -568,7 +568,9 @@ pub fn record_expansion(&self, expn_info: ExpnInfo) -> ExpnId {
         ExpnId(expansions.len().to_u32().expect("too many ExpnInfo's!") - 1)
     }
 
-    pub fn with_expn_info<T>(&self, id: ExpnId, f: |Option<&ExpnInfo>| -> T) -> T {
+    pub fn with_expn_info<T, F>(&self, id: ExpnId, f: F) -> T where
+        F: FnOnce(Option<&ExpnInfo>) -> T,
+    {
         match id {
             NO_EXPANSION => f(None),
             ExpnId(i) => f(Some(&(*self.expansions.borrow())[i as uint]))
index 4f718555d533183bfe8608dc968ab36eb0314289..d2185a00876d2ce895efd8a055e2047446da1a0e 100644 (file)
@@ -19,8 +19,8 @@
 
 /// A folder that strips out items that do not belong in the current
 /// configuration.
-struct Context<'a> {
-    in_cfg: |attrs: &[ast::Attribute]|: 'a -> bool,
+struct Context<F> where F: FnMut(&[ast::Attribute]) -> bool {
+    in_cfg: F,
 }
 
 // Support conditional compilation by transforming the AST, stripping out
@@ -30,7 +30,7 @@ pub fn strip_unconfigured_items(diagnostic: &SpanHandler, krate: ast::Crate) ->
     strip_items(krate, |attrs| in_cfg(diagnostic, config.as_slice(), attrs))
 }
 
-impl<'a> fold::Folder for Context<'a> {
+impl<F> fold::Folder for Context<F> where F: FnMut(&[ast::Attribute]) -> bool {
     fn fold_mod(&mut self, module: ast::Mod) -> ast::Mod {
         fold_mod(self, module)
     }
@@ -54,16 +54,20 @@ fn fold_item(&mut self, item: P<ast::Item>) -> SmallVector<P<ast::Item>> {
     }
 }
 
-pub fn strip_items(krate: ast::Crate,
-                   in_cfg: |attrs: &[ast::Attribute]| -> bool)
-                   -> ast::Crate {
+pub fn strip_items<F>(krate: ast::Crate, in_cfg: F) -> ast::Crate where
+    F: FnMut(&[ast::Attribute]) -> bool,
+{
     let mut ctxt = Context {
         in_cfg: in_cfg,
     };
     ctxt.fold_crate(krate)
 }
 
-fn filter_view_item(cx: &mut Context, view_item: ast::ViewItem) -> Option<ast::ViewItem> {
+fn filter_view_item<F>(cx: &mut Context<F>,
+                       view_item: ast::ViewItem)
+                       -> Option<ast::ViewItem> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     if view_item_in_cfg(cx, &view_item) {
         Some(view_item)
     } else {
@@ -71,7 +75,11 @@ fn filter_view_item(cx: &mut Context, view_item: ast::ViewItem) -> Option<ast::V
     }
 }
 
-fn fold_mod(cx: &mut Context, ast::Mod {inner, view_items, items}: ast::Mod) -> ast::Mod {
+fn fold_mod<F>(cx: &mut Context<F>,
+               ast::Mod {inner,
+               view_items, items}: ast::Mod) -> ast::Mod where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     ast::Mod {
         inner: inner,
         view_items: view_items.into_iter().filter_map(|a| {
@@ -83,8 +91,11 @@ fn fold_mod(cx: &mut Context, ast::Mod {inner, view_items, items}: ast::Mod) ->
     }
 }
 
-fn filter_foreign_item(cx: &mut Context, item: P<ast::ForeignItem>)
-                       -> Option<P<ast::ForeignItem>> {
+fn filter_foreign_item<F>(cx: &mut Context<F>,
+                          item: P<ast::ForeignItem>)
+                          -> Option<P<ast::ForeignItem>> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     if foreign_item_in_cfg(cx, &*item) {
         Some(item)
     } else {
@@ -92,8 +103,11 @@ fn filter_foreign_item(cx: &mut Context, item: P<ast::ForeignItem>)
     }
 }
 
-fn fold_foreign_mod(cx: &mut Context, ast::ForeignMod {abi, view_items, items}: ast::ForeignMod)
-                    -> ast::ForeignMod {
+fn fold_foreign_mod<F>(cx: &mut Context<F>,
+                       ast::ForeignMod {abi, view_items, items}: ast::ForeignMod)
+                       -> ast::ForeignMod where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     ast::ForeignMod {
         abi: abi,
         view_items: view_items.into_iter().filter_map(|a| {
@@ -105,7 +119,9 @@ fn fold_foreign_mod(cx: &mut Context, ast::ForeignMod {abi, view_items, items}:
     }
 }
 
-fn fold_item(cx: &mut Context, item: P<ast::Item>) -> SmallVector<P<ast::Item>> {
+fn fold_item<F>(cx: &mut Context<F>, item: P<ast::Item>) -> SmallVector<P<ast::Item>> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     if item_in_cfg(cx, &*item) {
         SmallVector::one(item.map(|i| cx.fold_item_simple(i)))
     } else {
@@ -113,19 +129,21 @@ fn fold_item(cx: &mut Context, item: P<ast::Item>) -> SmallVector<P<ast::Item>>
     }
 }
 
-fn fold_item_underscore(cx: &mut Context, item: ast::Item_) -> ast::Item_ {
+fn fold_item_underscore<F>(cx: &mut Context<F>, item: ast::Item_) -> ast::Item_ where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     let item = match item {
-        ast::ItemImpl(a, b, c, impl_items) => {
+        ast::ItemImpl(u, a, b, c, impl_items) => {
             let impl_items = impl_items.into_iter()
                                        .filter(|ii| impl_item_in_cfg(cx, ii))
                                        .collect();
-            ast::ItemImpl(a, b, c, impl_items)
+            ast::ItemImpl(u, a, b, c, impl_items)
         }
-        ast::ItemTrait(a, b, c, methods) => {
+        ast::ItemTrait(u, a, b, c, methods) => {
             let methods = methods.into_iter()
                                  .filter(|m| trait_method_in_cfg(cx, m))
                                  .collect();
-            ast::ItemTrait(a, b, c, methods)
+            ast::ItemTrait(u, a, b, c, methods)
         }
         ast::ItemStruct(def, generics) => {
             ast::ItemStruct(fold_struct(cx, def), generics)
@@ -166,7 +184,9 @@ fn fold_item_underscore(cx: &mut Context, item: ast::Item_) -> ast::Item_ {
     fold::noop_fold_item_underscore(item, cx)
 }
 
-fn fold_struct(cx: &mut Context, def: P<ast::StructDef>) -> P<ast::StructDef> {
+fn fold_struct<F>(cx: &mut Context<F>, def: P<ast::StructDef>) -> P<ast::StructDef> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     def.map(|ast::StructDef { fields, ctor_id }| {
         ast::StructDef {
             fields: fields.into_iter().filter(|m| {
@@ -177,7 +197,9 @@ fn fold_struct(cx: &mut Context, def: P<ast::StructDef>) -> P<ast::StructDef> {
     })
 }
 
-fn retain_stmt(cx: &mut Context, stmt: &ast::Stmt) -> bool {
+fn retain_stmt<F>(cx: &mut Context<F>, stmt: &ast::Stmt) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     match stmt.node {
         ast::StmtDecl(ref decl, _) => {
             match decl.node {
@@ -191,7 +213,9 @@ fn retain_stmt(cx: &mut Context, stmt: &ast::Stmt) -> bool {
     }
 }
 
-fn fold_block(cx: &mut Context, b: P<ast::Block>) -> P<ast::Block> {
+fn fold_block<F>(cx: &mut Context<F>, b: P<ast::Block>) -> P<ast::Block> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     b.map(|ast::Block {id, view_items, stmts, expr, rules, span}| {
         let resulting_stmts: Vec<P<ast::Stmt>> =
             stmts.into_iter().filter(|a| retain_stmt(cx, &**a)).collect();
@@ -212,7 +236,9 @@ fn fold_block(cx: &mut Context, b: P<ast::Block>) -> P<ast::Block> {
     })
 }
 
-fn fold_expr(cx: &mut Context, expr: P<ast::Expr>) -> P<ast::Expr> {
+fn fold_expr<F>(cx: &mut Context<F>, expr: P<ast::Expr>) -> P<ast::Expr> where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     expr.map(|ast::Expr {id, span, node}| {
         fold::noop_fold_expr(ast::Expr {
             id: id,
@@ -229,19 +255,27 @@ fn fold_expr(cx: &mut Context, expr: P<ast::Expr>) -> P<ast::Expr> {
     })
 }
 
-fn item_in_cfg(cx: &mut Context, item: &ast::Item) -> bool {
+fn item_in_cfg<F>(cx: &mut Context<F>, item: &ast::Item) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     return (cx.in_cfg)(item.attrs.as_slice());
 }
 
-fn foreign_item_in_cfg(cx: &mut Context, item: &ast::ForeignItem) -> bool {
+fn foreign_item_in_cfg<F>(cx: &mut Context<F>, item: &ast::ForeignItem) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     return (cx.in_cfg)(item.attrs.as_slice());
 }
 
-fn view_item_in_cfg(cx: &mut Context, item: &ast::ViewItem) -> bool {
+fn view_item_in_cfg<F>(cx: &mut Context<F>, item: &ast::ViewItem) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     return (cx.in_cfg)(item.attrs.as_slice());
 }
 
-fn trait_method_in_cfg(cx: &mut Context, meth: &ast::TraitItem) -> bool {
+fn trait_method_in_cfg<F>(cx: &mut Context<F>, meth: &ast::TraitItem) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     match *meth {
         ast::RequiredMethod(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()),
         ast::ProvidedMethod(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()),
@@ -249,7 +283,9 @@ fn trait_method_in_cfg(cx: &mut Context, meth: &ast::TraitItem) -> bool {
     }
 }
 
-fn impl_item_in_cfg(cx: &mut Context, impl_item: &ast::ImplItem) -> bool {
+fn impl_item_in_cfg<F>(cx: &mut Context<F>, impl_item: &ast::ImplItem) -> bool where
+    F: FnMut(&[ast::Attribute]) -> bool
+{
     match *impl_item {
         ast::MethodImplItem(ref meth) => (cx.in_cfg)(meth.attrs.as_slice()),
         ast::TypeImplItem(ref typ) => (cx.in_cfg)(typ.attrs.as_slice()),
index bbda80bd96c33c461e9b7e2352cc79b86a9793ef..3a816987922641631edef4ea0a8629a479a517f2 100644 (file)
@@ -581,7 +581,9 @@ fn print_macro_backtrace(w: &mut EmitterWriter,
     cs.map_or(Ok(()), |call_site| print_macro_backtrace(w, cm, call_site))
 }
 
-pub fn expect<T>(diag: &SpanHandler, opt: Option<T>, msg: || -> String) -> T {
+pub fn expect<T, M>(diag: &SpanHandler, opt: Option<T>, msg: M) -> T where
+    M: FnOnce() -> String,
+{
     match opt {
         Some(t) => t,
         None => diag.handler().bug(msg().as_slice()),
index 2be11a236d3b756f53d27e757f0fdc43ef83448f..cb2a1f8acd8bf3630068e08ba6f6a1187e57d786 100644 (file)
     RefCell::new(HashMap::new())
 })
 
-fn with_registered_diagnostics<T>(f: |&mut HashMap<Name, Option<Name>>| -> T) -> T {
-    REGISTERED_DIAGNOSTICS.with(|slot| {
+fn with_registered_diagnostics<T, F>(f: F) -> T where
+    F: FnOnce(&mut HashMap<Name, Option<Name>>) -> T,
+{
+    REGISTERED_DIAGNOSTICS.with(move |slot| {
         f(&mut *slot.borrow_mut())
     })
 }
 
-fn with_used_diagnostics<T>(f: |&mut HashMap<Name, Span>| -> T) -> T {
-    USED_DIAGNOSTICS.with(|slot| {
+fn with_used_diagnostics<T, F>(f: F) -> T where
+    F: FnOnce(&mut HashMap<Name, Span>) -> T,
+{
+    USED_DIAGNOSTICS.with(move |slot| {
         f(&mut *slot.borrow_mut())
     })
 }
index b4bb1a1a52963cbdeff903363e5316c7129166ad..d35091f8ab0aaf11cd205cd4f3b13a94c95bbad6 100644 (file)
@@ -37,7 +37,8 @@ fn path_all(&self, sp: Span,
                 global: bool,
                 idents: Vec<ast::Ident> ,
                 lifetimes: Vec<ast::Lifetime>,
-                types: Vec<P<ast::Ty>> )
+                types: Vec<P<ast::Ty>>,
+                bindings: Vec<P<ast::TypeBinding>> )
         -> ast::Path;
 
     // types
@@ -293,20 +294,21 @@ fn view_use_glob(&self, sp: Span,
 
 impl<'a> AstBuilder for ExtCtxt<'a> {
     fn path(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path {
-        self.path_all(span, false, strs, Vec::new(), Vec::new())
+        self.path_all(span, false, strs, Vec::new(), Vec::new(), Vec::new())
     }
     fn path_ident(&self, span: Span, id: ast::Ident) -> ast::Path {
         self.path(span, vec!(id))
     }
     fn path_global(&self, span: Span, strs: Vec<ast::Ident> ) -> ast::Path {
-        self.path_all(span, true, strs, Vec::new(), Vec::new())
+        self.path_all(span, true, strs, Vec::new(), Vec::new(), Vec::new())
     }
     fn path_all(&self,
                 sp: Span,
                 global: bool,
                 mut idents: Vec<ast::Ident> ,
                 lifetimes: Vec<ast::Lifetime>,
-                types: Vec<P<ast::Ty>> )
+                types: Vec<P<ast::Ty>>,
+                bindings: Vec<P<ast::TypeBinding>> )
                 -> ast::Path {
         let last_identifier = idents.pop().unwrap();
         let mut segments: Vec<ast::PathSegment> = idents.into_iter()
@@ -321,6 +323,7 @@ fn path_all(&self,
             parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                 lifetimes: lifetimes,
                 types: OwnedSlice::from_vec(types),
+                bindings: OwnedSlice::from_vec(bindings),
             })
         });
         ast::Path {
@@ -391,7 +394,8 @@ fn ty_option(&self, ty: P<ast::Ty>) -> P<ast::Ty> {
                               self.ident_of("Option")
                           ),
                           Vec::new(),
-                          vec!( ty )))
+                          vec!( ty ),
+                          Vec::new()))
     }
 
     fn ty_field_imm(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::TypeField {
@@ -965,7 +969,7 @@ fn item_fn_poly(&self,
                   name,
                   Vec::new(),
                   ast::ItemFn(self.fn_decl(inputs, output),
-                              ast::NormalFn,
+                              ast::Unsafety::Normal,
                               abi::Rust,
                               generics,
                               body))
index 0595b0bc7f4409e417fcfc95fbb460c159b15ce5..3145b3bb1a4fe2da4ebbc9b77361a8b96abddfb3 100644 (file)
 use ext::deriving::generic::ty::*;
 use ptr::P;
 
-pub fn expand_deriving_bound(cx: &mut ExtCtxt,
-                             span: Span,
-                             mitem: &MetaItem,
-                             item: &Item,
-                             push: |P<Item>|) {
-
+pub fn expand_deriving_bound<F>(cx: &mut ExtCtxt,
+                                span: Span,
+                                mitem: &MetaItem,
+                                item: &Item,
+                                push: F) where
+    F: FnOnce(P<Item>),
+{
     let name = match mitem.node {
         MetaWord(ref tname) => {
             match tname.get() {
index fccc67bf220936db2dcdcf74af1ce7b192396a38..a34764221b3b60704212365fe0b15b9f10ba69b2 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_clone(cx: &mut ExtCtxt,
-                             span: Span,
-                             mitem: &MetaItem,
-                             item: &Item,
-                             push: |P<Item>|) {
+pub fn expand_deriving_clone<F>(cx: &mut ExtCtxt,
+                                span: Span,
+                                mitem: &MetaItem,
+                                item: &Item,
+                                push: F) where
+    F: FnOnce(P<Item>),
+{
     let inline = cx.meta_word(span, InternedString::new("inline"));
     let attrs = vec!(cx.attribute(span, inline));
     let trait_def = TraitDef {
@@ -60,7 +62,7 @@ fn cs_clone(
         cx.ident_of("Clone"),
         cx.ident_of("clone"),
     ];
-    let subcall = |field: &FieldInfo| {
+    let subcall = |&: field: &FieldInfo| {
         let args = vec![cx.expr_addr_of(field.span, field.self_.clone())];
 
         cx.expr_call_global(field.span, fn_path.clone(), args)
index 7727bb824db3abf443d5ae134443bfba8ac34d03..c8bf5ec326cd9178cfea5acdc57d15c419c44bd3 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_eq(cx: &mut ExtCtxt,
-                          span: Span,
-                          mitem: &MetaItem,
-                          item: &Item,
-                          push: |P<Item>|) {
+pub fn expand_deriving_eq<F>(cx: &mut ExtCtxt,
+                             span: Span,
+                             mitem: &MetaItem,
+                             item: &Item,
+                             push: F) where
+    F: FnOnce(P<Item>),
+{
     // structures are equal if all fields are equal, and non equal, if
     // any fields are not equal or if the enum variants are different
     fn cs_eq(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {
index 1bd55b5d5045130a66e3a8b2beced966f2052b05..bd1962de56ed903d9a0f0a8d9353de8bf8cd45d5 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_ord(cx: &mut ExtCtxt,
-                           span: Span,
-                           mitem: &MetaItem,
-                           item: &Item,
-                           push: |P<Item>|) {
+pub fn expand_deriving_ord<F>(cx: &mut ExtCtxt,
+                              span: Span,
+                              mitem: &MetaItem,
+                              item: &Item,
+                              push: F) where
+    F: FnOnce(P<Item>),
+{
     macro_rules! md (
         ($name:expr, $op:expr, $equal:expr) => { {
             let inline = cx.meta_word(span, InternedString::new("inline"));
index ecee2008254ddb43dc460754863dbaadd05308ea..2b986bea1221eb67b7ed25898d48183b50bf9b29 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_totaleq(cx: &mut ExtCtxt,
-                               span: Span,
-                               mitem: &MetaItem,
-                               item: &Item,
-                               push: |P<Item>|) {
+pub fn expand_deriving_totaleq<F>(cx: &mut ExtCtxt,
+                                  span: Span,
+                                  mitem: &MetaItem,
+                                  item: &Item,
+                                  push: F) where
+    F: FnOnce(P<Item>),
+{
     fn cs_total_eq_assert(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<Expr> {
         cs_same_method(|cx, span, exprs| {
             // create `a.<method>(); b.<method>(); c.<method>(); ...`
index 6900773f44d4bec09aeba6251d00e03c145b4b13..a2bf46f41fc961a146a05f0d8a14a5b76d6f7ae3 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_totalord(cx: &mut ExtCtxt,
-                                span: Span,
-                                mitem: &MetaItem,
-                                item: &Item,
-                                push: |P<Item>|) {
+pub fn expand_deriving_totalord<F>(cx: &mut ExtCtxt,
+                                   span: Span,
+                                   mitem: &MetaItem,
+                                   item: &Item,
+                                   push: F) where
+    F: FnOnce(P<Item>),
+{
     let inline = cx.meta_word(span, InternedString::new("inline"));
     let attrs = vec!(cx.attribute(span, inline));
     let trait_def = TraitDef {
index e3cf2b68752fd78e0f000242c7742c89324b82d3..0a8d59da8967724cb5a171b2e71876ca053b689b 100644 (file)
 use parse::token;
 use ptr::P;
 
-pub fn expand_deriving_decodable(cx: &mut ExtCtxt,
-                                 span: Span,
-                                 mitem: &MetaItem,
-                                 item: &Item,
-                                 push: |P<Item>|) {
+pub fn expand_deriving_decodable<F>(cx: &mut ExtCtxt,
+                                    span: Span,
+                                    mitem: &MetaItem,
+                                    item: &Item,
+                                    push: F) where
+    F: FnOnce(P<Item>),
+{
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),
@@ -155,12 +157,14 @@ fn decodable_substructure(cx: &mut ExtCtxt, trait_span: Span,
 /// Create a decoder for a single enum variant/struct:
 /// - `outer_pat_path` is the path to this enum variant/struct
 /// - `getarg` should retrieve the `uint`-th field with name `@str`.
-fn decode_static_fields(cx: &mut ExtCtxt,
-                        trait_span: Span,
-                        outer_pat_path: ast::Path,
-                        fields: &StaticFields,
-                        getarg: |&mut ExtCtxt, Span, InternedString, uint| -> P<Expr>)
-                        -> P<Expr> {
+fn decode_static_fields<F>(cx: &mut ExtCtxt,
+                           trait_span: Span,
+                           outer_pat_path: ast::Path,
+                           fields: &StaticFields,
+                           mut getarg: F)
+                           -> P<Expr> where
+    F: FnMut(&mut ExtCtxt, Span, InternedString, uint) -> P<Expr>,
+{
     match *fields {
         Unnamed(ref fields) => {
             let path_expr = cx.expr_path(outer_pat_path);
index f4a66414d89bd664db5044a970dd6bab47125382..b3621490ce3bf6191e38415282e6d91ab1f5f1e7 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_default(cx: &mut ExtCtxt,
-                            span: Span,
-                            mitem: &MetaItem,
-                            item: &Item,
-                            push: |P<Item>|) {
+pub fn expand_deriving_default<F>(cx: &mut ExtCtxt,
+                                  span: Span,
+                                  mitem: &MetaItem,
+                                  item: &Item,
+                                  push: F) where
+    F: FnOnce(P<Item>),
+{
     let inline = cx.meta_word(span, InternedString::new("inline"));
     let attrs = vec!(cx.attribute(span, inline));
     let trait_def = TraitDef {
index 62f3b5d01b41a2053da0a00e03364025571de532..30851ebeaaef3562b70554f7fad0904d88d3fba4 100644 (file)
 use parse::token;
 use ptr::P;
 
-pub fn expand_deriving_encodable(cx: &mut ExtCtxt,
-                                 span: Span,
-                                 mitem: &MetaItem,
-                                 item: &Item,
-                                 push: |P<Item>|) {
+pub fn expand_deriving_encodable<F>(cx: &mut ExtCtxt,
+                                    span: Span,
+                                    mitem: &MetaItem,
+                                    item: &Item,
+                                    push: F) where
+    F: FnOnce(P<Item>),
+{
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),
index d5f472bd827101db62d38149a374b17ff1b7ef87..f40be823a1a543346122c3ca466e95b377adceea 100644 (file)
@@ -333,11 +333,13 @@ pub fn combine_substructure<'a>(f: CombineSubstructureFunc<'a>)
 
 
 impl<'a> TraitDef<'a> {
-    pub fn expand(&self,
-                  cx: &mut ExtCtxt,
-                  mitem: &ast::MetaItem,
-                  item: &ast::Item,
-                  push: |P<ast::Item>|) {
+    pub fn expand<F>(&self,
+                     cx: &mut ExtCtxt,
+                     mitem: &ast::MetaItem,
+                     item: &ast::Item,
+                     push: F) where
+        F: FnOnce(P<ast::Item>),
+    {
         let newitem = match item.node {
             ast::ItemStruct(ref struct_def, ref generics) => {
                 self.expand_struct_def(cx,
@@ -444,7 +446,7 @@ fn create_derived_impl(&self,
         // Create the type of `self`.
         let self_type = cx.ty_path(
             cx.path_all(self.span, false, vec!( type_ident ), self_lifetimes,
-                        self_ty_params.into_vec()));
+                        self_ty_params.into_vec(), Vec::new()));
 
         let attr = cx.attribute(
             self.span,
@@ -460,7 +462,8 @@ fn create_derived_impl(&self,
             self.span,
             ident,
             a,
-            ast::ItemImpl(trait_generics,
+            ast::ItemImpl(ast::Unsafety::Normal,
+                          trait_generics,
                           opt_trait_ref,
                           self_type,
                           methods.into_iter()
@@ -682,7 +685,7 @@ fn create_method(&self,
                                 fn_generics,
                                 abi,
                                 explicit_self,
-                                ast::NormalFn,
+                                ast::Unsafety::Normal,
                                 fn_decl,
                                 body_block,
                                 ast::Inherited)
@@ -1309,14 +1312,16 @@ fn create_enum_variant_pattern(&self,
 
 /// Fold the fields. `use_foldl` controls whether this is done
 /// left-to-right (`true`) or right-to-left (`false`).
-pub fn cs_fold(use_foldl: bool,
-               f: |&mut ExtCtxt, Span, P<Expr>, P<Expr>, &[P<Expr>]| -> P<Expr>,
-               base: P<Expr>,
-               enum_nonmatch_f: EnumNonMatchCollapsedFunc,
-               cx: &mut ExtCtxt,
-               trait_span: Span,
-               substructure: &Substructure)
-               -> P<Expr> {
+pub fn cs_fold<F>(use_foldl: bool,
+                  mut f: F,
+                  base: P<Expr>,
+                  enum_nonmatch_f: EnumNonMatchCollapsedFunc,
+                  cx: &mut ExtCtxt,
+                  trait_span: Span,
+                  substructure: &Substructure)
+                  -> P<Expr> where
+    F: FnMut(&mut ExtCtxt, Span, P<Expr>, P<Expr>, &[P<Expr>]) -> P<Expr>,
+{
     match *substructure.fields {
         EnumMatching(_, _, ref all_fields) | Struct(ref all_fields) => {
             if use_foldl {
@@ -1355,12 +1360,14 @@ pub fn cs_fold(use_foldl: bool,
 ///              self_2.method(__arg_1_2, __arg_2_2)])
 /// ```
 #[inline]
-pub fn cs_same_method(f: |&mut ExtCtxt, Span, Vec<P<Expr>>| -> P<Expr>,
-                      enum_nonmatch_f: EnumNonMatchCollapsedFunc,
-                      cx: &mut ExtCtxt,
-                      trait_span: Span,
-                      substructure: &Substructure)
-                      -> P<Expr> {
+pub fn cs_same_method<F>(f: F,
+                         enum_nonmatch_f: EnumNonMatchCollapsedFunc,
+                         cx: &mut ExtCtxt,
+                         trait_span: Span,
+                         substructure: &Substructure)
+                         -> P<Expr> where
+    F: FnOnce(&mut ExtCtxt, Span, Vec<P<Expr>>) -> P<Expr>,
+{
     match *substructure.fields {
         EnumMatching(_, _, ref all_fields) | Struct(ref all_fields) => {
             // call self_n.method(other_1_n, other_2_n, ...)
@@ -1388,14 +1395,16 @@ pub fn cs_same_method(f: |&mut ExtCtxt, Span, Vec<P<Expr>>| -> P<Expr>,
 /// fields. `use_foldl` controls whether this is done left-to-right
 /// (`true`) or right-to-left (`false`).
 #[inline]
-pub fn cs_same_method_fold(use_foldl: bool,
-                           f: |&mut ExtCtxt, Span, P<Expr>, P<Expr>| -> P<Expr>,
-                           base: P<Expr>,
-                           enum_nonmatch_f: EnumNonMatchCollapsedFunc,
-                           cx: &mut ExtCtxt,
-                           trait_span: Span,
-                           substructure: &Substructure)
-                           -> P<Expr> {
+pub fn cs_same_method_fold<F>(use_foldl: bool,
+                              mut f: F,
+                              base: P<Expr>,
+                              enum_nonmatch_f: EnumNonMatchCollapsedFunc,
+                              cx: &mut ExtCtxt,
+                              trait_span: Span,
+                              substructure: &Substructure)
+                              -> P<Expr> where
+    F: FnMut(&mut ExtCtxt, Span, P<Expr>, P<Expr>) -> P<Expr>,
+{
     cs_same_method(
         |cx, span, vals| {
             if use_foldl {
index 0139827316193e0577c65b7a4597e3dc89bca18e..56d11c2377fa4f58050b1d162663aeccaf31bfbc 100644 (file)
@@ -80,7 +80,7 @@ pub fn to_path(&self,
         let lt = mk_lifetimes(cx, span, &self.lifetime);
         let tys = self.params.iter().map(|t| t.to_ty(cx, span, self_ty, self_generics)).collect();
 
-        cx.path_all(span, self.global, idents, lt, tys)
+        cx.path_all(span, self.global, idents, lt, tys, Vec::new())
     }
 }
 
@@ -177,7 +177,7 @@ pub fn to_path(&self,
                                                        .collect();
 
                 cx.path_all(span, false, vec!(self_ty), lifetimes,
-                            self_params.into_vec())
+                            self_params.into_vec(), Vec::new())
             }
             Literal(ref p) => {
                 p.to_path(cx, span, self_ty, self_generics)
index b7f11c2582548114d5dc091ebc5100947001aef8..4e59124a1294f042a966dd0f90c0064b67260cf5 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_hash(cx: &mut ExtCtxt,
-                            span: Span,
-                            mitem: &MetaItem,
-                            item: &Item,
-                            push: |P<Item>|) {
+pub fn expand_deriving_hash<F>(cx: &mut ExtCtxt,
+                               span: Span,
+                               mitem: &MetaItem,
+                               item: &Item,
+                               push: F) where
+    F: FnOnce(P<Item>),
+{
 
     let (path, generics, args) = if cx.ecfg.deriving_hash_type_parameter {
         (Path::new_(vec!("std", "hash", "Hash"), None,
index cd2d98b70f105b38a27ed1573b9c60d8da76b3e2..8abd846373ae10264802cbb3a8880f64d644cb37 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt,
-                                      span: Span,
-                                      mitem: &MetaItem,
-                                      item: &Item,
-                                      push: |P<Item>|) {
+pub fn expand_deriving_from_primitive<F>(cx: &mut ExtCtxt,
+                                         span: Span,
+                                         mitem: &MetaItem,
+                                         item: &Item,
+                                         push: F) where
+    F: FnOnce(P<Item>),
+{
     let inline = cx.meta_word(span, InternedString::new("inline"));
     let attrs = vec!(cx.attribute(span, inline));
     let trait_def = TraitDef {
index 8ad8436906b3c7ea054041e35d482fc21eb4693f..4f6e4d1fb3c106484353c1e61e748e70485aaa1f 100644 (file)
 use ext::deriving::generic::ty::*;
 use ptr::P;
 
-pub fn expand_deriving_rand(cx: &mut ExtCtxt,
-                            span: Span,
-                            mitem: &MetaItem,
-                            item: &Item,
-                            push: |P<Item>|) {
+pub fn expand_deriving_rand<F>(cx: &mut ExtCtxt,
+                               span: Span,
+                               mitem: &MetaItem,
+                               item: &Item,
+                               push: F) where
+    F: FnOnce(P<Item>),
+{
     let trait_def = TraitDef {
         span: span,
         attributes: Vec::new(),
@@ -64,7 +66,7 @@ fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
         cx.ident_of("Rand"),
         cx.ident_of("rand")
     );
-    let rand_call = |cx: &mut ExtCtxt, span| {
+    let mut rand_call = |&mut: cx: &mut ExtCtxt, span| {
         cx.expr_call_global(span,
                             rand_ident.clone(),
                             vec!(rng.clone()))
@@ -88,6 +90,7 @@ fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
                                         true,
                                         rand_ident.clone(),
                                         Vec::new(),
+                                        Vec::new(),
                                         Vec::new());
             let rand_name = cx.expr_path(rand_name);
 
@@ -132,12 +135,14 @@ fn rand_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
         _ => cx.bug("Non-static method in `deriving(Rand)`")
     };
 
-    fn rand_thing(cx: &mut ExtCtxt,
-                  trait_span: Span,
-                  ctor_path: ast::Path,
-                  summary: &StaticFields,
-                  rand_call: |&mut ExtCtxt, Span| -> P<Expr>)
-                  -> P<Expr> {
+    fn rand_thing<F>(cx: &mut ExtCtxt,
+                     trait_span: Span,
+                     ctor_path: ast::Path,
+                     summary: &StaticFields,
+                     mut rand_call: F)
+                     -> P<Expr> where
+        F: FnMut(&mut ExtCtxt, Span) -> P<Expr>,
+    {
         let path = cx.expr_path(ctor_path.clone());
         match *summary {
             Unnamed(ref fields) => {
index 322a84eaa2be0daa3c15f507f3a240aca92226f0..a68b521bbc9a2ea2465a56a41d18ac6c82fb7d70 100644 (file)
 
 use std::collections::HashMap;
 
-pub fn expand_deriving_show(cx: &mut ExtCtxt,
-                            span: Span,
-                            mitem: &MetaItem,
-                            item: &Item,
-                            push: |P<Item>|) {
+pub fn expand_deriving_show<F>(cx: &mut ExtCtxt,
+                               span: Span,
+                               mitem: &MetaItem,
+                               item: &Item,
+                               push: F) where
+    F: FnOnce(P<Item>),
+{
     // &mut ::std::fmt::Formatter
     let fmtr = Ptr(box Literal(Path::new(vec!("std", "fmt", "Formatter"))),
                    Borrowed(None, ast::MutMutable));
index 7f265b529ffea6f53b224272af94b5a11a287939..ea32549cad266f21893b082bcfc13f5e68505aeb 100644 (file)
 use parse::token::InternedString;
 use ptr::P;
 
-pub fn expand_deriving_zero(cx: &mut ExtCtxt,
-                            span: Span,
-                            mitem: &MetaItem,
-                            item: &Item,
-                            push: |P<Item>|) {
+pub fn expand_deriving_zero<F>(cx: &mut ExtCtxt,
+                               span: Span,
+                               mitem: &MetaItem,
+                               item: &Item,
+                               push: F) where
+    F: FnOnce(P<Item>),
+{
     let inline = cx.meta_word(span, InternedString::new("inline"));
     let attrs = vec!(cx.attribute(span, inline));
     let trait_def = TraitDef {
index e6a44c57f1b6581a8cc810ae559160ef20401b4f..8c17b31f458d0bf9534419b86826c9290ce50cd3 100644 (file)
@@ -45,7 +45,8 @@ pub fn expand_option_env<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenT
                                                    Some(cx.lifetime(sp,
                                                         cx.ident_of(
                                                             "'static").name)),
-                                                   ast::MutImmutable))))
+                                                   ast::MutImmutable)),
+                                   Vec::new()))
       }
       Some(s) => {
           cx.expr_call_global(sp,
index a697d332d16afebb09fa8b9d91954ba7471fb24d..e280e6e4491605a504e8f8ee6407b6dd9c5e088e 100644 (file)
@@ -217,13 +217,6 @@ pub fn expand_expr(e: P<ast::Expr>, fld: &mut MacroExpander) -> P<ast::Expr> {
             P(ast::Expr{id:id, node: new_node, span: fld.new_span(span)})
         }
 
-        ast::ExprProc(fn_decl, block) => {
-            let (rewritten_fn_decl, rewritten_block)
-                = expand_and_rename_fn_decl_and_block(fn_decl, block, fld);
-            let new_node = ast::ExprProc(rewritten_fn_decl, rewritten_block);
-            P(ast::Expr{id:id, node: new_node, span: fld.new_span(span)})
-        }
-
         _ => {
             P(noop_fold_expr(ast::Expr {
                 id: id,
@@ -238,11 +231,13 @@ pub fn expand_expr(e: P<ast::Expr>, fld: &mut MacroExpander) -> P<ast::Expr> {
 /// of expansion and the mark which must be applied to the result.
 /// Our current interface doesn't allow us to apply the mark to the
 /// result until after calling make_expr, make_items, etc.
-fn expand_mac_invoc<T>(mac: ast::Mac, span: codemap::Span,
-                       parse_thunk: |Box<MacResult>|->Option<T>,
-                       mark_thunk: |T,Mrk|->T,
-                       fld: &mut MacroExpander)
-                       -> Option<T>
+fn expand_mac_invoc<T, F, G>(mac: ast::Mac, span: codemap::Span,
+                             parse_thunk: F,
+                             mark_thunk: G,
+                             fld: &mut MacroExpander)
+                             -> Option<T> where
+    F: FnOnce(Box<MacResult>) -> Option<T>,
+    G: FnOnce(T, Mrk) -> T,
 {
     match mac.node {
         // it would almost certainly be cleaner to pass the whole
@@ -1026,16 +1021,17 @@ fn expand_method(m: P<ast::Method>, fld: &mut MacroExpander) -> SmallVector<P<as
                                  |meths, mark| meths.move_map(|m| mark_method(m, mark)),
                                  fld);
 
-            let new_methods = match maybe_new_methods {
-                Some(methods) => methods,
+            match maybe_new_methods {
+                Some(methods) => {
+                    // expand again if necessary
+                    let new_methods = methods.into_iter()
+                                             .flat_map(|m| fld.fold_method(m).into_iter())
+                                             .collect();
+                    fld.cx.bt_pop();
+                    new_methods
+                }
                 None => SmallVector::zero()
-            };
-
-            // expand again if necessary
-            let new_methods = new_methods.into_iter()
-                                  .flat_map(|m| fld.fold_method(m).into_iter()).collect();
-            fld.cx.bt_pop();
-            new_methods
+            }
         }
     })
 }
@@ -1574,17 +1570,6 @@ macro_rules! add_method (($T:ty) =>
             0)
     }
 
-    // closure arg hygiene (ExprProc)
-    // expands to fn f(){(proc(x_1 : int) {(x_2 + x_1)})(3);}
-    #[test] fn closure_arg_hygiene_2(){
-        run_renaming_test(
-            &("macro_rules! inject_x (()=>(x))
-              fn f(){ (proc(x : int){(inject_x!() + x)})(3); }",
-              vec!(vec!(1)),
-              true),
-            0)
-    }
-
     // macro_rules in method position. Sadly, unimplemented.
     #[test] fn macro_in_method_posn(){
         expand_crate_str(
index c8fed3dcd16f6f092bdee2ef7cf1adad042e2669..5d595474e9c70e33c25f0fde134030ace1e98d55 100644 (file)
@@ -530,6 +530,7 @@ fn to_expr(mut self, invocation: Invocation) -> P<ast::Expr> {
                     self.fmtsp,
                     true, Context::rtpath(self.ecx, "Argument"),
                     vec![static_lifetime],
+                    vec![],
                     vec![]
                 ));
             lets.push(Context::item_static_array(self.ecx,
index 48120b575acd2fd10d4344c217a057b31aa8bb82..a4e06aeaf63b9aa0d1b06a968254dca4b0cd1cc2 100644 (file)
@@ -105,9 +105,11 @@ pub fn apply_renames(renames: &RenameList, ctxt: SyntaxContext) -> SyntaxContext
 }
 
 /// Fetch the SCTable from TLS, create one if it doesn't yet exist.
-pub fn with_sctable<T>(op: |&SCTable| -> T) -> T {
+pub fn with_sctable<T, F>(op: F) -> T where
+    F: FnOnce(&SCTable) -> T,
+{
     thread_local!(static SCTABLE_KEY: SCTable = new_sctable_internal())
-    SCTABLE_KEY.with(|slot| op(slot))
+    SCTABLE_KEY.with(move |slot| op(slot))
 }
 
 // Make a fresh syntax context table with EmptyCtxt in slot zero
@@ -167,12 +169,14 @@ pub fn resolve(id: Ident) -> Name {
 
 // okay, I admit, putting this in TLS is not so nice:
 // fetch the SCTable from TLS, create one if it doesn't yet exist.
-fn with_resolve_table_mut<T>(op: |&mut ResolveTable| -> T) -> T {
+fn with_resolve_table_mut<T, F>(op: F) -> T where
+    F: FnOnce(&mut ResolveTable) -> T,
+{
     thread_local!(static RESOLVE_TABLE_KEY: RefCell<ResolveTable> = {
         RefCell::new(HashMap::new())
     })
 
-    RESOLVE_TABLE_KEY.with(|slot| op(&mut *slot.borrow_mut()))
+    RESOLVE_TABLE_KEY.with(move |slot| op(&mut *slot.borrow_mut()))
 }
 
 /// Resolve a syntax object to a name, per MTWT.
index b8f60e77601cfb63b51d53d40073977c5e17877b..9656629e14d7707c2adad859a0f32de332c1045b 100644 (file)
@@ -215,7 +215,7 @@ fn visit_item(&mut self, i: &ast::Item) {
                 }
             }
 
-            ast::ItemImpl(_, _, _, ref items) => {
+            ast::ItemImpl(_, _, _, _, ref items) => {
                 if attr::contains_name(i.attrs.as_slice(),
                                        "unsafe_destructor") {
                     self.gate_feature("unsafe_destructor",
@@ -306,12 +306,6 @@ fn visit_ty(&mut self, t: &ast::Ty) {
 
     fn visit_expr(&mut self, e: &ast::Expr) {
         match e.node {
-            ast::ExprClosure(_, Some(_), _, _) => {
-                self.gate_feature("unboxed_closures",
-                                  e.span,
-                                  "unboxed closures are a work-in-progress \
-                                   feature with known bugs");
-            }
             ast::ExprSlice(..) => {
                 self.gate_feature("slicing_syntax",
                                   e.span,
@@ -374,19 +368,6 @@ fn visit_fn(&mut self,
         }
         visit::walk_fn(self, fn_kind, fn_decl, block, span);
     }
-
-    fn visit_path_parameters(&mut self, path_span: Span, parameters: &'v ast::PathParameters) {
-        match *parameters {
-            ast::ParenthesizedParameters(..) => {
-                self.gate_feature("unboxed_closures",
-                                  path_span,
-                                  "parenthetical parameter notation is subject to change");
-            }
-            ast::AngleBracketedParameters(..) => { }
-        }
-
-        visit::walk_path_parameters(self, path_span, parameters)
-    }
 }
 
 pub fn check_crate(span_handler: &SpanHandler, krate: &ast::Crate) -> (Features, Vec<Span>) {
index 122f99cabb3f6a1c67f5afa41ff8c6268babd635..8a578c2cb05c0f82e2d61544e936723353816691 100644 (file)
 
 // This could have a better place to live.
 pub trait MoveMap<T> {
-    fn move_map(self, f: |T| -> T) -> Self;
+    fn move_map<F>(self, f: F) -> Self where F: FnMut(T) -> T;
 }
 
 impl<T> MoveMap<T> for Vec<T> {
-    fn move_map(mut self, f: |T| -> T) -> Vec<T> {
+    fn move_map<F>(mut self, mut f: F) -> Vec<T> where F: FnMut(T) -> T {
         for p in self.iter_mut() {
             unsafe {
                 // FIXME(#5016) this shouldn't need to zero to be safe.
@@ -48,7 +48,7 @@ fn move_map(mut self, f: |T| -> T) -> Vec<T> {
 }
 
 impl<T> MoveMap<T> for OwnedSlice<T> {
-    fn move_map(self, f: |T| -> T) -> OwnedSlice<T> {
+    fn move_map<F>(self, f: F) -> OwnedSlice<T> where F: FnMut(T) -> T {
         OwnedSlice::from_vec(self.into_vec().move_map(f))
     }
 }
@@ -146,6 +146,10 @@ fn fold_qpath(&mut self, t: P<QPath>) -> P<QPath> {
         noop_fold_qpath(t, self)
     }
 
+    fn fold_ty_binding(&mut self, t: P<TypeBinding>) -> P<TypeBinding> {
+        noop_fold_ty_binding(t, self)
+    }
+
     fn fold_mod(&mut self, m: Mod) -> Mod {
         noop_fold_mod(m, self)
     }
@@ -391,6 +395,15 @@ pub fn noop_fold_decl<T: Folder>(d: P<Decl>, fld: &mut T) -> SmallVector<P<Decl>
     })
 }
 
+pub fn noop_fold_ty_binding<T: Folder>(b: P<TypeBinding>, fld: &mut T) -> P<TypeBinding> {
+    b.map(|TypeBinding { id, ident, ty, span }| TypeBinding {
+        id: fld.new_id(id),
+        ident: ident,
+        ty: fld.fold_ty(ty),
+        span: fld.new_span(span),
+    })
+}
+
 pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> {
     t.map(|Ty {id, node, span}| Ty {
         id: fld.new_id(id),
@@ -402,20 +415,9 @@ pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> {
                 TyRptr(fld.fold_opt_lifetime(region), fld.fold_mt(mt))
             }
             TyClosure(f) => {
-                TyClosure(f.map(|ClosureTy {fn_style, onceness, bounds, decl, lifetimes}| {
+                TyClosure(f.map(|ClosureTy {unsafety, onceness, bounds, decl, lifetimes}| {
                     ClosureTy {
-                        fn_style: fn_style,
-                        onceness: onceness,
-                        bounds: fld.fold_bounds(bounds),
-                        decl: fld.fold_fn_decl(decl),
-                        lifetimes: fld.fold_lifetime_defs(lifetimes)
-                    }
-                }))
-            }
-            TyProc(f) => {
-                TyProc(f.map(|ClosureTy {fn_style, onceness, bounds, decl, lifetimes}| {
-                    ClosureTy {
-                        fn_style: fn_style,
+                        unsafety: unsafety,
                         onceness: onceness,
                         bounds: fld.fold_bounds(bounds),
                         decl: fld.fold_fn_decl(decl),
@@ -424,9 +426,9 @@ pub fn noop_fold_ty<T: Folder>(t: P<Ty>, fld: &mut T) -> P<Ty> {
                 }))
             }
             TyBareFn(f) => {
-                TyBareFn(f.map(|BareFnTy {lifetimes, fn_style, abi, decl}| BareFnTy {
+                TyBareFn(f.map(|BareFnTy {lifetimes, unsafety, abi, decl}| BareFnTy {
                     lifetimes: fld.fold_lifetime_defs(lifetimes),
-                    fn_style: fn_style,
+                    unsafety: unsafety,
                     abi: abi,
                     decl: fld.fold_fn_decl(decl)
                 }))
@@ -533,9 +535,10 @@ pub fn noop_fold_angle_bracketed_parameter_data<T: Folder>(data: AngleBracketedP
                                                            fld: &mut T)
                                                            -> AngleBracketedParameterData
 {
-    let AngleBracketedParameterData { lifetimes, types } = data;
+    let AngleBracketedParameterData { lifetimes, types, bindings } = data;
     AngleBracketedParameterData { lifetimes: fld.fold_lifetimes(lifetimes),
-                                  types: types.move_map(|ty| fld.fold_ty(ty)) }
+                                  types: types.move_map(|ty| fld.fold_ty(ty)),
+                                  bindings: bindings.move_map(|b| fld.fold_ty_binding(b)) }
 }
 
 pub fn noop_fold_parenthesized_parameter_data<T: Folder>(data: ParenthesizedParameterData,
@@ -807,14 +810,32 @@ pub fn noop_fold_where_clause<T: Folder>(
 }
 
 pub fn noop_fold_where_predicate<T: Folder>(
-                                 WherePredicate {id, ident, bounds, span}: WherePredicate,
+                                 pred: WherePredicate,
                                  fld: &mut T)
                                  -> WherePredicate {
-    WherePredicate {
-        id: fld.new_id(id),
-        ident: fld.fold_ident(ident),
-        bounds: bounds.move_map(|x| fld.fold_ty_param_bound(x)),
-        span: fld.new_span(span)
+    match pred {
+        ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate{id,
+                                                                     ident,
+                                                                     bounds,
+                                                                     span}) => {
+            ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate {
+                id: fld.new_id(id),
+                ident: fld.fold_ident(ident),
+                bounds: bounds.move_map(|x| fld.fold_ty_param_bound(x)),
+                span: fld.new_span(span)
+            })
+        }
+        ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{id,
+                                                               path,
+                                                               ty,
+                                                               span}) => {
+            ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{
+                id: fld.new_id(id),
+                path: fld.fold_path(path),
+                ty:fld.fold_ty(ty),
+                span: fld.new_span(span)
+            })
+        }
     }
 }
 
@@ -962,10 +983,10 @@ pub fn noop_fold_item_underscore<T: Folder>(i: Item_, folder: &mut T) -> Item_ {
         ItemConst(t, e) => {
             ItemConst(folder.fold_ty(t), folder.fold_expr(e))
         }
-        ItemFn(decl, fn_style, abi, generics, body) => {
+        ItemFn(decl, unsafety, abi, generics, body) => {
             ItemFn(
                 folder.fold_fn_decl(decl),
-                fn_style,
+                unsafety,
                 abi,
                 folder.fold_generics(generics),
                 folder.fold_block(body)
@@ -987,7 +1008,7 @@ pub fn noop_fold_item_underscore<T: Folder>(i: Item_, folder: &mut T) -> Item_ {
             let struct_def = folder.fold_struct_def(struct_def);
             ItemStruct(struct_def, folder.fold_generics(generics))
         }
-        ItemImpl(generics, ifce, ty, impl_items) => {
+        ItemImpl(unsafety, generics, ifce, ty, impl_items) => {
             let mut new_impl_items = Vec::new();
             for impl_item in impl_items.iter() {
                 match *impl_item {
@@ -1009,12 +1030,13 @@ pub fn noop_fold_item_underscore<T: Folder>(i: Item_, folder: &mut T) -> Item_ {
                     Some(folder.fold_trait_ref((*trait_ref).clone()))
                 }
             };
-            ItemImpl(folder.fold_generics(generics),
+            ItemImpl(unsafety,
+                     folder.fold_generics(generics),
                      ifce,
                      folder.fold_ty(ty),
                      new_impl_items)
         }
-        ItemTrait(generics, unbound, bounds, methods) => {
+        ItemTrait(unsafety, generics, unbound, bounds, methods) => {
             let bounds = folder.fold_bounds(bounds);
             let methods = methods.into_iter().flat_map(|method| {
                 let r = match method {
@@ -1042,7 +1064,8 @@ pub fn noop_fold_item_underscore<T: Folder>(i: Item_, folder: &mut T) -> Item_ {
                 };
                 r
             }).collect();
-            ItemTrait(folder.fold_generics(generics),
+            ItemTrait(unsafety,
+                      folder.fold_generics(generics),
                       unbound,
                       bounds,
                       methods)
@@ -1056,7 +1079,7 @@ pub fn noop_fold_type_method<T: Folder>(m: TypeMethod, fld: &mut T) -> TypeMetho
         id,
         ident,
         attrs,
-        fn_style,
+        unsafety,
         abi,
         decl,
         generics,
@@ -1068,7 +1091,7 @@ pub fn noop_fold_type_method<T: Folder>(m: TypeMethod, fld: &mut T) -> TypeMetho
         id: fld.new_id(id),
         ident: fld.fold_ident(ident),
         attrs: attrs.move_map(|a| fld.fold_attribute(a)),
-        fn_style: fn_style,
+        unsafety: unsafety,
         abi: abi,
         decl: fld.fold_fn_decl(decl),
         generics: fld.fold_generics(generics),
@@ -1138,7 +1161,7 @@ pub fn noop_fold_item_simple<T: Folder>(Item {id, ident, attrs, node, vis, span}
     let node = folder.fold_item_underscore(node);
     let ident = match node {
         // The node may have changed, recompute the "pretty" impl name.
-        ItemImpl(_, ref maybe_trait, ref ty, _) => {
+        ItemImpl(_, _, ref maybe_trait, ref ty, _) => {
             ast_util::impl_pretty_name(maybe_trait, &**ty)
         }
         _ => ident
@@ -1190,7 +1213,7 @@ pub fn noop_fold_method<T: Folder>(m: P<Method>, folder: &mut T) -> SmallVector<
                      generics,
                      abi,
                      explicit_self,
-                     fn_style,
+                     unsafety,
                      decl,
                      body,
                      vis) => {
@@ -1198,7 +1221,7 @@ pub fn noop_fold_method<T: Folder>(m: P<Method>, folder: &mut T) -> SmallVector<
                          folder.fold_generics(generics),
                          abi,
                          folder.fold_explicit_self(explicit_self),
-                         fn_style,
+                         unsafety,
                          folder.fold_fn_decl(decl),
                          folder.fold_block(body),
                          vis)
@@ -1328,10 +1351,6 @@ pub fn noop_fold_expr<T: Folder>(Expr {id, node, span}: Expr, folder: &mut T) ->
                         arms.move_map(|x| folder.fold_arm(x)),
                         source)
             }
-            ExprProc(decl, body) => {
-                ExprProc(folder.fold_fn_decl(decl),
-                         folder.fold_block(body))
-            }
             ExprClosure(capture_clause, opt_kind, decl, body) => {
                 ExprClosure(capture_clause,
                             opt_kind,
index f3686864518432400d54df2720e43105d83dd167..5d5b56d444f8ec2deb3a054f34e3cdf7f82f908d 100644 (file)
@@ -23,8 +23,9 @@
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
 #![allow(unknown_features)]
-#![feature(if_let, macro_rules, globs, default_type_params, phase, slicing_syntax)]
+#![feature(macro_rules, globs, default_type_params, phase, slicing_syntax)]
 #![feature(quote, unsafe_destructor, import_shadowing)]
+#![feature(unboxed_closures)]
 
 extern crate arena;
 extern crate fmt_macros;
index 43b428b5a1c4199eac5ee7039ee3820cac001419..8e418e46921ffb1b264c7a924f3cfb164eecf85c 100644 (file)
@@ -49,7 +49,7 @@ pub fn move_iter(self) -> vec::MoveItems<T> {
         self.into_vec().into_iter()
     }
 
-    pub fn map<U>(&self, f: |&T| -> U) -> OwnedSlice<U> {
+    pub fn map<U, F: FnMut(&T) -> U>(&self, f: F) -> OwnedSlice<U> {
         self.iter().map(f).collect()
     }
 }
index 2a77e3e67915bb92b46fc42d20eced6281db784e..50c7258fe1c7b75b3e8209c83861a4b311866d58 100644 (file)
@@ -244,7 +244,9 @@ fn byte_offset(&self, pos: BytePos) -> BytePos {
     /// Calls `f` with a string slice of the source text spanning from `start`
     /// up to but excluding `self.last_pos`, meaning the slice does not include
     /// the character `self.curr`.
-    pub fn with_str_from<T>(&self, start: BytePos, f: |s: &str| -> T) -> T {
+    pub fn with_str_from<T, F>(&self, start: BytePos, f: F) -> T where
+        F: FnOnce(&str) -> T,
+    {
         self.with_str_from_to(start, self.last_pos, f)
     }
 
@@ -264,7 +266,9 @@ pub fn name_from_to(&self, start: BytePos, end: BytePos) -> ast::Name {
 
     /// Calls `f` with a string slice of the source text spanning from `start`
     /// up to but excluding `end`.
-    fn with_str_from_to<T>(&self, start: BytePos, end: BytePos, f: |s: &str| -> T) -> T {
+    fn with_str_from_to<T, F>(&self, start: BytePos, end: BytePos, f: F) -> T where
+        F: FnOnce(&str) -> T,
+    {
         f(self.filemap.src.slice(
                 self.byte_offset(start).to_uint(),
                 self.byte_offset(end).to_uint()))
@@ -763,8 +767,6 @@ fn scan_hex_digits(&mut self,
         }
     }
 
-    // SNAP c9f6d69
-    #[allow(unused)]
     fn old_escape_warning(&mut self, sp: Span) {
         self.span_diagnostic
             .span_warn(sp, "\\U00ABCD12 and \\uABCD escapes are deprecated");
@@ -796,17 +798,15 @@ fn scan_char_or_byte(&mut self, start: BytePos, first_source_char: char,
                                     self.scan_unicode_escape(delim)
                                 } else {
                                     let res = self.scan_hex_digits(4u, delim, false);
-                                    // SNAP c9f6d69
-                                    //let sp = codemap::mk_sp(escaped_pos, self.last_pos);
-                                    //self.old_escape_warning(sp);
+                                    let sp = codemap::mk_sp(escaped_pos, self.last_pos);
+                                    self.old_escape_warning(sp);
                                     res
                                 }
                             }
                             'U' if !ascii_only => {
                                 let res = self.scan_hex_digits(8u, delim, false);
-                                // SNAP c9f6d69
-                                //let sp = codemap::mk_sp(escaped_pos, self.last_pos);
-                                //self.old_escape_warning(sp);
+                                let sp = codemap::mk_sp(escaped_pos, self.last_pos);
+                                self.old_escape_warning(sp);
                                 res
                             }
                             '\n' if delim == '"' => {
index 951fe11a470bb5b28a0cc352f99984ff39d62f83..d6f5d0e248a86d206be640d88a82d988bec4ef60 100644 (file)
@@ -431,7 +431,7 @@ pub fn str_lit(lit: &str) -> String {
     /// Eat everything up to a non-whitespace
     fn eat<'a>(it: &mut iter::Peekable<(uint, char), str::CharOffsets<'a>>) {
         loop {
-            match it.peek().map(|x| x.val1()) {
+            match it.peek().map(|x| x.1) {
                 Some(' ') | Some('\n') | Some('\r') | Some('\t') => {
                     it.next();
                 },
@@ -448,7 +448,7 @@ fn eat<'a>(it: &mut iter::Peekable<(uint, char), str::CharOffsets<'a>>) {
                     '\\' => {
                         let ch = chars.peek().unwrap_or_else(|| {
                             panic!("{}", error(i).as_slice())
-                        }).val1();
+                        }).1;
 
                         if ch == '\n' {
                             eat(&mut chars);
@@ -456,7 +456,7 @@ fn eat<'a>(it: &mut iter::Peekable<(uint, char), str::CharOffsets<'a>>) {
                             chars.next();
                             let ch = chars.peek().unwrap_or_else(|| {
                                 panic!("{}", error(i).as_slice())
-                            }).val1();
+                            }).1;
 
                             if ch != '\n' {
                                 panic!("lexer accepted bare CR");
@@ -474,7 +474,7 @@ fn eat<'a>(it: &mut iter::Peekable<(uint, char), str::CharOffsets<'a>>) {
                     '\r' => {
                         let ch = chars.peek().unwrap_or_else(|| {
                             panic!("{}", error(i).as_slice())
-                        }).val1();
+                        }).1;
 
                         if ch != '\n' {
                             panic!("lexer accepted bare CR");
@@ -600,7 +600,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> {
     /// Eat everything up to a non-whitespace
     fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
         loop {
-            match it.peek().map(|x| x.val1()) {
+            match it.peek().map(|x| x.1) {
                 Some(b' ') | Some(b'\n') | Some(b'\r') | Some(b'\t') => {
                     it.next();
                 },
@@ -615,11 +615,11 @@ fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
         match chars.next() {
             Some((i, b'\\')) => {
                 let em = error(i);
-                match chars.peek().expect(em.as_slice()).val1() {
+                match chars.peek().expect(em.as_slice()).1 {
                     b'\n' => eat(&mut chars),
                     b'\r' => {
                         chars.next();
-                        if chars.peek().expect(em.as_slice()).val1() != b'\n' {
+                        if chars.peek().expect(em.as_slice()).1 != b'\n' {
                             panic!("lexer accepted bare CR");
                         }
                         eat(&mut chars);
@@ -637,7 +637,7 @@ fn eat<'a, I: Iterator<(uint, u8)>>(it: &mut iter::Peekable<(uint, u8), I>) {
             },
             Some((i, b'\r')) => {
                 let em = error(i);
-                if chars.peek().expect(em.as_slice()).val1() != b'\n' {
+                if chars.peek().expect(em.as_slice()).1 != b'\n' {
                     panic!("lexer accepted bare CR");
                 }
                 chars.next();
@@ -1062,7 +1062,7 @@ fn parser_done(p: Parser){
                                                   span:sp(15,15)})), // not sure
                                 variadic: false
                             }),
-                                    ast::NormalFn,
+                                    ast::Unsafety::Normal,
                                     abi::Rust,
                                     ast::Generics{ // no idea on either of these:
                                         lifetimes: Vec::new(),
index 2a2bb42cef012de88234cdcc487b8f74b44f45f1..3a7cc77515dbefc8d86394de73a3cfbf8c2aa8c7 100644 (file)
@@ -32,6 +32,8 @@ pub enum ObsoleteSyntax {
     ObsoleteImportRenaming,
     ObsoleteSubsliceMatch,
     ObsoleteExternCrateRenaming,
+    ObsoleteProcType,
+    ObsoleteProcExpr,
 }
 
 impl Copy for ObsoleteSyntax {}
@@ -55,6 +57,14 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
     /// Reports an obsolete syntax non-fatal error.
     fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
         let (kind_str, desc) = match kind {
+            ObsoleteProcType => (
+                "the `proc` type",
+                "use unboxed closures instead",
+            ),
+            ObsoleteProcExpr => (
+                "`proc` expression",
+                "use a `move ||` expression instead",
+            ),
             ObsoleteOwnedType => (
                 "`~` notation for owned pointers",
                 "use `Box<T>` in `std::owned` instead"
index 4929ee885acf972bb9d3324ed59507a8193695b2..b9ef3fdbd49a311c3f7e08724e7de3d04e61ea35 100644 (file)
@@ -16,7 +16,7 @@
 use abi;
 use ast::{AssociatedType, BareFnTy, ClosureTy};
 use ast::{RegionTyParamBound, TraitTyParamBound};
-use ast::{ProvidedMethod, Public, FnStyle};
+use ast::{ProvidedMethod, Public, Unsafety};
 use ast::{Mod, BiAdd, Arg, Arm, Attribute, BindByRef, BindByValue};
 use ast::{BiBitAnd, BiBitOr, BiBitXor, BiRem, Block};
 use ast::{BlockCheckMode, CaptureByRef, CaptureByValue, CaptureClause};
 use ast::{ExprBreak, ExprCall, ExprCast};
 use ast::{ExprField, ExprTupField, ExprClosure, ExprIf, ExprIfLet, ExprIndex, ExprSlice};
 use ast::{ExprLit, ExprLoop, ExprMac};
-use ast::{ExprMethodCall, ExprParen, ExprPath, ExprProc};
+use ast::{ExprMethodCall, ExprParen, ExprPath};
 use ast::{ExprRepeat, ExprRet, ExprStruct, ExprTup, ExprUnary};
 use ast::{ExprVec, ExprWhile, ExprWhileLet, ExprForLoop, Field, FnDecl};
-use ast::{Once, Many};
+use ast::{Many};
 use ast::{FnUnboxedClosureKind, FnMutUnboxedClosureKind};
 use ast::{FnOnceUnboxedClosureKind};
 use ast::{ForeignItem, ForeignItemStatic, ForeignItemFn, ForeignMod, FunctionRetTy};
-use ast::{Ident, NormalFn, Inherited, ImplItem, Item, Item_, ItemStatic};
+use ast::{Ident, Inherited, ImplItem, Item, Item_, ItemStatic};
 use ast::{ItemEnum, ItemFn, ItemForeignMod, ItemImpl, ItemConst};
 use ast::{ItemMac, ItemMod, ItemStruct, ItemTrait, ItemTy};
 use ast::{LifetimeDef, Lit, Lit_};
 use ast::{SelfExplicit, SelfRegion, SelfStatic, SelfValue};
 use ast::{Delimited, SequenceRepetition, TokenTree, TraitItem, TraitRef};
 use ast::{TtDelimited, TtSequence, TtToken};
-use ast::{TupleVariantKind, Ty, Ty_};
-use ast::{TypeField, TyFixedLengthVec, TyClosure, TyProc, TyBareFn};
+use ast::{TupleVariantKind, Ty, Ty_, TypeBinding};
+use ast::{TypeField, TyFixedLengthVec, TyClosure, TyBareFn};
 use ast::{TyTypeof, TyInfer, TypeMethod};
 use ast::{TyParam, TyParamBound, TyParen, TyPath, TyPolyTraitRef, TyPtr, TyQPath};
 use ast::{TyRptr, TyTup, TyU32, TyVec, UnUniq};
 use ast::{TypeImplItem, TypeTraitItem, Typedef, UnboxedClosureKind};
 use ast::{UnnamedField, UnsafeBlock};
-use ast::{UnsafeFn, ViewItem, ViewItem_, ViewItemExternCrate, ViewItemUse};
+use ast::{ViewItem, ViewItem_, ViewItemExternCrate, ViewItemUse};
 use ast::{ViewPath, ViewPathGlob, ViewPathList, ViewPathSimple};
-use ast::{Visibility, WhereClause, WherePredicate};
+use ast::{Visibility, WhereClause};
 use ast;
 use ast_util::{mod, as_prec, ident_to_path, operator_prec};
 use codemap::{mod, Span, BytePos, Spanned, spanned, mk_sp};
@@ -98,7 +98,6 @@
     }
 }
 
-impl Copy for Restrictions {}
 
 type ItemInfo = (Ident, Item_, Option<Vec<Attribute> >);
 
@@ -718,11 +717,12 @@ fn expect_lt(&mut self) {
     }
 
     /// Parse a sequence bracketed by `|` and `|`, stopping before the `|`.
-    fn parse_seq_to_before_or<T>(
-                              &mut self,
-                              sep: &token::Token,
-                              f: |&mut Parser| -> T)
-                              -> Vec<T> {
+    fn parse_seq_to_before_or<T, F>(&mut self,
+                                    sep: &token::Token,
+                                    mut f: F)
+                                    -> Vec<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let mut first = true;
         let mut vector = Vec::new();
         while self.token != token::BinOp(token::Or) &&
@@ -769,13 +769,12 @@ pub fn expect_gt(&mut self) {
         }
     }
 
-    /// Parse a sequence bracketed by '<' and '>', stopping
-    /// before the '>'.
-    pub fn parse_seq_to_before_gt<T>(
-                                  &mut self,
-                                  sep: Option<token::Token>,
-                                  f: |&mut Parser| -> T)
-                                  -> OwnedSlice<T> {
+    pub fn parse_seq_to_before_gt_or_return<T, F>(&mut self,
+                                                  sep: Option<token::Token>,
+                                                  mut f: F)
+                                                  -> (OwnedSlice<T>, bool) where
+        F: FnMut(&mut Parser) -> Option<T>,
+    {
         let mut v = Vec::new();
         // This loop works by alternating back and forth between parsing types
         // and commas.  For example, given a string `A, B,>`, the parser would
@@ -792,33 +791,64 @@ pub fn parse_seq_to_before_gt<T>(
             }
 
             if i % 2 == 0 {
-                v.push(f(self));
+                match f(self) {
+                    Some(result) => v.push(result),
+                    None => return (OwnedSlice::from_vec(v), true)
+                }
             } else {
                 sep.as_ref().map(|t| self.expect(t));
             }
         }
-        return OwnedSlice::from_vec(v);
+        return (OwnedSlice::from_vec(v), false);
+    }
+
+    /// Parse a sequence bracketed by '<' and '>', stopping
+    /// before the '>'.
+    pub fn parse_seq_to_before_gt<T, F>(&mut self,
+                                        sep: Option<token::Token>,
+                                        mut f: F)
+                                        -> OwnedSlice<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
+        let (result, returned) = self.parse_seq_to_before_gt_or_return(sep, |p| Some(f(p)));
+        assert!(!returned);
+        return result;
     }
 
-    pub fn parse_seq_to_gt<T>(
-                           &mut self,
-                           sep: Option<token::Token>,
-                           f: |&mut Parser| -> T)
-                           -> OwnedSlice<T> {
+    pub fn parse_seq_to_gt<T, F>(&mut self,
+                                 sep: Option<token::Token>,
+                                 f: F)
+                                 -> OwnedSlice<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let v = self.parse_seq_to_before_gt(sep, f);
         self.expect_gt();
         return v;
     }
 
+    pub fn parse_seq_to_gt_or_return<T, F>(&mut self,
+                                           sep: Option<token::Token>,
+                                           f: F)
+                                           -> (OwnedSlice<T>, bool) where
+        F: FnMut(&mut Parser) -> Option<T>,
+    {
+        let (v, returned) = self.parse_seq_to_before_gt_or_return(sep, f);
+        if !returned {
+            self.expect_gt();
+        }
+        return (v, returned);
+    }
+
     /// Parse a sequence, including the closing delimiter. The function
     /// f must consume tokens until reaching the next separator or
     /// closing bracket.
-    pub fn parse_seq_to_end<T>(
-                            &mut self,
-                            ket: &token::Token,
-                            sep: SeqSep,
-                            f: |&mut Parser| -> T)
-                            -> Vec<T> {
+    pub fn parse_seq_to_end<T, F>(&mut self,
+                                  ket: &token::Token,
+                                  sep: SeqSep,
+                                  f: F)
+                                  -> Vec<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let val = self.parse_seq_to_before_end(ket, sep, f);
         self.bump();
         val
@@ -827,12 +857,13 @@ pub fn parse_seq_to_end<T>(
     /// Parse a sequence, not including the closing delimiter. The function
     /// f must consume tokens until reaching the next separator or
     /// closing bracket.
-    pub fn parse_seq_to_before_end<T>(
-                                   &mut self,
-                                   ket: &token::Token,
-                                   sep: SeqSep,
-                                   f: |&mut Parser| -> T)
-                                   -> Vec<T> {
+    pub fn parse_seq_to_before_end<T, F>(&mut self,
+                                         ket: &token::Token,
+                                         sep: SeqSep,
+                                         mut f: F)
+                                         -> Vec<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let mut first: bool = true;
         let mut v = vec!();
         while self.token != *ket {
@@ -852,13 +883,14 @@ pub fn parse_seq_to_before_end<T>(
     /// Parse a sequence, including the closing delimiter. The function
     /// f must consume tokens until reaching the next separator or
     /// closing bracket.
-    pub fn parse_unspanned_seq<T>(
-                               &mut self,
-                               bra: &token::Token,
-                               ket: &token::Token,
-                               sep: SeqSep,
-                               f: |&mut Parser| -> T)
-                               -> Vec<T> {
+    pub fn parse_unspanned_seq<T, F>(&mut self,
+                                     bra: &token::Token,
+                                     ket: &token::Token,
+                                     sep: SeqSep,
+                                     f: F)
+                                     -> Vec<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         self.expect(bra);
         let result = self.parse_seq_to_before_end(ket, sep, f);
         self.bump();
@@ -867,13 +899,14 @@ pub fn parse_unspanned_seq<T>(
 
     /// Parse a sequence parameter of enum variant. For consistency purposes,
     /// these should not be empty.
-    pub fn parse_enum_variant_seq<T>(
-                               &mut self,
-                               bra: &token::Token,
-                               ket: &token::Token,
-                               sep: SeqSep,
-                               f: |&mut Parser| -> T)
-                               -> Vec<T> {
+    pub fn parse_enum_variant_seq<T, F>(&mut self,
+                                        bra: &token::Token,
+                                        ket: &token::Token,
+                                        sep: SeqSep,
+                                        f: F)
+                                        -> Vec<T> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let result = self.parse_unspanned_seq(bra, ket, sep, f);
         if result.is_empty() {
             let last_span = self.last_span;
@@ -885,13 +918,14 @@ pub fn parse_enum_variant_seq<T>(
 
     // NB: Do not use this function unless you actually plan to place the
     // spanned list in the AST.
-    pub fn parse_seq<T>(
-                     &mut self,
-                     bra: &token::Token,
-                     ket: &token::Token,
-                     sep: SeqSep,
-                     f: |&mut Parser| -> T)
-                     -> Spanned<Vec<T> > {
+    pub fn parse_seq<T, F>(&mut self,
+                           bra: &token::Token,
+                           ket: &token::Token,
+                           sep: SeqSep,
+                           f: F)
+                           -> Spanned<Vec<T>> where
+        F: FnMut(&mut Parser) -> T,
+    {
         let lo = self.span.lo;
         self.expect(bra);
         let result = self.parse_seq_to_before_end(ket, sep, f);
@@ -951,8 +985,9 @@ pub fn buffer_length(&mut self) -> int {
         }
         return (4 - self.buffer_start) + self.buffer_end;
     }
-    pub fn look_ahead<R>(&mut self, distance: uint, f: |&token::Token| -> R)
-                      -> R {
+    pub fn look_ahead<R, F>(&mut self, distance: uint, f: F) -> R where
+        F: FnOnce(&token::Token) -> R,
+    {
         let dist = distance as int;
         while self.buffer_length() < dist {
             self.buffer[self.buffer_end as uint] = self.reader.real_token();
@@ -1028,7 +1063,6 @@ pub fn parse_for_in_type(&mut self) -> Ty_ {
         Deprecated:
 
         - for <'lt> |S| -> T
-        - for <'lt> proc(S) -> T
 
         Eventually:
 
@@ -1086,7 +1120,7 @@ pub fn parse_ty_bare_fn(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
         Function Style
         */
 
-        let fn_style = self.parse_unsafety();
+        let unsafety = self.parse_unsafety();
         let abi = if self.eat_keyword(keywords::Extern) {
             self.parse_opt_abi().unwrap_or(abi::C)
         } else {
@@ -1104,7 +1138,7 @@ pub fn parse_ty_bare_fn(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
         });
         TyBareFn(P(BareFnTy {
             abi: abi,
-            fn_style: fn_style,
+            unsafety: unsafety,
             lifetimes: lifetime_defs,
             decl: decl
         }))
@@ -1122,26 +1156,21 @@ pub fn parse_proc_type(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_ {
          |     |    |    Bounds
          |     |  Argument types
          |   Legacy lifetimes
-        the `proc` keyword
+        the `proc` keyword (already consumed)
 
         */
 
-        let lifetime_defs = self.parse_legacy_lifetime_defs(lifetime_defs);
-        let (inputs, variadic) = self.parse_fn_args(false, false);
-        let bounds = self.parse_colon_then_ty_param_bounds();
-        let ret_ty = self.parse_ret_ty();
-        let decl = P(FnDecl {
-            inputs: inputs,
-            output: ret_ty,
-            variadic: variadic
-        });
-        TyProc(P(ClosureTy {
-            fn_style: NormalFn,
-            onceness: Once,
-            bounds: bounds,
-            decl: decl,
-            lifetimes: lifetime_defs,
-        }))
+        let proc_span = self.last_span;
+
+        // To be helpful, parse the proc as ever
+        let _ = self.parse_legacy_lifetime_defs(lifetime_defs);
+        let _ = self.parse_fn_args(false, false);
+        let _ = self.parse_colon_then_ty_param_bounds();
+        let _ = self.parse_ret_ty();
+
+        self.obsolete(proc_span, ObsoleteProcType);
+
+        TyInfer
     }
 
     /// Parses an optional unboxed closure kind (`&:`, `&mut:`, or `:`).
@@ -1210,7 +1239,7 @@ pub fn parse_ty_closure(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
 
         */
 
-        let fn_style = self.parse_unsafety();
+        let unsafety = self.parse_unsafety();
 
         let lifetime_defs = self.parse_legacy_lifetime_defs(lifetime_defs);
 
@@ -1236,7 +1265,7 @@ pub fn parse_ty_closure(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
         });
 
         TyClosure(P(ClosureTy {
-            fn_style: fn_style,
+            unsafety: unsafety,
             onceness: Many,
             bounds: bounds,
             decl: decl,
@@ -1244,11 +1273,11 @@ pub fn parse_ty_closure(&mut self, lifetime_defs: Vec<ast::LifetimeDef>) -> Ty_
         }))
     }
 
-    pub fn parse_unsafety(&mut self) -> FnStyle {
+    pub fn parse_unsafety(&mut self) -> Unsafety {
         if self.eat_keyword(keywords::Unsafe) {
-            return UnsafeFn;
+            return Unsafety::Unsafe;
         } else {
-            return NormalFn;
+            return Unsafety::Normal;
         }
     }
 
@@ -1321,7 +1350,7 @@ pub fn parse_trait_items(&mut self) -> Vec<TraitItem> {
                 let lo = p.span.lo;
 
                 let vis = p.parse_visibility();
-                let style = p.parse_fn_style();
+                let style = p.parse_unsafety();
                 let abi = if p.eat_keyword(keywords::Extern) {
                     p.parse_opt_abi().unwrap_or(abi::C)
                 } else {
@@ -1349,7 +1378,7 @@ pub fn parse_trait_items(&mut self) -> Vec<TraitItem> {
                     RequiredMethod(TypeMethod {
                         ident: ident,
                         attrs: attrs,
-                        fn_style: style,
+                        unsafety: style,
                         decl: d,
                         generics: generics,
                         abi: abi,
@@ -1704,8 +1733,8 @@ pub fn lit_from_token(&mut self, tok: &token::Token) -> Lit_ {
             }
             token::Literal(lit, suf) => {
                 let (suffix_illegal, out) = match lit {
-                    token::Byte(i) => (true, LitByte(parse::byte_lit(i.as_str()).val0())),
-                    token::Char(i) => (true, LitChar(parse::char_lit(i.as_str()).val0())),
+                    token::Byte(i) => (true, LitByte(parse::byte_lit(i.as_str()).0)),
+                    token::Char(i) => (true, LitChar(parse::char_lit(i.as_str()).0)),
 
                     // there are some valid suffixes for integer and
                     // float literals, so all the handling is done
@@ -1842,11 +1871,12 @@ pub fn parse_path_segments_without_colons(&mut self) -> Vec<ast::PathSegment> {
 
             // Parse types, optionally.
             let parameters = if self.eat_lt(false) {
-                let (lifetimes, types) = self.parse_generic_values_after_lt();
+                let (lifetimes, types, bindings) = self.parse_generic_values_after_lt();
 
                 ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                     lifetimes: lifetimes,
                     types: OwnedSlice::from_vec(types),
+                    bindings: OwnedSlice::from_vec(bindings),
                 })
             } else if self.eat(&token::OpenDelim(token::Paren)) {
                 let inputs = self.parse_seq_to_end(
@@ -1894,6 +1924,7 @@ pub fn parse_path_segments_with_colons(&mut self) -> Vec<ast::PathSegment> {
                     parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                         lifetimes: Vec::new(),
                         types: OwnedSlice::empty(),
+                        bindings: OwnedSlice::empty(),
                     })
                 });
                 return segments;
@@ -1902,12 +1933,13 @@ pub fn parse_path_segments_with_colons(&mut self) -> Vec<ast::PathSegment> {
             // Check for a type segment.
             if self.eat_lt(false) {
                 // Consumed `a::b::<`, go look for types
-                let (lifetimes, types) = self.parse_generic_values_after_lt();
+                let (lifetimes, types, bindings) = self.parse_generic_values_after_lt();
                 segments.push(ast::PathSegment {
                     identifier: identifier,
                     parameters: ast::AngleBracketedParameters(ast::AngleBracketedParameterData {
                         lifetimes: lifetimes,
                         types: OwnedSlice::from_vec(types),
+                        bindings: OwnedSlice::from_vec(bindings),
                     }),
                 });
 
@@ -2255,17 +2287,10 @@ pub fn parse_bottom_expr(&mut self) -> P<Expr> {
                     return self.parse_lambda_expr(CaptureByValue);
                 }
                 if self.eat_keyword(keywords::Proc) {
-                    let decl = self.parse_proc_decl();
-                    let body = self.parse_expr();
-                    let fakeblock = P(ast::Block {
-                            id: ast::DUMMY_NODE_ID,
-                            view_items: Vec::new(),
-                            stmts: Vec::new(),
-                            rules: DefaultBlock,
-                            span: body.span,
-                            expr: Some(body),
-                        });
-                    return self.mk_expr(lo, fakeblock.span.hi, ExprProc(decl, fakeblock));
+                    let span = self.last_span;
+                    let _ = self.parse_proc_decl();
+                    let _ = self.parse_expr();
+                    return self.obsolete_expr(span, ObsoleteProcExpr);
                 }
                 if self.eat_keyword(keywords::If) {
                     return self.parse_if_expr();
@@ -2435,13 +2460,18 @@ pub fn parse_dot_or_call_expr_with(&mut self, e0: P<Expr>) -> P<Expr> {
                     let dot = self.last_span.hi;
                     hi = self.span.hi;
                     self.bump();
-                    let (_, tys) = if self.eat(&token::ModSep) {
+                    let (_, tys, bindings) = if self.eat(&token::ModSep) {
                         self.expect_lt();
                         self.parse_generic_values_after_lt()
                     } else {
-                        (Vec::new(), Vec::new())
+                        (Vec::new(), Vec::new(), Vec::new())
                     };
 
+                    if bindings.len() > 0 {
+                        let last_span = self.last_span;
+                        self.span_err(last_span, "type bindings are only permitted on trait paths");
+                    }
+
                     // expr.f() method call
                     match self.token {
                         token::OpenDelim(token::Paren) => {
@@ -4041,16 +4071,51 @@ pub fn parse_generics(&mut self) -> ast::Generics {
         }
     }
 
-    fn parse_generic_values_after_lt(&mut self) -> (Vec<ast::Lifetime>, Vec<P<Ty>> ) {
+    fn parse_generic_values_after_lt(&mut self)
+                                     -> (Vec<ast::Lifetime>, Vec<P<Ty>>, Vec<P<TypeBinding>>) {
         let lifetimes = self.parse_lifetimes(token::Comma);
-        let result = self.parse_seq_to_gt(
+
+        // First parse types.
+        let (types, returned) = self.parse_seq_to_gt_or_return(
             Some(token::Comma),
             |p| {
                 p.forbid_lifetime();
-                p.parse_ty_sum()
+                if p.look_ahead(1, |t| t == &token::Eq) {
+                    None
+                } else {
+                    Some(p.parse_ty_sum())
+                }
+            }
+        );
+
+        // If we found the `>`, don't continue.
+        if !returned {
+            return (lifetimes, types.into_vec(), Vec::new());
+        }
+
+        // Then parse type bindings.
+        let bindings = self.parse_seq_to_gt(
+            Some(token::Comma),
+            |p| {
+                p.forbid_lifetime();
+                let lo = p.span.lo;
+                let ident = p.parse_ident();
+                let found_eq = p.eat(&token::Eq);
+                if !found_eq {
+                    let span = p.span;
+                    p.span_warn(span, "whoops, no =?");
+                }
+                let ty = p.parse_ty();
+                let hi = p.span.hi;
+                let span = mk_sp(lo, hi);
+                return P(TypeBinding{id: ast::DUMMY_NODE_ID,
+                    ident: ident,
+                    ty: ty,
+                    span: span,
+                });
             }
         );
-        (lifetimes, result.into_vec())
+        (lifetimes, types.into_vec(), bindings.into_vec())
     }
 
     fn forbid_lifetime(&mut self) {
@@ -4070,29 +4135,58 @@ fn parse_where_clause(&mut self, generics: &mut ast::Generics) {
         let mut parsed_something = false;
         loop {
             let lo = self.span.lo;
-            let ident = match self.token {
-                token::Ident(..) => self.parse_ident(),
+            let path = match self.token {
+                token::Ident(..) => self.parse_path(NoTypesAllowed),
                 _ => break,
             };
-            self.expect(&token::Colon);
 
-            let bounds = self.parse_ty_param_bounds();
-            let hi = self.span.hi;
-            let span = mk_sp(lo, hi);
+            if self.eat(&token::Colon) {
+                let bounds = self.parse_ty_param_bounds();
+                let hi = self.span.hi;
+                let span = mk_sp(lo, hi);
 
-            if bounds.len() == 0 {
-                self.span_err(span,
-                              "each predicate in a `where` clause must have \
-                               at least one bound in it");
-            }
+                if bounds.len() == 0 {
+                    self.span_err(span,
+                                  "each predicate in a `where` clause must have \
+                                   at least one bound in it");
+                }
 
-            generics.where_clause.predicates.push(ast::WherePredicate {
-                id: ast::DUMMY_NODE_ID,
-                span: span,
-                ident: ident,
-                bounds: bounds,
-            });
-            parsed_something = true;
+                let ident = match ast_util::path_to_ident(&path) {
+                    Some(ident) => ident,
+                    None => {
+                        self.span_err(path.span, "expected a single identifier \
+                                                  in bound where clause");
+                        break;
+                    }
+                };
+
+                generics.where_clause.predicates.push(
+                    ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate {
+                        id: ast::DUMMY_NODE_ID,
+                        span: span,
+                        ident: ident,
+                        bounds: bounds,
+                }));
+                parsed_something = true;
+            } else if self.eat(&token::Eq) {
+                let ty = self.parse_ty();
+                let hi = self.span.hi;
+                let span = mk_sp(lo, hi);
+                generics.where_clause.predicates.push(
+                    ast::WherePredicate::EqPredicate(ast::WhereEqPredicate {
+                        id: ast::DUMMY_NODE_ID,
+                        span: span,
+                        path: path,
+                        ty: ty,
+                }));
+                parsed_something = true;
+                // FIXME(#18433)
+                self.span_err(span, "equality constraints are not yet supported in where clauses");
+            } else {
+                let last_span = self.last_span;
+                self.span_err(last_span,
+                              "unexpected token in `where` clause");
+            }
 
             if !self.eat(&token::Comma) {
                 break
@@ -4192,8 +4286,9 @@ fn expect_self_ident(&mut self) -> ast::Ident {
 
     /// Parse the argument list and result type of a function
     /// that may have a self type.
-    fn parse_fn_decl_with_self(&mut self, parse_arg_fn: |&mut Parser| -> Arg)
-                               -> (ExplicitSelf, P<FnDecl>) {
+    fn parse_fn_decl_with_self<F>(&mut self, parse_arg_fn: F) -> (ExplicitSelf, P<FnDecl>) where
+        F: FnMut(&mut Parser) -> Arg,
+    {
         fn maybe_parse_borrowed_explicit_self(this: &mut Parser)
                                               -> ast::ExplicitSelf_ {
             // The following things are possible to see here:
@@ -4452,12 +4547,12 @@ fn mk_item(&mut self, lo: BytePos, hi: BytePos, ident: Ident,
     }
 
     /// Parse an item-position function declaration.
-    fn parse_item_fn(&mut self, fn_style: FnStyle, abi: abi::Abi) -> ItemInfo {
+    fn parse_item_fn(&mut self, unsafety: Unsafety, abi: abi::Abi) -> ItemInfo {
         let (ident, mut generics) = self.parse_fn_header();
         let decl = self.parse_fn_decl(false);
         self.parse_where_clause(&mut generics);
         let (inner_attrs, body) = self.parse_inner_attrs_and_block();
-        (ident, ItemFn(decl, fn_style, abi, generics, body), Some(inner_attrs))
+        (ident, ItemFn(decl, unsafety, abi, generics, body), Some(inner_attrs))
     }
 
     /// Parse a method in a trait impl
@@ -4495,7 +4590,7 @@ pub fn parse_method(&mut self,
                                                              self.span.hi) };
                 (ast::MethMac(m), self.span.hi, attrs)
             } else {
-                let fn_style = self.parse_fn_style();
+                let unsafety = self.parse_unsafety();
                 let abi = if self.eat_keyword(keywords::Extern) {
                     self.parse_opt_abi().unwrap_or(abi::C)
                 } else {
@@ -4516,7 +4611,7 @@ pub fn parse_method(&mut self,
                                generics,
                                abi,
                                explicit_self,
-                               fn_style,
+                               unsafety,
                                decl,
                                body,
                                visa),
@@ -4532,7 +4627,7 @@ pub fn parse_method(&mut self,
     }
 
     /// Parse trait Foo { ... }
-    fn parse_item_trait(&mut self) -> ItemInfo {
+    fn parse_item_trait(&mut self, unsafety: Unsafety) -> ItemInfo {
         let ident = self.parse_ident();
         let mut tps = self.parse_generics();
         let sized = self.parse_for_sized();
@@ -4543,7 +4638,7 @@ fn parse_item_trait(&mut self) -> ItemInfo {
         self.parse_where_clause(&mut tps);
 
         let meths = self.parse_trait_items();
-        (ident, ItemTrait(tps, sized, bounds, meths), None)
+        (ident, ItemTrait(unsafety, tps, sized, bounds, meths), None)
     }
 
     fn parse_impl_items(&mut self) -> (Vec<ImplItem>, Vec<Attribute>) {
@@ -4571,7 +4666,7 @@ fn parse_impl_items(&mut self) -> (Vec<ImplItem>, Vec<Attribute>) {
     /// Parses two variants (with the region/type params always optional):
     ///    impl<T> Foo { ... }
     ///    impl<T> ToString for ~[T] { ... }
-    fn parse_item_impl(&mut self) -> ItemInfo {
+    fn parse_item_impl(&mut self, unsafety: ast::Unsafety) -> ItemInfo {
         // First, parse type parameters if necessary.
         let mut generics = self.parse_generics();
 
@@ -4610,7 +4705,7 @@ fn parse_item_impl(&mut self) -> ItemInfo {
         let ident = ast_util::impl_pretty_name(&opt_trait, &*ty);
 
         (ident,
-         ItemImpl(generics, opt_trait, ty, impl_items),
+         ItemImpl(unsafety, generics, opt_trait, ty, impl_items),
          Some(attrs))
     }
 
@@ -5047,16 +5142,6 @@ fn parse_item_foreign_static(&mut self, vis: ast::Visibility,
         })
     }
 
-    /// Parse unsafe or not
-    fn parse_fn_style(&mut self) -> FnStyle {
-        if self.eat_keyword(keywords::Unsafe) {
-            UnsafeFn
-        } else {
-            NormalFn
-        }
-    }
-
-
     /// At this point, this is essentially a wrapper for
     /// parse_foreign_items.
     fn parse_foreign_mod_items(&mut self,
@@ -5395,7 +5480,7 @@ fn parse_item_or_view_item(&mut self,
                 // EXTERN FUNCTION ITEM
                 let abi = opt_abi.unwrap_or(abi::C);
                 let (ident, item_, extra_attrs) =
-                    self.parse_item_fn(NormalFn, abi);
+                    self.parse_item_fn(Unsafety::Normal, abi);
                 let last_span = self.last_span;
                 let item = self.mk_item(lo,
                                         last_span.hi,
@@ -5453,12 +5538,45 @@ fn parse_item_or_view_item(&mut self,
                                     maybe_append(attrs, extra_attrs));
             return IoviItem(item);
         }
+        if self.token.is_keyword(keywords::Unsafe) &&
+            self.look_ahead(1u, |t| t.is_keyword(keywords::Trait))
+        {
+            // UNSAFE TRAIT ITEM
+            self.expect_keyword(keywords::Unsafe);
+            self.expect_keyword(keywords::Trait);
+            let (ident, item_, extra_attrs) =
+                self.parse_item_trait(ast::Unsafety::Unsafe);
+            let last_span = self.last_span;
+            let item = self.mk_item(lo,
+                                    last_span.hi,
+                                    ident,
+                                    item_,
+                                    visibility,
+                                    maybe_append(attrs, extra_attrs));
+            return IoviItem(item);
+        }
+        if self.token.is_keyword(keywords::Unsafe) &&
+            self.look_ahead(1u, |t| t.is_keyword(keywords::Impl))
+        {
+            // IMPL ITEM
+            self.expect_keyword(keywords::Unsafe);
+            self.expect_keyword(keywords::Impl);
+            let (ident, item_, extra_attrs) = self.parse_item_impl(ast::Unsafety::Unsafe);
+            let last_span = self.last_span;
+            let item = self.mk_item(lo,
+                                    last_span.hi,
+                                    ident,
+                                    item_,
+                                    visibility,
+                                    maybe_append(attrs, extra_attrs));
+            return IoviItem(item);
+        }
         if self.token.is_keyword(keywords::Fn) &&
                 self.look_ahead(1, |f| !Parser::fn_expr_lookahead(f)) {
             // FUNCTION ITEM
             self.bump();
             let (ident, item_, extra_attrs) =
-                self.parse_item_fn(NormalFn, abi::Rust);
+                self.parse_item_fn(Unsafety::Normal, abi::Rust);
             let last_span = self.last_span;
             let item = self.mk_item(lo,
                                     last_span.hi,
@@ -5479,7 +5597,7 @@ fn parse_item_or_view_item(&mut self,
             };
             self.expect_keyword(keywords::Fn);
             let (ident, item_, extra_attrs) =
-                self.parse_item_fn(UnsafeFn, abi);
+                self.parse_item_fn(Unsafety::Unsafe, abi);
             let last_span = self.last_span;
             let item = self.mk_item(lo,
                                     last_span.hi,
@@ -5528,7 +5646,8 @@ fn parse_item_or_view_item(&mut self,
         }
         if self.eat_keyword(keywords::Trait) {
             // TRAIT ITEM
-            let (ident, item_, extra_attrs) = self.parse_item_trait();
+            let (ident, item_, extra_attrs) =
+                self.parse_item_trait(ast::Unsafety::Normal);
             let last_span = self.last_span;
             let item = self.mk_item(lo,
                                     last_span.hi,
@@ -5540,7 +5659,7 @@ fn parse_item_or_view_item(&mut self,
         }
         if self.eat_keyword(keywords::Impl) {
             // IMPL ITEM
-            let (ident, item_, extra_attrs) = self.parse_item_impl();
+            let (ident, item_, extra_attrs) = self.parse_item_impl(ast::Unsafety::Normal);
             let last_span = self.last_span;
             let item = self.mk_item(lo,
                                     last_span.hi,
index 4b1e9482a7d4981fd14c82953630f8a8abea7fd8..1bdcd73d847fa6cdcebe371e70a7df36d45c8215 100644 (file)
@@ -89,10 +89,8 @@ pub fn short_name(&self) -> &'static str {
     }
 }
 
-#[cfg(not(stage0))]
 impl Copy for Lit {}
 
-#[cfg(not(stage0))]
 impl Copy for IdentStyle {}
 
 #[allow(non_camel_case_types)]
index eab03f73091744a046d265ad8439a57852e2c2e9..db122f271a9c45f81da830b4f06b1f7330636b98 100644 (file)
@@ -165,7 +165,9 @@ pub fn new(cm: &'a CodeMap,
     }
 }
 
-pub fn to_string(f: |&mut State| -> IoResult<()>) -> String {
+pub fn to_string<F>(f: F) -> String where
+    F: FnOnce(&mut State) -> IoResult<()>,
+{
     use std::raw::TraitObject;
     let mut s = rust_printer(box Vec::new());
     f(&mut s).unwrap();
@@ -361,11 +363,11 @@ pub fn ident_to_string(id: &ast::Ident) -> String {
     $to_string(|s| s.print_ident(*id))
 }
 
-pub fn fun_to_string(decl: &ast::FnDecl, fn_style: ast::FnStyle, name: ast::Ident,
+pub fn fun_to_string(decl: &ast::FnDecl, unsafety: ast::Unsafety, name: ast::Ident,
                   opt_explicit_self: Option<&ast::ExplicitSelf_>,
                   generics: &ast::Generics) -> String {
     $to_string(|s| {
-        try!(s.print_fn(decl, Some(fn_style), abi::Rust,
+        try!(s.print_fn(decl, Some(unsafety), abi::Rust,
                         name, generics, opt_explicit_self, ast::Inherited));
         try!(s.end()); // Close the head box
         s.end() // Close the outer box
@@ -426,8 +428,10 @@ pub mod with_hygiene {
 
     // This function is the trick that all the rest of the routines
     // hang on.
-    pub fn to_string_hyg(f: |&mut super::State| -> IoResult<()>) -> String {
-        super::to_string(|s| {
+    pub fn to_string_hyg<F>(f: F) -> String where
+        F: FnOnce(&mut super::State) -> IoResult<()>,
+    {
+        super::to_string(move |s| {
             s.encode_idents_with_hygiene = true;
             f(s)
         })
@@ -446,7 +450,7 @@ pub fn visibility_qualified(vis: ast::Visibility, s: &str) -> String {
 fn needs_parentheses(expr: &ast::Expr) -> bool {
     match expr.node {
         ast::ExprAssign(..) | ast::ExprBinary(..) |
-        ast::ExprClosure(..) | ast::ExprProc(..) |
+        ast::ExprClosure(..) |
         ast::ExprAssignOp(..) | ast::ExprCast(..) => true,
         _ => false,
     }
@@ -580,9 +584,9 @@ pub fn synth_comment(&mut self, text: String) -> IoResult<()> {
         word(&mut self.s, "*/")
     }
 
-    pub fn commasep<T>(&mut self, b: Breaks, elts: &[T],
-                       op: |&mut State, &T| -> IoResult<()>)
-        -> IoResult<()> {
+    pub fn commasep<T, F>(&mut self, b: Breaks, elts: &[T], mut op: F) -> IoResult<()> where
+        F: FnMut(&mut State, &T) -> IoResult<()>,
+    {
         try!(self.rbox(0u, b));
         let mut first = true;
         for elt in elts.iter() {
@@ -593,12 +597,14 @@ pub fn commasep<T>(&mut self, b: Breaks, elts: &[T],
     }
 
 
-    pub fn commasep_cmnt<T>(
-                         &mut self,
-                         b: Breaks,
-                         elts: &[T],
-                         op: |&mut State, &T| -> IoResult<()>,
-                         get_span: |&T| -> codemap::Span) -> IoResult<()> {
+    pub fn commasep_cmnt<T, F, G>(&mut self,
+                                  b: Breaks,
+                                  elts: &[T],
+                                  mut op: F,
+                                  mut get_span: G) -> IoResult<()> where
+        F: FnMut(&mut State, &T) -> IoResult<()>,
+        G: FnMut(&T) -> codemap::Span,
+    {
         try!(self.rbox(0u, b));
         let len = elts.len();
         let mut i = 0u;
@@ -701,7 +707,7 @@ pub fn print_type(&mut self, ty: &ast::Ty) -> IoResult<()> {
                 };
                 try!(self.print_ty_fn(Some(f.abi),
                                       None,
-                                      f.fn_style,
+                                      f.unsafety,
                                       ast::Many,
                                       &*f.decl,
                                       None,
@@ -720,26 +726,7 @@ pub fn print_type(&mut self, ty: &ast::Ty) -> IoResult<()> {
                 };
                 try!(self.print_ty_fn(None,
                                       Some('&'),
-                                      f.fn_style,
-                                      f.onceness,
-                                      &*f.decl,
-                                      None,
-                                      &f.bounds,
-                                      Some(&generics),
-                                      None));
-            }
-            ast::TyProc(ref f) => {
-                let generics = ast::Generics {
-                    lifetimes: f.lifetimes.clone(),
-                    ty_params: OwnedSlice::empty(),
-                    where_clause: ast::WhereClause {
-                        id: ast::DUMMY_NODE_ID,
-                        predicates: Vec::new(),
-                    },
-                };
-                try!(self.print_ty_fn(None,
-                                      Some('~'),
-                                      f.fn_style,
+                                      f.unsafety,
                                       f.onceness,
                                       &*f.decl,
                                       None,
@@ -871,10 +858,10 @@ pub fn print_item(&mut self, item: &ast::Item) -> IoResult<()> {
                 try!(word(&mut self.s, ";"));
                 try!(self.end()); // end the outer cbox
             }
-            ast::ItemFn(ref decl, fn_style, abi, ref typarams, ref body) => {
+            ast::ItemFn(ref decl, unsafety, abi, ref typarams, ref body) => {
                 try!(self.print_fn(
                     &**decl,
-                    Some(fn_style),
+                    Some(unsafety),
                     abi,
                     item.ident,
                     typarams,
@@ -930,12 +917,16 @@ pub fn print_item(&mut self, item: &ast::Item) -> IoResult<()> {
                 try!(self.print_struct(&**struct_def, generics, item.ident, item.span));
             }
 
-            ast::ItemImpl(ref generics,
+            ast::ItemImpl(unsafety,
+                          ref generics,
                           ref opt_trait,
                           ref ty,
                           ref impl_items) => {
-                try!(self.head(visibility_qualified(item.vis,
-                                                    "impl").as_slice()));
+                try!(self.head(""));
+                try!(self.print_visibility(item.vis));
+                try!(self.print_unsafety(unsafety));
+                try!(self.word_nbsp("impl"));
+
                 if generics.is_parameterized() {
                     try!(self.print_generics(generics));
                     try!(space(&mut self.s));
@@ -968,9 +959,11 @@ pub fn print_item(&mut self, item: &ast::Item) -> IoResult<()> {
                 }
                 try!(self.bclose(item.span));
             }
-            ast::ItemTrait(ref generics, ref unbound, ref bounds, ref methods) => {
-                try!(self.head(visibility_qualified(item.vis,
-                                                    "trait").as_slice()));
+            ast::ItemTrait(unsafety, ref generics, ref unbound, ref bounds, ref methods) => {
+                try!(self.head(""));
+                try!(self.print_visibility(item.vis));
+                try!(self.print_unsafety(unsafety));
+                try!(self.word_nbsp("trait"));
                 try!(self.print_ident(item.ident));
                 try!(self.print_generics(generics));
                 if let &Some(ref tref) = unbound {
@@ -1201,7 +1194,7 @@ pub fn print_ty_method(&mut self, m: &ast::TypeMethod) -> IoResult<()> {
         try!(self.print_outer_attributes(m.attrs.as_slice()));
         try!(self.print_ty_fn(None,
                               None,
-                              m.fn_style,
+                              m.unsafety,
                               ast::Many,
                               &*m.decl,
                               Some(m.ident),
@@ -1236,12 +1229,12 @@ pub fn print_method(&mut self, meth: &ast::Method) -> IoResult<()> {
                           ref generics,
                           abi,
                           ref explicit_self,
-                          fn_style,
+                          unsafety,
                           ref decl,
                           ref body,
                           vis) => {
                 try!(self.print_fn(&**decl,
-                                   Some(fn_style),
+                                   Some(unsafety),
                                    abi,
                                    ident,
                                    generics,
@@ -1690,33 +1683,6 @@ pub fn print_expr(&mut self, expr: &ast::Expr) -> IoResult<()> {
                 // empty box to satisfy the close.
                 try!(self.ibox(0));
             }
-            ast::ExprProc(ref decl, ref body) => {
-                // in do/for blocks we don't want to show an empty
-                // argument list, but at this point we don't know which
-                // we are inside.
-                //
-                // if !decl.inputs.is_empty() {
-                try!(self.print_proc_args(&**decl));
-                try!(space(&mut self.s));
-                // }
-                assert!(body.stmts.is_empty());
-                assert!(body.expr.is_some());
-                // we extract the block, so as not to create another set of boxes
-                match body.expr.as_ref().unwrap().node {
-                    ast::ExprBlock(ref blk) => {
-                        try!(self.print_block_unclosed(&**blk));
-                    }
-                    _ => {
-                        // this is a bare expression
-                        try!(self.print_expr(body.expr.as_ref().map(|e| &**e).unwrap()));
-                        try!(self.end()); // need to close a box
-                    }
-                }
-                // a box will be closed by print_expr, but we didn't want an overall
-                // wrapper so we closed the corresponding opening. so create an
-                // empty box to satisfy the close.
-                try!(self.ibox(0));
-            }
             ast::ExprBlock(ref blk) => {
                 // containing cbox, will be closed by print-block at }
                 try!(self.cbox(indent_unit));
@@ -1976,6 +1942,18 @@ fn print_path_parameters(&mut self,
                         Inconsistent,
                         data.types.as_slice(),
                         |s, ty| s.print_type(&**ty)));
+                        comma = true;
+                }
+
+                for binding in data.bindings.iter() {
+                    if comma {
+                        try!(self.word_space(","))
+                    }
+                    try!(self.print_ident(binding.ident));
+                    try!(space(&mut self.s));
+                    try!(self.word_space("="));
+                    try!(self.print_type(&*binding.ty));
+                    comma = true;
                 }
 
                 try!(word(&mut self.s, ">"))
@@ -1992,6 +1970,7 @@ fn print_path_parameters(&mut self,
                 match data.output {
                     None => { }
                     Some(ref ty) => {
+                        try!(self.space_if_not_bol());
                         try!(self.word_space("->"));
                         try!(self.print_type(&**ty));
                     }
@@ -2191,14 +2170,14 @@ fn print_explicit_self(&mut self,
 
     pub fn print_fn(&mut self,
                     decl: &ast::FnDecl,
-                    fn_style: Option<ast::FnStyle>,
+                    unsafety: Option<ast::Unsafety>,
                     abi: abi::Abi,
                     name: ast::Ident,
                     generics: &ast::Generics,
                     opt_explicit_self: Option<&ast::ExplicitSelf_>,
                     vis: ast::Visibility) -> IoResult<()> {
         try!(self.head(""));
-        try!(self.print_fn_header_info(opt_explicit_self, fn_style, abi, vis));
+        try!(self.print_fn_header_info(opt_explicit_self, unsafety, abi, vis));
         try!(self.nbsp());
         try!(self.print_ident(name));
         try!(self.print_generics(generics));
@@ -2437,8 +2416,20 @@ pub fn print_where_clause(&mut self, generics: &ast::Generics)
                 try!(self.word_space(","));
             }
 
-            try!(self.print_ident(predicate.ident));
-            try!(self.print_bounds(":", predicate.bounds.as_slice()));
+            match predicate {
+                &ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate{ident,
+                                                                              ref bounds,
+                                                                              ..}) => {
+                    try!(self.print_ident(ident));
+                    try!(self.print_bounds(":", bounds.as_slice()));
+                }
+                &ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{ref path, ref ty, ..}) => {
+                    try!(self.print_path(path, false));
+                    try!(space(&mut self.s));
+                    try!(self.word_space("="));
+                    try!(self.print_type(&**ty));
+                }
+            }
         }
 
         Ok(())
@@ -2603,7 +2594,7 @@ pub fn print_fn_output(&mut self, decl: &ast::FnDecl) -> IoResult<()> {
     pub fn print_ty_fn(&mut self,
                        opt_abi: Option<abi::Abi>,
                        opt_sigil: Option<char>,
-                       fn_style: ast::FnStyle,
+                       unsafety: ast::Unsafety,
                        onceness: ast::Onceness,
                        decl: &ast::FnDecl,
                        id: Option<ast::Ident>,
@@ -2618,11 +2609,11 @@ pub fn print_ty_fn(&mut self,
         if opt_sigil == Some('~') && onceness == ast::Once {
             try!(word(&mut self.s, "proc"));
         } else if opt_sigil == Some('&') {
-            try!(self.print_fn_style(fn_style));
+            try!(self.print_unsafety(unsafety));
             try!(self.print_extern_opt_abi(opt_abi));
         } else {
             assert!(opt_sigil.is_none());
-            try!(self.print_fn_style(fn_style));
+            try!(self.print_unsafety(unsafety));
             try!(self.print_opt_abi_and_extern_if_nondefault(opt_abi));
             try!(word(&mut self.s, "fn"));
         }
@@ -2887,10 +2878,10 @@ pub fn next_comment(&mut self) -> Option<comments::Comment> {
         }
     }
 
-    pub fn print_opt_fn_style(&mut self,
-                            opt_fn_style: Option<ast::FnStyle>) -> IoResult<()> {
-        match opt_fn_style {
-            Some(fn_style) => self.print_fn_style(fn_style),
+    pub fn print_opt_unsafety(&mut self,
+                            opt_unsafety: Option<ast::Unsafety>) -> IoResult<()> {
+        match opt_unsafety {
+            Some(unsafety) => self.print_unsafety(unsafety),
             None => Ok(())
         }
     }
@@ -2921,11 +2912,11 @@ pub fn print_extern_opt_abi(&mut self,
 
     pub fn print_fn_header_info(&mut self,
                                 _opt_explicit_self: Option<&ast::ExplicitSelf_>,
-                                opt_fn_style: Option<ast::FnStyle>,
+                                opt_unsafety: Option<ast::Unsafety>,
                                 abi: abi::Abi,
                                 vis: ast::Visibility) -> IoResult<()> {
         try!(word(&mut self.s, visibility_qualified(vis, "").as_slice()));
-        try!(self.print_opt_fn_style(opt_fn_style));
+        try!(self.print_opt_unsafety(opt_unsafety));
 
         if abi != abi::Rust {
             try!(self.word_nbsp("extern"));
@@ -2935,10 +2926,10 @@ pub fn print_fn_header_info(&mut self,
         word(&mut self.s, "fn")
     }
 
-    pub fn print_fn_style(&mut self, s: ast::FnStyle) -> IoResult<()> {
+    pub fn print_unsafety(&mut self, s: ast::Unsafety) -> IoResult<()> {
         match s {
-            ast::NormalFn => Ok(()),
-            ast::UnsafeFn => self.word_nbsp("unsafe"),
+            ast::Unsafety::Normal => Ok(()),
+            ast::Unsafety::Unsafe => self.word_nbsp("unsafe"),
         }
     }
 }
@@ -2965,7 +2956,7 @@ fn test_fun_to_string() {
             variadic: false
         };
         let generics = ast_util::empty_generics();
-        assert_eq!(fun_to_string(&decl, ast::NormalFn, abba_ident,
+        assert_eq!(fun_to_string(&decl, ast::Unsafety::Normal, abba_ident,
                                None, &generics),
                    "fn abba()");
     }
index 1b231ed861b893cce1b04b05a436a5c3ece7f91a..1b3ebde2461e693fe47d1a1a93ec8798f08e952e 100644 (file)
@@ -56,12 +56,16 @@ pub fn P<T: 'static>(value: T) -> P<T> {
 impl<T: 'static> P<T> {
     /// Move out of the pointer.
     /// Intended for chaining transformations not covered by `map`.
-    pub fn and_then<U>(self, f: |T| -> U) -> U {
+    pub fn and_then<U, F>(self, f: F) -> U where
+        F: FnOnce(T) -> U,
+    {
         f(*self.ptr)
     }
 
     /// Transform the inner value, consuming `self` and producing a new `P<T>`.
-    pub fn map(mut self, f: |T| -> T) -> P<T> {
+    pub fn map<F>(mut self, f: F) -> P<T> where
+        F: FnOnce(T) -> T,
+    {
         unsafe {
             let p = &mut *self.ptr;
             // FIXME(#5016) this shouldn't need to zero to be safe.
index ca2f190ce76be103d77930c3cab5e1750fa0f4d1..155cabb153cfa510560a88179a8b23a016493cfa 100644 (file)
@@ -123,7 +123,7 @@ fn fold_item(&mut self, i: P<ast::Item>) -> SmallVector<P<ast::Item>> {
 
         if is_test_fn(&self.cx, &*i) || is_bench_fn(&self.cx, &*i) {
             match i.node {
-                ast::ItemFn(_, ast::UnsafeFn, _, _, _) => {
+                ast::ItemFn(_, ast::Unsafety::Unsafe, _, _, _) => {
                     let diag = self.cx.span_diagnostic;
                     diag.span_fatal(i.span,
                                     "unsafe functions cannot be used for \
index c1ea8f60b82010419243bca299fc45605ab6dd62..83bbff8473d046121b1486aa20c083bbb75b0524 100644 (file)
@@ -31,7 +31,9 @@ pub fn string_to_parser<'a>(ps: &'a ParseSess, source_str: String) -> Parser<'a>
                                source_str)
 }
 
-fn with_error_checking_parse<T>(s: String, f: |&mut Parser| -> T) -> T {
+fn with_error_checking_parse<T, F>(s: String, f: F) -> T where
+    F: FnOnce(&mut Parser) -> T,
+{
     let ps = new_parse_sess();
     let mut p = string_to_parser(&ps, s);
     let x = f(&mut p);
index d56e4f704499ef9871359de20d603a5ac6d3af5a..8d050e34abf4c846431f9e592440b95bd6ce2060 100644 (file)
@@ -171,7 +171,7 @@ fn size_hint(&self) -> (uint, Option<uint>) {
 }
 
 impl<T> MoveMap<T> for SmallVector<T> {
-    fn move_map(self, f: |T| -> T) -> SmallVector<T> {
+    fn move_map<F>(self, mut f: F) -> SmallVector<T> where F: FnMut(T) -> T {
         let repr = match self.repr {
             Zero => Zero,
             One(v) => One(f(v)),
index f5e89dd61ff7ef041a755f5aef76d1a9e5d4674c..3535c6e267eba83ff0d2ed87d82647a5168a5878 100644 (file)
@@ -34,7 +34,7 @@
 
 pub enum FnKind<'a> {
     /// fn foo() or extern "Abi" fn foo()
-    FkItemFn(Ident, &'a Generics, FnStyle, Abi),
+    FkItemFn(Ident, &'a Generics, Unsafety, Abi),
 
     /// fn foo(&self)
     FkMethod(Ident, &'a Generics, &'a Method),
@@ -282,7 +282,8 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
             visitor.visit_generics(type_parameters);
             walk_enum_def(visitor, enum_definition, type_parameters)
         }
-        ItemImpl(ref type_parameters,
+        ItemImpl(_,
+                 ref type_parameters,
                  ref trait_reference,
                  ref typ,
                  ref impl_items) => {
@@ -311,7 +312,7 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
                                      generics,
                                      item.id)
         }
-        ItemTrait(ref generics, _, ref bounds, ref methods) => {
+        ItemTrait(_, ref generics, _, ref bounds, ref methods) => {
             visitor.visit_generics(generics);
             walk_ty_param_bounds_helper(visitor, bounds);
             for method in methods.iter() {
@@ -389,14 +390,6 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
             walk_ty_param_bounds_helper(visitor, &function_declaration.bounds);
             walk_lifetime_decls_helper(visitor, &function_declaration.lifetimes);
         }
-        TyProc(ref function_declaration) => {
-            for argument in function_declaration.decl.inputs.iter() {
-                visitor.visit_ty(&*argument.ty)
-            }
-            walk_fn_ret_ty(visitor, &function_declaration.decl.output);
-            walk_ty_param_bounds_helper(visitor, &function_declaration.bounds);
-            walk_lifetime_decls_helper(visitor, &function_declaration.lifetimes);
-        }
         TyBareFn(ref function_declaration) => {
             for argument in function_declaration.decl.inputs.iter() {
                 visitor.visit_ty(&*argument.ty)
@@ -573,8 +566,22 @@ pub fn walk_generics<'v, V: Visitor<'v>>(visitor: &mut V, generics: &'v Generics
     }
     walk_lifetime_decls_helper(visitor, &generics.lifetimes);
     for predicate in generics.where_clause.predicates.iter() {
-        visitor.visit_ident(predicate.span, predicate.ident);
-        walk_ty_param_bounds_helper(visitor, &predicate.bounds);
+        match predicate {
+            &ast::WherePredicate::BoundPredicate(ast::WhereBoundPredicate{span,
+                                                                          ident,
+                                                                          ref bounds,
+                                                                          ..}) => {
+                visitor.visit_ident(span, ident);
+                walk_ty_param_bounds_helper(visitor, bounds);
+            }
+            &ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{id,
+                                                                    ref path,
+                                                                    ref ty,
+                                                                    ..}) => {
+                visitor.visit_path(path, id);
+                visitor.visit_ty(&**ty);
+            }
+        }
     }
 }
 
@@ -817,13 +824,6 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
                              expression.span,
                              expression.id)
         }
-        ExprProc(ref function_declaration, ref body) => {
-            visitor.visit_fn(FkFnBlock,
-                             &**function_declaration,
-                             &**body,
-                             expression.span,
-                             expression.id)
-        }
         ExprBlock(ref block) => visitor.visit_block(&**block),
         ExprAssign(ref left_hand_expression, ref right_hand_expression) => {
             visitor.visit_expr(&**right_hand_expression);
index 575ec860f973ee16da5a4e675009705cba185dfb..e8824b1ad2ca1b264452d6e98adde4338084304d 100644 (file)
@@ -16,7 +16,7 @@
 //! [terminfo][ti] database, and `WinConsole`, which uses the [Win32 Console
 //! API][win].
 //!
-//! ## Example
+//! # Examples
 //!
 //! ```no_run
 //! extern crate term;
index ffc26738dd7b2d7ca23d73eb9f98d08e833751c8..211c5906f4533b774cd1d7153b63d6e1d73ccd5a 100644 (file)
@@ -32,6 +32,7 @@
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
 #![feature(asm, macro_rules, phase, globs, slicing_syntax)]
+#![feature(unboxed_closures, default_type_params)]
 
 extern crate getopts;
 extern crate regex;
@@ -70,6 +71,7 @@
 use std::string::String;
 use std::task::TaskBuilder;
 use std::time::Duration;
+use std::thunk::{Thunk, Invoke};
 
 // to be used by rustc to compile tests in libtest
 pub mod test {
@@ -148,9 +150,9 @@ pub trait TDynBenchFn {
 pub enum TestFn {
     StaticTestFn(fn()),
     StaticBenchFn(fn(&mut Bencher)),
-    StaticMetricFn(proc(&mut MetricMap):'static),
-    DynTestFn(proc():Send),
-    DynMetricFn(proc(&mut MetricMap):'static),
+    StaticMetricFn(fn(&mut MetricMap)),
+    DynTestFn(Thunk),
+    DynMetricFn(Box<for<'a> Invoke<&'a mut MetricMap>+'static>),
     DynBenchFn(Box<TDynBenchFn+'static>)
 }
 
@@ -978,9 +980,11 @@ enum TestEvent {
 
 pub type MonitorMsg = (TestDesc, TestResult, Vec<u8> );
 
-fn run_tests(opts: &TestOpts,
-             tests: Vec<TestDescAndFn> ,
-             callback: |e: TestEvent| -> io::IoResult<()>) -> io::IoResult<()> {
+fn run_tests<F>(opts: &TestOpts,
+                tests: Vec<TestDescAndFn> ,
+                mut callback: F) -> io::IoResult<()> where
+    F: FnMut(TestEvent) -> io::IoResult<()>,
+{
     let filtered_tests = filter_tests(opts, tests);
     let filtered_descs = filtered_tests.iter()
                                        .map(|t| t.desc.clone())
@@ -1116,8 +1120,8 @@ pub fn run_test(opts: &TestOpts,
     fn run_test_inner(desc: TestDesc,
                       monitor_ch: Sender<MonitorMsg>,
                       nocapture: bool,
-                      testfn: proc():Send) {
-        spawn(proc() {
+                      testfn: Thunk) {
+        spawn(move || {
             let (tx, rx) = channel();
             let mut reader = ChanReader::new(rx);
             let stdout = ChanWriter::new(tx.clone());
@@ -1132,7 +1136,7 @@ fn run_test_inner(desc: TestDesc,
                 task = task.stdout(box stdout as Box<Writer + Send>);
                 task = task.stderr(box stderr as Box<Writer + Send>);
             }
-            let result_future = task.try_future(testfn);
+            let result_future = task.try_future(move || testfn.invoke(()));
 
             let stdout = reader.read_to_end().unwrap().into_iter().collect();
             let task_result = result_future.into_inner();
@@ -1154,7 +1158,7 @@ fn run_test_inner(desc: TestDesc,
         }
         DynMetricFn(f) => {
             let mut mm = MetricMap::new();
-            f(&mut mm);
+            f.invoke(&mut mm);
             monitor_ch.send((desc, TrMetrics(mm), Vec::new()));
             return;
         }
@@ -1166,7 +1170,7 @@ fn run_test_inner(desc: TestDesc,
         }
         DynTestFn(f) => run_test_inner(desc, monitor_ch, opts.nocapture, f),
         StaticTestFn(f) => run_test_inner(desc, monitor_ch, opts.nocapture,
-                                          proc() f())
+                                          Thunk::new(move|| f()))
     }
 }
 
@@ -1339,7 +1343,7 @@ pub fn black_box<T>(dummy: T) {
 
 impl Bencher {
     /// Callback for benchmark functions to run in their body.
-    pub fn iter<T>(&mut self, inner: || -> T) {
+    pub fn iter<T, F>(&mut self, mut inner: F) where F: FnMut() -> T {
         self.dur = Duration::span(|| {
             let k = self.iterations;
             for _ in range(0u64, k) {
@@ -1360,14 +1364,13 @@ pub fn ns_per_iter(&mut self) -> u64 {
         }
     }
 
-    pub fn bench_n(&mut self, n: u64, f: |&mut Bencher|) {
+    pub fn bench_n<F>(&mut self, n: u64, f: F) where F: FnOnce(&mut Bencher) {
         self.iterations = n;
         f(self);
     }
 
     // This is a more statistics-driven benchmark algorithm
-    pub fn auto_bench(&mut self, f: |&mut Bencher|) -> stats::Summary<f64> {
-
+    pub fn auto_bench<F>(&mut self, mut f: F) -> stats::Summary<f64> where F: FnMut(&mut Bencher) {
         // Initial bench run to get ballpark figure.
         let mut n = 1_u64;
         self.bench_n(n, |x| f(x));
@@ -1437,7 +1440,7 @@ pub mod bench {
     use std::time::Duration;
     use super::{Bencher, BenchSamples};
 
-    pub fn benchmark(f: |&mut Bencher|) -> BenchSamples {
+    pub fn benchmark<F>(f: F) -> BenchSamples where F: FnMut(&mut Bencher) {
         let mut bs = Bencher {
             iterations: 0,
             dur: Duration::nanoseconds(0),
@@ -1465,6 +1468,7 @@ mod tests {
                Improvement, Regression, LikelyNoise,
                StaticTestName, DynTestName, DynTestFn, ShouldFail};
     use std::io::TempDir;
+    use std::thunk::Thunk;
 
     #[test]
     pub fn do_not_run_ignored_tests() {
@@ -1475,7 +1479,7 @@ pub fn do_not_run_ignored_tests() {
                 ignore: true,
                 should_fail: ShouldFail::No,
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1492,7 +1496,7 @@ fn f() { }
                 ignore: true,
                 should_fail: ShouldFail::No,
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1509,7 +1513,7 @@ fn test_should_fail() {
                 ignore: false,
                 should_fail: ShouldFail::Yes(None)
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1526,7 +1530,7 @@ fn test_should_fail_good_message() {
                 ignore: false,
                 should_fail: ShouldFail::Yes(Some("error message"))
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1543,7 +1547,7 @@ fn test_should_fail_bad_message() {
                 ignore: false,
                 should_fail: ShouldFail::Yes(Some("foobar"))
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1560,7 +1564,7 @@ fn f() { }
                 ignore: false,
                 should_fail: ShouldFail::Yes(None)
             },
-            testfn: DynTestFn(proc() f()),
+            testfn: DynTestFn(Thunk::new(move|| f())),
         };
         let (tx, rx) = channel();
         run_test(&TestOpts::new(), false, desc, tx);
@@ -1606,7 +1610,7 @@ pub fn filter_for_ignored_option() {
                     ignore: true,
                     should_fail: ShouldFail::No,
                 },
-                testfn: DynTestFn(proc() {}),
+                testfn: DynTestFn(Thunk::new(move|| {})),
             },
             TestDescAndFn {
                 desc: TestDesc {
@@ -1614,7 +1618,7 @@ pub fn filter_for_ignored_option() {
                     ignore: false,
                     should_fail: ShouldFail::No,
                 },
-                testfn: DynTestFn(proc() {}),
+                testfn: DynTestFn(Thunk::new(move|| {})),
             });
         let filtered = filter_tests(&opts, tests);
 
@@ -1650,7 +1654,7 @@ fn testfn() { }
                         ignore: false,
                         should_fail: ShouldFail::No,
                     },
-                    testfn: DynTestFn(testfn),
+                    testfn: DynTestFn(Thunk::new(testfn)),
                 };
                 tests.push(test);
             }
@@ -1691,7 +1695,7 @@ fn test_fn() {}
                     ignore: false,
                     should_fail: ShouldFail::No,
                 },
-                testfn: DynTestFn(test_fn)
+                testfn: DynTestFn(Thunk::new(test_fn))
             }
         }).collect();
         let filtered = filter_tests(&opts, tests);
index 66cd22dfb08c2c85529f33f6f1803476d7832d53..1f75daa7bdecdd4c97326a25f7b6001adfe033ab 100644 (file)
@@ -29,6 +29,7 @@
        html_playground_url = "http://play.rust-lang.org/")]
 #![no_std]
 #![feature(globs)]
+#![feature(unboxed_closures)]
 
 extern crate core;
 
index 54f7b3501b805be56c6fac62871cf0b186283fa2..7c78c777ddaa04bf9ce21588a1c7c5825d21fd78 100644 (file)
@@ -28,182 +28,196 @@ fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool {
 
 pub mod general_category {
     pub static C_table: &'static [(char, char)] = &[
-        ('\x00', '\x1f'), ('\x7f', '\u009f'), ('\u00ad', '\u00ad'), ('\u0378', '\u0379'), ('\u0380',
-        '\u0383'), ('\u038b', '\u038b'), ('\u038d', '\u038d'), ('\u03a2', '\u03a2'), ('\u0530',
-        '\u0530'), ('\u0557', '\u0558'), ('\u0560', '\u0560'), ('\u0588', '\u0588'), ('\u058b',
-        '\u058c'), ('\u0590', '\u0590'), ('\u05c8', '\u05cf'), ('\u05eb', '\u05ef'), ('\u05f5',
-        '\u0605'), ('\u061c', '\u061d'), ('\u06dd', '\u06dd'), ('\u070e', '\u070f'), ('\u074b',
-        '\u074c'), ('\u07b2', '\u07bf'), ('\u07fb', '\u07ff'), ('\u082e', '\u082f'), ('\u083f',
-        '\u083f'), ('\u085c', '\u085d'), ('\u085f', '\u089f'), ('\u08b3', '\u08e3'), ('\u0984',
-        '\u0984'), ('\u098d', '\u098e'), ('\u0991', '\u0992'), ('\u09a9', '\u09a9'), ('\u09b1',
-        '\u09b1'), ('\u09b3', '\u09b5'), ('\u09ba', '\u09bb'), ('\u09c5', '\u09c6'), ('\u09c9',
-        '\u09ca'), ('\u09cf', '\u09d6'), ('\u09d8', '\u09db'), ('\u09de', '\u09de'), ('\u09e4',
-        '\u09e5'), ('\u09fc', '\u0a00'), ('\u0a04', '\u0a04'), ('\u0a0b', '\u0a0e'), ('\u0a11',
-        '\u0a12'), ('\u0a29', '\u0a29'), ('\u0a31', '\u0a31'), ('\u0a34', '\u0a34'), ('\u0a37',
-        '\u0a37'), ('\u0a3a', '\u0a3b'), ('\u0a3d', '\u0a3d'), ('\u0a43', '\u0a46'), ('\u0a49',
-        '\u0a4a'), ('\u0a4e', '\u0a50'), ('\u0a52', '\u0a58'), ('\u0a5d', '\u0a5d'), ('\u0a5f',
-        '\u0a65'), ('\u0a76', '\u0a80'), ('\u0a84', '\u0a84'), ('\u0a8e', '\u0a8e'), ('\u0a92',
-        '\u0a92'), ('\u0aa9', '\u0aa9'), ('\u0ab1', '\u0ab1'), ('\u0ab4', '\u0ab4'), ('\u0aba',
-        '\u0abb'), ('\u0ac6', '\u0ac6'), ('\u0aca', '\u0aca'), ('\u0ace', '\u0acf'), ('\u0ad1',
-        '\u0adf'), ('\u0ae4', '\u0ae5'), ('\u0af2', '\u0b00'), ('\u0b04', '\u0b04'), ('\u0b0d',
-        '\u0b0e'), ('\u0b11', '\u0b12'), ('\u0b29', '\u0b29'), ('\u0b31', '\u0b31'), ('\u0b34',
-        '\u0b34'), ('\u0b3a', '\u0b3b'), ('\u0b45', '\u0b46'), ('\u0b49', '\u0b4a'), ('\u0b4e',
-        '\u0b55'), ('\u0b58', '\u0b5b'), ('\u0b5e', '\u0b5e'), ('\u0b64', '\u0b65'), ('\u0b78',
-        '\u0b81'), ('\u0b84', '\u0b84'), ('\u0b8b', '\u0b8d'), ('\u0b91', '\u0b91'), ('\u0b96',
-        '\u0b98'), ('\u0b9b', '\u0b9b'), ('\u0b9d', '\u0b9d'), ('\u0ba0', '\u0ba2'), ('\u0ba5',
-        '\u0ba7'), ('\u0bab', '\u0bad'), ('\u0bba', '\u0bbd'), ('\u0bc3', '\u0bc5'), ('\u0bc9',
-        '\u0bc9'), ('\u0bce', '\u0bcf'), ('\u0bd1', '\u0bd6'), ('\u0bd8', '\u0be5'), ('\u0bfb',
-        '\u0bff'), ('\u0c04', '\u0c04'), ('\u0c0d', '\u0c0d'), ('\u0c11', '\u0c11'), ('\u0c29',
-        '\u0c29'), ('\u0c3a', '\u0c3c'), ('\u0c45', '\u0c45'), ('\u0c49', '\u0c49'), ('\u0c4e',
-        '\u0c54'), ('\u0c57', '\u0c57'), ('\u0c5a', '\u0c5f'), ('\u0c64', '\u0c65'), ('\u0c70',
-        '\u0c77'), ('\u0c80', '\u0c80'), ('\u0c84', '\u0c84'), ('\u0c8d', '\u0c8d'), ('\u0c91',
-        '\u0c91'), ('\u0ca9', '\u0ca9'), ('\u0cb4', '\u0cb4'), ('\u0cba', '\u0cbb'), ('\u0cc5',
-        '\u0cc5'), ('\u0cc9', '\u0cc9'), ('\u0cce', '\u0cd4'), ('\u0cd7', '\u0cdd'), ('\u0cdf',
-        '\u0cdf'), ('\u0ce4', '\u0ce5'), ('\u0cf0', '\u0cf0'), ('\u0cf3', '\u0d00'), ('\u0d04',
-        '\u0d04'), ('\u0d0d', '\u0d0d'), ('\u0d11', '\u0d11'), ('\u0d3b', '\u0d3c'), ('\u0d45',
-        '\u0d45'), ('\u0d49', '\u0d49'), ('\u0d4f', '\u0d56'), ('\u0d58', '\u0d5f'), ('\u0d64',
-        '\u0d65'), ('\u0d76', '\u0d78'), ('\u0d80', '\u0d81'), ('\u0d84', '\u0d84'), ('\u0d97',
-        '\u0d99'), ('\u0db2', '\u0db2'), ('\u0dbc', '\u0dbc'), ('\u0dbe', '\u0dbf'), ('\u0dc7',
-        '\u0dc9'), ('\u0dcb', '\u0dce'), ('\u0dd5', '\u0dd5'), ('\u0dd7', '\u0dd7'), ('\u0de0',
-        '\u0de5'), ('\u0df0', '\u0df1'), ('\u0df5', '\u0e00'), ('\u0e3b', '\u0e3e'), ('\u0e5c',
-        '\u0e80'), ('\u0e83', '\u0e83'), ('\u0e85', '\u0e86'), ('\u0e89', '\u0e89'), ('\u0e8b',
-        '\u0e8c'), ('\u0e8e', '\u0e93'), ('\u0e98', '\u0e98'), ('\u0ea0', '\u0ea0'), ('\u0ea4',
-        '\u0ea4'), ('\u0ea6', '\u0ea6'), ('\u0ea8', '\u0ea9'), ('\u0eac', '\u0eac'), ('\u0eba',
-        '\u0eba'), ('\u0ebe', '\u0ebf'), ('\u0ec5', '\u0ec5'), ('\u0ec7', '\u0ec7'), ('\u0ece',
-        '\u0ecf'), ('\u0eda', '\u0edb'), ('\u0ee0', '\u0eff'), ('\u0f48', '\u0f48'), ('\u0f6d',
-        '\u0f70'), ('\u0f98', '\u0f98'), ('\u0fbd', '\u0fbd'), ('\u0fcd', '\u0fcd'), ('\u0fdb',
-        '\u0fff'), ('\u10c6', '\u10c6'), ('\u10c8', '\u10cc'), ('\u10ce', '\u10cf'), ('\u1249',
-        '\u1249'), ('\u124e', '\u124f'), ('\u1257', '\u1257'), ('\u1259', '\u1259'), ('\u125e',
-        '\u125f'), ('\u1289', '\u1289'), ('\u128e', '\u128f'), ('\u12b1', '\u12b1'), ('\u12b6',
-        '\u12b7'), ('\u12bf', '\u12bf'), ('\u12c1', '\u12c1'), ('\u12c6', '\u12c7'), ('\u12d7',
-        '\u12d7'), ('\u1311', '\u1311'), ('\u1316', '\u1317'), ('\u135b', '\u135c'), ('\u137d',
-        '\u137f'), ('\u139a', '\u139f'), ('\u13f5', '\u13ff'), ('\u169d', '\u169f'), ('\u16f9',
-        '\u16ff'), ('\u170d', '\u170d'), ('\u1715', '\u171f'), ('\u1737', '\u173f'), ('\u1754',
-        '\u175f'), ('\u176d', '\u176d'), ('\u1771', '\u1771'), ('\u1774', '\u177f'), ('\u17de',
-        '\u17df'), ('\u17ea', '\u17ef'), ('\u17fa', '\u17ff'), ('\u180e', '\u180f'), ('\u181a',
-        '\u181f'), ('\u1878', '\u187f'), ('\u18ab', '\u18af'), ('\u18f6', '\u18ff'), ('\u191f',
-        '\u191f'), ('\u192c', '\u192f'), ('\u193c', '\u193f'), ('\u1941', '\u1943'), ('\u196e',
-        '\u196f'), ('\u1975', '\u197f'), ('\u19ac', '\u19af'), ('\u19ca', '\u19cf'), ('\u19db',
-        '\u19dd'), ('\u1a1c', '\u1a1d'), ('\u1a5f', '\u1a5f'), ('\u1a7d', '\u1a7e'), ('\u1a8a',
-        '\u1a8f'), ('\u1a9a', '\u1a9f'), ('\u1aae', '\u1aaf'), ('\u1abf', '\u1aff'), ('\u1b4c',
-        '\u1b4f'), ('\u1b7d', '\u1b7f'), ('\u1bf4', '\u1bfb'), ('\u1c38', '\u1c3a'), ('\u1c4a',
-        '\u1c4c'), ('\u1c80', '\u1cbf'), ('\u1cc8', '\u1ccf'), ('\u1cf7', '\u1cf7'), ('\u1cfa',
-        '\u1cff'), ('\u1df6', '\u1dfb'), ('\u1f16', '\u1f17'), ('\u1f1e', '\u1f1f'), ('\u1f46',
-        '\u1f47'), ('\u1f4e', '\u1f4f'), ('\u1f58', '\u1f58'), ('\u1f5a', '\u1f5a'), ('\u1f5c',
-        '\u1f5c'), ('\u1f5e', '\u1f5e'), ('\u1f7e', '\u1f7f'), ('\u1fb5', '\u1fb5'), ('\u1fc5',
-        '\u1fc5'), ('\u1fd4', '\u1fd5'), ('\u1fdc', '\u1fdc'), ('\u1ff0', '\u1ff1'), ('\u1ff5',
-        '\u1ff5'), ('\u1fff', '\u1fff'), ('\u200b', '\u200f'), ('\u202a', '\u202e'), ('\u2060',
-        '\u206f'), ('\u2072', '\u2073'), ('\u208f', '\u208f'), ('\u209d', '\u209f'), ('\u20be',
-        '\u20cf'), ('\u20f1', '\u20ff'), ('\u218a', '\u218f'), ('\u23fb', '\u23ff'), ('\u2427',
-        '\u243f'), ('\u244b', '\u245f'), ('\u2b74', '\u2b75'), ('\u2b96', '\u2b97'), ('\u2bba',
-        '\u2bbc'), ('\u2bc9', '\u2bc9'), ('\u2bd2', '\u2bff'), ('\u2c2f', '\u2c2f'), ('\u2c5f',
-        '\u2c5f'), ('\u2cf4', '\u2cf8'), ('\u2d26', '\u2d26'), ('\u2d28', '\u2d2c'), ('\u2d2e',
-        '\u2d2f'), ('\u2d68', '\u2d6e'), ('\u2d71', '\u2d7e'), ('\u2d97', '\u2d9f'), ('\u2da7',
-        '\u2da7'), ('\u2daf', '\u2daf'), ('\u2db7', '\u2db7'), ('\u2dbf', '\u2dbf'), ('\u2dc7',
-        '\u2dc7'), ('\u2dcf', '\u2dcf'), ('\u2dd7', '\u2dd7'), ('\u2ddf', '\u2ddf'), ('\u2e43',
-        '\u2e7f'), ('\u2e9a', '\u2e9a'), ('\u2ef4', '\u2eff'), ('\u2fd6', '\u2fef'), ('\u2ffc',
-        '\u2fff'), ('\u3040', '\u3040'), ('\u3097', '\u3098'), ('\u3100', '\u3104'), ('\u312e',
-        '\u3130'), ('\u318f', '\u318f'), ('\u31bb', '\u31bf'), ('\u31e4', '\u31ef'), ('\u321f',
-        '\u321f'), ('\u32ff', '\u32ff'), ('\u3401', '\u4db4'), ('\u4db6', '\u4dbf'), ('\u4e01',
-        '\u9fcb'), ('\u9fcd', '\u9fff'), ('\ua48d', '\ua48f'), ('\ua4c7', '\ua4cf'), ('\ua62c',
-        '\ua63f'), ('\ua69e', '\ua69e'), ('\ua6f8', '\ua6ff'), ('\ua78f', '\ua78f'), ('\ua7ae',
-        '\ua7af'), ('\ua7b2', '\ua7f6'), ('\ua82c', '\ua82f'), ('\ua83a', '\ua83f'), ('\ua878',
-        '\ua87f'), ('\ua8c5', '\ua8cd'), ('\ua8da', '\ua8df'), ('\ua8fc', '\ua8ff'), ('\ua954',
-        '\ua95e'), ('\ua97d', '\ua97f'), ('\ua9ce', '\ua9ce'), ('\ua9da', '\ua9dd'), ('\ua9ff',
-        '\ua9ff'), ('\uaa37', '\uaa3f'), ('\uaa4e', '\uaa4f'), ('\uaa5a', '\uaa5b'), ('\uaac3',
-        '\uaada'), ('\uaaf7', '\uab00'), ('\uab07', '\uab08'), ('\uab0f', '\uab10'), ('\uab17',
-        '\uab1f'), ('\uab27', '\uab27'), ('\uab2f', '\uab2f'), ('\uab60', '\uab63'), ('\uab66',
-        '\uabbf'), ('\uabee', '\uabef'), ('\uabfa', '\uabff'), ('\uac01', '\ud7a2'), ('\ud7a4',
-        '\ud7af'), ('\ud7c7', '\ud7ca'), ('\ud7fc', '\ud7ff'), ('\ue000', '\uf8ff'), ('\ufa6e',
-        '\ufa6f'), ('\ufada', '\ufaff'), ('\ufb07', '\ufb12'), ('\ufb18', '\ufb1c'), ('\ufb37',
-        '\ufb37'), ('\ufb3d', '\ufb3d'), ('\ufb3f', '\ufb3f'), ('\ufb42', '\ufb42'), ('\ufb45',
-        '\ufb45'), ('\ufbc2', '\ufbd2'), ('\ufd40', '\ufd4f'), ('\ufd90', '\ufd91'), ('\ufdc8',
-        '\ufdef'), ('\ufdfe', '\ufdff'), ('\ufe1a', '\ufe1f'), ('\ufe2e', '\ufe2f'), ('\ufe53',
-        '\ufe53'), ('\ufe67', '\ufe67'), ('\ufe6c', '\ufe6f'), ('\ufe75', '\ufe75'), ('\ufefd',
-        '\uff00'), ('\uffbf', '\uffc1'), ('\uffc8', '\uffc9'), ('\uffd0', '\uffd1'), ('\uffd8',
-        '\uffd9'), ('\uffdd', '\uffdf'), ('\uffe7', '\uffe7'), ('\uffef', '\ufffb'), ('\ufffe',
-        '\uffff'), ('\U0001000c', '\U0001000c'), ('\U00010027', '\U00010027'), ('\U0001003b',
-        '\U0001003b'), ('\U0001003e', '\U0001003e'), ('\U0001004e', '\U0001004f'), ('\U0001005e',
-        '\U0001007f'), ('\U000100fb', '\U000100ff'), ('\U00010103', '\U00010106'), ('\U00010134',
-        '\U00010136'), ('\U0001018d', '\U0001018f'), ('\U0001019c', '\U0001019f'), ('\U000101a1',
-        '\U000101cf'), ('\U000101fe', '\U0001027f'), ('\U0001029d', '\U0001029f'), ('\U000102d1',
-        '\U000102df'), ('\U000102fc', '\U000102ff'), ('\U00010324', '\U0001032f'), ('\U0001034b',
-        '\U0001034f'), ('\U0001037b', '\U0001037f'), ('\U0001039e', '\U0001039e'), ('\U000103c4',
-        '\U000103c7'), ('\U000103d6', '\U000103ff'), ('\U0001049e', '\U0001049f'), ('\U000104aa',
-        '\U000104ff'), ('\U00010528', '\U0001052f'), ('\U00010564', '\U0001056e'), ('\U00010570',
-        '\U000105ff'), ('\U00010737', '\U0001073f'), ('\U00010756', '\U0001075f'), ('\U00010768',
-        '\U000107ff'), ('\U00010806', '\U00010807'), ('\U00010809', '\U00010809'), ('\U00010836',
-        '\U00010836'), ('\U00010839', '\U0001083b'), ('\U0001083d', '\U0001083e'), ('\U00010856',
-        '\U00010856'), ('\U0001089f', '\U000108a6'), ('\U000108b0', '\U000108ff'), ('\U0001091c',
-        '\U0001091e'), ('\U0001093a', '\U0001093e'), ('\U00010940', '\U0001097f'), ('\U000109b8',
-        '\U000109bd'), ('\U000109c0', '\U000109ff'), ('\U00010a04', '\U00010a04'), ('\U00010a07',
-        '\U00010a0b'), ('\U00010a14', '\U00010a14'), ('\U00010a18', '\U00010a18'), ('\U00010a34',
-        '\U00010a37'), ('\U00010a3b', '\U00010a3e'), ('\U00010a48', '\U00010a4f'), ('\U00010a59',
-        '\U00010a5f'), ('\U00010aa0', '\U00010abf'), ('\U00010ae7', '\U00010aea'), ('\U00010af7',
-        '\U00010aff'), ('\U00010b36', '\U00010b38'), ('\U00010b56', '\U00010b57'), ('\U00010b73',
-        '\U00010b77'), ('\U00010b92', '\U00010b98'), ('\U00010b9d', '\U00010ba8'), ('\U00010bb0',
-        '\U00010bff'), ('\U00010c49', '\U00010e5f'), ('\U00010e7f', '\U00010fff'), ('\U0001104e',
-        '\U00011051'), ('\U00011070', '\U0001107e'), ('\U000110bd', '\U000110bd'), ('\U000110c2',
-        '\U000110cf'), ('\U000110e9', '\U000110ef'), ('\U000110fa', '\U000110ff'), ('\U00011135',
-        '\U00011135'), ('\U00011144', '\U0001114f'), ('\U00011177', '\U0001117f'), ('\U000111c9',
-        '\U000111cc'), ('\U000111ce', '\U000111cf'), ('\U000111db', '\U000111e0'), ('\U000111f5',
-        '\U000111ff'), ('\U00011212', '\U00011212'), ('\U0001123e', '\U000112af'), ('\U000112eb',
-        '\U000112ef'), ('\U000112fa', '\U00011300'), ('\U00011304', '\U00011304'), ('\U0001130d',
-        '\U0001130e'), ('\U00011311', '\U00011312'), ('\U00011329', '\U00011329'), ('\U00011331',
-        '\U00011331'), ('\U00011334', '\U00011334'), ('\U0001133a', '\U0001133b'), ('\U00011345',
-        '\U00011346'), ('\U00011349', '\U0001134a'), ('\U0001134e', '\U00011356'), ('\U00011358',
-        '\U0001135c'), ('\U00011364', '\U00011365'), ('\U0001136d', '\U0001136f'), ('\U00011375',
-        '\U0001147f'), ('\U000114c8', '\U000114cf'), ('\U000114da', '\U0001157f'), ('\U000115b6',
-        '\U000115b7'), ('\U000115ca', '\U000115ff'), ('\U00011645', '\U0001164f'), ('\U0001165a',
-        '\U0001167f'), ('\U000116b8', '\U000116bf'), ('\U000116ca', '\U0001189f'), ('\U000118f3',
-        '\U000118fe'), ('\U00011900', '\U00011abf'), ('\U00011af9', '\U00011fff'), ('\U00012399',
-        '\U000123ff'), ('\U0001246f', '\U0001246f'), ('\U00012475', '\U00012fff'), ('\U0001342f',
-        '\U000167ff'), ('\U00016a39', '\U00016a3f'), ('\U00016a5f', '\U00016a5f'), ('\U00016a6a',
-        '\U00016a6d'), ('\U00016a70', '\U00016acf'), ('\U00016aee', '\U00016aef'), ('\U00016af6',
-        '\U00016aff'), ('\U00016b46', '\U00016b4f'), ('\U00016b5a', '\U00016b5a'), ('\U00016b62',
-        '\U00016b62'), ('\U00016b78', '\U00016b7c'), ('\U00016b90', '\U00016eff'), ('\U00016f45',
-        '\U00016f4f'), ('\U00016f7f', '\U00016f8e'), ('\U00016fa0', '\U0001afff'), ('\U0001b002',
-        '\U0001bbff'), ('\U0001bc6b', '\U0001bc6f'), ('\U0001bc7d', '\U0001bc7f'), ('\U0001bc89',
-        '\U0001bc8f'), ('\U0001bc9a', '\U0001bc9b'), ('\U0001bca0', '\U0001cfff'), ('\U0001d0f6',
-        '\U0001d0ff'), ('\U0001d127', '\U0001d128'), ('\U0001d173', '\U0001d17a'), ('\U0001d1de',
-        '\U0001d1ff'), ('\U0001d246', '\U0001d2ff'), ('\U0001d357', '\U0001d35f'), ('\U0001d372',
-        '\U0001d3ff'), ('\U0001d455', '\U0001d455'), ('\U0001d49d', '\U0001d49d'), ('\U0001d4a0',
-        '\U0001d4a1'), ('\U0001d4a3', '\U0001d4a4'), ('\U0001d4a7', '\U0001d4a8'), ('\U0001d4ad',
-        '\U0001d4ad'), ('\U0001d4ba', '\U0001d4ba'), ('\U0001d4bc', '\U0001d4bc'), ('\U0001d4c4',
-        '\U0001d4c4'), ('\U0001d506', '\U0001d506'), ('\U0001d50b', '\U0001d50c'), ('\U0001d515',
-        '\U0001d515'), ('\U0001d51d', '\U0001d51d'), ('\U0001d53a', '\U0001d53a'), ('\U0001d53f',
-        '\U0001d53f'), ('\U0001d545', '\U0001d545'), ('\U0001d547', '\U0001d549'), ('\U0001d551',
-        '\U0001d551'), ('\U0001d6a6', '\U0001d6a7'), ('\U0001d7cc', '\U0001d7cd'), ('\U0001d800',
-        '\U0001e7ff'), ('\U0001e8c5', '\U0001e8c6'), ('\U0001e8d7', '\U0001edff'), ('\U0001ee04',
-        '\U0001ee04'), ('\U0001ee20', '\U0001ee20'), ('\U0001ee23', '\U0001ee23'), ('\U0001ee25',
-        '\U0001ee26'), ('\U0001ee28', '\U0001ee28'), ('\U0001ee33', '\U0001ee33'), ('\U0001ee38',
-        '\U0001ee38'), ('\U0001ee3a', '\U0001ee3a'), ('\U0001ee3c', '\U0001ee41'), ('\U0001ee43',
-        '\U0001ee46'), ('\U0001ee48', '\U0001ee48'), ('\U0001ee4a', '\U0001ee4a'), ('\U0001ee4c',
-        '\U0001ee4c'), ('\U0001ee50', '\U0001ee50'), ('\U0001ee53', '\U0001ee53'), ('\U0001ee55',
-        '\U0001ee56'), ('\U0001ee58', '\U0001ee58'), ('\U0001ee5a', '\U0001ee5a'), ('\U0001ee5c',
-        '\U0001ee5c'), ('\U0001ee5e', '\U0001ee5e'), ('\U0001ee60', '\U0001ee60'), ('\U0001ee63',
-        '\U0001ee63'), ('\U0001ee65', '\U0001ee66'), ('\U0001ee6b', '\U0001ee6b'), ('\U0001ee73',
-        '\U0001ee73'), ('\U0001ee78', '\U0001ee78'), ('\U0001ee7d', '\U0001ee7d'), ('\U0001ee7f',
-        '\U0001ee7f'), ('\U0001ee8a', '\U0001ee8a'), ('\U0001ee9c', '\U0001eea0'), ('\U0001eea4',
-        '\U0001eea4'), ('\U0001eeaa', '\U0001eeaa'), ('\U0001eebc', '\U0001eeef'), ('\U0001eef2',
-        '\U0001efff'), ('\U0001f02c', '\U0001f02f'), ('\U0001f094', '\U0001f09f'), ('\U0001f0af',
-        '\U0001f0b0'), ('\U0001f0c0', '\U0001f0c0'), ('\U0001f0d0', '\U0001f0d0'), ('\U0001f0f6',
-        '\U0001f0ff'), ('\U0001f10d', '\U0001f10f'), ('\U0001f12f', '\U0001f12f'), ('\U0001f16c',
-        '\U0001f16f'), ('\U0001f19b', '\U0001f1e5'), ('\U0001f203', '\U0001f20f'), ('\U0001f23b',
-        '\U0001f23f'), ('\U0001f249', '\U0001f24f'), ('\U0001f252', '\U0001f2ff'), ('\U0001f32d',
-        '\U0001f32f'), ('\U0001f37e', '\U0001f37f'), ('\U0001f3cf', '\U0001f3d3'), ('\U0001f3f8',
-        '\U0001f3ff'), ('\U0001f4ff', '\U0001f4ff'), ('\U0001f54b', '\U0001f54f'), ('\U0001f57a',
-        '\U0001f57a'), ('\U0001f5a4', '\U0001f5a4'), ('\U0001f643', '\U0001f644'), ('\U0001f6d0',
-        '\U0001f6df'), ('\U0001f6ed', '\U0001f6ef'), ('\U0001f6f4', '\U0001f6ff'), ('\U0001f774',
-        '\U0001f77f'), ('\U0001f7d5', '\U0001f7ff'), ('\U0001f80c', '\U0001f80f'), ('\U0001f848',
-        '\U0001f84f'), ('\U0001f85a', '\U0001f85f'), ('\U0001f888', '\U0001f88f'), ('\U0001f8ae',
-        '\U0001ffff'), ('\U00020001', '\U0002a6d5'), ('\U0002a6d7', '\U0002a6ff'), ('\U0002a701',
-        '\U0002b733'), ('\U0002b735', '\U0002b73f'), ('\U0002b741', '\U0002b81c'), ('\U0002b81e',
-        '\U0002f7ff'), ('\U0002fa1e', '\U000e00ff'), ('\U000e01f0', '\U0010ffff')
+        ('\u{0}', '\u{1f}'), ('\u{7f}', '\u{9f}'), ('\u{ad}', '\u{ad}'), ('\u{378}', '\u{379}'),
+        ('\u{380}', '\u{383}'), ('\u{38b}', '\u{38b}'), ('\u{38d}', '\u{38d}'), ('\u{3a2}',
+        '\u{3a2}'), ('\u{530}', '\u{530}'), ('\u{557}', '\u{558}'), ('\u{560}', '\u{560}'),
+        ('\u{588}', '\u{588}'), ('\u{58b}', '\u{58c}'), ('\u{590}', '\u{590}'), ('\u{5c8}',
+        '\u{5cf}'), ('\u{5eb}', '\u{5ef}'), ('\u{5f5}', '\u{605}'), ('\u{61c}', '\u{61d}'),
+        ('\u{6dd}', '\u{6dd}'), ('\u{70e}', '\u{70f}'), ('\u{74b}', '\u{74c}'), ('\u{7b2}',
+        '\u{7bf}'), ('\u{7fb}', '\u{7ff}'), ('\u{82e}', '\u{82f}'), ('\u{83f}', '\u{83f}'),
+        ('\u{85c}', '\u{85d}'), ('\u{85f}', '\u{89f}'), ('\u{8b3}', '\u{8e3}'), ('\u{984}',
+        '\u{984}'), ('\u{98d}', '\u{98e}'), ('\u{991}', '\u{992}'), ('\u{9a9}', '\u{9a9}'),
+        ('\u{9b1}', '\u{9b1}'), ('\u{9b3}', '\u{9b5}'), ('\u{9ba}', '\u{9bb}'), ('\u{9c5}',
+        '\u{9c6}'), ('\u{9c9}', '\u{9ca}'), ('\u{9cf}', '\u{9d6}'), ('\u{9d8}', '\u{9db}'),
+        ('\u{9de}', '\u{9de}'), ('\u{9e4}', '\u{9e5}'), ('\u{9fc}', '\u{a00}'), ('\u{a04}',
+        '\u{a04}'), ('\u{a0b}', '\u{a0e}'), ('\u{a11}', '\u{a12}'), ('\u{a29}', '\u{a29}'),
+        ('\u{a31}', '\u{a31}'), ('\u{a34}', '\u{a34}'), ('\u{a37}', '\u{a37}'), ('\u{a3a}',
+        '\u{a3b}'), ('\u{a3d}', '\u{a3d}'), ('\u{a43}', '\u{a46}'), ('\u{a49}', '\u{a4a}'),
+        ('\u{a4e}', '\u{a50}'), ('\u{a52}', '\u{a58}'), ('\u{a5d}', '\u{a5d}'), ('\u{a5f}',
+        '\u{a65}'), ('\u{a76}', '\u{a80}'), ('\u{a84}', '\u{a84}'), ('\u{a8e}', '\u{a8e}'),
+        ('\u{a92}', '\u{a92}'), ('\u{aa9}', '\u{aa9}'), ('\u{ab1}', '\u{ab1}'), ('\u{ab4}',
+        '\u{ab4}'), ('\u{aba}', '\u{abb}'), ('\u{ac6}', '\u{ac6}'), ('\u{aca}', '\u{aca}'),
+        ('\u{ace}', '\u{acf}'), ('\u{ad1}', '\u{adf}'), ('\u{ae4}', '\u{ae5}'), ('\u{af2}',
+        '\u{b00}'), ('\u{b04}', '\u{b04}'), ('\u{b0d}', '\u{b0e}'), ('\u{b11}', '\u{b12}'),
+        ('\u{b29}', '\u{b29}'), ('\u{b31}', '\u{b31}'), ('\u{b34}', '\u{b34}'), ('\u{b3a}',
+        '\u{b3b}'), ('\u{b45}', '\u{b46}'), ('\u{b49}', '\u{b4a}'), ('\u{b4e}', '\u{b55}'),
+        ('\u{b58}', '\u{b5b}'), ('\u{b5e}', '\u{b5e}'), ('\u{b64}', '\u{b65}'), ('\u{b78}',
+        '\u{b81}'), ('\u{b84}', '\u{b84}'), ('\u{b8b}', '\u{b8d}'), ('\u{b91}', '\u{b91}'),
+        ('\u{b96}', '\u{b98}'), ('\u{b9b}', '\u{b9b}'), ('\u{b9d}', '\u{b9d}'), ('\u{ba0}',
+        '\u{ba2}'), ('\u{ba5}', '\u{ba7}'), ('\u{bab}', '\u{bad}'), ('\u{bba}', '\u{bbd}'),
+        ('\u{bc3}', '\u{bc5}'), ('\u{bc9}', '\u{bc9}'), ('\u{bce}', '\u{bcf}'), ('\u{bd1}',
+        '\u{bd6}'), ('\u{bd8}', '\u{be5}'), ('\u{bfb}', '\u{bff}'), ('\u{c04}', '\u{c04}'),
+        ('\u{c0d}', '\u{c0d}'), ('\u{c11}', '\u{c11}'), ('\u{c29}', '\u{c29}'), ('\u{c3a}',
+        '\u{c3c}'), ('\u{c45}', '\u{c45}'), ('\u{c49}', '\u{c49}'), ('\u{c4e}', '\u{c54}'),
+        ('\u{c57}', '\u{c57}'), ('\u{c5a}', '\u{c5f}'), ('\u{c64}', '\u{c65}'), ('\u{c70}',
+        '\u{c77}'), ('\u{c80}', '\u{c80}'), ('\u{c84}', '\u{c84}'), ('\u{c8d}', '\u{c8d}'),
+        ('\u{c91}', '\u{c91}'), ('\u{ca9}', '\u{ca9}'), ('\u{cb4}', '\u{cb4}'), ('\u{cba}',
+        '\u{cbb}'), ('\u{cc5}', '\u{cc5}'), ('\u{cc9}', '\u{cc9}'), ('\u{cce}', '\u{cd4}'),
+        ('\u{cd7}', '\u{cdd}'), ('\u{cdf}', '\u{cdf}'), ('\u{ce4}', '\u{ce5}'), ('\u{cf0}',
+        '\u{cf0}'), ('\u{cf3}', '\u{d00}'), ('\u{d04}', '\u{d04}'), ('\u{d0d}', '\u{d0d}'),
+        ('\u{d11}', '\u{d11}'), ('\u{d3b}', '\u{d3c}'), ('\u{d45}', '\u{d45}'), ('\u{d49}',
+        '\u{d49}'), ('\u{d4f}', '\u{d56}'), ('\u{d58}', '\u{d5f}'), ('\u{d64}', '\u{d65}'),
+        ('\u{d76}', '\u{d78}'), ('\u{d80}', '\u{d81}'), ('\u{d84}', '\u{d84}'), ('\u{d97}',
+        '\u{d99}'), ('\u{db2}', '\u{db2}'), ('\u{dbc}', '\u{dbc}'), ('\u{dbe}', '\u{dbf}'),
+        ('\u{dc7}', '\u{dc9}'), ('\u{dcb}', '\u{dce}'), ('\u{dd5}', '\u{dd5}'), ('\u{dd7}',
+        '\u{dd7}'), ('\u{de0}', '\u{de5}'), ('\u{df0}', '\u{df1}'), ('\u{df5}', '\u{e00}'),
+        ('\u{e3b}', '\u{e3e}'), ('\u{e5c}', '\u{e80}'), ('\u{e83}', '\u{e83}'), ('\u{e85}',
+        '\u{e86}'), ('\u{e89}', '\u{e89}'), ('\u{e8b}', '\u{e8c}'), ('\u{e8e}', '\u{e93}'),
+        ('\u{e98}', '\u{e98}'), ('\u{ea0}', '\u{ea0}'), ('\u{ea4}', '\u{ea4}'), ('\u{ea6}',
+        '\u{ea6}'), ('\u{ea8}', '\u{ea9}'), ('\u{eac}', '\u{eac}'), ('\u{eba}', '\u{eba}'),
+        ('\u{ebe}', '\u{ebf}'), ('\u{ec5}', '\u{ec5}'), ('\u{ec7}', '\u{ec7}'), ('\u{ece}',
+        '\u{ecf}'), ('\u{eda}', '\u{edb}'), ('\u{ee0}', '\u{eff}'), ('\u{f48}', '\u{f48}'),
+        ('\u{f6d}', '\u{f70}'), ('\u{f98}', '\u{f98}'), ('\u{fbd}', '\u{fbd}'), ('\u{fcd}',
+        '\u{fcd}'), ('\u{fdb}', '\u{fff}'), ('\u{10c6}', '\u{10c6}'), ('\u{10c8}', '\u{10cc}'),
+        ('\u{10ce}', '\u{10cf}'), ('\u{1249}', '\u{1249}'), ('\u{124e}', '\u{124f}'), ('\u{1257}',
+        '\u{1257}'), ('\u{1259}', '\u{1259}'), ('\u{125e}', '\u{125f}'), ('\u{1289}', '\u{1289}'),
+        ('\u{128e}', '\u{128f}'), ('\u{12b1}', '\u{12b1}'), ('\u{12b6}', '\u{12b7}'), ('\u{12bf}',
+        '\u{12bf}'), ('\u{12c1}', '\u{12c1}'), ('\u{12c6}', '\u{12c7}'), ('\u{12d7}', '\u{12d7}'),
+        ('\u{1311}', '\u{1311}'), ('\u{1316}', '\u{1317}'), ('\u{135b}', '\u{135c}'), ('\u{137d}',
+        '\u{137f}'), ('\u{139a}', '\u{139f}'), ('\u{13f5}', '\u{13ff}'), ('\u{169d}', '\u{169f}'),
+        ('\u{16f9}', '\u{16ff}'), ('\u{170d}', '\u{170d}'), ('\u{1715}', '\u{171f}'), ('\u{1737}',
+        '\u{173f}'), ('\u{1754}', '\u{175f}'), ('\u{176d}', '\u{176d}'), ('\u{1771}', '\u{1771}'),
+        ('\u{1774}', '\u{177f}'), ('\u{17de}', '\u{17df}'), ('\u{17ea}', '\u{17ef}'), ('\u{17fa}',
+        '\u{17ff}'), ('\u{180e}', '\u{180f}'), ('\u{181a}', '\u{181f}'), ('\u{1878}', '\u{187f}'),
+        ('\u{18ab}', '\u{18af}'), ('\u{18f6}', '\u{18ff}'), ('\u{191f}', '\u{191f}'), ('\u{192c}',
+        '\u{192f}'), ('\u{193c}', '\u{193f}'), ('\u{1941}', '\u{1943}'), ('\u{196e}', '\u{196f}'),
+        ('\u{1975}', '\u{197f}'), ('\u{19ac}', '\u{19af}'), ('\u{19ca}', '\u{19cf}'), ('\u{19db}',
+        '\u{19dd}'), ('\u{1a1c}', '\u{1a1d}'), ('\u{1a5f}', '\u{1a5f}'), ('\u{1a7d}', '\u{1a7e}'),
+        ('\u{1a8a}', '\u{1a8f}'), ('\u{1a9a}', '\u{1a9f}'), ('\u{1aae}', '\u{1aaf}'), ('\u{1abf}',
+        '\u{1aff}'), ('\u{1b4c}', '\u{1b4f}'), ('\u{1b7d}', '\u{1b7f}'), ('\u{1bf4}', '\u{1bfb}'),
+        ('\u{1c38}', '\u{1c3a}'), ('\u{1c4a}', '\u{1c4c}'), ('\u{1c80}', '\u{1cbf}'), ('\u{1cc8}',
+        '\u{1ccf}'), ('\u{1cf7}', '\u{1cf7}'), ('\u{1cfa}', '\u{1cff}'), ('\u{1df6}', '\u{1dfb}'),
+        ('\u{1f16}', '\u{1f17}'), ('\u{1f1e}', '\u{1f1f}'), ('\u{1f46}', '\u{1f47}'), ('\u{1f4e}',
+        '\u{1f4f}'), ('\u{1f58}', '\u{1f58}'), ('\u{1f5a}', '\u{1f5a}'), ('\u{1f5c}', '\u{1f5c}'),
+        ('\u{1f5e}', '\u{1f5e}'), ('\u{1f7e}', '\u{1f7f}'), ('\u{1fb5}', '\u{1fb5}'), ('\u{1fc5}',
+        '\u{1fc5}'), ('\u{1fd4}', '\u{1fd5}'), ('\u{1fdc}', '\u{1fdc}'), ('\u{1ff0}', '\u{1ff1}'),
+        ('\u{1ff5}', '\u{1ff5}'), ('\u{1fff}', '\u{1fff}'), ('\u{200b}', '\u{200f}'), ('\u{202a}',
+        '\u{202e}'), ('\u{2060}', '\u{206f}'), ('\u{2072}', '\u{2073}'), ('\u{208f}', '\u{208f}'),
+        ('\u{209d}', '\u{209f}'), ('\u{20be}', '\u{20cf}'), ('\u{20f1}', '\u{20ff}'), ('\u{218a}',
+        '\u{218f}'), ('\u{23fb}', '\u{23ff}'), ('\u{2427}', '\u{243f}'), ('\u{244b}', '\u{245f}'),
+        ('\u{2b74}', '\u{2b75}'), ('\u{2b96}', '\u{2b97}'), ('\u{2bba}', '\u{2bbc}'), ('\u{2bc9}',
+        '\u{2bc9}'), ('\u{2bd2}', '\u{2bff}'), ('\u{2c2f}', '\u{2c2f}'), ('\u{2c5f}', '\u{2c5f}'),
+        ('\u{2cf4}', '\u{2cf8}'), ('\u{2d26}', '\u{2d26}'), ('\u{2d28}', '\u{2d2c}'), ('\u{2d2e}',
+        '\u{2d2f}'), ('\u{2d68}', '\u{2d6e}'), ('\u{2d71}', '\u{2d7e}'), ('\u{2d97}', '\u{2d9f}'),
+        ('\u{2da7}', '\u{2da7}'), ('\u{2daf}', '\u{2daf}'), ('\u{2db7}', '\u{2db7}'), ('\u{2dbf}',
+        '\u{2dbf}'), ('\u{2dc7}', '\u{2dc7}'), ('\u{2dcf}', '\u{2dcf}'), ('\u{2dd7}', '\u{2dd7}'),
+        ('\u{2ddf}', '\u{2ddf}'), ('\u{2e43}', '\u{2e7f}'), ('\u{2e9a}', '\u{2e9a}'), ('\u{2ef4}',
+        '\u{2eff}'), ('\u{2fd6}', '\u{2fef}'), ('\u{2ffc}', '\u{2fff}'), ('\u{3040}', '\u{3040}'),
+        ('\u{3097}', '\u{3098}'), ('\u{3100}', '\u{3104}'), ('\u{312e}', '\u{3130}'), ('\u{318f}',
+        '\u{318f}'), ('\u{31bb}', '\u{31bf}'), ('\u{31e4}', '\u{31ef}'), ('\u{321f}', '\u{321f}'),
+        ('\u{32ff}', '\u{32ff}'), ('\u{3401}', '\u{4db4}'), ('\u{4db6}', '\u{4dbf}'), ('\u{4e01}',
+        '\u{9fcb}'), ('\u{9fcd}', '\u{9fff}'), ('\u{a48d}', '\u{a48f}'), ('\u{a4c7}', '\u{a4cf}'),
+        ('\u{a62c}', '\u{a63f}'), ('\u{a69e}', '\u{a69e}'), ('\u{a6f8}', '\u{a6ff}'), ('\u{a78f}',
+        '\u{a78f}'), ('\u{a7ae}', '\u{a7af}'), ('\u{a7b2}', '\u{a7f6}'), ('\u{a82c}', '\u{a82f}'),
+        ('\u{a83a}', '\u{a83f}'), ('\u{a878}', '\u{a87f}'), ('\u{a8c5}', '\u{a8cd}'), ('\u{a8da}',
+        '\u{a8df}'), ('\u{a8fc}', '\u{a8ff}'), ('\u{a954}', '\u{a95e}'), ('\u{a97d}', '\u{a97f}'),
+        ('\u{a9ce}', '\u{a9ce}'), ('\u{a9da}', '\u{a9dd}'), ('\u{a9ff}', '\u{a9ff}'), ('\u{aa37}',
+        '\u{aa3f}'), ('\u{aa4e}', '\u{aa4f}'), ('\u{aa5a}', '\u{aa5b}'), ('\u{aac3}', '\u{aada}'),
+        ('\u{aaf7}', '\u{ab00}'), ('\u{ab07}', '\u{ab08}'), ('\u{ab0f}', '\u{ab10}'), ('\u{ab17}',
+        '\u{ab1f}'), ('\u{ab27}', '\u{ab27}'), ('\u{ab2f}', '\u{ab2f}'), ('\u{ab60}', '\u{ab63}'),
+        ('\u{ab66}', '\u{abbf}'), ('\u{abee}', '\u{abef}'), ('\u{abfa}', '\u{abff}'), ('\u{ac01}',
+        '\u{d7a2}'), ('\u{d7a4}', '\u{d7af}'), ('\u{d7c7}', '\u{d7ca}'), ('\u{d7fc}', '\u{d7ff}'),
+        ('\u{e000}', '\u{f8ff}'), ('\u{fa6e}', '\u{fa6f}'), ('\u{fada}', '\u{faff}'), ('\u{fb07}',
+        '\u{fb12}'), ('\u{fb18}', '\u{fb1c}'), ('\u{fb37}', '\u{fb37}'), ('\u{fb3d}', '\u{fb3d}'),
+        ('\u{fb3f}', '\u{fb3f}'), ('\u{fb42}', '\u{fb42}'), ('\u{fb45}', '\u{fb45}'), ('\u{fbc2}',
+        '\u{fbd2}'), ('\u{fd40}', '\u{fd4f}'), ('\u{fd90}', '\u{fd91}'), ('\u{fdc8}', '\u{fdef}'),
+        ('\u{fdfe}', '\u{fdff}'), ('\u{fe1a}', '\u{fe1f}'), ('\u{fe2e}', '\u{fe2f}'), ('\u{fe53}',
+        '\u{fe53}'), ('\u{fe67}', '\u{fe67}'), ('\u{fe6c}', '\u{fe6f}'), ('\u{fe75}', '\u{fe75}'),
+        ('\u{fefd}', '\u{ff00}'), ('\u{ffbf}', '\u{ffc1}'), ('\u{ffc8}', '\u{ffc9}'), ('\u{ffd0}',
+        '\u{ffd1}'), ('\u{ffd8}', '\u{ffd9}'), ('\u{ffdd}', '\u{ffdf}'), ('\u{ffe7}', '\u{ffe7}'),
+        ('\u{ffef}', '\u{fffb}'), ('\u{fffe}', '\u{ffff}'), ('\u{1000c}', '\u{1000c}'),
+        ('\u{10027}', '\u{10027}'), ('\u{1003b}', '\u{1003b}'), ('\u{1003e}', '\u{1003e}'),
+        ('\u{1004e}', '\u{1004f}'), ('\u{1005e}', '\u{1007f}'), ('\u{100fb}', '\u{100ff}'),
+        ('\u{10103}', '\u{10106}'), ('\u{10134}', '\u{10136}'), ('\u{1018d}', '\u{1018f}'),
+        ('\u{1019c}', '\u{1019f}'), ('\u{101a1}', '\u{101cf}'), ('\u{101fe}', '\u{1027f}'),
+        ('\u{1029d}', '\u{1029f}'), ('\u{102d1}', '\u{102df}'), ('\u{102fc}', '\u{102ff}'),
+        ('\u{10324}', '\u{1032f}'), ('\u{1034b}', '\u{1034f}'), ('\u{1037b}', '\u{1037f}'),
+        ('\u{1039e}', '\u{1039e}'), ('\u{103c4}', '\u{103c7}'), ('\u{103d6}', '\u{103ff}'),
+        ('\u{1049e}', '\u{1049f}'), ('\u{104aa}', '\u{104ff}'), ('\u{10528}', '\u{1052f}'),
+        ('\u{10564}', '\u{1056e}'), ('\u{10570}', '\u{105ff}'), ('\u{10737}', '\u{1073f}'),
+        ('\u{10756}', '\u{1075f}'), ('\u{10768}', '\u{107ff}'), ('\u{10806}', '\u{10807}'),
+        ('\u{10809}', '\u{10809}'), ('\u{10836}', '\u{10836}'), ('\u{10839}', '\u{1083b}'),
+        ('\u{1083d}', '\u{1083e}'), ('\u{10856}', '\u{10856}'), ('\u{1089f}', '\u{108a6}'),
+        ('\u{108b0}', '\u{108ff}'), ('\u{1091c}', '\u{1091e}'), ('\u{1093a}', '\u{1093e}'),
+        ('\u{10940}', '\u{1097f}'), ('\u{109b8}', '\u{109bd}'), ('\u{109c0}', '\u{109ff}'),
+        ('\u{10a04}', '\u{10a04}'), ('\u{10a07}', '\u{10a0b}'), ('\u{10a14}', '\u{10a14}'),
+        ('\u{10a18}', '\u{10a18}'), ('\u{10a34}', '\u{10a37}'), ('\u{10a3b}', '\u{10a3e}'),
+        ('\u{10a48}', '\u{10a4f}'), ('\u{10a59}', '\u{10a5f}'), ('\u{10aa0}', '\u{10abf}'),
+        ('\u{10ae7}', '\u{10aea}'), ('\u{10af7}', '\u{10aff}'), ('\u{10b36}', '\u{10b38}'),
+        ('\u{10b56}', '\u{10b57}'), ('\u{10b73}', '\u{10b77}'), ('\u{10b92}', '\u{10b98}'),
+        ('\u{10b9d}', '\u{10ba8}'), ('\u{10bb0}', '\u{10bff}'), ('\u{10c49}', '\u{10e5f}'),
+        ('\u{10e7f}', '\u{10fff}'), ('\u{1104e}', '\u{11051}'), ('\u{11070}', '\u{1107e}'),
+        ('\u{110bd}', '\u{110bd}'), ('\u{110c2}', '\u{110cf}'), ('\u{110e9}', '\u{110ef}'),
+        ('\u{110fa}', '\u{110ff}'), ('\u{11135}', '\u{11135}'), ('\u{11144}', '\u{1114f}'),
+        ('\u{11177}', '\u{1117f}'), ('\u{111c9}', '\u{111cc}'), ('\u{111ce}', '\u{111cf}'),
+        ('\u{111db}', '\u{111e0}'), ('\u{111f5}', '\u{111ff}'), ('\u{11212}', '\u{11212}'),
+        ('\u{1123e}', '\u{112af}'), ('\u{112eb}', '\u{112ef}'), ('\u{112fa}', '\u{11300}'),
+        ('\u{11304}', '\u{11304}'), ('\u{1130d}', '\u{1130e}'), ('\u{11311}', '\u{11312}'),
+        ('\u{11329}', '\u{11329}'), ('\u{11331}', '\u{11331}'), ('\u{11334}', '\u{11334}'),
+        ('\u{1133a}', '\u{1133b}'), ('\u{11345}', '\u{11346}'), ('\u{11349}', '\u{1134a}'),
+        ('\u{1134e}', '\u{11356}'), ('\u{11358}', '\u{1135c}'), ('\u{11364}', '\u{11365}'),
+        ('\u{1136d}', '\u{1136f}'), ('\u{11375}', '\u{1147f}'), ('\u{114c8}', '\u{114cf}'),
+        ('\u{114da}', '\u{1157f}'), ('\u{115b6}', '\u{115b7}'), ('\u{115ca}', '\u{115ff}'),
+        ('\u{11645}', '\u{1164f}'), ('\u{1165a}', '\u{1167f}'), ('\u{116b8}', '\u{116bf}'),
+        ('\u{116ca}', '\u{1189f}'), ('\u{118f3}', '\u{118fe}'), ('\u{11900}', '\u{11abf}'),
+        ('\u{11af9}', '\u{11fff}'), ('\u{12399}', '\u{123ff}'), ('\u{1246f}', '\u{1246f}'),
+        ('\u{12475}', '\u{12fff}'), ('\u{1342f}', '\u{167ff}'), ('\u{16a39}', '\u{16a3f}'),
+        ('\u{16a5f}', '\u{16a5f}'), ('\u{16a6a}', '\u{16a6d}'), ('\u{16a70}', '\u{16acf}'),
+        ('\u{16aee}', '\u{16aef}'), ('\u{16af6}', '\u{16aff}'), ('\u{16b46}', '\u{16b4f}'),
+        ('\u{16b5a}', '\u{16b5a}'), ('\u{16b62}', '\u{16b62}'), ('\u{16b78}', '\u{16b7c}'),
+        ('\u{16b90}', '\u{16eff}'), ('\u{16f45}', '\u{16f4f}'), ('\u{16f7f}', '\u{16f8e}'),
+        ('\u{16fa0}', '\u{1afff}'), ('\u{1b002}', '\u{1bbff}'), ('\u{1bc6b}', '\u{1bc6f}'),
+        ('\u{1bc7d}', '\u{1bc7f}'), ('\u{1bc89}', '\u{1bc8f}'), ('\u{1bc9a}', '\u{1bc9b}'),
+        ('\u{1bca0}', '\u{1cfff}'), ('\u{1d0f6}', '\u{1d0ff}'), ('\u{1d127}', '\u{1d128}'),
+        ('\u{1d173}', '\u{1d17a}'), ('\u{1d1de}', '\u{1d1ff}'), ('\u{1d246}', '\u{1d2ff}'),
+        ('\u{1d357}', '\u{1d35f}'), ('\u{1d372}', '\u{1d3ff}'), ('\u{1d455}', '\u{1d455}'),
+        ('\u{1d49d}', '\u{1d49d}'), ('\u{1d4a0}', '\u{1d4a1}'), ('\u{1d4a3}', '\u{1d4a4}'),
+        ('\u{1d4a7}', '\u{1d4a8}'), ('\u{1d4ad}', '\u{1d4ad}'), ('\u{1d4ba}', '\u{1d4ba}'),
+        ('\u{1d4bc}', '\u{1d4bc}'), ('\u{1d4c4}', '\u{1d4c4}'), ('\u{1d506}', '\u{1d506}'),
+        ('\u{1d50b}', '\u{1d50c}'), ('\u{1d515}', '\u{1d515}'), ('\u{1d51d}', '\u{1d51d}'),
+        ('\u{1d53a}', '\u{1d53a}'), ('\u{1d53f}', '\u{1d53f}'), ('\u{1d545}', '\u{1d545}'),
+        ('\u{1d547}', '\u{1d549}'), ('\u{1d551}', '\u{1d551}'), ('\u{1d6a6}', '\u{1d6a7}'),
+        ('\u{1d7cc}', '\u{1d7cd}'), ('\u{1d800}', '\u{1e7ff}'), ('\u{1e8c5}', '\u{1e8c6}'),
+        ('\u{1e8d7}', '\u{1edff}'), ('\u{1ee04}', '\u{1ee04}'), ('\u{1ee20}', '\u{1ee20}'),
+        ('\u{1ee23}', '\u{1ee23}'), ('\u{1ee25}', '\u{1ee26}'), ('\u{1ee28}', '\u{1ee28}'),
+        ('\u{1ee33}', '\u{1ee33}'), ('\u{1ee38}', '\u{1ee38}'), ('\u{1ee3a}', '\u{1ee3a}'),
+        ('\u{1ee3c}', '\u{1ee41}'), ('\u{1ee43}', '\u{1ee46}'), ('\u{1ee48}', '\u{1ee48}'),
+        ('\u{1ee4a}', '\u{1ee4a}'), ('\u{1ee4c}', '\u{1ee4c}'), ('\u{1ee50}', '\u{1ee50}'),
+        ('\u{1ee53}', '\u{1ee53}'), ('\u{1ee55}', '\u{1ee56}'), ('\u{1ee58}', '\u{1ee58}'),
+        ('\u{1ee5a}', '\u{1ee5a}'), ('\u{1ee5c}', '\u{1ee5c}'), ('\u{1ee5e}', '\u{1ee5e}'),
+        ('\u{1ee60}', '\u{1ee60}'), ('\u{1ee63}', '\u{1ee63}'), ('\u{1ee65}', '\u{1ee66}'),
+        ('\u{1ee6b}', '\u{1ee6b}'), ('\u{1ee73}', '\u{1ee73}'), ('\u{1ee78}', '\u{1ee78}'),
+        ('\u{1ee7d}', '\u{1ee7d}'), ('\u{1ee7f}', '\u{1ee7f}'), ('\u{1ee8a}', '\u{1ee8a}'),
+        ('\u{1ee9c}', '\u{1eea0}'), ('\u{1eea4}', '\u{1eea4}'), ('\u{1eeaa}', '\u{1eeaa}'),
+        ('\u{1eebc}', '\u{1eeef}'), ('\u{1eef2}', '\u{1efff}'), ('\u{1f02c}', '\u{1f02f}'),
+        ('\u{1f094}', '\u{1f09f}'), ('\u{1f0af}', '\u{1f0b0}'), ('\u{1f0c0}', '\u{1f0c0}'),
+        ('\u{1f0d0}', '\u{1f0d0}'), ('\u{1f0f6}', '\u{1f0ff}'), ('\u{1f10d}', '\u{1f10f}'),
+        ('\u{1f12f}', '\u{1f12f}'), ('\u{1f16c}', '\u{1f16f}'), ('\u{1f19b}', '\u{1f1e5}'),
+        ('\u{1f203}', '\u{1f20f}'), ('\u{1f23b}', '\u{1f23f}'), ('\u{1f249}', '\u{1f24f}'),
+        ('\u{1f252}', '\u{1f2ff}'), ('\u{1f32d}', '\u{1f32f}'), ('\u{1f37e}', '\u{1f37f}'),
+        ('\u{1f3cf}', '\u{1f3d3}'), ('\u{1f3f8}', '\u{1f3ff}'), ('\u{1f4ff}', '\u{1f4ff}'),
+        ('\u{1f54b}', '\u{1f54f}'), ('\u{1f57a}', '\u{1f57a}'), ('\u{1f5a4}', '\u{1f5a4}'),
+        ('\u{1f643}', '\u{1f644}'), ('\u{1f6d0}', '\u{1f6df}'), ('\u{1f6ed}', '\u{1f6ef}'),
+        ('\u{1f6f4}', '\u{1f6ff}'), ('\u{1f774}', '\u{1f77f}'), ('\u{1f7d5}', '\u{1f7ff}'),
+        ('\u{1f80c}', '\u{1f80f}'), ('\u{1f848}', '\u{1f84f}'), ('\u{1f85a}', '\u{1f85f}'),
+        ('\u{1f888}', '\u{1f88f}'), ('\u{1f8ae}', '\u{1ffff}'), ('\u{20001}', '\u{2a6d5}'),
+        ('\u{2a6d7}', '\u{2a6ff}'), ('\u{2a701}', '\u{2b733}'), ('\u{2b735}', '\u{2b73f}'),
+        ('\u{2b741}', '\u{2b81c}'), ('\u{2b81e}', '\u{2f7ff}'), ('\u{2fa1e}', '\u{e00ff}'),
+        ('\u{e01f0}', '\u{10ffff}')
     ];
 
     pub static Cc_table: &'static [(char, char)] = &[
-        ('\x00', '\x1f'), ('\x7f', '\u009f')
+        ('\u{0}', '\u{1f}'), ('\u{7f}', '\u{9f}')
     ];
 
     pub fn Cc(c: char) -> bool {
@@ -211,1052 +225,1156 @@ pub fn Cc(c: char) -> bool {
     }
 
     pub static Cf_table: &'static [(char, char)] = &[
-        ('\u00ad', '\u00ad'), ('\u0600', '\u0605'), ('\u061c', '\u061c'), ('\u06dd', '\u06dd'),
-        ('\u070f', '\u070f'), ('\u180e', '\u180e'), ('\u200b', '\u200f'), ('\u202a', '\u202e'),
-        ('\u2060', '\u2064'), ('\u2066', '\u206f'), ('\ufeff', '\ufeff'), ('\ufff9', '\ufffb'),
-        ('\U000110bd', '\U000110bd'), ('\U0001bca0', '\U0001bca3'), ('\U0001d173', '\U0001d17a'),
-        ('\U000e0001', '\U000e0001'), ('\U000e0020', '\U000e007f')
+        ('\u{ad}', '\u{ad}'), ('\u{600}', '\u{605}'), ('\u{61c}', '\u{61c}'), ('\u{6dd}',
+        '\u{6dd}'), ('\u{70f}', '\u{70f}'), ('\u{180e}', '\u{180e}'), ('\u{200b}', '\u{200f}'),
+        ('\u{202a}', '\u{202e}'), ('\u{2060}', '\u{2064}'), ('\u{2066}', '\u{206f}'), ('\u{feff}',
+        '\u{feff}'), ('\u{fff9}', '\u{fffb}'), ('\u{110bd}', '\u{110bd}'), ('\u{1bca0}',
+        '\u{1bca3}'), ('\u{1d173}', '\u{1d17a}'), ('\u{e0001}', '\u{e0001}'), ('\u{e0020}',
+        '\u{e007f}')
     ];
 
     pub static Cn_table: &'static [(char, char)] = &[
-        ('\u0378', '\u0379'), ('\u0380', '\u0383'), ('\u038b', '\u038b'), ('\u038d', '\u038d'),
-        ('\u03a2', '\u03a2'), ('\u0530', '\u0530'), ('\u0557', '\u0558'), ('\u0560', '\u0560'),
-        ('\u0588', '\u0588'), ('\u058b', '\u058c'), ('\u0590', '\u0590'), ('\u05c8', '\u05cf'),
-        ('\u05eb', '\u05ef'), ('\u05f5', '\u05ff'), ('\u061d', '\u061d'), ('\u070e', '\u070e'),
-        ('\u074b', '\u074c'), ('\u07b2', '\u07bf'), ('\u07fb', '\u07ff'), ('\u082e', '\u082f'),
-        ('\u083f', '\u083f'), ('\u085c', '\u085d'), ('\u085f', '\u089f'), ('\u08b3', '\u08e3'),
-        ('\u0984', '\u0984'), ('\u098d', '\u098e'), ('\u0991', '\u0992'), ('\u09a9', '\u09a9'),
-        ('\u09b1', '\u09b1'), ('\u09b3', '\u09b5'), ('\u09ba', '\u09bb'), ('\u09c5', '\u09c6'),
-        ('\u09c9', '\u09ca'), ('\u09cf', '\u09d6'), ('\u09d8', '\u09db'), ('\u09de', '\u09de'),
-        ('\u09e4', '\u09e5'), ('\u09fc', '\u0a00'), ('\u0a04', '\u0a04'), ('\u0a0b', '\u0a0e'),
-        ('\u0a11', '\u0a12'), ('\u0a29', '\u0a29'), ('\u0a31', '\u0a31'), ('\u0a34', '\u0a34'),
-        ('\u0a37', '\u0a37'), ('\u0a3a', '\u0a3b'), ('\u0a3d', '\u0a3d'), ('\u0a43', '\u0a46'),
-        ('\u0a49', '\u0a4a'), ('\u0a4e', '\u0a50'), ('\u0a52', '\u0a58'), ('\u0a5d', '\u0a5d'),
-        ('\u0a5f', '\u0a65'), ('\u0a76', '\u0a80'), ('\u0a84', '\u0a84'), ('\u0a8e', '\u0a8e'),
-        ('\u0a92', '\u0a92'), ('\u0aa9', '\u0aa9'), ('\u0ab1', '\u0ab1'), ('\u0ab4', '\u0ab4'),
-        ('\u0aba', '\u0abb'), ('\u0ac6', '\u0ac6'), ('\u0aca', '\u0aca'), ('\u0ace', '\u0acf'),
-        ('\u0ad1', '\u0adf'), ('\u0ae4', '\u0ae5'), ('\u0af2', '\u0b00'), ('\u0b04', '\u0b04'),
-        ('\u0b0d', '\u0b0e'), ('\u0b11', '\u0b12'), ('\u0b29', '\u0b29'), ('\u0b31', '\u0b31'),
-        ('\u0b34', '\u0b34'), ('\u0b3a', '\u0b3b'), ('\u0b45', '\u0b46'), ('\u0b49', '\u0b4a'),
-        ('\u0b4e', '\u0b55'), ('\u0b58', '\u0b5b'), ('\u0b5e', '\u0b5e'), ('\u0b64', '\u0b65'),
-        ('\u0b78', '\u0b81'), ('\u0b84', '\u0b84'), ('\u0b8b', '\u0b8d'), ('\u0b91', '\u0b91'),
-        ('\u0b96', '\u0b98'), ('\u0b9b', '\u0b9b'), ('\u0b9d', '\u0b9d'), ('\u0ba0', '\u0ba2'),
-        ('\u0ba5', '\u0ba7'), ('\u0bab', '\u0bad'), ('\u0bba', '\u0bbd'), ('\u0bc3', '\u0bc5'),
-        ('\u0bc9', '\u0bc9'), ('\u0bce', '\u0bcf'), ('\u0bd1', '\u0bd6'), ('\u0bd8', '\u0be5'),
-        ('\u0bfb', '\u0bff'), ('\u0c04', '\u0c04'), ('\u0c0d', '\u0c0d'), ('\u0c11', '\u0c11'),
-        ('\u0c29', '\u0c29'), ('\u0c3a', '\u0c3c'), ('\u0c45', '\u0c45'), ('\u0c49', '\u0c49'),
-        ('\u0c4e', '\u0c54'), ('\u0c57', '\u0c57'), ('\u0c5a', '\u0c5f'), ('\u0c64', '\u0c65'),
-        ('\u0c70', '\u0c77'), ('\u0c80', '\u0c80'), ('\u0c84', '\u0c84'), ('\u0c8d', '\u0c8d'),
-        ('\u0c91', '\u0c91'), ('\u0ca9', '\u0ca9'), ('\u0cb4', '\u0cb4'), ('\u0cba', '\u0cbb'),
-        ('\u0cc5', '\u0cc5'), ('\u0cc9', '\u0cc9'), ('\u0cce', '\u0cd4'), ('\u0cd7', '\u0cdd'),
-        ('\u0cdf', '\u0cdf'), ('\u0ce4', '\u0ce5'), ('\u0cf0', '\u0cf0'), ('\u0cf3', '\u0d00'),
-        ('\u0d04', '\u0d04'), ('\u0d0d', '\u0d0d'), ('\u0d11', '\u0d11'), ('\u0d3b', '\u0d3c'),
-        ('\u0d45', '\u0d45'), ('\u0d49', '\u0d49'), ('\u0d4f', '\u0d56'), ('\u0d58', '\u0d5f'),
-        ('\u0d64', '\u0d65'), ('\u0d76', '\u0d78'), ('\u0d80', '\u0d81'), ('\u0d84', '\u0d84'),
-        ('\u0d97', '\u0d99'), ('\u0db2', '\u0db2'), ('\u0dbc', '\u0dbc'), ('\u0dbe', '\u0dbf'),
-        ('\u0dc7', '\u0dc9'), ('\u0dcb', '\u0dce'), ('\u0dd5', '\u0dd5'), ('\u0dd7', '\u0dd7'),
-        ('\u0de0', '\u0de5'), ('\u0df0', '\u0df1'), ('\u0df5', '\u0e00'), ('\u0e3b', '\u0e3e'),
-        ('\u0e5c', '\u0e80'), ('\u0e83', '\u0e83'), ('\u0e85', '\u0e86'), ('\u0e89', '\u0e89'),
-        ('\u0e8b', '\u0e8c'), ('\u0e8e', '\u0e93'), ('\u0e98', '\u0e98'), ('\u0ea0', '\u0ea0'),
-        ('\u0ea4', '\u0ea4'), ('\u0ea6', '\u0ea6'), ('\u0ea8', '\u0ea9'), ('\u0eac', '\u0eac'),
-        ('\u0eba', '\u0eba'), ('\u0ebe', '\u0ebf'), ('\u0ec5', '\u0ec5'), ('\u0ec7', '\u0ec7'),
-        ('\u0ece', '\u0ecf'), ('\u0eda', '\u0edb'), ('\u0ee0', '\u0eff'), ('\u0f48', '\u0f48'),
-        ('\u0f6d', '\u0f70'), ('\u0f98', '\u0f98'), ('\u0fbd', '\u0fbd'), ('\u0fcd', '\u0fcd'),
-        ('\u0fdb', '\u0fff'), ('\u10c6', '\u10c6'), ('\u10c8', '\u10cc'), ('\u10ce', '\u10cf'),
-        ('\u1249', '\u1249'), ('\u124e', '\u124f'), ('\u1257', '\u1257'), ('\u1259', '\u1259'),
-        ('\u125e', '\u125f'), ('\u1289', '\u1289'), ('\u128e', '\u128f'), ('\u12b1', '\u12b1'),
-        ('\u12b6', '\u12b7'), ('\u12bf', '\u12bf'), ('\u12c1', '\u12c1'), ('\u12c6', '\u12c7'),
-        ('\u12d7', '\u12d7'), ('\u1311', '\u1311'), ('\u1316', '\u1317'), ('\u135b', '\u135c'),
-        ('\u137d', '\u137f'), ('\u139a', '\u139f'), ('\u13f5', '\u13ff'), ('\u169d', '\u169f'),
-        ('\u16f9', '\u16ff'), ('\u170d', '\u170d'), ('\u1715', '\u171f'), ('\u1737', '\u173f'),
-        ('\u1754', '\u175f'), ('\u176d', '\u176d'), ('\u1771', '\u1771'), ('\u1774', '\u177f'),
-        ('\u17de', '\u17df'), ('\u17ea', '\u17ef'), ('\u17fa', '\u17ff'), ('\u180f', '\u180f'),
-        ('\u181a', '\u181f'), ('\u1878', '\u187f'), ('\u18ab', '\u18af'), ('\u18f6', '\u18ff'),
-        ('\u191f', '\u191f'), ('\u192c', '\u192f'), ('\u193c', '\u193f'), ('\u1941', '\u1943'),
-        ('\u196e', '\u196f'), ('\u1975', '\u197f'), ('\u19ac', '\u19af'), ('\u19ca', '\u19cf'),
-        ('\u19db', '\u19dd'), ('\u1a1c', '\u1a1d'), ('\u1a5f', '\u1a5f'), ('\u1a7d', '\u1a7e'),
-        ('\u1a8a', '\u1a8f'), ('\u1a9a', '\u1a9f'), ('\u1aae', '\u1aaf'), ('\u1abf', '\u1aff'),
-        ('\u1b4c', '\u1b4f'), ('\u1b7d', '\u1b7f'), ('\u1bf4', '\u1bfb'), ('\u1c38', '\u1c3a'),
-        ('\u1c4a', '\u1c4c'), ('\u1c80', '\u1cbf'), ('\u1cc8', '\u1ccf'), ('\u1cf7', '\u1cf7'),
-        ('\u1cfa', '\u1cff'), ('\u1df6', '\u1dfb'), ('\u1f16', '\u1f17'), ('\u1f1e', '\u1f1f'),
-        ('\u1f46', '\u1f47'), ('\u1f4e', '\u1f4f'), ('\u1f58', '\u1f58'), ('\u1f5a', '\u1f5a'),
-        ('\u1f5c', '\u1f5c'), ('\u1f5e', '\u1f5e'), ('\u1f7e', '\u1f7f'), ('\u1fb5', '\u1fb5'),
-        ('\u1fc5', '\u1fc5'), ('\u1fd4', '\u1fd5'), ('\u1fdc', '\u1fdc'), ('\u1ff0', '\u1ff1'),
-        ('\u1ff5', '\u1ff5'), ('\u1fff', '\u1fff'), ('\u2065', '\u2065'), ('\u2072', '\u2073'),
-        ('\u208f', '\u208f'), ('\u209d', '\u209f'), ('\u20be', '\u20cf'), ('\u20f1', '\u20ff'),
-        ('\u218a', '\u218f'), ('\u23fb', '\u23ff'), ('\u2427', '\u243f'), ('\u244b', '\u245f'),
-        ('\u2b74', '\u2b75'), ('\u2b96', '\u2b97'), ('\u2bba', '\u2bbc'), ('\u2bc9', '\u2bc9'),
-        ('\u2bd2', '\u2bff'), ('\u2c2f', '\u2c2f'), ('\u2c5f', '\u2c5f'), ('\u2cf4', '\u2cf8'),
-        ('\u2d26', '\u2d26'), ('\u2d28', '\u2d2c'), ('\u2d2e', '\u2d2f'), ('\u2d68', '\u2d6e'),
-        ('\u2d71', '\u2d7e'), ('\u2d97', '\u2d9f'), ('\u2da7', '\u2da7'), ('\u2daf', '\u2daf'),
-        ('\u2db7', '\u2db7'), ('\u2dbf', '\u2dbf'), ('\u2dc7', '\u2dc7'), ('\u2dcf', '\u2dcf'),
-        ('\u2dd7', '\u2dd7'), ('\u2ddf', '\u2ddf'), ('\u2e43', '\u2e7f'), ('\u2e9a', '\u2e9a'),
-        ('\u2ef4', '\u2eff'), ('\u2fd6', '\u2fef'), ('\u2ffc', '\u2fff'), ('\u3040', '\u3040'),
-        ('\u3097', '\u3098'), ('\u3100', '\u3104'), ('\u312e', '\u3130'), ('\u318f', '\u318f'),
-        ('\u31bb', '\u31bf'), ('\u31e4', '\u31ef'), ('\u321f', '\u321f'), ('\u32ff', '\u32ff'),
-        ('\u3401', '\u4db4'), ('\u4db6', '\u4dbf'), ('\u4e01', '\u9fcb'), ('\u9fcd', '\u9fff'),
-        ('\ua48d', '\ua48f'), ('\ua4c7', '\ua4cf'), ('\ua62c', '\ua63f'), ('\ua69e', '\ua69e'),
-        ('\ua6f8', '\ua6ff'), ('\ua78f', '\ua78f'), ('\ua7ae', '\ua7af'), ('\ua7b2', '\ua7f6'),
-        ('\ua82c', '\ua82f'), ('\ua83a', '\ua83f'), ('\ua878', '\ua87f'), ('\ua8c5', '\ua8cd'),
-        ('\ua8da', '\ua8df'), ('\ua8fc', '\ua8ff'), ('\ua954', '\ua95e'), ('\ua97d', '\ua97f'),
-        ('\ua9ce', '\ua9ce'), ('\ua9da', '\ua9dd'), ('\ua9ff', '\ua9ff'), ('\uaa37', '\uaa3f'),
-        ('\uaa4e', '\uaa4f'), ('\uaa5a', '\uaa5b'), ('\uaac3', '\uaada'), ('\uaaf7', '\uab00'),
-        ('\uab07', '\uab08'), ('\uab0f', '\uab10'), ('\uab17', '\uab1f'), ('\uab27', '\uab27'),
-        ('\uab2f', '\uab2f'), ('\uab60', '\uab63'), ('\uab66', '\uabbf'), ('\uabee', '\uabef'),
-        ('\uabfa', '\uabff'), ('\uac01', '\ud7a2'), ('\ud7a4', '\ud7af'), ('\ud7c7', '\ud7ca'),
-        ('\ud7fc', '\ud7ff'), ('\ue001', '\uf8fe'), ('\ufa6e', '\ufa6f'), ('\ufada', '\ufaff'),
-        ('\ufb07', '\ufb12'), ('\ufb18', '\ufb1c'), ('\ufb37', '\ufb37'), ('\ufb3d', '\ufb3d'),
-        ('\ufb3f', '\ufb3f'), ('\ufb42', '\ufb42'), ('\ufb45', '\ufb45'), ('\ufbc2', '\ufbd2'),
-        ('\ufd40', '\ufd4f'), ('\ufd90', '\ufd91'), ('\ufdc8', '\ufdef'), ('\ufdfe', '\ufdff'),
-        ('\ufe1a', '\ufe1f'), ('\ufe2e', '\ufe2f'), ('\ufe53', '\ufe53'), ('\ufe67', '\ufe67'),
-        ('\ufe6c', '\ufe6f'), ('\ufe75', '\ufe75'), ('\ufefd', '\ufefe'), ('\uff00', '\uff00'),
-        ('\uffbf', '\uffc1'), ('\uffc8', '\uffc9'), ('\uffd0', '\uffd1'), ('\uffd8', '\uffd9'),
-        ('\uffdd', '\uffdf'), ('\uffe7', '\uffe7'), ('\uffef', '\ufff8'), ('\ufffe', '\uffff'),
-        ('\U0001000c', '\U0001000c'), ('\U00010027', '\U00010027'), ('\U0001003b', '\U0001003b'),
-        ('\U0001003e', '\U0001003e'), ('\U0001004e', '\U0001004f'), ('\U0001005e', '\U0001007f'),
-        ('\U000100fb', '\U000100ff'), ('\U00010103', '\U00010106'), ('\U00010134', '\U00010136'),
-        ('\U0001018d', '\U0001018f'), ('\U0001019c', '\U0001019f'), ('\U000101a1', '\U000101cf'),
-        ('\U000101fe', '\U0001027f'), ('\U0001029d', '\U0001029f'), ('\U000102d1', '\U000102df'),
-        ('\U000102fc', '\U000102ff'), ('\U00010324', '\U0001032f'), ('\U0001034b', '\U0001034f'),
-        ('\U0001037b', '\U0001037f'), ('\U0001039e', '\U0001039e'), ('\U000103c4', '\U000103c7'),
-        ('\U000103d6', '\U000103ff'), ('\U0001049e', '\U0001049f'), ('\U000104aa', '\U000104ff'),
-        ('\U00010528', '\U0001052f'), ('\U00010564', '\U0001056e'), ('\U00010570', '\U000105ff'),
-        ('\U00010737', '\U0001073f'), ('\U00010756', '\U0001075f'), ('\U00010768', '\U000107ff'),
-        ('\U00010806', '\U00010807'), ('\U00010809', '\U00010809'), ('\U00010836', '\U00010836'),
-        ('\U00010839', '\U0001083b'), ('\U0001083d', '\U0001083e'), ('\U00010856', '\U00010856'),
-        ('\U0001089f', '\U000108a6'), ('\U000108b0', '\U000108ff'), ('\U0001091c', '\U0001091e'),
-        ('\U0001093a', '\U0001093e'), ('\U00010940', '\U0001097f'), ('\U000109b8', '\U000109bd'),
-        ('\U000109c0', '\U000109ff'), ('\U00010a04', '\U00010a04'), ('\U00010a07', '\U00010a0b'),
-        ('\U00010a14', '\U00010a14'), ('\U00010a18', '\U00010a18'), ('\U00010a34', '\U00010a37'),
-        ('\U00010a3b', '\U00010a3e'), ('\U00010a48', '\U00010a4f'), ('\U00010a59', '\U00010a5f'),
-        ('\U00010aa0', '\U00010abf'), ('\U00010ae7', '\U00010aea'), ('\U00010af7', '\U00010aff'),
-        ('\U00010b36', '\U00010b38'), ('\U00010b56', '\U00010b57'), ('\U00010b73', '\U00010b77'),
-        ('\U00010b92', '\U00010b98'), ('\U00010b9d', '\U00010ba8'), ('\U00010bb0', '\U00010bff'),
-        ('\U00010c49', '\U00010e5f'), ('\U00010e7f', '\U00010fff'), ('\U0001104e', '\U00011051'),
-        ('\U00011070', '\U0001107e'), ('\U000110c2', '\U000110cf'), ('\U000110e9', '\U000110ef'),
-        ('\U000110fa', '\U000110ff'), ('\U00011135', '\U00011135'), ('\U00011144', '\U0001114f'),
-        ('\U00011177', '\U0001117f'), ('\U000111c9', '\U000111cc'), ('\U000111ce', '\U000111cf'),
-        ('\U000111db', '\U000111e0'), ('\U000111f5', '\U000111ff'), ('\U00011212', '\U00011212'),
-        ('\U0001123e', '\U000112af'), ('\U000112eb', '\U000112ef'), ('\U000112fa', '\U00011300'),
-        ('\U00011304', '\U00011304'), ('\U0001130d', '\U0001130e'), ('\U00011311', '\U00011312'),
-        ('\U00011329', '\U00011329'), ('\U00011331', '\U00011331'), ('\U00011334', '\U00011334'),
-        ('\U0001133a', '\U0001133b'), ('\U00011345', '\U00011346'), ('\U00011349', '\U0001134a'),
-        ('\U0001134e', '\U00011356'), ('\U00011358', '\U0001135c'), ('\U00011364', '\U00011365'),
-        ('\U0001136d', '\U0001136f'), ('\U00011375', '\U0001147f'), ('\U000114c8', '\U000114cf'),
-        ('\U000114da', '\U0001157f'), ('\U000115b6', '\U000115b7'), ('\U000115ca', '\U000115ff'),
-        ('\U00011645', '\U0001164f'), ('\U0001165a', '\U0001167f'), ('\U000116b8', '\U000116bf'),
-        ('\U000116ca', '\U0001189f'), ('\U000118f3', '\U000118fe'), ('\U00011900', '\U00011abf'),
-        ('\U00011af9', '\U00011fff'), ('\U00012399', '\U000123ff'), ('\U0001246f', '\U0001246f'),
-        ('\U00012475', '\U00012fff'), ('\U0001342f', '\U000167ff'), ('\U00016a39', '\U00016a3f'),
-        ('\U00016a5f', '\U00016a5f'), ('\U00016a6a', '\U00016a6d'), ('\U00016a70', '\U00016acf'),
-        ('\U00016aee', '\U00016aef'), ('\U00016af6', '\U00016aff'), ('\U00016b46', '\U00016b4f'),
-        ('\U00016b5a', '\U00016b5a'), ('\U00016b62', '\U00016b62'), ('\U00016b78', '\U00016b7c'),
-        ('\U00016b90', '\U00016eff'), ('\U00016f45', '\U00016f4f'), ('\U00016f7f', '\U00016f8e'),
-        ('\U00016fa0', '\U0001afff'), ('\U0001b002', '\U0001bbff'), ('\U0001bc6b', '\U0001bc6f'),
-        ('\U0001bc7d', '\U0001bc7f'), ('\U0001bc89', '\U0001bc8f'), ('\U0001bc9a', '\U0001bc9b'),
-        ('\U0001bca4', '\U0001cfff'), ('\U0001d0f6', '\U0001d0ff'), ('\U0001d127', '\U0001d128'),
-        ('\U0001d1de', '\U0001d1ff'), ('\U0001d246', '\U0001d2ff'), ('\U0001d357', '\U0001d35f'),
-        ('\U0001d372', '\U0001d3ff'), ('\U0001d455', '\U0001d455'), ('\U0001d49d', '\U0001d49d'),
-        ('\U0001d4a0', '\U0001d4a1'), ('\U0001d4a3', '\U0001d4a4'), ('\U0001d4a7', '\U0001d4a8'),
-        ('\U0001d4ad', '\U0001d4ad'), ('\U0001d4ba', '\U0001d4ba'), ('\U0001d4bc', '\U0001d4bc'),
-        ('\U0001d4c4', '\U0001d4c4'), ('\U0001d506', '\U0001d506'), ('\U0001d50b', '\U0001d50c'),
-        ('\U0001d515', '\U0001d515'), ('\U0001d51d', '\U0001d51d'), ('\U0001d53a', '\U0001d53a'),
-        ('\U0001d53f', '\U0001d53f'), ('\U0001d545', '\U0001d545'), ('\U0001d547', '\U0001d549'),
-        ('\U0001d551', '\U0001d551'), ('\U0001d6a6', '\U0001d6a7'), ('\U0001d7cc', '\U0001d7cd'),
-        ('\U0001d800', '\U0001e7ff'), ('\U0001e8c5', '\U0001e8c6'), ('\U0001e8d7', '\U0001edff'),
-        ('\U0001ee04', '\U0001ee04'), ('\U0001ee20', '\U0001ee20'), ('\U0001ee23', '\U0001ee23'),
-        ('\U0001ee25', '\U0001ee26'), ('\U0001ee28', '\U0001ee28'), ('\U0001ee33', '\U0001ee33'),
-        ('\U0001ee38', '\U0001ee38'), ('\U0001ee3a', '\U0001ee3a'), ('\U0001ee3c', '\U0001ee41'),
-        ('\U0001ee43', '\U0001ee46'), ('\U0001ee48', '\U0001ee48'), ('\U0001ee4a', '\U0001ee4a'),
-        ('\U0001ee4c', '\U0001ee4c'), ('\U0001ee50', '\U0001ee50'), ('\U0001ee53', '\U0001ee53'),
-        ('\U0001ee55', '\U0001ee56'), ('\U0001ee58', '\U0001ee58'), ('\U0001ee5a', '\U0001ee5a'),
-        ('\U0001ee5c', '\U0001ee5c'), ('\U0001ee5e', '\U0001ee5e'), ('\U0001ee60', '\U0001ee60'),
-        ('\U0001ee63', '\U0001ee63'), ('\U0001ee65', '\U0001ee66'), ('\U0001ee6b', '\U0001ee6b'),
-        ('\U0001ee73', '\U0001ee73'), ('\U0001ee78', '\U0001ee78'), ('\U0001ee7d', '\U0001ee7d'),
-        ('\U0001ee7f', '\U0001ee7f'), ('\U0001ee8a', '\U0001ee8a'), ('\U0001ee9c', '\U0001eea0'),
-        ('\U0001eea4', '\U0001eea4'), ('\U0001eeaa', '\U0001eeaa'), ('\U0001eebc', '\U0001eeef'),
-        ('\U0001eef2', '\U0001efff'), ('\U0001f02c', '\U0001f02f'), ('\U0001f094', '\U0001f09f'),
-        ('\U0001f0af', '\U0001f0b0'), ('\U0001f0c0', '\U0001f0c0'), ('\U0001f0d0', '\U0001f0d0'),
-        ('\U0001f0f6', '\U0001f0ff'), ('\U0001f10d', '\U0001f10f'), ('\U0001f12f', '\U0001f12f'),
-        ('\U0001f16c', '\U0001f16f'), ('\U0001f19b', '\U0001f1e5'), ('\U0001f203', '\U0001f20f'),
-        ('\U0001f23b', '\U0001f23f'), ('\U0001f249', '\U0001f24f'), ('\U0001f252', '\U0001f2ff'),
-        ('\U0001f32d', '\U0001f32f'), ('\U0001f37e', '\U0001f37f'), ('\U0001f3cf', '\U0001f3d3'),
-        ('\U0001f3f8', '\U0001f3ff'), ('\U0001f4ff', '\U0001f4ff'), ('\U0001f54b', '\U0001f54f'),
-        ('\U0001f57a', '\U0001f57a'), ('\U0001f5a4', '\U0001f5a4'), ('\U0001f643', '\U0001f644'),
-        ('\U0001f6d0', '\U0001f6df'), ('\U0001f6ed', '\U0001f6ef'), ('\U0001f6f4', '\U0001f6ff'),
-        ('\U0001f774', '\U0001f77f'), ('\U0001f7d5', '\U0001f7ff'), ('\U0001f80c', '\U0001f80f'),
-        ('\U0001f848', '\U0001f84f'), ('\U0001f85a', '\U0001f85f'), ('\U0001f888', '\U0001f88f'),
-        ('\U0001f8ae', '\U0001ffff'), ('\U00020001', '\U0002a6d5'), ('\U0002a6d7', '\U0002a6ff'),
-        ('\U0002a701', '\U0002b733'), ('\U0002b735', '\U0002b73f'), ('\U0002b741', '\U0002b81c'),
-        ('\U0002b81e', '\U0002f7ff'), ('\U0002fa1e', '\U000e0000'), ('\U000e0002', '\U000e001f'),
-        ('\U000e0080', '\U000e00ff'), ('\U000e01f0', '\U000effff'), ('\U000f0001', '\U000ffffc'),
-        ('\U000ffffe', '\U000fffff'), ('\U00100001', '\U0010fffc'), ('\U0010fffe', '\U0010ffff')
+        ('\u{378}', '\u{379}'), ('\u{380}', '\u{383}'), ('\u{38b}', '\u{38b}'), ('\u{38d}',
+        '\u{38d}'), ('\u{3a2}', '\u{3a2}'), ('\u{530}', '\u{530}'), ('\u{557}', '\u{558}'),
+        ('\u{560}', '\u{560}'), ('\u{588}', '\u{588}'), ('\u{58b}', '\u{58c}'), ('\u{590}',
+        '\u{590}'), ('\u{5c8}', '\u{5cf}'), ('\u{5eb}', '\u{5ef}'), ('\u{5f5}', '\u{5ff}'),
+        ('\u{61d}', '\u{61d}'), ('\u{70e}', '\u{70e}'), ('\u{74b}', '\u{74c}'), ('\u{7b2}',
+        '\u{7bf}'), ('\u{7fb}', '\u{7ff}'), ('\u{82e}', '\u{82f}'), ('\u{83f}', '\u{83f}'),
+        ('\u{85c}', '\u{85d}'), ('\u{85f}', '\u{89f}'), ('\u{8b3}', '\u{8e3}'), ('\u{984}',
+        '\u{984}'), ('\u{98d}', '\u{98e}'), ('\u{991}', '\u{992}'), ('\u{9a9}', '\u{9a9}'),
+        ('\u{9b1}', '\u{9b1}'), ('\u{9b3}', '\u{9b5}'), ('\u{9ba}', '\u{9bb}'), ('\u{9c5}',
+        '\u{9c6}'), ('\u{9c9}', '\u{9ca}'), ('\u{9cf}', '\u{9d6}'), ('\u{9d8}', '\u{9db}'),
+        ('\u{9de}', '\u{9de}'), ('\u{9e4}', '\u{9e5}'), ('\u{9fc}', '\u{a00}'), ('\u{a04}',
+        '\u{a04}'), ('\u{a0b}', '\u{a0e}'), ('\u{a11}', '\u{a12}'), ('\u{a29}', '\u{a29}'),
+        ('\u{a31}', '\u{a31}'), ('\u{a34}', '\u{a34}'), ('\u{a37}', '\u{a37}'), ('\u{a3a}',
+        '\u{a3b}'), ('\u{a3d}', '\u{a3d}'), ('\u{a43}', '\u{a46}'), ('\u{a49}', '\u{a4a}'),
+        ('\u{a4e}', '\u{a50}'), ('\u{a52}', '\u{a58}'), ('\u{a5d}', '\u{a5d}'), ('\u{a5f}',
+        '\u{a65}'), ('\u{a76}', '\u{a80}'), ('\u{a84}', '\u{a84}'), ('\u{a8e}', '\u{a8e}'),
+        ('\u{a92}', '\u{a92}'), ('\u{aa9}', '\u{aa9}'), ('\u{ab1}', '\u{ab1}'), ('\u{ab4}',
+        '\u{ab4}'), ('\u{aba}', '\u{abb}'), ('\u{ac6}', '\u{ac6}'), ('\u{aca}', '\u{aca}'),
+        ('\u{ace}', '\u{acf}'), ('\u{ad1}', '\u{adf}'), ('\u{ae4}', '\u{ae5}'), ('\u{af2}',
+        '\u{b00}'), ('\u{b04}', '\u{b04}'), ('\u{b0d}', '\u{b0e}'), ('\u{b11}', '\u{b12}'),
+        ('\u{b29}', '\u{b29}'), ('\u{b31}', '\u{b31}'), ('\u{b34}', '\u{b34}'), ('\u{b3a}',
+        '\u{b3b}'), ('\u{b45}', '\u{b46}'), ('\u{b49}', '\u{b4a}'), ('\u{b4e}', '\u{b55}'),
+        ('\u{b58}', '\u{b5b}'), ('\u{b5e}', '\u{b5e}'), ('\u{b64}', '\u{b65}'), ('\u{b78}',
+        '\u{b81}'), ('\u{b84}', '\u{b84}'), ('\u{b8b}', '\u{b8d}'), ('\u{b91}', '\u{b91}'),
+        ('\u{b96}', '\u{b98}'), ('\u{b9b}', '\u{b9b}'), ('\u{b9d}', '\u{b9d}'), ('\u{ba0}',
+        '\u{ba2}'), ('\u{ba5}', '\u{ba7}'), ('\u{bab}', '\u{bad}'), ('\u{bba}', '\u{bbd}'),
+        ('\u{bc3}', '\u{bc5}'), ('\u{bc9}', '\u{bc9}'), ('\u{bce}', '\u{bcf}'), ('\u{bd1}',
+        '\u{bd6}'), ('\u{bd8}', '\u{be5}'), ('\u{bfb}', '\u{bff}'), ('\u{c04}', '\u{c04}'),
+        ('\u{c0d}', '\u{c0d}'), ('\u{c11}', '\u{c11}'), ('\u{c29}', '\u{c29}'), ('\u{c3a}',
+        '\u{c3c}'), ('\u{c45}', '\u{c45}'), ('\u{c49}', '\u{c49}'), ('\u{c4e}', '\u{c54}'),
+        ('\u{c57}', '\u{c57}'), ('\u{c5a}', '\u{c5f}'), ('\u{c64}', '\u{c65}'), ('\u{c70}',
+        '\u{c77}'), ('\u{c80}', '\u{c80}'), ('\u{c84}', '\u{c84}'), ('\u{c8d}', '\u{c8d}'),
+        ('\u{c91}', '\u{c91}'), ('\u{ca9}', '\u{ca9}'), ('\u{cb4}', '\u{cb4}'), ('\u{cba}',
+        '\u{cbb}'), ('\u{cc5}', '\u{cc5}'), ('\u{cc9}', '\u{cc9}'), ('\u{cce}', '\u{cd4}'),
+        ('\u{cd7}', '\u{cdd}'), ('\u{cdf}', '\u{cdf}'), ('\u{ce4}', '\u{ce5}'), ('\u{cf0}',
+        '\u{cf0}'), ('\u{cf3}', '\u{d00}'), ('\u{d04}', '\u{d04}'), ('\u{d0d}', '\u{d0d}'),
+        ('\u{d11}', '\u{d11}'), ('\u{d3b}', '\u{d3c}'), ('\u{d45}', '\u{d45}'), ('\u{d49}',
+        '\u{d49}'), ('\u{d4f}', '\u{d56}'), ('\u{d58}', '\u{d5f}'), ('\u{d64}', '\u{d65}'),
+        ('\u{d76}', '\u{d78}'), ('\u{d80}', '\u{d81}'), ('\u{d84}', '\u{d84}'), ('\u{d97}',
+        '\u{d99}'), ('\u{db2}', '\u{db2}'), ('\u{dbc}', '\u{dbc}'), ('\u{dbe}', '\u{dbf}'),
+        ('\u{dc7}', '\u{dc9}'), ('\u{dcb}', '\u{dce}'), ('\u{dd5}', '\u{dd5}'), ('\u{dd7}',
+        '\u{dd7}'), ('\u{de0}', '\u{de5}'), ('\u{df0}', '\u{df1}'), ('\u{df5}', '\u{e00}'),
+        ('\u{e3b}', '\u{e3e}'), ('\u{e5c}', '\u{e80}'), ('\u{e83}', '\u{e83}'), ('\u{e85}',
+        '\u{e86}'), ('\u{e89}', '\u{e89}'), ('\u{e8b}', '\u{e8c}'), ('\u{e8e}', '\u{e93}'),
+        ('\u{e98}', '\u{e98}'), ('\u{ea0}', '\u{ea0}'), ('\u{ea4}', '\u{ea4}'), ('\u{ea6}',
+        '\u{ea6}'), ('\u{ea8}', '\u{ea9}'), ('\u{eac}', '\u{eac}'), ('\u{eba}', '\u{eba}'),
+        ('\u{ebe}', '\u{ebf}'), ('\u{ec5}', '\u{ec5}'), ('\u{ec7}', '\u{ec7}'), ('\u{ece}',
+        '\u{ecf}'), ('\u{eda}', '\u{edb}'), ('\u{ee0}', '\u{eff}'), ('\u{f48}', '\u{f48}'),
+        ('\u{f6d}', '\u{f70}'), ('\u{f98}', '\u{f98}'), ('\u{fbd}', '\u{fbd}'), ('\u{fcd}',
+        '\u{fcd}'), ('\u{fdb}', '\u{fff}'), ('\u{10c6}', '\u{10c6}'), ('\u{10c8}', '\u{10cc}'),
+        ('\u{10ce}', '\u{10cf}'), ('\u{1249}', '\u{1249}'), ('\u{124e}', '\u{124f}'), ('\u{1257}',
+        '\u{1257}'), ('\u{1259}', '\u{1259}'), ('\u{125e}', '\u{125f}'), ('\u{1289}', '\u{1289}'),
+        ('\u{128e}', '\u{128f}'), ('\u{12b1}', '\u{12b1}'), ('\u{12b6}', '\u{12b7}'), ('\u{12bf}',
+        '\u{12bf}'), ('\u{12c1}', '\u{12c1}'), ('\u{12c6}', '\u{12c7}'), ('\u{12d7}', '\u{12d7}'),
+        ('\u{1311}', '\u{1311}'), ('\u{1316}', '\u{1317}'), ('\u{135b}', '\u{135c}'), ('\u{137d}',
+        '\u{137f}'), ('\u{139a}', '\u{139f}'), ('\u{13f5}', '\u{13ff}'), ('\u{169d}', '\u{169f}'),
+        ('\u{16f9}', '\u{16ff}'), ('\u{170d}', '\u{170d}'), ('\u{1715}', '\u{171f}'), ('\u{1737}',
+        '\u{173f}'), ('\u{1754}', '\u{175f}'), ('\u{176d}', '\u{176d}'), ('\u{1771}', '\u{1771}'),
+        ('\u{1774}', '\u{177f}'), ('\u{17de}', '\u{17df}'), ('\u{17ea}', '\u{17ef}'), ('\u{17fa}',
+        '\u{17ff}'), ('\u{180f}', '\u{180f}'), ('\u{181a}', '\u{181f}'), ('\u{1878}', '\u{187f}'),
+        ('\u{18ab}', '\u{18af}'), ('\u{18f6}', '\u{18ff}'), ('\u{191f}', '\u{191f}'), ('\u{192c}',
+        '\u{192f}'), ('\u{193c}', '\u{193f}'), ('\u{1941}', '\u{1943}'), ('\u{196e}', '\u{196f}'),
+        ('\u{1975}', '\u{197f}'), ('\u{19ac}', '\u{19af}'), ('\u{19ca}', '\u{19cf}'), ('\u{19db}',
+        '\u{19dd}'), ('\u{1a1c}', '\u{1a1d}'), ('\u{1a5f}', '\u{1a5f}'), ('\u{1a7d}', '\u{1a7e}'),
+        ('\u{1a8a}', '\u{1a8f}'), ('\u{1a9a}', '\u{1a9f}'), ('\u{1aae}', '\u{1aaf}'), ('\u{1abf}',
+        '\u{1aff}'), ('\u{1b4c}', '\u{1b4f}'), ('\u{1b7d}', '\u{1b7f}'), ('\u{1bf4}', '\u{1bfb}'),
+        ('\u{1c38}', '\u{1c3a}'), ('\u{1c4a}', '\u{1c4c}'), ('\u{1c80}', '\u{1cbf}'), ('\u{1cc8}',
+        '\u{1ccf}'), ('\u{1cf7}', '\u{1cf7}'), ('\u{1cfa}', '\u{1cff}'), ('\u{1df6}', '\u{1dfb}'),
+        ('\u{1f16}', '\u{1f17}'), ('\u{1f1e}', '\u{1f1f}'), ('\u{1f46}', '\u{1f47}'), ('\u{1f4e}',
+        '\u{1f4f}'), ('\u{1f58}', '\u{1f58}'), ('\u{1f5a}', '\u{1f5a}'), ('\u{1f5c}', '\u{1f5c}'),
+        ('\u{1f5e}', '\u{1f5e}'), ('\u{1f7e}', '\u{1f7f}'), ('\u{1fb5}', '\u{1fb5}'), ('\u{1fc5}',
+        '\u{1fc5}'), ('\u{1fd4}', '\u{1fd5}'), ('\u{1fdc}', '\u{1fdc}'), ('\u{1ff0}', '\u{1ff1}'),
+        ('\u{1ff5}', '\u{1ff5}'), ('\u{1fff}', '\u{1fff}'), ('\u{2065}', '\u{2065}'), ('\u{2072}',
+        '\u{2073}'), ('\u{208f}', '\u{208f}'), ('\u{209d}', '\u{209f}'), ('\u{20be}', '\u{20cf}'),
+        ('\u{20f1}', '\u{20ff}'), ('\u{218a}', '\u{218f}'), ('\u{23fb}', '\u{23ff}'), ('\u{2427}',
+        '\u{243f}'), ('\u{244b}', '\u{245f}'), ('\u{2b74}', '\u{2b75}'), ('\u{2b96}', '\u{2b97}'),
+        ('\u{2bba}', '\u{2bbc}'), ('\u{2bc9}', '\u{2bc9}'), ('\u{2bd2}', '\u{2bff}'), ('\u{2c2f}',
+        '\u{2c2f}'), ('\u{2c5f}', '\u{2c5f}'), ('\u{2cf4}', '\u{2cf8}'), ('\u{2d26}', '\u{2d26}'),
+        ('\u{2d28}', '\u{2d2c}'), ('\u{2d2e}', '\u{2d2f}'), ('\u{2d68}', '\u{2d6e}'), ('\u{2d71}',
+        '\u{2d7e}'), ('\u{2d97}', '\u{2d9f}'), ('\u{2da7}', '\u{2da7}'), ('\u{2daf}', '\u{2daf}'),
+        ('\u{2db7}', '\u{2db7}'), ('\u{2dbf}', '\u{2dbf}'), ('\u{2dc7}', '\u{2dc7}'), ('\u{2dcf}',
+        '\u{2dcf}'), ('\u{2dd7}', '\u{2dd7}'), ('\u{2ddf}', '\u{2ddf}'), ('\u{2e43}', '\u{2e7f}'),
+        ('\u{2e9a}', '\u{2e9a}'), ('\u{2ef4}', '\u{2eff}'), ('\u{2fd6}', '\u{2fef}'), ('\u{2ffc}',
+        '\u{2fff}'), ('\u{3040}', '\u{3040}'), ('\u{3097}', '\u{3098}'), ('\u{3100}', '\u{3104}'),
+        ('\u{312e}', '\u{3130}'), ('\u{318f}', '\u{318f}'), ('\u{31bb}', '\u{31bf}'), ('\u{31e4}',
+        '\u{31ef}'), ('\u{321f}', '\u{321f}'), ('\u{32ff}', '\u{32ff}'), ('\u{3401}', '\u{4db4}'),
+        ('\u{4db6}', '\u{4dbf}'), ('\u{4e01}', '\u{9fcb}'), ('\u{9fcd}', '\u{9fff}'), ('\u{a48d}',
+        '\u{a48f}'), ('\u{a4c7}', '\u{a4cf}'), ('\u{a62c}', '\u{a63f}'), ('\u{a69e}', '\u{a69e}'),
+        ('\u{a6f8}', '\u{a6ff}'), ('\u{a78f}', '\u{a78f}'), ('\u{a7ae}', '\u{a7af}'), ('\u{a7b2}',
+        '\u{a7f6}'), ('\u{a82c}', '\u{a82f}'), ('\u{a83a}', '\u{a83f}'), ('\u{a878}', '\u{a87f}'),
+        ('\u{a8c5}', '\u{a8cd}'), ('\u{a8da}', '\u{a8df}'), ('\u{a8fc}', '\u{a8ff}'), ('\u{a954}',
+        '\u{a95e}'), ('\u{a97d}', '\u{a97f}'), ('\u{a9ce}', '\u{a9ce}'), ('\u{a9da}', '\u{a9dd}'),
+        ('\u{a9ff}', '\u{a9ff}'), ('\u{aa37}', '\u{aa3f}'), ('\u{aa4e}', '\u{aa4f}'), ('\u{aa5a}',
+        '\u{aa5b}'), ('\u{aac3}', '\u{aada}'), ('\u{aaf7}', '\u{ab00}'), ('\u{ab07}', '\u{ab08}'),
+        ('\u{ab0f}', '\u{ab10}'), ('\u{ab17}', '\u{ab1f}'), ('\u{ab27}', '\u{ab27}'), ('\u{ab2f}',
+        '\u{ab2f}'), ('\u{ab60}', '\u{ab63}'), ('\u{ab66}', '\u{abbf}'), ('\u{abee}', '\u{abef}'),
+        ('\u{abfa}', '\u{abff}'), ('\u{ac01}', '\u{d7a2}'), ('\u{d7a4}', '\u{d7af}'), ('\u{d7c7}',
+        '\u{d7ca}'), ('\u{d7fc}', '\u{d7ff}'), ('\u{e001}', '\u{f8fe}'), ('\u{fa6e}', '\u{fa6f}'),
+        ('\u{fada}', '\u{faff}'), ('\u{fb07}', '\u{fb12}'), ('\u{fb18}', '\u{fb1c}'), ('\u{fb37}',
+        '\u{fb37}'), ('\u{fb3d}', '\u{fb3d}'), ('\u{fb3f}', '\u{fb3f}'), ('\u{fb42}', '\u{fb42}'),
+        ('\u{fb45}', '\u{fb45}'), ('\u{fbc2}', '\u{fbd2}'), ('\u{fd40}', '\u{fd4f}'), ('\u{fd90}',
+        '\u{fd91}'), ('\u{fdc8}', '\u{fdef}'), ('\u{fdfe}', '\u{fdff}'), ('\u{fe1a}', '\u{fe1f}'),
+        ('\u{fe2e}', '\u{fe2f}'), ('\u{fe53}', '\u{fe53}'), ('\u{fe67}', '\u{fe67}'), ('\u{fe6c}',
+        '\u{fe6f}'), ('\u{fe75}', '\u{fe75}'), ('\u{fefd}', '\u{fefe}'), ('\u{ff00}', '\u{ff00}'),
+        ('\u{ffbf}', '\u{ffc1}'), ('\u{ffc8}', '\u{ffc9}'), ('\u{ffd0}', '\u{ffd1}'), ('\u{ffd8}',
+        '\u{ffd9}'), ('\u{ffdd}', '\u{ffdf}'), ('\u{ffe7}', '\u{ffe7}'), ('\u{ffef}', '\u{fff8}'),
+        ('\u{fffe}', '\u{ffff}'), ('\u{1000c}', '\u{1000c}'), ('\u{10027}', '\u{10027}'),
+        ('\u{1003b}', '\u{1003b}'), ('\u{1003e}', '\u{1003e}'), ('\u{1004e}', '\u{1004f}'),
+        ('\u{1005e}', '\u{1007f}'), ('\u{100fb}', '\u{100ff}'), ('\u{10103}', '\u{10106}'),
+        ('\u{10134}', '\u{10136}'), ('\u{1018d}', '\u{1018f}'), ('\u{1019c}', '\u{1019f}'),
+        ('\u{101a1}', '\u{101cf}'), ('\u{101fe}', '\u{1027f}'), ('\u{1029d}', '\u{1029f}'),
+        ('\u{102d1}', '\u{102df}'), ('\u{102fc}', '\u{102ff}'), ('\u{10324}', '\u{1032f}'),
+        ('\u{1034b}', '\u{1034f}'), ('\u{1037b}', '\u{1037f}'), ('\u{1039e}', '\u{1039e}'),
+        ('\u{103c4}', '\u{103c7}'), ('\u{103d6}', '\u{103ff}'), ('\u{1049e}', '\u{1049f}'),
+        ('\u{104aa}', '\u{104ff}'), ('\u{10528}', '\u{1052f}'), ('\u{10564}', '\u{1056e}'),
+        ('\u{10570}', '\u{105ff}'), ('\u{10737}', '\u{1073f}'), ('\u{10756}', '\u{1075f}'),
+        ('\u{10768}', '\u{107ff}'), ('\u{10806}', '\u{10807}'), ('\u{10809}', '\u{10809}'),
+        ('\u{10836}', '\u{10836}'), ('\u{10839}', '\u{1083b}'), ('\u{1083d}', '\u{1083e}'),
+        ('\u{10856}', '\u{10856}'), ('\u{1089f}', '\u{108a6}'), ('\u{108b0}', '\u{108ff}'),
+        ('\u{1091c}', '\u{1091e}'), ('\u{1093a}', '\u{1093e}'), ('\u{10940}', '\u{1097f}'),
+        ('\u{109b8}', '\u{109bd}'), ('\u{109c0}', '\u{109ff}'), ('\u{10a04}', '\u{10a04}'),
+        ('\u{10a07}', '\u{10a0b}'), ('\u{10a14}', '\u{10a14}'), ('\u{10a18}', '\u{10a18}'),
+        ('\u{10a34}', '\u{10a37}'), ('\u{10a3b}', '\u{10a3e}'), ('\u{10a48}', '\u{10a4f}'),
+        ('\u{10a59}', '\u{10a5f}'), ('\u{10aa0}', '\u{10abf}'), ('\u{10ae7}', '\u{10aea}'),
+        ('\u{10af7}', '\u{10aff}'), ('\u{10b36}', '\u{10b38}'), ('\u{10b56}', '\u{10b57}'),
+        ('\u{10b73}', '\u{10b77}'), ('\u{10b92}', '\u{10b98}'), ('\u{10b9d}', '\u{10ba8}'),
+        ('\u{10bb0}', '\u{10bff}'), ('\u{10c49}', '\u{10e5f}'), ('\u{10e7f}', '\u{10fff}'),
+        ('\u{1104e}', '\u{11051}'), ('\u{11070}', '\u{1107e}'), ('\u{110c2}', '\u{110cf}'),
+        ('\u{110e9}', '\u{110ef}'), ('\u{110fa}', '\u{110ff}'), ('\u{11135}', '\u{11135}'),
+        ('\u{11144}', '\u{1114f}'), ('\u{11177}', '\u{1117f}'), ('\u{111c9}', '\u{111cc}'),
+        ('\u{111ce}', '\u{111cf}'), ('\u{111db}', '\u{111e0}'), ('\u{111f5}', '\u{111ff}'),
+        ('\u{11212}', '\u{11212}'), ('\u{1123e}', '\u{112af}'), ('\u{112eb}', '\u{112ef}'),
+        ('\u{112fa}', '\u{11300}'), ('\u{11304}', '\u{11304}'), ('\u{1130d}', '\u{1130e}'),
+        ('\u{11311}', '\u{11312}'), ('\u{11329}', '\u{11329}'), ('\u{11331}', '\u{11331}'),
+        ('\u{11334}', '\u{11334}'), ('\u{1133a}', '\u{1133b}'), ('\u{11345}', '\u{11346}'),
+        ('\u{11349}', '\u{1134a}'), ('\u{1134e}', '\u{11356}'), ('\u{11358}', '\u{1135c}'),
+        ('\u{11364}', '\u{11365}'), ('\u{1136d}', '\u{1136f}'), ('\u{11375}', '\u{1147f}'),
+        ('\u{114c8}', '\u{114cf}'), ('\u{114da}', '\u{1157f}'), ('\u{115b6}', '\u{115b7}'),
+        ('\u{115ca}', '\u{115ff}'), ('\u{11645}', '\u{1164f}'), ('\u{1165a}', '\u{1167f}'),
+        ('\u{116b8}', '\u{116bf}'), ('\u{116ca}', '\u{1189f}'), ('\u{118f3}', '\u{118fe}'),
+        ('\u{11900}', '\u{11abf}'), ('\u{11af9}', '\u{11fff}'), ('\u{12399}', '\u{123ff}'),
+        ('\u{1246f}', '\u{1246f}'), ('\u{12475}', '\u{12fff}'), ('\u{1342f}', '\u{167ff}'),
+        ('\u{16a39}', '\u{16a3f}'), ('\u{16a5f}', '\u{16a5f}'), ('\u{16a6a}', '\u{16a6d}'),
+        ('\u{16a70}', '\u{16acf}'), ('\u{16aee}', '\u{16aef}'), ('\u{16af6}', '\u{16aff}'),
+        ('\u{16b46}', '\u{16b4f}'), ('\u{16b5a}', '\u{16b5a}'), ('\u{16b62}', '\u{16b62}'),
+        ('\u{16b78}', '\u{16b7c}'), ('\u{16b90}', '\u{16eff}'), ('\u{16f45}', '\u{16f4f}'),
+        ('\u{16f7f}', '\u{16f8e}'), ('\u{16fa0}', '\u{1afff}'), ('\u{1b002}', '\u{1bbff}'),
+        ('\u{1bc6b}', '\u{1bc6f}'), ('\u{1bc7d}', '\u{1bc7f}'), ('\u{1bc89}', '\u{1bc8f}'),
+        ('\u{1bc9a}', '\u{1bc9b}'), ('\u{1bca4}', '\u{1cfff}'), ('\u{1d0f6}', '\u{1d0ff}'),
+        ('\u{1d127}', '\u{1d128}'), ('\u{1d1de}', '\u{1d1ff}'), ('\u{1d246}', '\u{1d2ff}'),
+        ('\u{1d357}', '\u{1d35f}'), ('\u{1d372}', '\u{1d3ff}'), ('\u{1d455}', '\u{1d455}'),
+        ('\u{1d49d}', '\u{1d49d}'), ('\u{1d4a0}', '\u{1d4a1}'), ('\u{1d4a3}', '\u{1d4a4}'),
+        ('\u{1d4a7}', '\u{1d4a8}'), ('\u{1d4ad}', '\u{1d4ad}'), ('\u{1d4ba}', '\u{1d4ba}'),
+        ('\u{1d4bc}', '\u{1d4bc}'), ('\u{1d4c4}', '\u{1d4c4}'), ('\u{1d506}', '\u{1d506}'),
+        ('\u{1d50b}', '\u{1d50c}'), ('\u{1d515}', '\u{1d515}'), ('\u{1d51d}', '\u{1d51d}'),
+        ('\u{1d53a}', '\u{1d53a}'), ('\u{1d53f}', '\u{1d53f}'), ('\u{1d545}', '\u{1d545}'),
+        ('\u{1d547}', '\u{1d549}'), ('\u{1d551}', '\u{1d551}'), ('\u{1d6a6}', '\u{1d6a7}'),
+        ('\u{1d7cc}', '\u{1d7cd}'), ('\u{1d800}', '\u{1e7ff}'), ('\u{1e8c5}', '\u{1e8c6}'),
+        ('\u{1e8d7}', '\u{1edff}'), ('\u{1ee04}', '\u{1ee04}'), ('\u{1ee20}', '\u{1ee20}'),
+        ('\u{1ee23}', '\u{1ee23}'), ('\u{1ee25}', '\u{1ee26}'), ('\u{1ee28}', '\u{1ee28}'),
+        ('\u{1ee33}', '\u{1ee33}'), ('\u{1ee38}', '\u{1ee38}'), ('\u{1ee3a}', '\u{1ee3a}'),
+        ('\u{1ee3c}', '\u{1ee41}'), ('\u{1ee43}', '\u{1ee46}'), ('\u{1ee48}', '\u{1ee48}'),
+        ('\u{1ee4a}', '\u{1ee4a}'), ('\u{1ee4c}', '\u{1ee4c}'), ('\u{1ee50}', '\u{1ee50}'),
+        ('\u{1ee53}', '\u{1ee53}'), ('\u{1ee55}', '\u{1ee56}'), ('\u{1ee58}', '\u{1ee58}'),
+        ('\u{1ee5a}', '\u{1ee5a}'), ('\u{1ee5c}', '\u{1ee5c}'), ('\u{1ee5e}', '\u{1ee5e}'),
+        ('\u{1ee60}', '\u{1ee60}'), ('\u{1ee63}', '\u{1ee63}'), ('\u{1ee65}', '\u{1ee66}'),
+        ('\u{1ee6b}', '\u{1ee6b}'), ('\u{1ee73}', '\u{1ee73}'), ('\u{1ee78}', '\u{1ee78}'),
+        ('\u{1ee7d}', '\u{1ee7d}'), ('\u{1ee7f}', '\u{1ee7f}'), ('\u{1ee8a}', '\u{1ee8a}'),
+        ('\u{1ee9c}', '\u{1eea0}'), ('\u{1eea4}', '\u{1eea4}'), ('\u{1eeaa}', '\u{1eeaa}'),
+        ('\u{1eebc}', '\u{1eeef}'), ('\u{1eef2}', '\u{1efff}'), ('\u{1f02c}', '\u{1f02f}'),
+        ('\u{1f094}', '\u{1f09f}'), ('\u{1f0af}', '\u{1f0b0}'), ('\u{1f0c0}', '\u{1f0c0}'),
+        ('\u{1f0d0}', '\u{1f0d0}'), ('\u{1f0f6}', '\u{1f0ff}'), ('\u{1f10d}', '\u{1f10f}'),
+        ('\u{1f12f}', '\u{1f12f}'), ('\u{1f16c}', '\u{1f16f}'), ('\u{1f19b}', '\u{1f1e5}'),
+        ('\u{1f203}', '\u{1f20f}'), ('\u{1f23b}', '\u{1f23f}'), ('\u{1f249}', '\u{1f24f}'),
+        ('\u{1f252}', '\u{1f2ff}'), ('\u{1f32d}', '\u{1f32f}'), ('\u{1f37e}', '\u{1f37f}'),
+        ('\u{1f3cf}', '\u{1f3d3}'), ('\u{1f3f8}', '\u{1f3ff}'), ('\u{1f4ff}', '\u{1f4ff}'),
+        ('\u{1f54b}', '\u{1f54f}'), ('\u{1f57a}', '\u{1f57a}'), ('\u{1f5a4}', '\u{1f5a4}'),
+        ('\u{1f643}', '\u{1f644}'), ('\u{1f6d0}', '\u{1f6df}'), ('\u{1f6ed}', '\u{1f6ef}'),
+        ('\u{1f6f4}', '\u{1f6ff}'), ('\u{1f774}', '\u{1f77f}'), ('\u{1f7d5}', '\u{1f7ff}'),
+        ('\u{1f80c}', '\u{1f80f}'), ('\u{1f848}', '\u{1f84f}'), ('\u{1f85a}', '\u{1f85f}'),
+        ('\u{1f888}', '\u{1f88f}'), ('\u{1f8ae}', '\u{1ffff}'), ('\u{20001}', '\u{2a6d5}'),
+        ('\u{2a6d7}', '\u{2a6ff}'), ('\u{2a701}', '\u{2b733}'), ('\u{2b735}', '\u{2b73f}'),
+        ('\u{2b741}', '\u{2b81c}'), ('\u{2b81e}', '\u{2f7ff}'), ('\u{2fa1e}', '\u{e0000}'),
+        ('\u{e0002}', '\u{e001f}'), ('\u{e0080}', '\u{e00ff}'), ('\u{e01f0}', '\u{effff}'),
+        ('\u{f0001}', '\u{ffffc}'), ('\u{ffffe}', '\u{fffff}'), ('\u{100001}', '\u{10fffc}'),
+        ('\u{10fffe}', '\u{10ffff}')
     ];
 
     pub static Co_table: &'static [(char, char)] = &[
-        ('\ue000', '\ue000'), ('\uf8ff', '\uf8ff'), ('\U000f0000', '\U000f0000'), ('\U000ffffd',
-        '\U000ffffd'), ('\U00100000', '\U00100000'), ('\U0010fffd', '\U0010fffd')
+        ('\u{e000}', '\u{e000}'), ('\u{f8ff}', '\u{f8ff}'), ('\u{f0000}', '\u{f0000}'),
+        ('\u{ffffd}', '\u{ffffd}'), ('\u{100000}', '\u{100000}'), ('\u{10fffd}', '\u{10fffd}')
     ];
 
     pub static L_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\x61', '\x7a'), ('\u00aa', '\u00aa'), ('\u00b5', '\u00b5'), ('\u00ba',
-        '\u00ba'), ('\u00c0', '\u00d6'), ('\u00d8', '\u00f6'), ('\u00f8', '\u02c1'), ('\u02c6',
-        '\u02d1'), ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), ('\u0370',
-        '\u0374'), ('\u0376', '\u0377'), ('\u037a', '\u037d'), ('\u037f', '\u037f'), ('\u0386',
-        '\u0386'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e', '\u03a1'), ('\u03a3',
-        '\u03f5'), ('\u03f7', '\u0481'), ('\u048a', '\u052f'), ('\u0531', '\u0556'), ('\u0559',
-        '\u0559'), ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0620',
-        '\u064a'), ('\u066e', '\u066f'), ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), ('\u06e5',
-        '\u06e6'), ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), ('\u0710',
-        '\u0710'), ('\u0712', '\u072f'), ('\u074d', '\u07a5'), ('\u07b1', '\u07b1'), ('\u07ca',
-        '\u07ea'), ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), ('\u081a',
-        '\u081a'), ('\u0824', '\u0824'), ('\u0828', '\u0828'), ('\u0840', '\u0858'), ('\u08a0',
-        '\u08b2'), ('\u0904', '\u0939'), ('\u093d', '\u093d'), ('\u0950', '\u0950'), ('\u0958',
-        '\u0961'), ('\u0971', '\u0980'), ('\u0985', '\u098c'), ('\u098f', '\u0990'), ('\u0993',
-        '\u09a8'), ('\u09aa', '\u09b0'), ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bd',
-        '\u09bd'), ('\u09ce', '\u09ce'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), ('\u09f0',
-        '\u09f1'), ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), ('\u0a2a',
-        '\u0a30'), ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), ('\u0a59',
-        '\u0a5c'), ('\u0a5e', '\u0a5e'), ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), ('\u0a8f',
-        '\u0a91'), ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5',
-        '\u0ab9'), ('\u0abd', '\u0abd'), ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), ('\u0b05',
-        '\u0b0c'), ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32',
-        '\u0b33'), ('\u0b35', '\u0b39'), ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), ('\u0b5f',
-        '\u0b61'), ('\u0b71', '\u0b71'), ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e',
-        '\u0b90'), ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e',
-        '\u0b9f'), ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bd0',
-        '\u0bd0'), ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), ('\u0c2a',
-        '\u0c39'), ('\u0c3d', '\u0c3d'), ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), ('\u0c85',
-        '\u0c8c'), ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), ('\u0cb5',
-        '\u0cb9'), ('\u0cbd', '\u0cbd'), ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), ('\u0cf1',
-        '\u0cf2'), ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d',
-        '\u0d3d'), ('\u0d4e', '\u0d4e'), ('\u0d60', '\u0d61'), ('\u0d7a', '\u0d7f'), ('\u0d85',
-        '\u0d96'), ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0',
-        '\u0dc6'), ('\u0e01', '\u0e30'), ('\u0e32', '\u0e33'), ('\u0e40', '\u0e46'), ('\u0e81',
-        '\u0e82'), ('\u0e84', '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), ('\u0e8d',
-        '\u0e8d'), ('\u0e94', '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), ('\u0ea5',
-        '\u0ea5'), ('\u0ea7', '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), ('\u0eb2',
-        '\u0eb3'), ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0edc',
-        '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f88',
-        '\u0f8c'), ('\u1000', '\u102a'), ('\u103f', '\u103f'), ('\u1050', '\u1055'), ('\u105a',
-        '\u105d'), ('\u1061', '\u1061'), ('\u1065', '\u1066'), ('\u106e', '\u1070'), ('\u1075',
-        '\u1081'), ('\u108e', '\u108e'), ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd',
-        '\u10cd'), ('\u10d0', '\u10fa'), ('\u10fc', '\u1248'), ('\u124a', '\u124d'), ('\u1250',
-        '\u1256'), ('\u1258', '\u1258'), ('\u125a', '\u125d'), ('\u1260', '\u1288'), ('\u128a',
-        '\u128d'), ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0',
-        '\u12c0'), ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), ('\u1312',
-        '\u1315'), ('\u1318', '\u135a'), ('\u1380', '\u138f'), ('\u13a0', '\u13f4'), ('\u1401',
-        '\u166c'), ('\u166f', '\u167f'), ('\u1681', '\u169a'), ('\u16a0', '\u16ea'), ('\u16f1',
-        '\u16f8'), ('\u1700', '\u170c'), ('\u170e', '\u1711'), ('\u1720', '\u1731'), ('\u1740',
-        '\u1751'), ('\u1760', '\u176c'), ('\u176e', '\u1770'), ('\u1780', '\u17b3'), ('\u17d7',
-        '\u17d7'), ('\u17dc', '\u17dc'), ('\u1820', '\u1877'), ('\u1880', '\u18a8'), ('\u18aa',
-        '\u18aa'), ('\u18b0', '\u18f5'), ('\u1900', '\u191e'), ('\u1950', '\u196d'), ('\u1970',
-        '\u1974'), ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), ('\u1a00', '\u1a16'), ('\u1a20',
-        '\u1a54'), ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), ('\u1b45', '\u1b4b'), ('\u1b83',
-        '\u1ba0'), ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), ('\u1c00', '\u1c23'), ('\u1c4d',
-        '\u1c4f'), ('\u1c5a', '\u1c7d'), ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), ('\u1cf5',
-        '\u1cf6'), ('\u1d00', '\u1dbf'), ('\u1e00', '\u1f15'), ('\u1f18', '\u1f1d'), ('\u1f20',
-        '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), ('\u1f59', '\u1f59'), ('\u1f5b',
-        '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), ('\u1f80', '\u1fb4'), ('\u1fb6',
-        '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), ('\u1fd0',
-        '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), ('\u1ff2', '\u1ff4'), ('\u1ff6',
-        '\u1ffc'), ('\u2071', '\u2071'), ('\u207f', '\u207f'), ('\u2090', '\u209c'), ('\u2102',
-        '\u2102'), ('\u2107', '\u2107'), ('\u210a', '\u2113'), ('\u2115', '\u2115'), ('\u2119',
-        '\u211d'), ('\u2124', '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a',
-        '\u212d'), ('\u212f', '\u2139'), ('\u213c', '\u213f'), ('\u2145', '\u2149'), ('\u214e',
-        '\u214e'), ('\u2183', '\u2184'), ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60',
-        '\u2ce4'), ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27',
-        '\u2d27'), ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), ('\u2d80',
-        '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), ('\u2db8',
-        '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), ('\u2dd8',
-        '\u2dde'), ('\u2e2f', '\u2e2f'), ('\u3005', '\u3006'), ('\u3031', '\u3035'), ('\u303b',
-        '\u303c'), ('\u3041', '\u3096'), ('\u309d', '\u309f'), ('\u30a1', '\u30fa'), ('\u30fc',
-        '\u30ff'), ('\u3105', '\u312d'), ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0',
-        '\u31ff'), ('\u3400', '\u3400'), ('\u4db5', '\u4db5'), ('\u4e00', '\u4e00'), ('\u9fcc',
-        '\u9fcc'), ('\ua000', '\ua48c'), ('\ua4d0', '\ua4fd'), ('\ua500', '\ua60c'), ('\ua610',
-        '\ua61f'), ('\ua62a', '\ua62b'), ('\ua640', '\ua66e'), ('\ua67f', '\ua69d'), ('\ua6a0',
-        '\ua6e5'), ('\ua717', '\ua71f'), ('\ua722', '\ua788'), ('\ua78b', '\ua78e'), ('\ua790',
-        '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7f7', '\ua801'), ('\ua803', '\ua805'), ('\ua807',
-        '\ua80a'), ('\ua80c', '\ua822'), ('\ua840', '\ua873'), ('\ua882', '\ua8b3'), ('\ua8f2',
-        '\ua8f7'), ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), ('\ua930', '\ua946'), ('\ua960',
-        '\ua97c'), ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), ('\ua9e0', '\ua9e4'), ('\ua9e6',
-        '\ua9ef'), ('\ua9fa', '\ua9fe'), ('\uaa00', '\uaa28'), ('\uaa40', '\uaa42'), ('\uaa44',
-        '\uaa4b'), ('\uaa60', '\uaa76'), ('\uaa7a', '\uaa7a'), ('\uaa7e', '\uaaaf'), ('\uaab1',
-        '\uaab1'), ('\uaab5', '\uaab6'), ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), ('\uaac2',
-        '\uaac2'), ('\uaadb', '\uaadd'), ('\uaae0', '\uaaea'), ('\uaaf2', '\uaaf4'), ('\uab01',
-        '\uab06'), ('\uab09', '\uab0e'), ('\uab11', '\uab16'), ('\uab20', '\uab26'), ('\uab28',
-        '\uab2e'), ('\uab30', '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64', '\uab65'), ('\uabc0',
-        '\uabe2'), ('\uac00', '\uac00'), ('\ud7a3', '\ud7a3'), ('\ud7b0', '\ud7c6'), ('\ud7cb',
-        '\ud7fb'), ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), ('\ufb13',
-        '\ufb17'), ('\ufb1d', '\ufb1d'), ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), ('\ufb38',
-        '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), ('\ufb46',
-        '\ufbb1'), ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), ('\ufdf0',
-        '\ufdfb'), ('\ufe70', '\ufe74'), ('\ufe76', '\ufefc'), ('\uff21', '\uff3a'), ('\uff41',
-        '\uff5a'), ('\uff66', '\uffbe'), ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), ('\uffd2',
-        '\uffd7'), ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'),
-        ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'),
-        ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), ('\U00010280', '\U0001029c'),
-        ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031f'), ('\U00010330', '\U00010340'),
-        ('\U00010342', '\U00010349'), ('\U00010350', '\U00010375'), ('\U00010380', '\U0001039d'),
-        ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), ('\U00010400', '\U0001049d'),
-        ('\U00010500', '\U00010527'), ('\U00010530', '\U00010563'), ('\U00010600', '\U00010736'),
-        ('\U00010740', '\U00010755'), ('\U00010760', '\U00010767'), ('\U00010800', '\U00010805'),
-        ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'),
-        ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), ('\U00010860', '\U00010876'),
-        ('\U00010880', '\U0001089e'), ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'),
-        ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'),
-        ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'),
-        ('\U00010a60', '\U00010a7c'), ('\U00010a80', '\U00010a9c'), ('\U00010ac0', '\U00010ac7'),
-        ('\U00010ac9', '\U00010ae4'), ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'),
-        ('\U00010b60', '\U00010b72'), ('\U00010b80', '\U00010b91'), ('\U00010c00', '\U00010c48'),
-        ('\U00011003', '\U00011037'), ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'),
-        ('\U00011103', '\U00011126'), ('\U00011150', '\U00011172'), ('\U00011176', '\U00011176'),
-        ('\U00011183', '\U000111b2'), ('\U000111c1', '\U000111c4'), ('\U000111da', '\U000111da'),
-        ('\U00011200', '\U00011211'), ('\U00011213', '\U0001122b'), ('\U000112b0', '\U000112de'),
-        ('\U00011305', '\U0001130c'), ('\U0001130f', '\U00011310'), ('\U00011313', '\U00011328'),
-        ('\U0001132a', '\U00011330'), ('\U00011332', '\U00011333'), ('\U00011335', '\U00011339'),
-        ('\U0001133d', '\U0001133d'), ('\U0001135d', '\U00011361'), ('\U00011480', '\U000114af'),
-        ('\U000114c4', '\U000114c5'), ('\U000114c7', '\U000114c7'), ('\U00011580', '\U000115ae'),
-        ('\U00011600', '\U0001162f'), ('\U00011644', '\U00011644'), ('\U00011680', '\U000116aa'),
-        ('\U000118a0', '\U000118df'), ('\U000118ff', '\U000118ff'), ('\U00011ac0', '\U00011af8'),
-        ('\U00012000', '\U00012398'), ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'),
-        ('\U00016a40', '\U00016a5e'), ('\U00016ad0', '\U00016aed'), ('\U00016b00', '\U00016b2f'),
-        ('\U00016b40', '\U00016b43'), ('\U00016b63', '\U00016b77'), ('\U00016b7d', '\U00016b8f'),
-        ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), ('\U00016f93', '\U00016f9f'),
-        ('\U0001b000', '\U0001b001'), ('\U0001bc00', '\U0001bc6a'), ('\U0001bc70', '\U0001bc7c'),
-        ('\U0001bc80', '\U0001bc88'), ('\U0001bc90', '\U0001bc99'), ('\U0001d400', '\U0001d454'),
-        ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'),
-        ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'),
-        ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'),
-        ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'),
-        ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'),
-        ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'),
-        ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'),
-        ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'),
-        ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'),
-        ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), ('\U0001e800', '\U0001e8c4'),
-        ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'),
-        ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'),
-        ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'),
-        ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'),
-        ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'),
-        ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'),
-        ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'),
-        ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'),
-        ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'),
-        ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'),
-        ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'),
-        ('\U00020000', '\U00020000'), ('\U0002a6d6', '\U0002a6d6'), ('\U0002a700', '\U0002a700'),
-        ('\U0002b734', '\U0002b734'), ('\U0002b740', '\U0002b740'), ('\U0002b81d', '\U0002b81d'),
-        ('\U0002f800', '\U0002fa1d')
+        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}',
+        '\u{2ee}'), ('\u{370}', '\u{374}'), ('\u{376}', '\u{377}'), ('\u{37a}', '\u{37d}'),
+        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}',
+        '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'),
+        ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'), ('\u{561}',
+        '\u{587}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'), ('\u{620}', '\u{64a}'),
+        ('\u{66e}', '\u{66f}'), ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6e5}',
+        '\u{6e6}'), ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'),
+        ('\u{710}', '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'), ('\u{7b1}',
+        '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'),
+        ('\u{800}', '\u{815}'), ('\u{81a}', '\u{81a}'), ('\u{824}', '\u{824}'), ('\u{828}',
+        '\u{828}'), ('\u{840}', '\u{858}'), ('\u{8a0}', '\u{8b2}'), ('\u{904}', '\u{939}'),
+        ('\u{93d}', '\u{93d}'), ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'), ('\u{971}',
+        '\u{980}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'),
+        ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'), ('\u{9bd}',
+        '\u{9bd}'), ('\u{9ce}', '\u{9ce}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'),
+        ('\u{9f0}', '\u{9f1}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'), ('\u{a13}',
+        '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a72}',
+        '\u{a74}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'), ('\u{abd}',
+        '\u{abd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae1}'), ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}',
+        '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'), ('\u{b5c}', '\u{b5d}'),
+        ('\u{b5f}', '\u{b61}'), ('\u{b71}', '\u{b71}'), ('\u{b83}', '\u{b83}'), ('\u{b85}',
+        '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}',
+        '\u{baa}'), ('\u{bae}', '\u{bb9}'), ('\u{bd0}', '\u{bd0}'), ('\u{c05}', '\u{c0c}'),
+        ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}',
+        '\u{c3d}'), ('\u{c58}', '\u{c59}'), ('\u{c60}', '\u{c61}'), ('\u{c85}', '\u{c8c}'),
+        ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}',
+        '\u{cb9}'), ('\u{cbd}', '\u{cbd}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'),
+        ('\u{cf1}', '\u{cf2}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}',
+        '\u{d3a}'), ('\u{d3d}', '\u{d3d}'), ('\u{d4e}', '\u{d4e}'), ('\u{d60}', '\u{d61}'),
+        ('\u{d7a}', '\u{d7f}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}',
+        '\u{dbb}'), ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{e01}', '\u{e30}'),
+        ('\u{e32}', '\u{e33}'), ('\u{e40}', '\u{e46}'), ('\u{e81}', '\u{e82}'), ('\u{e84}',
+        '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'),
+        ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}',
+        '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb0}'),
+        ('\u{eb2}', '\u{eb3}'), ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}',
+        '\u{ec6}'), ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f40}', '\u{f47}'),
+        ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'), ('\u{1000}', '\u{102a}'), ('\u{103f}',
+        '\u{103f}'), ('\u{1050}', '\u{1055}'), ('\u{105a}', '\u{105d}'), ('\u{1061}', '\u{1061}'),
+        ('\u{1065}', '\u{1066}'), ('\u{106e}', '\u{1070}'), ('\u{1075}', '\u{1081}'), ('\u{108e}',
+        '\u{108e}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'),
+        ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}',
+        '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}', '\u{1288}'),
+        ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}',
+        '\u{12be}'), ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'),
+        ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'), ('\u{1318}', '\u{135a}'), ('\u{1380}',
+        '\u{138f}'), ('\u{13a0}', '\u{13f4}'), ('\u{1401}', '\u{166c}'), ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'), ('\u{16a0}', '\u{16ea}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}',
+        '\u{170c}'), ('\u{170e}', '\u{1711}'), ('\u{1720}', '\u{1731}'), ('\u{1740}', '\u{1751}'),
+        ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1780}', '\u{17b3}'), ('\u{17d7}',
+        '\u{17d7}'), ('\u{17dc}', '\u{17dc}'), ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18a8}'),
+        ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), ('\u{1900}', '\u{191e}'), ('\u{1950}',
+        '\u{196d}'), ('\u{1970}', '\u{1974}'), ('\u{1980}', '\u{19ab}'), ('\u{19c1}', '\u{19c7}'),
+        ('\u{1a00}', '\u{1a16}'), ('\u{1a20}', '\u{1a54}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1b05}',
+        '\u{1b33}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b83}', '\u{1ba0}'), ('\u{1bae}', '\u{1baf}'),
+        ('\u{1bba}', '\u{1be5}'), ('\u{1c00}', '\u{1c23}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}',
+        '\u{1c7d}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf5}', '\u{1cf6}'),
+        ('\u{1d00}', '\u{1dbf}'), ('\u{1e00}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}',
+        '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}',
+        '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fe0}',
+        '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'), ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{2102}', '\u{2102}'), ('\u{2107}',
+        '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2119}', '\u{211d}'),
+        ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}',
+        '\u{212d}'), ('\u{212f}', '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}', '\u{2149}'),
+        ('\u{214e}', '\u{214e}'), ('\u{2183}', '\u{2184}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}',
+        '\u{2c5e}'), ('\u{2c60}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}',
+        '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'),
+        ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}',
+        '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'),
+        ('\u{2e2f}', '\u{2e2f}'), ('\u{3005}', '\u{3006}'), ('\u{3031}', '\u{3035}'), ('\u{303b}',
+        '\u{303c}'), ('\u{3041}', '\u{3096}'), ('\u{309d}', '\u{309f}'), ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'), ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}',
+        '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{3400}'), ('\u{4db5}', '\u{4db5}'),
+        ('\u{4e00}', '\u{4e00}'), ('\u{9fcc}', '\u{9fcc}'), ('\u{a000}', '\u{a48c}'), ('\u{a4d0}',
+        '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'), ('\u{a62a}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66e}'), ('\u{a67f}', '\u{a69d}'), ('\u{a6a0}', '\u{a6e5}'), ('\u{a717}',
+        '\u{a71f}'), ('\u{a722}', '\u{a788}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'),
+        ('\u{a7b0}', '\u{a7b1}'), ('\u{a7f7}', '\u{a801}'), ('\u{a803}', '\u{a805}'), ('\u{a807}',
+        '\u{a80a}'), ('\u{a80c}', '\u{a822}'), ('\u{a840}', '\u{a873}'), ('\u{a882}', '\u{a8b3}'),
+        ('\u{a8f2}', '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a90a}', '\u{a925}'), ('\u{a930}',
+        '\u{a946}'), ('\u{a960}', '\u{a97c}'), ('\u{a984}', '\u{a9b2}'), ('\u{a9cf}', '\u{a9cf}'),
+        ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e6}', '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}',
+        '\u{aa28}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa60}', '\u{aa76}'),
+        ('\u{aa7a}', '\u{aa7a}'), ('\u{aa7e}', '\u{aaaf}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab5}',
+        '\u{aab6}'), ('\u{aab9}', '\u{aabd}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadd}'), ('\u{aae0}', '\u{aaea}'), ('\u{aaf2}', '\u{aaf4}'), ('\u{ab01}',
+        '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}',
+        '\u{ab65}'), ('\u{abc0}', '\u{abe2}'), ('\u{ac00}', '\u{ac00}'), ('\u{d7a3}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}',
+        '\u{fad9}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'),
+        ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}',
+        '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'), ('\u{fb46}', '\u{fbb1}'),
+        ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}',
+        '\u{fdfb}'), ('\u{fe70}', '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}',
+        '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}', '\u{100fa}'),
+        ('\u{10280}', '\u{1029c}'), ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'),
+        ('\u{10330}', '\u{10340}'), ('\u{10342}', '\u{10349}'), ('\u{10350}', '\u{10375}'),
+        ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'),
+        ('\u{10400}', '\u{1049d}'), ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a00}'), ('\u{10a10}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'),
+        ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'), ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'), ('\u{11003}', '\u{11037}'), ('\u{11083}', '\u{110af}'),
+        ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'), ('\u{11150}', '\u{11172}'),
+        ('\u{11176}', '\u{11176}'), ('\u{11183}', '\u{111b2}'), ('\u{111c1}', '\u{111c4}'),
+        ('\u{111da}', '\u{111da}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'),
+        ('\u{112b0}', '\u{112de}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'), ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'), ('\u{1133d}', '\u{1133d}'), ('\u{1135d}', '\u{11361}'),
+        ('\u{11480}', '\u{114af}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}', '\u{114c7}'),
+        ('\u{11580}', '\u{115ae}'), ('\u{11600}', '\u{1162f}'), ('\u{11644}', '\u{11644}'),
+        ('\u{11680}', '\u{116aa}'), ('\u{118a0}', '\u{118df}'), ('\u{118ff}', '\u{118ff}'),
+        ('\u{11ac0}', '\u{11af8}'), ('\u{12000}', '\u{12398}'), ('\u{13000}', '\u{1342e}'),
+        ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16b00}', '\u{16b2f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f50}'),
+        ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1d400}', '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'),
+        ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'),
+        ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'),
+        ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'),
+        ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'),
+        ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'),
+        ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'),
+        ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'),
+        ('\u{1e800}', '\u{1e8c4}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{20000}'), ('\u{2a6d6}', '\u{2a6d6}'),
+        ('\u{2a700}', '\u{2a700}'), ('\u{2b734}', '\u{2b734}'), ('\u{2b740}', '\u{2b740}'),
+        ('\u{2b81d}', '\u{2b81d}'), ('\u{2f800}', '\u{2fa1d}')
     ];
 
     pub static LC_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\x61', '\x7a'), ('\u00b5', '\u00b5'), ('\u00c0', '\u00d6'), ('\u00d8',
-        '\u00f6'), ('\u00f8', '\u01ba'), ('\u01bc', '\u01bf'), ('\u01c4', '\u0293'), ('\u0295',
-        '\u02af'), ('\u0370', '\u0373'), ('\u0376', '\u0377'), ('\u037b', '\u037d'), ('\u037f',
-        '\u037f'), ('\u0386', '\u0386'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e',
-        '\u03a1'), ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), ('\u048a', '\u052f'), ('\u0531',
-        '\u0556'), ('\u0561', '\u0587'), ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd',
-        '\u10cd'), ('\u1d00', '\u1d2b'), ('\u1d6b', '\u1d77'), ('\u1d79', '\u1d9a'), ('\u1e00',
-        '\u1f15'), ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50',
-        '\u1f57'), ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f',
-        '\u1f7d'), ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2',
-        '\u1fc4'), ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0',
-        '\u1fec'), ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u2102', '\u2102'), ('\u2107',
-        '\u2107'), ('\u210a', '\u2113'), ('\u2115', '\u2115'), ('\u2119', '\u211d'), ('\u2124',
-        '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a', '\u212d'), ('\u212f',
-        '\u2134'), ('\u2139', '\u2139'), ('\u213c', '\u213f'), ('\u2145', '\u2149'), ('\u214e',
-        '\u214e'), ('\u2183', '\u2184'), ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60',
-        '\u2c7b'), ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), ('\u2d00',
-        '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), ('\ua640', '\ua66d'), ('\ua680',
-        '\ua69b'), ('\ua722', '\ua76f'), ('\ua771', '\ua787'), ('\ua78b', '\ua78e'), ('\ua790',
-        '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7fa', '\ua7fa'), ('\uab30', '\uab5a'), ('\uab64',
-        '\uab65'), ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), ('\uff21', '\uff3a'), ('\uff41',
-        '\uff5a'), ('\U00010400', '\U0001044f'), ('\U000118a0', '\U000118df'), ('\U0001d400',
-        '\U0001d454'), ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2',
-        '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae',
-        '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5',
-        '\U0001d505'), ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), ('\U0001d516',
-        '\U0001d51c'), ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), ('\U0001d540',
-        '\U0001d544'), ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), ('\U0001d552',
-        '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc',
-        '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), ('\U0001d736',
-        '\U0001d74e'), ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), ('\U0001d78a',
-        '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb')
+        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{b5}', '\u{b5}'), ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'), ('\u{1bc}', '\u{1bf}'), ('\u{1c4}', '\u{293}'),
+        ('\u{295}', '\u{2af}'), ('\u{370}', '\u{373}'), ('\u{376}', '\u{377}'), ('\u{37b}',
+        '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
+        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'), ('\u{3f7}',
+        '\u{481}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{561}', '\u{587}'),
+        ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{1d00}',
+        '\u{1d2b}'), ('\u{1d6b}', '\u{1d77}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1e00}', '\u{1f15}'),
+        ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}',
+        '\u{1f57}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'),
+        ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}',
+        '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'),
+        ('\u{1fd6}', '\u{1fdb}'), ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
+        '\u{1ffc}'), ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'),
+        ('\u{2115}', '\u{2115}'), ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
+        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'), ('\u{212f}', '\u{2134}'),
+        ('\u{2139}', '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}',
+        '\u{214e}'), ('\u{2183}', '\u{2184}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'),
+        ('\u{2c60}', '\u{2c7b}'), ('\u{2c7e}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}',
+        '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{a640}', '\u{a66d}'), ('\u{a680}', '\u{a69b}'), ('\u{a722}', '\u{a76f}'), ('\u{a771}',
+        '\u{a787}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'), ('\u{a7b0}', '\u{a7b1}'),
+        ('\u{a7fa}', '\u{a7fa}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab64}', '\u{ab65}'), ('\u{fb00}',
+        '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'),
+        ('\u{10400}', '\u{1044f}'), ('\u{118a0}', '\u{118df}'), ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}')
     ];
 
     pub static Ll_table: &'static [(char, char)] = &[
-        ('\x61', '\x7a'), ('\u00b5', '\u00b5'), ('\u00df', '\u00f6'), ('\u00f8', '\u00ff'),
-        ('\u0101', '\u0101'), ('\u0103', '\u0103'), ('\u0105', '\u0105'), ('\u0107', '\u0107'),
-        ('\u0109', '\u0109'), ('\u010b', '\u010b'), ('\u010d', '\u010d'), ('\u010f', '\u010f'),
-        ('\u0111', '\u0111'), ('\u0113', '\u0113'), ('\u0115', '\u0115'), ('\u0117', '\u0117'),
-        ('\u0119', '\u0119'), ('\u011b', '\u011b'), ('\u011d', '\u011d'), ('\u011f', '\u011f'),
-        ('\u0121', '\u0121'), ('\u0123', '\u0123'), ('\u0125', '\u0125'), ('\u0127', '\u0127'),
-        ('\u0129', '\u0129'), ('\u012b', '\u012b'), ('\u012d', '\u012d'), ('\u012f', '\u012f'),
-        ('\u0131', '\u0131'), ('\u0133', '\u0133'), ('\u0135', '\u0135'), ('\u0137', '\u0138'),
-        ('\u013a', '\u013a'), ('\u013c', '\u013c'), ('\u013e', '\u013e'), ('\u0140', '\u0140'),
-        ('\u0142', '\u0142'), ('\u0144', '\u0144'), ('\u0146', '\u0146'), ('\u0148', '\u0149'),
-        ('\u014b', '\u014b'), ('\u014d', '\u014d'), ('\u014f', '\u014f'), ('\u0151', '\u0151'),
-        ('\u0153', '\u0153'), ('\u0155', '\u0155'), ('\u0157', '\u0157'), ('\u0159', '\u0159'),
-        ('\u015b', '\u015b'), ('\u015d', '\u015d'), ('\u015f', '\u015f'), ('\u0161', '\u0161'),
-        ('\u0163', '\u0163'), ('\u0165', '\u0165'), ('\u0167', '\u0167'), ('\u0169', '\u0169'),
-        ('\u016b', '\u016b'), ('\u016d', '\u016d'), ('\u016f', '\u016f'), ('\u0171', '\u0171'),
-        ('\u0173', '\u0173'), ('\u0175', '\u0175'), ('\u0177', '\u0177'), ('\u017a', '\u017a'),
-        ('\u017c', '\u017c'), ('\u017e', '\u0180'), ('\u0183', '\u0183'), ('\u0185', '\u0185'),
-        ('\u0188', '\u0188'), ('\u018c', '\u018d'), ('\u0192', '\u0192'), ('\u0195', '\u0195'),
-        ('\u0199', '\u019b'), ('\u019e', '\u019e'), ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'),
-        ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'), ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'),
-        ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'), ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'),
-        ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'), ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'),
-        ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'), ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'),
-        ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'), ('\u01da', '\u01da'), ('\u01dc', '\u01dd'),
-        ('\u01df', '\u01df'), ('\u01e1', '\u01e1'), ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'),
-        ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'), ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'),
-        ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'), ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'),
-        ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'), ('\u01ff', '\u01ff'), ('\u0201', '\u0201'),
-        ('\u0203', '\u0203'), ('\u0205', '\u0205'), ('\u0207', '\u0207'), ('\u0209', '\u0209'),
-        ('\u020b', '\u020b'), ('\u020d', '\u020d'), ('\u020f', '\u020f'), ('\u0211', '\u0211'),
-        ('\u0213', '\u0213'), ('\u0215', '\u0215'), ('\u0217', '\u0217'), ('\u0219', '\u0219'),
-        ('\u021b', '\u021b'), ('\u021d', '\u021d'), ('\u021f', '\u021f'), ('\u0221', '\u0221'),
-        ('\u0223', '\u0223'), ('\u0225', '\u0225'), ('\u0227', '\u0227'), ('\u0229', '\u0229'),
-        ('\u022b', '\u022b'), ('\u022d', '\u022d'), ('\u022f', '\u022f'), ('\u0231', '\u0231'),
-        ('\u0233', '\u0239'), ('\u023c', '\u023c'), ('\u023f', '\u0240'), ('\u0242', '\u0242'),
-        ('\u0247', '\u0247'), ('\u0249', '\u0249'), ('\u024b', '\u024b'), ('\u024d', '\u024d'),
-        ('\u024f', '\u0293'), ('\u0295', '\u02af'), ('\u0371', '\u0371'), ('\u0373', '\u0373'),
-        ('\u0377', '\u0377'), ('\u037b', '\u037d'), ('\u0390', '\u0390'), ('\u03ac', '\u03ce'),
-        ('\u03d0', '\u03d1'), ('\u03d5', '\u03d7'), ('\u03d9', '\u03d9'), ('\u03db', '\u03db'),
-        ('\u03dd', '\u03dd'), ('\u03df', '\u03df'), ('\u03e1', '\u03e1'), ('\u03e3', '\u03e3'),
-        ('\u03e5', '\u03e5'), ('\u03e7', '\u03e7'), ('\u03e9', '\u03e9'), ('\u03eb', '\u03eb'),
-        ('\u03ed', '\u03ed'), ('\u03ef', '\u03f3'), ('\u03f5', '\u03f5'), ('\u03f8', '\u03f8'),
-        ('\u03fb', '\u03fc'), ('\u0430', '\u045f'), ('\u0461', '\u0461'), ('\u0463', '\u0463'),
-        ('\u0465', '\u0465'), ('\u0467', '\u0467'), ('\u0469', '\u0469'), ('\u046b', '\u046b'),
-        ('\u046d', '\u046d'), ('\u046f', '\u046f'), ('\u0471', '\u0471'), ('\u0473', '\u0473'),
-        ('\u0475', '\u0475'), ('\u0477', '\u0477'), ('\u0479', '\u0479'), ('\u047b', '\u047b'),
-        ('\u047d', '\u047d'), ('\u047f', '\u047f'), ('\u0481', '\u0481'), ('\u048b', '\u048b'),
-        ('\u048d', '\u048d'), ('\u048f', '\u048f'), ('\u0491', '\u0491'), ('\u0493', '\u0493'),
-        ('\u0495', '\u0495'), ('\u0497', '\u0497'), ('\u0499', '\u0499'), ('\u049b', '\u049b'),
-        ('\u049d', '\u049d'), ('\u049f', '\u049f'), ('\u04a1', '\u04a1'), ('\u04a3', '\u04a3'),
-        ('\u04a5', '\u04a5'), ('\u04a7', '\u04a7'), ('\u04a9', '\u04a9'), ('\u04ab', '\u04ab'),
-        ('\u04ad', '\u04ad'), ('\u04af', '\u04af'), ('\u04b1', '\u04b1'), ('\u04b3', '\u04b3'),
-        ('\u04b5', '\u04b5'), ('\u04b7', '\u04b7'), ('\u04b9', '\u04b9'), ('\u04bb', '\u04bb'),
-        ('\u04bd', '\u04bd'), ('\u04bf', '\u04bf'), ('\u04c2', '\u04c2'), ('\u04c4', '\u04c4'),
-        ('\u04c6', '\u04c6'), ('\u04c8', '\u04c8'), ('\u04ca', '\u04ca'), ('\u04cc', '\u04cc'),
-        ('\u04ce', '\u04cf'), ('\u04d1', '\u04d1'), ('\u04d3', '\u04d3'), ('\u04d5', '\u04d5'),
-        ('\u04d7', '\u04d7'), ('\u04d9', '\u04d9'), ('\u04db', '\u04db'), ('\u04dd', '\u04dd'),
-        ('\u04df', '\u04df'), ('\u04e1', '\u04e1'), ('\u04e3', '\u04e3'), ('\u04e5', '\u04e5'),
-        ('\u04e7', '\u04e7'), ('\u04e9', '\u04e9'), ('\u04eb', '\u04eb'), ('\u04ed', '\u04ed'),
-        ('\u04ef', '\u04ef'), ('\u04f1', '\u04f1'), ('\u04f3', '\u04f3'), ('\u04f5', '\u04f5'),
-        ('\u04f7', '\u04f7'), ('\u04f9', '\u04f9'), ('\u04fb', '\u04fb'), ('\u04fd', '\u04fd'),
-        ('\u04ff', '\u04ff'), ('\u0501', '\u0501'), ('\u0503', '\u0503'), ('\u0505', '\u0505'),
-        ('\u0507', '\u0507'), ('\u0509', '\u0509'), ('\u050b', '\u050b'), ('\u050d', '\u050d'),
-        ('\u050f', '\u050f'), ('\u0511', '\u0511'), ('\u0513', '\u0513'), ('\u0515', '\u0515'),
-        ('\u0517', '\u0517'), ('\u0519', '\u0519'), ('\u051b', '\u051b'), ('\u051d', '\u051d'),
-        ('\u051f', '\u051f'), ('\u0521', '\u0521'), ('\u0523', '\u0523'), ('\u0525', '\u0525'),
-        ('\u0527', '\u0527'), ('\u0529', '\u0529'), ('\u052b', '\u052b'), ('\u052d', '\u052d'),
-        ('\u052f', '\u052f'), ('\u0561', '\u0587'), ('\u1d00', '\u1d2b'), ('\u1d6b', '\u1d77'),
-        ('\u1d79', '\u1d9a'), ('\u1e01', '\u1e01'), ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'),
-        ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'), ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'),
-        ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'), ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'),
-        ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'), ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'),
-        ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'), ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'),
-        ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'), ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'),
-        ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'), ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'),
-        ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'), ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'),
-        ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'), ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'),
-        ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'), ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'),
-        ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'), ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'),
-        ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'), ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'),
-        ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'), ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'),
-        ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'), ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'),
-        ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'), ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'),
-        ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'), ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'),
-        ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'), ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'),
-        ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'), ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'),
-        ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'), ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'),
-        ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'), ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'),
-        ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'), ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'),
-        ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'), ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'),
-        ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'), ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'),
-        ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'), ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'),
-        ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'), ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'),
-        ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'), ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'),
-        ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'), ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'),
-        ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'), ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'),
-        ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'), ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'),
-        ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'), ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'),
-        ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'), ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'),
-        ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'), ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'),
-        ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'), ('\u1f60', '\u1f67'), ('\u1f70', '\u1f7d'),
-        ('\u1f80', '\u1f87'), ('\u1f90', '\u1f97'), ('\u1fa0', '\u1fa7'), ('\u1fb0', '\u1fb4'),
-        ('\u1fb6', '\u1fb7'), ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fc7'),
-        ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fd7'), ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff4'),
-        ('\u1ff6', '\u1ff7'), ('\u210a', '\u210a'), ('\u210e', '\u210f'), ('\u2113', '\u2113'),
-        ('\u212f', '\u212f'), ('\u2134', '\u2134'), ('\u2139', '\u2139'), ('\u213c', '\u213d'),
-        ('\u2146', '\u2149'), ('\u214e', '\u214e'), ('\u2184', '\u2184'), ('\u2c30', '\u2c5e'),
-        ('\u2c61', '\u2c61'), ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), ('\u2c6a', '\u2c6a'),
-        ('\u2c6c', '\u2c6c'), ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), ('\u2c76', '\u2c7b'),
-        ('\u2c81', '\u2c81'), ('\u2c83', '\u2c83'), ('\u2c85', '\u2c85'), ('\u2c87', '\u2c87'),
-        ('\u2c89', '\u2c89'), ('\u2c8b', '\u2c8b'), ('\u2c8d', '\u2c8d'), ('\u2c8f', '\u2c8f'),
-        ('\u2c91', '\u2c91'), ('\u2c93', '\u2c93'), ('\u2c95', '\u2c95'), ('\u2c97', '\u2c97'),
-        ('\u2c99', '\u2c99'), ('\u2c9b', '\u2c9b'), ('\u2c9d', '\u2c9d'), ('\u2c9f', '\u2c9f'),
-        ('\u2ca1', '\u2ca1'), ('\u2ca3', '\u2ca3'), ('\u2ca5', '\u2ca5'), ('\u2ca7', '\u2ca7'),
-        ('\u2ca9', '\u2ca9'), ('\u2cab', '\u2cab'), ('\u2cad', '\u2cad'), ('\u2caf', '\u2caf'),
-        ('\u2cb1', '\u2cb1'), ('\u2cb3', '\u2cb3'), ('\u2cb5', '\u2cb5'), ('\u2cb7', '\u2cb7'),
-        ('\u2cb9', '\u2cb9'), ('\u2cbb', '\u2cbb'), ('\u2cbd', '\u2cbd'), ('\u2cbf', '\u2cbf'),
-        ('\u2cc1', '\u2cc1'), ('\u2cc3', '\u2cc3'), ('\u2cc5', '\u2cc5'), ('\u2cc7', '\u2cc7'),
-        ('\u2cc9', '\u2cc9'), ('\u2ccb', '\u2ccb'), ('\u2ccd', '\u2ccd'), ('\u2ccf', '\u2ccf'),
-        ('\u2cd1', '\u2cd1'), ('\u2cd3', '\u2cd3'), ('\u2cd5', '\u2cd5'), ('\u2cd7', '\u2cd7'),
-        ('\u2cd9', '\u2cd9'), ('\u2cdb', '\u2cdb'), ('\u2cdd', '\u2cdd'), ('\u2cdf', '\u2cdf'),
-        ('\u2ce1', '\u2ce1'), ('\u2ce3', '\u2ce4'), ('\u2cec', '\u2cec'), ('\u2cee', '\u2cee'),
-        ('\u2cf3', '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'),
-        ('\ua641', '\ua641'), ('\ua643', '\ua643'), ('\ua645', '\ua645'), ('\ua647', '\ua647'),
-        ('\ua649', '\ua649'), ('\ua64b', '\ua64b'), ('\ua64d', '\ua64d'), ('\ua64f', '\ua64f'),
-        ('\ua651', '\ua651'), ('\ua653', '\ua653'), ('\ua655', '\ua655'), ('\ua657', '\ua657'),
-        ('\ua659', '\ua659'), ('\ua65b', '\ua65b'), ('\ua65d', '\ua65d'), ('\ua65f', '\ua65f'),
-        ('\ua661', '\ua661'), ('\ua663', '\ua663'), ('\ua665', '\ua665'), ('\ua667', '\ua667'),
-        ('\ua669', '\ua669'), ('\ua66b', '\ua66b'), ('\ua66d', '\ua66d'), ('\ua681', '\ua681'),
-        ('\ua683', '\ua683'), ('\ua685', '\ua685'), ('\ua687', '\ua687'), ('\ua689', '\ua689'),
-        ('\ua68b', '\ua68b'), ('\ua68d', '\ua68d'), ('\ua68f', '\ua68f'), ('\ua691', '\ua691'),
-        ('\ua693', '\ua693'), ('\ua695', '\ua695'), ('\ua697', '\ua697'), ('\ua699', '\ua699'),
-        ('\ua69b', '\ua69b'), ('\ua723', '\ua723'), ('\ua725', '\ua725'), ('\ua727', '\ua727'),
-        ('\ua729', '\ua729'), ('\ua72b', '\ua72b'), ('\ua72d', '\ua72d'), ('\ua72f', '\ua731'),
-        ('\ua733', '\ua733'), ('\ua735', '\ua735'), ('\ua737', '\ua737'), ('\ua739', '\ua739'),
-        ('\ua73b', '\ua73b'), ('\ua73d', '\ua73d'), ('\ua73f', '\ua73f'), ('\ua741', '\ua741'),
-        ('\ua743', '\ua743'), ('\ua745', '\ua745'), ('\ua747', '\ua747'), ('\ua749', '\ua749'),
-        ('\ua74b', '\ua74b'), ('\ua74d', '\ua74d'), ('\ua74f', '\ua74f'), ('\ua751', '\ua751'),
-        ('\ua753', '\ua753'), ('\ua755', '\ua755'), ('\ua757', '\ua757'), ('\ua759', '\ua759'),
-        ('\ua75b', '\ua75b'), ('\ua75d', '\ua75d'), ('\ua75f', '\ua75f'), ('\ua761', '\ua761'),
-        ('\ua763', '\ua763'), ('\ua765', '\ua765'), ('\ua767', '\ua767'), ('\ua769', '\ua769'),
-        ('\ua76b', '\ua76b'), ('\ua76d', '\ua76d'), ('\ua76f', '\ua76f'), ('\ua771', '\ua778'),
-        ('\ua77a', '\ua77a'), ('\ua77c', '\ua77c'), ('\ua77f', '\ua77f'), ('\ua781', '\ua781'),
-        ('\ua783', '\ua783'), ('\ua785', '\ua785'), ('\ua787', '\ua787'), ('\ua78c', '\ua78c'),
-        ('\ua78e', '\ua78e'), ('\ua791', '\ua791'), ('\ua793', '\ua795'), ('\ua797', '\ua797'),
-        ('\ua799', '\ua799'), ('\ua79b', '\ua79b'), ('\ua79d', '\ua79d'), ('\ua79f', '\ua79f'),
-        ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'), ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'),
-        ('\ua7a9', '\ua7a9'), ('\ua7fa', '\ua7fa'), ('\uab30', '\uab5a'), ('\uab64', '\uab65'),
-        ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), ('\uff41', '\uff5a'), ('\U00010428',
-        '\U0001044f'), ('\U000118c0', '\U000118df'), ('\U0001d41a', '\U0001d433'), ('\U0001d44e',
-        '\U0001d454'), ('\U0001d456', '\U0001d467'), ('\U0001d482', '\U0001d49b'), ('\U0001d4b6',
-        '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5',
-        '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), ('\U0001d51e', '\U0001d537'), ('\U0001d552',
-        '\U0001d56b'), ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), ('\U0001d5ee',
-        '\U0001d607'), ('\U0001d622', '\U0001d63b'), ('\U0001d656', '\U0001d66f'), ('\U0001d68a',
-        '\U0001d6a5'), ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), ('\U0001d6fc',
-        '\U0001d714'), ('\U0001d716', '\U0001d71b'), ('\U0001d736', '\U0001d74e'), ('\U0001d750',
-        '\U0001d755'), ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), ('\U0001d7aa',
-        '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), ('\U0001d7cb', '\U0001d7cb')
+        ('\u{61}', '\u{7a}'), ('\u{b5}', '\u{b5}'), ('\u{df}', '\u{f6}'), ('\u{f8}', '\u{ff}'),
+        ('\u{101}', '\u{101}'), ('\u{103}', '\u{103}'), ('\u{105}', '\u{105}'), ('\u{107}',
+        '\u{107}'), ('\u{109}', '\u{109}'), ('\u{10b}', '\u{10b}'), ('\u{10d}', '\u{10d}'),
+        ('\u{10f}', '\u{10f}'), ('\u{111}', '\u{111}'), ('\u{113}', '\u{113}'), ('\u{115}',
+        '\u{115}'), ('\u{117}', '\u{117}'), ('\u{119}', '\u{119}'), ('\u{11b}', '\u{11b}'),
+        ('\u{11d}', '\u{11d}'), ('\u{11f}', '\u{11f}'), ('\u{121}', '\u{121}'), ('\u{123}',
+        '\u{123}'), ('\u{125}', '\u{125}'), ('\u{127}', '\u{127}'), ('\u{129}', '\u{129}'),
+        ('\u{12b}', '\u{12b}'), ('\u{12d}', '\u{12d}'), ('\u{12f}', '\u{12f}'), ('\u{131}',
+        '\u{131}'), ('\u{133}', '\u{133}'), ('\u{135}', '\u{135}'), ('\u{137}', '\u{138}'),
+        ('\u{13a}', '\u{13a}'), ('\u{13c}', '\u{13c}'), ('\u{13e}', '\u{13e}'), ('\u{140}',
+        '\u{140}'), ('\u{142}', '\u{142}'), ('\u{144}', '\u{144}'), ('\u{146}', '\u{146}'),
+        ('\u{148}', '\u{149}'), ('\u{14b}', '\u{14b}'), ('\u{14d}', '\u{14d}'), ('\u{14f}',
+        '\u{14f}'), ('\u{151}', '\u{151}'), ('\u{153}', '\u{153}'), ('\u{155}', '\u{155}'),
+        ('\u{157}', '\u{157}'), ('\u{159}', '\u{159}'), ('\u{15b}', '\u{15b}'), ('\u{15d}',
+        '\u{15d}'), ('\u{15f}', '\u{15f}'), ('\u{161}', '\u{161}'), ('\u{163}', '\u{163}'),
+        ('\u{165}', '\u{165}'), ('\u{167}', '\u{167}'), ('\u{169}', '\u{169}'), ('\u{16b}',
+        '\u{16b}'), ('\u{16d}', '\u{16d}'), ('\u{16f}', '\u{16f}'), ('\u{171}', '\u{171}'),
+        ('\u{173}', '\u{173}'), ('\u{175}', '\u{175}'), ('\u{177}', '\u{177}'), ('\u{17a}',
+        '\u{17a}'), ('\u{17c}', '\u{17c}'), ('\u{17e}', '\u{180}'), ('\u{183}', '\u{183}'),
+        ('\u{185}', '\u{185}'), ('\u{188}', '\u{188}'), ('\u{18c}', '\u{18d}'), ('\u{192}',
+        '\u{192}'), ('\u{195}', '\u{195}'), ('\u{199}', '\u{19b}'), ('\u{19e}', '\u{19e}'),
+        ('\u{1a1}', '\u{1a1}'), ('\u{1a3}', '\u{1a3}'), ('\u{1a5}', '\u{1a5}'), ('\u{1a8}',
+        '\u{1a8}'), ('\u{1aa}', '\u{1ab}'), ('\u{1ad}', '\u{1ad}'), ('\u{1b0}', '\u{1b0}'),
+        ('\u{1b4}', '\u{1b4}'), ('\u{1b6}', '\u{1b6}'), ('\u{1b9}', '\u{1ba}'), ('\u{1bd}',
+        '\u{1bf}'), ('\u{1c6}', '\u{1c6}'), ('\u{1c9}', '\u{1c9}'), ('\u{1cc}', '\u{1cc}'),
+        ('\u{1ce}', '\u{1ce}'), ('\u{1d0}', '\u{1d0}'), ('\u{1d2}', '\u{1d2}'), ('\u{1d4}',
+        '\u{1d4}'), ('\u{1d6}', '\u{1d6}'), ('\u{1d8}', '\u{1d8}'), ('\u{1da}', '\u{1da}'),
+        ('\u{1dc}', '\u{1dd}'), ('\u{1df}', '\u{1df}'), ('\u{1e1}', '\u{1e1}'), ('\u{1e3}',
+        '\u{1e3}'), ('\u{1e5}', '\u{1e5}'), ('\u{1e7}', '\u{1e7}'), ('\u{1e9}', '\u{1e9}'),
+        ('\u{1eb}', '\u{1eb}'), ('\u{1ed}', '\u{1ed}'), ('\u{1ef}', '\u{1f0}'), ('\u{1f3}',
+        '\u{1f3}'), ('\u{1f5}', '\u{1f5}'), ('\u{1f9}', '\u{1f9}'), ('\u{1fb}', '\u{1fb}'),
+        ('\u{1fd}', '\u{1fd}'), ('\u{1ff}', '\u{1ff}'), ('\u{201}', '\u{201}'), ('\u{203}',
+        '\u{203}'), ('\u{205}', '\u{205}'), ('\u{207}', '\u{207}'), ('\u{209}', '\u{209}'),
+        ('\u{20b}', '\u{20b}'), ('\u{20d}', '\u{20d}'), ('\u{20f}', '\u{20f}'), ('\u{211}',
+        '\u{211}'), ('\u{213}', '\u{213}'), ('\u{215}', '\u{215}'), ('\u{217}', '\u{217}'),
+        ('\u{219}', '\u{219}'), ('\u{21b}', '\u{21b}'), ('\u{21d}', '\u{21d}'), ('\u{21f}',
+        '\u{21f}'), ('\u{221}', '\u{221}'), ('\u{223}', '\u{223}'), ('\u{225}', '\u{225}'),
+        ('\u{227}', '\u{227}'), ('\u{229}', '\u{229}'), ('\u{22b}', '\u{22b}'), ('\u{22d}',
+        '\u{22d}'), ('\u{22f}', '\u{22f}'), ('\u{231}', '\u{231}'), ('\u{233}', '\u{239}'),
+        ('\u{23c}', '\u{23c}'), ('\u{23f}', '\u{240}'), ('\u{242}', '\u{242}'), ('\u{247}',
+        '\u{247}'), ('\u{249}', '\u{249}'), ('\u{24b}', '\u{24b}'), ('\u{24d}', '\u{24d}'),
+        ('\u{24f}', '\u{293}'), ('\u{295}', '\u{2af}'), ('\u{371}', '\u{371}'), ('\u{373}',
+        '\u{373}'), ('\u{377}', '\u{377}'), ('\u{37b}', '\u{37d}'), ('\u{390}', '\u{390}'),
+        ('\u{3ac}', '\u{3ce}'), ('\u{3d0}', '\u{3d1}'), ('\u{3d5}', '\u{3d7}'), ('\u{3d9}',
+        '\u{3d9}'), ('\u{3db}', '\u{3db}'), ('\u{3dd}', '\u{3dd}'), ('\u{3df}', '\u{3df}'),
+        ('\u{3e1}', '\u{3e1}'), ('\u{3e3}', '\u{3e3}'), ('\u{3e5}', '\u{3e5}'), ('\u{3e7}',
+        '\u{3e7}'), ('\u{3e9}', '\u{3e9}'), ('\u{3eb}', '\u{3eb}'), ('\u{3ed}', '\u{3ed}'),
+        ('\u{3ef}', '\u{3f3}'), ('\u{3f5}', '\u{3f5}'), ('\u{3f8}', '\u{3f8}'), ('\u{3fb}',
+        '\u{3fc}'), ('\u{430}', '\u{45f}'), ('\u{461}', '\u{461}'), ('\u{463}', '\u{463}'),
+        ('\u{465}', '\u{465}'), ('\u{467}', '\u{467}'), ('\u{469}', '\u{469}'), ('\u{46b}',
+        '\u{46b}'), ('\u{46d}', '\u{46d}'), ('\u{46f}', '\u{46f}'), ('\u{471}', '\u{471}'),
+        ('\u{473}', '\u{473}'), ('\u{475}', '\u{475}'), ('\u{477}', '\u{477}'), ('\u{479}',
+        '\u{479}'), ('\u{47b}', '\u{47b}'), ('\u{47d}', '\u{47d}'), ('\u{47f}', '\u{47f}'),
+        ('\u{481}', '\u{481}'), ('\u{48b}', '\u{48b}'), ('\u{48d}', '\u{48d}'), ('\u{48f}',
+        '\u{48f}'), ('\u{491}', '\u{491}'), ('\u{493}', '\u{493}'), ('\u{495}', '\u{495}'),
+        ('\u{497}', '\u{497}'), ('\u{499}', '\u{499}'), ('\u{49b}', '\u{49b}'), ('\u{49d}',
+        '\u{49d}'), ('\u{49f}', '\u{49f}'), ('\u{4a1}', '\u{4a1}'), ('\u{4a3}', '\u{4a3}'),
+        ('\u{4a5}', '\u{4a5}'), ('\u{4a7}', '\u{4a7}'), ('\u{4a9}', '\u{4a9}'), ('\u{4ab}',
+        '\u{4ab}'), ('\u{4ad}', '\u{4ad}'), ('\u{4af}', '\u{4af}'), ('\u{4b1}', '\u{4b1}'),
+        ('\u{4b3}', '\u{4b3}'), ('\u{4b5}', '\u{4b5}'), ('\u{4b7}', '\u{4b7}'), ('\u{4b9}',
+        '\u{4b9}'), ('\u{4bb}', '\u{4bb}'), ('\u{4bd}', '\u{4bd}'), ('\u{4bf}', '\u{4bf}'),
+        ('\u{4c2}', '\u{4c2}'), ('\u{4c4}', '\u{4c4}'), ('\u{4c6}', '\u{4c6}'), ('\u{4c8}',
+        '\u{4c8}'), ('\u{4ca}', '\u{4ca}'), ('\u{4cc}', '\u{4cc}'), ('\u{4ce}', '\u{4cf}'),
+        ('\u{4d1}', '\u{4d1}'), ('\u{4d3}', '\u{4d3}'), ('\u{4d5}', '\u{4d5}'), ('\u{4d7}',
+        '\u{4d7}'), ('\u{4d9}', '\u{4d9}'), ('\u{4db}', '\u{4db}'), ('\u{4dd}', '\u{4dd}'),
+        ('\u{4df}', '\u{4df}'), ('\u{4e1}', '\u{4e1}'), ('\u{4e3}', '\u{4e3}'), ('\u{4e5}',
+        '\u{4e5}'), ('\u{4e7}', '\u{4e7}'), ('\u{4e9}', '\u{4e9}'), ('\u{4eb}', '\u{4eb}'),
+        ('\u{4ed}', '\u{4ed}'), ('\u{4ef}', '\u{4ef}'), ('\u{4f1}', '\u{4f1}'), ('\u{4f3}',
+        '\u{4f3}'), ('\u{4f5}', '\u{4f5}'), ('\u{4f7}', '\u{4f7}'), ('\u{4f9}', '\u{4f9}'),
+        ('\u{4fb}', '\u{4fb}'), ('\u{4fd}', '\u{4fd}'), ('\u{4ff}', '\u{4ff}'), ('\u{501}',
+        '\u{501}'), ('\u{503}', '\u{503}'), ('\u{505}', '\u{505}'), ('\u{507}', '\u{507}'),
+        ('\u{509}', '\u{509}'), ('\u{50b}', '\u{50b}'), ('\u{50d}', '\u{50d}'), ('\u{50f}',
+        '\u{50f}'), ('\u{511}', '\u{511}'), ('\u{513}', '\u{513}'), ('\u{515}', '\u{515}'),
+        ('\u{517}', '\u{517}'), ('\u{519}', '\u{519}'), ('\u{51b}', '\u{51b}'), ('\u{51d}',
+        '\u{51d}'), ('\u{51f}', '\u{51f}'), ('\u{521}', '\u{521}'), ('\u{523}', '\u{523}'),
+        ('\u{525}', '\u{525}'), ('\u{527}', '\u{527}'), ('\u{529}', '\u{529}'), ('\u{52b}',
+        '\u{52b}'), ('\u{52d}', '\u{52d}'), ('\u{52f}', '\u{52f}'), ('\u{561}', '\u{587}'),
+        ('\u{1d00}', '\u{1d2b}'), ('\u{1d6b}', '\u{1d77}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1e01}',
+        '\u{1e01}'), ('\u{1e03}', '\u{1e03}'), ('\u{1e05}', '\u{1e05}'), ('\u{1e07}', '\u{1e07}'),
+        ('\u{1e09}', '\u{1e09}'), ('\u{1e0b}', '\u{1e0b}'), ('\u{1e0d}', '\u{1e0d}'), ('\u{1e0f}',
+        '\u{1e0f}'), ('\u{1e11}', '\u{1e11}'), ('\u{1e13}', '\u{1e13}'), ('\u{1e15}', '\u{1e15}'),
+        ('\u{1e17}', '\u{1e17}'), ('\u{1e19}', '\u{1e19}'), ('\u{1e1b}', '\u{1e1b}'), ('\u{1e1d}',
+        '\u{1e1d}'), ('\u{1e1f}', '\u{1e1f}'), ('\u{1e21}', '\u{1e21}'), ('\u{1e23}', '\u{1e23}'),
+        ('\u{1e25}', '\u{1e25}'), ('\u{1e27}', '\u{1e27}'), ('\u{1e29}', '\u{1e29}'), ('\u{1e2b}',
+        '\u{1e2b}'), ('\u{1e2d}', '\u{1e2d}'), ('\u{1e2f}', '\u{1e2f}'), ('\u{1e31}', '\u{1e31}'),
+        ('\u{1e33}', '\u{1e33}'), ('\u{1e35}', '\u{1e35}'), ('\u{1e37}', '\u{1e37}'), ('\u{1e39}',
+        '\u{1e39}'), ('\u{1e3b}', '\u{1e3b}'), ('\u{1e3d}', '\u{1e3d}'), ('\u{1e3f}', '\u{1e3f}'),
+        ('\u{1e41}', '\u{1e41}'), ('\u{1e43}', '\u{1e43}'), ('\u{1e45}', '\u{1e45}'), ('\u{1e47}',
+        '\u{1e47}'), ('\u{1e49}', '\u{1e49}'), ('\u{1e4b}', '\u{1e4b}'), ('\u{1e4d}', '\u{1e4d}'),
+        ('\u{1e4f}', '\u{1e4f}'), ('\u{1e51}', '\u{1e51}'), ('\u{1e53}', '\u{1e53}'), ('\u{1e55}',
+        '\u{1e55}'), ('\u{1e57}', '\u{1e57}'), ('\u{1e59}', '\u{1e59}'), ('\u{1e5b}', '\u{1e5b}'),
+        ('\u{1e5d}', '\u{1e5d}'), ('\u{1e5f}', '\u{1e5f}'), ('\u{1e61}', '\u{1e61}'), ('\u{1e63}',
+        '\u{1e63}'), ('\u{1e65}', '\u{1e65}'), ('\u{1e67}', '\u{1e67}'), ('\u{1e69}', '\u{1e69}'),
+        ('\u{1e6b}', '\u{1e6b}'), ('\u{1e6d}', '\u{1e6d}'), ('\u{1e6f}', '\u{1e6f}'), ('\u{1e71}',
+        '\u{1e71}'), ('\u{1e73}', '\u{1e73}'), ('\u{1e75}', '\u{1e75}'), ('\u{1e77}', '\u{1e77}'),
+        ('\u{1e79}', '\u{1e79}'), ('\u{1e7b}', '\u{1e7b}'), ('\u{1e7d}', '\u{1e7d}'), ('\u{1e7f}',
+        '\u{1e7f}'), ('\u{1e81}', '\u{1e81}'), ('\u{1e83}', '\u{1e83}'), ('\u{1e85}', '\u{1e85}'),
+        ('\u{1e87}', '\u{1e87}'), ('\u{1e89}', '\u{1e89}'), ('\u{1e8b}', '\u{1e8b}'), ('\u{1e8d}',
+        '\u{1e8d}'), ('\u{1e8f}', '\u{1e8f}'), ('\u{1e91}', '\u{1e91}'), ('\u{1e93}', '\u{1e93}'),
+        ('\u{1e95}', '\u{1e9d}'), ('\u{1e9f}', '\u{1e9f}'), ('\u{1ea1}', '\u{1ea1}'), ('\u{1ea3}',
+        '\u{1ea3}'), ('\u{1ea5}', '\u{1ea5}'), ('\u{1ea7}', '\u{1ea7}'), ('\u{1ea9}', '\u{1ea9}'),
+        ('\u{1eab}', '\u{1eab}'), ('\u{1ead}', '\u{1ead}'), ('\u{1eaf}', '\u{1eaf}'), ('\u{1eb1}',
+        '\u{1eb1}'), ('\u{1eb3}', '\u{1eb3}'), ('\u{1eb5}', '\u{1eb5}'), ('\u{1eb7}', '\u{1eb7}'),
+        ('\u{1eb9}', '\u{1eb9}'), ('\u{1ebb}', '\u{1ebb}'), ('\u{1ebd}', '\u{1ebd}'), ('\u{1ebf}',
+        '\u{1ebf}'), ('\u{1ec1}', '\u{1ec1}'), ('\u{1ec3}', '\u{1ec3}'), ('\u{1ec5}', '\u{1ec5}'),
+        ('\u{1ec7}', '\u{1ec7}'), ('\u{1ec9}', '\u{1ec9}'), ('\u{1ecb}', '\u{1ecb}'), ('\u{1ecd}',
+        '\u{1ecd}'), ('\u{1ecf}', '\u{1ecf}'), ('\u{1ed1}', '\u{1ed1}'), ('\u{1ed3}', '\u{1ed3}'),
+        ('\u{1ed5}', '\u{1ed5}'), ('\u{1ed7}', '\u{1ed7}'), ('\u{1ed9}', '\u{1ed9}'), ('\u{1edb}',
+        '\u{1edb}'), ('\u{1edd}', '\u{1edd}'), ('\u{1edf}', '\u{1edf}'), ('\u{1ee1}', '\u{1ee1}'),
+        ('\u{1ee3}', '\u{1ee3}'), ('\u{1ee5}', '\u{1ee5}'), ('\u{1ee7}', '\u{1ee7}'), ('\u{1ee9}',
+        '\u{1ee9}'), ('\u{1eeb}', '\u{1eeb}'), ('\u{1eed}', '\u{1eed}'), ('\u{1eef}', '\u{1eef}'),
+        ('\u{1ef1}', '\u{1ef1}'), ('\u{1ef3}', '\u{1ef3}'), ('\u{1ef5}', '\u{1ef5}'), ('\u{1ef7}',
+        '\u{1ef7}'), ('\u{1ef9}', '\u{1ef9}'), ('\u{1efb}', '\u{1efb}'), ('\u{1efd}', '\u{1efd}'),
+        ('\u{1eff}', '\u{1f07}'), ('\u{1f10}', '\u{1f15}'), ('\u{1f20}', '\u{1f27}'), ('\u{1f30}',
+        '\u{1f37}'), ('\u{1f40}', '\u{1f45}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f60}', '\u{1f67}'),
+        ('\u{1f70}', '\u{1f7d}'), ('\u{1f80}', '\u{1f87}'), ('\u{1f90}', '\u{1f97}'), ('\u{1fa0}',
+        '\u{1fa7}'), ('\u{1fb0}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fb7}'), ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}', '\u{1fc7}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}',
+        '\u{1fd7}'), ('\u{1fe0}', '\u{1fe7}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ff7}'),
+        ('\u{210a}', '\u{210a}'), ('\u{210e}', '\u{210f}'), ('\u{2113}', '\u{2113}'), ('\u{212f}',
+        '\u{212f}'), ('\u{2134}', '\u{2134}'), ('\u{2139}', '\u{2139}'), ('\u{213c}', '\u{213d}'),
+        ('\u{2146}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2184}', '\u{2184}'), ('\u{2c30}',
+        '\u{2c5e}'), ('\u{2c61}', '\u{2c61}'), ('\u{2c65}', '\u{2c66}'), ('\u{2c68}', '\u{2c68}'),
+        ('\u{2c6a}', '\u{2c6a}'), ('\u{2c6c}', '\u{2c6c}'), ('\u{2c71}', '\u{2c71}'), ('\u{2c73}',
+        '\u{2c74}'), ('\u{2c76}', '\u{2c7b}'), ('\u{2c81}', '\u{2c81}'), ('\u{2c83}', '\u{2c83}'),
+        ('\u{2c85}', '\u{2c85}'), ('\u{2c87}', '\u{2c87}'), ('\u{2c89}', '\u{2c89}'), ('\u{2c8b}',
+        '\u{2c8b}'), ('\u{2c8d}', '\u{2c8d}'), ('\u{2c8f}', '\u{2c8f}'), ('\u{2c91}', '\u{2c91}'),
+        ('\u{2c93}', '\u{2c93}'), ('\u{2c95}', '\u{2c95}'), ('\u{2c97}', '\u{2c97}'), ('\u{2c99}',
+        '\u{2c99}'), ('\u{2c9b}', '\u{2c9b}'), ('\u{2c9d}', '\u{2c9d}'), ('\u{2c9f}', '\u{2c9f}'),
+        ('\u{2ca1}', '\u{2ca1}'), ('\u{2ca3}', '\u{2ca3}'), ('\u{2ca5}', '\u{2ca5}'), ('\u{2ca7}',
+        '\u{2ca7}'), ('\u{2ca9}', '\u{2ca9}'), ('\u{2cab}', '\u{2cab}'), ('\u{2cad}', '\u{2cad}'),
+        ('\u{2caf}', '\u{2caf}'), ('\u{2cb1}', '\u{2cb1}'), ('\u{2cb3}', '\u{2cb3}'), ('\u{2cb5}',
+        '\u{2cb5}'), ('\u{2cb7}', '\u{2cb7}'), ('\u{2cb9}', '\u{2cb9}'), ('\u{2cbb}', '\u{2cbb}'),
+        ('\u{2cbd}', '\u{2cbd}'), ('\u{2cbf}', '\u{2cbf}'), ('\u{2cc1}', '\u{2cc1}'), ('\u{2cc3}',
+        '\u{2cc3}'), ('\u{2cc5}', '\u{2cc5}'), ('\u{2cc7}', '\u{2cc7}'), ('\u{2cc9}', '\u{2cc9}'),
+        ('\u{2ccb}', '\u{2ccb}'), ('\u{2ccd}', '\u{2ccd}'), ('\u{2ccf}', '\u{2ccf}'), ('\u{2cd1}',
+        '\u{2cd1}'), ('\u{2cd3}', '\u{2cd3}'), ('\u{2cd5}', '\u{2cd5}'), ('\u{2cd7}', '\u{2cd7}'),
+        ('\u{2cd9}', '\u{2cd9}'), ('\u{2cdb}', '\u{2cdb}'), ('\u{2cdd}', '\u{2cdd}'), ('\u{2cdf}',
+        '\u{2cdf}'), ('\u{2ce1}', '\u{2ce1}'), ('\u{2ce3}', '\u{2ce4}'), ('\u{2cec}', '\u{2cec}'),
+        ('\u{2cee}', '\u{2cee}'), ('\u{2cf3}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}',
+        '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{a641}', '\u{a641}'), ('\u{a643}', '\u{a643}'),
+        ('\u{a645}', '\u{a645}'), ('\u{a647}', '\u{a647}'), ('\u{a649}', '\u{a649}'), ('\u{a64b}',
+        '\u{a64b}'), ('\u{a64d}', '\u{a64d}'), ('\u{a64f}', '\u{a64f}'), ('\u{a651}', '\u{a651}'),
+        ('\u{a653}', '\u{a653}'), ('\u{a655}', '\u{a655}'), ('\u{a657}', '\u{a657}'), ('\u{a659}',
+        '\u{a659}'), ('\u{a65b}', '\u{a65b}'), ('\u{a65d}', '\u{a65d}'), ('\u{a65f}', '\u{a65f}'),
+        ('\u{a661}', '\u{a661}'), ('\u{a663}', '\u{a663}'), ('\u{a665}', '\u{a665}'), ('\u{a667}',
+        '\u{a667}'), ('\u{a669}', '\u{a669}'), ('\u{a66b}', '\u{a66b}'), ('\u{a66d}', '\u{a66d}'),
+        ('\u{a681}', '\u{a681}'), ('\u{a683}', '\u{a683}'), ('\u{a685}', '\u{a685}'), ('\u{a687}',
+        '\u{a687}'), ('\u{a689}', '\u{a689}'), ('\u{a68b}', '\u{a68b}'), ('\u{a68d}', '\u{a68d}'),
+        ('\u{a68f}', '\u{a68f}'), ('\u{a691}', '\u{a691}'), ('\u{a693}', '\u{a693}'), ('\u{a695}',
+        '\u{a695}'), ('\u{a697}', '\u{a697}'), ('\u{a699}', '\u{a699}'), ('\u{a69b}', '\u{a69b}'),
+        ('\u{a723}', '\u{a723}'), ('\u{a725}', '\u{a725}'), ('\u{a727}', '\u{a727}'), ('\u{a729}',
+        '\u{a729}'), ('\u{a72b}', '\u{a72b}'), ('\u{a72d}', '\u{a72d}'), ('\u{a72f}', '\u{a731}'),
+        ('\u{a733}', '\u{a733}'), ('\u{a735}', '\u{a735}'), ('\u{a737}', '\u{a737}'), ('\u{a739}',
+        '\u{a739}'), ('\u{a73b}', '\u{a73b}'), ('\u{a73d}', '\u{a73d}'), ('\u{a73f}', '\u{a73f}'),
+        ('\u{a741}', '\u{a741}'), ('\u{a743}', '\u{a743}'), ('\u{a745}', '\u{a745}'), ('\u{a747}',
+        '\u{a747}'), ('\u{a749}', '\u{a749}'), ('\u{a74b}', '\u{a74b}'), ('\u{a74d}', '\u{a74d}'),
+        ('\u{a74f}', '\u{a74f}'), ('\u{a751}', '\u{a751}'), ('\u{a753}', '\u{a753}'), ('\u{a755}',
+        '\u{a755}'), ('\u{a757}', '\u{a757}'), ('\u{a759}', '\u{a759}'), ('\u{a75b}', '\u{a75b}'),
+        ('\u{a75d}', '\u{a75d}'), ('\u{a75f}', '\u{a75f}'), ('\u{a761}', '\u{a761}'), ('\u{a763}',
+        '\u{a763}'), ('\u{a765}', '\u{a765}'), ('\u{a767}', '\u{a767}'), ('\u{a769}', '\u{a769}'),
+        ('\u{a76b}', '\u{a76b}'), ('\u{a76d}', '\u{a76d}'), ('\u{a76f}', '\u{a76f}'), ('\u{a771}',
+        '\u{a778}'), ('\u{a77a}', '\u{a77a}'), ('\u{a77c}', '\u{a77c}'), ('\u{a77f}', '\u{a77f}'),
+        ('\u{a781}', '\u{a781}'), ('\u{a783}', '\u{a783}'), ('\u{a785}', '\u{a785}'), ('\u{a787}',
+        '\u{a787}'), ('\u{a78c}', '\u{a78c}'), ('\u{a78e}', '\u{a78e}'), ('\u{a791}', '\u{a791}'),
+        ('\u{a793}', '\u{a795}'), ('\u{a797}', '\u{a797}'), ('\u{a799}', '\u{a799}'), ('\u{a79b}',
+        '\u{a79b}'), ('\u{a79d}', '\u{a79d}'), ('\u{a79f}', '\u{a79f}'), ('\u{a7a1}', '\u{a7a1}'),
+        ('\u{a7a3}', '\u{a7a3}'), ('\u{a7a5}', '\u{a7a5}'), ('\u{a7a7}', '\u{a7a7}'), ('\u{a7a9}',
+        '\u{a7a9}'), ('\u{a7fa}', '\u{a7fa}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab64}', '\u{ab65}'),
+        ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{ff41}', '\u{ff5a}'), ('\u{10428}',
+        '\u{1044f}'), ('\u{118c0}', '\u{118df}'), ('\u{1d41a}', '\u{1d433}'), ('\u{1d44e}',
+        '\u{1d454}'), ('\u{1d456}', '\u{1d467}'), ('\u{1d482}', '\u{1d49b}'), ('\u{1d4b6}',
+        '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}',
+        '\u{1d4cf}'), ('\u{1d4ea}', '\u{1d503}'), ('\u{1d51e}', '\u{1d537}'), ('\u{1d552}',
+        '\u{1d56b}'), ('\u{1d586}', '\u{1d59f}'), ('\u{1d5ba}', '\u{1d5d3}'), ('\u{1d5ee}',
+        '\u{1d607}'), ('\u{1d622}', '\u{1d63b}'), ('\u{1d656}', '\u{1d66f}'), ('\u{1d68a}',
+        '\u{1d6a5}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6e1}'), ('\u{1d6fc}',
+        '\u{1d714}'), ('\u{1d716}', '\u{1d71b}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}',
+        '\u{1d755}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d78f}'), ('\u{1d7aa}',
+        '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7c9}'), ('\u{1d7cb}', '\u{1d7cb}')
     ];
 
     pub static Lm_table: &'static [(char, char)] = &[
-        ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'),
-        ('\u02ee', '\u02ee'), ('\u0374', '\u0374'), ('\u037a', '\u037a'), ('\u0559', '\u0559'),
-        ('\u0640', '\u0640'), ('\u06e5', '\u06e6'), ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'),
-        ('\u081a', '\u081a'), ('\u0824', '\u0824'), ('\u0828', '\u0828'), ('\u0971', '\u0971'),
-        ('\u0e46', '\u0e46'), ('\u0ec6', '\u0ec6'), ('\u10fc', '\u10fc'), ('\u17d7', '\u17d7'),
-        ('\u1843', '\u1843'), ('\u1aa7', '\u1aa7'), ('\u1c78', '\u1c7d'), ('\u1d2c', '\u1d6a'),
-        ('\u1d78', '\u1d78'), ('\u1d9b', '\u1dbf'), ('\u2071', '\u2071'), ('\u207f', '\u207f'),
-        ('\u2090', '\u209c'), ('\u2c7c', '\u2c7d'), ('\u2d6f', '\u2d6f'), ('\u2e2f', '\u2e2f'),
-        ('\u3005', '\u3005'), ('\u3031', '\u3035'), ('\u303b', '\u303b'), ('\u309d', '\u309e'),
-        ('\u30fc', '\u30fe'), ('\ua015', '\ua015'), ('\ua4f8', '\ua4fd'), ('\ua60c', '\ua60c'),
-        ('\ua67f', '\ua67f'), ('\ua69c', '\ua69d'), ('\ua717', '\ua71f'), ('\ua770', '\ua770'),
-        ('\ua788', '\ua788'), ('\ua7f8', '\ua7f9'), ('\ua9cf', '\ua9cf'), ('\ua9e6', '\ua9e6'),
-        ('\uaa70', '\uaa70'), ('\uaadd', '\uaadd'), ('\uaaf3', '\uaaf4'), ('\uab5c', '\uab5f'),
-        ('\uff70', '\uff70'), ('\uff9e', '\uff9f'), ('\U00016b40', '\U00016b43'), ('\U00016f93',
-        '\U00016f9f')
+        ('\u{2b0}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'), ('\u{2ec}',
+        '\u{2ec}'), ('\u{2ee}', '\u{2ee}'), ('\u{374}', '\u{374}'), ('\u{37a}', '\u{37a}'),
+        ('\u{559}', '\u{559}'), ('\u{640}', '\u{640}'), ('\u{6e5}', '\u{6e6}'), ('\u{7f4}',
+        '\u{7f5}'), ('\u{7fa}', '\u{7fa}'), ('\u{81a}', '\u{81a}'), ('\u{824}', '\u{824}'),
+        ('\u{828}', '\u{828}'), ('\u{971}', '\u{971}'), ('\u{e46}', '\u{e46}'), ('\u{ec6}',
+        '\u{ec6}'), ('\u{10fc}', '\u{10fc}'), ('\u{17d7}', '\u{17d7}'), ('\u{1843}', '\u{1843}'),
+        ('\u{1aa7}', '\u{1aa7}'), ('\u{1c78}', '\u{1c7d}'), ('\u{1d2c}', '\u{1d6a}'), ('\u{1d78}',
+        '\u{1d78}'), ('\u{1d9b}', '\u{1dbf}'), ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'),
+        ('\u{2090}', '\u{209c}'), ('\u{2c7c}', '\u{2c7d}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2e2f}',
+        '\u{2e2f}'), ('\u{3005}', '\u{3005}'), ('\u{3031}', '\u{3035}'), ('\u{303b}', '\u{303b}'),
+        ('\u{309d}', '\u{309e}'), ('\u{30fc}', '\u{30fe}'), ('\u{a015}', '\u{a015}'), ('\u{a4f8}',
+        '\u{a4fd}'), ('\u{a60c}', '\u{a60c}'), ('\u{a67f}', '\u{a67f}'), ('\u{a69c}', '\u{a69d}'),
+        ('\u{a717}', '\u{a71f}'), ('\u{a770}', '\u{a770}'), ('\u{a788}', '\u{a788}'), ('\u{a7f8}',
+        '\u{a7f9}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e6}', '\u{a9e6}'), ('\u{aa70}', '\u{aa70}'),
+        ('\u{aadd}', '\u{aadd}'), ('\u{aaf3}', '\u{aaf4}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ff70}',
+        '\u{ff70}'), ('\u{ff9e}', '\u{ff9f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16f93}',
+        '\u{16f9f}')
     ];
 
     pub static Lo_table: &'static [(char, char)] = &[
-        ('\u00aa', '\u00aa'), ('\u00ba', '\u00ba'), ('\u01bb', '\u01bb'), ('\u01c0', '\u01c3'),
-        ('\u0294', '\u0294'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0620', '\u063f'),
-        ('\u0641', '\u064a'), ('\u066e', '\u066f'), ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'),
-        ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), ('\u0710', '\u0710'),
-        ('\u0712', '\u072f'), ('\u074d', '\u07a5'), ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'),
-        ('\u0800', '\u0815'), ('\u0840', '\u0858'), ('\u08a0', '\u08b2'), ('\u0904', '\u0939'),
-        ('\u093d', '\u093d'), ('\u0950', '\u0950'), ('\u0958', '\u0961'), ('\u0972', '\u0980'),
-        ('\u0985', '\u098c'), ('\u098f', '\u0990'), ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'),
-        ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'),
-        ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), ('\u09f0', '\u09f1'), ('\u0a05', '\u0a0a'),
-        ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'),
-        ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'),
-        ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'),
-        ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), ('\u0abd', '\u0abd'),
-        ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'),
-        ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'),
-        ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), ('\u0b71', '\u0b71'),
-        ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'),
-        ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'),
-        ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bd0', '\u0bd0'), ('\u0c05', '\u0c0c'),
-        ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c39'), ('\u0c3d', '\u0c3d'),
-        ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'),
-        ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'),
-        ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), ('\u0d05', '\u0d0c'),
-        ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), ('\u0d4e', '\u0d4e'),
-        ('\u0d60', '\u0d61'), ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), ('\u0d9a', '\u0db1'),
-        ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0e01', '\u0e30'),
-        ('\u0e32', '\u0e33'), ('\u0e40', '\u0e45'), ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'),
-        ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'),
-        ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'),
-        ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), ('\u0eb2', '\u0eb3'), ('\u0ebd', '\u0ebd'),
-        ('\u0ec0', '\u0ec4'), ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f40', '\u0f47'),
-        ('\u0f49', '\u0f6c'), ('\u0f88', '\u0f8c'), ('\u1000', '\u102a'), ('\u103f', '\u103f'),
-        ('\u1050', '\u1055'), ('\u105a', '\u105d'), ('\u1061', '\u1061'), ('\u1065', '\u1066'),
-        ('\u106e', '\u1070'), ('\u1075', '\u1081'), ('\u108e', '\u108e'), ('\u10d0', '\u10fa'),
-        ('\u10fd', '\u1248'), ('\u124a', '\u124d'), ('\u1250', '\u1256'), ('\u1258', '\u1258'),
-        ('\u125a', '\u125d'), ('\u1260', '\u1288'), ('\u128a', '\u128d'), ('\u1290', '\u12b0'),
-        ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'),
-        ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), ('\u1312', '\u1315'), ('\u1318', '\u135a'),
-        ('\u1380', '\u138f'), ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), ('\u166f', '\u167f'),
-        ('\u1681', '\u169a'), ('\u16a0', '\u16ea'), ('\u16f1', '\u16f8'), ('\u1700', '\u170c'),
-        ('\u170e', '\u1711'), ('\u1720', '\u1731'), ('\u1740', '\u1751'), ('\u1760', '\u176c'),
-        ('\u176e', '\u1770'), ('\u1780', '\u17b3'), ('\u17dc', '\u17dc'), ('\u1820', '\u1842'),
-        ('\u1844', '\u1877'), ('\u1880', '\u18a8'), ('\u18aa', '\u18aa'), ('\u18b0', '\u18f5'),
-        ('\u1900', '\u191e'), ('\u1950', '\u196d'), ('\u1970', '\u1974'), ('\u1980', '\u19ab'),
-        ('\u19c1', '\u19c7'), ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), ('\u1b05', '\u1b33'),
-        ('\u1b45', '\u1b4b'), ('\u1b83', '\u1ba0'), ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'),
-        ('\u1c00', '\u1c23'), ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), ('\u1ce9', '\u1cec'),
-        ('\u1cee', '\u1cf1'), ('\u1cf5', '\u1cf6'), ('\u2135', '\u2138'), ('\u2d30', '\u2d67'),
-        ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'),
-        ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'),
-        ('\u2dd8', '\u2dde'), ('\u3006', '\u3006'), ('\u303c', '\u303c'), ('\u3041', '\u3096'),
-        ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), ('\u30ff', '\u30ff'), ('\u3105', '\u312d'),
-        ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), ('\u3400', '\u3400'),
-        ('\u4db5', '\u4db5'), ('\u4e00', '\u4e00'), ('\u9fcc', '\u9fcc'), ('\ua000', '\ua014'),
-        ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), ('\ua500', '\ua60b'), ('\ua610', '\ua61f'),
-        ('\ua62a', '\ua62b'), ('\ua66e', '\ua66e'), ('\ua6a0', '\ua6e5'), ('\ua7f7', '\ua7f7'),
-        ('\ua7fb', '\ua801'), ('\ua803', '\ua805'), ('\ua807', '\ua80a'), ('\ua80c', '\ua822'),
-        ('\ua840', '\ua873'), ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'),
-        ('\ua90a', '\ua925'), ('\ua930', '\ua946'), ('\ua960', '\ua97c'), ('\ua984', '\ua9b2'),
-        ('\ua9e0', '\ua9e4'), ('\ua9e7', '\ua9ef'), ('\ua9fa', '\ua9fe'), ('\uaa00', '\uaa28'),
-        ('\uaa40', '\uaa42'), ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), ('\uaa71', '\uaa76'),
-        ('\uaa7a', '\uaa7a'), ('\uaa7e', '\uaaaf'), ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'),
-        ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'),
-        ('\uaae0', '\uaaea'), ('\uaaf2', '\uaaf2'), ('\uab01', '\uab06'), ('\uab09', '\uab0e'),
-        ('\uab11', '\uab16'), ('\uab20', '\uab26'), ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'),
-        ('\uac00', '\uac00'), ('\ud7a3', '\ud7a3'), ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'),
-        ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), ('\ufb1d', '\ufb1d'), ('\ufb1f', '\ufb28'),
-        ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'),
-        ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'),
-        ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdfb'), ('\ufe70', '\ufe74'), ('\ufe76', '\ufefc'),
-        ('\uff66', '\uff6f'), ('\uff71', '\uff9d'), ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'),
-        ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), ('\U00010000',
-        '\U0001000b'), ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), ('\U0001003c',
-        '\U0001003d'), ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), ('\U00010080',
-        '\U000100fa'), ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'), ('\U00010300',
-        '\U0001031f'), ('\U00010330', '\U00010340'), ('\U00010342', '\U00010349'), ('\U00010350',
-        '\U00010375'), ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), ('\U000103c8',
-        '\U000103cf'), ('\U00010450', '\U0001049d'), ('\U00010500', '\U00010527'), ('\U00010530',
-        '\U00010563'), ('\U00010600', '\U00010736'), ('\U00010740', '\U00010755'), ('\U00010760',
-        '\U00010767'), ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), ('\U0001080a',
-        '\U00010835'), ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), ('\U0001083f',
-        '\U00010855'), ('\U00010860', '\U00010876'), ('\U00010880', '\U0001089e'), ('\U00010900',
-        '\U00010915'), ('\U00010920', '\U00010939'), ('\U00010980', '\U000109b7'), ('\U000109be',
-        '\U000109bf'), ('\U00010a00', '\U00010a00'), ('\U00010a10', '\U00010a13'), ('\U00010a15',
-        '\U00010a17'), ('\U00010a19', '\U00010a33'), ('\U00010a60', '\U00010a7c'), ('\U00010a80',
-        '\U00010a9c'), ('\U00010ac0', '\U00010ac7'), ('\U00010ac9', '\U00010ae4'), ('\U00010b00',
-        '\U00010b35'), ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), ('\U00010b80',
-        '\U00010b91'), ('\U00010c00', '\U00010c48'), ('\U00011003', '\U00011037'), ('\U00011083',
-        '\U000110af'), ('\U000110d0', '\U000110e8'), ('\U00011103', '\U00011126'), ('\U00011150',
-        '\U00011172'), ('\U00011176', '\U00011176'), ('\U00011183', '\U000111b2'), ('\U000111c1',
-        '\U000111c4'), ('\U000111da', '\U000111da'), ('\U00011200', '\U00011211'), ('\U00011213',
-        '\U0001122b'), ('\U000112b0', '\U000112de'), ('\U00011305', '\U0001130c'), ('\U0001130f',
-        '\U00011310'), ('\U00011313', '\U00011328'), ('\U0001132a', '\U00011330'), ('\U00011332',
-        '\U00011333'), ('\U00011335', '\U00011339'), ('\U0001133d', '\U0001133d'), ('\U0001135d',
-        '\U00011361'), ('\U00011480', '\U000114af'), ('\U000114c4', '\U000114c5'), ('\U000114c7',
-        '\U000114c7'), ('\U00011580', '\U000115ae'), ('\U00011600', '\U0001162f'), ('\U00011644',
-        '\U00011644'), ('\U00011680', '\U000116aa'), ('\U000118ff', '\U000118ff'), ('\U00011ac0',
-        '\U00011af8'), ('\U00012000', '\U00012398'), ('\U00013000', '\U0001342e'), ('\U00016800',
-        '\U00016a38'), ('\U00016a40', '\U00016a5e'), ('\U00016ad0', '\U00016aed'), ('\U00016b00',
-        '\U00016b2f'), ('\U00016b63', '\U00016b77'), ('\U00016b7d', '\U00016b8f'), ('\U00016f00',
-        '\U00016f44'), ('\U00016f50', '\U00016f50'), ('\U0001b000', '\U0001b001'), ('\U0001bc00',
-        '\U0001bc6a'), ('\U0001bc70', '\U0001bc7c'), ('\U0001bc80', '\U0001bc88'), ('\U0001bc90',
-        '\U0001bc99'), ('\U0001e800', '\U0001e8c4'), ('\U0001ee00', '\U0001ee03'), ('\U0001ee05',
-        '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), ('\U0001ee27',
-        '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), ('\U0001ee39',
-        '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), ('\U0001ee47',
-        '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d',
-        '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), ('\U0001ee57',
-        '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d',
-        '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), ('\U0001ee64',
-        '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74',
-        '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80',
-        '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), ('\U0001eea5',
-        '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U00020000'), ('\U0002a6d6',
-        '\U0002a6d6'), ('\U0002a700', '\U0002a700'), ('\U0002b734', '\U0002b734'), ('\U0002b740',
-        '\U0002b740'), ('\U0002b81d', '\U0002b81d'), ('\U0002f800', '\U0002fa1d')
+        ('\u{aa}', '\u{aa}'), ('\u{ba}', '\u{ba}'), ('\u{1bb}', '\u{1bb}'), ('\u{1c0}', '\u{1c3}'),
+        ('\u{294}', '\u{294}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'), ('\u{620}',
+        '\u{63f}'), ('\u{641}', '\u{64a}'), ('\u{66e}', '\u{66f}'), ('\u{671}', '\u{6d3}'),
+        ('\u{6d5}', '\u{6d5}'), ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}',
+        '\u{6ff}'), ('\u{710}', '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'),
+        ('\u{7b1}', '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{800}', '\u{815}'), ('\u{840}',
+        '\u{858}'), ('\u{8a0}', '\u{8b2}'), ('\u{904}', '\u{939}'), ('\u{93d}', '\u{93d}'),
+        ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'), ('\u{972}', '\u{980}'), ('\u{985}',
+        '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'), ('\u{9bd}', '\u{9bd}'), ('\u{9ce}',
+        '\u{9ce}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'), ('\u{9f0}', '\u{9f1}'),
+        ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'), ('\u{a2a}',
+        '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'),
+        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a72}', '\u{a74}'), ('\u{a85}',
+        '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'),
+        ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'), ('\u{abd}', '\u{abd}'), ('\u{ad0}',
+        '\u{ad0}'), ('\u{ae0}', '\u{ae1}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'),
+        ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'), ('\u{b35}',
+        '\u{b39}'), ('\u{b3d}', '\u{b3d}'), ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b61}'),
+        ('\u{b71}', '\u{b71}'), ('\u{b83}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}',
+        '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'), ('\u{bae}',
+        '\u{bb9}'), ('\u{bd0}', '\u{bd0}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
+        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'), ('\u{c58}',
+        '\u{c59}'), ('\u{c60}', '\u{c61}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbd}',
+        '\u{cbd}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'), ('\u{cf1}', '\u{cf2}'),
+        ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'), ('\u{d3d}',
+        '\u{d3d}'), ('\u{d4e}', '\u{d4e}'), ('\u{d60}', '\u{d61}'), ('\u{d7a}', '\u{d7f}'),
+        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'), ('\u{dbd}',
+        '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{e01}', '\u{e30}'), ('\u{e32}', '\u{e33}'),
+        ('\u{e40}', '\u{e45}'), ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}',
+        '\u{e88}'), ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'),
+        ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}',
+        '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb2}', '\u{eb3}'),
+        ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{edc}', '\u{edf}'), ('\u{f00}',
+        '\u{f00}'), ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'),
+        ('\u{1000}', '\u{102a}'), ('\u{103f}', '\u{103f}'), ('\u{1050}', '\u{1055}'), ('\u{105a}',
+        '\u{105d}'), ('\u{1061}', '\u{1061}'), ('\u{1065}', '\u{1066}'), ('\u{106e}', '\u{1070}'),
+        ('\u{1075}', '\u{1081}'), ('\u{108e}', '\u{108e}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fd}',
+        '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}', '\u{1258}'),
+        ('\u{125a}', '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}',
+        '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}', '\u{12c0}'),
+        ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}',
+        '\u{1315}'), ('\u{1318}', '\u{135a}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}', '\u{13f4}'),
+        ('\u{1401}', '\u{166c}'), ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
+        '\u{16ea}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}', '\u{170c}'), ('\u{170e}', '\u{1711}'),
+        ('\u{1720}', '\u{1731}'), ('\u{1740}', '\u{1751}'), ('\u{1760}', '\u{176c}'), ('\u{176e}',
+        '\u{1770}'), ('\u{1780}', '\u{17b3}'), ('\u{17dc}', '\u{17dc}'), ('\u{1820}', '\u{1842}'),
+        ('\u{1844}', '\u{1877}'), ('\u{1880}', '\u{18a8}'), ('\u{18aa}', '\u{18aa}'), ('\u{18b0}',
+        '\u{18f5}'), ('\u{1900}', '\u{191e}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'), ('\u{19c1}', '\u{19c7}'), ('\u{1a00}', '\u{1a16}'), ('\u{1a20}',
+        '\u{1a54}'), ('\u{1b05}', '\u{1b33}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b83}', '\u{1ba0}'),
+        ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'), ('\u{1c00}', '\u{1c23}'), ('\u{1c4d}',
+        '\u{1c4f}'), ('\u{1c5a}', '\u{1c77}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'),
+        ('\u{1cf5}', '\u{1cf6}'), ('\u{2135}', '\u{2138}'), ('\u{2d30}', '\u{2d67}'), ('\u{2d80}',
+        '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'),
+        ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}',
+        '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{3006}', '\u{3006}'), ('\u{303c}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'), ('\u{309f}', '\u{309f}'), ('\u{30a1}', '\u{30fa}'), ('\u{30ff}',
+        '\u{30ff}'), ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'),
+        ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{3400}'), ('\u{4db5}', '\u{4db5}'), ('\u{4e00}',
+        '\u{4e00}'), ('\u{9fcc}', '\u{9fcc}'), ('\u{a000}', '\u{a014}'), ('\u{a016}', '\u{a48c}'),
+        ('\u{a4d0}', '\u{a4f7}'), ('\u{a500}', '\u{a60b}'), ('\u{a610}', '\u{a61f}'), ('\u{a62a}',
+        '\u{a62b}'), ('\u{a66e}', '\u{a66e}'), ('\u{a6a0}', '\u{a6e5}'), ('\u{a7f7}', '\u{a7f7}'),
+        ('\u{a7fb}', '\u{a801}'), ('\u{a803}', '\u{a805}'), ('\u{a807}', '\u{a80a}'), ('\u{a80c}',
+        '\u{a822}'), ('\u{a840}', '\u{a873}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8f2}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'), ('\u{a90a}', '\u{a925}'), ('\u{a930}', '\u{a946}'), ('\u{a960}',
+        '\u{a97c}'), ('\u{a984}', '\u{a9b2}'), ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e7}', '\u{a9ef}'),
+        ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}', '\u{aa28}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa44}',
+        '\u{aa4b}'), ('\u{aa60}', '\u{aa6f}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'),
+        ('\u{aa7e}', '\u{aaaf}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab5}', '\u{aab6}'), ('\u{aab9}',
+        '\u{aabd}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac2}', '\u{aac2}'), ('\u{aadb}', '\u{aadc}'),
+        ('\u{aae0}', '\u{aaea}'), ('\u{aaf2}', '\u{aaf2}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}',
+        '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'),
+        ('\u{abc0}', '\u{abe2}'), ('\u{ac00}', '\u{ac00}'), ('\u{d7a3}', '\u{d7a3}'), ('\u{d7b0}',
+        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}',
+        '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}',
+        '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'), ('\u{fe70}', '\u{fe74}'), ('\u{fe76}', '\u{fefc}'),
+        ('\u{ff66}', '\u{ff6f}'), ('\u{ff71}', '\u{ff9d}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}',
+        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'), ('\u{10280}', '\u{1029c}'), ('\u{102a0}', '\u{102d0}'),
+        ('\u{10300}', '\u{1031f}'), ('\u{10330}', '\u{10340}'), ('\u{10342}', '\u{10349}'),
+        ('\u{10350}', '\u{10375}'), ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'),
+        ('\u{103c8}', '\u{103cf}'), ('\u{10450}', '\u{1049d}'), ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'), ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'), ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'),
+        ('\u{10900}', '\u{10915}'), ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'), ('\u{10a00}', '\u{10a00}'), ('\u{10a10}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10b00}', '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{11003}', '\u{11037}'),
+        ('\u{11083}', '\u{110af}'), ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'),
+        ('\u{11150}', '\u{11172}'), ('\u{11176}', '\u{11176}'), ('\u{11183}', '\u{111b2}'),
+        ('\u{111c1}', '\u{111c4}'), ('\u{111da}', '\u{111da}'), ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{1122b}'), ('\u{112b0}', '\u{112de}'), ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133d}', '\u{1133d}'),
+        ('\u{1135d}', '\u{11361}'), ('\u{11480}', '\u{114af}'), ('\u{114c4}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'), ('\u{11580}', '\u{115ae}'), ('\u{11600}', '\u{1162f}'),
+        ('\u{11644}', '\u{11644}'), ('\u{11680}', '\u{116aa}'), ('\u{118ff}', '\u{118ff}'),
+        ('\u{11ac0}', '\u{11af8}'), ('\u{12000}', '\u{12398}'), ('\u{13000}', '\u{1342e}'),
+        ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'),
+        ('\u{16b00}', '\u{16b2f}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}'),
+        ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f50}'), ('\u{1b000}', '\u{1b001}'),
+        ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'), ('\u{1e800}', '\u{1e8c4}'), ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{20000}'),
+        ('\u{2a6d6}', '\u{2a6d6}'), ('\u{2a700}', '\u{2a700}'), ('\u{2b734}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b740}'), ('\u{2b81d}', '\u{2b81d}'), ('\u{2f800}', '\u{2fa1d}')
     ];
 
     pub static Lt_table: &'static [(char, char)] = &[
-        ('\u01c5', '\u01c5'), ('\u01c8', '\u01c8'), ('\u01cb', '\u01cb'), ('\u01f2', '\u01f2'),
-        ('\u1f88', '\u1f8f'), ('\u1f98', '\u1f9f'), ('\u1fa8', '\u1faf'), ('\u1fbc', '\u1fbc'),
-        ('\u1fcc', '\u1fcc'), ('\u1ffc', '\u1ffc')
+        ('\u{1c5}', '\u{1c5}'), ('\u{1c8}', '\u{1c8}'), ('\u{1cb}', '\u{1cb}'), ('\u{1f2}',
+        '\u{1f2}'), ('\u{1f88}', '\u{1f8f}'), ('\u{1f98}', '\u{1f9f}'), ('\u{1fa8}', '\u{1faf}'),
+        ('\u{1fbc}', '\u{1fbc}'), ('\u{1fcc}', '\u{1fcc}'), ('\u{1ffc}', '\u{1ffc}')
     ];
 
     pub static Lu_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\u00c0', '\u00d6'), ('\u00d8', '\u00de'), ('\u0100', '\u0100'),
-        ('\u0102', '\u0102'), ('\u0104', '\u0104'), ('\u0106', '\u0106'), ('\u0108', '\u0108'),
-        ('\u010a', '\u010a'), ('\u010c', '\u010c'), ('\u010e', '\u010e'), ('\u0110', '\u0110'),
-        ('\u0112', '\u0112'), ('\u0114', '\u0114'), ('\u0116', '\u0116'), ('\u0118', '\u0118'),
-        ('\u011a', '\u011a'), ('\u011c', '\u011c'), ('\u011e', '\u011e'), ('\u0120', '\u0120'),
-        ('\u0122', '\u0122'), ('\u0124', '\u0124'), ('\u0126', '\u0126'), ('\u0128', '\u0128'),
-        ('\u012a', '\u012a'), ('\u012c', '\u012c'), ('\u012e', '\u012e'), ('\u0130', '\u0130'),
-        ('\u0132', '\u0132'), ('\u0134', '\u0134'), ('\u0136', '\u0136'), ('\u0139', '\u0139'),
-        ('\u013b', '\u013b'), ('\u013d', '\u013d'), ('\u013f', '\u013f'), ('\u0141', '\u0141'),
-        ('\u0143', '\u0143'), ('\u0145', '\u0145'), ('\u0147', '\u0147'), ('\u014a', '\u014a'),
-        ('\u014c', '\u014c'), ('\u014e', '\u014e'), ('\u0150', '\u0150'), ('\u0152', '\u0152'),
-        ('\u0154', '\u0154'), ('\u0156', '\u0156'), ('\u0158', '\u0158'), ('\u015a', '\u015a'),
-        ('\u015c', '\u015c'), ('\u015e', '\u015e'), ('\u0160', '\u0160'), ('\u0162', '\u0162'),
-        ('\u0164', '\u0164'), ('\u0166', '\u0166'), ('\u0168', '\u0168'), ('\u016a', '\u016a'),
-        ('\u016c', '\u016c'), ('\u016e', '\u016e'), ('\u0170', '\u0170'), ('\u0172', '\u0172'),
-        ('\u0174', '\u0174'), ('\u0176', '\u0176'), ('\u0178', '\u0179'), ('\u017b', '\u017b'),
-        ('\u017d', '\u017d'), ('\u0181', '\u0182'), ('\u0184', '\u0184'), ('\u0186', '\u0187'),
-        ('\u0189', '\u018b'), ('\u018e', '\u0191'), ('\u0193', '\u0194'), ('\u0196', '\u0198'),
-        ('\u019c', '\u019d'), ('\u019f', '\u01a0'), ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'),
-        ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'),
-        ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'),
-        ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'),
-        ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'),
-        ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), ('\u01db', '\u01db'), ('\u01de', '\u01de'),
-        ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'),
-        ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'),
-        ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'),
-        ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), ('\u0200', '\u0200'), ('\u0202', '\u0202'),
-        ('\u0204', '\u0204'), ('\u0206', '\u0206'), ('\u0208', '\u0208'), ('\u020a', '\u020a'),
-        ('\u020c', '\u020c'), ('\u020e', '\u020e'), ('\u0210', '\u0210'), ('\u0212', '\u0212'),
-        ('\u0214', '\u0214'), ('\u0216', '\u0216'), ('\u0218', '\u0218'), ('\u021a', '\u021a'),
-        ('\u021c', '\u021c'), ('\u021e', '\u021e'), ('\u0220', '\u0220'), ('\u0222', '\u0222'),
-        ('\u0224', '\u0224'), ('\u0226', '\u0226'), ('\u0228', '\u0228'), ('\u022a', '\u022a'),
-        ('\u022c', '\u022c'), ('\u022e', '\u022e'), ('\u0230', '\u0230'), ('\u0232', '\u0232'),
-        ('\u023a', '\u023b'), ('\u023d', '\u023e'), ('\u0241', '\u0241'), ('\u0243', '\u0246'),
-        ('\u0248', '\u0248'), ('\u024a', '\u024a'), ('\u024c', '\u024c'), ('\u024e', '\u024e'),
-        ('\u0370', '\u0370'), ('\u0372', '\u0372'), ('\u0376', '\u0376'), ('\u037f', '\u037f'),
-        ('\u0386', '\u0386'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e', '\u038f'),
-        ('\u0391', '\u03a1'), ('\u03a3', '\u03ab'), ('\u03cf', '\u03cf'), ('\u03d2', '\u03d4'),
-        ('\u03d8', '\u03d8'), ('\u03da', '\u03da'), ('\u03dc', '\u03dc'), ('\u03de', '\u03de'),
-        ('\u03e0', '\u03e0'), ('\u03e2', '\u03e2'), ('\u03e4', '\u03e4'), ('\u03e6', '\u03e6'),
-        ('\u03e8', '\u03e8'), ('\u03ea', '\u03ea'), ('\u03ec', '\u03ec'), ('\u03ee', '\u03ee'),
-        ('\u03f4', '\u03f4'), ('\u03f7', '\u03f7'), ('\u03f9', '\u03fa'), ('\u03fd', '\u042f'),
-        ('\u0460', '\u0460'), ('\u0462', '\u0462'), ('\u0464', '\u0464'), ('\u0466', '\u0466'),
-        ('\u0468', '\u0468'), ('\u046a', '\u046a'), ('\u046c', '\u046c'), ('\u046e', '\u046e'),
-        ('\u0470', '\u0470'), ('\u0472', '\u0472'), ('\u0474', '\u0474'), ('\u0476', '\u0476'),
-        ('\u0478', '\u0478'), ('\u047a', '\u047a'), ('\u047c', '\u047c'), ('\u047e', '\u047e'),
-        ('\u0480', '\u0480'), ('\u048a', '\u048a'), ('\u048c', '\u048c'), ('\u048e', '\u048e'),
-        ('\u0490', '\u0490'), ('\u0492', '\u0492'), ('\u0494', '\u0494'), ('\u0496', '\u0496'),
-        ('\u0498', '\u0498'), ('\u049a', '\u049a'), ('\u049c', '\u049c'), ('\u049e', '\u049e'),
-        ('\u04a0', '\u04a0'), ('\u04a2', '\u04a2'), ('\u04a4', '\u04a4'), ('\u04a6', '\u04a6'),
-        ('\u04a8', '\u04a8'), ('\u04aa', '\u04aa'), ('\u04ac', '\u04ac'), ('\u04ae', '\u04ae'),
-        ('\u04b0', '\u04b0'), ('\u04b2', '\u04b2'), ('\u04b4', '\u04b4'), ('\u04b6', '\u04b6'),
-        ('\u04b8', '\u04b8'), ('\u04ba', '\u04ba'), ('\u04bc', '\u04bc'), ('\u04be', '\u04be'),
-        ('\u04c0', '\u04c1'), ('\u04c3', '\u04c3'), ('\u04c5', '\u04c5'), ('\u04c7', '\u04c7'),
-        ('\u04c9', '\u04c9'), ('\u04cb', '\u04cb'), ('\u04cd', '\u04cd'), ('\u04d0', '\u04d0'),
-        ('\u04d2', '\u04d2'), ('\u04d4', '\u04d4'), ('\u04d6', '\u04d6'), ('\u04d8', '\u04d8'),
-        ('\u04da', '\u04da'), ('\u04dc', '\u04dc'), ('\u04de', '\u04de'), ('\u04e0', '\u04e0'),
-        ('\u04e2', '\u04e2'), ('\u04e4', '\u04e4'), ('\u04e6', '\u04e6'), ('\u04e8', '\u04e8'),
-        ('\u04ea', '\u04ea'), ('\u04ec', '\u04ec'), ('\u04ee', '\u04ee'), ('\u04f0', '\u04f0'),
-        ('\u04f2', '\u04f2'), ('\u04f4', '\u04f4'), ('\u04f6', '\u04f6'), ('\u04f8', '\u04f8'),
-        ('\u04fa', '\u04fa'), ('\u04fc', '\u04fc'), ('\u04fe', '\u04fe'), ('\u0500', '\u0500'),
-        ('\u0502', '\u0502'), ('\u0504', '\u0504'), ('\u0506', '\u0506'), ('\u0508', '\u0508'),
-        ('\u050a', '\u050a'), ('\u050c', '\u050c'), ('\u050e', '\u050e'), ('\u0510', '\u0510'),
-        ('\u0512', '\u0512'), ('\u0514', '\u0514'), ('\u0516', '\u0516'), ('\u0518', '\u0518'),
-        ('\u051a', '\u051a'), ('\u051c', '\u051c'), ('\u051e', '\u051e'), ('\u0520', '\u0520'),
-        ('\u0522', '\u0522'), ('\u0524', '\u0524'), ('\u0526', '\u0526'), ('\u0528', '\u0528'),
-        ('\u052a', '\u052a'), ('\u052c', '\u052c'), ('\u052e', '\u052e'), ('\u0531', '\u0556'),
-        ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), ('\u1e00', '\u1e00'),
-        ('\u1e02', '\u1e02'), ('\u1e04', '\u1e04'), ('\u1e06', '\u1e06'), ('\u1e08', '\u1e08'),
-        ('\u1e0a', '\u1e0a'), ('\u1e0c', '\u1e0c'), ('\u1e0e', '\u1e0e'), ('\u1e10', '\u1e10'),
-        ('\u1e12', '\u1e12'), ('\u1e14', '\u1e14'), ('\u1e16', '\u1e16'), ('\u1e18', '\u1e18'),
-        ('\u1e1a', '\u1e1a'), ('\u1e1c', '\u1e1c'), ('\u1e1e', '\u1e1e'), ('\u1e20', '\u1e20'),
-        ('\u1e22', '\u1e22'), ('\u1e24', '\u1e24'), ('\u1e26', '\u1e26'), ('\u1e28', '\u1e28'),
-        ('\u1e2a', '\u1e2a'), ('\u1e2c', '\u1e2c'), ('\u1e2e', '\u1e2e'), ('\u1e30', '\u1e30'),
-        ('\u1e32', '\u1e32'), ('\u1e34', '\u1e34'), ('\u1e36', '\u1e36'), ('\u1e38', '\u1e38'),
-        ('\u1e3a', '\u1e3a'), ('\u1e3c', '\u1e3c'), ('\u1e3e', '\u1e3e'), ('\u1e40', '\u1e40'),
-        ('\u1e42', '\u1e42'), ('\u1e44', '\u1e44'), ('\u1e46', '\u1e46'), ('\u1e48', '\u1e48'),
-        ('\u1e4a', '\u1e4a'), ('\u1e4c', '\u1e4c'), ('\u1e4e', '\u1e4e'), ('\u1e50', '\u1e50'),
-        ('\u1e52', '\u1e52'), ('\u1e54', '\u1e54'), ('\u1e56', '\u1e56'), ('\u1e58', '\u1e58'),
-        ('\u1e5a', '\u1e5a'), ('\u1e5c', '\u1e5c'), ('\u1e5e', '\u1e5e'), ('\u1e60', '\u1e60'),
-        ('\u1e62', '\u1e62'), ('\u1e64', '\u1e64'), ('\u1e66', '\u1e66'), ('\u1e68', '\u1e68'),
-        ('\u1e6a', '\u1e6a'), ('\u1e6c', '\u1e6c'), ('\u1e6e', '\u1e6e'), ('\u1e70', '\u1e70'),
-        ('\u1e72', '\u1e72'), ('\u1e74', '\u1e74'), ('\u1e76', '\u1e76'), ('\u1e78', '\u1e78'),
-        ('\u1e7a', '\u1e7a'), ('\u1e7c', '\u1e7c'), ('\u1e7e', '\u1e7e'), ('\u1e80', '\u1e80'),
-        ('\u1e82', '\u1e82'), ('\u1e84', '\u1e84'), ('\u1e86', '\u1e86'), ('\u1e88', '\u1e88'),
-        ('\u1e8a', '\u1e8a'), ('\u1e8c', '\u1e8c'), ('\u1e8e', '\u1e8e'), ('\u1e90', '\u1e90'),
-        ('\u1e92', '\u1e92'), ('\u1e94', '\u1e94'), ('\u1e9e', '\u1e9e'), ('\u1ea0', '\u1ea0'),
-        ('\u1ea2', '\u1ea2'), ('\u1ea4', '\u1ea4'), ('\u1ea6', '\u1ea6'), ('\u1ea8', '\u1ea8'),
-        ('\u1eaa', '\u1eaa'), ('\u1eac', '\u1eac'), ('\u1eae', '\u1eae'), ('\u1eb0', '\u1eb0'),
-        ('\u1eb2', '\u1eb2'), ('\u1eb4', '\u1eb4'), ('\u1eb6', '\u1eb6'), ('\u1eb8', '\u1eb8'),
-        ('\u1eba', '\u1eba'), ('\u1ebc', '\u1ebc'), ('\u1ebe', '\u1ebe'), ('\u1ec0', '\u1ec0'),
-        ('\u1ec2', '\u1ec2'), ('\u1ec4', '\u1ec4'), ('\u1ec6', '\u1ec6'), ('\u1ec8', '\u1ec8'),
-        ('\u1eca', '\u1eca'), ('\u1ecc', '\u1ecc'), ('\u1ece', '\u1ece'), ('\u1ed0', '\u1ed0'),
-        ('\u1ed2', '\u1ed2'), ('\u1ed4', '\u1ed4'), ('\u1ed6', '\u1ed6'), ('\u1ed8', '\u1ed8'),
-        ('\u1eda', '\u1eda'), ('\u1edc', '\u1edc'), ('\u1ede', '\u1ede'), ('\u1ee0', '\u1ee0'),
-        ('\u1ee2', '\u1ee2'), ('\u1ee4', '\u1ee4'), ('\u1ee6', '\u1ee6'), ('\u1ee8', '\u1ee8'),
-        ('\u1eea', '\u1eea'), ('\u1eec', '\u1eec'), ('\u1eee', '\u1eee'), ('\u1ef0', '\u1ef0'),
-        ('\u1ef2', '\u1ef2'), ('\u1ef4', '\u1ef4'), ('\u1ef6', '\u1ef6'), ('\u1ef8', '\u1ef8'),
-        ('\u1efa', '\u1efa'), ('\u1efc', '\u1efc'), ('\u1efe', '\u1efe'), ('\u1f08', '\u1f0f'),
-        ('\u1f18', '\u1f1d'), ('\u1f28', '\u1f2f'), ('\u1f38', '\u1f3f'), ('\u1f48', '\u1f4d'),
-        ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f5f'),
-        ('\u1f68', '\u1f6f'), ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), ('\u1fd8', '\u1fdb'),
-        ('\u1fe8', '\u1fec'), ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), ('\u2107', '\u2107'),
-        ('\u210b', '\u210d'), ('\u2110', '\u2112'), ('\u2115', '\u2115'), ('\u2119', '\u211d'),
-        ('\u2124', '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a', '\u212d'),
-        ('\u2130', '\u2133'), ('\u213e', '\u213f'), ('\u2145', '\u2145'), ('\u2183', '\u2183'),
-        ('\u2c00', '\u2c2e'), ('\u2c60', '\u2c60'), ('\u2c62', '\u2c64'), ('\u2c67', '\u2c67'),
-        ('\u2c69', '\u2c69'), ('\u2c6b', '\u2c6b'), ('\u2c6d', '\u2c70'), ('\u2c72', '\u2c72'),
-        ('\u2c75', '\u2c75'), ('\u2c7e', '\u2c80'), ('\u2c82', '\u2c82'), ('\u2c84', '\u2c84'),
-        ('\u2c86', '\u2c86'), ('\u2c88', '\u2c88'), ('\u2c8a', '\u2c8a'), ('\u2c8c', '\u2c8c'),
-        ('\u2c8e', '\u2c8e'), ('\u2c90', '\u2c90'), ('\u2c92', '\u2c92'), ('\u2c94', '\u2c94'),
-        ('\u2c96', '\u2c96'), ('\u2c98', '\u2c98'), ('\u2c9a', '\u2c9a'), ('\u2c9c', '\u2c9c'),
-        ('\u2c9e', '\u2c9e'), ('\u2ca0', '\u2ca0'), ('\u2ca2', '\u2ca2'), ('\u2ca4', '\u2ca4'),
-        ('\u2ca6', '\u2ca6'), ('\u2ca8', '\u2ca8'), ('\u2caa', '\u2caa'), ('\u2cac', '\u2cac'),
-        ('\u2cae', '\u2cae'), ('\u2cb0', '\u2cb0'), ('\u2cb2', '\u2cb2'), ('\u2cb4', '\u2cb4'),
-        ('\u2cb6', '\u2cb6'), ('\u2cb8', '\u2cb8'), ('\u2cba', '\u2cba'), ('\u2cbc', '\u2cbc'),
-        ('\u2cbe', '\u2cbe'), ('\u2cc0', '\u2cc0'), ('\u2cc2', '\u2cc2'), ('\u2cc4', '\u2cc4'),
-        ('\u2cc6', '\u2cc6'), ('\u2cc8', '\u2cc8'), ('\u2cca', '\u2cca'), ('\u2ccc', '\u2ccc'),
-        ('\u2cce', '\u2cce'), ('\u2cd0', '\u2cd0'), ('\u2cd2', '\u2cd2'), ('\u2cd4', '\u2cd4'),
-        ('\u2cd6', '\u2cd6'), ('\u2cd8', '\u2cd8'), ('\u2cda', '\u2cda'), ('\u2cdc', '\u2cdc'),
-        ('\u2cde', '\u2cde'), ('\u2ce0', '\u2ce0'), ('\u2ce2', '\u2ce2'), ('\u2ceb', '\u2ceb'),
-        ('\u2ced', '\u2ced'), ('\u2cf2', '\u2cf2'), ('\ua640', '\ua640'), ('\ua642', '\ua642'),
-        ('\ua644', '\ua644'), ('\ua646', '\ua646'), ('\ua648', '\ua648'), ('\ua64a', '\ua64a'),
-        ('\ua64c', '\ua64c'), ('\ua64e', '\ua64e'), ('\ua650', '\ua650'), ('\ua652', '\ua652'),
-        ('\ua654', '\ua654'), ('\ua656', '\ua656'), ('\ua658', '\ua658'), ('\ua65a', '\ua65a'),
-        ('\ua65c', '\ua65c'), ('\ua65e', '\ua65e'), ('\ua660', '\ua660'), ('\ua662', '\ua662'),
-        ('\ua664', '\ua664'), ('\ua666', '\ua666'), ('\ua668', '\ua668'), ('\ua66a', '\ua66a'),
-        ('\ua66c', '\ua66c'), ('\ua680', '\ua680'), ('\ua682', '\ua682'), ('\ua684', '\ua684'),
-        ('\ua686', '\ua686'), ('\ua688', '\ua688'), ('\ua68a', '\ua68a'), ('\ua68c', '\ua68c'),
-        ('\ua68e', '\ua68e'), ('\ua690', '\ua690'), ('\ua692', '\ua692'), ('\ua694', '\ua694'),
-        ('\ua696', '\ua696'), ('\ua698', '\ua698'), ('\ua69a', '\ua69a'), ('\ua722', '\ua722'),
-        ('\ua724', '\ua724'), ('\ua726', '\ua726'), ('\ua728', '\ua728'), ('\ua72a', '\ua72a'),
-        ('\ua72c', '\ua72c'), ('\ua72e', '\ua72e'), ('\ua732', '\ua732'), ('\ua734', '\ua734'),
-        ('\ua736', '\ua736'), ('\ua738', '\ua738'), ('\ua73a', '\ua73a'), ('\ua73c', '\ua73c'),
-        ('\ua73e', '\ua73e'), ('\ua740', '\ua740'), ('\ua742', '\ua742'), ('\ua744', '\ua744'),
-        ('\ua746', '\ua746'), ('\ua748', '\ua748'), ('\ua74a', '\ua74a'), ('\ua74c', '\ua74c'),
-        ('\ua74e', '\ua74e'), ('\ua750', '\ua750'), ('\ua752', '\ua752'), ('\ua754', '\ua754'),
-        ('\ua756', '\ua756'), ('\ua758', '\ua758'), ('\ua75a', '\ua75a'), ('\ua75c', '\ua75c'),
-        ('\ua75e', '\ua75e'), ('\ua760', '\ua760'), ('\ua762', '\ua762'), ('\ua764', '\ua764'),
-        ('\ua766', '\ua766'), ('\ua768', '\ua768'), ('\ua76a', '\ua76a'), ('\ua76c', '\ua76c'),
-        ('\ua76e', '\ua76e'), ('\ua779', '\ua779'), ('\ua77b', '\ua77b'), ('\ua77d', '\ua77e'),
-        ('\ua780', '\ua780'), ('\ua782', '\ua782'), ('\ua784', '\ua784'), ('\ua786', '\ua786'),
-        ('\ua78b', '\ua78b'), ('\ua78d', '\ua78d'), ('\ua790', '\ua790'), ('\ua792', '\ua792'),
-        ('\ua796', '\ua796'), ('\ua798', '\ua798'), ('\ua79a', '\ua79a'), ('\ua79c', '\ua79c'),
-        ('\ua79e', '\ua79e'), ('\ua7a0', '\ua7a0'), ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'),
-        ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'), ('\ua7aa', '\ua7ad'), ('\ua7b0', '\ua7b1'),
-        ('\uff21', '\uff3a'), ('\U00010400', '\U00010427'), ('\U000118a0', '\U000118bf'),
-        ('\U0001d400', '\U0001d419'), ('\U0001d434', '\U0001d44d'), ('\U0001d468', '\U0001d481'),
-        ('\U0001d49c', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'),
-        ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b5'),
-        ('\U0001d4d0', '\U0001d4e9'), ('\U0001d504', '\U0001d505'), ('\U0001d507', '\U0001d50a'),
-        ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), ('\U0001d538', '\U0001d539'),
-        ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'),
-        ('\U0001d54a', '\U0001d550'), ('\U0001d56c', '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'),
-        ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608', '\U0001d621'), ('\U0001d63c', '\U0001d655'),
-        ('\U0001d670', '\U0001d689'), ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'),
-        ('\U0001d71c', '\U0001d734'), ('\U0001d756', '\U0001d76e'), ('\U0001d790', '\U0001d7a8'),
-        ('\U0001d7ca', '\U0001d7ca')
+        ('\u{41}', '\u{5a}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{de}'), ('\u{100}', '\u{100}'),
+        ('\u{102}', '\u{102}'), ('\u{104}', '\u{104}'), ('\u{106}', '\u{106}'), ('\u{108}',
+        '\u{108}'), ('\u{10a}', '\u{10a}'), ('\u{10c}', '\u{10c}'), ('\u{10e}', '\u{10e}'),
+        ('\u{110}', '\u{110}'), ('\u{112}', '\u{112}'), ('\u{114}', '\u{114}'), ('\u{116}',
+        '\u{116}'), ('\u{118}', '\u{118}'), ('\u{11a}', '\u{11a}'), ('\u{11c}', '\u{11c}'),
+        ('\u{11e}', '\u{11e}'), ('\u{120}', '\u{120}'), ('\u{122}', '\u{122}'), ('\u{124}',
+        '\u{124}'), ('\u{126}', '\u{126}'), ('\u{128}', '\u{128}'), ('\u{12a}', '\u{12a}'),
+        ('\u{12c}', '\u{12c}'), ('\u{12e}', '\u{12e}'), ('\u{130}', '\u{130}'), ('\u{132}',
+        '\u{132}'), ('\u{134}', '\u{134}'), ('\u{136}', '\u{136}'), ('\u{139}', '\u{139}'),
+        ('\u{13b}', '\u{13b}'), ('\u{13d}', '\u{13d}'), ('\u{13f}', '\u{13f}'), ('\u{141}',
+        '\u{141}'), ('\u{143}', '\u{143}'), ('\u{145}', '\u{145}'), ('\u{147}', '\u{147}'),
+        ('\u{14a}', '\u{14a}'), ('\u{14c}', '\u{14c}'), ('\u{14e}', '\u{14e}'), ('\u{150}',
+        '\u{150}'), ('\u{152}', '\u{152}'), ('\u{154}', '\u{154}'), ('\u{156}', '\u{156}'),
+        ('\u{158}', '\u{158}'), ('\u{15a}', '\u{15a}'), ('\u{15c}', '\u{15c}'), ('\u{15e}',
+        '\u{15e}'), ('\u{160}', '\u{160}'), ('\u{162}', '\u{162}'), ('\u{164}', '\u{164}'),
+        ('\u{166}', '\u{166}'), ('\u{168}', '\u{168}'), ('\u{16a}', '\u{16a}'), ('\u{16c}',
+        '\u{16c}'), ('\u{16e}', '\u{16e}'), ('\u{170}', '\u{170}'), ('\u{172}', '\u{172}'),
+        ('\u{174}', '\u{174}'), ('\u{176}', '\u{176}'), ('\u{178}', '\u{179}'), ('\u{17b}',
+        '\u{17b}'), ('\u{17d}', '\u{17d}'), ('\u{181}', '\u{182}'), ('\u{184}', '\u{184}'),
+        ('\u{186}', '\u{187}'), ('\u{189}', '\u{18b}'), ('\u{18e}', '\u{191}'), ('\u{193}',
+        '\u{194}'), ('\u{196}', '\u{198}'), ('\u{19c}', '\u{19d}'), ('\u{19f}', '\u{1a0}'),
+        ('\u{1a2}', '\u{1a2}'), ('\u{1a4}', '\u{1a4}'), ('\u{1a6}', '\u{1a7}'), ('\u{1a9}',
+        '\u{1a9}'), ('\u{1ac}', '\u{1ac}'), ('\u{1ae}', '\u{1af}'), ('\u{1b1}', '\u{1b3}'),
+        ('\u{1b5}', '\u{1b5}'), ('\u{1b7}', '\u{1b8}'), ('\u{1bc}', '\u{1bc}'), ('\u{1c4}',
+        '\u{1c4}'), ('\u{1c7}', '\u{1c7}'), ('\u{1ca}', '\u{1ca}'), ('\u{1cd}', '\u{1cd}'),
+        ('\u{1cf}', '\u{1cf}'), ('\u{1d1}', '\u{1d1}'), ('\u{1d3}', '\u{1d3}'), ('\u{1d5}',
+        '\u{1d5}'), ('\u{1d7}', '\u{1d7}'), ('\u{1d9}', '\u{1d9}'), ('\u{1db}', '\u{1db}'),
+        ('\u{1de}', '\u{1de}'), ('\u{1e0}', '\u{1e0}'), ('\u{1e2}', '\u{1e2}'), ('\u{1e4}',
+        '\u{1e4}'), ('\u{1e6}', '\u{1e6}'), ('\u{1e8}', '\u{1e8}'), ('\u{1ea}', '\u{1ea}'),
+        ('\u{1ec}', '\u{1ec}'), ('\u{1ee}', '\u{1ee}'), ('\u{1f1}', '\u{1f1}'), ('\u{1f4}',
+        '\u{1f4}'), ('\u{1f6}', '\u{1f8}'), ('\u{1fa}', '\u{1fa}'), ('\u{1fc}', '\u{1fc}'),
+        ('\u{1fe}', '\u{1fe}'), ('\u{200}', '\u{200}'), ('\u{202}', '\u{202}'), ('\u{204}',
+        '\u{204}'), ('\u{206}', '\u{206}'), ('\u{208}', '\u{208}'), ('\u{20a}', '\u{20a}'),
+        ('\u{20c}', '\u{20c}'), ('\u{20e}', '\u{20e}'), ('\u{210}', '\u{210}'), ('\u{212}',
+        '\u{212}'), ('\u{214}', '\u{214}'), ('\u{216}', '\u{216}'), ('\u{218}', '\u{218}'),
+        ('\u{21a}', '\u{21a}'), ('\u{21c}', '\u{21c}'), ('\u{21e}', '\u{21e}'), ('\u{220}',
+        '\u{220}'), ('\u{222}', '\u{222}'), ('\u{224}', '\u{224}'), ('\u{226}', '\u{226}'),
+        ('\u{228}', '\u{228}'), ('\u{22a}', '\u{22a}'), ('\u{22c}', '\u{22c}'), ('\u{22e}',
+        '\u{22e}'), ('\u{230}', '\u{230}'), ('\u{232}', '\u{232}'), ('\u{23a}', '\u{23b}'),
+        ('\u{23d}', '\u{23e}'), ('\u{241}', '\u{241}'), ('\u{243}', '\u{246}'), ('\u{248}',
+        '\u{248}'), ('\u{24a}', '\u{24a}'), ('\u{24c}', '\u{24c}'), ('\u{24e}', '\u{24e}'),
+        ('\u{370}', '\u{370}'), ('\u{372}', '\u{372}'), ('\u{376}', '\u{376}'), ('\u{37f}',
+        '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{38f}'), ('\u{391}', '\u{3a1}'), ('\u{3a3}', '\u{3ab}'), ('\u{3cf}',
+        '\u{3cf}'), ('\u{3d2}', '\u{3d4}'), ('\u{3d8}', '\u{3d8}'), ('\u{3da}', '\u{3da}'),
+        ('\u{3dc}', '\u{3dc}'), ('\u{3de}', '\u{3de}'), ('\u{3e0}', '\u{3e0}'), ('\u{3e2}',
+        '\u{3e2}'), ('\u{3e4}', '\u{3e4}'), ('\u{3e6}', '\u{3e6}'), ('\u{3e8}', '\u{3e8}'),
+        ('\u{3ea}', '\u{3ea}'), ('\u{3ec}', '\u{3ec}'), ('\u{3ee}', '\u{3ee}'), ('\u{3f4}',
+        '\u{3f4}'), ('\u{3f7}', '\u{3f7}'), ('\u{3f9}', '\u{3fa}'), ('\u{3fd}', '\u{42f}'),
+        ('\u{460}', '\u{460}'), ('\u{462}', '\u{462}'), ('\u{464}', '\u{464}'), ('\u{466}',
+        '\u{466}'), ('\u{468}', '\u{468}'), ('\u{46a}', '\u{46a}'), ('\u{46c}', '\u{46c}'),
+        ('\u{46e}', '\u{46e}'), ('\u{470}', '\u{470}'), ('\u{472}', '\u{472}'), ('\u{474}',
+        '\u{474}'), ('\u{476}', '\u{476}'), ('\u{478}', '\u{478}'), ('\u{47a}', '\u{47a}'),
+        ('\u{47c}', '\u{47c}'), ('\u{47e}', '\u{47e}'), ('\u{480}', '\u{480}'), ('\u{48a}',
+        '\u{48a}'), ('\u{48c}', '\u{48c}'), ('\u{48e}', '\u{48e}'), ('\u{490}', '\u{490}'),
+        ('\u{492}', '\u{492}'), ('\u{494}', '\u{494}'), ('\u{496}', '\u{496}'), ('\u{498}',
+        '\u{498}'), ('\u{49a}', '\u{49a}'), ('\u{49c}', '\u{49c}'), ('\u{49e}', '\u{49e}'),
+        ('\u{4a0}', '\u{4a0}'), ('\u{4a2}', '\u{4a2}'), ('\u{4a4}', '\u{4a4}'), ('\u{4a6}',
+        '\u{4a6}'), ('\u{4a8}', '\u{4a8}'), ('\u{4aa}', '\u{4aa}'), ('\u{4ac}', '\u{4ac}'),
+        ('\u{4ae}', '\u{4ae}'), ('\u{4b0}', '\u{4b0}'), ('\u{4b2}', '\u{4b2}'), ('\u{4b4}',
+        '\u{4b4}'), ('\u{4b6}', '\u{4b6}'), ('\u{4b8}', '\u{4b8}'), ('\u{4ba}', '\u{4ba}'),
+        ('\u{4bc}', '\u{4bc}'), ('\u{4be}', '\u{4be}'), ('\u{4c0}', '\u{4c1}'), ('\u{4c3}',
+        '\u{4c3}'), ('\u{4c5}', '\u{4c5}'), ('\u{4c7}', '\u{4c7}'), ('\u{4c9}', '\u{4c9}'),
+        ('\u{4cb}', '\u{4cb}'), ('\u{4cd}', '\u{4cd}'), ('\u{4d0}', '\u{4d0}'), ('\u{4d2}',
+        '\u{4d2}'), ('\u{4d4}', '\u{4d4}'), ('\u{4d6}', '\u{4d6}'), ('\u{4d8}', '\u{4d8}'),
+        ('\u{4da}', '\u{4da}'), ('\u{4dc}', '\u{4dc}'), ('\u{4de}', '\u{4de}'), ('\u{4e0}',
+        '\u{4e0}'), ('\u{4e2}', '\u{4e2}'), ('\u{4e4}', '\u{4e4}'), ('\u{4e6}', '\u{4e6}'),
+        ('\u{4e8}', '\u{4e8}'), ('\u{4ea}', '\u{4ea}'), ('\u{4ec}', '\u{4ec}'), ('\u{4ee}',
+        '\u{4ee}'), ('\u{4f0}', '\u{4f0}'), ('\u{4f2}', '\u{4f2}'), ('\u{4f4}', '\u{4f4}'),
+        ('\u{4f6}', '\u{4f6}'), ('\u{4f8}', '\u{4f8}'), ('\u{4fa}', '\u{4fa}'), ('\u{4fc}',
+        '\u{4fc}'), ('\u{4fe}', '\u{4fe}'), ('\u{500}', '\u{500}'), ('\u{502}', '\u{502}'),
+        ('\u{504}', '\u{504}'), ('\u{506}', '\u{506}'), ('\u{508}', '\u{508}'), ('\u{50a}',
+        '\u{50a}'), ('\u{50c}', '\u{50c}'), ('\u{50e}', '\u{50e}'), ('\u{510}', '\u{510}'),
+        ('\u{512}', '\u{512}'), ('\u{514}', '\u{514}'), ('\u{516}', '\u{516}'), ('\u{518}',
+        '\u{518}'), ('\u{51a}', '\u{51a}'), ('\u{51c}', '\u{51c}'), ('\u{51e}', '\u{51e}'),
+        ('\u{520}', '\u{520}'), ('\u{522}', '\u{522}'), ('\u{524}', '\u{524}'), ('\u{526}',
+        '\u{526}'), ('\u{528}', '\u{528}'), ('\u{52a}', '\u{52a}'), ('\u{52c}', '\u{52c}'),
+        ('\u{52e}', '\u{52e}'), ('\u{531}', '\u{556}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
+        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{1e00}', '\u{1e00}'), ('\u{1e02}', '\u{1e02}'),
+        ('\u{1e04}', '\u{1e04}'), ('\u{1e06}', '\u{1e06}'), ('\u{1e08}', '\u{1e08}'), ('\u{1e0a}',
+        '\u{1e0a}'), ('\u{1e0c}', '\u{1e0c}'), ('\u{1e0e}', '\u{1e0e}'), ('\u{1e10}', '\u{1e10}'),
+        ('\u{1e12}', '\u{1e12}'), ('\u{1e14}', '\u{1e14}'), ('\u{1e16}', '\u{1e16}'), ('\u{1e18}',
+        '\u{1e18}'), ('\u{1e1a}', '\u{1e1a}'), ('\u{1e1c}', '\u{1e1c}'), ('\u{1e1e}', '\u{1e1e}'),
+        ('\u{1e20}', '\u{1e20}'), ('\u{1e22}', '\u{1e22}'), ('\u{1e24}', '\u{1e24}'), ('\u{1e26}',
+        '\u{1e26}'), ('\u{1e28}', '\u{1e28}'), ('\u{1e2a}', '\u{1e2a}'), ('\u{1e2c}', '\u{1e2c}'),
+        ('\u{1e2e}', '\u{1e2e}'), ('\u{1e30}', '\u{1e30}'), ('\u{1e32}', '\u{1e32}'), ('\u{1e34}',
+        '\u{1e34}'), ('\u{1e36}', '\u{1e36}'), ('\u{1e38}', '\u{1e38}'), ('\u{1e3a}', '\u{1e3a}'),
+        ('\u{1e3c}', '\u{1e3c}'), ('\u{1e3e}', '\u{1e3e}'), ('\u{1e40}', '\u{1e40}'), ('\u{1e42}',
+        '\u{1e42}'), ('\u{1e44}', '\u{1e44}'), ('\u{1e46}', '\u{1e46}'), ('\u{1e48}', '\u{1e48}'),
+        ('\u{1e4a}', '\u{1e4a}'), ('\u{1e4c}', '\u{1e4c}'), ('\u{1e4e}', '\u{1e4e}'), ('\u{1e50}',
+        '\u{1e50}'), ('\u{1e52}', '\u{1e52}'), ('\u{1e54}', '\u{1e54}'), ('\u{1e56}', '\u{1e56}'),
+        ('\u{1e58}', '\u{1e58}'), ('\u{1e5a}', '\u{1e5a}'), ('\u{1e5c}', '\u{1e5c}'), ('\u{1e5e}',
+        '\u{1e5e}'), ('\u{1e60}', '\u{1e60}'), ('\u{1e62}', '\u{1e62}'), ('\u{1e64}', '\u{1e64}'),
+        ('\u{1e66}', '\u{1e66}'), ('\u{1e68}', '\u{1e68}'), ('\u{1e6a}', '\u{1e6a}'), ('\u{1e6c}',
+        '\u{1e6c}'), ('\u{1e6e}', '\u{1e6e}'), ('\u{1e70}', '\u{1e70}'), ('\u{1e72}', '\u{1e72}'),
+        ('\u{1e74}', '\u{1e74}'), ('\u{1e76}', '\u{1e76}'), ('\u{1e78}', '\u{1e78}'), ('\u{1e7a}',
+        '\u{1e7a}'), ('\u{1e7c}', '\u{1e7c}'), ('\u{1e7e}', '\u{1e7e}'), ('\u{1e80}', '\u{1e80}'),
+        ('\u{1e82}', '\u{1e82}'), ('\u{1e84}', '\u{1e84}'), ('\u{1e86}', '\u{1e86}'), ('\u{1e88}',
+        '\u{1e88}'), ('\u{1e8a}', '\u{1e8a}'), ('\u{1e8c}', '\u{1e8c}'), ('\u{1e8e}', '\u{1e8e}'),
+        ('\u{1e90}', '\u{1e90}'), ('\u{1e92}', '\u{1e92}'), ('\u{1e94}', '\u{1e94}'), ('\u{1e9e}',
+        '\u{1e9e}'), ('\u{1ea0}', '\u{1ea0}'), ('\u{1ea2}', '\u{1ea2}'), ('\u{1ea4}', '\u{1ea4}'),
+        ('\u{1ea6}', '\u{1ea6}'), ('\u{1ea8}', '\u{1ea8}'), ('\u{1eaa}', '\u{1eaa}'), ('\u{1eac}',
+        '\u{1eac}'), ('\u{1eae}', '\u{1eae}'), ('\u{1eb0}', '\u{1eb0}'), ('\u{1eb2}', '\u{1eb2}'),
+        ('\u{1eb4}', '\u{1eb4}'), ('\u{1eb6}', '\u{1eb6}'), ('\u{1eb8}', '\u{1eb8}'), ('\u{1eba}',
+        '\u{1eba}'), ('\u{1ebc}', '\u{1ebc}'), ('\u{1ebe}', '\u{1ebe}'), ('\u{1ec0}', '\u{1ec0}'),
+        ('\u{1ec2}', '\u{1ec2}'), ('\u{1ec4}', '\u{1ec4}'), ('\u{1ec6}', '\u{1ec6}'), ('\u{1ec8}',
+        '\u{1ec8}'), ('\u{1eca}', '\u{1eca}'), ('\u{1ecc}', '\u{1ecc}'), ('\u{1ece}', '\u{1ece}'),
+        ('\u{1ed0}', '\u{1ed0}'), ('\u{1ed2}', '\u{1ed2}'), ('\u{1ed4}', '\u{1ed4}'), ('\u{1ed6}',
+        '\u{1ed6}'), ('\u{1ed8}', '\u{1ed8}'), ('\u{1eda}', '\u{1eda}'), ('\u{1edc}', '\u{1edc}'),
+        ('\u{1ede}', '\u{1ede}'), ('\u{1ee0}', '\u{1ee0}'), ('\u{1ee2}', '\u{1ee2}'), ('\u{1ee4}',
+        '\u{1ee4}'), ('\u{1ee6}', '\u{1ee6}'), ('\u{1ee8}', '\u{1ee8}'), ('\u{1eea}', '\u{1eea}'),
+        ('\u{1eec}', '\u{1eec}'), ('\u{1eee}', '\u{1eee}'), ('\u{1ef0}', '\u{1ef0}'), ('\u{1ef2}',
+        '\u{1ef2}'), ('\u{1ef4}', '\u{1ef4}'), ('\u{1ef6}', '\u{1ef6}'), ('\u{1ef8}', '\u{1ef8}'),
+        ('\u{1efa}', '\u{1efa}'), ('\u{1efc}', '\u{1efc}'), ('\u{1efe}', '\u{1efe}'), ('\u{1f08}',
+        '\u{1f0f}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f28}', '\u{1f2f}'), ('\u{1f38}', '\u{1f3f}'),
+        ('\u{1f48}', '\u{1f4d}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}',
+        '\u{1f5d}'), ('\u{1f5f}', '\u{1f5f}'), ('\u{1f68}', '\u{1f6f}'), ('\u{1fb8}', '\u{1fbb}'),
+        ('\u{1fc8}', '\u{1fcb}'), ('\u{1fd8}', '\u{1fdb}'), ('\u{1fe8}', '\u{1fec}'), ('\u{1ff8}',
+        '\u{1ffb}'), ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210b}', '\u{210d}'),
+        ('\u{2110}', '\u{2112}'), ('\u{2115}', '\u{2115}'), ('\u{2119}', '\u{211d}'), ('\u{2124}',
+        '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'),
+        ('\u{2130}', '\u{2133}'), ('\u{213e}', '\u{213f}'), ('\u{2145}', '\u{2145}'), ('\u{2183}',
+        '\u{2183}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c60}', '\u{2c60}'), ('\u{2c62}', '\u{2c64}'),
+        ('\u{2c67}', '\u{2c67}'), ('\u{2c69}', '\u{2c69}'), ('\u{2c6b}', '\u{2c6b}'), ('\u{2c6d}',
+        '\u{2c70}'), ('\u{2c72}', '\u{2c72}'), ('\u{2c75}', '\u{2c75}'), ('\u{2c7e}', '\u{2c80}'),
+        ('\u{2c82}', '\u{2c82}'), ('\u{2c84}', '\u{2c84}'), ('\u{2c86}', '\u{2c86}'), ('\u{2c88}',
+        '\u{2c88}'), ('\u{2c8a}', '\u{2c8a}'), ('\u{2c8c}', '\u{2c8c}'), ('\u{2c8e}', '\u{2c8e}'),
+        ('\u{2c90}', '\u{2c90}'), ('\u{2c92}', '\u{2c92}'), ('\u{2c94}', '\u{2c94}'), ('\u{2c96}',
+        '\u{2c96}'), ('\u{2c98}', '\u{2c98}'), ('\u{2c9a}', '\u{2c9a}'), ('\u{2c9c}', '\u{2c9c}'),
+        ('\u{2c9e}', '\u{2c9e}'), ('\u{2ca0}', '\u{2ca0}'), ('\u{2ca2}', '\u{2ca2}'), ('\u{2ca4}',
+        '\u{2ca4}'), ('\u{2ca6}', '\u{2ca6}'), ('\u{2ca8}', '\u{2ca8}'), ('\u{2caa}', '\u{2caa}'),
+        ('\u{2cac}', '\u{2cac}'), ('\u{2cae}', '\u{2cae}'), ('\u{2cb0}', '\u{2cb0}'), ('\u{2cb2}',
+        '\u{2cb2}'), ('\u{2cb4}', '\u{2cb4}'), ('\u{2cb6}', '\u{2cb6}'), ('\u{2cb8}', '\u{2cb8}'),
+        ('\u{2cba}', '\u{2cba}'), ('\u{2cbc}', '\u{2cbc}'), ('\u{2cbe}', '\u{2cbe}'), ('\u{2cc0}',
+        '\u{2cc0}'), ('\u{2cc2}', '\u{2cc2}'), ('\u{2cc4}', '\u{2cc4}'), ('\u{2cc6}', '\u{2cc6}'),
+        ('\u{2cc8}', '\u{2cc8}'), ('\u{2cca}', '\u{2cca}'), ('\u{2ccc}', '\u{2ccc}'), ('\u{2cce}',
+        '\u{2cce}'), ('\u{2cd0}', '\u{2cd0}'), ('\u{2cd2}', '\u{2cd2}'), ('\u{2cd4}', '\u{2cd4}'),
+        ('\u{2cd6}', '\u{2cd6}'), ('\u{2cd8}', '\u{2cd8}'), ('\u{2cda}', '\u{2cda}'), ('\u{2cdc}',
+        '\u{2cdc}'), ('\u{2cde}', '\u{2cde}'), ('\u{2ce0}', '\u{2ce0}'), ('\u{2ce2}', '\u{2ce2}'),
+        ('\u{2ceb}', '\u{2ceb}'), ('\u{2ced}', '\u{2ced}'), ('\u{2cf2}', '\u{2cf2}'), ('\u{a640}',
+        '\u{a640}'), ('\u{a642}', '\u{a642}'), ('\u{a644}', '\u{a644}'), ('\u{a646}', '\u{a646}'),
+        ('\u{a648}', '\u{a648}'), ('\u{a64a}', '\u{a64a}'), ('\u{a64c}', '\u{a64c}'), ('\u{a64e}',
+        '\u{a64e}'), ('\u{a650}', '\u{a650}'), ('\u{a652}', '\u{a652}'), ('\u{a654}', '\u{a654}'),
+        ('\u{a656}', '\u{a656}'), ('\u{a658}', '\u{a658}'), ('\u{a65a}', '\u{a65a}'), ('\u{a65c}',
+        '\u{a65c}'), ('\u{a65e}', '\u{a65e}'), ('\u{a660}', '\u{a660}'), ('\u{a662}', '\u{a662}'),
+        ('\u{a664}', '\u{a664}'), ('\u{a666}', '\u{a666}'), ('\u{a668}', '\u{a668}'), ('\u{a66a}',
+        '\u{a66a}'), ('\u{a66c}', '\u{a66c}'), ('\u{a680}', '\u{a680}'), ('\u{a682}', '\u{a682}'),
+        ('\u{a684}', '\u{a684}'), ('\u{a686}', '\u{a686}'), ('\u{a688}', '\u{a688}'), ('\u{a68a}',
+        '\u{a68a}'), ('\u{a68c}', '\u{a68c}'), ('\u{a68e}', '\u{a68e}'), ('\u{a690}', '\u{a690}'),
+        ('\u{a692}', '\u{a692}'), ('\u{a694}', '\u{a694}'), ('\u{a696}', '\u{a696}'), ('\u{a698}',
+        '\u{a698}'), ('\u{a69a}', '\u{a69a}'), ('\u{a722}', '\u{a722}'), ('\u{a724}', '\u{a724}'),
+        ('\u{a726}', '\u{a726}'), ('\u{a728}', '\u{a728}'), ('\u{a72a}', '\u{a72a}'), ('\u{a72c}',
+        '\u{a72c}'), ('\u{a72e}', '\u{a72e}'), ('\u{a732}', '\u{a732}'), ('\u{a734}', '\u{a734}'),
+        ('\u{a736}', '\u{a736}'), ('\u{a738}', '\u{a738}'), ('\u{a73a}', '\u{a73a}'), ('\u{a73c}',
+        '\u{a73c}'), ('\u{a73e}', '\u{a73e}'), ('\u{a740}', '\u{a740}'), ('\u{a742}', '\u{a742}'),
+        ('\u{a744}', '\u{a744}'), ('\u{a746}', '\u{a746}'), ('\u{a748}', '\u{a748}'), ('\u{a74a}',
+        '\u{a74a}'), ('\u{a74c}', '\u{a74c}'), ('\u{a74e}', '\u{a74e}'), ('\u{a750}', '\u{a750}'),
+        ('\u{a752}', '\u{a752}'), ('\u{a754}', '\u{a754}'), ('\u{a756}', '\u{a756}'), ('\u{a758}',
+        '\u{a758}'), ('\u{a75a}', '\u{a75a}'), ('\u{a75c}', '\u{a75c}'), ('\u{a75e}', '\u{a75e}'),
+        ('\u{a760}', '\u{a760}'), ('\u{a762}', '\u{a762}'), ('\u{a764}', '\u{a764}'), ('\u{a766}',
+        '\u{a766}'), ('\u{a768}', '\u{a768}'), ('\u{a76a}', '\u{a76a}'), ('\u{a76c}', '\u{a76c}'),
+        ('\u{a76e}', '\u{a76e}'), ('\u{a779}', '\u{a779}'), ('\u{a77b}', '\u{a77b}'), ('\u{a77d}',
+        '\u{a77e}'), ('\u{a780}', '\u{a780}'), ('\u{a782}', '\u{a782}'), ('\u{a784}', '\u{a784}'),
+        ('\u{a786}', '\u{a786}'), ('\u{a78b}', '\u{a78b}'), ('\u{a78d}', '\u{a78d}'), ('\u{a790}',
+        '\u{a790}'), ('\u{a792}', '\u{a792}'), ('\u{a796}', '\u{a796}'), ('\u{a798}', '\u{a798}'),
+        ('\u{a79a}', '\u{a79a}'), ('\u{a79c}', '\u{a79c}'), ('\u{a79e}', '\u{a79e}'), ('\u{a7a0}',
+        '\u{a7a0}'), ('\u{a7a2}', '\u{a7a2}'), ('\u{a7a4}', '\u{a7a4}'), ('\u{a7a6}', '\u{a7a6}'),
+        ('\u{a7a8}', '\u{a7a8}'), ('\u{a7aa}', '\u{a7ad}'), ('\u{a7b0}', '\u{a7b1}'), ('\u{ff21}',
+        '\u{ff3a}'), ('\u{10400}', '\u{10427}'), ('\u{118a0}', '\u{118bf}'), ('\u{1d400}',
+        '\u{1d419}'), ('\u{1d434}', '\u{1d44d}'), ('\u{1d468}', '\u{1d481}'), ('\u{1d49c}',
+        '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}',
+        '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b5}'), ('\u{1d4d0}',
+        '\u{1d4e9}'), ('\u{1d504}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}',
+        '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d538}', '\u{1d539}'), ('\u{1d53b}',
+        '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}',
+        '\u{1d550}'), ('\u{1d56c}', '\u{1d585}'), ('\u{1d5a0}', '\u{1d5b9}'), ('\u{1d5d4}',
+        '\u{1d5ed}'), ('\u{1d608}', '\u{1d621}'), ('\u{1d63c}', '\u{1d655}'), ('\u{1d670}',
+        '\u{1d689}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6e2}', '\u{1d6fa}'), ('\u{1d71c}',
+        '\u{1d734}'), ('\u{1d756}', '\u{1d76e}'), ('\u{1d790}', '\u{1d7a8}'), ('\u{1d7ca}',
+        '\u{1d7ca}')
     ];
 
     pub static M_table: &'static [(char, char)] = &[
-        ('\u0300', '\u036f'), ('\u0483', '\u0489'), ('\u0591', '\u05bd'), ('\u05bf', '\u05bf'),
-        ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), ('\u0610', '\u061a'),
-        ('\u064b', '\u065f'), ('\u0670', '\u0670'), ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'),
-        ('\u06e7', '\u06e8'), ('\u06ea', '\u06ed'), ('\u0711', '\u0711'), ('\u0730', '\u074a'),
-        ('\u07a6', '\u07b0'), ('\u07eb', '\u07f3'), ('\u0816', '\u0819'), ('\u081b', '\u0823'),
-        ('\u0825', '\u0827'), ('\u0829', '\u082d'), ('\u0859', '\u085b'), ('\u08e4', '\u0903'),
-        ('\u093a', '\u093c'), ('\u093e', '\u094f'), ('\u0951', '\u0957'), ('\u0962', '\u0963'),
-        ('\u0981', '\u0983'), ('\u09bc', '\u09bc'), ('\u09be', '\u09c4'), ('\u09c7', '\u09c8'),
-        ('\u09cb', '\u09cd'), ('\u09d7', '\u09d7'), ('\u09e2', '\u09e3'), ('\u0a01', '\u0a03'),
-        ('\u0a3c', '\u0a3c'), ('\u0a3e', '\u0a42'), ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'),
-        ('\u0a51', '\u0a51'), ('\u0a70', '\u0a71'), ('\u0a75', '\u0a75'), ('\u0a81', '\u0a83'),
-        ('\u0abc', '\u0abc'), ('\u0abe', '\u0ac5'), ('\u0ac7', '\u0ac9'), ('\u0acb', '\u0acd'),
-        ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b03'), ('\u0b3c', '\u0b3c'), ('\u0b3e', '\u0b44'),
-        ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4d'), ('\u0b56', '\u0b57'), ('\u0b62', '\u0b63'),
-        ('\u0b82', '\u0b82'), ('\u0bbe', '\u0bc2'), ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcd'),
-        ('\u0bd7', '\u0bd7'), ('\u0c00', '\u0c03'), ('\u0c3e', '\u0c44'), ('\u0c46', '\u0c48'),
-        ('\u0c4a', '\u0c4d'), ('\u0c55', '\u0c56'), ('\u0c62', '\u0c63'), ('\u0c81', '\u0c83'),
-        ('\u0cbc', '\u0cbc'), ('\u0cbe', '\u0cc4'), ('\u0cc6', '\u0cc8'), ('\u0cca', '\u0ccd'),
-        ('\u0cd5', '\u0cd6'), ('\u0ce2', '\u0ce3'), ('\u0d01', '\u0d03'), ('\u0d3e', '\u0d44'),
-        ('\u0d46', '\u0d48'), ('\u0d4a', '\u0d4d'), ('\u0d57', '\u0d57'), ('\u0d62', '\u0d63'),
-        ('\u0d82', '\u0d83'), ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd4'), ('\u0dd6', '\u0dd6'),
-        ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'), ('\u0e31', '\u0e31'), ('\u0e34', '\u0e3a'),
-        ('\u0e47', '\u0e4e'), ('\u0eb1', '\u0eb1'), ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'),
-        ('\u0ec8', '\u0ecd'), ('\u0f18', '\u0f19'), ('\u0f35', '\u0f35'), ('\u0f37', '\u0f37'),
-        ('\u0f39', '\u0f39'), ('\u0f3e', '\u0f3f'), ('\u0f71', '\u0f84'), ('\u0f86', '\u0f87'),
-        ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), ('\u0fc6', '\u0fc6'), ('\u102b', '\u103e'),
-        ('\u1056', '\u1059'), ('\u105e', '\u1060'), ('\u1062', '\u1064'), ('\u1067', '\u106d'),
-        ('\u1071', '\u1074'), ('\u1082', '\u108d'), ('\u108f', '\u108f'), ('\u109a', '\u109d'),
-        ('\u135d', '\u135f'), ('\u1712', '\u1714'), ('\u1732', '\u1734'), ('\u1752', '\u1753'),
-        ('\u1772', '\u1773'), ('\u17b4', '\u17d3'), ('\u17dd', '\u17dd'), ('\u180b', '\u180d'),
-        ('\u18a9', '\u18a9'), ('\u1920', '\u192b'), ('\u1930', '\u193b'), ('\u19b0', '\u19c0'),
-        ('\u19c8', '\u19c9'), ('\u1a17', '\u1a1b'), ('\u1a55', '\u1a5e'), ('\u1a60', '\u1a7c'),
-        ('\u1a7f', '\u1a7f'), ('\u1ab0', '\u1abe'), ('\u1b00', '\u1b04'), ('\u1b34', '\u1b44'),
-        ('\u1b6b', '\u1b73'), ('\u1b80', '\u1b82'), ('\u1ba1', '\u1bad'), ('\u1be6', '\u1bf3'),
-        ('\u1c24', '\u1c37'), ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce8'), ('\u1ced', '\u1ced'),
-        ('\u1cf2', '\u1cf4'), ('\u1cf8', '\u1cf9'), ('\u1dc0', '\u1df5'), ('\u1dfc', '\u1dff'),
-        ('\u20d0', '\u20f0'), ('\u2cef', '\u2cf1'), ('\u2d7f', '\u2d7f'), ('\u2de0', '\u2dff'),
-        ('\u302a', '\u302f'), ('\u3099', '\u309a'), ('\ua66f', '\ua672'), ('\ua674', '\ua67d'),
-        ('\ua69f', '\ua69f'), ('\ua6f0', '\ua6f1'), ('\ua802', '\ua802'), ('\ua806', '\ua806'),
-        ('\ua80b', '\ua80b'), ('\ua823', '\ua827'), ('\ua880', '\ua881'), ('\ua8b4', '\ua8c4'),
-        ('\ua8e0', '\ua8f1'), ('\ua926', '\ua92d'), ('\ua947', '\ua953'), ('\ua980', '\ua983'),
-        ('\ua9b3', '\ua9c0'), ('\ua9e5', '\ua9e5'), ('\uaa29', '\uaa36'), ('\uaa43', '\uaa43'),
-        ('\uaa4c', '\uaa4d'), ('\uaa7b', '\uaa7d'), ('\uaab0', '\uaab0'), ('\uaab2', '\uaab4'),
-        ('\uaab7', '\uaab8'), ('\uaabe', '\uaabf'), ('\uaac1', '\uaac1'), ('\uaaeb', '\uaaef'),
-        ('\uaaf5', '\uaaf6'), ('\uabe3', '\uabea'), ('\uabec', '\uabed'), ('\ufb1e', '\ufb1e'),
-        ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe2d'), ('\U000101fd', '\U000101fd'), ('\U000102e0',
-        '\U000102e0'), ('\U00010376', '\U0001037a'), ('\U00010a01', '\U00010a03'), ('\U00010a05',
-        '\U00010a06'), ('\U00010a0c', '\U00010a0f'), ('\U00010a38', '\U00010a3a'), ('\U00010a3f',
-        '\U00010a3f'), ('\U00010ae5', '\U00010ae6'), ('\U00011000', '\U00011002'), ('\U00011038',
-        '\U00011046'), ('\U0001107f', '\U00011082'), ('\U000110b0', '\U000110ba'), ('\U00011100',
-        '\U00011102'), ('\U00011127', '\U00011134'), ('\U00011173', '\U00011173'), ('\U00011180',
-        '\U00011182'), ('\U000111b3', '\U000111c0'), ('\U0001122c', '\U00011237'), ('\U000112df',
-        '\U000112ea'), ('\U00011301', '\U00011303'), ('\U0001133c', '\U0001133c'), ('\U0001133e',
-        '\U00011344'), ('\U00011347', '\U00011348'), ('\U0001134b', '\U0001134d'), ('\U00011357',
-        '\U00011357'), ('\U00011362', '\U00011363'), ('\U00011366', '\U0001136c'), ('\U00011370',
-        '\U00011374'), ('\U000114b0', '\U000114c3'), ('\U000115af', '\U000115b5'), ('\U000115b8',
-        '\U000115c0'), ('\U00011630', '\U00011640'), ('\U000116ab', '\U000116b7'), ('\U00016af0',
-        '\U00016af4'), ('\U00016b30', '\U00016b36'), ('\U00016f51', '\U00016f7e'), ('\U00016f8f',
-        '\U00016f92'), ('\U0001bc9d', '\U0001bc9e'), ('\U0001d165', '\U0001d169'), ('\U0001d16d',
-        '\U0001d172'), ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'), ('\U0001d1aa',
-        '\U0001d1ad'), ('\U0001d242', '\U0001d244'), ('\U0001e8d0', '\U0001e8d6'), ('\U000e0100',
-        '\U000e01ef')
+        ('\u{300}', '\u{36f}'), ('\u{483}', '\u{489}'), ('\u{591}', '\u{5bd}'), ('\u{5bf}',
+        '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'), ('\u{5c7}', '\u{5c7}'),
+        ('\u{610}', '\u{61a}'), ('\u{64b}', '\u{65f}'), ('\u{670}', '\u{670}'), ('\u{6d6}',
+        '\u{6dc}'), ('\u{6df}', '\u{6e4}'), ('\u{6e7}', '\u{6e8}'), ('\u{6ea}', '\u{6ed}'),
+        ('\u{711}', '\u{711}'), ('\u{730}', '\u{74a}'), ('\u{7a6}', '\u{7b0}'), ('\u{7eb}',
+        '\u{7f3}'), ('\u{816}', '\u{819}'), ('\u{81b}', '\u{823}'), ('\u{825}', '\u{827}'),
+        ('\u{829}', '\u{82d}'), ('\u{859}', '\u{85b}'), ('\u{8e4}', '\u{903}'), ('\u{93a}',
+        '\u{93c}'), ('\u{93e}', '\u{94f}'), ('\u{951}', '\u{957}'), ('\u{962}', '\u{963}'),
+        ('\u{981}', '\u{983}'), ('\u{9bc}', '\u{9bc}'), ('\u{9be}', '\u{9c4}'), ('\u{9c7}',
+        '\u{9c8}'), ('\u{9cb}', '\u{9cd}'), ('\u{9d7}', '\u{9d7}'), ('\u{9e2}', '\u{9e3}'),
+        ('\u{a01}', '\u{a03}'), ('\u{a3c}', '\u{a3c}'), ('\u{a3e}', '\u{a42}'), ('\u{a47}',
+        '\u{a48}'), ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'), ('\u{a70}', '\u{a71}'),
+        ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a83}'), ('\u{abc}', '\u{abc}'), ('\u{abe}',
+        '\u{ac5}'), ('\u{ac7}', '\u{ac9}'), ('\u{acb}', '\u{acd}'), ('\u{ae2}', '\u{ae3}'),
+        ('\u{b01}', '\u{b03}'), ('\u{b3c}', '\u{b3c}'), ('\u{b3e}', '\u{b44}'), ('\u{b47}',
+        '\u{b48}'), ('\u{b4b}', '\u{b4d}'), ('\u{b56}', '\u{b57}'), ('\u{b62}', '\u{b63}'),
+        ('\u{b82}', '\u{b82}'), ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'), ('\u{bca}',
+        '\u{bcd}'), ('\u{bd7}', '\u{bd7}'), ('\u{c00}', '\u{c03}'), ('\u{c3e}', '\u{c44}'),
+        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c62}',
+        '\u{c63}'), ('\u{c81}', '\u{c83}'), ('\u{cbc}', '\u{cbc}'), ('\u{cbe}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), ('\u{ce2}',
+        '\u{ce3}'), ('\u{d01}', '\u{d03}'), ('\u{d3e}', '\u{d44}'), ('\u{d46}', '\u{d48}'),
+        ('\u{d4a}', '\u{d4d}'), ('\u{d57}', '\u{d57}'), ('\u{d62}', '\u{d63}'), ('\u{d82}',
+        '\u{d83}'), ('\u{dca}', '\u{dca}'), ('\u{dcf}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'),
+        ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'), ('\u{e31}', '\u{e31}'), ('\u{e34}',
+        '\u{e3a}'), ('\u{e47}', '\u{e4e}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb4}', '\u{eb9}'),
+        ('\u{ebb}', '\u{ebc}'), ('\u{ec8}', '\u{ecd}'), ('\u{f18}', '\u{f19}'), ('\u{f35}',
+        '\u{f35}'), ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'), ('\u{f3e}', '\u{f3f}'),
+        ('\u{f71}', '\u{f84}'), ('\u{f86}', '\u{f87}'), ('\u{f8d}', '\u{f97}'), ('\u{f99}',
+        '\u{fbc}'), ('\u{fc6}', '\u{fc6}'), ('\u{102b}', '\u{103e}'), ('\u{1056}', '\u{1059}'),
+        ('\u{105e}', '\u{1060}'), ('\u{1062}', '\u{1064}'), ('\u{1067}', '\u{106d}'), ('\u{1071}',
+        '\u{1074}'), ('\u{1082}', '\u{108d}'), ('\u{108f}', '\u{108f}'), ('\u{109a}', '\u{109d}'),
+        ('\u{135d}', '\u{135f}'), ('\u{1712}', '\u{1714}'), ('\u{1732}', '\u{1734}'), ('\u{1752}',
+        '\u{1753}'), ('\u{1772}', '\u{1773}'), ('\u{17b4}', '\u{17d3}'), ('\u{17dd}', '\u{17dd}'),
+        ('\u{180b}', '\u{180d}'), ('\u{18a9}', '\u{18a9}'), ('\u{1920}', '\u{192b}'), ('\u{1930}',
+        '\u{193b}'), ('\u{19b0}', '\u{19c0}'), ('\u{19c8}', '\u{19c9}'), ('\u{1a17}', '\u{1a1b}'),
+        ('\u{1a55}', '\u{1a5e}'), ('\u{1a60}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a7f}'), ('\u{1ab0}',
+        '\u{1abe}'), ('\u{1b00}', '\u{1b04}'), ('\u{1b34}', '\u{1b44}'), ('\u{1b6b}', '\u{1b73}'),
+        ('\u{1b80}', '\u{1b82}'), ('\u{1ba1}', '\u{1bad}'), ('\u{1be6}', '\u{1bf3}'), ('\u{1c24}',
+        '\u{1c37}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce8}'), ('\u{1ced}', '\u{1ced}'),
+        ('\u{1cf2}', '\u{1cf4}'), ('\u{1cf8}', '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'), ('\u{1dfc}',
+        '\u{1dff}'), ('\u{20d0}', '\u{20f0}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2d7f}', '\u{2d7f}'),
+        ('\u{2de0}', '\u{2dff}'), ('\u{302a}', '\u{302f}'), ('\u{3099}', '\u{309a}'), ('\u{a66f}',
+        '\u{a672}'), ('\u{a674}', '\u{a67d}'), ('\u{a69f}', '\u{a69f}'), ('\u{a6f0}', '\u{a6f1}'),
+        ('\u{a802}', '\u{a802}'), ('\u{a806}', '\u{a806}'), ('\u{a80b}', '\u{a80b}'), ('\u{a823}',
+        '\u{a827}'), ('\u{a880}', '\u{a881}'), ('\u{a8b4}', '\u{a8c4}'), ('\u{a8e0}', '\u{a8f1}'),
+        ('\u{a926}', '\u{a92d}'), ('\u{a947}', '\u{a953}'), ('\u{a980}', '\u{a983}'), ('\u{a9b3}',
+        '\u{a9c0}'), ('\u{a9e5}', '\u{a9e5}'), ('\u{aa29}', '\u{aa36}'), ('\u{aa43}', '\u{aa43}'),
+        ('\u{aa4c}', '\u{aa4d}'), ('\u{aa7b}', '\u{aa7d}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab2}',
+        '\u{aab4}'), ('\u{aab7}', '\u{aab8}'), ('\u{aabe}', '\u{aabf}'), ('\u{aac1}', '\u{aac1}'),
+        ('\u{aaeb}', '\u{aaef}'), ('\u{aaf5}', '\u{aaf6}'), ('\u{abe3}', '\u{abea}'), ('\u{abec}',
+        '\u{abed}'), ('\u{fb1e}', '\u{fb1e}'), ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}', '\u{fe2d}'),
+        ('\u{101fd}', '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{10376}', '\u{1037a}'),
+        ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}', '\u{10a0f}'),
+        ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'), ('\u{10ae5}', '\u{10ae6}'),
+        ('\u{11000}', '\u{11002}'), ('\u{11038}', '\u{11046}'), ('\u{1107f}', '\u{11082}'),
+        ('\u{110b0}', '\u{110ba}'), ('\u{11100}', '\u{11102}'), ('\u{11127}', '\u{11134}'),
+        ('\u{11173}', '\u{11173}'), ('\u{11180}', '\u{11182}'), ('\u{111b3}', '\u{111c0}'),
+        ('\u{1122c}', '\u{11237}'), ('\u{112df}', '\u{112ea}'), ('\u{11301}', '\u{11303}'),
+        ('\u{1133c}', '\u{1133c}'), ('\u{1133e}', '\u{11344}'), ('\u{11347}', '\u{11348}'),
+        ('\u{1134b}', '\u{1134d}'), ('\u{11357}', '\u{11357}'), ('\u{11362}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'), ('\u{11370}', '\u{11374}'), ('\u{114b0}', '\u{114c3}'),
+        ('\u{115af}', '\u{115b5}'), ('\u{115b8}', '\u{115c0}'), ('\u{11630}', '\u{11640}'),
+        ('\u{116ab}', '\u{116b7}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b30}', '\u{16b36}'),
+        ('\u{16f51}', '\u{16f7e}'), ('\u{16f8f}', '\u{16f92}'), ('\u{1bc9d}', '\u{1bc9e}'),
+        ('\u{1d165}', '\u{1d169}'), ('\u{1d16d}', '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'),
+        ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'),
+        ('\u{1e8d0}', '\u{1e8d6}'), ('\u{e0100}', '\u{e01ef}')
     ];
 
     pub static Mc_table: &'static [(char, char)] = &[
-        ('\u0903', '\u0903'), ('\u093b', '\u093b'), ('\u093e', '\u0940'), ('\u0949', '\u094c'),
-        ('\u094e', '\u094f'), ('\u0982', '\u0983'), ('\u09be', '\u09c0'), ('\u09c7', '\u09c8'),
-        ('\u09cb', '\u09cc'), ('\u09d7', '\u09d7'), ('\u0a03', '\u0a03'), ('\u0a3e', '\u0a40'),
-        ('\u0a83', '\u0a83'), ('\u0abe', '\u0ac0'), ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'),
-        ('\u0b02', '\u0b03'), ('\u0b3e', '\u0b3e'), ('\u0b40', '\u0b40'), ('\u0b47', '\u0b48'),
-        ('\u0b4b', '\u0b4c'), ('\u0b57', '\u0b57'), ('\u0bbe', '\u0bbf'), ('\u0bc1', '\u0bc2'),
-        ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), ('\u0bd7', '\u0bd7'), ('\u0c01', '\u0c03'),
-        ('\u0c41', '\u0c44'), ('\u0c82', '\u0c83'), ('\u0cbe', '\u0cbe'), ('\u0cc0', '\u0cc4'),
-        ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), ('\u0cd5', '\u0cd6'), ('\u0d02', '\u0d03'),
-        ('\u0d3e', '\u0d40'), ('\u0d46', '\u0d48'), ('\u0d4a', '\u0d4c'), ('\u0d57', '\u0d57'),
-        ('\u0d82', '\u0d83'), ('\u0dcf', '\u0dd1'), ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'),
-        ('\u0f3e', '\u0f3f'), ('\u0f7f', '\u0f7f'), ('\u102b', '\u102c'), ('\u1031', '\u1031'),
-        ('\u1038', '\u1038'), ('\u103b', '\u103c'), ('\u1056', '\u1057'), ('\u1062', '\u1064'),
-        ('\u1067', '\u106d'), ('\u1083', '\u1084'), ('\u1087', '\u108c'), ('\u108f', '\u108f'),
-        ('\u109a', '\u109c'), ('\u17b6', '\u17b6'), ('\u17be', '\u17c5'), ('\u17c7', '\u17c8'),
-        ('\u1923', '\u1926'), ('\u1929', '\u192b'), ('\u1930', '\u1931'), ('\u1933', '\u1938'),
-        ('\u19b0', '\u19c0'), ('\u19c8', '\u19c9'), ('\u1a19', '\u1a1a'), ('\u1a55', '\u1a55'),
-        ('\u1a57', '\u1a57'), ('\u1a61', '\u1a61'), ('\u1a63', '\u1a64'), ('\u1a6d', '\u1a72'),
-        ('\u1b04', '\u1b04'), ('\u1b35', '\u1b35'), ('\u1b3b', '\u1b3b'), ('\u1b3d', '\u1b41'),
-        ('\u1b43', '\u1b44'), ('\u1b82', '\u1b82'), ('\u1ba1', '\u1ba1'), ('\u1ba6', '\u1ba7'),
-        ('\u1baa', '\u1baa'), ('\u1be7', '\u1be7'), ('\u1bea', '\u1bec'), ('\u1bee', '\u1bee'),
-        ('\u1bf2', '\u1bf3'), ('\u1c24', '\u1c2b'), ('\u1c34', '\u1c35'), ('\u1ce1', '\u1ce1'),
-        ('\u1cf2', '\u1cf3'), ('\u302e', '\u302f'), ('\ua823', '\ua824'), ('\ua827', '\ua827'),
-        ('\ua880', '\ua881'), ('\ua8b4', '\ua8c3'), ('\ua952', '\ua953'), ('\ua983', '\ua983'),
-        ('\ua9b4', '\ua9b5'), ('\ua9ba', '\ua9bb'), ('\ua9bd', '\ua9c0'), ('\uaa2f', '\uaa30'),
-        ('\uaa33', '\uaa34'), ('\uaa4d', '\uaa4d'), ('\uaa7b', '\uaa7b'), ('\uaa7d', '\uaa7d'),
-        ('\uaaeb', '\uaaeb'), ('\uaaee', '\uaaef'), ('\uaaf5', '\uaaf5'), ('\uabe3', '\uabe4'),
-        ('\uabe6', '\uabe7'), ('\uabe9', '\uabea'), ('\uabec', '\uabec'), ('\U00011000',
-        '\U00011000'), ('\U00011002', '\U00011002'), ('\U00011082', '\U00011082'), ('\U000110b0',
-        '\U000110b2'), ('\U000110b7', '\U000110b8'), ('\U0001112c', '\U0001112c'), ('\U00011182',
-        '\U00011182'), ('\U000111b3', '\U000111b5'), ('\U000111bf', '\U000111c0'), ('\U0001122c',
-        '\U0001122e'), ('\U00011232', '\U00011233'), ('\U00011235', '\U00011235'), ('\U000112e0',
-        '\U000112e2'), ('\U00011302', '\U00011303'), ('\U0001133e', '\U0001133f'), ('\U00011341',
-        '\U00011344'), ('\U00011347', '\U00011348'), ('\U0001134b', '\U0001134d'), ('\U00011357',
-        '\U00011357'), ('\U00011362', '\U00011363'), ('\U000114b0', '\U000114b2'), ('\U000114b9',
-        '\U000114b9'), ('\U000114bb', '\U000114be'), ('\U000114c1', '\U000114c1'), ('\U000115af',
-        '\U000115b1'), ('\U000115b8', '\U000115bb'), ('\U000115be', '\U000115be'), ('\U00011630',
-        '\U00011632'), ('\U0001163b', '\U0001163c'), ('\U0001163e', '\U0001163e'), ('\U000116ac',
-        '\U000116ac'), ('\U000116ae', '\U000116af'), ('\U000116b6', '\U000116b6'), ('\U00016f51',
-        '\U00016f7e'), ('\U0001d165', '\U0001d166'), ('\U0001d16d', '\U0001d172')
+        ('\u{903}', '\u{903}'), ('\u{93b}', '\u{93b}'), ('\u{93e}', '\u{940}'), ('\u{949}',
+        '\u{94c}'), ('\u{94e}', '\u{94f}'), ('\u{982}', '\u{983}'), ('\u{9be}', '\u{9c0}'),
+        ('\u{9c7}', '\u{9c8}'), ('\u{9cb}', '\u{9cc}'), ('\u{9d7}', '\u{9d7}'), ('\u{a03}',
+        '\u{a03}'), ('\u{a3e}', '\u{a40}'), ('\u{a83}', '\u{a83}'), ('\u{abe}', '\u{ac0}'),
+        ('\u{ac9}', '\u{ac9}'), ('\u{acb}', '\u{acc}'), ('\u{b02}', '\u{b03}'), ('\u{b3e}',
+        '\u{b3e}'), ('\u{b40}', '\u{b40}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'),
+        ('\u{b57}', '\u{b57}'), ('\u{bbe}', '\u{bbf}'), ('\u{bc1}', '\u{bc2}'), ('\u{bc6}',
+        '\u{bc8}'), ('\u{bca}', '\u{bcc}'), ('\u{bd7}', '\u{bd7}'), ('\u{c01}', '\u{c03}'),
+        ('\u{c41}', '\u{c44}'), ('\u{c82}', '\u{c83}'), ('\u{cbe}', '\u{cbe}'), ('\u{cc0}',
+        '\u{cc4}'), ('\u{cc7}', '\u{cc8}'), ('\u{cca}', '\u{ccb}'), ('\u{cd5}', '\u{cd6}'),
+        ('\u{d02}', '\u{d03}'), ('\u{d3e}', '\u{d40}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}',
+        '\u{d4c}'), ('\u{d57}', '\u{d57}'), ('\u{d82}', '\u{d83}'), ('\u{dcf}', '\u{dd1}'),
+        ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'), ('\u{f3e}', '\u{f3f}'), ('\u{f7f}',
+        '\u{f7f}'), ('\u{102b}', '\u{102c}'), ('\u{1031}', '\u{1031}'), ('\u{1038}', '\u{1038}'),
+        ('\u{103b}', '\u{103c}'), ('\u{1056}', '\u{1057}'), ('\u{1062}', '\u{1064}'), ('\u{1067}',
+        '\u{106d}'), ('\u{1083}', '\u{1084}'), ('\u{1087}', '\u{108c}'), ('\u{108f}', '\u{108f}'),
+        ('\u{109a}', '\u{109c}'), ('\u{17b6}', '\u{17b6}'), ('\u{17be}', '\u{17c5}'), ('\u{17c7}',
+        '\u{17c8}'), ('\u{1923}', '\u{1926}'), ('\u{1929}', '\u{192b}'), ('\u{1930}', '\u{1931}'),
+        ('\u{1933}', '\u{1938}'), ('\u{19b0}', '\u{19c0}'), ('\u{19c8}', '\u{19c9}'), ('\u{1a19}',
+        '\u{1a1a}'), ('\u{1a55}', '\u{1a55}'), ('\u{1a57}', '\u{1a57}'), ('\u{1a61}', '\u{1a61}'),
+        ('\u{1a63}', '\u{1a64}'), ('\u{1a6d}', '\u{1a72}'), ('\u{1b04}', '\u{1b04}'), ('\u{1b35}',
+        '\u{1b35}'), ('\u{1b3b}', '\u{1b3b}'), ('\u{1b3d}', '\u{1b41}'), ('\u{1b43}', '\u{1b44}'),
+        ('\u{1b82}', '\u{1b82}'), ('\u{1ba1}', '\u{1ba1}'), ('\u{1ba6}', '\u{1ba7}'), ('\u{1baa}',
+        '\u{1baa}'), ('\u{1be7}', '\u{1be7}'), ('\u{1bea}', '\u{1bec}'), ('\u{1bee}', '\u{1bee}'),
+        ('\u{1bf2}', '\u{1bf3}'), ('\u{1c24}', '\u{1c2b}'), ('\u{1c34}', '\u{1c35}'), ('\u{1ce1}',
+        '\u{1ce1}'), ('\u{1cf2}', '\u{1cf3}'), ('\u{302e}', '\u{302f}'), ('\u{a823}', '\u{a824}'),
+        ('\u{a827}', '\u{a827}'), ('\u{a880}', '\u{a881}'), ('\u{a8b4}', '\u{a8c3}'), ('\u{a952}',
+        '\u{a953}'), ('\u{a983}', '\u{a983}'), ('\u{a9b4}', '\u{a9b5}'), ('\u{a9ba}', '\u{a9bb}'),
+        ('\u{a9bd}', '\u{a9c0}'), ('\u{aa2f}', '\u{aa30}'), ('\u{aa33}', '\u{aa34}'), ('\u{aa4d}',
+        '\u{aa4d}'), ('\u{aa7b}', '\u{aa7b}'), ('\u{aa7d}', '\u{aa7d}'), ('\u{aaeb}', '\u{aaeb}'),
+        ('\u{aaee}', '\u{aaef}'), ('\u{aaf5}', '\u{aaf5}'), ('\u{abe3}', '\u{abe4}'), ('\u{abe6}',
+        '\u{abe7}'), ('\u{abe9}', '\u{abea}'), ('\u{abec}', '\u{abec}'), ('\u{11000}', '\u{11000}'),
+        ('\u{11002}', '\u{11002}'), ('\u{11082}', '\u{11082}'), ('\u{110b0}', '\u{110b2}'),
+        ('\u{110b7}', '\u{110b8}'), ('\u{1112c}', '\u{1112c}'), ('\u{11182}', '\u{11182}'),
+        ('\u{111b3}', '\u{111b5}'), ('\u{111bf}', '\u{111c0}'), ('\u{1122c}', '\u{1122e}'),
+        ('\u{11232}', '\u{11233}'), ('\u{11235}', '\u{11235}'), ('\u{112e0}', '\u{112e2}'),
+        ('\u{11302}', '\u{11303}'), ('\u{1133e}', '\u{1133f}'), ('\u{11341}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'), ('\u{11357}', '\u{11357}'),
+        ('\u{11362}', '\u{11363}'), ('\u{114b0}', '\u{114b2}'), ('\u{114b9}', '\u{114b9}'),
+        ('\u{114bb}', '\u{114be}'), ('\u{114c1}', '\u{114c1}'), ('\u{115af}', '\u{115b1}'),
+        ('\u{115b8}', '\u{115bb}'), ('\u{115be}', '\u{115be}'), ('\u{11630}', '\u{11632}'),
+        ('\u{1163b}', '\u{1163c}'), ('\u{1163e}', '\u{1163e}'), ('\u{116ac}', '\u{116ac}'),
+        ('\u{116ae}', '\u{116af}'), ('\u{116b6}', '\u{116b6}'), ('\u{16f51}', '\u{16f7e}'),
+        ('\u{1d165}', '\u{1d166}'), ('\u{1d16d}', '\u{1d172}')
     ];
 
     pub static Me_table: &'static [(char, char)] = &[
-        ('\u0488', '\u0489'), ('\u1abe', '\u1abe'), ('\u20dd', '\u20e0'), ('\u20e2', '\u20e4'),
-        ('\ua670', '\ua672')
+        ('\u{488}', '\u{489}'), ('\u{1abe}', '\u{1abe}'), ('\u{20dd}', '\u{20e0}'), ('\u{20e2}',
+        '\u{20e4}'), ('\u{a670}', '\u{a672}')
     ];
 
     pub static Mn_table: &'static [(char, char)] = &[
-        ('\u0300', '\u036f'), ('\u0483', '\u0487'), ('\u0591', '\u05bd'), ('\u05bf', '\u05bf'),
-        ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), ('\u0610', '\u061a'),
-        ('\u064b', '\u065f'), ('\u0670', '\u0670'), ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'),
-        ('\u06e7', '\u06e8'), ('\u06ea', '\u06ed'), ('\u0711', '\u0711'), ('\u0730', '\u074a'),
-        ('\u07a6', '\u07b0'), ('\u07eb', '\u07f3'), ('\u0816', '\u0819'), ('\u081b', '\u0823'),
-        ('\u0825', '\u0827'), ('\u0829', '\u082d'), ('\u0859', '\u085b'), ('\u08e4', '\u0902'),
-        ('\u093a', '\u093a'), ('\u093c', '\u093c'), ('\u0941', '\u0948'), ('\u094d', '\u094d'),
-        ('\u0951', '\u0957'), ('\u0962', '\u0963'), ('\u0981', '\u0981'), ('\u09bc', '\u09bc'),
-        ('\u09c1', '\u09c4'), ('\u09cd', '\u09cd'), ('\u09e2', '\u09e3'), ('\u0a01', '\u0a02'),
-        ('\u0a3c', '\u0a3c'), ('\u0a41', '\u0a42'), ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'),
-        ('\u0a51', '\u0a51'), ('\u0a70', '\u0a71'), ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'),
-        ('\u0abc', '\u0abc'), ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), ('\u0acd', '\u0acd'),
-        ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b01'), ('\u0b3c', '\u0b3c'), ('\u0b3f', '\u0b3f'),
-        ('\u0b41', '\u0b44'), ('\u0b4d', '\u0b4d'), ('\u0b56', '\u0b56'), ('\u0b62', '\u0b63'),
-        ('\u0b82', '\u0b82'), ('\u0bc0', '\u0bc0'), ('\u0bcd', '\u0bcd'), ('\u0c00', '\u0c00'),
-        ('\u0c3e', '\u0c40'), ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), ('\u0c55', '\u0c56'),
-        ('\u0c62', '\u0c63'), ('\u0c81', '\u0c81'), ('\u0cbc', '\u0cbc'), ('\u0cbf', '\u0cbf'),
-        ('\u0cc6', '\u0cc6'), ('\u0ccc', '\u0ccd'), ('\u0ce2', '\u0ce3'), ('\u0d01', '\u0d01'),
-        ('\u0d41', '\u0d44'), ('\u0d4d', '\u0d4d'), ('\u0d62', '\u0d63'), ('\u0dca', '\u0dca'),
-        ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), ('\u0e31', '\u0e31'), ('\u0e34', '\u0e3a'),
-        ('\u0e47', '\u0e4e'), ('\u0eb1', '\u0eb1'), ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'),
-        ('\u0ec8', '\u0ecd'), ('\u0f18', '\u0f19'), ('\u0f35', '\u0f35'), ('\u0f37', '\u0f37'),
-        ('\u0f39', '\u0f39'), ('\u0f71', '\u0f7e'), ('\u0f80', '\u0f84'), ('\u0f86', '\u0f87'),
-        ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), ('\u0fc6', '\u0fc6'), ('\u102d', '\u1030'),
-        ('\u1032', '\u1037'), ('\u1039', '\u103a'), ('\u103d', '\u103e'), ('\u1058', '\u1059'),
-        ('\u105e', '\u1060'), ('\u1071', '\u1074'), ('\u1082', '\u1082'), ('\u1085', '\u1086'),
-        ('\u108d', '\u108d'), ('\u109d', '\u109d'), ('\u135d', '\u135f'), ('\u1712', '\u1714'),
-        ('\u1732', '\u1734'), ('\u1752', '\u1753'), ('\u1772', '\u1773'), ('\u17b4', '\u17b5'),
-        ('\u17b7', '\u17bd'), ('\u17c6', '\u17c6'), ('\u17c9', '\u17d3'), ('\u17dd', '\u17dd'),
-        ('\u180b', '\u180d'), ('\u18a9', '\u18a9'), ('\u1920', '\u1922'), ('\u1927', '\u1928'),
-        ('\u1932', '\u1932'), ('\u1939', '\u193b'), ('\u1a17', '\u1a18'), ('\u1a1b', '\u1a1b'),
-        ('\u1a56', '\u1a56'), ('\u1a58', '\u1a5e'), ('\u1a60', '\u1a60'), ('\u1a62', '\u1a62'),
-        ('\u1a65', '\u1a6c'), ('\u1a73', '\u1a7c'), ('\u1a7f', '\u1a7f'), ('\u1ab0', '\u1abd'),
-        ('\u1b00', '\u1b03'), ('\u1b34', '\u1b34'), ('\u1b36', '\u1b3a'), ('\u1b3c', '\u1b3c'),
-        ('\u1b42', '\u1b42'), ('\u1b6b', '\u1b73'), ('\u1b80', '\u1b81'), ('\u1ba2', '\u1ba5'),
-        ('\u1ba8', '\u1ba9'), ('\u1bab', '\u1bad'), ('\u1be6', '\u1be6'), ('\u1be8', '\u1be9'),
-        ('\u1bed', '\u1bed'), ('\u1bef', '\u1bf1'), ('\u1c2c', '\u1c33'), ('\u1c36', '\u1c37'),
-        ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce0'), ('\u1ce2', '\u1ce8'), ('\u1ced', '\u1ced'),
-        ('\u1cf4', '\u1cf4'), ('\u1cf8', '\u1cf9'), ('\u1dc0', '\u1df5'), ('\u1dfc', '\u1dff'),
-        ('\u20d0', '\u20dc'), ('\u20e1', '\u20e1'), ('\u20e5', '\u20f0'), ('\u2cef', '\u2cf1'),
-        ('\u2d7f', '\u2d7f'), ('\u2de0', '\u2dff'), ('\u302a', '\u302d'), ('\u3099', '\u309a'),
-        ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), ('\ua69f', '\ua69f'), ('\ua6f0', '\ua6f1'),
-        ('\ua802', '\ua802'), ('\ua806', '\ua806'), ('\ua80b', '\ua80b'), ('\ua825', '\ua826'),
-        ('\ua8c4', '\ua8c4'), ('\ua8e0', '\ua8f1'), ('\ua926', '\ua92d'), ('\ua947', '\ua951'),
-        ('\ua980', '\ua982'), ('\ua9b3', '\ua9b3'), ('\ua9b6', '\ua9b9'), ('\ua9bc', '\ua9bc'),
-        ('\ua9e5', '\ua9e5'), ('\uaa29', '\uaa2e'), ('\uaa31', '\uaa32'), ('\uaa35', '\uaa36'),
-        ('\uaa43', '\uaa43'), ('\uaa4c', '\uaa4c'), ('\uaa7c', '\uaa7c'), ('\uaab0', '\uaab0'),
-        ('\uaab2', '\uaab4'), ('\uaab7', '\uaab8'), ('\uaabe', '\uaabf'), ('\uaac1', '\uaac1'),
-        ('\uaaec', '\uaaed'), ('\uaaf6', '\uaaf6'), ('\uabe5', '\uabe5'), ('\uabe8', '\uabe8'),
-        ('\uabed', '\uabed'), ('\ufb1e', '\ufb1e'), ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe2d'),
-        ('\U000101fd', '\U000101fd'), ('\U000102e0', '\U000102e0'), ('\U00010376', '\U0001037a'),
-        ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'),
-        ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'), ('\U00010ae5', '\U00010ae6'),
-        ('\U00011001', '\U00011001'), ('\U00011038', '\U00011046'), ('\U0001107f', '\U00011081'),
-        ('\U000110b3', '\U000110b6'), ('\U000110b9', '\U000110ba'), ('\U00011100', '\U00011102'),
-        ('\U00011127', '\U0001112b'), ('\U0001112d', '\U00011134'), ('\U00011173', '\U00011173'),
-        ('\U00011180', '\U00011181'), ('\U000111b6', '\U000111be'), ('\U0001122f', '\U00011231'),
-        ('\U00011234', '\U00011234'), ('\U00011236', '\U00011237'), ('\U000112df', '\U000112df'),
-        ('\U000112e3', '\U000112ea'), ('\U00011301', '\U00011301'), ('\U0001133c', '\U0001133c'),
-        ('\U00011340', '\U00011340'), ('\U00011366', '\U0001136c'), ('\U00011370', '\U00011374'),
-        ('\U000114b3', '\U000114b8'), ('\U000114ba', '\U000114ba'), ('\U000114bf', '\U000114c0'),
-        ('\U000114c2', '\U000114c3'), ('\U000115b2', '\U000115b5'), ('\U000115bc', '\U000115bd'),
-        ('\U000115bf', '\U000115c0'), ('\U00011633', '\U0001163a'), ('\U0001163d', '\U0001163d'),
-        ('\U0001163f', '\U00011640'), ('\U000116ab', '\U000116ab'), ('\U000116ad', '\U000116ad'),
-        ('\U000116b0', '\U000116b5'), ('\U000116b7', '\U000116b7'), ('\U00016af0', '\U00016af4'),
-        ('\U00016b30', '\U00016b36'), ('\U00016f8f', '\U00016f92'), ('\U0001bc9d', '\U0001bc9e'),
-        ('\U0001d167', '\U0001d169'), ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'),
-        ('\U0001d1aa', '\U0001d1ad'), ('\U0001d242', '\U0001d244'), ('\U0001e8d0', '\U0001e8d6'),
-        ('\U000e0100', '\U000e01ef')
+        ('\u{300}', '\u{36f}'), ('\u{483}', '\u{487}'), ('\u{591}', '\u{5bd}'), ('\u{5bf}',
+        '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'), ('\u{5c7}', '\u{5c7}'),
+        ('\u{610}', '\u{61a}'), ('\u{64b}', '\u{65f}'), ('\u{670}', '\u{670}'), ('\u{6d6}',
+        '\u{6dc}'), ('\u{6df}', '\u{6e4}'), ('\u{6e7}', '\u{6e8}'), ('\u{6ea}', '\u{6ed}'),
+        ('\u{711}', '\u{711}'), ('\u{730}', '\u{74a}'), ('\u{7a6}', '\u{7b0}'), ('\u{7eb}',
+        '\u{7f3}'), ('\u{816}', '\u{819}'), ('\u{81b}', '\u{823}'), ('\u{825}', '\u{827}'),
+        ('\u{829}', '\u{82d}'), ('\u{859}', '\u{85b}'), ('\u{8e4}', '\u{902}'), ('\u{93a}',
+        '\u{93a}'), ('\u{93c}', '\u{93c}'), ('\u{941}', '\u{948}'), ('\u{94d}', '\u{94d}'),
+        ('\u{951}', '\u{957}'), ('\u{962}', '\u{963}'), ('\u{981}', '\u{981}'), ('\u{9bc}',
+        '\u{9bc}'), ('\u{9c1}', '\u{9c4}'), ('\u{9cd}', '\u{9cd}'), ('\u{9e2}', '\u{9e3}'),
+        ('\u{a01}', '\u{a02}'), ('\u{a3c}', '\u{a3c}'), ('\u{a41}', '\u{a42}'), ('\u{a47}',
+        '\u{a48}'), ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'), ('\u{a70}', '\u{a71}'),
+        ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a82}'), ('\u{abc}', '\u{abc}'), ('\u{ac1}',
+        '\u{ac5}'), ('\u{ac7}', '\u{ac8}'), ('\u{acd}', '\u{acd}'), ('\u{ae2}', '\u{ae3}'),
+        ('\u{b01}', '\u{b01}'), ('\u{b3c}', '\u{b3c}'), ('\u{b3f}', '\u{b3f}'), ('\u{b41}',
+        '\u{b44}'), ('\u{b4d}', '\u{b4d}'), ('\u{b56}', '\u{b56}'), ('\u{b62}', '\u{b63}'),
+        ('\u{b82}', '\u{b82}'), ('\u{bc0}', '\u{bc0}'), ('\u{bcd}', '\u{bcd}'), ('\u{c00}',
+        '\u{c00}'), ('\u{c3e}', '\u{c40}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'),
+        ('\u{c55}', '\u{c56}'), ('\u{c62}', '\u{c63}'), ('\u{c81}', '\u{c81}'), ('\u{cbc}',
+        '\u{cbc}'), ('\u{cbf}', '\u{cbf}'), ('\u{cc6}', '\u{cc6}'), ('\u{ccc}', '\u{ccd}'),
+        ('\u{ce2}', '\u{ce3}'), ('\u{d01}', '\u{d01}'), ('\u{d41}', '\u{d44}'), ('\u{d4d}',
+        '\u{d4d}'), ('\u{d62}', '\u{d63}'), ('\u{dca}', '\u{dca}'), ('\u{dd2}', '\u{dd4}'),
+        ('\u{dd6}', '\u{dd6}'), ('\u{e31}', '\u{e31}'), ('\u{e34}', '\u{e3a}'), ('\u{e47}',
+        '\u{e4e}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb4}', '\u{eb9}'), ('\u{ebb}', '\u{ebc}'),
+        ('\u{ec8}', '\u{ecd}'), ('\u{f18}', '\u{f19}'), ('\u{f35}', '\u{f35}'), ('\u{f37}',
+        '\u{f37}'), ('\u{f39}', '\u{f39}'), ('\u{f71}', '\u{f7e}'), ('\u{f80}', '\u{f84}'),
+        ('\u{f86}', '\u{f87}'), ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{fc6}',
+        '\u{fc6}'), ('\u{102d}', '\u{1030}'), ('\u{1032}', '\u{1037}'), ('\u{1039}', '\u{103a}'),
+        ('\u{103d}', '\u{103e}'), ('\u{1058}', '\u{1059}'), ('\u{105e}', '\u{1060}'), ('\u{1071}',
+        '\u{1074}'), ('\u{1082}', '\u{1082}'), ('\u{1085}', '\u{1086}'), ('\u{108d}', '\u{108d}'),
+        ('\u{109d}', '\u{109d}'), ('\u{135d}', '\u{135f}'), ('\u{1712}', '\u{1714}'), ('\u{1732}',
+        '\u{1734}'), ('\u{1752}', '\u{1753}'), ('\u{1772}', '\u{1773}'), ('\u{17b4}', '\u{17b5}'),
+        ('\u{17b7}', '\u{17bd}'), ('\u{17c6}', '\u{17c6}'), ('\u{17c9}', '\u{17d3}'), ('\u{17dd}',
+        '\u{17dd}'), ('\u{180b}', '\u{180d}'), ('\u{18a9}', '\u{18a9}'), ('\u{1920}', '\u{1922}'),
+        ('\u{1927}', '\u{1928}'), ('\u{1932}', '\u{1932}'), ('\u{1939}', '\u{193b}'), ('\u{1a17}',
+        '\u{1a18}'), ('\u{1a1b}', '\u{1a1b}'), ('\u{1a56}', '\u{1a56}'), ('\u{1a58}', '\u{1a5e}'),
+        ('\u{1a60}', '\u{1a60}'), ('\u{1a62}', '\u{1a62}'), ('\u{1a65}', '\u{1a6c}'), ('\u{1a73}',
+        '\u{1a7c}'), ('\u{1a7f}', '\u{1a7f}'), ('\u{1ab0}', '\u{1abd}'), ('\u{1b00}', '\u{1b03}'),
+        ('\u{1b34}', '\u{1b34}'), ('\u{1b36}', '\u{1b3a}'), ('\u{1b3c}', '\u{1b3c}'), ('\u{1b42}',
+        '\u{1b42}'), ('\u{1b6b}', '\u{1b73}'), ('\u{1b80}', '\u{1b81}'), ('\u{1ba2}', '\u{1ba5}'),
+        ('\u{1ba8}', '\u{1ba9}'), ('\u{1bab}', '\u{1bad}'), ('\u{1be6}', '\u{1be6}'), ('\u{1be8}',
+        '\u{1be9}'), ('\u{1bed}', '\u{1bed}'), ('\u{1bef}', '\u{1bf1}'), ('\u{1c2c}', '\u{1c33}'),
+        ('\u{1c36}', '\u{1c37}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce0}'), ('\u{1ce2}',
+        '\u{1ce8}'), ('\u{1ced}', '\u{1ced}'), ('\u{1cf4}', '\u{1cf4}'), ('\u{1cf8}', '\u{1cf9}'),
+        ('\u{1dc0}', '\u{1df5}'), ('\u{1dfc}', '\u{1dff}'), ('\u{20d0}', '\u{20dc}'), ('\u{20e1}',
+        '\u{20e1}'), ('\u{20e5}', '\u{20f0}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2d7f}', '\u{2d7f}'),
+        ('\u{2de0}', '\u{2dff}'), ('\u{302a}', '\u{302d}'), ('\u{3099}', '\u{309a}'), ('\u{a66f}',
+        '\u{a66f}'), ('\u{a674}', '\u{a67d}'), ('\u{a69f}', '\u{a69f}'), ('\u{a6f0}', '\u{a6f1}'),
+        ('\u{a802}', '\u{a802}'), ('\u{a806}', '\u{a806}'), ('\u{a80b}', '\u{a80b}'), ('\u{a825}',
+        '\u{a826}'), ('\u{a8c4}', '\u{a8c4}'), ('\u{a8e0}', '\u{a8f1}'), ('\u{a926}', '\u{a92d}'),
+        ('\u{a947}', '\u{a951}'), ('\u{a980}', '\u{a982}'), ('\u{a9b3}', '\u{a9b3}'), ('\u{a9b6}',
+        '\u{a9b9}'), ('\u{a9bc}', '\u{a9bc}'), ('\u{a9e5}', '\u{a9e5}'), ('\u{aa29}', '\u{aa2e}'),
+        ('\u{aa31}', '\u{aa32}'), ('\u{aa35}', '\u{aa36}'), ('\u{aa43}', '\u{aa43}'), ('\u{aa4c}',
+        '\u{aa4c}'), ('\u{aa7c}', '\u{aa7c}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab2}', '\u{aab4}'),
+        ('\u{aab7}', '\u{aab8}'), ('\u{aabe}', '\u{aabf}'), ('\u{aac1}', '\u{aac1}'), ('\u{aaec}',
+        '\u{aaed}'), ('\u{aaf6}', '\u{aaf6}'), ('\u{abe5}', '\u{abe5}'), ('\u{abe8}', '\u{abe8}'),
+        ('\u{abed}', '\u{abed}'), ('\u{fb1e}', '\u{fb1e}'), ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}',
+        '\u{fe2d}'), ('\u{101fd}', '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{10376}',
+        '\u{1037a}'), ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}',
+        '\u{10a0f}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'), ('\u{10ae5}',
+        '\u{10ae6}'), ('\u{11001}', '\u{11001}'), ('\u{11038}', '\u{11046}'), ('\u{1107f}',
+        '\u{11081}'), ('\u{110b3}', '\u{110b6}'), ('\u{110b9}', '\u{110ba}'), ('\u{11100}',
+        '\u{11102}'), ('\u{11127}', '\u{1112b}'), ('\u{1112d}', '\u{11134}'), ('\u{11173}',
+        '\u{11173}'), ('\u{11180}', '\u{11181}'), ('\u{111b6}', '\u{111be}'), ('\u{1122f}',
+        '\u{11231}'), ('\u{11234}', '\u{11234}'), ('\u{11236}', '\u{11237}'), ('\u{112df}',
+        '\u{112df}'), ('\u{112e3}', '\u{112ea}'), ('\u{11301}', '\u{11301}'), ('\u{1133c}',
+        '\u{1133c}'), ('\u{11340}', '\u{11340}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}',
+        '\u{11374}'), ('\u{114b3}', '\u{114b8}'), ('\u{114ba}', '\u{114ba}'), ('\u{114bf}',
+        '\u{114c0}'), ('\u{114c2}', '\u{114c3}'), ('\u{115b2}', '\u{115b5}'), ('\u{115bc}',
+        '\u{115bd}'), ('\u{115bf}', '\u{115c0}'), ('\u{11633}', '\u{1163a}'), ('\u{1163d}',
+        '\u{1163d}'), ('\u{1163f}', '\u{11640}'), ('\u{116ab}', '\u{116ab}'), ('\u{116ad}',
+        '\u{116ad}'), ('\u{116b0}', '\u{116b5}'), ('\u{116b7}', '\u{116b7}'), ('\u{16af0}',
+        '\u{16af4}'), ('\u{16b30}', '\u{16b36}'), ('\u{16f8f}', '\u{16f92}'), ('\u{1bc9d}',
+        '\u{1bc9e}'), ('\u{1d167}', '\u{1d169}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}',
+        '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'), ('\u{1e8d0}',
+        '\u{1e8d6}'), ('\u{e0100}', '\u{e01ef}')
     ];
 
     pub static N_table: &'static [(char, char)] = &[
-        ('\x30', '\x39'), ('\u0660', '\u0669'), ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'),
-        ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'),
-        ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'),
-        ('\u0d66', '\u0d6f'), ('\u0de6', '\u0def'), ('\u0e50', '\u0e59'), ('\u0ed0', '\u0ed9'),
-        ('\u0f20', '\u0f29'), ('\u1040', '\u1049'), ('\u1090', '\u1099'), ('\u16ee', '\u16f0'),
-        ('\u17e0', '\u17e9'), ('\u1810', '\u1819'), ('\u1946', '\u194f'), ('\u19d0', '\u19d9'),
-        ('\u1a80', '\u1a89'), ('\u1a90', '\u1a99'), ('\u1b50', '\u1b59'), ('\u1bb0', '\u1bb9'),
-        ('\u1c40', '\u1c49'), ('\u1c50', '\u1c59'), ('\u2160', '\u2182'), ('\u2185', '\u2188'),
-        ('\u3007', '\u3007'), ('\u3021', '\u3029'), ('\u3038', '\u303a'), ('\ua620', '\ua629'),
-        ('\ua6e6', '\ua6ef'), ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'), ('\ua9d0', '\ua9d9'),
-        ('\ua9f0', '\ua9f9'), ('\uaa50', '\uaa59'), ('\uabf0', '\uabf9'), ('\uff10', '\uff19'),
-        ('\U00010140', '\U00010174'), ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'),
-        ('\U000103d1', '\U000103d5'), ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'),
-        ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), ('\U000111d0', '\U000111d9'),
-        ('\U000112f0', '\U000112f9'), ('\U000114d0', '\U000114d9'), ('\U00011650', '\U00011659'),
-        ('\U000116c0', '\U000116c9'), ('\U000118e0', '\U000118e9'), ('\U00012400', '\U0001246e'),
-        ('\U00016a60', '\U00016a69'), ('\U00016b50', '\U00016b59'), ('\U0001d7ce', '\U0001d7ff')
+        ('\u{30}', '\u{39}'), ('\u{660}', '\u{669}'), ('\u{6f0}', '\u{6f9}'), ('\u{7c0}',
+        '\u{7c9}'), ('\u{966}', '\u{96f}'), ('\u{9e6}', '\u{9ef}'), ('\u{a66}', '\u{a6f}'),
+        ('\u{ae6}', '\u{aef}'), ('\u{b66}', '\u{b6f}'), ('\u{be6}', '\u{bef}'), ('\u{c66}',
+        '\u{c6f}'), ('\u{ce6}', '\u{cef}'), ('\u{d66}', '\u{d6f}'), ('\u{de6}', '\u{def}'),
+        ('\u{e50}', '\u{e59}'), ('\u{ed0}', '\u{ed9}'), ('\u{f20}', '\u{f29}'), ('\u{1040}',
+        '\u{1049}'), ('\u{1090}', '\u{1099}'), ('\u{16ee}', '\u{16f0}'), ('\u{17e0}', '\u{17e9}'),
+        ('\u{1810}', '\u{1819}'), ('\u{1946}', '\u{194f}'), ('\u{19d0}', '\u{19d9}'), ('\u{1a80}',
+        '\u{1a89}'), ('\u{1a90}', '\u{1a99}'), ('\u{1b50}', '\u{1b59}'), ('\u{1bb0}', '\u{1bb9}'),
+        ('\u{1c40}', '\u{1c49}'), ('\u{1c50}', '\u{1c59}'), ('\u{2160}', '\u{2182}'), ('\u{2185}',
+        '\u{2188}'), ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3038}', '\u{303a}'),
+        ('\u{a620}', '\u{a629}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a8d0}', '\u{a8d9}'), ('\u{a900}',
+        '\u{a909}'), ('\u{a9d0}', '\u{a9d9}'), ('\u{a9f0}', '\u{a9f9}'), ('\u{aa50}', '\u{aa59}'),
+        ('\u{abf0}', '\u{abf9}'), ('\u{ff10}', '\u{ff19}'), ('\u{10140}', '\u{10174}'),
+        ('\u{10341}', '\u{10341}'), ('\u{1034a}', '\u{1034a}'), ('\u{103d1}', '\u{103d5}'),
+        ('\u{104a0}', '\u{104a9}'), ('\u{11066}', '\u{1106f}'), ('\u{110f0}', '\u{110f9}'),
+        ('\u{11136}', '\u{1113f}'), ('\u{111d0}', '\u{111d9}'), ('\u{112f0}', '\u{112f9}'),
+        ('\u{114d0}', '\u{114d9}'), ('\u{11650}', '\u{11659}'), ('\u{116c0}', '\u{116c9}'),
+        ('\u{118e0}', '\u{118e9}'), ('\u{12400}', '\u{1246e}'), ('\u{16a60}', '\u{16a69}'),
+        ('\u{16b50}', '\u{16b59}'), ('\u{1d7ce}', '\u{1d7ff}')
     ];
 
     pub fn N(c: char) -> bool {
@@ -1264,619 +1382,675 @@ pub fn N(c: char) -> bool {
     }
 
     pub static Nd_table: &'static [(char, char)] = &[
-        ('\x30', '\x39'), ('\u0660', '\u0669'), ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'),
-        ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'),
-        ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'),
-        ('\u0d66', '\u0d6f'), ('\u0de6', '\u0def'), ('\u0e50', '\u0e59'), ('\u0ed0', '\u0ed9'),
-        ('\u0f20', '\u0f29'), ('\u1040', '\u1049'), ('\u1090', '\u1099'), ('\u17e0', '\u17e9'),
-        ('\u1810', '\u1819'), ('\u1946', '\u194f'), ('\u19d0', '\u19d9'), ('\u1a80', '\u1a89'),
-        ('\u1a90', '\u1a99'), ('\u1b50', '\u1b59'), ('\u1bb0', '\u1bb9'), ('\u1c40', '\u1c49'),
-        ('\u1c50', '\u1c59'), ('\ua620', '\ua629'), ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'),
-        ('\ua9d0', '\ua9d9'), ('\ua9f0', '\ua9f9'), ('\uaa50', '\uaa59'), ('\uabf0', '\uabf9'),
-        ('\uff10', '\uff19'), ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'),
-        ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), ('\U000111d0', '\U000111d9'),
-        ('\U000112f0', '\U000112f9'), ('\U000114d0', '\U000114d9'), ('\U00011650', '\U00011659'),
-        ('\U000116c0', '\U000116c9'), ('\U000118e0', '\U000118e9'), ('\U00016a60', '\U00016a69'),
-        ('\U00016b50', '\U00016b59'), ('\U0001d7ce', '\U0001d7ff')
+        ('\u{30}', '\u{39}'), ('\u{660}', '\u{669}'), ('\u{6f0}', '\u{6f9}'), ('\u{7c0}',
+        '\u{7c9}'), ('\u{966}', '\u{96f}'), ('\u{9e6}', '\u{9ef}'), ('\u{a66}', '\u{a6f}'),
+        ('\u{ae6}', '\u{aef}'), ('\u{b66}', '\u{b6f}'), ('\u{be6}', '\u{bef}'), ('\u{c66}',
+        '\u{c6f}'), ('\u{ce6}', '\u{cef}'), ('\u{d66}', '\u{d6f}'), ('\u{de6}', '\u{def}'),
+        ('\u{e50}', '\u{e59}'), ('\u{ed0}', '\u{ed9}'), ('\u{f20}', '\u{f29}'), ('\u{1040}',
+        '\u{1049}'), ('\u{1090}', '\u{1099}'), ('\u{17e0}', '\u{17e9}'), ('\u{1810}', '\u{1819}'),
+        ('\u{1946}', '\u{194f}'), ('\u{19d0}', '\u{19d9}'), ('\u{1a80}', '\u{1a89}'), ('\u{1a90}',
+        '\u{1a99}'), ('\u{1b50}', '\u{1b59}'), ('\u{1bb0}', '\u{1bb9}'), ('\u{1c40}', '\u{1c49}'),
+        ('\u{1c50}', '\u{1c59}'), ('\u{a620}', '\u{a629}'), ('\u{a8d0}', '\u{a8d9}'), ('\u{a900}',
+        '\u{a909}'), ('\u{a9d0}', '\u{a9d9}'), ('\u{a9f0}', '\u{a9f9}'), ('\u{aa50}', '\u{aa59}'),
+        ('\u{abf0}', '\u{abf9}'), ('\u{ff10}', '\u{ff19}'), ('\u{104a0}', '\u{104a9}'),
+        ('\u{11066}', '\u{1106f}'), ('\u{110f0}', '\u{110f9}'), ('\u{11136}', '\u{1113f}'),
+        ('\u{111d0}', '\u{111d9}'), ('\u{112f0}', '\u{112f9}'), ('\u{114d0}', '\u{114d9}'),
+        ('\u{11650}', '\u{11659}'), ('\u{116c0}', '\u{116c9}'), ('\u{118e0}', '\u{118e9}'),
+        ('\u{16a60}', '\u{16a69}'), ('\u{16b50}', '\u{16b59}'), ('\u{1d7ce}', '\u{1d7ff}')
     ];
 
     pub static Nl_table: &'static [(char, char)] = &[
-        ('\u16ee', '\u16f0'), ('\u2160', '\u2182'), ('\u2185', '\u2188'), ('\u3007', '\u3007'),
-        ('\u3021', '\u3029'), ('\u3038', '\u303a'), ('\ua6e6', '\ua6ef'), ('\U00010140',
-        '\U00010174'), ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'), ('\U000103d1',
-        '\U000103d5'), ('\U00012400', '\U0001246e')
+        ('\u{16ee}', '\u{16f0}'), ('\u{2160}', '\u{2182}'), ('\u{2185}', '\u{2188}'), ('\u{3007}',
+        '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3038}', '\u{303a}'), ('\u{a6e6}', '\u{a6ef}'),
+        ('\u{10140}', '\u{10174}'), ('\u{10341}', '\u{10341}'), ('\u{1034a}', '\u{1034a}'),
+        ('\u{103d1}', '\u{103d5}'), ('\u{12400}', '\u{1246e}')
     ];
 
     pub static No_table: &'static [(char, char)] = &[
-        ('\u00b2', '\u00b3'), ('\u00b9', '\u00b9'), ('\u00bc', '\u00be'), ('\u09f4', '\u09f9'),
-        ('\u0b72', '\u0b77'), ('\u0bf0', '\u0bf2'), ('\u0c78', '\u0c7e'), ('\u0d70', '\u0d75'),
-        ('\u0f2a', '\u0f33'), ('\u1369', '\u137c'), ('\u17f0', '\u17f9'), ('\u19da', '\u19da'),
-        ('\u2070', '\u2070'), ('\u2074', '\u2079'), ('\u2080', '\u2089'), ('\u2150', '\u215f'),
-        ('\u2189', '\u2189'), ('\u2460', '\u249b'), ('\u24ea', '\u24ff'), ('\u2776', '\u2793'),
-        ('\u2cfd', '\u2cfd'), ('\u3192', '\u3195'), ('\u3220', '\u3229'), ('\u3248', '\u324f'),
-        ('\u3251', '\u325f'), ('\u3280', '\u3289'), ('\u32b1', '\u32bf'), ('\ua830', '\ua835'),
-        ('\U00010107', '\U00010133'), ('\U00010175', '\U00010178'), ('\U0001018a', '\U0001018b'),
-        ('\U000102e1', '\U000102fb'), ('\U00010320', '\U00010323'), ('\U00010858', '\U0001085f'),
-        ('\U00010879', '\U0001087f'), ('\U000108a7', '\U000108af'), ('\U00010916', '\U0001091b'),
-        ('\U00010a40', '\U00010a47'), ('\U00010a7d', '\U00010a7e'), ('\U00010a9d', '\U00010a9f'),
-        ('\U00010aeb', '\U00010aef'), ('\U00010b58', '\U00010b5f'), ('\U00010b78', '\U00010b7f'),
-        ('\U00010ba9', '\U00010baf'), ('\U00010e60', '\U00010e7e'), ('\U00011052', '\U00011065'),
-        ('\U000111e1', '\U000111f4'), ('\U000118ea', '\U000118f2'), ('\U00016b5b', '\U00016b61'),
-        ('\U0001d360', '\U0001d371'), ('\U0001e8c7', '\U0001e8cf'), ('\U0001f100', '\U0001f10c')
+        ('\u{b2}', '\u{b3}'), ('\u{b9}', '\u{b9}'), ('\u{bc}', '\u{be}'), ('\u{9f4}', '\u{9f9}'),
+        ('\u{b72}', '\u{b77}'), ('\u{bf0}', '\u{bf2}'), ('\u{c78}', '\u{c7e}'), ('\u{d70}',
+        '\u{d75}'), ('\u{f2a}', '\u{f33}'), ('\u{1369}', '\u{137c}'), ('\u{17f0}', '\u{17f9}'),
+        ('\u{19da}', '\u{19da}'), ('\u{2070}', '\u{2070}'), ('\u{2074}', '\u{2079}'), ('\u{2080}',
+        '\u{2089}'), ('\u{2150}', '\u{215f}'), ('\u{2189}', '\u{2189}'), ('\u{2460}', '\u{249b}'),
+        ('\u{24ea}', '\u{24ff}'), ('\u{2776}', '\u{2793}'), ('\u{2cfd}', '\u{2cfd}'), ('\u{3192}',
+        '\u{3195}'), ('\u{3220}', '\u{3229}'), ('\u{3248}', '\u{324f}'), ('\u{3251}', '\u{325f}'),
+        ('\u{3280}', '\u{3289}'), ('\u{32b1}', '\u{32bf}'), ('\u{a830}', '\u{a835}'), ('\u{10107}',
+        '\u{10133}'), ('\u{10175}', '\u{10178}'), ('\u{1018a}', '\u{1018b}'), ('\u{102e1}',
+        '\u{102fb}'), ('\u{10320}', '\u{10323}'), ('\u{10858}', '\u{1085f}'), ('\u{10879}',
+        '\u{1087f}'), ('\u{108a7}', '\u{108af}'), ('\u{10916}', '\u{1091b}'), ('\u{10a40}',
+        '\u{10a47}'), ('\u{10a7d}', '\u{10a7e}'), ('\u{10a9d}', '\u{10a9f}'), ('\u{10aeb}',
+        '\u{10aef}'), ('\u{10b58}', '\u{10b5f}'), ('\u{10b78}', '\u{10b7f}'), ('\u{10ba9}',
+        '\u{10baf}'), ('\u{10e60}', '\u{10e7e}'), ('\u{11052}', '\u{11065}'), ('\u{111e1}',
+        '\u{111f4}'), ('\u{118ea}', '\u{118f2}'), ('\u{16b5b}', '\u{16b61}'), ('\u{1d360}',
+        '\u{1d371}'), ('\u{1e8c7}', '\u{1e8cf}'), ('\u{1f100}', '\u{1f10c}')
     ];
 
     pub static P_table: &'static [(char, char)] = &[
-        ('\x21', '\x23'), ('\x25', '\x2a'), ('\x2c', '\x2f'), ('\x3a', '\x3b'), ('\x3f', '\x40'),
-        ('\x5b', '\x5d'), ('\x5f', '\x5f'), ('\x7b', '\x7b'), ('\x7d', '\x7d'), ('\u00a1',
-        '\u00a1'), ('\u00a7', '\u00a7'), ('\u00ab', '\u00ab'), ('\u00b6', '\u00b7'), ('\u00bb',
-        '\u00bb'), ('\u00bf', '\u00bf'), ('\u037e', '\u037e'), ('\u0387', '\u0387'), ('\u055a',
-        '\u055f'), ('\u0589', '\u058a'), ('\u05be', '\u05be'), ('\u05c0', '\u05c0'), ('\u05c3',
-        '\u05c3'), ('\u05c6', '\u05c6'), ('\u05f3', '\u05f4'), ('\u0609', '\u060a'), ('\u060c',
-        '\u060d'), ('\u061b', '\u061b'), ('\u061e', '\u061f'), ('\u066a', '\u066d'), ('\u06d4',
-        '\u06d4'), ('\u0700', '\u070d'), ('\u07f7', '\u07f9'), ('\u0830', '\u083e'), ('\u085e',
-        '\u085e'), ('\u0964', '\u0965'), ('\u0970', '\u0970'), ('\u0af0', '\u0af0'), ('\u0df4',
-        '\u0df4'), ('\u0e4f', '\u0e4f'), ('\u0e5a', '\u0e5b'), ('\u0f04', '\u0f12'), ('\u0f14',
-        '\u0f14'), ('\u0f3a', '\u0f3d'), ('\u0f85', '\u0f85'), ('\u0fd0', '\u0fd4'), ('\u0fd9',
-        '\u0fda'), ('\u104a', '\u104f'), ('\u10fb', '\u10fb'), ('\u1360', '\u1368'), ('\u1400',
-        '\u1400'), ('\u166d', '\u166e'), ('\u169b', '\u169c'), ('\u16eb', '\u16ed'), ('\u1735',
-        '\u1736'), ('\u17d4', '\u17d6'), ('\u17d8', '\u17da'), ('\u1800', '\u180a'), ('\u1944',
-        '\u1945'), ('\u1a1e', '\u1a1f'), ('\u1aa0', '\u1aa6'), ('\u1aa8', '\u1aad'), ('\u1b5a',
-        '\u1b60'), ('\u1bfc', '\u1bff'), ('\u1c3b', '\u1c3f'), ('\u1c7e', '\u1c7f'), ('\u1cc0',
-        '\u1cc7'), ('\u1cd3', '\u1cd3'), ('\u2010', '\u2027'), ('\u2030', '\u2043'), ('\u2045',
-        '\u2051'), ('\u2053', '\u205e'), ('\u207d', '\u207e'), ('\u208d', '\u208e'), ('\u2308',
-        '\u230b'), ('\u2329', '\u232a'), ('\u2768', '\u2775'), ('\u27c5', '\u27c6'), ('\u27e6',
-        '\u27ef'), ('\u2983', '\u2998'), ('\u29d8', '\u29db'), ('\u29fc', '\u29fd'), ('\u2cf9',
-        '\u2cfc'), ('\u2cfe', '\u2cff'), ('\u2d70', '\u2d70'), ('\u2e00', '\u2e2e'), ('\u2e30',
-        '\u2e42'), ('\u3001', '\u3003'), ('\u3008', '\u3011'), ('\u3014', '\u301f'), ('\u3030',
-        '\u3030'), ('\u303d', '\u303d'), ('\u30a0', '\u30a0'), ('\u30fb', '\u30fb'), ('\ua4fe',
-        '\ua4ff'), ('\ua60d', '\ua60f'), ('\ua673', '\ua673'), ('\ua67e', '\ua67e'), ('\ua6f2',
-        '\ua6f7'), ('\ua874', '\ua877'), ('\ua8ce', '\ua8cf'), ('\ua8f8', '\ua8fa'), ('\ua92e',
-        '\ua92f'), ('\ua95f', '\ua95f'), ('\ua9c1', '\ua9cd'), ('\ua9de', '\ua9df'), ('\uaa5c',
-        '\uaa5f'), ('\uaade', '\uaadf'), ('\uaaf0', '\uaaf1'), ('\uabeb', '\uabeb'), ('\ufd3e',
-        '\ufd3f'), ('\ufe10', '\ufe19'), ('\ufe30', '\ufe52'), ('\ufe54', '\ufe61'), ('\ufe63',
-        '\ufe63'), ('\ufe68', '\ufe68'), ('\ufe6a', '\ufe6b'), ('\uff01', '\uff03'), ('\uff05',
-        '\uff0a'), ('\uff0c', '\uff0f'), ('\uff1a', '\uff1b'), ('\uff1f', '\uff20'), ('\uff3b',
-        '\uff3d'), ('\uff3f', '\uff3f'), ('\uff5b', '\uff5b'), ('\uff5d', '\uff5d'), ('\uff5f',
-        '\uff65'), ('\U00010100', '\U00010102'), ('\U0001039f', '\U0001039f'), ('\U000103d0',
-        '\U000103d0'), ('\U0001056f', '\U0001056f'), ('\U00010857', '\U00010857'), ('\U0001091f',
-        '\U0001091f'), ('\U0001093f', '\U0001093f'), ('\U00010a50', '\U00010a58'), ('\U00010a7f',
-        '\U00010a7f'), ('\U00010af0', '\U00010af6'), ('\U00010b39', '\U00010b3f'), ('\U00010b99',
-        '\U00010b9c'), ('\U00011047', '\U0001104d'), ('\U000110bb', '\U000110bc'), ('\U000110be',
-        '\U000110c1'), ('\U00011140', '\U00011143'), ('\U00011174', '\U00011175'), ('\U000111c5',
-        '\U000111c8'), ('\U000111cd', '\U000111cd'), ('\U00011238', '\U0001123d'), ('\U000114c6',
-        '\U000114c6'), ('\U000115c1', '\U000115c9'), ('\U00011641', '\U00011643'), ('\U00012470',
-        '\U00012474'), ('\U00016a6e', '\U00016a6f'), ('\U00016af5', '\U00016af5'), ('\U00016b37',
-        '\U00016b3b'), ('\U00016b44', '\U00016b44'), ('\U0001bc9f', '\U0001bc9f')
+        ('\u{21}', '\u{23}'), ('\u{25}', '\u{2a}'), ('\u{2c}', '\u{2f}'), ('\u{3a}', '\u{3b}'),
+        ('\u{3f}', '\u{40}'), ('\u{5b}', '\u{5d}'), ('\u{5f}', '\u{5f}'), ('\u{7b}', '\u{7b}'),
+        ('\u{7d}', '\u{7d}'), ('\u{a1}', '\u{a1}'), ('\u{a7}', '\u{a7}'), ('\u{ab}', '\u{ab}'),
+        ('\u{b6}', '\u{b7}'), ('\u{bb}', '\u{bb}'), ('\u{bf}', '\u{bf}'), ('\u{37e}', '\u{37e}'),
+        ('\u{387}', '\u{387}'), ('\u{55a}', '\u{55f}'), ('\u{589}', '\u{58a}'), ('\u{5be}',
+        '\u{5be}'), ('\u{5c0}', '\u{5c0}'), ('\u{5c3}', '\u{5c3}'), ('\u{5c6}', '\u{5c6}'),
+        ('\u{5f3}', '\u{5f4}'), ('\u{609}', '\u{60a}'), ('\u{60c}', '\u{60d}'), ('\u{61b}',
+        '\u{61b}'), ('\u{61e}', '\u{61f}'), ('\u{66a}', '\u{66d}'), ('\u{6d4}', '\u{6d4}'),
+        ('\u{700}', '\u{70d}'), ('\u{7f7}', '\u{7f9}'), ('\u{830}', '\u{83e}'), ('\u{85e}',
+        '\u{85e}'), ('\u{964}', '\u{965}'), ('\u{970}', '\u{970}'), ('\u{af0}', '\u{af0}'),
+        ('\u{df4}', '\u{df4}'), ('\u{e4f}', '\u{e4f}'), ('\u{e5a}', '\u{e5b}'), ('\u{f04}',
+        '\u{f12}'), ('\u{f14}', '\u{f14}'), ('\u{f3a}', '\u{f3d}'), ('\u{f85}', '\u{f85}'),
+        ('\u{fd0}', '\u{fd4}'), ('\u{fd9}', '\u{fda}'), ('\u{104a}', '\u{104f}'), ('\u{10fb}',
+        '\u{10fb}'), ('\u{1360}', '\u{1368}'), ('\u{1400}', '\u{1400}'), ('\u{166d}', '\u{166e}'),
+        ('\u{169b}', '\u{169c}'), ('\u{16eb}', '\u{16ed}'), ('\u{1735}', '\u{1736}'), ('\u{17d4}',
+        '\u{17d6}'), ('\u{17d8}', '\u{17da}'), ('\u{1800}', '\u{180a}'), ('\u{1944}', '\u{1945}'),
+        ('\u{1a1e}', '\u{1a1f}'), ('\u{1aa0}', '\u{1aa6}'), ('\u{1aa8}', '\u{1aad}'), ('\u{1b5a}',
+        '\u{1b60}'), ('\u{1bfc}', '\u{1bff}'), ('\u{1c3b}', '\u{1c3f}'), ('\u{1c7e}', '\u{1c7f}'),
+        ('\u{1cc0}', '\u{1cc7}'), ('\u{1cd3}', '\u{1cd3}'), ('\u{2010}', '\u{2027}'), ('\u{2030}',
+        '\u{2043}'), ('\u{2045}', '\u{2051}'), ('\u{2053}', '\u{205e}'), ('\u{207d}', '\u{207e}'),
+        ('\u{208d}', '\u{208e}'), ('\u{2308}', '\u{230b}'), ('\u{2329}', '\u{232a}'), ('\u{2768}',
+        '\u{2775}'), ('\u{27c5}', '\u{27c6}'), ('\u{27e6}', '\u{27ef}'), ('\u{2983}', '\u{2998}'),
+        ('\u{29d8}', '\u{29db}'), ('\u{29fc}', '\u{29fd}'), ('\u{2cf9}', '\u{2cfc}'), ('\u{2cfe}',
+        '\u{2cff}'), ('\u{2d70}', '\u{2d70}'), ('\u{2e00}', '\u{2e2e}'), ('\u{2e30}', '\u{2e42}'),
+        ('\u{3001}', '\u{3003}'), ('\u{3008}', '\u{3011}'), ('\u{3014}', '\u{301f}'), ('\u{3030}',
+        '\u{3030}'), ('\u{303d}', '\u{303d}'), ('\u{30a0}', '\u{30a0}'), ('\u{30fb}', '\u{30fb}'),
+        ('\u{a4fe}', '\u{a4ff}'), ('\u{a60d}', '\u{a60f}'), ('\u{a673}', '\u{a673}'), ('\u{a67e}',
+        '\u{a67e}'), ('\u{a6f2}', '\u{a6f7}'), ('\u{a874}', '\u{a877}'), ('\u{a8ce}', '\u{a8cf}'),
+        ('\u{a8f8}', '\u{a8fa}'), ('\u{a92e}', '\u{a92f}'), ('\u{a95f}', '\u{a95f}'), ('\u{a9c1}',
+        '\u{a9cd}'), ('\u{a9de}', '\u{a9df}'), ('\u{aa5c}', '\u{aa5f}'), ('\u{aade}', '\u{aadf}'),
+        ('\u{aaf0}', '\u{aaf1}'), ('\u{abeb}', '\u{abeb}'), ('\u{fd3e}', '\u{fd3f}'), ('\u{fe10}',
+        '\u{fe19}'), ('\u{fe30}', '\u{fe52}'), ('\u{fe54}', '\u{fe61}'), ('\u{fe63}', '\u{fe63}'),
+        ('\u{fe68}', '\u{fe68}'), ('\u{fe6a}', '\u{fe6b}'), ('\u{ff01}', '\u{ff03}'), ('\u{ff05}',
+        '\u{ff0a}'), ('\u{ff0c}', '\u{ff0f}'), ('\u{ff1a}', '\u{ff1b}'), ('\u{ff1f}', '\u{ff20}'),
+        ('\u{ff3b}', '\u{ff3d}'), ('\u{ff3f}', '\u{ff3f}'), ('\u{ff5b}', '\u{ff5b}'), ('\u{ff5d}',
+        '\u{ff5d}'), ('\u{ff5f}', '\u{ff65}'), ('\u{10100}', '\u{10102}'), ('\u{1039f}',
+        '\u{1039f}'), ('\u{103d0}', '\u{103d0}'), ('\u{1056f}', '\u{1056f}'), ('\u{10857}',
+        '\u{10857}'), ('\u{1091f}', '\u{1091f}'), ('\u{1093f}', '\u{1093f}'), ('\u{10a50}',
+        '\u{10a58}'), ('\u{10a7f}', '\u{10a7f}'), ('\u{10af0}', '\u{10af6}'), ('\u{10b39}',
+        '\u{10b3f}'), ('\u{10b99}', '\u{10b9c}'), ('\u{11047}', '\u{1104d}'), ('\u{110bb}',
+        '\u{110bc}'), ('\u{110be}', '\u{110c1}'), ('\u{11140}', '\u{11143}'), ('\u{11174}',
+        '\u{11175}'), ('\u{111c5}', '\u{111c8}'), ('\u{111cd}', '\u{111cd}'), ('\u{11238}',
+        '\u{1123d}'), ('\u{114c6}', '\u{114c6}'), ('\u{115c1}', '\u{115c9}'), ('\u{11641}',
+        '\u{11643}'), ('\u{12470}', '\u{12474}'), ('\u{16a6e}', '\u{16a6f}'), ('\u{16af5}',
+        '\u{16af5}'), ('\u{16b37}', '\u{16b3b}'), ('\u{16b44}', '\u{16b44}'), ('\u{1bc9f}',
+        '\u{1bc9f}')
     ];
 
     pub static Pc_table: &'static [(char, char)] = &[
-        ('\x5f', '\x5f'), ('\u203f', '\u2040'), ('\u2054', '\u2054'), ('\ufe33', '\ufe34'),
-        ('\ufe4d', '\ufe4f'), ('\uff3f', '\uff3f')
+        ('\u{5f}', '\u{5f}'), ('\u{203f}', '\u{2040}'), ('\u{2054}', '\u{2054}'), ('\u{fe33}',
+        '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'), ('\u{ff3f}', '\u{ff3f}')
     ];
 
     pub static Pd_table: &'static [(char, char)] = &[
-        ('\x2d', '\x2d'), ('\u058a', '\u058a'), ('\u05be', '\u05be'), ('\u1400', '\u1400'),
-        ('\u1806', '\u1806'), ('\u2010', '\u2015'), ('\u2e17', '\u2e17'), ('\u2e1a', '\u2e1a'),
-        ('\u2e3a', '\u2e3b'), ('\u2e40', '\u2e40'), ('\u301c', '\u301c'), ('\u3030', '\u3030'),
-        ('\u30a0', '\u30a0'), ('\ufe31', '\ufe32'), ('\ufe58', '\ufe58'), ('\ufe63', '\ufe63'),
-        ('\uff0d', '\uff0d')
+        ('\u{2d}', '\u{2d}'), ('\u{58a}', '\u{58a}'), ('\u{5be}', '\u{5be}'), ('\u{1400}',
+        '\u{1400}'), ('\u{1806}', '\u{1806}'), ('\u{2010}', '\u{2015}'), ('\u{2e17}', '\u{2e17}'),
+        ('\u{2e1a}', '\u{2e1a}'), ('\u{2e3a}', '\u{2e3b}'), ('\u{2e40}', '\u{2e40}'), ('\u{301c}',
+        '\u{301c}'), ('\u{3030}', '\u{3030}'), ('\u{30a0}', '\u{30a0}'), ('\u{fe31}', '\u{fe32}'),
+        ('\u{fe58}', '\u{fe58}'), ('\u{fe63}', '\u{fe63}'), ('\u{ff0d}', '\u{ff0d}')
     ];
 
     pub static Pe_table: &'static [(char, char)] = &[
-        ('\x29', '\x29'), ('\x5d', '\x5d'), ('\x7d', '\x7d'), ('\u0f3b', '\u0f3b'), ('\u0f3d',
-        '\u0f3d'), ('\u169c', '\u169c'), ('\u2046', '\u2046'), ('\u207e', '\u207e'), ('\u208e',
-        '\u208e'), ('\u2309', '\u2309'), ('\u230b', '\u230b'), ('\u232a', '\u232a'), ('\u2769',
-        '\u2769'), ('\u276b', '\u276b'), ('\u276d', '\u276d'), ('\u276f', '\u276f'), ('\u2771',
-        '\u2771'), ('\u2773', '\u2773'), ('\u2775', '\u2775'), ('\u27c6', '\u27c6'), ('\u27e7',
-        '\u27e7'), ('\u27e9', '\u27e9'), ('\u27eb', '\u27eb'), ('\u27ed', '\u27ed'), ('\u27ef',
-        '\u27ef'), ('\u2984', '\u2984'), ('\u2986', '\u2986'), ('\u2988', '\u2988'), ('\u298a',
-        '\u298a'), ('\u298c', '\u298c'), ('\u298e', '\u298e'), ('\u2990', '\u2990'), ('\u2992',
-        '\u2992'), ('\u2994', '\u2994'), ('\u2996', '\u2996'), ('\u2998', '\u2998'), ('\u29d9',
-        '\u29d9'), ('\u29db', '\u29db'), ('\u29fd', '\u29fd'), ('\u2e23', '\u2e23'), ('\u2e25',
-        '\u2e25'), ('\u2e27', '\u2e27'), ('\u2e29', '\u2e29'), ('\u3009', '\u3009'), ('\u300b',
-        '\u300b'), ('\u300d', '\u300d'), ('\u300f', '\u300f'), ('\u3011', '\u3011'), ('\u3015',
-        '\u3015'), ('\u3017', '\u3017'), ('\u3019', '\u3019'), ('\u301b', '\u301b'), ('\u301e',
-        '\u301f'), ('\ufd3e', '\ufd3e'), ('\ufe18', '\ufe18'), ('\ufe36', '\ufe36'), ('\ufe38',
-        '\ufe38'), ('\ufe3a', '\ufe3a'), ('\ufe3c', '\ufe3c'), ('\ufe3e', '\ufe3e'), ('\ufe40',
-        '\ufe40'), ('\ufe42', '\ufe42'), ('\ufe44', '\ufe44'), ('\ufe48', '\ufe48'), ('\ufe5a',
-        '\ufe5a'), ('\ufe5c', '\ufe5c'), ('\ufe5e', '\ufe5e'), ('\uff09', '\uff09'), ('\uff3d',
-        '\uff3d'), ('\uff5d', '\uff5d'), ('\uff60', '\uff60'), ('\uff63', '\uff63')
+        ('\u{29}', '\u{29}'), ('\u{5d}', '\u{5d}'), ('\u{7d}', '\u{7d}'), ('\u{f3b}', '\u{f3b}'),
+        ('\u{f3d}', '\u{f3d}'), ('\u{169c}', '\u{169c}'), ('\u{2046}', '\u{2046}'), ('\u{207e}',
+        '\u{207e}'), ('\u{208e}', '\u{208e}'), ('\u{2309}', '\u{2309}'), ('\u{230b}', '\u{230b}'),
+        ('\u{232a}', '\u{232a}'), ('\u{2769}', '\u{2769}'), ('\u{276b}', '\u{276b}'), ('\u{276d}',
+        '\u{276d}'), ('\u{276f}', '\u{276f}'), ('\u{2771}', '\u{2771}'), ('\u{2773}', '\u{2773}'),
+        ('\u{2775}', '\u{2775}'), ('\u{27c6}', '\u{27c6}'), ('\u{27e7}', '\u{27e7}'), ('\u{27e9}',
+        '\u{27e9}'), ('\u{27eb}', '\u{27eb}'), ('\u{27ed}', '\u{27ed}'), ('\u{27ef}', '\u{27ef}'),
+        ('\u{2984}', '\u{2984}'), ('\u{2986}', '\u{2986}'), ('\u{2988}', '\u{2988}'), ('\u{298a}',
+        '\u{298a}'), ('\u{298c}', '\u{298c}'), ('\u{298e}', '\u{298e}'), ('\u{2990}', '\u{2990}'),
+        ('\u{2992}', '\u{2992}'), ('\u{2994}', '\u{2994}'), ('\u{2996}', '\u{2996}'), ('\u{2998}',
+        '\u{2998}'), ('\u{29d9}', '\u{29d9}'), ('\u{29db}', '\u{29db}'), ('\u{29fd}', '\u{29fd}'),
+        ('\u{2e23}', '\u{2e23}'), ('\u{2e25}', '\u{2e25}'), ('\u{2e27}', '\u{2e27}'), ('\u{2e29}',
+        '\u{2e29}'), ('\u{3009}', '\u{3009}'), ('\u{300b}', '\u{300b}'), ('\u{300d}', '\u{300d}'),
+        ('\u{300f}', '\u{300f}'), ('\u{3011}', '\u{3011}'), ('\u{3015}', '\u{3015}'), ('\u{3017}',
+        '\u{3017}'), ('\u{3019}', '\u{3019}'), ('\u{301b}', '\u{301b}'), ('\u{301e}', '\u{301f}'),
+        ('\u{fd3e}', '\u{fd3e}'), ('\u{fe18}', '\u{fe18}'), ('\u{fe36}', '\u{fe36}'), ('\u{fe38}',
+        '\u{fe38}'), ('\u{fe3a}', '\u{fe3a}'), ('\u{fe3c}', '\u{fe3c}'), ('\u{fe3e}', '\u{fe3e}'),
+        ('\u{fe40}', '\u{fe40}'), ('\u{fe42}', '\u{fe42}'), ('\u{fe44}', '\u{fe44}'), ('\u{fe48}',
+        '\u{fe48}'), ('\u{fe5a}', '\u{fe5a}'), ('\u{fe5c}', '\u{fe5c}'), ('\u{fe5e}', '\u{fe5e}'),
+        ('\u{ff09}', '\u{ff09}'), ('\u{ff3d}', '\u{ff3d}'), ('\u{ff5d}', '\u{ff5d}'), ('\u{ff60}',
+        '\u{ff60}'), ('\u{ff63}', '\u{ff63}')
     ];
 
     pub static Pf_table: &'static [(char, char)] = &[
-        ('\u00bb', '\u00bb'), ('\u2019', '\u2019'), ('\u201d', '\u201d'), ('\u203a', '\u203a'),
-        ('\u2e03', '\u2e03'), ('\u2e05', '\u2e05'), ('\u2e0a', '\u2e0a'), ('\u2e0d', '\u2e0d'),
-        ('\u2e1d', '\u2e1d'), ('\u2e21', '\u2e21')
+        ('\u{bb}', '\u{bb}'), ('\u{2019}', '\u{2019}'), ('\u{201d}', '\u{201d}'), ('\u{203a}',
+        '\u{203a}'), ('\u{2e03}', '\u{2e03}'), ('\u{2e05}', '\u{2e05}'), ('\u{2e0a}', '\u{2e0a}'),
+        ('\u{2e0d}', '\u{2e0d}'), ('\u{2e1d}', '\u{2e1d}'), ('\u{2e21}', '\u{2e21}')
     ];
 
     pub static Pi_table: &'static [(char, char)] = &[
-        ('\u00ab', '\u00ab'), ('\u2018', '\u2018'), ('\u201b', '\u201c'), ('\u201f', '\u201f'),
-        ('\u2039', '\u2039'), ('\u2e02', '\u2e02'), ('\u2e04', '\u2e04'), ('\u2e09', '\u2e09'),
-        ('\u2e0c', '\u2e0c'), ('\u2e1c', '\u2e1c'), ('\u2e20', '\u2e20')
+        ('\u{ab}', '\u{ab}'), ('\u{2018}', '\u{2018}'), ('\u{201b}', '\u{201c}'), ('\u{201f}',
+        '\u{201f}'), ('\u{2039}', '\u{2039}'), ('\u{2e02}', '\u{2e02}'), ('\u{2e04}', '\u{2e04}'),
+        ('\u{2e09}', '\u{2e09}'), ('\u{2e0c}', '\u{2e0c}'), ('\u{2e1c}', '\u{2e1c}'), ('\u{2e20}',
+        '\u{2e20}')
     ];
 
     pub static Po_table: &'static [(char, char)] = &[
-        ('\x21', '\x23'), ('\x25', '\x27'), ('\x2a', '\x2a'), ('\x2c', '\x2c'), ('\x2e', '\x2f'),
-        ('\x3a', '\x3b'), ('\x3f', '\x40'), ('\x5c', '\x5c'), ('\u00a1', '\u00a1'), ('\u00a7',
-        '\u00a7'), ('\u00b6', '\u00b7'), ('\u00bf', '\u00bf'), ('\u037e', '\u037e'), ('\u0387',
-        '\u0387'), ('\u055a', '\u055f'), ('\u0589', '\u0589'), ('\u05c0', '\u05c0'), ('\u05c3',
-        '\u05c3'), ('\u05c6', '\u05c6'), ('\u05f3', '\u05f4'), ('\u0609', '\u060a'), ('\u060c',
-        '\u060d'), ('\u061b', '\u061b'), ('\u061e', '\u061f'), ('\u066a', '\u066d'), ('\u06d4',
-        '\u06d4'), ('\u0700', '\u070d'), ('\u07f7', '\u07f9'), ('\u0830', '\u083e'), ('\u085e',
-        '\u085e'), ('\u0964', '\u0965'), ('\u0970', '\u0970'), ('\u0af0', '\u0af0'), ('\u0df4',
-        '\u0df4'), ('\u0e4f', '\u0e4f'), ('\u0e5a', '\u0e5b'), ('\u0f04', '\u0f12'), ('\u0f14',
-        '\u0f14'), ('\u0f85', '\u0f85'), ('\u0fd0', '\u0fd4'), ('\u0fd9', '\u0fda'), ('\u104a',
-        '\u104f'), ('\u10fb', '\u10fb'), ('\u1360', '\u1368'), ('\u166d', '\u166e'), ('\u16eb',
-        '\u16ed'), ('\u1735', '\u1736'), ('\u17d4', '\u17d6'), ('\u17d8', '\u17da'), ('\u1800',
-        '\u1805'), ('\u1807', '\u180a'), ('\u1944', '\u1945'), ('\u1a1e', '\u1a1f'), ('\u1aa0',
-        '\u1aa6'), ('\u1aa8', '\u1aad'), ('\u1b5a', '\u1b60'), ('\u1bfc', '\u1bff'), ('\u1c3b',
-        '\u1c3f'), ('\u1c7e', '\u1c7f'), ('\u1cc0', '\u1cc7'), ('\u1cd3', '\u1cd3'), ('\u2016',
-        '\u2017'), ('\u2020', '\u2027'), ('\u2030', '\u2038'), ('\u203b', '\u203e'), ('\u2041',
-        '\u2043'), ('\u2047', '\u2051'), ('\u2053', '\u2053'), ('\u2055', '\u205e'), ('\u2cf9',
-        '\u2cfc'), ('\u2cfe', '\u2cff'), ('\u2d70', '\u2d70'), ('\u2e00', '\u2e01'), ('\u2e06',
-        '\u2e08'), ('\u2e0b', '\u2e0b'), ('\u2e0e', '\u2e16'), ('\u2e18', '\u2e19'), ('\u2e1b',
-        '\u2e1b'), ('\u2e1e', '\u2e1f'), ('\u2e2a', '\u2e2e'), ('\u2e30', '\u2e39'), ('\u2e3c',
-        '\u2e3f'), ('\u2e41', '\u2e41'), ('\u3001', '\u3003'), ('\u303d', '\u303d'), ('\u30fb',
-        '\u30fb'), ('\ua4fe', '\ua4ff'), ('\ua60d', '\ua60f'), ('\ua673', '\ua673'), ('\ua67e',
-        '\ua67e'), ('\ua6f2', '\ua6f7'), ('\ua874', '\ua877'), ('\ua8ce', '\ua8cf'), ('\ua8f8',
-        '\ua8fa'), ('\ua92e', '\ua92f'), ('\ua95f', '\ua95f'), ('\ua9c1', '\ua9cd'), ('\ua9de',
-        '\ua9df'), ('\uaa5c', '\uaa5f'), ('\uaade', '\uaadf'), ('\uaaf0', '\uaaf1'), ('\uabeb',
-        '\uabeb'), ('\ufe10', '\ufe16'), ('\ufe19', '\ufe19'), ('\ufe30', '\ufe30'), ('\ufe45',
-        '\ufe46'), ('\ufe49', '\ufe4c'), ('\ufe50', '\ufe52'), ('\ufe54', '\ufe57'), ('\ufe5f',
-        '\ufe61'), ('\ufe68', '\ufe68'), ('\ufe6a', '\ufe6b'), ('\uff01', '\uff03'), ('\uff05',
-        '\uff07'), ('\uff0a', '\uff0a'), ('\uff0c', '\uff0c'), ('\uff0e', '\uff0f'), ('\uff1a',
-        '\uff1b'), ('\uff1f', '\uff20'), ('\uff3c', '\uff3c'), ('\uff61', '\uff61'), ('\uff64',
-        '\uff65'), ('\U00010100', '\U00010102'), ('\U0001039f', '\U0001039f'), ('\U000103d0',
-        '\U000103d0'), ('\U0001056f', '\U0001056f'), ('\U00010857', '\U00010857'), ('\U0001091f',
-        '\U0001091f'), ('\U0001093f', '\U0001093f'), ('\U00010a50', '\U00010a58'), ('\U00010a7f',
-        '\U00010a7f'), ('\U00010af0', '\U00010af6'), ('\U00010b39', '\U00010b3f'), ('\U00010b99',
-        '\U00010b9c'), ('\U00011047', '\U0001104d'), ('\U000110bb', '\U000110bc'), ('\U000110be',
-        '\U000110c1'), ('\U00011140', '\U00011143'), ('\U00011174', '\U00011175'), ('\U000111c5',
-        '\U000111c8'), ('\U000111cd', '\U000111cd'), ('\U00011238', '\U0001123d'), ('\U000114c6',
-        '\U000114c6'), ('\U000115c1', '\U000115c9'), ('\U00011641', '\U00011643'), ('\U00012470',
-        '\U00012474'), ('\U00016a6e', '\U00016a6f'), ('\U00016af5', '\U00016af5'), ('\U00016b37',
-        '\U00016b3b'), ('\U00016b44', '\U00016b44'), ('\U0001bc9f', '\U0001bc9f')
+        ('\u{21}', '\u{23}'), ('\u{25}', '\u{27}'), ('\u{2a}', '\u{2a}'), ('\u{2c}', '\u{2c}'),
+        ('\u{2e}', '\u{2f}'), ('\u{3a}', '\u{3b}'), ('\u{3f}', '\u{40}'), ('\u{5c}', '\u{5c}'),
+        ('\u{a1}', '\u{a1}'), ('\u{a7}', '\u{a7}'), ('\u{b6}', '\u{b7}'), ('\u{bf}', '\u{bf}'),
+        ('\u{37e}', '\u{37e}'), ('\u{387}', '\u{387}'), ('\u{55a}', '\u{55f}'), ('\u{589}',
+        '\u{589}'), ('\u{5c0}', '\u{5c0}'), ('\u{5c3}', '\u{5c3}'), ('\u{5c6}', '\u{5c6}'),
+        ('\u{5f3}', '\u{5f4}'), ('\u{609}', '\u{60a}'), ('\u{60c}', '\u{60d}'), ('\u{61b}',
+        '\u{61b}'), ('\u{61e}', '\u{61f}'), ('\u{66a}', '\u{66d}'), ('\u{6d4}', '\u{6d4}'),
+        ('\u{700}', '\u{70d}'), ('\u{7f7}', '\u{7f9}'), ('\u{830}', '\u{83e}'), ('\u{85e}',
+        '\u{85e}'), ('\u{964}', '\u{965}'), ('\u{970}', '\u{970}'), ('\u{af0}', '\u{af0}'),
+        ('\u{df4}', '\u{df4}'), ('\u{e4f}', '\u{e4f}'), ('\u{e5a}', '\u{e5b}'), ('\u{f04}',
+        '\u{f12}'), ('\u{f14}', '\u{f14}'), ('\u{f85}', '\u{f85}'), ('\u{fd0}', '\u{fd4}'),
+        ('\u{fd9}', '\u{fda}'), ('\u{104a}', '\u{104f}'), ('\u{10fb}', '\u{10fb}'), ('\u{1360}',
+        '\u{1368}'), ('\u{166d}', '\u{166e}'), ('\u{16eb}', '\u{16ed}'), ('\u{1735}', '\u{1736}'),
+        ('\u{17d4}', '\u{17d6}'), ('\u{17d8}', '\u{17da}'), ('\u{1800}', '\u{1805}'), ('\u{1807}',
+        '\u{180a}'), ('\u{1944}', '\u{1945}'), ('\u{1a1e}', '\u{1a1f}'), ('\u{1aa0}', '\u{1aa6}'),
+        ('\u{1aa8}', '\u{1aad}'), ('\u{1b5a}', '\u{1b60}'), ('\u{1bfc}', '\u{1bff}'), ('\u{1c3b}',
+        '\u{1c3f}'), ('\u{1c7e}', '\u{1c7f}'), ('\u{1cc0}', '\u{1cc7}'), ('\u{1cd3}', '\u{1cd3}'),
+        ('\u{2016}', '\u{2017}'), ('\u{2020}', '\u{2027}'), ('\u{2030}', '\u{2038}'), ('\u{203b}',
+        '\u{203e}'), ('\u{2041}', '\u{2043}'), ('\u{2047}', '\u{2051}'), ('\u{2053}', '\u{2053}'),
+        ('\u{2055}', '\u{205e}'), ('\u{2cf9}', '\u{2cfc}'), ('\u{2cfe}', '\u{2cff}'), ('\u{2d70}',
+        '\u{2d70}'), ('\u{2e00}', '\u{2e01}'), ('\u{2e06}', '\u{2e08}'), ('\u{2e0b}', '\u{2e0b}'),
+        ('\u{2e0e}', '\u{2e16}'), ('\u{2e18}', '\u{2e19}'), ('\u{2e1b}', '\u{2e1b}'), ('\u{2e1e}',
+        '\u{2e1f}'), ('\u{2e2a}', '\u{2e2e}'), ('\u{2e30}', '\u{2e39}'), ('\u{2e3c}', '\u{2e3f}'),
+        ('\u{2e41}', '\u{2e41}'), ('\u{3001}', '\u{3003}'), ('\u{303d}', '\u{303d}'), ('\u{30fb}',
+        '\u{30fb}'), ('\u{a4fe}', '\u{a4ff}'), ('\u{a60d}', '\u{a60f}'), ('\u{a673}', '\u{a673}'),
+        ('\u{a67e}', '\u{a67e}'), ('\u{a6f2}', '\u{a6f7}'), ('\u{a874}', '\u{a877}'), ('\u{a8ce}',
+        '\u{a8cf}'), ('\u{a8f8}', '\u{a8fa}'), ('\u{a92e}', '\u{a92f}'), ('\u{a95f}', '\u{a95f}'),
+        ('\u{a9c1}', '\u{a9cd}'), ('\u{a9de}', '\u{a9df}'), ('\u{aa5c}', '\u{aa5f}'), ('\u{aade}',
+        '\u{aadf}'), ('\u{aaf0}', '\u{aaf1}'), ('\u{abeb}', '\u{abeb}'), ('\u{fe10}', '\u{fe16}'),
+        ('\u{fe19}', '\u{fe19}'), ('\u{fe30}', '\u{fe30}'), ('\u{fe45}', '\u{fe46}'), ('\u{fe49}',
+        '\u{fe4c}'), ('\u{fe50}', '\u{fe52}'), ('\u{fe54}', '\u{fe57}'), ('\u{fe5f}', '\u{fe61}'),
+        ('\u{fe68}', '\u{fe68}'), ('\u{fe6a}', '\u{fe6b}'), ('\u{ff01}', '\u{ff03}'), ('\u{ff05}',
+        '\u{ff07}'), ('\u{ff0a}', '\u{ff0a}'), ('\u{ff0c}', '\u{ff0c}'), ('\u{ff0e}', '\u{ff0f}'),
+        ('\u{ff1a}', '\u{ff1b}'), ('\u{ff1f}', '\u{ff20}'), ('\u{ff3c}', '\u{ff3c}'), ('\u{ff61}',
+        '\u{ff61}'), ('\u{ff64}', '\u{ff65}'), ('\u{10100}', '\u{10102}'), ('\u{1039f}',
+        '\u{1039f}'), ('\u{103d0}', '\u{103d0}'), ('\u{1056f}', '\u{1056f}'), ('\u{10857}',
+        '\u{10857}'), ('\u{1091f}', '\u{1091f}'), ('\u{1093f}', '\u{1093f}'), ('\u{10a50}',
+        '\u{10a58}'), ('\u{10a7f}', '\u{10a7f}'), ('\u{10af0}', '\u{10af6}'), ('\u{10b39}',
+        '\u{10b3f}'), ('\u{10b99}', '\u{10b9c}'), ('\u{11047}', '\u{1104d}'), ('\u{110bb}',
+        '\u{110bc}'), ('\u{110be}', '\u{110c1}'), ('\u{11140}', '\u{11143}'), ('\u{11174}',
+        '\u{11175}'), ('\u{111c5}', '\u{111c8}'), ('\u{111cd}', '\u{111cd}'), ('\u{11238}',
+        '\u{1123d}'), ('\u{114c6}', '\u{114c6}'), ('\u{115c1}', '\u{115c9}'), ('\u{11641}',
+        '\u{11643}'), ('\u{12470}', '\u{12474}'), ('\u{16a6e}', '\u{16a6f}'), ('\u{16af5}',
+        '\u{16af5}'), ('\u{16b37}', '\u{16b3b}'), ('\u{16b44}', '\u{16b44}'), ('\u{1bc9f}',
+        '\u{1bc9f}')
     ];
 
     pub static Ps_table: &'static [(char, char)] = &[
-        ('\x28', '\x28'), ('\x5b', '\x5b'), ('\x7b', '\x7b'), ('\u0f3a', '\u0f3a'), ('\u0f3c',
-        '\u0f3c'), ('\u169b', '\u169b'), ('\u201a', '\u201a'), ('\u201e', '\u201e'), ('\u2045',
-        '\u2045'), ('\u207d', '\u207d'), ('\u208d', '\u208d'), ('\u2308', '\u2308'), ('\u230a',
-        '\u230a'), ('\u2329', '\u2329'), ('\u2768', '\u2768'), ('\u276a', '\u276a'), ('\u276c',
-        '\u276c'), ('\u276e', '\u276e'), ('\u2770', '\u2770'), ('\u2772', '\u2772'), ('\u2774',
-        '\u2774'), ('\u27c5', '\u27c5'), ('\u27e6', '\u27e6'), ('\u27e8', '\u27e8'), ('\u27ea',
-        '\u27ea'), ('\u27ec', '\u27ec'), ('\u27ee', '\u27ee'), ('\u2983', '\u2983'), ('\u2985',
-        '\u2985'), ('\u2987', '\u2987'), ('\u2989', '\u2989'), ('\u298b', '\u298b'), ('\u298d',
-        '\u298d'), ('\u298f', '\u298f'), ('\u2991', '\u2991'), ('\u2993', '\u2993'), ('\u2995',
-        '\u2995'), ('\u2997', '\u2997'), ('\u29d8', '\u29d8'), ('\u29da', '\u29da'), ('\u29fc',
-        '\u29fc'), ('\u2e22', '\u2e22'), ('\u2e24', '\u2e24'), ('\u2e26', '\u2e26'), ('\u2e28',
-        '\u2e28'), ('\u2e42', '\u2e42'), ('\u3008', '\u3008'), ('\u300a', '\u300a'), ('\u300c',
-        '\u300c'), ('\u300e', '\u300e'), ('\u3010', '\u3010'), ('\u3014', '\u3014'), ('\u3016',
-        '\u3016'), ('\u3018', '\u3018'), ('\u301a', '\u301a'), ('\u301d', '\u301d'), ('\ufd3f',
-        '\ufd3f'), ('\ufe17', '\ufe17'), ('\ufe35', '\ufe35'), ('\ufe37', '\ufe37'), ('\ufe39',
-        '\ufe39'), ('\ufe3b', '\ufe3b'), ('\ufe3d', '\ufe3d'), ('\ufe3f', '\ufe3f'), ('\ufe41',
-        '\ufe41'), ('\ufe43', '\ufe43'), ('\ufe47', '\ufe47'), ('\ufe59', '\ufe59'), ('\ufe5b',
-        '\ufe5b'), ('\ufe5d', '\ufe5d'), ('\uff08', '\uff08'), ('\uff3b', '\uff3b'), ('\uff5b',
-        '\uff5b'), ('\uff5f', '\uff5f'), ('\uff62', '\uff62')
+        ('\u{28}', '\u{28}'), ('\u{5b}', '\u{5b}'), ('\u{7b}', '\u{7b}'), ('\u{f3a}', '\u{f3a}'),
+        ('\u{f3c}', '\u{f3c}'), ('\u{169b}', '\u{169b}'), ('\u{201a}', '\u{201a}'), ('\u{201e}',
+        '\u{201e}'), ('\u{2045}', '\u{2045}'), ('\u{207d}', '\u{207d}'), ('\u{208d}', '\u{208d}'),
+        ('\u{2308}', '\u{2308}'), ('\u{230a}', '\u{230a}'), ('\u{2329}', '\u{2329}'), ('\u{2768}',
+        '\u{2768}'), ('\u{276a}', '\u{276a}'), ('\u{276c}', '\u{276c}'), ('\u{276e}', '\u{276e}'),
+        ('\u{2770}', '\u{2770}'), ('\u{2772}', '\u{2772}'), ('\u{2774}', '\u{2774}'), ('\u{27c5}',
+        '\u{27c5}'), ('\u{27e6}', '\u{27e6}'), ('\u{27e8}', '\u{27e8}'), ('\u{27ea}', '\u{27ea}'),
+        ('\u{27ec}', '\u{27ec}'), ('\u{27ee}', '\u{27ee}'), ('\u{2983}', '\u{2983}'), ('\u{2985}',
+        '\u{2985}'), ('\u{2987}', '\u{2987}'), ('\u{2989}', '\u{2989}'), ('\u{298b}', '\u{298b}'),
+        ('\u{298d}', '\u{298d}'), ('\u{298f}', '\u{298f}'), ('\u{2991}', '\u{2991}'), ('\u{2993}',
+        '\u{2993}'), ('\u{2995}', '\u{2995}'), ('\u{2997}', '\u{2997}'), ('\u{29d8}', '\u{29d8}'),
+        ('\u{29da}', '\u{29da}'), ('\u{29fc}', '\u{29fc}'), ('\u{2e22}', '\u{2e22}'), ('\u{2e24}',
+        '\u{2e24}'), ('\u{2e26}', '\u{2e26}'), ('\u{2e28}', '\u{2e28}'), ('\u{2e42}', '\u{2e42}'),
+        ('\u{3008}', '\u{3008}'), ('\u{300a}', '\u{300a}'), ('\u{300c}', '\u{300c}'), ('\u{300e}',
+        '\u{300e}'), ('\u{3010}', '\u{3010}'), ('\u{3014}', '\u{3014}'), ('\u{3016}', '\u{3016}'),
+        ('\u{3018}', '\u{3018}'), ('\u{301a}', '\u{301a}'), ('\u{301d}', '\u{301d}'), ('\u{fd3f}',
+        '\u{fd3f}'), ('\u{fe17}', '\u{fe17}'), ('\u{fe35}', '\u{fe35}'), ('\u{fe37}', '\u{fe37}'),
+        ('\u{fe39}', '\u{fe39}'), ('\u{fe3b}', '\u{fe3b}'), ('\u{fe3d}', '\u{fe3d}'), ('\u{fe3f}',
+        '\u{fe3f}'), ('\u{fe41}', '\u{fe41}'), ('\u{fe43}', '\u{fe43}'), ('\u{fe47}', '\u{fe47}'),
+        ('\u{fe59}', '\u{fe59}'), ('\u{fe5b}', '\u{fe5b}'), ('\u{fe5d}', '\u{fe5d}'), ('\u{ff08}',
+        '\u{ff08}'), ('\u{ff3b}', '\u{ff3b}'), ('\u{ff5b}', '\u{ff5b}'), ('\u{ff5f}', '\u{ff5f}'),
+        ('\u{ff62}', '\u{ff62}')
     ];
 
     pub static S_table: &'static [(char, char)] = &[
-        ('\x24', '\x24'), ('\x2b', '\x2b'), ('\x3c', '\x3e'), ('\x5e', '\x5e'), ('\x60', '\x60'),
-        ('\x7c', '\x7c'), ('\x7e', '\x7e'), ('\u00a2', '\u00a6'), ('\u00a8', '\u00a9'), ('\u00ac',
-        '\u00ac'), ('\u00ae', '\u00b1'), ('\u00b4', '\u00b4'), ('\u00b8', '\u00b8'), ('\u00d7',
-        '\u00d7'), ('\u00f7', '\u00f7'), ('\u02c2', '\u02c5'), ('\u02d2', '\u02df'), ('\u02e5',
-        '\u02eb'), ('\u02ed', '\u02ed'), ('\u02ef', '\u02ff'), ('\u0375', '\u0375'), ('\u0384',
-        '\u0385'), ('\u03f6', '\u03f6'), ('\u0482', '\u0482'), ('\u058d', '\u058f'), ('\u0606',
-        '\u0608'), ('\u060b', '\u060b'), ('\u060e', '\u060f'), ('\u06de', '\u06de'), ('\u06e9',
-        '\u06e9'), ('\u06fd', '\u06fe'), ('\u07f6', '\u07f6'), ('\u09f2', '\u09f3'), ('\u09fa',
-        '\u09fb'), ('\u0af1', '\u0af1'), ('\u0b70', '\u0b70'), ('\u0bf3', '\u0bfa'), ('\u0c7f',
-        '\u0c7f'), ('\u0d79', '\u0d79'), ('\u0e3f', '\u0e3f'), ('\u0f01', '\u0f03'), ('\u0f13',
-        '\u0f13'), ('\u0f15', '\u0f17'), ('\u0f1a', '\u0f1f'), ('\u0f34', '\u0f34'), ('\u0f36',
-        '\u0f36'), ('\u0f38', '\u0f38'), ('\u0fbe', '\u0fc5'), ('\u0fc7', '\u0fcc'), ('\u0fce',
-        '\u0fcf'), ('\u0fd5', '\u0fd8'), ('\u109e', '\u109f'), ('\u1390', '\u1399'), ('\u17db',
-        '\u17db'), ('\u1940', '\u1940'), ('\u19de', '\u19ff'), ('\u1b61', '\u1b6a'), ('\u1b74',
-        '\u1b7c'), ('\u1fbd', '\u1fbd'), ('\u1fbf', '\u1fc1'), ('\u1fcd', '\u1fcf'), ('\u1fdd',
-        '\u1fdf'), ('\u1fed', '\u1fef'), ('\u1ffd', '\u1ffe'), ('\u2044', '\u2044'), ('\u2052',
-        '\u2052'), ('\u207a', '\u207c'), ('\u208a', '\u208c'), ('\u20a0', '\u20bd'), ('\u2100',
-        '\u2101'), ('\u2103', '\u2106'), ('\u2108', '\u2109'), ('\u2114', '\u2114'), ('\u2116',
-        '\u2118'), ('\u211e', '\u2123'), ('\u2125', '\u2125'), ('\u2127', '\u2127'), ('\u2129',
-        '\u2129'), ('\u212e', '\u212e'), ('\u213a', '\u213b'), ('\u2140', '\u2144'), ('\u214a',
-        '\u214d'), ('\u214f', '\u214f'), ('\u2190', '\u2307'), ('\u230c', '\u2328'), ('\u232b',
-        '\u23fa'), ('\u2400', '\u2426'), ('\u2440', '\u244a'), ('\u249c', '\u24e9'), ('\u2500',
-        '\u2767'), ('\u2794', '\u27c4'), ('\u27c7', '\u27e5'), ('\u27f0', '\u2982'), ('\u2999',
-        '\u29d7'), ('\u29dc', '\u29fb'), ('\u29fe', '\u2b73'), ('\u2b76', '\u2b95'), ('\u2b98',
-        '\u2bb9'), ('\u2bbd', '\u2bc8'), ('\u2bca', '\u2bd1'), ('\u2ce5', '\u2cea'), ('\u2e80',
-        '\u2e99'), ('\u2e9b', '\u2ef3'), ('\u2f00', '\u2fd5'), ('\u2ff0', '\u2ffb'), ('\u3004',
-        '\u3004'), ('\u3012', '\u3013'), ('\u3020', '\u3020'), ('\u3036', '\u3037'), ('\u303e',
-        '\u303f'), ('\u309b', '\u309c'), ('\u3190', '\u3191'), ('\u3196', '\u319f'), ('\u31c0',
-        '\u31e3'), ('\u3200', '\u321e'), ('\u322a', '\u3247'), ('\u3250', '\u3250'), ('\u3260',
-        '\u327f'), ('\u328a', '\u32b0'), ('\u32c0', '\u32fe'), ('\u3300', '\u33ff'), ('\u4dc0',
-        '\u4dff'), ('\ua490', '\ua4c6'), ('\ua700', '\ua716'), ('\ua720', '\ua721'), ('\ua789',
-        '\ua78a'), ('\ua828', '\ua82b'), ('\ua836', '\ua839'), ('\uaa77', '\uaa79'), ('\uab5b',
-        '\uab5b'), ('\ufb29', '\ufb29'), ('\ufbb2', '\ufbc1'), ('\ufdfc', '\ufdfd'), ('\ufe62',
-        '\ufe62'), ('\ufe64', '\ufe66'), ('\ufe69', '\ufe69'), ('\uff04', '\uff04'), ('\uff0b',
-        '\uff0b'), ('\uff1c', '\uff1e'), ('\uff3e', '\uff3e'), ('\uff40', '\uff40'), ('\uff5c',
-        '\uff5c'), ('\uff5e', '\uff5e'), ('\uffe0', '\uffe6'), ('\uffe8', '\uffee'), ('\ufffc',
-        '\ufffd'), ('\U00010137', '\U0001013f'), ('\U00010179', '\U00010189'), ('\U0001018c',
-        '\U0001018c'), ('\U00010190', '\U0001019b'), ('\U000101a0', '\U000101a0'), ('\U000101d0',
-        '\U000101fc'), ('\U00010877', '\U00010878'), ('\U00010ac8', '\U00010ac8'), ('\U00016b3c',
-        '\U00016b3f'), ('\U00016b45', '\U00016b45'), ('\U0001bc9c', '\U0001bc9c'), ('\U0001d000',
-        '\U0001d0f5'), ('\U0001d100', '\U0001d126'), ('\U0001d129', '\U0001d164'), ('\U0001d16a',
-        '\U0001d16c'), ('\U0001d183', '\U0001d184'), ('\U0001d18c', '\U0001d1a9'), ('\U0001d1ae',
-        '\U0001d1dd'), ('\U0001d200', '\U0001d241'), ('\U0001d245', '\U0001d245'), ('\U0001d300',
-        '\U0001d356'), ('\U0001d6c1', '\U0001d6c1'), ('\U0001d6db', '\U0001d6db'), ('\U0001d6fb',
-        '\U0001d6fb'), ('\U0001d715', '\U0001d715'), ('\U0001d735', '\U0001d735'), ('\U0001d74f',
-        '\U0001d74f'), ('\U0001d76f', '\U0001d76f'), ('\U0001d789', '\U0001d789'), ('\U0001d7a9',
-        '\U0001d7a9'), ('\U0001d7c3', '\U0001d7c3'), ('\U0001eef0', '\U0001eef1'), ('\U0001f000',
-        '\U0001f02b'), ('\U0001f030', '\U0001f093'), ('\U0001f0a0', '\U0001f0ae'), ('\U0001f0b1',
-        '\U0001f0bf'), ('\U0001f0c1', '\U0001f0cf'), ('\U0001f0d1', '\U0001f0f5'), ('\U0001f110',
-        '\U0001f12e'), ('\U0001f130', '\U0001f16b'), ('\U0001f170', '\U0001f19a'), ('\U0001f1e6',
-        '\U0001f202'), ('\U0001f210', '\U0001f23a'), ('\U0001f240', '\U0001f248'), ('\U0001f250',
-        '\U0001f251'), ('\U0001f300', '\U0001f32c'), ('\U0001f330', '\U0001f37d'), ('\U0001f380',
-        '\U0001f3ce'), ('\U0001f3d4', '\U0001f3f7'), ('\U0001f400', '\U0001f4fe'), ('\U0001f500',
-        '\U0001f54a'), ('\U0001f550', '\U0001f579'), ('\U0001f57b', '\U0001f5a3'), ('\U0001f5a5',
-        '\U0001f642'), ('\U0001f645', '\U0001f6cf'), ('\U0001f6e0', '\U0001f6ec'), ('\U0001f6f0',
-        '\U0001f6f3'), ('\U0001f700', '\U0001f773'), ('\U0001f780', '\U0001f7d4'), ('\U0001f800',
-        '\U0001f80b'), ('\U0001f810', '\U0001f847'), ('\U0001f850', '\U0001f859'), ('\U0001f860',
-        '\U0001f887'), ('\U0001f890', '\U0001f8ad')
+        ('\u{24}', '\u{24}'), ('\u{2b}', '\u{2b}'), ('\u{3c}', '\u{3e}'), ('\u{5e}', '\u{5e}'),
+        ('\u{60}', '\u{60}'), ('\u{7c}', '\u{7c}'), ('\u{7e}', '\u{7e}'), ('\u{a2}', '\u{a6}'),
+        ('\u{a8}', '\u{a9}'), ('\u{ac}', '\u{ac}'), ('\u{ae}', '\u{b1}'), ('\u{b4}', '\u{b4}'),
+        ('\u{b8}', '\u{b8}'), ('\u{d7}', '\u{d7}'), ('\u{f7}', '\u{f7}'), ('\u{2c2}', '\u{2c5}'),
+        ('\u{2d2}', '\u{2df}'), ('\u{2e5}', '\u{2eb}'), ('\u{2ed}', '\u{2ed}'), ('\u{2ef}',
+        '\u{2ff}'), ('\u{375}', '\u{375}'), ('\u{384}', '\u{385}'), ('\u{3f6}', '\u{3f6}'),
+        ('\u{482}', '\u{482}'), ('\u{58d}', '\u{58f}'), ('\u{606}', '\u{608}'), ('\u{60b}',
+        '\u{60b}'), ('\u{60e}', '\u{60f}'), ('\u{6de}', '\u{6de}'), ('\u{6e9}', '\u{6e9}'),
+        ('\u{6fd}', '\u{6fe}'), ('\u{7f6}', '\u{7f6}'), ('\u{9f2}', '\u{9f3}'), ('\u{9fa}',
+        '\u{9fb}'), ('\u{af1}', '\u{af1}'), ('\u{b70}', '\u{b70}'), ('\u{bf3}', '\u{bfa}'),
+        ('\u{c7f}', '\u{c7f}'), ('\u{d79}', '\u{d79}'), ('\u{e3f}', '\u{e3f}'), ('\u{f01}',
+        '\u{f03}'), ('\u{f13}', '\u{f13}'), ('\u{f15}', '\u{f17}'), ('\u{f1a}', '\u{f1f}'),
+        ('\u{f34}', '\u{f34}'), ('\u{f36}', '\u{f36}'), ('\u{f38}', '\u{f38}'), ('\u{fbe}',
+        '\u{fc5}'), ('\u{fc7}', '\u{fcc}'), ('\u{fce}', '\u{fcf}'), ('\u{fd5}', '\u{fd8}'),
+        ('\u{109e}', '\u{109f}'), ('\u{1390}', '\u{1399}'), ('\u{17db}', '\u{17db}'), ('\u{1940}',
+        '\u{1940}'), ('\u{19de}', '\u{19ff}'), ('\u{1b61}', '\u{1b6a}'), ('\u{1b74}', '\u{1b7c}'),
+        ('\u{1fbd}', '\u{1fbd}'), ('\u{1fbf}', '\u{1fc1}'), ('\u{1fcd}', '\u{1fcf}'), ('\u{1fdd}',
+        '\u{1fdf}'), ('\u{1fed}', '\u{1fef}'), ('\u{1ffd}', '\u{1ffe}'), ('\u{2044}', '\u{2044}'),
+        ('\u{2052}', '\u{2052}'), ('\u{207a}', '\u{207c}'), ('\u{208a}', '\u{208c}'), ('\u{20a0}',
+        '\u{20bd}'), ('\u{2100}', '\u{2101}'), ('\u{2103}', '\u{2106}'), ('\u{2108}', '\u{2109}'),
+        ('\u{2114}', '\u{2114}'), ('\u{2116}', '\u{2118}'), ('\u{211e}', '\u{2123}'), ('\u{2125}',
+        '\u{2125}'), ('\u{2127}', '\u{2127}'), ('\u{2129}', '\u{2129}'), ('\u{212e}', '\u{212e}'),
+        ('\u{213a}', '\u{213b}'), ('\u{2140}', '\u{2144}'), ('\u{214a}', '\u{214d}'), ('\u{214f}',
+        '\u{214f}'), ('\u{2190}', '\u{2307}'), ('\u{230c}', '\u{2328}'), ('\u{232b}', '\u{23fa}'),
+        ('\u{2400}', '\u{2426}'), ('\u{2440}', '\u{244a}'), ('\u{249c}', '\u{24e9}'), ('\u{2500}',
+        '\u{2767}'), ('\u{2794}', '\u{27c4}'), ('\u{27c7}', '\u{27e5}'), ('\u{27f0}', '\u{2982}'),
+        ('\u{2999}', '\u{29d7}'), ('\u{29dc}', '\u{29fb}'), ('\u{29fe}', '\u{2b73}'), ('\u{2b76}',
+        '\u{2b95}'), ('\u{2b98}', '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'), ('\u{2bca}', '\u{2bd1}'),
+        ('\u{2ce5}', '\u{2cea}'), ('\u{2e80}', '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}',
+        '\u{2fd5}'), ('\u{2ff0}', '\u{2ffb}'), ('\u{3004}', '\u{3004}'), ('\u{3012}', '\u{3013}'),
+        ('\u{3020}', '\u{3020}'), ('\u{3036}', '\u{3037}'), ('\u{303e}', '\u{303f}'), ('\u{309b}',
+        '\u{309c}'), ('\u{3190}', '\u{3191}'), ('\u{3196}', '\u{319f}'), ('\u{31c0}', '\u{31e3}'),
+        ('\u{3200}', '\u{321e}'), ('\u{322a}', '\u{3247}'), ('\u{3250}', '\u{3250}'), ('\u{3260}',
+        '\u{327f}'), ('\u{328a}', '\u{32b0}'), ('\u{32c0}', '\u{32fe}'), ('\u{3300}', '\u{33ff}'),
+        ('\u{4dc0}', '\u{4dff}'), ('\u{a490}', '\u{a4c6}'), ('\u{a700}', '\u{a716}'), ('\u{a720}',
+        '\u{a721}'), ('\u{a789}', '\u{a78a}'), ('\u{a828}', '\u{a82b}'), ('\u{a836}', '\u{a839}'),
+        ('\u{aa77}', '\u{aa79}'), ('\u{ab5b}', '\u{ab5b}'), ('\u{fb29}', '\u{fb29}'), ('\u{fbb2}',
+        '\u{fbc1}'), ('\u{fdfc}', '\u{fdfd}'), ('\u{fe62}', '\u{fe62}'), ('\u{fe64}', '\u{fe66}'),
+        ('\u{fe69}', '\u{fe69}'), ('\u{ff04}', '\u{ff04}'), ('\u{ff0b}', '\u{ff0b}'), ('\u{ff1c}',
+        '\u{ff1e}'), ('\u{ff3e}', '\u{ff3e}'), ('\u{ff40}', '\u{ff40}'), ('\u{ff5c}', '\u{ff5c}'),
+        ('\u{ff5e}', '\u{ff5e}'), ('\u{ffe0}', '\u{ffe6}'), ('\u{ffe8}', '\u{ffee}'), ('\u{fffc}',
+        '\u{fffd}'), ('\u{10137}', '\u{1013f}'), ('\u{10179}', '\u{10189}'), ('\u{1018c}',
+        '\u{1018c}'), ('\u{10190}', '\u{1019b}'), ('\u{101a0}', '\u{101a0}'), ('\u{101d0}',
+        '\u{101fc}'), ('\u{10877}', '\u{10878}'), ('\u{10ac8}', '\u{10ac8}'), ('\u{16b3c}',
+        '\u{16b3f}'), ('\u{16b45}', '\u{16b45}'), ('\u{1bc9c}', '\u{1bc9c}'), ('\u{1d000}',
+        '\u{1d0f5}'), ('\u{1d100}', '\u{1d126}'), ('\u{1d129}', '\u{1d164}'), ('\u{1d16a}',
+        '\u{1d16c}'), ('\u{1d183}', '\u{1d184}'), ('\u{1d18c}', '\u{1d1a9}'), ('\u{1d1ae}',
+        '\u{1d1dd}'), ('\u{1d200}', '\u{1d241}'), ('\u{1d245}', '\u{1d245}'), ('\u{1d300}',
+        '\u{1d356}'), ('\u{1d6c1}', '\u{1d6c1}'), ('\u{1d6db}', '\u{1d6db}'), ('\u{1d6fb}',
+        '\u{1d6fb}'), ('\u{1d715}', '\u{1d715}'), ('\u{1d735}', '\u{1d735}'), ('\u{1d74f}',
+        '\u{1d74f}'), ('\u{1d76f}', '\u{1d76f}'), ('\u{1d789}', '\u{1d789}'), ('\u{1d7a9}',
+        '\u{1d7a9}'), ('\u{1d7c3}', '\u{1d7c3}'), ('\u{1eef0}', '\u{1eef1}'), ('\u{1f000}',
+        '\u{1f02b}'), ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}', '\u{1f0ae}'), ('\u{1f0b1}',
+        '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'), ('\u{1f0d1}', '\u{1f0f5}'), ('\u{1f110}',
+        '\u{1f12e}'), ('\u{1f130}', '\u{1f16b}'), ('\u{1f170}', '\u{1f19a}'), ('\u{1f1e6}',
+        '\u{1f202}'), ('\u{1f210}', '\u{1f23a}'), ('\u{1f240}', '\u{1f248}'), ('\u{1f250}',
+        '\u{1f251}'), ('\u{1f300}', '\u{1f32c}'), ('\u{1f330}', '\u{1f37d}'), ('\u{1f380}',
+        '\u{1f3ce}'), ('\u{1f3d4}', '\u{1f3f7}'), ('\u{1f400}', '\u{1f4fe}'), ('\u{1f500}',
+        '\u{1f54a}'), ('\u{1f550}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'), ('\u{1f5a5}',
+        '\u{1f642}'), ('\u{1f645}', '\u{1f6cf}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}',
+        '\u{1f6f3}'), ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'), ('\u{1f800}',
+        '\u{1f80b}'), ('\u{1f810}', '\u{1f847}'), ('\u{1f850}', '\u{1f859}'), ('\u{1f860}',
+        '\u{1f887}'), ('\u{1f890}', '\u{1f8ad}')
     ];
 
     pub static Sc_table: &'static [(char, char)] = &[
-        ('\x24', '\x24'), ('\u00a2', '\u00a5'), ('\u058f', '\u058f'), ('\u060b', '\u060b'),
-        ('\u09f2', '\u09f3'), ('\u09fb', '\u09fb'), ('\u0af1', '\u0af1'), ('\u0bf9', '\u0bf9'),
-        ('\u0e3f', '\u0e3f'), ('\u17db', '\u17db'), ('\u20a0', '\u20bd'), ('\ua838', '\ua838'),
-        ('\ufdfc', '\ufdfc'), ('\ufe69', '\ufe69'), ('\uff04', '\uff04'), ('\uffe0', '\uffe1'),
-        ('\uffe5', '\uffe6')
+        ('\u{24}', '\u{24}'), ('\u{a2}', '\u{a5}'), ('\u{58f}', '\u{58f}'), ('\u{60b}', '\u{60b}'),
+        ('\u{9f2}', '\u{9f3}'), ('\u{9fb}', '\u{9fb}'), ('\u{af1}', '\u{af1}'), ('\u{bf9}',
+        '\u{bf9}'), ('\u{e3f}', '\u{e3f}'), ('\u{17db}', '\u{17db}'), ('\u{20a0}', '\u{20bd}'),
+        ('\u{a838}', '\u{a838}'), ('\u{fdfc}', '\u{fdfc}'), ('\u{fe69}', '\u{fe69}'), ('\u{ff04}',
+        '\u{ff04}'), ('\u{ffe0}', '\u{ffe1}'), ('\u{ffe5}', '\u{ffe6}')
     ];
 
     pub static Sk_table: &'static [(char, char)] = &[
-        ('\x5e', '\x5e'), ('\x60', '\x60'), ('\u00a8', '\u00a8'), ('\u00af', '\u00af'), ('\u00b4',
-        '\u00b4'), ('\u00b8', '\u00b8'), ('\u02c2', '\u02c5'), ('\u02d2', '\u02df'), ('\u02e5',
-        '\u02eb'), ('\u02ed', '\u02ed'), ('\u02ef', '\u02ff'), ('\u0375', '\u0375'), ('\u0384',
-        '\u0385'), ('\u1fbd', '\u1fbd'), ('\u1fbf', '\u1fc1'), ('\u1fcd', '\u1fcf'), ('\u1fdd',
-        '\u1fdf'), ('\u1fed', '\u1fef'), ('\u1ffd', '\u1ffe'), ('\u309b', '\u309c'), ('\ua700',
-        '\ua716'), ('\ua720', '\ua721'), ('\ua789', '\ua78a'), ('\uab5b', '\uab5b'), ('\ufbb2',
-        '\ufbc1'), ('\uff3e', '\uff3e'), ('\uff40', '\uff40'), ('\uffe3', '\uffe3')
+        ('\u{5e}', '\u{5e}'), ('\u{60}', '\u{60}'), ('\u{a8}', '\u{a8}'), ('\u{af}', '\u{af}'),
+        ('\u{b4}', '\u{b4}'), ('\u{b8}', '\u{b8}'), ('\u{2c2}', '\u{2c5}'), ('\u{2d2}', '\u{2df}'),
+        ('\u{2e5}', '\u{2eb}'), ('\u{2ed}', '\u{2ed}'), ('\u{2ef}', '\u{2ff}'), ('\u{375}',
+        '\u{375}'), ('\u{384}', '\u{385}'), ('\u{1fbd}', '\u{1fbd}'), ('\u{1fbf}', '\u{1fc1}'),
+        ('\u{1fcd}', '\u{1fcf}'), ('\u{1fdd}', '\u{1fdf}'), ('\u{1fed}', '\u{1fef}'), ('\u{1ffd}',
+        '\u{1ffe}'), ('\u{309b}', '\u{309c}'), ('\u{a700}', '\u{a716}'), ('\u{a720}', '\u{a721}'),
+        ('\u{a789}', '\u{a78a}'), ('\u{ab5b}', '\u{ab5b}'), ('\u{fbb2}', '\u{fbc1}'), ('\u{ff3e}',
+        '\u{ff3e}'), ('\u{ff40}', '\u{ff40}'), ('\u{ffe3}', '\u{ffe3}')
     ];
 
     pub static Sm_table: &'static [(char, char)] = &[
-        ('\x2b', '\x2b'), ('\x3c', '\x3e'), ('\x7c', '\x7c'), ('\x7e', '\x7e'), ('\u00ac',
-        '\u00ac'), ('\u00b1', '\u00b1'), ('\u00d7', '\u00d7'), ('\u00f7', '\u00f7'), ('\u03f6',
-        '\u03f6'), ('\u0606', '\u0608'), ('\u2044', '\u2044'), ('\u2052', '\u2052'), ('\u207a',
-        '\u207c'), ('\u208a', '\u208c'), ('\u2118', '\u2118'), ('\u2140', '\u2144'), ('\u214b',
-        '\u214b'), ('\u2190', '\u2194'), ('\u219a', '\u219b'), ('\u21a0', '\u21a0'), ('\u21a3',
-        '\u21a3'), ('\u21a6', '\u21a6'), ('\u21ae', '\u21ae'), ('\u21ce', '\u21cf'), ('\u21d2',
-        '\u21d2'), ('\u21d4', '\u21d4'), ('\u21f4', '\u22ff'), ('\u2320', '\u2321'), ('\u237c',
-        '\u237c'), ('\u239b', '\u23b3'), ('\u23dc', '\u23e1'), ('\u25b7', '\u25b7'), ('\u25c1',
-        '\u25c1'), ('\u25f8', '\u25ff'), ('\u266f', '\u266f'), ('\u27c0', '\u27c4'), ('\u27c7',
-        '\u27e5'), ('\u27f0', '\u27ff'), ('\u2900', '\u2982'), ('\u2999', '\u29d7'), ('\u29dc',
-        '\u29fb'), ('\u29fe', '\u2aff'), ('\u2b30', '\u2b44'), ('\u2b47', '\u2b4c'), ('\ufb29',
-        '\ufb29'), ('\ufe62', '\ufe62'), ('\ufe64', '\ufe66'), ('\uff0b', '\uff0b'), ('\uff1c',
-        '\uff1e'), ('\uff5c', '\uff5c'), ('\uff5e', '\uff5e'), ('\uffe2', '\uffe2'), ('\uffe9',
-        '\uffec'), ('\U0001d6c1', '\U0001d6c1'), ('\U0001d6db', '\U0001d6db'), ('\U0001d6fb',
-        '\U0001d6fb'), ('\U0001d715', '\U0001d715'), ('\U0001d735', '\U0001d735'), ('\U0001d74f',
-        '\U0001d74f'), ('\U0001d76f', '\U0001d76f'), ('\U0001d789', '\U0001d789'), ('\U0001d7a9',
-        '\U0001d7a9'), ('\U0001d7c3', '\U0001d7c3'), ('\U0001eef0', '\U0001eef1')
+        ('\u{2b}', '\u{2b}'), ('\u{3c}', '\u{3e}'), ('\u{7c}', '\u{7c}'), ('\u{7e}', '\u{7e}'),
+        ('\u{ac}', '\u{ac}'), ('\u{b1}', '\u{b1}'), ('\u{d7}', '\u{d7}'), ('\u{f7}', '\u{f7}'),
+        ('\u{3f6}', '\u{3f6}'), ('\u{606}', '\u{608}'), ('\u{2044}', '\u{2044}'), ('\u{2052}',
+        '\u{2052}'), ('\u{207a}', '\u{207c}'), ('\u{208a}', '\u{208c}'), ('\u{2118}', '\u{2118}'),
+        ('\u{2140}', '\u{2144}'), ('\u{214b}', '\u{214b}'), ('\u{2190}', '\u{2194}'), ('\u{219a}',
+        '\u{219b}'), ('\u{21a0}', '\u{21a0}'), ('\u{21a3}', '\u{21a3}'), ('\u{21a6}', '\u{21a6}'),
+        ('\u{21ae}', '\u{21ae}'), ('\u{21ce}', '\u{21cf}'), ('\u{21d2}', '\u{21d2}'), ('\u{21d4}',
+        '\u{21d4}'), ('\u{21f4}', '\u{22ff}'), ('\u{2320}', '\u{2321}'), ('\u{237c}', '\u{237c}'),
+        ('\u{239b}', '\u{23b3}'), ('\u{23dc}', '\u{23e1}'), ('\u{25b7}', '\u{25b7}'), ('\u{25c1}',
+        '\u{25c1}'), ('\u{25f8}', '\u{25ff}'), ('\u{266f}', '\u{266f}'), ('\u{27c0}', '\u{27c4}'),
+        ('\u{27c7}', '\u{27e5}'), ('\u{27f0}', '\u{27ff}'), ('\u{2900}', '\u{2982}'), ('\u{2999}',
+        '\u{29d7}'), ('\u{29dc}', '\u{29fb}'), ('\u{29fe}', '\u{2aff}'), ('\u{2b30}', '\u{2b44}'),
+        ('\u{2b47}', '\u{2b4c}'), ('\u{fb29}', '\u{fb29}'), ('\u{fe62}', '\u{fe62}'), ('\u{fe64}',
+        '\u{fe66}'), ('\u{ff0b}', '\u{ff0b}'), ('\u{ff1c}', '\u{ff1e}'), ('\u{ff5c}', '\u{ff5c}'),
+        ('\u{ff5e}', '\u{ff5e}'), ('\u{ffe2}', '\u{ffe2}'), ('\u{ffe9}', '\u{ffec}'), ('\u{1d6c1}',
+        '\u{1d6c1}'), ('\u{1d6db}', '\u{1d6db}'), ('\u{1d6fb}', '\u{1d6fb}'), ('\u{1d715}',
+        '\u{1d715}'), ('\u{1d735}', '\u{1d735}'), ('\u{1d74f}', '\u{1d74f}'), ('\u{1d76f}',
+        '\u{1d76f}'), ('\u{1d789}', '\u{1d789}'), ('\u{1d7a9}', '\u{1d7a9}'), ('\u{1d7c3}',
+        '\u{1d7c3}'), ('\u{1eef0}', '\u{1eef1}')
     ];
 
     pub static So_table: &'static [(char, char)] = &[
-        ('\u00a6', '\u00a6'), ('\u00a9', '\u00a9'), ('\u00ae', '\u00ae'), ('\u00b0', '\u00b0'),
-        ('\u0482', '\u0482'), ('\u058d', '\u058e'), ('\u060e', '\u060f'), ('\u06de', '\u06de'),
-        ('\u06e9', '\u06e9'), ('\u06fd', '\u06fe'), ('\u07f6', '\u07f6'), ('\u09fa', '\u09fa'),
-        ('\u0b70', '\u0b70'), ('\u0bf3', '\u0bf8'), ('\u0bfa', '\u0bfa'), ('\u0c7f', '\u0c7f'),
-        ('\u0d79', '\u0d79'), ('\u0f01', '\u0f03'), ('\u0f13', '\u0f13'), ('\u0f15', '\u0f17'),
-        ('\u0f1a', '\u0f1f'), ('\u0f34', '\u0f34'), ('\u0f36', '\u0f36'), ('\u0f38', '\u0f38'),
-        ('\u0fbe', '\u0fc5'), ('\u0fc7', '\u0fcc'), ('\u0fce', '\u0fcf'), ('\u0fd5', '\u0fd8'),
-        ('\u109e', '\u109f'), ('\u1390', '\u1399'), ('\u1940', '\u1940'), ('\u19de', '\u19ff'),
-        ('\u1b61', '\u1b6a'), ('\u1b74', '\u1b7c'), ('\u2100', '\u2101'), ('\u2103', '\u2106'),
-        ('\u2108', '\u2109'), ('\u2114', '\u2114'), ('\u2116', '\u2117'), ('\u211e', '\u2123'),
-        ('\u2125', '\u2125'), ('\u2127', '\u2127'), ('\u2129', '\u2129'), ('\u212e', '\u212e'),
-        ('\u213a', '\u213b'), ('\u214a', '\u214a'), ('\u214c', '\u214d'), ('\u214f', '\u214f'),
-        ('\u2195', '\u2199'), ('\u219c', '\u219f'), ('\u21a1', '\u21a2'), ('\u21a4', '\u21a5'),
-        ('\u21a7', '\u21ad'), ('\u21af', '\u21cd'), ('\u21d0', '\u21d1'), ('\u21d3', '\u21d3'),
-        ('\u21d5', '\u21f3'), ('\u2300', '\u2307'), ('\u230c', '\u231f'), ('\u2322', '\u2328'),
-        ('\u232b', '\u237b'), ('\u237d', '\u239a'), ('\u23b4', '\u23db'), ('\u23e2', '\u23fa'),
-        ('\u2400', '\u2426'), ('\u2440', '\u244a'), ('\u249c', '\u24e9'), ('\u2500', '\u25b6'),
-        ('\u25b8', '\u25c0'), ('\u25c2', '\u25f7'), ('\u2600', '\u266e'), ('\u2670', '\u2767'),
-        ('\u2794', '\u27bf'), ('\u2800', '\u28ff'), ('\u2b00', '\u2b2f'), ('\u2b45', '\u2b46'),
-        ('\u2b4d', '\u2b73'), ('\u2b76', '\u2b95'), ('\u2b98', '\u2bb9'), ('\u2bbd', '\u2bc8'),
-        ('\u2bca', '\u2bd1'), ('\u2ce5', '\u2cea'), ('\u2e80', '\u2e99'), ('\u2e9b', '\u2ef3'),
-        ('\u2f00', '\u2fd5'), ('\u2ff0', '\u2ffb'), ('\u3004', '\u3004'), ('\u3012', '\u3013'),
-        ('\u3020', '\u3020'), ('\u3036', '\u3037'), ('\u303e', '\u303f'), ('\u3190', '\u3191'),
-        ('\u3196', '\u319f'), ('\u31c0', '\u31e3'), ('\u3200', '\u321e'), ('\u322a', '\u3247'),
-        ('\u3250', '\u3250'), ('\u3260', '\u327f'), ('\u328a', '\u32b0'), ('\u32c0', '\u32fe'),
-        ('\u3300', '\u33ff'), ('\u4dc0', '\u4dff'), ('\ua490', '\ua4c6'), ('\ua828', '\ua82b'),
-        ('\ua836', '\ua837'), ('\ua839', '\ua839'), ('\uaa77', '\uaa79'), ('\ufdfd', '\ufdfd'),
-        ('\uffe4', '\uffe4'), ('\uffe8', '\uffe8'), ('\uffed', '\uffee'), ('\ufffc', '\ufffd'),
-        ('\U00010137', '\U0001013f'), ('\U00010179', '\U00010189'), ('\U0001018c', '\U0001018c'),
-        ('\U00010190', '\U0001019b'), ('\U000101a0', '\U000101a0'), ('\U000101d0', '\U000101fc'),
-        ('\U00010877', '\U00010878'), ('\U00010ac8', '\U00010ac8'), ('\U00016b3c', '\U00016b3f'),
-        ('\U00016b45', '\U00016b45'), ('\U0001bc9c', '\U0001bc9c'), ('\U0001d000', '\U0001d0f5'),
-        ('\U0001d100', '\U0001d126'), ('\U0001d129', '\U0001d164'), ('\U0001d16a', '\U0001d16c'),
-        ('\U0001d183', '\U0001d184'), ('\U0001d18c', '\U0001d1a9'), ('\U0001d1ae', '\U0001d1dd'),
-        ('\U0001d200', '\U0001d241'), ('\U0001d245', '\U0001d245'), ('\U0001d300', '\U0001d356'),
-        ('\U0001f000', '\U0001f02b'), ('\U0001f030', '\U0001f093'), ('\U0001f0a0', '\U0001f0ae'),
-        ('\U0001f0b1', '\U0001f0bf'), ('\U0001f0c1', '\U0001f0cf'), ('\U0001f0d1', '\U0001f0f5'),
-        ('\U0001f110', '\U0001f12e'), ('\U0001f130', '\U0001f16b'), ('\U0001f170', '\U0001f19a'),
-        ('\U0001f1e6', '\U0001f202'), ('\U0001f210', '\U0001f23a'), ('\U0001f240', '\U0001f248'),
-        ('\U0001f250', '\U0001f251'), ('\U0001f300', '\U0001f32c'), ('\U0001f330', '\U0001f37d'),
-        ('\U0001f380', '\U0001f3ce'), ('\U0001f3d4', '\U0001f3f7'), ('\U0001f400', '\U0001f4fe'),
-        ('\U0001f500', '\U0001f54a'), ('\U0001f550', '\U0001f579'), ('\U0001f57b', '\U0001f5a3'),
-        ('\U0001f5a5', '\U0001f642'), ('\U0001f645', '\U0001f6cf'), ('\U0001f6e0', '\U0001f6ec'),
-        ('\U0001f6f0', '\U0001f6f3'), ('\U0001f700', '\U0001f773'), ('\U0001f780', '\U0001f7d4'),
-        ('\U0001f800', '\U0001f80b'), ('\U0001f810', '\U0001f847'), ('\U0001f850', '\U0001f859'),
-        ('\U0001f860', '\U0001f887'), ('\U0001f890', '\U0001f8ad')
+        ('\u{a6}', '\u{a6}'), ('\u{a9}', '\u{a9}'), ('\u{ae}', '\u{ae}'), ('\u{b0}', '\u{b0}'),
+        ('\u{482}', '\u{482}'), ('\u{58d}', '\u{58e}'), ('\u{60e}', '\u{60f}'), ('\u{6de}',
+        '\u{6de}'), ('\u{6e9}', '\u{6e9}'), ('\u{6fd}', '\u{6fe}'), ('\u{7f6}', '\u{7f6}'),
+        ('\u{9fa}', '\u{9fa}'), ('\u{b70}', '\u{b70}'), ('\u{bf3}', '\u{bf8}'), ('\u{bfa}',
+        '\u{bfa}'), ('\u{c7f}', '\u{c7f}'), ('\u{d79}', '\u{d79}'), ('\u{f01}', '\u{f03}'),
+        ('\u{f13}', '\u{f13}'), ('\u{f15}', '\u{f17}'), ('\u{f1a}', '\u{f1f}'), ('\u{f34}',
+        '\u{f34}'), ('\u{f36}', '\u{f36}'), ('\u{f38}', '\u{f38}'), ('\u{fbe}', '\u{fc5}'),
+        ('\u{fc7}', '\u{fcc}'), ('\u{fce}', '\u{fcf}'), ('\u{fd5}', '\u{fd8}'), ('\u{109e}',
+        '\u{109f}'), ('\u{1390}', '\u{1399}'), ('\u{1940}', '\u{1940}'), ('\u{19de}', '\u{19ff}'),
+        ('\u{1b61}', '\u{1b6a}'), ('\u{1b74}', '\u{1b7c}'), ('\u{2100}', '\u{2101}'), ('\u{2103}',
+        '\u{2106}'), ('\u{2108}', '\u{2109}'), ('\u{2114}', '\u{2114}'), ('\u{2116}', '\u{2117}'),
+        ('\u{211e}', '\u{2123}'), ('\u{2125}', '\u{2125}'), ('\u{2127}', '\u{2127}'), ('\u{2129}',
+        '\u{2129}'), ('\u{212e}', '\u{212e}'), ('\u{213a}', '\u{213b}'), ('\u{214a}', '\u{214a}'),
+        ('\u{214c}', '\u{214d}'), ('\u{214f}', '\u{214f}'), ('\u{2195}', '\u{2199}'), ('\u{219c}',
+        '\u{219f}'), ('\u{21a1}', '\u{21a2}'), ('\u{21a4}', '\u{21a5}'), ('\u{21a7}', '\u{21ad}'),
+        ('\u{21af}', '\u{21cd}'), ('\u{21d0}', '\u{21d1}'), ('\u{21d3}', '\u{21d3}'), ('\u{21d5}',
+        '\u{21f3}'), ('\u{2300}', '\u{2307}'), ('\u{230c}', '\u{231f}'), ('\u{2322}', '\u{2328}'),
+        ('\u{232b}', '\u{237b}'), ('\u{237d}', '\u{239a}'), ('\u{23b4}', '\u{23db}'), ('\u{23e2}',
+        '\u{23fa}'), ('\u{2400}', '\u{2426}'), ('\u{2440}', '\u{244a}'), ('\u{249c}', '\u{24e9}'),
+        ('\u{2500}', '\u{25b6}'), ('\u{25b8}', '\u{25c0}'), ('\u{25c2}', '\u{25f7}'), ('\u{2600}',
+        '\u{266e}'), ('\u{2670}', '\u{2767}'), ('\u{2794}', '\u{27bf}'), ('\u{2800}', '\u{28ff}'),
+        ('\u{2b00}', '\u{2b2f}'), ('\u{2b45}', '\u{2b46}'), ('\u{2b4d}', '\u{2b73}'), ('\u{2b76}',
+        '\u{2b95}'), ('\u{2b98}', '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'), ('\u{2bca}', '\u{2bd1}'),
+        ('\u{2ce5}', '\u{2cea}'), ('\u{2e80}', '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}',
+        '\u{2fd5}'), ('\u{2ff0}', '\u{2ffb}'), ('\u{3004}', '\u{3004}'), ('\u{3012}', '\u{3013}'),
+        ('\u{3020}', '\u{3020}'), ('\u{3036}', '\u{3037}'), ('\u{303e}', '\u{303f}'), ('\u{3190}',
+        '\u{3191}'), ('\u{3196}', '\u{319f}'), ('\u{31c0}', '\u{31e3}'), ('\u{3200}', '\u{321e}'),
+        ('\u{322a}', '\u{3247}'), ('\u{3250}', '\u{3250}'), ('\u{3260}', '\u{327f}'), ('\u{328a}',
+        '\u{32b0}'), ('\u{32c0}', '\u{32fe}'), ('\u{3300}', '\u{33ff}'), ('\u{4dc0}', '\u{4dff}'),
+        ('\u{a490}', '\u{a4c6}'), ('\u{a828}', '\u{a82b}'), ('\u{a836}', '\u{a837}'), ('\u{a839}',
+        '\u{a839}'), ('\u{aa77}', '\u{aa79}'), ('\u{fdfd}', '\u{fdfd}'), ('\u{ffe4}', '\u{ffe4}'),
+        ('\u{ffe8}', '\u{ffe8}'), ('\u{ffed}', '\u{ffee}'), ('\u{fffc}', '\u{fffd}'), ('\u{10137}',
+        '\u{1013f}'), ('\u{10179}', '\u{10189}'), ('\u{1018c}', '\u{1018c}'), ('\u{10190}',
+        '\u{1019b}'), ('\u{101a0}', '\u{101a0}'), ('\u{101d0}', '\u{101fc}'), ('\u{10877}',
+        '\u{10878}'), ('\u{10ac8}', '\u{10ac8}'), ('\u{16b3c}', '\u{16b3f}'), ('\u{16b45}',
+        '\u{16b45}'), ('\u{1bc9c}', '\u{1bc9c}'), ('\u{1d000}', '\u{1d0f5}'), ('\u{1d100}',
+        '\u{1d126}'), ('\u{1d129}', '\u{1d164}'), ('\u{1d16a}', '\u{1d16c}'), ('\u{1d183}',
+        '\u{1d184}'), ('\u{1d18c}', '\u{1d1a9}'), ('\u{1d1ae}', '\u{1d1dd}'), ('\u{1d200}',
+        '\u{1d241}'), ('\u{1d245}', '\u{1d245}'), ('\u{1d300}', '\u{1d356}'), ('\u{1f000}',
+        '\u{1f02b}'), ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}', '\u{1f0ae}'), ('\u{1f0b1}',
+        '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'), ('\u{1f0d1}', '\u{1f0f5}'), ('\u{1f110}',
+        '\u{1f12e}'), ('\u{1f130}', '\u{1f16b}'), ('\u{1f170}', '\u{1f19a}'), ('\u{1f1e6}',
+        '\u{1f202}'), ('\u{1f210}', '\u{1f23a}'), ('\u{1f240}', '\u{1f248}'), ('\u{1f250}',
+        '\u{1f251}'), ('\u{1f300}', '\u{1f32c}'), ('\u{1f330}', '\u{1f37d}'), ('\u{1f380}',
+        '\u{1f3ce}'), ('\u{1f3d4}', '\u{1f3f7}'), ('\u{1f400}', '\u{1f4fe}'), ('\u{1f500}',
+        '\u{1f54a}'), ('\u{1f550}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'), ('\u{1f5a5}',
+        '\u{1f642}'), ('\u{1f645}', '\u{1f6cf}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}',
+        '\u{1f6f3}'), ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'), ('\u{1f800}',
+        '\u{1f80b}'), ('\u{1f810}', '\u{1f847}'), ('\u{1f850}', '\u{1f859}'), ('\u{1f860}',
+        '\u{1f887}'), ('\u{1f890}', '\u{1f8ad}')
     ];
 
     pub static Z_table: &'static [(char, char)] = &[
-        ('\x20', '\x20'), ('\u00a0', '\u00a0'), ('\u1680', '\u1680'), ('\u2000', '\u200a'),
-        ('\u2028', '\u2029'), ('\u202f', '\u202f'), ('\u205f', '\u205f'), ('\u3000', '\u3000')
+        ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), ('\u{1680}', '\u{1680}'), ('\u{2000}',
+        '\u{200a}'), ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'), ('\u{205f}', '\u{205f}'),
+        ('\u{3000}', '\u{3000}')
     ];
 
     pub static Zl_table: &'static [(char, char)] = &[
-        ('\u2028', '\u2028')
+        ('\u{2028}', '\u{2028}')
     ];
 
     pub static Zp_table: &'static [(char, char)] = &[
-        ('\u2029', '\u2029')
+        ('\u{2029}', '\u{2029}')
     ];
 
     pub static Zs_table: &'static [(char, char)] = &[
-        ('\x20', '\x20'), ('\u00a0', '\u00a0'), ('\u1680', '\u1680'), ('\u2000', '\u200a'),
-        ('\u202f', '\u202f'), ('\u205f', '\u205f'), ('\u3000', '\u3000')
+        ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), ('\u{1680}', '\u{1680}'), ('\u{2000}',
+        '\u{200a}'), ('\u{202f}', '\u{202f}'), ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}')
     ];
 
 }
 
 pub mod derived_property {
     pub static Alphabetic_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\x61', '\x7a'), ('\u00aa', '\u00aa'), ('\u00b5', '\u00b5'), ('\u00ba',
-        '\u00ba'), ('\u00c0', '\u00d6'), ('\u00d8', '\u00f6'), ('\u00f8', '\u01ba'), ('\u01bb',
-        '\u01bb'), ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), ('\u0294',
-        '\u0294'), ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), ('\u02e0',
-        '\u02e4'), ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), ('\u0345', '\u0345'), ('\u0370',
-        '\u0373'), ('\u0374', '\u0374'), ('\u0376', '\u0377'), ('\u037a', '\u037a'), ('\u037b',
-        '\u037d'), ('\u037f', '\u037f'), ('\u0386', '\u0386'), ('\u0388', '\u038a'), ('\u038c',
-        '\u038c'), ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), ('\u048a',
-        '\u052f'), ('\u0531', '\u0556'), ('\u0559', '\u0559'), ('\u0561', '\u0587'), ('\u05b0',
-        '\u05bd'), ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), ('\u05c7',
-        '\u05c7'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0610', '\u061a'), ('\u0620',
-        '\u063f'), ('\u0640', '\u0640'), ('\u0641', '\u064a'), ('\u064b', '\u0657'), ('\u0659',
-        '\u065f'), ('\u066e', '\u066f'), ('\u0670', '\u0670'), ('\u0671', '\u06d3'), ('\u06d5',
-        '\u06d5'), ('\u06d6', '\u06dc'), ('\u06e1', '\u06e4'), ('\u06e5', '\u06e6'), ('\u06e7',
-        '\u06e8'), ('\u06ed', '\u06ed'), ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), ('\u06ff',
-        '\u06ff'), ('\u0710', '\u0710'), ('\u0711', '\u0711'), ('\u0712', '\u072f'), ('\u0730',
-        '\u073f'), ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1'), ('\u07ca',
-        '\u07ea'), ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), ('\u0816',
-        '\u0817'), ('\u081a', '\u081a'), ('\u081b', '\u0823'), ('\u0824', '\u0824'), ('\u0825',
-        '\u0827'), ('\u0828', '\u0828'), ('\u0829', '\u082c'), ('\u0840', '\u0858'), ('\u08a0',
-        '\u08b2'), ('\u08e4', '\u08e9'), ('\u08f0', '\u0902'), ('\u0903', '\u0903'), ('\u0904',
-        '\u0939'), ('\u093a', '\u093a'), ('\u093b', '\u093b'), ('\u093d', '\u093d'), ('\u093e',
-        '\u0940'), ('\u0941', '\u0948'), ('\u0949', '\u094c'), ('\u094e', '\u094f'), ('\u0950',
-        '\u0950'), ('\u0955', '\u0957'), ('\u0958', '\u0961'), ('\u0962', '\u0963'), ('\u0971',
-        '\u0971'), ('\u0972', '\u0980'), ('\u0981', '\u0981'), ('\u0982', '\u0983'), ('\u0985',
-        '\u098c'), ('\u098f', '\u0990'), ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), ('\u09b2',
-        '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), ('\u09c1',
-        '\u09c4'), ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), ('\u09ce', '\u09ce'), ('\u09d7',
-        '\u09d7'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), ('\u09f0',
-        '\u09f1'), ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), ('\u0a0f',
-        '\u0a10'), ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), ('\u0a35',
-        '\u0a36'), ('\u0a38', '\u0a39'), ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), ('\u0a47',
-        '\u0a48'), ('\u0a4b', '\u0a4c'), ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), ('\u0a5e',
-        '\u0a5e'), ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), ('\u0a81',
-        '\u0a82'), ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), ('\u0a93',
-        '\u0aa8'), ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), ('\u0abd',
-        '\u0abd'), ('\u0abe', '\u0ac0'), ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), ('\u0ac9',
-        '\u0ac9'), ('\u0acb', '\u0acc'), ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), ('\u0ae2',
-        '\u0ae3'), ('\u0b01', '\u0b01'), ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), ('\u0b0f',
-        '\u0b10'), ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35',
-        '\u0b39'), ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), ('\u0b40',
-        '\u0b40'), ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), ('\u0b56',
-        '\u0b56'), ('\u0b57', '\u0b57'), ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), ('\u0b62',
-        '\u0b63'), ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), ('\u0b85',
-        '\u0b8a'), ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), ('\u0b9c',
-        '\u0b9c'), ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), ('\u0bae',
-        '\u0bb9'), ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), ('\u0bc6',
-        '\u0bc8'), ('\u0bca', '\u0bcc'), ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), ('\u0c00',
-        '\u0c00'), ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), ('\u0c12',
-        '\u0c28'), ('\u0c2a', '\u0c39'), ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), ('\u0c41',
-        '\u0c44'), ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4c'), ('\u0c55', '\u0c56'), ('\u0c58',
-        '\u0c59'), ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), ('\u0c81', '\u0c81'), ('\u0c82',
-        '\u0c83'), ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), ('\u0caa',
-        '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), ('\u0cbf',
-        '\u0cbf'), ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), ('\u0cca',
-        '\u0ccb'), ('\u0ccc', '\u0ccc'), ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), ('\u0ce0',
-        '\u0ce1'), ('\u0ce2', '\u0ce3'), ('\u0cf1', '\u0cf2'), ('\u0d01', '\u0d01'), ('\u0d02',
-        '\u0d03'), ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d',
-        '\u0d3d'), ('\u0d3e', '\u0d40'), ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), ('\u0d4a',
-        '\u0d4c'), ('\u0d4e', '\u0d4e'), ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), ('\u0d62',
-        '\u0d63'), ('\u0d7a', '\u0d7f'), ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), ('\u0d9a',
-        '\u0db1'), ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0dcf',
-        '\u0dd1'), ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), ('\u0df2',
-        '\u0df3'), ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), ('\u0e34',
-        '\u0e3a'), ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), ('\u0e4d', '\u0e4d'), ('\u0e81',
-        '\u0e82'), ('\u0e84', '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), ('\u0e8d',
-        '\u0e8d'), ('\u0e94', '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), ('\u0ea5',
-        '\u0ea5'), ('\u0ea7', '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), ('\u0eb1',
-        '\u0eb1'), ('\u0eb2', '\u0eb3'), ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), ('\u0ebd',
-        '\u0ebd'), ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0ecd', '\u0ecd'), ('\u0edc',
-        '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f71',
-        '\u0f7e'), ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f81'), ('\u0f88', '\u0f8c'), ('\u0f8d',
-        '\u0f97'), ('\u0f99', '\u0fbc'), ('\u1000', '\u102a'), ('\u102b', '\u102c'), ('\u102d',
-        '\u1030'), ('\u1031', '\u1031'), ('\u1032', '\u1036'), ('\u1038', '\u1038'), ('\u103b',
-        '\u103c'), ('\u103d', '\u103e'), ('\u103f', '\u103f'), ('\u1050', '\u1055'), ('\u1056',
-        '\u1057'), ('\u1058', '\u1059'), ('\u105a', '\u105d'), ('\u105e', '\u1060'), ('\u1061',
-        '\u1061'), ('\u1062', '\u1062'), ('\u1065', '\u1066'), ('\u1067', '\u1068'), ('\u106e',
-        '\u1070'), ('\u1071', '\u1074'), ('\u1075', '\u1081'), ('\u1082', '\u1082'), ('\u1083',
-        '\u1084'), ('\u1085', '\u1086'), ('\u108e', '\u108e'), ('\u109c', '\u109c'), ('\u109d',
-        '\u109d'), ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), ('\u10d0',
-        '\u10fa'), ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), ('\u124a', '\u124d'), ('\u1250',
-        '\u1256'), ('\u1258', '\u1258'), ('\u125a', '\u125d'), ('\u1260', '\u1288'), ('\u128a',
-        '\u128d'), ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0',
-        '\u12c0'), ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), ('\u1312',
-        '\u1315'), ('\u1318', '\u135a'), ('\u135f', '\u135f'), ('\u1380', '\u138f'), ('\u13a0',
-        '\u13f4'), ('\u1401', '\u166c'), ('\u166f', '\u167f'), ('\u1681', '\u169a'), ('\u16a0',
-        '\u16ea'), ('\u16ee', '\u16f0'), ('\u16f1', '\u16f8'), ('\u1700', '\u170c'), ('\u170e',
-        '\u1711'), ('\u1712', '\u1713'), ('\u1720', '\u1731'), ('\u1732', '\u1733'), ('\u1740',
-        '\u1751'), ('\u1752', '\u1753'), ('\u1760', '\u176c'), ('\u176e', '\u1770'), ('\u1772',
-        '\u1773'), ('\u1780', '\u17b3'), ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), ('\u17be',
-        '\u17c5'), ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), ('\u17d7', '\u17d7'), ('\u17dc',
-        '\u17dc'), ('\u1820', '\u1842'), ('\u1843', '\u1843'), ('\u1844', '\u1877'), ('\u1880',
-        '\u18a8'), ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), ('\u18b0', '\u18f5'), ('\u1900',
-        '\u191e'), ('\u1920', '\u1922'), ('\u1923', '\u1926'), ('\u1927', '\u1928'), ('\u1929',
-        '\u192b'), ('\u1930', '\u1931'), ('\u1932', '\u1932'), ('\u1933', '\u1938'), ('\u1950',
-        '\u196d'), ('\u1970', '\u1974'), ('\u1980', '\u19ab'), ('\u19b0', '\u19c0'), ('\u19c1',
-        '\u19c7'), ('\u19c8', '\u19c9'), ('\u1a00', '\u1a16'), ('\u1a17', '\u1a18'), ('\u1a19',
-        '\u1a1a'), ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), ('\u1a56',
-        '\u1a56'), ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), ('\u1a61', '\u1a61'), ('\u1a62',
-        '\u1a62'), ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), ('\u1a73',
-        '\u1a74'), ('\u1aa7', '\u1aa7'), ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), ('\u1b05',
-        '\u1b33'), ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), ('\u1b3c',
-        '\u1b3c'), ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), ('\u1b43', '\u1b43'), ('\u1b45',
-        '\u1b4b'), ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), ('\u1ba1',
-        '\u1ba1'), ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), ('\u1bac',
-        '\u1bad'), ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), ('\u1be7', '\u1be7'), ('\u1be8',
-        '\u1be9'), ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), ('\u1bef',
-        '\u1bf1'), ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), ('\u1c34',
-        '\u1c35'), ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), ('\u1ce9',
-        '\u1cec'), ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), ('\u1cf5', '\u1cf6'), ('\u1d00',
-        '\u1d2b'), ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), ('\u1d79',
-        '\u1d9a'), ('\u1d9b', '\u1dbf'), ('\u1de7', '\u1df4'), ('\u1e00', '\u1f15'), ('\u1f18',
-        '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), ('\u1f59',
-        '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), ('\u1f80',
-        '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), ('\u1fc6',
-        '\u1fcc'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), ('\u1ff2',
-        '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u2071', '\u2071'), ('\u207f', '\u207f'), ('\u2090',
-        '\u209c'), ('\u2102', '\u2102'), ('\u2107', '\u2107'), ('\u210a', '\u2113'), ('\u2115',
-        '\u2115'), ('\u2119', '\u211d'), ('\u2124', '\u2124'), ('\u2126', '\u2126'), ('\u2128',
-        '\u2128'), ('\u212a', '\u212d'), ('\u212f', '\u2134'), ('\u2135', '\u2138'), ('\u2139',
-        '\u2139'), ('\u213c', '\u213f'), ('\u2145', '\u2149'), ('\u214e', '\u214e'), ('\u2160',
-        '\u2182'), ('\u2183', '\u2184'), ('\u2185', '\u2188'), ('\u24b6', '\u24e9'), ('\u2c00',
-        '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), ('\u2c7c', '\u2c7d'), ('\u2c7e',
-        '\u2ce4'), ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27',
-        '\u2d27'), ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), ('\u2d80',
-        '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), ('\u2db8',
-        '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), ('\u2dd8',
-        '\u2dde'), ('\u2de0', '\u2dff'), ('\u2e2f', '\u2e2f'), ('\u3005', '\u3005'), ('\u3006',
-        '\u3006'), ('\u3007', '\u3007'), ('\u3021', '\u3029'), ('\u3031', '\u3035'), ('\u3038',
-        '\u303a'), ('\u303b', '\u303b'), ('\u303c', '\u303c'), ('\u3041', '\u3096'), ('\u309d',
-        '\u309e'), ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), ('\u30ff',
-        '\u30ff'), ('\u3105', '\u312d'), ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0',
-        '\u31ff'), ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), ('\ua015',
-        '\ua015'), ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), ('\ua500',
-        '\ua60b'), ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), ('\ua62a', '\ua62b'), ('\ua640',
-        '\ua66d'), ('\ua66e', '\ua66e'), ('\ua674', '\ua67b'), ('\ua67f', '\ua67f'), ('\ua680',
-        '\ua69b'), ('\ua69c', '\ua69d'), ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), ('\ua6e6',
-        '\ua6ef'), ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), ('\ua770', '\ua770'), ('\ua771',
-        '\ua787'), ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), ('\ua790', '\ua7ad'), ('\ua7b0',
-        '\ua7b1'), ('\ua7f7', '\ua7f7'), ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), ('\ua7fb',
-        '\ua801'), ('\ua803', '\ua805'), ('\ua807', '\ua80a'), ('\ua80c', '\ua822'), ('\ua823',
-        '\ua824'), ('\ua825', '\ua826'), ('\ua827', '\ua827'), ('\ua840', '\ua873'), ('\ua880',
-        '\ua881'), ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), ('\ua8f2', '\ua8f7'), ('\ua8fb',
-        '\ua8fb'), ('\ua90a', '\ua925'), ('\ua926', '\ua92a'), ('\ua930', '\ua946'), ('\ua947',
-        '\ua951'), ('\ua952', '\ua952'), ('\ua960', '\ua97c'), ('\ua980', '\ua982'), ('\ua983',
-        '\ua983'), ('\ua984', '\ua9b2'), ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), ('\ua9ba',
-        '\ua9bb'), ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9bf'), ('\ua9cf', '\ua9cf'), ('\ua9e0',
-        '\ua9e4'), ('\ua9e6', '\ua9e6'), ('\ua9e7', '\ua9ef'), ('\ua9fa', '\ua9fe'), ('\uaa00',
-        '\uaa28'), ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), ('\uaa33',
-        '\uaa34'), ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), ('\uaa44',
-        '\uaa4b'), ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), ('\uaa60', '\uaa6f'), ('\uaa70',
-        '\uaa70'), ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), ('\uaa7e', '\uaaaf'), ('\uaab0',
-        '\uaab0'), ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), ('\uaab7',
-        '\uaab8'), ('\uaab9', '\uaabd'), ('\uaabe', '\uaabe'), ('\uaac0', '\uaac0'), ('\uaac2',
-        '\uaac2'), ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), ('\uaaeb',
-        '\uaaeb'), ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), ('\uaaf2', '\uaaf2'), ('\uaaf3',
-        '\uaaf4'), ('\uaaf5', '\uaaf5'), ('\uab01', '\uab06'), ('\uab09', '\uab0e'), ('\uab11',
-        '\uab16'), ('\uab20', '\uab26'), ('\uab28', '\uab2e'), ('\uab30', '\uab5a'), ('\uab5c',
-        '\uab5f'), ('\uab64', '\uab65'), ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), ('\uabe5',
-        '\uabe5'), ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), ('\uac00',
-        '\ud7a3'), ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), ('\ufa70',
-        '\ufad9'), ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), ('\ufb1e',
-        '\ufb1e'), ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), ('\ufb3e',
-        '\ufb3e'), ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), ('\ufb46', '\ufbb1'), ('\ufbd3',
-        '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdfb'), ('\ufe70',
-        '\ufe74'), ('\ufe76', '\ufefc'), ('\uff21', '\uff3a'), ('\uff41', '\uff5a'), ('\uff66',
-        '\uff6f'), ('\uff70', '\uff70'), ('\uff71', '\uff9d'), ('\uff9e', '\uff9f'), ('\uffa0',
-        '\uffbe'), ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), ('\uffda',
-        '\uffdc'), ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), ('\U00010028',
-        '\U0001003a'), ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), ('\U00010050',
-        '\U0001005d'), ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'), ('\U00010280',
-        '\U0001029c'), ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031f'), ('\U00010330',
-        '\U00010340'), ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), ('\U0001034a',
-        '\U0001034a'), ('\U00010350', '\U00010375'), ('\U00010376', '\U0001037a'), ('\U00010380',
-        '\U0001039d'), ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), ('\U000103d1',
-        '\U000103d5'), ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), ('\U00010500',
-        '\U00010527'), ('\U00010530', '\U00010563'), ('\U00010600', '\U00010736'), ('\U00010740',
-        '\U00010755'), ('\U00010760', '\U00010767'), ('\U00010800', '\U00010805'), ('\U00010808',
-        '\U00010808'), ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), ('\U0001083c',
-        '\U0001083c'), ('\U0001083f', '\U00010855'), ('\U00010860', '\U00010876'), ('\U00010880',
-        '\U0001089e'), ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), ('\U00010980',
-        '\U000109b7'), ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'), ('\U00010a01',
-        '\U00010a03'), ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'), ('\U00010a10',
-        '\U00010a13'), ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), ('\U00010a60',
-        '\U00010a7c'), ('\U00010a80', '\U00010a9c'), ('\U00010ac0', '\U00010ac7'), ('\U00010ac9',
-        '\U00010ae4'), ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), ('\U00010b60',
-        '\U00010b72'), ('\U00010b80', '\U00010b91'), ('\U00010c00', '\U00010c48'), ('\U00011000',
-        '\U00011000'), ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'), ('\U00011003',
-        '\U00011037'), ('\U00011038', '\U00011045'), ('\U00011082', '\U00011082'), ('\U00011083',
-        '\U000110af'), ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), ('\U000110b7',
-        '\U000110b8'), ('\U000110d0', '\U000110e8'), ('\U00011100', '\U00011102'), ('\U00011103',
-        '\U00011126'), ('\U00011127', '\U0001112b'), ('\U0001112c', '\U0001112c'), ('\U0001112d',
-        '\U00011132'), ('\U00011150', '\U00011172'), ('\U00011176', '\U00011176'), ('\U00011180',
-        '\U00011181'), ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'), ('\U000111b3',
-        '\U000111b5'), ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111bf'), ('\U000111c1',
-        '\U000111c4'), ('\U000111da', '\U000111da'), ('\U00011200', '\U00011211'), ('\U00011213',
-        '\U0001122b'), ('\U0001122c', '\U0001122e'), ('\U0001122f', '\U00011231'), ('\U00011232',
-        '\U00011233'), ('\U00011234', '\U00011234'), ('\U00011237', '\U00011237'), ('\U000112b0',
-        '\U000112de'), ('\U000112df', '\U000112df'), ('\U000112e0', '\U000112e2'), ('\U000112e3',
-        '\U000112e8'), ('\U00011301', '\U00011301'), ('\U00011302', '\U00011303'), ('\U00011305',
-        '\U0001130c'), ('\U0001130f', '\U00011310'), ('\U00011313', '\U00011328'), ('\U0001132a',
-        '\U00011330'), ('\U00011332', '\U00011333'), ('\U00011335', '\U00011339'), ('\U0001133d',
-        '\U0001133d'), ('\U0001133e', '\U0001133f'), ('\U00011340', '\U00011340'), ('\U00011341',
-        '\U00011344'), ('\U00011347', '\U00011348'), ('\U0001134b', '\U0001134c'), ('\U00011357',
-        '\U00011357'), ('\U0001135d', '\U00011361'), ('\U00011362', '\U00011363'), ('\U00011480',
-        '\U000114af'), ('\U000114b0', '\U000114b2'), ('\U000114b3', '\U000114b8'), ('\U000114b9',
-        '\U000114b9'), ('\U000114ba', '\U000114ba'), ('\U000114bb', '\U000114be'), ('\U000114bf',
-        '\U000114c0'), ('\U000114c1', '\U000114c1'), ('\U000114c4', '\U000114c5'), ('\U000114c7',
-        '\U000114c7'), ('\U00011580', '\U000115ae'), ('\U000115af', '\U000115b1'), ('\U000115b2',
-        '\U000115b5'), ('\U000115b8', '\U000115bb'), ('\U000115bc', '\U000115bd'), ('\U000115be',
-        '\U000115be'), ('\U00011600', '\U0001162f'), ('\U00011630', '\U00011632'), ('\U00011633',
-        '\U0001163a'), ('\U0001163b', '\U0001163c'), ('\U0001163d', '\U0001163d'), ('\U0001163e',
-        '\U0001163e'), ('\U00011640', '\U00011640'), ('\U00011644', '\U00011644'), ('\U00011680',
-        '\U000116aa'), ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'), ('\U000116ad',
-        '\U000116ad'), ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'), ('\U000118a0',
-        '\U000118df'), ('\U000118ff', '\U000118ff'), ('\U00011ac0', '\U00011af8'), ('\U00012000',
-        '\U00012398'), ('\U00012400', '\U0001246e'), ('\U00013000', '\U0001342e'), ('\U00016800',
-        '\U00016a38'), ('\U00016a40', '\U00016a5e'), ('\U00016ad0', '\U00016aed'), ('\U00016b00',
-        '\U00016b2f'), ('\U00016b30', '\U00016b36'), ('\U00016b40', '\U00016b43'), ('\U00016b63',
-        '\U00016b77'), ('\U00016b7d', '\U00016b8f'), ('\U00016f00', '\U00016f44'), ('\U00016f50',
-        '\U00016f50'), ('\U00016f51', '\U00016f7e'), ('\U00016f93', '\U00016f9f'), ('\U0001b000',
-        '\U0001b001'), ('\U0001bc00', '\U0001bc6a'), ('\U0001bc70', '\U0001bc7c'), ('\U0001bc80',
-        '\U0001bc88'), ('\U0001bc90', '\U0001bc99'), ('\U0001bc9e', '\U0001bc9e'), ('\U0001d400',
-        '\U0001d454'), ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2',
-        '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae',
-        '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5',
-        '\U0001d505'), ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), ('\U0001d516',
-        '\U0001d51c'), ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), ('\U0001d540',
-        '\U0001d544'), ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), ('\U0001d552',
-        '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc',
-        '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), ('\U0001d736',
-        '\U0001d74e'), ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), ('\U0001d78a',
-        '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), ('\U0001e800',
-        '\U0001e8c4'), ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21',
-        '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), ('\U0001ee29',
-        '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b',
-        '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), ('\U0001ee49',
-        '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51',
-        '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), ('\U0001ee59',
-        '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f',
-        '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), ('\U0001ee67',
-        '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), ('\U0001ee79',
-        '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b',
-        '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), ('\U0001eeab',
-        '\U0001eebb'), ('\U0001f130', '\U0001f149'), ('\U0001f150', '\U0001f169'), ('\U0001f170',
-        '\U0001f189'), ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), ('\U0002b740',
-        '\U0002b81d'), ('\U0002f800', '\U0002fa1d')
+        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'),
+        ('\u{1bb}', '\u{1bb}'), ('\u{1bc}', '\u{1bf}'), ('\u{1c0}', '\u{1c3}'), ('\u{1c4}',
+        '\u{293}'), ('\u{294}', '\u{294}'), ('\u{295}', '\u{2af}'), ('\u{2b0}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}',
+        '\u{2ee}'), ('\u{345}', '\u{345}'), ('\u{370}', '\u{373}'), ('\u{374}', '\u{374}'),
+        ('\u{376}', '\u{377}'), ('\u{37a}', '\u{37a}'), ('\u{37b}', '\u{37d}'), ('\u{37f}',
+        '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'), ('\u{48a}',
+        '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'),
+        ('\u{5b0}', '\u{5bd}'), ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}',
+        '\u{5c5}'), ('\u{5c7}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'),
+        ('\u{610}', '\u{61a}'), ('\u{620}', '\u{63f}'), ('\u{640}', '\u{640}'), ('\u{641}',
+        '\u{64a}'), ('\u{64b}', '\u{657}'), ('\u{659}', '\u{65f}'), ('\u{66e}', '\u{66f}'),
+        ('\u{670}', '\u{670}'), ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6d6}',
+        '\u{6dc}'), ('\u{6e1}', '\u{6e4}'), ('\u{6e5}', '\u{6e6}'), ('\u{6e7}', '\u{6e8}'),
+        ('\u{6ed}', '\u{6ed}'), ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}',
+        '\u{6ff}'), ('\u{710}', '\u{710}'), ('\u{711}', '\u{711}'), ('\u{712}', '\u{72f}'),
+        ('\u{730}', '\u{73f}'), ('\u{74d}', '\u{7a5}'), ('\u{7a6}', '\u{7b0}'), ('\u{7b1}',
+        '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'),
+        ('\u{800}', '\u{815}'), ('\u{816}', '\u{817}'), ('\u{81a}', '\u{81a}'), ('\u{81b}',
+        '\u{823}'), ('\u{824}', '\u{824}'), ('\u{825}', '\u{827}'), ('\u{828}', '\u{828}'),
+        ('\u{829}', '\u{82c}'), ('\u{840}', '\u{858}'), ('\u{8a0}', '\u{8b2}'), ('\u{8e4}',
+        '\u{8e9}'), ('\u{8f0}', '\u{902}'), ('\u{903}', '\u{903}'), ('\u{904}', '\u{939}'),
+        ('\u{93a}', '\u{93a}'), ('\u{93b}', '\u{93b}'), ('\u{93d}', '\u{93d}'), ('\u{93e}',
+        '\u{940}'), ('\u{941}', '\u{948}'), ('\u{949}', '\u{94c}'), ('\u{94e}', '\u{94f}'),
+        ('\u{950}', '\u{950}'), ('\u{955}', '\u{957}'), ('\u{958}', '\u{961}'), ('\u{962}',
+        '\u{963}'), ('\u{971}', '\u{971}'), ('\u{972}', '\u{980}'), ('\u{981}', '\u{981}'),
+        ('\u{982}', '\u{983}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}',
+        '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bd}', '\u{9bd}'), ('\u{9be}', '\u{9c0}'), ('\u{9c1}', '\u{9c4}'), ('\u{9c7}',
+        '\u{9c8}'), ('\u{9cb}', '\u{9cc}'), ('\u{9ce}', '\u{9ce}'), ('\u{9d7}', '\u{9d7}'),
+        ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'), ('\u{9e2}', '\u{9e3}'), ('\u{9f0}',
+        '\u{9f1}'), ('\u{a01}', '\u{a02}'), ('\u{a03}', '\u{a03}'), ('\u{a05}', '\u{a0a}'),
+        ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}',
+        '\u{a33}'), ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3e}', '\u{a40}'),
+        ('\u{a41}', '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4c}'), ('\u{a51}',
+        '\u{a51}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a70}', '\u{a71}'),
+        ('\u{a72}', '\u{a74}'), ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a82}'), ('\u{a83}',
+        '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'),
+        ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'), ('\u{abd}',
+        '\u{abd}'), ('\u{abe}', '\u{ac0}'), ('\u{ac1}', '\u{ac5}'), ('\u{ac7}', '\u{ac8}'),
+        ('\u{ac9}', '\u{ac9}'), ('\u{acb}', '\u{acc}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}',
+        '\u{ae1}'), ('\u{ae2}', '\u{ae3}'), ('\u{b01}', '\u{b01}'), ('\u{b02}', '\u{b03}'),
+        ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}',
+        '\u{b30}'), ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'),
+        ('\u{b3e}', '\u{b3e}'), ('\u{b3f}', '\u{b3f}'), ('\u{b40}', '\u{b40}'), ('\u{b41}',
+        '\u{b44}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'), ('\u{b56}', '\u{b56}'),
+        ('\u{b57}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b61}'), ('\u{b62}',
+        '\u{b63}'), ('\u{b71}', '\u{b71}'), ('\u{b82}', '\u{b82}'), ('\u{b83}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}',
+        '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bbf}'), ('\u{bc0}',
+        '\u{bc0}'), ('\u{bc1}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcc}'),
+        ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'), ('\u{c00}', '\u{c00}'), ('\u{c01}',
+        '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'),
+        ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'), ('\u{c3e}', '\u{c40}'), ('\u{c41}',
+        '\u{c44}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4c}'), ('\u{c55}', '\u{c56}'),
+        ('\u{c58}', '\u{c59}'), ('\u{c60}', '\u{c61}'), ('\u{c62}', '\u{c63}'), ('\u{c81}',
+        '\u{c81}'), ('\u{c82}', '\u{c83}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'),
+        ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbd}',
+        '\u{cbd}'), ('\u{cbe}', '\u{cbe}'), ('\u{cbf}', '\u{cbf}'), ('\u{cc0}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc6}'), ('\u{cc7}', '\u{cc8}'), ('\u{cca}', '\u{ccb}'), ('\u{ccc}',
+        '\u{ccc}'), ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'),
+        ('\u{ce2}', '\u{ce3}'), ('\u{cf1}', '\u{cf2}'), ('\u{d01}', '\u{d01}'), ('\u{d02}',
+        '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'),
+        ('\u{d3d}', '\u{d3d}'), ('\u{d3e}', '\u{d40}'), ('\u{d41}', '\u{d44}'), ('\u{d46}',
+        '\u{d48}'), ('\u{d4a}', '\u{d4c}'), ('\u{d4e}', '\u{d4e}'), ('\u{d57}', '\u{d57}'),
+        ('\u{d60}', '\u{d61}'), ('\u{d62}', '\u{d63}'), ('\u{d7a}', '\u{d7f}'), ('\u{d82}',
+        '\u{d83}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dcf}', '\u{dd1}'), ('\u{dd2}',
+        '\u{dd4}'), ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'),
+        ('\u{e01}', '\u{e30}'), ('\u{e31}', '\u{e31}'), ('\u{e32}', '\u{e33}'), ('\u{e34}',
+        '\u{e3a}'), ('\u{e40}', '\u{e45}'), ('\u{e46}', '\u{e46}'), ('\u{e4d}', '\u{e4d}'),
+        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}',
+        '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
+        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}',
+        '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb2}', '\u{eb3}'),
+        ('\u{eb4}', '\u{eb9}'), ('\u{ebb}', '\u{ebc}'), ('\u{ebd}', '\u{ebd}'), ('\u{ec0}',
+        '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), ('\u{ecd}', '\u{ecd}'), ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'), ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}',
+        '\u{f7e}'), ('\u{f7f}', '\u{f7f}'), ('\u{f80}', '\u{f81}'), ('\u{f88}', '\u{f8c}'),
+        ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{1000}', '\u{102a}'), ('\u{102b}',
+        '\u{102c}'), ('\u{102d}', '\u{1030}'), ('\u{1031}', '\u{1031}'), ('\u{1032}', '\u{1036}'),
+        ('\u{1038}', '\u{1038}'), ('\u{103b}', '\u{103c}'), ('\u{103d}', '\u{103e}'), ('\u{103f}',
+        '\u{103f}'), ('\u{1050}', '\u{1055}'), ('\u{1056}', '\u{1057}'), ('\u{1058}', '\u{1059}'),
+        ('\u{105a}', '\u{105d}'), ('\u{105e}', '\u{1060}'), ('\u{1061}', '\u{1061}'), ('\u{1062}',
+        '\u{1062}'), ('\u{1065}', '\u{1066}'), ('\u{1067}', '\u{1068}'), ('\u{106e}', '\u{1070}'),
+        ('\u{1071}', '\u{1074}'), ('\u{1075}', '\u{1081}'), ('\u{1082}', '\u{1082}'), ('\u{1083}',
+        '\u{1084}'), ('\u{1085}', '\u{1086}'), ('\u{108e}', '\u{108e}'), ('\u{109c}', '\u{109c}'),
+        ('\u{109d}', '\u{109d}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}',
+        '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{10fc}'), ('\u{10fd}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}',
+        '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}', '\u{12c0}'), ('\u{12c2}',
+        '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'), ('\u{135f}', '\u{135f}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
+        '\u{13f4}'), ('\u{1401}', '\u{166c}'), ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f0}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}',
+        '\u{170c}'), ('\u{170e}', '\u{1711}'), ('\u{1712}', '\u{1713}'), ('\u{1720}', '\u{1731}'),
+        ('\u{1732}', '\u{1733}'), ('\u{1740}', '\u{1751}'), ('\u{1752}', '\u{1753}'), ('\u{1760}',
+        '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1772}', '\u{1773}'), ('\u{1780}', '\u{17b3}'),
+        ('\u{17b6}', '\u{17b6}'), ('\u{17b7}', '\u{17bd}'), ('\u{17be}', '\u{17c5}'), ('\u{17c6}',
+        '\u{17c6}'), ('\u{17c7}', '\u{17c8}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}', '\u{17dc}'),
+        ('\u{1820}', '\u{1842}'), ('\u{1843}', '\u{1843}'), ('\u{1844}', '\u{1877}'), ('\u{1880}',
+        '\u{18a8}'), ('\u{18a9}', '\u{18a9}'), ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{1922}'), ('\u{1923}', '\u{1926}'), ('\u{1927}',
+        '\u{1928}'), ('\u{1929}', '\u{192b}'), ('\u{1930}', '\u{1931}'), ('\u{1932}', '\u{1932}'),
+        ('\u{1933}', '\u{1938}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'), ('\u{1980}',
+        '\u{19ab}'), ('\u{19b0}', '\u{19c0}'), ('\u{19c1}', '\u{19c7}'), ('\u{19c8}', '\u{19c9}'),
+        ('\u{1a00}', '\u{1a16}'), ('\u{1a17}', '\u{1a18}'), ('\u{1a19}', '\u{1a1a}'), ('\u{1a1b}',
+        '\u{1a1b}'), ('\u{1a20}', '\u{1a54}'), ('\u{1a55}', '\u{1a55}'), ('\u{1a56}', '\u{1a56}'),
+        ('\u{1a57}', '\u{1a57}'), ('\u{1a58}', '\u{1a5e}'), ('\u{1a61}', '\u{1a61}'), ('\u{1a62}',
+        '\u{1a62}'), ('\u{1a63}', '\u{1a64}'), ('\u{1a65}', '\u{1a6c}'), ('\u{1a6d}', '\u{1a72}'),
+        ('\u{1a73}', '\u{1a74}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1b00}', '\u{1b03}'), ('\u{1b04}',
+        '\u{1b04}'), ('\u{1b05}', '\u{1b33}'), ('\u{1b35}', '\u{1b35}'), ('\u{1b36}', '\u{1b3a}'),
+        ('\u{1b3b}', '\u{1b3b}'), ('\u{1b3c}', '\u{1b3c}'), ('\u{1b3d}', '\u{1b41}'), ('\u{1b42}',
+        '\u{1b42}'), ('\u{1b43}', '\u{1b43}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b80}', '\u{1b81}'),
+        ('\u{1b82}', '\u{1b82}'), ('\u{1b83}', '\u{1ba0}'), ('\u{1ba1}', '\u{1ba1}'), ('\u{1ba2}',
+        '\u{1ba5}'), ('\u{1ba6}', '\u{1ba7}'), ('\u{1ba8}', '\u{1ba9}'), ('\u{1bac}', '\u{1bad}'),
+        ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'), ('\u{1be7}', '\u{1be7}'), ('\u{1be8}',
+        '\u{1be9}'), ('\u{1bea}', '\u{1bec}'), ('\u{1bed}', '\u{1bed}'), ('\u{1bee}', '\u{1bee}'),
+        ('\u{1bef}', '\u{1bf1}'), ('\u{1c00}', '\u{1c23}'), ('\u{1c24}', '\u{1c2b}'), ('\u{1c2c}',
+        '\u{1c33}'), ('\u{1c34}', '\u{1c35}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}', '\u{1c77}'),
+        ('\u{1c78}', '\u{1c7d}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf2}',
+        '\u{1cf3}'), ('\u{1cf5}', '\u{1cf6}'), ('\u{1d00}', '\u{1d2b}'), ('\u{1d2c}', '\u{1d6a}'),
+        ('\u{1d6b}', '\u{1d77}'), ('\u{1d78}', '\u{1d78}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1d9b}',
+        '\u{1dbf}'), ('\u{1de7}', '\u{1df4}'), ('\u{1e00}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}',
+        '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}',
+        '\u{1fc4}'), ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'),
+        ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'), ('\u{2071}',
+        '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2119}',
+        '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{212d}'), ('\u{212f}', '\u{2134}'), ('\u{2135}', '\u{2138}'), ('\u{2139}',
+        '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'),
+        ('\u{2160}', '\u{2182}'), ('\u{2183}', '\u{2184}'), ('\u{2185}', '\u{2188}'), ('\u{24b6}',
+        '\u{24e9}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c60}', '\u{2c7b}'),
+        ('\u{2c7c}', '\u{2c7d}'), ('\u{2c7e}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}',
+        '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}',
+        '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}',
+        '\u{2dde}'), ('\u{2de0}', '\u{2dff}'), ('\u{2e2f}', '\u{2e2f}'), ('\u{3005}', '\u{3005}'),
+        ('\u{3006}', '\u{3006}'), ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3031}',
+        '\u{3035}'), ('\u{3038}', '\u{303a}'), ('\u{303b}', '\u{303b}'), ('\u{303c}', '\u{303c}'),
+        ('\u{3041}', '\u{3096}'), ('\u{309d}', '\u{309e}'), ('\u{309f}', '\u{309f}'), ('\u{30a1}',
+        '\u{30fa}'), ('\u{30fc}', '\u{30fe}'), ('\u{30ff}', '\u{30ff}'), ('\u{3105}', '\u{312d}'),
+        ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}',
+        '\u{4db5}'), ('\u{4e00}', '\u{9fcc}'), ('\u{a000}', '\u{a014}'), ('\u{a015}', '\u{a015}'),
+        ('\u{a016}', '\u{a48c}'), ('\u{a4d0}', '\u{a4f7}'), ('\u{a4f8}', '\u{a4fd}'), ('\u{a500}',
+        '\u{a60b}'), ('\u{a60c}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'), ('\u{a62a}', '\u{a62b}'),
+        ('\u{a640}', '\u{a66d}'), ('\u{a66e}', '\u{a66e}'), ('\u{a674}', '\u{a67b}'), ('\u{a67f}',
+        '\u{a67f}'), ('\u{a680}', '\u{a69b}'), ('\u{a69c}', '\u{a69d}'), ('\u{a69f}', '\u{a69f}'),
+        ('\u{a6a0}', '\u{a6e5}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a717}', '\u{a71f}'), ('\u{a722}',
+        '\u{a76f}'), ('\u{a770}', '\u{a770}'), ('\u{a771}', '\u{a787}'), ('\u{a788}', '\u{a788}'),
+        ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'), ('\u{a7b0}', '\u{a7b1}'), ('\u{a7f7}',
+        '\u{a7f7}'), ('\u{a7f8}', '\u{a7f9}'), ('\u{a7fa}', '\u{a7fa}'), ('\u{a7fb}', '\u{a801}'),
+        ('\u{a803}', '\u{a805}'), ('\u{a807}', '\u{a80a}'), ('\u{a80c}', '\u{a822}'), ('\u{a823}',
+        '\u{a824}'), ('\u{a825}', '\u{a826}'), ('\u{a827}', '\u{a827}'), ('\u{a840}', '\u{a873}'),
+        ('\u{a880}', '\u{a881}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8b4}', '\u{a8c3}'), ('\u{a8f2}',
+        '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a90a}', '\u{a925}'), ('\u{a926}', '\u{a92a}'),
+        ('\u{a930}', '\u{a946}'), ('\u{a947}', '\u{a951}'), ('\u{a952}', '\u{a952}'), ('\u{a960}',
+        '\u{a97c}'), ('\u{a980}', '\u{a982}'), ('\u{a983}', '\u{a983}'), ('\u{a984}', '\u{a9b2}'),
+        ('\u{a9b4}', '\u{a9b5}'), ('\u{a9b6}', '\u{a9b9}'), ('\u{a9ba}', '\u{a9bb}'), ('\u{a9bc}',
+        '\u{a9bc}'), ('\u{a9bd}', '\u{a9bf}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e6}', '\u{a9e6}'), ('\u{a9e7}', '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}',
+        '\u{aa28}'), ('\u{aa29}', '\u{aa2e}'), ('\u{aa2f}', '\u{aa30}'), ('\u{aa31}', '\u{aa32}'),
+        ('\u{aa33}', '\u{aa34}'), ('\u{aa35}', '\u{aa36}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa43}',
+        '\u{aa43}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa4c}', '\u{aa4c}'), ('\u{aa4d}', '\u{aa4d}'),
+        ('\u{aa60}', '\u{aa6f}'), ('\u{aa70}', '\u{aa70}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa7a}',
+        '\u{aa7a}'), ('\u{aa7e}', '\u{aaaf}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab1}', '\u{aab1}'),
+        ('\u{aab2}', '\u{aab4}'), ('\u{aab5}', '\u{aab6}'), ('\u{aab7}', '\u{aab8}'), ('\u{aab9}',
+        '\u{aabd}'), ('\u{aabe}', '\u{aabe}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadc}'), ('\u{aadd}', '\u{aadd}'), ('\u{aae0}', '\u{aaea}'), ('\u{aaeb}',
+        '\u{aaeb}'), ('\u{aaec}', '\u{aaed}'), ('\u{aaee}', '\u{aaef}'), ('\u{aaf2}', '\u{aaf2}'),
+        ('\u{aaf3}', '\u{aaf4}'), ('\u{aaf5}', '\u{aaf5}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}',
+        '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'),
+        ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}', '\u{ab65}'), ('\u{abc0}',
+        '\u{abe2}'), ('\u{abe3}', '\u{abe4}'), ('\u{abe5}', '\u{abe5}'), ('\u{abe6}', '\u{abe7}'),
+        ('\u{abe8}', '\u{abe8}'), ('\u{abe9}', '\u{abea}'), ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}',
+        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1e}',
+        '\u{fb1e}'), ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'),
+        ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'), ('\u{fb46}',
+        '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdfb}'), ('\u{fe70}', '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{ff21}',
+        '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}', '\u{ff6f}'), ('\u{ff70}', '\u{ff70}'),
+        ('\u{ff71}', '\u{ff9d}'), ('\u{ff9e}', '\u{ff9f}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}',
+        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'), ('\u{10330}', '\u{10340}'),
+        ('\u{10341}', '\u{10341}'), ('\u{10342}', '\u{10349}'), ('\u{1034a}', '\u{1034a}'),
+        ('\u{10350}', '\u{10375}'), ('\u{10376}', '\u{1037a}'), ('\u{10380}', '\u{1039d}'),
+        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d1}', '\u{103d5}'),
+        ('\u{10400}', '\u{1044f}'), ('\u{10450}', '\u{1049d}'), ('\u{10500}', '\u{10527}'),
+        ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'),
+        ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'),
+        ('\u{1080a}', '\u{10835}'), ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'),
+        ('\u{1083f}', '\u{10855}'), ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'),
+        ('\u{10900}', '\u{10915}'), ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'),
+        ('\u{109be}', '\u{109bf}'), ('\u{10a00}', '\u{10a00}'), ('\u{10a01}', '\u{10a03}'),
+        ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}', '\u{10a0f}'), ('\u{10a10}', '\u{10a13}'),
+        ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'),
+        ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10b00}', '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'),
+        ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{11000}', '\u{11000}'),
+        ('\u{11001}', '\u{11001}'), ('\u{11002}', '\u{11002}'), ('\u{11003}', '\u{11037}'),
+        ('\u{11038}', '\u{11045}'), ('\u{11082}', '\u{11082}'), ('\u{11083}', '\u{110af}'),
+        ('\u{110b0}', '\u{110b2}'), ('\u{110b3}', '\u{110b6}'), ('\u{110b7}', '\u{110b8}'),
+        ('\u{110d0}', '\u{110e8}'), ('\u{11100}', '\u{11102}'), ('\u{11103}', '\u{11126}'),
+        ('\u{11127}', '\u{1112b}'), ('\u{1112c}', '\u{1112c}'), ('\u{1112d}', '\u{11132}'),
+        ('\u{11150}', '\u{11172}'), ('\u{11176}', '\u{11176}'), ('\u{11180}', '\u{11181}'),
+        ('\u{11182}', '\u{11182}'), ('\u{11183}', '\u{111b2}'), ('\u{111b3}', '\u{111b5}'),
+        ('\u{111b6}', '\u{111be}'), ('\u{111bf}', '\u{111bf}'), ('\u{111c1}', '\u{111c4}'),
+        ('\u{111da}', '\u{111da}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'),
+        ('\u{1122c}', '\u{1122e}'), ('\u{1122f}', '\u{11231}'), ('\u{11232}', '\u{11233}'),
+        ('\u{11234}', '\u{11234}'), ('\u{11237}', '\u{11237}'), ('\u{112b0}', '\u{112de}'),
+        ('\u{112df}', '\u{112df}'), ('\u{112e0}', '\u{112e2}'), ('\u{112e3}', '\u{112e8}'),
+        ('\u{11301}', '\u{11301}'), ('\u{11302}', '\u{11303}'), ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133d}', '\u{1133d}'),
+        ('\u{1133e}', '\u{1133f}'), ('\u{11340}', '\u{11340}'), ('\u{11341}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134c}'), ('\u{11357}', '\u{11357}'),
+        ('\u{1135d}', '\u{11361}'), ('\u{11362}', '\u{11363}'), ('\u{11480}', '\u{114af}'),
+        ('\u{114b0}', '\u{114b2}'), ('\u{114b3}', '\u{114b8}'), ('\u{114b9}', '\u{114b9}'),
+        ('\u{114ba}', '\u{114ba}'), ('\u{114bb}', '\u{114be}'), ('\u{114bf}', '\u{114c0}'),
+        ('\u{114c1}', '\u{114c1}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}', '\u{114c7}'),
+        ('\u{11580}', '\u{115ae}'), ('\u{115af}', '\u{115b1}'), ('\u{115b2}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115bb}'), ('\u{115bc}', '\u{115bd}'), ('\u{115be}', '\u{115be}'),
+        ('\u{11600}', '\u{1162f}'), ('\u{11630}', '\u{11632}'), ('\u{11633}', '\u{1163a}'),
+        ('\u{1163b}', '\u{1163c}'), ('\u{1163d}', '\u{1163d}'), ('\u{1163e}', '\u{1163e}'),
+        ('\u{11640}', '\u{11640}'), ('\u{11644}', '\u{11644}'), ('\u{11680}', '\u{116aa}'),
+        ('\u{116ab}', '\u{116ab}'), ('\u{116ac}', '\u{116ac}'), ('\u{116ad}', '\u{116ad}'),
+        ('\u{116ae}', '\u{116af}'), ('\u{116b0}', '\u{116b5}'), ('\u{118a0}', '\u{118df}'),
+        ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'), ('\u{12000}', '\u{12398}'),
+        ('\u{12400}', '\u{1246e}'), ('\u{13000}', '\u{1342e}'), ('\u{16800}', '\u{16a38}'),
+        ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16b00}', '\u{16b2f}'),
+        ('\u{16b30}', '\u{16b36}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f50}'),
+        ('\u{16f51}', '\u{16f7e}'), ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'),
+        ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9e}', '\u{1bc9e}'), ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{1f130}', '\u{1f149}'), ('\u{1f150}', '\u{1f169}'), ('\u{1f170}', '\u{1f189}'),
+        ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'),
+        ('\u{2f800}', '\u{2fa1d}')
     ];
 
     pub fn Alphabetic(c: char) -> bool {
@@ -1884,181 +2058,203 @@ pub fn Alphabetic(c: char) -> bool {
     }
 
     pub static Default_Ignorable_Code_Point_table: &'static [(char, char)] = &[
-        ('\u00ad', '\u00ad'), ('\u034f', '\u034f'), ('\u061c', '\u061c'), ('\u115f', '\u1160'),
-        ('\u17b4', '\u17b5'), ('\u180b', '\u180d'), ('\u180e', '\u180e'), ('\u200b', '\u200f'),
-        ('\u202a', '\u202e'), ('\u2060', '\u2064'), ('\u2065', '\u2065'), ('\u2066', '\u206f'),
-        ('\u3164', '\u3164'), ('\ufe00', '\ufe0f'), ('\ufeff', '\ufeff'), ('\uffa0', '\uffa0'),
-        ('\ufff0', '\ufff8'), ('\U0001bca0', '\U0001bca3'), ('\U0001d173', '\U0001d17a'),
-        ('\U000e0000', '\U000e0000'), ('\U000e0001', '\U000e0001'), ('\U000e0002', '\U000e001f'),
-        ('\U000e0020', '\U000e007f'), ('\U000e0080', '\U000e00ff'), ('\U000e0100', '\U000e01ef'),
-        ('\U000e01f0', '\U000e0fff')
+        ('\u{ad}', '\u{ad}'), ('\u{34f}', '\u{34f}'), ('\u{61c}', '\u{61c}'), ('\u{115f}',
+        '\u{1160}'), ('\u{17b4}', '\u{17b5}'), ('\u{180b}', '\u{180d}'), ('\u{180e}', '\u{180e}'),
+        ('\u{200b}', '\u{200f}'), ('\u{202a}', '\u{202e}'), ('\u{2060}', '\u{2064}'), ('\u{2065}',
+        '\u{2065}'), ('\u{2066}', '\u{206f}'), ('\u{3164}', '\u{3164}'), ('\u{fe00}', '\u{fe0f}'),
+        ('\u{feff}', '\u{feff}'), ('\u{ffa0}', '\u{ffa0}'), ('\u{fff0}', '\u{fff8}'), ('\u{1bca0}',
+        '\u{1bca3}'), ('\u{1d173}', '\u{1d17a}'), ('\u{e0000}', '\u{e0000}'), ('\u{e0001}',
+        '\u{e0001}'), ('\u{e0002}', '\u{e001f}'), ('\u{e0020}', '\u{e007f}'), ('\u{e0080}',
+        '\u{e00ff}'), ('\u{e0100}', '\u{e01ef}'), ('\u{e01f0}', '\u{e0fff}')
     ];
 
     pub static Lowercase_table: &'static [(char, char)] = &[
-        ('\x61', '\x7a'), ('\u00aa', '\u00aa'), ('\u00b5', '\u00b5'), ('\u00ba', '\u00ba'),
-        ('\u00df', '\u00f6'), ('\u00f8', '\u00ff'), ('\u0101', '\u0101'), ('\u0103', '\u0103'),
-        ('\u0105', '\u0105'), ('\u0107', '\u0107'), ('\u0109', '\u0109'), ('\u010b', '\u010b'),
-        ('\u010d', '\u010d'), ('\u010f', '\u010f'), ('\u0111', '\u0111'), ('\u0113', '\u0113'),
-        ('\u0115', '\u0115'), ('\u0117', '\u0117'), ('\u0119', '\u0119'), ('\u011b', '\u011b'),
-        ('\u011d', '\u011d'), ('\u011f', '\u011f'), ('\u0121', '\u0121'), ('\u0123', '\u0123'),
-        ('\u0125', '\u0125'), ('\u0127', '\u0127'), ('\u0129', '\u0129'), ('\u012b', '\u012b'),
-        ('\u012d', '\u012d'), ('\u012f', '\u012f'), ('\u0131', '\u0131'), ('\u0133', '\u0133'),
-        ('\u0135', '\u0135'), ('\u0137', '\u0138'), ('\u013a', '\u013a'), ('\u013c', '\u013c'),
-        ('\u013e', '\u013e'), ('\u0140', '\u0140'), ('\u0142', '\u0142'), ('\u0144', '\u0144'),
-        ('\u0146', '\u0146'), ('\u0148', '\u0149'), ('\u014b', '\u014b'), ('\u014d', '\u014d'),
-        ('\u014f', '\u014f'), ('\u0151', '\u0151'), ('\u0153', '\u0153'), ('\u0155', '\u0155'),
-        ('\u0157', '\u0157'), ('\u0159', '\u0159'), ('\u015b', '\u015b'), ('\u015d', '\u015d'),
-        ('\u015f', '\u015f'), ('\u0161', '\u0161'), ('\u0163', '\u0163'), ('\u0165', '\u0165'),
-        ('\u0167', '\u0167'), ('\u0169', '\u0169'), ('\u016b', '\u016b'), ('\u016d', '\u016d'),
-        ('\u016f', '\u016f'), ('\u0171', '\u0171'), ('\u0173', '\u0173'), ('\u0175', '\u0175'),
-        ('\u0177', '\u0177'), ('\u017a', '\u017a'), ('\u017c', '\u017c'), ('\u017e', '\u0180'),
-        ('\u0183', '\u0183'), ('\u0185', '\u0185'), ('\u0188', '\u0188'), ('\u018c', '\u018d'),
-        ('\u0192', '\u0192'), ('\u0195', '\u0195'), ('\u0199', '\u019b'), ('\u019e', '\u019e'),
-        ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'), ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'),
-        ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'), ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'),
-        ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'), ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'),
-        ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'), ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'),
-        ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'), ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'),
-        ('\u01da', '\u01da'), ('\u01dc', '\u01dd'), ('\u01df', '\u01df'), ('\u01e1', '\u01e1'),
-        ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'), ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'),
-        ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'), ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'),
-        ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'), ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'),
-        ('\u01ff', '\u01ff'), ('\u0201', '\u0201'), ('\u0203', '\u0203'), ('\u0205', '\u0205'),
-        ('\u0207', '\u0207'), ('\u0209', '\u0209'), ('\u020b', '\u020b'), ('\u020d', '\u020d'),
-        ('\u020f', '\u020f'), ('\u0211', '\u0211'), ('\u0213', '\u0213'), ('\u0215', '\u0215'),
-        ('\u0217', '\u0217'), ('\u0219', '\u0219'), ('\u021b', '\u021b'), ('\u021d', '\u021d'),
-        ('\u021f', '\u021f'), ('\u0221', '\u0221'), ('\u0223', '\u0223'), ('\u0225', '\u0225'),
-        ('\u0227', '\u0227'), ('\u0229', '\u0229'), ('\u022b', '\u022b'), ('\u022d', '\u022d'),
-        ('\u022f', '\u022f'), ('\u0231', '\u0231'), ('\u0233', '\u0239'), ('\u023c', '\u023c'),
-        ('\u023f', '\u0240'), ('\u0242', '\u0242'), ('\u0247', '\u0247'), ('\u0249', '\u0249'),
-        ('\u024b', '\u024b'), ('\u024d', '\u024d'), ('\u024f', '\u0293'), ('\u0295', '\u02af'),
-        ('\u02b0', '\u02b8'), ('\u02c0', '\u02c1'), ('\u02e0', '\u02e4'), ('\u0345', '\u0345'),
-        ('\u0371', '\u0371'), ('\u0373', '\u0373'), ('\u0377', '\u0377'), ('\u037a', '\u037a'),
-        ('\u037b', '\u037d'), ('\u0390', '\u0390'), ('\u03ac', '\u03ce'), ('\u03d0', '\u03d1'),
-        ('\u03d5', '\u03d7'), ('\u03d9', '\u03d9'), ('\u03db', '\u03db'), ('\u03dd', '\u03dd'),
-        ('\u03df', '\u03df'), ('\u03e1', '\u03e1'), ('\u03e3', '\u03e3'), ('\u03e5', '\u03e5'),
-        ('\u03e7', '\u03e7'), ('\u03e9', '\u03e9'), ('\u03eb', '\u03eb'), ('\u03ed', '\u03ed'),
-        ('\u03ef', '\u03f3'), ('\u03f5', '\u03f5'), ('\u03f8', '\u03f8'), ('\u03fb', '\u03fc'),
-        ('\u0430', '\u045f'), ('\u0461', '\u0461'), ('\u0463', '\u0463'), ('\u0465', '\u0465'),
-        ('\u0467', '\u0467'), ('\u0469', '\u0469'), ('\u046b', '\u046b'), ('\u046d', '\u046d'),
-        ('\u046f', '\u046f'), ('\u0471', '\u0471'), ('\u0473', '\u0473'), ('\u0475', '\u0475'),
-        ('\u0477', '\u0477'), ('\u0479', '\u0479'), ('\u047b', '\u047b'), ('\u047d', '\u047d'),
-        ('\u047f', '\u047f'), ('\u0481', '\u0481'), ('\u048b', '\u048b'), ('\u048d', '\u048d'),
-        ('\u048f', '\u048f'), ('\u0491', '\u0491'), ('\u0493', '\u0493'), ('\u0495', '\u0495'),
-        ('\u0497', '\u0497'), ('\u0499', '\u0499'), ('\u049b', '\u049b'), ('\u049d', '\u049d'),
-        ('\u049f', '\u049f'), ('\u04a1', '\u04a1'), ('\u04a3', '\u04a3'), ('\u04a5', '\u04a5'),
-        ('\u04a7', '\u04a7'), ('\u04a9', '\u04a9'), ('\u04ab', '\u04ab'), ('\u04ad', '\u04ad'),
-        ('\u04af', '\u04af'), ('\u04b1', '\u04b1'), ('\u04b3', '\u04b3'), ('\u04b5', '\u04b5'),
-        ('\u04b7', '\u04b7'), ('\u04b9', '\u04b9'), ('\u04bb', '\u04bb'), ('\u04bd', '\u04bd'),
-        ('\u04bf', '\u04bf'), ('\u04c2', '\u04c2'), ('\u04c4', '\u04c4'), ('\u04c6', '\u04c6'),
-        ('\u04c8', '\u04c8'), ('\u04ca', '\u04ca'), ('\u04cc', '\u04cc'), ('\u04ce', '\u04cf'),
-        ('\u04d1', '\u04d1'), ('\u04d3', '\u04d3'), ('\u04d5', '\u04d5'), ('\u04d7', '\u04d7'),
-        ('\u04d9', '\u04d9'), ('\u04db', '\u04db'), ('\u04dd', '\u04dd'), ('\u04df', '\u04df'),
-        ('\u04e1', '\u04e1'), ('\u04e3', '\u04e3'), ('\u04e5', '\u04e5'), ('\u04e7', '\u04e7'),
-        ('\u04e9', '\u04e9'), ('\u04eb', '\u04eb'), ('\u04ed', '\u04ed'), ('\u04ef', '\u04ef'),
-        ('\u04f1', '\u04f1'), ('\u04f3', '\u04f3'), ('\u04f5', '\u04f5'), ('\u04f7', '\u04f7'),
-        ('\u04f9', '\u04f9'), ('\u04fb', '\u04fb'), ('\u04fd', '\u04fd'), ('\u04ff', '\u04ff'),
-        ('\u0501', '\u0501'), ('\u0503', '\u0503'), ('\u0505', '\u0505'), ('\u0507', '\u0507'),
-        ('\u0509', '\u0509'), ('\u050b', '\u050b'), ('\u050d', '\u050d'), ('\u050f', '\u050f'),
-        ('\u0511', '\u0511'), ('\u0513', '\u0513'), ('\u0515', '\u0515'), ('\u0517', '\u0517'),
-        ('\u0519', '\u0519'), ('\u051b', '\u051b'), ('\u051d', '\u051d'), ('\u051f', '\u051f'),
-        ('\u0521', '\u0521'), ('\u0523', '\u0523'), ('\u0525', '\u0525'), ('\u0527', '\u0527'),
-        ('\u0529', '\u0529'), ('\u052b', '\u052b'), ('\u052d', '\u052d'), ('\u052f', '\u052f'),
-        ('\u0561', '\u0587'), ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'),
-        ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), ('\u1e01', '\u1e01'),
-        ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'), ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'),
-        ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'), ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'),
-        ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'), ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'),
-        ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'), ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'),
-        ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'), ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'),
-        ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'), ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'),
-        ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'), ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'),
-        ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'), ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'),
-        ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'), ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'),
-        ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'), ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'),
-        ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'), ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'),
-        ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'), ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'),
-        ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'), ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'),
-        ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'), ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'),
-        ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'), ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'),
-        ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'), ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'),
-        ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'), ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'),
-        ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'), ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'),
-        ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'), ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'),
-        ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'), ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'),
-        ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'), ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'),
-        ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'), ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'),
-        ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'), ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'),
-        ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'), ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'),
-        ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'), ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'),
-        ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'), ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'),
-        ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'), ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'),
-        ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'), ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'),
-        ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'), ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'),
-        ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'), ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'),
-        ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'), ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'),
-        ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'), ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'),
-        ('\u1f60', '\u1f67'), ('\u1f70', '\u1f7d'), ('\u1f80', '\u1f87'), ('\u1f90', '\u1f97'),
-        ('\u1fa0', '\u1fa7'), ('\u1fb0', '\u1fb4'), ('\u1fb6', '\u1fb7'), ('\u1fbe', '\u1fbe'),
-        ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fc7'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fd7'),
-        ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ff7'), ('\u2071', '\u2071'),
-        ('\u207f', '\u207f'), ('\u2090', '\u209c'), ('\u210a', '\u210a'), ('\u210e', '\u210f'),
-        ('\u2113', '\u2113'), ('\u212f', '\u212f'), ('\u2134', '\u2134'), ('\u2139', '\u2139'),
-        ('\u213c', '\u213d'), ('\u2146', '\u2149'), ('\u214e', '\u214e'), ('\u2170', '\u217f'),
-        ('\u2184', '\u2184'), ('\u24d0', '\u24e9'), ('\u2c30', '\u2c5e'), ('\u2c61', '\u2c61'),
-        ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), ('\u2c6a', '\u2c6a'), ('\u2c6c', '\u2c6c'),
-        ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), ('\u2c76', '\u2c7b'), ('\u2c7c', '\u2c7d'),
-        ('\u2c81', '\u2c81'), ('\u2c83', '\u2c83'), ('\u2c85', '\u2c85'), ('\u2c87', '\u2c87'),
-        ('\u2c89', '\u2c89'), ('\u2c8b', '\u2c8b'), ('\u2c8d', '\u2c8d'), ('\u2c8f', '\u2c8f'),
-        ('\u2c91', '\u2c91'), ('\u2c93', '\u2c93'), ('\u2c95', '\u2c95'), ('\u2c97', '\u2c97'),
-        ('\u2c99', '\u2c99'), ('\u2c9b', '\u2c9b'), ('\u2c9d', '\u2c9d'), ('\u2c9f', '\u2c9f'),
-        ('\u2ca1', '\u2ca1'), ('\u2ca3', '\u2ca3'), ('\u2ca5', '\u2ca5'), ('\u2ca7', '\u2ca7'),
-        ('\u2ca9', '\u2ca9'), ('\u2cab', '\u2cab'), ('\u2cad', '\u2cad'), ('\u2caf', '\u2caf'),
-        ('\u2cb1', '\u2cb1'), ('\u2cb3', '\u2cb3'), ('\u2cb5', '\u2cb5'), ('\u2cb7', '\u2cb7'),
-        ('\u2cb9', '\u2cb9'), ('\u2cbb', '\u2cbb'), ('\u2cbd', '\u2cbd'), ('\u2cbf', '\u2cbf'),
-        ('\u2cc1', '\u2cc1'), ('\u2cc3', '\u2cc3'), ('\u2cc5', '\u2cc5'), ('\u2cc7', '\u2cc7'),
-        ('\u2cc9', '\u2cc9'), ('\u2ccb', '\u2ccb'), ('\u2ccd', '\u2ccd'), ('\u2ccf', '\u2ccf'),
-        ('\u2cd1', '\u2cd1'), ('\u2cd3', '\u2cd3'), ('\u2cd5', '\u2cd5'), ('\u2cd7', '\u2cd7'),
-        ('\u2cd9', '\u2cd9'), ('\u2cdb', '\u2cdb'), ('\u2cdd', '\u2cdd'), ('\u2cdf', '\u2cdf'),
-        ('\u2ce1', '\u2ce1'), ('\u2ce3', '\u2ce4'), ('\u2cec', '\u2cec'), ('\u2cee', '\u2cee'),
-        ('\u2cf3', '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'),
-        ('\ua641', '\ua641'), ('\ua643', '\ua643'), ('\ua645', '\ua645'), ('\ua647', '\ua647'),
-        ('\ua649', '\ua649'), ('\ua64b', '\ua64b'), ('\ua64d', '\ua64d'), ('\ua64f', '\ua64f'),
-        ('\ua651', '\ua651'), ('\ua653', '\ua653'), ('\ua655', '\ua655'), ('\ua657', '\ua657'),
-        ('\ua659', '\ua659'), ('\ua65b', '\ua65b'), ('\ua65d', '\ua65d'), ('\ua65f', '\ua65f'),
-        ('\ua661', '\ua661'), ('\ua663', '\ua663'), ('\ua665', '\ua665'), ('\ua667', '\ua667'),
-        ('\ua669', '\ua669'), ('\ua66b', '\ua66b'), ('\ua66d', '\ua66d'), ('\ua681', '\ua681'),
-        ('\ua683', '\ua683'), ('\ua685', '\ua685'), ('\ua687', '\ua687'), ('\ua689', '\ua689'),
-        ('\ua68b', '\ua68b'), ('\ua68d', '\ua68d'), ('\ua68f', '\ua68f'), ('\ua691', '\ua691'),
-        ('\ua693', '\ua693'), ('\ua695', '\ua695'), ('\ua697', '\ua697'), ('\ua699', '\ua699'),
-        ('\ua69b', '\ua69b'), ('\ua69c', '\ua69d'), ('\ua723', '\ua723'), ('\ua725', '\ua725'),
-        ('\ua727', '\ua727'), ('\ua729', '\ua729'), ('\ua72b', '\ua72b'), ('\ua72d', '\ua72d'),
-        ('\ua72f', '\ua731'), ('\ua733', '\ua733'), ('\ua735', '\ua735'), ('\ua737', '\ua737'),
-        ('\ua739', '\ua739'), ('\ua73b', '\ua73b'), ('\ua73d', '\ua73d'), ('\ua73f', '\ua73f'),
-        ('\ua741', '\ua741'), ('\ua743', '\ua743'), ('\ua745', '\ua745'), ('\ua747', '\ua747'),
-        ('\ua749', '\ua749'), ('\ua74b', '\ua74b'), ('\ua74d', '\ua74d'), ('\ua74f', '\ua74f'),
-        ('\ua751', '\ua751'), ('\ua753', '\ua753'), ('\ua755', '\ua755'), ('\ua757', '\ua757'),
-        ('\ua759', '\ua759'), ('\ua75b', '\ua75b'), ('\ua75d', '\ua75d'), ('\ua75f', '\ua75f'),
-        ('\ua761', '\ua761'), ('\ua763', '\ua763'), ('\ua765', '\ua765'), ('\ua767', '\ua767'),
-        ('\ua769', '\ua769'), ('\ua76b', '\ua76b'), ('\ua76d', '\ua76d'), ('\ua76f', '\ua76f'),
-        ('\ua770', '\ua770'), ('\ua771', '\ua778'), ('\ua77a', '\ua77a'), ('\ua77c', '\ua77c'),
-        ('\ua77f', '\ua77f'), ('\ua781', '\ua781'), ('\ua783', '\ua783'), ('\ua785', '\ua785'),
-        ('\ua787', '\ua787'), ('\ua78c', '\ua78c'), ('\ua78e', '\ua78e'), ('\ua791', '\ua791'),
-        ('\ua793', '\ua795'), ('\ua797', '\ua797'), ('\ua799', '\ua799'), ('\ua79b', '\ua79b'),
-        ('\ua79d', '\ua79d'), ('\ua79f', '\ua79f'), ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'),
-        ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'), ('\ua7a9', '\ua7a9'), ('\ua7f8', '\ua7f9'),
-        ('\ua7fa', '\ua7fa'), ('\uab30', '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64', '\uab65'),
-        ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), ('\uff41', '\uff5a'), ('\U00010428',
-        '\U0001044f'), ('\U000118c0', '\U000118df'), ('\U0001d41a', '\U0001d433'), ('\U0001d44e',
-        '\U0001d454'), ('\U0001d456', '\U0001d467'), ('\U0001d482', '\U0001d49b'), ('\U0001d4b6',
-        '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5',
-        '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), ('\U0001d51e', '\U0001d537'), ('\U0001d552',
-        '\U0001d56b'), ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), ('\U0001d5ee',
-        '\U0001d607'), ('\U0001d622', '\U0001d63b'), ('\U0001d656', '\U0001d66f'), ('\U0001d68a',
-        '\U0001d6a5'), ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), ('\U0001d6fc',
-        '\U0001d714'), ('\U0001d716', '\U0001d71b'), ('\U0001d736', '\U0001d74e'), ('\U0001d750',
-        '\U0001d755'), ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), ('\U0001d7aa',
-        '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), ('\U0001d7cb', '\U0001d7cb')
+        ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'), ('\u{ba}', '\u{ba}'),
+        ('\u{df}', '\u{f6}'), ('\u{f8}', '\u{ff}'), ('\u{101}', '\u{101}'), ('\u{103}', '\u{103}'),
+        ('\u{105}', '\u{105}'), ('\u{107}', '\u{107}'), ('\u{109}', '\u{109}'), ('\u{10b}',
+        '\u{10b}'), ('\u{10d}', '\u{10d}'), ('\u{10f}', '\u{10f}'), ('\u{111}', '\u{111}'),
+        ('\u{113}', '\u{113}'), ('\u{115}', '\u{115}'), ('\u{117}', '\u{117}'), ('\u{119}',
+        '\u{119}'), ('\u{11b}', '\u{11b}'), ('\u{11d}', '\u{11d}'), ('\u{11f}', '\u{11f}'),
+        ('\u{121}', '\u{121}'), ('\u{123}', '\u{123}'), ('\u{125}', '\u{125}'), ('\u{127}',
+        '\u{127}'), ('\u{129}', '\u{129}'), ('\u{12b}', '\u{12b}'), ('\u{12d}', '\u{12d}'),
+        ('\u{12f}', '\u{12f}'), ('\u{131}', '\u{131}'), ('\u{133}', '\u{133}'), ('\u{135}',
+        '\u{135}'), ('\u{137}', '\u{138}'), ('\u{13a}', '\u{13a}'), ('\u{13c}', '\u{13c}'),
+        ('\u{13e}', '\u{13e}'), ('\u{140}', '\u{140}'), ('\u{142}', '\u{142}'), ('\u{144}',
+        '\u{144}'), ('\u{146}', '\u{146}'), ('\u{148}', '\u{149}'), ('\u{14b}', '\u{14b}'),
+        ('\u{14d}', '\u{14d}'), ('\u{14f}', '\u{14f}'), ('\u{151}', '\u{151}'), ('\u{153}',
+        '\u{153}'), ('\u{155}', '\u{155}'), ('\u{157}', '\u{157}'), ('\u{159}', '\u{159}'),
+        ('\u{15b}', '\u{15b}'), ('\u{15d}', '\u{15d}'), ('\u{15f}', '\u{15f}'), ('\u{161}',
+        '\u{161}'), ('\u{163}', '\u{163}'), ('\u{165}', '\u{165}'), ('\u{167}', '\u{167}'),
+        ('\u{169}', '\u{169}'), ('\u{16b}', '\u{16b}'), ('\u{16d}', '\u{16d}'), ('\u{16f}',
+        '\u{16f}'), ('\u{171}', '\u{171}'), ('\u{173}', '\u{173}'), ('\u{175}', '\u{175}'),
+        ('\u{177}', '\u{177}'), ('\u{17a}', '\u{17a}'), ('\u{17c}', '\u{17c}'), ('\u{17e}',
+        '\u{180}'), ('\u{183}', '\u{183}'), ('\u{185}', '\u{185}'), ('\u{188}', '\u{188}'),
+        ('\u{18c}', '\u{18d}'), ('\u{192}', '\u{192}'), ('\u{195}', '\u{195}'), ('\u{199}',
+        '\u{19b}'), ('\u{19e}', '\u{19e}'), ('\u{1a1}', '\u{1a1}'), ('\u{1a3}', '\u{1a3}'),
+        ('\u{1a5}', '\u{1a5}'), ('\u{1a8}', '\u{1a8}'), ('\u{1aa}', '\u{1ab}'), ('\u{1ad}',
+        '\u{1ad}'), ('\u{1b0}', '\u{1b0}'), ('\u{1b4}', '\u{1b4}'), ('\u{1b6}', '\u{1b6}'),
+        ('\u{1b9}', '\u{1ba}'), ('\u{1bd}', '\u{1bf}'), ('\u{1c6}', '\u{1c6}'), ('\u{1c9}',
+        '\u{1c9}'), ('\u{1cc}', '\u{1cc}'), ('\u{1ce}', '\u{1ce}'), ('\u{1d0}', '\u{1d0}'),
+        ('\u{1d2}', '\u{1d2}'), ('\u{1d4}', '\u{1d4}'), ('\u{1d6}', '\u{1d6}'), ('\u{1d8}',
+        '\u{1d8}'), ('\u{1da}', '\u{1da}'), ('\u{1dc}', '\u{1dd}'), ('\u{1df}', '\u{1df}'),
+        ('\u{1e1}', '\u{1e1}'), ('\u{1e3}', '\u{1e3}'), ('\u{1e5}', '\u{1e5}'), ('\u{1e7}',
+        '\u{1e7}'), ('\u{1e9}', '\u{1e9}'), ('\u{1eb}', '\u{1eb}'), ('\u{1ed}', '\u{1ed}'),
+        ('\u{1ef}', '\u{1f0}'), ('\u{1f3}', '\u{1f3}'), ('\u{1f5}', '\u{1f5}'), ('\u{1f9}',
+        '\u{1f9}'), ('\u{1fb}', '\u{1fb}'), ('\u{1fd}', '\u{1fd}'), ('\u{1ff}', '\u{1ff}'),
+        ('\u{201}', '\u{201}'), ('\u{203}', '\u{203}'), ('\u{205}', '\u{205}'), ('\u{207}',
+        '\u{207}'), ('\u{209}', '\u{209}'), ('\u{20b}', '\u{20b}'), ('\u{20d}', '\u{20d}'),
+        ('\u{20f}', '\u{20f}'), ('\u{211}', '\u{211}'), ('\u{213}', '\u{213}'), ('\u{215}',
+        '\u{215}'), ('\u{217}', '\u{217}'), ('\u{219}', '\u{219}'), ('\u{21b}', '\u{21b}'),
+        ('\u{21d}', '\u{21d}'), ('\u{21f}', '\u{21f}'), ('\u{221}', '\u{221}'), ('\u{223}',
+        '\u{223}'), ('\u{225}', '\u{225}'), ('\u{227}', '\u{227}'), ('\u{229}', '\u{229}'),
+        ('\u{22b}', '\u{22b}'), ('\u{22d}', '\u{22d}'), ('\u{22f}', '\u{22f}'), ('\u{231}',
+        '\u{231}'), ('\u{233}', '\u{239}'), ('\u{23c}', '\u{23c}'), ('\u{23f}', '\u{240}'),
+        ('\u{242}', '\u{242}'), ('\u{247}', '\u{247}'), ('\u{249}', '\u{249}'), ('\u{24b}',
+        '\u{24b}'), ('\u{24d}', '\u{24d}'), ('\u{24f}', '\u{293}'), ('\u{295}', '\u{2af}'),
+        ('\u{2b0}', '\u{2b8}'), ('\u{2c0}', '\u{2c1}'), ('\u{2e0}', '\u{2e4}'), ('\u{345}',
+        '\u{345}'), ('\u{371}', '\u{371}'), ('\u{373}', '\u{373}'), ('\u{377}', '\u{377}'),
+        ('\u{37a}', '\u{37a}'), ('\u{37b}', '\u{37d}'), ('\u{390}', '\u{390}'), ('\u{3ac}',
+        '\u{3ce}'), ('\u{3d0}', '\u{3d1}'), ('\u{3d5}', '\u{3d7}'), ('\u{3d9}', '\u{3d9}'),
+        ('\u{3db}', '\u{3db}'), ('\u{3dd}', '\u{3dd}'), ('\u{3df}', '\u{3df}'), ('\u{3e1}',
+        '\u{3e1}'), ('\u{3e3}', '\u{3e3}'), ('\u{3e5}', '\u{3e5}'), ('\u{3e7}', '\u{3e7}'),
+        ('\u{3e9}', '\u{3e9}'), ('\u{3eb}', '\u{3eb}'), ('\u{3ed}', '\u{3ed}'), ('\u{3ef}',
+        '\u{3f3}'), ('\u{3f5}', '\u{3f5}'), ('\u{3f8}', '\u{3f8}'), ('\u{3fb}', '\u{3fc}'),
+        ('\u{430}', '\u{45f}'), ('\u{461}', '\u{461}'), ('\u{463}', '\u{463}'), ('\u{465}',
+        '\u{465}'), ('\u{467}', '\u{467}'), ('\u{469}', '\u{469}'), ('\u{46b}', '\u{46b}'),
+        ('\u{46d}', '\u{46d}'), ('\u{46f}', '\u{46f}'), ('\u{471}', '\u{471}'), ('\u{473}',
+        '\u{473}'), ('\u{475}', '\u{475}'), ('\u{477}', '\u{477}'), ('\u{479}', '\u{479}'),
+        ('\u{47b}', '\u{47b}'), ('\u{47d}', '\u{47d}'), ('\u{47f}', '\u{47f}'), ('\u{481}',
+        '\u{481}'), ('\u{48b}', '\u{48b}'), ('\u{48d}', '\u{48d}'), ('\u{48f}', '\u{48f}'),
+        ('\u{491}', '\u{491}'), ('\u{493}', '\u{493}'), ('\u{495}', '\u{495}'), ('\u{497}',
+        '\u{497}'), ('\u{499}', '\u{499}'), ('\u{49b}', '\u{49b}'), ('\u{49d}', '\u{49d}'),
+        ('\u{49f}', '\u{49f}'), ('\u{4a1}', '\u{4a1}'), ('\u{4a3}', '\u{4a3}'), ('\u{4a5}',
+        '\u{4a5}'), ('\u{4a7}', '\u{4a7}'), ('\u{4a9}', '\u{4a9}'), ('\u{4ab}', '\u{4ab}'),
+        ('\u{4ad}', '\u{4ad}'), ('\u{4af}', '\u{4af}'), ('\u{4b1}', '\u{4b1}'), ('\u{4b3}',
+        '\u{4b3}'), ('\u{4b5}', '\u{4b5}'), ('\u{4b7}', '\u{4b7}'), ('\u{4b9}', '\u{4b9}'),
+        ('\u{4bb}', '\u{4bb}'), ('\u{4bd}', '\u{4bd}'), ('\u{4bf}', '\u{4bf}'), ('\u{4c2}',
+        '\u{4c2}'), ('\u{4c4}', '\u{4c4}'), ('\u{4c6}', '\u{4c6}'), ('\u{4c8}', '\u{4c8}'),
+        ('\u{4ca}', '\u{4ca}'), ('\u{4cc}', '\u{4cc}'), ('\u{4ce}', '\u{4cf}'), ('\u{4d1}',
+        '\u{4d1}'), ('\u{4d3}', '\u{4d3}'), ('\u{4d5}', '\u{4d5}'), ('\u{4d7}', '\u{4d7}'),
+        ('\u{4d9}', '\u{4d9}'), ('\u{4db}', '\u{4db}'), ('\u{4dd}', '\u{4dd}'), ('\u{4df}',
+        '\u{4df}'), ('\u{4e1}', '\u{4e1}'), ('\u{4e3}', '\u{4e3}'), ('\u{4e5}', '\u{4e5}'),
+        ('\u{4e7}', '\u{4e7}'), ('\u{4e9}', '\u{4e9}'), ('\u{4eb}', '\u{4eb}'), ('\u{4ed}',
+        '\u{4ed}'), ('\u{4ef}', '\u{4ef}'), ('\u{4f1}', '\u{4f1}'), ('\u{4f3}', '\u{4f3}'),
+        ('\u{4f5}', '\u{4f5}'), ('\u{4f7}', '\u{4f7}'), ('\u{4f9}', '\u{4f9}'), ('\u{4fb}',
+        '\u{4fb}'), ('\u{4fd}', '\u{4fd}'), ('\u{4ff}', '\u{4ff}'), ('\u{501}', '\u{501}'),
+        ('\u{503}', '\u{503}'), ('\u{505}', '\u{505}'), ('\u{507}', '\u{507}'), ('\u{509}',
+        '\u{509}'), ('\u{50b}', '\u{50b}'), ('\u{50d}', '\u{50d}'), ('\u{50f}', '\u{50f}'),
+        ('\u{511}', '\u{511}'), ('\u{513}', '\u{513}'), ('\u{515}', '\u{515}'), ('\u{517}',
+        '\u{517}'), ('\u{519}', '\u{519}'), ('\u{51b}', '\u{51b}'), ('\u{51d}', '\u{51d}'),
+        ('\u{51f}', '\u{51f}'), ('\u{521}', '\u{521}'), ('\u{523}', '\u{523}'), ('\u{525}',
+        '\u{525}'), ('\u{527}', '\u{527}'), ('\u{529}', '\u{529}'), ('\u{52b}', '\u{52b}'),
+        ('\u{52d}', '\u{52d}'), ('\u{52f}', '\u{52f}'), ('\u{561}', '\u{587}'), ('\u{1d00}',
+        '\u{1d2b}'), ('\u{1d2c}', '\u{1d6a}'), ('\u{1d6b}', '\u{1d77}'), ('\u{1d78}', '\u{1d78}'),
+        ('\u{1d79}', '\u{1d9a}'), ('\u{1d9b}', '\u{1dbf}'), ('\u{1e01}', '\u{1e01}'), ('\u{1e03}',
+        '\u{1e03}'), ('\u{1e05}', '\u{1e05}'), ('\u{1e07}', '\u{1e07}'), ('\u{1e09}', '\u{1e09}'),
+        ('\u{1e0b}', '\u{1e0b}'), ('\u{1e0d}', '\u{1e0d}'), ('\u{1e0f}', '\u{1e0f}'), ('\u{1e11}',
+        '\u{1e11}'), ('\u{1e13}', '\u{1e13}'), ('\u{1e15}', '\u{1e15}'), ('\u{1e17}', '\u{1e17}'),
+        ('\u{1e19}', '\u{1e19}'), ('\u{1e1b}', '\u{1e1b}'), ('\u{1e1d}', '\u{1e1d}'), ('\u{1e1f}',
+        '\u{1e1f}'), ('\u{1e21}', '\u{1e21}'), ('\u{1e23}', '\u{1e23}'), ('\u{1e25}', '\u{1e25}'),
+        ('\u{1e27}', '\u{1e27}'), ('\u{1e29}', '\u{1e29}'), ('\u{1e2b}', '\u{1e2b}'), ('\u{1e2d}',
+        '\u{1e2d}'), ('\u{1e2f}', '\u{1e2f}'), ('\u{1e31}', '\u{1e31}'), ('\u{1e33}', '\u{1e33}'),
+        ('\u{1e35}', '\u{1e35}'), ('\u{1e37}', '\u{1e37}'), ('\u{1e39}', '\u{1e39}'), ('\u{1e3b}',
+        '\u{1e3b}'), ('\u{1e3d}', '\u{1e3d}'), ('\u{1e3f}', '\u{1e3f}'), ('\u{1e41}', '\u{1e41}'),
+        ('\u{1e43}', '\u{1e43}'), ('\u{1e45}', '\u{1e45}'), ('\u{1e47}', '\u{1e47}'), ('\u{1e49}',
+        '\u{1e49}'), ('\u{1e4b}', '\u{1e4b}'), ('\u{1e4d}', '\u{1e4d}'), ('\u{1e4f}', '\u{1e4f}'),
+        ('\u{1e51}', '\u{1e51}'), ('\u{1e53}', '\u{1e53}'), ('\u{1e55}', '\u{1e55}'), ('\u{1e57}',
+        '\u{1e57}'), ('\u{1e59}', '\u{1e59}'), ('\u{1e5b}', '\u{1e5b}'), ('\u{1e5d}', '\u{1e5d}'),
+        ('\u{1e5f}', '\u{1e5f}'), ('\u{1e61}', '\u{1e61}'), ('\u{1e63}', '\u{1e63}'), ('\u{1e65}',
+        '\u{1e65}'), ('\u{1e67}', '\u{1e67}'), ('\u{1e69}', '\u{1e69}'), ('\u{1e6b}', '\u{1e6b}'),
+        ('\u{1e6d}', '\u{1e6d}'), ('\u{1e6f}', '\u{1e6f}'), ('\u{1e71}', '\u{1e71}'), ('\u{1e73}',
+        '\u{1e73}'), ('\u{1e75}', '\u{1e75}'), ('\u{1e77}', '\u{1e77}'), ('\u{1e79}', '\u{1e79}'),
+        ('\u{1e7b}', '\u{1e7b}'), ('\u{1e7d}', '\u{1e7d}'), ('\u{1e7f}', '\u{1e7f}'), ('\u{1e81}',
+        '\u{1e81}'), ('\u{1e83}', '\u{1e83}'), ('\u{1e85}', '\u{1e85}'), ('\u{1e87}', '\u{1e87}'),
+        ('\u{1e89}', '\u{1e89}'), ('\u{1e8b}', '\u{1e8b}'), ('\u{1e8d}', '\u{1e8d}'), ('\u{1e8f}',
+        '\u{1e8f}'), ('\u{1e91}', '\u{1e91}'), ('\u{1e93}', '\u{1e93}'), ('\u{1e95}', '\u{1e9d}'),
+        ('\u{1e9f}', '\u{1e9f}'), ('\u{1ea1}', '\u{1ea1}'), ('\u{1ea3}', '\u{1ea3}'), ('\u{1ea5}',
+        '\u{1ea5}'), ('\u{1ea7}', '\u{1ea7}'), ('\u{1ea9}', '\u{1ea9}'), ('\u{1eab}', '\u{1eab}'),
+        ('\u{1ead}', '\u{1ead}'), ('\u{1eaf}', '\u{1eaf}'), ('\u{1eb1}', '\u{1eb1}'), ('\u{1eb3}',
+        '\u{1eb3}'), ('\u{1eb5}', '\u{1eb5}'), ('\u{1eb7}', '\u{1eb7}'), ('\u{1eb9}', '\u{1eb9}'),
+        ('\u{1ebb}', '\u{1ebb}'), ('\u{1ebd}', '\u{1ebd}'), ('\u{1ebf}', '\u{1ebf}'), ('\u{1ec1}',
+        '\u{1ec1}'), ('\u{1ec3}', '\u{1ec3}'), ('\u{1ec5}', '\u{1ec5}'), ('\u{1ec7}', '\u{1ec7}'),
+        ('\u{1ec9}', '\u{1ec9}'), ('\u{1ecb}', '\u{1ecb}'), ('\u{1ecd}', '\u{1ecd}'), ('\u{1ecf}',
+        '\u{1ecf}'), ('\u{1ed1}', '\u{1ed1}'), ('\u{1ed3}', '\u{1ed3}'), ('\u{1ed5}', '\u{1ed5}'),
+        ('\u{1ed7}', '\u{1ed7}'), ('\u{1ed9}', '\u{1ed9}'), ('\u{1edb}', '\u{1edb}'), ('\u{1edd}',
+        '\u{1edd}'), ('\u{1edf}', '\u{1edf}'), ('\u{1ee1}', '\u{1ee1}'), ('\u{1ee3}', '\u{1ee3}'),
+        ('\u{1ee5}', '\u{1ee5}'), ('\u{1ee7}', '\u{1ee7}'), ('\u{1ee9}', '\u{1ee9}'), ('\u{1eeb}',
+        '\u{1eeb}'), ('\u{1eed}', '\u{1eed}'), ('\u{1eef}', '\u{1eef}'), ('\u{1ef1}', '\u{1ef1}'),
+        ('\u{1ef3}', '\u{1ef3}'), ('\u{1ef5}', '\u{1ef5}'), ('\u{1ef7}', '\u{1ef7}'), ('\u{1ef9}',
+        '\u{1ef9}'), ('\u{1efb}', '\u{1efb}'), ('\u{1efd}', '\u{1efd}'), ('\u{1eff}', '\u{1f07}'),
+        ('\u{1f10}', '\u{1f15}'), ('\u{1f20}', '\u{1f27}'), ('\u{1f30}', '\u{1f37}'), ('\u{1f40}',
+        '\u{1f45}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f60}', '\u{1f67}'), ('\u{1f70}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1f87}'), ('\u{1f90}', '\u{1f97}'), ('\u{1fa0}', '\u{1fa7}'), ('\u{1fb0}',
+        '\u{1fb4}'), ('\u{1fb6}', '\u{1fb7}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fc7}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fd7}'), ('\u{1fe0}',
+        '\u{1fe7}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ff7}'), ('\u{2071}', '\u{2071}'),
+        ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{210a}', '\u{210a}'), ('\u{210e}',
+        '\u{210f}'), ('\u{2113}', '\u{2113}'), ('\u{212f}', '\u{212f}'), ('\u{2134}', '\u{2134}'),
+        ('\u{2139}', '\u{2139}'), ('\u{213c}', '\u{213d}'), ('\u{2146}', '\u{2149}'), ('\u{214e}',
+        '\u{214e}'), ('\u{2170}', '\u{217f}'), ('\u{2184}', '\u{2184}'), ('\u{24d0}', '\u{24e9}'),
+        ('\u{2c30}', '\u{2c5e}'), ('\u{2c61}', '\u{2c61}'), ('\u{2c65}', '\u{2c66}'), ('\u{2c68}',
+        '\u{2c68}'), ('\u{2c6a}', '\u{2c6a}'), ('\u{2c6c}', '\u{2c6c}'), ('\u{2c71}', '\u{2c71}'),
+        ('\u{2c73}', '\u{2c74}'), ('\u{2c76}', '\u{2c7b}'), ('\u{2c7c}', '\u{2c7d}'), ('\u{2c81}',
+        '\u{2c81}'), ('\u{2c83}', '\u{2c83}'), ('\u{2c85}', '\u{2c85}'), ('\u{2c87}', '\u{2c87}'),
+        ('\u{2c89}', '\u{2c89}'), ('\u{2c8b}', '\u{2c8b}'), ('\u{2c8d}', '\u{2c8d}'), ('\u{2c8f}',
+        '\u{2c8f}'), ('\u{2c91}', '\u{2c91}'), ('\u{2c93}', '\u{2c93}'), ('\u{2c95}', '\u{2c95}'),
+        ('\u{2c97}', '\u{2c97}'), ('\u{2c99}', '\u{2c99}'), ('\u{2c9b}', '\u{2c9b}'), ('\u{2c9d}',
+        '\u{2c9d}'), ('\u{2c9f}', '\u{2c9f}'), ('\u{2ca1}', '\u{2ca1}'), ('\u{2ca3}', '\u{2ca3}'),
+        ('\u{2ca5}', '\u{2ca5}'), ('\u{2ca7}', '\u{2ca7}'), ('\u{2ca9}', '\u{2ca9}'), ('\u{2cab}',
+        '\u{2cab}'), ('\u{2cad}', '\u{2cad}'), ('\u{2caf}', '\u{2caf}'), ('\u{2cb1}', '\u{2cb1}'),
+        ('\u{2cb3}', '\u{2cb3}'), ('\u{2cb5}', '\u{2cb5}'), ('\u{2cb7}', '\u{2cb7}'), ('\u{2cb9}',
+        '\u{2cb9}'), ('\u{2cbb}', '\u{2cbb}'), ('\u{2cbd}', '\u{2cbd}'), ('\u{2cbf}', '\u{2cbf}'),
+        ('\u{2cc1}', '\u{2cc1}'), ('\u{2cc3}', '\u{2cc3}'), ('\u{2cc5}', '\u{2cc5}'), ('\u{2cc7}',
+        '\u{2cc7}'), ('\u{2cc9}', '\u{2cc9}'), ('\u{2ccb}', '\u{2ccb}'), ('\u{2ccd}', '\u{2ccd}'),
+        ('\u{2ccf}', '\u{2ccf}'), ('\u{2cd1}', '\u{2cd1}'), ('\u{2cd3}', '\u{2cd3}'), ('\u{2cd5}',
+        '\u{2cd5}'), ('\u{2cd7}', '\u{2cd7}'), ('\u{2cd9}', '\u{2cd9}'), ('\u{2cdb}', '\u{2cdb}'),
+        ('\u{2cdd}', '\u{2cdd}'), ('\u{2cdf}', '\u{2cdf}'), ('\u{2ce1}', '\u{2ce1}'), ('\u{2ce3}',
+        '\u{2ce4}'), ('\u{2cec}', '\u{2cec}'), ('\u{2cee}', '\u{2cee}'), ('\u{2cf3}', '\u{2cf3}'),
+        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{a641}',
+        '\u{a641}'), ('\u{a643}', '\u{a643}'), ('\u{a645}', '\u{a645}'), ('\u{a647}', '\u{a647}'),
+        ('\u{a649}', '\u{a649}'), ('\u{a64b}', '\u{a64b}'), ('\u{a64d}', '\u{a64d}'), ('\u{a64f}',
+        '\u{a64f}'), ('\u{a651}', '\u{a651}'), ('\u{a653}', '\u{a653}'), ('\u{a655}', '\u{a655}'),
+        ('\u{a657}', '\u{a657}'), ('\u{a659}', '\u{a659}'), ('\u{a65b}', '\u{a65b}'), ('\u{a65d}',
+        '\u{a65d}'), ('\u{a65f}', '\u{a65f}'), ('\u{a661}', '\u{a661}'), ('\u{a663}', '\u{a663}'),
+        ('\u{a665}', '\u{a665}'), ('\u{a667}', '\u{a667}'), ('\u{a669}', '\u{a669}'), ('\u{a66b}',
+        '\u{a66b}'), ('\u{a66d}', '\u{a66d}'), ('\u{a681}', '\u{a681}'), ('\u{a683}', '\u{a683}'),
+        ('\u{a685}', '\u{a685}'), ('\u{a687}', '\u{a687}'), ('\u{a689}', '\u{a689}'), ('\u{a68b}',
+        '\u{a68b}'), ('\u{a68d}', '\u{a68d}'), ('\u{a68f}', '\u{a68f}'), ('\u{a691}', '\u{a691}'),
+        ('\u{a693}', '\u{a693}'), ('\u{a695}', '\u{a695}'), ('\u{a697}', '\u{a697}'), ('\u{a699}',
+        '\u{a699}'), ('\u{a69b}', '\u{a69b}'), ('\u{a69c}', '\u{a69d}'), ('\u{a723}', '\u{a723}'),
+        ('\u{a725}', '\u{a725}'), ('\u{a727}', '\u{a727}'), ('\u{a729}', '\u{a729}'), ('\u{a72b}',
+        '\u{a72b}'), ('\u{a72d}', '\u{a72d}'), ('\u{a72f}', '\u{a731}'), ('\u{a733}', '\u{a733}'),
+        ('\u{a735}', '\u{a735}'), ('\u{a737}', '\u{a737}'), ('\u{a739}', '\u{a739}'), ('\u{a73b}',
+        '\u{a73b}'), ('\u{a73d}', '\u{a73d}'), ('\u{a73f}', '\u{a73f}'), ('\u{a741}', '\u{a741}'),
+        ('\u{a743}', '\u{a743}'), ('\u{a745}', '\u{a745}'), ('\u{a747}', '\u{a747}'), ('\u{a749}',
+        '\u{a749}'), ('\u{a74b}', '\u{a74b}'), ('\u{a74d}', '\u{a74d}'), ('\u{a74f}', '\u{a74f}'),
+        ('\u{a751}', '\u{a751}'), ('\u{a753}', '\u{a753}'), ('\u{a755}', '\u{a755}'), ('\u{a757}',
+        '\u{a757}'), ('\u{a759}', '\u{a759}'), ('\u{a75b}', '\u{a75b}'), ('\u{a75d}', '\u{a75d}'),
+        ('\u{a75f}', '\u{a75f}'), ('\u{a761}', '\u{a761}'), ('\u{a763}', '\u{a763}'), ('\u{a765}',
+        '\u{a765}'), ('\u{a767}', '\u{a767}'), ('\u{a769}', '\u{a769}'), ('\u{a76b}', '\u{a76b}'),
+        ('\u{a76d}', '\u{a76d}'), ('\u{a76f}', '\u{a76f}'), ('\u{a770}', '\u{a770}'), ('\u{a771}',
+        '\u{a778}'), ('\u{a77a}', '\u{a77a}'), ('\u{a77c}', '\u{a77c}'), ('\u{a77f}', '\u{a77f}'),
+        ('\u{a781}', '\u{a781}'), ('\u{a783}', '\u{a783}'), ('\u{a785}', '\u{a785}'), ('\u{a787}',
+        '\u{a787}'), ('\u{a78c}', '\u{a78c}'), ('\u{a78e}', '\u{a78e}'), ('\u{a791}', '\u{a791}'),
+        ('\u{a793}', '\u{a795}'), ('\u{a797}', '\u{a797}'), ('\u{a799}', '\u{a799}'), ('\u{a79b}',
+        '\u{a79b}'), ('\u{a79d}', '\u{a79d}'), ('\u{a79f}', '\u{a79f}'), ('\u{a7a1}', '\u{a7a1}'),
+        ('\u{a7a3}', '\u{a7a3}'), ('\u{a7a5}', '\u{a7a5}'), ('\u{a7a7}', '\u{a7a7}'), ('\u{a7a9}',
+        '\u{a7a9}'), ('\u{a7f8}', '\u{a7f9}'), ('\u{a7fa}', '\u{a7fa}'), ('\u{ab30}', '\u{ab5a}'),
+        ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}', '\u{ab65}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}',
+        '\u{fb17}'), ('\u{ff41}', '\u{ff5a}'), ('\u{10428}', '\u{1044f}'), ('\u{118c0}',
+        '\u{118df}'), ('\u{1d41a}', '\u{1d433}'), ('\u{1d44e}', '\u{1d454}'), ('\u{1d456}',
+        '\u{1d467}'), ('\u{1d482}', '\u{1d49b}'), ('\u{1d4b6}', '\u{1d4b9}'), ('\u{1d4bb}',
+        '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d4cf}'), ('\u{1d4ea}',
+        '\u{1d503}'), ('\u{1d51e}', '\u{1d537}'), ('\u{1d552}', '\u{1d56b}'), ('\u{1d586}',
+        '\u{1d59f}'), ('\u{1d5ba}', '\u{1d5d3}'), ('\u{1d5ee}', '\u{1d607}'), ('\u{1d622}',
+        '\u{1d63b}'), ('\u{1d656}', '\u{1d66f}'), ('\u{1d68a}', '\u{1d6a5}'), ('\u{1d6c2}',
+        '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6e1}'), ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}',
+        '\u{1d71b}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d755}'), ('\u{1d770}',
+        '\u{1d788}'), ('\u{1d78a}', '\u{1d78f}'), ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}',
+        '\u{1d7c9}'), ('\u{1d7cb}', '\u{1d7cb}')
     ];
 
     pub fn Lowercase(c: char) -> bool {
@@ -2066,166 +2262,187 @@ pub fn Lowercase(c: char) -> bool {
     }
 
     pub static Uppercase_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\u00c0', '\u00d6'), ('\u00d8', '\u00de'), ('\u0100', '\u0100'),
-        ('\u0102', '\u0102'), ('\u0104', '\u0104'), ('\u0106', '\u0106'), ('\u0108', '\u0108'),
-        ('\u010a', '\u010a'), ('\u010c', '\u010c'), ('\u010e', '\u010e'), ('\u0110', '\u0110'),
-        ('\u0112', '\u0112'), ('\u0114', '\u0114'), ('\u0116', '\u0116'), ('\u0118', '\u0118'),
-        ('\u011a', '\u011a'), ('\u011c', '\u011c'), ('\u011e', '\u011e'), ('\u0120', '\u0120'),
-        ('\u0122', '\u0122'), ('\u0124', '\u0124'), ('\u0126', '\u0126'), ('\u0128', '\u0128'),
-        ('\u012a', '\u012a'), ('\u012c', '\u012c'), ('\u012e', '\u012e'), ('\u0130', '\u0130'),
-        ('\u0132', '\u0132'), ('\u0134', '\u0134'), ('\u0136', '\u0136'), ('\u0139', '\u0139'),
-        ('\u013b', '\u013b'), ('\u013d', '\u013d'), ('\u013f', '\u013f'), ('\u0141', '\u0141'),
-        ('\u0143', '\u0143'), ('\u0145', '\u0145'), ('\u0147', '\u0147'), ('\u014a', '\u014a'),
-        ('\u014c', '\u014c'), ('\u014e', '\u014e'), ('\u0150', '\u0150'), ('\u0152', '\u0152'),
-        ('\u0154', '\u0154'), ('\u0156', '\u0156'), ('\u0158', '\u0158'), ('\u015a', '\u015a'),
-        ('\u015c', '\u015c'), ('\u015e', '\u015e'), ('\u0160', '\u0160'), ('\u0162', '\u0162'),
-        ('\u0164', '\u0164'), ('\u0166', '\u0166'), ('\u0168', '\u0168'), ('\u016a', '\u016a'),
-        ('\u016c', '\u016c'), ('\u016e', '\u016e'), ('\u0170', '\u0170'), ('\u0172', '\u0172'),
-        ('\u0174', '\u0174'), ('\u0176', '\u0176'), ('\u0178', '\u0179'), ('\u017b', '\u017b'),
-        ('\u017d', '\u017d'), ('\u0181', '\u0182'), ('\u0184', '\u0184'), ('\u0186', '\u0187'),
-        ('\u0189', '\u018b'), ('\u018e', '\u0191'), ('\u0193', '\u0194'), ('\u0196', '\u0198'),
-        ('\u019c', '\u019d'), ('\u019f', '\u01a0'), ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'),
-        ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'),
-        ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'),
-        ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'),
-        ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'),
-        ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), ('\u01db', '\u01db'), ('\u01de', '\u01de'),
-        ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'),
-        ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'),
-        ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'),
-        ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), ('\u0200', '\u0200'), ('\u0202', '\u0202'),
-        ('\u0204', '\u0204'), ('\u0206', '\u0206'), ('\u0208', '\u0208'), ('\u020a', '\u020a'),
-        ('\u020c', '\u020c'), ('\u020e', '\u020e'), ('\u0210', '\u0210'), ('\u0212', '\u0212'),
-        ('\u0214', '\u0214'), ('\u0216', '\u0216'), ('\u0218', '\u0218'), ('\u021a', '\u021a'),
-        ('\u021c', '\u021c'), ('\u021e', '\u021e'), ('\u0220', '\u0220'), ('\u0222', '\u0222'),
-        ('\u0224', '\u0224'), ('\u0226', '\u0226'), ('\u0228', '\u0228'), ('\u022a', '\u022a'),
-        ('\u022c', '\u022c'), ('\u022e', '\u022e'), ('\u0230', '\u0230'), ('\u0232', '\u0232'),
-        ('\u023a', '\u023b'), ('\u023d', '\u023e'), ('\u0241', '\u0241'), ('\u0243', '\u0246'),
-        ('\u0248', '\u0248'), ('\u024a', '\u024a'), ('\u024c', '\u024c'), ('\u024e', '\u024e'),
-        ('\u0370', '\u0370'), ('\u0372', '\u0372'), ('\u0376', '\u0376'), ('\u037f', '\u037f'),
-        ('\u0386', '\u0386'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e', '\u038f'),
-        ('\u0391', '\u03a1'), ('\u03a3', '\u03ab'), ('\u03cf', '\u03cf'), ('\u03d2', '\u03d4'),
-        ('\u03d8', '\u03d8'), ('\u03da', '\u03da'), ('\u03dc', '\u03dc'), ('\u03de', '\u03de'),
-        ('\u03e0', '\u03e0'), ('\u03e2', '\u03e2'), ('\u03e4', '\u03e4'), ('\u03e6', '\u03e6'),
-        ('\u03e8', '\u03e8'), ('\u03ea', '\u03ea'), ('\u03ec', '\u03ec'), ('\u03ee', '\u03ee'),
-        ('\u03f4', '\u03f4'), ('\u03f7', '\u03f7'), ('\u03f9', '\u03fa'), ('\u03fd', '\u042f'),
-        ('\u0460', '\u0460'), ('\u0462', '\u0462'), ('\u0464', '\u0464'), ('\u0466', '\u0466'),
-        ('\u0468', '\u0468'), ('\u046a', '\u046a'), ('\u046c', '\u046c'), ('\u046e', '\u046e'),
-        ('\u0470', '\u0470'), ('\u0472', '\u0472'), ('\u0474', '\u0474'), ('\u0476', '\u0476'),
-        ('\u0478', '\u0478'), ('\u047a', '\u047a'), ('\u047c', '\u047c'), ('\u047e', '\u047e'),
-        ('\u0480', '\u0480'), ('\u048a', '\u048a'), ('\u048c', '\u048c'), ('\u048e', '\u048e'),
-        ('\u0490', '\u0490'), ('\u0492', '\u0492'), ('\u0494', '\u0494'), ('\u0496', '\u0496'),
-        ('\u0498', '\u0498'), ('\u049a', '\u049a'), ('\u049c', '\u049c'), ('\u049e', '\u049e'),
-        ('\u04a0', '\u04a0'), ('\u04a2', '\u04a2'), ('\u04a4', '\u04a4'), ('\u04a6', '\u04a6'),
-        ('\u04a8', '\u04a8'), ('\u04aa', '\u04aa'), ('\u04ac', '\u04ac'), ('\u04ae', '\u04ae'),
-        ('\u04b0', '\u04b0'), ('\u04b2', '\u04b2'), ('\u04b4', '\u04b4'), ('\u04b6', '\u04b6'),
-        ('\u04b8', '\u04b8'), ('\u04ba', '\u04ba'), ('\u04bc', '\u04bc'), ('\u04be', '\u04be'),
-        ('\u04c0', '\u04c1'), ('\u04c3', '\u04c3'), ('\u04c5', '\u04c5'), ('\u04c7', '\u04c7'),
-        ('\u04c9', '\u04c9'), ('\u04cb', '\u04cb'), ('\u04cd', '\u04cd'), ('\u04d0', '\u04d0'),
-        ('\u04d2', '\u04d2'), ('\u04d4', '\u04d4'), ('\u04d6', '\u04d6'), ('\u04d8', '\u04d8'),
-        ('\u04da', '\u04da'), ('\u04dc', '\u04dc'), ('\u04de', '\u04de'), ('\u04e0', '\u04e0'),
-        ('\u04e2', '\u04e2'), ('\u04e4', '\u04e4'), ('\u04e6', '\u04e6'), ('\u04e8', '\u04e8'),
-        ('\u04ea', '\u04ea'), ('\u04ec', '\u04ec'), ('\u04ee', '\u04ee'), ('\u04f0', '\u04f0'),
-        ('\u04f2', '\u04f2'), ('\u04f4', '\u04f4'), ('\u04f6', '\u04f6'), ('\u04f8', '\u04f8'),
-        ('\u04fa', '\u04fa'), ('\u04fc', '\u04fc'), ('\u04fe', '\u04fe'), ('\u0500', '\u0500'),
-        ('\u0502', '\u0502'), ('\u0504', '\u0504'), ('\u0506', '\u0506'), ('\u0508', '\u0508'),
-        ('\u050a', '\u050a'), ('\u050c', '\u050c'), ('\u050e', '\u050e'), ('\u0510', '\u0510'),
-        ('\u0512', '\u0512'), ('\u0514', '\u0514'), ('\u0516', '\u0516'), ('\u0518', '\u0518'),
-        ('\u051a', '\u051a'), ('\u051c', '\u051c'), ('\u051e', '\u051e'), ('\u0520', '\u0520'),
-        ('\u0522', '\u0522'), ('\u0524', '\u0524'), ('\u0526', '\u0526'), ('\u0528', '\u0528'),
-        ('\u052a', '\u052a'), ('\u052c', '\u052c'), ('\u052e', '\u052e'), ('\u0531', '\u0556'),
-        ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), ('\u1e00', '\u1e00'),
-        ('\u1e02', '\u1e02'), ('\u1e04', '\u1e04'), ('\u1e06', '\u1e06'), ('\u1e08', '\u1e08'),
-        ('\u1e0a', '\u1e0a'), ('\u1e0c', '\u1e0c'), ('\u1e0e', '\u1e0e'), ('\u1e10', '\u1e10'),
-        ('\u1e12', '\u1e12'), ('\u1e14', '\u1e14'), ('\u1e16', '\u1e16'), ('\u1e18', '\u1e18'),
-        ('\u1e1a', '\u1e1a'), ('\u1e1c', '\u1e1c'), ('\u1e1e', '\u1e1e'), ('\u1e20', '\u1e20'),
-        ('\u1e22', '\u1e22'), ('\u1e24', '\u1e24'), ('\u1e26', '\u1e26'), ('\u1e28', '\u1e28'),
-        ('\u1e2a', '\u1e2a'), ('\u1e2c', '\u1e2c'), ('\u1e2e', '\u1e2e'), ('\u1e30', '\u1e30'),
-        ('\u1e32', '\u1e32'), ('\u1e34', '\u1e34'), ('\u1e36', '\u1e36'), ('\u1e38', '\u1e38'),
-        ('\u1e3a', '\u1e3a'), ('\u1e3c', '\u1e3c'), ('\u1e3e', '\u1e3e'), ('\u1e40', '\u1e40'),
-        ('\u1e42', '\u1e42'), ('\u1e44', '\u1e44'), ('\u1e46', '\u1e46'), ('\u1e48', '\u1e48'),
-        ('\u1e4a', '\u1e4a'), ('\u1e4c', '\u1e4c'), ('\u1e4e', '\u1e4e'), ('\u1e50', '\u1e50'),
-        ('\u1e52', '\u1e52'), ('\u1e54', '\u1e54'), ('\u1e56', '\u1e56'), ('\u1e58', '\u1e58'),
-        ('\u1e5a', '\u1e5a'), ('\u1e5c', '\u1e5c'), ('\u1e5e', '\u1e5e'), ('\u1e60', '\u1e60'),
-        ('\u1e62', '\u1e62'), ('\u1e64', '\u1e64'), ('\u1e66', '\u1e66'), ('\u1e68', '\u1e68'),
-        ('\u1e6a', '\u1e6a'), ('\u1e6c', '\u1e6c'), ('\u1e6e', '\u1e6e'), ('\u1e70', '\u1e70'),
-        ('\u1e72', '\u1e72'), ('\u1e74', '\u1e74'), ('\u1e76', '\u1e76'), ('\u1e78', '\u1e78'),
-        ('\u1e7a', '\u1e7a'), ('\u1e7c', '\u1e7c'), ('\u1e7e', '\u1e7e'), ('\u1e80', '\u1e80'),
-        ('\u1e82', '\u1e82'), ('\u1e84', '\u1e84'), ('\u1e86', '\u1e86'), ('\u1e88', '\u1e88'),
-        ('\u1e8a', '\u1e8a'), ('\u1e8c', '\u1e8c'), ('\u1e8e', '\u1e8e'), ('\u1e90', '\u1e90'),
-        ('\u1e92', '\u1e92'), ('\u1e94', '\u1e94'), ('\u1e9e', '\u1e9e'), ('\u1ea0', '\u1ea0'),
-        ('\u1ea2', '\u1ea2'), ('\u1ea4', '\u1ea4'), ('\u1ea6', '\u1ea6'), ('\u1ea8', '\u1ea8'),
-        ('\u1eaa', '\u1eaa'), ('\u1eac', '\u1eac'), ('\u1eae', '\u1eae'), ('\u1eb0', '\u1eb0'),
-        ('\u1eb2', '\u1eb2'), ('\u1eb4', '\u1eb4'), ('\u1eb6', '\u1eb6'), ('\u1eb8', '\u1eb8'),
-        ('\u1eba', '\u1eba'), ('\u1ebc', '\u1ebc'), ('\u1ebe', '\u1ebe'), ('\u1ec0', '\u1ec0'),
-        ('\u1ec2', '\u1ec2'), ('\u1ec4', '\u1ec4'), ('\u1ec6', '\u1ec6'), ('\u1ec8', '\u1ec8'),
-        ('\u1eca', '\u1eca'), ('\u1ecc', '\u1ecc'), ('\u1ece', '\u1ece'), ('\u1ed0', '\u1ed0'),
-        ('\u1ed2', '\u1ed2'), ('\u1ed4', '\u1ed4'), ('\u1ed6', '\u1ed6'), ('\u1ed8', '\u1ed8'),
-        ('\u1eda', '\u1eda'), ('\u1edc', '\u1edc'), ('\u1ede', '\u1ede'), ('\u1ee0', '\u1ee0'),
-        ('\u1ee2', '\u1ee2'), ('\u1ee4', '\u1ee4'), ('\u1ee6', '\u1ee6'), ('\u1ee8', '\u1ee8'),
-        ('\u1eea', '\u1eea'), ('\u1eec', '\u1eec'), ('\u1eee', '\u1eee'), ('\u1ef0', '\u1ef0'),
-        ('\u1ef2', '\u1ef2'), ('\u1ef4', '\u1ef4'), ('\u1ef6', '\u1ef6'), ('\u1ef8', '\u1ef8'),
-        ('\u1efa', '\u1efa'), ('\u1efc', '\u1efc'), ('\u1efe', '\u1efe'), ('\u1f08', '\u1f0f'),
-        ('\u1f18', '\u1f1d'), ('\u1f28', '\u1f2f'), ('\u1f38', '\u1f3f'), ('\u1f48', '\u1f4d'),
-        ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f5f'),
-        ('\u1f68', '\u1f6f'), ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), ('\u1fd8', '\u1fdb'),
-        ('\u1fe8', '\u1fec'), ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), ('\u2107', '\u2107'),
-        ('\u210b', '\u210d'), ('\u2110', '\u2112'), ('\u2115', '\u2115'), ('\u2119', '\u211d'),
-        ('\u2124', '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a', '\u212d'),
-        ('\u2130', '\u2133'), ('\u213e', '\u213f'), ('\u2145', '\u2145'), ('\u2160', '\u216f'),
-        ('\u2183', '\u2183'), ('\u24b6', '\u24cf'), ('\u2c00', '\u2c2e'), ('\u2c60', '\u2c60'),
-        ('\u2c62', '\u2c64'), ('\u2c67', '\u2c67'), ('\u2c69', '\u2c69'), ('\u2c6b', '\u2c6b'),
-        ('\u2c6d', '\u2c70'), ('\u2c72', '\u2c72'), ('\u2c75', '\u2c75'), ('\u2c7e', '\u2c80'),
-        ('\u2c82', '\u2c82'), ('\u2c84', '\u2c84'), ('\u2c86', '\u2c86'), ('\u2c88', '\u2c88'),
-        ('\u2c8a', '\u2c8a'), ('\u2c8c', '\u2c8c'), ('\u2c8e', '\u2c8e'), ('\u2c90', '\u2c90'),
-        ('\u2c92', '\u2c92'), ('\u2c94', '\u2c94'), ('\u2c96', '\u2c96'), ('\u2c98', '\u2c98'),
-        ('\u2c9a', '\u2c9a'), ('\u2c9c', '\u2c9c'), ('\u2c9e', '\u2c9e'), ('\u2ca0', '\u2ca0'),
-        ('\u2ca2', '\u2ca2'), ('\u2ca4', '\u2ca4'), ('\u2ca6', '\u2ca6'), ('\u2ca8', '\u2ca8'),
-        ('\u2caa', '\u2caa'), ('\u2cac', '\u2cac'), ('\u2cae', '\u2cae'), ('\u2cb0', '\u2cb0'),
-        ('\u2cb2', '\u2cb2'), ('\u2cb4', '\u2cb4'), ('\u2cb6', '\u2cb6'), ('\u2cb8', '\u2cb8'),
-        ('\u2cba', '\u2cba'), ('\u2cbc', '\u2cbc'), ('\u2cbe', '\u2cbe'), ('\u2cc0', '\u2cc0'),
-        ('\u2cc2', '\u2cc2'), ('\u2cc4', '\u2cc4'), ('\u2cc6', '\u2cc6'), ('\u2cc8', '\u2cc8'),
-        ('\u2cca', '\u2cca'), ('\u2ccc', '\u2ccc'), ('\u2cce', '\u2cce'), ('\u2cd0', '\u2cd0'),
-        ('\u2cd2', '\u2cd2'), ('\u2cd4', '\u2cd4'), ('\u2cd6', '\u2cd6'), ('\u2cd8', '\u2cd8'),
-        ('\u2cda', '\u2cda'), ('\u2cdc', '\u2cdc'), ('\u2cde', '\u2cde'), ('\u2ce0', '\u2ce0'),
-        ('\u2ce2', '\u2ce2'), ('\u2ceb', '\u2ceb'), ('\u2ced', '\u2ced'), ('\u2cf2', '\u2cf2'),
-        ('\ua640', '\ua640'), ('\ua642', '\ua642'), ('\ua644', '\ua644'), ('\ua646', '\ua646'),
-        ('\ua648', '\ua648'), ('\ua64a', '\ua64a'), ('\ua64c', '\ua64c'), ('\ua64e', '\ua64e'),
-        ('\ua650', '\ua650'), ('\ua652', '\ua652'), ('\ua654', '\ua654'), ('\ua656', '\ua656'),
-        ('\ua658', '\ua658'), ('\ua65a', '\ua65a'), ('\ua65c', '\ua65c'), ('\ua65e', '\ua65e'),
-        ('\ua660', '\ua660'), ('\ua662', '\ua662'), ('\ua664', '\ua664'), ('\ua666', '\ua666'),
-        ('\ua668', '\ua668'), ('\ua66a', '\ua66a'), ('\ua66c', '\ua66c'), ('\ua680', '\ua680'),
-        ('\ua682', '\ua682'), ('\ua684', '\ua684'), ('\ua686', '\ua686'), ('\ua688', '\ua688'),
-        ('\ua68a', '\ua68a'), ('\ua68c', '\ua68c'), ('\ua68e', '\ua68e'), ('\ua690', '\ua690'),
-        ('\ua692', '\ua692'), ('\ua694', '\ua694'), ('\ua696', '\ua696'), ('\ua698', '\ua698'),
-        ('\ua69a', '\ua69a'), ('\ua722', '\ua722'), ('\ua724', '\ua724'), ('\ua726', '\ua726'),
-        ('\ua728', '\ua728'), ('\ua72a', '\ua72a'), ('\ua72c', '\ua72c'), ('\ua72e', '\ua72e'),
-        ('\ua732', '\ua732'), ('\ua734', '\ua734'), ('\ua736', '\ua736'), ('\ua738', '\ua738'),
-        ('\ua73a', '\ua73a'), ('\ua73c', '\ua73c'), ('\ua73e', '\ua73e'), ('\ua740', '\ua740'),
-        ('\ua742', '\ua742'), ('\ua744', '\ua744'), ('\ua746', '\ua746'), ('\ua748', '\ua748'),
-        ('\ua74a', '\ua74a'), ('\ua74c', '\ua74c'), ('\ua74e', '\ua74e'), ('\ua750', '\ua750'),
-        ('\ua752', '\ua752'), ('\ua754', '\ua754'), ('\ua756', '\ua756'), ('\ua758', '\ua758'),
-        ('\ua75a', '\ua75a'), ('\ua75c', '\ua75c'), ('\ua75e', '\ua75e'), ('\ua760', '\ua760'),
-        ('\ua762', '\ua762'), ('\ua764', '\ua764'), ('\ua766', '\ua766'), ('\ua768', '\ua768'),
-        ('\ua76a', '\ua76a'), ('\ua76c', '\ua76c'), ('\ua76e', '\ua76e'), ('\ua779', '\ua779'),
-        ('\ua77b', '\ua77b'), ('\ua77d', '\ua77e'), ('\ua780', '\ua780'), ('\ua782', '\ua782'),
-        ('\ua784', '\ua784'), ('\ua786', '\ua786'), ('\ua78b', '\ua78b'), ('\ua78d', '\ua78d'),
-        ('\ua790', '\ua790'), ('\ua792', '\ua792'), ('\ua796', '\ua796'), ('\ua798', '\ua798'),
-        ('\ua79a', '\ua79a'), ('\ua79c', '\ua79c'), ('\ua79e', '\ua79e'), ('\ua7a0', '\ua7a0'),
-        ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'), ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'),
-        ('\ua7aa', '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\uff21', '\uff3a'), ('\U00010400',
-        '\U00010427'), ('\U000118a0', '\U000118bf'), ('\U0001d400', '\U0001d419'), ('\U0001d434',
-        '\U0001d44d'), ('\U0001d468', '\U0001d481'), ('\U0001d49c', '\U0001d49c'), ('\U0001d49e',
-        '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9',
-        '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b5'), ('\U0001d4d0', '\U0001d4e9'), ('\U0001d504',
-        '\U0001d505'), ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), ('\U0001d516',
-        '\U0001d51c'), ('\U0001d538', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), ('\U0001d540',
-        '\U0001d544'), ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), ('\U0001d56c',
-        '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'), ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608',
-        '\U0001d621'), ('\U0001d63c', '\U0001d655'), ('\U0001d670', '\U0001d689'), ('\U0001d6a8',
-        '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'), ('\U0001d71c', '\U0001d734'), ('\U0001d756',
-        '\U0001d76e'), ('\U0001d790', '\U0001d7a8'), ('\U0001d7ca', '\U0001d7ca'), ('\U0001f130',
-        '\U0001f149'), ('\U0001f150', '\U0001f169'), ('\U0001f170', '\U0001f189')
+        ('\u{41}', '\u{5a}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{de}'), ('\u{100}', '\u{100}'),
+        ('\u{102}', '\u{102}'), ('\u{104}', '\u{104}'), ('\u{106}', '\u{106}'), ('\u{108}',
+        '\u{108}'), ('\u{10a}', '\u{10a}'), ('\u{10c}', '\u{10c}'), ('\u{10e}', '\u{10e}'),
+        ('\u{110}', '\u{110}'), ('\u{112}', '\u{112}'), ('\u{114}', '\u{114}'), ('\u{116}',
+        '\u{116}'), ('\u{118}', '\u{118}'), ('\u{11a}', '\u{11a}'), ('\u{11c}', '\u{11c}'),
+        ('\u{11e}', '\u{11e}'), ('\u{120}', '\u{120}'), ('\u{122}', '\u{122}'), ('\u{124}',
+        '\u{124}'), ('\u{126}', '\u{126}'), ('\u{128}', '\u{128}'), ('\u{12a}', '\u{12a}'),
+        ('\u{12c}', '\u{12c}'), ('\u{12e}', '\u{12e}'), ('\u{130}', '\u{130}'), ('\u{132}',
+        '\u{132}'), ('\u{134}', '\u{134}'), ('\u{136}', '\u{136}'), ('\u{139}', '\u{139}'),
+        ('\u{13b}', '\u{13b}'), ('\u{13d}', '\u{13d}'), ('\u{13f}', '\u{13f}'), ('\u{141}',
+        '\u{141}'), ('\u{143}', '\u{143}'), ('\u{145}', '\u{145}'), ('\u{147}', '\u{147}'),
+        ('\u{14a}', '\u{14a}'), ('\u{14c}', '\u{14c}'), ('\u{14e}', '\u{14e}'), ('\u{150}',
+        '\u{150}'), ('\u{152}', '\u{152}'), ('\u{154}', '\u{154}'), ('\u{156}', '\u{156}'),
+        ('\u{158}', '\u{158}'), ('\u{15a}', '\u{15a}'), ('\u{15c}', '\u{15c}'), ('\u{15e}',
+        '\u{15e}'), ('\u{160}', '\u{160}'), ('\u{162}', '\u{162}'), ('\u{164}', '\u{164}'),
+        ('\u{166}', '\u{166}'), ('\u{168}', '\u{168}'), ('\u{16a}', '\u{16a}'), ('\u{16c}',
+        '\u{16c}'), ('\u{16e}', '\u{16e}'), ('\u{170}', '\u{170}'), ('\u{172}', '\u{172}'),
+        ('\u{174}', '\u{174}'), ('\u{176}', '\u{176}'), ('\u{178}', '\u{179}'), ('\u{17b}',
+        '\u{17b}'), ('\u{17d}', '\u{17d}'), ('\u{181}', '\u{182}'), ('\u{184}', '\u{184}'),
+        ('\u{186}', '\u{187}'), ('\u{189}', '\u{18b}'), ('\u{18e}', '\u{191}'), ('\u{193}',
+        '\u{194}'), ('\u{196}', '\u{198}'), ('\u{19c}', '\u{19d}'), ('\u{19f}', '\u{1a0}'),
+        ('\u{1a2}', '\u{1a2}'), ('\u{1a4}', '\u{1a4}'), ('\u{1a6}', '\u{1a7}'), ('\u{1a9}',
+        '\u{1a9}'), ('\u{1ac}', '\u{1ac}'), ('\u{1ae}', '\u{1af}'), ('\u{1b1}', '\u{1b3}'),
+        ('\u{1b5}', '\u{1b5}'), ('\u{1b7}', '\u{1b8}'), ('\u{1bc}', '\u{1bc}'), ('\u{1c4}',
+        '\u{1c4}'), ('\u{1c7}', '\u{1c7}'), ('\u{1ca}', '\u{1ca}'), ('\u{1cd}', '\u{1cd}'),
+        ('\u{1cf}', '\u{1cf}'), ('\u{1d1}', '\u{1d1}'), ('\u{1d3}', '\u{1d3}'), ('\u{1d5}',
+        '\u{1d5}'), ('\u{1d7}', '\u{1d7}'), ('\u{1d9}', '\u{1d9}'), ('\u{1db}', '\u{1db}'),
+        ('\u{1de}', '\u{1de}'), ('\u{1e0}', '\u{1e0}'), ('\u{1e2}', '\u{1e2}'), ('\u{1e4}',
+        '\u{1e4}'), ('\u{1e6}', '\u{1e6}'), ('\u{1e8}', '\u{1e8}'), ('\u{1ea}', '\u{1ea}'),
+        ('\u{1ec}', '\u{1ec}'), ('\u{1ee}', '\u{1ee}'), ('\u{1f1}', '\u{1f1}'), ('\u{1f4}',
+        '\u{1f4}'), ('\u{1f6}', '\u{1f8}'), ('\u{1fa}', '\u{1fa}'), ('\u{1fc}', '\u{1fc}'),
+        ('\u{1fe}', '\u{1fe}'), ('\u{200}', '\u{200}'), ('\u{202}', '\u{202}'), ('\u{204}',
+        '\u{204}'), ('\u{206}', '\u{206}'), ('\u{208}', '\u{208}'), ('\u{20a}', '\u{20a}'),
+        ('\u{20c}', '\u{20c}'), ('\u{20e}', '\u{20e}'), ('\u{210}', '\u{210}'), ('\u{212}',
+        '\u{212}'), ('\u{214}', '\u{214}'), ('\u{216}', '\u{216}'), ('\u{218}', '\u{218}'),
+        ('\u{21a}', '\u{21a}'), ('\u{21c}', '\u{21c}'), ('\u{21e}', '\u{21e}'), ('\u{220}',
+        '\u{220}'), ('\u{222}', '\u{222}'), ('\u{224}', '\u{224}'), ('\u{226}', '\u{226}'),
+        ('\u{228}', '\u{228}'), ('\u{22a}', '\u{22a}'), ('\u{22c}', '\u{22c}'), ('\u{22e}',
+        '\u{22e}'), ('\u{230}', '\u{230}'), ('\u{232}', '\u{232}'), ('\u{23a}', '\u{23b}'),
+        ('\u{23d}', '\u{23e}'), ('\u{241}', '\u{241}'), ('\u{243}', '\u{246}'), ('\u{248}',
+        '\u{248}'), ('\u{24a}', '\u{24a}'), ('\u{24c}', '\u{24c}'), ('\u{24e}', '\u{24e}'),
+        ('\u{370}', '\u{370}'), ('\u{372}', '\u{372}'), ('\u{376}', '\u{376}'), ('\u{37f}',
+        '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'),
+        ('\u{38e}', '\u{38f}'), ('\u{391}', '\u{3a1}'), ('\u{3a3}', '\u{3ab}'), ('\u{3cf}',
+        '\u{3cf}'), ('\u{3d2}', '\u{3d4}'), ('\u{3d8}', '\u{3d8}'), ('\u{3da}', '\u{3da}'),
+        ('\u{3dc}', '\u{3dc}'), ('\u{3de}', '\u{3de}'), ('\u{3e0}', '\u{3e0}'), ('\u{3e2}',
+        '\u{3e2}'), ('\u{3e4}', '\u{3e4}'), ('\u{3e6}', '\u{3e6}'), ('\u{3e8}', '\u{3e8}'),
+        ('\u{3ea}', '\u{3ea}'), ('\u{3ec}', '\u{3ec}'), ('\u{3ee}', '\u{3ee}'), ('\u{3f4}',
+        '\u{3f4}'), ('\u{3f7}', '\u{3f7}'), ('\u{3f9}', '\u{3fa}'), ('\u{3fd}', '\u{42f}'),
+        ('\u{460}', '\u{460}'), ('\u{462}', '\u{462}'), ('\u{464}', '\u{464}'), ('\u{466}',
+        '\u{466}'), ('\u{468}', '\u{468}'), ('\u{46a}', '\u{46a}'), ('\u{46c}', '\u{46c}'),
+        ('\u{46e}', '\u{46e}'), ('\u{470}', '\u{470}'), ('\u{472}', '\u{472}'), ('\u{474}',
+        '\u{474}'), ('\u{476}', '\u{476}'), ('\u{478}', '\u{478}'), ('\u{47a}', '\u{47a}'),
+        ('\u{47c}', '\u{47c}'), ('\u{47e}', '\u{47e}'), ('\u{480}', '\u{480}'), ('\u{48a}',
+        '\u{48a}'), ('\u{48c}', '\u{48c}'), ('\u{48e}', '\u{48e}'), ('\u{490}', '\u{490}'),
+        ('\u{492}', '\u{492}'), ('\u{494}', '\u{494}'), ('\u{496}', '\u{496}'), ('\u{498}',
+        '\u{498}'), ('\u{49a}', '\u{49a}'), ('\u{49c}', '\u{49c}'), ('\u{49e}', '\u{49e}'),
+        ('\u{4a0}', '\u{4a0}'), ('\u{4a2}', '\u{4a2}'), ('\u{4a4}', '\u{4a4}'), ('\u{4a6}',
+        '\u{4a6}'), ('\u{4a8}', '\u{4a8}'), ('\u{4aa}', '\u{4aa}'), ('\u{4ac}', '\u{4ac}'),
+        ('\u{4ae}', '\u{4ae}'), ('\u{4b0}', '\u{4b0}'), ('\u{4b2}', '\u{4b2}'), ('\u{4b4}',
+        '\u{4b4}'), ('\u{4b6}', '\u{4b6}'), ('\u{4b8}', '\u{4b8}'), ('\u{4ba}', '\u{4ba}'),
+        ('\u{4bc}', '\u{4bc}'), ('\u{4be}', '\u{4be}'), ('\u{4c0}', '\u{4c1}'), ('\u{4c3}',
+        '\u{4c3}'), ('\u{4c5}', '\u{4c5}'), ('\u{4c7}', '\u{4c7}'), ('\u{4c9}', '\u{4c9}'),
+        ('\u{4cb}', '\u{4cb}'), ('\u{4cd}', '\u{4cd}'), ('\u{4d0}', '\u{4d0}'), ('\u{4d2}',
+        '\u{4d2}'), ('\u{4d4}', '\u{4d4}'), ('\u{4d6}', '\u{4d6}'), ('\u{4d8}', '\u{4d8}'),
+        ('\u{4da}', '\u{4da}'), ('\u{4dc}', '\u{4dc}'), ('\u{4de}', '\u{4de}'), ('\u{4e0}',
+        '\u{4e0}'), ('\u{4e2}', '\u{4e2}'), ('\u{4e4}', '\u{4e4}'), ('\u{4e6}', '\u{4e6}'),
+        ('\u{4e8}', '\u{4e8}'), ('\u{4ea}', '\u{4ea}'), ('\u{4ec}', '\u{4ec}'), ('\u{4ee}',
+        '\u{4ee}'), ('\u{4f0}', '\u{4f0}'), ('\u{4f2}', '\u{4f2}'), ('\u{4f4}', '\u{4f4}'),
+        ('\u{4f6}', '\u{4f6}'), ('\u{4f8}', '\u{4f8}'), ('\u{4fa}', '\u{4fa}'), ('\u{4fc}',
+        '\u{4fc}'), ('\u{4fe}', '\u{4fe}'), ('\u{500}', '\u{500}'), ('\u{502}', '\u{502}'),
+        ('\u{504}', '\u{504}'), ('\u{506}', '\u{506}'), ('\u{508}', '\u{508}'), ('\u{50a}',
+        '\u{50a}'), ('\u{50c}', '\u{50c}'), ('\u{50e}', '\u{50e}'), ('\u{510}', '\u{510}'),
+        ('\u{512}', '\u{512}'), ('\u{514}', '\u{514}'), ('\u{516}', '\u{516}'), ('\u{518}',
+        '\u{518}'), ('\u{51a}', '\u{51a}'), ('\u{51c}', '\u{51c}'), ('\u{51e}', '\u{51e}'),
+        ('\u{520}', '\u{520}'), ('\u{522}', '\u{522}'), ('\u{524}', '\u{524}'), ('\u{526}',
+        '\u{526}'), ('\u{528}', '\u{528}'), ('\u{52a}', '\u{52a}'), ('\u{52c}', '\u{52c}'),
+        ('\u{52e}', '\u{52e}'), ('\u{531}', '\u{556}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
+        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{1e00}', '\u{1e00}'), ('\u{1e02}', '\u{1e02}'),
+        ('\u{1e04}', '\u{1e04}'), ('\u{1e06}', '\u{1e06}'), ('\u{1e08}', '\u{1e08}'), ('\u{1e0a}',
+        '\u{1e0a}'), ('\u{1e0c}', '\u{1e0c}'), ('\u{1e0e}', '\u{1e0e}'), ('\u{1e10}', '\u{1e10}'),
+        ('\u{1e12}', '\u{1e12}'), ('\u{1e14}', '\u{1e14}'), ('\u{1e16}', '\u{1e16}'), ('\u{1e18}',
+        '\u{1e18}'), ('\u{1e1a}', '\u{1e1a}'), ('\u{1e1c}', '\u{1e1c}'), ('\u{1e1e}', '\u{1e1e}'),
+        ('\u{1e20}', '\u{1e20}'), ('\u{1e22}', '\u{1e22}'), ('\u{1e24}', '\u{1e24}'), ('\u{1e26}',
+        '\u{1e26}'), ('\u{1e28}', '\u{1e28}'), ('\u{1e2a}', '\u{1e2a}'), ('\u{1e2c}', '\u{1e2c}'),
+        ('\u{1e2e}', '\u{1e2e}'), ('\u{1e30}', '\u{1e30}'), ('\u{1e32}', '\u{1e32}'), ('\u{1e34}',
+        '\u{1e34}'), ('\u{1e36}', '\u{1e36}'), ('\u{1e38}', '\u{1e38}'), ('\u{1e3a}', '\u{1e3a}'),
+        ('\u{1e3c}', '\u{1e3c}'), ('\u{1e3e}', '\u{1e3e}'), ('\u{1e40}', '\u{1e40}'), ('\u{1e42}',
+        '\u{1e42}'), ('\u{1e44}', '\u{1e44}'), ('\u{1e46}', '\u{1e46}'), ('\u{1e48}', '\u{1e48}'),
+        ('\u{1e4a}', '\u{1e4a}'), ('\u{1e4c}', '\u{1e4c}'), ('\u{1e4e}', '\u{1e4e}'), ('\u{1e50}',
+        '\u{1e50}'), ('\u{1e52}', '\u{1e52}'), ('\u{1e54}', '\u{1e54}'), ('\u{1e56}', '\u{1e56}'),
+        ('\u{1e58}', '\u{1e58}'), ('\u{1e5a}', '\u{1e5a}'), ('\u{1e5c}', '\u{1e5c}'), ('\u{1e5e}',
+        '\u{1e5e}'), ('\u{1e60}', '\u{1e60}'), ('\u{1e62}', '\u{1e62}'), ('\u{1e64}', '\u{1e64}'),
+        ('\u{1e66}', '\u{1e66}'), ('\u{1e68}', '\u{1e68}'), ('\u{1e6a}', '\u{1e6a}'), ('\u{1e6c}',
+        '\u{1e6c}'), ('\u{1e6e}', '\u{1e6e}'), ('\u{1e70}', '\u{1e70}'), ('\u{1e72}', '\u{1e72}'),
+        ('\u{1e74}', '\u{1e74}'), ('\u{1e76}', '\u{1e76}'), ('\u{1e78}', '\u{1e78}'), ('\u{1e7a}',
+        '\u{1e7a}'), ('\u{1e7c}', '\u{1e7c}'), ('\u{1e7e}', '\u{1e7e}'), ('\u{1e80}', '\u{1e80}'),
+        ('\u{1e82}', '\u{1e82}'), ('\u{1e84}', '\u{1e84}'), ('\u{1e86}', '\u{1e86}'), ('\u{1e88}',
+        '\u{1e88}'), ('\u{1e8a}', '\u{1e8a}'), ('\u{1e8c}', '\u{1e8c}'), ('\u{1e8e}', '\u{1e8e}'),
+        ('\u{1e90}', '\u{1e90}'), ('\u{1e92}', '\u{1e92}'), ('\u{1e94}', '\u{1e94}'), ('\u{1e9e}',
+        '\u{1e9e}'), ('\u{1ea0}', '\u{1ea0}'), ('\u{1ea2}', '\u{1ea2}'), ('\u{1ea4}', '\u{1ea4}'),
+        ('\u{1ea6}', '\u{1ea6}'), ('\u{1ea8}', '\u{1ea8}'), ('\u{1eaa}', '\u{1eaa}'), ('\u{1eac}',
+        '\u{1eac}'), ('\u{1eae}', '\u{1eae}'), ('\u{1eb0}', '\u{1eb0}'), ('\u{1eb2}', '\u{1eb2}'),
+        ('\u{1eb4}', '\u{1eb4}'), ('\u{1eb6}', '\u{1eb6}'), ('\u{1eb8}', '\u{1eb8}'), ('\u{1eba}',
+        '\u{1eba}'), ('\u{1ebc}', '\u{1ebc}'), ('\u{1ebe}', '\u{1ebe}'), ('\u{1ec0}', '\u{1ec0}'),
+        ('\u{1ec2}', '\u{1ec2}'), ('\u{1ec4}', '\u{1ec4}'), ('\u{1ec6}', '\u{1ec6}'), ('\u{1ec8}',
+        '\u{1ec8}'), ('\u{1eca}', '\u{1eca}'), ('\u{1ecc}', '\u{1ecc}'), ('\u{1ece}', '\u{1ece}'),
+        ('\u{1ed0}', '\u{1ed0}'), ('\u{1ed2}', '\u{1ed2}'), ('\u{1ed4}', '\u{1ed4}'), ('\u{1ed6}',
+        '\u{1ed6}'), ('\u{1ed8}', '\u{1ed8}'), ('\u{1eda}', '\u{1eda}'), ('\u{1edc}', '\u{1edc}'),
+        ('\u{1ede}', '\u{1ede}'), ('\u{1ee0}', '\u{1ee0}'), ('\u{1ee2}', '\u{1ee2}'), ('\u{1ee4}',
+        '\u{1ee4}'), ('\u{1ee6}', '\u{1ee6}'), ('\u{1ee8}', '\u{1ee8}'), ('\u{1eea}', '\u{1eea}'),
+        ('\u{1eec}', '\u{1eec}'), ('\u{1eee}', '\u{1eee}'), ('\u{1ef0}', '\u{1ef0}'), ('\u{1ef2}',
+        '\u{1ef2}'), ('\u{1ef4}', '\u{1ef4}'), ('\u{1ef6}', '\u{1ef6}'), ('\u{1ef8}', '\u{1ef8}'),
+        ('\u{1efa}', '\u{1efa}'), ('\u{1efc}', '\u{1efc}'), ('\u{1efe}', '\u{1efe}'), ('\u{1f08}',
+        '\u{1f0f}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f28}', '\u{1f2f}'), ('\u{1f38}', '\u{1f3f}'),
+        ('\u{1f48}', '\u{1f4d}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}',
+        '\u{1f5d}'), ('\u{1f5f}', '\u{1f5f}'), ('\u{1f68}', '\u{1f6f}'), ('\u{1fb8}', '\u{1fbb}'),
+        ('\u{1fc8}', '\u{1fcb}'), ('\u{1fd8}', '\u{1fdb}'), ('\u{1fe8}', '\u{1fec}'), ('\u{1ff8}',
+        '\u{1ffb}'), ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210b}', '\u{210d}'),
+        ('\u{2110}', '\u{2112}'), ('\u{2115}', '\u{2115}'), ('\u{2119}', '\u{211d}'), ('\u{2124}',
+        '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'),
+        ('\u{2130}', '\u{2133}'), ('\u{213e}', '\u{213f}'), ('\u{2145}', '\u{2145}'), ('\u{2160}',
+        '\u{216f}'), ('\u{2183}', '\u{2183}'), ('\u{24b6}', '\u{24cf}'), ('\u{2c00}', '\u{2c2e}'),
+        ('\u{2c60}', '\u{2c60}'), ('\u{2c62}', '\u{2c64}'), ('\u{2c67}', '\u{2c67}'), ('\u{2c69}',
+        '\u{2c69}'), ('\u{2c6b}', '\u{2c6b}'), ('\u{2c6d}', '\u{2c70}'), ('\u{2c72}', '\u{2c72}'),
+        ('\u{2c75}', '\u{2c75}'), ('\u{2c7e}', '\u{2c80}'), ('\u{2c82}', '\u{2c82}'), ('\u{2c84}',
+        '\u{2c84}'), ('\u{2c86}', '\u{2c86}'), ('\u{2c88}', '\u{2c88}'), ('\u{2c8a}', '\u{2c8a}'),
+        ('\u{2c8c}', '\u{2c8c}'), ('\u{2c8e}', '\u{2c8e}'), ('\u{2c90}', '\u{2c90}'), ('\u{2c92}',
+        '\u{2c92}'), ('\u{2c94}', '\u{2c94}'), ('\u{2c96}', '\u{2c96}'), ('\u{2c98}', '\u{2c98}'),
+        ('\u{2c9a}', '\u{2c9a}'), ('\u{2c9c}', '\u{2c9c}'), ('\u{2c9e}', '\u{2c9e}'), ('\u{2ca0}',
+        '\u{2ca0}'), ('\u{2ca2}', '\u{2ca2}'), ('\u{2ca4}', '\u{2ca4}'), ('\u{2ca6}', '\u{2ca6}'),
+        ('\u{2ca8}', '\u{2ca8}'), ('\u{2caa}', '\u{2caa}'), ('\u{2cac}', '\u{2cac}'), ('\u{2cae}',
+        '\u{2cae}'), ('\u{2cb0}', '\u{2cb0}'), ('\u{2cb2}', '\u{2cb2}'), ('\u{2cb4}', '\u{2cb4}'),
+        ('\u{2cb6}', '\u{2cb6}'), ('\u{2cb8}', '\u{2cb8}'), ('\u{2cba}', '\u{2cba}'), ('\u{2cbc}',
+        '\u{2cbc}'), ('\u{2cbe}', '\u{2cbe}'), ('\u{2cc0}', '\u{2cc0}'), ('\u{2cc2}', '\u{2cc2}'),
+        ('\u{2cc4}', '\u{2cc4}'), ('\u{2cc6}', '\u{2cc6}'), ('\u{2cc8}', '\u{2cc8}'), ('\u{2cca}',
+        '\u{2cca}'), ('\u{2ccc}', '\u{2ccc}'), ('\u{2cce}', '\u{2cce}'), ('\u{2cd0}', '\u{2cd0}'),
+        ('\u{2cd2}', '\u{2cd2}'), ('\u{2cd4}', '\u{2cd4}'), ('\u{2cd6}', '\u{2cd6}'), ('\u{2cd8}',
+        '\u{2cd8}'), ('\u{2cda}', '\u{2cda}'), ('\u{2cdc}', '\u{2cdc}'), ('\u{2cde}', '\u{2cde}'),
+        ('\u{2ce0}', '\u{2ce0}'), ('\u{2ce2}', '\u{2ce2}'), ('\u{2ceb}', '\u{2ceb}'), ('\u{2ced}',
+        '\u{2ced}'), ('\u{2cf2}', '\u{2cf2}'), ('\u{a640}', '\u{a640}'), ('\u{a642}', '\u{a642}'),
+        ('\u{a644}', '\u{a644}'), ('\u{a646}', '\u{a646}'), ('\u{a648}', '\u{a648}'), ('\u{a64a}',
+        '\u{a64a}'), ('\u{a64c}', '\u{a64c}'), ('\u{a64e}', '\u{a64e}'), ('\u{a650}', '\u{a650}'),
+        ('\u{a652}', '\u{a652}'), ('\u{a654}', '\u{a654}'), ('\u{a656}', '\u{a656}'), ('\u{a658}',
+        '\u{a658}'), ('\u{a65a}', '\u{a65a}'), ('\u{a65c}', '\u{a65c}'), ('\u{a65e}', '\u{a65e}'),
+        ('\u{a660}', '\u{a660}'), ('\u{a662}', '\u{a662}'), ('\u{a664}', '\u{a664}'), ('\u{a666}',
+        '\u{a666}'), ('\u{a668}', '\u{a668}'), ('\u{a66a}', '\u{a66a}'), ('\u{a66c}', '\u{a66c}'),
+        ('\u{a680}', '\u{a680}'), ('\u{a682}', '\u{a682}'), ('\u{a684}', '\u{a684}'), ('\u{a686}',
+        '\u{a686}'), ('\u{a688}', '\u{a688}'), ('\u{a68a}', '\u{a68a}'), ('\u{a68c}', '\u{a68c}'),
+        ('\u{a68e}', '\u{a68e}'), ('\u{a690}', '\u{a690}'), ('\u{a692}', '\u{a692}'), ('\u{a694}',
+        '\u{a694}'), ('\u{a696}', '\u{a696}'), ('\u{a698}', '\u{a698}'), ('\u{a69a}', '\u{a69a}'),
+        ('\u{a722}', '\u{a722}'), ('\u{a724}', '\u{a724}'), ('\u{a726}', '\u{a726}'), ('\u{a728}',
+        '\u{a728}'), ('\u{a72a}', '\u{a72a}'), ('\u{a72c}', '\u{a72c}'), ('\u{a72e}', '\u{a72e}'),
+        ('\u{a732}', '\u{a732}'), ('\u{a734}', '\u{a734}'), ('\u{a736}', '\u{a736}'), ('\u{a738}',
+        '\u{a738}'), ('\u{a73a}', '\u{a73a}'), ('\u{a73c}', '\u{a73c}'), ('\u{a73e}', '\u{a73e}'),
+        ('\u{a740}', '\u{a740}'), ('\u{a742}', '\u{a742}'), ('\u{a744}', '\u{a744}'), ('\u{a746}',
+        '\u{a746}'), ('\u{a748}', '\u{a748}'), ('\u{a74a}', '\u{a74a}'), ('\u{a74c}', '\u{a74c}'),
+        ('\u{a74e}', '\u{a74e}'), ('\u{a750}', '\u{a750}'), ('\u{a752}', '\u{a752}'), ('\u{a754}',
+        '\u{a754}'), ('\u{a756}', '\u{a756}'), ('\u{a758}', '\u{a758}'), ('\u{a75a}', '\u{a75a}'),
+        ('\u{a75c}', '\u{a75c}'), ('\u{a75e}', '\u{a75e}'), ('\u{a760}', '\u{a760}'), ('\u{a762}',
+        '\u{a762}'), ('\u{a764}', '\u{a764}'), ('\u{a766}', '\u{a766}'), ('\u{a768}', '\u{a768}'),
+        ('\u{a76a}', '\u{a76a}'), ('\u{a76c}', '\u{a76c}'), ('\u{a76e}', '\u{a76e}'), ('\u{a779}',
+        '\u{a779}'), ('\u{a77b}', '\u{a77b}'), ('\u{a77d}', '\u{a77e}'), ('\u{a780}', '\u{a780}'),
+        ('\u{a782}', '\u{a782}'), ('\u{a784}', '\u{a784}'), ('\u{a786}', '\u{a786}'), ('\u{a78b}',
+        '\u{a78b}'), ('\u{a78d}', '\u{a78d}'), ('\u{a790}', '\u{a790}'), ('\u{a792}', '\u{a792}'),
+        ('\u{a796}', '\u{a796}'), ('\u{a798}', '\u{a798}'), ('\u{a79a}', '\u{a79a}'), ('\u{a79c}',
+        '\u{a79c}'), ('\u{a79e}', '\u{a79e}'), ('\u{a7a0}', '\u{a7a0}'), ('\u{a7a2}', '\u{a7a2}'),
+        ('\u{a7a4}', '\u{a7a4}'), ('\u{a7a6}', '\u{a7a6}'), ('\u{a7a8}', '\u{a7a8}'), ('\u{a7aa}',
+        '\u{a7ad}'), ('\u{a7b0}', '\u{a7b1}'), ('\u{ff21}', '\u{ff3a}'), ('\u{10400}', '\u{10427}'),
+        ('\u{118a0}', '\u{118bf}'), ('\u{1d400}', '\u{1d419}'), ('\u{1d434}', '\u{1d44d}'),
+        ('\u{1d468}', '\u{1d481}'), ('\u{1d49c}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'),
+        ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'),
+        ('\u{1d4ae}', '\u{1d4b5}'), ('\u{1d4d0}', '\u{1d4e9}'), ('\u{1d504}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d538}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d56c}', '\u{1d585}'),
+        ('\u{1d5a0}', '\u{1d5b9}'), ('\u{1d5d4}', '\u{1d5ed}'), ('\u{1d608}', '\u{1d621}'),
+        ('\u{1d63c}', '\u{1d655}'), ('\u{1d670}', '\u{1d689}'), ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6e2}', '\u{1d6fa}'), ('\u{1d71c}', '\u{1d734}'), ('\u{1d756}', '\u{1d76e}'),
+        ('\u{1d790}', '\u{1d7a8}'), ('\u{1d7ca}', '\u{1d7ca}'), ('\u{1f130}', '\u{1f149}'),
+        ('\u{1f150}', '\u{1f169}'), ('\u{1f170}', '\u{1f189}')
     ];
 
     pub fn Uppercase(c: char) -> bool {
@@ -2233,296 +2450,325 @@ pub fn Uppercase(c: char) -> bool {
     }
 
     pub static XID_Continue_table: &'static [(char, char)] = &[
-        ('\x30', '\x39'), ('\x41', '\x5a'), ('\x5f', '\x5f'), ('\x61', '\x7a'), ('\u00aa',
-        '\u00aa'), ('\u00b5', '\u00b5'), ('\u00b7', '\u00b7'), ('\u00ba', '\u00ba'), ('\u00c0',
-        '\u00d6'), ('\u00d8', '\u00f6'), ('\u00f8', '\u01ba'), ('\u01bb', '\u01bb'), ('\u01bc',
-        '\u01bf'), ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), ('\u0294', '\u0294'), ('\u0295',
-        '\u02af'), ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), ('\u02ec',
-        '\u02ec'), ('\u02ee', '\u02ee'), ('\u0300', '\u036f'), ('\u0370', '\u0373'), ('\u0374',
-        '\u0374'), ('\u0376', '\u0377'), ('\u037b', '\u037d'), ('\u037f', '\u037f'), ('\u0386',
-        '\u0386'), ('\u0387', '\u0387'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e',
-        '\u03a1'), ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), ('\u0483', '\u0487'), ('\u048a',
-        '\u052f'), ('\u0531', '\u0556'), ('\u0559', '\u0559'), ('\u0561', '\u0587'), ('\u0591',
-        '\u05bd'), ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), ('\u05c7',
-        '\u05c7'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0610', '\u061a'), ('\u0620',
-        '\u063f'), ('\u0640', '\u0640'), ('\u0641', '\u064a'), ('\u064b', '\u065f'), ('\u0660',
-        '\u0669'), ('\u066e', '\u066f'), ('\u0670', '\u0670'), ('\u0671', '\u06d3'), ('\u06d5',
-        '\u06d5'), ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), ('\u06e5', '\u06e6'), ('\u06e7',
-        '\u06e8'), ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'), ('\u06f0', '\u06f9'), ('\u06fa',
-        '\u06fc'), ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), ('\u0711', '\u0711'), ('\u0712',
-        '\u072f'), ('\u0730', '\u074a'), ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), ('\u07b1',
-        '\u07b1'), ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), ('\u07eb', '\u07f3'), ('\u07f4',
-        '\u07f5'), ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), ('\u0816', '\u0819'), ('\u081a',
-        '\u081a'), ('\u081b', '\u0823'), ('\u0824', '\u0824'), ('\u0825', '\u0827'), ('\u0828',
-        '\u0828'), ('\u0829', '\u082d'), ('\u0840', '\u0858'), ('\u0859', '\u085b'), ('\u08a0',
-        '\u08b2'), ('\u08e4', '\u0902'), ('\u0903', '\u0903'), ('\u0904', '\u0939'), ('\u093a',
-        '\u093a'), ('\u093b', '\u093b'), ('\u093c', '\u093c'), ('\u093d', '\u093d'), ('\u093e',
-        '\u0940'), ('\u0941', '\u0948'), ('\u0949', '\u094c'), ('\u094d', '\u094d'), ('\u094e',
-        '\u094f'), ('\u0950', '\u0950'), ('\u0951', '\u0957'), ('\u0958', '\u0961'), ('\u0962',
-        '\u0963'), ('\u0966', '\u096f'), ('\u0971', '\u0971'), ('\u0972', '\u0980'), ('\u0981',
-        '\u0981'), ('\u0982', '\u0983'), ('\u0985', '\u098c'), ('\u098f', '\u0990'), ('\u0993',
-        '\u09a8'), ('\u09aa', '\u09b0'), ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bc',
-        '\u09bc'), ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), ('\u09c1', '\u09c4'), ('\u09c7',
-        '\u09c8'), ('\u09cb', '\u09cc'), ('\u09cd', '\u09cd'), ('\u09ce', '\u09ce'), ('\u09d7',
-        '\u09d7'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), ('\u09e6',
-        '\u09ef'), ('\u09f0', '\u09f1'), ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), ('\u0a05',
-        '\u0a0a'), ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32',
-        '\u0a33'), ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), ('\u0a3e',
-        '\u0a40'), ('\u0a41', '\u0a42'), ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), ('\u0a51',
-        '\u0a51'), ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), ('\u0a70',
-        '\u0a71'), ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'), ('\u0a83',
-        '\u0a83'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), ('\u0aaa',
-        '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), ('\u0abc', '\u0abc'), ('\u0abd',
-        '\u0abd'), ('\u0abe', '\u0ac0'), ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), ('\u0ac9',
-        '\u0ac9'), ('\u0acb', '\u0acc'), ('\u0acd', '\u0acd'), ('\u0ad0', '\u0ad0'), ('\u0ae0',
-        '\u0ae1'), ('\u0ae2', '\u0ae3'), ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b01'), ('\u0b02',
-        '\u0b03'), ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), ('\u0b2a',
-        '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'), ('\u0b3c', '\u0b3c'), ('\u0b3d',
-        '\u0b3d'), ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), ('\u0b40', '\u0b40'), ('\u0b41',
-        '\u0b44'), ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), ('\u0b4d', '\u0b4d'), ('\u0b56',
-        '\u0b56'), ('\u0b57', '\u0b57'), ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), ('\u0b62',
-        '\u0b63'), ('\u0b66', '\u0b6f'), ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), ('\u0b83',
-        '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), ('\u0b99',
-        '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), ('\u0ba8',
-        '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), ('\u0bc1',
-        '\u0bc2'), ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), ('\u0bcd', '\u0bcd'), ('\u0bd0',
-        '\u0bd0'), ('\u0bd7', '\u0bd7'), ('\u0be6', '\u0bef'), ('\u0c00', '\u0c00'), ('\u0c01',
-        '\u0c03'), ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), ('\u0c2a',
-        '\u0c39'), ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), ('\u0c41', '\u0c44'), ('\u0c46',
-        '\u0c48'), ('\u0c4a', '\u0c4d'), ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), ('\u0c60',
-        '\u0c61'), ('\u0c62', '\u0c63'), ('\u0c66', '\u0c6f'), ('\u0c81', '\u0c81'), ('\u0c82',
-        '\u0c83'), ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), ('\u0caa',
-        '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'), ('\u0cbd', '\u0cbd'), ('\u0cbe',
-        '\u0cbe'), ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), ('\u0cc7',
-        '\u0cc8'), ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'), ('\u0cd5', '\u0cd6'), ('\u0cde',
-        '\u0cde'), ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'), ('\u0ce6', '\u0cef'), ('\u0cf1',
-        '\u0cf2'), ('\u0d01', '\u0d01'), ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), ('\u0d0e',
-        '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), ('\u0d41',
-        '\u0d44'), ('\u0d46', '\u0d48'), ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), ('\u0d4e',
-        '\u0d4e'), ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), ('\u0d66',
-        '\u0d6f'), ('\u0d7a', '\u0d7f'), ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), ('\u0d9a',
-        '\u0db1'), ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0dca',
-        '\u0dca'), ('\u0dcf', '\u0dd1'), ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), ('\u0dd8',
-        '\u0ddf'), ('\u0de6', '\u0def'), ('\u0df2', '\u0df3'), ('\u0e01', '\u0e30'), ('\u0e31',
-        '\u0e31'), ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'), ('\u0e40', '\u0e45'), ('\u0e46',
-        '\u0e46'), ('\u0e47', '\u0e4e'), ('\u0e50', '\u0e59'), ('\u0e81', '\u0e82'), ('\u0e84',
-        '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), ('\u0e8d', '\u0e8d'), ('\u0e94',
-        '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), ('\u0ea5', '\u0ea5'), ('\u0ea7',
-        '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), ('\u0eb1', '\u0eb1'), ('\u0eb2',
-        '\u0eb3'), ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), ('\u0ebd', '\u0ebd'), ('\u0ec0',
-        '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'), ('\u0ed0', '\u0ed9'), ('\u0edc',
-        '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f18', '\u0f19'), ('\u0f20', '\u0f29'), ('\u0f35',
-        '\u0f35'), ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), ('\u0f3e', '\u0f3f'), ('\u0f40',
-        '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'), ('\u0f7f', '\u0f7f'), ('\u0f80',
-        '\u0f84'), ('\u0f86', '\u0f87'), ('\u0f88', '\u0f8c'), ('\u0f8d', '\u0f97'), ('\u0f99',
-        '\u0fbc'), ('\u0fc6', '\u0fc6'), ('\u1000', '\u102a'), ('\u102b', '\u102c'), ('\u102d',
-        '\u1030'), ('\u1031', '\u1031'), ('\u1032', '\u1037'), ('\u1038', '\u1038'), ('\u1039',
-        '\u103a'), ('\u103b', '\u103c'), ('\u103d', '\u103e'), ('\u103f', '\u103f'), ('\u1040',
-        '\u1049'), ('\u1050', '\u1055'), ('\u1056', '\u1057'), ('\u1058', '\u1059'), ('\u105a',
-        '\u105d'), ('\u105e', '\u1060'), ('\u1061', '\u1061'), ('\u1062', '\u1064'), ('\u1065',
-        '\u1066'), ('\u1067', '\u106d'), ('\u106e', '\u1070'), ('\u1071', '\u1074'), ('\u1075',
-        '\u1081'), ('\u1082', '\u1082'), ('\u1083', '\u1084'), ('\u1085', '\u1086'), ('\u1087',
-        '\u108c'), ('\u108d', '\u108d'), ('\u108e', '\u108e'), ('\u108f', '\u108f'), ('\u1090',
-        '\u1099'), ('\u109a', '\u109c'), ('\u109d', '\u109d'), ('\u10a0', '\u10c5'), ('\u10c7',
-        '\u10c7'), ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), ('\u10fd',
-        '\u1248'), ('\u124a', '\u124d'), ('\u1250', '\u1256'), ('\u1258', '\u1258'), ('\u125a',
-        '\u125d'), ('\u1260', '\u1288'), ('\u128a', '\u128d'), ('\u1290', '\u12b0'), ('\u12b2',
-        '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), ('\u12c8',
-        '\u12d6'), ('\u12d8', '\u1310'), ('\u1312', '\u1315'), ('\u1318', '\u135a'), ('\u135d',
-        '\u135f'), ('\u1369', '\u1371'), ('\u1380', '\u138f'), ('\u13a0', '\u13f4'), ('\u1401',
-        '\u166c'), ('\u166f', '\u167f'), ('\u1681', '\u169a'), ('\u16a0', '\u16ea'), ('\u16ee',
-        '\u16f0'), ('\u16f1', '\u16f8'), ('\u1700', '\u170c'), ('\u170e', '\u1711'), ('\u1712',
-        '\u1714'), ('\u1720', '\u1731'), ('\u1732', '\u1734'), ('\u1740', '\u1751'), ('\u1752',
-        '\u1753'), ('\u1760', '\u176c'), ('\u176e', '\u1770'), ('\u1772', '\u1773'), ('\u1780',
-        '\u17b3'), ('\u17b4', '\u17b5'), ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), ('\u17be',
-        '\u17c5'), ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'), ('\u17d7',
-        '\u17d7'), ('\u17dc', '\u17dc'), ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), ('\u180b',
-        '\u180d'), ('\u1810', '\u1819'), ('\u1820', '\u1842'), ('\u1843', '\u1843'), ('\u1844',
-        '\u1877'), ('\u1880', '\u18a8'), ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), ('\u18b0',
-        '\u18f5'), ('\u1900', '\u191e'), ('\u1920', '\u1922'), ('\u1923', '\u1926'), ('\u1927',
-        '\u1928'), ('\u1929', '\u192b'), ('\u1930', '\u1931'), ('\u1932', '\u1932'), ('\u1933',
-        '\u1938'), ('\u1939', '\u193b'), ('\u1946', '\u194f'), ('\u1950', '\u196d'), ('\u1970',
-        '\u1974'), ('\u1980', '\u19ab'), ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), ('\u19c8',
-        '\u19c9'), ('\u19d0', '\u19d9'), ('\u19da', '\u19da'), ('\u1a00', '\u1a16'), ('\u1a17',
-        '\u1a18'), ('\u1a19', '\u1a1a'), ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), ('\u1a55',
-        '\u1a55'), ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), ('\u1a60',
-        '\u1a60'), ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'), ('\u1a63', '\u1a64'), ('\u1a65',
-        '\u1a6c'), ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a7c'), ('\u1a7f', '\u1a7f'), ('\u1a80',
-        '\u1a89'), ('\u1a90', '\u1a99'), ('\u1aa7', '\u1aa7'), ('\u1ab0', '\u1abd'), ('\u1b00',
-        '\u1b03'), ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), ('\u1b34', '\u1b34'), ('\u1b35',
-        '\u1b35'), ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'), ('\u1b3d',
-        '\u1b41'), ('\u1b42', '\u1b42'), ('\u1b43', '\u1b44'), ('\u1b45', '\u1b4b'), ('\u1b50',
-        '\u1b59'), ('\u1b6b', '\u1b73'), ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), ('\u1b83',
-        '\u1ba0'), ('\u1ba1', '\u1ba1'), ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), ('\u1ba8',
-        '\u1ba9'), ('\u1baa', '\u1baa'), ('\u1bab', '\u1bad'), ('\u1bae', '\u1baf'), ('\u1bb0',
-        '\u1bb9'), ('\u1bba', '\u1be5'), ('\u1be6', '\u1be6'), ('\u1be7', '\u1be7'), ('\u1be8',
-        '\u1be9'), ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), ('\u1bef',
-        '\u1bf1'), ('\u1bf2', '\u1bf3'), ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), ('\u1c2c',
-        '\u1c33'), ('\u1c34', '\u1c35'), ('\u1c36', '\u1c37'), ('\u1c40', '\u1c49'), ('\u1c4d',
-        '\u1c4f'), ('\u1c50', '\u1c59'), ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), ('\u1cd0',
-        '\u1cd2'), ('\u1cd4', '\u1ce0'), ('\u1ce1', '\u1ce1'), ('\u1ce2', '\u1ce8'), ('\u1ce9',
-        '\u1cec'), ('\u1ced', '\u1ced'), ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), ('\u1cf4',
-        '\u1cf4'), ('\u1cf5', '\u1cf6'), ('\u1cf8', '\u1cf9'), ('\u1d00', '\u1d2b'), ('\u1d2c',
-        '\u1d6a'), ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), ('\u1d9b',
-        '\u1dbf'), ('\u1dc0', '\u1df5'), ('\u1dfc', '\u1dff'), ('\u1e00', '\u1f15'), ('\u1f18',
-        '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), ('\u1f59',
-        '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), ('\u1f80',
-        '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), ('\u1fc6',
-        '\u1fcc'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), ('\u1ff2',
-        '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u203f', '\u2040'), ('\u2054', '\u2054'), ('\u2071',
-        '\u2071'), ('\u207f', '\u207f'), ('\u2090', '\u209c'), ('\u20d0', '\u20dc'), ('\u20e1',
-        '\u20e1'), ('\u20e5', '\u20f0'), ('\u2102', '\u2102'), ('\u2107', '\u2107'), ('\u210a',
-        '\u2113'), ('\u2115', '\u2115'), ('\u2118', '\u2118'), ('\u2119', '\u211d'), ('\u2124',
-        '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a', '\u212d'), ('\u212e',
-        '\u212e'), ('\u212f', '\u2134'), ('\u2135', '\u2138'), ('\u2139', '\u2139'), ('\u213c',
-        '\u213f'), ('\u2145', '\u2149'), ('\u214e', '\u214e'), ('\u2160', '\u2182'), ('\u2183',
-        '\u2184'), ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60',
-        '\u2c7b'), ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), ('\u2cef',
-        '\u2cf1'), ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d',
-        '\u2d2d'), ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), ('\u2d7f', '\u2d7f'), ('\u2d80',
-        '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), ('\u2db8',
-        '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), ('\u2dd8',
-        '\u2dde'), ('\u2de0', '\u2dff'), ('\u3005', '\u3005'), ('\u3006', '\u3006'), ('\u3007',
-        '\u3007'), ('\u3021', '\u3029'), ('\u302a', '\u302d'), ('\u302e', '\u302f'), ('\u3031',
-        '\u3035'), ('\u3038', '\u303a'), ('\u303b', '\u303b'), ('\u303c', '\u303c'), ('\u3041',
-        '\u3096'), ('\u3099', '\u309a'), ('\u309d', '\u309e'), ('\u309f', '\u309f'), ('\u30a1',
-        '\u30fa'), ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), ('\u3105', '\u312d'), ('\u3131',
-        '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), ('\u3400', '\u4db5'), ('\u4e00',
-        '\u9fcc'), ('\ua000', '\ua014'), ('\ua015', '\ua015'), ('\ua016', '\ua48c'), ('\ua4d0',
-        '\ua4f7'), ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), ('\ua610',
-        '\ua61f'), ('\ua620', '\ua629'), ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), ('\ua66e',
-        '\ua66e'), ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), ('\ua67f', '\ua67f'), ('\ua680',
-        '\ua69b'), ('\ua69c', '\ua69d'), ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), ('\ua6e6',
-        '\ua6ef'), ('\ua6f0', '\ua6f1'), ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), ('\ua770',
-        '\ua770'), ('\ua771', '\ua787'), ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), ('\ua790',
-        '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7f7', '\ua7f7'), ('\ua7f8', '\ua7f9'), ('\ua7fa',
-        '\ua7fa'), ('\ua7fb', '\ua801'), ('\ua802', '\ua802'), ('\ua803', '\ua805'), ('\ua806',
-        '\ua806'), ('\ua807', '\ua80a'), ('\ua80b', '\ua80b'), ('\ua80c', '\ua822'), ('\ua823',
-        '\ua824'), ('\ua825', '\ua826'), ('\ua827', '\ua827'), ('\ua840', '\ua873'), ('\ua880',
-        '\ua881'), ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), ('\ua8c4', '\ua8c4'), ('\ua8d0',
-        '\ua8d9'), ('\ua8e0', '\ua8f1'), ('\ua8f2', '\ua8f7'), ('\ua8fb', '\ua8fb'), ('\ua900',
-        '\ua909'), ('\ua90a', '\ua925'), ('\ua926', '\ua92d'), ('\ua930', '\ua946'), ('\ua947',
-        '\ua951'), ('\ua952', '\ua953'), ('\ua960', '\ua97c'), ('\ua980', '\ua982'), ('\ua983',
-        '\ua983'), ('\ua984', '\ua9b2'), ('\ua9b3', '\ua9b3'), ('\ua9b4', '\ua9b5'), ('\ua9b6',
-        '\ua9b9'), ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'), ('\ua9bd', '\ua9c0'), ('\ua9cf',
-        '\ua9cf'), ('\ua9d0', '\ua9d9'), ('\ua9e0', '\ua9e4'), ('\ua9e5', '\ua9e5'), ('\ua9e6',
-        '\ua9e6'), ('\ua9e7', '\ua9ef'), ('\ua9f0', '\ua9f9'), ('\ua9fa', '\ua9fe'), ('\uaa00',
-        '\uaa28'), ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), ('\uaa33',
-        '\uaa34'), ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), ('\uaa44',
-        '\uaa4b'), ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), ('\uaa50', '\uaa59'), ('\uaa60',
-        '\uaa6f'), ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), ('\uaa7a', '\uaa7a'), ('\uaa7b',
-        '\uaa7b'), ('\uaa7c', '\uaa7c'), ('\uaa7d', '\uaa7d'), ('\uaa7e', '\uaaaf'), ('\uaab0',
-        '\uaab0'), ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), ('\uaab7',
-        '\uaab8'), ('\uaab9', '\uaabd'), ('\uaabe', '\uaabf'), ('\uaac0', '\uaac0'), ('\uaac1',
-        '\uaac1'), ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), ('\uaadd', '\uaadd'), ('\uaae0',
-        '\uaaea'), ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'), ('\uaaf2',
-        '\uaaf2'), ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'), ('\uaaf6', '\uaaf6'), ('\uab01',
-        '\uab06'), ('\uab09', '\uab0e'), ('\uab11', '\uab16'), ('\uab20', '\uab26'), ('\uab28',
-        '\uab2e'), ('\uab30', '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64', '\uab65'), ('\uabc0',
-        '\uabe2'), ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'), ('\uabe6', '\uabe7'), ('\uabe8',
-        '\uabe8'), ('\uabe9', '\uabea'), ('\uabec', '\uabec'), ('\uabed', '\uabed'), ('\uabf0',
-        '\uabf9'), ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), ('\uf900',
-        '\ufa6d'), ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), ('\ufb1d',
-        '\ufb1d'), ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), ('\ufb38',
-        '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), ('\ufb46',
-        '\ufbb1'), ('\ufbd3', '\ufc5d'), ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92',
-        '\ufdc7'), ('\ufdf0', '\ufdf9'), ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe2d'), ('\ufe33',
-        '\ufe34'), ('\ufe4d', '\ufe4f'), ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), ('\ufe77',
-        '\ufe77'), ('\ufe79', '\ufe79'), ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), ('\ufe7f',
-        '\ufefc'), ('\uff10', '\uff19'), ('\uff21', '\uff3a'), ('\uff3f', '\uff3f'), ('\uff41',
-        '\uff5a'), ('\uff66', '\uff6f'), ('\uff70', '\uff70'), ('\uff71', '\uff9d'), ('\uff9e',
-        '\uff9f'), ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), ('\uffd2',
-        '\uffd7'), ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'),
-        ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'),
-        ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'),
-        ('\U000101fd', '\U000101fd'), ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'),
-        ('\U000102e0', '\U000102e0'), ('\U00010300', '\U0001031f'), ('\U00010330', '\U00010340'),
-        ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'),
-        ('\U00010350', '\U00010375'), ('\U00010376', '\U0001037a'), ('\U00010380', '\U0001039d'),
-        ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'),
-        ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), ('\U000104a0', '\U000104a9'),
-        ('\U00010500', '\U00010527'), ('\U00010530', '\U00010563'), ('\U00010600', '\U00010736'),
-        ('\U00010740', '\U00010755'), ('\U00010760', '\U00010767'), ('\U00010800', '\U00010805'),
-        ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'),
-        ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), ('\U00010860', '\U00010876'),
-        ('\U00010880', '\U0001089e'), ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'),
-        ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'),
-        ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), ('\U00010a0c', '\U00010a0f'),
-        ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'),
-        ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'), ('\U00010a60', '\U00010a7c'),
-        ('\U00010a80', '\U00010a9c'), ('\U00010ac0', '\U00010ac7'), ('\U00010ac9', '\U00010ae4'),
-        ('\U00010ae5', '\U00010ae6'), ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'),
-        ('\U00010b60', '\U00010b72'), ('\U00010b80', '\U00010b91'), ('\U00010c00', '\U00010c48'),
-        ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'),
-        ('\U00011003', '\U00011037'), ('\U00011038', '\U00011046'), ('\U00011066', '\U0001106f'),
-        ('\U0001107f', '\U00011081'), ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'),
-        ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'),
-        ('\U000110b9', '\U000110ba'), ('\U000110d0', '\U000110e8'), ('\U000110f0', '\U000110f9'),
-        ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'),
-        ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011134'), ('\U00011136', '\U0001113f'),
-        ('\U00011150', '\U00011172'), ('\U00011173', '\U00011173'), ('\U00011176', '\U00011176'),
-        ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'),
-        ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111c0'),
-        ('\U000111c1', '\U000111c4'), ('\U000111d0', '\U000111d9'), ('\U000111da', '\U000111da'),
-        ('\U00011200', '\U00011211'), ('\U00011213', '\U0001122b'), ('\U0001122c', '\U0001122e'),
-        ('\U0001122f', '\U00011231'), ('\U00011232', '\U00011233'), ('\U00011234', '\U00011234'),
-        ('\U00011235', '\U00011235'), ('\U00011236', '\U00011237'), ('\U000112b0', '\U000112de'),
-        ('\U000112df', '\U000112df'), ('\U000112e0', '\U000112e2'), ('\U000112e3', '\U000112ea'),
-        ('\U000112f0', '\U000112f9'), ('\U00011301', '\U00011301'), ('\U00011302', '\U00011303'),
-        ('\U00011305', '\U0001130c'), ('\U0001130f', '\U00011310'), ('\U00011313', '\U00011328'),
-        ('\U0001132a', '\U00011330'), ('\U00011332', '\U00011333'), ('\U00011335', '\U00011339'),
-        ('\U0001133c', '\U0001133c'), ('\U0001133d', '\U0001133d'), ('\U0001133e', '\U0001133f'),
-        ('\U00011340', '\U00011340'), ('\U00011341', '\U00011344'), ('\U00011347', '\U00011348'),
-        ('\U0001134b', '\U0001134d'), ('\U00011357', '\U00011357'), ('\U0001135d', '\U00011361'),
-        ('\U00011362', '\U00011363'), ('\U00011366', '\U0001136c'), ('\U00011370', '\U00011374'),
-        ('\U00011480', '\U000114af'), ('\U000114b0', '\U000114b2'), ('\U000114b3', '\U000114b8'),
-        ('\U000114b9', '\U000114b9'), ('\U000114ba', '\U000114ba'), ('\U000114bb', '\U000114be'),
-        ('\U000114bf', '\U000114c0'), ('\U000114c1', '\U000114c1'), ('\U000114c2', '\U000114c3'),
-        ('\U000114c4', '\U000114c5'), ('\U000114c7', '\U000114c7'), ('\U000114d0', '\U000114d9'),
-        ('\U00011580', '\U000115ae'), ('\U000115af', '\U000115b1'), ('\U000115b2', '\U000115b5'),
-        ('\U000115b8', '\U000115bb'), ('\U000115bc', '\U000115bd'), ('\U000115be', '\U000115be'),
-        ('\U000115bf', '\U000115c0'), ('\U00011600', '\U0001162f'), ('\U00011630', '\U00011632'),
-        ('\U00011633', '\U0001163a'), ('\U0001163b', '\U0001163c'), ('\U0001163d', '\U0001163d'),
-        ('\U0001163e', '\U0001163e'), ('\U0001163f', '\U00011640'), ('\U00011644', '\U00011644'),
-        ('\U00011650', '\U00011659'), ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'),
-        ('\U000116ac', '\U000116ac'), ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'),
-        ('\U000116b0', '\U000116b5'), ('\U000116b6', '\U000116b6'), ('\U000116b7', '\U000116b7'),
-        ('\U000116c0', '\U000116c9'), ('\U000118a0', '\U000118df'), ('\U000118e0', '\U000118e9'),
-        ('\U000118ff', '\U000118ff'), ('\U00011ac0', '\U00011af8'), ('\U00012000', '\U00012398'),
-        ('\U00012400', '\U0001246e'), ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'),
-        ('\U00016a40', '\U00016a5e'), ('\U00016a60', '\U00016a69'), ('\U00016ad0', '\U00016aed'),
-        ('\U00016af0', '\U00016af4'), ('\U00016b00', '\U00016b2f'), ('\U00016b30', '\U00016b36'),
-        ('\U00016b40', '\U00016b43'), ('\U00016b50', '\U00016b59'), ('\U00016b63', '\U00016b77'),
-        ('\U00016b7d', '\U00016b8f'), ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'),
-        ('\U00016f51', '\U00016f7e'), ('\U00016f8f', '\U00016f92'), ('\U00016f93', '\U00016f9f'),
-        ('\U0001b000', '\U0001b001'), ('\U0001bc00', '\U0001bc6a'), ('\U0001bc70', '\U0001bc7c'),
-        ('\U0001bc80', '\U0001bc88'), ('\U0001bc90', '\U0001bc99'), ('\U0001bc9d', '\U0001bc9e'),
-        ('\U0001d165', '\U0001d166'), ('\U0001d167', '\U0001d169'), ('\U0001d16d', '\U0001d172'),
-        ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'),
-        ('\U0001d242', '\U0001d244'), ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'),
-        ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'),
-        ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'),
-        ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'),
-        ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'),
-        ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'),
-        ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'),
-        ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'),
-        ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'),
-        ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'),
-        ('\U0001d7c4', '\U0001d7cb'), ('\U0001d7ce', '\U0001d7ff'), ('\U0001e800', '\U0001e8c4'),
-        ('\U0001e8d0', '\U0001e8d6'), ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'),
-        ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'),
-        ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'),
-        ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'),
-        ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'),
-        ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'),
-        ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'),
-        ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'),
-        ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'),
-        ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'),
-        ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'),
-        ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'),
-        ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d'), ('\U000e0100', '\U000e01ef')
+        ('\u{30}', '\u{39}'), ('\u{41}', '\u{5a}'), ('\u{5f}', '\u{5f}'), ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'), ('\u{b7}', '\u{b7}'), ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'), ('\u{1bb}', '\u{1bb}'),
+        ('\u{1bc}', '\u{1bf}'), ('\u{1c0}', '\u{1c3}'), ('\u{1c4}', '\u{293}'), ('\u{294}',
+        '\u{294}'), ('\u{295}', '\u{2af}'), ('\u{2b0}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'),
+        ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'), ('\u{300}',
+        '\u{36f}'), ('\u{370}', '\u{373}'), ('\u{374}', '\u{374}'), ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{387}',
+        '\u{387}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'),
+        ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'), ('\u{483}', '\u{487}'), ('\u{48a}',
+        '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'),
+        ('\u{591}', '\u{5bd}'), ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}',
+        '\u{5c5}'), ('\u{5c7}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'),
+        ('\u{610}', '\u{61a}'), ('\u{620}', '\u{63f}'), ('\u{640}', '\u{640}'), ('\u{641}',
+        '\u{64a}'), ('\u{64b}', '\u{65f}'), ('\u{660}', '\u{669}'), ('\u{66e}', '\u{66f}'),
+        ('\u{670}', '\u{670}'), ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6d6}',
+        '\u{6dc}'), ('\u{6df}', '\u{6e4}'), ('\u{6e5}', '\u{6e6}'), ('\u{6e7}', '\u{6e8}'),
+        ('\u{6ea}', '\u{6ed}'), ('\u{6ee}', '\u{6ef}'), ('\u{6f0}', '\u{6f9}'), ('\u{6fa}',
+        '\u{6fc}'), ('\u{6ff}', '\u{6ff}'), ('\u{710}', '\u{710}'), ('\u{711}', '\u{711}'),
+        ('\u{712}', '\u{72f}'), ('\u{730}', '\u{74a}'), ('\u{74d}', '\u{7a5}'), ('\u{7a6}',
+        '\u{7b0}'), ('\u{7b1}', '\u{7b1}'), ('\u{7c0}', '\u{7c9}'), ('\u{7ca}', '\u{7ea}'),
+        ('\u{7eb}', '\u{7f3}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'), ('\u{800}',
+        '\u{815}'), ('\u{816}', '\u{819}'), ('\u{81a}', '\u{81a}'), ('\u{81b}', '\u{823}'),
+        ('\u{824}', '\u{824}'), ('\u{825}', '\u{827}'), ('\u{828}', '\u{828}'), ('\u{829}',
+        '\u{82d}'), ('\u{840}', '\u{858}'), ('\u{859}', '\u{85b}'), ('\u{8a0}', '\u{8b2}'),
+        ('\u{8e4}', '\u{902}'), ('\u{903}', '\u{903}'), ('\u{904}', '\u{939}'), ('\u{93a}',
+        '\u{93a}'), ('\u{93b}', '\u{93b}'), ('\u{93c}', '\u{93c}'), ('\u{93d}', '\u{93d}'),
+        ('\u{93e}', '\u{940}'), ('\u{941}', '\u{948}'), ('\u{949}', '\u{94c}'), ('\u{94d}',
+        '\u{94d}'), ('\u{94e}', '\u{94f}'), ('\u{950}', '\u{950}'), ('\u{951}', '\u{957}'),
+        ('\u{958}', '\u{961}'), ('\u{962}', '\u{963}'), ('\u{966}', '\u{96f}'), ('\u{971}',
+        '\u{971}'), ('\u{972}', '\u{980}'), ('\u{981}', '\u{981}'), ('\u{982}', '\u{983}'),
+        ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'), ('\u{9aa}',
+        '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'), ('\u{9bc}', '\u{9bc}'),
+        ('\u{9bd}', '\u{9bd}'), ('\u{9be}', '\u{9c0}'), ('\u{9c1}', '\u{9c4}'), ('\u{9c7}',
+        '\u{9c8}'), ('\u{9cb}', '\u{9cc}'), ('\u{9cd}', '\u{9cd}'), ('\u{9ce}', '\u{9ce}'),
+        ('\u{9d7}', '\u{9d7}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'), ('\u{9e2}',
+        '\u{9e3}'), ('\u{9e6}', '\u{9ef}'), ('\u{9f0}', '\u{9f1}'), ('\u{a01}', '\u{a02}'),
+        ('\u{a03}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'), ('\u{a13}',
+        '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'),
+        ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'), ('\u{a3e}', '\u{a40}'), ('\u{a41}',
+        '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'),
+        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a66}', '\u{a6f}'), ('\u{a70}',
+        '\u{a71}'), ('\u{a72}', '\u{a74}'), ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a82}'),
+        ('\u{a83}', '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}',
+        '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'),
+        ('\u{abc}', '\u{abc}'), ('\u{abd}', '\u{abd}'), ('\u{abe}', '\u{ac0}'), ('\u{ac1}',
+        '\u{ac5}'), ('\u{ac7}', '\u{ac8}'), ('\u{ac9}', '\u{ac9}'), ('\u{acb}', '\u{acc}'),
+        ('\u{acd}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae1}'), ('\u{ae2}',
+        '\u{ae3}'), ('\u{ae6}', '\u{aef}'), ('\u{b01}', '\u{b01}'), ('\u{b02}', '\u{b03}'),
+        ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}',
+        '\u{b30}'), ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3c}', '\u{b3c}'),
+        ('\u{b3d}', '\u{b3d}'), ('\u{b3e}', '\u{b3e}'), ('\u{b3f}', '\u{b3f}'), ('\u{b40}',
+        '\u{b40}'), ('\u{b41}', '\u{b44}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'),
+        ('\u{b4d}', '\u{b4d}'), ('\u{b56}', '\u{b56}'), ('\u{b57}', '\u{b57}'), ('\u{b5c}',
+        '\u{b5d}'), ('\u{b5f}', '\u{b61}'), ('\u{b62}', '\u{b63}'), ('\u{b66}', '\u{b6f}'),
+        ('\u{b71}', '\u{b71}'), ('\u{b82}', '\u{b82}'), ('\u{b83}', '\u{b83}'), ('\u{b85}',
+        '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'),
+        ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}',
+        '\u{baa}'), ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bbf}'), ('\u{bc0}', '\u{bc0}'),
+        ('\u{bc1}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcc}'), ('\u{bcd}',
+        '\u{bcd}'), ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'), ('\u{be6}', '\u{bef}'),
+        ('\u{c00}', '\u{c00}'), ('\u{c01}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}',
+        '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'),
+        ('\u{c3e}', '\u{c40}'), ('\u{c41}', '\u{c44}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}',
+        '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c58}', '\u{c59}'), ('\u{c60}', '\u{c61}'),
+        ('\u{c62}', '\u{c63}'), ('\u{c66}', '\u{c6f}'), ('\u{c81}', '\u{c81}'), ('\u{c82}',
+        '\u{c83}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'),
+        ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbc}', '\u{cbc}'), ('\u{cbd}',
+        '\u{cbd}'), ('\u{cbe}', '\u{cbe}'), ('\u{cbf}', '\u{cbf}'), ('\u{cc0}', '\u{cc4}'),
+        ('\u{cc6}', '\u{cc6}'), ('\u{cc7}', '\u{cc8}'), ('\u{cca}', '\u{ccb}'), ('\u{ccc}',
+        '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'),
+        ('\u{ce2}', '\u{ce3}'), ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}'), ('\u{d01}',
+        '\u{d01}'), ('\u{d02}', '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d3d}'), ('\u{d3e}', '\u{d40}'), ('\u{d41}',
+        '\u{d44}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4c}'), ('\u{d4d}', '\u{d4d}'),
+        ('\u{d4e}', '\u{d4e}'), ('\u{d57}', '\u{d57}'), ('\u{d60}', '\u{d61}'), ('\u{d62}',
+        '\u{d63}'), ('\u{d66}', '\u{d6f}'), ('\u{d7a}', '\u{d7f}'), ('\u{d82}', '\u{d83}'),
+        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'), ('\u{dbd}',
+        '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dca}', '\u{dca}'), ('\u{dcf}', '\u{dd1}'),
+        ('\u{dd2}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'), ('\u{de6}',
+        '\u{def}'), ('\u{df2}', '\u{df3}'), ('\u{e01}', '\u{e30}'), ('\u{e31}', '\u{e31}'),
+        ('\u{e32}', '\u{e33}'), ('\u{e34}', '\u{e3a}'), ('\u{e40}', '\u{e45}'), ('\u{e46}',
+        '\u{e46}'), ('\u{e47}', '\u{e4e}'), ('\u{e50}', '\u{e59}'), ('\u{e81}', '\u{e82}'),
+        ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'), ('\u{e8d}',
+        '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'),
+        ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}',
+        '\u{eb0}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb2}', '\u{eb3}'), ('\u{eb4}', '\u{eb9}'),
+        ('\u{ebb}', '\u{ebc}'), ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}',
+        '\u{ec6}'), ('\u{ec8}', '\u{ecd}'), ('\u{ed0}', '\u{ed9}'), ('\u{edc}', '\u{edf}'),
+        ('\u{f00}', '\u{f00}'), ('\u{f18}', '\u{f19}'), ('\u{f20}', '\u{f29}'), ('\u{f35}',
+        '\u{f35}'), ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'), ('\u{f3e}', '\u{f3f}'),
+        ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f7e}'), ('\u{f7f}',
+        '\u{f7f}'), ('\u{f80}', '\u{f84}'), ('\u{f86}', '\u{f87}'), ('\u{f88}', '\u{f8c}'),
+        ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{fc6}', '\u{fc6}'), ('\u{1000}',
+        '\u{102a}'), ('\u{102b}', '\u{102c}'), ('\u{102d}', '\u{1030}'), ('\u{1031}', '\u{1031}'),
+        ('\u{1032}', '\u{1037}'), ('\u{1038}', '\u{1038}'), ('\u{1039}', '\u{103a}'), ('\u{103b}',
+        '\u{103c}'), ('\u{103d}', '\u{103e}'), ('\u{103f}', '\u{103f}'), ('\u{1040}', '\u{1049}'),
+        ('\u{1050}', '\u{1055}'), ('\u{1056}', '\u{1057}'), ('\u{1058}', '\u{1059}'), ('\u{105a}',
+        '\u{105d}'), ('\u{105e}', '\u{1060}'), ('\u{1061}', '\u{1061}'), ('\u{1062}', '\u{1064}'),
+        ('\u{1065}', '\u{1066}'), ('\u{1067}', '\u{106d}'), ('\u{106e}', '\u{1070}'), ('\u{1071}',
+        '\u{1074}'), ('\u{1075}', '\u{1081}'), ('\u{1082}', '\u{1082}'), ('\u{1083}', '\u{1084}'),
+        ('\u{1085}', '\u{1086}'), ('\u{1087}', '\u{108c}'), ('\u{108d}', '\u{108d}'), ('\u{108e}',
+        '\u{108e}'), ('\u{108f}', '\u{108f}'), ('\u{1090}', '\u{1099}'), ('\u{109a}', '\u{109c}'),
+        ('\u{109d}', '\u{109d}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}',
+        '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{10fc}'), ('\u{10fd}', '\u{1248}'),
+        ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}',
+        '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'),
+        ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}', '\u{12c0}'), ('\u{12c2}',
+        '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'),
+        ('\u{1318}', '\u{135a}'), ('\u{135d}', '\u{135f}'), ('\u{1369}', '\u{1371}'), ('\u{1380}',
+        '\u{138f}'), ('\u{13a0}', '\u{13f4}'), ('\u{1401}', '\u{166c}'), ('\u{166f}', '\u{167f}'),
+        ('\u{1681}', '\u{169a}'), ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f0}'), ('\u{16f1}',
+        '\u{16f8}'), ('\u{1700}', '\u{170c}'), ('\u{170e}', '\u{1711}'), ('\u{1712}', '\u{1714}'),
+        ('\u{1720}', '\u{1731}'), ('\u{1732}', '\u{1734}'), ('\u{1740}', '\u{1751}'), ('\u{1752}',
+        '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1772}', '\u{1773}'),
+        ('\u{1780}', '\u{17b3}'), ('\u{17b4}', '\u{17b5}'), ('\u{17b6}', '\u{17b6}'), ('\u{17b7}',
+        '\u{17bd}'), ('\u{17be}', '\u{17c5}'), ('\u{17c6}', '\u{17c6}'), ('\u{17c7}', '\u{17c8}'),
+        ('\u{17c9}', '\u{17d3}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}', '\u{17dc}'), ('\u{17dd}',
+        '\u{17dd}'), ('\u{17e0}', '\u{17e9}'), ('\u{180b}', '\u{180d}'), ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1842}'), ('\u{1843}', '\u{1843}'), ('\u{1844}', '\u{1877}'), ('\u{1880}',
+        '\u{18a8}'), ('\u{18a9}', '\u{18a9}'), ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'),
+        ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{1922}'), ('\u{1923}', '\u{1926}'), ('\u{1927}',
+        '\u{1928}'), ('\u{1929}', '\u{192b}'), ('\u{1930}', '\u{1931}'), ('\u{1932}', '\u{1932}'),
+        ('\u{1933}', '\u{1938}'), ('\u{1939}', '\u{193b}'), ('\u{1946}', '\u{194f}'), ('\u{1950}',
+        '\u{196d}'), ('\u{1970}', '\u{1974}'), ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c0}'),
+        ('\u{19c1}', '\u{19c7}'), ('\u{19c8}', '\u{19c9}'), ('\u{19d0}', '\u{19d9}'), ('\u{19da}',
+        '\u{19da}'), ('\u{1a00}', '\u{1a16}'), ('\u{1a17}', '\u{1a18}'), ('\u{1a19}', '\u{1a1a}'),
+        ('\u{1a1b}', '\u{1a1b}'), ('\u{1a20}', '\u{1a54}'), ('\u{1a55}', '\u{1a55}'), ('\u{1a56}',
+        '\u{1a56}'), ('\u{1a57}', '\u{1a57}'), ('\u{1a58}', '\u{1a5e}'), ('\u{1a60}', '\u{1a60}'),
+        ('\u{1a61}', '\u{1a61}'), ('\u{1a62}', '\u{1a62}'), ('\u{1a63}', '\u{1a64}'), ('\u{1a65}',
+        '\u{1a6c}'), ('\u{1a6d}', '\u{1a72}'), ('\u{1a73}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a7f}'),
+        ('\u{1a80}', '\u{1a89}'), ('\u{1a90}', '\u{1a99}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1ab0}',
+        '\u{1abd}'), ('\u{1b00}', '\u{1b03}'), ('\u{1b04}', '\u{1b04}'), ('\u{1b05}', '\u{1b33}'),
+        ('\u{1b34}', '\u{1b34}'), ('\u{1b35}', '\u{1b35}'), ('\u{1b36}', '\u{1b3a}'), ('\u{1b3b}',
+        '\u{1b3b}'), ('\u{1b3c}', '\u{1b3c}'), ('\u{1b3d}', '\u{1b41}'), ('\u{1b42}', '\u{1b42}'),
+        ('\u{1b43}', '\u{1b44}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b50}', '\u{1b59}'), ('\u{1b6b}',
+        '\u{1b73}'), ('\u{1b80}', '\u{1b81}'), ('\u{1b82}', '\u{1b82}'), ('\u{1b83}', '\u{1ba0}'),
+        ('\u{1ba1}', '\u{1ba1}'), ('\u{1ba2}', '\u{1ba5}'), ('\u{1ba6}', '\u{1ba7}'), ('\u{1ba8}',
+        '\u{1ba9}'), ('\u{1baa}', '\u{1baa}'), ('\u{1bab}', '\u{1bad}'), ('\u{1bae}', '\u{1baf}'),
+        ('\u{1bb0}', '\u{1bb9}'), ('\u{1bba}', '\u{1be5}'), ('\u{1be6}', '\u{1be6}'), ('\u{1be7}',
+        '\u{1be7}'), ('\u{1be8}', '\u{1be9}'), ('\u{1bea}', '\u{1bec}'), ('\u{1bed}', '\u{1bed}'),
+        ('\u{1bee}', '\u{1bee}'), ('\u{1bef}', '\u{1bf1}'), ('\u{1bf2}', '\u{1bf3}'), ('\u{1c00}',
+        '\u{1c23}'), ('\u{1c24}', '\u{1c2b}'), ('\u{1c2c}', '\u{1c33}'), ('\u{1c34}', '\u{1c35}'),
+        ('\u{1c36}', '\u{1c37}'), ('\u{1c40}', '\u{1c49}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c50}',
+        '\u{1c59}'), ('\u{1c5a}', '\u{1c77}'), ('\u{1c78}', '\u{1c7d}'), ('\u{1cd0}', '\u{1cd2}'),
+        ('\u{1cd4}', '\u{1ce0}'), ('\u{1ce1}', '\u{1ce1}'), ('\u{1ce2}', '\u{1ce8}'), ('\u{1ce9}',
+        '\u{1cec}'), ('\u{1ced}', '\u{1ced}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf2}', '\u{1cf3}'),
+        ('\u{1cf4}', '\u{1cf4}'), ('\u{1cf5}', '\u{1cf6}'), ('\u{1cf8}', '\u{1cf9}'), ('\u{1d00}',
+        '\u{1d2b}'), ('\u{1d2c}', '\u{1d6a}'), ('\u{1d6b}', '\u{1d77}'), ('\u{1d78}', '\u{1d78}'),
+        ('\u{1d79}', '\u{1d9a}'), ('\u{1d9b}', '\u{1dbf}'), ('\u{1dc0}', '\u{1df5}'), ('\u{1dfc}',
+        '\u{1dff}'), ('\u{1e00}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'),
+        ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}',
+        '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'),
+        ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
+        '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fe0}', '\u{1fec}'),
+        ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'), ('\u{203f}', '\u{2040}'), ('\u{2054}',
+        '\u{2054}'), ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'),
+        ('\u{20d0}', '\u{20dc}'), ('\u{20e1}', '\u{20e1}'), ('\u{20e5}', '\u{20f0}'), ('\u{2102}',
+        '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{2118}'), ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
+        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'), ('\u{212e}', '\u{212e}'),
+        ('\u{212f}', '\u{2134}'), ('\u{2135}', '\u{2138}'), ('\u{2139}', '\u{2139}'), ('\u{213c}',
+        '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2182}'),
+        ('\u{2183}', '\u{2184}'), ('\u{2185}', '\u{2188}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}',
+        '\u{2c5e}'), ('\u{2c60}', '\u{2c7b}'), ('\u{2c7c}', '\u{2c7d}'), ('\u{2c7e}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cee}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}',
+        '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}', '\u{2d67}'),
+        ('\u{2d6f}', '\u{2d6f}'), ('\u{2d7f}', '\u{2d7f}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}',
+        '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}',
+        '\u{2dde}'), ('\u{2de0}', '\u{2dff}'), ('\u{3005}', '\u{3005}'), ('\u{3006}', '\u{3006}'),
+        ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{302a}', '\u{302d}'), ('\u{302e}',
+        '\u{302f}'), ('\u{3031}', '\u{3035}'), ('\u{3038}', '\u{303a}'), ('\u{303b}', '\u{303b}'),
+        ('\u{303c}', '\u{303c}'), ('\u{3041}', '\u{3096}'), ('\u{3099}', '\u{309a}'), ('\u{309d}',
+        '\u{309e}'), ('\u{309f}', '\u{309f}'), ('\u{30a1}', '\u{30fa}'), ('\u{30fc}', '\u{30fe}'),
+        ('\u{30ff}', '\u{30ff}'), ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}',
+        '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fcc}'),
+        ('\u{a000}', '\u{a014}'), ('\u{a015}', '\u{a015}'), ('\u{a016}', '\u{a48c}'), ('\u{a4d0}',
+        '\u{a4f7}'), ('\u{a4f8}', '\u{a4fd}'), ('\u{a500}', '\u{a60b}'), ('\u{a60c}', '\u{a60c}'),
+        ('\u{a610}', '\u{a61f}'), ('\u{a620}', '\u{a629}'), ('\u{a62a}', '\u{a62b}'), ('\u{a640}',
+        '\u{a66d}'), ('\u{a66e}', '\u{a66e}'), ('\u{a66f}', '\u{a66f}'), ('\u{a674}', '\u{a67d}'),
+        ('\u{a67f}', '\u{a67f}'), ('\u{a680}', '\u{a69b}'), ('\u{a69c}', '\u{a69d}'), ('\u{a69f}',
+        '\u{a69f}'), ('\u{a6a0}', '\u{a6e5}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a6f0}', '\u{a6f1}'),
+        ('\u{a717}', '\u{a71f}'), ('\u{a722}', '\u{a76f}'), ('\u{a770}', '\u{a770}'), ('\u{a771}',
+        '\u{a787}'), ('\u{a788}', '\u{a788}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'),
+        ('\u{a7b0}', '\u{a7b1}'), ('\u{a7f7}', '\u{a7f7}'), ('\u{a7f8}', '\u{a7f9}'), ('\u{a7fa}',
+        '\u{a7fa}'), ('\u{a7fb}', '\u{a801}'), ('\u{a802}', '\u{a802}'), ('\u{a803}', '\u{a805}'),
+        ('\u{a806}', '\u{a806}'), ('\u{a807}', '\u{a80a}'), ('\u{a80b}', '\u{a80b}'), ('\u{a80c}',
+        '\u{a822}'), ('\u{a823}', '\u{a824}'), ('\u{a825}', '\u{a826}'), ('\u{a827}', '\u{a827}'),
+        ('\u{a840}', '\u{a873}'), ('\u{a880}', '\u{a881}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8b4}',
+        '\u{a8c3}'), ('\u{a8c4}', '\u{a8c4}'), ('\u{a8d0}', '\u{a8d9}'), ('\u{a8e0}', '\u{a8f1}'),
+        ('\u{a8f2}', '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a900}', '\u{a909}'), ('\u{a90a}',
+        '\u{a925}'), ('\u{a926}', '\u{a92d}'), ('\u{a930}', '\u{a946}'), ('\u{a947}', '\u{a951}'),
+        ('\u{a952}', '\u{a953}'), ('\u{a960}', '\u{a97c}'), ('\u{a980}', '\u{a982}'), ('\u{a983}',
+        '\u{a983}'), ('\u{a984}', '\u{a9b2}'), ('\u{a9b3}', '\u{a9b3}'), ('\u{a9b4}', '\u{a9b5}'),
+        ('\u{a9b6}', '\u{a9b9}'), ('\u{a9ba}', '\u{a9bb}'), ('\u{a9bc}', '\u{a9bc}'), ('\u{a9bd}',
+        '\u{a9c0}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9d0}', '\u{a9d9}'), ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e5}', '\u{a9e5}'), ('\u{a9e6}', '\u{a9e6}'), ('\u{a9e7}', '\u{a9ef}'), ('\u{a9f0}',
+        '\u{a9f9}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}', '\u{aa28}'), ('\u{aa29}', '\u{aa2e}'),
+        ('\u{aa2f}', '\u{aa30}'), ('\u{aa31}', '\u{aa32}'), ('\u{aa33}', '\u{aa34}'), ('\u{aa35}',
+        '\u{aa36}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa43}', '\u{aa43}'), ('\u{aa44}', '\u{aa4b}'),
+        ('\u{aa4c}', '\u{aa4c}'), ('\u{aa4d}', '\u{aa4d}'), ('\u{aa50}', '\u{aa59}'), ('\u{aa60}',
+        '\u{aa6f}'), ('\u{aa70}', '\u{aa70}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'),
+        ('\u{aa7b}', '\u{aa7b}'), ('\u{aa7c}', '\u{aa7c}'), ('\u{aa7d}', '\u{aa7d}'), ('\u{aa7e}',
+        '\u{aaaf}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab2}', '\u{aab4}'),
+        ('\u{aab5}', '\u{aab6}'), ('\u{aab7}', '\u{aab8}'), ('\u{aab9}', '\u{aabd}'), ('\u{aabe}',
+        '\u{aabf}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac1}', '\u{aac1}'), ('\u{aac2}', '\u{aac2}'),
+        ('\u{aadb}', '\u{aadc}'), ('\u{aadd}', '\u{aadd}'), ('\u{aae0}', '\u{aaea}'), ('\u{aaeb}',
+        '\u{aaeb}'), ('\u{aaec}', '\u{aaed}'), ('\u{aaee}', '\u{aaef}'), ('\u{aaf2}', '\u{aaf2}'),
+        ('\u{aaf3}', '\u{aaf4}'), ('\u{aaf5}', '\u{aaf5}'), ('\u{aaf6}', '\u{aaf6}'), ('\u{ab01}',
+        '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'),
+        ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}',
+        '\u{ab65}'), ('\u{abc0}', '\u{abe2}'), ('\u{abe3}', '\u{abe4}'), ('\u{abe5}', '\u{abe5}'),
+        ('\u{abe6}', '\u{abe7}'), ('\u{abe8}', '\u{abe8}'), ('\u{abe9}', '\u{abea}'), ('\u{abec}',
+        '\u{abec}'), ('\u{abed}', '\u{abed}'), ('\u{abf0}', '\u{abf9}'), ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}',
+        '\u{fad9}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'),
+        ('\u{fb1e}', '\u{fb1e}'), ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}',
+        '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fc5d}'), ('\u{fc64}', '\u{fd3d}'), ('\u{fd50}',
+        '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdf9}'), ('\u{fe00}', '\u{fe0f}'),
+        ('\u{fe20}', '\u{fe2d}'), ('\u{fe33}', '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'), ('\u{fe71}',
+        '\u{fe71}'), ('\u{fe73}', '\u{fe73}'), ('\u{fe77}', '\u{fe77}'), ('\u{fe79}', '\u{fe79}'),
+        ('\u{fe7b}', '\u{fe7b}'), ('\u{fe7d}', '\u{fe7d}'), ('\u{fe7f}', '\u{fefc}'), ('\u{ff10}',
+        '\u{ff19}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff3f}', '\u{ff3f}'), ('\u{ff41}', '\u{ff5a}'),
+        ('\u{ff66}', '\u{ff6f}'), ('\u{ff70}', '\u{ff70}'), ('\u{ff71}', '\u{ff9d}'), ('\u{ff9e}',
+        '\u{ff9f}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'),
+        ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'),
+        ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
+        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}', '\u{100fa}'),
+        ('\u{10140}', '\u{10174}'), ('\u{101fd}', '\u{101fd}'), ('\u{10280}', '\u{1029c}'),
+        ('\u{102a0}', '\u{102d0}'), ('\u{102e0}', '\u{102e0}'), ('\u{10300}', '\u{1031f}'),
+        ('\u{10330}', '\u{10340}'), ('\u{10341}', '\u{10341}'), ('\u{10342}', '\u{10349}'),
+        ('\u{1034a}', '\u{1034a}'), ('\u{10350}', '\u{10375}'), ('\u{10376}', '\u{1037a}'),
+        ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'), ('\u{10400}', '\u{1044f}'), ('\u{10450}', '\u{1049d}'),
+        ('\u{104a0}', '\u{104a9}'), ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'),
+        ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'),
+        ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'),
+        ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{10900}', '\u{10915}'),
+        ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}', '\u{109bf}'),
+        ('\u{10a00}', '\u{10a00}'), ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'),
+        ('\u{10a0c}', '\u{10a0f}'), ('\u{10a10}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a33}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae4}'), ('\u{10ae5}', '\u{10ae6}'), ('\u{10b00}', '\u{10b35}'),
+        ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}', '\u{10b91}'),
+        ('\u{10c00}', '\u{10c48}'), ('\u{11000}', '\u{11000}'), ('\u{11001}', '\u{11001}'),
+        ('\u{11002}', '\u{11002}'), ('\u{11003}', '\u{11037}'), ('\u{11038}', '\u{11046}'),
+        ('\u{11066}', '\u{1106f}'), ('\u{1107f}', '\u{11081}'), ('\u{11082}', '\u{11082}'),
+        ('\u{11083}', '\u{110af}'), ('\u{110b0}', '\u{110b2}'), ('\u{110b3}', '\u{110b6}'),
+        ('\u{110b7}', '\u{110b8}'), ('\u{110b9}', '\u{110ba}'), ('\u{110d0}', '\u{110e8}'),
+        ('\u{110f0}', '\u{110f9}'), ('\u{11100}', '\u{11102}'), ('\u{11103}', '\u{11126}'),
+        ('\u{11127}', '\u{1112b}'), ('\u{1112c}', '\u{1112c}'), ('\u{1112d}', '\u{11134}'),
+        ('\u{11136}', '\u{1113f}'), ('\u{11150}', '\u{11172}'), ('\u{11173}', '\u{11173}'),
+        ('\u{11176}', '\u{11176}'), ('\u{11180}', '\u{11181}'), ('\u{11182}', '\u{11182}'),
+        ('\u{11183}', '\u{111b2}'), ('\u{111b3}', '\u{111b5}'), ('\u{111b6}', '\u{111be}'),
+        ('\u{111bf}', '\u{111c0}'), ('\u{111c1}', '\u{111c4}'), ('\u{111d0}', '\u{111d9}'),
+        ('\u{111da}', '\u{111da}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'),
+        ('\u{1122c}', '\u{1122e}'), ('\u{1122f}', '\u{11231}'), ('\u{11232}', '\u{11233}'),
+        ('\u{11234}', '\u{11234}'), ('\u{11235}', '\u{11235}'), ('\u{11236}', '\u{11237}'),
+        ('\u{112b0}', '\u{112de}'), ('\u{112df}', '\u{112df}'), ('\u{112e0}', '\u{112e2}'),
+        ('\u{112e3}', '\u{112ea}'), ('\u{112f0}', '\u{112f9}'), ('\u{11301}', '\u{11301}'),
+        ('\u{11302}', '\u{11303}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'), ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'), ('\u{1133c}', '\u{1133c}'), ('\u{1133d}', '\u{1133d}'),
+        ('\u{1133e}', '\u{1133f}'), ('\u{11340}', '\u{11340}'), ('\u{11341}', '\u{11344}'),
+        ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'), ('\u{11357}', '\u{11357}'),
+        ('\u{1135d}', '\u{11361}'), ('\u{11362}', '\u{11363}'), ('\u{11366}', '\u{1136c}'),
+        ('\u{11370}', '\u{11374}'), ('\u{11480}', '\u{114af}'), ('\u{114b0}', '\u{114b2}'),
+        ('\u{114b3}', '\u{114b8}'), ('\u{114b9}', '\u{114b9}'), ('\u{114ba}', '\u{114ba}'),
+        ('\u{114bb}', '\u{114be}'), ('\u{114bf}', '\u{114c0}'), ('\u{114c1}', '\u{114c1}'),
+        ('\u{114c2}', '\u{114c3}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}', '\u{114c7}'),
+        ('\u{114d0}', '\u{114d9}'), ('\u{11580}', '\u{115ae}'), ('\u{115af}', '\u{115b1}'),
+        ('\u{115b2}', '\u{115b5}'), ('\u{115b8}', '\u{115bb}'), ('\u{115bc}', '\u{115bd}'),
+        ('\u{115be}', '\u{115be}'), ('\u{115bf}', '\u{115c0}'), ('\u{11600}', '\u{1162f}'),
+        ('\u{11630}', '\u{11632}'), ('\u{11633}', '\u{1163a}'), ('\u{1163b}', '\u{1163c}'),
+        ('\u{1163d}', '\u{1163d}'), ('\u{1163e}', '\u{1163e}'), ('\u{1163f}', '\u{11640}'),
+        ('\u{11644}', '\u{11644}'), ('\u{11650}', '\u{11659}'), ('\u{11680}', '\u{116aa}'),
+        ('\u{116ab}', '\u{116ab}'), ('\u{116ac}', '\u{116ac}'), ('\u{116ad}', '\u{116ad}'),
+        ('\u{116ae}', '\u{116af}'), ('\u{116b0}', '\u{116b5}'), ('\u{116b6}', '\u{116b6}'),
+        ('\u{116b7}', '\u{116b7}'), ('\u{116c0}', '\u{116c9}'), ('\u{118a0}', '\u{118df}'),
+        ('\u{118e0}', '\u{118e9}'), ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'),
+        ('\u{12000}', '\u{12398}'), ('\u{12400}', '\u{1246e}'), ('\u{13000}', '\u{1342e}'),
+        ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'),
+        ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b00}', '\u{16b2f}'),
+        ('\u{16b30}', '\u{16b36}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b50}', '\u{16b59}'),
+        ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'),
+        ('\u{16f50}', '\u{16f50}'), ('\u{16f51}', '\u{16f7e}'), ('\u{16f8f}', '\u{16f92}'),
+        ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1bc9d}', '\u{1bc9e}'), ('\u{1d165}', '\u{1d166}'), ('\u{1d167}', '\u{1d169}'),
+        ('\u{1d16d}', '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'),
+        ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'), ('\u{1d400}', '\u{1d454}'),
+        ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'),
+        ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'),
+        ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'),
+        ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
+        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
+        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'),
+        ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'),
+        ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'),
+        ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
+        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1d7ce}', '\u{1d7ff}'),
+        ('\u{1e800}', '\u{1e8c4}'), ('\u{1e8d0}', '\u{1e8d6}'), ('\u{1ee00}', '\u{1ee03}'),
+        ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'),
+        ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'),
+        ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'),
+        ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'),
+        ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'),
+        ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'),
+        ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'),
+        ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'),
+        ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'),
+        ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'),
+        ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{2a6d6}'),
+        ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2f800}', '\u{2fa1d}'),
+        ('\u{e0100}', '\u{e01ef}')
     ];
 
     pub fn XID_Continue(c: char) -> bool {
@@ -2530,172 +2776,188 @@ pub fn XID_Continue(c: char) -> bool {
     }
 
     pub static XID_Start_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\x61', '\x7a'), ('\u00aa', '\u00aa'), ('\u00b5', '\u00b5'), ('\u00ba',
-        '\u00ba'), ('\u00c0', '\u00d6'), ('\u00d8', '\u00f6'), ('\u00f8', '\u01ba'), ('\u01bb',
-        '\u01bb'), ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), ('\u0294',
-        '\u0294'), ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), ('\u02e0',
-        '\u02e4'), ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), ('\u0370', '\u0373'), ('\u0374',
-        '\u0374'), ('\u0376', '\u0377'), ('\u037b', '\u037d'), ('\u037f', '\u037f'), ('\u0386',
-        '\u0386'), ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e', '\u03a1'), ('\u03a3',
-        '\u03f5'), ('\u03f7', '\u0481'), ('\u048a', '\u052f'), ('\u0531', '\u0556'), ('\u0559',
-        '\u0559'), ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0620',
-        '\u063f'), ('\u0640', '\u0640'), ('\u0641', '\u064a'), ('\u066e', '\u066f'), ('\u0671',
-        '\u06d3'), ('\u06d5', '\u06d5'), ('\u06e5', '\u06e6'), ('\u06ee', '\u06ef'), ('\u06fa',
-        '\u06fc'), ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), ('\u0712', '\u072f'), ('\u074d',
-        '\u07a5'), ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), ('\u07f4', '\u07f5'), ('\u07fa',
-        '\u07fa'), ('\u0800', '\u0815'), ('\u081a', '\u081a'), ('\u0824', '\u0824'), ('\u0828',
-        '\u0828'), ('\u0840', '\u0858'), ('\u08a0', '\u08b2'), ('\u0904', '\u0939'), ('\u093d',
-        '\u093d'), ('\u0950', '\u0950'), ('\u0958', '\u0961'), ('\u0971', '\u0971'), ('\u0972',
-        '\u0980'), ('\u0985', '\u098c'), ('\u098f', '\u0990'), ('\u0993', '\u09a8'), ('\u09aa',
-        '\u09b0'), ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bd', '\u09bd'), ('\u09ce',
-        '\u09ce'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), ('\u09f0', '\u09f1'), ('\u0a05',
-        '\u0a0a'), ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32',
-        '\u0a33'), ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), ('\u0a59', '\u0a5c'), ('\u0a5e',
-        '\u0a5e'), ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), ('\u0a93',
-        '\u0aa8'), ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), ('\u0abd',
-        '\u0abd'), ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), ('\u0b05', '\u0b0c'), ('\u0b0f',
-        '\u0b10'), ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35',
-        '\u0b39'), ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), ('\u0b71',
-        '\u0b71'), ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), ('\u0b92',
-        '\u0b95'), ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), ('\u0ba3',
-        '\u0ba4'), ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bd0', '\u0bd0'), ('\u0c05',
-        '\u0c0c'), ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c39'), ('\u0c3d',
-        '\u0c3d'), ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), ('\u0c8e',
-        '\u0c90'), ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbd',
-        '\u0cbd'), ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), ('\u0d05',
-        '\u0d0c'), ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), ('\u0d4e',
-        '\u0d4e'), ('\u0d60', '\u0d61'), ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), ('\u0d9a',
-        '\u0db1'), ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0e01',
-        '\u0e30'), ('\u0e32', '\u0e32'), ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), ('\u0e81',
-        '\u0e82'), ('\u0e84', '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), ('\u0e8d',
-        '\u0e8d'), ('\u0e94', '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), ('\u0ea5',
-        '\u0ea5'), ('\u0ea7', '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), ('\u0eb2',
-        '\u0eb2'), ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0edc',
-        '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f88',
-        '\u0f8c'), ('\u1000', '\u102a'), ('\u103f', '\u103f'), ('\u1050', '\u1055'), ('\u105a',
-        '\u105d'), ('\u1061', '\u1061'), ('\u1065', '\u1066'), ('\u106e', '\u1070'), ('\u1075',
-        '\u1081'), ('\u108e', '\u108e'), ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd',
-        '\u10cd'), ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), ('\u124a',
-        '\u124d'), ('\u1250', '\u1256'), ('\u1258', '\u1258'), ('\u125a', '\u125d'), ('\u1260',
-        '\u1288'), ('\u128a', '\u128d'), ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), ('\u12b8',
-        '\u12be'), ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), ('\u12d8',
-        '\u1310'), ('\u1312', '\u1315'), ('\u1318', '\u135a'), ('\u1380', '\u138f'), ('\u13a0',
-        '\u13f4'), ('\u1401', '\u166c'), ('\u166f', '\u167f'), ('\u1681', '\u169a'), ('\u16a0',
-        '\u16ea'), ('\u16ee', '\u16f0'), ('\u16f1', '\u16f8'), ('\u1700', '\u170c'), ('\u170e',
-        '\u1711'), ('\u1720', '\u1731'), ('\u1740', '\u1751'), ('\u1760', '\u176c'), ('\u176e',
-        '\u1770'), ('\u1780', '\u17b3'), ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), ('\u1820',
-        '\u1842'), ('\u1843', '\u1843'), ('\u1844', '\u1877'), ('\u1880', '\u18a8'), ('\u18aa',
-        '\u18aa'), ('\u18b0', '\u18f5'), ('\u1900', '\u191e'), ('\u1950', '\u196d'), ('\u1970',
-        '\u1974'), ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), ('\u1a00', '\u1a16'), ('\u1a20',
-        '\u1a54'), ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), ('\u1b45', '\u1b4b'), ('\u1b83',
-        '\u1ba0'), ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), ('\u1c00', '\u1c23'), ('\u1c4d',
-        '\u1c4f'), ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), ('\u1ce9', '\u1cec'), ('\u1cee',
-        '\u1cf1'), ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), ('\u1d6b',
-        '\u1d77'), ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), ('\u1e00',
-        '\u1f15'), ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50',
-        '\u1f57'), ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f',
-        '\u1f7d'), ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2',
-        '\u1fc4'), ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0',
-        '\u1fec'), ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u2071', '\u2071'), ('\u207f',
-        '\u207f'), ('\u2090', '\u209c'), ('\u2102', '\u2102'), ('\u2107', '\u2107'), ('\u210a',
-        '\u2113'), ('\u2115', '\u2115'), ('\u2118', '\u2118'), ('\u2119', '\u211d'), ('\u2124',
-        '\u2124'), ('\u2126', '\u2126'), ('\u2128', '\u2128'), ('\u212a', '\u212d'), ('\u212e',
-        '\u212e'), ('\u212f', '\u2134'), ('\u2135', '\u2138'), ('\u2139', '\u2139'), ('\u213c',
-        '\u213f'), ('\u2145', '\u2149'), ('\u214e', '\u214e'), ('\u2160', '\u2182'), ('\u2183',
-        '\u2184'), ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60',
-        '\u2c7b'), ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), ('\u2cf2',
-        '\u2cf3'), ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), ('\u2d30',
-        '\u2d67'), ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8',
-        '\u2dae'), ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8',
-        '\u2dce'), ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), ('\u3005', '\u3005'), ('\u3006',
-        '\u3006'), ('\u3007', '\u3007'), ('\u3021', '\u3029'), ('\u3031', '\u3035'), ('\u3038',
-        '\u303a'), ('\u303b', '\u303b'), ('\u303c', '\u303c'), ('\u3041', '\u3096'), ('\u309d',
-        '\u309e'), ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), ('\u30ff',
-        '\u30ff'), ('\u3105', '\u312d'), ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0',
-        '\u31ff'), ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), ('\ua015',
-        '\ua015'), ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), ('\ua500',
-        '\ua60b'), ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), ('\ua62a', '\ua62b'), ('\ua640',
-        '\ua66d'), ('\ua66e', '\ua66e'), ('\ua67f', '\ua67f'), ('\ua680', '\ua69b'), ('\ua69c',
-        '\ua69d'), ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), ('\ua722',
-        '\ua76f'), ('\ua770', '\ua770'), ('\ua771', '\ua787'), ('\ua788', '\ua788'), ('\ua78b',
-        '\ua78e'), ('\ua790', '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7f7', '\ua7f7'), ('\ua7f8',
-        '\ua7f9'), ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), ('\ua803', '\ua805'), ('\ua807',
-        '\ua80a'), ('\ua80c', '\ua822'), ('\ua840', '\ua873'), ('\ua882', '\ua8b3'), ('\ua8f2',
-        '\ua8f7'), ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), ('\ua930', '\ua946'), ('\ua960',
-        '\ua97c'), ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), ('\ua9e0', '\ua9e4'), ('\ua9e6',
-        '\ua9e6'), ('\ua9e7', '\ua9ef'), ('\ua9fa', '\ua9fe'), ('\uaa00', '\uaa28'), ('\uaa40',
-        '\uaa42'), ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), ('\uaa71',
-        '\uaa76'), ('\uaa7a', '\uaa7a'), ('\uaa7e', '\uaaaf'), ('\uaab1', '\uaab1'), ('\uaab5',
-        '\uaab6'), ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), ('\uaac2', '\uaac2'), ('\uaadb',
-        '\uaadc'), ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), ('\uaaf2', '\uaaf2'), ('\uaaf3',
-        '\uaaf4'), ('\uab01', '\uab06'), ('\uab09', '\uab0e'), ('\uab11', '\uab16'), ('\uab20',
-        '\uab26'), ('\uab28', '\uab2e'), ('\uab30', '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64',
-        '\uab65'), ('\uabc0', '\uabe2'), ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), ('\ud7cb',
-        '\ud7fb'), ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), ('\ufb13',
-        '\ufb17'), ('\ufb1d', '\ufb1d'), ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), ('\ufb38',
-        '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), ('\ufb46',
-        '\ufbb1'), ('\ufbd3', '\ufc5d'), ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92',
-        '\ufdc7'), ('\ufdf0', '\ufdf9'), ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), ('\ufe77',
-        '\ufe77'), ('\ufe79', '\ufe79'), ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), ('\ufe7f',
-        '\ufefc'), ('\uff21', '\uff3a'), ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), ('\uff70',
-        '\uff70'), ('\uff71', '\uff9d'), ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), ('\uffca',
-        '\uffcf'), ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'),
-        ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'),
-        ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'),
-        ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'),
-        ('\U00010300', '\U0001031f'), ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'),
-        ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), ('\U00010350', '\U00010375'),
-        ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'),
-        ('\U000103d1', '\U000103d5'), ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'),
-        ('\U00010500', '\U00010527'), ('\U00010530', '\U00010563'), ('\U00010600', '\U00010736'),
-        ('\U00010740', '\U00010755'), ('\U00010760', '\U00010767'), ('\U00010800', '\U00010805'),
-        ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'),
-        ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), ('\U00010860', '\U00010876'),
-        ('\U00010880', '\U0001089e'), ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'),
-        ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'),
-        ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'),
-        ('\U00010a60', '\U00010a7c'), ('\U00010a80', '\U00010a9c'), ('\U00010ac0', '\U00010ac7'),
-        ('\U00010ac9', '\U00010ae4'), ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'),
-        ('\U00010b60', '\U00010b72'), ('\U00010b80', '\U00010b91'), ('\U00010c00', '\U00010c48'),
-        ('\U00011003', '\U00011037'), ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'),
-        ('\U00011103', '\U00011126'), ('\U00011150', '\U00011172'), ('\U00011176', '\U00011176'),
-        ('\U00011183', '\U000111b2'), ('\U000111c1', '\U000111c4'), ('\U000111da', '\U000111da'),
-        ('\U00011200', '\U00011211'), ('\U00011213', '\U0001122b'), ('\U000112b0', '\U000112de'),
-        ('\U00011305', '\U0001130c'), ('\U0001130f', '\U00011310'), ('\U00011313', '\U00011328'),
-        ('\U0001132a', '\U00011330'), ('\U00011332', '\U00011333'), ('\U00011335', '\U00011339'),
-        ('\U0001133d', '\U0001133d'), ('\U0001135d', '\U00011361'), ('\U00011480', '\U000114af'),
-        ('\U000114c4', '\U000114c5'), ('\U000114c7', '\U000114c7'), ('\U00011580', '\U000115ae'),
-        ('\U00011600', '\U0001162f'), ('\U00011644', '\U00011644'), ('\U00011680', '\U000116aa'),
-        ('\U000118a0', '\U000118df'), ('\U000118ff', '\U000118ff'), ('\U00011ac0', '\U00011af8'),
-        ('\U00012000', '\U00012398'), ('\U00012400', '\U0001246e'), ('\U00013000', '\U0001342e'),
-        ('\U00016800', '\U00016a38'), ('\U00016a40', '\U00016a5e'), ('\U00016ad0', '\U00016aed'),
-        ('\U00016b00', '\U00016b2f'), ('\U00016b40', '\U00016b43'), ('\U00016b63', '\U00016b77'),
-        ('\U00016b7d', '\U00016b8f'), ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'),
-        ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), ('\U0001bc00', '\U0001bc6a'),
-        ('\U0001bc70', '\U0001bc7c'), ('\U0001bc80', '\U0001bc88'), ('\U0001bc90', '\U0001bc99'),
-        ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'),
-        ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'),
-        ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'),
-        ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'),
-        ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'),
-        ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'),
-        ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'),
-        ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'),
-        ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'),
-        ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'),
-        ('\U0001e800', '\U0001e8c4'), ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'),
-        ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'),
-        ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'),
-        ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'),
-        ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'),
-        ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'),
-        ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'),
-        ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'),
-        ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'),
-        ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'),
-        ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'),
-        ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'),
-        ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d')
+        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
+        ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'),
+        ('\u{1bb}', '\u{1bb}'), ('\u{1bc}', '\u{1bf}'), ('\u{1c0}', '\u{1c3}'), ('\u{1c4}',
+        '\u{293}'), ('\u{294}', '\u{294}'), ('\u{295}', '\u{2af}'), ('\u{2b0}', '\u{2c1}'),
+        ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}',
+        '\u{2ee}'), ('\u{370}', '\u{373}'), ('\u{374}', '\u{374}'), ('\u{376}', '\u{377}'),
+        ('\u{37b}', '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}',
+        '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'),
+        ('\u{3f7}', '\u{481}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{559}',
+        '\u{559}'), ('\u{561}', '\u{587}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'),
+        ('\u{620}', '\u{63f}'), ('\u{640}', '\u{640}'), ('\u{641}', '\u{64a}'), ('\u{66e}',
+        '\u{66f}'), ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6e5}', '\u{6e6}'),
+        ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'), ('\u{710}',
+        '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'), ('\u{7b1}', '\u{7b1}'),
+        ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'), ('\u{800}',
+        '\u{815}'), ('\u{81a}', '\u{81a}'), ('\u{824}', '\u{824}'), ('\u{828}', '\u{828}'),
+        ('\u{840}', '\u{858}'), ('\u{8a0}', '\u{8b2}'), ('\u{904}', '\u{939}'), ('\u{93d}',
+        '\u{93d}'), ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'), ('\u{971}', '\u{971}'),
+        ('\u{972}', '\u{980}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}',
+        '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'),
+        ('\u{9bd}', '\u{9bd}'), ('\u{9ce}', '\u{9ce}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}',
+        '\u{9e1}'), ('\u{9f0}', '\u{9f1}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}',
+        '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'),
+        ('\u{a72}', '\u{a74}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}',
+        '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'),
+        ('\u{abd}', '\u{abd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae1}'), ('\u{b05}',
+        '\u{b0c}'), ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'),
+        ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'), ('\u{b5c}',
+        '\u{b5d}'), ('\u{b5f}', '\u{b61}'), ('\u{b71}', '\u{b71}'), ('\u{b83}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}',
+        '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'), ('\u{bd0}', '\u{bd0}'), ('\u{c05}',
+        '\u{c0c}'), ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'),
+        ('\u{c3d}', '\u{c3d}'), ('\u{c58}', '\u{c59}'), ('\u{c60}', '\u{c61}'), ('\u{c85}',
+        '\u{c8c}'), ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'),
+        ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cbd}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}',
+        '\u{ce1}'), ('\u{cf1}', '\u{cf2}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'),
+        ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d3d}'), ('\u{d4e}', '\u{d4e}'), ('\u{d60}',
+        '\u{d61}'), ('\u{d7a}', '\u{d7f}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'),
+        ('\u{db3}', '\u{dbb}'), ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{e01}',
+        '\u{e30}'), ('\u{e32}', '\u{e32}'), ('\u{e40}', '\u{e45}'), ('\u{e46}', '\u{e46}'),
+        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}',
+        '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
+        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}',
+        '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb2}', '\u{eb2}'), ('\u{ebd}', '\u{ebd}'),
+        ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), ('\u{edc}', '\u{edf}'), ('\u{f00}',
+        '\u{f00}'), ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'),
+        ('\u{1000}', '\u{102a}'), ('\u{103f}', '\u{103f}'), ('\u{1050}', '\u{1055}'), ('\u{105a}',
+        '\u{105d}'), ('\u{1061}', '\u{1061}'), ('\u{1065}', '\u{1066}'), ('\u{106e}', '\u{1070}'),
+        ('\u{1075}', '\u{1081}'), ('\u{108e}', '\u{108e}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
+        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{10fc}'),
+        ('\u{10fd}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}',
+        '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}',
+        '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'), ('\u{1318}', '\u{135a}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
+        '\u{13f4}'), ('\u{1401}', '\u{166c}'), ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'),
+        ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f0}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}',
+        '\u{170c}'), ('\u{170e}', '\u{1711}'), ('\u{1720}', '\u{1731}'), ('\u{1740}', '\u{1751}'),
+        ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1780}', '\u{17b3}'), ('\u{17d7}',
+        '\u{17d7}'), ('\u{17dc}', '\u{17dc}'), ('\u{1820}', '\u{1842}'), ('\u{1843}', '\u{1843}'),
+        ('\u{1844}', '\u{1877}'), ('\u{1880}', '\u{18a8}'), ('\u{18aa}', '\u{18aa}'), ('\u{18b0}',
+        '\u{18f5}'), ('\u{1900}', '\u{191e}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
+        ('\u{1980}', '\u{19ab}'), ('\u{19c1}', '\u{19c7}'), ('\u{1a00}', '\u{1a16}'), ('\u{1a20}',
+        '\u{1a54}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1b05}', '\u{1b33}'), ('\u{1b45}', '\u{1b4b}'),
+        ('\u{1b83}', '\u{1ba0}'), ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'), ('\u{1c00}',
+        '\u{1c23}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}', '\u{1c77}'), ('\u{1c78}', '\u{1c7d}'),
+        ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf5}', '\u{1cf6}'), ('\u{1d00}',
+        '\u{1d2b}'), ('\u{1d2c}', '\u{1d6a}'), ('\u{1d6b}', '\u{1d77}'), ('\u{1d78}', '\u{1d78}'),
+        ('\u{1d79}', '\u{1d9a}'), ('\u{1d9b}', '\u{1dbf}'), ('\u{1e00}', '\u{1f15}'), ('\u{1f18}',
+        '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'),
+        ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}',
+        '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'),
+        ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}',
+        '\u{1fdb}'), ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'),
+        ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{2102}',
+        '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'),
+        ('\u{2118}', '\u{2118}'), ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
+        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'), ('\u{212e}', '\u{212e}'),
+        ('\u{212f}', '\u{2134}'), ('\u{2135}', '\u{2138}'), ('\u{2139}', '\u{2139}'), ('\u{213c}',
+        '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2182}'),
+        ('\u{2183}', '\u{2184}'), ('\u{2185}', '\u{2188}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}',
+        '\u{2c5e}'), ('\u{2c60}', '\u{2c7b}'), ('\u{2c7c}', '\u{2c7d}'), ('\u{2c7e}', '\u{2ce4}'),
+        ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}',
+        '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'),
+        ('\u{2d80}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}',
+        '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{3005}', '\u{3005}'), ('\u{3006}',
+        '\u{3006}'), ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3031}', '\u{3035}'),
+        ('\u{3038}', '\u{303a}'), ('\u{303b}', '\u{303b}'), ('\u{303c}', '\u{303c}'), ('\u{3041}',
+        '\u{3096}'), ('\u{309d}', '\u{309e}'), ('\u{309f}', '\u{309f}'), ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30fe}'), ('\u{30ff}', '\u{30ff}'), ('\u{3105}', '\u{312d}'), ('\u{3131}',
+        '\u{318e}'), ('\u{31a0}', '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'),
+        ('\u{4e00}', '\u{9fcc}'), ('\u{a000}', '\u{a014}'), ('\u{a015}', '\u{a015}'), ('\u{a016}',
+        '\u{a48c}'), ('\u{a4d0}', '\u{a4f7}'), ('\u{a4f8}', '\u{a4fd}'), ('\u{a500}', '\u{a60b}'),
+        ('\u{a60c}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'), ('\u{a62a}', '\u{a62b}'), ('\u{a640}',
+        '\u{a66d}'), ('\u{a66e}', '\u{a66e}'), ('\u{a67f}', '\u{a67f}'), ('\u{a680}', '\u{a69b}'),
+        ('\u{a69c}', '\u{a69d}'), ('\u{a6a0}', '\u{a6e5}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a717}',
+        '\u{a71f}'), ('\u{a722}', '\u{a76f}'), ('\u{a770}', '\u{a770}'), ('\u{a771}', '\u{a787}'),
+        ('\u{a788}', '\u{a788}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'), ('\u{a7b0}',
+        '\u{a7b1}'), ('\u{a7f7}', '\u{a7f7}'), ('\u{a7f8}', '\u{a7f9}'), ('\u{a7fa}', '\u{a7fa}'),
+        ('\u{a7fb}', '\u{a801}'), ('\u{a803}', '\u{a805}'), ('\u{a807}', '\u{a80a}'), ('\u{a80c}',
+        '\u{a822}'), ('\u{a840}', '\u{a873}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8f2}', '\u{a8f7}'),
+        ('\u{a8fb}', '\u{a8fb}'), ('\u{a90a}', '\u{a925}'), ('\u{a930}', '\u{a946}'), ('\u{a960}',
+        '\u{a97c}'), ('\u{a984}', '\u{a9b2}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e0}', '\u{a9e4}'),
+        ('\u{a9e6}', '\u{a9e6}'), ('\u{a9e7}', '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}',
+        '\u{aa28}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa60}', '\u{aa6f}'),
+        ('\u{aa70}', '\u{aa70}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'), ('\u{aa7e}',
+        '\u{aaaf}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab5}', '\u{aab6}'), ('\u{aab9}', '\u{aabd}'),
+        ('\u{aac0}', '\u{aac0}'), ('\u{aac2}', '\u{aac2}'), ('\u{aadb}', '\u{aadc}'), ('\u{aadd}',
+        '\u{aadd}'), ('\u{aae0}', '\u{aaea}'), ('\u{aaf2}', '\u{aaf2}'), ('\u{aaf3}', '\u{aaf4}'),
+        ('\u{ab01}', '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}',
+        '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'),
+        ('\u{ab64}', '\u{ab65}'), ('\u{abc0}', '\u{abe2}'), ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}',
+        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1f}',
+        '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'),
+        ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'), ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}',
+        '\u{fc5d}'), ('\u{fc64}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'),
+        ('\u{fdf0}', '\u{fdf9}'), ('\u{fe71}', '\u{fe71}'), ('\u{fe73}', '\u{fe73}'), ('\u{fe77}',
+        '\u{fe77}'), ('\u{fe79}', '\u{fe79}'), ('\u{fe7b}', '\u{fe7b}'), ('\u{fe7d}', '\u{fe7d}'),
+        ('\u{fe7f}', '\u{fefc}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}',
+        '\u{ff6f}'), ('\u{ff70}', '\u{ff70}'), ('\u{ff71}', '\u{ff9d}'), ('\u{ffa0}', '\u{ffbe}'),
+        ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}',
+        '\u{ffdc}'), ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}',
+        '\u{1003a}'), ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'), ('\u{10050}',
+        '\u{1005d}'), ('\u{10080}', '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{10280}',
+        '\u{1029c}'), ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'), ('\u{10330}',
+        '\u{10340}'), ('\u{10341}', '\u{10341}'), ('\u{10342}', '\u{10349}'), ('\u{1034a}',
+        '\u{1034a}'), ('\u{10350}', '\u{10375}'), ('\u{10380}', '\u{1039d}'), ('\u{103a0}',
+        '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d1}', '\u{103d5}'), ('\u{10400}',
+        '\u{1044f}'), ('\u{10450}', '\u{1049d}'), ('\u{10500}', '\u{10527}'), ('\u{10530}',
+        '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}',
+        '\u{10767}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}',
+        '\u{10835}'), ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}',
+        '\u{10855}'), ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{10900}',
+        '\u{10915}'), ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}',
+        '\u{109bf}'), ('\u{10a00}', '\u{10a00}'), ('\u{10a10}', '\u{10a13}'), ('\u{10a15}',
+        '\u{10a17}'), ('\u{10a19}', '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}',
+        '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'), ('\u{10b00}',
+        '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}',
+        '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{11003}', '\u{11037}'), ('\u{11083}',
+        '\u{110af}'), ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'), ('\u{11150}',
+        '\u{11172}'), ('\u{11176}', '\u{11176}'), ('\u{11183}', '\u{111b2}'), ('\u{111c1}',
+        '\u{111c4}'), ('\u{111da}', '\u{111da}'), ('\u{11200}', '\u{11211}'), ('\u{11213}',
+        '\u{1122b}'), ('\u{112b0}', '\u{112de}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}',
+        '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'), ('\u{11332}',
+        '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133d}', '\u{1133d}'), ('\u{1135d}',
+        '\u{11361}'), ('\u{11480}', '\u{114af}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}',
+        '\u{114c7}'), ('\u{11580}', '\u{115ae}'), ('\u{11600}', '\u{1162f}'), ('\u{11644}',
+        '\u{11644}'), ('\u{11680}', '\u{116aa}'), ('\u{118a0}', '\u{118df}'), ('\u{118ff}',
+        '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'), ('\u{12000}', '\u{12398}'), ('\u{12400}',
+        '\u{1246e}'), ('\u{13000}', '\u{1342e}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}',
+        '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16b00}', '\u{16b2f}'), ('\u{16b40}',
+        '\u{16b43}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}',
+        '\u{16f44}'), ('\u{16f50}', '\u{16f50}'), ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}',
+        '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}',
+        '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'), ('\u{1d400}', '\u{1d454}'), ('\u{1d456}',
+        '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}',
+        '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}',
+        '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}',
+        '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}',
+        '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}',
+        '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}',
+        '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}',
+        '\u{1d714}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}',
+        '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}',
+        '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1e800}', '\u{1e8c4}'), ('\u{1ee00}',
+        '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}',
+        '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}',
+        '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}',
+        '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}',
+        '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}',
+        '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}',
+        '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}',
+        '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}',
+        '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}',
+        '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}',
+        '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}',
+        '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2f800}',
+        '\u{2fa1d}')
     ];
 
     pub fn XID_Start(c: char) -> bool {
@@ -2706,932 +2968,983 @@ pub fn XID_Start(c: char) -> bool {
 
 pub mod script {
     pub static Arabic_table: &'static [(char, char)] = &[
-        ('\u0600', '\u0604'), ('\u0606', '\u0608'), ('\u0609', '\u060a'), ('\u060b', '\u060b'),
-        ('\u060d', '\u060d'), ('\u060e', '\u060f'), ('\u0610', '\u061a'), ('\u061e', '\u061e'),
-        ('\u0620', '\u063f'), ('\u0641', '\u064a'), ('\u0656', '\u065f'), ('\u066a', '\u066d'),
-        ('\u066e', '\u066f'), ('\u0671', '\u06d3'), ('\u06d4', '\u06d4'), ('\u06d5', '\u06d5'),
-        ('\u06d6', '\u06dc'), ('\u06de', '\u06de'), ('\u06df', '\u06e4'), ('\u06e5', '\u06e6'),
-        ('\u06e7', '\u06e8'), ('\u06e9', '\u06e9'), ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'),
-        ('\u06f0', '\u06f9'), ('\u06fa', '\u06fc'), ('\u06fd', '\u06fe'), ('\u06ff', '\u06ff'),
-        ('\u0750', '\u077f'), ('\u08a0', '\u08b2'), ('\u08e4', '\u08ff'), ('\ufb50', '\ufbb1'),
-        ('\ufbb2', '\ufbc1'), ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'),
-        ('\ufdf0', '\ufdfb'), ('\ufdfc', '\ufdfc'), ('\ufdfd', '\ufdfd'), ('\ufe70', '\ufe74'),
-        ('\ufe76', '\ufefc'), ('\U00010e60', '\U00010e7e'), ('\U0001ee00', '\U0001ee03'),
-        ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'),
-        ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'),
-        ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'),
-        ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'),
-        ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'),
-        ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'),
-        ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'),
-        ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'),
-        ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'),
-        ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'),
-        ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), ('\U0001eef0', '\U0001eef1')
+        ('\u{600}', '\u{604}'), ('\u{606}', '\u{608}'), ('\u{609}', '\u{60a}'), ('\u{60b}',
+        '\u{60b}'), ('\u{60d}', '\u{60d}'), ('\u{60e}', '\u{60f}'), ('\u{610}', '\u{61a}'),
+        ('\u{61e}', '\u{61e}'), ('\u{620}', '\u{63f}'), ('\u{641}', '\u{64a}'), ('\u{656}',
+        '\u{65f}'), ('\u{66a}', '\u{66d}'), ('\u{66e}', '\u{66f}'), ('\u{671}', '\u{6d3}'),
+        ('\u{6d4}', '\u{6d4}'), ('\u{6d5}', '\u{6d5}'), ('\u{6d6}', '\u{6dc}'), ('\u{6de}',
+        '\u{6de}'), ('\u{6df}', '\u{6e4}'), ('\u{6e5}', '\u{6e6}'), ('\u{6e7}', '\u{6e8}'),
+        ('\u{6e9}', '\u{6e9}'), ('\u{6ea}', '\u{6ed}'), ('\u{6ee}', '\u{6ef}'), ('\u{6f0}',
+        '\u{6f9}'), ('\u{6fa}', '\u{6fc}'), ('\u{6fd}', '\u{6fe}'), ('\u{6ff}', '\u{6ff}'),
+        ('\u{750}', '\u{77f}'), ('\u{8a0}', '\u{8b2}'), ('\u{8e4}', '\u{8ff}'), ('\u{fb50}',
+        '\u{fbb1}'), ('\u{fbb2}', '\u{fbc1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'),
+        ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'), ('\u{fdfc}', '\u{fdfc}'), ('\u{fdfd}',
+        '\u{fdfd}'), ('\u{fe70}', '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{10e60}', '\u{10e7e}'),
+        ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'),
+        ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'),
+        ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'),
+        ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'),
+        ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'),
+        ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'),
+        ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'),
+        ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'),
+        ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'),
+        ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'),
+        ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'),
+        ('\u{1eef0}', '\u{1eef1}')
     ];
 
     pub static Armenian_table: &'static [(char, char)] = &[
-        ('\u0531', '\u0556'), ('\u0559', '\u0559'), ('\u055a', '\u055f'), ('\u0561', '\u0587'),
-        ('\u058a', '\u058a'), ('\u058d', '\u058e'), ('\u058f', '\u058f'), ('\ufb13', '\ufb17')
+        ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'), ('\u{55a}', '\u{55f}'), ('\u{561}',
+        '\u{587}'), ('\u{58a}', '\u{58a}'), ('\u{58d}', '\u{58e}'), ('\u{58f}', '\u{58f}'),
+        ('\u{fb13}', '\u{fb17}')
     ];
 
     pub static Avestan_table: &'static [(char, char)] = &[
-        ('\U00010b00', '\U00010b35'), ('\U00010b39', '\U00010b3f')
+        ('\u{10b00}', '\u{10b35}'), ('\u{10b39}', '\u{10b3f}')
     ];
 
     pub static Balinese_table: &'static [(char, char)] = &[
-        ('\u1b00', '\u1b03'), ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), ('\u1b34', '\u1b34'),
-        ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'),
-        ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), ('\u1b43', '\u1b44'), ('\u1b45', '\u1b4b'),
-        ('\u1b50', '\u1b59'), ('\u1b5a', '\u1b60'), ('\u1b61', '\u1b6a'), ('\u1b6b', '\u1b73'),
-        ('\u1b74', '\u1b7c')
+        ('\u{1b00}', '\u{1b03}'), ('\u{1b04}', '\u{1b04}'), ('\u{1b05}', '\u{1b33}'), ('\u{1b34}',
+        '\u{1b34}'), ('\u{1b35}', '\u{1b35}'), ('\u{1b36}', '\u{1b3a}'), ('\u{1b3b}', '\u{1b3b}'),
+        ('\u{1b3c}', '\u{1b3c}'), ('\u{1b3d}', '\u{1b41}'), ('\u{1b42}', '\u{1b42}'), ('\u{1b43}',
+        '\u{1b44}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b50}', '\u{1b59}'), ('\u{1b5a}', '\u{1b60}'),
+        ('\u{1b61}', '\u{1b6a}'), ('\u{1b6b}', '\u{1b73}'), ('\u{1b74}', '\u{1b7c}')
     ];
 
     pub static Bamum_table: &'static [(char, char)] = &[
-        ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), ('\ua6f0', '\ua6f1'), ('\ua6f2', '\ua6f7'),
-        ('\U00016800', '\U00016a38')
+        ('\u{a6a0}', '\u{a6e5}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a6f0}', '\u{a6f1}'), ('\u{a6f2}',
+        '\u{a6f7}'), ('\u{16800}', '\u{16a38}')
     ];
 
     pub static Bassa_Vah_table: &'static [(char, char)] = &[
-        ('\U00016ad0', '\U00016aed'), ('\U00016af0', '\U00016af4'), ('\U00016af5', '\U00016af5')
+        ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af4}'), ('\u{16af5}', '\u{16af5}')
     ];
 
     pub static Batak_table: &'static [(char, char)] = &[
-        ('\u1bc0', '\u1be5'), ('\u1be6', '\u1be6'), ('\u1be7', '\u1be7'), ('\u1be8', '\u1be9'),
-        ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), ('\u1bef', '\u1bf1'),
-        ('\u1bf2', '\u1bf3'), ('\u1bfc', '\u1bff')
+        ('\u{1bc0}', '\u{1be5}'), ('\u{1be6}', '\u{1be6}'), ('\u{1be7}', '\u{1be7}'), ('\u{1be8}',
+        '\u{1be9}'), ('\u{1bea}', '\u{1bec}'), ('\u{1bed}', '\u{1bed}'), ('\u{1bee}', '\u{1bee}'),
+        ('\u{1bef}', '\u{1bf1}'), ('\u{1bf2}', '\u{1bf3}'), ('\u{1bfc}', '\u{1bff}')
     ];
 
     pub static Bengali_table: &'static [(char, char)] = &[
-        ('\u0980', '\u0980'), ('\u0981', '\u0981'), ('\u0982', '\u0983'), ('\u0985', '\u098c'),
-        ('\u098f', '\u0990'), ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), ('\u09b2', '\u09b2'),
-        ('\u09b6', '\u09b9'), ('\u09bc', '\u09bc'), ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'),
-        ('\u09c1', '\u09c4'), ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), ('\u09cd', '\u09cd'),
-        ('\u09ce', '\u09ce'), ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'),
-        ('\u09e2', '\u09e3'), ('\u09e6', '\u09ef'), ('\u09f0', '\u09f1'), ('\u09f2', '\u09f3'),
-        ('\u09f4', '\u09f9'), ('\u09fa', '\u09fa'), ('\u09fb', '\u09fb')
+        ('\u{980}', '\u{980}'), ('\u{981}', '\u{981}'), ('\u{982}', '\u{983}'), ('\u{985}',
+        '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'),
+        ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'), ('\u{9bc}', '\u{9bc}'), ('\u{9bd}',
+        '\u{9bd}'), ('\u{9be}', '\u{9c0}'), ('\u{9c1}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'),
+        ('\u{9cb}', '\u{9cc}'), ('\u{9cd}', '\u{9cd}'), ('\u{9ce}', '\u{9ce}'), ('\u{9d7}',
+        '\u{9d7}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'), ('\u{9e2}', '\u{9e3}'),
+        ('\u{9e6}', '\u{9ef}'), ('\u{9f0}', '\u{9f1}'), ('\u{9f2}', '\u{9f3}'), ('\u{9f4}',
+        '\u{9f9}'), ('\u{9fa}', '\u{9fa}'), ('\u{9fb}', '\u{9fb}')
     ];
 
     pub static Bopomofo_table: &'static [(char, char)] = &[
-        ('\u02ea', '\u02eb'), ('\u3105', '\u312d'), ('\u31a0', '\u31ba')
+        ('\u{2ea}', '\u{2eb}'), ('\u{3105}', '\u{312d}'), ('\u{31a0}', '\u{31ba}')
     ];
 
     pub static Brahmi_table: &'static [(char, char)] = &[
-        ('\U00011000', '\U00011000'), ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'),
-        ('\U00011003', '\U00011037'), ('\U00011038', '\U00011046'), ('\U00011047', '\U0001104d'),
-        ('\U00011052', '\U00011065'), ('\U00011066', '\U0001106f'), ('\U0001107f', '\U0001107f')
+        ('\u{11000}', '\u{11000}'), ('\u{11001}', '\u{11001}'), ('\u{11002}', '\u{11002}'),
+        ('\u{11003}', '\u{11037}'), ('\u{11038}', '\u{11046}'), ('\u{11047}', '\u{1104d}'),
+        ('\u{11052}', '\u{11065}'), ('\u{11066}', '\u{1106f}'), ('\u{1107f}', '\u{1107f}')
     ];
 
     pub static Braille_table: &'static [(char, char)] = &[
-        ('\u2800', '\u28ff')
+        ('\u{2800}', '\u{28ff}')
     ];
 
     pub static Buginese_table: &'static [(char, char)] = &[
-        ('\u1a00', '\u1a16'), ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1a'), ('\u1a1b', '\u1a1b'),
-        ('\u1a1e', '\u1a1f')
+        ('\u{1a00}', '\u{1a16}'), ('\u{1a17}', '\u{1a18}'), ('\u{1a19}', '\u{1a1a}'), ('\u{1a1b}',
+        '\u{1a1b}'), ('\u{1a1e}', '\u{1a1f}')
     ];
 
     pub static Buhid_table: &'static [(char, char)] = &[
-        ('\u1740', '\u1751'), ('\u1752', '\u1753')
+        ('\u{1740}', '\u{1751}'), ('\u{1752}', '\u{1753}')
     ];
 
     pub static Canadian_Aboriginal_table: &'static [(char, char)] = &[
-        ('\u1400', '\u1400'), ('\u1401', '\u166c'), ('\u166d', '\u166e'), ('\u166f', '\u167f'),
-        ('\u18b0', '\u18f5')
+        ('\u{1400}', '\u{1400}'), ('\u{1401}', '\u{166c}'), ('\u{166d}', '\u{166e}'), ('\u{166f}',
+        '\u{167f}'), ('\u{18b0}', '\u{18f5}')
     ];
 
     pub static Carian_table: &'static [(char, char)] = &[
-        ('\U000102a0', '\U000102d0')
+        ('\u{102a0}', '\u{102d0}')
     ];
 
     pub static Caucasian_Albanian_table: &'static [(char, char)] = &[
-        ('\U00010530', '\U00010563'), ('\U0001056f', '\U0001056f')
+        ('\u{10530}', '\u{10563}'), ('\u{1056f}', '\u{1056f}')
     ];
 
     pub static Chakma_table: &'static [(char, char)] = &[
-        ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), ('\U00011127', '\U0001112b'),
-        ('\U0001112c', '\U0001112c'), ('\U0001112d', '\U00011134'), ('\U00011136', '\U0001113f'),
-        ('\U00011140', '\U00011143')
+        ('\u{11100}', '\u{11102}'), ('\u{11103}', '\u{11126}'), ('\u{11127}', '\u{1112b}'),
+        ('\u{1112c}', '\u{1112c}'), ('\u{1112d}', '\u{11134}'), ('\u{11136}', '\u{1113f}'),
+        ('\u{11140}', '\u{11143}')
     ];
 
     pub static Cham_table: &'static [(char, char)] = &[
-        ('\uaa00', '\uaa28'), ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'),
-        ('\uaa33', '\uaa34'), ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'),
-        ('\uaa44', '\uaa4b'), ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), ('\uaa50', '\uaa59'),
-        ('\uaa5c', '\uaa5f')
+        ('\u{aa00}', '\u{aa28}'), ('\u{aa29}', '\u{aa2e}'), ('\u{aa2f}', '\u{aa30}'), ('\u{aa31}',
+        '\u{aa32}'), ('\u{aa33}', '\u{aa34}'), ('\u{aa35}', '\u{aa36}'), ('\u{aa40}', '\u{aa42}'),
+        ('\u{aa43}', '\u{aa43}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa4c}', '\u{aa4c}'), ('\u{aa4d}',
+        '\u{aa4d}'), ('\u{aa50}', '\u{aa59}'), ('\u{aa5c}', '\u{aa5f}')
     ];
 
     pub static Cherokee_table: &'static [(char, char)] = &[
-        ('\u13a0', '\u13f4')
+        ('\u{13a0}', '\u{13f4}')
     ];
 
     pub static Common_table: &'static [(char, char)] = &[
-        ('\x00', '\x1f'), ('\x20', '\x20'), ('\x21', '\x23'), ('\x24', '\x24'), ('\x25', '\x27'),
-        ('\x28', '\x28'), ('\x29', '\x29'), ('\x2a', '\x2a'), ('\x2b', '\x2b'), ('\x2c', '\x2c'),
-        ('\x2d', '\x2d'), ('\x2e', '\x2f'), ('\x30', '\x39'), ('\x3a', '\x3b'), ('\x3c', '\x3e'),
-        ('\x3f', '\x40'), ('\x5b', '\x5b'), ('\x5c', '\x5c'), ('\x5d', '\x5d'), ('\x5e', '\x5e'),
-        ('\x5f', '\x5f'), ('\x60', '\x60'), ('\x7b', '\x7b'), ('\x7c', '\x7c'), ('\x7d', '\x7d'),
-        ('\x7e', '\x7e'), ('\x7f', '\u009f'), ('\u00a0', '\u00a0'), ('\u00a1', '\u00a1'), ('\u00a2',
-        '\u00a5'), ('\u00a6', '\u00a6'), ('\u00a7', '\u00a7'), ('\u00a8', '\u00a8'), ('\u00a9',
-        '\u00a9'), ('\u00ab', '\u00ab'), ('\u00ac', '\u00ac'), ('\u00ad', '\u00ad'), ('\u00ae',
-        '\u00ae'), ('\u00af', '\u00af'), ('\u00b0', '\u00b0'), ('\u00b1', '\u00b1'), ('\u00b2',
-        '\u00b3'), ('\u00b4', '\u00b4'), ('\u00b5', '\u00b5'), ('\u00b6', '\u00b7'), ('\u00b8',
-        '\u00b8'), ('\u00b9', '\u00b9'), ('\u00bb', '\u00bb'), ('\u00bc', '\u00be'), ('\u00bf',
-        '\u00bf'), ('\u00d7', '\u00d7'), ('\u00f7', '\u00f7'), ('\u02b9', '\u02c1'), ('\u02c2',
-        '\u02c5'), ('\u02c6', '\u02d1'), ('\u02d2', '\u02df'), ('\u02e5', '\u02e9'), ('\u02ec',
-        '\u02ec'), ('\u02ed', '\u02ed'), ('\u02ee', '\u02ee'), ('\u02ef', '\u02ff'), ('\u0374',
-        '\u0374'), ('\u037e', '\u037e'), ('\u0385', '\u0385'), ('\u0387', '\u0387'), ('\u0589',
-        '\u0589'), ('\u0605', '\u0605'), ('\u060c', '\u060c'), ('\u061b', '\u061b'), ('\u061c',
-        '\u061c'), ('\u061f', '\u061f'), ('\u0640', '\u0640'), ('\u0660', '\u0669'), ('\u06dd',
-        '\u06dd'), ('\u0964', '\u0965'), ('\u0e3f', '\u0e3f'), ('\u0fd5', '\u0fd8'), ('\u10fb',
-        '\u10fb'), ('\u16eb', '\u16ed'), ('\u1735', '\u1736'), ('\u1802', '\u1803'), ('\u1805',
-        '\u1805'), ('\u1cd3', '\u1cd3'), ('\u1ce1', '\u1ce1'), ('\u1ce9', '\u1cec'), ('\u1cee',
-        '\u1cf1'), ('\u1cf2', '\u1cf3'), ('\u1cf5', '\u1cf6'), ('\u2000', '\u200a'), ('\u200b',
-        '\u200b'), ('\u200e', '\u200f'), ('\u2010', '\u2015'), ('\u2016', '\u2017'), ('\u2018',
-        '\u2018'), ('\u2019', '\u2019'), ('\u201a', '\u201a'), ('\u201b', '\u201c'), ('\u201d',
-        '\u201d'), ('\u201e', '\u201e'), ('\u201f', '\u201f'), ('\u2020', '\u2027'), ('\u2028',
-        '\u2028'), ('\u2029', '\u2029'), ('\u202a', '\u202e'), ('\u202f', '\u202f'), ('\u2030',
-        '\u2038'), ('\u2039', '\u2039'), ('\u203a', '\u203a'), ('\u203b', '\u203e'), ('\u203f',
-        '\u2040'), ('\u2041', '\u2043'), ('\u2044', '\u2044'), ('\u2045', '\u2045'), ('\u2046',
-        '\u2046'), ('\u2047', '\u2051'), ('\u2052', '\u2052'), ('\u2053', '\u2053'), ('\u2054',
-        '\u2054'), ('\u2055', '\u205e'), ('\u205f', '\u205f'), ('\u2060', '\u2064'), ('\u2066',
-        '\u206f'), ('\u2070', '\u2070'), ('\u2074', '\u2079'), ('\u207a', '\u207c'), ('\u207d',
-        '\u207d'), ('\u207e', '\u207e'), ('\u2080', '\u2089'), ('\u208a', '\u208c'), ('\u208d',
-        '\u208d'), ('\u208e', '\u208e'), ('\u20a0', '\u20bd'), ('\u2100', '\u2101'), ('\u2102',
-        '\u2102'), ('\u2103', '\u2106'), ('\u2107', '\u2107'), ('\u2108', '\u2109'), ('\u210a',
-        '\u2113'), ('\u2114', '\u2114'), ('\u2115', '\u2115'), ('\u2116', '\u2117'), ('\u2118',
-        '\u2118'), ('\u2119', '\u211d'), ('\u211e', '\u2123'), ('\u2124', '\u2124'), ('\u2125',
-        '\u2125'), ('\u2127', '\u2127'), ('\u2128', '\u2128'), ('\u2129', '\u2129'), ('\u212c',
-        '\u212d'), ('\u212e', '\u212e'), ('\u212f', '\u2131'), ('\u2133', '\u2134'), ('\u2135',
-        '\u2138'), ('\u2139', '\u2139'), ('\u213a', '\u213b'), ('\u213c', '\u213f'), ('\u2140',
-        '\u2144'), ('\u2145', '\u2149'), ('\u214a', '\u214a'), ('\u214b', '\u214b'), ('\u214c',
-        '\u214d'), ('\u214f', '\u214f'), ('\u2150', '\u215f'), ('\u2189', '\u2189'), ('\u2190',
-        '\u2194'), ('\u2195', '\u2199'), ('\u219a', '\u219b'), ('\u219c', '\u219f'), ('\u21a0',
-        '\u21a0'), ('\u21a1', '\u21a2'), ('\u21a3', '\u21a3'), ('\u21a4', '\u21a5'), ('\u21a6',
-        '\u21a6'), ('\u21a7', '\u21ad'), ('\u21ae', '\u21ae'), ('\u21af', '\u21cd'), ('\u21ce',
-        '\u21cf'), ('\u21d0', '\u21d1'), ('\u21d2', '\u21d2'), ('\u21d3', '\u21d3'), ('\u21d4',
-        '\u21d4'), ('\u21d5', '\u21f3'), ('\u21f4', '\u22ff'), ('\u2300', '\u2307'), ('\u2308',
-        '\u2308'), ('\u2309', '\u2309'), ('\u230a', '\u230a'), ('\u230b', '\u230b'), ('\u230c',
-        '\u231f'), ('\u2320', '\u2321'), ('\u2322', '\u2328'), ('\u2329', '\u2329'), ('\u232a',
-        '\u232a'), ('\u232b', '\u237b'), ('\u237c', '\u237c'), ('\u237d', '\u239a'), ('\u239b',
-        '\u23b3'), ('\u23b4', '\u23db'), ('\u23dc', '\u23e1'), ('\u23e2', '\u23fa'), ('\u2400',
-        '\u2426'), ('\u2440', '\u244a'), ('\u2460', '\u249b'), ('\u249c', '\u24e9'), ('\u24ea',
-        '\u24ff'), ('\u2500', '\u25b6'), ('\u25b7', '\u25b7'), ('\u25b8', '\u25c0'), ('\u25c1',
-        '\u25c1'), ('\u25c2', '\u25f7'), ('\u25f8', '\u25ff'), ('\u2600', '\u266e'), ('\u266f',
-        '\u266f'), ('\u2670', '\u2767'), ('\u2768', '\u2768'), ('\u2769', '\u2769'), ('\u276a',
-        '\u276a'), ('\u276b', '\u276b'), ('\u276c', '\u276c'), ('\u276d', '\u276d'), ('\u276e',
-        '\u276e'), ('\u276f', '\u276f'), ('\u2770', '\u2770'), ('\u2771', '\u2771'), ('\u2772',
-        '\u2772'), ('\u2773', '\u2773'), ('\u2774', '\u2774'), ('\u2775', '\u2775'), ('\u2776',
-        '\u2793'), ('\u2794', '\u27bf'), ('\u27c0', '\u27c4'), ('\u27c5', '\u27c5'), ('\u27c6',
-        '\u27c6'), ('\u27c7', '\u27e5'), ('\u27e6', '\u27e6'), ('\u27e7', '\u27e7'), ('\u27e8',
-        '\u27e8'), ('\u27e9', '\u27e9'), ('\u27ea', '\u27ea'), ('\u27eb', '\u27eb'), ('\u27ec',
-        '\u27ec'), ('\u27ed', '\u27ed'), ('\u27ee', '\u27ee'), ('\u27ef', '\u27ef'), ('\u27f0',
-        '\u27ff'), ('\u2900', '\u2982'), ('\u2983', '\u2983'), ('\u2984', '\u2984'), ('\u2985',
-        '\u2985'), ('\u2986', '\u2986'), ('\u2987', '\u2987'), ('\u2988', '\u2988'), ('\u2989',
-        '\u2989'), ('\u298a', '\u298a'), ('\u298b', '\u298b'), ('\u298c', '\u298c'), ('\u298d',
-        '\u298d'), ('\u298e', '\u298e'), ('\u298f', '\u298f'), ('\u2990', '\u2990'), ('\u2991',
-        '\u2991'), ('\u2992', '\u2992'), ('\u2993', '\u2993'), ('\u2994', '\u2994'), ('\u2995',
-        '\u2995'), ('\u2996', '\u2996'), ('\u2997', '\u2997'), ('\u2998', '\u2998'), ('\u2999',
-        '\u29d7'), ('\u29d8', '\u29d8'), ('\u29d9', '\u29d9'), ('\u29da', '\u29da'), ('\u29db',
-        '\u29db'), ('\u29dc', '\u29fb'), ('\u29fc', '\u29fc'), ('\u29fd', '\u29fd'), ('\u29fe',
-        '\u2aff'), ('\u2b00', '\u2b2f'), ('\u2b30', '\u2b44'), ('\u2b45', '\u2b46'), ('\u2b47',
-        '\u2b4c'), ('\u2b4d', '\u2b73'), ('\u2b76', '\u2b95'), ('\u2b98', '\u2bb9'), ('\u2bbd',
-        '\u2bc8'), ('\u2bca', '\u2bd1'), ('\u2e00', '\u2e01'), ('\u2e02', '\u2e02'), ('\u2e03',
-        '\u2e03'), ('\u2e04', '\u2e04'), ('\u2e05', '\u2e05'), ('\u2e06', '\u2e08'), ('\u2e09',
-        '\u2e09'), ('\u2e0a', '\u2e0a'), ('\u2e0b', '\u2e0b'), ('\u2e0c', '\u2e0c'), ('\u2e0d',
-        '\u2e0d'), ('\u2e0e', '\u2e16'), ('\u2e17', '\u2e17'), ('\u2e18', '\u2e19'), ('\u2e1a',
-        '\u2e1a'), ('\u2e1b', '\u2e1b'), ('\u2e1c', '\u2e1c'), ('\u2e1d', '\u2e1d'), ('\u2e1e',
-        '\u2e1f'), ('\u2e20', '\u2e20'), ('\u2e21', '\u2e21'), ('\u2e22', '\u2e22'), ('\u2e23',
-        '\u2e23'), ('\u2e24', '\u2e24'), ('\u2e25', '\u2e25'), ('\u2e26', '\u2e26'), ('\u2e27',
-        '\u2e27'), ('\u2e28', '\u2e28'), ('\u2e29', '\u2e29'), ('\u2e2a', '\u2e2e'), ('\u2e2f',
-        '\u2e2f'), ('\u2e30', '\u2e39'), ('\u2e3a', '\u2e3b'), ('\u2e3c', '\u2e3f'), ('\u2e40',
-        '\u2e40'), ('\u2e41', '\u2e41'), ('\u2e42', '\u2e42'), ('\u2ff0', '\u2ffb'), ('\u3000',
-        '\u3000'), ('\u3001', '\u3003'), ('\u3004', '\u3004'), ('\u3006', '\u3006'), ('\u3008',
-        '\u3008'), ('\u3009', '\u3009'), ('\u300a', '\u300a'), ('\u300b', '\u300b'), ('\u300c',
-        '\u300c'), ('\u300d', '\u300d'), ('\u300e', '\u300e'), ('\u300f', '\u300f'), ('\u3010',
-        '\u3010'), ('\u3011', '\u3011'), ('\u3012', '\u3013'), ('\u3014', '\u3014'), ('\u3015',
-        '\u3015'), ('\u3016', '\u3016'), ('\u3017', '\u3017'), ('\u3018', '\u3018'), ('\u3019',
-        '\u3019'), ('\u301a', '\u301a'), ('\u301b', '\u301b'), ('\u301c', '\u301c'), ('\u301d',
-        '\u301d'), ('\u301e', '\u301f'), ('\u3020', '\u3020'), ('\u3030', '\u3030'), ('\u3031',
-        '\u3035'), ('\u3036', '\u3037'), ('\u303c', '\u303c'), ('\u303d', '\u303d'), ('\u303e',
-        '\u303f'), ('\u309b', '\u309c'), ('\u30a0', '\u30a0'), ('\u30fb', '\u30fb'), ('\u30fc',
-        '\u30fc'), ('\u3190', '\u3191'), ('\u3192', '\u3195'), ('\u3196', '\u319f'), ('\u31c0',
-        '\u31e3'), ('\u3220', '\u3229'), ('\u322a', '\u3247'), ('\u3248', '\u324f'), ('\u3250',
-        '\u3250'), ('\u3251', '\u325f'), ('\u327f', '\u327f'), ('\u3280', '\u3289'), ('\u328a',
-        '\u32b0'), ('\u32b1', '\u32bf'), ('\u32c0', '\u32cf'), ('\u3358', '\u33ff'), ('\u4dc0',
-        '\u4dff'), ('\ua700', '\ua716'), ('\ua717', '\ua71f'), ('\ua720', '\ua721'), ('\ua788',
-        '\ua788'), ('\ua789', '\ua78a'), ('\ua830', '\ua835'), ('\ua836', '\ua837'), ('\ua838',
-        '\ua838'), ('\ua839', '\ua839'), ('\ua92e', '\ua92e'), ('\ua9cf', '\ua9cf'), ('\uab5b',
-        '\uab5b'), ('\ufd3e', '\ufd3e'), ('\ufd3f', '\ufd3f'), ('\ufe10', '\ufe16'), ('\ufe17',
-        '\ufe17'), ('\ufe18', '\ufe18'), ('\ufe19', '\ufe19'), ('\ufe30', '\ufe30'), ('\ufe31',
-        '\ufe32'), ('\ufe33', '\ufe34'), ('\ufe35', '\ufe35'), ('\ufe36', '\ufe36'), ('\ufe37',
-        '\ufe37'), ('\ufe38', '\ufe38'), ('\ufe39', '\ufe39'), ('\ufe3a', '\ufe3a'), ('\ufe3b',
-        '\ufe3b'), ('\ufe3c', '\ufe3c'), ('\ufe3d', '\ufe3d'), ('\ufe3e', '\ufe3e'), ('\ufe3f',
-        '\ufe3f'), ('\ufe40', '\ufe40'), ('\ufe41', '\ufe41'), ('\ufe42', '\ufe42'), ('\ufe43',
-        '\ufe43'), ('\ufe44', '\ufe44'), ('\ufe45', '\ufe46'), ('\ufe47', '\ufe47'), ('\ufe48',
-        '\ufe48'), ('\ufe49', '\ufe4c'), ('\ufe4d', '\ufe4f'), ('\ufe50', '\ufe52'), ('\ufe54',
-        '\ufe57'), ('\ufe58', '\ufe58'), ('\ufe59', '\ufe59'), ('\ufe5a', '\ufe5a'), ('\ufe5b',
-        '\ufe5b'), ('\ufe5c', '\ufe5c'), ('\ufe5d', '\ufe5d'), ('\ufe5e', '\ufe5e'), ('\ufe5f',
-        '\ufe61'), ('\ufe62', '\ufe62'), ('\ufe63', '\ufe63'), ('\ufe64', '\ufe66'), ('\ufe68',
-        '\ufe68'), ('\ufe69', '\ufe69'), ('\ufe6a', '\ufe6b'), ('\ufeff', '\ufeff'), ('\uff01',
-        '\uff03'), ('\uff04', '\uff04'), ('\uff05', '\uff07'), ('\uff08', '\uff08'), ('\uff09',
-        '\uff09'), ('\uff0a', '\uff0a'), ('\uff0b', '\uff0b'), ('\uff0c', '\uff0c'), ('\uff0d',
-        '\uff0d'), ('\uff0e', '\uff0f'), ('\uff10', '\uff19'), ('\uff1a', '\uff1b'), ('\uff1c',
-        '\uff1e'), ('\uff1f', '\uff20'), ('\uff3b', '\uff3b'), ('\uff3c', '\uff3c'), ('\uff3d',
-        '\uff3d'), ('\uff3e', '\uff3e'), ('\uff3f', '\uff3f'), ('\uff40', '\uff40'), ('\uff5b',
-        '\uff5b'), ('\uff5c', '\uff5c'), ('\uff5d', '\uff5d'), ('\uff5e', '\uff5e'), ('\uff5f',
-        '\uff5f'), ('\uff60', '\uff60'), ('\uff61', '\uff61'), ('\uff62', '\uff62'), ('\uff63',
-        '\uff63'), ('\uff64', '\uff65'), ('\uff70', '\uff70'), ('\uff9e', '\uff9f'), ('\uffe0',
-        '\uffe1'), ('\uffe2', '\uffe2'), ('\uffe3', '\uffe3'), ('\uffe4', '\uffe4'), ('\uffe5',
-        '\uffe6'), ('\uffe8', '\uffe8'), ('\uffe9', '\uffec'), ('\uffed', '\uffee'), ('\ufff9',
-        '\ufffb'), ('\ufffc', '\ufffd'), ('\U00010100', '\U00010102'), ('\U00010107', '\U00010133'),
-        ('\U00010137', '\U0001013f'), ('\U00010190', '\U0001019b'), ('\U000101d0', '\U000101fc'),
-        ('\U000102e1', '\U000102fb'), ('\U0001bca0', '\U0001bca3'), ('\U0001d000', '\U0001d0f5'),
-        ('\U0001d100', '\U0001d126'), ('\U0001d129', '\U0001d164'), ('\U0001d165', '\U0001d166'),
-        ('\U0001d16a', '\U0001d16c'), ('\U0001d16d', '\U0001d172'), ('\U0001d173', '\U0001d17a'),
-        ('\U0001d183', '\U0001d184'), ('\U0001d18c', '\U0001d1a9'), ('\U0001d1ae', '\U0001d1dd'),
-        ('\U0001d300', '\U0001d356'), ('\U0001d360', '\U0001d371'), ('\U0001d400', '\U0001d454'),
-        ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'),
-        ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'),
-        ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'),
-        ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'),
-        ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'),
-        ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'),
-        ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c1', '\U0001d6c1'), ('\U0001d6c2', '\U0001d6da'),
-        ('\U0001d6db', '\U0001d6db'), ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fb', '\U0001d6fb'),
-        ('\U0001d6fc', '\U0001d714'), ('\U0001d715', '\U0001d715'), ('\U0001d716', '\U0001d734'),
-        ('\U0001d735', '\U0001d735'), ('\U0001d736', '\U0001d74e'), ('\U0001d74f', '\U0001d74f'),
-        ('\U0001d750', '\U0001d76e'), ('\U0001d76f', '\U0001d76f'), ('\U0001d770', '\U0001d788'),
-        ('\U0001d789', '\U0001d789'), ('\U0001d78a', '\U0001d7a8'), ('\U0001d7a9', '\U0001d7a9'),
-        ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c3', '\U0001d7c3'), ('\U0001d7c4', '\U0001d7cb'),
-        ('\U0001d7ce', '\U0001d7ff'), ('\U0001f000', '\U0001f02b'), ('\U0001f030', '\U0001f093'),
-        ('\U0001f0a0', '\U0001f0ae'), ('\U0001f0b1', '\U0001f0bf'), ('\U0001f0c1', '\U0001f0cf'),
-        ('\U0001f0d1', '\U0001f0f5'), ('\U0001f100', '\U0001f10c'), ('\U0001f110', '\U0001f12e'),
-        ('\U0001f130', '\U0001f16b'), ('\U0001f170', '\U0001f19a'), ('\U0001f1e6', '\U0001f1ff'),
-        ('\U0001f201', '\U0001f202'), ('\U0001f210', '\U0001f23a'), ('\U0001f240', '\U0001f248'),
-        ('\U0001f250', '\U0001f251'), ('\U0001f300', '\U0001f32c'), ('\U0001f330', '\U0001f37d'),
-        ('\U0001f380', '\U0001f3ce'), ('\U0001f3d4', '\U0001f3f7'), ('\U0001f400', '\U0001f4fe'),
-        ('\U0001f500', '\U0001f54a'), ('\U0001f550', '\U0001f579'), ('\U0001f57b', '\U0001f5a3'),
-        ('\U0001f5a5', '\U0001f642'), ('\U0001f645', '\U0001f6cf'), ('\U0001f6e0', '\U0001f6ec'),
-        ('\U0001f6f0', '\U0001f6f3'), ('\U0001f700', '\U0001f773'), ('\U0001f780', '\U0001f7d4'),
-        ('\U0001f800', '\U0001f80b'), ('\U0001f810', '\U0001f847'), ('\U0001f850', '\U0001f859'),
-        ('\U0001f860', '\U0001f887'), ('\U0001f890', '\U0001f8ad'), ('\U000e0001', '\U000e0001'),
-        ('\U000e0020', '\U000e007f')
+        ('\u{0}', '\u{1f}'), ('\u{20}', '\u{20}'), ('\u{21}', '\u{23}'), ('\u{24}', '\u{24}'),
+        ('\u{25}', '\u{27}'), ('\u{28}', '\u{28}'), ('\u{29}', '\u{29}'), ('\u{2a}', '\u{2a}'),
+        ('\u{2b}', '\u{2b}'), ('\u{2c}', '\u{2c}'), ('\u{2d}', '\u{2d}'), ('\u{2e}', '\u{2f}'),
+        ('\u{30}', '\u{39}'), ('\u{3a}', '\u{3b}'), ('\u{3c}', '\u{3e}'), ('\u{3f}', '\u{40}'),
+        ('\u{5b}', '\u{5b}'), ('\u{5c}', '\u{5c}'), ('\u{5d}', '\u{5d}'), ('\u{5e}', '\u{5e}'),
+        ('\u{5f}', '\u{5f}'), ('\u{60}', '\u{60}'), ('\u{7b}', '\u{7b}'), ('\u{7c}', '\u{7c}'),
+        ('\u{7d}', '\u{7d}'), ('\u{7e}', '\u{7e}'), ('\u{7f}', '\u{9f}'), ('\u{a0}', '\u{a0}'),
+        ('\u{a1}', '\u{a1}'), ('\u{a2}', '\u{a5}'), ('\u{a6}', '\u{a6}'), ('\u{a7}', '\u{a7}'),
+        ('\u{a8}', '\u{a8}'), ('\u{a9}', '\u{a9}'), ('\u{ab}', '\u{ab}'), ('\u{ac}', '\u{ac}'),
+        ('\u{ad}', '\u{ad}'), ('\u{ae}', '\u{ae}'), ('\u{af}', '\u{af}'), ('\u{b0}', '\u{b0}'),
+        ('\u{b1}', '\u{b1}'), ('\u{b2}', '\u{b3}'), ('\u{b4}', '\u{b4}'), ('\u{b5}', '\u{b5}'),
+        ('\u{b6}', '\u{b7}'), ('\u{b8}', '\u{b8}'), ('\u{b9}', '\u{b9}'), ('\u{bb}', '\u{bb}'),
+        ('\u{bc}', '\u{be}'), ('\u{bf}', '\u{bf}'), ('\u{d7}', '\u{d7}'), ('\u{f7}', '\u{f7}'),
+        ('\u{2b9}', '\u{2c1}'), ('\u{2c2}', '\u{2c5}'), ('\u{2c6}', '\u{2d1}'), ('\u{2d2}',
+        '\u{2df}'), ('\u{2e5}', '\u{2e9}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ed}', '\u{2ed}'),
+        ('\u{2ee}', '\u{2ee}'), ('\u{2ef}', '\u{2ff}'), ('\u{374}', '\u{374}'), ('\u{37e}',
+        '\u{37e}'), ('\u{385}', '\u{385}'), ('\u{387}', '\u{387}'), ('\u{589}', '\u{589}'),
+        ('\u{605}', '\u{605}'), ('\u{60c}', '\u{60c}'), ('\u{61b}', '\u{61b}'), ('\u{61c}',
+        '\u{61c}'), ('\u{61f}', '\u{61f}'), ('\u{640}', '\u{640}'), ('\u{660}', '\u{669}'),
+        ('\u{6dd}', '\u{6dd}'), ('\u{964}', '\u{965}'), ('\u{e3f}', '\u{e3f}'), ('\u{fd5}',
+        '\u{fd8}'), ('\u{10fb}', '\u{10fb}'), ('\u{16eb}', '\u{16ed}'), ('\u{1735}', '\u{1736}'),
+        ('\u{1802}', '\u{1803}'), ('\u{1805}', '\u{1805}'), ('\u{1cd3}', '\u{1cd3}'), ('\u{1ce1}',
+        '\u{1ce1}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf2}', '\u{1cf3}'),
+        ('\u{1cf5}', '\u{1cf6}'), ('\u{2000}', '\u{200a}'), ('\u{200b}', '\u{200b}'), ('\u{200e}',
+        '\u{200f}'), ('\u{2010}', '\u{2015}'), ('\u{2016}', '\u{2017}'), ('\u{2018}', '\u{2018}'),
+        ('\u{2019}', '\u{2019}'), ('\u{201a}', '\u{201a}'), ('\u{201b}', '\u{201c}'), ('\u{201d}',
+        '\u{201d}'), ('\u{201e}', '\u{201e}'), ('\u{201f}', '\u{201f}'), ('\u{2020}', '\u{2027}'),
+        ('\u{2028}', '\u{2028}'), ('\u{2029}', '\u{2029}'), ('\u{202a}', '\u{202e}'), ('\u{202f}',
+        '\u{202f}'), ('\u{2030}', '\u{2038}'), ('\u{2039}', '\u{2039}'), ('\u{203a}', '\u{203a}'),
+        ('\u{203b}', '\u{203e}'), ('\u{203f}', '\u{2040}'), ('\u{2041}', '\u{2043}'), ('\u{2044}',
+        '\u{2044}'), ('\u{2045}', '\u{2045}'), ('\u{2046}', '\u{2046}'), ('\u{2047}', '\u{2051}'),
+        ('\u{2052}', '\u{2052}'), ('\u{2053}', '\u{2053}'), ('\u{2054}', '\u{2054}'), ('\u{2055}',
+        '\u{205e}'), ('\u{205f}', '\u{205f}'), ('\u{2060}', '\u{2064}'), ('\u{2066}', '\u{206f}'),
+        ('\u{2070}', '\u{2070}'), ('\u{2074}', '\u{2079}'), ('\u{207a}', '\u{207c}'), ('\u{207d}',
+        '\u{207d}'), ('\u{207e}', '\u{207e}'), ('\u{2080}', '\u{2089}'), ('\u{208a}', '\u{208c}'),
+        ('\u{208d}', '\u{208d}'), ('\u{208e}', '\u{208e}'), ('\u{20a0}', '\u{20bd}'), ('\u{2100}',
+        '\u{2101}'), ('\u{2102}', '\u{2102}'), ('\u{2103}', '\u{2106}'), ('\u{2107}', '\u{2107}'),
+        ('\u{2108}', '\u{2109}'), ('\u{210a}', '\u{2113}'), ('\u{2114}', '\u{2114}'), ('\u{2115}',
+        '\u{2115}'), ('\u{2116}', '\u{2117}'), ('\u{2118}', '\u{2118}'), ('\u{2119}', '\u{211d}'),
+        ('\u{211e}', '\u{2123}'), ('\u{2124}', '\u{2124}'), ('\u{2125}', '\u{2125}'), ('\u{2127}',
+        '\u{2127}'), ('\u{2128}', '\u{2128}'), ('\u{2129}', '\u{2129}'), ('\u{212c}', '\u{212d}'),
+        ('\u{212e}', '\u{212e}'), ('\u{212f}', '\u{2131}'), ('\u{2133}', '\u{2134}'), ('\u{2135}',
+        '\u{2138}'), ('\u{2139}', '\u{2139}'), ('\u{213a}', '\u{213b}'), ('\u{213c}', '\u{213f}'),
+        ('\u{2140}', '\u{2144}'), ('\u{2145}', '\u{2149}'), ('\u{214a}', '\u{214a}'), ('\u{214b}',
+        '\u{214b}'), ('\u{214c}', '\u{214d}'), ('\u{214f}', '\u{214f}'), ('\u{2150}', '\u{215f}'),
+        ('\u{2189}', '\u{2189}'), ('\u{2190}', '\u{2194}'), ('\u{2195}', '\u{2199}'), ('\u{219a}',
+        '\u{219b}'), ('\u{219c}', '\u{219f}'), ('\u{21a0}', '\u{21a0}'), ('\u{21a1}', '\u{21a2}'),
+        ('\u{21a3}', '\u{21a3}'), ('\u{21a4}', '\u{21a5}'), ('\u{21a6}', '\u{21a6}'), ('\u{21a7}',
+        '\u{21ad}'), ('\u{21ae}', '\u{21ae}'), ('\u{21af}', '\u{21cd}'), ('\u{21ce}', '\u{21cf}'),
+        ('\u{21d0}', '\u{21d1}'), ('\u{21d2}', '\u{21d2}'), ('\u{21d3}', '\u{21d3}'), ('\u{21d4}',
+        '\u{21d4}'), ('\u{21d5}', '\u{21f3}'), ('\u{21f4}', '\u{22ff}'), ('\u{2300}', '\u{2307}'),
+        ('\u{2308}', '\u{2308}'), ('\u{2309}', '\u{2309}'), ('\u{230a}', '\u{230a}'), ('\u{230b}',
+        '\u{230b}'), ('\u{230c}', '\u{231f}'), ('\u{2320}', '\u{2321}'), ('\u{2322}', '\u{2328}'),
+        ('\u{2329}', '\u{2329}'), ('\u{232a}', '\u{232a}'), ('\u{232b}', '\u{237b}'), ('\u{237c}',
+        '\u{237c}'), ('\u{237d}', '\u{239a}'), ('\u{239b}', '\u{23b3}'), ('\u{23b4}', '\u{23db}'),
+        ('\u{23dc}', '\u{23e1}'), ('\u{23e2}', '\u{23fa}'), ('\u{2400}', '\u{2426}'), ('\u{2440}',
+        '\u{244a}'), ('\u{2460}', '\u{249b}'), ('\u{249c}', '\u{24e9}'), ('\u{24ea}', '\u{24ff}'),
+        ('\u{2500}', '\u{25b6}'), ('\u{25b7}', '\u{25b7}'), ('\u{25b8}', '\u{25c0}'), ('\u{25c1}',
+        '\u{25c1}'), ('\u{25c2}', '\u{25f7}'), ('\u{25f8}', '\u{25ff}'), ('\u{2600}', '\u{266e}'),
+        ('\u{266f}', '\u{266f}'), ('\u{2670}', '\u{2767}'), ('\u{2768}', '\u{2768}'), ('\u{2769}',
+        '\u{2769}'), ('\u{276a}', '\u{276a}'), ('\u{276b}', '\u{276b}'), ('\u{276c}', '\u{276c}'),
+        ('\u{276d}', '\u{276d}'), ('\u{276e}', '\u{276e}'), ('\u{276f}', '\u{276f}'), ('\u{2770}',
+        '\u{2770}'), ('\u{2771}', '\u{2771}'), ('\u{2772}', '\u{2772}'), ('\u{2773}', '\u{2773}'),
+        ('\u{2774}', '\u{2774}'), ('\u{2775}', '\u{2775}'), ('\u{2776}', '\u{2793}'), ('\u{2794}',
+        '\u{27bf}'), ('\u{27c0}', '\u{27c4}'), ('\u{27c5}', '\u{27c5}'), ('\u{27c6}', '\u{27c6}'),
+        ('\u{27c7}', '\u{27e5}'), ('\u{27e6}', '\u{27e6}'), ('\u{27e7}', '\u{27e7}'), ('\u{27e8}',
+        '\u{27e8}'), ('\u{27e9}', '\u{27e9}'), ('\u{27ea}', '\u{27ea}'), ('\u{27eb}', '\u{27eb}'),
+        ('\u{27ec}', '\u{27ec}'), ('\u{27ed}', '\u{27ed}'), ('\u{27ee}', '\u{27ee}'), ('\u{27ef}',
+        '\u{27ef}'), ('\u{27f0}', '\u{27ff}'), ('\u{2900}', '\u{2982}'), ('\u{2983}', '\u{2983}'),
+        ('\u{2984}', '\u{2984}'), ('\u{2985}', '\u{2985}'), ('\u{2986}', '\u{2986}'), ('\u{2987}',
+        '\u{2987}'), ('\u{2988}', '\u{2988}'), ('\u{2989}', '\u{2989}'), ('\u{298a}', '\u{298a}'),
+        ('\u{298b}', '\u{298b}'), ('\u{298c}', '\u{298c}'), ('\u{298d}', '\u{298d}'), ('\u{298e}',
+        '\u{298e}'), ('\u{298f}', '\u{298f}'), ('\u{2990}', '\u{2990}'), ('\u{2991}', '\u{2991}'),
+        ('\u{2992}', '\u{2992}'), ('\u{2993}', '\u{2993}'), ('\u{2994}', '\u{2994}'), ('\u{2995}',
+        '\u{2995}'), ('\u{2996}', '\u{2996}'), ('\u{2997}', '\u{2997}'), ('\u{2998}', '\u{2998}'),
+        ('\u{2999}', '\u{29d7}'), ('\u{29d8}', '\u{29d8}'), ('\u{29d9}', '\u{29d9}'), ('\u{29da}',
+        '\u{29da}'), ('\u{29db}', '\u{29db}'), ('\u{29dc}', '\u{29fb}'), ('\u{29fc}', '\u{29fc}'),
+        ('\u{29fd}', '\u{29fd}'), ('\u{29fe}', '\u{2aff}'), ('\u{2b00}', '\u{2b2f}'), ('\u{2b30}',
+        '\u{2b44}'), ('\u{2b45}', '\u{2b46}'), ('\u{2b47}', '\u{2b4c}'), ('\u{2b4d}', '\u{2b73}'),
+        ('\u{2b76}', '\u{2b95}'), ('\u{2b98}', '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'), ('\u{2bca}',
+        '\u{2bd1}'), ('\u{2e00}', '\u{2e01}'), ('\u{2e02}', '\u{2e02}'), ('\u{2e03}', '\u{2e03}'),
+        ('\u{2e04}', '\u{2e04}'), ('\u{2e05}', '\u{2e05}'), ('\u{2e06}', '\u{2e08}'), ('\u{2e09}',
+        '\u{2e09}'), ('\u{2e0a}', '\u{2e0a}'), ('\u{2e0b}', '\u{2e0b}'), ('\u{2e0c}', '\u{2e0c}'),
+        ('\u{2e0d}', '\u{2e0d}'), ('\u{2e0e}', '\u{2e16}'), ('\u{2e17}', '\u{2e17}'), ('\u{2e18}',
+        '\u{2e19}'), ('\u{2e1a}', '\u{2e1a}'), ('\u{2e1b}', '\u{2e1b}'), ('\u{2e1c}', '\u{2e1c}'),
+        ('\u{2e1d}', '\u{2e1d}'), ('\u{2e1e}', '\u{2e1f}'), ('\u{2e20}', '\u{2e20}'), ('\u{2e21}',
+        '\u{2e21}'), ('\u{2e22}', '\u{2e22}'), ('\u{2e23}', '\u{2e23}'), ('\u{2e24}', '\u{2e24}'),
+        ('\u{2e25}', '\u{2e25}'), ('\u{2e26}', '\u{2e26}'), ('\u{2e27}', '\u{2e27}'), ('\u{2e28}',
+        '\u{2e28}'), ('\u{2e29}', '\u{2e29}'), ('\u{2e2a}', '\u{2e2e}'), ('\u{2e2f}', '\u{2e2f}'),
+        ('\u{2e30}', '\u{2e39}'), ('\u{2e3a}', '\u{2e3b}'), ('\u{2e3c}', '\u{2e3f}'), ('\u{2e40}',
+        '\u{2e40}'), ('\u{2e41}', '\u{2e41}'), ('\u{2e42}', '\u{2e42}'), ('\u{2ff0}', '\u{2ffb}'),
+        ('\u{3000}', '\u{3000}'), ('\u{3001}', '\u{3003}'), ('\u{3004}', '\u{3004}'), ('\u{3006}',
+        '\u{3006}'), ('\u{3008}', '\u{3008}'), ('\u{3009}', '\u{3009}'), ('\u{300a}', '\u{300a}'),
+        ('\u{300b}', '\u{300b}'), ('\u{300c}', '\u{300c}'), ('\u{300d}', '\u{300d}'), ('\u{300e}',
+        '\u{300e}'), ('\u{300f}', '\u{300f}'), ('\u{3010}', '\u{3010}'), ('\u{3011}', '\u{3011}'),
+        ('\u{3012}', '\u{3013}'), ('\u{3014}', '\u{3014}'), ('\u{3015}', '\u{3015}'), ('\u{3016}',
+        '\u{3016}'), ('\u{3017}', '\u{3017}'), ('\u{3018}', '\u{3018}'), ('\u{3019}', '\u{3019}'),
+        ('\u{301a}', '\u{301a}'), ('\u{301b}', '\u{301b}'), ('\u{301c}', '\u{301c}'), ('\u{301d}',
+        '\u{301d}'), ('\u{301e}', '\u{301f}'), ('\u{3020}', '\u{3020}'), ('\u{3030}', '\u{3030}'),
+        ('\u{3031}', '\u{3035}'), ('\u{3036}', '\u{3037}'), ('\u{303c}', '\u{303c}'), ('\u{303d}',
+        '\u{303d}'), ('\u{303e}', '\u{303f}'), ('\u{309b}', '\u{309c}'), ('\u{30a0}', '\u{30a0}'),
+        ('\u{30fb}', '\u{30fb}'), ('\u{30fc}', '\u{30fc}'), ('\u{3190}', '\u{3191}'), ('\u{3192}',
+        '\u{3195}'), ('\u{3196}', '\u{319f}'), ('\u{31c0}', '\u{31e3}'), ('\u{3220}', '\u{3229}'),
+        ('\u{322a}', '\u{3247}'), ('\u{3248}', '\u{324f}'), ('\u{3250}', '\u{3250}'), ('\u{3251}',
+        '\u{325f}'), ('\u{327f}', '\u{327f}'), ('\u{3280}', '\u{3289}'), ('\u{328a}', '\u{32b0}'),
+        ('\u{32b1}', '\u{32bf}'), ('\u{32c0}', '\u{32cf}'), ('\u{3358}', '\u{33ff}'), ('\u{4dc0}',
+        '\u{4dff}'), ('\u{a700}', '\u{a716}'), ('\u{a717}', '\u{a71f}'), ('\u{a720}', '\u{a721}'),
+        ('\u{a788}', '\u{a788}'), ('\u{a789}', '\u{a78a}'), ('\u{a830}', '\u{a835}'), ('\u{a836}',
+        '\u{a837}'), ('\u{a838}', '\u{a838}'), ('\u{a839}', '\u{a839}'), ('\u{a92e}', '\u{a92e}'),
+        ('\u{a9cf}', '\u{a9cf}'), ('\u{ab5b}', '\u{ab5b}'), ('\u{fd3e}', '\u{fd3e}'), ('\u{fd3f}',
+        '\u{fd3f}'), ('\u{fe10}', '\u{fe16}'), ('\u{fe17}', '\u{fe17}'), ('\u{fe18}', '\u{fe18}'),
+        ('\u{fe19}', '\u{fe19}'), ('\u{fe30}', '\u{fe30}'), ('\u{fe31}', '\u{fe32}'), ('\u{fe33}',
+        '\u{fe34}'), ('\u{fe35}', '\u{fe35}'), ('\u{fe36}', '\u{fe36}'), ('\u{fe37}', '\u{fe37}'),
+        ('\u{fe38}', '\u{fe38}'), ('\u{fe39}', '\u{fe39}'), ('\u{fe3a}', '\u{fe3a}'), ('\u{fe3b}',
+        '\u{fe3b}'), ('\u{fe3c}', '\u{fe3c}'), ('\u{fe3d}', '\u{fe3d}'), ('\u{fe3e}', '\u{fe3e}'),
+        ('\u{fe3f}', '\u{fe3f}'), ('\u{fe40}', '\u{fe40}'), ('\u{fe41}', '\u{fe41}'), ('\u{fe42}',
+        '\u{fe42}'), ('\u{fe43}', '\u{fe43}'), ('\u{fe44}', '\u{fe44}'), ('\u{fe45}', '\u{fe46}'),
+        ('\u{fe47}', '\u{fe47}'), ('\u{fe48}', '\u{fe48}'), ('\u{fe49}', '\u{fe4c}'), ('\u{fe4d}',
+        '\u{fe4f}'), ('\u{fe50}', '\u{fe52}'), ('\u{fe54}', '\u{fe57}'), ('\u{fe58}', '\u{fe58}'),
+        ('\u{fe59}', '\u{fe59}'), ('\u{fe5a}', '\u{fe5a}'), ('\u{fe5b}', '\u{fe5b}'), ('\u{fe5c}',
+        '\u{fe5c}'), ('\u{fe5d}', '\u{fe5d}'), ('\u{fe5e}', '\u{fe5e}'), ('\u{fe5f}', '\u{fe61}'),
+        ('\u{fe62}', '\u{fe62}'), ('\u{fe63}', '\u{fe63}'), ('\u{fe64}', '\u{fe66}'), ('\u{fe68}',
+        '\u{fe68}'), ('\u{fe69}', '\u{fe69}'), ('\u{fe6a}', '\u{fe6b}'), ('\u{feff}', '\u{feff}'),
+        ('\u{ff01}', '\u{ff03}'), ('\u{ff04}', '\u{ff04}'), ('\u{ff05}', '\u{ff07}'), ('\u{ff08}',
+        '\u{ff08}'), ('\u{ff09}', '\u{ff09}'), ('\u{ff0a}', '\u{ff0a}'), ('\u{ff0b}', '\u{ff0b}'),
+        ('\u{ff0c}', '\u{ff0c}'), ('\u{ff0d}', '\u{ff0d}'), ('\u{ff0e}', '\u{ff0f}'), ('\u{ff10}',
+        '\u{ff19}'), ('\u{ff1a}', '\u{ff1b}'), ('\u{ff1c}', '\u{ff1e}'), ('\u{ff1f}', '\u{ff20}'),
+        ('\u{ff3b}', '\u{ff3b}'), ('\u{ff3c}', '\u{ff3c}'), ('\u{ff3d}', '\u{ff3d}'), ('\u{ff3e}',
+        '\u{ff3e}'), ('\u{ff3f}', '\u{ff3f}'), ('\u{ff40}', '\u{ff40}'), ('\u{ff5b}', '\u{ff5b}'),
+        ('\u{ff5c}', '\u{ff5c}'), ('\u{ff5d}', '\u{ff5d}'), ('\u{ff5e}', '\u{ff5e}'), ('\u{ff5f}',
+        '\u{ff5f}'), ('\u{ff60}', '\u{ff60}'), ('\u{ff61}', '\u{ff61}'), ('\u{ff62}', '\u{ff62}'),
+        ('\u{ff63}', '\u{ff63}'), ('\u{ff64}', '\u{ff65}'), ('\u{ff70}', '\u{ff70}'), ('\u{ff9e}',
+        '\u{ff9f}'), ('\u{ffe0}', '\u{ffe1}'), ('\u{ffe2}', '\u{ffe2}'), ('\u{ffe3}', '\u{ffe3}'),
+        ('\u{ffe4}', '\u{ffe4}'), ('\u{ffe5}', '\u{ffe6}'), ('\u{ffe8}', '\u{ffe8}'), ('\u{ffe9}',
+        '\u{ffec}'), ('\u{ffed}', '\u{ffee}'), ('\u{fff9}', '\u{fffb}'), ('\u{fffc}', '\u{fffd}'),
+        ('\u{10100}', '\u{10102}'), ('\u{10107}', '\u{10133}'), ('\u{10137}', '\u{1013f}'),
+        ('\u{10190}', '\u{1019b}'), ('\u{101d0}', '\u{101fc}'), ('\u{102e1}', '\u{102fb}'),
+        ('\u{1bca0}', '\u{1bca3}'), ('\u{1d000}', '\u{1d0f5}'), ('\u{1d100}', '\u{1d126}'),
+        ('\u{1d129}', '\u{1d164}'), ('\u{1d165}', '\u{1d166}'), ('\u{1d16a}', '\u{1d16c}'),
+        ('\u{1d16d}', '\u{1d172}'), ('\u{1d173}', '\u{1d17a}'), ('\u{1d183}', '\u{1d184}'),
+        ('\u{1d18c}', '\u{1d1a9}'), ('\u{1d1ae}', '\u{1d1dd}'), ('\u{1d300}', '\u{1d356}'),
+        ('\u{1d360}', '\u{1d371}'), ('\u{1d400}', '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c1}', '\u{1d6c1}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6db}', '\u{1d6db}'),
+        ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fb}', '\u{1d6fb}'), ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d715}', '\u{1d715}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d735}', '\u{1d735}'),
+        ('\u{1d736}', '\u{1d74e}'), ('\u{1d74f}', '\u{1d74f}'), ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d76f}', '\u{1d76f}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d789}', '\u{1d789}'),
+        ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7a9}', '\u{1d7a9}'), ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c3}', '\u{1d7c3}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1d7ce}', '\u{1d7ff}'),
+        ('\u{1f000}', '\u{1f02b}'), ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}', '\u{1f0ae}'),
+        ('\u{1f0b1}', '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'), ('\u{1f0d1}', '\u{1f0f5}'),
+        ('\u{1f100}', '\u{1f10c}'), ('\u{1f110}', '\u{1f12e}'), ('\u{1f130}', '\u{1f16b}'),
+        ('\u{1f170}', '\u{1f19a}'), ('\u{1f1e6}', '\u{1f1ff}'), ('\u{1f201}', '\u{1f202}'),
+        ('\u{1f210}', '\u{1f23a}'), ('\u{1f240}', '\u{1f248}'), ('\u{1f250}', '\u{1f251}'),
+        ('\u{1f300}', '\u{1f32c}'), ('\u{1f330}', '\u{1f37d}'), ('\u{1f380}', '\u{1f3ce}'),
+        ('\u{1f3d4}', '\u{1f3f7}'), ('\u{1f400}', '\u{1f4fe}'), ('\u{1f500}', '\u{1f54a}'),
+        ('\u{1f550}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'), ('\u{1f5a5}', '\u{1f642}'),
+        ('\u{1f645}', '\u{1f6cf}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}', '\u{1f6f3}'),
+        ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'), ('\u{1f800}', '\u{1f80b}'),
+        ('\u{1f810}', '\u{1f847}'), ('\u{1f850}', '\u{1f859}'), ('\u{1f860}', '\u{1f887}'),
+        ('\u{1f890}', '\u{1f8ad}'), ('\u{e0001}', '\u{e0001}'), ('\u{e0020}', '\u{e007f}')
     ];
 
     pub static Coptic_table: &'static [(char, char)] = &[
-        ('\u03e2', '\u03ef'), ('\u2c80', '\u2ce4'), ('\u2ce5', '\u2cea'), ('\u2ceb', '\u2cee'),
-        ('\u2cef', '\u2cf1'), ('\u2cf2', '\u2cf3'), ('\u2cf9', '\u2cfc'), ('\u2cfd', '\u2cfd'),
-        ('\u2cfe', '\u2cff')
+        ('\u{3e2}', '\u{3ef}'), ('\u{2c80}', '\u{2ce4}'), ('\u{2ce5}', '\u{2cea}'), ('\u{2ceb}',
+        '\u{2cee}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2cf9}', '\u{2cfc}'),
+        ('\u{2cfd}', '\u{2cfd}'), ('\u{2cfe}', '\u{2cff}')
     ];
 
     pub static Cuneiform_table: &'static [(char, char)] = &[
-        ('\U00012000', '\U00012398'), ('\U00012400', '\U0001246e'), ('\U00012470', '\U00012474')
+        ('\u{12000}', '\u{12398}'), ('\u{12400}', '\u{1246e}'), ('\u{12470}', '\u{12474}')
     ];
 
     pub static Cypriot_table: &'static [(char, char)] = &[
-        ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'),
-        ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U0001083f')
+        ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'),
+        ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{1083f}')
     ];
 
     pub static Cyrillic_table: &'static [(char, char)] = &[
-        ('\u0400', '\u0481'), ('\u0482', '\u0482'), ('\u0483', '\u0484'), ('\u0487', '\u0487'),
-        ('\u0488', '\u0489'), ('\u048a', '\u052f'), ('\u1d2b', '\u1d2b'), ('\u1d78', '\u1d78'),
-        ('\u2de0', '\u2dff'), ('\ua640', '\ua66d'), ('\ua66e', '\ua66e'), ('\ua66f', '\ua66f'),
-        ('\ua670', '\ua672'), ('\ua673', '\ua673'), ('\ua674', '\ua67d'), ('\ua67e', '\ua67e'),
-        ('\ua67f', '\ua67f'), ('\ua680', '\ua69b'), ('\ua69c', '\ua69d'), ('\ua69f', '\ua69f')
+        ('\u{400}', '\u{481}'), ('\u{482}', '\u{482}'), ('\u{483}', '\u{484}'), ('\u{487}',
+        '\u{487}'), ('\u{488}', '\u{489}'), ('\u{48a}', '\u{52f}'), ('\u{1d2b}', '\u{1d2b}'),
+        ('\u{1d78}', '\u{1d78}'), ('\u{2de0}', '\u{2dff}'), ('\u{a640}', '\u{a66d}'), ('\u{a66e}',
+        '\u{a66e}'), ('\u{a66f}', '\u{a66f}'), ('\u{a670}', '\u{a672}'), ('\u{a673}', '\u{a673}'),
+        ('\u{a674}', '\u{a67d}'), ('\u{a67e}', '\u{a67e}'), ('\u{a67f}', '\u{a67f}'), ('\u{a680}',
+        '\u{a69b}'), ('\u{a69c}', '\u{a69d}'), ('\u{a69f}', '\u{a69f}')
     ];
 
     pub static Deseret_table: &'static [(char, char)] = &[
-        ('\U00010400', '\U0001044f')
+        ('\u{10400}', '\u{1044f}')
     ];
 
     pub static Devanagari_table: &'static [(char, char)] = &[
-        ('\u0900', '\u0902'), ('\u0903', '\u0903'), ('\u0904', '\u0939'), ('\u093a', '\u093a'),
-        ('\u093b', '\u093b'), ('\u093c', '\u093c'), ('\u093d', '\u093d'), ('\u093e', '\u0940'),
-        ('\u0941', '\u0948'), ('\u0949', '\u094c'), ('\u094d', '\u094d'), ('\u094e', '\u094f'),
-        ('\u0950', '\u0950'), ('\u0953', '\u0957'), ('\u0958', '\u0961'), ('\u0962', '\u0963'),
-        ('\u0966', '\u096f'), ('\u0970', '\u0970'), ('\u0971', '\u0971'), ('\u0972', '\u097f'),
-        ('\ua8e0', '\ua8f1'), ('\ua8f2', '\ua8f7'), ('\ua8f8', '\ua8fa'), ('\ua8fb', '\ua8fb')
+        ('\u{900}', '\u{902}'), ('\u{903}', '\u{903}'), ('\u{904}', '\u{939}'), ('\u{93a}',
+        '\u{93a}'), ('\u{93b}', '\u{93b}'), ('\u{93c}', '\u{93c}'), ('\u{93d}', '\u{93d}'),
+        ('\u{93e}', '\u{940}'), ('\u{941}', '\u{948}'), ('\u{949}', '\u{94c}'), ('\u{94d}',
+        '\u{94d}'), ('\u{94e}', '\u{94f}'), ('\u{950}', '\u{950}'), ('\u{953}', '\u{957}'),
+        ('\u{958}', '\u{961}'), ('\u{962}', '\u{963}'), ('\u{966}', '\u{96f}'), ('\u{970}',
+        '\u{970}'), ('\u{971}', '\u{971}'), ('\u{972}', '\u{97f}'), ('\u{a8e0}', '\u{a8f1}'),
+        ('\u{a8f2}', '\u{a8f7}'), ('\u{a8f8}', '\u{a8fa}'), ('\u{a8fb}', '\u{a8fb}')
     ];
 
     pub static Duployan_table: &'static [(char, char)] = &[
-        ('\U0001bc00', '\U0001bc6a'), ('\U0001bc70', '\U0001bc7c'), ('\U0001bc80', '\U0001bc88'),
-        ('\U0001bc90', '\U0001bc99'), ('\U0001bc9c', '\U0001bc9c'), ('\U0001bc9d', '\U0001bc9e'),
-        ('\U0001bc9f', '\U0001bc9f')
+        ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'),
+        ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9c}', '\u{1bc9c}'), ('\u{1bc9d}', '\u{1bc9e}'),
+        ('\u{1bc9f}', '\u{1bc9f}')
     ];
 
     pub static Egyptian_Hieroglyphs_table: &'static [(char, char)] = &[
-        ('\U00013000', '\U0001342e')
+        ('\u{13000}', '\u{1342e}')
     ];
 
     pub static Elbasan_table: &'static [(char, char)] = &[
-        ('\U00010500', '\U00010527')
+        ('\u{10500}', '\u{10527}')
     ];
 
     pub static Ethiopic_table: &'static [(char, char)] = &[
-        ('\u1200', '\u1248'), ('\u124a', '\u124d'), ('\u1250', '\u1256'), ('\u1258', '\u1258'),
-        ('\u125a', '\u125d'), ('\u1260', '\u1288'), ('\u128a', '\u128d'), ('\u1290', '\u12b0'),
-        ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'),
-        ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), ('\u1312', '\u1315'), ('\u1318', '\u135a'),
-        ('\u135d', '\u135f'), ('\u1360', '\u1368'), ('\u1369', '\u137c'), ('\u1380', '\u138f'),
-        ('\u1390', '\u1399'), ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'),
-        ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'),
-        ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), ('\uab01', '\uab06'), ('\uab09', '\uab0e'),
-        ('\uab11', '\uab16'), ('\uab20', '\uab26'), ('\uab28', '\uab2e')
+        ('\u{1200}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}',
+        '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'),
+        ('\u{1290}', '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}',
+        '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'),
+        ('\u{1312}', '\u{1315}'), ('\u{1318}', '\u{135a}'), ('\u{135d}', '\u{135f}'), ('\u{1360}',
+        '\u{1368}'), ('\u{1369}', '\u{137c}'), ('\u{1380}', '\u{138f}'), ('\u{1390}', '\u{1399}'),
+        ('\u{2d80}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}',
+        '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'),
+        ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}',
+        '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}')
     ];
 
     pub static Georgian_table: &'static [(char, char)] = &[
-        ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'),
-        ('\u10fc', '\u10fc'), ('\u10fd', '\u10ff'), ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'),
-        ('\u2d2d', '\u2d2d')
+        ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{10d0}',
+        '\u{10fa}'), ('\u{10fc}', '\u{10fc}'), ('\u{10fd}', '\u{10ff}'), ('\u{2d00}', '\u{2d25}'),
+        ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}')
     ];
 
     pub static Glagolitic_table: &'static [(char, char)] = &[
-        ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e')
+        ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}')
     ];
 
     pub static Gothic_table: &'static [(char, char)] = &[
-        ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'),
-        ('\U0001034a', '\U0001034a')
+        ('\u{10330}', '\u{10340}'), ('\u{10341}', '\u{10341}'), ('\u{10342}', '\u{10349}'),
+        ('\u{1034a}', '\u{1034a}')
     ];
 
     pub static Grantha_table: &'static [(char, char)] = &[
-        ('\U00011301', '\U00011301'), ('\U00011302', '\U00011303'), ('\U00011305', '\U0001130c'),
-        ('\U0001130f', '\U00011310'), ('\U00011313', '\U00011328'), ('\U0001132a', '\U00011330'),
-        ('\U00011332', '\U00011333'), ('\U00011335', '\U00011339'), ('\U0001133c', '\U0001133c'),
-        ('\U0001133d', '\U0001133d'), ('\U0001133e', '\U0001133f'), ('\U00011340', '\U00011340'),
-        ('\U00011341', '\U00011344'), ('\U00011347', '\U00011348'), ('\U0001134b', '\U0001134d'),
-        ('\U00011357', '\U00011357'), ('\U0001135d', '\U00011361'), ('\U00011362', '\U00011363'),
-        ('\U00011366', '\U0001136c'), ('\U00011370', '\U00011374')
+        ('\u{11301}', '\u{11301}'), ('\u{11302}', '\u{11303}'), ('\u{11305}', '\u{1130c}'),
+        ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
+        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133c}', '\u{1133c}'),
+        ('\u{1133d}', '\u{1133d}'), ('\u{1133e}', '\u{1133f}'), ('\u{11340}', '\u{11340}'),
+        ('\u{11341}', '\u{11344}'), ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'),
+        ('\u{11357}', '\u{11357}'), ('\u{1135d}', '\u{11361}'), ('\u{11362}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'), ('\u{11370}', '\u{11374}')
     ];
 
     pub static Greek_table: &'static [(char, char)] = &[
-        ('\u0370', '\u0373'), ('\u0375', '\u0375'), ('\u0376', '\u0377'), ('\u037a', '\u037a'),
-        ('\u037b', '\u037d'), ('\u037f', '\u037f'), ('\u0384', '\u0384'), ('\u0386', '\u0386'),
-        ('\u0388', '\u038a'), ('\u038c', '\u038c'), ('\u038e', '\u03a1'), ('\u03a3', '\u03e1'),
-        ('\u03f0', '\u03f5'), ('\u03f6', '\u03f6'), ('\u03f7', '\u03ff'), ('\u1d26', '\u1d2a'),
-        ('\u1d5d', '\u1d61'), ('\u1d66', '\u1d6a'), ('\u1dbf', '\u1dbf'), ('\u1f00', '\u1f15'),
-        ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'),
-        ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'),
-        ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbd', '\u1fbd'), ('\u1fbe', '\u1fbe'),
-        ('\u1fbf', '\u1fc1'), ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), ('\u1fcd', '\u1fcf'),
-        ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fdd', '\u1fdf'), ('\u1fe0', '\u1fec'),
-        ('\u1fed', '\u1fef'), ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u1ffd', '\u1ffe'),
-        ('\u2126', '\u2126'), ('\uab65', '\uab65'), ('\U00010140', '\U00010174'), ('\U00010175',
-        '\U00010178'), ('\U00010179', '\U00010189'), ('\U0001018a', '\U0001018b'), ('\U0001018c',
-        '\U0001018c'), ('\U000101a0', '\U000101a0'), ('\U0001d200', '\U0001d241'), ('\U0001d242',
-        '\U0001d244'), ('\U0001d245', '\U0001d245')
+        ('\u{370}', '\u{373}'), ('\u{375}', '\u{375}'), ('\u{376}', '\u{377}'), ('\u{37a}',
+        '\u{37a}'), ('\u{37b}', '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{384}', '\u{384}'),
+        ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}',
+        '\u{3a1}'), ('\u{3a3}', '\u{3e1}'), ('\u{3f0}', '\u{3f5}'), ('\u{3f6}', '\u{3f6}'),
+        ('\u{3f7}', '\u{3ff}'), ('\u{1d26}', '\u{1d2a}'), ('\u{1d5d}', '\u{1d61}'), ('\u{1d66}',
+        '\u{1d6a}'), ('\u{1dbf}', '\u{1dbf}'), ('\u{1f00}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}',
+        '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'),
+        ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbd}', '\u{1fbd}'), ('\u{1fbe}',
+        '\u{1fbe}'), ('\u{1fbf}', '\u{1fc1}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}', '\u{1fcc}'),
+        ('\u{1fcd}', '\u{1fcf}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fdd}',
+        '\u{1fdf}'), ('\u{1fe0}', '\u{1fec}'), ('\u{1fed}', '\u{1fef}'), ('\u{1ff2}', '\u{1ff4}'),
+        ('\u{1ff6}', '\u{1ffc}'), ('\u{1ffd}', '\u{1ffe}'), ('\u{2126}', '\u{2126}'), ('\u{ab65}',
+        '\u{ab65}'), ('\u{10140}', '\u{10174}'), ('\u{10175}', '\u{10178}'), ('\u{10179}',
+        '\u{10189}'), ('\u{1018a}', '\u{1018b}'), ('\u{1018c}', '\u{1018c}'), ('\u{101a0}',
+        '\u{101a0}'), ('\u{1d200}', '\u{1d241}'), ('\u{1d242}', '\u{1d244}'), ('\u{1d245}',
+        '\u{1d245}')
     ];
 
     pub static Gujarati_table: &'static [(char, char)] = &[
-        ('\u0a81', '\u0a82'), ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'),
-        ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'),
-        ('\u0abc', '\u0abc'), ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), ('\u0ac1', '\u0ac5'),
-        ('\u0ac7', '\u0ac8'), ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), ('\u0acd', '\u0acd'),
-        ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), ('\u0ae2', '\u0ae3'), ('\u0ae6', '\u0aef'),
-        ('\u0af0', '\u0af0'), ('\u0af1', '\u0af1')
+        ('\u{a81}', '\u{a82}'), ('\u{a83}', '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}',
+        '\u{a91}'), ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'),
+        ('\u{ab5}', '\u{ab9}'), ('\u{abc}', '\u{abc}'), ('\u{abd}', '\u{abd}'), ('\u{abe}',
+        '\u{ac0}'), ('\u{ac1}', '\u{ac5}'), ('\u{ac7}', '\u{ac8}'), ('\u{ac9}', '\u{ac9}'),
+        ('\u{acb}', '\u{acc}'), ('\u{acd}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}',
+        '\u{ae1}'), ('\u{ae2}', '\u{ae3}'), ('\u{ae6}', '\u{aef}'), ('\u{af0}', '\u{af0}'),
+        ('\u{af1}', '\u{af1}')
     ];
 
     pub static Gurmukhi_table: &'static [(char, char)] = &[
-        ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'),
-        ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'),
-        ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'),
-        ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'),
-        ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'),
-        ('\u0a75', '\u0a75')
+        ('\u{a01}', '\u{a02}'), ('\u{a03}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}',
+        '\u{a10}'), ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'),
+        ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'), ('\u{a3e}',
+        '\u{a40}'), ('\u{a41}', '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'),
+        ('\u{a51}', '\u{a51}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a66}',
+        '\u{a6f}'), ('\u{a70}', '\u{a71}'), ('\u{a72}', '\u{a74}'), ('\u{a75}', '\u{a75}')
     ];
 
     pub static Han_table: &'static [(char, char)] = &[
-        ('\u2e80', '\u2e99'), ('\u2e9b', '\u2ef3'), ('\u2f00', '\u2fd5'), ('\u3005', '\u3005'),
-        ('\u3007', '\u3007'), ('\u3021', '\u3029'), ('\u3038', '\u303a'), ('\u303b', '\u303b'),
-        ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'),
-        ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'),
-        ('\U0002f800', '\U0002fa1d')
+        ('\u{2e80}', '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}', '\u{2fd5}'), ('\u{3005}',
+        '\u{3005}'), ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3038}', '\u{303a}'),
+        ('\u{303b}', '\u{303b}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fcc}'), ('\u{f900}',
+        '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'), ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}',
+        '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2f800}', '\u{2fa1d}')
     ];
 
     pub static Hangul_table: &'static [(char, char)] = &[
-        ('\u1100', '\u11ff'), ('\u302e', '\u302f'), ('\u3131', '\u318e'), ('\u3200', '\u321e'),
-        ('\u3260', '\u327e'), ('\ua960', '\ua97c'), ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'),
-        ('\ud7cb', '\ud7fb'), ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'),
-        ('\uffd2', '\uffd7'), ('\uffda', '\uffdc')
+        ('\u{1100}', '\u{11ff}'), ('\u{302e}', '\u{302f}'), ('\u{3131}', '\u{318e}'), ('\u{3200}',
+        '\u{321e}'), ('\u{3260}', '\u{327e}'), ('\u{a960}', '\u{a97c}'), ('\u{ac00}', '\u{d7a3}'),
+        ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}',
+        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}')
     ];
 
     pub static Hanunoo_table: &'static [(char, char)] = &[
-        ('\u1720', '\u1731'), ('\u1732', '\u1734')
+        ('\u{1720}', '\u{1731}'), ('\u{1732}', '\u{1734}')
     ];
 
     pub static Hebrew_table: &'static [(char, char)] = &[
-        ('\u0591', '\u05bd'), ('\u05be', '\u05be'), ('\u05bf', '\u05bf'), ('\u05c0', '\u05c0'),
-        ('\u05c1', '\u05c2'), ('\u05c3', '\u05c3'), ('\u05c4', '\u05c5'), ('\u05c6', '\u05c6'),
-        ('\u05c7', '\u05c7'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u05f3', '\u05f4'),
-        ('\ufb1d', '\ufb1d'), ('\ufb1e', '\ufb1e'), ('\ufb1f', '\ufb28'), ('\ufb29', '\ufb29'),
-        ('\ufb2a', '\ufb36'), ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'),
-        ('\ufb43', '\ufb44'), ('\ufb46', '\ufb4f')
+        ('\u{591}', '\u{5bd}'), ('\u{5be}', '\u{5be}'), ('\u{5bf}', '\u{5bf}'), ('\u{5c0}',
+        '\u{5c0}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c3}', '\u{5c3}'), ('\u{5c4}', '\u{5c5}'),
+        ('\u{5c6}', '\u{5c6}'), ('\u{5c7}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}',
+        '\u{5f2}'), ('\u{5f3}', '\u{5f4}'), ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1e}', '\u{fb1e}'),
+        ('\u{fb1f}', '\u{fb28}'), ('\u{fb29}', '\u{fb29}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}',
+        '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
+        ('\u{fb46}', '\u{fb4f}')
     ];
 
     pub static Hiragana_table: &'static [(char, char)] = &[
-        ('\u3041', '\u3096'), ('\u309d', '\u309e'), ('\u309f', '\u309f'), ('\U0001b001',
-        '\U0001b001'), ('\U0001f200', '\U0001f200')
+        ('\u{3041}', '\u{3096}'), ('\u{309d}', '\u{309e}'), ('\u{309f}', '\u{309f}'), ('\u{1b001}',
+        '\u{1b001}'), ('\u{1f200}', '\u{1f200}')
     ];
 
     pub static Imperial_Aramaic_table: &'static [(char, char)] = &[
-        ('\U00010840', '\U00010855'), ('\U00010857', '\U00010857'), ('\U00010858', '\U0001085f')
+        ('\u{10840}', '\u{10855}'), ('\u{10857}', '\u{10857}'), ('\u{10858}', '\u{1085f}')
     ];
 
     pub static Inherited_table: &'static [(char, char)] = &[
-        ('\u0300', '\u036f'), ('\u0485', '\u0486'), ('\u064b', '\u0655'), ('\u0670', '\u0670'),
-        ('\u0951', '\u0952'), ('\u1ab0', '\u1abd'), ('\u1abe', '\u1abe'), ('\u1cd0', '\u1cd2'),
-        ('\u1cd4', '\u1ce0'), ('\u1ce2', '\u1ce8'), ('\u1ced', '\u1ced'), ('\u1cf4', '\u1cf4'),
-        ('\u1cf8', '\u1cf9'), ('\u1dc0', '\u1df5'), ('\u1dfc', '\u1dff'), ('\u200c', '\u200d'),
-        ('\u20d0', '\u20dc'), ('\u20dd', '\u20e0'), ('\u20e1', '\u20e1'), ('\u20e2', '\u20e4'),
-        ('\u20e5', '\u20f0'), ('\u302a', '\u302d'), ('\u3099', '\u309a'), ('\ufe00', '\ufe0f'),
-        ('\ufe20', '\ufe2d'), ('\U000101fd', '\U000101fd'), ('\U000102e0', '\U000102e0'),
-        ('\U0001d167', '\U0001d169'), ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'),
-        ('\U0001d1aa', '\U0001d1ad'), ('\U000e0100', '\U000e01ef')
+        ('\u{300}', '\u{36f}'), ('\u{485}', '\u{486}'), ('\u{64b}', '\u{655}'), ('\u{670}',
+        '\u{670}'), ('\u{951}', '\u{952}'), ('\u{1ab0}', '\u{1abd}'), ('\u{1abe}', '\u{1abe}'),
+        ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce0}'), ('\u{1ce2}', '\u{1ce8}'), ('\u{1ced}',
+        '\u{1ced}'), ('\u{1cf4}', '\u{1cf4}'), ('\u{1cf8}', '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'),
+        ('\u{1dfc}', '\u{1dff}'), ('\u{200c}', '\u{200d}'), ('\u{20d0}', '\u{20dc}'), ('\u{20dd}',
+        '\u{20e0}'), ('\u{20e1}', '\u{20e1}'), ('\u{20e2}', '\u{20e4}'), ('\u{20e5}', '\u{20f0}'),
+        ('\u{302a}', '\u{302d}'), ('\u{3099}', '\u{309a}'), ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}',
+        '\u{fe2d}'), ('\u{101fd}', '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{1d167}',
+        '\u{1d169}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}',
+        '\u{1d1ad}'), ('\u{e0100}', '\u{e01ef}')
     ];
 
     pub static Inscriptional_Pahlavi_table: &'static [(char, char)] = &[
-        ('\U00010b60', '\U00010b72'), ('\U00010b78', '\U00010b7f')
+        ('\u{10b60}', '\u{10b72}'), ('\u{10b78}', '\u{10b7f}')
     ];
 
     pub static Inscriptional_Parthian_table: &'static [(char, char)] = &[
-        ('\U00010b40', '\U00010b55'), ('\U00010b58', '\U00010b5f')
+        ('\u{10b40}', '\u{10b55}'), ('\u{10b58}', '\u{10b5f}')
     ];
 
     pub static Javanese_table: &'static [(char, char)] = &[
-        ('\ua980', '\ua982'), ('\ua983', '\ua983'), ('\ua984', '\ua9b2'), ('\ua9b3', '\ua9b3'),
-        ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'),
-        ('\ua9bd', '\ua9c0'), ('\ua9c1', '\ua9cd'), ('\ua9d0', '\ua9d9'), ('\ua9de', '\ua9df')
+        ('\u{a980}', '\u{a982}'), ('\u{a983}', '\u{a983}'), ('\u{a984}', '\u{a9b2}'), ('\u{a9b3}',
+        '\u{a9b3}'), ('\u{a9b4}', '\u{a9b5}'), ('\u{a9b6}', '\u{a9b9}'), ('\u{a9ba}', '\u{a9bb}'),
+        ('\u{a9bc}', '\u{a9bc}'), ('\u{a9bd}', '\u{a9c0}'), ('\u{a9c1}', '\u{a9cd}'), ('\u{a9d0}',
+        '\u{a9d9}'), ('\u{a9de}', '\u{a9df}')
     ];
 
     pub static Kaithi_table: &'static [(char, char)] = &[
-        ('\U00011080', '\U00011081'), ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'),
-        ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), ('\U000110b7', '\U000110b8'),
-        ('\U000110b9', '\U000110ba'), ('\U000110bb', '\U000110bc'), ('\U000110bd', '\U000110bd'),
-        ('\U000110be', '\U000110c1')
+        ('\u{11080}', '\u{11081}'), ('\u{11082}', '\u{11082}'), ('\u{11083}', '\u{110af}'),
+        ('\u{110b0}', '\u{110b2}'), ('\u{110b3}', '\u{110b6}'), ('\u{110b7}', '\u{110b8}'),
+        ('\u{110b9}', '\u{110ba}'), ('\u{110bb}', '\u{110bc}'), ('\u{110bd}', '\u{110bd}'),
+        ('\u{110be}', '\u{110c1}')
     ];
 
     pub static Kannada_table: &'static [(char, char)] = &[
-        ('\u0c81', '\u0c81'), ('\u0c82', '\u0c83'), ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'),
-        ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'),
-        ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'),
-        ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'),
-        ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'),
-        ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2')
+        ('\u{c81}', '\u{c81}'), ('\u{c82}', '\u{c83}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}',
+        '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'),
+        ('\u{cbc}', '\u{cbc}'), ('\u{cbd}', '\u{cbd}'), ('\u{cbe}', '\u{cbe}'), ('\u{cbf}',
+        '\u{cbf}'), ('\u{cc0}', '\u{cc4}'), ('\u{cc6}', '\u{cc6}'), ('\u{cc7}', '\u{cc8}'),
+        ('\u{cca}', '\u{ccb}'), ('\u{ccc}', '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), ('\u{cde}',
+        '\u{cde}'), ('\u{ce0}', '\u{ce1}'), ('\u{ce2}', '\u{ce3}'), ('\u{ce6}', '\u{cef}'),
+        ('\u{cf1}', '\u{cf2}')
     ];
 
     pub static Katakana_table: &'static [(char, char)] = &[
-        ('\u30a1', '\u30fa'), ('\u30fd', '\u30fe'), ('\u30ff', '\u30ff'), ('\u31f0', '\u31ff'),
-        ('\u32d0', '\u32fe'), ('\u3300', '\u3357'), ('\uff66', '\uff6f'), ('\uff71', '\uff9d'),
-        ('\U0001b000', '\U0001b000')
+        ('\u{30a1}', '\u{30fa}'), ('\u{30fd}', '\u{30fe}'), ('\u{30ff}', '\u{30ff}'), ('\u{31f0}',
+        '\u{31ff}'), ('\u{32d0}', '\u{32fe}'), ('\u{3300}', '\u{3357}'), ('\u{ff66}', '\u{ff6f}'),
+        ('\u{ff71}', '\u{ff9d}'), ('\u{1b000}', '\u{1b000}')
     ];
 
     pub static Kayah_Li_table: &'static [(char, char)] = &[
-        ('\ua900', '\ua909'), ('\ua90a', '\ua925'), ('\ua926', '\ua92d'), ('\ua92f', '\ua92f')
+        ('\u{a900}', '\u{a909}'), ('\u{a90a}', '\u{a925}'), ('\u{a926}', '\u{a92d}'), ('\u{a92f}',
+        '\u{a92f}')
     ];
 
     pub static Kharoshthi_table: &'static [(char, char)] = &[
-        ('\U00010a00', '\U00010a00'), ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'),
-        ('\U00010a0c', '\U00010a0f'), ('\U00010a10', '\U00010a13'), ('\U00010a15', '\U00010a17'),
-        ('\U00010a19', '\U00010a33'), ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'),
-        ('\U00010a40', '\U00010a47'), ('\U00010a50', '\U00010a58')
+        ('\u{10a00}', '\u{10a00}'), ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'),
+        ('\u{10a0c}', '\u{10a0f}'), ('\u{10a10}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a33}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a40}', '\u{10a47}'), ('\u{10a50}', '\u{10a58}')
     ];
 
     pub static Khmer_table: &'static [(char, char)] = &[
-        ('\u1780', '\u17b3'), ('\u17b4', '\u17b5'), ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'),
-        ('\u17be', '\u17c5'), ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'),
-        ('\u17d4', '\u17d6'), ('\u17d7', '\u17d7'), ('\u17d8', '\u17da'), ('\u17db', '\u17db'),
-        ('\u17dc', '\u17dc'), ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), ('\u17f0', '\u17f9'),
-        ('\u19e0', '\u19ff')
+        ('\u{1780}', '\u{17b3}'), ('\u{17b4}', '\u{17b5}'), ('\u{17b6}', '\u{17b6}'), ('\u{17b7}',
+        '\u{17bd}'), ('\u{17be}', '\u{17c5}'), ('\u{17c6}', '\u{17c6}'), ('\u{17c7}', '\u{17c8}'),
+        ('\u{17c9}', '\u{17d3}'), ('\u{17d4}', '\u{17d6}'), ('\u{17d7}', '\u{17d7}'), ('\u{17d8}',
+        '\u{17da}'), ('\u{17db}', '\u{17db}'), ('\u{17dc}', '\u{17dc}'), ('\u{17dd}', '\u{17dd}'),
+        ('\u{17e0}', '\u{17e9}'), ('\u{17f0}', '\u{17f9}'), ('\u{19e0}', '\u{19ff}')
     ];
 
     pub static Khojki_table: &'static [(char, char)] = &[
-        ('\U00011200', '\U00011211'), ('\U00011213', '\U0001122b'), ('\U0001122c', '\U0001122e'),
-        ('\U0001122f', '\U00011231'), ('\U00011232', '\U00011233'), ('\U00011234', '\U00011234'),
-        ('\U00011235', '\U00011235'), ('\U00011236', '\U00011237'), ('\U00011238', '\U0001123d')
+        ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'), ('\u{1122c}', '\u{1122e}'),
+        ('\u{1122f}', '\u{11231}'), ('\u{11232}', '\u{11233}'), ('\u{11234}', '\u{11234}'),
+        ('\u{11235}', '\u{11235}'), ('\u{11236}', '\u{11237}'), ('\u{11238}', '\u{1123d}')
     ];
 
     pub static Khudawadi_table: &'static [(char, char)] = &[
-        ('\U000112b0', '\U000112de'), ('\U000112df', '\U000112df'), ('\U000112e0', '\U000112e2'),
-        ('\U000112e3', '\U000112ea'), ('\U000112f0', '\U000112f9')
+        ('\u{112b0}', '\u{112de}'), ('\u{112df}', '\u{112df}'), ('\u{112e0}', '\u{112e2}'),
+        ('\u{112e3}', '\u{112ea}'), ('\u{112f0}', '\u{112f9}')
     ];
 
     pub static Lao_table: &'static [(char, char)] = &[
-        ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'),
-        ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'),
-        ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'),
-        ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'),
-        ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'),
-        ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf')
+        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}',
+        '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
+        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}',
+        '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb2}', '\u{eb3}'),
+        ('\u{eb4}', '\u{eb9}'), ('\u{ebb}', '\u{ebc}'), ('\u{ebd}', '\u{ebd}'), ('\u{ec0}',
+        '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), ('\u{ec8}', '\u{ecd}'), ('\u{ed0}', '\u{ed9}'),
+        ('\u{edc}', '\u{edf}')
     ];
 
     pub static Latin_table: &'static [(char, char)] = &[
-        ('\x41', '\x5a'), ('\x61', '\x7a'), ('\u00aa', '\u00aa'), ('\u00ba', '\u00ba'), ('\u00c0',
-        '\u00d6'), ('\u00d8', '\u00f6'), ('\u00f8', '\u01ba'), ('\u01bb', '\u01bb'), ('\u01bc',
-        '\u01bf'), ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), ('\u0294', '\u0294'), ('\u0295',
-        '\u02af'), ('\u02b0', '\u02b8'), ('\u02e0', '\u02e4'), ('\u1d00', '\u1d25'), ('\u1d2c',
-        '\u1d5c'), ('\u1d62', '\u1d65'), ('\u1d6b', '\u1d77'), ('\u1d79', '\u1d9a'), ('\u1d9b',
-        '\u1dbe'), ('\u1e00', '\u1eff'), ('\u2071', '\u2071'), ('\u207f', '\u207f'), ('\u2090',
-        '\u209c'), ('\u212a', '\u212b'), ('\u2132', '\u2132'), ('\u214e', '\u214e'), ('\u2160',
-        '\u2182'), ('\u2183', '\u2184'), ('\u2185', '\u2188'), ('\u2c60', '\u2c7b'), ('\u2c7c',
-        '\u2c7d'), ('\u2c7e', '\u2c7f'), ('\ua722', '\ua76f'), ('\ua770', '\ua770'), ('\ua771',
-        '\ua787'), ('\ua78b', '\ua78e'), ('\ua790', '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7f7',
-        '\ua7f7'), ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua7ff'), ('\uab30',
-        '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64', '\uab64'), ('\ufb00', '\ufb06'), ('\uff21',
-        '\uff3a'), ('\uff41', '\uff5a')
+        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{ba}', '\u{ba}'),
+        ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'), ('\u{1bb}', '\u{1bb}'),
+        ('\u{1bc}', '\u{1bf}'), ('\u{1c0}', '\u{1c3}'), ('\u{1c4}', '\u{293}'), ('\u{294}',
+        '\u{294}'), ('\u{295}', '\u{2af}'), ('\u{2b0}', '\u{2b8}'), ('\u{2e0}', '\u{2e4}'),
+        ('\u{1d00}', '\u{1d25}'), ('\u{1d2c}', '\u{1d5c}'), ('\u{1d62}', '\u{1d65}'), ('\u{1d6b}',
+        '\u{1d77}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1d9b}', '\u{1dbe}'), ('\u{1e00}', '\u{1eff}'),
+        ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{212a}',
+        '\u{212b}'), ('\u{2132}', '\u{2132}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2182}'),
+        ('\u{2183}', '\u{2184}'), ('\u{2185}', '\u{2188}'), ('\u{2c60}', '\u{2c7b}'), ('\u{2c7c}',
+        '\u{2c7d}'), ('\u{2c7e}', '\u{2c7f}'), ('\u{a722}', '\u{a76f}'), ('\u{a770}', '\u{a770}'),
+        ('\u{a771}', '\u{a787}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}', '\u{a7ad}'), ('\u{a7b0}',
+        '\u{a7b1}'), ('\u{a7f7}', '\u{a7f7}'), ('\u{a7f8}', '\u{a7f9}'), ('\u{a7fa}', '\u{a7fa}'),
+        ('\u{a7fb}', '\u{a7ff}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}',
+        '\u{ab64}'), ('\u{fb00}', '\u{fb06}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}')
     ];
 
     pub static Lepcha_table: &'static [(char, char)] = &[
-        ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), ('\u1c2c', '\u1c33'), ('\u1c34', '\u1c35'),
-        ('\u1c36', '\u1c37'), ('\u1c3b', '\u1c3f'), ('\u1c40', '\u1c49'), ('\u1c4d', '\u1c4f')
+        ('\u{1c00}', '\u{1c23}'), ('\u{1c24}', '\u{1c2b}'), ('\u{1c2c}', '\u{1c33}'), ('\u{1c34}',
+        '\u{1c35}'), ('\u{1c36}', '\u{1c37}'), ('\u{1c3b}', '\u{1c3f}'), ('\u{1c40}', '\u{1c49}'),
+        ('\u{1c4d}', '\u{1c4f}')
     ];
 
     pub static Limbu_table: &'static [(char, char)] = &[
-        ('\u1900', '\u191e'), ('\u1920', '\u1922'), ('\u1923', '\u1926'), ('\u1927', '\u1928'),
-        ('\u1929', '\u192b'), ('\u1930', '\u1931'), ('\u1932', '\u1932'), ('\u1933', '\u1938'),
-        ('\u1939', '\u193b'), ('\u1940', '\u1940'), ('\u1944', '\u1945'), ('\u1946', '\u194f')
+        ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{1922}'), ('\u{1923}', '\u{1926}'), ('\u{1927}',
+        '\u{1928}'), ('\u{1929}', '\u{192b}'), ('\u{1930}', '\u{1931}'), ('\u{1932}', '\u{1932}'),
+        ('\u{1933}', '\u{1938}'), ('\u{1939}', '\u{193b}'), ('\u{1940}', '\u{1940}'), ('\u{1944}',
+        '\u{1945}'), ('\u{1946}', '\u{194f}')
     ];
 
     pub static Linear_A_table: &'static [(char, char)] = &[
-        ('\U00010600', '\U00010736'), ('\U00010740', '\U00010755'), ('\U00010760', '\U00010767')
+        ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}')
     ];
 
     pub static Linear_B_table: &'static [(char, char)] = &[
-        ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'),
-        ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'),
-        ('\U00010080', '\U000100fa')
+        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}')
     ];
 
     pub static Lisu_table: &'static [(char, char)] = &[
-        ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), ('\ua4fe', '\ua4ff')
+        ('\u{a4d0}', '\u{a4f7}'), ('\u{a4f8}', '\u{a4fd}'), ('\u{a4fe}', '\u{a4ff}')
     ];
 
     pub static Lycian_table: &'static [(char, char)] = &[
-        ('\U00010280', '\U0001029c')
+        ('\u{10280}', '\u{1029c}')
     ];
 
     pub static Lydian_table: &'static [(char, char)] = &[
-        ('\U00010920', '\U00010939'), ('\U0001093f', '\U0001093f')
+        ('\u{10920}', '\u{10939}'), ('\u{1093f}', '\u{1093f}')
     ];
 
     pub static Mahajani_table: &'static [(char, char)] = &[
-        ('\U00011150', '\U00011172'), ('\U00011173', '\U00011173'), ('\U00011174', '\U00011175'),
-        ('\U00011176', '\U00011176')
+        ('\u{11150}', '\u{11172}'), ('\u{11173}', '\u{11173}'), ('\u{11174}', '\u{11175}'),
+        ('\u{11176}', '\u{11176}')
     ];
 
     pub static Malayalam_table: &'static [(char, char)] = &[
-        ('\u0d01', '\u0d01'), ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'),
-        ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), ('\u0d41', '\u0d44'),
-        ('\u0d46', '\u0d48'), ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), ('\u0d4e', '\u0d4e'),
-        ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), ('\u0d66', '\u0d6f'),
-        ('\u0d70', '\u0d75'), ('\u0d79', '\u0d79'), ('\u0d7a', '\u0d7f')
+        ('\u{d01}', '\u{d01}'), ('\u{d02}', '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}',
+        '\u{d10}'), ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d3d}'), ('\u{d3e}', '\u{d40}'),
+        ('\u{d41}', '\u{d44}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4c}'), ('\u{d4d}',
+        '\u{d4d}'), ('\u{d4e}', '\u{d4e}'), ('\u{d57}', '\u{d57}'), ('\u{d60}', '\u{d61}'),
+        ('\u{d62}', '\u{d63}'), ('\u{d66}', '\u{d6f}'), ('\u{d70}', '\u{d75}'), ('\u{d79}',
+        '\u{d79}'), ('\u{d7a}', '\u{d7f}')
     ];
 
     pub static Mandaic_table: &'static [(char, char)] = &[
-        ('\u0840', '\u0858'), ('\u0859', '\u085b'), ('\u085e', '\u085e')
+        ('\u{840}', '\u{858}'), ('\u{859}', '\u{85b}'), ('\u{85e}', '\u{85e}')
     ];
 
     pub static Manichaean_table: &'static [(char, char)] = &[
-        ('\U00010ac0', '\U00010ac7'), ('\U00010ac8', '\U00010ac8'), ('\U00010ac9', '\U00010ae4'),
-        ('\U00010ae5', '\U00010ae6'), ('\U00010aeb', '\U00010aef'), ('\U00010af0', '\U00010af6')
+        ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac8}', '\u{10ac8}'), ('\u{10ac9}', '\u{10ae4}'),
+        ('\u{10ae5}', '\u{10ae6}'), ('\u{10aeb}', '\u{10aef}'), ('\u{10af0}', '\u{10af6}')
     ];
 
     pub static Meetei_Mayek_table: &'static [(char, char)] = &[
-        ('\uaae0', '\uaaea'), ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), ('\uaaee', '\uaaef'),
-        ('\uaaf0', '\uaaf1'), ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'),
-        ('\uaaf6', '\uaaf6'), ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'),
-        ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), ('\uabeb', '\uabeb'),
-        ('\uabec', '\uabec'), ('\uabed', '\uabed'), ('\uabf0', '\uabf9')
+        ('\u{aae0}', '\u{aaea}'), ('\u{aaeb}', '\u{aaeb}'), ('\u{aaec}', '\u{aaed}'), ('\u{aaee}',
+        '\u{aaef}'), ('\u{aaf0}', '\u{aaf1}'), ('\u{aaf2}', '\u{aaf2}'), ('\u{aaf3}', '\u{aaf4}'),
+        ('\u{aaf5}', '\u{aaf5}'), ('\u{aaf6}', '\u{aaf6}'), ('\u{abc0}', '\u{abe2}'), ('\u{abe3}',
+        '\u{abe4}'), ('\u{abe5}', '\u{abe5}'), ('\u{abe6}', '\u{abe7}'), ('\u{abe8}', '\u{abe8}'),
+        ('\u{abe9}', '\u{abea}'), ('\u{abeb}', '\u{abeb}'), ('\u{abec}', '\u{abec}'), ('\u{abed}',
+        '\u{abed}'), ('\u{abf0}', '\u{abf9}')
     ];
 
     pub static Mende_Kikakui_table: &'static [(char, char)] = &[
-        ('\U0001e800', '\U0001e8c4'), ('\U0001e8c7', '\U0001e8cf'), ('\U0001e8d0', '\U0001e8d6')
+        ('\u{1e800}', '\u{1e8c4}'), ('\u{1e8c7}', '\u{1e8cf}'), ('\u{1e8d0}', '\u{1e8d6}')
     ];
 
     pub static Meroitic_Cursive_table: &'static [(char, char)] = &[
-        ('\U000109a0', '\U000109b7'), ('\U000109be', '\U000109bf')
+        ('\u{109a0}', '\u{109b7}'), ('\u{109be}', '\u{109bf}')
     ];
 
     pub static Meroitic_Hieroglyphs_table: &'static [(char, char)] = &[
-        ('\U00010980', '\U0001099f')
+        ('\u{10980}', '\u{1099f}')
     ];
 
     pub static Miao_table: &'static [(char, char)] = &[
-        ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), ('\U00016f51', '\U00016f7e'),
-        ('\U00016f8f', '\U00016f92'), ('\U00016f93', '\U00016f9f')
+        ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f50}'), ('\u{16f51}', '\u{16f7e}'),
+        ('\u{16f8f}', '\u{16f92}'), ('\u{16f93}', '\u{16f9f}')
     ];
 
     pub static Modi_table: &'static [(char, char)] = &[
-        ('\U00011600', '\U0001162f'), ('\U00011630', '\U00011632'), ('\U00011633', '\U0001163a'),
-        ('\U0001163b', '\U0001163c'), ('\U0001163d', '\U0001163d'), ('\U0001163e', '\U0001163e'),
-        ('\U0001163f', '\U00011640'), ('\U00011641', '\U00011643'), ('\U00011644', '\U00011644'),
-        ('\U00011650', '\U00011659')
+        ('\u{11600}', '\u{1162f}'), ('\u{11630}', '\u{11632}'), ('\u{11633}', '\u{1163a}'),
+        ('\u{1163b}', '\u{1163c}'), ('\u{1163d}', '\u{1163d}'), ('\u{1163e}', '\u{1163e}'),
+        ('\u{1163f}', '\u{11640}'), ('\u{11641}', '\u{11643}'), ('\u{11644}', '\u{11644}'),
+        ('\u{11650}', '\u{11659}')
     ];
 
     pub static Mongolian_table: &'static [(char, char)] = &[
-        ('\u1800', '\u1801'), ('\u1804', '\u1804'), ('\u1806', '\u1806'), ('\u1807', '\u180a'),
-        ('\u180b', '\u180d'), ('\u180e', '\u180e'), ('\u1810', '\u1819'), ('\u1820', '\u1842'),
-        ('\u1843', '\u1843'), ('\u1844', '\u1877'), ('\u1880', '\u18a8'), ('\u18a9', '\u18a9'),
-        ('\u18aa', '\u18aa')
+        ('\u{1800}', '\u{1801}'), ('\u{1804}', '\u{1804}'), ('\u{1806}', '\u{1806}'), ('\u{1807}',
+        '\u{180a}'), ('\u{180b}', '\u{180d}'), ('\u{180e}', '\u{180e}'), ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1842}'), ('\u{1843}', '\u{1843}'), ('\u{1844}', '\u{1877}'), ('\u{1880}',
+        '\u{18a8}'), ('\u{18a9}', '\u{18a9}'), ('\u{18aa}', '\u{18aa}')
     ];
 
     pub static Mro_table: &'static [(char, char)] = &[
-        ('\U00016a40', '\U00016a5e'), ('\U00016a60', '\U00016a69'), ('\U00016a6e', '\U00016a6f')
+        ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'), ('\u{16a6e}', '\u{16a6f}')
     ];
 
     pub static Myanmar_table: &'static [(char, char)] = &[
-        ('\u1000', '\u102a'), ('\u102b', '\u102c'), ('\u102d', '\u1030'), ('\u1031', '\u1031'),
-        ('\u1032', '\u1037'), ('\u1038', '\u1038'), ('\u1039', '\u103a'), ('\u103b', '\u103c'),
-        ('\u103d', '\u103e'), ('\u103f', '\u103f'), ('\u1040', '\u1049'), ('\u104a', '\u104f'),
-        ('\u1050', '\u1055'), ('\u1056', '\u1057'), ('\u1058', '\u1059'), ('\u105a', '\u105d'),
-        ('\u105e', '\u1060'), ('\u1061', '\u1061'), ('\u1062', '\u1064'), ('\u1065', '\u1066'),
-        ('\u1067', '\u106d'), ('\u106e', '\u1070'), ('\u1071', '\u1074'), ('\u1075', '\u1081'),
-        ('\u1082', '\u1082'), ('\u1083', '\u1084'), ('\u1085', '\u1086'), ('\u1087', '\u108c'),
-        ('\u108d', '\u108d'), ('\u108e', '\u108e'), ('\u108f', '\u108f'), ('\u1090', '\u1099'),
-        ('\u109a', '\u109c'), ('\u109d', '\u109d'), ('\u109e', '\u109f'), ('\ua9e0', '\ua9e4'),
-        ('\ua9e5', '\ua9e5'), ('\ua9e6', '\ua9e6'), ('\ua9e7', '\ua9ef'), ('\ua9f0', '\ua9f9'),
-        ('\ua9fa', '\ua9fe'), ('\uaa60', '\uaa6f'), ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'),
-        ('\uaa77', '\uaa79'), ('\uaa7a', '\uaa7a'), ('\uaa7b', '\uaa7b'), ('\uaa7c', '\uaa7c'),
-        ('\uaa7d', '\uaa7d'), ('\uaa7e', '\uaa7f')
+        ('\u{1000}', '\u{102a}'), ('\u{102b}', '\u{102c}'), ('\u{102d}', '\u{1030}'), ('\u{1031}',
+        '\u{1031}'), ('\u{1032}', '\u{1037}'), ('\u{1038}', '\u{1038}'), ('\u{1039}', '\u{103a}'),
+        ('\u{103b}', '\u{103c}'), ('\u{103d}', '\u{103e}'), ('\u{103f}', '\u{103f}'), ('\u{1040}',
+        '\u{1049}'), ('\u{104a}', '\u{104f}'), ('\u{1050}', '\u{1055}'), ('\u{1056}', '\u{1057}'),
+        ('\u{1058}', '\u{1059}'), ('\u{105a}', '\u{105d}'), ('\u{105e}', '\u{1060}'), ('\u{1061}',
+        '\u{1061}'), ('\u{1062}', '\u{1064}'), ('\u{1065}', '\u{1066}'), ('\u{1067}', '\u{106d}'),
+        ('\u{106e}', '\u{1070}'), ('\u{1071}', '\u{1074}'), ('\u{1075}', '\u{1081}'), ('\u{1082}',
+        '\u{1082}'), ('\u{1083}', '\u{1084}'), ('\u{1085}', '\u{1086}'), ('\u{1087}', '\u{108c}'),
+        ('\u{108d}', '\u{108d}'), ('\u{108e}', '\u{108e}'), ('\u{108f}', '\u{108f}'), ('\u{1090}',
+        '\u{1099}'), ('\u{109a}', '\u{109c}'), ('\u{109d}', '\u{109d}'), ('\u{109e}', '\u{109f}'),
+        ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e5}', '\u{a9e5}'), ('\u{a9e6}', '\u{a9e6}'), ('\u{a9e7}',
+        '\u{a9ef}'), ('\u{a9f0}', '\u{a9f9}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa60}', '\u{aa6f}'),
+        ('\u{aa70}', '\u{aa70}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa77}', '\u{aa79}'), ('\u{aa7a}',
+        '\u{aa7a}'), ('\u{aa7b}', '\u{aa7b}'), ('\u{aa7c}', '\u{aa7c}'), ('\u{aa7d}', '\u{aa7d}'),
+        ('\u{aa7e}', '\u{aa7f}')
     ];
 
     pub static Nabataean_table: &'static [(char, char)] = &[
-        ('\U00010880', '\U0001089e'), ('\U000108a7', '\U000108af')
+        ('\u{10880}', '\u{1089e}'), ('\u{108a7}', '\u{108af}')
     ];
 
     pub static New_Tai_Lue_table: &'static [(char, char)] = &[
-        ('\u1980', '\u19ab'), ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), ('\u19c8', '\u19c9'),
-        ('\u19d0', '\u19d9'), ('\u19da', '\u19da'), ('\u19de', '\u19df')
+        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c0}'), ('\u{19c1}', '\u{19c7}'), ('\u{19c8}',
+        '\u{19c9}'), ('\u{19d0}', '\u{19d9}'), ('\u{19da}', '\u{19da}'), ('\u{19de}', '\u{19df}')
     ];
 
     pub static Nko_table: &'static [(char, char)] = &[
-        ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), ('\u07eb', '\u07f3'), ('\u07f4', '\u07f5'),
-        ('\u07f6', '\u07f6'), ('\u07f7', '\u07f9'), ('\u07fa', '\u07fa')
+        ('\u{7c0}', '\u{7c9}'), ('\u{7ca}', '\u{7ea}'), ('\u{7eb}', '\u{7f3}'), ('\u{7f4}',
+        '\u{7f5}'), ('\u{7f6}', '\u{7f6}'), ('\u{7f7}', '\u{7f9}'), ('\u{7fa}', '\u{7fa}')
     ];
 
     pub static Ogham_table: &'static [(char, char)] = &[
-        ('\u1680', '\u1680'), ('\u1681', '\u169a'), ('\u169b', '\u169b'), ('\u169c', '\u169c')
+        ('\u{1680}', '\u{1680}'), ('\u{1681}', '\u{169a}'), ('\u{169b}', '\u{169b}'), ('\u{169c}',
+        '\u{169c}')
     ];
 
     pub static Ol_Chiki_table: &'static [(char, char)] = &[
-        ('\u1c50', '\u1c59'), ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), ('\u1c7e', '\u1c7f')
+        ('\u{1c50}', '\u{1c59}'), ('\u{1c5a}', '\u{1c77}'), ('\u{1c78}', '\u{1c7d}'), ('\u{1c7e}',
+        '\u{1c7f}')
     ];
 
     pub static Old_Italic_table: &'static [(char, char)] = &[
-        ('\U00010300', '\U0001031f'), ('\U00010320', '\U00010323')
+        ('\u{10300}', '\u{1031f}'), ('\u{10320}', '\u{10323}')
     ];
 
     pub static Old_North_Arabian_table: &'static [(char, char)] = &[
-        ('\U00010a80', '\U00010a9c'), ('\U00010a9d', '\U00010a9f')
+        ('\u{10a80}', '\u{10a9c}'), ('\u{10a9d}', '\u{10a9f}')
     ];
 
     pub static Old_Permic_table: &'static [(char, char)] = &[
-        ('\U00010350', '\U00010375'), ('\U00010376', '\U0001037a')
+        ('\u{10350}', '\u{10375}'), ('\u{10376}', '\u{1037a}')
     ];
 
     pub static Old_Persian_table: &'static [(char, char)] = &[
-        ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), ('\U000103d0', '\U000103d0'),
-        ('\U000103d1', '\U000103d5')
+        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d0}', '\u{103d0}'),
+        ('\u{103d1}', '\u{103d5}')
     ];
 
     pub static Old_South_Arabian_table: &'static [(char, char)] = &[
-        ('\U00010a60', '\U00010a7c'), ('\U00010a7d', '\U00010a7e'), ('\U00010a7f', '\U00010a7f')
+        ('\u{10a60}', '\u{10a7c}'), ('\u{10a7d}', '\u{10a7e}'), ('\u{10a7f}', '\u{10a7f}')
     ];
 
     pub static Old_Turkic_table: &'static [(char, char)] = &[
-        ('\U00010c00', '\U00010c48')
+        ('\u{10c00}', '\u{10c48}')
     ];
 
     pub static Oriya_table: &'static [(char, char)] = &[
-        ('\u0b01', '\u0b01'), ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'),
-        ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'),
-        ('\u0b3c', '\u0b3c'), ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'),
-        ('\u0b40', '\u0b40'), ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'),
-        ('\u0b4d', '\u0b4d'), ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), ('\u0b5c', '\u0b5d'),
-        ('\u0b5f', '\u0b61'), ('\u0b62', '\u0b63'), ('\u0b66', '\u0b6f'), ('\u0b70', '\u0b70'),
-        ('\u0b71', '\u0b71'), ('\u0b72', '\u0b77')
+        ('\u{b01}', '\u{b01}'), ('\u{b02}', '\u{b03}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}',
+        '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'),
+        ('\u{b35}', '\u{b39}'), ('\u{b3c}', '\u{b3c}'), ('\u{b3d}', '\u{b3d}'), ('\u{b3e}',
+        '\u{b3e}'), ('\u{b3f}', '\u{b3f}'), ('\u{b40}', '\u{b40}'), ('\u{b41}', '\u{b44}'),
+        ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'), ('\u{b4d}', '\u{b4d}'), ('\u{b56}',
+        '\u{b56}'), ('\u{b57}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b61}'),
+        ('\u{b62}', '\u{b63}'), ('\u{b66}', '\u{b6f}'), ('\u{b70}', '\u{b70}'), ('\u{b71}',
+        '\u{b71}'), ('\u{b72}', '\u{b77}')
     ];
 
     pub static Osmanya_table: &'static [(char, char)] = &[
-        ('\U00010480', '\U0001049d'), ('\U000104a0', '\U000104a9')
+        ('\u{10480}', '\u{1049d}'), ('\u{104a0}', '\u{104a9}')
     ];
 
     pub static Pahawh_Hmong_table: &'static [(char, char)] = &[
-        ('\U00016b00', '\U00016b2f'), ('\U00016b30', '\U00016b36'), ('\U00016b37', '\U00016b3b'),
-        ('\U00016b3c', '\U00016b3f'), ('\U00016b40', '\U00016b43'), ('\U00016b44', '\U00016b44'),
-        ('\U00016b45', '\U00016b45'), ('\U00016b50', '\U00016b59'), ('\U00016b5b', '\U00016b61'),
-        ('\U00016b63', '\U00016b77'), ('\U00016b7d', '\U00016b8f')
+        ('\u{16b00}', '\u{16b2f}'), ('\u{16b30}', '\u{16b36}'), ('\u{16b37}', '\u{16b3b}'),
+        ('\u{16b3c}', '\u{16b3f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b44}', '\u{16b44}'),
+        ('\u{16b45}', '\u{16b45}'), ('\u{16b50}', '\u{16b59}'), ('\u{16b5b}', '\u{16b61}'),
+        ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}')
     ];
 
     pub static Palmyrene_table: &'static [(char, char)] = &[
-        ('\U00010860', '\U00010876'), ('\U00010877', '\U00010878'), ('\U00010879', '\U0001087f')
+        ('\u{10860}', '\u{10876}'), ('\u{10877}', '\u{10878}'), ('\u{10879}', '\u{1087f}')
     ];
 
     pub static Pau_Cin_Hau_table: &'static [(char, char)] = &[
-        ('\U00011ac0', '\U00011af8')
+        ('\u{11ac0}', '\u{11af8}')
     ];
 
     pub static Phags_Pa_table: &'static [(char, char)] = &[
-        ('\ua840', '\ua873'), ('\ua874', '\ua877')
+        ('\u{a840}', '\u{a873}'), ('\u{a874}', '\u{a877}')
     ];
 
     pub static Phoenician_table: &'static [(char, char)] = &[
-        ('\U00010900', '\U00010915'), ('\U00010916', '\U0001091b'), ('\U0001091f', '\U0001091f')
+        ('\u{10900}', '\u{10915}'), ('\u{10916}', '\u{1091b}'), ('\u{1091f}', '\u{1091f}')
     ];
 
     pub static Psalter_Pahlavi_table: &'static [(char, char)] = &[
-        ('\U00010b80', '\U00010b91'), ('\U00010b99', '\U00010b9c'), ('\U00010ba9', '\U00010baf')
+        ('\u{10b80}', '\u{10b91}'), ('\u{10b99}', '\u{10b9c}'), ('\u{10ba9}', '\u{10baf}')
     ];
 
     pub static Rejang_table: &'static [(char, char)] = &[
-        ('\ua930', '\ua946'), ('\ua947', '\ua951'), ('\ua952', '\ua953'), ('\ua95f', '\ua95f')
+        ('\u{a930}', '\u{a946}'), ('\u{a947}', '\u{a951}'), ('\u{a952}', '\u{a953}'), ('\u{a95f}',
+        '\u{a95f}')
     ];
 
     pub static Runic_table: &'static [(char, char)] = &[
-        ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), ('\u16f1', '\u16f8')
+        ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f0}'), ('\u{16f1}', '\u{16f8}')
     ];
 
     pub static Samaritan_table: &'static [(char, char)] = &[
-        ('\u0800', '\u0815'), ('\u0816', '\u0819'), ('\u081a', '\u081a'), ('\u081b', '\u0823'),
-        ('\u0824', '\u0824'), ('\u0825', '\u0827'), ('\u0828', '\u0828'), ('\u0829', '\u082d'),
-        ('\u0830', '\u083e')
+        ('\u{800}', '\u{815}'), ('\u{816}', '\u{819}'), ('\u{81a}', '\u{81a}'), ('\u{81b}',
+        '\u{823}'), ('\u{824}', '\u{824}'), ('\u{825}', '\u{827}'), ('\u{828}', '\u{828}'),
+        ('\u{829}', '\u{82d}'), ('\u{830}', '\u{83e}')
     ];
 
     pub static Saurashtra_table: &'static [(char, char)] = &[
-        ('\ua880', '\ua881'), ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), ('\ua8c4', '\ua8c4'),
-        ('\ua8ce', '\ua8cf'), ('\ua8d0', '\ua8d9')
+        ('\u{a880}', '\u{a881}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8b4}', '\u{a8c3}'), ('\u{a8c4}',
+        '\u{a8c4}'), ('\u{a8ce}', '\u{a8cf}'), ('\u{a8d0}', '\u{a8d9}')
     ];
 
     pub static Sharada_table: &'static [(char, char)] = &[
-        ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'),
-        ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111c0'),
-        ('\U000111c1', '\U000111c4'), ('\U000111c5', '\U000111c8'), ('\U000111cd', '\U000111cd'),
-        ('\U000111d0', '\U000111d9'), ('\U000111da', '\U000111da')
+        ('\u{11180}', '\u{11181}'), ('\u{11182}', '\u{11182}'), ('\u{11183}', '\u{111b2}'),
+        ('\u{111b3}', '\u{111b5}'), ('\u{111b6}', '\u{111be}'), ('\u{111bf}', '\u{111c0}'),
+        ('\u{111c1}', '\u{111c4}'), ('\u{111c5}', '\u{111c8}'), ('\u{111cd}', '\u{111cd}'),
+        ('\u{111d0}', '\u{111d9}'), ('\u{111da}', '\u{111da}')
     ];
 
     pub static Shavian_table: &'static [(char, char)] = &[
-        ('\U00010450', '\U0001047f')
+        ('\u{10450}', '\u{1047f}')
     ];
 
     pub static Siddham_table: &'static [(char, char)] = &[
-        ('\U00011580', '\U000115ae'), ('\U000115af', '\U000115b1'), ('\U000115b2', '\U000115b5'),
-        ('\U000115b8', '\U000115bb'), ('\U000115bc', '\U000115bd'), ('\U000115be', '\U000115be'),
-        ('\U000115bf', '\U000115c0'), ('\U000115c1', '\U000115c9')
+        ('\u{11580}', '\u{115ae}'), ('\u{115af}', '\u{115b1}'), ('\u{115b2}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115bb}'), ('\u{115bc}', '\u{115bd}'), ('\u{115be}', '\u{115be}'),
+        ('\u{115bf}', '\u{115c0}'), ('\u{115c1}', '\u{115c9}')
     ];
 
     pub static Sinhala_table: &'static [(char, char)] = &[
-        ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'),
-        ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd1'),
-        ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), ('\u0de6', '\u0def'),
-        ('\u0df2', '\u0df3'), ('\u0df4', '\u0df4'), ('\U000111e1', '\U000111f4')
+        ('\u{d82}', '\u{d83}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}',
+        '\u{dbb}'), ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dca}', '\u{dca}'),
+        ('\u{dcf}', '\u{dd1}'), ('\u{dd2}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'), ('\u{dd8}',
+        '\u{ddf}'), ('\u{de6}', '\u{def}'), ('\u{df2}', '\u{df3}'), ('\u{df4}', '\u{df4}'),
+        ('\u{111e1}', '\u{111f4}')
     ];
 
     pub static Sora_Sompeng_table: &'static [(char, char)] = &[
-        ('\U000110d0', '\U000110e8'), ('\U000110f0', '\U000110f9')
+        ('\u{110d0}', '\u{110e8}'), ('\u{110f0}', '\u{110f9}')
     ];
 
     pub static Sundanese_table: &'static [(char, char)] = &[
-        ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), ('\u1ba1', '\u1ba1'),
-        ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), ('\u1baa', '\u1baa'),
-        ('\u1bab', '\u1bad'), ('\u1bae', '\u1baf'), ('\u1bb0', '\u1bb9'), ('\u1bba', '\u1bbf'),
-        ('\u1cc0', '\u1cc7')
+        ('\u{1b80}', '\u{1b81}'), ('\u{1b82}', '\u{1b82}'), ('\u{1b83}', '\u{1ba0}'), ('\u{1ba1}',
+        '\u{1ba1}'), ('\u{1ba2}', '\u{1ba5}'), ('\u{1ba6}', '\u{1ba7}'), ('\u{1ba8}', '\u{1ba9}'),
+        ('\u{1baa}', '\u{1baa}'), ('\u{1bab}', '\u{1bad}'), ('\u{1bae}', '\u{1baf}'), ('\u{1bb0}',
+        '\u{1bb9}'), ('\u{1bba}', '\u{1bbf}'), ('\u{1cc0}', '\u{1cc7}')
     ];
 
     pub static Syloti_Nagri_table: &'static [(char, char)] = &[
-        ('\ua800', '\ua801'), ('\ua802', '\ua802'), ('\ua803', '\ua805'), ('\ua806', '\ua806'),
-        ('\ua807', '\ua80a'), ('\ua80b', '\ua80b'), ('\ua80c', '\ua822'), ('\ua823', '\ua824'),
-        ('\ua825', '\ua826'), ('\ua827', '\ua827'), ('\ua828', '\ua82b')
+        ('\u{a800}', '\u{a801}'), ('\u{a802}', '\u{a802}'), ('\u{a803}', '\u{a805}'), ('\u{a806}',
+        '\u{a806}'), ('\u{a807}', '\u{a80a}'), ('\u{a80b}', '\u{a80b}'), ('\u{a80c}', '\u{a822}'),
+        ('\u{a823}', '\u{a824}'), ('\u{a825}', '\u{a826}'), ('\u{a827}', '\u{a827}'), ('\u{a828}',
+        '\u{a82b}')
     ];
 
     pub static Syriac_table: &'static [(char, char)] = &[
-        ('\u0700', '\u070d'), ('\u070f', '\u070f'), ('\u0710', '\u0710'), ('\u0711', '\u0711'),
-        ('\u0712', '\u072f'), ('\u0730', '\u074a'), ('\u074d', '\u074f')
+        ('\u{700}', '\u{70d}'), ('\u{70f}', '\u{70f}'), ('\u{710}', '\u{710}'), ('\u{711}',
+        '\u{711}'), ('\u{712}', '\u{72f}'), ('\u{730}', '\u{74a}'), ('\u{74d}', '\u{74f}')
     ];
 
     pub static Tagalog_table: &'static [(char, char)] = &[
-        ('\u1700', '\u170c'), ('\u170e', '\u1711'), ('\u1712', '\u1714')
+        ('\u{1700}', '\u{170c}'), ('\u{170e}', '\u{1711}'), ('\u{1712}', '\u{1714}')
     ];
 
     pub static Tagbanwa_table: &'static [(char, char)] = &[
-        ('\u1760', '\u176c'), ('\u176e', '\u1770'), ('\u1772', '\u1773')
+        ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1772}', '\u{1773}')
     ];
 
     pub static Tai_Le_table: &'static [(char, char)] = &[
-        ('\u1950', '\u196d'), ('\u1970', '\u1974')
+        ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}')
     ];
 
     pub static Tai_Tham_table: &'static [(char, char)] = &[
-        ('\u1a20', '\u1a54'), ('\u1a55', '\u1a55'), ('\u1a56', '\u1a56'), ('\u1a57', '\u1a57'),
-        ('\u1a58', '\u1a5e'), ('\u1a60', '\u1a60'), ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'),
-        ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a7c'),
-        ('\u1a7f', '\u1a7f'), ('\u1a80', '\u1a89'), ('\u1a90', '\u1a99'), ('\u1aa0', '\u1aa6'),
-        ('\u1aa7', '\u1aa7'), ('\u1aa8', '\u1aad')
+        ('\u{1a20}', '\u{1a54}'), ('\u{1a55}', '\u{1a55}'), ('\u{1a56}', '\u{1a56}'), ('\u{1a57}',
+        '\u{1a57}'), ('\u{1a58}', '\u{1a5e}'), ('\u{1a60}', '\u{1a60}'), ('\u{1a61}', '\u{1a61}'),
+        ('\u{1a62}', '\u{1a62}'), ('\u{1a63}', '\u{1a64}'), ('\u{1a65}', '\u{1a6c}'), ('\u{1a6d}',
+        '\u{1a72}'), ('\u{1a73}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a7f}'), ('\u{1a80}', '\u{1a89}'),
+        ('\u{1a90}', '\u{1a99}'), ('\u{1aa0}', '\u{1aa6}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1aa8}',
+        '\u{1aad}')
     ];
 
     pub static Tai_Viet_table: &'static [(char, char)] = &[
-        ('\uaa80', '\uaaaf'), ('\uaab0', '\uaab0'), ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'),
-        ('\uaab5', '\uaab6'), ('\uaab7', '\uaab8'), ('\uaab9', '\uaabd'), ('\uaabe', '\uaabf'),
-        ('\uaac0', '\uaac0'), ('\uaac1', '\uaac1'), ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'),
-        ('\uaadd', '\uaadd'), ('\uaade', '\uaadf')
+        ('\u{aa80}', '\u{aaaf}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab2}',
+        '\u{aab4}'), ('\u{aab5}', '\u{aab6}'), ('\u{aab7}', '\u{aab8}'), ('\u{aab9}', '\u{aabd}'),
+        ('\u{aabe}', '\u{aabf}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac1}', '\u{aac1}'), ('\u{aac2}',
+        '\u{aac2}'), ('\u{aadb}', '\u{aadc}'), ('\u{aadd}', '\u{aadd}'), ('\u{aade}', '\u{aadf}')
     ];
 
     pub static Takri_table: &'static [(char, char)] = &[
-        ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'), ('\U000116ac', '\U000116ac'),
-        ('\U000116ad', '\U000116ad'), ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'),
-        ('\U000116b6', '\U000116b6'), ('\U000116b7', '\U000116b7'), ('\U000116c0', '\U000116c9')
+        ('\u{11680}', '\u{116aa}'), ('\u{116ab}', '\u{116ab}'), ('\u{116ac}', '\u{116ac}'),
+        ('\u{116ad}', '\u{116ad}'), ('\u{116ae}', '\u{116af}'), ('\u{116b0}', '\u{116b5}'),
+        ('\u{116b6}', '\u{116b6}'), ('\u{116b7}', '\u{116b7}'), ('\u{116c0}', '\u{116c9}')
     ];
 
     pub static Tamil_table: &'static [(char, char)] = &[
-        ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'),
-        ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'),
-        ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'),
-        ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'),
-        ('\u0bcd', '\u0bcd'), ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), ('\u0be6', '\u0bef'),
-        ('\u0bf0', '\u0bf2'), ('\u0bf3', '\u0bf8'), ('\u0bf9', '\u0bf9'), ('\u0bfa', '\u0bfa')
+        ('\u{b82}', '\u{b82}'), ('\u{b83}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}',
+        '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
+        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'), ('\u{bae}',
+        '\u{bb9}'), ('\u{bbe}', '\u{bbf}'), ('\u{bc0}', '\u{bc0}'), ('\u{bc1}', '\u{bc2}'),
+        ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcc}'), ('\u{bcd}', '\u{bcd}'), ('\u{bd0}',
+        '\u{bd0}'), ('\u{bd7}', '\u{bd7}'), ('\u{be6}', '\u{bef}'), ('\u{bf0}', '\u{bf2}'),
+        ('\u{bf3}', '\u{bf8}'), ('\u{bf9}', '\u{bf9}'), ('\u{bfa}', '\u{bfa}')
     ];
 
     pub static Telugu_table: &'static [(char, char)] = &[
-        ('\u0c00', '\u0c00'), ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'),
-        ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c39'), ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'),
-        ('\u0c41', '\u0c44'), ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), ('\u0c55', '\u0c56'),
-        ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), ('\u0c66', '\u0c6f'),
-        ('\u0c78', '\u0c7e'), ('\u0c7f', '\u0c7f')
+        ('\u{c00}', '\u{c00}'), ('\u{c01}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}',
+        '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'),
+        ('\u{c3e}', '\u{c40}'), ('\u{c41}', '\u{c44}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}',
+        '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c58}', '\u{c59}'), ('\u{c60}', '\u{c61}'),
+        ('\u{c62}', '\u{c63}'), ('\u{c66}', '\u{c6f}'), ('\u{c78}', '\u{c7e}'), ('\u{c7f}',
+        '\u{c7f}')
     ];
 
     pub static Thaana_table: &'static [(char, char)] = &[
-        ('\u0780', '\u07a5'), ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1')
+        ('\u{780}', '\u{7a5}'), ('\u{7a6}', '\u{7b0}'), ('\u{7b1}', '\u{7b1}')
     ];
 
     pub static Thai_table: &'static [(char, char)] = &[
-        ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'),
-        ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), ('\u0e47', '\u0e4e'), ('\u0e4f', '\u0e4f'),
-        ('\u0e50', '\u0e59'), ('\u0e5a', '\u0e5b')
+        ('\u{e01}', '\u{e30}'), ('\u{e31}', '\u{e31}'), ('\u{e32}', '\u{e33}'), ('\u{e34}',
+        '\u{e3a}'), ('\u{e40}', '\u{e45}'), ('\u{e46}', '\u{e46}'), ('\u{e47}', '\u{e4e}'),
+        ('\u{e4f}', '\u{e4f}'), ('\u{e50}', '\u{e59}'), ('\u{e5a}', '\u{e5b}')
     ];
 
     pub static Tibetan_table: &'static [(char, char)] = &[
-        ('\u0f00', '\u0f00'), ('\u0f01', '\u0f03'), ('\u0f04', '\u0f12'), ('\u0f13', '\u0f13'),
-        ('\u0f14', '\u0f14'), ('\u0f15', '\u0f17'), ('\u0f18', '\u0f19'), ('\u0f1a', '\u0f1f'),
-        ('\u0f20', '\u0f29'), ('\u0f2a', '\u0f33'), ('\u0f34', '\u0f34'), ('\u0f35', '\u0f35'),
-        ('\u0f36', '\u0f36'), ('\u0f37', '\u0f37'), ('\u0f38', '\u0f38'), ('\u0f39', '\u0f39'),
-        ('\u0f3a', '\u0f3a'), ('\u0f3b', '\u0f3b'), ('\u0f3c', '\u0f3c'), ('\u0f3d', '\u0f3d'),
-        ('\u0f3e', '\u0f3f'), ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'),
-        ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f84'), ('\u0f85', '\u0f85'), ('\u0f86', '\u0f87'),
-        ('\u0f88', '\u0f8c'), ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), ('\u0fbe', '\u0fc5'),
-        ('\u0fc6', '\u0fc6'), ('\u0fc7', '\u0fcc'), ('\u0fce', '\u0fcf'), ('\u0fd0', '\u0fd4'),
-        ('\u0fd9', '\u0fda')
+        ('\u{f00}', '\u{f00}'), ('\u{f01}', '\u{f03}'), ('\u{f04}', '\u{f12}'), ('\u{f13}',
+        '\u{f13}'), ('\u{f14}', '\u{f14}'), ('\u{f15}', '\u{f17}'), ('\u{f18}', '\u{f19}'),
+        ('\u{f1a}', '\u{f1f}'), ('\u{f20}', '\u{f29}'), ('\u{f2a}', '\u{f33}'), ('\u{f34}',
+        '\u{f34}'), ('\u{f35}', '\u{f35}'), ('\u{f36}', '\u{f36}'), ('\u{f37}', '\u{f37}'),
+        ('\u{f38}', '\u{f38}'), ('\u{f39}', '\u{f39}'), ('\u{f3a}', '\u{f3a}'), ('\u{f3b}',
+        '\u{f3b}'), ('\u{f3c}', '\u{f3c}'), ('\u{f3d}', '\u{f3d}'), ('\u{f3e}', '\u{f3f}'),
+        ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f7e}'), ('\u{f7f}',
+        '\u{f7f}'), ('\u{f80}', '\u{f84}'), ('\u{f85}', '\u{f85}'), ('\u{f86}', '\u{f87}'),
+        ('\u{f88}', '\u{f8c}'), ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{fbe}',
+        '\u{fc5}'), ('\u{fc6}', '\u{fc6}'), ('\u{fc7}', '\u{fcc}'), ('\u{fce}', '\u{fcf}'),
+        ('\u{fd0}', '\u{fd4}'), ('\u{fd9}', '\u{fda}')
     ];
 
     pub static Tifinagh_table: &'static [(char, char)] = &[
-        ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), ('\u2d70', '\u2d70'), ('\u2d7f', '\u2d7f')
+        ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d70}', '\u{2d70}'), ('\u{2d7f}',
+        '\u{2d7f}')
     ];
 
     pub static Tirhuta_table: &'static [(char, char)] = &[
-        ('\U00011480', '\U000114af'), ('\U000114b0', '\U000114b2'), ('\U000114b3', '\U000114b8'),
-        ('\U000114b9', '\U000114b9'), ('\U000114ba', '\U000114ba'), ('\U000114bb', '\U000114be'),
-        ('\U000114bf', '\U000114c0'), ('\U000114c1', '\U000114c1'), ('\U000114c2', '\U000114c3'),
-        ('\U000114c4', '\U000114c5'), ('\U000114c6', '\U000114c6'), ('\U000114c7', '\U000114c7'),
-        ('\U000114d0', '\U000114d9')
+        ('\u{11480}', '\u{114af}'), ('\u{114b0}', '\u{114b2}'), ('\u{114b3}', '\u{114b8}'),
+        ('\u{114b9}', '\u{114b9}'), ('\u{114ba}', '\u{114ba}'), ('\u{114bb}', '\u{114be}'),
+        ('\u{114bf}', '\u{114c0}'), ('\u{114c1}', '\u{114c1}'), ('\u{114c2}', '\u{114c3}'),
+        ('\u{114c4}', '\u{114c5}'), ('\u{114c6}', '\u{114c6}'), ('\u{114c7}', '\u{114c7}'),
+        ('\u{114d0}', '\u{114d9}')
     ];
 
     pub static Ugaritic_table: &'static [(char, char)] = &[
-        ('\U00010380', '\U0001039d'), ('\U0001039f', '\U0001039f')
+        ('\u{10380}', '\u{1039d}'), ('\u{1039f}', '\u{1039f}')
     ];
 
     pub static Vai_table: &'static [(char, char)] = &[
-        ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), ('\ua60d', '\ua60f'), ('\ua610', '\ua61f'),
-        ('\ua620', '\ua629'), ('\ua62a', '\ua62b')
+        ('\u{a500}', '\u{a60b}'), ('\u{a60c}', '\u{a60c}'), ('\u{a60d}', '\u{a60f}'), ('\u{a610}',
+        '\u{a61f}'), ('\u{a620}', '\u{a629}'), ('\u{a62a}', '\u{a62b}')
     ];
 
     pub static Warang_Citi_table: &'static [(char, char)] = &[
-        ('\U000118a0', '\U000118df'), ('\U000118e0', '\U000118e9'), ('\U000118ea', '\U000118f2'),
-        ('\U000118ff', '\U000118ff')
+        ('\u{118a0}', '\u{118df}'), ('\u{118e0}', '\u{118e9}'), ('\u{118ea}', '\u{118f2}'),
+        ('\u{118ff}', '\u{118ff}')
     ];
 
     pub static Yi_table: &'static [(char, char)] = &[
-        ('\ua000', '\ua014'), ('\ua015', '\ua015'), ('\ua016', '\ua48c'), ('\ua490', '\ua4c6')
+        ('\u{a000}', '\u{a014}'), ('\u{a015}', '\u{a015}'), ('\u{a016}', '\u{a48c}'), ('\u{a490}',
+        '\u{a4c6}')
     ];
 
 }
 
 pub mod property {
     pub static Join_Control_table: &'static [(char, char)] = &[
-        ('\u200c', '\u200d')
+        ('\u{200c}', '\u{200d}')
     ];
 
     pub static Noncharacter_Code_Point_table: &'static [(char, char)] = &[
-        ('\ufdd0', '\ufdef'), ('\ufffe', '\uffff'), ('\U0001fffe', '\U0001ffff'), ('\U0002fffe',
-        '\U0002ffff'), ('\U0003fffe', '\U0003ffff'), ('\U0004fffe', '\U0004ffff'), ('\U0005fffe',
-        '\U0005ffff'), ('\U0006fffe', '\U0006ffff'), ('\U0007fffe', '\U0007ffff'), ('\U0008fffe',
-        '\U0008ffff'), ('\U0009fffe', '\U0009ffff'), ('\U000afffe', '\U000affff'), ('\U000bfffe',
-        '\U000bffff'), ('\U000cfffe', '\U000cffff'), ('\U000dfffe', '\U000dffff'), ('\U000efffe',
-        '\U000effff'), ('\U000ffffe', '\U000fffff')
+        ('\u{fdd0}', '\u{fdef}'), ('\u{fffe}', '\u{ffff}'), ('\u{1fffe}', '\u{1ffff}'),
+        ('\u{2fffe}', '\u{2ffff}'), ('\u{3fffe}', '\u{3ffff}'), ('\u{4fffe}', '\u{4ffff}'),
+        ('\u{5fffe}', '\u{5ffff}'), ('\u{6fffe}', '\u{6ffff}'), ('\u{7fffe}', '\u{7ffff}'),
+        ('\u{8fffe}', '\u{8ffff}'), ('\u{9fffe}', '\u{9ffff}'), ('\u{afffe}', '\u{affff}'),
+        ('\u{bfffe}', '\u{bffff}'), ('\u{cfffe}', '\u{cffff}'), ('\u{dfffe}', '\u{dffff}'),
+        ('\u{efffe}', '\u{effff}'), ('\u{ffffe}', '\u{fffff}')
     ];
 
     pub static White_Space_table: &'static [(char, char)] = &[
-        ('\x09', '\x0d'), ('\x20', '\x20'), ('\u0085', '\u0085'), ('\u00a0', '\u00a0'), ('\u1680',
-        '\u1680'), ('\u2000', '\u200a'), ('\u2028', '\u2028'), ('\u2029', '\u2029'), ('\u202f',
-        '\u202f'), ('\u205f', '\u205f'), ('\u3000', '\u3000')
+        ('\u{9}', '\u{d}'), ('\u{20}', '\u{20}'), ('\u{85}', '\u{85}'), ('\u{a0}', '\u{a0}'),
+        ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'), ('\u{2028}', '\u{2028}'), ('\u{2029}',
+        '\u{2029}'), ('\u{202f}', '\u{202f}'), ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}')
     ];
 
     pub fn White_Space(c: char) -> bool {
@@ -3746,180 +4059,195 @@ pub mod regex {
     pub static PERLS: &'static &'static [(char, char)] = &super::property::White_Space_table;
 
     pub static PERLW: &'static [(char, char)] = &[
-        ('\x30', '\x39'), ('\x41', '\x5a'), ('\x5f', '\x5f'), ('\x61', '\x7a'), ('\u00aa',
-        '\u00aa'), ('\u00b5', '\u00b5'), ('\u00ba', '\u00ba'), ('\u00c0', '\u00d6'), ('\u00d8',
-        '\u00f6'), ('\u00f8', '\u02c1'), ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), ('\u02ec',
-        '\u02ec'), ('\u02ee', '\u02ee'), ('\u0300', '\u0374'), ('\u0376', '\u0377'), ('\u037a',
-        '\u037d'), ('\u037f', '\u037f'), ('\u0386', '\u0386'), ('\u0388', '\u038a'), ('\u038c',
-        '\u038c'), ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), ('\u0483',
-        '\u052f'), ('\u0531', '\u0556'), ('\u0559', '\u0559'), ('\u0561', '\u0587'), ('\u0591',
-        '\u05bd'), ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), ('\u05c4', '\u05c5'), ('\u05c7',
-        '\u05c7'), ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), ('\u0610', '\u061a'), ('\u0620',
-        '\u0669'), ('\u066e', '\u06d3'), ('\u06d5', '\u06dc'), ('\u06df', '\u06e8'), ('\u06ea',
-        '\u06fc'), ('\u06ff', '\u06ff'), ('\u0710', '\u074a'), ('\u074d', '\u07b1'), ('\u07c0',
-        '\u07f5'), ('\u07fa', '\u07fa'), ('\u0800', '\u082d'), ('\u0840', '\u085b'), ('\u08a0',
-        '\u08b2'), ('\u08e4', '\u0963'), ('\u0966', '\u096f'), ('\u0971', '\u0983'), ('\u0985',
-        '\u098c'), ('\u098f', '\u0990'), ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), ('\u09b2',
-        '\u09b2'), ('\u09b6', '\u09b9'), ('\u09bc', '\u09c4'), ('\u09c7', '\u09c8'), ('\u09cb',
-        '\u09ce'), ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), ('\u09df', '\u09e3'), ('\u09e6',
-        '\u09f1'), ('\u0a01', '\u0a03'), ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), ('\u0a13',
-        '\u0a28'), ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), ('\u0a38',
-        '\u0a39'), ('\u0a3c', '\u0a3c'), ('\u0a3e', '\u0a42'), ('\u0a47', '\u0a48'), ('\u0a4b',
-        '\u0a4d'), ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), ('\u0a66',
-        '\u0a75'), ('\u0a81', '\u0a83'), ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), ('\u0a93',
-        '\u0aa8'), ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), ('\u0abc',
-        '\u0ac5'), ('\u0ac7', '\u0ac9'), ('\u0acb', '\u0acd'), ('\u0ad0', '\u0ad0'), ('\u0ae0',
-        '\u0ae3'), ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b03'), ('\u0b05', '\u0b0c'), ('\u0b0f',
-        '\u0b10'), ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), ('\u0b35',
-        '\u0b39'), ('\u0b3c', '\u0b44'), ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4d'), ('\u0b56',
-        '\u0b57'), ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b63'), ('\u0b66', '\u0b6f'), ('\u0b71',
-        '\u0b71'), ('\u0b82', '\u0b83'), ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), ('\u0b92',
-        '\u0b95'), ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), ('\u0ba3',
-        '\u0ba4'), ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bc2'), ('\u0bc6',
-        '\u0bc8'), ('\u0bca', '\u0bcd'), ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), ('\u0be6',
-        '\u0bef'), ('\u0c00', '\u0c03'), ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), ('\u0c12',
-        '\u0c28'), ('\u0c2a', '\u0c39'), ('\u0c3d', '\u0c44'), ('\u0c46', '\u0c48'), ('\u0c4a',
-        '\u0c4d'), ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), ('\u0c60', '\u0c63'), ('\u0c66',
-        '\u0c6f'), ('\u0c81', '\u0c83'), ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), ('\u0c92',
-        '\u0ca8'), ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cc4'), ('\u0cc6',
-        '\u0cc8'), ('\u0cca', '\u0ccd'), ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), ('\u0ce0',
-        '\u0ce3'), ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2'), ('\u0d01', '\u0d03'), ('\u0d05',
-        '\u0d0c'), ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d44'), ('\u0d46',
-        '\u0d48'), ('\u0d4a', '\u0d4e'), ('\u0d57', '\u0d57'), ('\u0d60', '\u0d63'), ('\u0d66',
-        '\u0d6f'), ('\u0d7a', '\u0d7f'), ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), ('\u0d9a',
-        '\u0db1'), ('\u0db3', '\u0dbb'), ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), ('\u0dca',
-        '\u0dca'), ('\u0dcf', '\u0dd4'), ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), ('\u0de6',
-        '\u0def'), ('\u0df2', '\u0df3'), ('\u0e01', '\u0e3a'), ('\u0e40', '\u0e4e'), ('\u0e50',
-        '\u0e59'), ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), ('\u0e87', '\u0e88'), ('\u0e8a',
-        '\u0e8a'), ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), ('\u0e99', '\u0e9f'), ('\u0ea1',
-        '\u0ea3'), ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), ('\u0eaa', '\u0eab'), ('\u0ead',
-        '\u0eb9'), ('\u0ebb', '\u0ebd'), ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), ('\u0ec8',
-        '\u0ecd'), ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), ('\u0f18',
-        '\u0f19'), ('\u0f20', '\u0f29'), ('\u0f35', '\u0f35'), ('\u0f37', '\u0f37'), ('\u0f39',
-        '\u0f39'), ('\u0f3e', '\u0f47'), ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f84'), ('\u0f86',
-        '\u0f97'), ('\u0f99', '\u0fbc'), ('\u0fc6', '\u0fc6'), ('\u1000', '\u1049'), ('\u1050',
-        '\u109d'), ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), ('\u10d0',
-        '\u10fa'), ('\u10fc', '\u1248'), ('\u124a', '\u124d'), ('\u1250', '\u1256'), ('\u1258',
-        '\u1258'), ('\u125a', '\u125d'), ('\u1260', '\u1288'), ('\u128a', '\u128d'), ('\u1290',
-        '\u12b0'), ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), ('\u12c2',
-        '\u12c5'), ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), ('\u1312', '\u1315'), ('\u1318',
-        '\u135a'), ('\u135d', '\u135f'), ('\u1380', '\u138f'), ('\u13a0', '\u13f4'), ('\u1401',
-        '\u166c'), ('\u166f', '\u167f'), ('\u1681', '\u169a'), ('\u16a0', '\u16ea'), ('\u16ee',
-        '\u16f8'), ('\u1700', '\u170c'), ('\u170e', '\u1714'), ('\u1720', '\u1734'), ('\u1740',
-        '\u1753'), ('\u1760', '\u176c'), ('\u176e', '\u1770'), ('\u1772', '\u1773'), ('\u1780',
-        '\u17d3'), ('\u17d7', '\u17d7'), ('\u17dc', '\u17dd'), ('\u17e0', '\u17e9'), ('\u180b',
-        '\u180d'), ('\u1810', '\u1819'), ('\u1820', '\u1877'), ('\u1880', '\u18aa'), ('\u18b0',
-        '\u18f5'), ('\u1900', '\u191e'), ('\u1920', '\u192b'), ('\u1930', '\u193b'), ('\u1946',
-        '\u196d'), ('\u1970', '\u1974'), ('\u1980', '\u19ab'), ('\u19b0', '\u19c9'), ('\u19d0',
-        '\u19d9'), ('\u1a00', '\u1a1b'), ('\u1a20', '\u1a5e'), ('\u1a60', '\u1a7c'), ('\u1a7f',
-        '\u1a89'), ('\u1a90', '\u1a99'), ('\u1aa7', '\u1aa7'), ('\u1ab0', '\u1abe'), ('\u1b00',
-        '\u1b4b'), ('\u1b50', '\u1b59'), ('\u1b6b', '\u1b73'), ('\u1b80', '\u1bf3'), ('\u1c00',
-        '\u1c37'), ('\u1c40', '\u1c49'), ('\u1c4d', '\u1c7d'), ('\u1cd0', '\u1cd2'), ('\u1cd4',
-        '\u1cf6'), ('\u1cf8', '\u1cf9'), ('\u1d00', '\u1df5'), ('\u1dfc', '\u1f15'), ('\u1f18',
-        '\u1f1d'), ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), ('\u1f59',
-        '\u1f59'), ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), ('\u1f80',
-        '\u1fb4'), ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), ('\u1fc6',
-        '\u1fcc'), ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), ('\u1ff2',
-        '\u1ff4'), ('\u1ff6', '\u1ffc'), ('\u200c', '\u200d'), ('\u203f', '\u2040'), ('\u2054',
-        '\u2054'), ('\u2071', '\u2071'), ('\u207f', '\u207f'), ('\u2090', '\u209c'), ('\u20d0',
-        '\u20f0'), ('\u2102', '\u2102'), ('\u2107', '\u2107'), ('\u210a', '\u2113'), ('\u2115',
-        '\u2115'), ('\u2119', '\u211d'), ('\u2124', '\u2124'), ('\u2126', '\u2126'), ('\u2128',
-        '\u2128'), ('\u212a', '\u212d'), ('\u212f', '\u2139'), ('\u213c', '\u213f'), ('\u2145',
-        '\u2149'), ('\u214e', '\u214e'), ('\u2160', '\u2188'), ('\u24b6', '\u24e9'), ('\u2c00',
-        '\u2c2e'), ('\u2c30', '\u2c5e'), ('\u2c60', '\u2ce4'), ('\u2ceb', '\u2cf3'), ('\u2d00',
-        '\u2d25'), ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), ('\u2d6f',
-        '\u2d6f'), ('\u2d7f', '\u2d96'), ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), ('\u2db0',
-        '\u2db6'), ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), ('\u2dd0',
-        '\u2dd6'), ('\u2dd8', '\u2dde'), ('\u2de0', '\u2dff'), ('\u2e2f', '\u2e2f'), ('\u3005',
-        '\u3007'), ('\u3021', '\u302f'), ('\u3031', '\u3035'), ('\u3038', '\u303c'), ('\u3041',
-        '\u3096'), ('\u3099', '\u309a'), ('\u309d', '\u309f'), ('\u30a1', '\u30fa'), ('\u30fc',
-        '\u30ff'), ('\u3105', '\u312d'), ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), ('\u31f0',
-        '\u31ff'), ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), ('\ua000', '\ua48c'), ('\ua4d0',
-        '\ua4fd'), ('\ua500', '\ua60c'), ('\ua610', '\ua62b'), ('\ua640', '\ua672'), ('\ua674',
-        '\ua67d'), ('\ua67f', '\ua69d'), ('\ua69f', '\ua6f1'), ('\ua717', '\ua71f'), ('\ua722',
-        '\ua788'), ('\ua78b', '\ua78e'), ('\ua790', '\ua7ad'), ('\ua7b0', '\ua7b1'), ('\ua7f7',
-        '\ua827'), ('\ua840', '\ua873'), ('\ua880', '\ua8c4'), ('\ua8d0', '\ua8d9'), ('\ua8e0',
-        '\ua8f7'), ('\ua8fb', '\ua8fb'), ('\ua900', '\ua92d'), ('\ua930', '\ua953'), ('\ua960',
-        '\ua97c'), ('\ua980', '\ua9c0'), ('\ua9cf', '\ua9d9'), ('\ua9e0', '\ua9fe'), ('\uaa00',
-        '\uaa36'), ('\uaa40', '\uaa4d'), ('\uaa50', '\uaa59'), ('\uaa60', '\uaa76'), ('\uaa7a',
-        '\uaac2'), ('\uaadb', '\uaadd'), ('\uaae0', '\uaaef'), ('\uaaf2', '\uaaf6'), ('\uab01',
-        '\uab06'), ('\uab09', '\uab0e'), ('\uab11', '\uab16'), ('\uab20', '\uab26'), ('\uab28',
-        '\uab2e'), ('\uab30', '\uab5a'), ('\uab5c', '\uab5f'), ('\uab64', '\uab65'), ('\uabc0',
-        '\uabea'), ('\uabec', '\uabed'), ('\uabf0', '\uabf9'), ('\uac00', '\ud7a3'), ('\ud7b0',
-        '\ud7c6'), ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), ('\ufb00',
-        '\ufb06'), ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb28'), ('\ufb2a', '\ufb36'), ('\ufb38',
-        '\ufb3c'), ('\ufb3e', '\ufb3e'), ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), ('\ufb46',
-        '\ufbb1'), ('\ufbd3', '\ufd3d'), ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), ('\ufdf0',
-        '\ufdfb'), ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe2d'), ('\ufe33', '\ufe34'), ('\ufe4d',
-        '\ufe4f'), ('\ufe70', '\ufe74'), ('\ufe76', '\ufefc'), ('\uff10', '\uff19'), ('\uff21',
-        '\uff3a'), ('\uff3f', '\uff3f'), ('\uff41', '\uff5a'), ('\uff66', '\uffbe'), ('\uffc2',
-        '\uffc7'), ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), ('\U00010000',
-        '\U0001000b'), ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), ('\U0001003c',
-        '\U0001003d'), ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), ('\U00010080',
-        '\U000100fa'), ('\U00010140', '\U00010174'), ('\U000101fd', '\U000101fd'), ('\U00010280',
-        '\U0001029c'), ('\U000102a0', '\U000102d0'), ('\U000102e0', '\U000102e0'), ('\U00010300',
-        '\U0001031f'), ('\U00010330', '\U0001034a'), ('\U00010350', '\U0001037a'), ('\U00010380',
-        '\U0001039d'), ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), ('\U000103d1',
-        '\U000103d5'), ('\U00010400', '\U0001049d'), ('\U000104a0', '\U000104a9'), ('\U00010500',
-        '\U00010527'), ('\U00010530', '\U00010563'), ('\U00010600', '\U00010736'), ('\U00010740',
-        '\U00010755'), ('\U00010760', '\U00010767'), ('\U00010800', '\U00010805'), ('\U00010808',
-        '\U00010808'), ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), ('\U0001083c',
-        '\U0001083c'), ('\U0001083f', '\U00010855'), ('\U00010860', '\U00010876'), ('\U00010880',
-        '\U0001089e'), ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), ('\U00010980',
-        '\U000109b7'), ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a03'), ('\U00010a05',
-        '\U00010a06'), ('\U00010a0c', '\U00010a13'), ('\U00010a15', '\U00010a17'), ('\U00010a19',
-        '\U00010a33'), ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'), ('\U00010a60',
-        '\U00010a7c'), ('\U00010a80', '\U00010a9c'), ('\U00010ac0', '\U00010ac7'), ('\U00010ac9',
-        '\U00010ae6'), ('\U00010b00', '\U00010b35'), ('\U00010b40', '\U00010b55'), ('\U00010b60',
-        '\U00010b72'), ('\U00010b80', '\U00010b91'), ('\U00010c00', '\U00010c48'), ('\U00011000',
-        '\U00011046'), ('\U00011066', '\U0001106f'), ('\U0001107f', '\U000110ba'), ('\U000110d0',
-        '\U000110e8'), ('\U000110f0', '\U000110f9'), ('\U00011100', '\U00011134'), ('\U00011136',
-        '\U0001113f'), ('\U00011150', '\U00011173'), ('\U00011176', '\U00011176'), ('\U00011180',
-        '\U000111c4'), ('\U000111d0', '\U000111da'), ('\U00011200', '\U00011211'), ('\U00011213',
-        '\U00011237'), ('\U000112b0', '\U000112ea'), ('\U000112f0', '\U000112f9'), ('\U00011301',
-        '\U00011303'), ('\U00011305', '\U0001130c'), ('\U0001130f', '\U00011310'), ('\U00011313',
-        '\U00011328'), ('\U0001132a', '\U00011330'), ('\U00011332', '\U00011333'), ('\U00011335',
-        '\U00011339'), ('\U0001133c', '\U00011344'), ('\U00011347', '\U00011348'), ('\U0001134b',
-        '\U0001134d'), ('\U00011357', '\U00011357'), ('\U0001135d', '\U00011363'), ('\U00011366',
-        '\U0001136c'), ('\U00011370', '\U00011374'), ('\U00011480', '\U000114c5'), ('\U000114c7',
-        '\U000114c7'), ('\U000114d0', '\U000114d9'), ('\U00011580', '\U000115b5'), ('\U000115b8',
-        '\U000115c0'), ('\U00011600', '\U00011640'), ('\U00011644', '\U00011644'), ('\U00011650',
-        '\U00011659'), ('\U00011680', '\U000116b7'), ('\U000116c0', '\U000116c9'), ('\U000118a0',
-        '\U000118e9'), ('\U000118ff', '\U000118ff'), ('\U00011ac0', '\U00011af8'), ('\U00012000',
-        '\U00012398'), ('\U00012400', '\U0001246e'), ('\U00013000', '\U0001342e'), ('\U00016800',
-        '\U00016a38'), ('\U00016a40', '\U00016a5e'), ('\U00016a60', '\U00016a69'), ('\U00016ad0',
-        '\U00016aed'), ('\U00016af0', '\U00016af4'), ('\U00016b00', '\U00016b36'), ('\U00016b40',
-        '\U00016b43'), ('\U00016b50', '\U00016b59'), ('\U00016b63', '\U00016b77'), ('\U00016b7d',
-        '\U00016b8f'), ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f7e'), ('\U00016f8f',
-        '\U00016f9f'), ('\U0001b000', '\U0001b001'), ('\U0001bc00', '\U0001bc6a'), ('\U0001bc70',
-        '\U0001bc7c'), ('\U0001bc80', '\U0001bc88'), ('\U0001bc90', '\U0001bc99'), ('\U0001bc9d',
-        '\U0001bc9e'), ('\U0001d165', '\U0001d169'), ('\U0001d16d', '\U0001d172'), ('\U0001d17b',
-        '\U0001d182'), ('\U0001d185', '\U0001d18b'), ('\U0001d1aa', '\U0001d1ad'), ('\U0001d242',
-        '\U0001d244'), ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), ('\U0001d49e',
-        '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9',
-        '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd',
-        '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), ('\U0001d50d',
-        '\U0001d514'), ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), ('\U0001d53b',
-        '\U0001d53e'), ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), ('\U0001d54a',
-        '\U0001d550'), ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2',
-        '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), ('\U0001d716',
-        '\U0001d734'), ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), ('\U0001d770',
-        '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4',
-        '\U0001d7cb'), ('\U0001d7ce', '\U0001d7ff'), ('\U0001e800', '\U0001e8c4'), ('\U0001e8d0',
-        '\U0001e8d6'), ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21',
-        '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), ('\U0001ee29',
-        '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b',
-        '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), ('\U0001ee49',
-        '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51',
-        '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), ('\U0001ee59',
-        '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f',
-        '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), ('\U0001ee67',
-        '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), ('\U0001ee79',
-        '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b',
-        '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), ('\U0001eeab',
-        '\U0001eebb'), ('\U0001f130', '\U0001f149'), ('\U0001f150', '\U0001f169'), ('\U0001f170',
-        '\U0001f189'), ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), ('\U0002b740',
-        '\U0002b81d'), ('\U0002f800', '\U0002fa1d'), ('\U000e0100', '\U000e01ef')
+        ('\u{30}', '\u{39}'), ('\u{41}', '\u{5a}'), ('\u{5f}', '\u{5f}'), ('\u{61}', '\u{7a}'),
+        ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'), ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'),
+        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'),
+        ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'), ('\u{300}', '\u{374}'), ('\u{376}',
+        '\u{377}'), ('\u{37a}', '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'),
+        ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}',
+        '\u{3f5}'), ('\u{3f7}', '\u{481}'), ('\u{483}', '\u{52f}'), ('\u{531}', '\u{556}'),
+        ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'), ('\u{591}', '\u{5bd}'), ('\u{5bf}',
+        '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'), ('\u{5c7}', '\u{5c7}'),
+        ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'), ('\u{610}', '\u{61a}'), ('\u{620}',
+        '\u{669}'), ('\u{66e}', '\u{6d3}'), ('\u{6d5}', '\u{6dc}'), ('\u{6df}', '\u{6e8}'),
+        ('\u{6ea}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'), ('\u{710}', '\u{74a}'), ('\u{74d}',
+        '\u{7b1}'), ('\u{7c0}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'), ('\u{800}', '\u{82d}'),
+        ('\u{840}', '\u{85b}'), ('\u{8a0}', '\u{8b2}'), ('\u{8e4}', '\u{963}'), ('\u{966}',
+        '\u{96f}'), ('\u{971}', '\u{983}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'),
+        ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}',
+        '\u{9b9}'), ('\u{9bc}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'), ('\u{9cb}', '\u{9ce}'),
+        ('\u{9d7}', '\u{9d7}'), ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e3}'), ('\u{9e6}',
+        '\u{9f1}'), ('\u{a01}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'),
+        ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}',
+        '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'), ('\u{a3e}', '\u{a42}'),
+        ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'), ('\u{a59}',
+        '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a66}', '\u{a75}'), ('\u{a81}', '\u{a83}'),
+        ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'), ('\u{aaa}',
+        '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'), ('\u{abc}', '\u{ac5}'),
+        ('\u{ac7}', '\u{ac9}'), ('\u{acb}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}',
+        '\u{ae3}'), ('\u{ae6}', '\u{aef}'), ('\u{b01}', '\u{b03}'), ('\u{b05}', '\u{b0c}'),
+        ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}',
+        '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3c}', '\u{b44}'), ('\u{b47}', '\u{b48}'),
+        ('\u{b4b}', '\u{b4d}'), ('\u{b56}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'), ('\u{b5f}',
+        '\u{b63}'), ('\u{b66}', '\u{b6f}'), ('\u{b71}', '\u{b71}'), ('\u{b82}', '\u{b83}'),
+        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'), ('\u{b99}',
+        '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'),
+        ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bc2}'), ('\u{bc6}',
+        '\u{bc8}'), ('\u{bca}', '\u{bcd}'), ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'),
+        ('\u{be6}', '\u{bef}'), ('\u{c00}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}',
+        '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c44}'),
+        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c58}',
+        '\u{c59}'), ('\u{c60}', '\u{c63}'), ('\u{c66}', '\u{c6f}'), ('\u{c81}', '\u{c83}'),
+        ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}',
+        '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbc}', '\u{cc4}'), ('\u{cc6}', '\u{cc8}'),
+        ('\u{cca}', '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}',
+        '\u{ce3}'), ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}'), ('\u{d01}', '\u{d03}'),
+        ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'), ('\u{d3d}',
+        '\u{d44}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4e}'), ('\u{d57}', '\u{d57}'),
+        ('\u{d60}', '\u{d63}'), ('\u{d66}', '\u{d6f}'), ('\u{d7a}', '\u{d7f}'), ('\u{d82}',
+        '\u{d83}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
+        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dca}', '\u{dca}'), ('\u{dcf}',
+        '\u{dd4}'), ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'), ('\u{de6}', '\u{def}'),
+        ('\u{df2}', '\u{df3}'), ('\u{e01}', '\u{e3a}'), ('\u{e40}', '\u{e4e}'), ('\u{e50}',
+        '\u{e59}'), ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'),
+        ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}',
+        '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'),
+        ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb9}'), ('\u{ebb}', '\u{ebd}'), ('\u{ec0}',
+        '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), ('\u{ec8}', '\u{ecd}'), ('\u{ed0}', '\u{ed9}'),
+        ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f18}', '\u{f19}'), ('\u{f20}',
+        '\u{f29}'), ('\u{f35}', '\u{f35}'), ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'),
+        ('\u{f3e}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f84}'), ('\u{f86}',
+        '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{fc6}', '\u{fc6}'), ('\u{1000}', '\u{1049}'),
+        ('\u{1050}', '\u{109d}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}',
+        '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{1248}'), ('\u{124a}', '\u{124d}'),
+        ('\u{1250}', '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}',
+        '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'), ('\u{12b2}', '\u{12b5}'),
+        ('\u{12b8}', '\u{12be}'), ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}',
+        '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'), ('\u{1318}', '\u{135a}'),
+        ('\u{135d}', '\u{135f}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}', '\u{13f4}'), ('\u{1401}',
+        '\u{166c}'), ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}', '\u{16ea}'),
+        ('\u{16ee}', '\u{16f8}'), ('\u{1700}', '\u{170c}'), ('\u{170e}', '\u{1714}'), ('\u{1720}',
+        '\u{1734}'), ('\u{1740}', '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
+        ('\u{1772}', '\u{1773}'), ('\u{1780}', '\u{17d3}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}',
+        '\u{17dd}'), ('\u{17e0}', '\u{17e9}'), ('\u{180b}', '\u{180d}'), ('\u{1810}', '\u{1819}'),
+        ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), ('\u{1900}',
+        '\u{191e}'), ('\u{1920}', '\u{192b}'), ('\u{1930}', '\u{193b}'), ('\u{1946}', '\u{196d}'),
+        ('\u{1970}', '\u{1974}'), ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{19d0}',
+        '\u{19d9}'), ('\u{1a00}', '\u{1a1b}'), ('\u{1a20}', '\u{1a5e}'), ('\u{1a60}', '\u{1a7c}'),
+        ('\u{1a7f}', '\u{1a89}'), ('\u{1a90}', '\u{1a99}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1ab0}',
+        '\u{1abe}'), ('\u{1b00}', '\u{1b4b}'), ('\u{1b50}', '\u{1b59}'), ('\u{1b6b}', '\u{1b73}'),
+        ('\u{1b80}', '\u{1bf3}'), ('\u{1c00}', '\u{1c37}'), ('\u{1c40}', '\u{1c49}'), ('\u{1c4d}',
+        '\u{1c7d}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1cf6}'), ('\u{1cf8}', '\u{1cf9}'),
+        ('\u{1d00}', '\u{1df5}'), ('\u{1dfc}', '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}',
+        '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'),
+        ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}',
+        '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'),
+        ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fe0}',
+        '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'), ('\u{200c}', '\u{200d}'),
+        ('\u{203f}', '\u{2040}'), ('\u{2054}', '\u{2054}'), ('\u{2071}', '\u{2071}'), ('\u{207f}',
+        '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{20d0}', '\u{20f0}'), ('\u{2102}', '\u{2102}'),
+        ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2119}',
+        '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'),
+        ('\u{212a}', '\u{212d}'), ('\u{212f}', '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}',
+        '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'), ('\u{24b6}', '\u{24e9}'),
+        ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c60}', '\u{2ce4}'), ('\u{2ceb}',
+        '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'),
+        ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d7f}', '\u{2d96}'), ('\u{2da0}',
+        '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'),
+        ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}',
+        '\u{2dde}'), ('\u{2de0}', '\u{2dff}'), ('\u{2e2f}', '\u{2e2f}'), ('\u{3005}', '\u{3007}'),
+        ('\u{3021}', '\u{302f}'), ('\u{3031}', '\u{3035}'), ('\u{3038}', '\u{303c}'), ('\u{3041}',
+        '\u{3096}'), ('\u{3099}', '\u{309a}'), ('\u{309d}', '\u{309f}'), ('\u{30a1}', '\u{30fa}'),
+        ('\u{30fc}', '\u{30ff}'), ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}',
+        '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fcc}'),
+        ('\u{a000}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}',
+        '\u{a62b}'), ('\u{a640}', '\u{a672}'), ('\u{a674}', '\u{a67d}'), ('\u{a67f}', '\u{a69d}'),
+        ('\u{a69f}', '\u{a6f1}'), ('\u{a717}', '\u{a71f}'), ('\u{a722}', '\u{a788}'), ('\u{a78b}',
+        '\u{a78e}'), ('\u{a790}', '\u{a7ad}'), ('\u{a7b0}', '\u{a7b1}'), ('\u{a7f7}', '\u{a827}'),
+        ('\u{a840}', '\u{a873}'), ('\u{a880}', '\u{a8c4}'), ('\u{a8d0}', '\u{a8d9}'), ('\u{a8e0}',
+        '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a900}', '\u{a92d}'), ('\u{a930}', '\u{a953}'),
+        ('\u{a960}', '\u{a97c}'), ('\u{a980}', '\u{a9c0}'), ('\u{a9cf}', '\u{a9d9}'), ('\u{a9e0}',
+        '\u{a9fe}'), ('\u{aa00}', '\u{aa36}'), ('\u{aa40}', '\u{aa4d}'), ('\u{aa50}', '\u{aa59}'),
+        ('\u{aa60}', '\u{aa76}'), ('\u{aa7a}', '\u{aac2}'), ('\u{aadb}', '\u{aadd}'), ('\u{aae0}',
+        '\u{aaef}'), ('\u{aaf2}', '\u{aaf6}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'),
+        ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}',
+        '\u{ab5a}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ab64}', '\u{ab65}'), ('\u{abc0}', '\u{abea}'),
+        ('\u{abec}', '\u{abed}'), ('\u{abf0}', '\u{abf9}'), ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}',
+        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'),
+        ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb28}'), ('\u{fb2a}',
+        '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'),
+        ('\u{fb43}', '\u{fb44}'), ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}',
+        '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'), ('\u{fe00}', '\u{fe0f}'),
+        ('\u{fe20}', '\u{fe2d}'), ('\u{fe33}', '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'), ('\u{fe70}',
+        '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{ff10}', '\u{ff19}'), ('\u{ff21}', '\u{ff3a}'),
+        ('\u{ff3f}', '\u{ff3f}'), ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}',
+        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'),
+        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}', '\u{1003a}'),
+        ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'),
+        ('\u{10080}', '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{101fd}', '\u{101fd}'),
+        ('\u{10280}', '\u{1029c}'), ('\u{102a0}', '\u{102d0}'), ('\u{102e0}', '\u{102e0}'),
+        ('\u{10300}', '\u{1031f}'), ('\u{10330}', '\u{1034a}'), ('\u{10350}', '\u{1037a}'),
+        ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'),
+        ('\u{103d1}', '\u{103d5}'), ('\u{10400}', '\u{1049d}'), ('\u{104a0}', '\u{104a9}'),
+        ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'),
+        ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'),
+        ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'), ('\u{10837}', '\u{10838}'),
+        ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'), ('\u{10860}', '\u{10876}'),
+        ('\u{10880}', '\u{1089e}'), ('\u{10900}', '\u{10915}'), ('\u{10920}', '\u{10939}'),
+        ('\u{10980}', '\u{109b7}'), ('\u{109be}', '\u{109bf}'), ('\u{10a00}', '\u{10a03}'),
+        ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
+        ('\u{10a19}', '\u{10a33}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'),
+        ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'),
+        ('\u{10ac9}', '\u{10ae6}'), ('\u{10b00}', '\u{10b35}'), ('\u{10b40}', '\u{10b55}'),
+        ('\u{10b60}', '\u{10b72}'), ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'),
+        ('\u{11000}', '\u{11046}'), ('\u{11066}', '\u{1106f}'), ('\u{1107f}', '\u{110ba}'),
+        ('\u{110d0}', '\u{110e8}'), ('\u{110f0}', '\u{110f9}'), ('\u{11100}', '\u{11134}'),
+        ('\u{11136}', '\u{1113f}'), ('\u{11150}', '\u{11173}'), ('\u{11176}', '\u{11176}'),
+        ('\u{11180}', '\u{111c4}'), ('\u{111d0}', '\u{111da}'), ('\u{11200}', '\u{11211}'),
+        ('\u{11213}', '\u{11237}'), ('\u{112b0}', '\u{112ea}'), ('\u{112f0}', '\u{112f9}'),
+        ('\u{11301}', '\u{11303}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}', '\u{11310}'),
+        ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'), ('\u{11332}', '\u{11333}'),
+        ('\u{11335}', '\u{11339}'), ('\u{1133c}', '\u{11344}'), ('\u{11347}', '\u{11348}'),
+        ('\u{1134b}', '\u{1134d}'), ('\u{11357}', '\u{11357}'), ('\u{1135d}', '\u{11363}'),
+        ('\u{11366}', '\u{1136c}'), ('\u{11370}', '\u{11374}'), ('\u{11480}', '\u{114c5}'),
+        ('\u{114c7}', '\u{114c7}'), ('\u{114d0}', '\u{114d9}'), ('\u{11580}', '\u{115b5}'),
+        ('\u{115b8}', '\u{115c0}'), ('\u{11600}', '\u{11640}'), ('\u{11644}', '\u{11644}'),
+        ('\u{11650}', '\u{11659}'), ('\u{11680}', '\u{116b7}'), ('\u{116c0}', '\u{116c9}'),
+        ('\u{118a0}', '\u{118e9}'), ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'),
+        ('\u{12000}', '\u{12398}'), ('\u{12400}', '\u{1246e}'), ('\u{13000}', '\u{1342e}'),
+        ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'),
+        ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b00}', '\u{16b36}'),
+        ('\u{16b40}', '\u{16b43}'), ('\u{16b50}', '\u{16b59}'), ('\u{16b63}', '\u{16b77}'),
+        ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f7e}'),
+        ('\u{16f8f}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'),
+        ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'),
+        ('\u{1bc9d}', '\u{1bc9e}'), ('\u{1d165}', '\u{1d169}'), ('\u{1d16d}', '\u{1d172}'),
+        ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'),
+        ('\u{1d242}', '\u{1d244}'), ('\u{1d400}', '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'),
+        ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'),
+        ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'),
+        ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'),
+        ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}', '\u{1d539}'),
+        ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'),
+        ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'),
+        ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'),
+        ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d76e}'),
+        ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}', '\u{1d7c2}'),
+        ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1d7ce}', '\u{1d7ff}'), ('\u{1e800}', '\u{1e8c4}'),
+        ('\u{1e8d0}', '\u{1e8d6}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'),
+        ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'),
+        ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'),
+        ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'),
+        ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'),
+        ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'),
+        ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'),
+        ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'),
+        ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'),
+        ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'),
+        ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'),
+        ('\u{1eeab}', '\u{1eebb}'), ('\u{1f130}', '\u{1f149}'), ('\u{1f150}', '\u{1f169}'),
+        ('\u{1f170}', '\u{1f189}'), ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'),
+        ('\u{2b740}', '\u{2b81d}'), ('\u{2f800}', '\u{2fa1d}'), ('\u{e0100}', '\u{e01ef}')
     ];
 
 }
@@ -3927,2316 +4255,2571 @@ pub mod regex {
 pub mod normalization {
     // Canonical decompositions
     pub static canonical_table: &'static [(char, &'static [char])] = &[
-        ('\u00c0', &['\x41', '\u0300']), ('\u00c1', &['\x41', '\u0301']), ('\u00c2', &['\x41',
-        '\u0302']), ('\u00c3', &['\x41', '\u0303']), ('\u00c4', &['\x41', '\u0308']), ('\u00c5',
-        &['\x41', '\u030a']), ('\u00c7', &['\x43', '\u0327']), ('\u00c8', &['\x45', '\u0300']),
-        ('\u00c9', &['\x45', '\u0301']), ('\u00ca', &['\x45', '\u0302']), ('\u00cb', &['\x45',
-        '\u0308']), ('\u00cc', &['\x49', '\u0300']), ('\u00cd', &['\x49', '\u0301']), ('\u00ce',
-        &['\x49', '\u0302']), ('\u00cf', &['\x49', '\u0308']), ('\u00d1', &['\x4e', '\u0303']),
-        ('\u00d2', &['\x4f', '\u0300']), ('\u00d3', &['\x4f', '\u0301']), ('\u00d4', &['\x4f',
-        '\u0302']), ('\u00d5', &['\x4f', '\u0303']), ('\u00d6', &['\x4f', '\u0308']), ('\u00d9',
-        &['\x55', '\u0300']), ('\u00da', &['\x55', '\u0301']), ('\u00db', &['\x55', '\u0302']),
-        ('\u00dc', &['\x55', '\u0308']), ('\u00dd', &['\x59', '\u0301']), ('\u00e0', &['\x61',
-        '\u0300']), ('\u00e1', &['\x61', '\u0301']), ('\u00e2', &['\x61', '\u0302']), ('\u00e3',
-        &['\x61', '\u0303']), ('\u00e4', &['\x61', '\u0308']), ('\u00e5', &['\x61', '\u030a']),
-        ('\u00e7', &['\x63', '\u0327']), ('\u00e8', &['\x65', '\u0300']), ('\u00e9', &['\x65',
-        '\u0301']), ('\u00ea', &['\x65', '\u0302']), ('\u00eb', &['\x65', '\u0308']), ('\u00ec',
-        &['\x69', '\u0300']), ('\u00ed', &['\x69', '\u0301']), ('\u00ee', &['\x69', '\u0302']),
-        ('\u00ef', &['\x69', '\u0308']), ('\u00f1', &['\x6e', '\u0303']), ('\u00f2', &['\x6f',
-        '\u0300']), ('\u00f3', &['\x6f', '\u0301']), ('\u00f4', &['\x6f', '\u0302']), ('\u00f5',
-        &['\x6f', '\u0303']), ('\u00f6', &['\x6f', '\u0308']), ('\u00f9', &['\x75', '\u0300']),
-        ('\u00fa', &['\x75', '\u0301']), ('\u00fb', &['\x75', '\u0302']), ('\u00fc', &['\x75',
-        '\u0308']), ('\u00fd', &['\x79', '\u0301']), ('\u00ff', &['\x79', '\u0308']), ('\u0100',
-        &['\x41', '\u0304']), ('\u0101', &['\x61', '\u0304']), ('\u0102', &['\x41', '\u0306']),
-        ('\u0103', &['\x61', '\u0306']), ('\u0104', &['\x41', '\u0328']), ('\u0105', &['\x61',
-        '\u0328']), ('\u0106', &['\x43', '\u0301']), ('\u0107', &['\x63', '\u0301']), ('\u0108',
-        &['\x43', '\u0302']), ('\u0109', &['\x63', '\u0302']), ('\u010a', &['\x43', '\u0307']),
-        ('\u010b', &['\x63', '\u0307']), ('\u010c', &['\x43', '\u030c']), ('\u010d', &['\x63',
-        '\u030c']), ('\u010e', &['\x44', '\u030c']), ('\u010f', &['\x64', '\u030c']), ('\u0112',
-        &['\x45', '\u0304']), ('\u0113', &['\x65', '\u0304']), ('\u0114', &['\x45', '\u0306']),
-        ('\u0115', &['\x65', '\u0306']), ('\u0116', &['\x45', '\u0307']), ('\u0117', &['\x65',
-        '\u0307']), ('\u0118', &['\x45', '\u0328']), ('\u0119', &['\x65', '\u0328']), ('\u011a',
-        &['\x45', '\u030c']), ('\u011b', &['\x65', '\u030c']), ('\u011c', &['\x47', '\u0302']),
-        ('\u011d', &['\x67', '\u0302']), ('\u011e', &['\x47', '\u0306']), ('\u011f', &['\x67',
-        '\u0306']), ('\u0120', &['\x47', '\u0307']), ('\u0121', &['\x67', '\u0307']), ('\u0122',
-        &['\x47', '\u0327']), ('\u0123', &['\x67', '\u0327']), ('\u0124', &['\x48', '\u0302']),
-        ('\u0125', &['\x68', '\u0302']), ('\u0128', &['\x49', '\u0303']), ('\u0129', &['\x69',
-        '\u0303']), ('\u012a', &['\x49', '\u0304']), ('\u012b', &['\x69', '\u0304']), ('\u012c',
-        &['\x49', '\u0306']), ('\u012d', &['\x69', '\u0306']), ('\u012e', &['\x49', '\u0328']),
-        ('\u012f', &['\x69', '\u0328']), ('\u0130', &['\x49', '\u0307']), ('\u0134', &['\x4a',
-        '\u0302']), ('\u0135', &['\x6a', '\u0302']), ('\u0136', &['\x4b', '\u0327']), ('\u0137',
-        &['\x6b', '\u0327']), ('\u0139', &['\x4c', '\u0301']), ('\u013a', &['\x6c', '\u0301']),
-        ('\u013b', &['\x4c', '\u0327']), ('\u013c', &['\x6c', '\u0327']), ('\u013d', &['\x4c',
-        '\u030c']), ('\u013e', &['\x6c', '\u030c']), ('\u0143', &['\x4e', '\u0301']), ('\u0144',
-        &['\x6e', '\u0301']), ('\u0145', &['\x4e', '\u0327']), ('\u0146', &['\x6e', '\u0327']),
-        ('\u0147', &['\x4e', '\u030c']), ('\u0148', &['\x6e', '\u030c']), ('\u014c', &['\x4f',
-        '\u0304']), ('\u014d', &['\x6f', '\u0304']), ('\u014e', &['\x4f', '\u0306']), ('\u014f',
-        &['\x6f', '\u0306']), ('\u0150', &['\x4f', '\u030b']), ('\u0151', &['\x6f', '\u030b']),
-        ('\u0154', &['\x52', '\u0301']), ('\u0155', &['\x72', '\u0301']), ('\u0156', &['\x52',
-        '\u0327']), ('\u0157', &['\x72', '\u0327']), ('\u0158', &['\x52', '\u030c']), ('\u0159',
-        &['\x72', '\u030c']), ('\u015a', &['\x53', '\u0301']), ('\u015b', &['\x73', '\u0301']),
-        ('\u015c', &['\x53', '\u0302']), ('\u015d', &['\x73', '\u0302']), ('\u015e', &['\x53',
-        '\u0327']), ('\u015f', &['\x73', '\u0327']), ('\u0160', &['\x53', '\u030c']), ('\u0161',
-        &['\x73', '\u030c']), ('\u0162', &['\x54', '\u0327']), ('\u0163', &['\x74', '\u0327']),
-        ('\u0164', &['\x54', '\u030c']), ('\u0165', &['\x74', '\u030c']), ('\u0168', &['\x55',
-        '\u0303']), ('\u0169', &['\x75', '\u0303']), ('\u016a', &['\x55', '\u0304']), ('\u016b',
-        &['\x75', '\u0304']), ('\u016c', &['\x55', '\u0306']), ('\u016d', &['\x75', '\u0306']),
-        ('\u016e', &['\x55', '\u030a']), ('\u016f', &['\x75', '\u030a']), ('\u0170', &['\x55',
-        '\u030b']), ('\u0171', &['\x75', '\u030b']), ('\u0172', &['\x55', '\u0328']), ('\u0173',
-        &['\x75', '\u0328']), ('\u0174', &['\x57', '\u0302']), ('\u0175', &['\x77', '\u0302']),
-        ('\u0176', &['\x59', '\u0302']), ('\u0177', &['\x79', '\u0302']), ('\u0178', &['\x59',
-        '\u0308']), ('\u0179', &['\x5a', '\u0301']), ('\u017a', &['\x7a', '\u0301']), ('\u017b',
-        &['\x5a', '\u0307']), ('\u017c', &['\x7a', '\u0307']), ('\u017d', &['\x5a', '\u030c']),
-        ('\u017e', &['\x7a', '\u030c']), ('\u01a0', &['\x4f', '\u031b']), ('\u01a1', &['\x6f',
-        '\u031b']), ('\u01af', &['\x55', '\u031b']), ('\u01b0', &['\x75', '\u031b']), ('\u01cd',
-        &['\x41', '\u030c']), ('\u01ce', &['\x61', '\u030c']), ('\u01cf', &['\x49', '\u030c']),
-        ('\u01d0', &['\x69', '\u030c']), ('\u01d1', &['\x4f', '\u030c']), ('\u01d2', &['\x6f',
-        '\u030c']), ('\u01d3', &['\x55', '\u030c']), ('\u01d4', &['\x75', '\u030c']), ('\u01d5',
-        &['\u00dc', '\u0304']), ('\u01d6', &['\u00fc', '\u0304']), ('\u01d7', &['\u00dc',
-        '\u0301']), ('\u01d8', &['\u00fc', '\u0301']), ('\u01d9', &['\u00dc', '\u030c']), ('\u01da',
-        &['\u00fc', '\u030c']), ('\u01db', &['\u00dc', '\u0300']), ('\u01dc', &['\u00fc',
-        '\u0300']), ('\u01de', &['\u00c4', '\u0304']), ('\u01df', &['\u00e4', '\u0304']), ('\u01e0',
-        &['\u0226', '\u0304']), ('\u01e1', &['\u0227', '\u0304']), ('\u01e2', &['\u00c6',
-        '\u0304']), ('\u01e3', &['\u00e6', '\u0304']), ('\u01e6', &['\x47', '\u030c']), ('\u01e7',
-        &['\x67', '\u030c']), ('\u01e8', &['\x4b', '\u030c']), ('\u01e9', &['\x6b', '\u030c']),
-        ('\u01ea', &['\x4f', '\u0328']), ('\u01eb', &['\x6f', '\u0328']), ('\u01ec', &['\u01ea',
-        '\u0304']), ('\u01ed', &['\u01eb', '\u0304']), ('\u01ee', &['\u01b7', '\u030c']), ('\u01ef',
-        &['\u0292', '\u030c']), ('\u01f0', &['\x6a', '\u030c']), ('\u01f4', &['\x47', '\u0301']),
-        ('\u01f5', &['\x67', '\u0301']), ('\u01f8', &['\x4e', '\u0300']), ('\u01f9', &['\x6e',
-        '\u0300']), ('\u01fa', &['\u00c5', '\u0301']), ('\u01fb', &['\u00e5', '\u0301']), ('\u01fc',
-        &['\u00c6', '\u0301']), ('\u01fd', &['\u00e6', '\u0301']), ('\u01fe', &['\u00d8',
-        '\u0301']), ('\u01ff', &['\u00f8', '\u0301']), ('\u0200', &['\x41', '\u030f']), ('\u0201',
-        &['\x61', '\u030f']), ('\u0202', &['\x41', '\u0311']), ('\u0203', &['\x61', '\u0311']),
-        ('\u0204', &['\x45', '\u030f']), ('\u0205', &['\x65', '\u030f']), ('\u0206', &['\x45',
-        '\u0311']), ('\u0207', &['\x65', '\u0311']), ('\u0208', &['\x49', '\u030f']), ('\u0209',
-        &['\x69', '\u030f']), ('\u020a', &['\x49', '\u0311']), ('\u020b', &['\x69', '\u0311']),
-        ('\u020c', &['\x4f', '\u030f']), ('\u020d', &['\x6f', '\u030f']), ('\u020e', &['\x4f',
-        '\u0311']), ('\u020f', &['\x6f', '\u0311']), ('\u0210', &['\x52', '\u030f']), ('\u0211',
-        &['\x72', '\u030f']), ('\u0212', &['\x52', '\u0311']), ('\u0213', &['\x72', '\u0311']),
-        ('\u0214', &['\x55', '\u030f']), ('\u0215', &['\x75', '\u030f']), ('\u0216', &['\x55',
-        '\u0311']), ('\u0217', &['\x75', '\u0311']), ('\u0218', &['\x53', '\u0326']), ('\u0219',
-        &['\x73', '\u0326']), ('\u021a', &['\x54', '\u0326']), ('\u021b', &['\x74', '\u0326']),
-        ('\u021e', &['\x48', '\u030c']), ('\u021f', &['\x68', '\u030c']), ('\u0226', &['\x41',
-        '\u0307']), ('\u0227', &['\x61', '\u0307']), ('\u0228', &['\x45', '\u0327']), ('\u0229',
-        &['\x65', '\u0327']), ('\u022a', &['\u00d6', '\u0304']), ('\u022b', &['\u00f6', '\u0304']),
-        ('\u022c', &['\u00d5', '\u0304']), ('\u022d', &['\u00f5', '\u0304']), ('\u022e', &['\x4f',
-        '\u0307']), ('\u022f', &['\x6f', '\u0307']), ('\u0230', &['\u022e', '\u0304']), ('\u0231',
-        &['\u022f', '\u0304']), ('\u0232', &['\x59', '\u0304']), ('\u0233', &['\x79', '\u0304']),
-        ('\u0340', &['\u0300']), ('\u0341', &['\u0301']), ('\u0343', &['\u0313']), ('\u0344',
-        &['\u0308', '\u0301']), ('\u0374', &['\u02b9']), ('\u037e', &['\x3b']), ('\u0385',
-        &['\u00a8', '\u0301']), ('\u0386', &['\u0391', '\u0301']), ('\u0387', &['\u00b7']),
-        ('\u0388', &['\u0395', '\u0301']), ('\u0389', &['\u0397', '\u0301']), ('\u038a', &['\u0399',
-        '\u0301']), ('\u038c', &['\u039f', '\u0301']), ('\u038e', &['\u03a5', '\u0301']), ('\u038f',
-        &['\u03a9', '\u0301']), ('\u0390', &['\u03ca', '\u0301']), ('\u03aa', &['\u0399',
-        '\u0308']), ('\u03ab', &['\u03a5', '\u0308']), ('\u03ac', &['\u03b1', '\u0301']), ('\u03ad',
-        &['\u03b5', '\u0301']), ('\u03ae', &['\u03b7', '\u0301']), ('\u03af', &['\u03b9',
-        '\u0301']), ('\u03b0', &['\u03cb', '\u0301']), ('\u03ca', &['\u03b9', '\u0308']), ('\u03cb',
-        &['\u03c5', '\u0308']), ('\u03cc', &['\u03bf', '\u0301']), ('\u03cd', &['\u03c5',
-        '\u0301']), ('\u03ce', &['\u03c9', '\u0301']), ('\u03d3', &['\u03d2', '\u0301']), ('\u03d4',
-        &['\u03d2', '\u0308']), ('\u0400', &['\u0415', '\u0300']), ('\u0401', &['\u0415',
-        '\u0308']), ('\u0403', &['\u0413', '\u0301']), ('\u0407', &['\u0406', '\u0308']), ('\u040c',
-        &['\u041a', '\u0301']), ('\u040d', &['\u0418', '\u0300']), ('\u040e', &['\u0423',
-        '\u0306']), ('\u0419', &['\u0418', '\u0306']), ('\u0439', &['\u0438', '\u0306']), ('\u0450',
-        &['\u0435', '\u0300']), ('\u0451', &['\u0435', '\u0308']), ('\u0453', &['\u0433',
-        '\u0301']), ('\u0457', &['\u0456', '\u0308']), ('\u045c', &['\u043a', '\u0301']), ('\u045d',
-        &['\u0438', '\u0300']), ('\u045e', &['\u0443', '\u0306']), ('\u0476', &['\u0474',
-        '\u030f']), ('\u0477', &['\u0475', '\u030f']), ('\u04c1', &['\u0416', '\u0306']), ('\u04c2',
-        &['\u0436', '\u0306']), ('\u04d0', &['\u0410', '\u0306']), ('\u04d1', &['\u0430',
-        '\u0306']), ('\u04d2', &['\u0410', '\u0308']), ('\u04d3', &['\u0430', '\u0308']), ('\u04d6',
-        &['\u0415', '\u0306']), ('\u04d7', &['\u0435', '\u0306']), ('\u04da', &['\u04d8',
-        '\u0308']), ('\u04db', &['\u04d9', '\u0308']), ('\u04dc', &['\u0416', '\u0308']), ('\u04dd',
-        &['\u0436', '\u0308']), ('\u04de', &['\u0417', '\u0308']), ('\u04df', &['\u0437',
-        '\u0308']), ('\u04e2', &['\u0418', '\u0304']), ('\u04e3', &['\u0438', '\u0304']), ('\u04e4',
-        &['\u0418', '\u0308']), ('\u04e5', &['\u0438', '\u0308']), ('\u04e6', &['\u041e',
-        '\u0308']), ('\u04e7', &['\u043e', '\u0308']), ('\u04ea', &['\u04e8', '\u0308']), ('\u04eb',
-        &['\u04e9', '\u0308']), ('\u04ec', &['\u042d', '\u0308']), ('\u04ed', &['\u044d',
-        '\u0308']), ('\u04ee', &['\u0423', '\u0304']), ('\u04ef', &['\u0443', '\u0304']), ('\u04f0',
-        &['\u0423', '\u0308']), ('\u04f1', &['\u0443', '\u0308']), ('\u04f2', &['\u0423',
-        '\u030b']), ('\u04f3', &['\u0443', '\u030b']), ('\u04f4', &['\u0427', '\u0308']), ('\u04f5',
-        &['\u0447', '\u0308']), ('\u04f8', &['\u042b', '\u0308']), ('\u04f9', &['\u044b',
-        '\u0308']), ('\u0622', &['\u0627', '\u0653']), ('\u0623', &['\u0627', '\u0654']), ('\u0624',
-        &['\u0648', '\u0654']), ('\u0625', &['\u0627', '\u0655']), ('\u0626', &['\u064a',
-        '\u0654']), ('\u06c0', &['\u06d5', '\u0654']), ('\u06c2', &['\u06c1', '\u0654']), ('\u06d3',
-        &['\u06d2', '\u0654']), ('\u0929', &['\u0928', '\u093c']), ('\u0931', &['\u0930',
-        '\u093c']), ('\u0934', &['\u0933', '\u093c']), ('\u0958', &['\u0915', '\u093c']), ('\u0959',
-        &['\u0916', '\u093c']), ('\u095a', &['\u0917', '\u093c']), ('\u095b', &['\u091c',
-        '\u093c']), ('\u095c', &['\u0921', '\u093c']), ('\u095d', &['\u0922', '\u093c']), ('\u095e',
-        &['\u092b', '\u093c']), ('\u095f', &['\u092f', '\u093c']), ('\u09cb', &['\u09c7',
-        '\u09be']), ('\u09cc', &['\u09c7', '\u09d7']), ('\u09dc', &['\u09a1', '\u09bc']), ('\u09dd',
-        &['\u09a2', '\u09bc']), ('\u09df', &['\u09af', '\u09bc']), ('\u0a33', &['\u0a32',
-        '\u0a3c']), ('\u0a36', &['\u0a38', '\u0a3c']), ('\u0a59', &['\u0a16', '\u0a3c']), ('\u0a5a',
-        &['\u0a17', '\u0a3c']), ('\u0a5b', &['\u0a1c', '\u0a3c']), ('\u0a5e', &['\u0a2b',
-        '\u0a3c']), ('\u0b48', &['\u0b47', '\u0b56']), ('\u0b4b', &['\u0b47', '\u0b3e']), ('\u0b4c',
-        &['\u0b47', '\u0b57']), ('\u0b5c', &['\u0b21', '\u0b3c']), ('\u0b5d', &['\u0b22',
-        '\u0b3c']), ('\u0b94', &['\u0b92', '\u0bd7']), ('\u0bca', &['\u0bc6', '\u0bbe']), ('\u0bcb',
-        &['\u0bc7', '\u0bbe']), ('\u0bcc', &['\u0bc6', '\u0bd7']), ('\u0c48', &['\u0c46',
-        '\u0c56']), ('\u0cc0', &['\u0cbf', '\u0cd5']), ('\u0cc7', &['\u0cc6', '\u0cd5']), ('\u0cc8',
-        &['\u0cc6', '\u0cd6']), ('\u0cca', &['\u0cc6', '\u0cc2']), ('\u0ccb', &['\u0cca',
-        '\u0cd5']), ('\u0d4a', &['\u0d46', '\u0d3e']), ('\u0d4b', &['\u0d47', '\u0d3e']), ('\u0d4c',
-        &['\u0d46', '\u0d57']), ('\u0dda', &['\u0dd9', '\u0dca']), ('\u0ddc', &['\u0dd9',
-        '\u0dcf']), ('\u0ddd', &['\u0ddc', '\u0dca']), ('\u0dde', &['\u0dd9', '\u0ddf']), ('\u0f43',
-        &['\u0f42', '\u0fb7']), ('\u0f4d', &['\u0f4c', '\u0fb7']), ('\u0f52', &['\u0f51',
-        '\u0fb7']), ('\u0f57', &['\u0f56', '\u0fb7']), ('\u0f5c', &['\u0f5b', '\u0fb7']), ('\u0f69',
-        &['\u0f40', '\u0fb5']), ('\u0f73', &['\u0f71', '\u0f72']), ('\u0f75', &['\u0f71',
-        '\u0f74']), ('\u0f76', &['\u0fb2', '\u0f80']), ('\u0f78', &['\u0fb3', '\u0f80']), ('\u0f81',
-        &['\u0f71', '\u0f80']), ('\u0f93', &['\u0f92', '\u0fb7']), ('\u0f9d', &['\u0f9c',
-        '\u0fb7']), ('\u0fa2', &['\u0fa1', '\u0fb7']), ('\u0fa7', &['\u0fa6', '\u0fb7']), ('\u0fac',
-        &['\u0fab', '\u0fb7']), ('\u0fb9', &['\u0f90', '\u0fb5']), ('\u1026', &['\u1025',
-        '\u102e']), ('\u1b06', &['\u1b05', '\u1b35']), ('\u1b08', &['\u1b07', '\u1b35']), ('\u1b0a',
-        &['\u1b09', '\u1b35']), ('\u1b0c', &['\u1b0b', '\u1b35']), ('\u1b0e', &['\u1b0d',
-        '\u1b35']), ('\u1b12', &['\u1b11', '\u1b35']), ('\u1b3b', &['\u1b3a', '\u1b35']), ('\u1b3d',
-        &['\u1b3c', '\u1b35']), ('\u1b40', &['\u1b3e', '\u1b35']), ('\u1b41', &['\u1b3f',
-        '\u1b35']), ('\u1b43', &['\u1b42', '\u1b35']), ('\u1e00', &['\x41', '\u0325']), ('\u1e01',
-        &['\x61', '\u0325']), ('\u1e02', &['\x42', '\u0307']), ('\u1e03', &['\x62', '\u0307']),
-        ('\u1e04', &['\x42', '\u0323']), ('\u1e05', &['\x62', '\u0323']), ('\u1e06', &['\x42',
-        '\u0331']), ('\u1e07', &['\x62', '\u0331']), ('\u1e08', &['\u00c7', '\u0301']), ('\u1e09',
-        &['\u00e7', '\u0301']), ('\u1e0a', &['\x44', '\u0307']), ('\u1e0b', &['\x64', '\u0307']),
-        ('\u1e0c', &['\x44', '\u0323']), ('\u1e0d', &['\x64', '\u0323']), ('\u1e0e', &['\x44',
-        '\u0331']), ('\u1e0f', &['\x64', '\u0331']), ('\u1e10', &['\x44', '\u0327']), ('\u1e11',
-        &['\x64', '\u0327']), ('\u1e12', &['\x44', '\u032d']), ('\u1e13', &['\x64', '\u032d']),
-        ('\u1e14', &['\u0112', '\u0300']), ('\u1e15', &['\u0113', '\u0300']), ('\u1e16', &['\u0112',
-        '\u0301']), ('\u1e17', &['\u0113', '\u0301']), ('\u1e18', &['\x45', '\u032d']), ('\u1e19',
-        &['\x65', '\u032d']), ('\u1e1a', &['\x45', '\u0330']), ('\u1e1b', &['\x65', '\u0330']),
-        ('\u1e1c', &['\u0228', '\u0306']), ('\u1e1d', &['\u0229', '\u0306']), ('\u1e1e', &['\x46',
-        '\u0307']), ('\u1e1f', &['\x66', '\u0307']), ('\u1e20', &['\x47', '\u0304']), ('\u1e21',
-        &['\x67', '\u0304']), ('\u1e22', &['\x48', '\u0307']), ('\u1e23', &['\x68', '\u0307']),
-        ('\u1e24', &['\x48', '\u0323']), ('\u1e25', &['\x68', '\u0323']), ('\u1e26', &['\x48',
-        '\u0308']), ('\u1e27', &['\x68', '\u0308']), ('\u1e28', &['\x48', '\u0327']), ('\u1e29',
-        &['\x68', '\u0327']), ('\u1e2a', &['\x48', '\u032e']), ('\u1e2b', &['\x68', '\u032e']),
-        ('\u1e2c', &['\x49', '\u0330']), ('\u1e2d', &['\x69', '\u0330']), ('\u1e2e', &['\u00cf',
-        '\u0301']), ('\u1e2f', &['\u00ef', '\u0301']), ('\u1e30', &['\x4b', '\u0301']), ('\u1e31',
-        &['\x6b', '\u0301']), ('\u1e32', &['\x4b', '\u0323']), ('\u1e33', &['\x6b', '\u0323']),
-        ('\u1e34', &['\x4b', '\u0331']), ('\u1e35', &['\x6b', '\u0331']), ('\u1e36', &['\x4c',
-        '\u0323']), ('\u1e37', &['\x6c', '\u0323']), ('\u1e38', &['\u1e36', '\u0304']), ('\u1e39',
-        &['\u1e37', '\u0304']), ('\u1e3a', &['\x4c', '\u0331']), ('\u1e3b', &['\x6c', '\u0331']),
-        ('\u1e3c', &['\x4c', '\u032d']), ('\u1e3d', &['\x6c', '\u032d']), ('\u1e3e', &['\x4d',
-        '\u0301']), ('\u1e3f', &['\x6d', '\u0301']), ('\u1e40', &['\x4d', '\u0307']), ('\u1e41',
-        &['\x6d', '\u0307']), ('\u1e42', &['\x4d', '\u0323']), ('\u1e43', &['\x6d', '\u0323']),
-        ('\u1e44', &['\x4e', '\u0307']), ('\u1e45', &['\x6e', '\u0307']), ('\u1e46', &['\x4e',
-        '\u0323']), ('\u1e47', &['\x6e', '\u0323']), ('\u1e48', &['\x4e', '\u0331']), ('\u1e49',
-        &['\x6e', '\u0331']), ('\u1e4a', &['\x4e', '\u032d']), ('\u1e4b', &['\x6e', '\u032d']),
-        ('\u1e4c', &['\u00d5', '\u0301']), ('\u1e4d', &['\u00f5', '\u0301']), ('\u1e4e', &['\u00d5',
-        '\u0308']), ('\u1e4f', &['\u00f5', '\u0308']), ('\u1e50', &['\u014c', '\u0300']), ('\u1e51',
-        &['\u014d', '\u0300']), ('\u1e52', &['\u014c', '\u0301']), ('\u1e53', &['\u014d',
-        '\u0301']), ('\u1e54', &['\x50', '\u0301']), ('\u1e55', &['\x70', '\u0301']), ('\u1e56',
-        &['\x50', '\u0307']), ('\u1e57', &['\x70', '\u0307']), ('\u1e58', &['\x52', '\u0307']),
-        ('\u1e59', &['\x72', '\u0307']), ('\u1e5a', &['\x52', '\u0323']), ('\u1e5b', &['\x72',
-        '\u0323']), ('\u1e5c', &['\u1e5a', '\u0304']), ('\u1e5d', &['\u1e5b', '\u0304']), ('\u1e5e',
-        &['\x52', '\u0331']), ('\u1e5f', &['\x72', '\u0331']), ('\u1e60', &['\x53', '\u0307']),
-        ('\u1e61', &['\x73', '\u0307']), ('\u1e62', &['\x53', '\u0323']), ('\u1e63', &['\x73',
-        '\u0323']), ('\u1e64', &['\u015a', '\u0307']), ('\u1e65', &['\u015b', '\u0307']), ('\u1e66',
-        &['\u0160', '\u0307']), ('\u1e67', &['\u0161', '\u0307']), ('\u1e68', &['\u1e62',
-        '\u0307']), ('\u1e69', &['\u1e63', '\u0307']), ('\u1e6a', &['\x54', '\u0307']), ('\u1e6b',
-        &['\x74', '\u0307']), ('\u1e6c', &['\x54', '\u0323']), ('\u1e6d', &['\x74', '\u0323']),
-        ('\u1e6e', &['\x54', '\u0331']), ('\u1e6f', &['\x74', '\u0331']), ('\u1e70', &['\x54',
-        '\u032d']), ('\u1e71', &['\x74', '\u032d']), ('\u1e72', &['\x55', '\u0324']), ('\u1e73',
-        &['\x75', '\u0324']), ('\u1e74', &['\x55', '\u0330']), ('\u1e75', &['\x75', '\u0330']),
-        ('\u1e76', &['\x55', '\u032d']), ('\u1e77', &['\x75', '\u032d']), ('\u1e78', &['\u0168',
-        '\u0301']), ('\u1e79', &['\u0169', '\u0301']), ('\u1e7a', &['\u016a', '\u0308']), ('\u1e7b',
-        &['\u016b', '\u0308']), ('\u1e7c', &['\x56', '\u0303']), ('\u1e7d', &['\x76', '\u0303']),
-        ('\u1e7e', &['\x56', '\u0323']), ('\u1e7f', &['\x76', '\u0323']), ('\u1e80', &['\x57',
-        '\u0300']), ('\u1e81', &['\x77', '\u0300']), ('\u1e82', &['\x57', '\u0301']), ('\u1e83',
-        &['\x77', '\u0301']), ('\u1e84', &['\x57', '\u0308']), ('\u1e85', &['\x77', '\u0308']),
-        ('\u1e86', &['\x57', '\u0307']), ('\u1e87', &['\x77', '\u0307']), ('\u1e88', &['\x57',
-        '\u0323']), ('\u1e89', &['\x77', '\u0323']), ('\u1e8a', &['\x58', '\u0307']), ('\u1e8b',
-        &['\x78', '\u0307']), ('\u1e8c', &['\x58', '\u0308']), ('\u1e8d', &['\x78', '\u0308']),
-        ('\u1e8e', &['\x59', '\u0307']), ('\u1e8f', &['\x79', '\u0307']), ('\u1e90', &['\x5a',
-        '\u0302']), ('\u1e91', &['\x7a', '\u0302']), ('\u1e92', &['\x5a', '\u0323']), ('\u1e93',
-        &['\x7a', '\u0323']), ('\u1e94', &['\x5a', '\u0331']), ('\u1e95', &['\x7a', '\u0331']),
-        ('\u1e96', &['\x68', '\u0331']), ('\u1e97', &['\x74', '\u0308']), ('\u1e98', &['\x77',
-        '\u030a']), ('\u1e99', &['\x79', '\u030a']), ('\u1e9b', &['\u017f', '\u0307']), ('\u1ea0',
-        &['\x41', '\u0323']), ('\u1ea1', &['\x61', '\u0323']), ('\u1ea2', &['\x41', '\u0309']),
-        ('\u1ea3', &['\x61', '\u0309']), ('\u1ea4', &['\u00c2', '\u0301']), ('\u1ea5', &['\u00e2',
-        '\u0301']), ('\u1ea6', &['\u00c2', '\u0300']), ('\u1ea7', &['\u00e2', '\u0300']), ('\u1ea8',
-        &['\u00c2', '\u0309']), ('\u1ea9', &['\u00e2', '\u0309']), ('\u1eaa', &['\u00c2',
-        '\u0303']), ('\u1eab', &['\u00e2', '\u0303']), ('\u1eac', &['\u1ea0', '\u0302']), ('\u1ead',
-        &['\u1ea1', '\u0302']), ('\u1eae', &['\u0102', '\u0301']), ('\u1eaf', &['\u0103',
-        '\u0301']), ('\u1eb0', &['\u0102', '\u0300']), ('\u1eb1', &['\u0103', '\u0300']), ('\u1eb2',
-        &['\u0102', '\u0309']), ('\u1eb3', &['\u0103', '\u0309']), ('\u1eb4', &['\u0102',
-        '\u0303']), ('\u1eb5', &['\u0103', '\u0303']), ('\u1eb6', &['\u1ea0', '\u0306']), ('\u1eb7',
-        &['\u1ea1', '\u0306']), ('\u1eb8', &['\x45', '\u0323']), ('\u1eb9', &['\x65', '\u0323']),
-        ('\u1eba', &['\x45', '\u0309']), ('\u1ebb', &['\x65', '\u0309']), ('\u1ebc', &['\x45',
-        '\u0303']), ('\u1ebd', &['\x65', '\u0303']), ('\u1ebe', &['\u00ca', '\u0301']), ('\u1ebf',
-        &['\u00ea', '\u0301']), ('\u1ec0', &['\u00ca', '\u0300']), ('\u1ec1', &['\u00ea',
-        '\u0300']), ('\u1ec2', &['\u00ca', '\u0309']), ('\u1ec3', &['\u00ea', '\u0309']), ('\u1ec4',
-        &['\u00ca', '\u0303']), ('\u1ec5', &['\u00ea', '\u0303']), ('\u1ec6', &['\u1eb8',
-        '\u0302']), ('\u1ec7', &['\u1eb9', '\u0302']), ('\u1ec8', &['\x49', '\u0309']), ('\u1ec9',
-        &['\x69', '\u0309']), ('\u1eca', &['\x49', '\u0323']), ('\u1ecb', &['\x69', '\u0323']),
-        ('\u1ecc', &['\x4f', '\u0323']), ('\u1ecd', &['\x6f', '\u0323']), ('\u1ece', &['\x4f',
-        '\u0309']), ('\u1ecf', &['\x6f', '\u0309']), ('\u1ed0', &['\u00d4', '\u0301']), ('\u1ed1',
-        &['\u00f4', '\u0301']), ('\u1ed2', &['\u00d4', '\u0300']), ('\u1ed3', &['\u00f4',
-        '\u0300']), ('\u1ed4', &['\u00d4', '\u0309']), ('\u1ed5', &['\u00f4', '\u0309']), ('\u1ed6',
-        &['\u00d4', '\u0303']), ('\u1ed7', &['\u00f4', '\u0303']), ('\u1ed8', &['\u1ecc',
-        '\u0302']), ('\u1ed9', &['\u1ecd', '\u0302']), ('\u1eda', &['\u01a0', '\u0301']), ('\u1edb',
-        &['\u01a1', '\u0301']), ('\u1edc', &['\u01a0', '\u0300']), ('\u1edd', &['\u01a1',
-        '\u0300']), ('\u1ede', &['\u01a0', '\u0309']), ('\u1edf', &['\u01a1', '\u0309']), ('\u1ee0',
-        &['\u01a0', '\u0303']), ('\u1ee1', &['\u01a1', '\u0303']), ('\u1ee2', &['\u01a0',
-        '\u0323']), ('\u1ee3', &['\u01a1', '\u0323']), ('\u1ee4', &['\x55', '\u0323']), ('\u1ee5',
-        &['\x75', '\u0323']), ('\u1ee6', &['\x55', '\u0309']), ('\u1ee7', &['\x75', '\u0309']),
-        ('\u1ee8', &['\u01af', '\u0301']), ('\u1ee9', &['\u01b0', '\u0301']), ('\u1eea', &['\u01af',
-        '\u0300']), ('\u1eeb', &['\u01b0', '\u0300']), ('\u1eec', &['\u01af', '\u0309']), ('\u1eed',
-        &['\u01b0', '\u0309']), ('\u1eee', &['\u01af', '\u0303']), ('\u1eef', &['\u01b0',
-        '\u0303']), ('\u1ef0', &['\u01af', '\u0323']), ('\u1ef1', &['\u01b0', '\u0323']), ('\u1ef2',
-        &['\x59', '\u0300']), ('\u1ef3', &['\x79', '\u0300']), ('\u1ef4', &['\x59', '\u0323']),
-        ('\u1ef5', &['\x79', '\u0323']), ('\u1ef6', &['\x59', '\u0309']), ('\u1ef7', &['\x79',
-        '\u0309']), ('\u1ef8', &['\x59', '\u0303']), ('\u1ef9', &['\x79', '\u0303']), ('\u1f00',
-        &['\u03b1', '\u0313']), ('\u1f01', &['\u03b1', '\u0314']), ('\u1f02', &['\u1f00',
-        '\u0300']), ('\u1f03', &['\u1f01', '\u0300']), ('\u1f04', &['\u1f00', '\u0301']), ('\u1f05',
-        &['\u1f01', '\u0301']), ('\u1f06', &['\u1f00', '\u0342']), ('\u1f07', &['\u1f01',
-        '\u0342']), ('\u1f08', &['\u0391', '\u0313']), ('\u1f09', &['\u0391', '\u0314']), ('\u1f0a',
-        &['\u1f08', '\u0300']), ('\u1f0b', &['\u1f09', '\u0300']), ('\u1f0c', &['\u1f08',
-        '\u0301']), ('\u1f0d', &['\u1f09', '\u0301']), ('\u1f0e', &['\u1f08', '\u0342']), ('\u1f0f',
-        &['\u1f09', '\u0342']), ('\u1f10', &['\u03b5', '\u0313']), ('\u1f11', &['\u03b5',
-        '\u0314']), ('\u1f12', &['\u1f10', '\u0300']), ('\u1f13', &['\u1f11', '\u0300']), ('\u1f14',
-        &['\u1f10', '\u0301']), ('\u1f15', &['\u1f11', '\u0301']), ('\u1f18', &['\u0395',
-        '\u0313']), ('\u1f19', &['\u0395', '\u0314']), ('\u1f1a', &['\u1f18', '\u0300']), ('\u1f1b',
-        &['\u1f19', '\u0300']), ('\u1f1c', &['\u1f18', '\u0301']), ('\u1f1d', &['\u1f19',
-        '\u0301']), ('\u1f20', &['\u03b7', '\u0313']), ('\u1f21', &['\u03b7', '\u0314']), ('\u1f22',
-        &['\u1f20', '\u0300']), ('\u1f23', &['\u1f21', '\u0300']), ('\u1f24', &['\u1f20',
-        '\u0301']), ('\u1f25', &['\u1f21', '\u0301']), ('\u1f26', &['\u1f20', '\u0342']), ('\u1f27',
-        &['\u1f21', '\u0342']), ('\u1f28', &['\u0397', '\u0313']), ('\u1f29', &['\u0397',
-        '\u0314']), ('\u1f2a', &['\u1f28', '\u0300']), ('\u1f2b', &['\u1f29', '\u0300']), ('\u1f2c',
-        &['\u1f28', '\u0301']), ('\u1f2d', &['\u1f29', '\u0301']), ('\u1f2e', &['\u1f28',
-        '\u0342']), ('\u1f2f', &['\u1f29', '\u0342']), ('\u1f30', &['\u03b9', '\u0313']), ('\u1f31',
-        &['\u03b9', '\u0314']), ('\u1f32', &['\u1f30', '\u0300']), ('\u1f33', &['\u1f31',
-        '\u0300']), ('\u1f34', &['\u1f30', '\u0301']), ('\u1f35', &['\u1f31', '\u0301']), ('\u1f36',
-        &['\u1f30', '\u0342']), ('\u1f37', &['\u1f31', '\u0342']), ('\u1f38', &['\u0399',
-        '\u0313']), ('\u1f39', &['\u0399', '\u0314']), ('\u1f3a', &['\u1f38', '\u0300']), ('\u1f3b',
-        &['\u1f39', '\u0300']), ('\u1f3c', &['\u1f38', '\u0301']), ('\u1f3d', &['\u1f39',
-        '\u0301']), ('\u1f3e', &['\u1f38', '\u0342']), ('\u1f3f', &['\u1f39', '\u0342']), ('\u1f40',
-        &['\u03bf', '\u0313']), ('\u1f41', &['\u03bf', '\u0314']), ('\u1f42', &['\u1f40',
-        '\u0300']), ('\u1f43', &['\u1f41', '\u0300']), ('\u1f44', &['\u1f40', '\u0301']), ('\u1f45',
-        &['\u1f41', '\u0301']), ('\u1f48', &['\u039f', '\u0313']), ('\u1f49', &['\u039f',
-        '\u0314']), ('\u1f4a', &['\u1f48', '\u0300']), ('\u1f4b', &['\u1f49', '\u0300']), ('\u1f4c',
-        &['\u1f48', '\u0301']), ('\u1f4d', &['\u1f49', '\u0301']), ('\u1f50', &['\u03c5',
-        '\u0313']), ('\u1f51', &['\u03c5', '\u0314']), ('\u1f52', &['\u1f50', '\u0300']), ('\u1f53',
-        &['\u1f51', '\u0300']), ('\u1f54', &['\u1f50', '\u0301']), ('\u1f55', &['\u1f51',
-        '\u0301']), ('\u1f56', &['\u1f50', '\u0342']), ('\u1f57', &['\u1f51', '\u0342']), ('\u1f59',
-        &['\u03a5', '\u0314']), ('\u1f5b', &['\u1f59', '\u0300']), ('\u1f5d', &['\u1f59',
-        '\u0301']), ('\u1f5f', &['\u1f59', '\u0342']), ('\u1f60', &['\u03c9', '\u0313']), ('\u1f61',
-        &['\u03c9', '\u0314']), ('\u1f62', &['\u1f60', '\u0300']), ('\u1f63', &['\u1f61',
-        '\u0300']), ('\u1f64', &['\u1f60', '\u0301']), ('\u1f65', &['\u1f61', '\u0301']), ('\u1f66',
-        &['\u1f60', '\u0342']), ('\u1f67', &['\u1f61', '\u0342']), ('\u1f68', &['\u03a9',
-        '\u0313']), ('\u1f69', &['\u03a9', '\u0314']), ('\u1f6a', &['\u1f68', '\u0300']), ('\u1f6b',
-        &['\u1f69', '\u0300']), ('\u1f6c', &['\u1f68', '\u0301']), ('\u1f6d', &['\u1f69',
-        '\u0301']), ('\u1f6e', &['\u1f68', '\u0342']), ('\u1f6f', &['\u1f69', '\u0342']), ('\u1f70',
-        &['\u03b1', '\u0300']), ('\u1f71', &['\u03ac']), ('\u1f72', &['\u03b5', '\u0300']),
-        ('\u1f73', &['\u03ad']), ('\u1f74', &['\u03b7', '\u0300']), ('\u1f75', &['\u03ae']),
-        ('\u1f76', &['\u03b9', '\u0300']), ('\u1f77', &['\u03af']), ('\u1f78', &['\u03bf',
-        '\u0300']), ('\u1f79', &['\u03cc']), ('\u1f7a', &['\u03c5', '\u0300']), ('\u1f7b',
-        &['\u03cd']), ('\u1f7c', &['\u03c9', '\u0300']), ('\u1f7d', &['\u03ce']), ('\u1f80',
-        &['\u1f00', '\u0345']), ('\u1f81', &['\u1f01', '\u0345']), ('\u1f82', &['\u1f02',
-        '\u0345']), ('\u1f83', &['\u1f03', '\u0345']), ('\u1f84', &['\u1f04', '\u0345']), ('\u1f85',
-        &['\u1f05', '\u0345']), ('\u1f86', &['\u1f06', '\u0345']), ('\u1f87', &['\u1f07',
-        '\u0345']), ('\u1f88', &['\u1f08', '\u0345']), ('\u1f89', &['\u1f09', '\u0345']), ('\u1f8a',
-        &['\u1f0a', '\u0345']), ('\u1f8b', &['\u1f0b', '\u0345']), ('\u1f8c', &['\u1f0c',
-        '\u0345']), ('\u1f8d', &['\u1f0d', '\u0345']), ('\u1f8e', &['\u1f0e', '\u0345']), ('\u1f8f',
-        &['\u1f0f', '\u0345']), ('\u1f90', &['\u1f20', '\u0345']), ('\u1f91', &['\u1f21',
-        '\u0345']), ('\u1f92', &['\u1f22', '\u0345']), ('\u1f93', &['\u1f23', '\u0345']), ('\u1f94',
-        &['\u1f24', '\u0345']), ('\u1f95', &['\u1f25', '\u0345']), ('\u1f96', &['\u1f26',
-        '\u0345']), ('\u1f97', &['\u1f27', '\u0345']), ('\u1f98', &['\u1f28', '\u0345']), ('\u1f99',
-        &['\u1f29', '\u0345']), ('\u1f9a', &['\u1f2a', '\u0345']), ('\u1f9b', &['\u1f2b',
-        '\u0345']), ('\u1f9c', &['\u1f2c', '\u0345']), ('\u1f9d', &['\u1f2d', '\u0345']), ('\u1f9e',
-        &['\u1f2e', '\u0345']), ('\u1f9f', &['\u1f2f', '\u0345']), ('\u1fa0', &['\u1f60',
-        '\u0345']), ('\u1fa1', &['\u1f61', '\u0345']), ('\u1fa2', &['\u1f62', '\u0345']), ('\u1fa3',
-        &['\u1f63', '\u0345']), ('\u1fa4', &['\u1f64', '\u0345']), ('\u1fa5', &['\u1f65',
-        '\u0345']), ('\u1fa6', &['\u1f66', '\u0345']), ('\u1fa7', &['\u1f67', '\u0345']), ('\u1fa8',
-        &['\u1f68', '\u0345']), ('\u1fa9', &['\u1f69', '\u0345']), ('\u1faa', &['\u1f6a',
-        '\u0345']), ('\u1fab', &['\u1f6b', '\u0345']), ('\u1fac', &['\u1f6c', '\u0345']), ('\u1fad',
-        &['\u1f6d', '\u0345']), ('\u1fae', &['\u1f6e', '\u0345']), ('\u1faf', &['\u1f6f',
-        '\u0345']), ('\u1fb0', &['\u03b1', '\u0306']), ('\u1fb1', &['\u03b1', '\u0304']), ('\u1fb2',
-        &['\u1f70', '\u0345']), ('\u1fb3', &['\u03b1', '\u0345']), ('\u1fb4', &['\u03ac',
-        '\u0345']), ('\u1fb6', &['\u03b1', '\u0342']), ('\u1fb7', &['\u1fb6', '\u0345']), ('\u1fb8',
-        &['\u0391', '\u0306']), ('\u1fb9', &['\u0391', '\u0304']), ('\u1fba', &['\u0391',
-        '\u0300']), ('\u1fbb', &['\u0386']), ('\u1fbc', &['\u0391', '\u0345']), ('\u1fbe',
-        &['\u03b9']), ('\u1fc1', &['\u00a8', '\u0342']), ('\u1fc2', &['\u1f74', '\u0345']),
-        ('\u1fc3', &['\u03b7', '\u0345']), ('\u1fc4', &['\u03ae', '\u0345']), ('\u1fc6', &['\u03b7',
-        '\u0342']), ('\u1fc7', &['\u1fc6', '\u0345']), ('\u1fc8', &['\u0395', '\u0300']), ('\u1fc9',
-        &['\u0388']), ('\u1fca', &['\u0397', '\u0300']), ('\u1fcb', &['\u0389']), ('\u1fcc',
-        &['\u0397', '\u0345']), ('\u1fcd', &['\u1fbf', '\u0300']), ('\u1fce', &['\u1fbf',
-        '\u0301']), ('\u1fcf', &['\u1fbf', '\u0342']), ('\u1fd0', &['\u03b9', '\u0306']), ('\u1fd1',
-        &['\u03b9', '\u0304']), ('\u1fd2', &['\u03ca', '\u0300']), ('\u1fd3', &['\u0390']),
-        ('\u1fd6', &['\u03b9', '\u0342']), ('\u1fd7', &['\u03ca', '\u0342']), ('\u1fd8', &['\u0399',
-        '\u0306']), ('\u1fd9', &['\u0399', '\u0304']), ('\u1fda', &['\u0399', '\u0300']), ('\u1fdb',
-        &['\u038a']), ('\u1fdd', &['\u1ffe', '\u0300']), ('\u1fde', &['\u1ffe', '\u0301']),
-        ('\u1fdf', &['\u1ffe', '\u0342']), ('\u1fe0', &['\u03c5', '\u0306']), ('\u1fe1', &['\u03c5',
-        '\u0304']), ('\u1fe2', &['\u03cb', '\u0300']), ('\u1fe3', &['\u03b0']), ('\u1fe4',
-        &['\u03c1', '\u0313']), ('\u1fe5', &['\u03c1', '\u0314']), ('\u1fe6', &['\u03c5',
-        '\u0342']), ('\u1fe7', &['\u03cb', '\u0342']), ('\u1fe8', &['\u03a5', '\u0306']), ('\u1fe9',
-        &['\u03a5', '\u0304']), ('\u1fea', &['\u03a5', '\u0300']), ('\u1feb', &['\u038e']),
-        ('\u1fec', &['\u03a1', '\u0314']), ('\u1fed', &['\u00a8', '\u0300']), ('\u1fee',
-        &['\u0385']), ('\u1fef', &['\x60']), ('\u1ff2', &['\u1f7c', '\u0345']), ('\u1ff3',
-        &['\u03c9', '\u0345']), ('\u1ff4', &['\u03ce', '\u0345']), ('\u1ff6', &['\u03c9',
-        '\u0342']), ('\u1ff7', &['\u1ff6', '\u0345']), ('\u1ff8', &['\u039f', '\u0300']), ('\u1ff9',
-        &['\u038c']), ('\u1ffa', &['\u03a9', '\u0300']), ('\u1ffb', &['\u038f']), ('\u1ffc',
-        &['\u03a9', '\u0345']), ('\u1ffd', &['\u00b4']), ('\u2000', &['\u2002']), ('\u2001',
-        &['\u2003']), ('\u2126', &['\u03a9']), ('\u212a', &['\x4b']), ('\u212b', &['\u00c5']),
-        ('\u219a', &['\u2190', '\u0338']), ('\u219b', &['\u2192', '\u0338']), ('\u21ae', &['\u2194',
-        '\u0338']), ('\u21cd', &['\u21d0', '\u0338']), ('\u21ce', &['\u21d4', '\u0338']), ('\u21cf',
-        &['\u21d2', '\u0338']), ('\u2204', &['\u2203', '\u0338']), ('\u2209', &['\u2208',
-        '\u0338']), ('\u220c', &['\u220b', '\u0338']), ('\u2224', &['\u2223', '\u0338']), ('\u2226',
-        &['\u2225', '\u0338']), ('\u2241', &['\u223c', '\u0338']), ('\u2244', &['\u2243',
-        '\u0338']), ('\u2247', &['\u2245', '\u0338']), ('\u2249', &['\u2248', '\u0338']), ('\u2260',
-        &['\x3d', '\u0338']), ('\u2262', &['\u2261', '\u0338']), ('\u226d', &['\u224d', '\u0338']),
-        ('\u226e', &['\x3c', '\u0338']), ('\u226f', &['\x3e', '\u0338']), ('\u2270', &['\u2264',
-        '\u0338']), ('\u2271', &['\u2265', '\u0338']), ('\u2274', &['\u2272', '\u0338']), ('\u2275',
-        &['\u2273', '\u0338']), ('\u2278', &['\u2276', '\u0338']), ('\u2279', &['\u2277',
-        '\u0338']), ('\u2280', &['\u227a', '\u0338']), ('\u2281', &['\u227b', '\u0338']), ('\u2284',
-        &['\u2282', '\u0338']), ('\u2285', &['\u2283', '\u0338']), ('\u2288', &['\u2286',
-        '\u0338']), ('\u2289', &['\u2287', '\u0338']), ('\u22ac', &['\u22a2', '\u0338']), ('\u22ad',
-        &['\u22a8', '\u0338']), ('\u22ae', &['\u22a9', '\u0338']), ('\u22af', &['\u22ab',
-        '\u0338']), ('\u22e0', &['\u227c', '\u0338']), ('\u22e1', &['\u227d', '\u0338']), ('\u22e2',
-        &['\u2291', '\u0338']), ('\u22e3', &['\u2292', '\u0338']), ('\u22ea', &['\u22b2',
-        '\u0338']), ('\u22eb', &['\u22b3', '\u0338']), ('\u22ec', &['\u22b4', '\u0338']), ('\u22ed',
-        &['\u22b5', '\u0338']), ('\u2329', &['\u3008']), ('\u232a', &['\u3009']), ('\u2adc',
-        &['\u2add', '\u0338']), ('\u304c', &['\u304b', '\u3099']), ('\u304e', &['\u304d',
-        '\u3099']), ('\u3050', &['\u304f', '\u3099']), ('\u3052', &['\u3051', '\u3099']), ('\u3054',
-        &['\u3053', '\u3099']), ('\u3056', &['\u3055', '\u3099']), ('\u3058', &['\u3057',
-        '\u3099']), ('\u305a', &['\u3059', '\u3099']), ('\u305c', &['\u305b', '\u3099']), ('\u305e',
-        &['\u305d', '\u3099']), ('\u3060', &['\u305f', '\u3099']), ('\u3062', &['\u3061',
-        '\u3099']), ('\u3065', &['\u3064', '\u3099']), ('\u3067', &['\u3066', '\u3099']), ('\u3069',
-        &['\u3068', '\u3099']), ('\u3070', &['\u306f', '\u3099']), ('\u3071', &['\u306f',
-        '\u309a']), ('\u3073', &['\u3072', '\u3099']), ('\u3074', &['\u3072', '\u309a']), ('\u3076',
-        &['\u3075', '\u3099']), ('\u3077', &['\u3075', '\u309a']), ('\u3079', &['\u3078',
-        '\u3099']), ('\u307a', &['\u3078', '\u309a']), ('\u307c', &['\u307b', '\u3099']), ('\u307d',
-        &['\u307b', '\u309a']), ('\u3094', &['\u3046', '\u3099']), ('\u309e', &['\u309d',
-        '\u3099']), ('\u30ac', &['\u30ab', '\u3099']), ('\u30ae', &['\u30ad', '\u3099']), ('\u30b0',
-        &['\u30af', '\u3099']), ('\u30b2', &['\u30b1', '\u3099']), ('\u30b4', &['\u30b3',
-        '\u3099']), ('\u30b6', &['\u30b5', '\u3099']), ('\u30b8', &['\u30b7', '\u3099']), ('\u30ba',
-        &['\u30b9', '\u3099']), ('\u30bc', &['\u30bb', '\u3099']), ('\u30be', &['\u30bd',
-        '\u3099']), ('\u30c0', &['\u30bf', '\u3099']), ('\u30c2', &['\u30c1', '\u3099']), ('\u30c5',
-        &['\u30c4', '\u3099']), ('\u30c7', &['\u30c6', '\u3099']), ('\u30c9', &['\u30c8',
-        '\u3099']), ('\u30d0', &['\u30cf', '\u3099']), ('\u30d1', &['\u30cf', '\u309a']), ('\u30d3',
-        &['\u30d2', '\u3099']), ('\u30d4', &['\u30d2', '\u309a']), ('\u30d6', &['\u30d5',
-        '\u3099']), ('\u30d7', &['\u30d5', '\u309a']), ('\u30d9', &['\u30d8', '\u3099']), ('\u30da',
-        &['\u30d8', '\u309a']), ('\u30dc', &['\u30db', '\u3099']), ('\u30dd', &['\u30db',
-        '\u309a']), ('\u30f4', &['\u30a6', '\u3099']), ('\u30f7', &['\u30ef', '\u3099']), ('\u30f8',
-        &['\u30f0', '\u3099']), ('\u30f9', &['\u30f1', '\u3099']), ('\u30fa', &['\u30f2',
-        '\u3099']), ('\u30fe', &['\u30fd', '\u3099']), ('\uf900', &['\u8c48']), ('\uf901',
-        &['\u66f4']), ('\uf902', &['\u8eca']), ('\uf903', &['\u8cc8']), ('\uf904', &['\u6ed1']),
-        ('\uf905', &['\u4e32']), ('\uf906', &['\u53e5']), ('\uf907', &['\u9f9c']), ('\uf908',
-        &['\u9f9c']), ('\uf909', &['\u5951']), ('\uf90a', &['\u91d1']), ('\uf90b', &['\u5587']),
-        ('\uf90c', &['\u5948']), ('\uf90d', &['\u61f6']), ('\uf90e', &['\u7669']), ('\uf90f',
-        &['\u7f85']), ('\uf910', &['\u863f']), ('\uf911', &['\u87ba']), ('\uf912', &['\u88f8']),
-        ('\uf913', &['\u908f']), ('\uf914', &['\u6a02']), ('\uf915', &['\u6d1b']), ('\uf916',
-        &['\u70d9']), ('\uf917', &['\u73de']), ('\uf918', &['\u843d']), ('\uf919', &['\u916a']),
-        ('\uf91a', &['\u99f1']), ('\uf91b', &['\u4e82']), ('\uf91c', &['\u5375']), ('\uf91d',
-        &['\u6b04']), ('\uf91e', &['\u721b']), ('\uf91f', &['\u862d']), ('\uf920', &['\u9e1e']),
-        ('\uf921', &['\u5d50']), ('\uf922', &['\u6feb']), ('\uf923', &['\u85cd']), ('\uf924',
-        &['\u8964']), ('\uf925', &['\u62c9']), ('\uf926', &['\u81d8']), ('\uf927', &['\u881f']),
-        ('\uf928', &['\u5eca']), ('\uf929', &['\u6717']), ('\uf92a', &['\u6d6a']), ('\uf92b',
-        &['\u72fc']), ('\uf92c', &['\u90ce']), ('\uf92d', &['\u4f86']), ('\uf92e', &['\u51b7']),
-        ('\uf92f', &['\u52de']), ('\uf930', &['\u64c4']), ('\uf931', &['\u6ad3']), ('\uf932',
-        &['\u7210']), ('\uf933', &['\u76e7']), ('\uf934', &['\u8001']), ('\uf935', &['\u8606']),
-        ('\uf936', &['\u865c']), ('\uf937', &['\u8def']), ('\uf938', &['\u9732']), ('\uf939',
-        &['\u9b6f']), ('\uf93a', &['\u9dfa']), ('\uf93b', &['\u788c']), ('\uf93c', &['\u797f']),
-        ('\uf93d', &['\u7da0']), ('\uf93e', &['\u83c9']), ('\uf93f', &['\u9304']), ('\uf940',
-        &['\u9e7f']), ('\uf941', &['\u8ad6']), ('\uf942', &['\u58df']), ('\uf943', &['\u5f04']),
-        ('\uf944', &['\u7c60']), ('\uf945', &['\u807e']), ('\uf946', &['\u7262']), ('\uf947',
-        &['\u78ca']), ('\uf948', &['\u8cc2']), ('\uf949', &['\u96f7']), ('\uf94a', &['\u58d8']),
-        ('\uf94b', &['\u5c62']), ('\uf94c', &['\u6a13']), ('\uf94d', &['\u6dda']), ('\uf94e',
-        &['\u6f0f']), ('\uf94f', &['\u7d2f']), ('\uf950', &['\u7e37']), ('\uf951', &['\u964b']),
-        ('\uf952', &['\u52d2']), ('\uf953', &['\u808b']), ('\uf954', &['\u51dc']), ('\uf955',
-        &['\u51cc']), ('\uf956', &['\u7a1c']), ('\uf957', &['\u7dbe']), ('\uf958', &['\u83f1']),
-        ('\uf959', &['\u9675']), ('\uf95a', &['\u8b80']), ('\uf95b', &['\u62cf']), ('\uf95c',
-        &['\u6a02']), ('\uf95d', &['\u8afe']), ('\uf95e', &['\u4e39']), ('\uf95f', &['\u5be7']),
-        ('\uf960', &['\u6012']), ('\uf961', &['\u7387']), ('\uf962', &['\u7570']), ('\uf963',
-        &['\u5317']), ('\uf964', &['\u78fb']), ('\uf965', &['\u4fbf']), ('\uf966', &['\u5fa9']),
-        ('\uf967', &['\u4e0d']), ('\uf968', &['\u6ccc']), ('\uf969', &['\u6578']), ('\uf96a',
-        &['\u7d22']), ('\uf96b', &['\u53c3']), ('\uf96c', &['\u585e']), ('\uf96d', &['\u7701']),
-        ('\uf96e', &['\u8449']), ('\uf96f', &['\u8aaa']), ('\uf970', &['\u6bba']), ('\uf971',
-        &['\u8fb0']), ('\uf972', &['\u6c88']), ('\uf973', &['\u62fe']), ('\uf974', &['\u82e5']),
-        ('\uf975', &['\u63a0']), ('\uf976', &['\u7565']), ('\uf977', &['\u4eae']), ('\uf978',
-        &['\u5169']), ('\uf979', &['\u51c9']), ('\uf97a', &['\u6881']), ('\uf97b', &['\u7ce7']),
-        ('\uf97c', &['\u826f']), ('\uf97d', &['\u8ad2']), ('\uf97e', &['\u91cf']), ('\uf97f',
-        &['\u52f5']), ('\uf980', &['\u5442']), ('\uf981', &['\u5973']), ('\uf982', &['\u5eec']),
-        ('\uf983', &['\u65c5']), ('\uf984', &['\u6ffe']), ('\uf985', &['\u792a']), ('\uf986',
-        &['\u95ad']), ('\uf987', &['\u9a6a']), ('\uf988', &['\u9e97']), ('\uf989', &['\u9ece']),
-        ('\uf98a', &['\u529b']), ('\uf98b', &['\u66c6']), ('\uf98c', &['\u6b77']), ('\uf98d',
-        &['\u8f62']), ('\uf98e', &['\u5e74']), ('\uf98f', &['\u6190']), ('\uf990', &['\u6200']),
-        ('\uf991', &['\u649a']), ('\uf992', &['\u6f23']), ('\uf993', &['\u7149']), ('\uf994',
-        &['\u7489']), ('\uf995', &['\u79ca']), ('\uf996', &['\u7df4']), ('\uf997', &['\u806f']),
-        ('\uf998', &['\u8f26']), ('\uf999', &['\u84ee']), ('\uf99a', &['\u9023']), ('\uf99b',
-        &['\u934a']), ('\uf99c', &['\u5217']), ('\uf99d', &['\u52a3']), ('\uf99e', &['\u54bd']),
-        ('\uf99f', &['\u70c8']), ('\uf9a0', &['\u88c2']), ('\uf9a1', &['\u8aaa']), ('\uf9a2',
-        &['\u5ec9']), ('\uf9a3', &['\u5ff5']), ('\uf9a4', &['\u637b']), ('\uf9a5', &['\u6bae']),
-        ('\uf9a6', &['\u7c3e']), ('\uf9a7', &['\u7375']), ('\uf9a8', &['\u4ee4']), ('\uf9a9',
-        &['\u56f9']), ('\uf9aa', &['\u5be7']), ('\uf9ab', &['\u5dba']), ('\uf9ac', &['\u601c']),
-        ('\uf9ad', &['\u73b2']), ('\uf9ae', &['\u7469']), ('\uf9af', &['\u7f9a']), ('\uf9b0',
-        &['\u8046']), ('\uf9b1', &['\u9234']), ('\uf9b2', &['\u96f6']), ('\uf9b3', &['\u9748']),
-        ('\uf9b4', &['\u9818']), ('\uf9b5', &['\u4f8b']), ('\uf9b6', &['\u79ae']), ('\uf9b7',
-        &['\u91b4']), ('\uf9b8', &['\u96b8']), ('\uf9b9', &['\u60e1']), ('\uf9ba', &['\u4e86']),
-        ('\uf9bb', &['\u50da']), ('\uf9bc', &['\u5bee']), ('\uf9bd', &['\u5c3f']), ('\uf9be',
-        &['\u6599']), ('\uf9bf', &['\u6a02']), ('\uf9c0', &['\u71ce']), ('\uf9c1', &['\u7642']),
-        ('\uf9c2', &['\u84fc']), ('\uf9c3', &['\u907c']), ('\uf9c4', &['\u9f8d']), ('\uf9c5',
-        &['\u6688']), ('\uf9c6', &['\u962e']), ('\uf9c7', &['\u5289']), ('\uf9c8', &['\u677b']),
-        ('\uf9c9', &['\u67f3']), ('\uf9ca', &['\u6d41']), ('\uf9cb', &['\u6e9c']), ('\uf9cc',
-        &['\u7409']), ('\uf9cd', &['\u7559']), ('\uf9ce', &['\u786b']), ('\uf9cf', &['\u7d10']),
-        ('\uf9d0', &['\u985e']), ('\uf9d1', &['\u516d']), ('\uf9d2', &['\u622e']), ('\uf9d3',
-        &['\u9678']), ('\uf9d4', &['\u502b']), ('\uf9d5', &['\u5d19']), ('\uf9d6', &['\u6dea']),
-        ('\uf9d7', &['\u8f2a']), ('\uf9d8', &['\u5f8b']), ('\uf9d9', &['\u6144']), ('\uf9da',
-        &['\u6817']), ('\uf9db', &['\u7387']), ('\uf9dc', &['\u9686']), ('\uf9dd', &['\u5229']),
-        ('\uf9de', &['\u540f']), ('\uf9df', &['\u5c65']), ('\uf9e0', &['\u6613']), ('\uf9e1',
-        &['\u674e']), ('\uf9e2', &['\u68a8']), ('\uf9e3', &['\u6ce5']), ('\uf9e4', &['\u7406']),
-        ('\uf9e5', &['\u75e2']), ('\uf9e6', &['\u7f79']), ('\uf9e7', &['\u88cf']), ('\uf9e8',
-        &['\u88e1']), ('\uf9e9', &['\u91cc']), ('\uf9ea', &['\u96e2']), ('\uf9eb', &['\u533f']),
-        ('\uf9ec', &['\u6eba']), ('\uf9ed', &['\u541d']), ('\uf9ee', &['\u71d0']), ('\uf9ef',
-        &['\u7498']), ('\uf9f0', &['\u85fa']), ('\uf9f1', &['\u96a3']), ('\uf9f2', &['\u9c57']),
-        ('\uf9f3', &['\u9e9f']), ('\uf9f4', &['\u6797']), ('\uf9f5', &['\u6dcb']), ('\uf9f6',
-        &['\u81e8']), ('\uf9f7', &['\u7acb']), ('\uf9f8', &['\u7b20']), ('\uf9f9', &['\u7c92']),
-        ('\uf9fa', &['\u72c0']), ('\uf9fb', &['\u7099']), ('\uf9fc', &['\u8b58']), ('\uf9fd',
-        &['\u4ec0']), ('\uf9fe', &['\u8336']), ('\uf9ff', &['\u523a']), ('\ufa00', &['\u5207']),
-        ('\ufa01', &['\u5ea6']), ('\ufa02', &['\u62d3']), ('\ufa03', &['\u7cd6']), ('\ufa04',
-        &['\u5b85']), ('\ufa05', &['\u6d1e']), ('\ufa06', &['\u66b4']), ('\ufa07', &['\u8f3b']),
-        ('\ufa08', &['\u884c']), ('\ufa09', &['\u964d']), ('\ufa0a', &['\u898b']), ('\ufa0b',
-        &['\u5ed3']), ('\ufa0c', &['\u5140']), ('\ufa0d', &['\u55c0']), ('\ufa10', &['\u585a']),
-        ('\ufa12', &['\u6674']), ('\ufa15', &['\u51de']), ('\ufa16', &['\u732a']), ('\ufa17',
-        &['\u76ca']), ('\ufa18', &['\u793c']), ('\ufa19', &['\u795e']), ('\ufa1a', &['\u7965']),
-        ('\ufa1b', &['\u798f']), ('\ufa1c', &['\u9756']), ('\ufa1d', &['\u7cbe']), ('\ufa1e',
-        &['\u7fbd']), ('\ufa20', &['\u8612']), ('\ufa22', &['\u8af8']), ('\ufa25', &['\u9038']),
-        ('\ufa26', &['\u90fd']), ('\ufa2a', &['\u98ef']), ('\ufa2b', &['\u98fc']), ('\ufa2c',
-        &['\u9928']), ('\ufa2d', &['\u9db4']), ('\ufa2e', &['\u90de']), ('\ufa2f', &['\u96b7']),
-        ('\ufa30', &['\u4fae']), ('\ufa31', &['\u50e7']), ('\ufa32', &['\u514d']), ('\ufa33',
-        &['\u52c9']), ('\ufa34', &['\u52e4']), ('\ufa35', &['\u5351']), ('\ufa36', &['\u559d']),
-        ('\ufa37', &['\u5606']), ('\ufa38', &['\u5668']), ('\ufa39', &['\u5840']), ('\ufa3a',
-        &['\u58a8']), ('\ufa3b', &['\u5c64']), ('\ufa3c', &['\u5c6e']), ('\ufa3d', &['\u6094']),
-        ('\ufa3e', &['\u6168']), ('\ufa3f', &['\u618e']), ('\ufa40', &['\u61f2']), ('\ufa41',
-        &['\u654f']), ('\ufa42', &['\u65e2']), ('\ufa43', &['\u6691']), ('\ufa44', &['\u6885']),
-        ('\ufa45', &['\u6d77']), ('\ufa46', &['\u6e1a']), ('\ufa47', &['\u6f22']), ('\ufa48',
-        &['\u716e']), ('\ufa49', &['\u722b']), ('\ufa4a', &['\u7422']), ('\ufa4b', &['\u7891']),
-        ('\ufa4c', &['\u793e']), ('\ufa4d', &['\u7949']), ('\ufa4e', &['\u7948']), ('\ufa4f',
-        &['\u7950']), ('\ufa50', &['\u7956']), ('\ufa51', &['\u795d']), ('\ufa52', &['\u798d']),
-        ('\ufa53', &['\u798e']), ('\ufa54', &['\u7a40']), ('\ufa55', &['\u7a81']), ('\ufa56',
-        &['\u7bc0']), ('\ufa57', &['\u7df4']), ('\ufa58', &['\u7e09']), ('\ufa59', &['\u7e41']),
-        ('\ufa5a', &['\u7f72']), ('\ufa5b', &['\u8005']), ('\ufa5c', &['\u81ed']), ('\ufa5d',
-        &['\u8279']), ('\ufa5e', &['\u8279']), ('\ufa5f', &['\u8457']), ('\ufa60', &['\u8910']),
-        ('\ufa61', &['\u8996']), ('\ufa62', &['\u8b01']), ('\ufa63', &['\u8b39']), ('\ufa64',
-        &['\u8cd3']), ('\ufa65', &['\u8d08']), ('\ufa66', &['\u8fb6']), ('\ufa67', &['\u9038']),
-        ('\ufa68', &['\u96e3']), ('\ufa69', &['\u97ff']), ('\ufa6a', &['\u983b']), ('\ufa6b',
-        &['\u6075']), ('\ufa6c', &['\U000242ee']), ('\ufa6d', &['\u8218']), ('\ufa70', &['\u4e26']),
-        ('\ufa71', &['\u51b5']), ('\ufa72', &['\u5168']), ('\ufa73', &['\u4f80']), ('\ufa74',
-        &['\u5145']), ('\ufa75', &['\u5180']), ('\ufa76', &['\u52c7']), ('\ufa77', &['\u52fa']),
-        ('\ufa78', &['\u559d']), ('\ufa79', &['\u5555']), ('\ufa7a', &['\u5599']), ('\ufa7b',
-        &['\u55e2']), ('\ufa7c', &['\u585a']), ('\ufa7d', &['\u58b3']), ('\ufa7e', &['\u5944']),
-        ('\ufa7f', &['\u5954']), ('\ufa80', &['\u5a62']), ('\ufa81', &['\u5b28']), ('\ufa82',
-        &['\u5ed2']), ('\ufa83', &['\u5ed9']), ('\ufa84', &['\u5f69']), ('\ufa85', &['\u5fad']),
-        ('\ufa86', &['\u60d8']), ('\ufa87', &['\u614e']), ('\ufa88', &['\u6108']), ('\ufa89',
-        &['\u618e']), ('\ufa8a', &['\u6160']), ('\ufa8b', &['\u61f2']), ('\ufa8c', &['\u6234']),
-        ('\ufa8d', &['\u63c4']), ('\ufa8e', &['\u641c']), ('\ufa8f', &['\u6452']), ('\ufa90',
-        &['\u6556']), ('\ufa91', &['\u6674']), ('\ufa92', &['\u6717']), ('\ufa93', &['\u671b']),
-        ('\ufa94', &['\u6756']), ('\ufa95', &['\u6b79']), ('\ufa96', &['\u6bba']), ('\ufa97',
-        &['\u6d41']), ('\ufa98', &['\u6edb']), ('\ufa99', &['\u6ecb']), ('\ufa9a', &['\u6f22']),
-        ('\ufa9b', &['\u701e']), ('\ufa9c', &['\u716e']), ('\ufa9d', &['\u77a7']), ('\ufa9e',
-        &['\u7235']), ('\ufa9f', &['\u72af']), ('\ufaa0', &['\u732a']), ('\ufaa1', &['\u7471']),
-        ('\ufaa2', &['\u7506']), ('\ufaa3', &['\u753b']), ('\ufaa4', &['\u761d']), ('\ufaa5',
-        &['\u761f']), ('\ufaa6', &['\u76ca']), ('\ufaa7', &['\u76db']), ('\ufaa8', &['\u76f4']),
-        ('\ufaa9', &['\u774a']), ('\ufaaa', &['\u7740']), ('\ufaab', &['\u78cc']), ('\ufaac',
-        &['\u7ab1']), ('\ufaad', &['\u7bc0']), ('\ufaae', &['\u7c7b']), ('\ufaaf', &['\u7d5b']),
-        ('\ufab0', &['\u7df4']), ('\ufab1', &['\u7f3e']), ('\ufab2', &['\u8005']), ('\ufab3',
-        &['\u8352']), ('\ufab4', &['\u83ef']), ('\ufab5', &['\u8779']), ('\ufab6', &['\u8941']),
-        ('\ufab7', &['\u8986']), ('\ufab8', &['\u8996']), ('\ufab9', &['\u8abf']), ('\ufaba',
-        &['\u8af8']), ('\ufabb', &['\u8acb']), ('\ufabc', &['\u8b01']), ('\ufabd', &['\u8afe']),
-        ('\ufabe', &['\u8aed']), ('\ufabf', &['\u8b39']), ('\ufac0', &['\u8b8a']), ('\ufac1',
-        &['\u8d08']), ('\ufac2', &['\u8f38']), ('\ufac3', &['\u9072']), ('\ufac4', &['\u9199']),
-        ('\ufac5', &['\u9276']), ('\ufac6', &['\u967c']), ('\ufac7', &['\u96e3']), ('\ufac8',
-        &['\u9756']), ('\ufac9', &['\u97db']), ('\ufaca', &['\u97ff']), ('\ufacb', &['\u980b']),
-        ('\ufacc', &['\u983b']), ('\ufacd', &['\u9b12']), ('\uface', &['\u9f9c']), ('\ufacf',
-        &['\U0002284a']), ('\ufad0', &['\U00022844']), ('\ufad1', &['\U000233d5']), ('\ufad2',
-        &['\u3b9d']), ('\ufad3', &['\u4018']), ('\ufad4', &['\u4039']), ('\ufad5', &['\U00025249']),
-        ('\ufad6', &['\U00025cd0']), ('\ufad7', &['\U00027ed3']), ('\ufad8', &['\u9f43']),
-        ('\ufad9', &['\u9f8e']), ('\ufb1d', &['\u05d9', '\u05b4']), ('\ufb1f', &['\u05f2',
-        '\u05b7']), ('\ufb2a', &['\u05e9', '\u05c1']), ('\ufb2b', &['\u05e9', '\u05c2']), ('\ufb2c',
-        &['\ufb49', '\u05c1']), ('\ufb2d', &['\ufb49', '\u05c2']), ('\ufb2e', &['\u05d0',
-        '\u05b7']), ('\ufb2f', &['\u05d0', '\u05b8']), ('\ufb30', &['\u05d0', '\u05bc']), ('\ufb31',
-        &['\u05d1', '\u05bc']), ('\ufb32', &['\u05d2', '\u05bc']), ('\ufb33', &['\u05d3',
-        '\u05bc']), ('\ufb34', &['\u05d4', '\u05bc']), ('\ufb35', &['\u05d5', '\u05bc']), ('\ufb36',
-        &['\u05d6', '\u05bc']), ('\ufb38', &['\u05d8', '\u05bc']), ('\ufb39', &['\u05d9',
-        '\u05bc']), ('\ufb3a', &['\u05da', '\u05bc']), ('\ufb3b', &['\u05db', '\u05bc']), ('\ufb3c',
-        &['\u05dc', '\u05bc']), ('\ufb3e', &['\u05de', '\u05bc']), ('\ufb40', &['\u05e0',
-        '\u05bc']), ('\ufb41', &['\u05e1', '\u05bc']), ('\ufb43', &['\u05e3', '\u05bc']), ('\ufb44',
-        &['\u05e4', '\u05bc']), ('\ufb46', &['\u05e6', '\u05bc']), ('\ufb47', &['\u05e7',
-        '\u05bc']), ('\ufb48', &['\u05e8', '\u05bc']), ('\ufb49', &['\u05e9', '\u05bc']), ('\ufb4a',
-        &['\u05ea', '\u05bc']), ('\ufb4b', &['\u05d5', '\u05b9']), ('\ufb4c', &['\u05d1',
-        '\u05bf']), ('\ufb4d', &['\u05db', '\u05bf']), ('\ufb4e', &['\u05e4', '\u05bf']),
-        ('\U0001109a', &['\U00011099', '\U000110ba']), ('\U0001109c', &['\U0001109b',
-        '\U000110ba']), ('\U000110ab', &['\U000110a5', '\U000110ba']), ('\U0001112e',
-        &['\U00011131', '\U00011127']), ('\U0001112f', &['\U00011132', '\U00011127']),
-        ('\U0001134b', &['\U00011347', '\U0001133e']), ('\U0001134c', &['\U00011347',
-        '\U00011357']), ('\U000114bb', &['\U000114b9', '\U000114ba']), ('\U000114bc',
-        &['\U000114b9', '\U000114b0']), ('\U000114be', &['\U000114b9', '\U000114bd']),
-        ('\U000115ba', &['\U000115b8', '\U000115af']), ('\U000115bb', &['\U000115b9',
-        '\U000115af']), ('\U0001d15e', &['\U0001d157', '\U0001d165']), ('\U0001d15f',
-        &['\U0001d158', '\U0001d165']), ('\U0001d160', &['\U0001d15f', '\U0001d16e']),
-        ('\U0001d161', &['\U0001d15f', '\U0001d16f']), ('\U0001d162', &['\U0001d15f',
-        '\U0001d170']), ('\U0001d163', &['\U0001d15f', '\U0001d171']), ('\U0001d164',
-        &['\U0001d15f', '\U0001d172']), ('\U0001d1bb', &['\U0001d1b9', '\U0001d165']),
-        ('\U0001d1bc', &['\U0001d1ba', '\U0001d165']), ('\U0001d1bd', &['\U0001d1bb',
-        '\U0001d16e']), ('\U0001d1be', &['\U0001d1bc', '\U0001d16e']), ('\U0001d1bf',
-        &['\U0001d1bb', '\U0001d16f']), ('\U0001d1c0', &['\U0001d1bc', '\U0001d16f']),
-        ('\U0002f800', &['\u4e3d']), ('\U0002f801', &['\u4e38']), ('\U0002f802', &['\u4e41']),
-        ('\U0002f803', &['\U00020122']), ('\U0002f804', &['\u4f60']), ('\U0002f805', &['\u4fae']),
-        ('\U0002f806', &['\u4fbb']), ('\U0002f807', &['\u5002']), ('\U0002f808', &['\u507a']),
-        ('\U0002f809', &['\u5099']), ('\U0002f80a', &['\u50e7']), ('\U0002f80b', &['\u50cf']),
-        ('\U0002f80c', &['\u349e']), ('\U0002f80d', &['\U0002063a']), ('\U0002f80e', &['\u514d']),
-        ('\U0002f80f', &['\u5154']), ('\U0002f810', &['\u5164']), ('\U0002f811', &['\u5177']),
-        ('\U0002f812', &['\U0002051c']), ('\U0002f813', &['\u34b9']), ('\U0002f814', &['\u5167']),
-        ('\U0002f815', &['\u518d']), ('\U0002f816', &['\U0002054b']), ('\U0002f817', &['\u5197']),
-        ('\U0002f818', &['\u51a4']), ('\U0002f819', &['\u4ecc']), ('\U0002f81a', &['\u51ac']),
-        ('\U0002f81b', &['\u51b5']), ('\U0002f81c', &['\U000291df']), ('\U0002f81d', &['\u51f5']),
-        ('\U0002f81e', &['\u5203']), ('\U0002f81f', &['\u34df']), ('\U0002f820', &['\u523b']),
-        ('\U0002f821', &['\u5246']), ('\U0002f822', &['\u5272']), ('\U0002f823', &['\u5277']),
-        ('\U0002f824', &['\u3515']), ('\U0002f825', &['\u52c7']), ('\U0002f826', &['\u52c9']),
-        ('\U0002f827', &['\u52e4']), ('\U0002f828', &['\u52fa']), ('\U0002f829', &['\u5305']),
-        ('\U0002f82a', &['\u5306']), ('\U0002f82b', &['\u5317']), ('\U0002f82c', &['\u5349']),
-        ('\U0002f82d', &['\u5351']), ('\U0002f82e', &['\u535a']), ('\U0002f82f', &['\u5373']),
-        ('\U0002f830', &['\u537d']), ('\U0002f831', &['\u537f']), ('\U0002f832', &['\u537f']),
-        ('\U0002f833', &['\u537f']), ('\U0002f834', &['\U00020a2c']), ('\U0002f835', &['\u7070']),
-        ('\U0002f836', &['\u53ca']), ('\U0002f837', &['\u53df']), ('\U0002f838', &['\U00020b63']),
-        ('\U0002f839', &['\u53eb']), ('\U0002f83a', &['\u53f1']), ('\U0002f83b', &['\u5406']),
-        ('\U0002f83c', &['\u549e']), ('\U0002f83d', &['\u5438']), ('\U0002f83e', &['\u5448']),
-        ('\U0002f83f', &['\u5468']), ('\U0002f840', &['\u54a2']), ('\U0002f841', &['\u54f6']),
-        ('\U0002f842', &['\u5510']), ('\U0002f843', &['\u5553']), ('\U0002f844', &['\u5563']),
-        ('\U0002f845', &['\u5584']), ('\U0002f846', &['\u5584']), ('\U0002f847', &['\u5599']),
-        ('\U0002f848', &['\u55ab']), ('\U0002f849', &['\u55b3']), ('\U0002f84a', &['\u55c2']),
-        ('\U0002f84b', &['\u5716']), ('\U0002f84c', &['\u5606']), ('\U0002f84d', &['\u5717']),
-        ('\U0002f84e', &['\u5651']), ('\U0002f84f', &['\u5674']), ('\U0002f850', &['\u5207']),
-        ('\U0002f851', &['\u58ee']), ('\U0002f852', &['\u57ce']), ('\U0002f853', &['\u57f4']),
-        ('\U0002f854', &['\u580d']), ('\U0002f855', &['\u578b']), ('\U0002f856', &['\u5832']),
-        ('\U0002f857', &['\u5831']), ('\U0002f858', &['\u58ac']), ('\U0002f859', &['\U000214e4']),
-        ('\U0002f85a', &['\u58f2']), ('\U0002f85b', &['\u58f7']), ('\U0002f85c', &['\u5906']),
-        ('\U0002f85d', &['\u591a']), ('\U0002f85e', &['\u5922']), ('\U0002f85f', &['\u5962']),
-        ('\U0002f860', &['\U000216a8']), ('\U0002f861', &['\U000216ea']), ('\U0002f862',
-        &['\u59ec']), ('\U0002f863', &['\u5a1b']), ('\U0002f864', &['\u5a27']), ('\U0002f865',
-        &['\u59d8']), ('\U0002f866', &['\u5a66']), ('\U0002f867', &['\u36ee']), ('\U0002f868',
-        &['\u36fc']), ('\U0002f869', &['\u5b08']), ('\U0002f86a', &['\u5b3e']), ('\U0002f86b',
-        &['\u5b3e']), ('\U0002f86c', &['\U000219c8']), ('\U0002f86d', &['\u5bc3']), ('\U0002f86e',
-        &['\u5bd8']), ('\U0002f86f', &['\u5be7']), ('\U0002f870', &['\u5bf3']), ('\U0002f871',
-        &['\U00021b18']), ('\U0002f872', &['\u5bff']), ('\U0002f873', &['\u5c06']), ('\U0002f874',
-        &['\u5f53']), ('\U0002f875', &['\u5c22']), ('\U0002f876', &['\u3781']), ('\U0002f877',
-        &['\u5c60']), ('\U0002f878', &['\u5c6e']), ('\U0002f879', &['\u5cc0']), ('\U0002f87a',
-        &['\u5c8d']), ('\U0002f87b', &['\U00021de4']), ('\U0002f87c', &['\u5d43']), ('\U0002f87d',
-        &['\U00021de6']), ('\U0002f87e', &['\u5d6e']), ('\U0002f87f', &['\u5d6b']), ('\U0002f880',
-        &['\u5d7c']), ('\U0002f881', &['\u5de1']), ('\U0002f882', &['\u5de2']), ('\U0002f883',
-        &['\u382f']), ('\U0002f884', &['\u5dfd']), ('\U0002f885', &['\u5e28']), ('\U0002f886',
-        &['\u5e3d']), ('\U0002f887', &['\u5e69']), ('\U0002f888', &['\u3862']), ('\U0002f889',
-        &['\U00022183']), ('\U0002f88a', &['\u387c']), ('\U0002f88b', &['\u5eb0']), ('\U0002f88c',
-        &['\u5eb3']), ('\U0002f88d', &['\u5eb6']), ('\U0002f88e', &['\u5eca']), ('\U0002f88f',
-        &['\U0002a392']), ('\U0002f890', &['\u5efe']), ('\U0002f891', &['\U00022331']),
-        ('\U0002f892', &['\U00022331']), ('\U0002f893', &['\u8201']), ('\U0002f894', &['\u5f22']),
-        ('\U0002f895', &['\u5f22']), ('\U0002f896', &['\u38c7']), ('\U0002f897', &['\U000232b8']),
-        ('\U0002f898', &['\U000261da']), ('\U0002f899', &['\u5f62']), ('\U0002f89a', &['\u5f6b']),
-        ('\U0002f89b', &['\u38e3']), ('\U0002f89c', &['\u5f9a']), ('\U0002f89d', &['\u5fcd']),
-        ('\U0002f89e', &['\u5fd7']), ('\U0002f89f', &['\u5ff9']), ('\U0002f8a0', &['\u6081']),
-        ('\U0002f8a1', &['\u393a']), ('\U0002f8a2', &['\u391c']), ('\U0002f8a3', &['\u6094']),
-        ('\U0002f8a4', &['\U000226d4']), ('\U0002f8a5', &['\u60c7']), ('\U0002f8a6', &['\u6148']),
-        ('\U0002f8a7', &['\u614c']), ('\U0002f8a8', &['\u614e']), ('\U0002f8a9', &['\u614c']),
-        ('\U0002f8aa', &['\u617a']), ('\U0002f8ab', &['\u618e']), ('\U0002f8ac', &['\u61b2']),
-        ('\U0002f8ad', &['\u61a4']), ('\U0002f8ae', &['\u61af']), ('\U0002f8af', &['\u61de']),
-        ('\U0002f8b0', &['\u61f2']), ('\U0002f8b1', &['\u61f6']), ('\U0002f8b2', &['\u6210']),
-        ('\U0002f8b3', &['\u621b']), ('\U0002f8b4', &['\u625d']), ('\U0002f8b5', &['\u62b1']),
-        ('\U0002f8b6', &['\u62d4']), ('\U0002f8b7', &['\u6350']), ('\U0002f8b8', &['\U00022b0c']),
-        ('\U0002f8b9', &['\u633d']), ('\U0002f8ba', &['\u62fc']), ('\U0002f8bb', &['\u6368']),
-        ('\U0002f8bc', &['\u6383']), ('\U0002f8bd', &['\u63e4']), ('\U0002f8be', &['\U00022bf1']),
-        ('\U0002f8bf', &['\u6422']), ('\U0002f8c0', &['\u63c5']), ('\U0002f8c1', &['\u63a9']),
-        ('\U0002f8c2', &['\u3a2e']), ('\U0002f8c3', &['\u6469']), ('\U0002f8c4', &['\u647e']),
-        ('\U0002f8c5', &['\u649d']), ('\U0002f8c6', &['\u6477']), ('\U0002f8c7', &['\u3a6c']),
-        ('\U0002f8c8', &['\u654f']), ('\U0002f8c9', &['\u656c']), ('\U0002f8ca', &['\U0002300a']),
-        ('\U0002f8cb', &['\u65e3']), ('\U0002f8cc', &['\u66f8']), ('\U0002f8cd', &['\u6649']),
-        ('\U0002f8ce', &['\u3b19']), ('\U0002f8cf', &['\u6691']), ('\U0002f8d0', &['\u3b08']),
-        ('\U0002f8d1', &['\u3ae4']), ('\U0002f8d2', &['\u5192']), ('\U0002f8d3', &['\u5195']),
-        ('\U0002f8d4', &['\u6700']), ('\U0002f8d5', &['\u669c']), ('\U0002f8d6', &['\u80ad']),
-        ('\U0002f8d7', &['\u43d9']), ('\U0002f8d8', &['\u6717']), ('\U0002f8d9', &['\u671b']),
-        ('\U0002f8da', &['\u6721']), ('\U0002f8db', &['\u675e']), ('\U0002f8dc', &['\u6753']),
-        ('\U0002f8dd', &['\U000233c3']), ('\U0002f8de', &['\u3b49']), ('\U0002f8df', &['\u67fa']),
-        ('\U0002f8e0', &['\u6785']), ('\U0002f8e1', &['\u6852']), ('\U0002f8e2', &['\u6885']),
-        ('\U0002f8e3', &['\U0002346d']), ('\U0002f8e4', &['\u688e']), ('\U0002f8e5', &['\u681f']),
-        ('\U0002f8e6', &['\u6914']), ('\U0002f8e7', &['\u3b9d']), ('\U0002f8e8', &['\u6942']),
-        ('\U0002f8e9', &['\u69a3']), ('\U0002f8ea', &['\u69ea']), ('\U0002f8eb', &['\u6aa8']),
-        ('\U0002f8ec', &['\U000236a3']), ('\U0002f8ed', &['\u6adb']), ('\U0002f8ee', &['\u3c18']),
-        ('\U0002f8ef', &['\u6b21']), ('\U0002f8f0', &['\U000238a7']), ('\U0002f8f1', &['\u6b54']),
-        ('\U0002f8f2', &['\u3c4e']), ('\U0002f8f3', &['\u6b72']), ('\U0002f8f4', &['\u6b9f']),
-        ('\U0002f8f5', &['\u6bba']), ('\U0002f8f6', &['\u6bbb']), ('\U0002f8f7', &['\U00023a8d']),
-        ('\U0002f8f8', &['\U00021d0b']), ('\U0002f8f9', &['\U00023afa']), ('\U0002f8fa',
-        &['\u6c4e']), ('\U0002f8fb', &['\U00023cbc']), ('\U0002f8fc', &['\u6cbf']), ('\U0002f8fd',
-        &['\u6ccd']), ('\U0002f8fe', &['\u6c67']), ('\U0002f8ff', &['\u6d16']), ('\U0002f900',
-        &['\u6d3e']), ('\U0002f901', &['\u6d77']), ('\U0002f902', &['\u6d41']), ('\U0002f903',
-        &['\u6d69']), ('\U0002f904', &['\u6d78']), ('\U0002f905', &['\u6d85']), ('\U0002f906',
-        &['\U00023d1e']), ('\U0002f907', &['\u6d34']), ('\U0002f908', &['\u6e2f']), ('\U0002f909',
-        &['\u6e6e']), ('\U0002f90a', &['\u3d33']), ('\U0002f90b', &['\u6ecb']), ('\U0002f90c',
-        &['\u6ec7']), ('\U0002f90d', &['\U00023ed1']), ('\U0002f90e', &['\u6df9']), ('\U0002f90f',
-        &['\u6f6e']), ('\U0002f910', &['\U00023f5e']), ('\U0002f911', &['\U00023f8e']),
-        ('\U0002f912', &['\u6fc6']), ('\U0002f913', &['\u7039']), ('\U0002f914', &['\u701e']),
-        ('\U0002f915', &['\u701b']), ('\U0002f916', &['\u3d96']), ('\U0002f917', &['\u704a']),
-        ('\U0002f918', &['\u707d']), ('\U0002f919', &['\u7077']), ('\U0002f91a', &['\u70ad']),
-        ('\U0002f91b', &['\U00020525']), ('\U0002f91c', &['\u7145']), ('\U0002f91d',
-        &['\U00024263']), ('\U0002f91e', &['\u719c']), ('\U0002f91f', &['\U000243ab']),
-        ('\U0002f920', &['\u7228']), ('\U0002f921', &['\u7235']), ('\U0002f922', &['\u7250']),
-        ('\U0002f923', &['\U00024608']), ('\U0002f924', &['\u7280']), ('\U0002f925', &['\u7295']),
-        ('\U0002f926', &['\U00024735']), ('\U0002f927', &['\U00024814']), ('\U0002f928',
-        &['\u737a']), ('\U0002f929', &['\u738b']), ('\U0002f92a', &['\u3eac']), ('\U0002f92b',
-        &['\u73a5']), ('\U0002f92c', &['\u3eb8']), ('\U0002f92d', &['\u3eb8']), ('\U0002f92e',
-        &['\u7447']), ('\U0002f92f', &['\u745c']), ('\U0002f930', &['\u7471']), ('\U0002f931',
-        &['\u7485']), ('\U0002f932', &['\u74ca']), ('\U0002f933', &['\u3f1b']), ('\U0002f934',
-        &['\u7524']), ('\U0002f935', &['\U00024c36']), ('\U0002f936', &['\u753e']), ('\U0002f937',
-        &['\U00024c92']), ('\U0002f938', &['\u7570']), ('\U0002f939', &['\U0002219f']),
-        ('\U0002f93a', &['\u7610']), ('\U0002f93b', &['\U00024fa1']), ('\U0002f93c',
-        &['\U00024fb8']), ('\U0002f93d', &['\U00025044']), ('\U0002f93e', &['\u3ffc']),
-        ('\U0002f93f', &['\u4008']), ('\U0002f940', &['\u76f4']), ('\U0002f941', &['\U000250f3']),
-        ('\U0002f942', &['\U000250f2']), ('\U0002f943', &['\U00025119']), ('\U0002f944',
-        &['\U00025133']), ('\U0002f945', &['\u771e']), ('\U0002f946', &['\u771f']), ('\U0002f947',
-        &['\u771f']), ('\U0002f948', &['\u774a']), ('\U0002f949', &['\u4039']), ('\U0002f94a',
-        &['\u778b']), ('\U0002f94b', &['\u4046']), ('\U0002f94c', &['\u4096']), ('\U0002f94d',
-        &['\U0002541d']), ('\U0002f94e', &['\u784e']), ('\U0002f94f', &['\u788c']), ('\U0002f950',
-        &['\u78cc']), ('\U0002f951', &['\u40e3']), ('\U0002f952', &['\U00025626']), ('\U0002f953',
-        &['\u7956']), ('\U0002f954', &['\U0002569a']), ('\U0002f955', &['\U000256c5']),
-        ('\U0002f956', &['\u798f']), ('\U0002f957', &['\u79eb']), ('\U0002f958', &['\u412f']),
-        ('\U0002f959', &['\u7a40']), ('\U0002f95a', &['\u7a4a']), ('\U0002f95b', &['\u7a4f']),
-        ('\U0002f95c', &['\U0002597c']), ('\U0002f95d', &['\U00025aa7']), ('\U0002f95e',
-        &['\U00025aa7']), ('\U0002f95f', &['\u7aee']), ('\U0002f960', &['\u4202']), ('\U0002f961',
-        &['\U00025bab']), ('\U0002f962', &['\u7bc6']), ('\U0002f963', &['\u7bc9']), ('\U0002f964',
-        &['\u4227']), ('\U0002f965', &['\U00025c80']), ('\U0002f966', &['\u7cd2']), ('\U0002f967',
-        &['\u42a0']), ('\U0002f968', &['\u7ce8']), ('\U0002f969', &['\u7ce3']), ('\U0002f96a',
-        &['\u7d00']), ('\U0002f96b', &['\U00025f86']), ('\U0002f96c', &['\u7d63']), ('\U0002f96d',
-        &['\u4301']), ('\U0002f96e', &['\u7dc7']), ('\U0002f96f', &['\u7e02']), ('\U0002f970',
-        &['\u7e45']), ('\U0002f971', &['\u4334']), ('\U0002f972', &['\U00026228']), ('\U0002f973',
-        &['\U00026247']), ('\U0002f974', &['\u4359']), ('\U0002f975', &['\U000262d9']),
-        ('\U0002f976', &['\u7f7a']), ('\U0002f977', &['\U0002633e']), ('\U0002f978', &['\u7f95']),
-        ('\U0002f979', &['\u7ffa']), ('\U0002f97a', &['\u8005']), ('\U0002f97b', &['\U000264da']),
-        ('\U0002f97c', &['\U00026523']), ('\U0002f97d', &['\u8060']), ('\U0002f97e',
-        &['\U000265a8']), ('\U0002f97f', &['\u8070']), ('\U0002f980', &['\U0002335f']),
-        ('\U0002f981', &['\u43d5']), ('\U0002f982', &['\u80b2']), ('\U0002f983', &['\u8103']),
-        ('\U0002f984', &['\u440b']), ('\U0002f985', &['\u813e']), ('\U0002f986', &['\u5ab5']),
-        ('\U0002f987', &['\U000267a7']), ('\U0002f988', &['\U000267b5']), ('\U0002f989',
-        &['\U00023393']), ('\U0002f98a', &['\U0002339c']), ('\U0002f98b', &['\u8201']),
-        ('\U0002f98c', &['\u8204']), ('\U0002f98d', &['\u8f9e']), ('\U0002f98e', &['\u446b']),
-        ('\U0002f98f', &['\u8291']), ('\U0002f990', &['\u828b']), ('\U0002f991', &['\u829d']),
-        ('\U0002f992', &['\u52b3']), ('\U0002f993', &['\u82b1']), ('\U0002f994', &['\u82b3']),
-        ('\U0002f995', &['\u82bd']), ('\U0002f996', &['\u82e6']), ('\U0002f997', &['\U00026b3c']),
-        ('\U0002f998', &['\u82e5']), ('\U0002f999', &['\u831d']), ('\U0002f99a', &['\u8363']),
-        ('\U0002f99b', &['\u83ad']), ('\U0002f99c', &['\u8323']), ('\U0002f99d', &['\u83bd']),
-        ('\U0002f99e', &['\u83e7']), ('\U0002f99f', &['\u8457']), ('\U0002f9a0', &['\u8353']),
-        ('\U0002f9a1', &['\u83ca']), ('\U0002f9a2', &['\u83cc']), ('\U0002f9a3', &['\u83dc']),
-        ('\U0002f9a4', &['\U00026c36']), ('\U0002f9a5', &['\U00026d6b']), ('\U0002f9a6',
-        &['\U00026cd5']), ('\U0002f9a7', &['\u452b']), ('\U0002f9a8', &['\u84f1']), ('\U0002f9a9',
-        &['\u84f3']), ('\U0002f9aa', &['\u8516']), ('\U0002f9ab', &['\U000273ca']), ('\U0002f9ac',
-        &['\u8564']), ('\U0002f9ad', &['\U00026f2c']), ('\U0002f9ae', &['\u455d']), ('\U0002f9af',
-        &['\u4561']), ('\U0002f9b0', &['\U00026fb1']), ('\U0002f9b1', &['\U000270d2']),
-        ('\U0002f9b2', &['\u456b']), ('\U0002f9b3', &['\u8650']), ('\U0002f9b4', &['\u865c']),
-        ('\U0002f9b5', &['\u8667']), ('\U0002f9b6', &['\u8669']), ('\U0002f9b7', &['\u86a9']),
-        ('\U0002f9b8', &['\u8688']), ('\U0002f9b9', &['\u870e']), ('\U0002f9ba', &['\u86e2']),
-        ('\U0002f9bb', &['\u8779']), ('\U0002f9bc', &['\u8728']), ('\U0002f9bd', &['\u876b']),
-        ('\U0002f9be', &['\u8786']), ('\U0002f9bf', &['\u45d7']), ('\U0002f9c0', &['\u87e1']),
-        ('\U0002f9c1', &['\u8801']), ('\U0002f9c2', &['\u45f9']), ('\U0002f9c3', &['\u8860']),
-        ('\U0002f9c4', &['\u8863']), ('\U0002f9c5', &['\U00027667']), ('\U0002f9c6', &['\u88d7']),
-        ('\U0002f9c7', &['\u88de']), ('\U0002f9c8', &['\u4635']), ('\U0002f9c9', &['\u88fa']),
-        ('\U0002f9ca', &['\u34bb']), ('\U0002f9cb', &['\U000278ae']), ('\U0002f9cc',
-        &['\U00027966']), ('\U0002f9cd', &['\u46be']), ('\U0002f9ce', &['\u46c7']), ('\U0002f9cf',
-        &['\u8aa0']), ('\U0002f9d0', &['\u8aed']), ('\U0002f9d1', &['\u8b8a']), ('\U0002f9d2',
-        &['\u8c55']), ('\U0002f9d3', &['\U00027ca8']), ('\U0002f9d4', &['\u8cab']), ('\U0002f9d5',
-        &['\u8cc1']), ('\U0002f9d6', &['\u8d1b']), ('\U0002f9d7', &['\u8d77']), ('\U0002f9d8',
-        &['\U00027f2f']), ('\U0002f9d9', &['\U00020804']), ('\U0002f9da', &['\u8dcb']),
-        ('\U0002f9db', &['\u8dbc']), ('\U0002f9dc', &['\u8df0']), ('\U0002f9dd', &['\U000208de']),
-        ('\U0002f9de', &['\u8ed4']), ('\U0002f9df', &['\u8f38']), ('\U0002f9e0', &['\U000285d2']),
-        ('\U0002f9e1', &['\U000285ed']), ('\U0002f9e2', &['\u9094']), ('\U0002f9e3', &['\u90f1']),
-        ('\U0002f9e4', &['\u9111']), ('\U0002f9e5', &['\U0002872e']), ('\U0002f9e6', &['\u911b']),
-        ('\U0002f9e7', &['\u9238']), ('\U0002f9e8', &['\u92d7']), ('\U0002f9e9', &['\u92d8']),
-        ('\U0002f9ea', &['\u927c']), ('\U0002f9eb', &['\u93f9']), ('\U0002f9ec', &['\u9415']),
-        ('\U0002f9ed', &['\U00028bfa']), ('\U0002f9ee', &['\u958b']), ('\U0002f9ef', &['\u4995']),
-        ('\U0002f9f0', &['\u95b7']), ('\U0002f9f1', &['\U00028d77']), ('\U0002f9f2', &['\u49e6']),
-        ('\U0002f9f3', &['\u96c3']), ('\U0002f9f4', &['\u5db2']), ('\U0002f9f5', &['\u9723']),
-        ('\U0002f9f6', &['\U00029145']), ('\U0002f9f7', &['\U0002921a']), ('\U0002f9f8',
-        &['\u4a6e']), ('\U0002f9f9', &['\u4a76']), ('\U0002f9fa', &['\u97e0']), ('\U0002f9fb',
-        &['\U0002940a']), ('\U0002f9fc', &['\u4ab2']), ('\U0002f9fd', &['\U00029496']),
-        ('\U0002f9fe', &['\u980b']), ('\U0002f9ff', &['\u980b']), ('\U0002fa00', &['\u9829']),
-        ('\U0002fa01', &['\U000295b6']), ('\U0002fa02', &['\u98e2']), ('\U0002fa03', &['\u4b33']),
-        ('\U0002fa04', &['\u9929']), ('\U0002fa05', &['\u99a7']), ('\U0002fa06', &['\u99c2']),
-        ('\U0002fa07', &['\u99fe']), ('\U0002fa08', &['\u4bce']), ('\U0002fa09', &['\U00029b30']),
-        ('\U0002fa0a', &['\u9b12']), ('\U0002fa0b', &['\u9c40']), ('\U0002fa0c', &['\u9cfd']),
-        ('\U0002fa0d', &['\u4cce']), ('\U0002fa0e', &['\u4ced']), ('\U0002fa0f', &['\u9d67']),
-        ('\U0002fa10', &['\U0002a0ce']), ('\U0002fa11', &['\u4cf8']), ('\U0002fa12',
-        &['\U0002a105']), ('\U0002fa13', &['\U0002a20e']), ('\U0002fa14', &['\U0002a291']),
-        ('\U0002fa15', &['\u9ebb']), ('\U0002fa16', &['\u4d56']), ('\U0002fa17', &['\u9ef9']),
-        ('\U0002fa18', &['\u9efe']), ('\U0002fa19', &['\u9f05']), ('\U0002fa1a', &['\u9f0f']),
-        ('\U0002fa1b', &['\u9f16']), ('\U0002fa1c', &['\u9f3b']), ('\U0002fa1d', &['\U0002a600'])
+        ('\u{c0}', &['\u{41}', '\u{300}']), ('\u{c1}', &['\u{41}', '\u{301}']), ('\u{c2}',
+        &['\u{41}', '\u{302}']), ('\u{c3}', &['\u{41}', '\u{303}']), ('\u{c4}', &['\u{41}',
+        '\u{308}']), ('\u{c5}', &['\u{41}', '\u{30a}']), ('\u{c7}', &['\u{43}', '\u{327}']),
+        ('\u{c8}', &['\u{45}', '\u{300}']), ('\u{c9}', &['\u{45}', '\u{301}']), ('\u{ca}',
+        &['\u{45}', '\u{302}']), ('\u{cb}', &['\u{45}', '\u{308}']), ('\u{cc}', &['\u{49}',
+        '\u{300}']), ('\u{cd}', &['\u{49}', '\u{301}']), ('\u{ce}', &['\u{49}', '\u{302}']),
+        ('\u{cf}', &['\u{49}', '\u{308}']), ('\u{d1}', &['\u{4e}', '\u{303}']), ('\u{d2}',
+        &['\u{4f}', '\u{300}']), ('\u{d3}', &['\u{4f}', '\u{301}']), ('\u{d4}', &['\u{4f}',
+        '\u{302}']), ('\u{d5}', &['\u{4f}', '\u{303}']), ('\u{d6}', &['\u{4f}', '\u{308}']),
+        ('\u{d9}', &['\u{55}', '\u{300}']), ('\u{da}', &['\u{55}', '\u{301}']), ('\u{db}',
+        &['\u{55}', '\u{302}']), ('\u{dc}', &['\u{55}', '\u{308}']), ('\u{dd}', &['\u{59}',
+        '\u{301}']), ('\u{e0}', &['\u{61}', '\u{300}']), ('\u{e1}', &['\u{61}', '\u{301}']),
+        ('\u{e2}', &['\u{61}', '\u{302}']), ('\u{e3}', &['\u{61}', '\u{303}']), ('\u{e4}',
+        &['\u{61}', '\u{308}']), ('\u{e5}', &['\u{61}', '\u{30a}']), ('\u{e7}', &['\u{63}',
+        '\u{327}']), ('\u{e8}', &['\u{65}', '\u{300}']), ('\u{e9}', &['\u{65}', '\u{301}']),
+        ('\u{ea}', &['\u{65}', '\u{302}']), ('\u{eb}', &['\u{65}', '\u{308}']), ('\u{ec}',
+        &['\u{69}', '\u{300}']), ('\u{ed}', &['\u{69}', '\u{301}']), ('\u{ee}', &['\u{69}',
+        '\u{302}']), ('\u{ef}', &['\u{69}', '\u{308}']), ('\u{f1}', &['\u{6e}', '\u{303}']),
+        ('\u{f2}', &['\u{6f}', '\u{300}']), ('\u{f3}', &['\u{6f}', '\u{301}']), ('\u{f4}',
+        &['\u{6f}', '\u{302}']), ('\u{f5}', &['\u{6f}', '\u{303}']), ('\u{f6}', &['\u{6f}',
+        '\u{308}']), ('\u{f9}', &['\u{75}', '\u{300}']), ('\u{fa}', &['\u{75}', '\u{301}']),
+        ('\u{fb}', &['\u{75}', '\u{302}']), ('\u{fc}', &['\u{75}', '\u{308}']), ('\u{fd}',
+        &['\u{79}', '\u{301}']), ('\u{ff}', &['\u{79}', '\u{308}']), ('\u{100}', &['\u{41}',
+        '\u{304}']), ('\u{101}', &['\u{61}', '\u{304}']), ('\u{102}', &['\u{41}', '\u{306}']),
+        ('\u{103}', &['\u{61}', '\u{306}']), ('\u{104}', &['\u{41}', '\u{328}']), ('\u{105}',
+        &['\u{61}', '\u{328}']), ('\u{106}', &['\u{43}', '\u{301}']), ('\u{107}', &['\u{63}',
+        '\u{301}']), ('\u{108}', &['\u{43}', '\u{302}']), ('\u{109}', &['\u{63}', '\u{302}']),
+        ('\u{10a}', &['\u{43}', '\u{307}']), ('\u{10b}', &['\u{63}', '\u{307}']), ('\u{10c}',
+        &['\u{43}', '\u{30c}']), ('\u{10d}', &['\u{63}', '\u{30c}']), ('\u{10e}', &['\u{44}',
+        '\u{30c}']), ('\u{10f}', &['\u{64}', '\u{30c}']), ('\u{112}', &['\u{45}', '\u{304}']),
+        ('\u{113}', &['\u{65}', '\u{304}']), ('\u{114}', &['\u{45}', '\u{306}']), ('\u{115}',
+        &['\u{65}', '\u{306}']), ('\u{116}', &['\u{45}', '\u{307}']), ('\u{117}', &['\u{65}',
+        '\u{307}']), ('\u{118}', &['\u{45}', '\u{328}']), ('\u{119}', &['\u{65}', '\u{328}']),
+        ('\u{11a}', &['\u{45}', '\u{30c}']), ('\u{11b}', &['\u{65}', '\u{30c}']), ('\u{11c}',
+        &['\u{47}', '\u{302}']), ('\u{11d}', &['\u{67}', '\u{302}']), ('\u{11e}', &['\u{47}',
+        '\u{306}']), ('\u{11f}', &['\u{67}', '\u{306}']), ('\u{120}', &['\u{47}', '\u{307}']),
+        ('\u{121}', &['\u{67}', '\u{307}']), ('\u{122}', &['\u{47}', '\u{327}']), ('\u{123}',
+        &['\u{67}', '\u{327}']), ('\u{124}', &['\u{48}', '\u{302}']), ('\u{125}', &['\u{68}',
+        '\u{302}']), ('\u{128}', &['\u{49}', '\u{303}']), ('\u{129}', &['\u{69}', '\u{303}']),
+        ('\u{12a}', &['\u{49}', '\u{304}']), ('\u{12b}', &['\u{69}', '\u{304}']), ('\u{12c}',
+        &['\u{49}', '\u{306}']), ('\u{12d}', &['\u{69}', '\u{306}']), ('\u{12e}', &['\u{49}',
+        '\u{328}']), ('\u{12f}', &['\u{69}', '\u{328}']), ('\u{130}', &['\u{49}', '\u{307}']),
+        ('\u{134}', &['\u{4a}', '\u{302}']), ('\u{135}', &['\u{6a}', '\u{302}']), ('\u{136}',
+        &['\u{4b}', '\u{327}']), ('\u{137}', &['\u{6b}', '\u{327}']), ('\u{139}', &['\u{4c}',
+        '\u{301}']), ('\u{13a}', &['\u{6c}', '\u{301}']), ('\u{13b}', &['\u{4c}', '\u{327}']),
+        ('\u{13c}', &['\u{6c}', '\u{327}']), ('\u{13d}', &['\u{4c}', '\u{30c}']), ('\u{13e}',
+        &['\u{6c}', '\u{30c}']), ('\u{143}', &['\u{4e}', '\u{301}']), ('\u{144}', &['\u{6e}',
+        '\u{301}']), ('\u{145}', &['\u{4e}', '\u{327}']), ('\u{146}', &['\u{6e}', '\u{327}']),
+        ('\u{147}', &['\u{4e}', '\u{30c}']), ('\u{148}', &['\u{6e}', '\u{30c}']), ('\u{14c}',
+        &['\u{4f}', '\u{304}']), ('\u{14d}', &['\u{6f}', '\u{304}']), ('\u{14e}', &['\u{4f}',
+        '\u{306}']), ('\u{14f}', &['\u{6f}', '\u{306}']), ('\u{150}', &['\u{4f}', '\u{30b}']),
+        ('\u{151}', &['\u{6f}', '\u{30b}']), ('\u{154}', &['\u{52}', '\u{301}']), ('\u{155}',
+        &['\u{72}', '\u{301}']), ('\u{156}', &['\u{52}', '\u{327}']), ('\u{157}', &['\u{72}',
+        '\u{327}']), ('\u{158}', &['\u{52}', '\u{30c}']), ('\u{159}', &['\u{72}', '\u{30c}']),
+        ('\u{15a}', &['\u{53}', '\u{301}']), ('\u{15b}', &['\u{73}', '\u{301}']), ('\u{15c}',
+        &['\u{53}', '\u{302}']), ('\u{15d}', &['\u{73}', '\u{302}']), ('\u{15e}', &['\u{53}',
+        '\u{327}']), ('\u{15f}', &['\u{73}', '\u{327}']), ('\u{160}', &['\u{53}', '\u{30c}']),
+        ('\u{161}', &['\u{73}', '\u{30c}']), ('\u{162}', &['\u{54}', '\u{327}']), ('\u{163}',
+        &['\u{74}', '\u{327}']), ('\u{164}', &['\u{54}', '\u{30c}']), ('\u{165}', &['\u{74}',
+        '\u{30c}']), ('\u{168}', &['\u{55}', '\u{303}']), ('\u{169}', &['\u{75}', '\u{303}']),
+        ('\u{16a}', &['\u{55}', '\u{304}']), ('\u{16b}', &['\u{75}', '\u{304}']), ('\u{16c}',
+        &['\u{55}', '\u{306}']), ('\u{16d}', &['\u{75}', '\u{306}']), ('\u{16e}', &['\u{55}',
+        '\u{30a}']), ('\u{16f}', &['\u{75}', '\u{30a}']), ('\u{170}', &['\u{55}', '\u{30b}']),
+        ('\u{171}', &['\u{75}', '\u{30b}']), ('\u{172}', &['\u{55}', '\u{328}']), ('\u{173}',
+        &['\u{75}', '\u{328}']), ('\u{174}', &['\u{57}', '\u{302}']), ('\u{175}', &['\u{77}',
+        '\u{302}']), ('\u{176}', &['\u{59}', '\u{302}']), ('\u{177}', &['\u{79}', '\u{302}']),
+        ('\u{178}', &['\u{59}', '\u{308}']), ('\u{179}', &['\u{5a}', '\u{301}']), ('\u{17a}',
+        &['\u{7a}', '\u{301}']), ('\u{17b}', &['\u{5a}', '\u{307}']), ('\u{17c}', &['\u{7a}',
+        '\u{307}']), ('\u{17d}', &['\u{5a}', '\u{30c}']), ('\u{17e}', &['\u{7a}', '\u{30c}']),
+        ('\u{1a0}', &['\u{4f}', '\u{31b}']), ('\u{1a1}', &['\u{6f}', '\u{31b}']), ('\u{1af}',
+        &['\u{55}', '\u{31b}']), ('\u{1b0}', &['\u{75}', '\u{31b}']), ('\u{1cd}', &['\u{41}',
+        '\u{30c}']), ('\u{1ce}', &['\u{61}', '\u{30c}']), ('\u{1cf}', &['\u{49}', '\u{30c}']),
+        ('\u{1d0}', &['\u{69}', '\u{30c}']), ('\u{1d1}', &['\u{4f}', '\u{30c}']), ('\u{1d2}',
+        &['\u{6f}', '\u{30c}']), ('\u{1d3}', &['\u{55}', '\u{30c}']), ('\u{1d4}', &['\u{75}',
+        '\u{30c}']), ('\u{1d5}', &['\u{dc}', '\u{304}']), ('\u{1d6}', &['\u{fc}', '\u{304}']),
+        ('\u{1d7}', &['\u{dc}', '\u{301}']), ('\u{1d8}', &['\u{fc}', '\u{301}']), ('\u{1d9}',
+        &['\u{dc}', '\u{30c}']), ('\u{1da}', &['\u{fc}', '\u{30c}']), ('\u{1db}', &['\u{dc}',
+        '\u{300}']), ('\u{1dc}', &['\u{fc}', '\u{300}']), ('\u{1de}', &['\u{c4}', '\u{304}']),
+        ('\u{1df}', &['\u{e4}', '\u{304}']), ('\u{1e0}', &['\u{226}', '\u{304}']), ('\u{1e1}',
+        &['\u{227}', '\u{304}']), ('\u{1e2}', &['\u{c6}', '\u{304}']), ('\u{1e3}', &['\u{e6}',
+        '\u{304}']), ('\u{1e6}', &['\u{47}', '\u{30c}']), ('\u{1e7}', &['\u{67}', '\u{30c}']),
+        ('\u{1e8}', &['\u{4b}', '\u{30c}']), ('\u{1e9}', &['\u{6b}', '\u{30c}']), ('\u{1ea}',
+        &['\u{4f}', '\u{328}']), ('\u{1eb}', &['\u{6f}', '\u{328}']), ('\u{1ec}', &['\u{1ea}',
+        '\u{304}']), ('\u{1ed}', &['\u{1eb}', '\u{304}']), ('\u{1ee}', &['\u{1b7}', '\u{30c}']),
+        ('\u{1ef}', &['\u{292}', '\u{30c}']), ('\u{1f0}', &['\u{6a}', '\u{30c}']), ('\u{1f4}',
+        &['\u{47}', '\u{301}']), ('\u{1f5}', &['\u{67}', '\u{301}']), ('\u{1f8}', &['\u{4e}',
+        '\u{300}']), ('\u{1f9}', &['\u{6e}', '\u{300}']), ('\u{1fa}', &['\u{c5}', '\u{301}']),
+        ('\u{1fb}', &['\u{e5}', '\u{301}']), ('\u{1fc}', &['\u{c6}', '\u{301}']), ('\u{1fd}',
+        &['\u{e6}', '\u{301}']), ('\u{1fe}', &['\u{d8}', '\u{301}']), ('\u{1ff}', &['\u{f8}',
+        '\u{301}']), ('\u{200}', &['\u{41}', '\u{30f}']), ('\u{201}', &['\u{61}', '\u{30f}']),
+        ('\u{202}', &['\u{41}', '\u{311}']), ('\u{203}', &['\u{61}', '\u{311}']), ('\u{204}',
+        &['\u{45}', '\u{30f}']), ('\u{205}', &['\u{65}', '\u{30f}']), ('\u{206}', &['\u{45}',
+        '\u{311}']), ('\u{207}', &['\u{65}', '\u{311}']), ('\u{208}', &['\u{49}', '\u{30f}']),
+        ('\u{209}', &['\u{69}', '\u{30f}']), ('\u{20a}', &['\u{49}', '\u{311}']), ('\u{20b}',
+        &['\u{69}', '\u{311}']), ('\u{20c}', &['\u{4f}', '\u{30f}']), ('\u{20d}', &['\u{6f}',
+        '\u{30f}']), ('\u{20e}', &['\u{4f}', '\u{311}']), ('\u{20f}', &['\u{6f}', '\u{311}']),
+        ('\u{210}', &['\u{52}', '\u{30f}']), ('\u{211}', &['\u{72}', '\u{30f}']), ('\u{212}',
+        &['\u{52}', '\u{311}']), ('\u{213}', &['\u{72}', '\u{311}']), ('\u{214}', &['\u{55}',
+        '\u{30f}']), ('\u{215}', &['\u{75}', '\u{30f}']), ('\u{216}', &['\u{55}', '\u{311}']),
+        ('\u{217}', &['\u{75}', '\u{311}']), ('\u{218}', &['\u{53}', '\u{326}']), ('\u{219}',
+        &['\u{73}', '\u{326}']), ('\u{21a}', &['\u{54}', '\u{326}']), ('\u{21b}', &['\u{74}',
+        '\u{326}']), ('\u{21e}', &['\u{48}', '\u{30c}']), ('\u{21f}', &['\u{68}', '\u{30c}']),
+        ('\u{226}', &['\u{41}', '\u{307}']), ('\u{227}', &['\u{61}', '\u{307}']), ('\u{228}',
+        &['\u{45}', '\u{327}']), ('\u{229}', &['\u{65}', '\u{327}']), ('\u{22a}', &['\u{d6}',
+        '\u{304}']), ('\u{22b}', &['\u{f6}', '\u{304}']), ('\u{22c}', &['\u{d5}', '\u{304}']),
+        ('\u{22d}', &['\u{f5}', '\u{304}']), ('\u{22e}', &['\u{4f}', '\u{307}']), ('\u{22f}',
+        &['\u{6f}', '\u{307}']), ('\u{230}', &['\u{22e}', '\u{304}']), ('\u{231}', &['\u{22f}',
+        '\u{304}']), ('\u{232}', &['\u{59}', '\u{304}']), ('\u{233}', &['\u{79}', '\u{304}']),
+        ('\u{340}', &['\u{300}']), ('\u{341}', &['\u{301}']), ('\u{343}', &['\u{313}']), ('\u{344}',
+        &['\u{308}', '\u{301}']), ('\u{374}', &['\u{2b9}']), ('\u{37e}', &['\u{3b}']), ('\u{385}',
+        &['\u{a8}', '\u{301}']), ('\u{386}', &['\u{391}', '\u{301}']), ('\u{387}', &['\u{b7}']),
+        ('\u{388}', &['\u{395}', '\u{301}']), ('\u{389}', &['\u{397}', '\u{301}']), ('\u{38a}',
+        &['\u{399}', '\u{301}']), ('\u{38c}', &['\u{39f}', '\u{301}']), ('\u{38e}', &['\u{3a5}',
+        '\u{301}']), ('\u{38f}', &['\u{3a9}', '\u{301}']), ('\u{390}', &['\u{3ca}', '\u{301}']),
+        ('\u{3aa}', &['\u{399}', '\u{308}']), ('\u{3ab}', &['\u{3a5}', '\u{308}']), ('\u{3ac}',
+        &['\u{3b1}', '\u{301}']), ('\u{3ad}', &['\u{3b5}', '\u{301}']), ('\u{3ae}', &['\u{3b7}',
+        '\u{301}']), ('\u{3af}', &['\u{3b9}', '\u{301}']), ('\u{3b0}', &['\u{3cb}', '\u{301}']),
+        ('\u{3ca}', &['\u{3b9}', '\u{308}']), ('\u{3cb}', &['\u{3c5}', '\u{308}']), ('\u{3cc}',
+        &['\u{3bf}', '\u{301}']), ('\u{3cd}', &['\u{3c5}', '\u{301}']), ('\u{3ce}', &['\u{3c9}',
+        '\u{301}']), ('\u{3d3}', &['\u{3d2}', '\u{301}']), ('\u{3d4}', &['\u{3d2}', '\u{308}']),
+        ('\u{400}', &['\u{415}', '\u{300}']), ('\u{401}', &['\u{415}', '\u{308}']), ('\u{403}',
+        &['\u{413}', '\u{301}']), ('\u{407}', &['\u{406}', '\u{308}']), ('\u{40c}', &['\u{41a}',
+        '\u{301}']), ('\u{40d}', &['\u{418}', '\u{300}']), ('\u{40e}', &['\u{423}', '\u{306}']),
+        ('\u{419}', &['\u{418}', '\u{306}']), ('\u{439}', &['\u{438}', '\u{306}']), ('\u{450}',
+        &['\u{435}', '\u{300}']), ('\u{451}', &['\u{435}', '\u{308}']), ('\u{453}', &['\u{433}',
+        '\u{301}']), ('\u{457}', &['\u{456}', '\u{308}']), ('\u{45c}', &['\u{43a}', '\u{301}']),
+        ('\u{45d}', &['\u{438}', '\u{300}']), ('\u{45e}', &['\u{443}', '\u{306}']), ('\u{476}',
+        &['\u{474}', '\u{30f}']), ('\u{477}', &['\u{475}', '\u{30f}']), ('\u{4c1}', &['\u{416}',
+        '\u{306}']), ('\u{4c2}', &['\u{436}', '\u{306}']), ('\u{4d0}', &['\u{410}', '\u{306}']),
+        ('\u{4d1}', &['\u{430}', '\u{306}']), ('\u{4d2}', &['\u{410}', '\u{308}']), ('\u{4d3}',
+        &['\u{430}', '\u{308}']), ('\u{4d6}', &['\u{415}', '\u{306}']), ('\u{4d7}', &['\u{435}',
+        '\u{306}']), ('\u{4da}', &['\u{4d8}', '\u{308}']), ('\u{4db}', &['\u{4d9}', '\u{308}']),
+        ('\u{4dc}', &['\u{416}', '\u{308}']), ('\u{4dd}', &['\u{436}', '\u{308}']), ('\u{4de}',
+        &['\u{417}', '\u{308}']), ('\u{4df}', &['\u{437}', '\u{308}']), ('\u{4e2}', &['\u{418}',
+        '\u{304}']), ('\u{4e3}', &['\u{438}', '\u{304}']), ('\u{4e4}', &['\u{418}', '\u{308}']),
+        ('\u{4e5}', &['\u{438}', '\u{308}']), ('\u{4e6}', &['\u{41e}', '\u{308}']), ('\u{4e7}',
+        &['\u{43e}', '\u{308}']), ('\u{4ea}', &['\u{4e8}', '\u{308}']), ('\u{4eb}', &['\u{4e9}',
+        '\u{308}']), ('\u{4ec}', &['\u{42d}', '\u{308}']), ('\u{4ed}', &['\u{44d}', '\u{308}']),
+        ('\u{4ee}', &['\u{423}', '\u{304}']), ('\u{4ef}', &['\u{443}', '\u{304}']), ('\u{4f0}',
+        &['\u{423}', '\u{308}']), ('\u{4f1}', &['\u{443}', '\u{308}']), ('\u{4f2}', &['\u{423}',
+        '\u{30b}']), ('\u{4f3}', &['\u{443}', '\u{30b}']), ('\u{4f4}', &['\u{427}', '\u{308}']),
+        ('\u{4f5}', &['\u{447}', '\u{308}']), ('\u{4f8}', &['\u{42b}', '\u{308}']), ('\u{4f9}',
+        &['\u{44b}', '\u{308}']), ('\u{622}', &['\u{627}', '\u{653}']), ('\u{623}', &['\u{627}',
+        '\u{654}']), ('\u{624}', &['\u{648}', '\u{654}']), ('\u{625}', &['\u{627}', '\u{655}']),
+        ('\u{626}', &['\u{64a}', '\u{654}']), ('\u{6c0}', &['\u{6d5}', '\u{654}']), ('\u{6c2}',
+        &['\u{6c1}', '\u{654}']), ('\u{6d3}', &['\u{6d2}', '\u{654}']), ('\u{929}', &['\u{928}',
+        '\u{93c}']), ('\u{931}', &['\u{930}', '\u{93c}']), ('\u{934}', &['\u{933}', '\u{93c}']),
+        ('\u{958}', &['\u{915}', '\u{93c}']), ('\u{959}', &['\u{916}', '\u{93c}']), ('\u{95a}',
+        &['\u{917}', '\u{93c}']), ('\u{95b}', &['\u{91c}', '\u{93c}']), ('\u{95c}', &['\u{921}',
+        '\u{93c}']), ('\u{95d}', &['\u{922}', '\u{93c}']), ('\u{95e}', &['\u{92b}', '\u{93c}']),
+        ('\u{95f}', &['\u{92f}', '\u{93c}']), ('\u{9cb}', &['\u{9c7}', '\u{9be}']), ('\u{9cc}',
+        &['\u{9c7}', '\u{9d7}']), ('\u{9dc}', &['\u{9a1}', '\u{9bc}']), ('\u{9dd}', &['\u{9a2}',
+        '\u{9bc}']), ('\u{9df}', &['\u{9af}', '\u{9bc}']), ('\u{a33}', &['\u{a32}', '\u{a3c}']),
+        ('\u{a36}', &['\u{a38}', '\u{a3c}']), ('\u{a59}', &['\u{a16}', '\u{a3c}']), ('\u{a5a}',
+        &['\u{a17}', '\u{a3c}']), ('\u{a5b}', &['\u{a1c}', '\u{a3c}']), ('\u{a5e}', &['\u{a2b}',
+        '\u{a3c}']), ('\u{b48}', &['\u{b47}', '\u{b56}']), ('\u{b4b}', &['\u{b47}', '\u{b3e}']),
+        ('\u{b4c}', &['\u{b47}', '\u{b57}']), ('\u{b5c}', &['\u{b21}', '\u{b3c}']), ('\u{b5d}',
+        &['\u{b22}', '\u{b3c}']), ('\u{b94}', &['\u{b92}', '\u{bd7}']), ('\u{bca}', &['\u{bc6}',
+        '\u{bbe}']), ('\u{bcb}', &['\u{bc7}', '\u{bbe}']), ('\u{bcc}', &['\u{bc6}', '\u{bd7}']),
+        ('\u{c48}', &['\u{c46}', '\u{c56}']), ('\u{cc0}', &['\u{cbf}', '\u{cd5}']), ('\u{cc7}',
+        &['\u{cc6}', '\u{cd5}']), ('\u{cc8}', &['\u{cc6}', '\u{cd6}']), ('\u{cca}', &['\u{cc6}',
+        '\u{cc2}']), ('\u{ccb}', &['\u{cca}', '\u{cd5}']), ('\u{d4a}', &['\u{d46}', '\u{d3e}']),
+        ('\u{d4b}', &['\u{d47}', '\u{d3e}']), ('\u{d4c}', &['\u{d46}', '\u{d57}']), ('\u{dda}',
+        &['\u{dd9}', '\u{dca}']), ('\u{ddc}', &['\u{dd9}', '\u{dcf}']), ('\u{ddd}', &['\u{ddc}',
+        '\u{dca}']), ('\u{dde}', &['\u{dd9}', '\u{ddf}']), ('\u{f43}', &['\u{f42}', '\u{fb7}']),
+        ('\u{f4d}', &['\u{f4c}', '\u{fb7}']), ('\u{f52}', &['\u{f51}', '\u{fb7}']), ('\u{f57}',
+        &['\u{f56}', '\u{fb7}']), ('\u{f5c}', &['\u{f5b}', '\u{fb7}']), ('\u{f69}', &['\u{f40}',
+        '\u{fb5}']), ('\u{f73}', &['\u{f71}', '\u{f72}']), ('\u{f75}', &['\u{f71}', '\u{f74}']),
+        ('\u{f76}', &['\u{fb2}', '\u{f80}']), ('\u{f78}', &['\u{fb3}', '\u{f80}']), ('\u{f81}',
+        &['\u{f71}', '\u{f80}']), ('\u{f93}', &['\u{f92}', '\u{fb7}']), ('\u{f9d}', &['\u{f9c}',
+        '\u{fb7}']), ('\u{fa2}', &['\u{fa1}', '\u{fb7}']), ('\u{fa7}', &['\u{fa6}', '\u{fb7}']),
+        ('\u{fac}', &['\u{fab}', '\u{fb7}']), ('\u{fb9}', &['\u{f90}', '\u{fb5}']), ('\u{1026}',
+        &['\u{1025}', '\u{102e}']), ('\u{1b06}', &['\u{1b05}', '\u{1b35}']), ('\u{1b08}',
+        &['\u{1b07}', '\u{1b35}']), ('\u{1b0a}', &['\u{1b09}', '\u{1b35}']), ('\u{1b0c}',
+        &['\u{1b0b}', '\u{1b35}']), ('\u{1b0e}', &['\u{1b0d}', '\u{1b35}']), ('\u{1b12}',
+        &['\u{1b11}', '\u{1b35}']), ('\u{1b3b}', &['\u{1b3a}', '\u{1b35}']), ('\u{1b3d}',
+        &['\u{1b3c}', '\u{1b35}']), ('\u{1b40}', &['\u{1b3e}', '\u{1b35}']), ('\u{1b41}',
+        &['\u{1b3f}', '\u{1b35}']), ('\u{1b43}', &['\u{1b42}', '\u{1b35}']), ('\u{1e00}',
+        &['\u{41}', '\u{325}']), ('\u{1e01}', &['\u{61}', '\u{325}']), ('\u{1e02}', &['\u{42}',
+        '\u{307}']), ('\u{1e03}', &['\u{62}', '\u{307}']), ('\u{1e04}', &['\u{42}', '\u{323}']),
+        ('\u{1e05}', &['\u{62}', '\u{323}']), ('\u{1e06}', &['\u{42}', '\u{331}']), ('\u{1e07}',
+        &['\u{62}', '\u{331}']), ('\u{1e08}', &['\u{c7}', '\u{301}']), ('\u{1e09}', &['\u{e7}',
+        '\u{301}']), ('\u{1e0a}', &['\u{44}', '\u{307}']), ('\u{1e0b}', &['\u{64}', '\u{307}']),
+        ('\u{1e0c}', &['\u{44}', '\u{323}']), ('\u{1e0d}', &['\u{64}', '\u{323}']), ('\u{1e0e}',
+        &['\u{44}', '\u{331}']), ('\u{1e0f}', &['\u{64}', '\u{331}']), ('\u{1e10}', &['\u{44}',
+        '\u{327}']), ('\u{1e11}', &['\u{64}', '\u{327}']), ('\u{1e12}', &['\u{44}', '\u{32d}']),
+        ('\u{1e13}', &['\u{64}', '\u{32d}']), ('\u{1e14}', &['\u{112}', '\u{300}']), ('\u{1e15}',
+        &['\u{113}', '\u{300}']), ('\u{1e16}', &['\u{112}', '\u{301}']), ('\u{1e17}', &['\u{113}',
+        '\u{301}']), ('\u{1e18}', &['\u{45}', '\u{32d}']), ('\u{1e19}', &['\u{65}', '\u{32d}']),
+        ('\u{1e1a}', &['\u{45}', '\u{330}']), ('\u{1e1b}', &['\u{65}', '\u{330}']), ('\u{1e1c}',
+        &['\u{228}', '\u{306}']), ('\u{1e1d}', &['\u{229}', '\u{306}']), ('\u{1e1e}', &['\u{46}',
+        '\u{307}']), ('\u{1e1f}', &['\u{66}', '\u{307}']), ('\u{1e20}', &['\u{47}', '\u{304}']),
+        ('\u{1e21}', &['\u{67}', '\u{304}']), ('\u{1e22}', &['\u{48}', '\u{307}']), ('\u{1e23}',
+        &['\u{68}', '\u{307}']), ('\u{1e24}', &['\u{48}', '\u{323}']), ('\u{1e25}', &['\u{68}',
+        '\u{323}']), ('\u{1e26}', &['\u{48}', '\u{308}']), ('\u{1e27}', &['\u{68}', '\u{308}']),
+        ('\u{1e28}', &['\u{48}', '\u{327}']), ('\u{1e29}', &['\u{68}', '\u{327}']), ('\u{1e2a}',
+        &['\u{48}', '\u{32e}']), ('\u{1e2b}', &['\u{68}', '\u{32e}']), ('\u{1e2c}', &['\u{49}',
+        '\u{330}']), ('\u{1e2d}', &['\u{69}', '\u{330}']), ('\u{1e2e}', &['\u{cf}', '\u{301}']),
+        ('\u{1e2f}', &['\u{ef}', '\u{301}']), ('\u{1e30}', &['\u{4b}', '\u{301}']), ('\u{1e31}',
+        &['\u{6b}', '\u{301}']), ('\u{1e32}', &['\u{4b}', '\u{323}']), ('\u{1e33}', &['\u{6b}',
+        '\u{323}']), ('\u{1e34}', &['\u{4b}', '\u{331}']), ('\u{1e35}', &['\u{6b}', '\u{331}']),
+        ('\u{1e36}', &['\u{4c}', '\u{323}']), ('\u{1e37}', &['\u{6c}', '\u{323}']), ('\u{1e38}',
+        &['\u{1e36}', '\u{304}']), ('\u{1e39}', &['\u{1e37}', '\u{304}']), ('\u{1e3a}', &['\u{4c}',
+        '\u{331}']), ('\u{1e3b}', &['\u{6c}', '\u{331}']), ('\u{1e3c}', &['\u{4c}', '\u{32d}']),
+        ('\u{1e3d}', &['\u{6c}', '\u{32d}']), ('\u{1e3e}', &['\u{4d}', '\u{301}']), ('\u{1e3f}',
+        &['\u{6d}', '\u{301}']), ('\u{1e40}', &['\u{4d}', '\u{307}']), ('\u{1e41}', &['\u{6d}',
+        '\u{307}']), ('\u{1e42}', &['\u{4d}', '\u{323}']), ('\u{1e43}', &['\u{6d}', '\u{323}']),
+        ('\u{1e44}', &['\u{4e}', '\u{307}']), ('\u{1e45}', &['\u{6e}', '\u{307}']), ('\u{1e46}',
+        &['\u{4e}', '\u{323}']), ('\u{1e47}', &['\u{6e}', '\u{323}']), ('\u{1e48}', &['\u{4e}',
+        '\u{331}']), ('\u{1e49}', &['\u{6e}', '\u{331}']), ('\u{1e4a}', &['\u{4e}', '\u{32d}']),
+        ('\u{1e4b}', &['\u{6e}', '\u{32d}']), ('\u{1e4c}', &['\u{d5}', '\u{301}']), ('\u{1e4d}',
+        &['\u{f5}', '\u{301}']), ('\u{1e4e}', &['\u{d5}', '\u{308}']), ('\u{1e4f}', &['\u{f5}',
+        '\u{308}']), ('\u{1e50}', &['\u{14c}', '\u{300}']), ('\u{1e51}', &['\u{14d}', '\u{300}']),
+        ('\u{1e52}', &['\u{14c}', '\u{301}']), ('\u{1e53}', &['\u{14d}', '\u{301}']), ('\u{1e54}',
+        &['\u{50}', '\u{301}']), ('\u{1e55}', &['\u{70}', '\u{301}']), ('\u{1e56}', &['\u{50}',
+        '\u{307}']), ('\u{1e57}', &['\u{70}', '\u{307}']), ('\u{1e58}', &['\u{52}', '\u{307}']),
+        ('\u{1e59}', &['\u{72}', '\u{307}']), ('\u{1e5a}', &['\u{52}', '\u{323}']), ('\u{1e5b}',
+        &['\u{72}', '\u{323}']), ('\u{1e5c}', &['\u{1e5a}', '\u{304}']), ('\u{1e5d}', &['\u{1e5b}',
+        '\u{304}']), ('\u{1e5e}', &['\u{52}', '\u{331}']), ('\u{1e5f}', &['\u{72}', '\u{331}']),
+        ('\u{1e60}', &['\u{53}', '\u{307}']), ('\u{1e61}', &['\u{73}', '\u{307}']), ('\u{1e62}',
+        &['\u{53}', '\u{323}']), ('\u{1e63}', &['\u{73}', '\u{323}']), ('\u{1e64}', &['\u{15a}',
+        '\u{307}']), ('\u{1e65}', &['\u{15b}', '\u{307}']), ('\u{1e66}', &['\u{160}', '\u{307}']),
+        ('\u{1e67}', &['\u{161}', '\u{307}']), ('\u{1e68}', &['\u{1e62}', '\u{307}']), ('\u{1e69}',
+        &['\u{1e63}', '\u{307}']), ('\u{1e6a}', &['\u{54}', '\u{307}']), ('\u{1e6b}', &['\u{74}',
+        '\u{307}']), ('\u{1e6c}', &['\u{54}', '\u{323}']), ('\u{1e6d}', &['\u{74}', '\u{323}']),
+        ('\u{1e6e}', &['\u{54}', '\u{331}']), ('\u{1e6f}', &['\u{74}', '\u{331}']), ('\u{1e70}',
+        &['\u{54}', '\u{32d}']), ('\u{1e71}', &['\u{74}', '\u{32d}']), ('\u{1e72}', &['\u{55}',
+        '\u{324}']), ('\u{1e73}', &['\u{75}', '\u{324}']), ('\u{1e74}', &['\u{55}', '\u{330}']),
+        ('\u{1e75}', &['\u{75}', '\u{330}']), ('\u{1e76}', &['\u{55}', '\u{32d}']), ('\u{1e77}',
+        &['\u{75}', '\u{32d}']), ('\u{1e78}', &['\u{168}', '\u{301}']), ('\u{1e79}', &['\u{169}',
+        '\u{301}']), ('\u{1e7a}', &['\u{16a}', '\u{308}']), ('\u{1e7b}', &['\u{16b}', '\u{308}']),
+        ('\u{1e7c}', &['\u{56}', '\u{303}']), ('\u{1e7d}', &['\u{76}', '\u{303}']), ('\u{1e7e}',
+        &['\u{56}', '\u{323}']), ('\u{1e7f}', &['\u{76}', '\u{323}']), ('\u{1e80}', &['\u{57}',
+        '\u{300}']), ('\u{1e81}', &['\u{77}', '\u{300}']), ('\u{1e82}', &['\u{57}', '\u{301}']),
+        ('\u{1e83}', &['\u{77}', '\u{301}']), ('\u{1e84}', &['\u{57}', '\u{308}']), ('\u{1e85}',
+        &['\u{77}', '\u{308}']), ('\u{1e86}', &['\u{57}', '\u{307}']), ('\u{1e87}', &['\u{77}',
+        '\u{307}']), ('\u{1e88}', &['\u{57}', '\u{323}']), ('\u{1e89}', &['\u{77}', '\u{323}']),
+        ('\u{1e8a}', &['\u{58}', '\u{307}']), ('\u{1e8b}', &['\u{78}', '\u{307}']), ('\u{1e8c}',
+        &['\u{58}', '\u{308}']), ('\u{1e8d}', &['\u{78}', '\u{308}']), ('\u{1e8e}', &['\u{59}',
+        '\u{307}']), ('\u{1e8f}', &['\u{79}', '\u{307}']), ('\u{1e90}', &['\u{5a}', '\u{302}']),
+        ('\u{1e91}', &['\u{7a}', '\u{302}']), ('\u{1e92}', &['\u{5a}', '\u{323}']), ('\u{1e93}',
+        &['\u{7a}', '\u{323}']), ('\u{1e94}', &['\u{5a}', '\u{331}']), ('\u{1e95}', &['\u{7a}',
+        '\u{331}']), ('\u{1e96}', &['\u{68}', '\u{331}']), ('\u{1e97}', &['\u{74}', '\u{308}']),
+        ('\u{1e98}', &['\u{77}', '\u{30a}']), ('\u{1e99}', &['\u{79}', '\u{30a}']), ('\u{1e9b}',
+        &['\u{17f}', '\u{307}']), ('\u{1ea0}', &['\u{41}', '\u{323}']), ('\u{1ea1}', &['\u{61}',
+        '\u{323}']), ('\u{1ea2}', &['\u{41}', '\u{309}']), ('\u{1ea3}', &['\u{61}', '\u{309}']),
+        ('\u{1ea4}', &['\u{c2}', '\u{301}']), ('\u{1ea5}', &['\u{e2}', '\u{301}']), ('\u{1ea6}',
+        &['\u{c2}', '\u{300}']), ('\u{1ea7}', &['\u{e2}', '\u{300}']), ('\u{1ea8}', &['\u{c2}',
+        '\u{309}']), ('\u{1ea9}', &['\u{e2}', '\u{309}']), ('\u{1eaa}', &['\u{c2}', '\u{303}']),
+        ('\u{1eab}', &['\u{e2}', '\u{303}']), ('\u{1eac}', &['\u{1ea0}', '\u{302}']), ('\u{1ead}',
+        &['\u{1ea1}', '\u{302}']), ('\u{1eae}', &['\u{102}', '\u{301}']), ('\u{1eaf}', &['\u{103}',
+        '\u{301}']), ('\u{1eb0}', &['\u{102}', '\u{300}']), ('\u{1eb1}', &['\u{103}', '\u{300}']),
+        ('\u{1eb2}', &['\u{102}', '\u{309}']), ('\u{1eb3}', &['\u{103}', '\u{309}']), ('\u{1eb4}',
+        &['\u{102}', '\u{303}']), ('\u{1eb5}', &['\u{103}', '\u{303}']), ('\u{1eb6}', &['\u{1ea0}',
+        '\u{306}']), ('\u{1eb7}', &['\u{1ea1}', '\u{306}']), ('\u{1eb8}', &['\u{45}', '\u{323}']),
+        ('\u{1eb9}', &['\u{65}', '\u{323}']), ('\u{1eba}', &['\u{45}', '\u{309}']), ('\u{1ebb}',
+        &['\u{65}', '\u{309}']), ('\u{1ebc}', &['\u{45}', '\u{303}']), ('\u{1ebd}', &['\u{65}',
+        '\u{303}']), ('\u{1ebe}', &['\u{ca}', '\u{301}']), ('\u{1ebf}', &['\u{ea}', '\u{301}']),
+        ('\u{1ec0}', &['\u{ca}', '\u{300}']), ('\u{1ec1}', &['\u{ea}', '\u{300}']), ('\u{1ec2}',
+        &['\u{ca}', '\u{309}']), ('\u{1ec3}', &['\u{ea}', '\u{309}']), ('\u{1ec4}', &['\u{ca}',
+        '\u{303}']), ('\u{1ec5}', &['\u{ea}', '\u{303}']), ('\u{1ec6}', &['\u{1eb8}', '\u{302}']),
+        ('\u{1ec7}', &['\u{1eb9}', '\u{302}']), ('\u{1ec8}', &['\u{49}', '\u{309}']), ('\u{1ec9}',
+        &['\u{69}', '\u{309}']), ('\u{1eca}', &['\u{49}', '\u{323}']), ('\u{1ecb}', &['\u{69}',
+        '\u{323}']), ('\u{1ecc}', &['\u{4f}', '\u{323}']), ('\u{1ecd}', &['\u{6f}', '\u{323}']),
+        ('\u{1ece}', &['\u{4f}', '\u{309}']), ('\u{1ecf}', &['\u{6f}', '\u{309}']), ('\u{1ed0}',
+        &['\u{d4}', '\u{301}']), ('\u{1ed1}', &['\u{f4}', '\u{301}']), ('\u{1ed2}', &['\u{d4}',
+        '\u{300}']), ('\u{1ed3}', &['\u{f4}', '\u{300}']), ('\u{1ed4}', &['\u{d4}', '\u{309}']),
+        ('\u{1ed5}', &['\u{f4}', '\u{309}']), ('\u{1ed6}', &['\u{d4}', '\u{303}']), ('\u{1ed7}',
+        &['\u{f4}', '\u{303}']), ('\u{1ed8}', &['\u{1ecc}', '\u{302}']), ('\u{1ed9}', &['\u{1ecd}',
+        '\u{302}']), ('\u{1eda}', &['\u{1a0}', '\u{301}']), ('\u{1edb}', &['\u{1a1}', '\u{301}']),
+        ('\u{1edc}', &['\u{1a0}', '\u{300}']), ('\u{1edd}', &['\u{1a1}', '\u{300}']), ('\u{1ede}',
+        &['\u{1a0}', '\u{309}']), ('\u{1edf}', &['\u{1a1}', '\u{309}']), ('\u{1ee0}', &['\u{1a0}',
+        '\u{303}']), ('\u{1ee1}', &['\u{1a1}', '\u{303}']), ('\u{1ee2}', &['\u{1a0}', '\u{323}']),
+        ('\u{1ee3}', &['\u{1a1}', '\u{323}']), ('\u{1ee4}', &['\u{55}', '\u{323}']), ('\u{1ee5}',
+        &['\u{75}', '\u{323}']), ('\u{1ee6}', &['\u{55}', '\u{309}']), ('\u{1ee7}', &['\u{75}',
+        '\u{309}']), ('\u{1ee8}', &['\u{1af}', '\u{301}']), ('\u{1ee9}', &['\u{1b0}', '\u{301}']),
+        ('\u{1eea}', &['\u{1af}', '\u{300}']), ('\u{1eeb}', &['\u{1b0}', '\u{300}']), ('\u{1eec}',
+        &['\u{1af}', '\u{309}']), ('\u{1eed}', &['\u{1b0}', '\u{309}']), ('\u{1eee}', &['\u{1af}',
+        '\u{303}']), ('\u{1eef}', &['\u{1b0}', '\u{303}']), ('\u{1ef0}', &['\u{1af}', '\u{323}']),
+        ('\u{1ef1}', &['\u{1b0}', '\u{323}']), ('\u{1ef2}', &['\u{59}', '\u{300}']), ('\u{1ef3}',
+        &['\u{79}', '\u{300}']), ('\u{1ef4}', &['\u{59}', '\u{323}']), ('\u{1ef5}', &['\u{79}',
+        '\u{323}']), ('\u{1ef6}', &['\u{59}', '\u{309}']), ('\u{1ef7}', &['\u{79}', '\u{309}']),
+        ('\u{1ef8}', &['\u{59}', '\u{303}']), ('\u{1ef9}', &['\u{79}', '\u{303}']), ('\u{1f00}',
+        &['\u{3b1}', '\u{313}']), ('\u{1f01}', &['\u{3b1}', '\u{314}']), ('\u{1f02}', &['\u{1f00}',
+        '\u{300}']), ('\u{1f03}', &['\u{1f01}', '\u{300}']), ('\u{1f04}', &['\u{1f00}', '\u{301}']),
+        ('\u{1f05}', &['\u{1f01}', '\u{301}']), ('\u{1f06}', &['\u{1f00}', '\u{342}']), ('\u{1f07}',
+        &['\u{1f01}', '\u{342}']), ('\u{1f08}', &['\u{391}', '\u{313}']), ('\u{1f09}', &['\u{391}',
+        '\u{314}']), ('\u{1f0a}', &['\u{1f08}', '\u{300}']), ('\u{1f0b}', &['\u{1f09}', '\u{300}']),
+        ('\u{1f0c}', &['\u{1f08}', '\u{301}']), ('\u{1f0d}', &['\u{1f09}', '\u{301}']), ('\u{1f0e}',
+        &['\u{1f08}', '\u{342}']), ('\u{1f0f}', &['\u{1f09}', '\u{342}']), ('\u{1f10}', &['\u{3b5}',
+        '\u{313}']), ('\u{1f11}', &['\u{3b5}', '\u{314}']), ('\u{1f12}', &['\u{1f10}', '\u{300}']),
+        ('\u{1f13}', &['\u{1f11}', '\u{300}']), ('\u{1f14}', &['\u{1f10}', '\u{301}']), ('\u{1f15}',
+        &['\u{1f11}', '\u{301}']), ('\u{1f18}', &['\u{395}', '\u{313}']), ('\u{1f19}', &['\u{395}',
+        '\u{314}']), ('\u{1f1a}', &['\u{1f18}', '\u{300}']), ('\u{1f1b}', &['\u{1f19}', '\u{300}']),
+        ('\u{1f1c}', &['\u{1f18}', '\u{301}']), ('\u{1f1d}', &['\u{1f19}', '\u{301}']), ('\u{1f20}',
+        &['\u{3b7}', '\u{313}']), ('\u{1f21}', &['\u{3b7}', '\u{314}']), ('\u{1f22}', &['\u{1f20}',
+        '\u{300}']), ('\u{1f23}', &['\u{1f21}', '\u{300}']), ('\u{1f24}', &['\u{1f20}', '\u{301}']),
+        ('\u{1f25}', &['\u{1f21}', '\u{301}']), ('\u{1f26}', &['\u{1f20}', '\u{342}']), ('\u{1f27}',
+        &['\u{1f21}', '\u{342}']), ('\u{1f28}', &['\u{397}', '\u{313}']), ('\u{1f29}', &['\u{397}',
+        '\u{314}']), ('\u{1f2a}', &['\u{1f28}', '\u{300}']), ('\u{1f2b}', &['\u{1f29}', '\u{300}']),
+        ('\u{1f2c}', &['\u{1f28}', '\u{301}']), ('\u{1f2d}', &['\u{1f29}', '\u{301}']), ('\u{1f2e}',
+        &['\u{1f28}', '\u{342}']), ('\u{1f2f}', &['\u{1f29}', '\u{342}']), ('\u{1f30}', &['\u{3b9}',
+        '\u{313}']), ('\u{1f31}', &['\u{3b9}', '\u{314}']), ('\u{1f32}', &['\u{1f30}', '\u{300}']),
+        ('\u{1f33}', &['\u{1f31}', '\u{300}']), ('\u{1f34}', &['\u{1f30}', '\u{301}']), ('\u{1f35}',
+        &['\u{1f31}', '\u{301}']), ('\u{1f36}', &['\u{1f30}', '\u{342}']), ('\u{1f37}',
+        &['\u{1f31}', '\u{342}']), ('\u{1f38}', &['\u{399}', '\u{313}']), ('\u{1f39}', &['\u{399}',
+        '\u{314}']), ('\u{1f3a}', &['\u{1f38}', '\u{300}']), ('\u{1f3b}', &['\u{1f39}', '\u{300}']),
+        ('\u{1f3c}', &['\u{1f38}', '\u{301}']), ('\u{1f3d}', &['\u{1f39}', '\u{301}']), ('\u{1f3e}',
+        &['\u{1f38}', '\u{342}']), ('\u{1f3f}', &['\u{1f39}', '\u{342}']), ('\u{1f40}', &['\u{3bf}',
+        '\u{313}']), ('\u{1f41}', &['\u{3bf}', '\u{314}']), ('\u{1f42}', &['\u{1f40}', '\u{300}']),
+        ('\u{1f43}', &['\u{1f41}', '\u{300}']), ('\u{1f44}', &['\u{1f40}', '\u{301}']), ('\u{1f45}',
+        &['\u{1f41}', '\u{301}']), ('\u{1f48}', &['\u{39f}', '\u{313}']), ('\u{1f49}', &['\u{39f}',
+        '\u{314}']), ('\u{1f4a}', &['\u{1f48}', '\u{300}']), ('\u{1f4b}', &['\u{1f49}', '\u{300}']),
+        ('\u{1f4c}', &['\u{1f48}', '\u{301}']), ('\u{1f4d}', &['\u{1f49}', '\u{301}']), ('\u{1f50}',
+        &['\u{3c5}', '\u{313}']), ('\u{1f51}', &['\u{3c5}', '\u{314}']), ('\u{1f52}', &['\u{1f50}',
+        '\u{300}']), ('\u{1f53}', &['\u{1f51}', '\u{300}']), ('\u{1f54}', &['\u{1f50}', '\u{301}']),
+        ('\u{1f55}', &['\u{1f51}', '\u{301}']), ('\u{1f56}', &['\u{1f50}', '\u{342}']), ('\u{1f57}',
+        &['\u{1f51}', '\u{342}']), ('\u{1f59}', &['\u{3a5}', '\u{314}']), ('\u{1f5b}', &['\u{1f59}',
+        '\u{300}']), ('\u{1f5d}', &['\u{1f59}', '\u{301}']), ('\u{1f5f}', &['\u{1f59}', '\u{342}']),
+        ('\u{1f60}', &['\u{3c9}', '\u{313}']), ('\u{1f61}', &['\u{3c9}', '\u{314}']), ('\u{1f62}',
+        &['\u{1f60}', '\u{300}']), ('\u{1f63}', &['\u{1f61}', '\u{300}']), ('\u{1f64}',
+        &['\u{1f60}', '\u{301}']), ('\u{1f65}', &['\u{1f61}', '\u{301}']), ('\u{1f66}',
+        &['\u{1f60}', '\u{342}']), ('\u{1f67}', &['\u{1f61}', '\u{342}']), ('\u{1f68}', &['\u{3a9}',
+        '\u{313}']), ('\u{1f69}', &['\u{3a9}', '\u{314}']), ('\u{1f6a}', &['\u{1f68}', '\u{300}']),
+        ('\u{1f6b}', &['\u{1f69}', '\u{300}']), ('\u{1f6c}', &['\u{1f68}', '\u{301}']), ('\u{1f6d}',
+        &['\u{1f69}', '\u{301}']), ('\u{1f6e}', &['\u{1f68}', '\u{342}']), ('\u{1f6f}',
+        &['\u{1f69}', '\u{342}']), ('\u{1f70}', &['\u{3b1}', '\u{300}']), ('\u{1f71}',
+        &['\u{3ac}']), ('\u{1f72}', &['\u{3b5}', '\u{300}']), ('\u{1f73}', &['\u{3ad}']),
+        ('\u{1f74}', &['\u{3b7}', '\u{300}']), ('\u{1f75}', &['\u{3ae}']), ('\u{1f76}', &['\u{3b9}',
+        '\u{300}']), ('\u{1f77}', &['\u{3af}']), ('\u{1f78}', &['\u{3bf}', '\u{300}']), ('\u{1f79}',
+        &['\u{3cc}']), ('\u{1f7a}', &['\u{3c5}', '\u{300}']), ('\u{1f7b}', &['\u{3cd}']),
+        ('\u{1f7c}', &['\u{3c9}', '\u{300}']), ('\u{1f7d}', &['\u{3ce}']), ('\u{1f80}',
+        &['\u{1f00}', '\u{345}']), ('\u{1f81}', &['\u{1f01}', '\u{345}']), ('\u{1f82}',
+        &['\u{1f02}', '\u{345}']), ('\u{1f83}', &['\u{1f03}', '\u{345}']), ('\u{1f84}',
+        &['\u{1f04}', '\u{345}']), ('\u{1f85}', &['\u{1f05}', '\u{345}']), ('\u{1f86}',
+        &['\u{1f06}', '\u{345}']), ('\u{1f87}', &['\u{1f07}', '\u{345}']), ('\u{1f88}',
+        &['\u{1f08}', '\u{345}']), ('\u{1f89}', &['\u{1f09}', '\u{345}']), ('\u{1f8a}',
+        &['\u{1f0a}', '\u{345}']), ('\u{1f8b}', &['\u{1f0b}', '\u{345}']), ('\u{1f8c}',
+        &['\u{1f0c}', '\u{345}']), ('\u{1f8d}', &['\u{1f0d}', '\u{345}']), ('\u{1f8e}',
+        &['\u{1f0e}', '\u{345}']), ('\u{1f8f}', &['\u{1f0f}', '\u{345}']), ('\u{1f90}',
+        &['\u{1f20}', '\u{345}']), ('\u{1f91}', &['\u{1f21}', '\u{345}']), ('\u{1f92}',
+        &['\u{1f22}', '\u{345}']), ('\u{1f93}', &['\u{1f23}', '\u{345}']), ('\u{1f94}',
+        &['\u{1f24}', '\u{345}']), ('\u{1f95}', &['\u{1f25}', '\u{345}']), ('\u{1f96}',
+        &['\u{1f26}', '\u{345}']), ('\u{1f97}', &['\u{1f27}', '\u{345}']), ('\u{1f98}',
+        &['\u{1f28}', '\u{345}']), ('\u{1f99}', &['\u{1f29}', '\u{345}']), ('\u{1f9a}',
+        &['\u{1f2a}', '\u{345}']), ('\u{1f9b}', &['\u{1f2b}', '\u{345}']), ('\u{1f9c}',
+        &['\u{1f2c}', '\u{345}']), ('\u{1f9d}', &['\u{1f2d}', '\u{345}']), ('\u{1f9e}',
+        &['\u{1f2e}', '\u{345}']), ('\u{1f9f}', &['\u{1f2f}', '\u{345}']), ('\u{1fa0}',
+        &['\u{1f60}', '\u{345}']), ('\u{1fa1}', &['\u{1f61}', '\u{345}']), ('\u{1fa2}',
+        &['\u{1f62}', '\u{345}']), ('\u{1fa3}', &['\u{1f63}', '\u{345}']), ('\u{1fa4}',
+        &['\u{1f64}', '\u{345}']), ('\u{1fa5}', &['\u{1f65}', '\u{345}']), ('\u{1fa6}',
+        &['\u{1f66}', '\u{345}']), ('\u{1fa7}', &['\u{1f67}', '\u{345}']), ('\u{1fa8}',
+        &['\u{1f68}', '\u{345}']), ('\u{1fa9}', &['\u{1f69}', '\u{345}']), ('\u{1faa}',
+        &['\u{1f6a}', '\u{345}']), ('\u{1fab}', &['\u{1f6b}', '\u{345}']), ('\u{1fac}',
+        &['\u{1f6c}', '\u{345}']), ('\u{1fad}', &['\u{1f6d}', '\u{345}']), ('\u{1fae}',
+        &['\u{1f6e}', '\u{345}']), ('\u{1faf}', &['\u{1f6f}', '\u{345}']), ('\u{1fb0}', &['\u{3b1}',
+        '\u{306}']), ('\u{1fb1}', &['\u{3b1}', '\u{304}']), ('\u{1fb2}', &['\u{1f70}', '\u{345}']),
+        ('\u{1fb3}', &['\u{3b1}', '\u{345}']), ('\u{1fb4}', &['\u{3ac}', '\u{345}']), ('\u{1fb6}',
+        &['\u{3b1}', '\u{342}']), ('\u{1fb7}', &['\u{1fb6}', '\u{345}']), ('\u{1fb8}', &['\u{391}',
+        '\u{306}']), ('\u{1fb9}', &['\u{391}', '\u{304}']), ('\u{1fba}', &['\u{391}', '\u{300}']),
+        ('\u{1fbb}', &['\u{386}']), ('\u{1fbc}', &['\u{391}', '\u{345}']), ('\u{1fbe}',
+        &['\u{3b9}']), ('\u{1fc1}', &['\u{a8}', '\u{342}']), ('\u{1fc2}', &['\u{1f74}', '\u{345}']),
+        ('\u{1fc3}', &['\u{3b7}', '\u{345}']), ('\u{1fc4}', &['\u{3ae}', '\u{345}']), ('\u{1fc6}',
+        &['\u{3b7}', '\u{342}']), ('\u{1fc7}', &['\u{1fc6}', '\u{345}']), ('\u{1fc8}', &['\u{395}',
+        '\u{300}']), ('\u{1fc9}', &['\u{388}']), ('\u{1fca}', &['\u{397}', '\u{300}']), ('\u{1fcb}',
+        &['\u{389}']), ('\u{1fcc}', &['\u{397}', '\u{345}']), ('\u{1fcd}', &['\u{1fbf}',
+        '\u{300}']), ('\u{1fce}', &['\u{1fbf}', '\u{301}']), ('\u{1fcf}', &['\u{1fbf}', '\u{342}']),
+        ('\u{1fd0}', &['\u{3b9}', '\u{306}']), ('\u{1fd1}', &['\u{3b9}', '\u{304}']), ('\u{1fd2}',
+        &['\u{3ca}', '\u{300}']), ('\u{1fd3}', &['\u{390}']), ('\u{1fd6}', &['\u{3b9}', '\u{342}']),
+        ('\u{1fd7}', &['\u{3ca}', '\u{342}']), ('\u{1fd8}', &['\u{399}', '\u{306}']), ('\u{1fd9}',
+        &['\u{399}', '\u{304}']), ('\u{1fda}', &['\u{399}', '\u{300}']), ('\u{1fdb}', &['\u{38a}']),
+        ('\u{1fdd}', &['\u{1ffe}', '\u{300}']), ('\u{1fde}', &['\u{1ffe}', '\u{301}']), ('\u{1fdf}',
+        &['\u{1ffe}', '\u{342}']), ('\u{1fe0}', &['\u{3c5}', '\u{306}']), ('\u{1fe1}', &['\u{3c5}',
+        '\u{304}']), ('\u{1fe2}', &['\u{3cb}', '\u{300}']), ('\u{1fe3}', &['\u{3b0}']), ('\u{1fe4}',
+        &['\u{3c1}', '\u{313}']), ('\u{1fe5}', &['\u{3c1}', '\u{314}']), ('\u{1fe6}', &['\u{3c5}',
+        '\u{342}']), ('\u{1fe7}', &['\u{3cb}', '\u{342}']), ('\u{1fe8}', &['\u{3a5}', '\u{306}']),
+        ('\u{1fe9}', &['\u{3a5}', '\u{304}']), ('\u{1fea}', &['\u{3a5}', '\u{300}']), ('\u{1feb}',
+        &['\u{38e}']), ('\u{1fec}', &['\u{3a1}', '\u{314}']), ('\u{1fed}', &['\u{a8}', '\u{300}']),
+        ('\u{1fee}', &['\u{385}']), ('\u{1fef}', &['\u{60}']), ('\u{1ff2}', &['\u{1f7c}',
+        '\u{345}']), ('\u{1ff3}', &['\u{3c9}', '\u{345}']), ('\u{1ff4}', &['\u{3ce}', '\u{345}']),
+        ('\u{1ff6}', &['\u{3c9}', '\u{342}']), ('\u{1ff7}', &['\u{1ff6}', '\u{345}']), ('\u{1ff8}',
+        &['\u{39f}', '\u{300}']), ('\u{1ff9}', &['\u{38c}']), ('\u{1ffa}', &['\u{3a9}', '\u{300}']),
+        ('\u{1ffb}', &['\u{38f}']), ('\u{1ffc}', &['\u{3a9}', '\u{345}']), ('\u{1ffd}',
+        &['\u{b4}']), ('\u{2000}', &['\u{2002}']), ('\u{2001}', &['\u{2003}']), ('\u{2126}',
+        &['\u{3a9}']), ('\u{212a}', &['\u{4b}']), ('\u{212b}', &['\u{c5}']), ('\u{219a}',
+        &['\u{2190}', '\u{338}']), ('\u{219b}', &['\u{2192}', '\u{338}']), ('\u{21ae}',
+        &['\u{2194}', '\u{338}']), ('\u{21cd}', &['\u{21d0}', '\u{338}']), ('\u{21ce}',
+        &['\u{21d4}', '\u{338}']), ('\u{21cf}', &['\u{21d2}', '\u{338}']), ('\u{2204}',
+        &['\u{2203}', '\u{338}']), ('\u{2209}', &['\u{2208}', '\u{338}']), ('\u{220c}',
+        &['\u{220b}', '\u{338}']), ('\u{2224}', &['\u{2223}', '\u{338}']), ('\u{2226}',
+        &['\u{2225}', '\u{338}']), ('\u{2241}', &['\u{223c}', '\u{338}']), ('\u{2244}',
+        &['\u{2243}', '\u{338}']), ('\u{2247}', &['\u{2245}', '\u{338}']), ('\u{2249}',
+        &['\u{2248}', '\u{338}']), ('\u{2260}', &['\u{3d}', '\u{338}']), ('\u{2262}', &['\u{2261}',
+        '\u{338}']), ('\u{226d}', &['\u{224d}', '\u{338}']), ('\u{226e}', &['\u{3c}', '\u{338}']),
+        ('\u{226f}', &['\u{3e}', '\u{338}']), ('\u{2270}', &['\u{2264}', '\u{338}']), ('\u{2271}',
+        &['\u{2265}', '\u{338}']), ('\u{2274}', &['\u{2272}', '\u{338}']), ('\u{2275}',
+        &['\u{2273}', '\u{338}']), ('\u{2278}', &['\u{2276}', '\u{338}']), ('\u{2279}',
+        &['\u{2277}', '\u{338}']), ('\u{2280}', &['\u{227a}', '\u{338}']), ('\u{2281}',
+        &['\u{227b}', '\u{338}']), ('\u{2284}', &['\u{2282}', '\u{338}']), ('\u{2285}',
+        &['\u{2283}', '\u{338}']), ('\u{2288}', &['\u{2286}', '\u{338}']), ('\u{2289}',
+        &['\u{2287}', '\u{338}']), ('\u{22ac}', &['\u{22a2}', '\u{338}']), ('\u{22ad}',
+        &['\u{22a8}', '\u{338}']), ('\u{22ae}', &['\u{22a9}', '\u{338}']), ('\u{22af}',
+        &['\u{22ab}', '\u{338}']), ('\u{22e0}', &['\u{227c}', '\u{338}']), ('\u{22e1}',
+        &['\u{227d}', '\u{338}']), ('\u{22e2}', &['\u{2291}', '\u{338}']), ('\u{22e3}',
+        &['\u{2292}', '\u{338}']), ('\u{22ea}', &['\u{22b2}', '\u{338}']), ('\u{22eb}',
+        &['\u{22b3}', '\u{338}']), ('\u{22ec}', &['\u{22b4}', '\u{338}']), ('\u{22ed}',
+        &['\u{22b5}', '\u{338}']), ('\u{2329}', &['\u{3008}']), ('\u{232a}', &['\u{3009}']),
+        ('\u{2adc}', &['\u{2add}', '\u{338}']), ('\u{304c}', &['\u{304b}', '\u{3099}']),
+        ('\u{304e}', &['\u{304d}', '\u{3099}']), ('\u{3050}', &['\u{304f}', '\u{3099}']),
+        ('\u{3052}', &['\u{3051}', '\u{3099}']), ('\u{3054}', &['\u{3053}', '\u{3099}']),
+        ('\u{3056}', &['\u{3055}', '\u{3099}']), ('\u{3058}', &['\u{3057}', '\u{3099}']),
+        ('\u{305a}', &['\u{3059}', '\u{3099}']), ('\u{305c}', &['\u{305b}', '\u{3099}']),
+        ('\u{305e}', &['\u{305d}', '\u{3099}']), ('\u{3060}', &['\u{305f}', '\u{3099}']),
+        ('\u{3062}', &['\u{3061}', '\u{3099}']), ('\u{3065}', &['\u{3064}', '\u{3099}']),
+        ('\u{3067}', &['\u{3066}', '\u{3099}']), ('\u{3069}', &['\u{3068}', '\u{3099}']),
+        ('\u{3070}', &['\u{306f}', '\u{3099}']), ('\u{3071}', &['\u{306f}', '\u{309a}']),
+        ('\u{3073}', &['\u{3072}', '\u{3099}']), ('\u{3074}', &['\u{3072}', '\u{309a}']),
+        ('\u{3076}', &['\u{3075}', '\u{3099}']), ('\u{3077}', &['\u{3075}', '\u{309a}']),
+        ('\u{3079}', &['\u{3078}', '\u{3099}']), ('\u{307a}', &['\u{3078}', '\u{309a}']),
+        ('\u{307c}', &['\u{307b}', '\u{3099}']), ('\u{307d}', &['\u{307b}', '\u{309a}']),
+        ('\u{3094}', &['\u{3046}', '\u{3099}']), ('\u{309e}', &['\u{309d}', '\u{3099}']),
+        ('\u{30ac}', &['\u{30ab}', '\u{3099}']), ('\u{30ae}', &['\u{30ad}', '\u{3099}']),
+        ('\u{30b0}', &['\u{30af}', '\u{3099}']), ('\u{30b2}', &['\u{30b1}', '\u{3099}']),
+        ('\u{30b4}', &['\u{30b3}', '\u{3099}']), ('\u{30b6}', &['\u{30b5}', '\u{3099}']),
+        ('\u{30b8}', &['\u{30b7}', '\u{3099}']), ('\u{30ba}', &['\u{30b9}', '\u{3099}']),
+        ('\u{30bc}', &['\u{30bb}', '\u{3099}']), ('\u{30be}', &['\u{30bd}', '\u{3099}']),
+        ('\u{30c0}', &['\u{30bf}', '\u{3099}']), ('\u{30c2}', &['\u{30c1}', '\u{3099}']),
+        ('\u{30c5}', &['\u{30c4}', '\u{3099}']), ('\u{30c7}', &['\u{30c6}', '\u{3099}']),
+        ('\u{30c9}', &['\u{30c8}', '\u{3099}']), ('\u{30d0}', &['\u{30cf}', '\u{3099}']),
+        ('\u{30d1}', &['\u{30cf}', '\u{309a}']), ('\u{30d3}', &['\u{30d2}', '\u{3099}']),
+        ('\u{30d4}', &['\u{30d2}', '\u{309a}']), ('\u{30d6}', &['\u{30d5}', '\u{3099}']),
+        ('\u{30d7}', &['\u{30d5}', '\u{309a}']), ('\u{30d9}', &['\u{30d8}', '\u{3099}']),
+        ('\u{30da}', &['\u{30d8}', '\u{309a}']), ('\u{30dc}', &['\u{30db}', '\u{3099}']),
+        ('\u{30dd}', &['\u{30db}', '\u{309a}']), ('\u{30f4}', &['\u{30a6}', '\u{3099}']),
+        ('\u{30f7}', &['\u{30ef}', '\u{3099}']), ('\u{30f8}', &['\u{30f0}', '\u{3099}']),
+        ('\u{30f9}', &['\u{30f1}', '\u{3099}']), ('\u{30fa}', &['\u{30f2}', '\u{3099}']),
+        ('\u{30fe}', &['\u{30fd}', '\u{3099}']), ('\u{f900}', &['\u{8c48}']), ('\u{f901}',
+        &['\u{66f4}']), ('\u{f902}', &['\u{8eca}']), ('\u{f903}', &['\u{8cc8}']), ('\u{f904}',
+        &['\u{6ed1}']), ('\u{f905}', &['\u{4e32}']), ('\u{f906}', &['\u{53e5}']), ('\u{f907}',
+        &['\u{9f9c}']), ('\u{f908}', &['\u{9f9c}']), ('\u{f909}', &['\u{5951}']), ('\u{f90a}',
+        &['\u{91d1}']), ('\u{f90b}', &['\u{5587}']), ('\u{f90c}', &['\u{5948}']), ('\u{f90d}',
+        &['\u{61f6}']), ('\u{f90e}', &['\u{7669}']), ('\u{f90f}', &['\u{7f85}']), ('\u{f910}',
+        &['\u{863f}']), ('\u{f911}', &['\u{87ba}']), ('\u{f912}', &['\u{88f8}']), ('\u{f913}',
+        &['\u{908f}']), ('\u{f914}', &['\u{6a02}']), ('\u{f915}', &['\u{6d1b}']), ('\u{f916}',
+        &['\u{70d9}']), ('\u{f917}', &['\u{73de}']), ('\u{f918}', &['\u{843d}']), ('\u{f919}',
+        &['\u{916a}']), ('\u{f91a}', &['\u{99f1}']), ('\u{f91b}', &['\u{4e82}']), ('\u{f91c}',
+        &['\u{5375}']), ('\u{f91d}', &['\u{6b04}']), ('\u{f91e}', &['\u{721b}']), ('\u{f91f}',
+        &['\u{862d}']), ('\u{f920}', &['\u{9e1e}']), ('\u{f921}', &['\u{5d50}']), ('\u{f922}',
+        &['\u{6feb}']), ('\u{f923}', &['\u{85cd}']), ('\u{f924}', &['\u{8964}']), ('\u{f925}',
+        &['\u{62c9}']), ('\u{f926}', &['\u{81d8}']), ('\u{f927}', &['\u{881f}']), ('\u{f928}',
+        &['\u{5eca}']), ('\u{f929}', &['\u{6717}']), ('\u{f92a}', &['\u{6d6a}']), ('\u{f92b}',
+        &['\u{72fc}']), ('\u{f92c}', &['\u{90ce}']), ('\u{f92d}', &['\u{4f86}']), ('\u{f92e}',
+        &['\u{51b7}']), ('\u{f92f}', &['\u{52de}']), ('\u{f930}', &['\u{64c4}']), ('\u{f931}',
+        &['\u{6ad3}']), ('\u{f932}', &['\u{7210}']), ('\u{f933}', &['\u{76e7}']), ('\u{f934}',
+        &['\u{8001}']), ('\u{f935}', &['\u{8606}']), ('\u{f936}', &['\u{865c}']), ('\u{f937}',
+        &['\u{8def}']), ('\u{f938}', &['\u{9732}']), ('\u{f939}', &['\u{9b6f}']), ('\u{f93a}',
+        &['\u{9dfa}']), ('\u{f93b}', &['\u{788c}']), ('\u{f93c}', &['\u{797f}']), ('\u{f93d}',
+        &['\u{7da0}']), ('\u{f93e}', &['\u{83c9}']), ('\u{f93f}', &['\u{9304}']), ('\u{f940}',
+        &['\u{9e7f}']), ('\u{f941}', &['\u{8ad6}']), ('\u{f942}', &['\u{58df}']), ('\u{f943}',
+        &['\u{5f04}']), ('\u{f944}', &['\u{7c60}']), ('\u{f945}', &['\u{807e}']), ('\u{f946}',
+        &['\u{7262}']), ('\u{f947}', &['\u{78ca}']), ('\u{f948}', &['\u{8cc2}']), ('\u{f949}',
+        &['\u{96f7}']), ('\u{f94a}', &['\u{58d8}']), ('\u{f94b}', &['\u{5c62}']), ('\u{f94c}',
+        &['\u{6a13}']), ('\u{f94d}', &['\u{6dda}']), ('\u{f94e}', &['\u{6f0f}']), ('\u{f94f}',
+        &['\u{7d2f}']), ('\u{f950}', &['\u{7e37}']), ('\u{f951}', &['\u{964b}']), ('\u{f952}',
+        &['\u{52d2}']), ('\u{f953}', &['\u{808b}']), ('\u{f954}', &['\u{51dc}']), ('\u{f955}',
+        &['\u{51cc}']), ('\u{f956}', &['\u{7a1c}']), ('\u{f957}', &['\u{7dbe}']), ('\u{f958}',
+        &['\u{83f1}']), ('\u{f959}', &['\u{9675}']), ('\u{f95a}', &['\u{8b80}']), ('\u{f95b}',
+        &['\u{62cf}']), ('\u{f95c}', &['\u{6a02}']), ('\u{f95d}', &['\u{8afe}']), ('\u{f95e}',
+        &['\u{4e39}']), ('\u{f95f}', &['\u{5be7}']), ('\u{f960}', &['\u{6012}']), ('\u{f961}',
+        &['\u{7387}']), ('\u{f962}', &['\u{7570}']), ('\u{f963}', &['\u{5317}']), ('\u{f964}',
+        &['\u{78fb}']), ('\u{f965}', &['\u{4fbf}']), ('\u{f966}', &['\u{5fa9}']), ('\u{f967}',
+        &['\u{4e0d}']), ('\u{f968}', &['\u{6ccc}']), ('\u{f969}', &['\u{6578}']), ('\u{f96a}',
+        &['\u{7d22}']), ('\u{f96b}', &['\u{53c3}']), ('\u{f96c}', &['\u{585e}']), ('\u{f96d}',
+        &['\u{7701}']), ('\u{f96e}', &['\u{8449}']), ('\u{f96f}', &['\u{8aaa}']), ('\u{f970}',
+        &['\u{6bba}']), ('\u{f971}', &['\u{8fb0}']), ('\u{f972}', &['\u{6c88}']), ('\u{f973}',
+        &['\u{62fe}']), ('\u{f974}', &['\u{82e5}']), ('\u{f975}', &['\u{63a0}']), ('\u{f976}',
+        &['\u{7565}']), ('\u{f977}', &['\u{4eae}']), ('\u{f978}', &['\u{5169}']), ('\u{f979}',
+        &['\u{51c9}']), ('\u{f97a}', &['\u{6881}']), ('\u{f97b}', &['\u{7ce7}']), ('\u{f97c}',
+        &['\u{826f}']), ('\u{f97d}', &['\u{8ad2}']), ('\u{f97e}', &['\u{91cf}']), ('\u{f97f}',
+        &['\u{52f5}']), ('\u{f980}', &['\u{5442}']), ('\u{f981}', &['\u{5973}']), ('\u{f982}',
+        &['\u{5eec}']), ('\u{f983}', &['\u{65c5}']), ('\u{f984}', &['\u{6ffe}']), ('\u{f985}',
+        &['\u{792a}']), ('\u{f986}', &['\u{95ad}']), ('\u{f987}', &['\u{9a6a}']), ('\u{f988}',
+        &['\u{9e97}']), ('\u{f989}', &['\u{9ece}']), ('\u{f98a}', &['\u{529b}']), ('\u{f98b}',
+        &['\u{66c6}']), ('\u{f98c}', &['\u{6b77}']), ('\u{f98d}', &['\u{8f62}']), ('\u{f98e}',
+        &['\u{5e74}']), ('\u{f98f}', &['\u{6190}']), ('\u{f990}', &['\u{6200}']), ('\u{f991}',
+        &['\u{649a}']), ('\u{f992}', &['\u{6f23}']), ('\u{f993}', &['\u{7149}']), ('\u{f994}',
+        &['\u{7489}']), ('\u{f995}', &['\u{79ca}']), ('\u{f996}', &['\u{7df4}']), ('\u{f997}',
+        &['\u{806f}']), ('\u{f998}', &['\u{8f26}']), ('\u{f999}', &['\u{84ee}']), ('\u{f99a}',
+        &['\u{9023}']), ('\u{f99b}', &['\u{934a}']), ('\u{f99c}', &['\u{5217}']), ('\u{f99d}',
+        &['\u{52a3}']), ('\u{f99e}', &['\u{54bd}']), ('\u{f99f}', &['\u{70c8}']), ('\u{f9a0}',
+        &['\u{88c2}']), ('\u{f9a1}', &['\u{8aaa}']), ('\u{f9a2}', &['\u{5ec9}']), ('\u{f9a3}',
+        &['\u{5ff5}']), ('\u{f9a4}', &['\u{637b}']), ('\u{f9a5}', &['\u{6bae}']), ('\u{f9a6}',
+        &['\u{7c3e}']), ('\u{f9a7}', &['\u{7375}']), ('\u{f9a8}', &['\u{4ee4}']), ('\u{f9a9}',
+        &['\u{56f9}']), ('\u{f9aa}', &['\u{5be7}']), ('\u{f9ab}', &['\u{5dba}']), ('\u{f9ac}',
+        &['\u{601c}']), ('\u{f9ad}', &['\u{73b2}']), ('\u{f9ae}', &['\u{7469}']), ('\u{f9af}',
+        &['\u{7f9a}']), ('\u{f9b0}', &['\u{8046}']), ('\u{f9b1}', &['\u{9234}']), ('\u{f9b2}',
+        &['\u{96f6}']), ('\u{f9b3}', &['\u{9748}']), ('\u{f9b4}', &['\u{9818}']), ('\u{f9b5}',
+        &['\u{4f8b}']), ('\u{f9b6}', &['\u{79ae}']), ('\u{f9b7}', &['\u{91b4}']), ('\u{f9b8}',
+        &['\u{96b8}']), ('\u{f9b9}', &['\u{60e1}']), ('\u{f9ba}', &['\u{4e86}']), ('\u{f9bb}',
+        &['\u{50da}']), ('\u{f9bc}', &['\u{5bee}']), ('\u{f9bd}', &['\u{5c3f}']), ('\u{f9be}',
+        &['\u{6599}']), ('\u{f9bf}', &['\u{6a02}']), ('\u{f9c0}', &['\u{71ce}']), ('\u{f9c1}',
+        &['\u{7642}']), ('\u{f9c2}', &['\u{84fc}']), ('\u{f9c3}', &['\u{907c}']), ('\u{f9c4}',
+        &['\u{9f8d}']), ('\u{f9c5}', &['\u{6688}']), ('\u{f9c6}', &['\u{962e}']), ('\u{f9c7}',
+        &['\u{5289}']), ('\u{f9c8}', &['\u{677b}']), ('\u{f9c9}', &['\u{67f3}']), ('\u{f9ca}',
+        &['\u{6d41}']), ('\u{f9cb}', &['\u{6e9c}']), ('\u{f9cc}', &['\u{7409}']), ('\u{f9cd}',
+        &['\u{7559}']), ('\u{f9ce}', &['\u{786b}']), ('\u{f9cf}', &['\u{7d10}']), ('\u{f9d0}',
+        &['\u{985e}']), ('\u{f9d1}', &['\u{516d}']), ('\u{f9d2}', &['\u{622e}']), ('\u{f9d3}',
+        &['\u{9678}']), ('\u{f9d4}', &['\u{502b}']), ('\u{f9d5}', &['\u{5d19}']), ('\u{f9d6}',
+        &['\u{6dea}']), ('\u{f9d7}', &['\u{8f2a}']), ('\u{f9d8}', &['\u{5f8b}']), ('\u{f9d9}',
+        &['\u{6144}']), ('\u{f9da}', &['\u{6817}']), ('\u{f9db}', &['\u{7387}']), ('\u{f9dc}',
+        &['\u{9686}']), ('\u{f9dd}', &['\u{5229}']), ('\u{f9de}', &['\u{540f}']), ('\u{f9df}',
+        &['\u{5c65}']), ('\u{f9e0}', &['\u{6613}']), ('\u{f9e1}', &['\u{674e}']), ('\u{f9e2}',
+        &['\u{68a8}']), ('\u{f9e3}', &['\u{6ce5}']), ('\u{f9e4}', &['\u{7406}']), ('\u{f9e5}',
+        &['\u{75e2}']), ('\u{f9e6}', &['\u{7f79}']), ('\u{f9e7}', &['\u{88cf}']), ('\u{f9e8}',
+        &['\u{88e1}']), ('\u{f9e9}', &['\u{91cc}']), ('\u{f9ea}', &['\u{96e2}']), ('\u{f9eb}',
+        &['\u{533f}']), ('\u{f9ec}', &['\u{6eba}']), ('\u{f9ed}', &['\u{541d}']), ('\u{f9ee}',
+        &['\u{71d0}']), ('\u{f9ef}', &['\u{7498}']), ('\u{f9f0}', &['\u{85fa}']), ('\u{f9f1}',
+        &['\u{96a3}']), ('\u{f9f2}', &['\u{9c57}']), ('\u{f9f3}', &['\u{9e9f}']), ('\u{f9f4}',
+        &['\u{6797}']), ('\u{f9f5}', &['\u{6dcb}']), ('\u{f9f6}', &['\u{81e8}']), ('\u{f9f7}',
+        &['\u{7acb}']), ('\u{f9f8}', &['\u{7b20}']), ('\u{f9f9}', &['\u{7c92}']), ('\u{f9fa}',
+        &['\u{72c0}']), ('\u{f9fb}', &['\u{7099}']), ('\u{f9fc}', &['\u{8b58}']), ('\u{f9fd}',
+        &['\u{4ec0}']), ('\u{f9fe}', &['\u{8336}']), ('\u{f9ff}', &['\u{523a}']), ('\u{fa00}',
+        &['\u{5207}']), ('\u{fa01}', &['\u{5ea6}']), ('\u{fa02}', &['\u{62d3}']), ('\u{fa03}',
+        &['\u{7cd6}']), ('\u{fa04}', &['\u{5b85}']), ('\u{fa05}', &['\u{6d1e}']), ('\u{fa06}',
+        &['\u{66b4}']), ('\u{fa07}', &['\u{8f3b}']), ('\u{fa08}', &['\u{884c}']), ('\u{fa09}',
+        &['\u{964d}']), ('\u{fa0a}', &['\u{898b}']), ('\u{fa0b}', &['\u{5ed3}']), ('\u{fa0c}',
+        &['\u{5140}']), ('\u{fa0d}', &['\u{55c0}']), ('\u{fa10}', &['\u{585a}']), ('\u{fa12}',
+        &['\u{6674}']), ('\u{fa15}', &['\u{51de}']), ('\u{fa16}', &['\u{732a}']), ('\u{fa17}',
+        &['\u{76ca}']), ('\u{fa18}', &['\u{793c}']), ('\u{fa19}', &['\u{795e}']), ('\u{fa1a}',
+        &['\u{7965}']), ('\u{fa1b}', &['\u{798f}']), ('\u{fa1c}', &['\u{9756}']), ('\u{fa1d}',
+        &['\u{7cbe}']), ('\u{fa1e}', &['\u{7fbd}']), ('\u{fa20}', &['\u{8612}']), ('\u{fa22}',
+        &['\u{8af8}']), ('\u{fa25}', &['\u{9038}']), ('\u{fa26}', &['\u{90fd}']), ('\u{fa2a}',
+        &['\u{98ef}']), ('\u{fa2b}', &['\u{98fc}']), ('\u{fa2c}', &['\u{9928}']), ('\u{fa2d}',
+        &['\u{9db4}']), ('\u{fa2e}', &['\u{90de}']), ('\u{fa2f}', &['\u{96b7}']), ('\u{fa30}',
+        &['\u{4fae}']), ('\u{fa31}', &['\u{50e7}']), ('\u{fa32}', &['\u{514d}']), ('\u{fa33}',
+        &['\u{52c9}']), ('\u{fa34}', &['\u{52e4}']), ('\u{fa35}', &['\u{5351}']), ('\u{fa36}',
+        &['\u{559d}']), ('\u{fa37}', &['\u{5606}']), ('\u{fa38}', &['\u{5668}']), ('\u{fa39}',
+        &['\u{5840}']), ('\u{fa3a}', &['\u{58a8}']), ('\u{fa3b}', &['\u{5c64}']), ('\u{fa3c}',
+        &['\u{5c6e}']), ('\u{fa3d}', &['\u{6094}']), ('\u{fa3e}', &['\u{6168}']), ('\u{fa3f}',
+        &['\u{618e}']), ('\u{fa40}', &['\u{61f2}']), ('\u{fa41}', &['\u{654f}']), ('\u{fa42}',
+        &['\u{65e2}']), ('\u{fa43}', &['\u{6691}']), ('\u{fa44}', &['\u{6885}']), ('\u{fa45}',
+        &['\u{6d77}']), ('\u{fa46}', &['\u{6e1a}']), ('\u{fa47}', &['\u{6f22}']), ('\u{fa48}',
+        &['\u{716e}']), ('\u{fa49}', &['\u{722b}']), ('\u{fa4a}', &['\u{7422}']), ('\u{fa4b}',
+        &['\u{7891}']), ('\u{fa4c}', &['\u{793e}']), ('\u{fa4d}', &['\u{7949}']), ('\u{fa4e}',
+        &['\u{7948}']), ('\u{fa4f}', &['\u{7950}']), ('\u{fa50}', &['\u{7956}']), ('\u{fa51}',
+        &['\u{795d}']), ('\u{fa52}', &['\u{798d}']), ('\u{fa53}', &['\u{798e}']), ('\u{fa54}',
+        &['\u{7a40}']), ('\u{fa55}', &['\u{7a81}']), ('\u{fa56}', &['\u{7bc0}']), ('\u{fa57}',
+        &['\u{7df4}']), ('\u{fa58}', &['\u{7e09}']), ('\u{fa59}', &['\u{7e41}']), ('\u{fa5a}',
+        &['\u{7f72}']), ('\u{fa5b}', &['\u{8005}']), ('\u{fa5c}', &['\u{81ed}']), ('\u{fa5d}',
+        &['\u{8279}']), ('\u{fa5e}', &['\u{8279}']), ('\u{fa5f}', &['\u{8457}']), ('\u{fa60}',
+        &['\u{8910}']), ('\u{fa61}', &['\u{8996}']), ('\u{fa62}', &['\u{8b01}']), ('\u{fa63}',
+        &['\u{8b39}']), ('\u{fa64}', &['\u{8cd3}']), ('\u{fa65}', &['\u{8d08}']), ('\u{fa66}',
+        &['\u{8fb6}']), ('\u{fa67}', &['\u{9038}']), ('\u{fa68}', &['\u{96e3}']), ('\u{fa69}',
+        &['\u{97ff}']), ('\u{fa6a}', &['\u{983b}']), ('\u{fa6b}', &['\u{6075}']), ('\u{fa6c}',
+        &['\u{242ee}']), ('\u{fa6d}', &['\u{8218}']), ('\u{fa70}', &['\u{4e26}']), ('\u{fa71}',
+        &['\u{51b5}']), ('\u{fa72}', &['\u{5168}']), ('\u{fa73}', &['\u{4f80}']), ('\u{fa74}',
+        &['\u{5145}']), ('\u{fa75}', &['\u{5180}']), ('\u{fa76}', &['\u{52c7}']), ('\u{fa77}',
+        &['\u{52fa}']), ('\u{fa78}', &['\u{559d}']), ('\u{fa79}', &['\u{5555}']), ('\u{fa7a}',
+        &['\u{5599}']), ('\u{fa7b}', &['\u{55e2}']), ('\u{fa7c}', &['\u{585a}']), ('\u{fa7d}',
+        &['\u{58b3}']), ('\u{fa7e}', &['\u{5944}']), ('\u{fa7f}', &['\u{5954}']), ('\u{fa80}',
+        &['\u{5a62}']), ('\u{fa81}', &['\u{5b28}']), ('\u{fa82}', &['\u{5ed2}']), ('\u{fa83}',
+        &['\u{5ed9}']), ('\u{fa84}', &['\u{5f69}']), ('\u{fa85}', &['\u{5fad}']), ('\u{fa86}',
+        &['\u{60d8}']), ('\u{fa87}', &['\u{614e}']), ('\u{fa88}', &['\u{6108}']), ('\u{fa89}',
+        &['\u{618e}']), ('\u{fa8a}', &['\u{6160}']), ('\u{fa8b}', &['\u{61f2}']), ('\u{fa8c}',
+        &['\u{6234}']), ('\u{fa8d}', &['\u{63c4}']), ('\u{fa8e}', &['\u{641c}']), ('\u{fa8f}',
+        &['\u{6452}']), ('\u{fa90}', &['\u{6556}']), ('\u{fa91}', &['\u{6674}']), ('\u{fa92}',
+        &['\u{6717}']), ('\u{fa93}', &['\u{671b}']), ('\u{fa94}', &['\u{6756}']), ('\u{fa95}',
+        &['\u{6b79}']), ('\u{fa96}', &['\u{6bba}']), ('\u{fa97}', &['\u{6d41}']), ('\u{fa98}',
+        &['\u{6edb}']), ('\u{fa99}', &['\u{6ecb}']), ('\u{fa9a}', &['\u{6f22}']), ('\u{fa9b}',
+        &['\u{701e}']), ('\u{fa9c}', &['\u{716e}']), ('\u{fa9d}', &['\u{77a7}']), ('\u{fa9e}',
+        &['\u{7235}']), ('\u{fa9f}', &['\u{72af}']), ('\u{faa0}', &['\u{732a}']), ('\u{faa1}',
+        &['\u{7471}']), ('\u{faa2}', &['\u{7506}']), ('\u{faa3}', &['\u{753b}']), ('\u{faa4}',
+        &['\u{761d}']), ('\u{faa5}', &['\u{761f}']), ('\u{faa6}', &['\u{76ca}']), ('\u{faa7}',
+        &['\u{76db}']), ('\u{faa8}', &['\u{76f4}']), ('\u{faa9}', &['\u{774a}']), ('\u{faaa}',
+        &['\u{7740}']), ('\u{faab}', &['\u{78cc}']), ('\u{faac}', &['\u{7ab1}']), ('\u{faad}',
+        &['\u{7bc0}']), ('\u{faae}', &['\u{7c7b}']), ('\u{faaf}', &['\u{7d5b}']), ('\u{fab0}',
+        &['\u{7df4}']), ('\u{fab1}', &['\u{7f3e}']), ('\u{fab2}', &['\u{8005}']), ('\u{fab3}',
+        &['\u{8352}']), ('\u{fab4}', &['\u{83ef}']), ('\u{fab5}', &['\u{8779}']), ('\u{fab6}',
+        &['\u{8941}']), ('\u{fab7}', &['\u{8986}']), ('\u{fab8}', &['\u{8996}']), ('\u{fab9}',
+        &['\u{8abf}']), ('\u{faba}', &['\u{8af8}']), ('\u{fabb}', &['\u{8acb}']), ('\u{fabc}',
+        &['\u{8b01}']), ('\u{fabd}', &['\u{8afe}']), ('\u{fabe}', &['\u{8aed}']), ('\u{fabf}',
+        &['\u{8b39}']), ('\u{fac0}', &['\u{8b8a}']), ('\u{fac1}', &['\u{8d08}']), ('\u{fac2}',
+        &['\u{8f38}']), ('\u{fac3}', &['\u{9072}']), ('\u{fac4}', &['\u{9199}']), ('\u{fac5}',
+        &['\u{9276}']), ('\u{fac6}', &['\u{967c}']), ('\u{fac7}', &['\u{96e3}']), ('\u{fac8}',
+        &['\u{9756}']), ('\u{fac9}', &['\u{97db}']), ('\u{faca}', &['\u{97ff}']), ('\u{facb}',
+        &['\u{980b}']), ('\u{facc}', &['\u{983b}']), ('\u{facd}', &['\u{9b12}']), ('\u{face}',
+        &['\u{9f9c}']), ('\u{facf}', &['\u{2284a}']), ('\u{fad0}', &['\u{22844}']), ('\u{fad1}',
+        &['\u{233d5}']), ('\u{fad2}', &['\u{3b9d}']), ('\u{fad3}', &['\u{4018}']), ('\u{fad4}',
+        &['\u{4039}']), ('\u{fad5}', &['\u{25249}']), ('\u{fad6}', &['\u{25cd0}']), ('\u{fad7}',
+        &['\u{27ed3}']), ('\u{fad8}', &['\u{9f43}']), ('\u{fad9}', &['\u{9f8e}']), ('\u{fb1d}',
+        &['\u{5d9}', '\u{5b4}']), ('\u{fb1f}', &['\u{5f2}', '\u{5b7}']), ('\u{fb2a}', &['\u{5e9}',
+        '\u{5c1}']), ('\u{fb2b}', &['\u{5e9}', '\u{5c2}']), ('\u{fb2c}', &['\u{fb49}', '\u{5c1}']),
+        ('\u{fb2d}', &['\u{fb49}', '\u{5c2}']), ('\u{fb2e}', &['\u{5d0}', '\u{5b7}']), ('\u{fb2f}',
+        &['\u{5d0}', '\u{5b8}']), ('\u{fb30}', &['\u{5d0}', '\u{5bc}']), ('\u{fb31}', &['\u{5d1}',
+        '\u{5bc}']), ('\u{fb32}', &['\u{5d2}', '\u{5bc}']), ('\u{fb33}', &['\u{5d3}', '\u{5bc}']),
+        ('\u{fb34}', &['\u{5d4}', '\u{5bc}']), ('\u{fb35}', &['\u{5d5}', '\u{5bc}']), ('\u{fb36}',
+        &['\u{5d6}', '\u{5bc}']), ('\u{fb38}', &['\u{5d8}', '\u{5bc}']), ('\u{fb39}', &['\u{5d9}',
+        '\u{5bc}']), ('\u{fb3a}', &['\u{5da}', '\u{5bc}']), ('\u{fb3b}', &['\u{5db}', '\u{5bc}']),
+        ('\u{fb3c}', &['\u{5dc}', '\u{5bc}']), ('\u{fb3e}', &['\u{5de}', '\u{5bc}']), ('\u{fb40}',
+        &['\u{5e0}', '\u{5bc}']), ('\u{fb41}', &['\u{5e1}', '\u{5bc}']), ('\u{fb43}', &['\u{5e3}',
+        '\u{5bc}']), ('\u{fb44}', &['\u{5e4}', '\u{5bc}']), ('\u{fb46}', &['\u{5e6}', '\u{5bc}']),
+        ('\u{fb47}', &['\u{5e7}', '\u{5bc}']), ('\u{fb48}', &['\u{5e8}', '\u{5bc}']), ('\u{fb49}',
+        &['\u{5e9}', '\u{5bc}']), ('\u{fb4a}', &['\u{5ea}', '\u{5bc}']), ('\u{fb4b}', &['\u{5d5}',
+        '\u{5b9}']), ('\u{fb4c}', &['\u{5d1}', '\u{5bf}']), ('\u{fb4d}', &['\u{5db}', '\u{5bf}']),
+        ('\u{fb4e}', &['\u{5e4}', '\u{5bf}']), ('\u{1109a}', &['\u{11099}', '\u{110ba}']),
+        ('\u{1109c}', &['\u{1109b}', '\u{110ba}']), ('\u{110ab}', &['\u{110a5}', '\u{110ba}']),
+        ('\u{1112e}', &['\u{11131}', '\u{11127}']), ('\u{1112f}', &['\u{11132}', '\u{11127}']),
+        ('\u{1134b}', &['\u{11347}', '\u{1133e}']), ('\u{1134c}', &['\u{11347}', '\u{11357}']),
+        ('\u{114bb}', &['\u{114b9}', '\u{114ba}']), ('\u{114bc}', &['\u{114b9}', '\u{114b0}']),
+        ('\u{114be}', &['\u{114b9}', '\u{114bd}']), ('\u{115ba}', &['\u{115b8}', '\u{115af}']),
+        ('\u{115bb}', &['\u{115b9}', '\u{115af}']), ('\u{1d15e}', &['\u{1d157}', '\u{1d165}']),
+        ('\u{1d15f}', &['\u{1d158}', '\u{1d165}']), ('\u{1d160}', &['\u{1d15f}', '\u{1d16e}']),
+        ('\u{1d161}', &['\u{1d15f}', '\u{1d16f}']), ('\u{1d162}', &['\u{1d15f}', '\u{1d170}']),
+        ('\u{1d163}', &['\u{1d15f}', '\u{1d171}']), ('\u{1d164}', &['\u{1d15f}', '\u{1d172}']),
+        ('\u{1d1bb}', &['\u{1d1b9}', '\u{1d165}']), ('\u{1d1bc}', &['\u{1d1ba}', '\u{1d165}']),
+        ('\u{1d1bd}', &['\u{1d1bb}', '\u{1d16e}']), ('\u{1d1be}', &['\u{1d1bc}', '\u{1d16e}']),
+        ('\u{1d1bf}', &['\u{1d1bb}', '\u{1d16f}']), ('\u{1d1c0}', &['\u{1d1bc}', '\u{1d16f}']),
+        ('\u{2f800}', &['\u{4e3d}']), ('\u{2f801}', &['\u{4e38}']), ('\u{2f802}', &['\u{4e41}']),
+        ('\u{2f803}', &['\u{20122}']), ('\u{2f804}', &['\u{4f60}']), ('\u{2f805}', &['\u{4fae}']),
+        ('\u{2f806}', &['\u{4fbb}']), ('\u{2f807}', &['\u{5002}']), ('\u{2f808}', &['\u{507a}']),
+        ('\u{2f809}', &['\u{5099}']), ('\u{2f80a}', &['\u{50e7}']), ('\u{2f80b}', &['\u{50cf}']),
+        ('\u{2f80c}', &['\u{349e}']), ('\u{2f80d}', &['\u{2063a}']), ('\u{2f80e}', &['\u{514d}']),
+        ('\u{2f80f}', &['\u{5154}']), ('\u{2f810}', &['\u{5164}']), ('\u{2f811}', &['\u{5177}']),
+        ('\u{2f812}', &['\u{2051c}']), ('\u{2f813}', &['\u{34b9}']), ('\u{2f814}', &['\u{5167}']),
+        ('\u{2f815}', &['\u{518d}']), ('\u{2f816}', &['\u{2054b}']), ('\u{2f817}', &['\u{5197}']),
+        ('\u{2f818}', &['\u{51a4}']), ('\u{2f819}', &['\u{4ecc}']), ('\u{2f81a}', &['\u{51ac}']),
+        ('\u{2f81b}', &['\u{51b5}']), ('\u{2f81c}', &['\u{291df}']), ('\u{2f81d}', &['\u{51f5}']),
+        ('\u{2f81e}', &['\u{5203}']), ('\u{2f81f}', &['\u{34df}']), ('\u{2f820}', &['\u{523b}']),
+        ('\u{2f821}', &['\u{5246}']), ('\u{2f822}', &['\u{5272}']), ('\u{2f823}', &['\u{5277}']),
+        ('\u{2f824}', &['\u{3515}']), ('\u{2f825}', &['\u{52c7}']), ('\u{2f826}', &['\u{52c9}']),
+        ('\u{2f827}', &['\u{52e4}']), ('\u{2f828}', &['\u{52fa}']), ('\u{2f829}', &['\u{5305}']),
+        ('\u{2f82a}', &['\u{5306}']), ('\u{2f82b}', &['\u{5317}']), ('\u{2f82c}', &['\u{5349}']),
+        ('\u{2f82d}', &['\u{5351}']), ('\u{2f82e}', &['\u{535a}']), ('\u{2f82f}', &['\u{5373}']),
+        ('\u{2f830}', &['\u{537d}']), ('\u{2f831}', &['\u{537f}']), ('\u{2f832}', &['\u{537f}']),
+        ('\u{2f833}', &['\u{537f}']), ('\u{2f834}', &['\u{20a2c}']), ('\u{2f835}', &['\u{7070}']),
+        ('\u{2f836}', &['\u{53ca}']), ('\u{2f837}', &['\u{53df}']), ('\u{2f838}', &['\u{20b63}']),
+        ('\u{2f839}', &['\u{53eb}']), ('\u{2f83a}', &['\u{53f1}']), ('\u{2f83b}', &['\u{5406}']),
+        ('\u{2f83c}', &['\u{549e}']), ('\u{2f83d}', &['\u{5438}']), ('\u{2f83e}', &['\u{5448}']),
+        ('\u{2f83f}', &['\u{5468}']), ('\u{2f840}', &['\u{54a2}']), ('\u{2f841}', &['\u{54f6}']),
+        ('\u{2f842}', &['\u{5510}']), ('\u{2f843}', &['\u{5553}']), ('\u{2f844}', &['\u{5563}']),
+        ('\u{2f845}', &['\u{5584}']), ('\u{2f846}', &['\u{5584}']), ('\u{2f847}', &['\u{5599}']),
+        ('\u{2f848}', &['\u{55ab}']), ('\u{2f849}', &['\u{55b3}']), ('\u{2f84a}', &['\u{55c2}']),
+        ('\u{2f84b}', &['\u{5716}']), ('\u{2f84c}', &['\u{5606}']), ('\u{2f84d}', &['\u{5717}']),
+        ('\u{2f84e}', &['\u{5651}']), ('\u{2f84f}', &['\u{5674}']), ('\u{2f850}', &['\u{5207}']),
+        ('\u{2f851}', &['\u{58ee}']), ('\u{2f852}', &['\u{57ce}']), ('\u{2f853}', &['\u{57f4}']),
+        ('\u{2f854}', &['\u{580d}']), ('\u{2f855}', &['\u{578b}']), ('\u{2f856}', &['\u{5832}']),
+        ('\u{2f857}', &['\u{5831}']), ('\u{2f858}', &['\u{58ac}']), ('\u{2f859}', &['\u{214e4}']),
+        ('\u{2f85a}', &['\u{58f2}']), ('\u{2f85b}', &['\u{58f7}']), ('\u{2f85c}', &['\u{5906}']),
+        ('\u{2f85d}', &['\u{591a}']), ('\u{2f85e}', &['\u{5922}']), ('\u{2f85f}', &['\u{5962}']),
+        ('\u{2f860}', &['\u{216a8}']), ('\u{2f861}', &['\u{216ea}']), ('\u{2f862}', &['\u{59ec}']),
+        ('\u{2f863}', &['\u{5a1b}']), ('\u{2f864}', &['\u{5a27}']), ('\u{2f865}', &['\u{59d8}']),
+        ('\u{2f866}', &['\u{5a66}']), ('\u{2f867}', &['\u{36ee}']), ('\u{2f868}', &['\u{36fc}']),
+        ('\u{2f869}', &['\u{5b08}']), ('\u{2f86a}', &['\u{5b3e}']), ('\u{2f86b}', &['\u{5b3e}']),
+        ('\u{2f86c}', &['\u{219c8}']), ('\u{2f86d}', &['\u{5bc3}']), ('\u{2f86e}', &['\u{5bd8}']),
+        ('\u{2f86f}', &['\u{5be7}']), ('\u{2f870}', &['\u{5bf3}']), ('\u{2f871}', &['\u{21b18}']),
+        ('\u{2f872}', &['\u{5bff}']), ('\u{2f873}', &['\u{5c06}']), ('\u{2f874}', &['\u{5f53}']),
+        ('\u{2f875}', &['\u{5c22}']), ('\u{2f876}', &['\u{3781}']), ('\u{2f877}', &['\u{5c60}']),
+        ('\u{2f878}', &['\u{5c6e}']), ('\u{2f879}', &['\u{5cc0}']), ('\u{2f87a}', &['\u{5c8d}']),
+        ('\u{2f87b}', &['\u{21de4}']), ('\u{2f87c}', &['\u{5d43}']), ('\u{2f87d}', &['\u{21de6}']),
+        ('\u{2f87e}', &['\u{5d6e}']), ('\u{2f87f}', &['\u{5d6b}']), ('\u{2f880}', &['\u{5d7c}']),
+        ('\u{2f881}', &['\u{5de1}']), ('\u{2f882}', &['\u{5de2}']), ('\u{2f883}', &['\u{382f}']),
+        ('\u{2f884}', &['\u{5dfd}']), ('\u{2f885}', &['\u{5e28}']), ('\u{2f886}', &['\u{5e3d}']),
+        ('\u{2f887}', &['\u{5e69}']), ('\u{2f888}', &['\u{3862}']), ('\u{2f889}', &['\u{22183}']),
+        ('\u{2f88a}', &['\u{387c}']), ('\u{2f88b}', &['\u{5eb0}']), ('\u{2f88c}', &['\u{5eb3}']),
+        ('\u{2f88d}', &['\u{5eb6}']), ('\u{2f88e}', &['\u{5eca}']), ('\u{2f88f}', &['\u{2a392}']),
+        ('\u{2f890}', &['\u{5efe}']), ('\u{2f891}', &['\u{22331}']), ('\u{2f892}', &['\u{22331}']),
+        ('\u{2f893}', &['\u{8201}']), ('\u{2f894}', &['\u{5f22}']), ('\u{2f895}', &['\u{5f22}']),
+        ('\u{2f896}', &['\u{38c7}']), ('\u{2f897}', &['\u{232b8}']), ('\u{2f898}', &['\u{261da}']),
+        ('\u{2f899}', &['\u{5f62}']), ('\u{2f89a}', &['\u{5f6b}']), ('\u{2f89b}', &['\u{38e3}']),
+        ('\u{2f89c}', &['\u{5f9a}']), ('\u{2f89d}', &['\u{5fcd}']), ('\u{2f89e}', &['\u{5fd7}']),
+        ('\u{2f89f}', &['\u{5ff9}']), ('\u{2f8a0}', &['\u{6081}']), ('\u{2f8a1}', &['\u{393a}']),
+        ('\u{2f8a2}', &['\u{391c}']), ('\u{2f8a3}', &['\u{6094}']), ('\u{2f8a4}', &['\u{226d4}']),
+        ('\u{2f8a5}', &['\u{60c7}']), ('\u{2f8a6}', &['\u{6148}']), ('\u{2f8a7}', &['\u{614c}']),
+        ('\u{2f8a8}', &['\u{614e}']), ('\u{2f8a9}', &['\u{614c}']), ('\u{2f8aa}', &['\u{617a}']),
+        ('\u{2f8ab}', &['\u{618e}']), ('\u{2f8ac}', &['\u{61b2}']), ('\u{2f8ad}', &['\u{61a4}']),
+        ('\u{2f8ae}', &['\u{61af}']), ('\u{2f8af}', &['\u{61de}']), ('\u{2f8b0}', &['\u{61f2}']),
+        ('\u{2f8b1}', &['\u{61f6}']), ('\u{2f8b2}', &['\u{6210}']), ('\u{2f8b3}', &['\u{621b}']),
+        ('\u{2f8b4}', &['\u{625d}']), ('\u{2f8b5}', &['\u{62b1}']), ('\u{2f8b6}', &['\u{62d4}']),
+        ('\u{2f8b7}', &['\u{6350}']), ('\u{2f8b8}', &['\u{22b0c}']), ('\u{2f8b9}', &['\u{633d}']),
+        ('\u{2f8ba}', &['\u{62fc}']), ('\u{2f8bb}', &['\u{6368}']), ('\u{2f8bc}', &['\u{6383}']),
+        ('\u{2f8bd}', &['\u{63e4}']), ('\u{2f8be}', &['\u{22bf1}']), ('\u{2f8bf}', &['\u{6422}']),
+        ('\u{2f8c0}', &['\u{63c5}']), ('\u{2f8c1}', &['\u{63a9}']), ('\u{2f8c2}', &['\u{3a2e}']),
+        ('\u{2f8c3}', &['\u{6469}']), ('\u{2f8c4}', &['\u{647e}']), ('\u{2f8c5}', &['\u{649d}']),
+        ('\u{2f8c6}', &['\u{6477}']), ('\u{2f8c7}', &['\u{3a6c}']), ('\u{2f8c8}', &['\u{654f}']),
+        ('\u{2f8c9}', &['\u{656c}']), ('\u{2f8ca}', &['\u{2300a}']), ('\u{2f8cb}', &['\u{65e3}']),
+        ('\u{2f8cc}', &['\u{66f8}']), ('\u{2f8cd}', &['\u{6649}']), ('\u{2f8ce}', &['\u{3b19}']),
+        ('\u{2f8cf}', &['\u{6691}']), ('\u{2f8d0}', &['\u{3b08}']), ('\u{2f8d1}', &['\u{3ae4}']),
+        ('\u{2f8d2}', &['\u{5192}']), ('\u{2f8d3}', &['\u{5195}']), ('\u{2f8d4}', &['\u{6700}']),
+        ('\u{2f8d5}', &['\u{669c}']), ('\u{2f8d6}', &['\u{80ad}']), ('\u{2f8d7}', &['\u{43d9}']),
+        ('\u{2f8d8}', &['\u{6717}']), ('\u{2f8d9}', &['\u{671b}']), ('\u{2f8da}', &['\u{6721}']),
+        ('\u{2f8db}', &['\u{675e}']), ('\u{2f8dc}', &['\u{6753}']), ('\u{2f8dd}', &['\u{233c3}']),
+        ('\u{2f8de}', &['\u{3b49}']), ('\u{2f8df}', &['\u{67fa}']), ('\u{2f8e0}', &['\u{6785}']),
+        ('\u{2f8e1}', &['\u{6852}']), ('\u{2f8e2}', &['\u{6885}']), ('\u{2f8e3}', &['\u{2346d}']),
+        ('\u{2f8e4}', &['\u{688e}']), ('\u{2f8e5}', &['\u{681f}']), ('\u{2f8e6}', &['\u{6914}']),
+        ('\u{2f8e7}', &['\u{3b9d}']), ('\u{2f8e8}', &['\u{6942}']), ('\u{2f8e9}', &['\u{69a3}']),
+        ('\u{2f8ea}', &['\u{69ea}']), ('\u{2f8eb}', &['\u{6aa8}']), ('\u{2f8ec}', &['\u{236a3}']),
+        ('\u{2f8ed}', &['\u{6adb}']), ('\u{2f8ee}', &['\u{3c18}']), ('\u{2f8ef}', &['\u{6b21}']),
+        ('\u{2f8f0}', &['\u{238a7}']), ('\u{2f8f1}', &['\u{6b54}']), ('\u{2f8f2}', &['\u{3c4e}']),
+        ('\u{2f8f3}', &['\u{6b72}']), ('\u{2f8f4}', &['\u{6b9f}']), ('\u{2f8f5}', &['\u{6bba}']),
+        ('\u{2f8f6}', &['\u{6bbb}']), ('\u{2f8f7}', &['\u{23a8d}']), ('\u{2f8f8}', &['\u{21d0b}']),
+        ('\u{2f8f9}', &['\u{23afa}']), ('\u{2f8fa}', &['\u{6c4e}']), ('\u{2f8fb}', &['\u{23cbc}']),
+        ('\u{2f8fc}', &['\u{6cbf}']), ('\u{2f8fd}', &['\u{6ccd}']), ('\u{2f8fe}', &['\u{6c67}']),
+        ('\u{2f8ff}', &['\u{6d16}']), ('\u{2f900}', &['\u{6d3e}']), ('\u{2f901}', &['\u{6d77}']),
+        ('\u{2f902}', &['\u{6d41}']), ('\u{2f903}', &['\u{6d69}']), ('\u{2f904}', &['\u{6d78}']),
+        ('\u{2f905}', &['\u{6d85}']), ('\u{2f906}', &['\u{23d1e}']), ('\u{2f907}', &['\u{6d34}']),
+        ('\u{2f908}', &['\u{6e2f}']), ('\u{2f909}', &['\u{6e6e}']), ('\u{2f90a}', &['\u{3d33}']),
+        ('\u{2f90b}', &['\u{6ecb}']), ('\u{2f90c}', &['\u{6ec7}']), ('\u{2f90d}', &['\u{23ed1}']),
+        ('\u{2f90e}', &['\u{6df9}']), ('\u{2f90f}', &['\u{6f6e}']), ('\u{2f910}', &['\u{23f5e}']),
+        ('\u{2f911}', &['\u{23f8e}']), ('\u{2f912}', &['\u{6fc6}']), ('\u{2f913}', &['\u{7039}']),
+        ('\u{2f914}', &['\u{701e}']), ('\u{2f915}', &['\u{701b}']), ('\u{2f916}', &['\u{3d96}']),
+        ('\u{2f917}', &['\u{704a}']), ('\u{2f918}', &['\u{707d}']), ('\u{2f919}', &['\u{7077}']),
+        ('\u{2f91a}', &['\u{70ad}']), ('\u{2f91b}', &['\u{20525}']), ('\u{2f91c}', &['\u{7145}']),
+        ('\u{2f91d}', &['\u{24263}']), ('\u{2f91e}', &['\u{719c}']), ('\u{2f91f}', &['\u{243ab}']),
+        ('\u{2f920}', &['\u{7228}']), ('\u{2f921}', &['\u{7235}']), ('\u{2f922}', &['\u{7250}']),
+        ('\u{2f923}', &['\u{24608}']), ('\u{2f924}', &['\u{7280}']), ('\u{2f925}', &['\u{7295}']),
+        ('\u{2f926}', &['\u{24735}']), ('\u{2f927}', &['\u{24814}']), ('\u{2f928}', &['\u{737a}']),
+        ('\u{2f929}', &['\u{738b}']), ('\u{2f92a}', &['\u{3eac}']), ('\u{2f92b}', &['\u{73a5}']),
+        ('\u{2f92c}', &['\u{3eb8}']), ('\u{2f92d}', &['\u{3eb8}']), ('\u{2f92e}', &['\u{7447}']),
+        ('\u{2f92f}', &['\u{745c}']), ('\u{2f930}', &['\u{7471}']), ('\u{2f931}', &['\u{7485}']),
+        ('\u{2f932}', &['\u{74ca}']), ('\u{2f933}', &['\u{3f1b}']), ('\u{2f934}', &['\u{7524}']),
+        ('\u{2f935}', &['\u{24c36}']), ('\u{2f936}', &['\u{753e}']), ('\u{2f937}', &['\u{24c92}']),
+        ('\u{2f938}', &['\u{7570}']), ('\u{2f939}', &['\u{2219f}']), ('\u{2f93a}', &['\u{7610}']),
+        ('\u{2f93b}', &['\u{24fa1}']), ('\u{2f93c}', &['\u{24fb8}']), ('\u{2f93d}', &['\u{25044}']),
+        ('\u{2f93e}', &['\u{3ffc}']), ('\u{2f93f}', &['\u{4008}']), ('\u{2f940}', &['\u{76f4}']),
+        ('\u{2f941}', &['\u{250f3}']), ('\u{2f942}', &['\u{250f2}']), ('\u{2f943}', &['\u{25119}']),
+        ('\u{2f944}', &['\u{25133}']), ('\u{2f945}', &['\u{771e}']), ('\u{2f946}', &['\u{771f}']),
+        ('\u{2f947}', &['\u{771f}']), ('\u{2f948}', &['\u{774a}']), ('\u{2f949}', &['\u{4039}']),
+        ('\u{2f94a}', &['\u{778b}']), ('\u{2f94b}', &['\u{4046}']), ('\u{2f94c}', &['\u{4096}']),
+        ('\u{2f94d}', &['\u{2541d}']), ('\u{2f94e}', &['\u{784e}']), ('\u{2f94f}', &['\u{788c}']),
+        ('\u{2f950}', &['\u{78cc}']), ('\u{2f951}', &['\u{40e3}']), ('\u{2f952}', &['\u{25626}']),
+        ('\u{2f953}', &['\u{7956}']), ('\u{2f954}', &['\u{2569a}']), ('\u{2f955}', &['\u{256c5}']),
+        ('\u{2f956}', &['\u{798f}']), ('\u{2f957}', &['\u{79eb}']), ('\u{2f958}', &['\u{412f}']),
+        ('\u{2f959}', &['\u{7a40}']), ('\u{2f95a}', &['\u{7a4a}']), ('\u{2f95b}', &['\u{7a4f}']),
+        ('\u{2f95c}', &['\u{2597c}']), ('\u{2f95d}', &['\u{25aa7}']), ('\u{2f95e}', &['\u{25aa7}']),
+        ('\u{2f95f}', &['\u{7aee}']), ('\u{2f960}', &['\u{4202}']), ('\u{2f961}', &['\u{25bab}']),
+        ('\u{2f962}', &['\u{7bc6}']), ('\u{2f963}', &['\u{7bc9}']), ('\u{2f964}', &['\u{4227}']),
+        ('\u{2f965}', &['\u{25c80}']), ('\u{2f966}', &['\u{7cd2}']), ('\u{2f967}', &['\u{42a0}']),
+        ('\u{2f968}', &['\u{7ce8}']), ('\u{2f969}', &['\u{7ce3}']), ('\u{2f96a}', &['\u{7d00}']),
+        ('\u{2f96b}', &['\u{25f86}']), ('\u{2f96c}', &['\u{7d63}']), ('\u{2f96d}', &['\u{4301}']),
+        ('\u{2f96e}', &['\u{7dc7}']), ('\u{2f96f}', &['\u{7e02}']), ('\u{2f970}', &['\u{7e45}']),
+        ('\u{2f971}', &['\u{4334}']), ('\u{2f972}', &['\u{26228}']), ('\u{2f973}', &['\u{26247}']),
+        ('\u{2f974}', &['\u{4359}']), ('\u{2f975}', &['\u{262d9}']), ('\u{2f976}', &['\u{7f7a}']),
+        ('\u{2f977}', &['\u{2633e}']), ('\u{2f978}', &['\u{7f95}']), ('\u{2f979}', &['\u{7ffa}']),
+        ('\u{2f97a}', &['\u{8005}']), ('\u{2f97b}', &['\u{264da}']), ('\u{2f97c}', &['\u{26523}']),
+        ('\u{2f97d}', &['\u{8060}']), ('\u{2f97e}', &['\u{265a8}']), ('\u{2f97f}', &['\u{8070}']),
+        ('\u{2f980}', &['\u{2335f}']), ('\u{2f981}', &['\u{43d5}']), ('\u{2f982}', &['\u{80b2}']),
+        ('\u{2f983}', &['\u{8103}']), ('\u{2f984}', &['\u{440b}']), ('\u{2f985}', &['\u{813e}']),
+        ('\u{2f986}', &['\u{5ab5}']), ('\u{2f987}', &['\u{267a7}']), ('\u{2f988}', &['\u{267b5}']),
+        ('\u{2f989}', &['\u{23393}']), ('\u{2f98a}', &['\u{2339c}']), ('\u{2f98b}', &['\u{8201}']),
+        ('\u{2f98c}', &['\u{8204}']), ('\u{2f98d}', &['\u{8f9e}']), ('\u{2f98e}', &['\u{446b}']),
+        ('\u{2f98f}', &['\u{8291}']), ('\u{2f990}', &['\u{828b}']), ('\u{2f991}', &['\u{829d}']),
+        ('\u{2f992}', &['\u{52b3}']), ('\u{2f993}', &['\u{82b1}']), ('\u{2f994}', &['\u{82b3}']),
+        ('\u{2f995}', &['\u{82bd}']), ('\u{2f996}', &['\u{82e6}']), ('\u{2f997}', &['\u{26b3c}']),
+        ('\u{2f998}', &['\u{82e5}']), ('\u{2f999}', &['\u{831d}']), ('\u{2f99a}', &['\u{8363}']),
+        ('\u{2f99b}', &['\u{83ad}']), ('\u{2f99c}', &['\u{8323}']), ('\u{2f99d}', &['\u{83bd}']),
+        ('\u{2f99e}', &['\u{83e7}']), ('\u{2f99f}', &['\u{8457}']), ('\u{2f9a0}', &['\u{8353}']),
+        ('\u{2f9a1}', &['\u{83ca}']), ('\u{2f9a2}', &['\u{83cc}']), ('\u{2f9a3}', &['\u{83dc}']),
+        ('\u{2f9a4}', &['\u{26c36}']), ('\u{2f9a5}', &['\u{26d6b}']), ('\u{2f9a6}', &['\u{26cd5}']),
+        ('\u{2f9a7}', &['\u{452b}']), ('\u{2f9a8}', &['\u{84f1}']), ('\u{2f9a9}', &['\u{84f3}']),
+        ('\u{2f9aa}', &['\u{8516}']), ('\u{2f9ab}', &['\u{273ca}']), ('\u{2f9ac}', &['\u{8564}']),
+        ('\u{2f9ad}', &['\u{26f2c}']), ('\u{2f9ae}', &['\u{455d}']), ('\u{2f9af}', &['\u{4561}']),
+        ('\u{2f9b0}', &['\u{26fb1}']), ('\u{2f9b1}', &['\u{270d2}']), ('\u{2f9b2}', &['\u{456b}']),
+        ('\u{2f9b3}', &['\u{8650}']), ('\u{2f9b4}', &['\u{865c}']), ('\u{2f9b5}', &['\u{8667}']),
+        ('\u{2f9b6}', &['\u{8669}']), ('\u{2f9b7}', &['\u{86a9}']), ('\u{2f9b8}', &['\u{8688}']),
+        ('\u{2f9b9}', &['\u{870e}']), ('\u{2f9ba}', &['\u{86e2}']), ('\u{2f9bb}', &['\u{8779}']),
+        ('\u{2f9bc}', &['\u{8728}']), ('\u{2f9bd}', &['\u{876b}']), ('\u{2f9be}', &['\u{8786}']),
+        ('\u{2f9bf}', &['\u{45d7}']), ('\u{2f9c0}', &['\u{87e1}']), ('\u{2f9c1}', &['\u{8801}']),
+        ('\u{2f9c2}', &['\u{45f9}']), ('\u{2f9c3}', &['\u{8860}']), ('\u{2f9c4}', &['\u{8863}']),
+        ('\u{2f9c5}', &['\u{27667}']), ('\u{2f9c6}', &['\u{88d7}']), ('\u{2f9c7}', &['\u{88de}']),
+        ('\u{2f9c8}', &['\u{4635}']), ('\u{2f9c9}', &['\u{88fa}']), ('\u{2f9ca}', &['\u{34bb}']),
+        ('\u{2f9cb}', &['\u{278ae}']), ('\u{2f9cc}', &['\u{27966}']), ('\u{2f9cd}', &['\u{46be}']),
+        ('\u{2f9ce}', &['\u{46c7}']), ('\u{2f9cf}', &['\u{8aa0}']), ('\u{2f9d0}', &['\u{8aed}']),
+        ('\u{2f9d1}', &['\u{8b8a}']), ('\u{2f9d2}', &['\u{8c55}']), ('\u{2f9d3}', &['\u{27ca8}']),
+        ('\u{2f9d4}', &['\u{8cab}']), ('\u{2f9d5}', &['\u{8cc1}']), ('\u{2f9d6}', &['\u{8d1b}']),
+        ('\u{2f9d7}', &['\u{8d77}']), ('\u{2f9d8}', &['\u{27f2f}']), ('\u{2f9d9}', &['\u{20804}']),
+        ('\u{2f9da}', &['\u{8dcb}']), ('\u{2f9db}', &['\u{8dbc}']), ('\u{2f9dc}', &['\u{8df0}']),
+        ('\u{2f9dd}', &['\u{208de}']), ('\u{2f9de}', &['\u{8ed4}']), ('\u{2f9df}', &['\u{8f38}']),
+        ('\u{2f9e0}', &['\u{285d2}']), ('\u{2f9e1}', &['\u{285ed}']), ('\u{2f9e2}', &['\u{9094}']),
+        ('\u{2f9e3}', &['\u{90f1}']), ('\u{2f9e4}', &['\u{9111}']), ('\u{2f9e5}', &['\u{2872e}']),
+        ('\u{2f9e6}', &['\u{911b}']), ('\u{2f9e7}', &['\u{9238}']), ('\u{2f9e8}', &['\u{92d7}']),
+        ('\u{2f9e9}', &['\u{92d8}']), ('\u{2f9ea}', &['\u{927c}']), ('\u{2f9eb}', &['\u{93f9}']),
+        ('\u{2f9ec}', &['\u{9415}']), ('\u{2f9ed}', &['\u{28bfa}']), ('\u{2f9ee}', &['\u{958b}']),
+        ('\u{2f9ef}', &['\u{4995}']), ('\u{2f9f0}', &['\u{95b7}']), ('\u{2f9f1}', &['\u{28d77}']),
+        ('\u{2f9f2}', &['\u{49e6}']), ('\u{2f9f3}', &['\u{96c3}']), ('\u{2f9f4}', &['\u{5db2}']),
+        ('\u{2f9f5}', &['\u{9723}']), ('\u{2f9f6}', &['\u{29145}']), ('\u{2f9f7}', &['\u{2921a}']),
+        ('\u{2f9f8}', &['\u{4a6e}']), ('\u{2f9f9}', &['\u{4a76}']), ('\u{2f9fa}', &['\u{97e0}']),
+        ('\u{2f9fb}', &['\u{2940a}']), ('\u{2f9fc}', &['\u{4ab2}']), ('\u{2f9fd}', &['\u{29496}']),
+        ('\u{2f9fe}', &['\u{980b}']), ('\u{2f9ff}', &['\u{980b}']), ('\u{2fa00}', &['\u{9829}']),
+        ('\u{2fa01}', &['\u{295b6}']), ('\u{2fa02}', &['\u{98e2}']), ('\u{2fa03}', &['\u{4b33}']),
+        ('\u{2fa04}', &['\u{9929}']), ('\u{2fa05}', &['\u{99a7}']), ('\u{2fa06}', &['\u{99c2}']),
+        ('\u{2fa07}', &['\u{99fe}']), ('\u{2fa08}', &['\u{4bce}']), ('\u{2fa09}', &['\u{29b30}']),
+        ('\u{2fa0a}', &['\u{9b12}']), ('\u{2fa0b}', &['\u{9c40}']), ('\u{2fa0c}', &['\u{9cfd}']),
+        ('\u{2fa0d}', &['\u{4cce}']), ('\u{2fa0e}', &['\u{4ced}']), ('\u{2fa0f}', &['\u{9d67}']),
+        ('\u{2fa10}', &['\u{2a0ce}']), ('\u{2fa11}', &['\u{4cf8}']), ('\u{2fa12}', &['\u{2a105}']),
+        ('\u{2fa13}', &['\u{2a20e}']), ('\u{2fa14}', &['\u{2a291}']), ('\u{2fa15}', &['\u{9ebb}']),
+        ('\u{2fa16}', &['\u{4d56}']), ('\u{2fa17}', &['\u{9ef9}']), ('\u{2fa18}', &['\u{9efe}']),
+        ('\u{2fa19}', &['\u{9f05}']), ('\u{2fa1a}', &['\u{9f0f}']), ('\u{2fa1b}', &['\u{9f16}']),
+        ('\u{2fa1c}', &['\u{9f3b}']), ('\u{2fa1d}', &['\u{2a600}'])
     ];
 
     // Compatibility decompositions
     pub static compatibility_table: &'static [(char, &'static [char])] = &[
-        ('\u00a0', &['\x20']), ('\u00a8', &['\x20', '\u0308']), ('\u00aa', &['\x61']), ('\u00af',
-        &['\x20', '\u0304']), ('\u00b2', &['\x32']), ('\u00b3', &['\x33']), ('\u00b4', &['\x20',
-        '\u0301']), ('\u00b5', &['\u03bc']), ('\u00b8', &['\x20', '\u0327']), ('\u00b9', &['\x31']),
-        ('\u00ba', &['\x6f']), ('\u00bc', &['\x31', '\u2044', '\x34']), ('\u00bd', &['\x31',
-        '\u2044', '\x32']), ('\u00be', &['\x33', '\u2044', '\x34']), ('\u0132', &['\x49', '\x4a']),
-        ('\u0133', &['\x69', '\x6a']), ('\u013f', &['\x4c', '\u00b7']), ('\u0140', &['\x6c',
-        '\u00b7']), ('\u0149', &['\u02bc', '\x6e']), ('\u017f', &['\x73']), ('\u01c4', &['\x44',
-        '\u017d']), ('\u01c5', &['\x44', '\u017e']), ('\u01c6', &['\x64', '\u017e']), ('\u01c7',
-        &['\x4c', '\x4a']), ('\u01c8', &['\x4c', '\x6a']), ('\u01c9', &['\x6c', '\x6a']), ('\u01ca',
-        &['\x4e', '\x4a']), ('\u01cb', &['\x4e', '\x6a']), ('\u01cc', &['\x6e', '\x6a']), ('\u01f1',
-        &['\x44', '\x5a']), ('\u01f2', &['\x44', '\x7a']), ('\u01f3', &['\x64', '\x7a']), ('\u02b0',
-        &['\x68']), ('\u02b1', &['\u0266']), ('\u02b2', &['\x6a']), ('\u02b3', &['\x72']),
-        ('\u02b4', &['\u0279']), ('\u02b5', &['\u027b']), ('\u02b6', &['\u0281']), ('\u02b7',
-        &['\x77']), ('\u02b8', &['\x79']), ('\u02d8', &['\x20', '\u0306']), ('\u02d9', &['\x20',
-        '\u0307']), ('\u02da', &['\x20', '\u030a']), ('\u02db', &['\x20', '\u0328']), ('\u02dc',
-        &['\x20', '\u0303']), ('\u02dd', &['\x20', '\u030b']), ('\u02e0', &['\u0263']), ('\u02e1',
-        &['\x6c']), ('\u02e2', &['\x73']), ('\u02e3', &['\x78']), ('\u02e4', &['\u0295']),
-        ('\u037a', &['\x20', '\u0345']), ('\u0384', &['\x20', '\u0301']), ('\u03d0', &['\u03b2']),
-        ('\u03d1', &['\u03b8']), ('\u03d2', &['\u03a5']), ('\u03d5', &['\u03c6']), ('\u03d6',
-        &['\u03c0']), ('\u03f0', &['\u03ba']), ('\u03f1', &['\u03c1']), ('\u03f2', &['\u03c2']),
-        ('\u03f4', &['\u0398']), ('\u03f5', &['\u03b5']), ('\u03f9', &['\u03a3']), ('\u0587',
-        &['\u0565', '\u0582']), ('\u0675', &['\u0627', '\u0674']), ('\u0676', &['\u0648',
-        '\u0674']), ('\u0677', &['\u06c7', '\u0674']), ('\u0678', &['\u064a', '\u0674']), ('\u0e33',
-        &['\u0e4d', '\u0e32']), ('\u0eb3', &['\u0ecd', '\u0eb2']), ('\u0edc', &['\u0eab',
-        '\u0e99']), ('\u0edd', &['\u0eab', '\u0ea1']), ('\u0f0c', &['\u0f0b']), ('\u0f77',
-        &['\u0fb2', '\u0f81']), ('\u0f79', &['\u0fb3', '\u0f81']), ('\u10fc', &['\u10dc']),
-        ('\u1d2c', &['\x41']), ('\u1d2d', &['\u00c6']), ('\u1d2e', &['\x42']), ('\u1d30',
-        &['\x44']), ('\u1d31', &['\x45']), ('\u1d32', &['\u018e']), ('\u1d33', &['\x47']),
-        ('\u1d34', &['\x48']), ('\u1d35', &['\x49']), ('\u1d36', &['\x4a']), ('\u1d37', &['\x4b']),
-        ('\u1d38', &['\x4c']), ('\u1d39', &['\x4d']), ('\u1d3a', &['\x4e']), ('\u1d3c', &['\x4f']),
-        ('\u1d3d', &['\u0222']), ('\u1d3e', &['\x50']), ('\u1d3f', &['\x52']), ('\u1d40',
-        &['\x54']), ('\u1d41', &['\x55']), ('\u1d42', &['\x57']), ('\u1d43', &['\x61']), ('\u1d44',
-        &['\u0250']), ('\u1d45', &['\u0251']), ('\u1d46', &['\u1d02']), ('\u1d47', &['\x62']),
-        ('\u1d48', &['\x64']), ('\u1d49', &['\x65']), ('\u1d4a', &['\u0259']), ('\u1d4b',
-        &['\u025b']), ('\u1d4c', &['\u025c']), ('\u1d4d', &['\x67']), ('\u1d4f', &['\x6b']),
-        ('\u1d50', &['\x6d']), ('\u1d51', &['\u014b']), ('\u1d52', &['\x6f']), ('\u1d53',
-        &['\u0254']), ('\u1d54', &['\u1d16']), ('\u1d55', &['\u1d17']), ('\u1d56', &['\x70']),
-        ('\u1d57', &['\x74']), ('\u1d58', &['\x75']), ('\u1d59', &['\u1d1d']), ('\u1d5a',
-        &['\u026f']), ('\u1d5b', &['\x76']), ('\u1d5c', &['\u1d25']), ('\u1d5d', &['\u03b2']),
-        ('\u1d5e', &['\u03b3']), ('\u1d5f', &['\u03b4']), ('\u1d60', &['\u03c6']), ('\u1d61',
-        &['\u03c7']), ('\u1d62', &['\x69']), ('\u1d63', &['\x72']), ('\u1d64', &['\x75']),
-        ('\u1d65', &['\x76']), ('\u1d66', &['\u03b2']), ('\u1d67', &['\u03b3']), ('\u1d68',
-        &['\u03c1']), ('\u1d69', &['\u03c6']), ('\u1d6a', &['\u03c7']), ('\u1d78', &['\u043d']),
-        ('\u1d9b', &['\u0252']), ('\u1d9c', &['\x63']), ('\u1d9d', &['\u0255']), ('\u1d9e',
-        &['\u00f0']), ('\u1d9f', &['\u025c']), ('\u1da0', &['\x66']), ('\u1da1', &['\u025f']),
-        ('\u1da2', &['\u0261']), ('\u1da3', &['\u0265']), ('\u1da4', &['\u0268']), ('\u1da5',
-        &['\u0269']), ('\u1da6', &['\u026a']), ('\u1da7', &['\u1d7b']), ('\u1da8', &['\u029d']),
-        ('\u1da9', &['\u026d']), ('\u1daa', &['\u1d85']), ('\u1dab', &['\u029f']), ('\u1dac',
-        &['\u0271']), ('\u1dad', &['\u0270']), ('\u1dae', &['\u0272']), ('\u1daf', &['\u0273']),
-        ('\u1db0', &['\u0274']), ('\u1db1', &['\u0275']), ('\u1db2', &['\u0278']), ('\u1db3',
-        &['\u0282']), ('\u1db4', &['\u0283']), ('\u1db5', &['\u01ab']), ('\u1db6', &['\u0289']),
-        ('\u1db7', &['\u028a']), ('\u1db8', &['\u1d1c']), ('\u1db9', &['\u028b']), ('\u1dba',
-        &['\u028c']), ('\u1dbb', &['\x7a']), ('\u1dbc', &['\u0290']), ('\u1dbd', &['\u0291']),
-        ('\u1dbe', &['\u0292']), ('\u1dbf', &['\u03b8']), ('\u1e9a', &['\x61', '\u02be']),
-        ('\u1fbd', &['\x20', '\u0313']), ('\u1fbf', &['\x20', '\u0313']), ('\u1fc0', &['\x20',
-        '\u0342']), ('\u1ffe', &['\x20', '\u0314']), ('\u2002', &['\x20']), ('\u2003', &['\x20']),
-        ('\u2004', &['\x20']), ('\u2005', &['\x20']), ('\u2006', &['\x20']), ('\u2007', &['\x20']),
-        ('\u2008', &['\x20']), ('\u2009', &['\x20']), ('\u200a', &['\x20']), ('\u2011',
-        &['\u2010']), ('\u2017', &['\x20', '\u0333']), ('\u2024', &['\x2e']), ('\u2025', &['\x2e',
-        '\x2e']), ('\u2026', &['\x2e', '\x2e', '\x2e']), ('\u202f', &['\x20']), ('\u2033',
-        &['\u2032', '\u2032']), ('\u2034', &['\u2032', '\u2032', '\u2032']), ('\u2036', &['\u2035',
-        '\u2035']), ('\u2037', &['\u2035', '\u2035', '\u2035']), ('\u203c', &['\x21', '\x21']),
-        ('\u203e', &['\x20', '\u0305']), ('\u2047', &['\x3f', '\x3f']), ('\u2048', &['\x3f',
-        '\x21']), ('\u2049', &['\x21', '\x3f']), ('\u2057', &['\u2032', '\u2032', '\u2032',
-        '\u2032']), ('\u205f', &['\x20']), ('\u2070', &['\x30']), ('\u2071', &['\x69']), ('\u2074',
-        &['\x34']), ('\u2075', &['\x35']), ('\u2076', &['\x36']), ('\u2077', &['\x37']), ('\u2078',
-        &['\x38']), ('\u2079', &['\x39']), ('\u207a', &['\x2b']), ('\u207b', &['\u2212']),
-        ('\u207c', &['\x3d']), ('\u207d', &['\x28']), ('\u207e', &['\x29']), ('\u207f', &['\x6e']),
-        ('\u2080', &['\x30']), ('\u2081', &['\x31']), ('\u2082', &['\x32']), ('\u2083', &['\x33']),
-        ('\u2084', &['\x34']), ('\u2085', &['\x35']), ('\u2086', &['\x36']), ('\u2087', &['\x37']),
-        ('\u2088', &['\x38']), ('\u2089', &['\x39']), ('\u208a', &['\x2b']), ('\u208b',
-        &['\u2212']), ('\u208c', &['\x3d']), ('\u208d', &['\x28']), ('\u208e', &['\x29']),
-        ('\u2090', &['\x61']), ('\u2091', &['\x65']), ('\u2092', &['\x6f']), ('\u2093', &['\x78']),
-        ('\u2094', &['\u0259']), ('\u2095', &['\x68']), ('\u2096', &['\x6b']), ('\u2097',
-        &['\x6c']), ('\u2098', &['\x6d']), ('\u2099', &['\x6e']), ('\u209a', &['\x70']), ('\u209b',
-        &['\x73']), ('\u209c', &['\x74']), ('\u20a8', &['\x52', '\x73']), ('\u2100', &['\x61',
-        '\x2f', '\x63']), ('\u2101', &['\x61', '\x2f', '\x73']), ('\u2102', &['\x43']), ('\u2103',
-        &['\u00b0', '\x43']), ('\u2105', &['\x63', '\x2f', '\x6f']), ('\u2106', &['\x63', '\x2f',
-        '\x75']), ('\u2107', &['\u0190']), ('\u2109', &['\u00b0', '\x46']), ('\u210a', &['\x67']),
-        ('\u210b', &['\x48']), ('\u210c', &['\x48']), ('\u210d', &['\x48']), ('\u210e', &['\x68']),
-        ('\u210f', &['\u0127']), ('\u2110', &['\x49']), ('\u2111', &['\x49']), ('\u2112',
-        &['\x4c']), ('\u2113', &['\x6c']), ('\u2115', &['\x4e']), ('\u2116', &['\x4e', '\x6f']),
-        ('\u2119', &['\x50']), ('\u211a', &['\x51']), ('\u211b', &['\x52']), ('\u211c', &['\x52']),
-        ('\u211d', &['\x52']), ('\u2120', &['\x53', '\x4d']), ('\u2121', &['\x54', '\x45', '\x4c']),
-        ('\u2122', &['\x54', '\x4d']), ('\u2124', &['\x5a']), ('\u2128', &['\x5a']), ('\u212c',
-        &['\x42']), ('\u212d', &['\x43']), ('\u212f', &['\x65']), ('\u2130', &['\x45']), ('\u2131',
-        &['\x46']), ('\u2133', &['\x4d']), ('\u2134', &['\x6f']), ('\u2135', &['\u05d0']),
-        ('\u2136', &['\u05d1']), ('\u2137', &['\u05d2']), ('\u2138', &['\u05d3']), ('\u2139',
-        &['\x69']), ('\u213b', &['\x46', '\x41', '\x58']), ('\u213c', &['\u03c0']), ('\u213d',
-        &['\u03b3']), ('\u213e', &['\u0393']), ('\u213f', &['\u03a0']), ('\u2140', &['\u2211']),
-        ('\u2145', &['\x44']), ('\u2146', &['\x64']), ('\u2147', &['\x65']), ('\u2148', &['\x69']),
-        ('\u2149', &['\x6a']), ('\u2150', &['\x31', '\u2044', '\x37']), ('\u2151', &['\x31',
-        '\u2044', '\x39']), ('\u2152', &['\x31', '\u2044', '\x31', '\x30']), ('\u2153', &['\x31',
-        '\u2044', '\x33']), ('\u2154', &['\x32', '\u2044', '\x33']), ('\u2155', &['\x31', '\u2044',
-        '\x35']), ('\u2156', &['\x32', '\u2044', '\x35']), ('\u2157', &['\x33', '\u2044', '\x35']),
-        ('\u2158', &['\x34', '\u2044', '\x35']), ('\u2159', &['\x31', '\u2044', '\x36']), ('\u215a',
-        &['\x35', '\u2044', '\x36']), ('\u215b', &['\x31', '\u2044', '\x38']), ('\u215c', &['\x33',
-        '\u2044', '\x38']), ('\u215d', &['\x35', '\u2044', '\x38']), ('\u215e', &['\x37', '\u2044',
-        '\x38']), ('\u215f', &['\x31', '\u2044']), ('\u2160', &['\x49']), ('\u2161', &['\x49',
-        '\x49']), ('\u2162', &['\x49', '\x49', '\x49']), ('\u2163', &['\x49', '\x56']), ('\u2164',
-        &['\x56']), ('\u2165', &['\x56', '\x49']), ('\u2166', &['\x56', '\x49', '\x49']), ('\u2167',
-        &['\x56', '\x49', '\x49', '\x49']), ('\u2168', &['\x49', '\x58']), ('\u2169', &['\x58']),
-        ('\u216a', &['\x58', '\x49']), ('\u216b', &['\x58', '\x49', '\x49']), ('\u216c', &['\x4c']),
-        ('\u216d', &['\x43']), ('\u216e', &['\x44']), ('\u216f', &['\x4d']), ('\u2170', &['\x69']),
-        ('\u2171', &['\x69', '\x69']), ('\u2172', &['\x69', '\x69', '\x69']), ('\u2173', &['\x69',
-        '\x76']), ('\u2174', &['\x76']), ('\u2175', &['\x76', '\x69']), ('\u2176', &['\x76', '\x69',
-        '\x69']), ('\u2177', &['\x76', '\x69', '\x69', '\x69']), ('\u2178', &['\x69', '\x78']),
-        ('\u2179', &['\x78']), ('\u217a', &['\x78', '\x69']), ('\u217b', &['\x78', '\x69', '\x69']),
-        ('\u217c', &['\x6c']), ('\u217d', &['\x63']), ('\u217e', &['\x64']), ('\u217f', &['\x6d']),
-        ('\u2189', &['\x30', '\u2044', '\x33']), ('\u222c', &['\u222b', '\u222b']), ('\u222d',
-        &['\u222b', '\u222b', '\u222b']), ('\u222f', &['\u222e', '\u222e']), ('\u2230', &['\u222e',
-        '\u222e', '\u222e']), ('\u2460', &['\x31']), ('\u2461', &['\x32']), ('\u2462', &['\x33']),
-        ('\u2463', &['\x34']), ('\u2464', &['\x35']), ('\u2465', &['\x36']), ('\u2466', &['\x37']),
-        ('\u2467', &['\x38']), ('\u2468', &['\x39']), ('\u2469', &['\x31', '\x30']), ('\u246a',
-        &['\x31', '\x31']), ('\u246b', &['\x31', '\x32']), ('\u246c', &['\x31', '\x33']), ('\u246d',
-        &['\x31', '\x34']), ('\u246e', &['\x31', '\x35']), ('\u246f', &['\x31', '\x36']), ('\u2470',
-        &['\x31', '\x37']), ('\u2471', &['\x31', '\x38']), ('\u2472', &['\x31', '\x39']), ('\u2473',
-        &['\x32', '\x30']), ('\u2474', &['\x28', '\x31', '\x29']), ('\u2475', &['\x28', '\x32',
-        '\x29']), ('\u2476', &['\x28', '\x33', '\x29']), ('\u2477', &['\x28', '\x34', '\x29']),
-        ('\u2478', &['\x28', '\x35', '\x29']), ('\u2479', &['\x28', '\x36', '\x29']), ('\u247a',
-        &['\x28', '\x37', '\x29']), ('\u247b', &['\x28', '\x38', '\x29']), ('\u247c', &['\x28',
-        '\x39', '\x29']), ('\u247d', &['\x28', '\x31', '\x30', '\x29']), ('\u247e', &['\x28',
-        '\x31', '\x31', '\x29']), ('\u247f', &['\x28', '\x31', '\x32', '\x29']), ('\u2480',
-        &['\x28', '\x31', '\x33', '\x29']), ('\u2481', &['\x28', '\x31', '\x34', '\x29']),
-        ('\u2482', &['\x28', '\x31', '\x35', '\x29']), ('\u2483', &['\x28', '\x31', '\x36',
-        '\x29']), ('\u2484', &['\x28', '\x31', '\x37', '\x29']), ('\u2485', &['\x28', '\x31',
-        '\x38', '\x29']), ('\u2486', &['\x28', '\x31', '\x39', '\x29']), ('\u2487', &['\x28',
-        '\x32', '\x30', '\x29']), ('\u2488', &['\x31', '\x2e']), ('\u2489', &['\x32', '\x2e']),
-        ('\u248a', &['\x33', '\x2e']), ('\u248b', &['\x34', '\x2e']), ('\u248c', &['\x35', '\x2e']),
-        ('\u248d', &['\x36', '\x2e']), ('\u248e', &['\x37', '\x2e']), ('\u248f', &['\x38', '\x2e']),
-        ('\u2490', &['\x39', '\x2e']), ('\u2491', &['\x31', '\x30', '\x2e']), ('\u2492', &['\x31',
-        '\x31', '\x2e']), ('\u2493', &['\x31', '\x32', '\x2e']), ('\u2494', &['\x31', '\x33',
-        '\x2e']), ('\u2495', &['\x31', '\x34', '\x2e']), ('\u2496', &['\x31', '\x35', '\x2e']),
-        ('\u2497', &['\x31', '\x36', '\x2e']), ('\u2498', &['\x31', '\x37', '\x2e']), ('\u2499',
-        &['\x31', '\x38', '\x2e']), ('\u249a', &['\x31', '\x39', '\x2e']), ('\u249b', &['\x32',
-        '\x30', '\x2e']), ('\u249c', &['\x28', '\x61', '\x29']), ('\u249d', &['\x28', '\x62',
-        '\x29']), ('\u249e', &['\x28', '\x63', '\x29']), ('\u249f', &['\x28', '\x64', '\x29']),
-        ('\u24a0', &['\x28', '\x65', '\x29']), ('\u24a1', &['\x28', '\x66', '\x29']), ('\u24a2',
-        &['\x28', '\x67', '\x29']), ('\u24a3', &['\x28', '\x68', '\x29']), ('\u24a4', &['\x28',
-        '\x69', '\x29']), ('\u24a5', &['\x28', '\x6a', '\x29']), ('\u24a6', &['\x28', '\x6b',
-        '\x29']), ('\u24a7', &['\x28', '\x6c', '\x29']), ('\u24a8', &['\x28', '\x6d', '\x29']),
-        ('\u24a9', &['\x28', '\x6e', '\x29']), ('\u24aa', &['\x28', '\x6f', '\x29']), ('\u24ab',
-        &['\x28', '\x70', '\x29']), ('\u24ac', &['\x28', '\x71', '\x29']), ('\u24ad', &['\x28',
-        '\x72', '\x29']), ('\u24ae', &['\x28', '\x73', '\x29']), ('\u24af', &['\x28', '\x74',
-        '\x29']), ('\u24b0', &['\x28', '\x75', '\x29']), ('\u24b1', &['\x28', '\x76', '\x29']),
-        ('\u24b2', &['\x28', '\x77', '\x29']), ('\u24b3', &['\x28', '\x78', '\x29']), ('\u24b4',
-        &['\x28', '\x79', '\x29']), ('\u24b5', &['\x28', '\x7a', '\x29']), ('\u24b6', &['\x41']),
-        ('\u24b7', &['\x42']), ('\u24b8', &['\x43']), ('\u24b9', &['\x44']), ('\u24ba', &['\x45']),
-        ('\u24bb', &['\x46']), ('\u24bc', &['\x47']), ('\u24bd', &['\x48']), ('\u24be', &['\x49']),
-        ('\u24bf', &['\x4a']), ('\u24c0', &['\x4b']), ('\u24c1', &['\x4c']), ('\u24c2', &['\x4d']),
-        ('\u24c3', &['\x4e']), ('\u24c4', &['\x4f']), ('\u24c5', &['\x50']), ('\u24c6', &['\x51']),
-        ('\u24c7', &['\x52']), ('\u24c8', &['\x53']), ('\u24c9', &['\x54']), ('\u24ca', &['\x55']),
-        ('\u24cb', &['\x56']), ('\u24cc', &['\x57']), ('\u24cd', &['\x58']), ('\u24ce', &['\x59']),
-        ('\u24cf', &['\x5a']), ('\u24d0', &['\x61']), ('\u24d1', &['\x62']), ('\u24d2', &['\x63']),
-        ('\u24d3', &['\x64']), ('\u24d4', &['\x65']), ('\u24d5', &['\x66']), ('\u24d6', &['\x67']),
-        ('\u24d7', &['\x68']), ('\u24d8', &['\x69']), ('\u24d9', &['\x6a']), ('\u24da', &['\x6b']),
-        ('\u24db', &['\x6c']), ('\u24dc', &['\x6d']), ('\u24dd', &['\x6e']), ('\u24de', &['\x6f']),
-        ('\u24df', &['\x70']), ('\u24e0', &['\x71']), ('\u24e1', &['\x72']), ('\u24e2', &['\x73']),
-        ('\u24e3', &['\x74']), ('\u24e4', &['\x75']), ('\u24e5', &['\x76']), ('\u24e6', &['\x77']),
-        ('\u24e7', &['\x78']), ('\u24e8', &['\x79']), ('\u24e9', &['\x7a']), ('\u24ea', &['\x30']),
-        ('\u2a0c', &['\u222b', '\u222b', '\u222b', '\u222b']), ('\u2a74', &['\x3a', '\x3a',
-        '\x3d']), ('\u2a75', &['\x3d', '\x3d']), ('\u2a76', &['\x3d', '\x3d', '\x3d']), ('\u2c7c',
-        &['\x6a']), ('\u2c7d', &['\x56']), ('\u2d6f', &['\u2d61']), ('\u2e9f', &['\u6bcd']),
-        ('\u2ef3', &['\u9f9f']), ('\u2f00', &['\u4e00']), ('\u2f01', &['\u4e28']), ('\u2f02',
-        &['\u4e36']), ('\u2f03', &['\u4e3f']), ('\u2f04', &['\u4e59']), ('\u2f05', &['\u4e85']),
-        ('\u2f06', &['\u4e8c']), ('\u2f07', &['\u4ea0']), ('\u2f08', &['\u4eba']), ('\u2f09',
-        &['\u513f']), ('\u2f0a', &['\u5165']), ('\u2f0b', &['\u516b']), ('\u2f0c', &['\u5182']),
-        ('\u2f0d', &['\u5196']), ('\u2f0e', &['\u51ab']), ('\u2f0f', &['\u51e0']), ('\u2f10',
-        &['\u51f5']), ('\u2f11', &['\u5200']), ('\u2f12', &['\u529b']), ('\u2f13', &['\u52f9']),
-        ('\u2f14', &['\u5315']), ('\u2f15', &['\u531a']), ('\u2f16', &['\u5338']), ('\u2f17',
-        &['\u5341']), ('\u2f18', &['\u535c']), ('\u2f19', &['\u5369']), ('\u2f1a', &['\u5382']),
-        ('\u2f1b', &['\u53b6']), ('\u2f1c', &['\u53c8']), ('\u2f1d', &['\u53e3']), ('\u2f1e',
-        &['\u56d7']), ('\u2f1f', &['\u571f']), ('\u2f20', &['\u58eb']), ('\u2f21', &['\u5902']),
-        ('\u2f22', &['\u590a']), ('\u2f23', &['\u5915']), ('\u2f24', &['\u5927']), ('\u2f25',
-        &['\u5973']), ('\u2f26', &['\u5b50']), ('\u2f27', &['\u5b80']), ('\u2f28', &['\u5bf8']),
-        ('\u2f29', &['\u5c0f']), ('\u2f2a', &['\u5c22']), ('\u2f2b', &['\u5c38']), ('\u2f2c',
-        &['\u5c6e']), ('\u2f2d', &['\u5c71']), ('\u2f2e', &['\u5ddb']), ('\u2f2f', &['\u5de5']),
-        ('\u2f30', &['\u5df1']), ('\u2f31', &['\u5dfe']), ('\u2f32', &['\u5e72']), ('\u2f33',
-        &['\u5e7a']), ('\u2f34', &['\u5e7f']), ('\u2f35', &['\u5ef4']), ('\u2f36', &['\u5efe']),
-        ('\u2f37', &['\u5f0b']), ('\u2f38', &['\u5f13']), ('\u2f39', &['\u5f50']), ('\u2f3a',
-        &['\u5f61']), ('\u2f3b', &['\u5f73']), ('\u2f3c', &['\u5fc3']), ('\u2f3d', &['\u6208']),
-        ('\u2f3e', &['\u6236']), ('\u2f3f', &['\u624b']), ('\u2f40', &['\u652f']), ('\u2f41',
-        &['\u6534']), ('\u2f42', &['\u6587']), ('\u2f43', &['\u6597']), ('\u2f44', &['\u65a4']),
-        ('\u2f45', &['\u65b9']), ('\u2f46', &['\u65e0']), ('\u2f47', &['\u65e5']), ('\u2f48',
-        &['\u66f0']), ('\u2f49', &['\u6708']), ('\u2f4a', &['\u6728']), ('\u2f4b', &['\u6b20']),
-        ('\u2f4c', &['\u6b62']), ('\u2f4d', &['\u6b79']), ('\u2f4e', &['\u6bb3']), ('\u2f4f',
-        &['\u6bcb']), ('\u2f50', &['\u6bd4']), ('\u2f51', &['\u6bdb']), ('\u2f52', &['\u6c0f']),
-        ('\u2f53', &['\u6c14']), ('\u2f54', &['\u6c34']), ('\u2f55', &['\u706b']), ('\u2f56',
-        &['\u722a']), ('\u2f57', &['\u7236']), ('\u2f58', &['\u723b']), ('\u2f59', &['\u723f']),
-        ('\u2f5a', &['\u7247']), ('\u2f5b', &['\u7259']), ('\u2f5c', &['\u725b']), ('\u2f5d',
-        &['\u72ac']), ('\u2f5e', &['\u7384']), ('\u2f5f', &['\u7389']), ('\u2f60', &['\u74dc']),
-        ('\u2f61', &['\u74e6']), ('\u2f62', &['\u7518']), ('\u2f63', &['\u751f']), ('\u2f64',
-        &['\u7528']), ('\u2f65', &['\u7530']), ('\u2f66', &['\u758b']), ('\u2f67', &['\u7592']),
-        ('\u2f68', &['\u7676']), ('\u2f69', &['\u767d']), ('\u2f6a', &['\u76ae']), ('\u2f6b',
-        &['\u76bf']), ('\u2f6c', &['\u76ee']), ('\u2f6d', &['\u77db']), ('\u2f6e', &['\u77e2']),
-        ('\u2f6f', &['\u77f3']), ('\u2f70', &['\u793a']), ('\u2f71', &['\u79b8']), ('\u2f72',
-        &['\u79be']), ('\u2f73', &['\u7a74']), ('\u2f74', &['\u7acb']), ('\u2f75', &['\u7af9']),
-        ('\u2f76', &['\u7c73']), ('\u2f77', &['\u7cf8']), ('\u2f78', &['\u7f36']), ('\u2f79',
-        &['\u7f51']), ('\u2f7a', &['\u7f8a']), ('\u2f7b', &['\u7fbd']), ('\u2f7c', &['\u8001']),
-        ('\u2f7d', &['\u800c']), ('\u2f7e', &['\u8012']), ('\u2f7f', &['\u8033']), ('\u2f80',
-        &['\u807f']), ('\u2f81', &['\u8089']), ('\u2f82', &['\u81e3']), ('\u2f83', &['\u81ea']),
-        ('\u2f84', &['\u81f3']), ('\u2f85', &['\u81fc']), ('\u2f86', &['\u820c']), ('\u2f87',
-        &['\u821b']), ('\u2f88', &['\u821f']), ('\u2f89', &['\u826e']), ('\u2f8a', &['\u8272']),
-        ('\u2f8b', &['\u8278']), ('\u2f8c', &['\u864d']), ('\u2f8d', &['\u866b']), ('\u2f8e',
-        &['\u8840']), ('\u2f8f', &['\u884c']), ('\u2f90', &['\u8863']), ('\u2f91', &['\u897e']),
-        ('\u2f92', &['\u898b']), ('\u2f93', &['\u89d2']), ('\u2f94', &['\u8a00']), ('\u2f95',
-        &['\u8c37']), ('\u2f96', &['\u8c46']), ('\u2f97', &['\u8c55']), ('\u2f98', &['\u8c78']),
-        ('\u2f99', &['\u8c9d']), ('\u2f9a', &['\u8d64']), ('\u2f9b', &['\u8d70']), ('\u2f9c',
-        &['\u8db3']), ('\u2f9d', &['\u8eab']), ('\u2f9e', &['\u8eca']), ('\u2f9f', &['\u8f9b']),
-        ('\u2fa0', &['\u8fb0']), ('\u2fa1', &['\u8fb5']), ('\u2fa2', &['\u9091']), ('\u2fa3',
-        &['\u9149']), ('\u2fa4', &['\u91c6']), ('\u2fa5', &['\u91cc']), ('\u2fa6', &['\u91d1']),
-        ('\u2fa7', &['\u9577']), ('\u2fa8', &['\u9580']), ('\u2fa9', &['\u961c']), ('\u2faa',
-        &['\u96b6']), ('\u2fab', &['\u96b9']), ('\u2fac', &['\u96e8']), ('\u2fad', &['\u9751']),
-        ('\u2fae', &['\u975e']), ('\u2faf', &['\u9762']), ('\u2fb0', &['\u9769']), ('\u2fb1',
-        &['\u97cb']), ('\u2fb2', &['\u97ed']), ('\u2fb3', &['\u97f3']), ('\u2fb4', &['\u9801']),
-        ('\u2fb5', &['\u98a8']), ('\u2fb6', &['\u98db']), ('\u2fb7', &['\u98df']), ('\u2fb8',
-        &['\u9996']), ('\u2fb9', &['\u9999']), ('\u2fba', &['\u99ac']), ('\u2fbb', &['\u9aa8']),
-        ('\u2fbc', &['\u9ad8']), ('\u2fbd', &['\u9adf']), ('\u2fbe', &['\u9b25']), ('\u2fbf',
-        &['\u9b2f']), ('\u2fc0', &['\u9b32']), ('\u2fc1', &['\u9b3c']), ('\u2fc2', &['\u9b5a']),
-        ('\u2fc3', &['\u9ce5']), ('\u2fc4', &['\u9e75']), ('\u2fc5', &['\u9e7f']), ('\u2fc6',
-        &['\u9ea5']), ('\u2fc7', &['\u9ebb']), ('\u2fc8', &['\u9ec3']), ('\u2fc9', &['\u9ecd']),
-        ('\u2fca', &['\u9ed1']), ('\u2fcb', &['\u9ef9']), ('\u2fcc', &['\u9efd']), ('\u2fcd',
-        &['\u9f0e']), ('\u2fce', &['\u9f13']), ('\u2fcf', &['\u9f20']), ('\u2fd0', &['\u9f3b']),
-        ('\u2fd1', &['\u9f4a']), ('\u2fd2', &['\u9f52']), ('\u2fd3', &['\u9f8d']), ('\u2fd4',
-        &['\u9f9c']), ('\u2fd5', &['\u9fa0']), ('\u3000', &['\x20']), ('\u3036', &['\u3012']),
-        ('\u3038', &['\u5341']), ('\u3039', &['\u5344']), ('\u303a', &['\u5345']), ('\u309b',
-        &['\x20', '\u3099']), ('\u309c', &['\x20', '\u309a']), ('\u309f', &['\u3088', '\u308a']),
-        ('\u30ff', &['\u30b3', '\u30c8']), ('\u3131', &['\u1100']), ('\u3132', &['\u1101']),
-        ('\u3133', &['\u11aa']), ('\u3134', &['\u1102']), ('\u3135', &['\u11ac']), ('\u3136',
-        &['\u11ad']), ('\u3137', &['\u1103']), ('\u3138', &['\u1104']), ('\u3139', &['\u1105']),
-        ('\u313a', &['\u11b0']), ('\u313b', &['\u11b1']), ('\u313c', &['\u11b2']), ('\u313d',
-        &['\u11b3']), ('\u313e', &['\u11b4']), ('\u313f', &['\u11b5']), ('\u3140', &['\u111a']),
-        ('\u3141', &['\u1106']), ('\u3142', &['\u1107']), ('\u3143', &['\u1108']), ('\u3144',
-        &['\u1121']), ('\u3145', &['\u1109']), ('\u3146', &['\u110a']), ('\u3147', &['\u110b']),
-        ('\u3148', &['\u110c']), ('\u3149', &['\u110d']), ('\u314a', &['\u110e']), ('\u314b',
-        &['\u110f']), ('\u314c', &['\u1110']), ('\u314d', &['\u1111']), ('\u314e', &['\u1112']),
-        ('\u314f', &['\u1161']), ('\u3150', &['\u1162']), ('\u3151', &['\u1163']), ('\u3152',
-        &['\u1164']), ('\u3153', &['\u1165']), ('\u3154', &['\u1166']), ('\u3155', &['\u1167']),
-        ('\u3156', &['\u1168']), ('\u3157', &['\u1169']), ('\u3158', &['\u116a']), ('\u3159',
-        &['\u116b']), ('\u315a', &['\u116c']), ('\u315b', &['\u116d']), ('\u315c', &['\u116e']),
-        ('\u315d', &['\u116f']), ('\u315e', &['\u1170']), ('\u315f', &['\u1171']), ('\u3160',
-        &['\u1172']), ('\u3161', &['\u1173']), ('\u3162', &['\u1174']), ('\u3163', &['\u1175']),
-        ('\u3164', &['\u1160']), ('\u3165', &['\u1114']), ('\u3166', &['\u1115']), ('\u3167',
-        &['\u11c7']), ('\u3168', &['\u11c8']), ('\u3169', &['\u11cc']), ('\u316a', &['\u11ce']),
-        ('\u316b', &['\u11d3']), ('\u316c', &['\u11d7']), ('\u316d', &['\u11d9']), ('\u316e',
-        &['\u111c']), ('\u316f', &['\u11dd']), ('\u3170', &['\u11df']), ('\u3171', &['\u111d']),
-        ('\u3172', &['\u111e']), ('\u3173', &['\u1120']), ('\u3174', &['\u1122']), ('\u3175',
-        &['\u1123']), ('\u3176', &['\u1127']), ('\u3177', &['\u1129']), ('\u3178', &['\u112b']),
-        ('\u3179', &['\u112c']), ('\u317a', &['\u112d']), ('\u317b', &['\u112e']), ('\u317c',
-        &['\u112f']), ('\u317d', &['\u1132']), ('\u317e', &['\u1136']), ('\u317f', &['\u1140']),
-        ('\u3180', &['\u1147']), ('\u3181', &['\u114c']), ('\u3182', &['\u11f1']), ('\u3183',
-        &['\u11f2']), ('\u3184', &['\u1157']), ('\u3185', &['\u1158']), ('\u3186', &['\u1159']),
-        ('\u3187', &['\u1184']), ('\u3188', &['\u1185']), ('\u3189', &['\u1188']), ('\u318a',
-        &['\u1191']), ('\u318b', &['\u1192']), ('\u318c', &['\u1194']), ('\u318d', &['\u119e']),
-        ('\u318e', &['\u11a1']), ('\u3192', &['\u4e00']), ('\u3193', &['\u4e8c']), ('\u3194',
-        &['\u4e09']), ('\u3195', &['\u56db']), ('\u3196', &['\u4e0a']), ('\u3197', &['\u4e2d']),
-        ('\u3198', &['\u4e0b']), ('\u3199', &['\u7532']), ('\u319a', &['\u4e59']), ('\u319b',
-        &['\u4e19']), ('\u319c', &['\u4e01']), ('\u319d', &['\u5929']), ('\u319e', &['\u5730']),
-        ('\u319f', &['\u4eba']), ('\u3200', &['\x28', '\u1100', '\x29']), ('\u3201', &['\x28',
-        '\u1102', '\x29']), ('\u3202', &['\x28', '\u1103', '\x29']), ('\u3203', &['\x28', '\u1105',
-        '\x29']), ('\u3204', &['\x28', '\u1106', '\x29']), ('\u3205', &['\x28', '\u1107', '\x29']),
-        ('\u3206', &['\x28', '\u1109', '\x29']), ('\u3207', &['\x28', '\u110b', '\x29']), ('\u3208',
-        &['\x28', '\u110c', '\x29']), ('\u3209', &['\x28', '\u110e', '\x29']), ('\u320a', &['\x28',
-        '\u110f', '\x29']), ('\u320b', &['\x28', '\u1110', '\x29']), ('\u320c', &['\x28', '\u1111',
-        '\x29']), ('\u320d', &['\x28', '\u1112', '\x29']), ('\u320e', &['\x28', '\u1100', '\u1161',
-        '\x29']), ('\u320f', &['\x28', '\u1102', '\u1161', '\x29']), ('\u3210', &['\x28', '\u1103',
-        '\u1161', '\x29']), ('\u3211', &['\x28', '\u1105', '\u1161', '\x29']), ('\u3212', &['\x28',
-        '\u1106', '\u1161', '\x29']), ('\u3213', &['\x28', '\u1107', '\u1161', '\x29']), ('\u3214',
-        &['\x28', '\u1109', '\u1161', '\x29']), ('\u3215', &['\x28', '\u110b', '\u1161', '\x29']),
-        ('\u3216', &['\x28', '\u110c', '\u1161', '\x29']), ('\u3217', &['\x28', '\u110e', '\u1161',
-        '\x29']), ('\u3218', &['\x28', '\u110f', '\u1161', '\x29']), ('\u3219', &['\x28', '\u1110',
-        '\u1161', '\x29']), ('\u321a', &['\x28', '\u1111', '\u1161', '\x29']), ('\u321b', &['\x28',
-        '\u1112', '\u1161', '\x29']), ('\u321c', &['\x28', '\u110c', '\u116e', '\x29']), ('\u321d',
-        &['\x28', '\u110b', '\u1169', '\u110c', '\u1165', '\u11ab', '\x29']), ('\u321e', &['\x28',
-        '\u110b', '\u1169', '\u1112', '\u116e', '\x29']), ('\u3220', &['\x28', '\u4e00', '\x29']),
-        ('\u3221', &['\x28', '\u4e8c', '\x29']), ('\u3222', &['\x28', '\u4e09', '\x29']), ('\u3223',
-        &['\x28', '\u56db', '\x29']), ('\u3224', &['\x28', '\u4e94', '\x29']), ('\u3225', &['\x28',
-        '\u516d', '\x29']), ('\u3226', &['\x28', '\u4e03', '\x29']), ('\u3227', &['\x28', '\u516b',
-        '\x29']), ('\u3228', &['\x28', '\u4e5d', '\x29']), ('\u3229', &['\x28', '\u5341', '\x29']),
-        ('\u322a', &['\x28', '\u6708', '\x29']), ('\u322b', &['\x28', '\u706b', '\x29']), ('\u322c',
-        &['\x28', '\u6c34', '\x29']), ('\u322d', &['\x28', '\u6728', '\x29']), ('\u322e', &['\x28',
-        '\u91d1', '\x29']), ('\u322f', &['\x28', '\u571f', '\x29']), ('\u3230', &['\x28', '\u65e5',
-        '\x29']), ('\u3231', &['\x28', '\u682a', '\x29']), ('\u3232', &['\x28', '\u6709', '\x29']),
-        ('\u3233', &['\x28', '\u793e', '\x29']), ('\u3234', &['\x28', '\u540d', '\x29']), ('\u3235',
-        &['\x28', '\u7279', '\x29']), ('\u3236', &['\x28', '\u8ca1', '\x29']), ('\u3237', &['\x28',
-        '\u795d', '\x29']), ('\u3238', &['\x28', '\u52b4', '\x29']), ('\u3239', &['\x28', '\u4ee3',
-        '\x29']), ('\u323a', &['\x28', '\u547c', '\x29']), ('\u323b', &['\x28', '\u5b66', '\x29']),
-        ('\u323c', &['\x28', '\u76e3', '\x29']), ('\u323d', &['\x28', '\u4f01', '\x29']), ('\u323e',
-        &['\x28', '\u8cc7', '\x29']), ('\u323f', &['\x28', '\u5354', '\x29']), ('\u3240', &['\x28',
-        '\u796d', '\x29']), ('\u3241', &['\x28', '\u4f11', '\x29']), ('\u3242', &['\x28', '\u81ea',
-        '\x29']), ('\u3243', &['\x28', '\u81f3', '\x29']), ('\u3244', &['\u554f']), ('\u3245',
-        &['\u5e7c']), ('\u3246', &['\u6587']), ('\u3247', &['\u7b8f']), ('\u3250', &['\x50', '\x54',
-        '\x45']), ('\u3251', &['\x32', '\x31']), ('\u3252', &['\x32', '\x32']), ('\u3253', &['\x32',
-        '\x33']), ('\u3254', &['\x32', '\x34']), ('\u3255', &['\x32', '\x35']), ('\u3256', &['\x32',
-        '\x36']), ('\u3257', &['\x32', '\x37']), ('\u3258', &['\x32', '\x38']), ('\u3259', &['\x32',
-        '\x39']), ('\u325a', &['\x33', '\x30']), ('\u325b', &['\x33', '\x31']), ('\u325c', &['\x33',
-        '\x32']), ('\u325d', &['\x33', '\x33']), ('\u325e', &['\x33', '\x34']), ('\u325f', &['\x33',
-        '\x35']), ('\u3260', &['\u1100']), ('\u3261', &['\u1102']), ('\u3262', &['\u1103']),
-        ('\u3263', &['\u1105']), ('\u3264', &['\u1106']), ('\u3265', &['\u1107']), ('\u3266',
-        &['\u1109']), ('\u3267', &['\u110b']), ('\u3268', &['\u110c']), ('\u3269', &['\u110e']),
-        ('\u326a', &['\u110f']), ('\u326b', &['\u1110']), ('\u326c', &['\u1111']), ('\u326d',
-        &['\u1112']), ('\u326e', &['\u1100', '\u1161']), ('\u326f', &['\u1102', '\u1161']),
-        ('\u3270', &['\u1103', '\u1161']), ('\u3271', &['\u1105', '\u1161']), ('\u3272', &['\u1106',
-        '\u1161']), ('\u3273', &['\u1107', '\u1161']), ('\u3274', &['\u1109', '\u1161']), ('\u3275',
-        &['\u110b', '\u1161']), ('\u3276', &['\u110c', '\u1161']), ('\u3277', &['\u110e',
-        '\u1161']), ('\u3278', &['\u110f', '\u1161']), ('\u3279', &['\u1110', '\u1161']), ('\u327a',
-        &['\u1111', '\u1161']), ('\u327b', &['\u1112', '\u1161']), ('\u327c', &['\u110e', '\u1161',
-        '\u11b7', '\u1100', '\u1169']), ('\u327d', &['\u110c', '\u116e', '\u110b', '\u1174']),
-        ('\u327e', &['\u110b', '\u116e']), ('\u3280', &['\u4e00']), ('\u3281', &['\u4e8c']),
-        ('\u3282', &['\u4e09']), ('\u3283', &['\u56db']), ('\u3284', &['\u4e94']), ('\u3285',
-        &['\u516d']), ('\u3286', &['\u4e03']), ('\u3287', &['\u516b']), ('\u3288', &['\u4e5d']),
-        ('\u3289', &['\u5341']), ('\u328a', &['\u6708']), ('\u328b', &['\u706b']), ('\u328c',
-        &['\u6c34']), ('\u328d', &['\u6728']), ('\u328e', &['\u91d1']), ('\u328f', &['\u571f']),
-        ('\u3290', &['\u65e5']), ('\u3291', &['\u682a']), ('\u3292', &['\u6709']), ('\u3293',
-        &['\u793e']), ('\u3294', &['\u540d']), ('\u3295', &['\u7279']), ('\u3296', &['\u8ca1']),
-        ('\u3297', &['\u795d']), ('\u3298', &['\u52b4']), ('\u3299', &['\u79d8']), ('\u329a',
-        &['\u7537']), ('\u329b', &['\u5973']), ('\u329c', &['\u9069']), ('\u329d', &['\u512a']),
-        ('\u329e', &['\u5370']), ('\u329f', &['\u6ce8']), ('\u32a0', &['\u9805']), ('\u32a1',
-        &['\u4f11']), ('\u32a2', &['\u5199']), ('\u32a3', &['\u6b63']), ('\u32a4', &['\u4e0a']),
-        ('\u32a5', &['\u4e2d']), ('\u32a6', &['\u4e0b']), ('\u32a7', &['\u5de6']), ('\u32a8',
-        &['\u53f3']), ('\u32a9', &['\u533b']), ('\u32aa', &['\u5b97']), ('\u32ab', &['\u5b66']),
-        ('\u32ac', &['\u76e3']), ('\u32ad', &['\u4f01']), ('\u32ae', &['\u8cc7']), ('\u32af',
-        &['\u5354']), ('\u32b0', &['\u591c']), ('\u32b1', &['\x33', '\x36']), ('\u32b2', &['\x33',
-        '\x37']), ('\u32b3', &['\x33', '\x38']), ('\u32b4', &['\x33', '\x39']), ('\u32b5', &['\x34',
-        '\x30']), ('\u32b6', &['\x34', '\x31']), ('\u32b7', &['\x34', '\x32']), ('\u32b8', &['\x34',
-        '\x33']), ('\u32b9', &['\x34', '\x34']), ('\u32ba', &['\x34', '\x35']), ('\u32bb', &['\x34',
-        '\x36']), ('\u32bc', &['\x34', '\x37']), ('\u32bd', &['\x34', '\x38']), ('\u32be', &['\x34',
-        '\x39']), ('\u32bf', &['\x35', '\x30']), ('\u32c0', &['\x31', '\u6708']), ('\u32c1',
-        &['\x32', '\u6708']), ('\u32c2', &['\x33', '\u6708']), ('\u32c3', &['\x34', '\u6708']),
-        ('\u32c4', &['\x35', '\u6708']), ('\u32c5', &['\x36', '\u6708']), ('\u32c6', &['\x37',
-        '\u6708']), ('\u32c7', &['\x38', '\u6708']), ('\u32c8', &['\x39', '\u6708']), ('\u32c9',
-        &['\x31', '\x30', '\u6708']), ('\u32ca', &['\x31', '\x31', '\u6708']), ('\u32cb', &['\x31',
-        '\x32', '\u6708']), ('\u32cc', &['\x48', '\x67']), ('\u32cd', &['\x65', '\x72', '\x67']),
-        ('\u32ce', &['\x65', '\x56']), ('\u32cf', &['\x4c', '\x54', '\x44']), ('\u32d0',
-        &['\u30a2']), ('\u32d1', &['\u30a4']), ('\u32d2', &['\u30a6']), ('\u32d3', &['\u30a8']),
-        ('\u32d4', &['\u30aa']), ('\u32d5', &['\u30ab']), ('\u32d6', &['\u30ad']), ('\u32d7',
-        &['\u30af']), ('\u32d8', &['\u30b1']), ('\u32d9', &['\u30b3']), ('\u32da', &['\u30b5']),
-        ('\u32db', &['\u30b7']), ('\u32dc', &['\u30b9']), ('\u32dd', &['\u30bb']), ('\u32de',
-        &['\u30bd']), ('\u32df', &['\u30bf']), ('\u32e0', &['\u30c1']), ('\u32e1', &['\u30c4']),
-        ('\u32e2', &['\u30c6']), ('\u32e3', &['\u30c8']), ('\u32e4', &['\u30ca']), ('\u32e5',
-        &['\u30cb']), ('\u32e6', &['\u30cc']), ('\u32e7', &['\u30cd']), ('\u32e8', &['\u30ce']),
-        ('\u32e9', &['\u30cf']), ('\u32ea', &['\u30d2']), ('\u32eb', &['\u30d5']), ('\u32ec',
-        &['\u30d8']), ('\u32ed', &['\u30db']), ('\u32ee', &['\u30de']), ('\u32ef', &['\u30df']),
-        ('\u32f0', &['\u30e0']), ('\u32f1', &['\u30e1']), ('\u32f2', &['\u30e2']), ('\u32f3',
-        &['\u30e4']), ('\u32f4', &['\u30e6']), ('\u32f5', &['\u30e8']), ('\u32f6', &['\u30e9']),
-        ('\u32f7', &['\u30ea']), ('\u32f8', &['\u30eb']), ('\u32f9', &['\u30ec']), ('\u32fa',
-        &['\u30ed']), ('\u32fb', &['\u30ef']), ('\u32fc', &['\u30f0']), ('\u32fd', &['\u30f1']),
-        ('\u32fe', &['\u30f2']), ('\u3300', &['\u30a2', '\u30d1', '\u30fc', '\u30c8']), ('\u3301',
-        &['\u30a2', '\u30eb', '\u30d5', '\u30a1']), ('\u3302', &['\u30a2', '\u30f3', '\u30da',
-        '\u30a2']), ('\u3303', &['\u30a2', '\u30fc', '\u30eb']), ('\u3304', &['\u30a4', '\u30cb',
-        '\u30f3', '\u30b0']), ('\u3305', &['\u30a4', '\u30f3', '\u30c1']), ('\u3306', &['\u30a6',
-        '\u30a9', '\u30f3']), ('\u3307', &['\u30a8', '\u30b9', '\u30af', '\u30fc', '\u30c9']),
-        ('\u3308', &['\u30a8', '\u30fc', '\u30ab', '\u30fc']), ('\u3309', &['\u30aa', '\u30f3',
-        '\u30b9']), ('\u330a', &['\u30aa', '\u30fc', '\u30e0']), ('\u330b', &['\u30ab', '\u30a4',
-        '\u30ea']), ('\u330c', &['\u30ab', '\u30e9', '\u30c3', '\u30c8']), ('\u330d', &['\u30ab',
-        '\u30ed', '\u30ea', '\u30fc']), ('\u330e', &['\u30ac', '\u30ed', '\u30f3']), ('\u330f',
-        &['\u30ac', '\u30f3', '\u30de']), ('\u3310', &['\u30ae', '\u30ac']), ('\u3311', &['\u30ae',
-        '\u30cb', '\u30fc']), ('\u3312', &['\u30ad', '\u30e5', '\u30ea', '\u30fc']), ('\u3313',
-        &['\u30ae', '\u30eb', '\u30c0', '\u30fc']), ('\u3314', &['\u30ad', '\u30ed']), ('\u3315',
-        &['\u30ad', '\u30ed', '\u30b0', '\u30e9', '\u30e0']), ('\u3316', &['\u30ad', '\u30ed',
-        '\u30e1', '\u30fc', '\u30c8', '\u30eb']), ('\u3317', &['\u30ad', '\u30ed', '\u30ef',
-        '\u30c3', '\u30c8']), ('\u3318', &['\u30b0', '\u30e9', '\u30e0']), ('\u3319', &['\u30b0',
-        '\u30e9', '\u30e0', '\u30c8', '\u30f3']), ('\u331a', &['\u30af', '\u30eb', '\u30bc',
-        '\u30a4', '\u30ed']), ('\u331b', &['\u30af', '\u30ed', '\u30fc', '\u30cd']), ('\u331c',
-        &['\u30b1', '\u30fc', '\u30b9']), ('\u331d', &['\u30b3', '\u30eb', '\u30ca']), ('\u331e',
-        &['\u30b3', '\u30fc', '\u30dd']), ('\u331f', &['\u30b5', '\u30a4', '\u30af', '\u30eb']),
-        ('\u3320', &['\u30b5', '\u30f3', '\u30c1', '\u30fc', '\u30e0']), ('\u3321', &['\u30b7',
-        '\u30ea', '\u30f3', '\u30b0']), ('\u3322', &['\u30bb', '\u30f3', '\u30c1']), ('\u3323',
-        &['\u30bb', '\u30f3', '\u30c8']), ('\u3324', &['\u30c0', '\u30fc', '\u30b9']), ('\u3325',
-        &['\u30c7', '\u30b7']), ('\u3326', &['\u30c9', '\u30eb']), ('\u3327', &['\u30c8',
-        '\u30f3']), ('\u3328', &['\u30ca', '\u30ce']), ('\u3329', &['\u30ce', '\u30c3', '\u30c8']),
-        ('\u332a', &['\u30cf', '\u30a4', '\u30c4']), ('\u332b', &['\u30d1', '\u30fc', '\u30bb',
-        '\u30f3', '\u30c8']), ('\u332c', &['\u30d1', '\u30fc', '\u30c4']), ('\u332d', &['\u30d0',
-        '\u30fc', '\u30ec', '\u30eb']), ('\u332e', &['\u30d4', '\u30a2', '\u30b9', '\u30c8',
-        '\u30eb']), ('\u332f', &['\u30d4', '\u30af', '\u30eb']), ('\u3330', &['\u30d4', '\u30b3']),
-        ('\u3331', &['\u30d3', '\u30eb']), ('\u3332', &['\u30d5', '\u30a1', '\u30e9', '\u30c3',
-        '\u30c9']), ('\u3333', &['\u30d5', '\u30a3', '\u30fc', '\u30c8']), ('\u3334', &['\u30d6',
-        '\u30c3', '\u30b7', '\u30a7', '\u30eb']), ('\u3335', &['\u30d5', '\u30e9', '\u30f3']),
-        ('\u3336', &['\u30d8', '\u30af', '\u30bf', '\u30fc', '\u30eb']), ('\u3337', &['\u30da',
-        '\u30bd']), ('\u3338', &['\u30da', '\u30cb', '\u30d2']), ('\u3339', &['\u30d8', '\u30eb',
-        '\u30c4']), ('\u333a', &['\u30da', '\u30f3', '\u30b9']), ('\u333b', &['\u30da', '\u30fc',
-        '\u30b8']), ('\u333c', &['\u30d9', '\u30fc', '\u30bf']), ('\u333d', &['\u30dd', '\u30a4',
-        '\u30f3', '\u30c8']), ('\u333e', &['\u30dc', '\u30eb', '\u30c8']), ('\u333f', &['\u30db',
-        '\u30f3']), ('\u3340', &['\u30dd', '\u30f3', '\u30c9']), ('\u3341', &['\u30db', '\u30fc',
-        '\u30eb']), ('\u3342', &['\u30db', '\u30fc', '\u30f3']), ('\u3343', &['\u30de', '\u30a4',
-        '\u30af', '\u30ed']), ('\u3344', &['\u30de', '\u30a4', '\u30eb']), ('\u3345', &['\u30de',
-        '\u30c3', '\u30cf']), ('\u3346', &['\u30de', '\u30eb', '\u30af']), ('\u3347', &['\u30de',
-        '\u30f3', '\u30b7', '\u30e7', '\u30f3']), ('\u3348', &['\u30df', '\u30af', '\u30ed',
-        '\u30f3']), ('\u3349', &['\u30df', '\u30ea']), ('\u334a', &['\u30df', '\u30ea', '\u30d0',
-        '\u30fc', '\u30eb']), ('\u334b', &['\u30e1', '\u30ac']), ('\u334c', &['\u30e1', '\u30ac',
-        '\u30c8', '\u30f3']), ('\u334d', &['\u30e1', '\u30fc', '\u30c8', '\u30eb']), ('\u334e',
-        &['\u30e4', '\u30fc', '\u30c9']), ('\u334f', &['\u30e4', '\u30fc', '\u30eb']), ('\u3350',
-        &['\u30e6', '\u30a2', '\u30f3']), ('\u3351', &['\u30ea', '\u30c3', '\u30c8', '\u30eb']),
-        ('\u3352', &['\u30ea', '\u30e9']), ('\u3353', &['\u30eb', '\u30d4', '\u30fc']), ('\u3354',
-        &['\u30eb', '\u30fc', '\u30d6', '\u30eb']), ('\u3355', &['\u30ec', '\u30e0']), ('\u3356',
-        &['\u30ec', '\u30f3', '\u30c8', '\u30b2', '\u30f3']), ('\u3357', &['\u30ef', '\u30c3',
-        '\u30c8']), ('\u3358', &['\x30', '\u70b9']), ('\u3359', &['\x31', '\u70b9']), ('\u335a',
-        &['\x32', '\u70b9']), ('\u335b', &['\x33', '\u70b9']), ('\u335c', &['\x34', '\u70b9']),
-        ('\u335d', &['\x35', '\u70b9']), ('\u335e', &['\x36', '\u70b9']), ('\u335f', &['\x37',
-        '\u70b9']), ('\u3360', &['\x38', '\u70b9']), ('\u3361', &['\x39', '\u70b9']), ('\u3362',
-        &['\x31', '\x30', '\u70b9']), ('\u3363', &['\x31', '\x31', '\u70b9']), ('\u3364', &['\x31',
-        '\x32', '\u70b9']), ('\u3365', &['\x31', '\x33', '\u70b9']), ('\u3366', &['\x31', '\x34',
-        '\u70b9']), ('\u3367', &['\x31', '\x35', '\u70b9']), ('\u3368', &['\x31', '\x36',
-        '\u70b9']), ('\u3369', &['\x31', '\x37', '\u70b9']), ('\u336a', &['\x31', '\x38',
-        '\u70b9']), ('\u336b', &['\x31', '\x39', '\u70b9']), ('\u336c', &['\x32', '\x30',
-        '\u70b9']), ('\u336d', &['\x32', '\x31', '\u70b9']), ('\u336e', &['\x32', '\x32',
-        '\u70b9']), ('\u336f', &['\x32', '\x33', '\u70b9']), ('\u3370', &['\x32', '\x34',
-        '\u70b9']), ('\u3371', &['\x68', '\x50', '\x61']), ('\u3372', &['\x64', '\x61']), ('\u3373',
-        &['\x41', '\x55']), ('\u3374', &['\x62', '\x61', '\x72']), ('\u3375', &['\x6f', '\x56']),
-        ('\u3376', &['\x70', '\x63']), ('\u3377', &['\x64', '\x6d']), ('\u3378', &['\x64', '\x6d',
-        '\u00b2']), ('\u3379', &['\x64', '\x6d', '\u00b3']), ('\u337a', &['\x49', '\x55']),
-        ('\u337b', &['\u5e73', '\u6210']), ('\u337c', &['\u662d', '\u548c']), ('\u337d', &['\u5927',
-        '\u6b63']), ('\u337e', &['\u660e', '\u6cbb']), ('\u337f', &['\u682a', '\u5f0f', '\u4f1a',
-        '\u793e']), ('\u3380', &['\x70', '\x41']), ('\u3381', &['\x6e', '\x41']), ('\u3382',
-        &['\u03bc', '\x41']), ('\u3383', &['\x6d', '\x41']), ('\u3384', &['\x6b', '\x41']),
-        ('\u3385', &['\x4b', '\x42']), ('\u3386', &['\x4d', '\x42']), ('\u3387', &['\x47', '\x42']),
-        ('\u3388', &['\x63', '\x61', '\x6c']), ('\u3389', &['\x6b', '\x63', '\x61', '\x6c']),
-        ('\u338a', &['\x70', '\x46']), ('\u338b', &['\x6e', '\x46']), ('\u338c', &['\u03bc',
-        '\x46']), ('\u338d', &['\u03bc', '\x67']), ('\u338e', &['\x6d', '\x67']), ('\u338f',
-        &['\x6b', '\x67']), ('\u3390', &['\x48', '\x7a']), ('\u3391', &['\x6b', '\x48', '\x7a']),
-        ('\u3392', &['\x4d', '\x48', '\x7a']), ('\u3393', &['\x47', '\x48', '\x7a']), ('\u3394',
-        &['\x54', '\x48', '\x7a']), ('\u3395', &['\u03bc', '\u2113']), ('\u3396', &['\x6d',
-        '\u2113']), ('\u3397', &['\x64', '\u2113']), ('\u3398', &['\x6b', '\u2113']), ('\u3399',
-        &['\x66', '\x6d']), ('\u339a', &['\x6e', '\x6d']), ('\u339b', &['\u03bc', '\x6d']),
-        ('\u339c', &['\x6d', '\x6d']), ('\u339d', &['\x63', '\x6d']), ('\u339e', &['\x6b', '\x6d']),
-        ('\u339f', &['\x6d', '\x6d', '\u00b2']), ('\u33a0', &['\x63', '\x6d', '\u00b2']), ('\u33a1',
-        &['\x6d', '\u00b2']), ('\u33a2', &['\x6b', '\x6d', '\u00b2']), ('\u33a3', &['\x6d', '\x6d',
-        '\u00b3']), ('\u33a4', &['\x63', '\x6d', '\u00b3']), ('\u33a5', &['\x6d', '\u00b3']),
-        ('\u33a6', &['\x6b', '\x6d', '\u00b3']), ('\u33a7', &['\x6d', '\u2215', '\x73']), ('\u33a8',
-        &['\x6d', '\u2215', '\x73', '\u00b2']), ('\u33a9', &['\x50', '\x61']), ('\u33aa', &['\x6b',
-        '\x50', '\x61']), ('\u33ab', &['\x4d', '\x50', '\x61']), ('\u33ac', &['\x47', '\x50',
-        '\x61']), ('\u33ad', &['\x72', '\x61', '\x64']), ('\u33ae', &['\x72', '\x61', '\x64',
-        '\u2215', '\x73']), ('\u33af', &['\x72', '\x61', '\x64', '\u2215', '\x73', '\u00b2']),
-        ('\u33b0', &['\x70', '\x73']), ('\u33b1', &['\x6e', '\x73']), ('\u33b2', &['\u03bc',
-        '\x73']), ('\u33b3', &['\x6d', '\x73']), ('\u33b4', &['\x70', '\x56']), ('\u33b5', &['\x6e',
-        '\x56']), ('\u33b6', &['\u03bc', '\x56']), ('\u33b7', &['\x6d', '\x56']), ('\u33b8',
-        &['\x6b', '\x56']), ('\u33b9', &['\x4d', '\x56']), ('\u33ba', &['\x70', '\x57']), ('\u33bb',
-        &['\x6e', '\x57']), ('\u33bc', &['\u03bc', '\x57']), ('\u33bd', &['\x6d', '\x57']),
-        ('\u33be', &['\x6b', '\x57']), ('\u33bf', &['\x4d', '\x57']), ('\u33c0', &['\x6b',
-        '\u03a9']), ('\u33c1', &['\x4d', '\u03a9']), ('\u33c2', &['\x61', '\x2e', '\x6d', '\x2e']),
-        ('\u33c3', &['\x42', '\x71']), ('\u33c4', &['\x63', '\x63']), ('\u33c5', &['\x63', '\x64']),
-        ('\u33c6', &['\x43', '\u2215', '\x6b', '\x67']), ('\u33c7', &['\x43', '\x6f', '\x2e']),
-        ('\u33c8', &['\x64', '\x42']), ('\u33c9', &['\x47', '\x79']), ('\u33ca', &['\x68', '\x61']),
-        ('\u33cb', &['\x48', '\x50']), ('\u33cc', &['\x69', '\x6e']), ('\u33cd', &['\x4b', '\x4b']),
-        ('\u33ce', &['\x4b', '\x4d']), ('\u33cf', &['\x6b', '\x74']), ('\u33d0', &['\x6c', '\x6d']),
-        ('\u33d1', &['\x6c', '\x6e']), ('\u33d2', &['\x6c', '\x6f', '\x67']), ('\u33d3', &['\x6c',
-        '\x78']), ('\u33d4', &['\x6d', '\x62']), ('\u33d5', &['\x6d', '\x69', '\x6c']), ('\u33d6',
-        &['\x6d', '\x6f', '\x6c']), ('\u33d7', &['\x50', '\x48']), ('\u33d8', &['\x70', '\x2e',
-        '\x6d', '\x2e']), ('\u33d9', &['\x50', '\x50', '\x4d']), ('\u33da', &['\x50', '\x52']),
-        ('\u33db', &['\x73', '\x72']), ('\u33dc', &['\x53', '\x76']), ('\u33dd', &['\x57', '\x62']),
-        ('\u33de', &['\x56', '\u2215', '\x6d']), ('\u33df', &['\x41', '\u2215', '\x6d']), ('\u33e0',
-        &['\x31', '\u65e5']), ('\u33e1', &['\x32', '\u65e5']), ('\u33e2', &['\x33', '\u65e5']),
-        ('\u33e3', &['\x34', '\u65e5']), ('\u33e4', &['\x35', '\u65e5']), ('\u33e5', &['\x36',
-        '\u65e5']), ('\u33e6', &['\x37', '\u65e5']), ('\u33e7', &['\x38', '\u65e5']), ('\u33e8',
-        &['\x39', '\u65e5']), ('\u33e9', &['\x31', '\x30', '\u65e5']), ('\u33ea', &['\x31', '\x31',
-        '\u65e5']), ('\u33eb', &['\x31', '\x32', '\u65e5']), ('\u33ec', &['\x31', '\x33',
-        '\u65e5']), ('\u33ed', &['\x31', '\x34', '\u65e5']), ('\u33ee', &['\x31', '\x35',
-        '\u65e5']), ('\u33ef', &['\x31', '\x36', '\u65e5']), ('\u33f0', &['\x31', '\x37',
-        '\u65e5']), ('\u33f1', &['\x31', '\x38', '\u65e5']), ('\u33f2', &['\x31', '\x39',
-        '\u65e5']), ('\u33f3', &['\x32', '\x30', '\u65e5']), ('\u33f4', &['\x32', '\x31',
-        '\u65e5']), ('\u33f5', &['\x32', '\x32', '\u65e5']), ('\u33f6', &['\x32', '\x33',
-        '\u65e5']), ('\u33f7', &['\x32', '\x34', '\u65e5']), ('\u33f8', &['\x32', '\x35',
-        '\u65e5']), ('\u33f9', &['\x32', '\x36', '\u65e5']), ('\u33fa', &['\x32', '\x37',
-        '\u65e5']), ('\u33fb', &['\x32', '\x38', '\u65e5']), ('\u33fc', &['\x32', '\x39',
-        '\u65e5']), ('\u33fd', &['\x33', '\x30', '\u65e5']), ('\u33fe', &['\x33', '\x31',
-        '\u65e5']), ('\u33ff', &['\x67', '\x61', '\x6c']), ('\ua69c', &['\u044a']), ('\ua69d',
-        &['\u044c']), ('\ua770', &['\ua76f']), ('\ua7f8', &['\u0126']), ('\ua7f9', &['\u0153']),
-        ('\uab5c', &['\ua727']), ('\uab5d', &['\uab37']), ('\uab5e', &['\u026b']), ('\uab5f',
-        &['\uab52']), ('\ufb00', &['\x66', '\x66']), ('\ufb01', &['\x66', '\x69']), ('\ufb02',
-        &['\x66', '\x6c']), ('\ufb03', &['\x66', '\x66', '\x69']), ('\ufb04', &['\x66', '\x66',
-        '\x6c']), ('\ufb05', &['\u017f', '\x74']), ('\ufb06', &['\x73', '\x74']), ('\ufb13',
-        &['\u0574', '\u0576']), ('\ufb14', &['\u0574', '\u0565']), ('\ufb15', &['\u0574',
-        '\u056b']), ('\ufb16', &['\u057e', '\u0576']), ('\ufb17', &['\u0574', '\u056d']), ('\ufb20',
-        &['\u05e2']), ('\ufb21', &['\u05d0']), ('\ufb22', &['\u05d3']), ('\ufb23', &['\u05d4']),
-        ('\ufb24', &['\u05db']), ('\ufb25', &['\u05dc']), ('\ufb26', &['\u05dd']), ('\ufb27',
-        &['\u05e8']), ('\ufb28', &['\u05ea']), ('\ufb29', &['\x2b']), ('\ufb4f', &['\u05d0',
-        '\u05dc']), ('\ufb50', &['\u0671']), ('\ufb51', &['\u0671']), ('\ufb52', &['\u067b']),
-        ('\ufb53', &['\u067b']), ('\ufb54', &['\u067b']), ('\ufb55', &['\u067b']), ('\ufb56',
-        &['\u067e']), ('\ufb57', &['\u067e']), ('\ufb58', &['\u067e']), ('\ufb59', &['\u067e']),
-        ('\ufb5a', &['\u0680']), ('\ufb5b', &['\u0680']), ('\ufb5c', &['\u0680']), ('\ufb5d',
-        &['\u0680']), ('\ufb5e', &['\u067a']), ('\ufb5f', &['\u067a']), ('\ufb60', &['\u067a']),
-        ('\ufb61', &['\u067a']), ('\ufb62', &['\u067f']), ('\ufb63', &['\u067f']), ('\ufb64',
-        &['\u067f']), ('\ufb65', &['\u067f']), ('\ufb66', &['\u0679']), ('\ufb67', &['\u0679']),
-        ('\ufb68', &['\u0679']), ('\ufb69', &['\u0679']), ('\ufb6a', &['\u06a4']), ('\ufb6b',
-        &['\u06a4']), ('\ufb6c', &['\u06a4']), ('\ufb6d', &['\u06a4']), ('\ufb6e', &['\u06a6']),
-        ('\ufb6f', &['\u06a6']), ('\ufb70', &['\u06a6']), ('\ufb71', &['\u06a6']), ('\ufb72',
-        &['\u0684']), ('\ufb73', &['\u0684']), ('\ufb74', &['\u0684']), ('\ufb75', &['\u0684']),
-        ('\ufb76', &['\u0683']), ('\ufb77', &['\u0683']), ('\ufb78', &['\u0683']), ('\ufb79',
-        &['\u0683']), ('\ufb7a', &['\u0686']), ('\ufb7b', &['\u0686']), ('\ufb7c', &['\u0686']),
-        ('\ufb7d', &['\u0686']), ('\ufb7e', &['\u0687']), ('\ufb7f', &['\u0687']), ('\ufb80',
-        &['\u0687']), ('\ufb81', &['\u0687']), ('\ufb82', &['\u068d']), ('\ufb83', &['\u068d']),
-        ('\ufb84', &['\u068c']), ('\ufb85', &['\u068c']), ('\ufb86', &['\u068e']), ('\ufb87',
-        &['\u068e']), ('\ufb88', &['\u0688']), ('\ufb89', &['\u0688']), ('\ufb8a', &['\u0698']),
-        ('\ufb8b', &['\u0698']), ('\ufb8c', &['\u0691']), ('\ufb8d', &['\u0691']), ('\ufb8e',
-        &['\u06a9']), ('\ufb8f', &['\u06a9']), ('\ufb90', &['\u06a9']), ('\ufb91', &['\u06a9']),
-        ('\ufb92', &['\u06af']), ('\ufb93', &['\u06af']), ('\ufb94', &['\u06af']), ('\ufb95',
-        &['\u06af']), ('\ufb96', &['\u06b3']), ('\ufb97', &['\u06b3']), ('\ufb98', &['\u06b3']),
-        ('\ufb99', &['\u06b3']), ('\ufb9a', &['\u06b1']), ('\ufb9b', &['\u06b1']), ('\ufb9c',
-        &['\u06b1']), ('\ufb9d', &['\u06b1']), ('\ufb9e', &['\u06ba']), ('\ufb9f', &['\u06ba']),
-        ('\ufba0', &['\u06bb']), ('\ufba1', &['\u06bb']), ('\ufba2', &['\u06bb']), ('\ufba3',
-        &['\u06bb']), ('\ufba4', &['\u06c0']), ('\ufba5', &['\u06c0']), ('\ufba6', &['\u06c1']),
-        ('\ufba7', &['\u06c1']), ('\ufba8', &['\u06c1']), ('\ufba9', &['\u06c1']), ('\ufbaa',
-        &['\u06be']), ('\ufbab', &['\u06be']), ('\ufbac', &['\u06be']), ('\ufbad', &['\u06be']),
-        ('\ufbae', &['\u06d2']), ('\ufbaf', &['\u06d2']), ('\ufbb0', &['\u06d3']), ('\ufbb1',
-        &['\u06d3']), ('\ufbd3', &['\u06ad']), ('\ufbd4', &['\u06ad']), ('\ufbd5', &['\u06ad']),
-        ('\ufbd6', &['\u06ad']), ('\ufbd7', &['\u06c7']), ('\ufbd8', &['\u06c7']), ('\ufbd9',
-        &['\u06c6']), ('\ufbda', &['\u06c6']), ('\ufbdb', &['\u06c8']), ('\ufbdc', &['\u06c8']),
-        ('\ufbdd', &['\u0677']), ('\ufbde', &['\u06cb']), ('\ufbdf', &['\u06cb']), ('\ufbe0',
-        &['\u06c5']), ('\ufbe1', &['\u06c5']), ('\ufbe2', &['\u06c9']), ('\ufbe3', &['\u06c9']),
-        ('\ufbe4', &['\u06d0']), ('\ufbe5', &['\u06d0']), ('\ufbe6', &['\u06d0']), ('\ufbe7',
-        &['\u06d0']), ('\ufbe8', &['\u0649']), ('\ufbe9', &['\u0649']), ('\ufbea', &['\u0626',
-        '\u0627']), ('\ufbeb', &['\u0626', '\u0627']), ('\ufbec', &['\u0626', '\u06d5']), ('\ufbed',
-        &['\u0626', '\u06d5']), ('\ufbee', &['\u0626', '\u0648']), ('\ufbef', &['\u0626',
-        '\u0648']), ('\ufbf0', &['\u0626', '\u06c7']), ('\ufbf1', &['\u0626', '\u06c7']), ('\ufbf2',
-        &['\u0626', '\u06c6']), ('\ufbf3', &['\u0626', '\u06c6']), ('\ufbf4', &['\u0626',
-        '\u06c8']), ('\ufbf5', &['\u0626', '\u06c8']), ('\ufbf6', &['\u0626', '\u06d0']), ('\ufbf7',
-        &['\u0626', '\u06d0']), ('\ufbf8', &['\u0626', '\u06d0']), ('\ufbf9', &['\u0626',
-        '\u0649']), ('\ufbfa', &['\u0626', '\u0649']), ('\ufbfb', &['\u0626', '\u0649']), ('\ufbfc',
-        &['\u06cc']), ('\ufbfd', &['\u06cc']), ('\ufbfe', &['\u06cc']), ('\ufbff', &['\u06cc']),
-        ('\ufc00', &['\u0626', '\u062c']), ('\ufc01', &['\u0626', '\u062d']), ('\ufc02', &['\u0626',
-        '\u0645']), ('\ufc03', &['\u0626', '\u0649']), ('\ufc04', &['\u0626', '\u064a']), ('\ufc05',
-        &['\u0628', '\u062c']), ('\ufc06', &['\u0628', '\u062d']), ('\ufc07', &['\u0628',
-        '\u062e']), ('\ufc08', &['\u0628', '\u0645']), ('\ufc09', &['\u0628', '\u0649']), ('\ufc0a',
-        &['\u0628', '\u064a']), ('\ufc0b', &['\u062a', '\u062c']), ('\ufc0c', &['\u062a',
-        '\u062d']), ('\ufc0d', &['\u062a', '\u062e']), ('\ufc0e', &['\u062a', '\u0645']), ('\ufc0f',
-        &['\u062a', '\u0649']), ('\ufc10', &['\u062a', '\u064a']), ('\ufc11', &['\u062b',
-        '\u062c']), ('\ufc12', &['\u062b', '\u0645']), ('\ufc13', &['\u062b', '\u0649']), ('\ufc14',
-        &['\u062b', '\u064a']), ('\ufc15', &['\u062c', '\u062d']), ('\ufc16', &['\u062c',
-        '\u0645']), ('\ufc17', &['\u062d', '\u062c']), ('\ufc18', &['\u062d', '\u0645']), ('\ufc19',
-        &['\u062e', '\u062c']), ('\ufc1a', &['\u062e', '\u062d']), ('\ufc1b', &['\u062e',
-        '\u0645']), ('\ufc1c', &['\u0633', '\u062c']), ('\ufc1d', &['\u0633', '\u062d']), ('\ufc1e',
-        &['\u0633', '\u062e']), ('\ufc1f', &['\u0633', '\u0645']), ('\ufc20', &['\u0635',
-        '\u062d']), ('\ufc21', &['\u0635', '\u0645']), ('\ufc22', &['\u0636', '\u062c']), ('\ufc23',
-        &['\u0636', '\u062d']), ('\ufc24', &['\u0636', '\u062e']), ('\ufc25', &['\u0636',
-        '\u0645']), ('\ufc26', &['\u0637', '\u062d']), ('\ufc27', &['\u0637', '\u0645']), ('\ufc28',
-        &['\u0638', '\u0645']), ('\ufc29', &['\u0639', '\u062c']), ('\ufc2a', &['\u0639',
-        '\u0645']), ('\ufc2b', &['\u063a', '\u062c']), ('\ufc2c', &['\u063a', '\u0645']), ('\ufc2d',
-        &['\u0641', '\u062c']), ('\ufc2e', &['\u0641', '\u062d']), ('\ufc2f', &['\u0641',
-        '\u062e']), ('\ufc30', &['\u0641', '\u0645']), ('\ufc31', &['\u0641', '\u0649']), ('\ufc32',
-        &['\u0641', '\u064a']), ('\ufc33', &['\u0642', '\u062d']), ('\ufc34', &['\u0642',
-        '\u0645']), ('\ufc35', &['\u0642', '\u0649']), ('\ufc36', &['\u0642', '\u064a']), ('\ufc37',
-        &['\u0643', '\u0627']), ('\ufc38', &['\u0643', '\u062c']), ('\ufc39', &['\u0643',
-        '\u062d']), ('\ufc3a', &['\u0643', '\u062e']), ('\ufc3b', &['\u0643', '\u0644']), ('\ufc3c',
-        &['\u0643', '\u0645']), ('\ufc3d', &['\u0643', '\u0649']), ('\ufc3e', &['\u0643',
-        '\u064a']), ('\ufc3f', &['\u0644', '\u062c']), ('\ufc40', &['\u0644', '\u062d']), ('\ufc41',
-        &['\u0644', '\u062e']), ('\ufc42', &['\u0644', '\u0645']), ('\ufc43', &['\u0644',
-        '\u0649']), ('\ufc44', &['\u0644', '\u064a']), ('\ufc45', &['\u0645', '\u062c']), ('\ufc46',
-        &['\u0645', '\u062d']), ('\ufc47', &['\u0645', '\u062e']), ('\ufc48', &['\u0645',
-        '\u0645']), ('\ufc49', &['\u0645', '\u0649']), ('\ufc4a', &['\u0645', '\u064a']), ('\ufc4b',
-        &['\u0646', '\u062c']), ('\ufc4c', &['\u0646', '\u062d']), ('\ufc4d', &['\u0646',
-        '\u062e']), ('\ufc4e', &['\u0646', '\u0645']), ('\ufc4f', &['\u0646', '\u0649']), ('\ufc50',
-        &['\u0646', '\u064a']), ('\ufc51', &['\u0647', '\u062c']), ('\ufc52', &['\u0647',
-        '\u0645']), ('\ufc53', &['\u0647', '\u0649']), ('\ufc54', &['\u0647', '\u064a']), ('\ufc55',
-        &['\u064a', '\u062c']), ('\ufc56', &['\u064a', '\u062d']), ('\ufc57', &['\u064a',
-        '\u062e']), ('\ufc58', &['\u064a', '\u0645']), ('\ufc59', &['\u064a', '\u0649']), ('\ufc5a',
-        &['\u064a', '\u064a']), ('\ufc5b', &['\u0630', '\u0670']), ('\ufc5c', &['\u0631',
-        '\u0670']), ('\ufc5d', &['\u0649', '\u0670']), ('\ufc5e', &['\x20', '\u064c', '\u0651']),
-        ('\ufc5f', &['\x20', '\u064d', '\u0651']), ('\ufc60', &['\x20', '\u064e', '\u0651']),
-        ('\ufc61', &['\x20', '\u064f', '\u0651']), ('\ufc62', &['\x20', '\u0650', '\u0651']),
-        ('\ufc63', &['\x20', '\u0651', '\u0670']), ('\ufc64', &['\u0626', '\u0631']), ('\ufc65',
-        &['\u0626', '\u0632']), ('\ufc66', &['\u0626', '\u0645']), ('\ufc67', &['\u0626',
-        '\u0646']), ('\ufc68', &['\u0626', '\u0649']), ('\ufc69', &['\u0626', '\u064a']), ('\ufc6a',
-        &['\u0628', '\u0631']), ('\ufc6b', &['\u0628', '\u0632']), ('\ufc6c', &['\u0628',
-        '\u0645']), ('\ufc6d', &['\u0628', '\u0646']), ('\ufc6e', &['\u0628', '\u0649']), ('\ufc6f',
-        &['\u0628', '\u064a']), ('\ufc70', &['\u062a', '\u0631']), ('\ufc71', &['\u062a',
-        '\u0632']), ('\ufc72', &['\u062a', '\u0645']), ('\ufc73', &['\u062a', '\u0646']), ('\ufc74',
-        &['\u062a', '\u0649']), ('\ufc75', &['\u062a', '\u064a']), ('\ufc76', &['\u062b',
-        '\u0631']), ('\ufc77', &['\u062b', '\u0632']), ('\ufc78', &['\u062b', '\u0645']), ('\ufc79',
-        &['\u062b', '\u0646']), ('\ufc7a', &['\u062b', '\u0649']), ('\ufc7b', &['\u062b',
-        '\u064a']), ('\ufc7c', &['\u0641', '\u0649']), ('\ufc7d', &['\u0641', '\u064a']), ('\ufc7e',
-        &['\u0642', '\u0649']), ('\ufc7f', &['\u0642', '\u064a']), ('\ufc80', &['\u0643',
-        '\u0627']), ('\ufc81', &['\u0643', '\u0644']), ('\ufc82', &['\u0643', '\u0645']), ('\ufc83',
-        &['\u0643', '\u0649']), ('\ufc84', &['\u0643', '\u064a']), ('\ufc85', &['\u0644',
-        '\u0645']), ('\ufc86', &['\u0644', '\u0649']), ('\ufc87', &['\u0644', '\u064a']), ('\ufc88',
-        &['\u0645', '\u0627']), ('\ufc89', &['\u0645', '\u0645']), ('\ufc8a', &['\u0646',
-        '\u0631']), ('\ufc8b', &['\u0646', '\u0632']), ('\ufc8c', &['\u0646', '\u0645']), ('\ufc8d',
-        &['\u0646', '\u0646']), ('\ufc8e', &['\u0646', '\u0649']), ('\ufc8f', &['\u0646',
-        '\u064a']), ('\ufc90', &['\u0649', '\u0670']), ('\ufc91', &['\u064a', '\u0631']), ('\ufc92',
-        &['\u064a', '\u0632']), ('\ufc93', &['\u064a', '\u0645']), ('\ufc94', &['\u064a',
-        '\u0646']), ('\ufc95', &['\u064a', '\u0649']), ('\ufc96', &['\u064a', '\u064a']), ('\ufc97',
-        &['\u0626', '\u062c']), ('\ufc98', &['\u0626', '\u062d']), ('\ufc99', &['\u0626',
-        '\u062e']), ('\ufc9a', &['\u0626', '\u0645']), ('\ufc9b', &['\u0626', '\u0647']), ('\ufc9c',
-        &['\u0628', '\u062c']), ('\ufc9d', &['\u0628', '\u062d']), ('\ufc9e', &['\u0628',
-        '\u062e']), ('\ufc9f', &['\u0628', '\u0645']), ('\ufca0', &['\u0628', '\u0647']), ('\ufca1',
-        &['\u062a', '\u062c']), ('\ufca2', &['\u062a', '\u062d']), ('\ufca3', &['\u062a',
-        '\u062e']), ('\ufca4', &['\u062a', '\u0645']), ('\ufca5', &['\u062a', '\u0647']), ('\ufca6',
-        &['\u062b', '\u0645']), ('\ufca7', &['\u062c', '\u062d']), ('\ufca8', &['\u062c',
-        '\u0645']), ('\ufca9', &['\u062d', '\u062c']), ('\ufcaa', &['\u062d', '\u0645']), ('\ufcab',
-        &['\u062e', '\u062c']), ('\ufcac', &['\u062e', '\u0645']), ('\ufcad', &['\u0633',
-        '\u062c']), ('\ufcae', &['\u0633', '\u062d']), ('\ufcaf', &['\u0633', '\u062e']), ('\ufcb0',
-        &['\u0633', '\u0645']), ('\ufcb1', &['\u0635', '\u062d']), ('\ufcb2', &['\u0635',
-        '\u062e']), ('\ufcb3', &['\u0635', '\u0645']), ('\ufcb4', &['\u0636', '\u062c']), ('\ufcb5',
-        &['\u0636', '\u062d']), ('\ufcb6', &['\u0636', '\u062e']), ('\ufcb7', &['\u0636',
-        '\u0645']), ('\ufcb8', &['\u0637', '\u062d']), ('\ufcb9', &['\u0638', '\u0645']), ('\ufcba',
-        &['\u0639', '\u062c']), ('\ufcbb', &['\u0639', '\u0645']), ('\ufcbc', &['\u063a',
-        '\u062c']), ('\ufcbd', &['\u063a', '\u0645']), ('\ufcbe', &['\u0641', '\u062c']), ('\ufcbf',
-        &['\u0641', '\u062d']), ('\ufcc0', &['\u0641', '\u062e']), ('\ufcc1', &['\u0641',
-        '\u0645']), ('\ufcc2', &['\u0642', '\u062d']), ('\ufcc3', &['\u0642', '\u0645']), ('\ufcc4',
-        &['\u0643', '\u062c']), ('\ufcc5', &['\u0643', '\u062d']), ('\ufcc6', &['\u0643',
-        '\u062e']), ('\ufcc7', &['\u0643', '\u0644']), ('\ufcc8', &['\u0643', '\u0645']), ('\ufcc9',
-        &['\u0644', '\u062c']), ('\ufcca', &['\u0644', '\u062d']), ('\ufccb', &['\u0644',
-        '\u062e']), ('\ufccc', &['\u0644', '\u0645']), ('\ufccd', &['\u0644', '\u0647']), ('\ufcce',
-        &['\u0645', '\u062c']), ('\ufccf', &['\u0645', '\u062d']), ('\ufcd0', &['\u0645',
-        '\u062e']), ('\ufcd1', &['\u0645', '\u0645']), ('\ufcd2', &['\u0646', '\u062c']), ('\ufcd3',
-        &['\u0646', '\u062d']), ('\ufcd4', &['\u0646', '\u062e']), ('\ufcd5', &['\u0646',
-        '\u0645']), ('\ufcd6', &['\u0646', '\u0647']), ('\ufcd7', &['\u0647', '\u062c']), ('\ufcd8',
-        &['\u0647', '\u0645']), ('\ufcd9', &['\u0647', '\u0670']), ('\ufcda', &['\u064a',
-        '\u062c']), ('\ufcdb', &['\u064a', '\u062d']), ('\ufcdc', &['\u064a', '\u062e']), ('\ufcdd',
-        &['\u064a', '\u0645']), ('\ufcde', &['\u064a', '\u0647']), ('\ufcdf', &['\u0626',
-        '\u0645']), ('\ufce0', &['\u0626', '\u0647']), ('\ufce1', &['\u0628', '\u0645']), ('\ufce2',
-        &['\u0628', '\u0647']), ('\ufce3', &['\u062a', '\u0645']), ('\ufce4', &['\u062a',
-        '\u0647']), ('\ufce5', &['\u062b', '\u0645']), ('\ufce6', &['\u062b', '\u0647']), ('\ufce7',
-        &['\u0633', '\u0645']), ('\ufce8', &['\u0633', '\u0647']), ('\ufce9', &['\u0634',
-        '\u0645']), ('\ufcea', &['\u0634', '\u0647']), ('\ufceb', &['\u0643', '\u0644']), ('\ufcec',
-        &['\u0643', '\u0645']), ('\ufced', &['\u0644', '\u0645']), ('\ufcee', &['\u0646',
-        '\u0645']), ('\ufcef', &['\u0646', '\u0647']), ('\ufcf0', &['\u064a', '\u0645']), ('\ufcf1',
-        &['\u064a', '\u0647']), ('\ufcf2', &['\u0640', '\u064e', '\u0651']), ('\ufcf3', &['\u0640',
-        '\u064f', '\u0651']), ('\ufcf4', &['\u0640', '\u0650', '\u0651']), ('\ufcf5', &['\u0637',
-        '\u0649']), ('\ufcf6', &['\u0637', '\u064a']), ('\ufcf7', &['\u0639', '\u0649']), ('\ufcf8',
-        &['\u0639', '\u064a']), ('\ufcf9', &['\u063a', '\u0649']), ('\ufcfa', &['\u063a',
-        '\u064a']), ('\ufcfb', &['\u0633', '\u0649']), ('\ufcfc', &['\u0633', '\u064a']), ('\ufcfd',
-        &['\u0634', '\u0649']), ('\ufcfe', &['\u0634', '\u064a']), ('\ufcff', &['\u062d',
-        '\u0649']), ('\ufd00', &['\u062d', '\u064a']), ('\ufd01', &['\u062c', '\u0649']), ('\ufd02',
-        &['\u062c', '\u064a']), ('\ufd03', &['\u062e', '\u0649']), ('\ufd04', &['\u062e',
-        '\u064a']), ('\ufd05', &['\u0635', '\u0649']), ('\ufd06', &['\u0635', '\u064a']), ('\ufd07',
-        &['\u0636', '\u0649']), ('\ufd08', &['\u0636', '\u064a']), ('\ufd09', &['\u0634',
-        '\u062c']), ('\ufd0a', &['\u0634', '\u062d']), ('\ufd0b', &['\u0634', '\u062e']), ('\ufd0c',
-        &['\u0634', '\u0645']), ('\ufd0d', &['\u0634', '\u0631']), ('\ufd0e', &['\u0633',
-        '\u0631']), ('\ufd0f', &['\u0635', '\u0631']), ('\ufd10', &['\u0636', '\u0631']), ('\ufd11',
-        &['\u0637', '\u0649']), ('\ufd12', &['\u0637', '\u064a']), ('\ufd13', &['\u0639',
-        '\u0649']), ('\ufd14', &['\u0639', '\u064a']), ('\ufd15', &['\u063a', '\u0649']), ('\ufd16',
-        &['\u063a', '\u064a']), ('\ufd17', &['\u0633', '\u0649']), ('\ufd18', &['\u0633',
-        '\u064a']), ('\ufd19', &['\u0634', '\u0649']), ('\ufd1a', &['\u0634', '\u064a']), ('\ufd1b',
-        &['\u062d', '\u0649']), ('\ufd1c', &['\u062d', '\u064a']), ('\ufd1d', &['\u062c',
-        '\u0649']), ('\ufd1e', &['\u062c', '\u064a']), ('\ufd1f', &['\u062e', '\u0649']), ('\ufd20',
-        &['\u062e', '\u064a']), ('\ufd21', &['\u0635', '\u0649']), ('\ufd22', &['\u0635',
-        '\u064a']), ('\ufd23', &['\u0636', '\u0649']), ('\ufd24', &['\u0636', '\u064a']), ('\ufd25',
-        &['\u0634', '\u062c']), ('\ufd26', &['\u0634', '\u062d']), ('\ufd27', &['\u0634',
-        '\u062e']), ('\ufd28', &['\u0634', '\u0645']), ('\ufd29', &['\u0634', '\u0631']), ('\ufd2a',
-        &['\u0633', '\u0631']), ('\ufd2b', &['\u0635', '\u0631']), ('\ufd2c', &['\u0636',
-        '\u0631']), ('\ufd2d', &['\u0634', '\u062c']), ('\ufd2e', &['\u0634', '\u062d']), ('\ufd2f',
-        &['\u0634', '\u062e']), ('\ufd30', &['\u0634', '\u0645']), ('\ufd31', &['\u0633',
-        '\u0647']), ('\ufd32', &['\u0634', '\u0647']), ('\ufd33', &['\u0637', '\u0645']), ('\ufd34',
-        &['\u0633', '\u062c']), ('\ufd35', &['\u0633', '\u062d']), ('\ufd36', &['\u0633',
-        '\u062e']), ('\ufd37', &['\u0634', '\u062c']), ('\ufd38', &['\u0634', '\u062d']), ('\ufd39',
-        &['\u0634', '\u062e']), ('\ufd3a', &['\u0637', '\u0645']), ('\ufd3b', &['\u0638',
-        '\u0645']), ('\ufd3c', &['\u0627', '\u064b']), ('\ufd3d', &['\u0627', '\u064b']), ('\ufd50',
-        &['\u062a', '\u062c', '\u0645']), ('\ufd51', &['\u062a', '\u062d', '\u062c']), ('\ufd52',
-        &['\u062a', '\u062d', '\u062c']), ('\ufd53', &['\u062a', '\u062d', '\u0645']), ('\ufd54',
-        &['\u062a', '\u062e', '\u0645']), ('\ufd55', &['\u062a', '\u0645', '\u062c']), ('\ufd56',
-        &['\u062a', '\u0645', '\u062d']), ('\ufd57', &['\u062a', '\u0645', '\u062e']), ('\ufd58',
-        &['\u062c', '\u0645', '\u062d']), ('\ufd59', &['\u062c', '\u0645', '\u062d']), ('\ufd5a',
-        &['\u062d', '\u0645', '\u064a']), ('\ufd5b', &['\u062d', '\u0645', '\u0649']), ('\ufd5c',
-        &['\u0633', '\u062d', '\u062c']), ('\ufd5d', &['\u0633', '\u062c', '\u062d']), ('\ufd5e',
-        &['\u0633', '\u062c', '\u0649']), ('\ufd5f', &['\u0633', '\u0645', '\u062d']), ('\ufd60',
-        &['\u0633', '\u0645', '\u062d']), ('\ufd61', &['\u0633', '\u0645', '\u062c']), ('\ufd62',
-        &['\u0633', '\u0645', '\u0645']), ('\ufd63', &['\u0633', '\u0645', '\u0645']), ('\ufd64',
-        &['\u0635', '\u062d', '\u062d']), ('\ufd65', &['\u0635', '\u062d', '\u062d']), ('\ufd66',
-        &['\u0635', '\u0645', '\u0645']), ('\ufd67', &['\u0634', '\u062d', '\u0645']), ('\ufd68',
-        &['\u0634', '\u062d', '\u0645']), ('\ufd69', &['\u0634', '\u062c', '\u064a']), ('\ufd6a',
-        &['\u0634', '\u0645', '\u062e']), ('\ufd6b', &['\u0634', '\u0645', '\u062e']), ('\ufd6c',
-        &['\u0634', '\u0645', '\u0645']), ('\ufd6d', &['\u0634', '\u0645', '\u0645']), ('\ufd6e',
-        &['\u0636', '\u062d', '\u0649']), ('\ufd6f', &['\u0636', '\u062e', '\u0645']), ('\ufd70',
-        &['\u0636', '\u062e', '\u0645']), ('\ufd71', &['\u0637', '\u0645', '\u062d']), ('\ufd72',
-        &['\u0637', '\u0645', '\u062d']), ('\ufd73', &['\u0637', '\u0645', '\u0645']), ('\ufd74',
-        &['\u0637', '\u0645', '\u064a']), ('\ufd75', &['\u0639', '\u062c', '\u0645']), ('\ufd76',
-        &['\u0639', '\u0645', '\u0645']), ('\ufd77', &['\u0639', '\u0645', '\u0645']), ('\ufd78',
-        &['\u0639', '\u0645', '\u0649']), ('\ufd79', &['\u063a', '\u0645', '\u0645']), ('\ufd7a',
-        &['\u063a', '\u0645', '\u064a']), ('\ufd7b', &['\u063a', '\u0645', '\u0649']), ('\ufd7c',
-        &['\u0641', '\u062e', '\u0645']), ('\ufd7d', &['\u0641', '\u062e', '\u0645']), ('\ufd7e',
-        &['\u0642', '\u0645', '\u062d']), ('\ufd7f', &['\u0642', '\u0645', '\u0645']), ('\ufd80',
-        &['\u0644', '\u062d', '\u0645']), ('\ufd81', &['\u0644', '\u062d', '\u064a']), ('\ufd82',
-        &['\u0644', '\u062d', '\u0649']), ('\ufd83', &['\u0644', '\u062c', '\u062c']), ('\ufd84',
-        &['\u0644', '\u062c', '\u062c']), ('\ufd85', &['\u0644', '\u062e', '\u0645']), ('\ufd86',
-        &['\u0644', '\u062e', '\u0645']), ('\ufd87', &['\u0644', '\u0645', '\u062d']), ('\ufd88',
-        &['\u0644', '\u0645', '\u062d']), ('\ufd89', &['\u0645', '\u062d', '\u062c']), ('\ufd8a',
-        &['\u0645', '\u062d', '\u0645']), ('\ufd8b', &['\u0645', '\u062d', '\u064a']), ('\ufd8c',
-        &['\u0645', '\u062c', '\u062d']), ('\ufd8d', &['\u0645', '\u062c', '\u0645']), ('\ufd8e',
-        &['\u0645', '\u062e', '\u062c']), ('\ufd8f', &['\u0645', '\u062e', '\u0645']), ('\ufd92',
-        &['\u0645', '\u062c', '\u062e']), ('\ufd93', &['\u0647', '\u0645', '\u062c']), ('\ufd94',
-        &['\u0647', '\u0645', '\u0645']), ('\ufd95', &['\u0646', '\u062d', '\u0645']), ('\ufd96',
-        &['\u0646', '\u062d', '\u0649']), ('\ufd97', &['\u0646', '\u062c', '\u0645']), ('\ufd98',
-        &['\u0646', '\u062c', '\u0645']), ('\ufd99', &['\u0646', '\u062c', '\u0649']), ('\ufd9a',
-        &['\u0646', '\u0645', '\u064a']), ('\ufd9b', &['\u0646', '\u0645', '\u0649']), ('\ufd9c',
-        &['\u064a', '\u0645', '\u0645']), ('\ufd9d', &['\u064a', '\u0645', '\u0645']), ('\ufd9e',
-        &['\u0628', '\u062e', '\u064a']), ('\ufd9f', &['\u062a', '\u062c', '\u064a']), ('\ufda0',
-        &['\u062a', '\u062c', '\u0649']), ('\ufda1', &['\u062a', '\u062e', '\u064a']), ('\ufda2',
-        &['\u062a', '\u062e', '\u0649']), ('\ufda3', &['\u062a', '\u0645', '\u064a']), ('\ufda4',
-        &['\u062a', '\u0645', '\u0649']), ('\ufda5', &['\u062c', '\u0645', '\u064a']), ('\ufda6',
-        &['\u062c', '\u062d', '\u0649']), ('\ufda7', &['\u062c', '\u0645', '\u0649']), ('\ufda8',
-        &['\u0633', '\u062e', '\u0649']), ('\ufda9', &['\u0635', '\u062d', '\u064a']), ('\ufdaa',
-        &['\u0634', '\u062d', '\u064a']), ('\ufdab', &['\u0636', '\u062d', '\u064a']), ('\ufdac',
-        &['\u0644', '\u062c', '\u064a']), ('\ufdad', &['\u0644', '\u0645', '\u064a']), ('\ufdae',
-        &['\u064a', '\u062d', '\u064a']), ('\ufdaf', &['\u064a', '\u062c', '\u064a']), ('\ufdb0',
-        &['\u064a', '\u0645', '\u064a']), ('\ufdb1', &['\u0645', '\u0645', '\u064a']), ('\ufdb2',
-        &['\u0642', '\u0645', '\u064a']), ('\ufdb3', &['\u0646', '\u062d', '\u064a']), ('\ufdb4',
-        &['\u0642', '\u0645', '\u062d']), ('\ufdb5', &['\u0644', '\u062d', '\u0645']), ('\ufdb6',
-        &['\u0639', '\u0645', '\u064a']), ('\ufdb7', &['\u0643', '\u0645', '\u064a']), ('\ufdb8',
-        &['\u0646', '\u062c', '\u062d']), ('\ufdb9', &['\u0645', '\u062e', '\u064a']), ('\ufdba',
-        &['\u0644', '\u062c', '\u0645']), ('\ufdbb', &['\u0643', '\u0645', '\u0645']), ('\ufdbc',
-        &['\u0644', '\u062c', '\u0645']), ('\ufdbd', &['\u0646', '\u062c', '\u062d']), ('\ufdbe',
-        &['\u062c', '\u062d', '\u064a']), ('\ufdbf', &['\u062d', '\u062c', '\u064a']), ('\ufdc0',
-        &['\u0645', '\u062c', '\u064a']), ('\ufdc1', &['\u0641', '\u0645', '\u064a']), ('\ufdc2',
-        &['\u0628', '\u062d', '\u064a']), ('\ufdc3', &['\u0643', '\u0645', '\u0645']), ('\ufdc4',
-        &['\u0639', '\u062c', '\u0645']), ('\ufdc5', &['\u0635', '\u0645', '\u0645']), ('\ufdc6',
-        &['\u0633', '\u062e', '\u064a']), ('\ufdc7', &['\u0646', '\u062c', '\u064a']), ('\ufdf0',
-        &['\u0635', '\u0644', '\u06d2']), ('\ufdf1', &['\u0642', '\u0644', '\u06d2']), ('\ufdf2',
-        &['\u0627', '\u0644', '\u0644', '\u0647']), ('\ufdf3', &['\u0627', '\u0643', '\u0628',
-        '\u0631']), ('\ufdf4', &['\u0645', '\u062d', '\u0645', '\u062f']), ('\ufdf5', &['\u0635',
-        '\u0644', '\u0639', '\u0645']), ('\ufdf6', &['\u0631', '\u0633', '\u0648', '\u0644']),
-        ('\ufdf7', &['\u0639', '\u0644', '\u064a', '\u0647']), ('\ufdf8', &['\u0648', '\u0633',
-        '\u0644', '\u0645']), ('\ufdf9', &['\u0635', '\u0644', '\u0649']), ('\ufdfa', &['\u0635',
-        '\u0644', '\u0649', '\x20', '\u0627', '\u0644', '\u0644', '\u0647', '\x20', '\u0639',
-        '\u0644', '\u064a', '\u0647', '\x20', '\u0648', '\u0633', '\u0644', '\u0645']), ('\ufdfb',
-        &['\u062c', '\u0644', '\x20', '\u062c', '\u0644', '\u0627', '\u0644', '\u0647']), ('\ufdfc',
-        &['\u0631', '\u06cc', '\u0627', '\u0644']), ('\ufe10', &['\x2c']), ('\ufe11', &['\u3001']),
-        ('\ufe12', &['\u3002']), ('\ufe13', &['\x3a']), ('\ufe14', &['\x3b']), ('\ufe15',
-        &['\x21']), ('\ufe16', &['\x3f']), ('\ufe17', &['\u3016']), ('\ufe18', &['\u3017']),
-        ('\ufe19', &['\u2026']), ('\ufe30', &['\u2025']), ('\ufe31', &['\u2014']), ('\ufe32',
-        &['\u2013']), ('\ufe33', &['\x5f']), ('\ufe34', &['\x5f']), ('\ufe35', &['\x28']),
-        ('\ufe36', &['\x29']), ('\ufe37', &['\x7b']), ('\ufe38', &['\x7d']), ('\ufe39',
-        &['\u3014']), ('\ufe3a', &['\u3015']), ('\ufe3b', &['\u3010']), ('\ufe3c', &['\u3011']),
-        ('\ufe3d', &['\u300a']), ('\ufe3e', &['\u300b']), ('\ufe3f', &['\u3008']), ('\ufe40',
-        &['\u3009']), ('\ufe41', &['\u300c']), ('\ufe42', &['\u300d']), ('\ufe43', &['\u300e']),
-        ('\ufe44', &['\u300f']), ('\ufe47', &['\x5b']), ('\ufe48', &['\x5d']), ('\ufe49',
-        &['\u203e']), ('\ufe4a', &['\u203e']), ('\ufe4b', &['\u203e']), ('\ufe4c', &['\u203e']),
-        ('\ufe4d', &['\x5f']), ('\ufe4e', &['\x5f']), ('\ufe4f', &['\x5f']), ('\ufe50', &['\x2c']),
-        ('\ufe51', &['\u3001']), ('\ufe52', &['\x2e']), ('\ufe54', &['\x3b']), ('\ufe55',
-        &['\x3a']), ('\ufe56', &['\x3f']), ('\ufe57', &['\x21']), ('\ufe58', &['\u2014']),
-        ('\ufe59', &['\x28']), ('\ufe5a', &['\x29']), ('\ufe5b', &['\x7b']), ('\ufe5c', &['\x7d']),
-        ('\ufe5d', &['\u3014']), ('\ufe5e', &['\u3015']), ('\ufe5f', &['\x23']), ('\ufe60',
-        &['\x26']), ('\ufe61', &['\x2a']), ('\ufe62', &['\x2b']), ('\ufe63', &['\x2d']), ('\ufe64',
-        &['\x3c']), ('\ufe65', &['\x3e']), ('\ufe66', &['\x3d']), ('\ufe68', &['\x5c']), ('\ufe69',
-        &['\x24']), ('\ufe6a', &['\x25']), ('\ufe6b', &['\x40']), ('\ufe70', &['\x20', '\u064b']),
-        ('\ufe71', &['\u0640', '\u064b']), ('\ufe72', &['\x20', '\u064c']), ('\ufe74', &['\x20',
-        '\u064d']), ('\ufe76', &['\x20', '\u064e']), ('\ufe77', &['\u0640', '\u064e']), ('\ufe78',
-        &['\x20', '\u064f']), ('\ufe79', &['\u0640', '\u064f']), ('\ufe7a', &['\x20', '\u0650']),
-        ('\ufe7b', &['\u0640', '\u0650']), ('\ufe7c', &['\x20', '\u0651']), ('\ufe7d', &['\u0640',
-        '\u0651']), ('\ufe7e', &['\x20', '\u0652']), ('\ufe7f', &['\u0640', '\u0652']), ('\ufe80',
-        &['\u0621']), ('\ufe81', &['\u0622']), ('\ufe82', &['\u0622']), ('\ufe83', &['\u0623']),
-        ('\ufe84', &['\u0623']), ('\ufe85', &['\u0624']), ('\ufe86', &['\u0624']), ('\ufe87',
-        &['\u0625']), ('\ufe88', &['\u0625']), ('\ufe89', &['\u0626']), ('\ufe8a', &['\u0626']),
-        ('\ufe8b', &['\u0626']), ('\ufe8c', &['\u0626']), ('\ufe8d', &['\u0627']), ('\ufe8e',
-        &['\u0627']), ('\ufe8f', &['\u0628']), ('\ufe90', &['\u0628']), ('\ufe91', &['\u0628']),
-        ('\ufe92', &['\u0628']), ('\ufe93', &['\u0629']), ('\ufe94', &['\u0629']), ('\ufe95',
-        &['\u062a']), ('\ufe96', &['\u062a']), ('\ufe97', &['\u062a']), ('\ufe98', &['\u062a']),
-        ('\ufe99', &['\u062b']), ('\ufe9a', &['\u062b']), ('\ufe9b', &['\u062b']), ('\ufe9c',
-        &['\u062b']), ('\ufe9d', &['\u062c']), ('\ufe9e', &['\u062c']), ('\ufe9f', &['\u062c']),
-        ('\ufea0', &['\u062c']), ('\ufea1', &['\u062d']), ('\ufea2', &['\u062d']), ('\ufea3',
-        &['\u062d']), ('\ufea4', &['\u062d']), ('\ufea5', &['\u062e']), ('\ufea6', &['\u062e']),
-        ('\ufea7', &['\u062e']), ('\ufea8', &['\u062e']), ('\ufea9', &['\u062f']), ('\ufeaa',
-        &['\u062f']), ('\ufeab', &['\u0630']), ('\ufeac', &['\u0630']), ('\ufead', &['\u0631']),
-        ('\ufeae', &['\u0631']), ('\ufeaf', &['\u0632']), ('\ufeb0', &['\u0632']), ('\ufeb1',
-        &['\u0633']), ('\ufeb2', &['\u0633']), ('\ufeb3', &['\u0633']), ('\ufeb4', &['\u0633']),
-        ('\ufeb5', &['\u0634']), ('\ufeb6', &['\u0634']), ('\ufeb7', &['\u0634']), ('\ufeb8',
-        &['\u0634']), ('\ufeb9', &['\u0635']), ('\ufeba', &['\u0635']), ('\ufebb', &['\u0635']),
-        ('\ufebc', &['\u0635']), ('\ufebd', &['\u0636']), ('\ufebe', &['\u0636']), ('\ufebf',
-        &['\u0636']), ('\ufec0', &['\u0636']), ('\ufec1', &['\u0637']), ('\ufec2', &['\u0637']),
-        ('\ufec3', &['\u0637']), ('\ufec4', &['\u0637']), ('\ufec5', &['\u0638']), ('\ufec6',
-        &['\u0638']), ('\ufec7', &['\u0638']), ('\ufec8', &['\u0638']), ('\ufec9', &['\u0639']),
-        ('\ufeca', &['\u0639']), ('\ufecb', &['\u0639']), ('\ufecc', &['\u0639']), ('\ufecd',
-        &['\u063a']), ('\ufece', &['\u063a']), ('\ufecf', &['\u063a']), ('\ufed0', &['\u063a']),
-        ('\ufed1', &['\u0641']), ('\ufed2', &['\u0641']), ('\ufed3', &['\u0641']), ('\ufed4',
-        &['\u0641']), ('\ufed5', &['\u0642']), ('\ufed6', &['\u0642']), ('\ufed7', &['\u0642']),
-        ('\ufed8', &['\u0642']), ('\ufed9', &['\u0643']), ('\ufeda', &['\u0643']), ('\ufedb',
-        &['\u0643']), ('\ufedc', &['\u0643']), ('\ufedd', &['\u0644']), ('\ufede', &['\u0644']),
-        ('\ufedf', &['\u0644']), ('\ufee0', &['\u0644']), ('\ufee1', &['\u0645']), ('\ufee2',
-        &['\u0645']), ('\ufee3', &['\u0645']), ('\ufee4', &['\u0645']), ('\ufee5', &['\u0646']),
-        ('\ufee6', &['\u0646']), ('\ufee7', &['\u0646']), ('\ufee8', &['\u0646']), ('\ufee9',
-        &['\u0647']), ('\ufeea', &['\u0647']), ('\ufeeb', &['\u0647']), ('\ufeec', &['\u0647']),
-        ('\ufeed', &['\u0648']), ('\ufeee', &['\u0648']), ('\ufeef', &['\u0649']), ('\ufef0',
-        &['\u0649']), ('\ufef1', &['\u064a']), ('\ufef2', &['\u064a']), ('\ufef3', &['\u064a']),
-        ('\ufef4', &['\u064a']), ('\ufef5', &['\u0644', '\u0622']), ('\ufef6', &['\u0644',
-        '\u0622']), ('\ufef7', &['\u0644', '\u0623']), ('\ufef8', &['\u0644', '\u0623']), ('\ufef9',
-        &['\u0644', '\u0625']), ('\ufefa', &['\u0644', '\u0625']), ('\ufefb', &['\u0644',
-        '\u0627']), ('\ufefc', &['\u0644', '\u0627']), ('\uff01', &['\x21']), ('\uff02', &['\x22']),
-        ('\uff03', &['\x23']), ('\uff04', &['\x24']), ('\uff05', &['\x25']), ('\uff06', &['\x26']),
-        ('\uff07', &['\x27']), ('\uff08', &['\x28']), ('\uff09', &['\x29']), ('\uff0a', &['\x2a']),
-        ('\uff0b', &['\x2b']), ('\uff0c', &['\x2c']), ('\uff0d', &['\x2d']), ('\uff0e', &['\x2e']),
-        ('\uff0f', &['\x2f']), ('\uff10', &['\x30']), ('\uff11', &['\x31']), ('\uff12', &['\x32']),
-        ('\uff13', &['\x33']), ('\uff14', &['\x34']), ('\uff15', &['\x35']), ('\uff16', &['\x36']),
-        ('\uff17', &['\x37']), ('\uff18', &['\x38']), ('\uff19', &['\x39']), ('\uff1a', &['\x3a']),
-        ('\uff1b', &['\x3b']), ('\uff1c', &['\x3c']), ('\uff1d', &['\x3d']), ('\uff1e', &['\x3e']),
-        ('\uff1f', &['\x3f']), ('\uff20', &['\x40']), ('\uff21', &['\x41']), ('\uff22', &['\x42']),
-        ('\uff23', &['\x43']), ('\uff24', &['\x44']), ('\uff25', &['\x45']), ('\uff26', &['\x46']),
-        ('\uff27', &['\x47']), ('\uff28', &['\x48']), ('\uff29', &['\x49']), ('\uff2a', &['\x4a']),
-        ('\uff2b', &['\x4b']), ('\uff2c', &['\x4c']), ('\uff2d', &['\x4d']), ('\uff2e', &['\x4e']),
-        ('\uff2f', &['\x4f']), ('\uff30', &['\x50']), ('\uff31', &['\x51']), ('\uff32', &['\x52']),
-        ('\uff33', &['\x53']), ('\uff34', &['\x54']), ('\uff35', &['\x55']), ('\uff36', &['\x56']),
-        ('\uff37', &['\x57']), ('\uff38', &['\x58']), ('\uff39', &['\x59']), ('\uff3a', &['\x5a']),
-        ('\uff3b', &['\x5b']), ('\uff3c', &['\x5c']), ('\uff3d', &['\x5d']), ('\uff3e', &['\x5e']),
-        ('\uff3f', &['\x5f']), ('\uff40', &['\x60']), ('\uff41', &['\x61']), ('\uff42', &['\x62']),
-        ('\uff43', &['\x63']), ('\uff44', &['\x64']), ('\uff45', &['\x65']), ('\uff46', &['\x66']),
-        ('\uff47', &['\x67']), ('\uff48', &['\x68']), ('\uff49', &['\x69']), ('\uff4a', &['\x6a']),
-        ('\uff4b', &['\x6b']), ('\uff4c', &['\x6c']), ('\uff4d', &['\x6d']), ('\uff4e', &['\x6e']),
-        ('\uff4f', &['\x6f']), ('\uff50', &['\x70']), ('\uff51', &['\x71']), ('\uff52', &['\x72']),
-        ('\uff53', &['\x73']), ('\uff54', &['\x74']), ('\uff55', &['\x75']), ('\uff56', &['\x76']),
-        ('\uff57', &['\x77']), ('\uff58', &['\x78']), ('\uff59', &['\x79']), ('\uff5a', &['\x7a']),
-        ('\uff5b', &['\x7b']), ('\uff5c', &['\x7c']), ('\uff5d', &['\x7d']), ('\uff5e', &['\x7e']),
-        ('\uff5f', &['\u2985']), ('\uff60', &['\u2986']), ('\uff61', &['\u3002']), ('\uff62',
-        &['\u300c']), ('\uff63', &['\u300d']), ('\uff64', &['\u3001']), ('\uff65', &['\u30fb']),
-        ('\uff66', &['\u30f2']), ('\uff67', &['\u30a1']), ('\uff68', &['\u30a3']), ('\uff69',
-        &['\u30a5']), ('\uff6a', &['\u30a7']), ('\uff6b', &['\u30a9']), ('\uff6c', &['\u30e3']),
-        ('\uff6d', &['\u30e5']), ('\uff6e', &['\u30e7']), ('\uff6f', &['\u30c3']), ('\uff70',
-        &['\u30fc']), ('\uff71', &['\u30a2']), ('\uff72', &['\u30a4']), ('\uff73', &['\u30a6']),
-        ('\uff74', &['\u30a8']), ('\uff75', &['\u30aa']), ('\uff76', &['\u30ab']), ('\uff77',
-        &['\u30ad']), ('\uff78', &['\u30af']), ('\uff79', &['\u30b1']), ('\uff7a', &['\u30b3']),
-        ('\uff7b', &['\u30b5']), ('\uff7c', &['\u30b7']), ('\uff7d', &['\u30b9']), ('\uff7e',
-        &['\u30bb']), ('\uff7f', &['\u30bd']), ('\uff80', &['\u30bf']), ('\uff81', &['\u30c1']),
-        ('\uff82', &['\u30c4']), ('\uff83', &['\u30c6']), ('\uff84', &['\u30c8']), ('\uff85',
-        &['\u30ca']), ('\uff86', &['\u30cb']), ('\uff87', &['\u30cc']), ('\uff88', &['\u30cd']),
-        ('\uff89', &['\u30ce']), ('\uff8a', &['\u30cf']), ('\uff8b', &['\u30d2']), ('\uff8c',
-        &['\u30d5']), ('\uff8d', &['\u30d8']), ('\uff8e', &['\u30db']), ('\uff8f', &['\u30de']),
-        ('\uff90', &['\u30df']), ('\uff91', &['\u30e0']), ('\uff92', &['\u30e1']), ('\uff93',
-        &['\u30e2']), ('\uff94', &['\u30e4']), ('\uff95', &['\u30e6']), ('\uff96', &['\u30e8']),
-        ('\uff97', &['\u30e9']), ('\uff98', &['\u30ea']), ('\uff99', &['\u30eb']), ('\uff9a',
-        &['\u30ec']), ('\uff9b', &['\u30ed']), ('\uff9c', &['\u30ef']), ('\uff9d', &['\u30f3']),
-        ('\uff9e', &['\u3099']), ('\uff9f', &['\u309a']), ('\uffa0', &['\u3164']), ('\uffa1',
-        &['\u3131']), ('\uffa2', &['\u3132']), ('\uffa3', &['\u3133']), ('\uffa4', &['\u3134']),
-        ('\uffa5', &['\u3135']), ('\uffa6', &['\u3136']), ('\uffa7', &['\u3137']), ('\uffa8',
-        &['\u3138']), ('\uffa9', &['\u3139']), ('\uffaa', &['\u313a']), ('\uffab', &['\u313b']),
-        ('\uffac', &['\u313c']), ('\uffad', &['\u313d']), ('\uffae', &['\u313e']), ('\uffaf',
-        &['\u313f']), ('\uffb0', &['\u3140']), ('\uffb1', &['\u3141']), ('\uffb2', &['\u3142']),
-        ('\uffb3', &['\u3143']), ('\uffb4', &['\u3144']), ('\uffb5', &['\u3145']), ('\uffb6',
-        &['\u3146']), ('\uffb7', &['\u3147']), ('\uffb8', &['\u3148']), ('\uffb9', &['\u3149']),
-        ('\uffba', &['\u314a']), ('\uffbb', &['\u314b']), ('\uffbc', &['\u314c']), ('\uffbd',
-        &['\u314d']), ('\uffbe', &['\u314e']), ('\uffc2', &['\u314f']), ('\uffc3', &['\u3150']),
-        ('\uffc4', &['\u3151']), ('\uffc5', &['\u3152']), ('\uffc6', &['\u3153']), ('\uffc7',
-        &['\u3154']), ('\uffca', &['\u3155']), ('\uffcb', &['\u3156']), ('\uffcc', &['\u3157']),
-        ('\uffcd', &['\u3158']), ('\uffce', &['\u3159']), ('\uffcf', &['\u315a']), ('\uffd2',
-        &['\u315b']), ('\uffd3', &['\u315c']), ('\uffd4', &['\u315d']), ('\uffd5', &['\u315e']),
-        ('\uffd6', &['\u315f']), ('\uffd7', &['\u3160']), ('\uffda', &['\u3161']), ('\uffdb',
-        &['\u3162']), ('\uffdc', &['\u3163']), ('\uffe0', &['\u00a2']), ('\uffe1', &['\u00a3']),
-        ('\uffe2', &['\u00ac']), ('\uffe3', &['\u00af']), ('\uffe4', &['\u00a6']), ('\uffe5',
-        &['\u00a5']), ('\uffe6', &['\u20a9']), ('\uffe8', &['\u2502']), ('\uffe9', &['\u2190']),
-        ('\uffea', &['\u2191']), ('\uffeb', &['\u2192']), ('\uffec', &['\u2193']), ('\uffed',
-        &['\u25a0']), ('\uffee', &['\u25cb']), ('\U0001d400', &['\x41']), ('\U0001d401', &['\x42']),
-        ('\U0001d402', &['\x43']), ('\U0001d403', &['\x44']), ('\U0001d404', &['\x45']),
-        ('\U0001d405', &['\x46']), ('\U0001d406', &['\x47']), ('\U0001d407', &['\x48']),
-        ('\U0001d408', &['\x49']), ('\U0001d409', &['\x4a']), ('\U0001d40a', &['\x4b']),
-        ('\U0001d40b', &['\x4c']), ('\U0001d40c', &['\x4d']), ('\U0001d40d', &['\x4e']),
-        ('\U0001d40e', &['\x4f']), ('\U0001d40f', &['\x50']), ('\U0001d410', &['\x51']),
-        ('\U0001d411', &['\x52']), ('\U0001d412', &['\x53']), ('\U0001d413', &['\x54']),
-        ('\U0001d414', &['\x55']), ('\U0001d415', &['\x56']), ('\U0001d416', &['\x57']),
-        ('\U0001d417', &['\x58']), ('\U0001d418', &['\x59']), ('\U0001d419', &['\x5a']),
-        ('\U0001d41a', &['\x61']), ('\U0001d41b', &['\x62']), ('\U0001d41c', &['\x63']),
-        ('\U0001d41d', &['\x64']), ('\U0001d41e', &['\x65']), ('\U0001d41f', &['\x66']),
-        ('\U0001d420', &['\x67']), ('\U0001d421', &['\x68']), ('\U0001d422', &['\x69']),
-        ('\U0001d423', &['\x6a']), ('\U0001d424', &['\x6b']), ('\U0001d425', &['\x6c']),
-        ('\U0001d426', &['\x6d']), ('\U0001d427', &['\x6e']), ('\U0001d428', &['\x6f']),
-        ('\U0001d429', &['\x70']), ('\U0001d42a', &['\x71']), ('\U0001d42b', &['\x72']),
-        ('\U0001d42c', &['\x73']), ('\U0001d42d', &['\x74']), ('\U0001d42e', &['\x75']),
-        ('\U0001d42f', &['\x76']), ('\U0001d430', &['\x77']), ('\U0001d431', &['\x78']),
-        ('\U0001d432', &['\x79']), ('\U0001d433', &['\x7a']), ('\U0001d434', &['\x41']),
-        ('\U0001d435', &['\x42']), ('\U0001d436', &['\x43']), ('\U0001d437', &['\x44']),
-        ('\U0001d438', &['\x45']), ('\U0001d439', &['\x46']), ('\U0001d43a', &['\x47']),
-        ('\U0001d43b', &['\x48']), ('\U0001d43c', &['\x49']), ('\U0001d43d', &['\x4a']),
-        ('\U0001d43e', &['\x4b']), ('\U0001d43f', &['\x4c']), ('\U0001d440', &['\x4d']),
-        ('\U0001d441', &['\x4e']), ('\U0001d442', &['\x4f']), ('\U0001d443', &['\x50']),
-        ('\U0001d444', &['\x51']), ('\U0001d445', &['\x52']), ('\U0001d446', &['\x53']),
-        ('\U0001d447', &['\x54']), ('\U0001d448', &['\x55']), ('\U0001d449', &['\x56']),
-        ('\U0001d44a', &['\x57']), ('\U0001d44b', &['\x58']), ('\U0001d44c', &['\x59']),
-        ('\U0001d44d', &['\x5a']), ('\U0001d44e', &['\x61']), ('\U0001d44f', &['\x62']),
-        ('\U0001d450', &['\x63']), ('\U0001d451', &['\x64']), ('\U0001d452', &['\x65']),
-        ('\U0001d453', &['\x66']), ('\U0001d454', &['\x67']), ('\U0001d456', &['\x69']),
-        ('\U0001d457', &['\x6a']), ('\U0001d458', &['\x6b']), ('\U0001d459', &['\x6c']),
-        ('\U0001d45a', &['\x6d']), ('\U0001d45b', &['\x6e']), ('\U0001d45c', &['\x6f']),
-        ('\U0001d45d', &['\x70']), ('\U0001d45e', &['\x71']), ('\U0001d45f', &['\x72']),
-        ('\U0001d460', &['\x73']), ('\U0001d461', &['\x74']), ('\U0001d462', &['\x75']),
-        ('\U0001d463', &['\x76']), ('\U0001d464', &['\x77']), ('\U0001d465', &['\x78']),
-        ('\U0001d466', &['\x79']), ('\U0001d467', &['\x7a']), ('\U0001d468', &['\x41']),
-        ('\U0001d469', &['\x42']), ('\U0001d46a', &['\x43']), ('\U0001d46b', &['\x44']),
-        ('\U0001d46c', &['\x45']), ('\U0001d46d', &['\x46']), ('\U0001d46e', &['\x47']),
-        ('\U0001d46f', &['\x48']), ('\U0001d470', &['\x49']), ('\U0001d471', &['\x4a']),
-        ('\U0001d472', &['\x4b']), ('\U0001d473', &['\x4c']), ('\U0001d474', &['\x4d']),
-        ('\U0001d475', &['\x4e']), ('\U0001d476', &['\x4f']), ('\U0001d477', &['\x50']),
-        ('\U0001d478', &['\x51']), ('\U0001d479', &['\x52']), ('\U0001d47a', &['\x53']),
-        ('\U0001d47b', &['\x54']), ('\U0001d47c', &['\x55']), ('\U0001d47d', &['\x56']),
-        ('\U0001d47e', &['\x57']), ('\U0001d47f', &['\x58']), ('\U0001d480', &['\x59']),
-        ('\U0001d481', &['\x5a']), ('\U0001d482', &['\x61']), ('\U0001d483', &['\x62']),
-        ('\U0001d484', &['\x63']), ('\U0001d485', &['\x64']), ('\U0001d486', &['\x65']),
-        ('\U0001d487', &['\x66']), ('\U0001d488', &['\x67']), ('\U0001d489', &['\x68']),
-        ('\U0001d48a', &['\x69']), ('\U0001d48b', &['\x6a']), ('\U0001d48c', &['\x6b']),
-        ('\U0001d48d', &['\x6c']), ('\U0001d48e', &['\x6d']), ('\U0001d48f', &['\x6e']),
-        ('\U0001d490', &['\x6f']), ('\U0001d491', &['\x70']), ('\U0001d492', &['\x71']),
-        ('\U0001d493', &['\x72']), ('\U0001d494', &['\x73']), ('\U0001d495', &['\x74']),
-        ('\U0001d496', &['\x75']), ('\U0001d497', &['\x76']), ('\U0001d498', &['\x77']),
-        ('\U0001d499', &['\x78']), ('\U0001d49a', &['\x79']), ('\U0001d49b', &['\x7a']),
-        ('\U0001d49c', &['\x41']), ('\U0001d49e', &['\x43']), ('\U0001d49f', &['\x44']),
-        ('\U0001d4a2', &['\x47']), ('\U0001d4a5', &['\x4a']), ('\U0001d4a6', &['\x4b']),
-        ('\U0001d4a9', &['\x4e']), ('\U0001d4aa', &['\x4f']), ('\U0001d4ab', &['\x50']),
-        ('\U0001d4ac', &['\x51']), ('\U0001d4ae', &['\x53']), ('\U0001d4af', &['\x54']),
-        ('\U0001d4b0', &['\x55']), ('\U0001d4b1', &['\x56']), ('\U0001d4b2', &['\x57']),
-        ('\U0001d4b3', &['\x58']), ('\U0001d4b4', &['\x59']), ('\U0001d4b5', &['\x5a']),
-        ('\U0001d4b6', &['\x61']), ('\U0001d4b7', &['\x62']), ('\U0001d4b8', &['\x63']),
-        ('\U0001d4b9', &['\x64']), ('\U0001d4bb', &['\x66']), ('\U0001d4bd', &['\x68']),
-        ('\U0001d4be', &['\x69']), ('\U0001d4bf', &['\x6a']), ('\U0001d4c0', &['\x6b']),
-        ('\U0001d4c1', &['\x6c']), ('\U0001d4c2', &['\x6d']), ('\U0001d4c3', &['\x6e']),
-        ('\U0001d4c5', &['\x70']), ('\U0001d4c6', &['\x71']), ('\U0001d4c7', &['\x72']),
-        ('\U0001d4c8', &['\x73']), ('\U0001d4c9', &['\x74']), ('\U0001d4ca', &['\x75']),
-        ('\U0001d4cb', &['\x76']), ('\U0001d4cc', &['\x77']), ('\U0001d4cd', &['\x78']),
-        ('\U0001d4ce', &['\x79']), ('\U0001d4cf', &['\x7a']), ('\U0001d4d0', &['\x41']),
-        ('\U0001d4d1', &['\x42']), ('\U0001d4d2', &['\x43']), ('\U0001d4d3', &['\x44']),
-        ('\U0001d4d4', &['\x45']), ('\U0001d4d5', &['\x46']), ('\U0001d4d6', &['\x47']),
-        ('\U0001d4d7', &['\x48']), ('\U0001d4d8', &['\x49']), ('\U0001d4d9', &['\x4a']),
-        ('\U0001d4da', &['\x4b']), ('\U0001d4db', &['\x4c']), ('\U0001d4dc', &['\x4d']),
-        ('\U0001d4dd', &['\x4e']), ('\U0001d4de', &['\x4f']), ('\U0001d4df', &['\x50']),
-        ('\U0001d4e0', &['\x51']), ('\U0001d4e1', &['\x52']), ('\U0001d4e2', &['\x53']),
-        ('\U0001d4e3', &['\x54']), ('\U0001d4e4', &['\x55']), ('\U0001d4e5', &['\x56']),
-        ('\U0001d4e6', &['\x57']), ('\U0001d4e7', &['\x58']), ('\U0001d4e8', &['\x59']),
-        ('\U0001d4e9', &['\x5a']), ('\U0001d4ea', &['\x61']), ('\U0001d4eb', &['\x62']),
-        ('\U0001d4ec', &['\x63']), ('\U0001d4ed', &['\x64']), ('\U0001d4ee', &['\x65']),
-        ('\U0001d4ef', &['\x66']), ('\U0001d4f0', &['\x67']), ('\U0001d4f1', &['\x68']),
-        ('\U0001d4f2', &['\x69']), ('\U0001d4f3', &['\x6a']), ('\U0001d4f4', &['\x6b']),
-        ('\U0001d4f5', &['\x6c']), ('\U0001d4f6', &['\x6d']), ('\U0001d4f7', &['\x6e']),
-        ('\U0001d4f8', &['\x6f']), ('\U0001d4f9', &['\x70']), ('\U0001d4fa', &['\x71']),
-        ('\U0001d4fb', &['\x72']), ('\U0001d4fc', &['\x73']), ('\U0001d4fd', &['\x74']),
-        ('\U0001d4fe', &['\x75']), ('\U0001d4ff', &['\x76']), ('\U0001d500', &['\x77']),
-        ('\U0001d501', &['\x78']), ('\U0001d502', &['\x79']), ('\U0001d503', &['\x7a']),
-        ('\U0001d504', &['\x41']), ('\U0001d505', &['\x42']), ('\U0001d507', &['\x44']),
-        ('\U0001d508', &['\x45']), ('\U0001d509', &['\x46']), ('\U0001d50a', &['\x47']),
-        ('\U0001d50d', &['\x4a']), ('\U0001d50e', &['\x4b']), ('\U0001d50f', &['\x4c']),
-        ('\U0001d510', &['\x4d']), ('\U0001d511', &['\x4e']), ('\U0001d512', &['\x4f']),
-        ('\U0001d513', &['\x50']), ('\U0001d514', &['\x51']), ('\U0001d516', &['\x53']),
-        ('\U0001d517', &['\x54']), ('\U0001d518', &['\x55']), ('\U0001d519', &['\x56']),
-        ('\U0001d51a', &['\x57']), ('\U0001d51b', &['\x58']), ('\U0001d51c', &['\x59']),
-        ('\U0001d51e', &['\x61']), ('\U0001d51f', &['\x62']), ('\U0001d520', &['\x63']),
-        ('\U0001d521', &['\x64']), ('\U0001d522', &['\x65']), ('\U0001d523', &['\x66']),
-        ('\U0001d524', &['\x67']), ('\U0001d525', &['\x68']), ('\U0001d526', &['\x69']),
-        ('\U0001d527', &['\x6a']), ('\U0001d528', &['\x6b']), ('\U0001d529', &['\x6c']),
-        ('\U0001d52a', &['\x6d']), ('\U0001d52b', &['\x6e']), ('\U0001d52c', &['\x6f']),
-        ('\U0001d52d', &['\x70']), ('\U0001d52e', &['\x71']), ('\U0001d52f', &['\x72']),
-        ('\U0001d530', &['\x73']), ('\U0001d531', &['\x74']), ('\U0001d532', &['\x75']),
-        ('\U0001d533', &['\x76']), ('\U0001d534', &['\x77']), ('\U0001d535', &['\x78']),
-        ('\U0001d536', &['\x79']), ('\U0001d537', &['\x7a']), ('\U0001d538', &['\x41']),
-        ('\U0001d539', &['\x42']), ('\U0001d53b', &['\x44']), ('\U0001d53c', &['\x45']),
-        ('\U0001d53d', &['\x46']), ('\U0001d53e', &['\x47']), ('\U0001d540', &['\x49']),
-        ('\U0001d541', &['\x4a']), ('\U0001d542', &['\x4b']), ('\U0001d543', &['\x4c']),
-        ('\U0001d544', &['\x4d']), ('\U0001d546', &['\x4f']), ('\U0001d54a', &['\x53']),
-        ('\U0001d54b', &['\x54']), ('\U0001d54c', &['\x55']), ('\U0001d54d', &['\x56']),
-        ('\U0001d54e', &['\x57']), ('\U0001d54f', &['\x58']), ('\U0001d550', &['\x59']),
-        ('\U0001d552', &['\x61']), ('\U0001d553', &['\x62']), ('\U0001d554', &['\x63']),
-        ('\U0001d555', &['\x64']), ('\U0001d556', &['\x65']), ('\U0001d557', &['\x66']),
-        ('\U0001d558', &['\x67']), ('\U0001d559', &['\x68']), ('\U0001d55a', &['\x69']),
-        ('\U0001d55b', &['\x6a']), ('\U0001d55c', &['\x6b']), ('\U0001d55d', &['\x6c']),
-        ('\U0001d55e', &['\x6d']), ('\U0001d55f', &['\x6e']), ('\U0001d560', &['\x6f']),
-        ('\U0001d561', &['\x70']), ('\U0001d562', &['\x71']), ('\U0001d563', &['\x72']),
-        ('\U0001d564', &['\x73']), ('\U0001d565', &['\x74']), ('\U0001d566', &['\x75']),
-        ('\U0001d567', &['\x76']), ('\U0001d568', &['\x77']), ('\U0001d569', &['\x78']),
-        ('\U0001d56a', &['\x79']), ('\U0001d56b', &['\x7a']), ('\U0001d56c', &['\x41']),
-        ('\U0001d56d', &['\x42']), ('\U0001d56e', &['\x43']), ('\U0001d56f', &['\x44']),
-        ('\U0001d570', &['\x45']), ('\U0001d571', &['\x46']), ('\U0001d572', &['\x47']),
-        ('\U0001d573', &['\x48']), ('\U0001d574', &['\x49']), ('\U0001d575', &['\x4a']),
-        ('\U0001d576', &['\x4b']), ('\U0001d577', &['\x4c']), ('\U0001d578', &['\x4d']),
-        ('\U0001d579', &['\x4e']), ('\U0001d57a', &['\x4f']), ('\U0001d57b', &['\x50']),
-        ('\U0001d57c', &['\x51']), ('\U0001d57d', &['\x52']), ('\U0001d57e', &['\x53']),
-        ('\U0001d57f', &['\x54']), ('\U0001d580', &['\x55']), ('\U0001d581', &['\x56']),
-        ('\U0001d582', &['\x57']), ('\U0001d583', &['\x58']), ('\U0001d584', &['\x59']),
-        ('\U0001d585', &['\x5a']), ('\U0001d586', &['\x61']), ('\U0001d587', &['\x62']),
-        ('\U0001d588', &['\x63']), ('\U0001d589', &['\x64']), ('\U0001d58a', &['\x65']),
-        ('\U0001d58b', &['\x66']), ('\U0001d58c', &['\x67']), ('\U0001d58d', &['\x68']),
-        ('\U0001d58e', &['\x69']), ('\U0001d58f', &['\x6a']), ('\U0001d590', &['\x6b']),
-        ('\U0001d591', &['\x6c']), ('\U0001d592', &['\x6d']), ('\U0001d593', &['\x6e']),
-        ('\U0001d594', &['\x6f']), ('\U0001d595', &['\x70']), ('\U0001d596', &['\x71']),
-        ('\U0001d597', &['\x72']), ('\U0001d598', &['\x73']), ('\U0001d599', &['\x74']),
-        ('\U0001d59a', &['\x75']), ('\U0001d59b', &['\x76']), ('\U0001d59c', &['\x77']),
-        ('\U0001d59d', &['\x78']), ('\U0001d59e', &['\x79']), ('\U0001d59f', &['\x7a']),
-        ('\U0001d5a0', &['\x41']), ('\U0001d5a1', &['\x42']), ('\U0001d5a2', &['\x43']),
-        ('\U0001d5a3', &['\x44']), ('\U0001d5a4', &['\x45']), ('\U0001d5a5', &['\x46']),
-        ('\U0001d5a6', &['\x47']), ('\U0001d5a7', &['\x48']), ('\U0001d5a8', &['\x49']),
-        ('\U0001d5a9', &['\x4a']), ('\U0001d5aa', &['\x4b']), ('\U0001d5ab', &['\x4c']),
-        ('\U0001d5ac', &['\x4d']), ('\U0001d5ad', &['\x4e']), ('\U0001d5ae', &['\x4f']),
-        ('\U0001d5af', &['\x50']), ('\U0001d5b0', &['\x51']), ('\U0001d5b1', &['\x52']),
-        ('\U0001d5b2', &['\x53']), ('\U0001d5b3', &['\x54']), ('\U0001d5b4', &['\x55']),
-        ('\U0001d5b5', &['\x56']), ('\U0001d5b6', &['\x57']), ('\U0001d5b7', &['\x58']),
-        ('\U0001d5b8', &['\x59']), ('\U0001d5b9', &['\x5a']), ('\U0001d5ba', &['\x61']),
-        ('\U0001d5bb', &['\x62']), ('\U0001d5bc', &['\x63']), ('\U0001d5bd', &['\x64']),
-        ('\U0001d5be', &['\x65']), ('\U0001d5bf', &['\x66']), ('\U0001d5c0', &['\x67']),
-        ('\U0001d5c1', &['\x68']), ('\U0001d5c2', &['\x69']), ('\U0001d5c3', &['\x6a']),
-        ('\U0001d5c4', &['\x6b']), ('\U0001d5c5', &['\x6c']), ('\U0001d5c6', &['\x6d']),
-        ('\U0001d5c7', &['\x6e']), ('\U0001d5c8', &['\x6f']), ('\U0001d5c9', &['\x70']),
-        ('\U0001d5ca', &['\x71']), ('\U0001d5cb', &['\x72']), ('\U0001d5cc', &['\x73']),
-        ('\U0001d5cd', &['\x74']), ('\U0001d5ce', &['\x75']), ('\U0001d5cf', &['\x76']),
-        ('\U0001d5d0', &['\x77']), ('\U0001d5d1', &['\x78']), ('\U0001d5d2', &['\x79']),
-        ('\U0001d5d3', &['\x7a']), ('\U0001d5d4', &['\x41']), ('\U0001d5d5', &['\x42']),
-        ('\U0001d5d6', &['\x43']), ('\U0001d5d7', &['\x44']), ('\U0001d5d8', &['\x45']),
-        ('\U0001d5d9', &['\x46']), ('\U0001d5da', &['\x47']), ('\U0001d5db', &['\x48']),
-        ('\U0001d5dc', &['\x49']), ('\U0001d5dd', &['\x4a']), ('\U0001d5de', &['\x4b']),
-        ('\U0001d5df', &['\x4c']), ('\U0001d5e0', &['\x4d']), ('\U0001d5e1', &['\x4e']),
-        ('\U0001d5e2', &['\x4f']), ('\U0001d5e3', &['\x50']), ('\U0001d5e4', &['\x51']),
-        ('\U0001d5e5', &['\x52']), ('\U0001d5e6', &['\x53']), ('\U0001d5e7', &['\x54']),
-        ('\U0001d5e8', &['\x55']), ('\U0001d5e9', &['\x56']), ('\U0001d5ea', &['\x57']),
-        ('\U0001d5eb', &['\x58']), ('\U0001d5ec', &['\x59']), ('\U0001d5ed', &['\x5a']),
-        ('\U0001d5ee', &['\x61']), ('\U0001d5ef', &['\x62']), ('\U0001d5f0', &['\x63']),
-        ('\U0001d5f1', &['\x64']), ('\U0001d5f2', &['\x65']), ('\U0001d5f3', &['\x66']),
-        ('\U0001d5f4', &['\x67']), ('\U0001d5f5', &['\x68']), ('\U0001d5f6', &['\x69']),
-        ('\U0001d5f7', &['\x6a']), ('\U0001d5f8', &['\x6b']), ('\U0001d5f9', &['\x6c']),
-        ('\U0001d5fa', &['\x6d']), ('\U0001d5fb', &['\x6e']), ('\U0001d5fc', &['\x6f']),
-        ('\U0001d5fd', &['\x70']), ('\U0001d5fe', &['\x71']), ('\U0001d5ff', &['\x72']),
-        ('\U0001d600', &['\x73']), ('\U0001d601', &['\x74']), ('\U0001d602', &['\x75']),
-        ('\U0001d603', &['\x76']), ('\U0001d604', &['\x77']), ('\U0001d605', &['\x78']),
-        ('\U0001d606', &['\x79']), ('\U0001d607', &['\x7a']), ('\U0001d608', &['\x41']),
-        ('\U0001d609', &['\x42']), ('\U0001d60a', &['\x43']), ('\U0001d60b', &['\x44']),
-        ('\U0001d60c', &['\x45']), ('\U0001d60d', &['\x46']), ('\U0001d60e', &['\x47']),
-        ('\U0001d60f', &['\x48']), ('\U0001d610', &['\x49']), ('\U0001d611', &['\x4a']),
-        ('\U0001d612', &['\x4b']), ('\U0001d613', &['\x4c']), ('\U0001d614', &['\x4d']),
-        ('\U0001d615', &['\x4e']), ('\U0001d616', &['\x4f']), ('\U0001d617', &['\x50']),
-        ('\U0001d618', &['\x51']), ('\U0001d619', &['\x52']), ('\U0001d61a', &['\x53']),
-        ('\U0001d61b', &['\x54']), ('\U0001d61c', &['\x55']), ('\U0001d61d', &['\x56']),
-        ('\U0001d61e', &['\x57']), ('\U0001d61f', &['\x58']), ('\U0001d620', &['\x59']),
-        ('\U0001d621', &['\x5a']), ('\U0001d622', &['\x61']), ('\U0001d623', &['\x62']),
-        ('\U0001d624', &['\x63']), ('\U0001d625', &['\x64']), ('\U0001d626', &['\x65']),
-        ('\U0001d627', &['\x66']), ('\U0001d628', &['\x67']), ('\U0001d629', &['\x68']),
-        ('\U0001d62a', &['\x69']), ('\U0001d62b', &['\x6a']), ('\U0001d62c', &['\x6b']),
-        ('\U0001d62d', &['\x6c']), ('\U0001d62e', &['\x6d']), ('\U0001d62f', &['\x6e']),
-        ('\U0001d630', &['\x6f']), ('\U0001d631', &['\x70']), ('\U0001d632', &['\x71']),
-        ('\U0001d633', &['\x72']), ('\U0001d634', &['\x73']), ('\U0001d635', &['\x74']),
-        ('\U0001d636', &['\x75']), ('\U0001d637', &['\x76']), ('\U0001d638', &['\x77']),
-        ('\U0001d639', &['\x78']), ('\U0001d63a', &['\x79']), ('\U0001d63b', &['\x7a']),
-        ('\U0001d63c', &['\x41']), ('\U0001d63d', &['\x42']), ('\U0001d63e', &['\x43']),
-        ('\U0001d63f', &['\x44']), ('\U0001d640', &['\x45']), ('\U0001d641', &['\x46']),
-        ('\U0001d642', &['\x47']), ('\U0001d643', &['\x48']), ('\U0001d644', &['\x49']),
-        ('\U0001d645', &['\x4a']), ('\U0001d646', &['\x4b']), ('\U0001d647', &['\x4c']),
-        ('\U0001d648', &['\x4d']), ('\U0001d649', &['\x4e']), ('\U0001d64a', &['\x4f']),
-        ('\U0001d64b', &['\x50']), ('\U0001d64c', &['\x51']), ('\U0001d64d', &['\x52']),
-        ('\U0001d64e', &['\x53']), ('\U0001d64f', &['\x54']), ('\U0001d650', &['\x55']),
-        ('\U0001d651', &['\x56']), ('\U0001d652', &['\x57']), ('\U0001d653', &['\x58']),
-        ('\U0001d654', &['\x59']), ('\U0001d655', &['\x5a']), ('\U0001d656', &['\x61']),
-        ('\U0001d657', &['\x62']), ('\U0001d658', &['\x63']), ('\U0001d659', &['\x64']),
-        ('\U0001d65a', &['\x65']), ('\U0001d65b', &['\x66']), ('\U0001d65c', &['\x67']),
-        ('\U0001d65d', &['\x68']), ('\U0001d65e', &['\x69']), ('\U0001d65f', &['\x6a']),
-        ('\U0001d660', &['\x6b']), ('\U0001d661', &['\x6c']), ('\U0001d662', &['\x6d']),
-        ('\U0001d663', &['\x6e']), ('\U0001d664', &['\x6f']), ('\U0001d665', &['\x70']),
-        ('\U0001d666', &['\x71']), ('\U0001d667', &['\x72']), ('\U0001d668', &['\x73']),
-        ('\U0001d669', &['\x74']), ('\U0001d66a', &['\x75']), ('\U0001d66b', &['\x76']),
-        ('\U0001d66c', &['\x77']), ('\U0001d66d', &['\x78']), ('\U0001d66e', &['\x79']),
-        ('\U0001d66f', &['\x7a']), ('\U0001d670', &['\x41']), ('\U0001d671', &['\x42']),
-        ('\U0001d672', &['\x43']), ('\U0001d673', &['\x44']), ('\U0001d674', &['\x45']),
-        ('\U0001d675', &['\x46']), ('\U0001d676', &['\x47']), ('\U0001d677', &['\x48']),
-        ('\U0001d678', &['\x49']), ('\U0001d679', &['\x4a']), ('\U0001d67a', &['\x4b']),
-        ('\U0001d67b', &['\x4c']), ('\U0001d67c', &['\x4d']), ('\U0001d67d', &['\x4e']),
-        ('\U0001d67e', &['\x4f']), ('\U0001d67f', &['\x50']), ('\U0001d680', &['\x51']),
-        ('\U0001d681', &['\x52']), ('\U0001d682', &['\x53']), ('\U0001d683', &['\x54']),
-        ('\U0001d684', &['\x55']), ('\U0001d685', &['\x56']), ('\U0001d686', &['\x57']),
-        ('\U0001d687', &['\x58']), ('\U0001d688', &['\x59']), ('\U0001d689', &['\x5a']),
-        ('\U0001d68a', &['\x61']), ('\U0001d68b', &['\x62']), ('\U0001d68c', &['\x63']),
-        ('\U0001d68d', &['\x64']), ('\U0001d68e', &['\x65']), ('\U0001d68f', &['\x66']),
-        ('\U0001d690', &['\x67']), ('\U0001d691', &['\x68']), ('\U0001d692', &['\x69']),
-        ('\U0001d693', &['\x6a']), ('\U0001d694', &['\x6b']), ('\U0001d695', &['\x6c']),
-        ('\U0001d696', &['\x6d']), ('\U0001d697', &['\x6e']), ('\U0001d698', &['\x6f']),
-        ('\U0001d699', &['\x70']), ('\U0001d69a', &['\x71']), ('\U0001d69b', &['\x72']),
-        ('\U0001d69c', &['\x73']), ('\U0001d69d', &['\x74']), ('\U0001d69e', &['\x75']),
-        ('\U0001d69f', &['\x76']), ('\U0001d6a0', &['\x77']), ('\U0001d6a1', &['\x78']),
-        ('\U0001d6a2', &['\x79']), ('\U0001d6a3', &['\x7a']), ('\U0001d6a4', &['\u0131']),
-        ('\U0001d6a5', &['\u0237']), ('\U0001d6a8', &['\u0391']), ('\U0001d6a9', &['\u0392']),
-        ('\U0001d6aa', &['\u0393']), ('\U0001d6ab', &['\u0394']), ('\U0001d6ac', &['\u0395']),
-        ('\U0001d6ad', &['\u0396']), ('\U0001d6ae', &['\u0397']), ('\U0001d6af', &['\u0398']),
-        ('\U0001d6b0', &['\u0399']), ('\U0001d6b1', &['\u039a']), ('\U0001d6b2', &['\u039b']),
-        ('\U0001d6b3', &['\u039c']), ('\U0001d6b4', &['\u039d']), ('\U0001d6b5', &['\u039e']),
-        ('\U0001d6b6', &['\u039f']), ('\U0001d6b7', &['\u03a0']), ('\U0001d6b8', &['\u03a1']),
-        ('\U0001d6b9', &['\u03f4']), ('\U0001d6ba', &['\u03a3']), ('\U0001d6bb', &['\u03a4']),
-        ('\U0001d6bc', &['\u03a5']), ('\U0001d6bd', &['\u03a6']), ('\U0001d6be', &['\u03a7']),
-        ('\U0001d6bf', &['\u03a8']), ('\U0001d6c0', &['\u03a9']), ('\U0001d6c1', &['\u2207']),
-        ('\U0001d6c2', &['\u03b1']), ('\U0001d6c3', &['\u03b2']), ('\U0001d6c4', &['\u03b3']),
-        ('\U0001d6c5', &['\u03b4']), ('\U0001d6c6', &['\u03b5']), ('\U0001d6c7', &['\u03b6']),
-        ('\U0001d6c8', &['\u03b7']), ('\U0001d6c9', &['\u03b8']), ('\U0001d6ca', &['\u03b9']),
-        ('\U0001d6cb', &['\u03ba']), ('\U0001d6cc', &['\u03bb']), ('\U0001d6cd', &['\u03bc']),
-        ('\U0001d6ce', &['\u03bd']), ('\U0001d6cf', &['\u03be']), ('\U0001d6d0', &['\u03bf']),
-        ('\U0001d6d1', &['\u03c0']), ('\U0001d6d2', &['\u03c1']), ('\U0001d6d3', &['\u03c2']),
-        ('\U0001d6d4', &['\u03c3']), ('\U0001d6d5', &['\u03c4']), ('\U0001d6d6', &['\u03c5']),
-        ('\U0001d6d7', &['\u03c6']), ('\U0001d6d8', &['\u03c7']), ('\U0001d6d9', &['\u03c8']),
-        ('\U0001d6da', &['\u03c9']), ('\U0001d6db', &['\u2202']), ('\U0001d6dc', &['\u03f5']),
-        ('\U0001d6dd', &['\u03d1']), ('\U0001d6de', &['\u03f0']), ('\U0001d6df', &['\u03d5']),
-        ('\U0001d6e0', &['\u03f1']), ('\U0001d6e1', &['\u03d6']), ('\U0001d6e2', &['\u0391']),
-        ('\U0001d6e3', &['\u0392']), ('\U0001d6e4', &['\u0393']), ('\U0001d6e5', &['\u0394']),
-        ('\U0001d6e6', &['\u0395']), ('\U0001d6e7', &['\u0396']), ('\U0001d6e8', &['\u0397']),
-        ('\U0001d6e9', &['\u0398']), ('\U0001d6ea', &['\u0399']), ('\U0001d6eb', &['\u039a']),
-        ('\U0001d6ec', &['\u039b']), ('\U0001d6ed', &['\u039c']), ('\U0001d6ee', &['\u039d']),
-        ('\U0001d6ef', &['\u039e']), ('\U0001d6f0', &['\u039f']), ('\U0001d6f1', &['\u03a0']),
-        ('\U0001d6f2', &['\u03a1']), ('\U0001d6f3', &['\u03f4']), ('\U0001d6f4', &['\u03a3']),
-        ('\U0001d6f5', &['\u03a4']), ('\U0001d6f6', &['\u03a5']), ('\U0001d6f7', &['\u03a6']),
-        ('\U0001d6f8', &['\u03a7']), ('\U0001d6f9', &['\u03a8']), ('\U0001d6fa', &['\u03a9']),
-        ('\U0001d6fb', &['\u2207']), ('\U0001d6fc', &['\u03b1']), ('\U0001d6fd', &['\u03b2']),
-        ('\U0001d6fe', &['\u03b3']), ('\U0001d6ff', &['\u03b4']), ('\U0001d700', &['\u03b5']),
-        ('\U0001d701', &['\u03b6']), ('\U0001d702', &['\u03b7']), ('\U0001d703', &['\u03b8']),
-        ('\U0001d704', &['\u03b9']), ('\U0001d705', &['\u03ba']), ('\U0001d706', &['\u03bb']),
-        ('\U0001d707', &['\u03bc']), ('\U0001d708', &['\u03bd']), ('\U0001d709', &['\u03be']),
-        ('\U0001d70a', &['\u03bf']), ('\U0001d70b', &['\u03c0']), ('\U0001d70c', &['\u03c1']),
-        ('\U0001d70d', &['\u03c2']), ('\U0001d70e', &['\u03c3']), ('\U0001d70f', &['\u03c4']),
-        ('\U0001d710', &['\u03c5']), ('\U0001d711', &['\u03c6']), ('\U0001d712', &['\u03c7']),
-        ('\U0001d713', &['\u03c8']), ('\U0001d714', &['\u03c9']), ('\U0001d715', &['\u2202']),
-        ('\U0001d716', &['\u03f5']), ('\U0001d717', &['\u03d1']), ('\U0001d718', &['\u03f0']),
-        ('\U0001d719', &['\u03d5']), ('\U0001d71a', &['\u03f1']), ('\U0001d71b', &['\u03d6']),
-        ('\U0001d71c', &['\u0391']), ('\U0001d71d', &['\u0392']), ('\U0001d71e', &['\u0393']),
-        ('\U0001d71f', &['\u0394']), ('\U0001d720', &['\u0395']), ('\U0001d721', &['\u0396']),
-        ('\U0001d722', &['\u0397']), ('\U0001d723', &['\u0398']), ('\U0001d724', &['\u0399']),
-        ('\U0001d725', &['\u039a']), ('\U0001d726', &['\u039b']), ('\U0001d727', &['\u039c']),
-        ('\U0001d728', &['\u039d']), ('\U0001d729', &['\u039e']), ('\U0001d72a', &['\u039f']),
-        ('\U0001d72b', &['\u03a0']), ('\U0001d72c', &['\u03a1']), ('\U0001d72d', &['\u03f4']),
-        ('\U0001d72e', &['\u03a3']), ('\U0001d72f', &['\u03a4']), ('\U0001d730', &['\u03a5']),
-        ('\U0001d731', &['\u03a6']), ('\U0001d732', &['\u03a7']), ('\U0001d733', &['\u03a8']),
-        ('\U0001d734', &['\u03a9']), ('\U0001d735', &['\u2207']), ('\U0001d736', &['\u03b1']),
-        ('\U0001d737', &['\u03b2']), ('\U0001d738', &['\u03b3']), ('\U0001d739', &['\u03b4']),
-        ('\U0001d73a', &['\u03b5']), ('\U0001d73b', &['\u03b6']), ('\U0001d73c', &['\u03b7']),
-        ('\U0001d73d', &['\u03b8']), ('\U0001d73e', &['\u03b9']), ('\U0001d73f', &['\u03ba']),
-        ('\U0001d740', &['\u03bb']), ('\U0001d741', &['\u03bc']), ('\U0001d742', &['\u03bd']),
-        ('\U0001d743', &['\u03be']), ('\U0001d744', &['\u03bf']), ('\U0001d745', &['\u03c0']),
-        ('\U0001d746', &['\u03c1']), ('\U0001d747', &['\u03c2']), ('\U0001d748', &['\u03c3']),
-        ('\U0001d749', &['\u03c4']), ('\U0001d74a', &['\u03c5']), ('\U0001d74b', &['\u03c6']),
-        ('\U0001d74c', &['\u03c7']), ('\U0001d74d', &['\u03c8']), ('\U0001d74e', &['\u03c9']),
-        ('\U0001d74f', &['\u2202']), ('\U0001d750', &['\u03f5']), ('\U0001d751', &['\u03d1']),
-        ('\U0001d752', &['\u03f0']), ('\U0001d753', &['\u03d5']), ('\U0001d754', &['\u03f1']),
-        ('\U0001d755', &['\u03d6']), ('\U0001d756', &['\u0391']), ('\U0001d757', &['\u0392']),
-        ('\U0001d758', &['\u0393']), ('\U0001d759', &['\u0394']), ('\U0001d75a', &['\u0395']),
-        ('\U0001d75b', &['\u0396']), ('\U0001d75c', &['\u0397']), ('\U0001d75d', &['\u0398']),
-        ('\U0001d75e', &['\u0399']), ('\U0001d75f', &['\u039a']), ('\U0001d760', &['\u039b']),
-        ('\U0001d761', &['\u039c']), ('\U0001d762', &['\u039d']), ('\U0001d763', &['\u039e']),
-        ('\U0001d764', &['\u039f']), ('\U0001d765', &['\u03a0']), ('\U0001d766', &['\u03a1']),
-        ('\U0001d767', &['\u03f4']), ('\U0001d768', &['\u03a3']), ('\U0001d769', &['\u03a4']),
-        ('\U0001d76a', &['\u03a5']), ('\U0001d76b', &['\u03a6']), ('\U0001d76c', &['\u03a7']),
-        ('\U0001d76d', &['\u03a8']), ('\U0001d76e', &['\u03a9']), ('\U0001d76f', &['\u2207']),
-        ('\U0001d770', &['\u03b1']), ('\U0001d771', &['\u03b2']), ('\U0001d772', &['\u03b3']),
-        ('\U0001d773', &['\u03b4']), ('\U0001d774', &['\u03b5']), ('\U0001d775', &['\u03b6']),
-        ('\U0001d776', &['\u03b7']), ('\U0001d777', &['\u03b8']), ('\U0001d778', &['\u03b9']),
-        ('\U0001d779', &['\u03ba']), ('\U0001d77a', &['\u03bb']), ('\U0001d77b', &['\u03bc']),
-        ('\U0001d77c', &['\u03bd']), ('\U0001d77d', &['\u03be']), ('\U0001d77e', &['\u03bf']),
-        ('\U0001d77f', &['\u03c0']), ('\U0001d780', &['\u03c1']), ('\U0001d781', &['\u03c2']),
-        ('\U0001d782', &['\u03c3']), ('\U0001d783', &['\u03c4']), ('\U0001d784', &['\u03c5']),
-        ('\U0001d785', &['\u03c6']), ('\U0001d786', &['\u03c7']), ('\U0001d787', &['\u03c8']),
-        ('\U0001d788', &['\u03c9']), ('\U0001d789', &['\u2202']), ('\U0001d78a', &['\u03f5']),
-        ('\U0001d78b', &['\u03d1']), ('\U0001d78c', &['\u03f0']), ('\U0001d78d', &['\u03d5']),
-        ('\U0001d78e', &['\u03f1']), ('\U0001d78f', &['\u03d6']), ('\U0001d790', &['\u0391']),
-        ('\U0001d791', &['\u0392']), ('\U0001d792', &['\u0393']), ('\U0001d793', &['\u0394']),
-        ('\U0001d794', &['\u0395']), ('\U0001d795', &['\u0396']), ('\U0001d796', &['\u0397']),
-        ('\U0001d797', &['\u0398']), ('\U0001d798', &['\u0399']), ('\U0001d799', &['\u039a']),
-        ('\U0001d79a', &['\u039b']), ('\U0001d79b', &['\u039c']), ('\U0001d79c', &['\u039d']),
-        ('\U0001d79d', &['\u039e']), ('\U0001d79e', &['\u039f']), ('\U0001d79f', &['\u03a0']),
-        ('\U0001d7a0', &['\u03a1']), ('\U0001d7a1', &['\u03f4']), ('\U0001d7a2', &['\u03a3']),
-        ('\U0001d7a3', &['\u03a4']), ('\U0001d7a4', &['\u03a5']), ('\U0001d7a5', &['\u03a6']),
-        ('\U0001d7a6', &['\u03a7']), ('\U0001d7a7', &['\u03a8']), ('\U0001d7a8', &['\u03a9']),
-        ('\U0001d7a9', &['\u2207']), ('\U0001d7aa', &['\u03b1']), ('\U0001d7ab', &['\u03b2']),
-        ('\U0001d7ac', &['\u03b3']), ('\U0001d7ad', &['\u03b4']), ('\U0001d7ae', &['\u03b5']),
-        ('\U0001d7af', &['\u03b6']), ('\U0001d7b0', &['\u03b7']), ('\U0001d7b1', &['\u03b8']),
-        ('\U0001d7b2', &['\u03b9']), ('\U0001d7b3', &['\u03ba']), ('\U0001d7b4', &['\u03bb']),
-        ('\U0001d7b5', &['\u03bc']), ('\U0001d7b6', &['\u03bd']), ('\U0001d7b7', &['\u03be']),
-        ('\U0001d7b8', &['\u03bf']), ('\U0001d7b9', &['\u03c0']), ('\U0001d7ba', &['\u03c1']),
-        ('\U0001d7bb', &['\u03c2']), ('\U0001d7bc', &['\u03c3']), ('\U0001d7bd', &['\u03c4']),
-        ('\U0001d7be', &['\u03c5']), ('\U0001d7bf', &['\u03c6']), ('\U0001d7c0', &['\u03c7']),
-        ('\U0001d7c1', &['\u03c8']), ('\U0001d7c2', &['\u03c9']), ('\U0001d7c3', &['\u2202']),
-        ('\U0001d7c4', &['\u03f5']), ('\U0001d7c5', &['\u03d1']), ('\U0001d7c6', &['\u03f0']),
-        ('\U0001d7c7', &['\u03d5']), ('\U0001d7c8', &['\u03f1']), ('\U0001d7c9', &['\u03d6']),
-        ('\U0001d7ca', &['\u03dc']), ('\U0001d7cb', &['\u03dd']), ('\U0001d7ce', &['\x30']),
-        ('\U0001d7cf', &['\x31']), ('\U0001d7d0', &['\x32']), ('\U0001d7d1', &['\x33']),
-        ('\U0001d7d2', &['\x34']), ('\U0001d7d3', &['\x35']), ('\U0001d7d4', &['\x36']),
-        ('\U0001d7d5', &['\x37']), ('\U0001d7d6', &['\x38']), ('\U0001d7d7', &['\x39']),
-        ('\U0001d7d8', &['\x30']), ('\U0001d7d9', &['\x31']), ('\U0001d7da', &['\x32']),
-        ('\U0001d7db', &['\x33']), ('\U0001d7dc', &['\x34']), ('\U0001d7dd', &['\x35']),
-        ('\U0001d7de', &['\x36']), ('\U0001d7df', &['\x37']), ('\U0001d7e0', &['\x38']),
-        ('\U0001d7e1', &['\x39']), ('\U0001d7e2', &['\x30']), ('\U0001d7e3', &['\x31']),
-        ('\U0001d7e4', &['\x32']), ('\U0001d7e5', &['\x33']), ('\U0001d7e6', &['\x34']),
-        ('\U0001d7e7', &['\x35']), ('\U0001d7e8', &['\x36']), ('\U0001d7e9', &['\x37']),
-        ('\U0001d7ea', &['\x38']), ('\U0001d7eb', &['\x39']), ('\U0001d7ec', &['\x30']),
-        ('\U0001d7ed', &['\x31']), ('\U0001d7ee', &['\x32']), ('\U0001d7ef', &['\x33']),
-        ('\U0001d7f0', &['\x34']), ('\U0001d7f1', &['\x35']), ('\U0001d7f2', &['\x36']),
-        ('\U0001d7f3', &['\x37']), ('\U0001d7f4', &['\x38']), ('\U0001d7f5', &['\x39']),
-        ('\U0001d7f6', &['\x30']), ('\U0001d7f7', &['\x31']), ('\U0001d7f8', &['\x32']),
-        ('\U0001d7f9', &['\x33']), ('\U0001d7fa', &['\x34']), ('\U0001d7fb', &['\x35']),
-        ('\U0001d7fc', &['\x36']), ('\U0001d7fd', &['\x37']), ('\U0001d7fe', &['\x38']),
-        ('\U0001d7ff', &['\x39']), ('\U0001ee00', &['\u0627']), ('\U0001ee01', &['\u0628']),
-        ('\U0001ee02', &['\u062c']), ('\U0001ee03', &['\u062f']), ('\U0001ee05', &['\u0648']),
-        ('\U0001ee06', &['\u0632']), ('\U0001ee07', &['\u062d']), ('\U0001ee08', &['\u0637']),
-        ('\U0001ee09', &['\u064a']), ('\U0001ee0a', &['\u0643']), ('\U0001ee0b', &['\u0644']),
-        ('\U0001ee0c', &['\u0645']), ('\U0001ee0d', &['\u0646']), ('\U0001ee0e', &['\u0633']),
-        ('\U0001ee0f', &['\u0639']), ('\U0001ee10', &['\u0641']), ('\U0001ee11', &['\u0635']),
-        ('\U0001ee12', &['\u0642']), ('\U0001ee13', &['\u0631']), ('\U0001ee14', &['\u0634']),
-        ('\U0001ee15', &['\u062a']), ('\U0001ee16', &['\u062b']), ('\U0001ee17', &['\u062e']),
-        ('\U0001ee18', &['\u0630']), ('\U0001ee19', &['\u0636']), ('\U0001ee1a', &['\u0638']),
-        ('\U0001ee1b', &['\u063a']), ('\U0001ee1c', &['\u066e']), ('\U0001ee1d', &['\u06ba']),
-        ('\U0001ee1e', &['\u06a1']), ('\U0001ee1f', &['\u066f']), ('\U0001ee21', &['\u0628']),
-        ('\U0001ee22', &['\u062c']), ('\U0001ee24', &['\u0647']), ('\U0001ee27', &['\u062d']),
-        ('\U0001ee29', &['\u064a']), ('\U0001ee2a', &['\u0643']), ('\U0001ee2b', &['\u0644']),
-        ('\U0001ee2c', &['\u0645']), ('\U0001ee2d', &['\u0646']), ('\U0001ee2e', &['\u0633']),
-        ('\U0001ee2f', &['\u0639']), ('\U0001ee30', &['\u0641']), ('\U0001ee31', &['\u0635']),
-        ('\U0001ee32', &['\u0642']), ('\U0001ee34', &['\u0634']), ('\U0001ee35', &['\u062a']),
-        ('\U0001ee36', &['\u062b']), ('\U0001ee37', &['\u062e']), ('\U0001ee39', &['\u0636']),
-        ('\U0001ee3b', &['\u063a']), ('\U0001ee42', &['\u062c']), ('\U0001ee47', &['\u062d']),
-        ('\U0001ee49', &['\u064a']), ('\U0001ee4b', &['\u0644']), ('\U0001ee4d', &['\u0646']),
-        ('\U0001ee4e', &['\u0633']), ('\U0001ee4f', &['\u0639']), ('\U0001ee51', &['\u0635']),
-        ('\U0001ee52', &['\u0642']), ('\U0001ee54', &['\u0634']), ('\U0001ee57', &['\u062e']),
-        ('\U0001ee59', &['\u0636']), ('\U0001ee5b', &['\u063a']), ('\U0001ee5d', &['\u06ba']),
-        ('\U0001ee5f', &['\u066f']), ('\U0001ee61', &['\u0628']), ('\U0001ee62', &['\u062c']),
-        ('\U0001ee64', &['\u0647']), ('\U0001ee67', &['\u062d']), ('\U0001ee68', &['\u0637']),
-        ('\U0001ee69', &['\u064a']), ('\U0001ee6a', &['\u0643']), ('\U0001ee6c', &['\u0645']),
-        ('\U0001ee6d', &['\u0646']), ('\U0001ee6e', &['\u0633']), ('\U0001ee6f', &['\u0639']),
-        ('\U0001ee70', &['\u0641']), ('\U0001ee71', &['\u0635']), ('\U0001ee72', &['\u0642']),
-        ('\U0001ee74', &['\u0634']), ('\U0001ee75', &['\u062a']), ('\U0001ee76', &['\u062b']),
-        ('\U0001ee77', &['\u062e']), ('\U0001ee79', &['\u0636']), ('\U0001ee7a', &['\u0638']),
-        ('\U0001ee7b', &['\u063a']), ('\U0001ee7c', &['\u066e']), ('\U0001ee7e', &['\u06a1']),
-        ('\U0001ee80', &['\u0627']), ('\U0001ee81', &['\u0628']), ('\U0001ee82', &['\u062c']),
-        ('\U0001ee83', &['\u062f']), ('\U0001ee84', &['\u0647']), ('\U0001ee85', &['\u0648']),
-        ('\U0001ee86', &['\u0632']), ('\U0001ee87', &['\u062d']), ('\U0001ee88', &['\u0637']),
-        ('\U0001ee89', &['\u064a']), ('\U0001ee8b', &['\u0644']), ('\U0001ee8c', &['\u0645']),
-        ('\U0001ee8d', &['\u0646']), ('\U0001ee8e', &['\u0633']), ('\U0001ee8f', &['\u0639']),
-        ('\U0001ee90', &['\u0641']), ('\U0001ee91', &['\u0635']), ('\U0001ee92', &['\u0642']),
-        ('\U0001ee93', &['\u0631']), ('\U0001ee94', &['\u0634']), ('\U0001ee95', &['\u062a']),
-        ('\U0001ee96', &['\u062b']), ('\U0001ee97', &['\u062e']), ('\U0001ee98', &['\u0630']),
-        ('\U0001ee99', &['\u0636']), ('\U0001ee9a', &['\u0638']), ('\U0001ee9b', &['\u063a']),
-        ('\U0001eea1', &['\u0628']), ('\U0001eea2', &['\u062c']), ('\U0001eea3', &['\u062f']),
-        ('\U0001eea5', &['\u0648']), ('\U0001eea6', &['\u0632']), ('\U0001eea7', &['\u062d']),
-        ('\U0001eea8', &['\u0637']), ('\U0001eea9', &['\u064a']), ('\U0001eeab', &['\u0644']),
-        ('\U0001eeac', &['\u0645']), ('\U0001eead', &['\u0646']), ('\U0001eeae', &['\u0633']),
-        ('\U0001eeaf', &['\u0639']), ('\U0001eeb0', &['\u0641']), ('\U0001eeb1', &['\u0635']),
-        ('\U0001eeb2', &['\u0642']), ('\U0001eeb3', &['\u0631']), ('\U0001eeb4', &['\u0634']),
-        ('\U0001eeb5', &['\u062a']), ('\U0001eeb6', &['\u062b']), ('\U0001eeb7', &['\u062e']),
-        ('\U0001eeb8', &['\u0630']), ('\U0001eeb9', &['\u0636']), ('\U0001eeba', &['\u0638']),
-        ('\U0001eebb', &['\u063a']), ('\U0001f100', &['\x30', '\x2e']), ('\U0001f101', &['\x30',
-        '\x2c']), ('\U0001f102', &['\x31', '\x2c']), ('\U0001f103', &['\x32', '\x2c']),
-        ('\U0001f104', &['\x33', '\x2c']), ('\U0001f105', &['\x34', '\x2c']), ('\U0001f106',
-        &['\x35', '\x2c']), ('\U0001f107', &['\x36', '\x2c']), ('\U0001f108', &['\x37', '\x2c']),
-        ('\U0001f109', &['\x38', '\x2c']), ('\U0001f10a', &['\x39', '\x2c']), ('\U0001f110',
-        &['\x28', '\x41', '\x29']), ('\U0001f111', &['\x28', '\x42', '\x29']), ('\U0001f112',
-        &['\x28', '\x43', '\x29']), ('\U0001f113', &['\x28', '\x44', '\x29']), ('\U0001f114',
-        &['\x28', '\x45', '\x29']), ('\U0001f115', &['\x28', '\x46', '\x29']), ('\U0001f116',
-        &['\x28', '\x47', '\x29']), ('\U0001f117', &['\x28', '\x48', '\x29']), ('\U0001f118',
-        &['\x28', '\x49', '\x29']), ('\U0001f119', &['\x28', '\x4a', '\x29']), ('\U0001f11a',
-        &['\x28', '\x4b', '\x29']), ('\U0001f11b', &['\x28', '\x4c', '\x29']), ('\U0001f11c',
-        &['\x28', '\x4d', '\x29']), ('\U0001f11d', &['\x28', '\x4e', '\x29']), ('\U0001f11e',
-        &['\x28', '\x4f', '\x29']), ('\U0001f11f', &['\x28', '\x50', '\x29']), ('\U0001f120',
-        &['\x28', '\x51', '\x29']), ('\U0001f121', &['\x28', '\x52', '\x29']), ('\U0001f122',
-        &['\x28', '\x53', '\x29']), ('\U0001f123', &['\x28', '\x54', '\x29']), ('\U0001f124',
-        &['\x28', '\x55', '\x29']), ('\U0001f125', &['\x28', '\x56', '\x29']), ('\U0001f126',
-        &['\x28', '\x57', '\x29']), ('\U0001f127', &['\x28', '\x58', '\x29']), ('\U0001f128',
-        &['\x28', '\x59', '\x29']), ('\U0001f129', &['\x28', '\x5a', '\x29']), ('\U0001f12a',
-        &['\u3014', '\x53', '\u3015']), ('\U0001f12b', &['\x43']), ('\U0001f12c', &['\x52']),
-        ('\U0001f12d', &['\x43', '\x44']), ('\U0001f12e', &['\x57', '\x5a']), ('\U0001f130',
-        &['\x41']), ('\U0001f131', &['\x42']), ('\U0001f132', &['\x43']), ('\U0001f133', &['\x44']),
-        ('\U0001f134', &['\x45']), ('\U0001f135', &['\x46']), ('\U0001f136', &['\x47']),
-        ('\U0001f137', &['\x48']), ('\U0001f138', &['\x49']), ('\U0001f139', &['\x4a']),
-        ('\U0001f13a', &['\x4b']), ('\U0001f13b', &['\x4c']), ('\U0001f13c', &['\x4d']),
-        ('\U0001f13d', &['\x4e']), ('\U0001f13e', &['\x4f']), ('\U0001f13f', &['\x50']),
-        ('\U0001f140', &['\x51']), ('\U0001f141', &['\x52']), ('\U0001f142', &['\x53']),
-        ('\U0001f143', &['\x54']), ('\U0001f144', &['\x55']), ('\U0001f145', &['\x56']),
-        ('\U0001f146', &['\x57']), ('\U0001f147', &['\x58']), ('\U0001f148', &['\x59']),
-        ('\U0001f149', &['\x5a']), ('\U0001f14a', &['\x48', '\x56']), ('\U0001f14b', &['\x4d',
-        '\x56']), ('\U0001f14c', &['\x53', '\x44']), ('\U0001f14d', &['\x53', '\x53']),
-        ('\U0001f14e', &['\x50', '\x50', '\x56']), ('\U0001f14f', &['\x57', '\x43']), ('\U0001f16a',
-        &['\x4d', '\x43']), ('\U0001f16b', &['\x4d', '\x44']), ('\U0001f190', &['\x44', '\x4a']),
-        ('\U0001f200', &['\u307b', '\u304b']), ('\U0001f201', &['\u30b3', '\u30b3']), ('\U0001f202',
-        &['\u30b5']), ('\U0001f210', &['\u624b']), ('\U0001f211', &['\u5b57']), ('\U0001f212',
-        &['\u53cc']), ('\U0001f213', &['\u30c7']), ('\U0001f214', &['\u4e8c']), ('\U0001f215',
-        &['\u591a']), ('\U0001f216', &['\u89e3']), ('\U0001f217', &['\u5929']), ('\U0001f218',
-        &['\u4ea4']), ('\U0001f219', &['\u6620']), ('\U0001f21a', &['\u7121']), ('\U0001f21b',
-        &['\u6599']), ('\U0001f21c', &['\u524d']), ('\U0001f21d', &['\u5f8c']), ('\U0001f21e',
-        &['\u518d']), ('\U0001f21f', &['\u65b0']), ('\U0001f220', &['\u521d']), ('\U0001f221',
-        &['\u7d42']), ('\U0001f222', &['\u751f']), ('\U0001f223', &['\u8ca9']), ('\U0001f224',
-        &['\u58f0']), ('\U0001f225', &['\u5439']), ('\U0001f226', &['\u6f14']), ('\U0001f227',
-        &['\u6295']), ('\U0001f228', &['\u6355']), ('\U0001f229', &['\u4e00']), ('\U0001f22a',
-        &['\u4e09']), ('\U0001f22b', &['\u904a']), ('\U0001f22c', &['\u5de6']), ('\U0001f22d',
-        &['\u4e2d']), ('\U0001f22e', &['\u53f3']), ('\U0001f22f', &['\u6307']), ('\U0001f230',
-        &['\u8d70']), ('\U0001f231', &['\u6253']), ('\U0001f232', &['\u7981']), ('\U0001f233',
-        &['\u7a7a']), ('\U0001f234', &['\u5408']), ('\U0001f235', &['\u6e80']), ('\U0001f236',
-        &['\u6709']), ('\U0001f237', &['\u6708']), ('\U0001f238', &['\u7533']), ('\U0001f239',
-        &['\u5272']), ('\U0001f23a', &['\u55b6']), ('\U0001f240', &['\u3014', '\u672c', '\u3015']),
-        ('\U0001f241', &['\u3014', '\u4e09', '\u3015']), ('\U0001f242', &['\u3014', '\u4e8c',
-        '\u3015']), ('\U0001f243', &['\u3014', '\u5b89', '\u3015']), ('\U0001f244', &['\u3014',
-        '\u70b9', '\u3015']), ('\U0001f245', &['\u3014', '\u6253', '\u3015']), ('\U0001f246',
-        &['\u3014', '\u76d7', '\u3015']), ('\U0001f247', &['\u3014', '\u52dd', '\u3015']),
-        ('\U0001f248', &['\u3014', '\u6557', '\u3015']), ('\U0001f250', &['\u5f97']), ('\U0001f251',
-        &['\u53ef'])
+        ('\u{a0}', &['\u{20}']), ('\u{a8}', &['\u{20}', '\u{308}']), ('\u{aa}', &['\u{61}']),
+        ('\u{af}', &['\u{20}', '\u{304}']), ('\u{b2}', &['\u{32}']), ('\u{b3}', &['\u{33}']),
+        ('\u{b4}', &['\u{20}', '\u{301}']), ('\u{b5}', &['\u{3bc}']), ('\u{b8}', &['\u{20}',
+        '\u{327}']), ('\u{b9}', &['\u{31}']), ('\u{ba}', &['\u{6f}']), ('\u{bc}', &['\u{31}',
+        '\u{2044}', '\u{34}']), ('\u{bd}', &['\u{31}', '\u{2044}', '\u{32}']), ('\u{be}',
+        &['\u{33}', '\u{2044}', '\u{34}']), ('\u{132}', &['\u{49}', '\u{4a}']), ('\u{133}',
+        &['\u{69}', '\u{6a}']), ('\u{13f}', &['\u{4c}', '\u{b7}']), ('\u{140}', &['\u{6c}',
+        '\u{b7}']), ('\u{149}', &['\u{2bc}', '\u{6e}']), ('\u{17f}', &['\u{73}']), ('\u{1c4}',
+        &['\u{44}', '\u{17d}']), ('\u{1c5}', &['\u{44}', '\u{17e}']), ('\u{1c6}', &['\u{64}',
+        '\u{17e}']), ('\u{1c7}', &['\u{4c}', '\u{4a}']), ('\u{1c8}', &['\u{4c}', '\u{6a}']),
+        ('\u{1c9}', &['\u{6c}', '\u{6a}']), ('\u{1ca}', &['\u{4e}', '\u{4a}']), ('\u{1cb}',
+        &['\u{4e}', '\u{6a}']), ('\u{1cc}', &['\u{6e}', '\u{6a}']), ('\u{1f1}', &['\u{44}',
+        '\u{5a}']), ('\u{1f2}', &['\u{44}', '\u{7a}']), ('\u{1f3}', &['\u{64}', '\u{7a}']),
+        ('\u{2b0}', &['\u{68}']), ('\u{2b1}', &['\u{266}']), ('\u{2b2}', &['\u{6a}']), ('\u{2b3}',
+        &['\u{72}']), ('\u{2b4}', &['\u{279}']), ('\u{2b5}', &['\u{27b}']), ('\u{2b6}',
+        &['\u{281}']), ('\u{2b7}', &['\u{77}']), ('\u{2b8}', &['\u{79}']), ('\u{2d8}', &['\u{20}',
+        '\u{306}']), ('\u{2d9}', &['\u{20}', '\u{307}']), ('\u{2da}', &['\u{20}', '\u{30a}']),
+        ('\u{2db}', &['\u{20}', '\u{328}']), ('\u{2dc}', &['\u{20}', '\u{303}']), ('\u{2dd}',
+        &['\u{20}', '\u{30b}']), ('\u{2e0}', &['\u{263}']), ('\u{2e1}', &['\u{6c}']), ('\u{2e2}',
+        &['\u{73}']), ('\u{2e3}', &['\u{78}']), ('\u{2e4}', &['\u{295}']), ('\u{37a}', &['\u{20}',
+        '\u{345}']), ('\u{384}', &['\u{20}', '\u{301}']), ('\u{3d0}', &['\u{3b2}']), ('\u{3d1}',
+        &['\u{3b8}']), ('\u{3d2}', &['\u{3a5}']), ('\u{3d5}', &['\u{3c6}']), ('\u{3d6}',
+        &['\u{3c0}']), ('\u{3f0}', &['\u{3ba}']), ('\u{3f1}', &['\u{3c1}']), ('\u{3f2}',
+        &['\u{3c2}']), ('\u{3f4}', &['\u{398}']), ('\u{3f5}', &['\u{3b5}']), ('\u{3f9}',
+        &['\u{3a3}']), ('\u{587}', &['\u{565}', '\u{582}']), ('\u{675}', &['\u{627}', '\u{674}']),
+        ('\u{676}', &['\u{648}', '\u{674}']), ('\u{677}', &['\u{6c7}', '\u{674}']), ('\u{678}',
+        &['\u{64a}', '\u{674}']), ('\u{e33}', &['\u{e4d}', '\u{e32}']), ('\u{eb3}', &['\u{ecd}',
+        '\u{eb2}']), ('\u{edc}', &['\u{eab}', '\u{e99}']), ('\u{edd}', &['\u{eab}', '\u{ea1}']),
+        ('\u{f0c}', &['\u{f0b}']), ('\u{f77}', &['\u{fb2}', '\u{f81}']), ('\u{f79}', &['\u{fb3}',
+        '\u{f81}']), ('\u{10fc}', &['\u{10dc}']), ('\u{1d2c}', &['\u{41}']), ('\u{1d2d}',
+        &['\u{c6}']), ('\u{1d2e}', &['\u{42}']), ('\u{1d30}', &['\u{44}']), ('\u{1d31}',
+        &['\u{45}']), ('\u{1d32}', &['\u{18e}']), ('\u{1d33}', &['\u{47}']), ('\u{1d34}',
+        &['\u{48}']), ('\u{1d35}', &['\u{49}']), ('\u{1d36}', &['\u{4a}']), ('\u{1d37}',
+        &['\u{4b}']), ('\u{1d38}', &['\u{4c}']), ('\u{1d39}', &['\u{4d}']), ('\u{1d3a}',
+        &['\u{4e}']), ('\u{1d3c}', &['\u{4f}']), ('\u{1d3d}', &['\u{222}']), ('\u{1d3e}',
+        &['\u{50}']), ('\u{1d3f}', &['\u{52}']), ('\u{1d40}', &['\u{54}']), ('\u{1d41}',
+        &['\u{55}']), ('\u{1d42}', &['\u{57}']), ('\u{1d43}', &['\u{61}']), ('\u{1d44}',
+        &['\u{250}']), ('\u{1d45}', &['\u{251}']), ('\u{1d46}', &['\u{1d02}']), ('\u{1d47}',
+        &['\u{62}']), ('\u{1d48}', &['\u{64}']), ('\u{1d49}', &['\u{65}']), ('\u{1d4a}',
+        &['\u{259}']), ('\u{1d4b}', &['\u{25b}']), ('\u{1d4c}', &['\u{25c}']), ('\u{1d4d}',
+        &['\u{67}']), ('\u{1d4f}', &['\u{6b}']), ('\u{1d50}', &['\u{6d}']), ('\u{1d51}',
+        &['\u{14b}']), ('\u{1d52}', &['\u{6f}']), ('\u{1d53}', &['\u{254}']), ('\u{1d54}',
+        &['\u{1d16}']), ('\u{1d55}', &['\u{1d17}']), ('\u{1d56}', &['\u{70}']), ('\u{1d57}',
+        &['\u{74}']), ('\u{1d58}', &['\u{75}']), ('\u{1d59}', &['\u{1d1d}']), ('\u{1d5a}',
+        &['\u{26f}']), ('\u{1d5b}', &['\u{76}']), ('\u{1d5c}', &['\u{1d25}']), ('\u{1d5d}',
+        &['\u{3b2}']), ('\u{1d5e}', &['\u{3b3}']), ('\u{1d5f}', &['\u{3b4}']), ('\u{1d60}',
+        &['\u{3c6}']), ('\u{1d61}', &['\u{3c7}']), ('\u{1d62}', &['\u{69}']), ('\u{1d63}',
+        &['\u{72}']), ('\u{1d64}', &['\u{75}']), ('\u{1d65}', &['\u{76}']), ('\u{1d66}',
+        &['\u{3b2}']), ('\u{1d67}', &['\u{3b3}']), ('\u{1d68}', &['\u{3c1}']), ('\u{1d69}',
+        &['\u{3c6}']), ('\u{1d6a}', &['\u{3c7}']), ('\u{1d78}', &['\u{43d}']), ('\u{1d9b}',
+        &['\u{252}']), ('\u{1d9c}', &['\u{63}']), ('\u{1d9d}', &['\u{255}']), ('\u{1d9e}',
+        &['\u{f0}']), ('\u{1d9f}', &['\u{25c}']), ('\u{1da0}', &['\u{66}']), ('\u{1da1}',
+        &['\u{25f}']), ('\u{1da2}', &['\u{261}']), ('\u{1da3}', &['\u{265}']), ('\u{1da4}',
+        &['\u{268}']), ('\u{1da5}', &['\u{269}']), ('\u{1da6}', &['\u{26a}']), ('\u{1da7}',
+        &['\u{1d7b}']), ('\u{1da8}', &['\u{29d}']), ('\u{1da9}', &['\u{26d}']), ('\u{1daa}',
+        &['\u{1d85}']), ('\u{1dab}', &['\u{29f}']), ('\u{1dac}', &['\u{271}']), ('\u{1dad}',
+        &['\u{270}']), ('\u{1dae}', &['\u{272}']), ('\u{1daf}', &['\u{273}']), ('\u{1db0}',
+        &['\u{274}']), ('\u{1db1}', &['\u{275}']), ('\u{1db2}', &['\u{278}']), ('\u{1db3}',
+        &['\u{282}']), ('\u{1db4}', &['\u{283}']), ('\u{1db5}', &['\u{1ab}']), ('\u{1db6}',
+        &['\u{289}']), ('\u{1db7}', &['\u{28a}']), ('\u{1db8}', &['\u{1d1c}']), ('\u{1db9}',
+        &['\u{28b}']), ('\u{1dba}', &['\u{28c}']), ('\u{1dbb}', &['\u{7a}']), ('\u{1dbc}',
+        &['\u{290}']), ('\u{1dbd}', &['\u{291}']), ('\u{1dbe}', &['\u{292}']), ('\u{1dbf}',
+        &['\u{3b8}']), ('\u{1e9a}', &['\u{61}', '\u{2be}']), ('\u{1fbd}', &['\u{20}', '\u{313}']),
+        ('\u{1fbf}', &['\u{20}', '\u{313}']), ('\u{1fc0}', &['\u{20}', '\u{342}']), ('\u{1ffe}',
+        &['\u{20}', '\u{314}']), ('\u{2002}', &['\u{20}']), ('\u{2003}', &['\u{20}']), ('\u{2004}',
+        &['\u{20}']), ('\u{2005}', &['\u{20}']), ('\u{2006}', &['\u{20}']), ('\u{2007}',
+        &['\u{20}']), ('\u{2008}', &['\u{20}']), ('\u{2009}', &['\u{20}']), ('\u{200a}',
+        &['\u{20}']), ('\u{2011}', &['\u{2010}']), ('\u{2017}', &['\u{20}', '\u{333}']),
+        ('\u{2024}', &['\u{2e}']), ('\u{2025}', &['\u{2e}', '\u{2e}']), ('\u{2026}', &['\u{2e}',
+        '\u{2e}', '\u{2e}']), ('\u{202f}', &['\u{20}']), ('\u{2033}', &['\u{2032}', '\u{2032}']),
+        ('\u{2034}', &['\u{2032}', '\u{2032}', '\u{2032}']), ('\u{2036}', &['\u{2035}',
+        '\u{2035}']), ('\u{2037}', &['\u{2035}', '\u{2035}', '\u{2035}']), ('\u{203c}', &['\u{21}',
+        '\u{21}']), ('\u{203e}', &['\u{20}', '\u{305}']), ('\u{2047}', &['\u{3f}', '\u{3f}']),
+        ('\u{2048}', &['\u{3f}', '\u{21}']), ('\u{2049}', &['\u{21}', '\u{3f}']), ('\u{2057}',
+        &['\u{2032}', '\u{2032}', '\u{2032}', '\u{2032}']), ('\u{205f}', &['\u{20}']), ('\u{2070}',
+        &['\u{30}']), ('\u{2071}', &['\u{69}']), ('\u{2074}', &['\u{34}']), ('\u{2075}',
+        &['\u{35}']), ('\u{2076}', &['\u{36}']), ('\u{2077}', &['\u{37}']), ('\u{2078}',
+        &['\u{38}']), ('\u{2079}', &['\u{39}']), ('\u{207a}', &['\u{2b}']), ('\u{207b}',
+        &['\u{2212}']), ('\u{207c}', &['\u{3d}']), ('\u{207d}', &['\u{28}']), ('\u{207e}',
+        &['\u{29}']), ('\u{207f}', &['\u{6e}']), ('\u{2080}', &['\u{30}']), ('\u{2081}',
+        &['\u{31}']), ('\u{2082}', &['\u{32}']), ('\u{2083}', &['\u{33}']), ('\u{2084}',
+        &['\u{34}']), ('\u{2085}', &['\u{35}']), ('\u{2086}', &['\u{36}']), ('\u{2087}',
+        &['\u{37}']), ('\u{2088}', &['\u{38}']), ('\u{2089}', &['\u{39}']), ('\u{208a}',
+        &['\u{2b}']), ('\u{208b}', &['\u{2212}']), ('\u{208c}', &['\u{3d}']), ('\u{208d}',
+        &['\u{28}']), ('\u{208e}', &['\u{29}']), ('\u{2090}', &['\u{61}']), ('\u{2091}',
+        &['\u{65}']), ('\u{2092}', &['\u{6f}']), ('\u{2093}', &['\u{78}']), ('\u{2094}',
+        &['\u{259}']), ('\u{2095}', &['\u{68}']), ('\u{2096}', &['\u{6b}']), ('\u{2097}',
+        &['\u{6c}']), ('\u{2098}', &['\u{6d}']), ('\u{2099}', &['\u{6e}']), ('\u{209a}',
+        &['\u{70}']), ('\u{209b}', &['\u{73}']), ('\u{209c}', &['\u{74}']), ('\u{20a8}', &['\u{52}',
+        '\u{73}']), ('\u{2100}', &['\u{61}', '\u{2f}', '\u{63}']), ('\u{2101}', &['\u{61}',
+        '\u{2f}', '\u{73}']), ('\u{2102}', &['\u{43}']), ('\u{2103}', &['\u{b0}', '\u{43}']),
+        ('\u{2105}', &['\u{63}', '\u{2f}', '\u{6f}']), ('\u{2106}', &['\u{63}', '\u{2f}',
+        '\u{75}']), ('\u{2107}', &['\u{190}']), ('\u{2109}', &['\u{b0}', '\u{46}']), ('\u{210a}',
+        &['\u{67}']), ('\u{210b}', &['\u{48}']), ('\u{210c}', &['\u{48}']), ('\u{210d}',
+        &['\u{48}']), ('\u{210e}', &['\u{68}']), ('\u{210f}', &['\u{127}']), ('\u{2110}',
+        &['\u{49}']), ('\u{2111}', &['\u{49}']), ('\u{2112}', &['\u{4c}']), ('\u{2113}',
+        &['\u{6c}']), ('\u{2115}', &['\u{4e}']), ('\u{2116}', &['\u{4e}', '\u{6f}']), ('\u{2119}',
+        &['\u{50}']), ('\u{211a}', &['\u{51}']), ('\u{211b}', &['\u{52}']), ('\u{211c}',
+        &['\u{52}']), ('\u{211d}', &['\u{52}']), ('\u{2120}', &['\u{53}', '\u{4d}']), ('\u{2121}',
+        &['\u{54}', '\u{45}', '\u{4c}']), ('\u{2122}', &['\u{54}', '\u{4d}']), ('\u{2124}',
+        &['\u{5a}']), ('\u{2128}', &['\u{5a}']), ('\u{212c}', &['\u{42}']), ('\u{212d}',
+        &['\u{43}']), ('\u{212f}', &['\u{65}']), ('\u{2130}', &['\u{45}']), ('\u{2131}',
+        &['\u{46}']), ('\u{2133}', &['\u{4d}']), ('\u{2134}', &['\u{6f}']), ('\u{2135}',
+        &['\u{5d0}']), ('\u{2136}', &['\u{5d1}']), ('\u{2137}', &['\u{5d2}']), ('\u{2138}',
+        &['\u{5d3}']), ('\u{2139}', &['\u{69}']), ('\u{213b}', &['\u{46}', '\u{41}', '\u{58}']),
+        ('\u{213c}', &['\u{3c0}']), ('\u{213d}', &['\u{3b3}']), ('\u{213e}', &['\u{393}']),
+        ('\u{213f}', &['\u{3a0}']), ('\u{2140}', &['\u{2211}']), ('\u{2145}', &['\u{44}']),
+        ('\u{2146}', &['\u{64}']), ('\u{2147}', &['\u{65}']), ('\u{2148}', &['\u{69}']),
+        ('\u{2149}', &['\u{6a}']), ('\u{2150}', &['\u{31}', '\u{2044}', '\u{37}']), ('\u{2151}',
+        &['\u{31}', '\u{2044}', '\u{39}']), ('\u{2152}', &['\u{31}', '\u{2044}', '\u{31}',
+        '\u{30}']), ('\u{2153}', &['\u{31}', '\u{2044}', '\u{33}']), ('\u{2154}', &['\u{32}',
+        '\u{2044}', '\u{33}']), ('\u{2155}', &['\u{31}', '\u{2044}', '\u{35}']), ('\u{2156}',
+        &['\u{32}', '\u{2044}', '\u{35}']), ('\u{2157}', &['\u{33}', '\u{2044}', '\u{35}']),
+        ('\u{2158}', &['\u{34}', '\u{2044}', '\u{35}']), ('\u{2159}', &['\u{31}', '\u{2044}',
+        '\u{36}']), ('\u{215a}', &['\u{35}', '\u{2044}', '\u{36}']), ('\u{215b}', &['\u{31}',
+        '\u{2044}', '\u{38}']), ('\u{215c}', &['\u{33}', '\u{2044}', '\u{38}']), ('\u{215d}',
+        &['\u{35}', '\u{2044}', '\u{38}']), ('\u{215e}', &['\u{37}', '\u{2044}', '\u{38}']),
+        ('\u{215f}', &['\u{31}', '\u{2044}']), ('\u{2160}', &['\u{49}']), ('\u{2161}', &['\u{49}',
+        '\u{49}']), ('\u{2162}', &['\u{49}', '\u{49}', '\u{49}']), ('\u{2163}', &['\u{49}',
+        '\u{56}']), ('\u{2164}', &['\u{56}']), ('\u{2165}', &['\u{56}', '\u{49}']), ('\u{2166}',
+        &['\u{56}', '\u{49}', '\u{49}']), ('\u{2167}', &['\u{56}', '\u{49}', '\u{49}', '\u{49}']),
+        ('\u{2168}', &['\u{49}', '\u{58}']), ('\u{2169}', &['\u{58}']), ('\u{216a}', &['\u{58}',
+        '\u{49}']), ('\u{216b}', &['\u{58}', '\u{49}', '\u{49}']), ('\u{216c}', &['\u{4c}']),
+        ('\u{216d}', &['\u{43}']), ('\u{216e}', &['\u{44}']), ('\u{216f}', &['\u{4d}']),
+        ('\u{2170}', &['\u{69}']), ('\u{2171}', &['\u{69}', '\u{69}']), ('\u{2172}', &['\u{69}',
+        '\u{69}', '\u{69}']), ('\u{2173}', &['\u{69}', '\u{76}']), ('\u{2174}', &['\u{76}']),
+        ('\u{2175}', &['\u{76}', '\u{69}']), ('\u{2176}', &['\u{76}', '\u{69}', '\u{69}']),
+        ('\u{2177}', &['\u{76}', '\u{69}', '\u{69}', '\u{69}']), ('\u{2178}', &['\u{69}',
+        '\u{78}']), ('\u{2179}', &['\u{78}']), ('\u{217a}', &['\u{78}', '\u{69}']), ('\u{217b}',
+        &['\u{78}', '\u{69}', '\u{69}']), ('\u{217c}', &['\u{6c}']), ('\u{217d}', &['\u{63}']),
+        ('\u{217e}', &['\u{64}']), ('\u{217f}', &['\u{6d}']), ('\u{2189}', &['\u{30}', '\u{2044}',
+        '\u{33}']), ('\u{222c}', &['\u{222b}', '\u{222b}']), ('\u{222d}', &['\u{222b}', '\u{222b}',
+        '\u{222b}']), ('\u{222f}', &['\u{222e}', '\u{222e}']), ('\u{2230}', &['\u{222e}',
+        '\u{222e}', '\u{222e}']), ('\u{2460}', &['\u{31}']), ('\u{2461}', &['\u{32}']), ('\u{2462}',
+        &['\u{33}']), ('\u{2463}', &['\u{34}']), ('\u{2464}', &['\u{35}']), ('\u{2465}',
+        &['\u{36}']), ('\u{2466}', &['\u{37}']), ('\u{2467}', &['\u{38}']), ('\u{2468}',
+        &['\u{39}']), ('\u{2469}', &['\u{31}', '\u{30}']), ('\u{246a}', &['\u{31}', '\u{31}']),
+        ('\u{246b}', &['\u{31}', '\u{32}']), ('\u{246c}', &['\u{31}', '\u{33}']), ('\u{246d}',
+        &['\u{31}', '\u{34}']), ('\u{246e}', &['\u{31}', '\u{35}']), ('\u{246f}', &['\u{31}',
+        '\u{36}']), ('\u{2470}', &['\u{31}', '\u{37}']), ('\u{2471}', &['\u{31}', '\u{38}']),
+        ('\u{2472}', &['\u{31}', '\u{39}']), ('\u{2473}', &['\u{32}', '\u{30}']), ('\u{2474}',
+        &['\u{28}', '\u{31}', '\u{29}']), ('\u{2475}', &['\u{28}', '\u{32}', '\u{29}']),
+        ('\u{2476}', &['\u{28}', '\u{33}', '\u{29}']), ('\u{2477}', &['\u{28}', '\u{34}',
+        '\u{29}']), ('\u{2478}', &['\u{28}', '\u{35}', '\u{29}']), ('\u{2479}', &['\u{28}',
+        '\u{36}', '\u{29}']), ('\u{247a}', &['\u{28}', '\u{37}', '\u{29}']), ('\u{247b}',
+        &['\u{28}', '\u{38}', '\u{29}']), ('\u{247c}', &['\u{28}', '\u{39}', '\u{29}']),
+        ('\u{247d}', &['\u{28}', '\u{31}', '\u{30}', '\u{29}']), ('\u{247e}', &['\u{28}', '\u{31}',
+        '\u{31}', '\u{29}']), ('\u{247f}', &['\u{28}', '\u{31}', '\u{32}', '\u{29}']), ('\u{2480}',
+        &['\u{28}', '\u{31}', '\u{33}', '\u{29}']), ('\u{2481}', &['\u{28}', '\u{31}', '\u{34}',
+        '\u{29}']), ('\u{2482}', &['\u{28}', '\u{31}', '\u{35}', '\u{29}']), ('\u{2483}',
+        &['\u{28}', '\u{31}', '\u{36}', '\u{29}']), ('\u{2484}', &['\u{28}', '\u{31}', '\u{37}',
+        '\u{29}']), ('\u{2485}', &['\u{28}', '\u{31}', '\u{38}', '\u{29}']), ('\u{2486}',
+        &['\u{28}', '\u{31}', '\u{39}', '\u{29}']), ('\u{2487}', &['\u{28}', '\u{32}', '\u{30}',
+        '\u{29}']), ('\u{2488}', &['\u{31}', '\u{2e}']), ('\u{2489}', &['\u{32}', '\u{2e}']),
+        ('\u{248a}', &['\u{33}', '\u{2e}']), ('\u{248b}', &['\u{34}', '\u{2e}']), ('\u{248c}',
+        &['\u{35}', '\u{2e}']), ('\u{248d}', &['\u{36}', '\u{2e}']), ('\u{248e}', &['\u{37}',
+        '\u{2e}']), ('\u{248f}', &['\u{38}', '\u{2e}']), ('\u{2490}', &['\u{39}', '\u{2e}']),
+        ('\u{2491}', &['\u{31}', '\u{30}', '\u{2e}']), ('\u{2492}', &['\u{31}', '\u{31}',
+        '\u{2e}']), ('\u{2493}', &['\u{31}', '\u{32}', '\u{2e}']), ('\u{2494}', &['\u{31}',
+        '\u{33}', '\u{2e}']), ('\u{2495}', &['\u{31}', '\u{34}', '\u{2e}']), ('\u{2496}',
+        &['\u{31}', '\u{35}', '\u{2e}']), ('\u{2497}', &['\u{31}', '\u{36}', '\u{2e}']),
+        ('\u{2498}', &['\u{31}', '\u{37}', '\u{2e}']), ('\u{2499}', &['\u{31}', '\u{38}',
+        '\u{2e}']), ('\u{249a}', &['\u{31}', '\u{39}', '\u{2e}']), ('\u{249b}', &['\u{32}',
+        '\u{30}', '\u{2e}']), ('\u{249c}', &['\u{28}', '\u{61}', '\u{29}']), ('\u{249d}',
+        &['\u{28}', '\u{62}', '\u{29}']), ('\u{249e}', &['\u{28}', '\u{63}', '\u{29}']),
+        ('\u{249f}', &['\u{28}', '\u{64}', '\u{29}']), ('\u{24a0}', &['\u{28}', '\u{65}',
+        '\u{29}']), ('\u{24a1}', &['\u{28}', '\u{66}', '\u{29}']), ('\u{24a2}', &['\u{28}',
+        '\u{67}', '\u{29}']), ('\u{24a3}', &['\u{28}', '\u{68}', '\u{29}']), ('\u{24a4}',
+        &['\u{28}', '\u{69}', '\u{29}']), ('\u{24a5}', &['\u{28}', '\u{6a}', '\u{29}']),
+        ('\u{24a6}', &['\u{28}', '\u{6b}', '\u{29}']), ('\u{24a7}', &['\u{28}', '\u{6c}',
+        '\u{29}']), ('\u{24a8}', &['\u{28}', '\u{6d}', '\u{29}']), ('\u{24a9}', &['\u{28}',
+        '\u{6e}', '\u{29}']), ('\u{24aa}', &['\u{28}', '\u{6f}', '\u{29}']), ('\u{24ab}',
+        &['\u{28}', '\u{70}', '\u{29}']), ('\u{24ac}', &['\u{28}', '\u{71}', '\u{29}']),
+        ('\u{24ad}', &['\u{28}', '\u{72}', '\u{29}']), ('\u{24ae}', &['\u{28}', '\u{73}',
+        '\u{29}']), ('\u{24af}', &['\u{28}', '\u{74}', '\u{29}']), ('\u{24b0}', &['\u{28}',
+        '\u{75}', '\u{29}']), ('\u{24b1}', &['\u{28}', '\u{76}', '\u{29}']), ('\u{24b2}',
+        &['\u{28}', '\u{77}', '\u{29}']), ('\u{24b3}', &['\u{28}', '\u{78}', '\u{29}']),
+        ('\u{24b4}', &['\u{28}', '\u{79}', '\u{29}']), ('\u{24b5}', &['\u{28}', '\u{7a}',
+        '\u{29}']), ('\u{24b6}', &['\u{41}']), ('\u{24b7}', &['\u{42}']), ('\u{24b8}', &['\u{43}']),
+        ('\u{24b9}', &['\u{44}']), ('\u{24ba}', &['\u{45}']), ('\u{24bb}', &['\u{46}']),
+        ('\u{24bc}', &['\u{47}']), ('\u{24bd}', &['\u{48}']), ('\u{24be}', &['\u{49}']),
+        ('\u{24bf}', &['\u{4a}']), ('\u{24c0}', &['\u{4b}']), ('\u{24c1}', &['\u{4c}']),
+        ('\u{24c2}', &['\u{4d}']), ('\u{24c3}', &['\u{4e}']), ('\u{24c4}', &['\u{4f}']),
+        ('\u{24c5}', &['\u{50}']), ('\u{24c6}', &['\u{51}']), ('\u{24c7}', &['\u{52}']),
+        ('\u{24c8}', &['\u{53}']), ('\u{24c9}', &['\u{54}']), ('\u{24ca}', &['\u{55}']),
+        ('\u{24cb}', &['\u{56}']), ('\u{24cc}', &['\u{57}']), ('\u{24cd}', &['\u{58}']),
+        ('\u{24ce}', &['\u{59}']), ('\u{24cf}', &['\u{5a}']), ('\u{24d0}', &['\u{61}']),
+        ('\u{24d1}', &['\u{62}']), ('\u{24d2}', &['\u{63}']), ('\u{24d3}', &['\u{64}']),
+        ('\u{24d4}', &['\u{65}']), ('\u{24d5}', &['\u{66}']), ('\u{24d6}', &['\u{67}']),
+        ('\u{24d7}', &['\u{68}']), ('\u{24d8}', &['\u{69}']), ('\u{24d9}', &['\u{6a}']),
+        ('\u{24da}', &['\u{6b}']), ('\u{24db}', &['\u{6c}']), ('\u{24dc}', &['\u{6d}']),
+        ('\u{24dd}', &['\u{6e}']), ('\u{24de}', &['\u{6f}']), ('\u{24df}', &['\u{70}']),
+        ('\u{24e0}', &['\u{71}']), ('\u{24e1}', &['\u{72}']), ('\u{24e2}', &['\u{73}']),
+        ('\u{24e3}', &['\u{74}']), ('\u{24e4}', &['\u{75}']), ('\u{24e5}', &['\u{76}']),
+        ('\u{24e6}', &['\u{77}']), ('\u{24e7}', &['\u{78}']), ('\u{24e8}', &['\u{79}']),
+        ('\u{24e9}', &['\u{7a}']), ('\u{24ea}', &['\u{30}']), ('\u{2a0c}', &['\u{222b}', '\u{222b}',
+        '\u{222b}', '\u{222b}']), ('\u{2a74}', &['\u{3a}', '\u{3a}', '\u{3d}']), ('\u{2a75}',
+        &['\u{3d}', '\u{3d}']), ('\u{2a76}', &['\u{3d}', '\u{3d}', '\u{3d}']), ('\u{2c7c}',
+        &['\u{6a}']), ('\u{2c7d}', &['\u{56}']), ('\u{2d6f}', &['\u{2d61}']), ('\u{2e9f}',
+        &['\u{6bcd}']), ('\u{2ef3}', &['\u{9f9f}']), ('\u{2f00}', &['\u{4e00}']), ('\u{2f01}',
+        &['\u{4e28}']), ('\u{2f02}', &['\u{4e36}']), ('\u{2f03}', &['\u{4e3f}']), ('\u{2f04}',
+        &['\u{4e59}']), ('\u{2f05}', &['\u{4e85}']), ('\u{2f06}', &['\u{4e8c}']), ('\u{2f07}',
+        &['\u{4ea0}']), ('\u{2f08}', &['\u{4eba}']), ('\u{2f09}', &['\u{513f}']), ('\u{2f0a}',
+        &['\u{5165}']), ('\u{2f0b}', &['\u{516b}']), ('\u{2f0c}', &['\u{5182}']), ('\u{2f0d}',
+        &['\u{5196}']), ('\u{2f0e}', &['\u{51ab}']), ('\u{2f0f}', &['\u{51e0}']), ('\u{2f10}',
+        &['\u{51f5}']), ('\u{2f11}', &['\u{5200}']), ('\u{2f12}', &['\u{529b}']), ('\u{2f13}',
+        &['\u{52f9}']), ('\u{2f14}', &['\u{5315}']), ('\u{2f15}', &['\u{531a}']), ('\u{2f16}',
+        &['\u{5338}']), ('\u{2f17}', &['\u{5341}']), ('\u{2f18}', &['\u{535c}']), ('\u{2f19}',
+        &['\u{5369}']), ('\u{2f1a}', &['\u{5382}']), ('\u{2f1b}', &['\u{53b6}']), ('\u{2f1c}',
+        &['\u{53c8}']), ('\u{2f1d}', &['\u{53e3}']), ('\u{2f1e}', &['\u{56d7}']), ('\u{2f1f}',
+        &['\u{571f}']), ('\u{2f20}', &['\u{58eb}']), ('\u{2f21}', &['\u{5902}']), ('\u{2f22}',
+        &['\u{590a}']), ('\u{2f23}', &['\u{5915}']), ('\u{2f24}', &['\u{5927}']), ('\u{2f25}',
+        &['\u{5973}']), ('\u{2f26}', &['\u{5b50}']), ('\u{2f27}', &['\u{5b80}']), ('\u{2f28}',
+        &['\u{5bf8}']), ('\u{2f29}', &['\u{5c0f}']), ('\u{2f2a}', &['\u{5c22}']), ('\u{2f2b}',
+        &['\u{5c38}']), ('\u{2f2c}', &['\u{5c6e}']), ('\u{2f2d}', &['\u{5c71}']), ('\u{2f2e}',
+        &['\u{5ddb}']), ('\u{2f2f}', &['\u{5de5}']), ('\u{2f30}', &['\u{5df1}']), ('\u{2f31}',
+        &['\u{5dfe}']), ('\u{2f32}', &['\u{5e72}']), ('\u{2f33}', &['\u{5e7a}']), ('\u{2f34}',
+        &['\u{5e7f}']), ('\u{2f35}', &['\u{5ef4}']), ('\u{2f36}', &['\u{5efe}']), ('\u{2f37}',
+        &['\u{5f0b}']), ('\u{2f38}', &['\u{5f13}']), ('\u{2f39}', &['\u{5f50}']), ('\u{2f3a}',
+        &['\u{5f61}']), ('\u{2f3b}', &['\u{5f73}']), ('\u{2f3c}', &['\u{5fc3}']), ('\u{2f3d}',
+        &['\u{6208}']), ('\u{2f3e}', &['\u{6236}']), ('\u{2f3f}', &['\u{624b}']), ('\u{2f40}',
+        &['\u{652f}']), ('\u{2f41}', &['\u{6534}']), ('\u{2f42}', &['\u{6587}']), ('\u{2f43}',
+        &['\u{6597}']), ('\u{2f44}', &['\u{65a4}']), ('\u{2f45}', &['\u{65b9}']), ('\u{2f46}',
+        &['\u{65e0}']), ('\u{2f47}', &['\u{65e5}']), ('\u{2f48}', &['\u{66f0}']), ('\u{2f49}',
+        &['\u{6708}']), ('\u{2f4a}', &['\u{6728}']), ('\u{2f4b}', &['\u{6b20}']), ('\u{2f4c}',
+        &['\u{6b62}']), ('\u{2f4d}', &['\u{6b79}']), ('\u{2f4e}', &['\u{6bb3}']), ('\u{2f4f}',
+        &['\u{6bcb}']), ('\u{2f50}', &['\u{6bd4}']), ('\u{2f51}', &['\u{6bdb}']), ('\u{2f52}',
+        &['\u{6c0f}']), ('\u{2f53}', &['\u{6c14}']), ('\u{2f54}', &['\u{6c34}']), ('\u{2f55}',
+        &['\u{706b}']), ('\u{2f56}', &['\u{722a}']), ('\u{2f57}', &['\u{7236}']), ('\u{2f58}',
+        &['\u{723b}']), ('\u{2f59}', &['\u{723f}']), ('\u{2f5a}', &['\u{7247}']), ('\u{2f5b}',
+        &['\u{7259}']), ('\u{2f5c}', &['\u{725b}']), ('\u{2f5d}', &['\u{72ac}']), ('\u{2f5e}',
+        &['\u{7384}']), ('\u{2f5f}', &['\u{7389}']), ('\u{2f60}', &['\u{74dc}']), ('\u{2f61}',
+        &['\u{74e6}']), ('\u{2f62}', &['\u{7518}']), ('\u{2f63}', &['\u{751f}']), ('\u{2f64}',
+        &['\u{7528}']), ('\u{2f65}', &['\u{7530}']), ('\u{2f66}', &['\u{758b}']), ('\u{2f67}',
+        &['\u{7592}']), ('\u{2f68}', &['\u{7676}']), ('\u{2f69}', &['\u{767d}']), ('\u{2f6a}',
+        &['\u{76ae}']), ('\u{2f6b}', &['\u{76bf}']), ('\u{2f6c}', &['\u{76ee}']), ('\u{2f6d}',
+        &['\u{77db}']), ('\u{2f6e}', &['\u{77e2}']), ('\u{2f6f}', &['\u{77f3}']), ('\u{2f70}',
+        &['\u{793a}']), ('\u{2f71}', &['\u{79b8}']), ('\u{2f72}', &['\u{79be}']), ('\u{2f73}',
+        &['\u{7a74}']), ('\u{2f74}', &['\u{7acb}']), ('\u{2f75}', &['\u{7af9}']), ('\u{2f76}',
+        &['\u{7c73}']), ('\u{2f77}', &['\u{7cf8}']), ('\u{2f78}', &['\u{7f36}']), ('\u{2f79}',
+        &['\u{7f51}']), ('\u{2f7a}', &['\u{7f8a}']), ('\u{2f7b}', &['\u{7fbd}']), ('\u{2f7c}',
+        &['\u{8001}']), ('\u{2f7d}', &['\u{800c}']), ('\u{2f7e}', &['\u{8012}']), ('\u{2f7f}',
+        &['\u{8033}']), ('\u{2f80}', &['\u{807f}']), ('\u{2f81}', &['\u{8089}']), ('\u{2f82}',
+        &['\u{81e3}']), ('\u{2f83}', &['\u{81ea}']), ('\u{2f84}', &['\u{81f3}']), ('\u{2f85}',
+        &['\u{81fc}']), ('\u{2f86}', &['\u{820c}']), ('\u{2f87}', &['\u{821b}']), ('\u{2f88}',
+        &['\u{821f}']), ('\u{2f89}', &['\u{826e}']), ('\u{2f8a}', &['\u{8272}']), ('\u{2f8b}',
+        &['\u{8278}']), ('\u{2f8c}', &['\u{864d}']), ('\u{2f8d}', &['\u{866b}']), ('\u{2f8e}',
+        &['\u{8840}']), ('\u{2f8f}', &['\u{884c}']), ('\u{2f90}', &['\u{8863}']), ('\u{2f91}',
+        &['\u{897e}']), ('\u{2f92}', &['\u{898b}']), ('\u{2f93}', &['\u{89d2}']), ('\u{2f94}',
+        &['\u{8a00}']), ('\u{2f95}', &['\u{8c37}']), ('\u{2f96}', &['\u{8c46}']), ('\u{2f97}',
+        &['\u{8c55}']), ('\u{2f98}', &['\u{8c78}']), ('\u{2f99}', &['\u{8c9d}']), ('\u{2f9a}',
+        &['\u{8d64}']), ('\u{2f9b}', &['\u{8d70}']), ('\u{2f9c}', &['\u{8db3}']), ('\u{2f9d}',
+        &['\u{8eab}']), ('\u{2f9e}', &['\u{8eca}']), ('\u{2f9f}', &['\u{8f9b}']), ('\u{2fa0}',
+        &['\u{8fb0}']), ('\u{2fa1}', &['\u{8fb5}']), ('\u{2fa2}', &['\u{9091}']), ('\u{2fa3}',
+        &['\u{9149}']), ('\u{2fa4}', &['\u{91c6}']), ('\u{2fa5}', &['\u{91cc}']), ('\u{2fa6}',
+        &['\u{91d1}']), ('\u{2fa7}', &['\u{9577}']), ('\u{2fa8}', &['\u{9580}']), ('\u{2fa9}',
+        &['\u{961c}']), ('\u{2faa}', &['\u{96b6}']), ('\u{2fab}', &['\u{96b9}']), ('\u{2fac}',
+        &['\u{96e8}']), ('\u{2fad}', &['\u{9751}']), ('\u{2fae}', &['\u{975e}']), ('\u{2faf}',
+        &['\u{9762}']), ('\u{2fb0}', &['\u{9769}']), ('\u{2fb1}', &['\u{97cb}']), ('\u{2fb2}',
+        &['\u{97ed}']), ('\u{2fb3}', &['\u{97f3}']), ('\u{2fb4}', &['\u{9801}']), ('\u{2fb5}',
+        &['\u{98a8}']), ('\u{2fb6}', &['\u{98db}']), ('\u{2fb7}', &['\u{98df}']), ('\u{2fb8}',
+        &['\u{9996}']), ('\u{2fb9}', &['\u{9999}']), ('\u{2fba}', &['\u{99ac}']), ('\u{2fbb}',
+        &['\u{9aa8}']), ('\u{2fbc}', &['\u{9ad8}']), ('\u{2fbd}', &['\u{9adf}']), ('\u{2fbe}',
+        &['\u{9b25}']), ('\u{2fbf}', &['\u{9b2f}']), ('\u{2fc0}', &['\u{9b32}']), ('\u{2fc1}',
+        &['\u{9b3c}']), ('\u{2fc2}', &['\u{9b5a}']), ('\u{2fc3}', &['\u{9ce5}']), ('\u{2fc4}',
+        &['\u{9e75}']), ('\u{2fc5}', &['\u{9e7f}']), ('\u{2fc6}', &['\u{9ea5}']), ('\u{2fc7}',
+        &['\u{9ebb}']), ('\u{2fc8}', &['\u{9ec3}']), ('\u{2fc9}', &['\u{9ecd}']), ('\u{2fca}',
+        &['\u{9ed1}']), ('\u{2fcb}', &['\u{9ef9}']), ('\u{2fcc}', &['\u{9efd}']), ('\u{2fcd}',
+        &['\u{9f0e}']), ('\u{2fce}', &['\u{9f13}']), ('\u{2fcf}', &['\u{9f20}']), ('\u{2fd0}',
+        &['\u{9f3b}']), ('\u{2fd1}', &['\u{9f4a}']), ('\u{2fd2}', &['\u{9f52}']), ('\u{2fd3}',
+        &['\u{9f8d}']), ('\u{2fd4}', &['\u{9f9c}']), ('\u{2fd5}', &['\u{9fa0}']), ('\u{3000}',
+        &['\u{20}']), ('\u{3036}', &['\u{3012}']), ('\u{3038}', &['\u{5341}']), ('\u{3039}',
+        &['\u{5344}']), ('\u{303a}', &['\u{5345}']), ('\u{309b}', &['\u{20}', '\u{3099}']),
+        ('\u{309c}', &['\u{20}', '\u{309a}']), ('\u{309f}', &['\u{3088}', '\u{308a}']), ('\u{30ff}',
+        &['\u{30b3}', '\u{30c8}']), ('\u{3131}', &['\u{1100}']), ('\u{3132}', &['\u{1101}']),
+        ('\u{3133}', &['\u{11aa}']), ('\u{3134}', &['\u{1102}']), ('\u{3135}', &['\u{11ac}']),
+        ('\u{3136}', &['\u{11ad}']), ('\u{3137}', &['\u{1103}']), ('\u{3138}', &['\u{1104}']),
+        ('\u{3139}', &['\u{1105}']), ('\u{313a}', &['\u{11b0}']), ('\u{313b}', &['\u{11b1}']),
+        ('\u{313c}', &['\u{11b2}']), ('\u{313d}', &['\u{11b3}']), ('\u{313e}', &['\u{11b4}']),
+        ('\u{313f}', &['\u{11b5}']), ('\u{3140}', &['\u{111a}']), ('\u{3141}', &['\u{1106}']),
+        ('\u{3142}', &['\u{1107}']), ('\u{3143}', &['\u{1108}']), ('\u{3144}', &['\u{1121}']),
+        ('\u{3145}', &['\u{1109}']), ('\u{3146}', &['\u{110a}']), ('\u{3147}', &['\u{110b}']),
+        ('\u{3148}', &['\u{110c}']), ('\u{3149}', &['\u{110d}']), ('\u{314a}', &['\u{110e}']),
+        ('\u{314b}', &['\u{110f}']), ('\u{314c}', &['\u{1110}']), ('\u{314d}', &['\u{1111}']),
+        ('\u{314e}', &['\u{1112}']), ('\u{314f}', &['\u{1161}']), ('\u{3150}', &['\u{1162}']),
+        ('\u{3151}', &['\u{1163}']), ('\u{3152}', &['\u{1164}']), ('\u{3153}', &['\u{1165}']),
+        ('\u{3154}', &['\u{1166}']), ('\u{3155}', &['\u{1167}']), ('\u{3156}', &['\u{1168}']),
+        ('\u{3157}', &['\u{1169}']), ('\u{3158}', &['\u{116a}']), ('\u{3159}', &['\u{116b}']),
+        ('\u{315a}', &['\u{116c}']), ('\u{315b}', &['\u{116d}']), ('\u{315c}', &['\u{116e}']),
+        ('\u{315d}', &['\u{116f}']), ('\u{315e}', &['\u{1170}']), ('\u{315f}', &['\u{1171}']),
+        ('\u{3160}', &['\u{1172}']), ('\u{3161}', &['\u{1173}']), ('\u{3162}', &['\u{1174}']),
+        ('\u{3163}', &['\u{1175}']), ('\u{3164}', &['\u{1160}']), ('\u{3165}', &['\u{1114}']),
+        ('\u{3166}', &['\u{1115}']), ('\u{3167}', &['\u{11c7}']), ('\u{3168}', &['\u{11c8}']),
+        ('\u{3169}', &['\u{11cc}']), ('\u{316a}', &['\u{11ce}']), ('\u{316b}', &['\u{11d3}']),
+        ('\u{316c}', &['\u{11d7}']), ('\u{316d}', &['\u{11d9}']), ('\u{316e}', &['\u{111c}']),
+        ('\u{316f}', &['\u{11dd}']), ('\u{3170}', &['\u{11df}']), ('\u{3171}', &['\u{111d}']),
+        ('\u{3172}', &['\u{111e}']), ('\u{3173}', &['\u{1120}']), ('\u{3174}', &['\u{1122}']),
+        ('\u{3175}', &['\u{1123}']), ('\u{3176}', &['\u{1127}']), ('\u{3177}', &['\u{1129}']),
+        ('\u{3178}', &['\u{112b}']), ('\u{3179}', &['\u{112c}']), ('\u{317a}', &['\u{112d}']),
+        ('\u{317b}', &['\u{112e}']), ('\u{317c}', &['\u{112f}']), ('\u{317d}', &['\u{1132}']),
+        ('\u{317e}', &['\u{1136}']), ('\u{317f}', &['\u{1140}']), ('\u{3180}', &['\u{1147}']),
+        ('\u{3181}', &['\u{114c}']), ('\u{3182}', &['\u{11f1}']), ('\u{3183}', &['\u{11f2}']),
+        ('\u{3184}', &['\u{1157}']), ('\u{3185}', &['\u{1158}']), ('\u{3186}', &['\u{1159}']),
+        ('\u{3187}', &['\u{1184}']), ('\u{3188}', &['\u{1185}']), ('\u{3189}', &['\u{1188}']),
+        ('\u{318a}', &['\u{1191}']), ('\u{318b}', &['\u{1192}']), ('\u{318c}', &['\u{1194}']),
+        ('\u{318d}', &['\u{119e}']), ('\u{318e}', &['\u{11a1}']), ('\u{3192}', &['\u{4e00}']),
+        ('\u{3193}', &['\u{4e8c}']), ('\u{3194}', &['\u{4e09}']), ('\u{3195}', &['\u{56db}']),
+        ('\u{3196}', &['\u{4e0a}']), ('\u{3197}', &['\u{4e2d}']), ('\u{3198}', &['\u{4e0b}']),
+        ('\u{3199}', &['\u{7532}']), ('\u{319a}', &['\u{4e59}']), ('\u{319b}', &['\u{4e19}']),
+        ('\u{319c}', &['\u{4e01}']), ('\u{319d}', &['\u{5929}']), ('\u{319e}', &['\u{5730}']),
+        ('\u{319f}', &['\u{4eba}']), ('\u{3200}', &['\u{28}', '\u{1100}', '\u{29}']), ('\u{3201}',
+        &['\u{28}', '\u{1102}', '\u{29}']), ('\u{3202}', &['\u{28}', '\u{1103}', '\u{29}']),
+        ('\u{3203}', &['\u{28}', '\u{1105}', '\u{29}']), ('\u{3204}', &['\u{28}', '\u{1106}',
+        '\u{29}']), ('\u{3205}', &['\u{28}', '\u{1107}', '\u{29}']), ('\u{3206}', &['\u{28}',
+        '\u{1109}', '\u{29}']), ('\u{3207}', &['\u{28}', '\u{110b}', '\u{29}']), ('\u{3208}',
+        &['\u{28}', '\u{110c}', '\u{29}']), ('\u{3209}', &['\u{28}', '\u{110e}', '\u{29}']),
+        ('\u{320a}', &['\u{28}', '\u{110f}', '\u{29}']), ('\u{320b}', &['\u{28}', '\u{1110}',
+        '\u{29}']), ('\u{320c}', &['\u{28}', '\u{1111}', '\u{29}']), ('\u{320d}', &['\u{28}',
+        '\u{1112}', '\u{29}']), ('\u{320e}', &['\u{28}', '\u{1100}', '\u{1161}', '\u{29}']),
+        ('\u{320f}', &['\u{28}', '\u{1102}', '\u{1161}', '\u{29}']), ('\u{3210}', &['\u{28}',
+        '\u{1103}', '\u{1161}', '\u{29}']), ('\u{3211}', &['\u{28}', '\u{1105}', '\u{1161}',
+        '\u{29}']), ('\u{3212}', &['\u{28}', '\u{1106}', '\u{1161}', '\u{29}']), ('\u{3213}',
+        &['\u{28}', '\u{1107}', '\u{1161}', '\u{29}']), ('\u{3214}', &['\u{28}', '\u{1109}',
+        '\u{1161}', '\u{29}']), ('\u{3215}', &['\u{28}', '\u{110b}', '\u{1161}', '\u{29}']),
+        ('\u{3216}', &['\u{28}', '\u{110c}', '\u{1161}', '\u{29}']), ('\u{3217}', &['\u{28}',
+        '\u{110e}', '\u{1161}', '\u{29}']), ('\u{3218}', &['\u{28}', '\u{110f}', '\u{1161}',
+        '\u{29}']), ('\u{3219}', &['\u{28}', '\u{1110}', '\u{1161}', '\u{29}']), ('\u{321a}',
+        &['\u{28}', '\u{1111}', '\u{1161}', '\u{29}']), ('\u{321b}', &['\u{28}', '\u{1112}',
+        '\u{1161}', '\u{29}']), ('\u{321c}', &['\u{28}', '\u{110c}', '\u{116e}', '\u{29}']),
+        ('\u{321d}', &['\u{28}', '\u{110b}', '\u{1169}', '\u{110c}', '\u{1165}', '\u{11ab}',
+        '\u{29}']), ('\u{321e}', &['\u{28}', '\u{110b}', '\u{1169}', '\u{1112}', '\u{116e}',
+        '\u{29}']), ('\u{3220}', &['\u{28}', '\u{4e00}', '\u{29}']), ('\u{3221}', &['\u{28}',
+        '\u{4e8c}', '\u{29}']), ('\u{3222}', &['\u{28}', '\u{4e09}', '\u{29}']), ('\u{3223}',
+        &['\u{28}', '\u{56db}', '\u{29}']), ('\u{3224}', &['\u{28}', '\u{4e94}', '\u{29}']),
+        ('\u{3225}', &['\u{28}', '\u{516d}', '\u{29}']), ('\u{3226}', &['\u{28}', '\u{4e03}',
+        '\u{29}']), ('\u{3227}', &['\u{28}', '\u{516b}', '\u{29}']), ('\u{3228}', &['\u{28}',
+        '\u{4e5d}', '\u{29}']), ('\u{3229}', &['\u{28}', '\u{5341}', '\u{29}']), ('\u{322a}',
+        &['\u{28}', '\u{6708}', '\u{29}']), ('\u{322b}', &['\u{28}', '\u{706b}', '\u{29}']),
+        ('\u{322c}', &['\u{28}', '\u{6c34}', '\u{29}']), ('\u{322d}', &['\u{28}', '\u{6728}',
+        '\u{29}']), ('\u{322e}', &['\u{28}', '\u{91d1}', '\u{29}']), ('\u{322f}', &['\u{28}',
+        '\u{571f}', '\u{29}']), ('\u{3230}', &['\u{28}', '\u{65e5}', '\u{29}']), ('\u{3231}',
+        &['\u{28}', '\u{682a}', '\u{29}']), ('\u{3232}', &['\u{28}', '\u{6709}', '\u{29}']),
+        ('\u{3233}', &['\u{28}', '\u{793e}', '\u{29}']), ('\u{3234}', &['\u{28}', '\u{540d}',
+        '\u{29}']), ('\u{3235}', &['\u{28}', '\u{7279}', '\u{29}']), ('\u{3236}', &['\u{28}',
+        '\u{8ca1}', '\u{29}']), ('\u{3237}', &['\u{28}', '\u{795d}', '\u{29}']), ('\u{3238}',
+        &['\u{28}', '\u{52b4}', '\u{29}']), ('\u{3239}', &['\u{28}', '\u{4ee3}', '\u{29}']),
+        ('\u{323a}', &['\u{28}', '\u{547c}', '\u{29}']), ('\u{323b}', &['\u{28}', '\u{5b66}',
+        '\u{29}']), ('\u{323c}', &['\u{28}', '\u{76e3}', '\u{29}']), ('\u{323d}', &['\u{28}',
+        '\u{4f01}', '\u{29}']), ('\u{323e}', &['\u{28}', '\u{8cc7}', '\u{29}']), ('\u{323f}',
+        &['\u{28}', '\u{5354}', '\u{29}']), ('\u{3240}', &['\u{28}', '\u{796d}', '\u{29}']),
+        ('\u{3241}', &['\u{28}', '\u{4f11}', '\u{29}']), ('\u{3242}', &['\u{28}', '\u{81ea}',
+        '\u{29}']), ('\u{3243}', &['\u{28}', '\u{81f3}', '\u{29}']), ('\u{3244}', &['\u{554f}']),
+        ('\u{3245}', &['\u{5e7c}']), ('\u{3246}', &['\u{6587}']), ('\u{3247}', &['\u{7b8f}']),
+        ('\u{3250}', &['\u{50}', '\u{54}', '\u{45}']), ('\u{3251}', &['\u{32}', '\u{31}']),
+        ('\u{3252}', &['\u{32}', '\u{32}']), ('\u{3253}', &['\u{32}', '\u{33}']), ('\u{3254}',
+        &['\u{32}', '\u{34}']), ('\u{3255}', &['\u{32}', '\u{35}']), ('\u{3256}', &['\u{32}',
+        '\u{36}']), ('\u{3257}', &['\u{32}', '\u{37}']), ('\u{3258}', &['\u{32}', '\u{38}']),
+        ('\u{3259}', &['\u{32}', '\u{39}']), ('\u{325a}', &['\u{33}', '\u{30}']), ('\u{325b}',
+        &['\u{33}', '\u{31}']), ('\u{325c}', &['\u{33}', '\u{32}']), ('\u{325d}', &['\u{33}',
+        '\u{33}']), ('\u{325e}', &['\u{33}', '\u{34}']), ('\u{325f}', &['\u{33}', '\u{35}']),
+        ('\u{3260}', &['\u{1100}']), ('\u{3261}', &['\u{1102}']), ('\u{3262}', &['\u{1103}']),
+        ('\u{3263}', &['\u{1105}']), ('\u{3264}', &['\u{1106}']), ('\u{3265}', &['\u{1107}']),
+        ('\u{3266}', &['\u{1109}']), ('\u{3267}', &['\u{110b}']), ('\u{3268}', &['\u{110c}']),
+        ('\u{3269}', &['\u{110e}']), ('\u{326a}', &['\u{110f}']), ('\u{326b}', &['\u{1110}']),
+        ('\u{326c}', &['\u{1111}']), ('\u{326d}', &['\u{1112}']), ('\u{326e}', &['\u{1100}',
+        '\u{1161}']), ('\u{326f}', &['\u{1102}', '\u{1161}']), ('\u{3270}', &['\u{1103}',
+        '\u{1161}']), ('\u{3271}', &['\u{1105}', '\u{1161}']), ('\u{3272}', &['\u{1106}',
+        '\u{1161}']), ('\u{3273}', &['\u{1107}', '\u{1161}']), ('\u{3274}', &['\u{1109}',
+        '\u{1161}']), ('\u{3275}', &['\u{110b}', '\u{1161}']), ('\u{3276}', &['\u{110c}',
+        '\u{1161}']), ('\u{3277}', &['\u{110e}', '\u{1161}']), ('\u{3278}', &['\u{110f}',
+        '\u{1161}']), ('\u{3279}', &['\u{1110}', '\u{1161}']), ('\u{327a}', &['\u{1111}',
+        '\u{1161}']), ('\u{327b}', &['\u{1112}', '\u{1161}']), ('\u{327c}', &['\u{110e}',
+        '\u{1161}', '\u{11b7}', '\u{1100}', '\u{1169}']), ('\u{327d}', &['\u{110c}', '\u{116e}',
+        '\u{110b}', '\u{1174}']), ('\u{327e}', &['\u{110b}', '\u{116e}']), ('\u{3280}',
+        &['\u{4e00}']), ('\u{3281}', &['\u{4e8c}']), ('\u{3282}', &['\u{4e09}']), ('\u{3283}',
+        &['\u{56db}']), ('\u{3284}', &['\u{4e94}']), ('\u{3285}', &['\u{516d}']), ('\u{3286}',
+        &['\u{4e03}']), ('\u{3287}', &['\u{516b}']), ('\u{3288}', &['\u{4e5d}']), ('\u{3289}',
+        &['\u{5341}']), ('\u{328a}', &['\u{6708}']), ('\u{328b}', &['\u{706b}']), ('\u{328c}',
+        &['\u{6c34}']), ('\u{328d}', &['\u{6728}']), ('\u{328e}', &['\u{91d1}']), ('\u{328f}',
+        &['\u{571f}']), ('\u{3290}', &['\u{65e5}']), ('\u{3291}', &['\u{682a}']), ('\u{3292}',
+        &['\u{6709}']), ('\u{3293}', &['\u{793e}']), ('\u{3294}', &['\u{540d}']), ('\u{3295}',
+        &['\u{7279}']), ('\u{3296}', &['\u{8ca1}']), ('\u{3297}', &['\u{795d}']), ('\u{3298}',
+        &['\u{52b4}']), ('\u{3299}', &['\u{79d8}']), ('\u{329a}', &['\u{7537}']), ('\u{329b}',
+        &['\u{5973}']), ('\u{329c}', &['\u{9069}']), ('\u{329d}', &['\u{512a}']), ('\u{329e}',
+        &['\u{5370}']), ('\u{329f}', &['\u{6ce8}']), ('\u{32a0}', &['\u{9805}']), ('\u{32a1}',
+        &['\u{4f11}']), ('\u{32a2}', &['\u{5199}']), ('\u{32a3}', &['\u{6b63}']), ('\u{32a4}',
+        &['\u{4e0a}']), ('\u{32a5}', &['\u{4e2d}']), ('\u{32a6}', &['\u{4e0b}']), ('\u{32a7}',
+        &['\u{5de6}']), ('\u{32a8}', &['\u{53f3}']), ('\u{32a9}', &['\u{533b}']), ('\u{32aa}',
+        &['\u{5b97}']), ('\u{32ab}', &['\u{5b66}']), ('\u{32ac}', &['\u{76e3}']), ('\u{32ad}',
+        &['\u{4f01}']), ('\u{32ae}', &['\u{8cc7}']), ('\u{32af}', &['\u{5354}']), ('\u{32b0}',
+        &['\u{591c}']), ('\u{32b1}', &['\u{33}', '\u{36}']), ('\u{32b2}', &['\u{33}', '\u{37}']),
+        ('\u{32b3}', &['\u{33}', '\u{38}']), ('\u{32b4}', &['\u{33}', '\u{39}']), ('\u{32b5}',
+        &['\u{34}', '\u{30}']), ('\u{32b6}', &['\u{34}', '\u{31}']), ('\u{32b7}', &['\u{34}',
+        '\u{32}']), ('\u{32b8}', &['\u{34}', '\u{33}']), ('\u{32b9}', &['\u{34}', '\u{34}']),
+        ('\u{32ba}', &['\u{34}', '\u{35}']), ('\u{32bb}', &['\u{34}', '\u{36}']), ('\u{32bc}',
+        &['\u{34}', '\u{37}']), ('\u{32bd}', &['\u{34}', '\u{38}']), ('\u{32be}', &['\u{34}',
+        '\u{39}']), ('\u{32bf}', &['\u{35}', '\u{30}']), ('\u{32c0}', &['\u{31}', '\u{6708}']),
+        ('\u{32c1}', &['\u{32}', '\u{6708}']), ('\u{32c2}', &['\u{33}', '\u{6708}']), ('\u{32c3}',
+        &['\u{34}', '\u{6708}']), ('\u{32c4}', &['\u{35}', '\u{6708}']), ('\u{32c5}', &['\u{36}',
+        '\u{6708}']), ('\u{32c6}', &['\u{37}', '\u{6708}']), ('\u{32c7}', &['\u{38}', '\u{6708}']),
+        ('\u{32c8}', &['\u{39}', '\u{6708}']), ('\u{32c9}', &['\u{31}', '\u{30}', '\u{6708}']),
+        ('\u{32ca}', &['\u{31}', '\u{31}', '\u{6708}']), ('\u{32cb}', &['\u{31}', '\u{32}',
+        '\u{6708}']), ('\u{32cc}', &['\u{48}', '\u{67}']), ('\u{32cd}', &['\u{65}', '\u{72}',
+        '\u{67}']), ('\u{32ce}', &['\u{65}', '\u{56}']), ('\u{32cf}', &['\u{4c}', '\u{54}',
+        '\u{44}']), ('\u{32d0}', &['\u{30a2}']), ('\u{32d1}', &['\u{30a4}']), ('\u{32d2}',
+        &['\u{30a6}']), ('\u{32d3}', &['\u{30a8}']), ('\u{32d4}', &['\u{30aa}']), ('\u{32d5}',
+        &['\u{30ab}']), ('\u{32d6}', &['\u{30ad}']), ('\u{32d7}', &['\u{30af}']), ('\u{32d8}',
+        &['\u{30b1}']), ('\u{32d9}', &['\u{30b3}']), ('\u{32da}', &['\u{30b5}']), ('\u{32db}',
+        &['\u{30b7}']), ('\u{32dc}', &['\u{30b9}']), ('\u{32dd}', &['\u{30bb}']), ('\u{32de}',
+        &['\u{30bd}']), ('\u{32df}', &['\u{30bf}']), ('\u{32e0}', &['\u{30c1}']), ('\u{32e1}',
+        &['\u{30c4}']), ('\u{32e2}', &['\u{30c6}']), ('\u{32e3}', &['\u{30c8}']), ('\u{32e4}',
+        &['\u{30ca}']), ('\u{32e5}', &['\u{30cb}']), ('\u{32e6}', &['\u{30cc}']), ('\u{32e7}',
+        &['\u{30cd}']), ('\u{32e8}', &['\u{30ce}']), ('\u{32e9}', &['\u{30cf}']), ('\u{32ea}',
+        &['\u{30d2}']), ('\u{32eb}', &['\u{30d5}']), ('\u{32ec}', &['\u{30d8}']), ('\u{32ed}',
+        &['\u{30db}']), ('\u{32ee}', &['\u{30de}']), ('\u{32ef}', &['\u{30df}']), ('\u{32f0}',
+        &['\u{30e0}']), ('\u{32f1}', &['\u{30e1}']), ('\u{32f2}', &['\u{30e2}']), ('\u{32f3}',
+        &['\u{30e4}']), ('\u{32f4}', &['\u{30e6}']), ('\u{32f5}', &['\u{30e8}']), ('\u{32f6}',
+        &['\u{30e9}']), ('\u{32f7}', &['\u{30ea}']), ('\u{32f8}', &['\u{30eb}']), ('\u{32f9}',
+        &['\u{30ec}']), ('\u{32fa}', &['\u{30ed}']), ('\u{32fb}', &['\u{30ef}']), ('\u{32fc}',
+        &['\u{30f0}']), ('\u{32fd}', &['\u{30f1}']), ('\u{32fe}', &['\u{30f2}']), ('\u{3300}',
+        &['\u{30a2}', '\u{30d1}', '\u{30fc}', '\u{30c8}']), ('\u{3301}', &['\u{30a2}', '\u{30eb}',
+        '\u{30d5}', '\u{30a1}']), ('\u{3302}', &['\u{30a2}', '\u{30f3}', '\u{30da}', '\u{30a2}']),
+        ('\u{3303}', &['\u{30a2}', '\u{30fc}', '\u{30eb}']), ('\u{3304}', &['\u{30a4}', '\u{30cb}',
+        '\u{30f3}', '\u{30b0}']), ('\u{3305}', &['\u{30a4}', '\u{30f3}', '\u{30c1}']), ('\u{3306}',
+        &['\u{30a6}', '\u{30a9}', '\u{30f3}']), ('\u{3307}', &['\u{30a8}', '\u{30b9}', '\u{30af}',
+        '\u{30fc}', '\u{30c9}']), ('\u{3308}', &['\u{30a8}', '\u{30fc}', '\u{30ab}', '\u{30fc}']),
+        ('\u{3309}', &['\u{30aa}', '\u{30f3}', '\u{30b9}']), ('\u{330a}', &['\u{30aa}', '\u{30fc}',
+        '\u{30e0}']), ('\u{330b}', &['\u{30ab}', '\u{30a4}', '\u{30ea}']), ('\u{330c}',
+        &['\u{30ab}', '\u{30e9}', '\u{30c3}', '\u{30c8}']), ('\u{330d}', &['\u{30ab}', '\u{30ed}',
+        '\u{30ea}', '\u{30fc}']), ('\u{330e}', &['\u{30ac}', '\u{30ed}', '\u{30f3}']), ('\u{330f}',
+        &['\u{30ac}', '\u{30f3}', '\u{30de}']), ('\u{3310}', &['\u{30ae}', '\u{30ac}']),
+        ('\u{3311}', &['\u{30ae}', '\u{30cb}', '\u{30fc}']), ('\u{3312}', &['\u{30ad}', '\u{30e5}',
+        '\u{30ea}', '\u{30fc}']), ('\u{3313}', &['\u{30ae}', '\u{30eb}', '\u{30c0}', '\u{30fc}']),
+        ('\u{3314}', &['\u{30ad}', '\u{30ed}']), ('\u{3315}', &['\u{30ad}', '\u{30ed}', '\u{30b0}',
+        '\u{30e9}', '\u{30e0}']), ('\u{3316}', &['\u{30ad}', '\u{30ed}', '\u{30e1}', '\u{30fc}',
+        '\u{30c8}', '\u{30eb}']), ('\u{3317}', &['\u{30ad}', '\u{30ed}', '\u{30ef}', '\u{30c3}',
+        '\u{30c8}']), ('\u{3318}', &['\u{30b0}', '\u{30e9}', '\u{30e0}']), ('\u{3319}',
+        &['\u{30b0}', '\u{30e9}', '\u{30e0}', '\u{30c8}', '\u{30f3}']), ('\u{331a}', &['\u{30af}',
+        '\u{30eb}', '\u{30bc}', '\u{30a4}', '\u{30ed}']), ('\u{331b}', &['\u{30af}', '\u{30ed}',
+        '\u{30fc}', '\u{30cd}']), ('\u{331c}', &['\u{30b1}', '\u{30fc}', '\u{30b9}']), ('\u{331d}',
+        &['\u{30b3}', '\u{30eb}', '\u{30ca}']), ('\u{331e}', &['\u{30b3}', '\u{30fc}', '\u{30dd}']),
+        ('\u{331f}', &['\u{30b5}', '\u{30a4}', '\u{30af}', '\u{30eb}']), ('\u{3320}', &['\u{30b5}',
+        '\u{30f3}', '\u{30c1}', '\u{30fc}', '\u{30e0}']), ('\u{3321}', &['\u{30b7}', '\u{30ea}',
+        '\u{30f3}', '\u{30b0}']), ('\u{3322}', &['\u{30bb}', '\u{30f3}', '\u{30c1}']), ('\u{3323}',
+        &['\u{30bb}', '\u{30f3}', '\u{30c8}']), ('\u{3324}', &['\u{30c0}', '\u{30fc}', '\u{30b9}']),
+        ('\u{3325}', &['\u{30c7}', '\u{30b7}']), ('\u{3326}', &['\u{30c9}', '\u{30eb}']),
+        ('\u{3327}', &['\u{30c8}', '\u{30f3}']), ('\u{3328}', &['\u{30ca}', '\u{30ce}']),
+        ('\u{3329}', &['\u{30ce}', '\u{30c3}', '\u{30c8}']), ('\u{332a}', &['\u{30cf}', '\u{30a4}',
+        '\u{30c4}']), ('\u{332b}', &['\u{30d1}', '\u{30fc}', '\u{30bb}', '\u{30f3}', '\u{30c8}']),
+        ('\u{332c}', &['\u{30d1}', '\u{30fc}', '\u{30c4}']), ('\u{332d}', &['\u{30d0}', '\u{30fc}',
+        '\u{30ec}', '\u{30eb}']), ('\u{332e}', &['\u{30d4}', '\u{30a2}', '\u{30b9}', '\u{30c8}',
+        '\u{30eb}']), ('\u{332f}', &['\u{30d4}', '\u{30af}', '\u{30eb}']), ('\u{3330}',
+        &['\u{30d4}', '\u{30b3}']), ('\u{3331}', &['\u{30d3}', '\u{30eb}']), ('\u{3332}',
+        &['\u{30d5}', '\u{30a1}', '\u{30e9}', '\u{30c3}', '\u{30c9}']), ('\u{3333}', &['\u{30d5}',
+        '\u{30a3}', '\u{30fc}', '\u{30c8}']), ('\u{3334}', &['\u{30d6}', '\u{30c3}', '\u{30b7}',
+        '\u{30a7}', '\u{30eb}']), ('\u{3335}', &['\u{30d5}', '\u{30e9}', '\u{30f3}']), ('\u{3336}',
+        &['\u{30d8}', '\u{30af}', '\u{30bf}', '\u{30fc}', '\u{30eb}']), ('\u{3337}', &['\u{30da}',
+        '\u{30bd}']), ('\u{3338}', &['\u{30da}', '\u{30cb}', '\u{30d2}']), ('\u{3339}',
+        &['\u{30d8}', '\u{30eb}', '\u{30c4}']), ('\u{333a}', &['\u{30da}', '\u{30f3}', '\u{30b9}']),
+        ('\u{333b}', &['\u{30da}', '\u{30fc}', '\u{30b8}']), ('\u{333c}', &['\u{30d9}', '\u{30fc}',
+        '\u{30bf}']), ('\u{333d}', &['\u{30dd}', '\u{30a4}', '\u{30f3}', '\u{30c8}']), ('\u{333e}',
+        &['\u{30dc}', '\u{30eb}', '\u{30c8}']), ('\u{333f}', &['\u{30db}', '\u{30f3}']),
+        ('\u{3340}', &['\u{30dd}', '\u{30f3}', '\u{30c9}']), ('\u{3341}', &['\u{30db}', '\u{30fc}',
+        '\u{30eb}']), ('\u{3342}', &['\u{30db}', '\u{30fc}', '\u{30f3}']), ('\u{3343}',
+        &['\u{30de}', '\u{30a4}', '\u{30af}', '\u{30ed}']), ('\u{3344}', &['\u{30de}', '\u{30a4}',
+        '\u{30eb}']), ('\u{3345}', &['\u{30de}', '\u{30c3}', '\u{30cf}']), ('\u{3346}',
+        &['\u{30de}', '\u{30eb}', '\u{30af}']), ('\u{3347}', &['\u{30de}', '\u{30f3}', '\u{30b7}',
+        '\u{30e7}', '\u{30f3}']), ('\u{3348}', &['\u{30df}', '\u{30af}', '\u{30ed}', '\u{30f3}']),
+        ('\u{3349}', &['\u{30df}', '\u{30ea}']), ('\u{334a}', &['\u{30df}', '\u{30ea}', '\u{30d0}',
+        '\u{30fc}', '\u{30eb}']), ('\u{334b}', &['\u{30e1}', '\u{30ac}']), ('\u{334c}',
+        &['\u{30e1}', '\u{30ac}', '\u{30c8}', '\u{30f3}']), ('\u{334d}', &['\u{30e1}', '\u{30fc}',
+        '\u{30c8}', '\u{30eb}']), ('\u{334e}', &['\u{30e4}', '\u{30fc}', '\u{30c9}']), ('\u{334f}',
+        &['\u{30e4}', '\u{30fc}', '\u{30eb}']), ('\u{3350}', &['\u{30e6}', '\u{30a2}', '\u{30f3}']),
+        ('\u{3351}', &['\u{30ea}', '\u{30c3}', '\u{30c8}', '\u{30eb}']), ('\u{3352}', &['\u{30ea}',
+        '\u{30e9}']), ('\u{3353}', &['\u{30eb}', '\u{30d4}', '\u{30fc}']), ('\u{3354}',
+        &['\u{30eb}', '\u{30fc}', '\u{30d6}', '\u{30eb}']), ('\u{3355}', &['\u{30ec}', '\u{30e0}']),
+        ('\u{3356}', &['\u{30ec}', '\u{30f3}', '\u{30c8}', '\u{30b2}', '\u{30f3}']), ('\u{3357}',
+        &['\u{30ef}', '\u{30c3}', '\u{30c8}']), ('\u{3358}', &['\u{30}', '\u{70b9}']), ('\u{3359}',
+        &['\u{31}', '\u{70b9}']), ('\u{335a}', &['\u{32}', '\u{70b9}']), ('\u{335b}', &['\u{33}',
+        '\u{70b9}']), ('\u{335c}', &['\u{34}', '\u{70b9}']), ('\u{335d}', &['\u{35}', '\u{70b9}']),
+        ('\u{335e}', &['\u{36}', '\u{70b9}']), ('\u{335f}', &['\u{37}', '\u{70b9}']), ('\u{3360}',
+        &['\u{38}', '\u{70b9}']), ('\u{3361}', &['\u{39}', '\u{70b9}']), ('\u{3362}', &['\u{31}',
+        '\u{30}', '\u{70b9}']), ('\u{3363}', &['\u{31}', '\u{31}', '\u{70b9}']), ('\u{3364}',
+        &['\u{31}', '\u{32}', '\u{70b9}']), ('\u{3365}', &['\u{31}', '\u{33}', '\u{70b9}']),
+        ('\u{3366}', &['\u{31}', '\u{34}', '\u{70b9}']), ('\u{3367}', &['\u{31}', '\u{35}',
+        '\u{70b9}']), ('\u{3368}', &['\u{31}', '\u{36}', '\u{70b9}']), ('\u{3369}', &['\u{31}',
+        '\u{37}', '\u{70b9}']), ('\u{336a}', &['\u{31}', '\u{38}', '\u{70b9}']), ('\u{336b}',
+        &['\u{31}', '\u{39}', '\u{70b9}']), ('\u{336c}', &['\u{32}', '\u{30}', '\u{70b9}']),
+        ('\u{336d}', &['\u{32}', '\u{31}', '\u{70b9}']), ('\u{336e}', &['\u{32}', '\u{32}',
+        '\u{70b9}']), ('\u{336f}', &['\u{32}', '\u{33}', '\u{70b9}']), ('\u{3370}', &['\u{32}',
+        '\u{34}', '\u{70b9}']), ('\u{3371}', &['\u{68}', '\u{50}', '\u{61}']), ('\u{3372}',
+        &['\u{64}', '\u{61}']), ('\u{3373}', &['\u{41}', '\u{55}']), ('\u{3374}', &['\u{62}',
+        '\u{61}', '\u{72}']), ('\u{3375}', &['\u{6f}', '\u{56}']), ('\u{3376}', &['\u{70}',
+        '\u{63}']), ('\u{3377}', &['\u{64}', '\u{6d}']), ('\u{3378}', &['\u{64}', '\u{6d}',
+        '\u{b2}']), ('\u{3379}', &['\u{64}', '\u{6d}', '\u{b3}']), ('\u{337a}', &['\u{49}',
+        '\u{55}']), ('\u{337b}', &['\u{5e73}', '\u{6210}']), ('\u{337c}', &['\u{662d}',
+        '\u{548c}']), ('\u{337d}', &['\u{5927}', '\u{6b63}']), ('\u{337e}', &['\u{660e}',
+        '\u{6cbb}']), ('\u{337f}', &['\u{682a}', '\u{5f0f}', '\u{4f1a}', '\u{793e}']), ('\u{3380}',
+        &['\u{70}', '\u{41}']), ('\u{3381}', &['\u{6e}', '\u{41}']), ('\u{3382}', &['\u{3bc}',
+        '\u{41}']), ('\u{3383}', &['\u{6d}', '\u{41}']), ('\u{3384}', &['\u{6b}', '\u{41}']),
+        ('\u{3385}', &['\u{4b}', '\u{42}']), ('\u{3386}', &['\u{4d}', '\u{42}']), ('\u{3387}',
+        &['\u{47}', '\u{42}']), ('\u{3388}', &['\u{63}', '\u{61}', '\u{6c}']), ('\u{3389}',
+        &['\u{6b}', '\u{63}', '\u{61}', '\u{6c}']), ('\u{338a}', &['\u{70}', '\u{46}']),
+        ('\u{338b}', &['\u{6e}', '\u{46}']), ('\u{338c}', &['\u{3bc}', '\u{46}']), ('\u{338d}',
+        &['\u{3bc}', '\u{67}']), ('\u{338e}', &['\u{6d}', '\u{67}']), ('\u{338f}', &['\u{6b}',
+        '\u{67}']), ('\u{3390}', &['\u{48}', '\u{7a}']), ('\u{3391}', &['\u{6b}', '\u{48}',
+        '\u{7a}']), ('\u{3392}', &['\u{4d}', '\u{48}', '\u{7a}']), ('\u{3393}', &['\u{47}',
+        '\u{48}', '\u{7a}']), ('\u{3394}', &['\u{54}', '\u{48}', '\u{7a}']), ('\u{3395}',
+        &['\u{3bc}', '\u{2113}']), ('\u{3396}', &['\u{6d}', '\u{2113}']), ('\u{3397}', &['\u{64}',
+        '\u{2113}']), ('\u{3398}', &['\u{6b}', '\u{2113}']), ('\u{3399}', &['\u{66}', '\u{6d}']),
+        ('\u{339a}', &['\u{6e}', '\u{6d}']), ('\u{339b}', &['\u{3bc}', '\u{6d}']), ('\u{339c}',
+        &['\u{6d}', '\u{6d}']), ('\u{339d}', &['\u{63}', '\u{6d}']), ('\u{339e}', &['\u{6b}',
+        '\u{6d}']), ('\u{339f}', &['\u{6d}', '\u{6d}', '\u{b2}']), ('\u{33a0}', &['\u{63}',
+        '\u{6d}', '\u{b2}']), ('\u{33a1}', &['\u{6d}', '\u{b2}']), ('\u{33a2}', &['\u{6b}',
+        '\u{6d}', '\u{b2}']), ('\u{33a3}', &['\u{6d}', '\u{6d}', '\u{b3}']), ('\u{33a4}',
+        &['\u{63}', '\u{6d}', '\u{b3}']), ('\u{33a5}', &['\u{6d}', '\u{b3}']), ('\u{33a6}',
+        &['\u{6b}', '\u{6d}', '\u{b3}']), ('\u{33a7}', &['\u{6d}', '\u{2215}', '\u{73}']),
+        ('\u{33a8}', &['\u{6d}', '\u{2215}', '\u{73}', '\u{b2}']), ('\u{33a9}', &['\u{50}',
+        '\u{61}']), ('\u{33aa}', &['\u{6b}', '\u{50}', '\u{61}']), ('\u{33ab}', &['\u{4d}',
+        '\u{50}', '\u{61}']), ('\u{33ac}', &['\u{47}', '\u{50}', '\u{61}']), ('\u{33ad}',
+        &['\u{72}', '\u{61}', '\u{64}']), ('\u{33ae}', &['\u{72}', '\u{61}', '\u{64}', '\u{2215}',
+        '\u{73}']), ('\u{33af}', &['\u{72}', '\u{61}', '\u{64}', '\u{2215}', '\u{73}', '\u{b2}']),
+        ('\u{33b0}', &['\u{70}', '\u{73}']), ('\u{33b1}', &['\u{6e}', '\u{73}']), ('\u{33b2}',
+        &['\u{3bc}', '\u{73}']), ('\u{33b3}', &['\u{6d}', '\u{73}']), ('\u{33b4}', &['\u{70}',
+        '\u{56}']), ('\u{33b5}', &['\u{6e}', '\u{56}']), ('\u{33b6}', &['\u{3bc}', '\u{56}']),
+        ('\u{33b7}', &['\u{6d}', '\u{56}']), ('\u{33b8}', &['\u{6b}', '\u{56}']), ('\u{33b9}',
+        &['\u{4d}', '\u{56}']), ('\u{33ba}', &['\u{70}', '\u{57}']), ('\u{33bb}', &['\u{6e}',
+        '\u{57}']), ('\u{33bc}', &['\u{3bc}', '\u{57}']), ('\u{33bd}', &['\u{6d}', '\u{57}']),
+        ('\u{33be}', &['\u{6b}', '\u{57}']), ('\u{33bf}', &['\u{4d}', '\u{57}']), ('\u{33c0}',
+        &['\u{6b}', '\u{3a9}']), ('\u{33c1}', &['\u{4d}', '\u{3a9}']), ('\u{33c2}', &['\u{61}',
+        '\u{2e}', '\u{6d}', '\u{2e}']), ('\u{33c3}', &['\u{42}', '\u{71}']), ('\u{33c4}',
+        &['\u{63}', '\u{63}']), ('\u{33c5}', &['\u{63}', '\u{64}']), ('\u{33c6}', &['\u{43}',
+        '\u{2215}', '\u{6b}', '\u{67}']), ('\u{33c7}', &['\u{43}', '\u{6f}', '\u{2e}']),
+        ('\u{33c8}', &['\u{64}', '\u{42}']), ('\u{33c9}', &['\u{47}', '\u{79}']), ('\u{33ca}',
+        &['\u{68}', '\u{61}']), ('\u{33cb}', &['\u{48}', '\u{50}']), ('\u{33cc}', &['\u{69}',
+        '\u{6e}']), ('\u{33cd}', &['\u{4b}', '\u{4b}']), ('\u{33ce}', &['\u{4b}', '\u{4d}']),
+        ('\u{33cf}', &['\u{6b}', '\u{74}']), ('\u{33d0}', &['\u{6c}', '\u{6d}']), ('\u{33d1}',
+        &['\u{6c}', '\u{6e}']), ('\u{33d2}', &['\u{6c}', '\u{6f}', '\u{67}']), ('\u{33d3}',
+        &['\u{6c}', '\u{78}']), ('\u{33d4}', &['\u{6d}', '\u{62}']), ('\u{33d5}', &['\u{6d}',
+        '\u{69}', '\u{6c}']), ('\u{33d6}', &['\u{6d}', '\u{6f}', '\u{6c}']), ('\u{33d7}',
+        &['\u{50}', '\u{48}']), ('\u{33d8}', &['\u{70}', '\u{2e}', '\u{6d}', '\u{2e}']),
+        ('\u{33d9}', &['\u{50}', '\u{50}', '\u{4d}']), ('\u{33da}', &['\u{50}', '\u{52}']),
+        ('\u{33db}', &['\u{73}', '\u{72}']), ('\u{33dc}', &['\u{53}', '\u{76}']), ('\u{33dd}',
+        &['\u{57}', '\u{62}']), ('\u{33de}', &['\u{56}', '\u{2215}', '\u{6d}']), ('\u{33df}',
+        &['\u{41}', '\u{2215}', '\u{6d}']), ('\u{33e0}', &['\u{31}', '\u{65e5}']), ('\u{33e1}',
+        &['\u{32}', '\u{65e5}']), ('\u{33e2}', &['\u{33}', '\u{65e5}']), ('\u{33e3}', &['\u{34}',
+        '\u{65e5}']), ('\u{33e4}', &['\u{35}', '\u{65e5}']), ('\u{33e5}', &['\u{36}', '\u{65e5}']),
+        ('\u{33e6}', &['\u{37}', '\u{65e5}']), ('\u{33e7}', &['\u{38}', '\u{65e5}']), ('\u{33e8}',
+        &['\u{39}', '\u{65e5}']), ('\u{33e9}', &['\u{31}', '\u{30}', '\u{65e5}']), ('\u{33ea}',
+        &['\u{31}', '\u{31}', '\u{65e5}']), ('\u{33eb}', &['\u{31}', '\u{32}', '\u{65e5}']),
+        ('\u{33ec}', &['\u{31}', '\u{33}', '\u{65e5}']), ('\u{33ed}', &['\u{31}', '\u{34}',
+        '\u{65e5}']), ('\u{33ee}', &['\u{31}', '\u{35}', '\u{65e5}']), ('\u{33ef}', &['\u{31}',
+        '\u{36}', '\u{65e5}']), ('\u{33f0}', &['\u{31}', '\u{37}', '\u{65e5}']), ('\u{33f1}',
+        &['\u{31}', '\u{38}', '\u{65e5}']), ('\u{33f2}', &['\u{31}', '\u{39}', '\u{65e5}']),
+        ('\u{33f3}', &['\u{32}', '\u{30}', '\u{65e5}']), ('\u{33f4}', &['\u{32}', '\u{31}',
+        '\u{65e5}']), ('\u{33f5}', &['\u{32}', '\u{32}', '\u{65e5}']), ('\u{33f6}', &['\u{32}',
+        '\u{33}', '\u{65e5}']), ('\u{33f7}', &['\u{32}', '\u{34}', '\u{65e5}']), ('\u{33f8}',
+        &['\u{32}', '\u{35}', '\u{65e5}']), ('\u{33f9}', &['\u{32}', '\u{36}', '\u{65e5}']),
+        ('\u{33fa}', &['\u{32}', '\u{37}', '\u{65e5}']), ('\u{33fb}', &['\u{32}', '\u{38}',
+        '\u{65e5}']), ('\u{33fc}', &['\u{32}', '\u{39}', '\u{65e5}']), ('\u{33fd}', &['\u{33}',
+        '\u{30}', '\u{65e5}']), ('\u{33fe}', &['\u{33}', '\u{31}', '\u{65e5}']), ('\u{33ff}',
+        &['\u{67}', '\u{61}', '\u{6c}']), ('\u{a69c}', &['\u{44a}']), ('\u{a69d}', &['\u{44c}']),
+        ('\u{a770}', &['\u{a76f}']), ('\u{a7f8}', &['\u{126}']), ('\u{a7f9}', &['\u{153}']),
+        ('\u{ab5c}', &['\u{a727}']), ('\u{ab5d}', &['\u{ab37}']), ('\u{ab5e}', &['\u{26b}']),
+        ('\u{ab5f}', &['\u{ab52}']), ('\u{fb00}', &['\u{66}', '\u{66}']), ('\u{fb01}', &['\u{66}',
+        '\u{69}']), ('\u{fb02}', &['\u{66}', '\u{6c}']), ('\u{fb03}', &['\u{66}', '\u{66}',
+        '\u{69}']), ('\u{fb04}', &['\u{66}', '\u{66}', '\u{6c}']), ('\u{fb05}', &['\u{17f}',
+        '\u{74}']), ('\u{fb06}', &['\u{73}', '\u{74}']), ('\u{fb13}', &['\u{574}', '\u{576}']),
+        ('\u{fb14}', &['\u{574}', '\u{565}']), ('\u{fb15}', &['\u{574}', '\u{56b}']), ('\u{fb16}',
+        &['\u{57e}', '\u{576}']), ('\u{fb17}', &['\u{574}', '\u{56d}']), ('\u{fb20}', &['\u{5e2}']),
+        ('\u{fb21}', &['\u{5d0}']), ('\u{fb22}', &['\u{5d3}']), ('\u{fb23}', &['\u{5d4}']),
+        ('\u{fb24}', &['\u{5db}']), ('\u{fb25}', &['\u{5dc}']), ('\u{fb26}', &['\u{5dd}']),
+        ('\u{fb27}', &['\u{5e8}']), ('\u{fb28}', &['\u{5ea}']), ('\u{fb29}', &['\u{2b}']),
+        ('\u{fb4f}', &['\u{5d0}', '\u{5dc}']), ('\u{fb50}', &['\u{671}']), ('\u{fb51}',
+        &['\u{671}']), ('\u{fb52}', &['\u{67b}']), ('\u{fb53}', &['\u{67b}']), ('\u{fb54}',
+        &['\u{67b}']), ('\u{fb55}', &['\u{67b}']), ('\u{fb56}', &['\u{67e}']), ('\u{fb57}',
+        &['\u{67e}']), ('\u{fb58}', &['\u{67e}']), ('\u{fb59}', &['\u{67e}']), ('\u{fb5a}',
+        &['\u{680}']), ('\u{fb5b}', &['\u{680}']), ('\u{fb5c}', &['\u{680}']), ('\u{fb5d}',
+        &['\u{680}']), ('\u{fb5e}', &['\u{67a}']), ('\u{fb5f}', &['\u{67a}']), ('\u{fb60}',
+        &['\u{67a}']), ('\u{fb61}', &['\u{67a}']), ('\u{fb62}', &['\u{67f}']), ('\u{fb63}',
+        &['\u{67f}']), ('\u{fb64}', &['\u{67f}']), ('\u{fb65}', &['\u{67f}']), ('\u{fb66}',
+        &['\u{679}']), ('\u{fb67}', &['\u{679}']), ('\u{fb68}', &['\u{679}']), ('\u{fb69}',
+        &['\u{679}']), ('\u{fb6a}', &['\u{6a4}']), ('\u{fb6b}', &['\u{6a4}']), ('\u{fb6c}',
+        &['\u{6a4}']), ('\u{fb6d}', &['\u{6a4}']), ('\u{fb6e}', &['\u{6a6}']), ('\u{fb6f}',
+        &['\u{6a6}']), ('\u{fb70}', &['\u{6a6}']), ('\u{fb71}', &['\u{6a6}']), ('\u{fb72}',
+        &['\u{684}']), ('\u{fb73}', &['\u{684}']), ('\u{fb74}', &['\u{684}']), ('\u{fb75}',
+        &['\u{684}']), ('\u{fb76}', &['\u{683}']), ('\u{fb77}', &['\u{683}']), ('\u{fb78}',
+        &['\u{683}']), ('\u{fb79}', &['\u{683}']), ('\u{fb7a}', &['\u{686}']), ('\u{fb7b}',
+        &['\u{686}']), ('\u{fb7c}', &['\u{686}']), ('\u{fb7d}', &['\u{686}']), ('\u{fb7e}',
+        &['\u{687}']), ('\u{fb7f}', &['\u{687}']), ('\u{fb80}', &['\u{687}']), ('\u{fb81}',
+        &['\u{687}']), ('\u{fb82}', &['\u{68d}']), ('\u{fb83}', &['\u{68d}']), ('\u{fb84}',
+        &['\u{68c}']), ('\u{fb85}', &['\u{68c}']), ('\u{fb86}', &['\u{68e}']), ('\u{fb87}',
+        &['\u{68e}']), ('\u{fb88}', &['\u{688}']), ('\u{fb89}', &['\u{688}']), ('\u{fb8a}',
+        &['\u{698}']), ('\u{fb8b}', &['\u{698}']), ('\u{fb8c}', &['\u{691}']), ('\u{fb8d}',
+        &['\u{691}']), ('\u{fb8e}', &['\u{6a9}']), ('\u{fb8f}', &['\u{6a9}']), ('\u{fb90}',
+        &['\u{6a9}']), ('\u{fb91}', &['\u{6a9}']), ('\u{fb92}', &['\u{6af}']), ('\u{fb93}',
+        &['\u{6af}']), ('\u{fb94}', &['\u{6af}']), ('\u{fb95}', &['\u{6af}']), ('\u{fb96}',
+        &['\u{6b3}']), ('\u{fb97}', &['\u{6b3}']), ('\u{fb98}', &['\u{6b3}']), ('\u{fb99}',
+        &['\u{6b3}']), ('\u{fb9a}', &['\u{6b1}']), ('\u{fb9b}', &['\u{6b1}']), ('\u{fb9c}',
+        &['\u{6b1}']), ('\u{fb9d}', &['\u{6b1}']), ('\u{fb9e}', &['\u{6ba}']), ('\u{fb9f}',
+        &['\u{6ba}']), ('\u{fba0}', &['\u{6bb}']), ('\u{fba1}', &['\u{6bb}']), ('\u{fba2}',
+        &['\u{6bb}']), ('\u{fba3}', &['\u{6bb}']), ('\u{fba4}', &['\u{6c0}']), ('\u{fba5}',
+        &['\u{6c0}']), ('\u{fba6}', &['\u{6c1}']), ('\u{fba7}', &['\u{6c1}']), ('\u{fba8}',
+        &['\u{6c1}']), ('\u{fba9}', &['\u{6c1}']), ('\u{fbaa}', &['\u{6be}']), ('\u{fbab}',
+        &['\u{6be}']), ('\u{fbac}', &['\u{6be}']), ('\u{fbad}', &['\u{6be}']), ('\u{fbae}',
+        &['\u{6d2}']), ('\u{fbaf}', &['\u{6d2}']), ('\u{fbb0}', &['\u{6d3}']), ('\u{fbb1}',
+        &['\u{6d3}']), ('\u{fbd3}', &['\u{6ad}']), ('\u{fbd4}', &['\u{6ad}']), ('\u{fbd5}',
+        &['\u{6ad}']), ('\u{fbd6}', &['\u{6ad}']), ('\u{fbd7}', &['\u{6c7}']), ('\u{fbd8}',
+        &['\u{6c7}']), ('\u{fbd9}', &['\u{6c6}']), ('\u{fbda}', &['\u{6c6}']), ('\u{fbdb}',
+        &['\u{6c8}']), ('\u{fbdc}', &['\u{6c8}']), ('\u{fbdd}', &['\u{677}']), ('\u{fbde}',
+        &['\u{6cb}']), ('\u{fbdf}', &['\u{6cb}']), ('\u{fbe0}', &['\u{6c5}']), ('\u{fbe1}',
+        &['\u{6c5}']), ('\u{fbe2}', &['\u{6c9}']), ('\u{fbe3}', &['\u{6c9}']), ('\u{fbe4}',
+        &['\u{6d0}']), ('\u{fbe5}', &['\u{6d0}']), ('\u{fbe6}', &['\u{6d0}']), ('\u{fbe7}',
+        &['\u{6d0}']), ('\u{fbe8}', &['\u{649}']), ('\u{fbe9}', &['\u{649}']), ('\u{fbea}',
+        &['\u{626}', '\u{627}']), ('\u{fbeb}', &['\u{626}', '\u{627}']), ('\u{fbec}', &['\u{626}',
+        '\u{6d5}']), ('\u{fbed}', &['\u{626}', '\u{6d5}']), ('\u{fbee}', &['\u{626}', '\u{648}']),
+        ('\u{fbef}', &['\u{626}', '\u{648}']), ('\u{fbf0}', &['\u{626}', '\u{6c7}']), ('\u{fbf1}',
+        &['\u{626}', '\u{6c7}']), ('\u{fbf2}', &['\u{626}', '\u{6c6}']), ('\u{fbf3}', &['\u{626}',
+        '\u{6c6}']), ('\u{fbf4}', &['\u{626}', '\u{6c8}']), ('\u{fbf5}', &['\u{626}', '\u{6c8}']),
+        ('\u{fbf6}', &['\u{626}', '\u{6d0}']), ('\u{fbf7}', &['\u{626}', '\u{6d0}']), ('\u{fbf8}',
+        &['\u{626}', '\u{6d0}']), ('\u{fbf9}', &['\u{626}', '\u{649}']), ('\u{fbfa}', &['\u{626}',
+        '\u{649}']), ('\u{fbfb}', &['\u{626}', '\u{649}']), ('\u{fbfc}', &['\u{6cc}']), ('\u{fbfd}',
+        &['\u{6cc}']), ('\u{fbfe}', &['\u{6cc}']), ('\u{fbff}', &['\u{6cc}']), ('\u{fc00}',
+        &['\u{626}', '\u{62c}']), ('\u{fc01}', &['\u{626}', '\u{62d}']), ('\u{fc02}', &['\u{626}',
+        '\u{645}']), ('\u{fc03}', &['\u{626}', '\u{649}']), ('\u{fc04}', &['\u{626}', '\u{64a}']),
+        ('\u{fc05}', &['\u{628}', '\u{62c}']), ('\u{fc06}', &['\u{628}', '\u{62d}']), ('\u{fc07}',
+        &['\u{628}', '\u{62e}']), ('\u{fc08}', &['\u{628}', '\u{645}']), ('\u{fc09}', &['\u{628}',
+        '\u{649}']), ('\u{fc0a}', &['\u{628}', '\u{64a}']), ('\u{fc0b}', &['\u{62a}', '\u{62c}']),
+        ('\u{fc0c}', &['\u{62a}', '\u{62d}']), ('\u{fc0d}', &['\u{62a}', '\u{62e}']), ('\u{fc0e}',
+        &['\u{62a}', '\u{645}']), ('\u{fc0f}', &['\u{62a}', '\u{649}']), ('\u{fc10}', &['\u{62a}',
+        '\u{64a}']), ('\u{fc11}', &['\u{62b}', '\u{62c}']), ('\u{fc12}', &['\u{62b}', '\u{645}']),
+        ('\u{fc13}', &['\u{62b}', '\u{649}']), ('\u{fc14}', &['\u{62b}', '\u{64a}']), ('\u{fc15}',
+        &['\u{62c}', '\u{62d}']), ('\u{fc16}', &['\u{62c}', '\u{645}']), ('\u{fc17}', &['\u{62d}',
+        '\u{62c}']), ('\u{fc18}', &['\u{62d}', '\u{645}']), ('\u{fc19}', &['\u{62e}', '\u{62c}']),
+        ('\u{fc1a}', &['\u{62e}', '\u{62d}']), ('\u{fc1b}', &['\u{62e}', '\u{645}']), ('\u{fc1c}',
+        &['\u{633}', '\u{62c}']), ('\u{fc1d}', &['\u{633}', '\u{62d}']), ('\u{fc1e}', &['\u{633}',
+        '\u{62e}']), ('\u{fc1f}', &['\u{633}', '\u{645}']), ('\u{fc20}', &['\u{635}', '\u{62d}']),
+        ('\u{fc21}', &['\u{635}', '\u{645}']), ('\u{fc22}', &['\u{636}', '\u{62c}']), ('\u{fc23}',
+        &['\u{636}', '\u{62d}']), ('\u{fc24}', &['\u{636}', '\u{62e}']), ('\u{fc25}', &['\u{636}',
+        '\u{645}']), ('\u{fc26}', &['\u{637}', '\u{62d}']), ('\u{fc27}', &['\u{637}', '\u{645}']),
+        ('\u{fc28}', &['\u{638}', '\u{645}']), ('\u{fc29}', &['\u{639}', '\u{62c}']), ('\u{fc2a}',
+        &['\u{639}', '\u{645}']), ('\u{fc2b}', &['\u{63a}', '\u{62c}']), ('\u{fc2c}', &['\u{63a}',
+        '\u{645}']), ('\u{fc2d}', &['\u{641}', '\u{62c}']), ('\u{fc2e}', &['\u{641}', '\u{62d}']),
+        ('\u{fc2f}', &['\u{641}', '\u{62e}']), ('\u{fc30}', &['\u{641}', '\u{645}']), ('\u{fc31}',
+        &['\u{641}', '\u{649}']), ('\u{fc32}', &['\u{641}', '\u{64a}']), ('\u{fc33}', &['\u{642}',
+        '\u{62d}']), ('\u{fc34}', &['\u{642}', '\u{645}']), ('\u{fc35}', &['\u{642}', '\u{649}']),
+        ('\u{fc36}', &['\u{642}', '\u{64a}']), ('\u{fc37}', &['\u{643}', '\u{627}']), ('\u{fc38}',
+        &['\u{643}', '\u{62c}']), ('\u{fc39}', &['\u{643}', '\u{62d}']), ('\u{fc3a}', &['\u{643}',
+        '\u{62e}']), ('\u{fc3b}', &['\u{643}', '\u{644}']), ('\u{fc3c}', &['\u{643}', '\u{645}']),
+        ('\u{fc3d}', &['\u{643}', '\u{649}']), ('\u{fc3e}', &['\u{643}', '\u{64a}']), ('\u{fc3f}',
+        &['\u{644}', '\u{62c}']), ('\u{fc40}', &['\u{644}', '\u{62d}']), ('\u{fc41}', &['\u{644}',
+        '\u{62e}']), ('\u{fc42}', &['\u{644}', '\u{645}']), ('\u{fc43}', &['\u{644}', '\u{649}']),
+        ('\u{fc44}', &['\u{644}', '\u{64a}']), ('\u{fc45}', &['\u{645}', '\u{62c}']), ('\u{fc46}',
+        &['\u{645}', '\u{62d}']), ('\u{fc47}', &['\u{645}', '\u{62e}']), ('\u{fc48}', &['\u{645}',
+        '\u{645}']), ('\u{fc49}', &['\u{645}', '\u{649}']), ('\u{fc4a}', &['\u{645}', '\u{64a}']),
+        ('\u{fc4b}', &['\u{646}', '\u{62c}']), ('\u{fc4c}', &['\u{646}', '\u{62d}']), ('\u{fc4d}',
+        &['\u{646}', '\u{62e}']), ('\u{fc4e}', &['\u{646}', '\u{645}']), ('\u{fc4f}', &['\u{646}',
+        '\u{649}']), ('\u{fc50}', &['\u{646}', '\u{64a}']), ('\u{fc51}', &['\u{647}', '\u{62c}']),
+        ('\u{fc52}', &['\u{647}', '\u{645}']), ('\u{fc53}', &['\u{647}', '\u{649}']), ('\u{fc54}',
+        &['\u{647}', '\u{64a}']), ('\u{fc55}', &['\u{64a}', '\u{62c}']), ('\u{fc56}', &['\u{64a}',
+        '\u{62d}']), ('\u{fc57}', &['\u{64a}', '\u{62e}']), ('\u{fc58}', &['\u{64a}', '\u{645}']),
+        ('\u{fc59}', &['\u{64a}', '\u{649}']), ('\u{fc5a}', &['\u{64a}', '\u{64a}']), ('\u{fc5b}',
+        &['\u{630}', '\u{670}']), ('\u{fc5c}', &['\u{631}', '\u{670}']), ('\u{fc5d}', &['\u{649}',
+        '\u{670}']), ('\u{fc5e}', &['\u{20}', '\u{64c}', '\u{651}']), ('\u{fc5f}', &['\u{20}',
+        '\u{64d}', '\u{651}']), ('\u{fc60}', &['\u{20}', '\u{64e}', '\u{651}']), ('\u{fc61}',
+        &['\u{20}', '\u{64f}', '\u{651}']), ('\u{fc62}', &['\u{20}', '\u{650}', '\u{651}']),
+        ('\u{fc63}', &['\u{20}', '\u{651}', '\u{670}']), ('\u{fc64}', &['\u{626}', '\u{631}']),
+        ('\u{fc65}', &['\u{626}', '\u{632}']), ('\u{fc66}', &['\u{626}', '\u{645}']), ('\u{fc67}',
+        &['\u{626}', '\u{646}']), ('\u{fc68}', &['\u{626}', '\u{649}']), ('\u{fc69}', &['\u{626}',
+        '\u{64a}']), ('\u{fc6a}', &['\u{628}', '\u{631}']), ('\u{fc6b}', &['\u{628}', '\u{632}']),
+        ('\u{fc6c}', &['\u{628}', '\u{645}']), ('\u{fc6d}', &['\u{628}', '\u{646}']), ('\u{fc6e}',
+        &['\u{628}', '\u{649}']), ('\u{fc6f}', &['\u{628}', '\u{64a}']), ('\u{fc70}', &['\u{62a}',
+        '\u{631}']), ('\u{fc71}', &['\u{62a}', '\u{632}']), ('\u{fc72}', &['\u{62a}', '\u{645}']),
+        ('\u{fc73}', &['\u{62a}', '\u{646}']), ('\u{fc74}', &['\u{62a}', '\u{649}']), ('\u{fc75}',
+        &['\u{62a}', '\u{64a}']), ('\u{fc76}', &['\u{62b}', '\u{631}']), ('\u{fc77}', &['\u{62b}',
+        '\u{632}']), ('\u{fc78}', &['\u{62b}', '\u{645}']), ('\u{fc79}', &['\u{62b}', '\u{646}']),
+        ('\u{fc7a}', &['\u{62b}', '\u{649}']), ('\u{fc7b}', &['\u{62b}', '\u{64a}']), ('\u{fc7c}',
+        &['\u{641}', '\u{649}']), ('\u{fc7d}', &['\u{641}', '\u{64a}']), ('\u{fc7e}', &['\u{642}',
+        '\u{649}']), ('\u{fc7f}', &['\u{642}', '\u{64a}']), ('\u{fc80}', &['\u{643}', '\u{627}']),
+        ('\u{fc81}', &['\u{643}', '\u{644}']), ('\u{fc82}', &['\u{643}', '\u{645}']), ('\u{fc83}',
+        &['\u{643}', '\u{649}']), ('\u{fc84}', &['\u{643}', '\u{64a}']), ('\u{fc85}', &['\u{644}',
+        '\u{645}']), ('\u{fc86}', &['\u{644}', '\u{649}']), ('\u{fc87}', &['\u{644}', '\u{64a}']),
+        ('\u{fc88}', &['\u{645}', '\u{627}']), ('\u{fc89}', &['\u{645}', '\u{645}']), ('\u{fc8a}',
+        &['\u{646}', '\u{631}']), ('\u{fc8b}', &['\u{646}', '\u{632}']), ('\u{fc8c}', &['\u{646}',
+        '\u{645}']), ('\u{fc8d}', &['\u{646}', '\u{646}']), ('\u{fc8e}', &['\u{646}', '\u{649}']),
+        ('\u{fc8f}', &['\u{646}', '\u{64a}']), ('\u{fc90}', &['\u{649}', '\u{670}']), ('\u{fc91}',
+        &['\u{64a}', '\u{631}']), ('\u{fc92}', &['\u{64a}', '\u{632}']), ('\u{fc93}', &['\u{64a}',
+        '\u{645}']), ('\u{fc94}', &['\u{64a}', '\u{646}']), ('\u{fc95}', &['\u{64a}', '\u{649}']),
+        ('\u{fc96}', &['\u{64a}', '\u{64a}']), ('\u{fc97}', &['\u{626}', '\u{62c}']), ('\u{fc98}',
+        &['\u{626}', '\u{62d}']), ('\u{fc99}', &['\u{626}', '\u{62e}']), ('\u{fc9a}', &['\u{626}',
+        '\u{645}']), ('\u{fc9b}', &['\u{626}', '\u{647}']), ('\u{fc9c}', &['\u{628}', '\u{62c}']),
+        ('\u{fc9d}', &['\u{628}', '\u{62d}']), ('\u{fc9e}', &['\u{628}', '\u{62e}']), ('\u{fc9f}',
+        &['\u{628}', '\u{645}']), ('\u{fca0}', &['\u{628}', '\u{647}']), ('\u{fca1}', &['\u{62a}',
+        '\u{62c}']), ('\u{fca2}', &['\u{62a}', '\u{62d}']), ('\u{fca3}', &['\u{62a}', '\u{62e}']),
+        ('\u{fca4}', &['\u{62a}', '\u{645}']), ('\u{fca5}', &['\u{62a}', '\u{647}']), ('\u{fca6}',
+        &['\u{62b}', '\u{645}']), ('\u{fca7}', &['\u{62c}', '\u{62d}']), ('\u{fca8}', &['\u{62c}',
+        '\u{645}']), ('\u{fca9}', &['\u{62d}', '\u{62c}']), ('\u{fcaa}', &['\u{62d}', '\u{645}']),
+        ('\u{fcab}', &['\u{62e}', '\u{62c}']), ('\u{fcac}', &['\u{62e}', '\u{645}']), ('\u{fcad}',
+        &['\u{633}', '\u{62c}']), ('\u{fcae}', &['\u{633}', '\u{62d}']), ('\u{fcaf}', &['\u{633}',
+        '\u{62e}']), ('\u{fcb0}', &['\u{633}', '\u{645}']), ('\u{fcb1}', &['\u{635}', '\u{62d}']),
+        ('\u{fcb2}', &['\u{635}', '\u{62e}']), ('\u{fcb3}', &['\u{635}', '\u{645}']), ('\u{fcb4}',
+        &['\u{636}', '\u{62c}']), ('\u{fcb5}', &['\u{636}', '\u{62d}']), ('\u{fcb6}', &['\u{636}',
+        '\u{62e}']), ('\u{fcb7}', &['\u{636}', '\u{645}']), ('\u{fcb8}', &['\u{637}', '\u{62d}']),
+        ('\u{fcb9}', &['\u{638}', '\u{645}']), ('\u{fcba}', &['\u{639}', '\u{62c}']), ('\u{fcbb}',
+        &['\u{639}', '\u{645}']), ('\u{fcbc}', &['\u{63a}', '\u{62c}']), ('\u{fcbd}', &['\u{63a}',
+        '\u{645}']), ('\u{fcbe}', &['\u{641}', '\u{62c}']), ('\u{fcbf}', &['\u{641}', '\u{62d}']),
+        ('\u{fcc0}', &['\u{641}', '\u{62e}']), ('\u{fcc1}', &['\u{641}', '\u{645}']), ('\u{fcc2}',
+        &['\u{642}', '\u{62d}']), ('\u{fcc3}', &['\u{642}', '\u{645}']), ('\u{fcc4}', &['\u{643}',
+        '\u{62c}']), ('\u{fcc5}', &['\u{643}', '\u{62d}']), ('\u{fcc6}', &['\u{643}', '\u{62e}']),
+        ('\u{fcc7}', &['\u{643}', '\u{644}']), ('\u{fcc8}', &['\u{643}', '\u{645}']), ('\u{fcc9}',
+        &['\u{644}', '\u{62c}']), ('\u{fcca}', &['\u{644}', '\u{62d}']), ('\u{fccb}', &['\u{644}',
+        '\u{62e}']), ('\u{fccc}', &['\u{644}', '\u{645}']), ('\u{fccd}', &['\u{644}', '\u{647}']),
+        ('\u{fcce}', &['\u{645}', '\u{62c}']), ('\u{fccf}', &['\u{645}', '\u{62d}']), ('\u{fcd0}',
+        &['\u{645}', '\u{62e}']), ('\u{fcd1}', &['\u{645}', '\u{645}']), ('\u{fcd2}', &['\u{646}',
+        '\u{62c}']), ('\u{fcd3}', &['\u{646}', '\u{62d}']), ('\u{fcd4}', &['\u{646}', '\u{62e}']),
+        ('\u{fcd5}', &['\u{646}', '\u{645}']), ('\u{fcd6}', &['\u{646}', '\u{647}']), ('\u{fcd7}',
+        &['\u{647}', '\u{62c}']), ('\u{fcd8}', &['\u{647}', '\u{645}']), ('\u{fcd9}', &['\u{647}',
+        '\u{670}']), ('\u{fcda}', &['\u{64a}', '\u{62c}']), ('\u{fcdb}', &['\u{64a}', '\u{62d}']),
+        ('\u{fcdc}', &['\u{64a}', '\u{62e}']), ('\u{fcdd}', &['\u{64a}', '\u{645}']), ('\u{fcde}',
+        &['\u{64a}', '\u{647}']), ('\u{fcdf}', &['\u{626}', '\u{645}']), ('\u{fce0}', &['\u{626}',
+        '\u{647}']), ('\u{fce1}', &['\u{628}', '\u{645}']), ('\u{fce2}', &['\u{628}', '\u{647}']),
+        ('\u{fce3}', &['\u{62a}', '\u{645}']), ('\u{fce4}', &['\u{62a}', '\u{647}']), ('\u{fce5}',
+        &['\u{62b}', '\u{645}']), ('\u{fce6}', &['\u{62b}', '\u{647}']), ('\u{fce7}', &['\u{633}',
+        '\u{645}']), ('\u{fce8}', &['\u{633}', '\u{647}']), ('\u{fce9}', &['\u{634}', '\u{645}']),
+        ('\u{fcea}', &['\u{634}', '\u{647}']), ('\u{fceb}', &['\u{643}', '\u{644}']), ('\u{fcec}',
+        &['\u{643}', '\u{645}']), ('\u{fced}', &['\u{644}', '\u{645}']), ('\u{fcee}', &['\u{646}',
+        '\u{645}']), ('\u{fcef}', &['\u{646}', '\u{647}']), ('\u{fcf0}', &['\u{64a}', '\u{645}']),
+        ('\u{fcf1}', &['\u{64a}', '\u{647}']), ('\u{fcf2}', &['\u{640}', '\u{64e}', '\u{651}']),
+        ('\u{fcf3}', &['\u{640}', '\u{64f}', '\u{651}']), ('\u{fcf4}', &['\u{640}', '\u{650}',
+        '\u{651}']), ('\u{fcf5}', &['\u{637}', '\u{649}']), ('\u{fcf6}', &['\u{637}', '\u{64a}']),
+        ('\u{fcf7}', &['\u{639}', '\u{649}']), ('\u{fcf8}', &['\u{639}', '\u{64a}']), ('\u{fcf9}',
+        &['\u{63a}', '\u{649}']), ('\u{fcfa}', &['\u{63a}', '\u{64a}']), ('\u{fcfb}', &['\u{633}',
+        '\u{649}']), ('\u{fcfc}', &['\u{633}', '\u{64a}']), ('\u{fcfd}', &['\u{634}', '\u{649}']),
+        ('\u{fcfe}', &['\u{634}', '\u{64a}']), ('\u{fcff}', &['\u{62d}', '\u{649}']), ('\u{fd00}',
+        &['\u{62d}', '\u{64a}']), ('\u{fd01}', &['\u{62c}', '\u{649}']), ('\u{fd02}', &['\u{62c}',
+        '\u{64a}']), ('\u{fd03}', &['\u{62e}', '\u{649}']), ('\u{fd04}', &['\u{62e}', '\u{64a}']),
+        ('\u{fd05}', &['\u{635}', '\u{649}']), ('\u{fd06}', &['\u{635}', '\u{64a}']), ('\u{fd07}',
+        &['\u{636}', '\u{649}']), ('\u{fd08}', &['\u{636}', '\u{64a}']), ('\u{fd09}', &['\u{634}',
+        '\u{62c}']), ('\u{fd0a}', &['\u{634}', '\u{62d}']), ('\u{fd0b}', &['\u{634}', '\u{62e}']),
+        ('\u{fd0c}', &['\u{634}', '\u{645}']), ('\u{fd0d}', &['\u{634}', '\u{631}']), ('\u{fd0e}',
+        &['\u{633}', '\u{631}']), ('\u{fd0f}', &['\u{635}', '\u{631}']), ('\u{fd10}', &['\u{636}',
+        '\u{631}']), ('\u{fd11}', &['\u{637}', '\u{649}']), ('\u{fd12}', &['\u{637}', '\u{64a}']),
+        ('\u{fd13}', &['\u{639}', '\u{649}']), ('\u{fd14}', &['\u{639}', '\u{64a}']), ('\u{fd15}',
+        &['\u{63a}', '\u{649}']), ('\u{fd16}', &['\u{63a}', '\u{64a}']), ('\u{fd17}', &['\u{633}',
+        '\u{649}']), ('\u{fd18}', &['\u{633}', '\u{64a}']), ('\u{fd19}', &['\u{634}', '\u{649}']),
+        ('\u{fd1a}', &['\u{634}', '\u{64a}']), ('\u{fd1b}', &['\u{62d}', '\u{649}']), ('\u{fd1c}',
+        &['\u{62d}', '\u{64a}']), ('\u{fd1d}', &['\u{62c}', '\u{649}']), ('\u{fd1e}', &['\u{62c}',
+        '\u{64a}']), ('\u{fd1f}', &['\u{62e}', '\u{649}']), ('\u{fd20}', &['\u{62e}', '\u{64a}']),
+        ('\u{fd21}', &['\u{635}', '\u{649}']), ('\u{fd22}', &['\u{635}', '\u{64a}']), ('\u{fd23}',
+        &['\u{636}', '\u{649}']), ('\u{fd24}', &['\u{636}', '\u{64a}']), ('\u{fd25}', &['\u{634}',
+        '\u{62c}']), ('\u{fd26}', &['\u{634}', '\u{62d}']), ('\u{fd27}', &['\u{634}', '\u{62e}']),
+        ('\u{fd28}', &['\u{634}', '\u{645}']), ('\u{fd29}', &['\u{634}', '\u{631}']), ('\u{fd2a}',
+        &['\u{633}', '\u{631}']), ('\u{fd2b}', &['\u{635}', '\u{631}']), ('\u{fd2c}', &['\u{636}',
+        '\u{631}']), ('\u{fd2d}', &['\u{634}', '\u{62c}']), ('\u{fd2e}', &['\u{634}', '\u{62d}']),
+        ('\u{fd2f}', &['\u{634}', '\u{62e}']), ('\u{fd30}', &['\u{634}', '\u{645}']), ('\u{fd31}',
+        &['\u{633}', '\u{647}']), ('\u{fd32}', &['\u{634}', '\u{647}']), ('\u{fd33}', &['\u{637}',
+        '\u{645}']), ('\u{fd34}', &['\u{633}', '\u{62c}']), ('\u{fd35}', &['\u{633}', '\u{62d}']),
+        ('\u{fd36}', &['\u{633}', '\u{62e}']), ('\u{fd37}', &['\u{634}', '\u{62c}']), ('\u{fd38}',
+        &['\u{634}', '\u{62d}']), ('\u{fd39}', &['\u{634}', '\u{62e}']), ('\u{fd3a}', &['\u{637}',
+        '\u{645}']), ('\u{fd3b}', &['\u{638}', '\u{645}']), ('\u{fd3c}', &['\u{627}', '\u{64b}']),
+        ('\u{fd3d}', &['\u{627}', '\u{64b}']), ('\u{fd50}', &['\u{62a}', '\u{62c}', '\u{645}']),
+        ('\u{fd51}', &['\u{62a}', '\u{62d}', '\u{62c}']), ('\u{fd52}', &['\u{62a}', '\u{62d}',
+        '\u{62c}']), ('\u{fd53}', &['\u{62a}', '\u{62d}', '\u{645}']), ('\u{fd54}', &['\u{62a}',
+        '\u{62e}', '\u{645}']), ('\u{fd55}', &['\u{62a}', '\u{645}', '\u{62c}']), ('\u{fd56}',
+        &['\u{62a}', '\u{645}', '\u{62d}']), ('\u{fd57}', &['\u{62a}', '\u{645}', '\u{62e}']),
+        ('\u{fd58}', &['\u{62c}', '\u{645}', '\u{62d}']), ('\u{fd59}', &['\u{62c}', '\u{645}',
+        '\u{62d}']), ('\u{fd5a}', &['\u{62d}', '\u{645}', '\u{64a}']), ('\u{fd5b}', &['\u{62d}',
+        '\u{645}', '\u{649}']), ('\u{fd5c}', &['\u{633}', '\u{62d}', '\u{62c}']), ('\u{fd5d}',
+        &['\u{633}', '\u{62c}', '\u{62d}']), ('\u{fd5e}', &['\u{633}', '\u{62c}', '\u{649}']),
+        ('\u{fd5f}', &['\u{633}', '\u{645}', '\u{62d}']), ('\u{fd60}', &['\u{633}', '\u{645}',
+        '\u{62d}']), ('\u{fd61}', &['\u{633}', '\u{645}', '\u{62c}']), ('\u{fd62}', &['\u{633}',
+        '\u{645}', '\u{645}']), ('\u{fd63}', &['\u{633}', '\u{645}', '\u{645}']), ('\u{fd64}',
+        &['\u{635}', '\u{62d}', '\u{62d}']), ('\u{fd65}', &['\u{635}', '\u{62d}', '\u{62d}']),
+        ('\u{fd66}', &['\u{635}', '\u{645}', '\u{645}']), ('\u{fd67}', &['\u{634}', '\u{62d}',
+        '\u{645}']), ('\u{fd68}', &['\u{634}', '\u{62d}', '\u{645}']), ('\u{fd69}', &['\u{634}',
+        '\u{62c}', '\u{64a}']), ('\u{fd6a}', &['\u{634}', '\u{645}', '\u{62e}']), ('\u{fd6b}',
+        &['\u{634}', '\u{645}', '\u{62e}']), ('\u{fd6c}', &['\u{634}', '\u{645}', '\u{645}']),
+        ('\u{fd6d}', &['\u{634}', '\u{645}', '\u{645}']), ('\u{fd6e}', &['\u{636}', '\u{62d}',
+        '\u{649}']), ('\u{fd6f}', &['\u{636}', '\u{62e}', '\u{645}']), ('\u{fd70}', &['\u{636}',
+        '\u{62e}', '\u{645}']), ('\u{fd71}', &['\u{637}', '\u{645}', '\u{62d}']), ('\u{fd72}',
+        &['\u{637}', '\u{645}', '\u{62d}']), ('\u{fd73}', &['\u{637}', '\u{645}', '\u{645}']),
+        ('\u{fd74}', &['\u{637}', '\u{645}', '\u{64a}']), ('\u{fd75}', &['\u{639}', '\u{62c}',
+        '\u{645}']), ('\u{fd76}', &['\u{639}', '\u{645}', '\u{645}']), ('\u{fd77}', &['\u{639}',
+        '\u{645}', '\u{645}']), ('\u{fd78}', &['\u{639}', '\u{645}', '\u{649}']), ('\u{fd79}',
+        &['\u{63a}', '\u{645}', '\u{645}']), ('\u{fd7a}', &['\u{63a}', '\u{645}', '\u{64a}']),
+        ('\u{fd7b}', &['\u{63a}', '\u{645}', '\u{649}']), ('\u{fd7c}', &['\u{641}', '\u{62e}',
+        '\u{645}']), ('\u{fd7d}', &['\u{641}', '\u{62e}', '\u{645}']), ('\u{fd7e}', &['\u{642}',
+        '\u{645}', '\u{62d}']), ('\u{fd7f}', &['\u{642}', '\u{645}', '\u{645}']), ('\u{fd80}',
+        &['\u{644}', '\u{62d}', '\u{645}']), ('\u{fd81}', &['\u{644}', '\u{62d}', '\u{64a}']),
+        ('\u{fd82}', &['\u{644}', '\u{62d}', '\u{649}']), ('\u{fd83}', &['\u{644}', '\u{62c}',
+        '\u{62c}']), ('\u{fd84}', &['\u{644}', '\u{62c}', '\u{62c}']), ('\u{fd85}', &['\u{644}',
+        '\u{62e}', '\u{645}']), ('\u{fd86}', &['\u{644}', '\u{62e}', '\u{645}']), ('\u{fd87}',
+        &['\u{644}', '\u{645}', '\u{62d}']), ('\u{fd88}', &['\u{644}', '\u{645}', '\u{62d}']),
+        ('\u{fd89}', &['\u{645}', '\u{62d}', '\u{62c}']), ('\u{fd8a}', &['\u{645}', '\u{62d}',
+        '\u{645}']), ('\u{fd8b}', &['\u{645}', '\u{62d}', '\u{64a}']), ('\u{fd8c}', &['\u{645}',
+        '\u{62c}', '\u{62d}']), ('\u{fd8d}', &['\u{645}', '\u{62c}', '\u{645}']), ('\u{fd8e}',
+        &['\u{645}', '\u{62e}', '\u{62c}']), ('\u{fd8f}', &['\u{645}', '\u{62e}', '\u{645}']),
+        ('\u{fd92}', &['\u{645}', '\u{62c}', '\u{62e}']), ('\u{fd93}', &['\u{647}', '\u{645}',
+        '\u{62c}']), ('\u{fd94}', &['\u{647}', '\u{645}', '\u{645}']), ('\u{fd95}', &['\u{646}',
+        '\u{62d}', '\u{645}']), ('\u{fd96}', &['\u{646}', '\u{62d}', '\u{649}']), ('\u{fd97}',
+        &['\u{646}', '\u{62c}', '\u{645}']), ('\u{fd98}', &['\u{646}', '\u{62c}', '\u{645}']),
+        ('\u{fd99}', &['\u{646}', '\u{62c}', '\u{649}']), ('\u{fd9a}', &['\u{646}', '\u{645}',
+        '\u{64a}']), ('\u{fd9b}', &['\u{646}', '\u{645}', '\u{649}']), ('\u{fd9c}', &['\u{64a}',
+        '\u{645}', '\u{645}']), ('\u{fd9d}', &['\u{64a}', '\u{645}', '\u{645}']), ('\u{fd9e}',
+        &['\u{628}', '\u{62e}', '\u{64a}']), ('\u{fd9f}', &['\u{62a}', '\u{62c}', '\u{64a}']),
+        ('\u{fda0}', &['\u{62a}', '\u{62c}', '\u{649}']), ('\u{fda1}', &['\u{62a}', '\u{62e}',
+        '\u{64a}']), ('\u{fda2}', &['\u{62a}', '\u{62e}', '\u{649}']), ('\u{fda3}', &['\u{62a}',
+        '\u{645}', '\u{64a}']), ('\u{fda4}', &['\u{62a}', '\u{645}', '\u{649}']), ('\u{fda5}',
+        &['\u{62c}', '\u{645}', '\u{64a}']), ('\u{fda6}', &['\u{62c}', '\u{62d}', '\u{649}']),
+        ('\u{fda7}', &['\u{62c}', '\u{645}', '\u{649}']), ('\u{fda8}', &['\u{633}', '\u{62e}',
+        '\u{649}']), ('\u{fda9}', &['\u{635}', '\u{62d}', '\u{64a}']), ('\u{fdaa}', &['\u{634}',
+        '\u{62d}', '\u{64a}']), ('\u{fdab}', &['\u{636}', '\u{62d}', '\u{64a}']), ('\u{fdac}',
+        &['\u{644}', '\u{62c}', '\u{64a}']), ('\u{fdad}', &['\u{644}', '\u{645}', '\u{64a}']),
+        ('\u{fdae}', &['\u{64a}', '\u{62d}', '\u{64a}']), ('\u{fdaf}', &['\u{64a}', '\u{62c}',
+        '\u{64a}']), ('\u{fdb0}', &['\u{64a}', '\u{645}', '\u{64a}']), ('\u{fdb1}', &['\u{645}',
+        '\u{645}', '\u{64a}']), ('\u{fdb2}', &['\u{642}', '\u{645}', '\u{64a}']), ('\u{fdb3}',
+        &['\u{646}', '\u{62d}', '\u{64a}']), ('\u{fdb4}', &['\u{642}', '\u{645}', '\u{62d}']),
+        ('\u{fdb5}', &['\u{644}', '\u{62d}', '\u{645}']), ('\u{fdb6}', &['\u{639}', '\u{645}',
+        '\u{64a}']), ('\u{fdb7}', &['\u{643}', '\u{645}', '\u{64a}']), ('\u{fdb8}', &['\u{646}',
+        '\u{62c}', '\u{62d}']), ('\u{fdb9}', &['\u{645}', '\u{62e}', '\u{64a}']), ('\u{fdba}',
+        &['\u{644}', '\u{62c}', '\u{645}']), ('\u{fdbb}', &['\u{643}', '\u{645}', '\u{645}']),
+        ('\u{fdbc}', &['\u{644}', '\u{62c}', '\u{645}']), ('\u{fdbd}', &['\u{646}', '\u{62c}',
+        '\u{62d}']), ('\u{fdbe}', &['\u{62c}', '\u{62d}', '\u{64a}']), ('\u{fdbf}', &['\u{62d}',
+        '\u{62c}', '\u{64a}']), ('\u{fdc0}', &['\u{645}', '\u{62c}', '\u{64a}']), ('\u{fdc1}',
+        &['\u{641}', '\u{645}', '\u{64a}']), ('\u{fdc2}', &['\u{628}', '\u{62d}', '\u{64a}']),
+        ('\u{fdc3}', &['\u{643}', '\u{645}', '\u{645}']), ('\u{fdc4}', &['\u{639}', '\u{62c}',
+        '\u{645}']), ('\u{fdc5}', &['\u{635}', '\u{645}', '\u{645}']), ('\u{fdc6}', &['\u{633}',
+        '\u{62e}', '\u{64a}']), ('\u{fdc7}', &['\u{646}', '\u{62c}', '\u{64a}']), ('\u{fdf0}',
+        &['\u{635}', '\u{644}', '\u{6d2}']), ('\u{fdf1}', &['\u{642}', '\u{644}', '\u{6d2}']),
+        ('\u{fdf2}', &['\u{627}', '\u{644}', '\u{644}', '\u{647}']), ('\u{fdf3}', &['\u{627}',
+        '\u{643}', '\u{628}', '\u{631}']), ('\u{fdf4}', &['\u{645}', '\u{62d}', '\u{645}',
+        '\u{62f}']), ('\u{fdf5}', &['\u{635}', '\u{644}', '\u{639}', '\u{645}']), ('\u{fdf6}',
+        &['\u{631}', '\u{633}', '\u{648}', '\u{644}']), ('\u{fdf7}', &['\u{639}', '\u{644}',
+        '\u{64a}', '\u{647}']), ('\u{fdf8}', &['\u{648}', '\u{633}', '\u{644}', '\u{645}']),
+        ('\u{fdf9}', &['\u{635}', '\u{644}', '\u{649}']), ('\u{fdfa}', &['\u{635}', '\u{644}',
+        '\u{649}', '\u{20}', '\u{627}', '\u{644}', '\u{644}', '\u{647}', '\u{20}', '\u{639}',
+        '\u{644}', '\u{64a}', '\u{647}', '\u{20}', '\u{648}', '\u{633}', '\u{644}', '\u{645}']),
+        ('\u{fdfb}', &['\u{62c}', '\u{644}', '\u{20}', '\u{62c}', '\u{644}', '\u{627}', '\u{644}',
+        '\u{647}']), ('\u{fdfc}', &['\u{631}', '\u{6cc}', '\u{627}', '\u{644}']), ('\u{fe10}',
+        &['\u{2c}']), ('\u{fe11}', &['\u{3001}']), ('\u{fe12}', &['\u{3002}']), ('\u{fe13}',
+        &['\u{3a}']), ('\u{fe14}', &['\u{3b}']), ('\u{fe15}', &['\u{21}']), ('\u{fe16}',
+        &['\u{3f}']), ('\u{fe17}', &['\u{3016}']), ('\u{fe18}', &['\u{3017}']), ('\u{fe19}',
+        &['\u{2026}']), ('\u{fe30}', &['\u{2025}']), ('\u{fe31}', &['\u{2014}']), ('\u{fe32}',
+        &['\u{2013}']), ('\u{fe33}', &['\u{5f}']), ('\u{fe34}', &['\u{5f}']), ('\u{fe35}',
+        &['\u{28}']), ('\u{fe36}', &['\u{29}']), ('\u{fe37}', &['\u{7b}']), ('\u{fe38}',
+        &['\u{7d}']), ('\u{fe39}', &['\u{3014}']), ('\u{fe3a}', &['\u{3015}']), ('\u{fe3b}',
+        &['\u{3010}']), ('\u{fe3c}', &['\u{3011}']), ('\u{fe3d}', &['\u{300a}']), ('\u{fe3e}',
+        &['\u{300b}']), ('\u{fe3f}', &['\u{3008}']), ('\u{fe40}', &['\u{3009}']), ('\u{fe41}',
+        &['\u{300c}']), ('\u{fe42}', &['\u{300d}']), ('\u{fe43}', &['\u{300e}']), ('\u{fe44}',
+        &['\u{300f}']), ('\u{fe47}', &['\u{5b}']), ('\u{fe48}', &['\u{5d}']), ('\u{fe49}',
+        &['\u{203e}']), ('\u{fe4a}', &['\u{203e}']), ('\u{fe4b}', &['\u{203e}']), ('\u{fe4c}',
+        &['\u{203e}']), ('\u{fe4d}', &['\u{5f}']), ('\u{fe4e}', &['\u{5f}']), ('\u{fe4f}',
+        &['\u{5f}']), ('\u{fe50}', &['\u{2c}']), ('\u{fe51}', &['\u{3001}']), ('\u{fe52}',
+        &['\u{2e}']), ('\u{fe54}', &['\u{3b}']), ('\u{fe55}', &['\u{3a}']), ('\u{fe56}',
+        &['\u{3f}']), ('\u{fe57}', &['\u{21}']), ('\u{fe58}', &['\u{2014}']), ('\u{fe59}',
+        &['\u{28}']), ('\u{fe5a}', &['\u{29}']), ('\u{fe5b}', &['\u{7b}']), ('\u{fe5c}',
+        &['\u{7d}']), ('\u{fe5d}', &['\u{3014}']), ('\u{fe5e}', &['\u{3015}']), ('\u{fe5f}',
+        &['\u{23}']), ('\u{fe60}', &['\u{26}']), ('\u{fe61}', &['\u{2a}']), ('\u{fe62}',
+        &['\u{2b}']), ('\u{fe63}', &['\u{2d}']), ('\u{fe64}', &['\u{3c}']), ('\u{fe65}',
+        &['\u{3e}']), ('\u{fe66}', &['\u{3d}']), ('\u{fe68}', &['\u{5c}']), ('\u{fe69}',
+        &['\u{24}']), ('\u{fe6a}', &['\u{25}']), ('\u{fe6b}', &['\u{40}']), ('\u{fe70}', &['\u{20}',
+        '\u{64b}']), ('\u{fe71}', &['\u{640}', '\u{64b}']), ('\u{fe72}', &['\u{20}', '\u{64c}']),
+        ('\u{fe74}', &['\u{20}', '\u{64d}']), ('\u{fe76}', &['\u{20}', '\u{64e}']), ('\u{fe77}',
+        &['\u{640}', '\u{64e}']), ('\u{fe78}', &['\u{20}', '\u{64f}']), ('\u{fe79}', &['\u{640}',
+        '\u{64f}']), ('\u{fe7a}', &['\u{20}', '\u{650}']), ('\u{fe7b}', &['\u{640}', '\u{650}']),
+        ('\u{fe7c}', &['\u{20}', '\u{651}']), ('\u{fe7d}', &['\u{640}', '\u{651}']), ('\u{fe7e}',
+        &['\u{20}', '\u{652}']), ('\u{fe7f}', &['\u{640}', '\u{652}']), ('\u{fe80}', &['\u{621}']),
+        ('\u{fe81}', &['\u{622}']), ('\u{fe82}', &['\u{622}']), ('\u{fe83}', &['\u{623}']),
+        ('\u{fe84}', &['\u{623}']), ('\u{fe85}', &['\u{624}']), ('\u{fe86}', &['\u{624}']),
+        ('\u{fe87}', &['\u{625}']), ('\u{fe88}', &['\u{625}']), ('\u{fe89}', &['\u{626}']),
+        ('\u{fe8a}', &['\u{626}']), ('\u{fe8b}', &['\u{626}']), ('\u{fe8c}', &['\u{626}']),
+        ('\u{fe8d}', &['\u{627}']), ('\u{fe8e}', &['\u{627}']), ('\u{fe8f}', &['\u{628}']),
+        ('\u{fe90}', &['\u{628}']), ('\u{fe91}', &['\u{628}']), ('\u{fe92}', &['\u{628}']),
+        ('\u{fe93}', &['\u{629}']), ('\u{fe94}', &['\u{629}']), ('\u{fe95}', &['\u{62a}']),
+        ('\u{fe96}', &['\u{62a}']), ('\u{fe97}', &['\u{62a}']), ('\u{fe98}', &['\u{62a}']),
+        ('\u{fe99}', &['\u{62b}']), ('\u{fe9a}', &['\u{62b}']), ('\u{fe9b}', &['\u{62b}']),
+        ('\u{fe9c}', &['\u{62b}']), ('\u{fe9d}', &['\u{62c}']), ('\u{fe9e}', &['\u{62c}']),
+        ('\u{fe9f}', &['\u{62c}']), ('\u{fea0}', &['\u{62c}']), ('\u{fea1}', &['\u{62d}']),
+        ('\u{fea2}', &['\u{62d}']), ('\u{fea3}', &['\u{62d}']), ('\u{fea4}', &['\u{62d}']),
+        ('\u{fea5}', &['\u{62e}']), ('\u{fea6}', &['\u{62e}']), ('\u{fea7}', &['\u{62e}']),
+        ('\u{fea8}', &['\u{62e}']), ('\u{fea9}', &['\u{62f}']), ('\u{feaa}', &['\u{62f}']),
+        ('\u{feab}', &['\u{630}']), ('\u{feac}', &['\u{630}']), ('\u{fead}', &['\u{631}']),
+        ('\u{feae}', &['\u{631}']), ('\u{feaf}', &['\u{632}']), ('\u{feb0}', &['\u{632}']),
+        ('\u{feb1}', &['\u{633}']), ('\u{feb2}', &['\u{633}']), ('\u{feb3}', &['\u{633}']),
+        ('\u{feb4}', &['\u{633}']), ('\u{feb5}', &['\u{634}']), ('\u{feb6}', &['\u{634}']),
+        ('\u{feb7}', &['\u{634}']), ('\u{feb8}', &['\u{634}']), ('\u{feb9}', &['\u{635}']),
+        ('\u{feba}', &['\u{635}']), ('\u{febb}', &['\u{635}']), ('\u{febc}', &['\u{635}']),
+        ('\u{febd}', &['\u{636}']), ('\u{febe}', &['\u{636}']), ('\u{febf}', &['\u{636}']),
+        ('\u{fec0}', &['\u{636}']), ('\u{fec1}', &['\u{637}']), ('\u{fec2}', &['\u{637}']),
+        ('\u{fec3}', &['\u{637}']), ('\u{fec4}', &['\u{637}']), ('\u{fec5}', &['\u{638}']),
+        ('\u{fec6}', &['\u{638}']), ('\u{fec7}', &['\u{638}']), ('\u{fec8}', &['\u{638}']),
+        ('\u{fec9}', &['\u{639}']), ('\u{feca}', &['\u{639}']), ('\u{fecb}', &['\u{639}']),
+        ('\u{fecc}', &['\u{639}']), ('\u{fecd}', &['\u{63a}']), ('\u{fece}', &['\u{63a}']),
+        ('\u{fecf}', &['\u{63a}']), ('\u{fed0}', &['\u{63a}']), ('\u{fed1}', &['\u{641}']),
+        ('\u{fed2}', &['\u{641}']), ('\u{fed3}', &['\u{641}']), ('\u{fed4}', &['\u{641}']),
+        ('\u{fed5}', &['\u{642}']), ('\u{fed6}', &['\u{642}']), ('\u{fed7}', &['\u{642}']),
+        ('\u{fed8}', &['\u{642}']), ('\u{fed9}', &['\u{643}']), ('\u{feda}', &['\u{643}']),
+        ('\u{fedb}', &['\u{643}']), ('\u{fedc}', &['\u{643}']), ('\u{fedd}', &['\u{644}']),
+        ('\u{fede}', &['\u{644}']), ('\u{fedf}', &['\u{644}']), ('\u{fee0}', &['\u{644}']),
+        ('\u{fee1}', &['\u{645}']), ('\u{fee2}', &['\u{645}']), ('\u{fee3}', &['\u{645}']),
+        ('\u{fee4}', &['\u{645}']), ('\u{fee5}', &['\u{646}']), ('\u{fee6}', &['\u{646}']),
+        ('\u{fee7}', &['\u{646}']), ('\u{fee8}', &['\u{646}']), ('\u{fee9}', &['\u{647}']),
+        ('\u{feea}', &['\u{647}']), ('\u{feeb}', &['\u{647}']), ('\u{feec}', &['\u{647}']),
+        ('\u{feed}', &['\u{648}']), ('\u{feee}', &['\u{648}']), ('\u{feef}', &['\u{649}']),
+        ('\u{fef0}', &['\u{649}']), ('\u{fef1}', &['\u{64a}']), ('\u{fef2}', &['\u{64a}']),
+        ('\u{fef3}', &['\u{64a}']), ('\u{fef4}', &['\u{64a}']), ('\u{fef5}', &['\u{644}',
+        '\u{622}']), ('\u{fef6}', &['\u{644}', '\u{622}']), ('\u{fef7}', &['\u{644}', '\u{623}']),
+        ('\u{fef8}', &['\u{644}', '\u{623}']), ('\u{fef9}', &['\u{644}', '\u{625}']), ('\u{fefa}',
+        &['\u{644}', '\u{625}']), ('\u{fefb}', &['\u{644}', '\u{627}']), ('\u{fefc}', &['\u{644}',
+        '\u{627}']), ('\u{ff01}', &['\u{21}']), ('\u{ff02}', &['\u{22}']), ('\u{ff03}',
+        &['\u{23}']), ('\u{ff04}', &['\u{24}']), ('\u{ff05}', &['\u{25}']), ('\u{ff06}',
+        &['\u{26}']), ('\u{ff07}', &['\u{27}']), ('\u{ff08}', &['\u{28}']), ('\u{ff09}',
+        &['\u{29}']), ('\u{ff0a}', &['\u{2a}']), ('\u{ff0b}', &['\u{2b}']), ('\u{ff0c}',
+        &['\u{2c}']), ('\u{ff0d}', &['\u{2d}']), ('\u{ff0e}', &['\u{2e}']), ('\u{ff0f}',
+        &['\u{2f}']), ('\u{ff10}', &['\u{30}']), ('\u{ff11}', &['\u{31}']), ('\u{ff12}',
+        &['\u{32}']), ('\u{ff13}', &['\u{33}']), ('\u{ff14}', &['\u{34}']), ('\u{ff15}',
+        &['\u{35}']), ('\u{ff16}', &['\u{36}']), ('\u{ff17}', &['\u{37}']), ('\u{ff18}',
+        &['\u{38}']), ('\u{ff19}', &['\u{39}']), ('\u{ff1a}', &['\u{3a}']), ('\u{ff1b}',
+        &['\u{3b}']), ('\u{ff1c}', &['\u{3c}']), ('\u{ff1d}', &['\u{3d}']), ('\u{ff1e}',
+        &['\u{3e}']), ('\u{ff1f}', &['\u{3f}']), ('\u{ff20}', &['\u{40}']), ('\u{ff21}',
+        &['\u{41}']), ('\u{ff22}', &['\u{42}']), ('\u{ff23}', &['\u{43}']), ('\u{ff24}',
+        &['\u{44}']), ('\u{ff25}', &['\u{45}']), ('\u{ff26}', &['\u{46}']), ('\u{ff27}',
+        &['\u{47}']), ('\u{ff28}', &['\u{48}']), ('\u{ff29}', &['\u{49}']), ('\u{ff2a}',
+        &['\u{4a}']), ('\u{ff2b}', &['\u{4b}']), ('\u{ff2c}', &['\u{4c}']), ('\u{ff2d}',
+        &['\u{4d}']), ('\u{ff2e}', &['\u{4e}']), ('\u{ff2f}', &['\u{4f}']), ('\u{ff30}',
+        &['\u{50}']), ('\u{ff31}', &['\u{51}']), ('\u{ff32}', &['\u{52}']), ('\u{ff33}',
+        &['\u{53}']), ('\u{ff34}', &['\u{54}']), ('\u{ff35}', &['\u{55}']), ('\u{ff36}',
+        &['\u{56}']), ('\u{ff37}', &['\u{57}']), ('\u{ff38}', &['\u{58}']), ('\u{ff39}',
+        &['\u{59}']), ('\u{ff3a}', &['\u{5a}']), ('\u{ff3b}', &['\u{5b}']), ('\u{ff3c}',
+        &['\u{5c}']), ('\u{ff3d}', &['\u{5d}']), ('\u{ff3e}', &['\u{5e}']), ('\u{ff3f}',
+        &['\u{5f}']), ('\u{ff40}', &['\u{60}']), ('\u{ff41}', &['\u{61}']), ('\u{ff42}',
+        &['\u{62}']), ('\u{ff43}', &['\u{63}']), ('\u{ff44}', &['\u{64}']), ('\u{ff45}',
+        &['\u{65}']), ('\u{ff46}', &['\u{66}']), ('\u{ff47}', &['\u{67}']), ('\u{ff48}',
+        &['\u{68}']), ('\u{ff49}', &['\u{69}']), ('\u{ff4a}', &['\u{6a}']), ('\u{ff4b}',
+        &['\u{6b}']), ('\u{ff4c}', &['\u{6c}']), ('\u{ff4d}', &['\u{6d}']), ('\u{ff4e}',
+        &['\u{6e}']), ('\u{ff4f}', &['\u{6f}']), ('\u{ff50}', &['\u{70}']), ('\u{ff51}',
+        &['\u{71}']), ('\u{ff52}', &['\u{72}']), ('\u{ff53}', &['\u{73}']), ('\u{ff54}',
+        &['\u{74}']), ('\u{ff55}', &['\u{75}']), ('\u{ff56}', &['\u{76}']), ('\u{ff57}',
+        &['\u{77}']), ('\u{ff58}', &['\u{78}']), ('\u{ff59}', &['\u{79}']), ('\u{ff5a}',
+        &['\u{7a}']), ('\u{ff5b}', &['\u{7b}']), ('\u{ff5c}', &['\u{7c}']), ('\u{ff5d}',
+        &['\u{7d}']), ('\u{ff5e}', &['\u{7e}']), ('\u{ff5f}', &['\u{2985}']), ('\u{ff60}',
+        &['\u{2986}']), ('\u{ff61}', &['\u{3002}']), ('\u{ff62}', &['\u{300c}']), ('\u{ff63}',
+        &['\u{300d}']), ('\u{ff64}', &['\u{3001}']), ('\u{ff65}', &['\u{30fb}']), ('\u{ff66}',
+        &['\u{30f2}']), ('\u{ff67}', &['\u{30a1}']), ('\u{ff68}', &['\u{30a3}']), ('\u{ff69}',
+        &['\u{30a5}']), ('\u{ff6a}', &['\u{30a7}']), ('\u{ff6b}', &['\u{30a9}']), ('\u{ff6c}',
+        &['\u{30e3}']), ('\u{ff6d}', &['\u{30e5}']), ('\u{ff6e}', &['\u{30e7}']), ('\u{ff6f}',
+        &['\u{30c3}']), ('\u{ff70}', &['\u{30fc}']), ('\u{ff71}', &['\u{30a2}']), ('\u{ff72}',
+        &['\u{30a4}']), ('\u{ff73}', &['\u{30a6}']), ('\u{ff74}', &['\u{30a8}']), ('\u{ff75}',
+        &['\u{30aa}']), ('\u{ff76}', &['\u{30ab}']), ('\u{ff77}', &['\u{30ad}']), ('\u{ff78}',
+        &['\u{30af}']), ('\u{ff79}', &['\u{30b1}']), ('\u{ff7a}', &['\u{30b3}']), ('\u{ff7b}',
+        &['\u{30b5}']), ('\u{ff7c}', &['\u{30b7}']), ('\u{ff7d}', &['\u{30b9}']), ('\u{ff7e}',
+        &['\u{30bb}']), ('\u{ff7f}', &['\u{30bd}']), ('\u{ff80}', &['\u{30bf}']), ('\u{ff81}',
+        &['\u{30c1}']), ('\u{ff82}', &['\u{30c4}']), ('\u{ff83}', &['\u{30c6}']), ('\u{ff84}',
+        &['\u{30c8}']), ('\u{ff85}', &['\u{30ca}']), ('\u{ff86}', &['\u{30cb}']), ('\u{ff87}',
+        &['\u{30cc}']), ('\u{ff88}', &['\u{30cd}']), ('\u{ff89}', &['\u{30ce}']), ('\u{ff8a}',
+        &['\u{30cf}']), ('\u{ff8b}', &['\u{30d2}']), ('\u{ff8c}', &['\u{30d5}']), ('\u{ff8d}',
+        &['\u{30d8}']), ('\u{ff8e}', &['\u{30db}']), ('\u{ff8f}', &['\u{30de}']), ('\u{ff90}',
+        &['\u{30df}']), ('\u{ff91}', &['\u{30e0}']), ('\u{ff92}', &['\u{30e1}']), ('\u{ff93}',
+        &['\u{30e2}']), ('\u{ff94}', &['\u{30e4}']), ('\u{ff95}', &['\u{30e6}']), ('\u{ff96}',
+        &['\u{30e8}']), ('\u{ff97}', &['\u{30e9}']), ('\u{ff98}', &['\u{30ea}']), ('\u{ff99}',
+        &['\u{30eb}']), ('\u{ff9a}', &['\u{30ec}']), ('\u{ff9b}', &['\u{30ed}']), ('\u{ff9c}',
+        &['\u{30ef}']), ('\u{ff9d}', &['\u{30f3}']), ('\u{ff9e}', &['\u{3099}']), ('\u{ff9f}',
+        &['\u{309a}']), ('\u{ffa0}', &['\u{3164}']), ('\u{ffa1}', &['\u{3131}']), ('\u{ffa2}',
+        &['\u{3132}']), ('\u{ffa3}', &['\u{3133}']), ('\u{ffa4}', &['\u{3134}']), ('\u{ffa5}',
+        &['\u{3135}']), ('\u{ffa6}', &['\u{3136}']), ('\u{ffa7}', &['\u{3137}']), ('\u{ffa8}',
+        &['\u{3138}']), ('\u{ffa9}', &['\u{3139}']), ('\u{ffaa}', &['\u{313a}']), ('\u{ffab}',
+        &['\u{313b}']), ('\u{ffac}', &['\u{313c}']), ('\u{ffad}', &['\u{313d}']), ('\u{ffae}',
+        &['\u{313e}']), ('\u{ffaf}', &['\u{313f}']), ('\u{ffb0}', &['\u{3140}']), ('\u{ffb1}',
+        &['\u{3141}']), ('\u{ffb2}', &['\u{3142}']), ('\u{ffb3}', &['\u{3143}']), ('\u{ffb4}',
+        &['\u{3144}']), ('\u{ffb5}', &['\u{3145}']), ('\u{ffb6}', &['\u{3146}']), ('\u{ffb7}',
+        &['\u{3147}']), ('\u{ffb8}', &['\u{3148}']), ('\u{ffb9}', &['\u{3149}']), ('\u{ffba}',
+        &['\u{314a}']), ('\u{ffbb}', &['\u{314b}']), ('\u{ffbc}', &['\u{314c}']), ('\u{ffbd}',
+        &['\u{314d}']), ('\u{ffbe}', &['\u{314e}']), ('\u{ffc2}', &['\u{314f}']), ('\u{ffc3}',
+        &['\u{3150}']), ('\u{ffc4}', &['\u{3151}']), ('\u{ffc5}', &['\u{3152}']), ('\u{ffc6}',
+        &['\u{3153}']), ('\u{ffc7}', &['\u{3154}']), ('\u{ffca}', &['\u{3155}']), ('\u{ffcb}',
+        &['\u{3156}']), ('\u{ffcc}', &['\u{3157}']), ('\u{ffcd}', &['\u{3158}']), ('\u{ffce}',
+        &['\u{3159}']), ('\u{ffcf}', &['\u{315a}']), ('\u{ffd2}', &['\u{315b}']), ('\u{ffd3}',
+        &['\u{315c}']), ('\u{ffd4}', &['\u{315d}']), ('\u{ffd5}', &['\u{315e}']), ('\u{ffd6}',
+        &['\u{315f}']), ('\u{ffd7}', &['\u{3160}']), ('\u{ffda}', &['\u{3161}']), ('\u{ffdb}',
+        &['\u{3162}']), ('\u{ffdc}', &['\u{3163}']), ('\u{ffe0}', &['\u{a2}']), ('\u{ffe1}',
+        &['\u{a3}']), ('\u{ffe2}', &['\u{ac}']), ('\u{ffe3}', &['\u{af}']), ('\u{ffe4}',
+        &['\u{a6}']), ('\u{ffe5}', &['\u{a5}']), ('\u{ffe6}', &['\u{20a9}']), ('\u{ffe8}',
+        &['\u{2502}']), ('\u{ffe9}', &['\u{2190}']), ('\u{ffea}', &['\u{2191}']), ('\u{ffeb}',
+        &['\u{2192}']), ('\u{ffec}', &['\u{2193}']), ('\u{ffed}', &['\u{25a0}']), ('\u{ffee}',
+        &['\u{25cb}']), ('\u{1d400}', &['\u{41}']), ('\u{1d401}', &['\u{42}']), ('\u{1d402}',
+        &['\u{43}']), ('\u{1d403}', &['\u{44}']), ('\u{1d404}', &['\u{45}']), ('\u{1d405}',
+        &['\u{46}']), ('\u{1d406}', &['\u{47}']), ('\u{1d407}', &['\u{48}']), ('\u{1d408}',
+        &['\u{49}']), ('\u{1d409}', &['\u{4a}']), ('\u{1d40a}', &['\u{4b}']), ('\u{1d40b}',
+        &['\u{4c}']), ('\u{1d40c}', &['\u{4d}']), ('\u{1d40d}', &['\u{4e}']), ('\u{1d40e}',
+        &['\u{4f}']), ('\u{1d40f}', &['\u{50}']), ('\u{1d410}', &['\u{51}']), ('\u{1d411}',
+        &['\u{52}']), ('\u{1d412}', &['\u{53}']), ('\u{1d413}', &['\u{54}']), ('\u{1d414}',
+        &['\u{55}']), ('\u{1d415}', &['\u{56}']), ('\u{1d416}', &['\u{57}']), ('\u{1d417}',
+        &['\u{58}']), ('\u{1d418}', &['\u{59}']), ('\u{1d419}', &['\u{5a}']), ('\u{1d41a}',
+        &['\u{61}']), ('\u{1d41b}', &['\u{62}']), ('\u{1d41c}', &['\u{63}']), ('\u{1d41d}',
+        &['\u{64}']), ('\u{1d41e}', &['\u{65}']), ('\u{1d41f}', &['\u{66}']), ('\u{1d420}',
+        &['\u{67}']), ('\u{1d421}', &['\u{68}']), ('\u{1d422}', &['\u{69}']), ('\u{1d423}',
+        &['\u{6a}']), ('\u{1d424}', &['\u{6b}']), ('\u{1d425}', &['\u{6c}']), ('\u{1d426}',
+        &['\u{6d}']), ('\u{1d427}', &['\u{6e}']), ('\u{1d428}', &['\u{6f}']), ('\u{1d429}',
+        &['\u{70}']), ('\u{1d42a}', &['\u{71}']), ('\u{1d42b}', &['\u{72}']), ('\u{1d42c}',
+        &['\u{73}']), ('\u{1d42d}', &['\u{74}']), ('\u{1d42e}', &['\u{75}']), ('\u{1d42f}',
+        &['\u{76}']), ('\u{1d430}', &['\u{77}']), ('\u{1d431}', &['\u{78}']), ('\u{1d432}',
+        &['\u{79}']), ('\u{1d433}', &['\u{7a}']), ('\u{1d434}', &['\u{41}']), ('\u{1d435}',
+        &['\u{42}']), ('\u{1d436}', &['\u{43}']), ('\u{1d437}', &['\u{44}']), ('\u{1d438}',
+        &['\u{45}']), ('\u{1d439}', &['\u{46}']), ('\u{1d43a}', &['\u{47}']), ('\u{1d43b}',
+        &['\u{48}']), ('\u{1d43c}', &['\u{49}']), ('\u{1d43d}', &['\u{4a}']), ('\u{1d43e}',
+        &['\u{4b}']), ('\u{1d43f}', &['\u{4c}']), ('\u{1d440}', &['\u{4d}']), ('\u{1d441}',
+        &['\u{4e}']), ('\u{1d442}', &['\u{4f}']), ('\u{1d443}', &['\u{50}']), ('\u{1d444}',
+        &['\u{51}']), ('\u{1d445}', &['\u{52}']), ('\u{1d446}', &['\u{53}']), ('\u{1d447}',
+        &['\u{54}']), ('\u{1d448}', &['\u{55}']), ('\u{1d449}', &['\u{56}']), ('\u{1d44a}',
+        &['\u{57}']), ('\u{1d44b}', &['\u{58}']), ('\u{1d44c}', &['\u{59}']), ('\u{1d44d}',
+        &['\u{5a}']), ('\u{1d44e}', &['\u{61}']), ('\u{1d44f}', &['\u{62}']), ('\u{1d450}',
+        &['\u{63}']), ('\u{1d451}', &['\u{64}']), ('\u{1d452}', &['\u{65}']), ('\u{1d453}',
+        &['\u{66}']), ('\u{1d454}', &['\u{67}']), ('\u{1d456}', &['\u{69}']), ('\u{1d457}',
+        &['\u{6a}']), ('\u{1d458}', &['\u{6b}']), ('\u{1d459}', &['\u{6c}']), ('\u{1d45a}',
+        &['\u{6d}']), ('\u{1d45b}', &['\u{6e}']), ('\u{1d45c}', &['\u{6f}']), ('\u{1d45d}',
+        &['\u{70}']), ('\u{1d45e}', &['\u{71}']), ('\u{1d45f}', &['\u{72}']), ('\u{1d460}',
+        &['\u{73}']), ('\u{1d461}', &['\u{74}']), ('\u{1d462}', &['\u{75}']), ('\u{1d463}',
+        &['\u{76}']), ('\u{1d464}', &['\u{77}']), ('\u{1d465}', &['\u{78}']), ('\u{1d466}',
+        &['\u{79}']), ('\u{1d467}', &['\u{7a}']), ('\u{1d468}', &['\u{41}']), ('\u{1d469}',
+        &['\u{42}']), ('\u{1d46a}', &['\u{43}']), ('\u{1d46b}', &['\u{44}']), ('\u{1d46c}',
+        &['\u{45}']), ('\u{1d46d}', &['\u{46}']), ('\u{1d46e}', &['\u{47}']), ('\u{1d46f}',
+        &['\u{48}']), ('\u{1d470}', &['\u{49}']), ('\u{1d471}', &['\u{4a}']), ('\u{1d472}',
+        &['\u{4b}']), ('\u{1d473}', &['\u{4c}']), ('\u{1d474}', &['\u{4d}']), ('\u{1d475}',
+        &['\u{4e}']), ('\u{1d476}', &['\u{4f}']), ('\u{1d477}', &['\u{50}']), ('\u{1d478}',
+        &['\u{51}']), ('\u{1d479}', &['\u{52}']), ('\u{1d47a}', &['\u{53}']), ('\u{1d47b}',
+        &['\u{54}']), ('\u{1d47c}', &['\u{55}']), ('\u{1d47d}', &['\u{56}']), ('\u{1d47e}',
+        &['\u{57}']), ('\u{1d47f}', &['\u{58}']), ('\u{1d480}', &['\u{59}']), ('\u{1d481}',
+        &['\u{5a}']), ('\u{1d482}', &['\u{61}']), ('\u{1d483}', &['\u{62}']), ('\u{1d484}',
+        &['\u{63}']), ('\u{1d485}', &['\u{64}']), ('\u{1d486}', &['\u{65}']), ('\u{1d487}',
+        &['\u{66}']), ('\u{1d488}', &['\u{67}']), ('\u{1d489}', &['\u{68}']), ('\u{1d48a}',
+        &['\u{69}']), ('\u{1d48b}', &['\u{6a}']), ('\u{1d48c}', &['\u{6b}']), ('\u{1d48d}',
+        &['\u{6c}']), ('\u{1d48e}', &['\u{6d}']), ('\u{1d48f}', &['\u{6e}']), ('\u{1d490}',
+        &['\u{6f}']), ('\u{1d491}', &['\u{70}']), ('\u{1d492}', &['\u{71}']), ('\u{1d493}',
+        &['\u{72}']), ('\u{1d494}', &['\u{73}']), ('\u{1d495}', &['\u{74}']), ('\u{1d496}',
+        &['\u{75}']), ('\u{1d497}', &['\u{76}']), ('\u{1d498}', &['\u{77}']), ('\u{1d499}',
+        &['\u{78}']), ('\u{1d49a}', &['\u{79}']), ('\u{1d49b}', &['\u{7a}']), ('\u{1d49c}',
+        &['\u{41}']), ('\u{1d49e}', &['\u{43}']), ('\u{1d49f}', &['\u{44}']), ('\u{1d4a2}',
+        &['\u{47}']), ('\u{1d4a5}', &['\u{4a}']), ('\u{1d4a6}', &['\u{4b}']), ('\u{1d4a9}',
+        &['\u{4e}']), ('\u{1d4aa}', &['\u{4f}']), ('\u{1d4ab}', &['\u{50}']), ('\u{1d4ac}',
+        &['\u{51}']), ('\u{1d4ae}', &['\u{53}']), ('\u{1d4af}', &['\u{54}']), ('\u{1d4b0}',
+        &['\u{55}']), ('\u{1d4b1}', &['\u{56}']), ('\u{1d4b2}', &['\u{57}']), ('\u{1d4b3}',
+        &['\u{58}']), ('\u{1d4b4}', &['\u{59}']), ('\u{1d4b5}', &['\u{5a}']), ('\u{1d4b6}',
+        &['\u{61}']), ('\u{1d4b7}', &['\u{62}']), ('\u{1d4b8}', &['\u{63}']), ('\u{1d4b9}',
+        &['\u{64}']), ('\u{1d4bb}', &['\u{66}']), ('\u{1d4bd}', &['\u{68}']), ('\u{1d4be}',
+        &['\u{69}']), ('\u{1d4bf}', &['\u{6a}']), ('\u{1d4c0}', &['\u{6b}']), ('\u{1d4c1}',
+        &['\u{6c}']), ('\u{1d4c2}', &['\u{6d}']), ('\u{1d4c3}', &['\u{6e}']), ('\u{1d4c5}',
+        &['\u{70}']), ('\u{1d4c6}', &['\u{71}']), ('\u{1d4c7}', &['\u{72}']), ('\u{1d4c8}',
+        &['\u{73}']), ('\u{1d4c9}', &['\u{74}']), ('\u{1d4ca}', &['\u{75}']), ('\u{1d4cb}',
+        &['\u{76}']), ('\u{1d4cc}', &['\u{77}']), ('\u{1d4cd}', &['\u{78}']), ('\u{1d4ce}',
+        &['\u{79}']), ('\u{1d4cf}', &['\u{7a}']), ('\u{1d4d0}', &['\u{41}']), ('\u{1d4d1}',
+        &['\u{42}']), ('\u{1d4d2}', &['\u{43}']), ('\u{1d4d3}', &['\u{44}']), ('\u{1d4d4}',
+        &['\u{45}']), ('\u{1d4d5}', &['\u{46}']), ('\u{1d4d6}', &['\u{47}']), ('\u{1d4d7}',
+        &['\u{48}']), ('\u{1d4d8}', &['\u{49}']), ('\u{1d4d9}', &['\u{4a}']), ('\u{1d4da}',
+        &['\u{4b}']), ('\u{1d4db}', &['\u{4c}']), ('\u{1d4dc}', &['\u{4d}']), ('\u{1d4dd}',
+        &['\u{4e}']), ('\u{1d4de}', &['\u{4f}']), ('\u{1d4df}', &['\u{50}']), ('\u{1d4e0}',
+        &['\u{51}']), ('\u{1d4e1}', &['\u{52}']), ('\u{1d4e2}', &['\u{53}']), ('\u{1d4e3}',
+        &['\u{54}']), ('\u{1d4e4}', &['\u{55}']), ('\u{1d4e5}', &['\u{56}']), ('\u{1d4e6}',
+        &['\u{57}']), ('\u{1d4e7}', &['\u{58}']), ('\u{1d4e8}', &['\u{59}']), ('\u{1d4e9}',
+        &['\u{5a}']), ('\u{1d4ea}', &['\u{61}']), ('\u{1d4eb}', &['\u{62}']), ('\u{1d4ec}',
+        &['\u{63}']), ('\u{1d4ed}', &['\u{64}']), ('\u{1d4ee}', &['\u{65}']), ('\u{1d4ef}',
+        &['\u{66}']), ('\u{1d4f0}', &['\u{67}']), ('\u{1d4f1}', &['\u{68}']), ('\u{1d4f2}',
+        &['\u{69}']), ('\u{1d4f3}', &['\u{6a}']), ('\u{1d4f4}', &['\u{6b}']), ('\u{1d4f5}',
+        &['\u{6c}']), ('\u{1d4f6}', &['\u{6d}']), ('\u{1d4f7}', &['\u{6e}']), ('\u{1d4f8}',
+        &['\u{6f}']), ('\u{1d4f9}', &['\u{70}']), ('\u{1d4fa}', &['\u{71}']), ('\u{1d4fb}',
+        &['\u{72}']), ('\u{1d4fc}', &['\u{73}']), ('\u{1d4fd}', &['\u{74}']), ('\u{1d4fe}',
+        &['\u{75}']), ('\u{1d4ff}', &['\u{76}']), ('\u{1d500}', &['\u{77}']), ('\u{1d501}',
+        &['\u{78}']), ('\u{1d502}', &['\u{79}']), ('\u{1d503}', &['\u{7a}']), ('\u{1d504}',
+        &['\u{41}']), ('\u{1d505}', &['\u{42}']), ('\u{1d507}', &['\u{44}']), ('\u{1d508}',
+        &['\u{45}']), ('\u{1d509}', &['\u{46}']), ('\u{1d50a}', &['\u{47}']), ('\u{1d50d}',
+        &['\u{4a}']), ('\u{1d50e}', &['\u{4b}']), ('\u{1d50f}', &['\u{4c}']), ('\u{1d510}',
+        &['\u{4d}']), ('\u{1d511}', &['\u{4e}']), ('\u{1d512}', &['\u{4f}']), ('\u{1d513}',
+        &['\u{50}']), ('\u{1d514}', &['\u{51}']), ('\u{1d516}', &['\u{53}']), ('\u{1d517}',
+        &['\u{54}']), ('\u{1d518}', &['\u{55}']), ('\u{1d519}', &['\u{56}']), ('\u{1d51a}',
+        &['\u{57}']), ('\u{1d51b}', &['\u{58}']), ('\u{1d51c}', &['\u{59}']), ('\u{1d51e}',
+        &['\u{61}']), ('\u{1d51f}', &['\u{62}']), ('\u{1d520}', &['\u{63}']), ('\u{1d521}',
+        &['\u{64}']), ('\u{1d522}', &['\u{65}']), ('\u{1d523}', &['\u{66}']), ('\u{1d524}',
+        &['\u{67}']), ('\u{1d525}', &['\u{68}']), ('\u{1d526}', &['\u{69}']), ('\u{1d527}',
+        &['\u{6a}']), ('\u{1d528}', &['\u{6b}']), ('\u{1d529}', &['\u{6c}']), ('\u{1d52a}',
+        &['\u{6d}']), ('\u{1d52b}', &['\u{6e}']), ('\u{1d52c}', &['\u{6f}']), ('\u{1d52d}',
+        &['\u{70}']), ('\u{1d52e}', &['\u{71}']), ('\u{1d52f}', &['\u{72}']), ('\u{1d530}',
+        &['\u{73}']), ('\u{1d531}', &['\u{74}']), ('\u{1d532}', &['\u{75}']), ('\u{1d533}',
+        &['\u{76}']), ('\u{1d534}', &['\u{77}']), ('\u{1d535}', &['\u{78}']), ('\u{1d536}',
+        &['\u{79}']), ('\u{1d537}', &['\u{7a}']), ('\u{1d538}', &['\u{41}']), ('\u{1d539}',
+        &['\u{42}']), ('\u{1d53b}', &['\u{44}']), ('\u{1d53c}', &['\u{45}']), ('\u{1d53d}',
+        &['\u{46}']), ('\u{1d53e}', &['\u{47}']), ('\u{1d540}', &['\u{49}']), ('\u{1d541}',
+        &['\u{4a}']), ('\u{1d542}', &['\u{4b}']), ('\u{1d543}', &['\u{4c}']), ('\u{1d544}',
+        &['\u{4d}']), ('\u{1d546}', &['\u{4f}']), ('\u{1d54a}', &['\u{53}']), ('\u{1d54b}',
+        &['\u{54}']), ('\u{1d54c}', &['\u{55}']), ('\u{1d54d}', &['\u{56}']), ('\u{1d54e}',
+        &['\u{57}']), ('\u{1d54f}', &['\u{58}']), ('\u{1d550}', &['\u{59}']), ('\u{1d552}',
+        &['\u{61}']), ('\u{1d553}', &['\u{62}']), ('\u{1d554}', &['\u{63}']), ('\u{1d555}',
+        &['\u{64}']), ('\u{1d556}', &['\u{65}']), ('\u{1d557}', &['\u{66}']), ('\u{1d558}',
+        &['\u{67}']), ('\u{1d559}', &['\u{68}']), ('\u{1d55a}', &['\u{69}']), ('\u{1d55b}',
+        &['\u{6a}']), ('\u{1d55c}', &['\u{6b}']), ('\u{1d55d}', &['\u{6c}']), ('\u{1d55e}',
+        &['\u{6d}']), ('\u{1d55f}', &['\u{6e}']), ('\u{1d560}', &['\u{6f}']), ('\u{1d561}',
+        &['\u{70}']), ('\u{1d562}', &['\u{71}']), ('\u{1d563}', &['\u{72}']), ('\u{1d564}',
+        &['\u{73}']), ('\u{1d565}', &['\u{74}']), ('\u{1d566}', &['\u{75}']), ('\u{1d567}',
+        &['\u{76}']), ('\u{1d568}', &['\u{77}']), ('\u{1d569}', &['\u{78}']), ('\u{1d56a}',
+        &['\u{79}']), ('\u{1d56b}', &['\u{7a}']), ('\u{1d56c}', &['\u{41}']), ('\u{1d56d}',
+        &['\u{42}']), ('\u{1d56e}', &['\u{43}']), ('\u{1d56f}', &['\u{44}']), ('\u{1d570}',
+        &['\u{45}']), ('\u{1d571}', &['\u{46}']), ('\u{1d572}', &['\u{47}']), ('\u{1d573}',
+        &['\u{48}']), ('\u{1d574}', &['\u{49}']), ('\u{1d575}', &['\u{4a}']), ('\u{1d576}',
+        &['\u{4b}']), ('\u{1d577}', &['\u{4c}']), ('\u{1d578}', &['\u{4d}']), ('\u{1d579}',
+        &['\u{4e}']), ('\u{1d57a}', &['\u{4f}']), ('\u{1d57b}', &['\u{50}']), ('\u{1d57c}',
+        &['\u{51}']), ('\u{1d57d}', &['\u{52}']), ('\u{1d57e}', &['\u{53}']), ('\u{1d57f}',
+        &['\u{54}']), ('\u{1d580}', &['\u{55}']), ('\u{1d581}', &['\u{56}']), ('\u{1d582}',
+        &['\u{57}']), ('\u{1d583}', &['\u{58}']), ('\u{1d584}', &['\u{59}']), ('\u{1d585}',
+        &['\u{5a}']), ('\u{1d586}', &['\u{61}']), ('\u{1d587}', &['\u{62}']), ('\u{1d588}',
+        &['\u{63}']), ('\u{1d589}', &['\u{64}']), ('\u{1d58a}', &['\u{65}']), ('\u{1d58b}',
+        &['\u{66}']), ('\u{1d58c}', &['\u{67}']), ('\u{1d58d}', &['\u{68}']), ('\u{1d58e}',
+        &['\u{69}']), ('\u{1d58f}', &['\u{6a}']), ('\u{1d590}', &['\u{6b}']), ('\u{1d591}',
+        &['\u{6c}']), ('\u{1d592}', &['\u{6d}']), ('\u{1d593}', &['\u{6e}']), ('\u{1d594}',
+        &['\u{6f}']), ('\u{1d595}', &['\u{70}']), ('\u{1d596}', &['\u{71}']), ('\u{1d597}',
+        &['\u{72}']), ('\u{1d598}', &['\u{73}']), ('\u{1d599}', &['\u{74}']), ('\u{1d59a}',
+        &['\u{75}']), ('\u{1d59b}', &['\u{76}']), ('\u{1d59c}', &['\u{77}']), ('\u{1d59d}',
+        &['\u{78}']), ('\u{1d59e}', &['\u{79}']), ('\u{1d59f}', &['\u{7a}']), ('\u{1d5a0}',
+        &['\u{41}']), ('\u{1d5a1}', &['\u{42}']), ('\u{1d5a2}', &['\u{43}']), ('\u{1d5a3}',
+        &['\u{44}']), ('\u{1d5a4}', &['\u{45}']), ('\u{1d5a5}', &['\u{46}']), ('\u{1d5a6}',
+        &['\u{47}']), ('\u{1d5a7}', &['\u{48}']), ('\u{1d5a8}', &['\u{49}']), ('\u{1d5a9}',
+        &['\u{4a}']), ('\u{1d5aa}', &['\u{4b}']), ('\u{1d5ab}', &['\u{4c}']), ('\u{1d5ac}',
+        &['\u{4d}']), ('\u{1d5ad}', &['\u{4e}']), ('\u{1d5ae}', &['\u{4f}']), ('\u{1d5af}',
+        &['\u{50}']), ('\u{1d5b0}', &['\u{51}']), ('\u{1d5b1}', &['\u{52}']), ('\u{1d5b2}',
+        &['\u{53}']), ('\u{1d5b3}', &['\u{54}']), ('\u{1d5b4}', &['\u{55}']), ('\u{1d5b5}',
+        &['\u{56}']), ('\u{1d5b6}', &['\u{57}']), ('\u{1d5b7}', &['\u{58}']), ('\u{1d5b8}',
+        &['\u{59}']), ('\u{1d5b9}', &['\u{5a}']), ('\u{1d5ba}', &['\u{61}']), ('\u{1d5bb}',
+        &['\u{62}']), ('\u{1d5bc}', &['\u{63}']), ('\u{1d5bd}', &['\u{64}']), ('\u{1d5be}',
+        &['\u{65}']), ('\u{1d5bf}', &['\u{66}']), ('\u{1d5c0}', &['\u{67}']), ('\u{1d5c1}',
+        &['\u{68}']), ('\u{1d5c2}', &['\u{69}']), ('\u{1d5c3}', &['\u{6a}']), ('\u{1d5c4}',
+        &['\u{6b}']), ('\u{1d5c5}', &['\u{6c}']), ('\u{1d5c6}', &['\u{6d}']), ('\u{1d5c7}',
+        &['\u{6e}']), ('\u{1d5c8}', &['\u{6f}']), ('\u{1d5c9}', &['\u{70}']), ('\u{1d5ca}',
+        &['\u{71}']), ('\u{1d5cb}', &['\u{72}']), ('\u{1d5cc}', &['\u{73}']), ('\u{1d5cd}',
+        &['\u{74}']), ('\u{1d5ce}', &['\u{75}']), ('\u{1d5cf}', &['\u{76}']), ('\u{1d5d0}',
+        &['\u{77}']), ('\u{1d5d1}', &['\u{78}']), ('\u{1d5d2}', &['\u{79}']), ('\u{1d5d3}',
+        &['\u{7a}']), ('\u{1d5d4}', &['\u{41}']), ('\u{1d5d5}', &['\u{42}']), ('\u{1d5d6}',
+        &['\u{43}']), ('\u{1d5d7}', &['\u{44}']), ('\u{1d5d8}', &['\u{45}']), ('\u{1d5d9}',
+        &['\u{46}']), ('\u{1d5da}', &['\u{47}']), ('\u{1d5db}', &['\u{48}']), ('\u{1d5dc}',
+        &['\u{49}']), ('\u{1d5dd}', &['\u{4a}']), ('\u{1d5de}', &['\u{4b}']), ('\u{1d5df}',
+        &['\u{4c}']), ('\u{1d5e0}', &['\u{4d}']), ('\u{1d5e1}', &['\u{4e}']), ('\u{1d5e2}',
+        &['\u{4f}']), ('\u{1d5e3}', &['\u{50}']), ('\u{1d5e4}', &['\u{51}']), ('\u{1d5e5}',
+        &['\u{52}']), ('\u{1d5e6}', &['\u{53}']), ('\u{1d5e7}', &['\u{54}']), ('\u{1d5e8}',
+        &['\u{55}']), ('\u{1d5e9}', &['\u{56}']), ('\u{1d5ea}', &['\u{57}']), ('\u{1d5eb}',
+        &['\u{58}']), ('\u{1d5ec}', &['\u{59}']), ('\u{1d5ed}', &['\u{5a}']), ('\u{1d5ee}',
+        &['\u{61}']), ('\u{1d5ef}', &['\u{62}']), ('\u{1d5f0}', &['\u{63}']), ('\u{1d5f1}',
+        &['\u{64}']), ('\u{1d5f2}', &['\u{65}']), ('\u{1d5f3}', &['\u{66}']), ('\u{1d5f4}',
+        &['\u{67}']), ('\u{1d5f5}', &['\u{68}']), ('\u{1d5f6}', &['\u{69}']), ('\u{1d5f7}',
+        &['\u{6a}']), ('\u{1d5f8}', &['\u{6b}']), ('\u{1d5f9}', &['\u{6c}']), ('\u{1d5fa}',
+        &['\u{6d}']), ('\u{1d5fb}', &['\u{6e}']), ('\u{1d5fc}', &['\u{6f}']), ('\u{1d5fd}',
+        &['\u{70}']), ('\u{1d5fe}', &['\u{71}']), ('\u{1d5ff}', &['\u{72}']), ('\u{1d600}',
+        &['\u{73}']), ('\u{1d601}', &['\u{74}']), ('\u{1d602}', &['\u{75}']), ('\u{1d603}',
+        &['\u{76}']), ('\u{1d604}', &['\u{77}']), ('\u{1d605}', &['\u{78}']), ('\u{1d606}',
+        &['\u{79}']), ('\u{1d607}', &['\u{7a}']), ('\u{1d608}', &['\u{41}']), ('\u{1d609}',
+        &['\u{42}']), ('\u{1d60a}', &['\u{43}']), ('\u{1d60b}', &['\u{44}']), ('\u{1d60c}',
+        &['\u{45}']), ('\u{1d60d}', &['\u{46}']), ('\u{1d60e}', &['\u{47}']), ('\u{1d60f}',
+        &['\u{48}']), ('\u{1d610}', &['\u{49}']), ('\u{1d611}', &['\u{4a}']), ('\u{1d612}',
+        &['\u{4b}']), ('\u{1d613}', &['\u{4c}']), ('\u{1d614}', &['\u{4d}']), ('\u{1d615}',
+        &['\u{4e}']), ('\u{1d616}', &['\u{4f}']), ('\u{1d617}', &['\u{50}']), ('\u{1d618}',
+        &['\u{51}']), ('\u{1d619}', &['\u{52}']), ('\u{1d61a}', &['\u{53}']), ('\u{1d61b}',
+        &['\u{54}']), ('\u{1d61c}', &['\u{55}']), ('\u{1d61d}', &['\u{56}']), ('\u{1d61e}',
+        &['\u{57}']), ('\u{1d61f}', &['\u{58}']), ('\u{1d620}', &['\u{59}']), ('\u{1d621}',
+        &['\u{5a}']), ('\u{1d622}', &['\u{61}']), ('\u{1d623}', &['\u{62}']), ('\u{1d624}',
+        &['\u{63}']), ('\u{1d625}', &['\u{64}']), ('\u{1d626}', &['\u{65}']), ('\u{1d627}',
+        &['\u{66}']), ('\u{1d628}', &['\u{67}']), ('\u{1d629}', &['\u{68}']), ('\u{1d62a}',
+        &['\u{69}']), ('\u{1d62b}', &['\u{6a}']), ('\u{1d62c}', &['\u{6b}']), ('\u{1d62d}',
+        &['\u{6c}']), ('\u{1d62e}', &['\u{6d}']), ('\u{1d62f}', &['\u{6e}']), ('\u{1d630}',
+        &['\u{6f}']), ('\u{1d631}', &['\u{70}']), ('\u{1d632}', &['\u{71}']), ('\u{1d633}',
+        &['\u{72}']), ('\u{1d634}', &['\u{73}']), ('\u{1d635}', &['\u{74}']), ('\u{1d636}',
+        &['\u{75}']), ('\u{1d637}', &['\u{76}']), ('\u{1d638}', &['\u{77}']), ('\u{1d639}',
+        &['\u{78}']), ('\u{1d63a}', &['\u{79}']), ('\u{1d63b}', &['\u{7a}']), ('\u{1d63c}',
+        &['\u{41}']), ('\u{1d63d}', &['\u{42}']), ('\u{1d63e}', &['\u{43}']), ('\u{1d63f}',
+        &['\u{44}']), ('\u{1d640}', &['\u{45}']), ('\u{1d641}', &['\u{46}']), ('\u{1d642}',
+        &['\u{47}']), ('\u{1d643}', &['\u{48}']), ('\u{1d644}', &['\u{49}']), ('\u{1d645}',
+        &['\u{4a}']), ('\u{1d646}', &['\u{4b}']), ('\u{1d647}', &['\u{4c}']), ('\u{1d648}',
+        &['\u{4d}']), ('\u{1d649}', &['\u{4e}']), ('\u{1d64a}', &['\u{4f}']), ('\u{1d64b}',
+        &['\u{50}']), ('\u{1d64c}', &['\u{51}']), ('\u{1d64d}', &['\u{52}']), ('\u{1d64e}',
+        &['\u{53}']), ('\u{1d64f}', &['\u{54}']), ('\u{1d650}', &['\u{55}']), ('\u{1d651}',
+        &['\u{56}']), ('\u{1d652}', &['\u{57}']), ('\u{1d653}', &['\u{58}']), ('\u{1d654}',
+        &['\u{59}']), ('\u{1d655}', &['\u{5a}']), ('\u{1d656}', &['\u{61}']), ('\u{1d657}',
+        &['\u{62}']), ('\u{1d658}', &['\u{63}']), ('\u{1d659}', &['\u{64}']), ('\u{1d65a}',
+        &['\u{65}']), ('\u{1d65b}', &['\u{66}']), ('\u{1d65c}', &['\u{67}']), ('\u{1d65d}',
+        &['\u{68}']), ('\u{1d65e}', &['\u{69}']), ('\u{1d65f}', &['\u{6a}']), ('\u{1d660}',
+        &['\u{6b}']), ('\u{1d661}', &['\u{6c}']), ('\u{1d662}', &['\u{6d}']), ('\u{1d663}',
+        &['\u{6e}']), ('\u{1d664}', &['\u{6f}']), ('\u{1d665}', &['\u{70}']), ('\u{1d666}',
+        &['\u{71}']), ('\u{1d667}', &['\u{72}']), ('\u{1d668}', &['\u{73}']), ('\u{1d669}',
+        &['\u{74}']), ('\u{1d66a}', &['\u{75}']), ('\u{1d66b}', &['\u{76}']), ('\u{1d66c}',
+        &['\u{77}']), ('\u{1d66d}', &['\u{78}']), ('\u{1d66e}', &['\u{79}']), ('\u{1d66f}',
+        &['\u{7a}']), ('\u{1d670}', &['\u{41}']), ('\u{1d671}', &['\u{42}']), ('\u{1d672}',
+        &['\u{43}']), ('\u{1d673}', &['\u{44}']), ('\u{1d674}', &['\u{45}']), ('\u{1d675}',
+        &['\u{46}']), ('\u{1d676}', &['\u{47}']), ('\u{1d677}', &['\u{48}']), ('\u{1d678}',
+        &['\u{49}']), ('\u{1d679}', &['\u{4a}']), ('\u{1d67a}', &['\u{4b}']), ('\u{1d67b}',
+        &['\u{4c}']), ('\u{1d67c}', &['\u{4d}']), ('\u{1d67d}', &['\u{4e}']), ('\u{1d67e}',
+        &['\u{4f}']), ('\u{1d67f}', &['\u{50}']), ('\u{1d680}', &['\u{51}']), ('\u{1d681}',
+        &['\u{52}']), ('\u{1d682}', &['\u{53}']), ('\u{1d683}', &['\u{54}']), ('\u{1d684}',
+        &['\u{55}']), ('\u{1d685}', &['\u{56}']), ('\u{1d686}', &['\u{57}']), ('\u{1d687}',
+        &['\u{58}']), ('\u{1d688}', &['\u{59}']), ('\u{1d689}', &['\u{5a}']), ('\u{1d68a}',
+        &['\u{61}']), ('\u{1d68b}', &['\u{62}']), ('\u{1d68c}', &['\u{63}']), ('\u{1d68d}',
+        &['\u{64}']), ('\u{1d68e}', &['\u{65}']), ('\u{1d68f}', &['\u{66}']), ('\u{1d690}',
+        &['\u{67}']), ('\u{1d691}', &['\u{68}']), ('\u{1d692}', &['\u{69}']), ('\u{1d693}',
+        &['\u{6a}']), ('\u{1d694}', &['\u{6b}']), ('\u{1d695}', &['\u{6c}']), ('\u{1d696}',
+        &['\u{6d}']), ('\u{1d697}', &['\u{6e}']), ('\u{1d698}', &['\u{6f}']), ('\u{1d699}',
+        &['\u{70}']), ('\u{1d69a}', &['\u{71}']), ('\u{1d69b}', &['\u{72}']), ('\u{1d69c}',
+        &['\u{73}']), ('\u{1d69d}', &['\u{74}']), ('\u{1d69e}', &['\u{75}']), ('\u{1d69f}',
+        &['\u{76}']), ('\u{1d6a0}', &['\u{77}']), ('\u{1d6a1}', &['\u{78}']), ('\u{1d6a2}',
+        &['\u{79}']), ('\u{1d6a3}', &['\u{7a}']), ('\u{1d6a4}', &['\u{131}']), ('\u{1d6a5}',
+        &['\u{237}']), ('\u{1d6a8}', &['\u{391}']), ('\u{1d6a9}', &['\u{392}']), ('\u{1d6aa}',
+        &['\u{393}']), ('\u{1d6ab}', &['\u{394}']), ('\u{1d6ac}', &['\u{395}']), ('\u{1d6ad}',
+        &['\u{396}']), ('\u{1d6ae}', &['\u{397}']), ('\u{1d6af}', &['\u{398}']), ('\u{1d6b0}',
+        &['\u{399}']), ('\u{1d6b1}', &['\u{39a}']), ('\u{1d6b2}', &['\u{39b}']), ('\u{1d6b3}',
+        &['\u{39c}']), ('\u{1d6b4}', &['\u{39d}']), ('\u{1d6b5}', &['\u{39e}']), ('\u{1d6b6}',
+        &['\u{39f}']), ('\u{1d6b7}', &['\u{3a0}']), ('\u{1d6b8}', &['\u{3a1}']), ('\u{1d6b9}',
+        &['\u{3f4}']), ('\u{1d6ba}', &['\u{3a3}']), ('\u{1d6bb}', &['\u{3a4}']), ('\u{1d6bc}',
+        &['\u{3a5}']), ('\u{1d6bd}', &['\u{3a6}']), ('\u{1d6be}', &['\u{3a7}']), ('\u{1d6bf}',
+        &['\u{3a8}']), ('\u{1d6c0}', &['\u{3a9}']), ('\u{1d6c1}', &['\u{2207}']), ('\u{1d6c2}',
+        &['\u{3b1}']), ('\u{1d6c3}', &['\u{3b2}']), ('\u{1d6c4}', &['\u{3b3}']), ('\u{1d6c5}',
+        &['\u{3b4}']), ('\u{1d6c6}', &['\u{3b5}']), ('\u{1d6c7}', &['\u{3b6}']), ('\u{1d6c8}',
+        &['\u{3b7}']), ('\u{1d6c9}', &['\u{3b8}']), ('\u{1d6ca}', &['\u{3b9}']), ('\u{1d6cb}',
+        &['\u{3ba}']), ('\u{1d6cc}', &['\u{3bb}']), ('\u{1d6cd}', &['\u{3bc}']), ('\u{1d6ce}',
+        &['\u{3bd}']), ('\u{1d6cf}', &['\u{3be}']), ('\u{1d6d0}', &['\u{3bf}']), ('\u{1d6d1}',
+        &['\u{3c0}']), ('\u{1d6d2}', &['\u{3c1}']), ('\u{1d6d3}', &['\u{3c2}']), ('\u{1d6d4}',
+        &['\u{3c3}']), ('\u{1d6d5}', &['\u{3c4}']), ('\u{1d6d6}', &['\u{3c5}']), ('\u{1d6d7}',
+        &['\u{3c6}']), ('\u{1d6d8}', &['\u{3c7}']), ('\u{1d6d9}', &['\u{3c8}']), ('\u{1d6da}',
+        &['\u{3c9}']), ('\u{1d6db}', &['\u{2202}']), ('\u{1d6dc}', &['\u{3f5}']), ('\u{1d6dd}',
+        &['\u{3d1}']), ('\u{1d6de}', &['\u{3f0}']), ('\u{1d6df}', &['\u{3d5}']), ('\u{1d6e0}',
+        &['\u{3f1}']), ('\u{1d6e1}', &['\u{3d6}']), ('\u{1d6e2}', &['\u{391}']), ('\u{1d6e3}',
+        &['\u{392}']), ('\u{1d6e4}', &['\u{393}']), ('\u{1d6e5}', &['\u{394}']), ('\u{1d6e6}',
+        &['\u{395}']), ('\u{1d6e7}', &['\u{396}']), ('\u{1d6e8}', &['\u{397}']), ('\u{1d6e9}',
+        &['\u{398}']), ('\u{1d6ea}', &['\u{399}']), ('\u{1d6eb}', &['\u{39a}']), ('\u{1d6ec}',
+        &['\u{39b}']), ('\u{1d6ed}', &['\u{39c}']), ('\u{1d6ee}', &['\u{39d}']), ('\u{1d6ef}',
+        &['\u{39e}']), ('\u{1d6f0}', &['\u{39f}']), ('\u{1d6f1}', &['\u{3a0}']), ('\u{1d6f2}',
+        &['\u{3a1}']), ('\u{1d6f3}', &['\u{3f4}']), ('\u{1d6f4}', &['\u{3a3}']), ('\u{1d6f5}',
+        &['\u{3a4}']), ('\u{1d6f6}', &['\u{3a5}']), ('\u{1d6f7}', &['\u{3a6}']), ('\u{1d6f8}',
+        &['\u{3a7}']), ('\u{1d6f9}', &['\u{3a8}']), ('\u{1d6fa}', &['\u{3a9}']), ('\u{1d6fb}',
+        &['\u{2207}']), ('\u{1d6fc}', &['\u{3b1}']), ('\u{1d6fd}', &['\u{3b2}']), ('\u{1d6fe}',
+        &['\u{3b3}']), ('\u{1d6ff}', &['\u{3b4}']), ('\u{1d700}', &['\u{3b5}']), ('\u{1d701}',
+        &['\u{3b6}']), ('\u{1d702}', &['\u{3b7}']), ('\u{1d703}', &['\u{3b8}']), ('\u{1d704}',
+        &['\u{3b9}']), ('\u{1d705}', &['\u{3ba}']), ('\u{1d706}', &['\u{3bb}']), ('\u{1d707}',
+        &['\u{3bc}']), ('\u{1d708}', &['\u{3bd}']), ('\u{1d709}', &['\u{3be}']), ('\u{1d70a}',
+        &['\u{3bf}']), ('\u{1d70b}', &['\u{3c0}']), ('\u{1d70c}', &['\u{3c1}']), ('\u{1d70d}',
+        &['\u{3c2}']), ('\u{1d70e}', &['\u{3c3}']), ('\u{1d70f}', &['\u{3c4}']), ('\u{1d710}',
+        &['\u{3c5}']), ('\u{1d711}', &['\u{3c6}']), ('\u{1d712}', &['\u{3c7}']), ('\u{1d713}',
+        &['\u{3c8}']), ('\u{1d714}', &['\u{3c9}']), ('\u{1d715}', &['\u{2202}']), ('\u{1d716}',
+        &['\u{3f5}']), ('\u{1d717}', &['\u{3d1}']), ('\u{1d718}', &['\u{3f0}']), ('\u{1d719}',
+        &['\u{3d5}']), ('\u{1d71a}', &['\u{3f1}']), ('\u{1d71b}', &['\u{3d6}']), ('\u{1d71c}',
+        &['\u{391}']), ('\u{1d71d}', &['\u{392}']), ('\u{1d71e}', &['\u{393}']), ('\u{1d71f}',
+        &['\u{394}']), ('\u{1d720}', &['\u{395}']), ('\u{1d721}', &['\u{396}']), ('\u{1d722}',
+        &['\u{397}']), ('\u{1d723}', &['\u{398}']), ('\u{1d724}', &['\u{399}']), ('\u{1d725}',
+        &['\u{39a}']), ('\u{1d726}', &['\u{39b}']), ('\u{1d727}', &['\u{39c}']), ('\u{1d728}',
+        &['\u{39d}']), ('\u{1d729}', &['\u{39e}']), ('\u{1d72a}', &['\u{39f}']), ('\u{1d72b}',
+        &['\u{3a0}']), ('\u{1d72c}', &['\u{3a1}']), ('\u{1d72d}', &['\u{3f4}']), ('\u{1d72e}',
+        &['\u{3a3}']), ('\u{1d72f}', &['\u{3a4}']), ('\u{1d730}', &['\u{3a5}']), ('\u{1d731}',
+        &['\u{3a6}']), ('\u{1d732}', &['\u{3a7}']), ('\u{1d733}', &['\u{3a8}']), ('\u{1d734}',
+        &['\u{3a9}']), ('\u{1d735}', &['\u{2207}']), ('\u{1d736}', &['\u{3b1}']), ('\u{1d737}',
+        &['\u{3b2}']), ('\u{1d738}', &['\u{3b3}']), ('\u{1d739}', &['\u{3b4}']), ('\u{1d73a}',
+        &['\u{3b5}']), ('\u{1d73b}', &['\u{3b6}']), ('\u{1d73c}', &['\u{3b7}']), ('\u{1d73d}',
+        &['\u{3b8}']), ('\u{1d73e}', &['\u{3b9}']), ('\u{1d73f}', &['\u{3ba}']), ('\u{1d740}',
+        &['\u{3bb}']), ('\u{1d741}', &['\u{3bc}']), ('\u{1d742}', &['\u{3bd}']), ('\u{1d743}',
+        &['\u{3be}']), ('\u{1d744}', &['\u{3bf}']), ('\u{1d745}', &['\u{3c0}']), ('\u{1d746}',
+        &['\u{3c1}']), ('\u{1d747}', &['\u{3c2}']), ('\u{1d748}', &['\u{3c3}']), ('\u{1d749}',
+        &['\u{3c4}']), ('\u{1d74a}', &['\u{3c5}']), ('\u{1d74b}', &['\u{3c6}']), ('\u{1d74c}',
+        &['\u{3c7}']), ('\u{1d74d}', &['\u{3c8}']), ('\u{1d74e}', &['\u{3c9}']), ('\u{1d74f}',
+        &['\u{2202}']), ('\u{1d750}', &['\u{3f5}']), ('\u{1d751}', &['\u{3d1}']), ('\u{1d752}',
+        &['\u{3f0}']), ('\u{1d753}', &['\u{3d5}']), ('\u{1d754}', &['\u{3f1}']), ('\u{1d755}',
+        &['\u{3d6}']), ('\u{1d756}', &['\u{391}']), ('\u{1d757}', &['\u{392}']), ('\u{1d758}',
+        &['\u{393}']), ('\u{1d759}', &['\u{394}']), ('\u{1d75a}', &['\u{395}']), ('\u{1d75b}',
+        &['\u{396}']), ('\u{1d75c}', &['\u{397}']), ('\u{1d75d}', &['\u{398}']), ('\u{1d75e}',
+        &['\u{399}']), ('\u{1d75f}', &['\u{39a}']), ('\u{1d760}', &['\u{39b}']), ('\u{1d761}',
+        &['\u{39c}']), ('\u{1d762}', &['\u{39d}']), ('\u{1d763}', &['\u{39e}']), ('\u{1d764}',
+        &['\u{39f}']), ('\u{1d765}', &['\u{3a0}']), ('\u{1d766}', &['\u{3a1}']), ('\u{1d767}',
+        &['\u{3f4}']), ('\u{1d768}', &['\u{3a3}']), ('\u{1d769}', &['\u{3a4}']), ('\u{1d76a}',
+        &['\u{3a5}']), ('\u{1d76b}', &['\u{3a6}']), ('\u{1d76c}', &['\u{3a7}']), ('\u{1d76d}',
+        &['\u{3a8}']), ('\u{1d76e}', &['\u{3a9}']), ('\u{1d76f}', &['\u{2207}']), ('\u{1d770}',
+        &['\u{3b1}']), ('\u{1d771}', &['\u{3b2}']), ('\u{1d772}', &['\u{3b3}']), ('\u{1d773}',
+        &['\u{3b4}']), ('\u{1d774}', &['\u{3b5}']), ('\u{1d775}', &['\u{3b6}']), ('\u{1d776}',
+        &['\u{3b7}']), ('\u{1d777}', &['\u{3b8}']), ('\u{1d778}', &['\u{3b9}']), ('\u{1d779}',
+        &['\u{3ba}']), ('\u{1d77a}', &['\u{3bb}']), ('\u{1d77b}', &['\u{3bc}']), ('\u{1d77c}',
+        &['\u{3bd}']), ('\u{1d77d}', &['\u{3be}']), ('\u{1d77e}', &['\u{3bf}']), ('\u{1d77f}',
+        &['\u{3c0}']), ('\u{1d780}', &['\u{3c1}']), ('\u{1d781}', &['\u{3c2}']), ('\u{1d782}',
+        &['\u{3c3}']), ('\u{1d783}', &['\u{3c4}']), ('\u{1d784}', &['\u{3c5}']), ('\u{1d785}',
+        &['\u{3c6}']), ('\u{1d786}', &['\u{3c7}']), ('\u{1d787}', &['\u{3c8}']), ('\u{1d788}',
+        &['\u{3c9}']), ('\u{1d789}', &['\u{2202}']), ('\u{1d78a}', &['\u{3f5}']), ('\u{1d78b}',
+        &['\u{3d1}']), ('\u{1d78c}', &['\u{3f0}']), ('\u{1d78d}', &['\u{3d5}']), ('\u{1d78e}',
+        &['\u{3f1}']), ('\u{1d78f}', &['\u{3d6}']), ('\u{1d790}', &['\u{391}']), ('\u{1d791}',
+        &['\u{392}']), ('\u{1d792}', &['\u{393}']), ('\u{1d793}', &['\u{394}']), ('\u{1d794}',
+        &['\u{395}']), ('\u{1d795}', &['\u{396}']), ('\u{1d796}', &['\u{397}']), ('\u{1d797}',
+        &['\u{398}']), ('\u{1d798}', &['\u{399}']), ('\u{1d799}', &['\u{39a}']), ('\u{1d79a}',
+        &['\u{39b}']), ('\u{1d79b}', &['\u{39c}']), ('\u{1d79c}', &['\u{39d}']), ('\u{1d79d}',
+        &['\u{39e}']), ('\u{1d79e}', &['\u{39f}']), ('\u{1d79f}', &['\u{3a0}']), ('\u{1d7a0}',
+        &['\u{3a1}']), ('\u{1d7a1}', &['\u{3f4}']), ('\u{1d7a2}', &['\u{3a3}']), ('\u{1d7a3}',
+        &['\u{3a4}']), ('\u{1d7a4}', &['\u{3a5}']), ('\u{1d7a5}', &['\u{3a6}']), ('\u{1d7a6}',
+        &['\u{3a7}']), ('\u{1d7a7}', &['\u{3a8}']), ('\u{1d7a8}', &['\u{3a9}']), ('\u{1d7a9}',
+        &['\u{2207}']), ('\u{1d7aa}', &['\u{3b1}']), ('\u{1d7ab}', &['\u{3b2}']), ('\u{1d7ac}',
+        &['\u{3b3}']), ('\u{1d7ad}', &['\u{3b4}']), ('\u{1d7ae}', &['\u{3b5}']), ('\u{1d7af}',
+        &['\u{3b6}']), ('\u{1d7b0}', &['\u{3b7}']), ('\u{1d7b1}', &['\u{3b8}']), ('\u{1d7b2}',
+        &['\u{3b9}']), ('\u{1d7b3}', &['\u{3ba}']), ('\u{1d7b4}', &['\u{3bb}']), ('\u{1d7b5}',
+        &['\u{3bc}']), ('\u{1d7b6}', &['\u{3bd}']), ('\u{1d7b7}', &['\u{3be}']), ('\u{1d7b8}',
+        &['\u{3bf}']), ('\u{1d7b9}', &['\u{3c0}']), ('\u{1d7ba}', &['\u{3c1}']), ('\u{1d7bb}',
+        &['\u{3c2}']), ('\u{1d7bc}', &['\u{3c3}']), ('\u{1d7bd}', &['\u{3c4}']), ('\u{1d7be}',
+        &['\u{3c5}']), ('\u{1d7bf}', &['\u{3c6}']), ('\u{1d7c0}', &['\u{3c7}']), ('\u{1d7c1}',
+        &['\u{3c8}']), ('\u{1d7c2}', &['\u{3c9}']), ('\u{1d7c3}', &['\u{2202}']), ('\u{1d7c4}',
+        &['\u{3f5}']), ('\u{1d7c5}', &['\u{3d1}']), ('\u{1d7c6}', &['\u{3f0}']), ('\u{1d7c7}',
+        &['\u{3d5}']), ('\u{1d7c8}', &['\u{3f1}']), ('\u{1d7c9}', &['\u{3d6}']), ('\u{1d7ca}',
+        &['\u{3dc}']), ('\u{1d7cb}', &['\u{3dd}']), ('\u{1d7ce}', &['\u{30}']), ('\u{1d7cf}',
+        &['\u{31}']), ('\u{1d7d0}', &['\u{32}']), ('\u{1d7d1}', &['\u{33}']), ('\u{1d7d2}',
+        &['\u{34}']), ('\u{1d7d3}', &['\u{35}']), ('\u{1d7d4}', &['\u{36}']), ('\u{1d7d5}',
+        &['\u{37}']), ('\u{1d7d6}', &['\u{38}']), ('\u{1d7d7}', &['\u{39}']), ('\u{1d7d8}',
+        &['\u{30}']), ('\u{1d7d9}', &['\u{31}']), ('\u{1d7da}', &['\u{32}']), ('\u{1d7db}',
+        &['\u{33}']), ('\u{1d7dc}', &['\u{34}']), ('\u{1d7dd}', &['\u{35}']), ('\u{1d7de}',
+        &['\u{36}']), ('\u{1d7df}', &['\u{37}']), ('\u{1d7e0}', &['\u{38}']), ('\u{1d7e1}',
+        &['\u{39}']), ('\u{1d7e2}', &['\u{30}']), ('\u{1d7e3}', &['\u{31}']), ('\u{1d7e4}',
+        &['\u{32}']), ('\u{1d7e5}', &['\u{33}']), ('\u{1d7e6}', &['\u{34}']), ('\u{1d7e7}',
+        &['\u{35}']), ('\u{1d7e8}', &['\u{36}']), ('\u{1d7e9}', &['\u{37}']), ('\u{1d7ea}',
+        &['\u{38}']), ('\u{1d7eb}', &['\u{39}']), ('\u{1d7ec}', &['\u{30}']), ('\u{1d7ed}',
+        &['\u{31}']), ('\u{1d7ee}', &['\u{32}']), ('\u{1d7ef}', &['\u{33}']), ('\u{1d7f0}',
+        &['\u{34}']), ('\u{1d7f1}', &['\u{35}']), ('\u{1d7f2}', &['\u{36}']), ('\u{1d7f3}',
+        &['\u{37}']), ('\u{1d7f4}', &['\u{38}']), ('\u{1d7f5}', &['\u{39}']), ('\u{1d7f6}',
+        &['\u{30}']), ('\u{1d7f7}', &['\u{31}']), ('\u{1d7f8}', &['\u{32}']), ('\u{1d7f9}',
+        &['\u{33}']), ('\u{1d7fa}', &['\u{34}']), ('\u{1d7fb}', &['\u{35}']), ('\u{1d7fc}',
+        &['\u{36}']), ('\u{1d7fd}', &['\u{37}']), ('\u{1d7fe}', &['\u{38}']), ('\u{1d7ff}',
+        &['\u{39}']), ('\u{1ee00}', &['\u{627}']), ('\u{1ee01}', &['\u{628}']), ('\u{1ee02}',
+        &['\u{62c}']), ('\u{1ee03}', &['\u{62f}']), ('\u{1ee05}', &['\u{648}']), ('\u{1ee06}',
+        &['\u{632}']), ('\u{1ee07}', &['\u{62d}']), ('\u{1ee08}', &['\u{637}']), ('\u{1ee09}',
+        &['\u{64a}']), ('\u{1ee0a}', &['\u{643}']), ('\u{1ee0b}', &['\u{644}']), ('\u{1ee0c}',
+        &['\u{645}']), ('\u{1ee0d}', &['\u{646}']), ('\u{1ee0e}', &['\u{633}']), ('\u{1ee0f}',
+        &['\u{639}']), ('\u{1ee10}', &['\u{641}']), ('\u{1ee11}', &['\u{635}']), ('\u{1ee12}',
+        &['\u{642}']), ('\u{1ee13}', &['\u{631}']), ('\u{1ee14}', &['\u{634}']), ('\u{1ee15}',
+        &['\u{62a}']), ('\u{1ee16}', &['\u{62b}']), ('\u{1ee17}', &['\u{62e}']), ('\u{1ee18}',
+        &['\u{630}']), ('\u{1ee19}', &['\u{636}']), ('\u{1ee1a}', &['\u{638}']), ('\u{1ee1b}',
+        &['\u{63a}']), ('\u{1ee1c}', &['\u{66e}']), ('\u{1ee1d}', &['\u{6ba}']), ('\u{1ee1e}',
+        &['\u{6a1}']), ('\u{1ee1f}', &['\u{66f}']), ('\u{1ee21}', &['\u{628}']), ('\u{1ee22}',
+        &['\u{62c}']), ('\u{1ee24}', &['\u{647}']), ('\u{1ee27}', &['\u{62d}']), ('\u{1ee29}',
+        &['\u{64a}']), ('\u{1ee2a}', &['\u{643}']), ('\u{1ee2b}', &['\u{644}']), ('\u{1ee2c}',
+        &['\u{645}']), ('\u{1ee2d}', &['\u{646}']), ('\u{1ee2e}', &['\u{633}']), ('\u{1ee2f}',
+        &['\u{639}']), ('\u{1ee30}', &['\u{641}']), ('\u{1ee31}', &['\u{635}']), ('\u{1ee32}',
+        &['\u{642}']), ('\u{1ee34}', &['\u{634}']), ('\u{1ee35}', &['\u{62a}']), ('\u{1ee36}',
+        &['\u{62b}']), ('\u{1ee37}', &['\u{62e}']), ('\u{1ee39}', &['\u{636}']), ('\u{1ee3b}',
+        &['\u{63a}']), ('\u{1ee42}', &['\u{62c}']), ('\u{1ee47}', &['\u{62d}']), ('\u{1ee49}',
+        &['\u{64a}']), ('\u{1ee4b}', &['\u{644}']), ('\u{1ee4d}', &['\u{646}']), ('\u{1ee4e}',
+        &['\u{633}']), ('\u{1ee4f}', &['\u{639}']), ('\u{1ee51}', &['\u{635}']), ('\u{1ee52}',
+        &['\u{642}']), ('\u{1ee54}', &['\u{634}']), ('\u{1ee57}', &['\u{62e}']), ('\u{1ee59}',
+        &['\u{636}']), ('\u{1ee5b}', &['\u{63a}']), ('\u{1ee5d}', &['\u{6ba}']), ('\u{1ee5f}',
+        &['\u{66f}']), ('\u{1ee61}', &['\u{628}']), ('\u{1ee62}', &['\u{62c}']), ('\u{1ee64}',
+        &['\u{647}']), ('\u{1ee67}', &['\u{62d}']), ('\u{1ee68}', &['\u{637}']), ('\u{1ee69}',
+        &['\u{64a}']), ('\u{1ee6a}', &['\u{643}']), ('\u{1ee6c}', &['\u{645}']), ('\u{1ee6d}',
+        &['\u{646}']), ('\u{1ee6e}', &['\u{633}']), ('\u{1ee6f}', &['\u{639}']), ('\u{1ee70}',
+        &['\u{641}']), ('\u{1ee71}', &['\u{635}']), ('\u{1ee72}', &['\u{642}']), ('\u{1ee74}',
+        &['\u{634}']), ('\u{1ee75}', &['\u{62a}']), ('\u{1ee76}', &['\u{62b}']), ('\u{1ee77}',
+        &['\u{62e}']), ('\u{1ee79}', &['\u{636}']), ('\u{1ee7a}', &['\u{638}']), ('\u{1ee7b}',
+        &['\u{63a}']), ('\u{1ee7c}', &['\u{66e}']), ('\u{1ee7e}', &['\u{6a1}']), ('\u{1ee80}',
+        &['\u{627}']), ('\u{1ee81}', &['\u{628}']), ('\u{1ee82}', &['\u{62c}']), ('\u{1ee83}',
+        &['\u{62f}']), ('\u{1ee84}', &['\u{647}']), ('\u{1ee85}', &['\u{648}']), ('\u{1ee86}',
+        &['\u{632}']), ('\u{1ee87}', &['\u{62d}']), ('\u{1ee88}', &['\u{637}']), ('\u{1ee89}',
+        &['\u{64a}']), ('\u{1ee8b}', &['\u{644}']), ('\u{1ee8c}', &['\u{645}']), ('\u{1ee8d}',
+        &['\u{646}']), ('\u{1ee8e}', &['\u{633}']), ('\u{1ee8f}', &['\u{639}']), ('\u{1ee90}',
+        &['\u{641}']), ('\u{1ee91}', &['\u{635}']), ('\u{1ee92}', &['\u{642}']), ('\u{1ee93}',
+        &['\u{631}']), ('\u{1ee94}', &['\u{634}']), ('\u{1ee95}', &['\u{62a}']), ('\u{1ee96}',
+        &['\u{62b}']), ('\u{1ee97}', &['\u{62e}']), ('\u{1ee98}', &['\u{630}']), ('\u{1ee99}',
+        &['\u{636}']), ('\u{1ee9a}', &['\u{638}']), ('\u{1ee9b}', &['\u{63a}']), ('\u{1eea1}',
+        &['\u{628}']), ('\u{1eea2}', &['\u{62c}']), ('\u{1eea3}', &['\u{62f}']), ('\u{1eea5}',
+        &['\u{648}']), ('\u{1eea6}', &['\u{632}']), ('\u{1eea7}', &['\u{62d}']), ('\u{1eea8}',
+        &['\u{637}']), ('\u{1eea9}', &['\u{64a}']), ('\u{1eeab}', &['\u{644}']), ('\u{1eeac}',
+        &['\u{645}']), ('\u{1eead}', &['\u{646}']), ('\u{1eeae}', &['\u{633}']), ('\u{1eeaf}',
+        &['\u{639}']), ('\u{1eeb0}', &['\u{641}']), ('\u{1eeb1}', &['\u{635}']), ('\u{1eeb2}',
+        &['\u{642}']), ('\u{1eeb3}', &['\u{631}']), ('\u{1eeb4}', &['\u{634}']), ('\u{1eeb5}',
+        &['\u{62a}']), ('\u{1eeb6}', &['\u{62b}']), ('\u{1eeb7}', &['\u{62e}']), ('\u{1eeb8}',
+        &['\u{630}']), ('\u{1eeb9}', &['\u{636}']), ('\u{1eeba}', &['\u{638}']), ('\u{1eebb}',
+        &['\u{63a}']), ('\u{1f100}', &['\u{30}', '\u{2e}']), ('\u{1f101}', &['\u{30}', '\u{2c}']),
+        ('\u{1f102}', &['\u{31}', '\u{2c}']), ('\u{1f103}', &['\u{32}', '\u{2c}']), ('\u{1f104}',
+        &['\u{33}', '\u{2c}']), ('\u{1f105}', &['\u{34}', '\u{2c}']), ('\u{1f106}', &['\u{35}',
+        '\u{2c}']), ('\u{1f107}', &['\u{36}', '\u{2c}']), ('\u{1f108}', &['\u{37}', '\u{2c}']),
+        ('\u{1f109}', &['\u{38}', '\u{2c}']), ('\u{1f10a}', &['\u{39}', '\u{2c}']), ('\u{1f110}',
+        &['\u{28}', '\u{41}', '\u{29}']), ('\u{1f111}', &['\u{28}', '\u{42}', '\u{29}']),
+        ('\u{1f112}', &['\u{28}', '\u{43}', '\u{29}']), ('\u{1f113}', &['\u{28}', '\u{44}',
+        '\u{29}']), ('\u{1f114}', &['\u{28}', '\u{45}', '\u{29}']), ('\u{1f115}', &['\u{28}',
+        '\u{46}', '\u{29}']), ('\u{1f116}', &['\u{28}', '\u{47}', '\u{29}']), ('\u{1f117}',
+        &['\u{28}', '\u{48}', '\u{29}']), ('\u{1f118}', &['\u{28}', '\u{49}', '\u{29}']),
+        ('\u{1f119}', &['\u{28}', '\u{4a}', '\u{29}']), ('\u{1f11a}', &['\u{28}', '\u{4b}',
+        '\u{29}']), ('\u{1f11b}', &['\u{28}', '\u{4c}', '\u{29}']), ('\u{1f11c}', &['\u{28}',
+        '\u{4d}', '\u{29}']), ('\u{1f11d}', &['\u{28}', '\u{4e}', '\u{29}']), ('\u{1f11e}',
+        &['\u{28}', '\u{4f}', '\u{29}']), ('\u{1f11f}', &['\u{28}', '\u{50}', '\u{29}']),
+        ('\u{1f120}', &['\u{28}', '\u{51}', '\u{29}']), ('\u{1f121}', &['\u{28}', '\u{52}',
+        '\u{29}']), ('\u{1f122}', &['\u{28}', '\u{53}', '\u{29}']), ('\u{1f123}', &['\u{28}',
+        '\u{54}', '\u{29}']), ('\u{1f124}', &['\u{28}', '\u{55}', '\u{29}']), ('\u{1f125}',
+        &['\u{28}', '\u{56}', '\u{29}']), ('\u{1f126}', &['\u{28}', '\u{57}', '\u{29}']),
+        ('\u{1f127}', &['\u{28}', '\u{58}', '\u{29}']), ('\u{1f128}', &['\u{28}', '\u{59}',
+        '\u{29}']), ('\u{1f129}', &['\u{28}', '\u{5a}', '\u{29}']), ('\u{1f12a}', &['\u{3014}',
+        '\u{53}', '\u{3015}']), ('\u{1f12b}', &['\u{43}']), ('\u{1f12c}', &['\u{52}']),
+        ('\u{1f12d}', &['\u{43}', '\u{44}']), ('\u{1f12e}', &['\u{57}', '\u{5a}']), ('\u{1f130}',
+        &['\u{41}']), ('\u{1f131}', &['\u{42}']), ('\u{1f132}', &['\u{43}']), ('\u{1f133}',
+        &['\u{44}']), ('\u{1f134}', &['\u{45}']), ('\u{1f135}', &['\u{46}']), ('\u{1f136}',
+        &['\u{47}']), ('\u{1f137}', &['\u{48}']), ('\u{1f138}', &['\u{49}']), ('\u{1f139}',
+        &['\u{4a}']), ('\u{1f13a}', &['\u{4b}']), ('\u{1f13b}', &['\u{4c}']), ('\u{1f13c}',
+        &['\u{4d}']), ('\u{1f13d}', &['\u{4e}']), ('\u{1f13e}', &['\u{4f}']), ('\u{1f13f}',
+        &['\u{50}']), ('\u{1f140}', &['\u{51}']), ('\u{1f141}', &['\u{52}']), ('\u{1f142}',
+        &['\u{53}']), ('\u{1f143}', &['\u{54}']), ('\u{1f144}', &['\u{55}']), ('\u{1f145}',
+        &['\u{56}']), ('\u{1f146}', &['\u{57}']), ('\u{1f147}', &['\u{58}']), ('\u{1f148}',
+        &['\u{59}']), ('\u{1f149}', &['\u{5a}']), ('\u{1f14a}', &['\u{48}', '\u{56}']),
+        ('\u{1f14b}', &['\u{4d}', '\u{56}']), ('\u{1f14c}', &['\u{53}', '\u{44}']), ('\u{1f14d}',
+        &['\u{53}', '\u{53}']), ('\u{1f14e}', &['\u{50}', '\u{50}', '\u{56}']), ('\u{1f14f}',
+        &['\u{57}', '\u{43}']), ('\u{1f16a}', &['\u{4d}', '\u{43}']), ('\u{1f16b}', &['\u{4d}',
+        '\u{44}']), ('\u{1f190}', &['\u{44}', '\u{4a}']), ('\u{1f200}', &['\u{307b}', '\u{304b}']),
+        ('\u{1f201}', &['\u{30b3}', '\u{30b3}']), ('\u{1f202}', &['\u{30b5}']), ('\u{1f210}',
+        &['\u{624b}']), ('\u{1f211}', &['\u{5b57}']), ('\u{1f212}', &['\u{53cc}']), ('\u{1f213}',
+        &['\u{30c7}']), ('\u{1f214}', &['\u{4e8c}']), ('\u{1f215}', &['\u{591a}']), ('\u{1f216}',
+        &['\u{89e3}']), ('\u{1f217}', &['\u{5929}']), ('\u{1f218}', &['\u{4ea4}']), ('\u{1f219}',
+        &['\u{6620}']), ('\u{1f21a}', &['\u{7121}']), ('\u{1f21b}', &['\u{6599}']), ('\u{1f21c}',
+        &['\u{524d}']), ('\u{1f21d}', &['\u{5f8c}']), ('\u{1f21e}', &['\u{518d}']), ('\u{1f21f}',
+        &['\u{65b0}']), ('\u{1f220}', &['\u{521d}']), ('\u{1f221}', &['\u{7d42}']), ('\u{1f222}',
+        &['\u{751f}']), ('\u{1f223}', &['\u{8ca9}']), ('\u{1f224}', &['\u{58f0}']), ('\u{1f225}',
+        &['\u{5439}']), ('\u{1f226}', &['\u{6f14}']), ('\u{1f227}', &['\u{6295}']), ('\u{1f228}',
+        &['\u{6355}']), ('\u{1f229}', &['\u{4e00}']), ('\u{1f22a}', &['\u{4e09}']), ('\u{1f22b}',
+        &['\u{904a}']), ('\u{1f22c}', &['\u{5de6}']), ('\u{1f22d}', &['\u{4e2d}']), ('\u{1f22e}',
+        &['\u{53f3}']), ('\u{1f22f}', &['\u{6307}']), ('\u{1f230}', &['\u{8d70}']), ('\u{1f231}',
+        &['\u{6253}']), ('\u{1f232}', &['\u{7981}']), ('\u{1f233}', &['\u{7a7a}']), ('\u{1f234}',
+        &['\u{5408}']), ('\u{1f235}', &['\u{6e80}']), ('\u{1f236}', &['\u{6709}']), ('\u{1f237}',
+        &['\u{6708}']), ('\u{1f238}', &['\u{7533}']), ('\u{1f239}', &['\u{5272}']), ('\u{1f23a}',
+        &['\u{55b6}']), ('\u{1f240}', &['\u{3014}', '\u{672c}', '\u{3015}']), ('\u{1f241}',
+        &['\u{3014}', '\u{4e09}', '\u{3015}']), ('\u{1f242}', &['\u{3014}', '\u{4e8c}',
+        '\u{3015}']), ('\u{1f243}', &['\u{3014}', '\u{5b89}', '\u{3015}']), ('\u{1f244}',
+        &['\u{3014}', '\u{70b9}', '\u{3015}']), ('\u{1f245}', &['\u{3014}', '\u{6253}',
+        '\u{3015}']), ('\u{1f246}', &['\u{3014}', '\u{76d7}', '\u{3015}']), ('\u{1f247}',
+        &['\u{3014}', '\u{52dd}', '\u{3015}']), ('\u{1f248}', &['\u{3014}', '\u{6557}',
+        '\u{3015}']), ('\u{1f250}', &['\u{5f97}']), ('\u{1f251}', &['\u{53ef}'])
     ];
 
     // Canonical compositions
     pub static composition_table: &'static [(char, &'static [(char, char)])] = &[
-        ('\x3c', &[('\u0338', '\u226e')]), ('\x3d', &[('\u0338', '\u2260')]), ('\x3e', &[('\u0338',
-        '\u226f')]), ('\x41', &[('\u0300', '\u00c0'), ('\u0301', '\u00c1'), ('\u0302', '\u00c2'),
-        ('\u0303', '\u00c3'), ('\u0304', '\u0100'), ('\u0306', '\u0102'), ('\u0307', '\u0226'),
-        ('\u0308', '\u00c4'), ('\u0309', '\u1ea2'), ('\u030a', '\u00c5'), ('\u030c', '\u01cd'),
-        ('\u030f', '\u0200'), ('\u0311', '\u0202'), ('\u0323', '\u1ea0'), ('\u0325', '\u1e00'),
-        ('\u0328', '\u0104')]), ('\x42', &[('\u0307', '\u1e02'), ('\u0323', '\u1e04'), ('\u0331',
-        '\u1e06')]), ('\x43', &[('\u0301', '\u0106'), ('\u0302', '\u0108'), ('\u0307', '\u010a'),
-        ('\u030c', '\u010c'), ('\u0327', '\u00c7')]), ('\x44', &[('\u0307', '\u1e0a'), ('\u030c',
-        '\u010e'), ('\u0323', '\u1e0c'), ('\u0327', '\u1e10'), ('\u032d', '\u1e12'), ('\u0331',
-        '\u1e0e')]), ('\x45', &[('\u0300', '\u00c8'), ('\u0301', '\u00c9'), ('\u0302', '\u00ca'),
-        ('\u0303', '\u1ebc'), ('\u0304', '\u0112'), ('\u0306', '\u0114'), ('\u0307', '\u0116'),
-        ('\u0308', '\u00cb'), ('\u0309', '\u1eba'), ('\u030c', '\u011a'), ('\u030f', '\u0204'),
-        ('\u0311', '\u0206'), ('\u0323', '\u1eb8'), ('\u0327', '\u0228'), ('\u0328', '\u0118'),
-        ('\u032d', '\u1e18'), ('\u0330', '\u1e1a')]), ('\x46', &[('\u0307', '\u1e1e')]), ('\x47',
-        &[('\u0301', '\u01f4'), ('\u0302', '\u011c'), ('\u0304', '\u1e20'), ('\u0306', '\u011e'),
-        ('\u0307', '\u0120'), ('\u030c', '\u01e6'), ('\u0327', '\u0122')]), ('\x48', &[('\u0302',
-        '\u0124'), ('\u0307', '\u1e22'), ('\u0308', '\u1e26'), ('\u030c', '\u021e'), ('\u0323',
-        '\u1e24'), ('\u0327', '\u1e28'), ('\u032e', '\u1e2a')]), ('\x49', &[('\u0300', '\u00cc'),
-        ('\u0301', '\u00cd'), ('\u0302', '\u00ce'), ('\u0303', '\u0128'), ('\u0304', '\u012a'),
-        ('\u0306', '\u012c'), ('\u0307', '\u0130'), ('\u0308', '\u00cf'), ('\u0309', '\u1ec8'),
-        ('\u030c', '\u01cf'), ('\u030f', '\u0208'), ('\u0311', '\u020a'), ('\u0323', '\u1eca'),
-        ('\u0328', '\u012e'), ('\u0330', '\u1e2c')]), ('\x4a', &[('\u0302', '\u0134')]), ('\x4b',
-        &[('\u0301', '\u1e30'), ('\u030c', '\u01e8'), ('\u0323', '\u1e32'), ('\u0327', '\u0136'),
-        ('\u0331', '\u1e34')]), ('\x4c', &[('\u0301', '\u0139'), ('\u030c', '\u013d'), ('\u0323',
-        '\u1e36'), ('\u0327', '\u013b'), ('\u032d', '\u1e3c'), ('\u0331', '\u1e3a')]), ('\x4d',
-        &[('\u0301', '\u1e3e'), ('\u0307', '\u1e40'), ('\u0323', '\u1e42')]), ('\x4e', &[('\u0300',
-        '\u01f8'), ('\u0301', '\u0143'), ('\u0303', '\u00d1'), ('\u0307', '\u1e44'), ('\u030c',
-        '\u0147'), ('\u0323', '\u1e46'), ('\u0327', '\u0145'), ('\u032d', '\u1e4a'), ('\u0331',
-        '\u1e48')]), ('\x4f', &[('\u0300', '\u00d2'), ('\u0301', '\u00d3'), ('\u0302', '\u00d4'),
-        ('\u0303', '\u00d5'), ('\u0304', '\u014c'), ('\u0306', '\u014e'), ('\u0307', '\u022e'),
-        ('\u0308', '\u00d6'), ('\u0309', '\u1ece'), ('\u030b', '\u0150'), ('\u030c', '\u01d1'),
-        ('\u030f', '\u020c'), ('\u0311', '\u020e'), ('\u031b', '\u01a0'), ('\u0323', '\u1ecc'),
-        ('\u0328', '\u01ea')]), ('\x50', &[('\u0301', '\u1e54'), ('\u0307', '\u1e56')]), ('\x52',
-        &[('\u0301', '\u0154'), ('\u0307', '\u1e58'), ('\u030c', '\u0158'), ('\u030f', '\u0210'),
-        ('\u0311', '\u0212'), ('\u0323', '\u1e5a'), ('\u0327', '\u0156'), ('\u0331', '\u1e5e')]),
-        ('\x53', &[('\u0301', '\u015a'), ('\u0302', '\u015c'), ('\u0307', '\u1e60'), ('\u030c',
-        '\u0160'), ('\u0323', '\u1e62'), ('\u0326', '\u0218'), ('\u0327', '\u015e')]), ('\x54',
-        &[('\u0307', '\u1e6a'), ('\u030c', '\u0164'), ('\u0323', '\u1e6c'), ('\u0326', '\u021a'),
-        ('\u0327', '\u0162'), ('\u032d', '\u1e70'), ('\u0331', '\u1e6e')]), ('\x55', &[('\u0300',
-        '\u00d9'), ('\u0301', '\u00da'), ('\u0302', '\u00db'), ('\u0303', '\u0168'), ('\u0304',
-        '\u016a'), ('\u0306', '\u016c'), ('\u0308', '\u00dc'), ('\u0309', '\u1ee6'), ('\u030a',
-        '\u016e'), ('\u030b', '\u0170'), ('\u030c', '\u01d3'), ('\u030f', '\u0214'), ('\u0311',
-        '\u0216'), ('\u031b', '\u01af'), ('\u0323', '\u1ee4'), ('\u0324', '\u1e72'), ('\u0328',
-        '\u0172'), ('\u032d', '\u1e76'), ('\u0330', '\u1e74')]), ('\x56', &[('\u0303', '\u1e7c'),
-        ('\u0323', '\u1e7e')]), ('\x57', &[('\u0300', '\u1e80'), ('\u0301', '\u1e82'), ('\u0302',
-        '\u0174'), ('\u0307', '\u1e86'), ('\u0308', '\u1e84'), ('\u0323', '\u1e88')]), ('\x58',
-        &[('\u0307', '\u1e8a'), ('\u0308', '\u1e8c')]), ('\x59', &[('\u0300', '\u1ef2'), ('\u0301',
-        '\u00dd'), ('\u0302', '\u0176'), ('\u0303', '\u1ef8'), ('\u0304', '\u0232'), ('\u0307',
-        '\u1e8e'), ('\u0308', '\u0178'), ('\u0309', '\u1ef6'), ('\u0323', '\u1ef4')]), ('\x5a',
-        &[('\u0301', '\u0179'), ('\u0302', '\u1e90'), ('\u0307', '\u017b'), ('\u030c', '\u017d'),
-        ('\u0323', '\u1e92'), ('\u0331', '\u1e94')]), ('\x61', &[('\u0300', '\u00e0'), ('\u0301',
-        '\u00e1'), ('\u0302', '\u00e2'), ('\u0303', '\u00e3'), ('\u0304', '\u0101'), ('\u0306',
-        '\u0103'), ('\u0307', '\u0227'), ('\u0308', '\u00e4'), ('\u0309', '\u1ea3'), ('\u030a',
-        '\u00e5'), ('\u030c', '\u01ce'), ('\u030f', '\u0201'), ('\u0311', '\u0203'), ('\u0323',
-        '\u1ea1'), ('\u0325', '\u1e01'), ('\u0328', '\u0105')]), ('\x62', &[('\u0307', '\u1e03'),
-        ('\u0323', '\u1e05'), ('\u0331', '\u1e07')]), ('\x63', &[('\u0301', '\u0107'), ('\u0302',
-        '\u0109'), ('\u0307', '\u010b'), ('\u030c', '\u010d'), ('\u0327', '\u00e7')]), ('\x64',
-        &[('\u0307', '\u1e0b'), ('\u030c', '\u010f'), ('\u0323', '\u1e0d'), ('\u0327', '\u1e11'),
-        ('\u032d', '\u1e13'), ('\u0331', '\u1e0f')]), ('\x65', &[('\u0300', '\u00e8'), ('\u0301',
-        '\u00e9'), ('\u0302', '\u00ea'), ('\u0303', '\u1ebd'), ('\u0304', '\u0113'), ('\u0306',
-        '\u0115'), ('\u0307', '\u0117'), ('\u0308', '\u00eb'), ('\u0309', '\u1ebb'), ('\u030c',
-        '\u011b'), ('\u030f', '\u0205'), ('\u0311', '\u0207'), ('\u0323', '\u1eb9'), ('\u0327',
-        '\u0229'), ('\u0328', '\u0119'), ('\u032d', '\u1e19'), ('\u0330', '\u1e1b')]), ('\x66',
-        &[('\u0307', '\u1e1f')]), ('\x67', &[('\u0301', '\u01f5'), ('\u0302', '\u011d'), ('\u0304',
-        '\u1e21'), ('\u0306', '\u011f'), ('\u0307', '\u0121'), ('\u030c', '\u01e7'), ('\u0327',
-        '\u0123')]), ('\x68', &[('\u0302', '\u0125'), ('\u0307', '\u1e23'), ('\u0308', '\u1e27'),
-        ('\u030c', '\u021f'), ('\u0323', '\u1e25'), ('\u0327', '\u1e29'), ('\u032e', '\u1e2b'),
-        ('\u0331', '\u1e96')]), ('\x69', &[('\u0300', '\u00ec'), ('\u0301', '\u00ed'), ('\u0302',
-        '\u00ee'), ('\u0303', '\u0129'), ('\u0304', '\u012b'), ('\u0306', '\u012d'), ('\u0308',
-        '\u00ef'), ('\u0309', '\u1ec9'), ('\u030c', '\u01d0'), ('\u030f', '\u0209'), ('\u0311',
-        '\u020b'), ('\u0323', '\u1ecb'), ('\u0328', '\u012f'), ('\u0330', '\u1e2d')]), ('\x6a',
-        &[('\u0302', '\u0135'), ('\u030c', '\u01f0')]), ('\x6b', &[('\u0301', '\u1e31'), ('\u030c',
-        '\u01e9'), ('\u0323', '\u1e33'), ('\u0327', '\u0137'), ('\u0331', '\u1e35')]), ('\x6c',
-        &[('\u0301', '\u013a'), ('\u030c', '\u013e'), ('\u0323', '\u1e37'), ('\u0327', '\u013c'),
-        ('\u032d', '\u1e3d'), ('\u0331', '\u1e3b')]), ('\x6d', &[('\u0301', '\u1e3f'), ('\u0307',
-        '\u1e41'), ('\u0323', '\u1e43')]), ('\x6e', &[('\u0300', '\u01f9'), ('\u0301', '\u0144'),
-        ('\u0303', '\u00f1'), ('\u0307', '\u1e45'), ('\u030c', '\u0148'), ('\u0323', '\u1e47'),
-        ('\u0327', '\u0146'), ('\u032d', '\u1e4b'), ('\u0331', '\u1e49')]), ('\x6f', &[('\u0300',
-        '\u00f2'), ('\u0301', '\u00f3'), ('\u0302', '\u00f4'), ('\u0303', '\u00f5'), ('\u0304',
-        '\u014d'), ('\u0306', '\u014f'), ('\u0307', '\u022f'), ('\u0308', '\u00f6'), ('\u0309',
-        '\u1ecf'), ('\u030b', '\u0151'), ('\u030c', '\u01d2'), ('\u030f', '\u020d'), ('\u0311',
-        '\u020f'), ('\u031b', '\u01a1'), ('\u0323', '\u1ecd'), ('\u0328', '\u01eb')]), ('\x70',
-        &[('\u0301', '\u1e55'), ('\u0307', '\u1e57')]), ('\x72', &[('\u0301', '\u0155'), ('\u0307',
-        '\u1e59'), ('\u030c', '\u0159'), ('\u030f', '\u0211'), ('\u0311', '\u0213'), ('\u0323',
-        '\u1e5b'), ('\u0327', '\u0157'), ('\u0331', '\u1e5f')]), ('\x73', &[('\u0301', '\u015b'),
-        ('\u0302', '\u015d'), ('\u0307', '\u1e61'), ('\u030c', '\u0161'), ('\u0323', '\u1e63'),
-        ('\u0326', '\u0219'), ('\u0327', '\u015f')]), ('\x74', &[('\u0307', '\u1e6b'), ('\u0308',
-        '\u1e97'), ('\u030c', '\u0165'), ('\u0323', '\u1e6d'), ('\u0326', '\u021b'), ('\u0327',
-        '\u0163'), ('\u032d', '\u1e71'), ('\u0331', '\u1e6f')]), ('\x75', &[('\u0300', '\u00f9'),
-        ('\u0301', '\u00fa'), ('\u0302', '\u00fb'), ('\u0303', '\u0169'), ('\u0304', '\u016b'),
-        ('\u0306', '\u016d'), ('\u0308', '\u00fc'), ('\u0309', '\u1ee7'), ('\u030a', '\u016f'),
-        ('\u030b', '\u0171'), ('\u030c', '\u01d4'), ('\u030f', '\u0215'), ('\u0311', '\u0217'),
-        ('\u031b', '\u01b0'), ('\u0323', '\u1ee5'), ('\u0324', '\u1e73'), ('\u0328', '\u0173'),
-        ('\u032d', '\u1e77'), ('\u0330', '\u1e75')]), ('\x76', &[('\u0303', '\u1e7d'), ('\u0323',
-        '\u1e7f')]), ('\x77', &[('\u0300', '\u1e81'), ('\u0301', '\u1e83'), ('\u0302', '\u0175'),
-        ('\u0307', '\u1e87'), ('\u0308', '\u1e85'), ('\u030a', '\u1e98'), ('\u0323', '\u1e89')]),
-        ('\x78', &[('\u0307', '\u1e8b'), ('\u0308', '\u1e8d')]), ('\x79', &[('\u0300', '\u1ef3'),
-        ('\u0301', '\u00fd'), ('\u0302', '\u0177'), ('\u0303', '\u1ef9'), ('\u0304', '\u0233'),
-        ('\u0307', '\u1e8f'), ('\u0308', '\u00ff'), ('\u0309', '\u1ef7'), ('\u030a', '\u1e99'),
-        ('\u0323', '\u1ef5')]), ('\x7a', &[('\u0301', '\u017a'), ('\u0302', '\u1e91'), ('\u0307',
-        '\u017c'), ('\u030c', '\u017e'), ('\u0323', '\u1e93'), ('\u0331', '\u1e95')]), ('\u00a8',
-        &[('\u0300', '\u1fed'), ('\u0301', '\u0385'), ('\u0342', '\u1fc1')]), ('\u00c2',
-        &[('\u0300', '\u1ea6'), ('\u0301', '\u1ea4'), ('\u0303', '\u1eaa'), ('\u0309', '\u1ea8')]),
-        ('\u00c4', &[('\u0304', '\u01de')]), ('\u00c5', &[('\u0301', '\u01fa')]), ('\u00c6',
-        &[('\u0301', '\u01fc'), ('\u0304', '\u01e2')]), ('\u00c7', &[('\u0301', '\u1e08')]),
-        ('\u00ca', &[('\u0300', '\u1ec0'), ('\u0301', '\u1ebe'), ('\u0303', '\u1ec4'), ('\u0309',
-        '\u1ec2')]), ('\u00cf', &[('\u0301', '\u1e2e')]), ('\u00d4', &[('\u0300', '\u1ed2'),
-        ('\u0301', '\u1ed0'), ('\u0303', '\u1ed6'), ('\u0309', '\u1ed4')]), ('\u00d5', &[('\u0301',
-        '\u1e4c'), ('\u0304', '\u022c'), ('\u0308', '\u1e4e')]), ('\u00d6', &[('\u0304',
-        '\u022a')]), ('\u00d8', &[('\u0301', '\u01fe')]), ('\u00dc', &[('\u0300', '\u01db'),
-        ('\u0301', '\u01d7'), ('\u0304', '\u01d5'), ('\u030c', '\u01d9')]), ('\u00e2', &[('\u0300',
-        '\u1ea7'), ('\u0301', '\u1ea5'), ('\u0303', '\u1eab'), ('\u0309', '\u1ea9')]), ('\u00e4',
-        &[('\u0304', '\u01df')]), ('\u00e5', &[('\u0301', '\u01fb')]), ('\u00e6', &[('\u0301',
-        '\u01fd'), ('\u0304', '\u01e3')]), ('\u00e7', &[('\u0301', '\u1e09')]), ('\u00ea',
-        &[('\u0300', '\u1ec1'), ('\u0301', '\u1ebf'), ('\u0303', '\u1ec5'), ('\u0309', '\u1ec3')]),
-        ('\u00ef', &[('\u0301', '\u1e2f')]), ('\u00f4', &[('\u0300', '\u1ed3'), ('\u0301',
-        '\u1ed1'), ('\u0303', '\u1ed7'), ('\u0309', '\u1ed5')]), ('\u00f5', &[('\u0301', '\u1e4d'),
-        ('\u0304', '\u022d'), ('\u0308', '\u1e4f')]), ('\u00f6', &[('\u0304', '\u022b')]),
-        ('\u00f8', &[('\u0301', '\u01ff')]), ('\u00fc', &[('\u0300', '\u01dc'), ('\u0301',
-        '\u01d8'), ('\u0304', '\u01d6'), ('\u030c', '\u01da')]), ('\u0102', &[('\u0300', '\u1eb0'),
-        ('\u0301', '\u1eae'), ('\u0303', '\u1eb4'), ('\u0309', '\u1eb2')]), ('\u0103', &[('\u0300',
-        '\u1eb1'), ('\u0301', '\u1eaf'), ('\u0303', '\u1eb5'), ('\u0309', '\u1eb3')]), ('\u0112',
-        &[('\u0300', '\u1e14'), ('\u0301', '\u1e16')]), ('\u0113', &[('\u0300', '\u1e15'),
-        ('\u0301', '\u1e17')]), ('\u014c', &[('\u0300', '\u1e50'), ('\u0301', '\u1e52')]),
-        ('\u014d', &[('\u0300', '\u1e51'), ('\u0301', '\u1e53')]), ('\u015a', &[('\u0307',
-        '\u1e64')]), ('\u015b', &[('\u0307', '\u1e65')]), ('\u0160', &[('\u0307', '\u1e66')]),
-        ('\u0161', &[('\u0307', '\u1e67')]), ('\u0168', &[('\u0301', '\u1e78')]), ('\u0169',
-        &[('\u0301', '\u1e79')]), ('\u016a', &[('\u0308', '\u1e7a')]), ('\u016b', &[('\u0308',
-        '\u1e7b')]), ('\u017f', &[('\u0307', '\u1e9b')]), ('\u01a0', &[('\u0300', '\u1edc'),
-        ('\u0301', '\u1eda'), ('\u0303', '\u1ee0'), ('\u0309', '\u1ede'), ('\u0323', '\u1ee2')]),
-        ('\u01a1', &[('\u0300', '\u1edd'), ('\u0301', '\u1edb'), ('\u0303', '\u1ee1'), ('\u0309',
-        '\u1edf'), ('\u0323', '\u1ee3')]), ('\u01af', &[('\u0300', '\u1eea'), ('\u0301', '\u1ee8'),
-        ('\u0303', '\u1eee'), ('\u0309', '\u1eec'), ('\u0323', '\u1ef0')]), ('\u01b0', &[('\u0300',
-        '\u1eeb'), ('\u0301', '\u1ee9'), ('\u0303', '\u1eef'), ('\u0309', '\u1eed'), ('\u0323',
-        '\u1ef1')]), ('\u01b7', &[('\u030c', '\u01ee')]), ('\u01ea', &[('\u0304', '\u01ec')]),
-        ('\u01eb', &[('\u0304', '\u01ed')]), ('\u0226', &[('\u0304', '\u01e0')]), ('\u0227',
-        &[('\u0304', '\u01e1')]), ('\u0228', &[('\u0306', '\u1e1c')]), ('\u0229', &[('\u0306',
-        '\u1e1d')]), ('\u022e', &[('\u0304', '\u0230')]), ('\u022f', &[('\u0304', '\u0231')]),
-        ('\u0292', &[('\u030c', '\u01ef')]), ('\u0391', &[('\u0300', '\u1fba'), ('\u0301',
-        '\u0386'), ('\u0304', '\u1fb9'), ('\u0306', '\u1fb8'), ('\u0313', '\u1f08'), ('\u0314',
-        '\u1f09'), ('\u0345', '\u1fbc')]), ('\u0395', &[('\u0300', '\u1fc8'), ('\u0301', '\u0388'),
-        ('\u0313', '\u1f18'), ('\u0314', '\u1f19')]), ('\u0397', &[('\u0300', '\u1fca'), ('\u0301',
-        '\u0389'), ('\u0313', '\u1f28'), ('\u0314', '\u1f29'), ('\u0345', '\u1fcc')]), ('\u0399',
-        &[('\u0300', '\u1fda'), ('\u0301', '\u038a'), ('\u0304', '\u1fd9'), ('\u0306', '\u1fd8'),
-        ('\u0308', '\u03aa'), ('\u0313', '\u1f38'), ('\u0314', '\u1f39')]), ('\u039f', &[('\u0300',
-        '\u1ff8'), ('\u0301', '\u038c'), ('\u0313', '\u1f48'), ('\u0314', '\u1f49')]), ('\u03a1',
-        &[('\u0314', '\u1fec')]), ('\u03a5', &[('\u0300', '\u1fea'), ('\u0301', '\u038e'),
-        ('\u0304', '\u1fe9'), ('\u0306', '\u1fe8'), ('\u0308', '\u03ab'), ('\u0314', '\u1f59')]),
-        ('\u03a9', &[('\u0300', '\u1ffa'), ('\u0301', '\u038f'), ('\u0313', '\u1f68'), ('\u0314',
-        '\u1f69'), ('\u0345', '\u1ffc')]), ('\u03ac', &[('\u0345', '\u1fb4')]), ('\u03ae',
-        &[('\u0345', '\u1fc4')]), ('\u03b1', &[('\u0300', '\u1f70'), ('\u0301', '\u03ac'),
-        ('\u0304', '\u1fb1'), ('\u0306', '\u1fb0'), ('\u0313', '\u1f00'), ('\u0314', '\u1f01'),
-        ('\u0342', '\u1fb6'), ('\u0345', '\u1fb3')]), ('\u03b5', &[('\u0300', '\u1f72'), ('\u0301',
-        '\u03ad'), ('\u0313', '\u1f10'), ('\u0314', '\u1f11')]), ('\u03b7', &[('\u0300', '\u1f74'),
-        ('\u0301', '\u03ae'), ('\u0313', '\u1f20'), ('\u0314', '\u1f21'), ('\u0342', '\u1fc6'),
-        ('\u0345', '\u1fc3')]), ('\u03b9', &[('\u0300', '\u1f76'), ('\u0301', '\u03af'), ('\u0304',
-        '\u1fd1'), ('\u0306', '\u1fd0'), ('\u0308', '\u03ca'), ('\u0313', '\u1f30'), ('\u0314',
-        '\u1f31'), ('\u0342', '\u1fd6')]), ('\u03bf', &[('\u0300', '\u1f78'), ('\u0301', '\u03cc'),
-        ('\u0313', '\u1f40'), ('\u0314', '\u1f41')]), ('\u03c1', &[('\u0313', '\u1fe4'), ('\u0314',
-        '\u1fe5')]), ('\u03c5', &[('\u0300', '\u1f7a'), ('\u0301', '\u03cd'), ('\u0304', '\u1fe1'),
-        ('\u0306', '\u1fe0'), ('\u0308', '\u03cb'), ('\u0313', '\u1f50'), ('\u0314', '\u1f51'),
-        ('\u0342', '\u1fe6')]), ('\u03c9', &[('\u0300', '\u1f7c'), ('\u0301', '\u03ce'), ('\u0313',
-        '\u1f60'), ('\u0314', '\u1f61'), ('\u0342', '\u1ff6'), ('\u0345', '\u1ff3')]), ('\u03ca',
-        &[('\u0300', '\u1fd2'), ('\u0301', '\u0390'), ('\u0342', '\u1fd7')]), ('\u03cb',
-        &[('\u0300', '\u1fe2'), ('\u0301', '\u03b0'), ('\u0342', '\u1fe7')]), ('\u03ce',
-        &[('\u0345', '\u1ff4')]), ('\u03d2', &[('\u0301', '\u03d3'), ('\u0308', '\u03d4')]),
-        ('\u0406', &[('\u0308', '\u0407')]), ('\u0410', &[('\u0306', '\u04d0'), ('\u0308',
-        '\u04d2')]), ('\u0413', &[('\u0301', '\u0403')]), ('\u0415', &[('\u0300', '\u0400'),
-        ('\u0306', '\u04d6'), ('\u0308', '\u0401')]), ('\u0416', &[('\u0306', '\u04c1'), ('\u0308',
-        '\u04dc')]), ('\u0417', &[('\u0308', '\u04de')]), ('\u0418', &[('\u0300', '\u040d'),
-        ('\u0304', '\u04e2'), ('\u0306', '\u0419'), ('\u0308', '\u04e4')]), ('\u041a', &[('\u0301',
-        '\u040c')]), ('\u041e', &[('\u0308', '\u04e6')]), ('\u0423', &[('\u0304', '\u04ee'),
-        ('\u0306', '\u040e'), ('\u0308', '\u04f0'), ('\u030b', '\u04f2')]), ('\u0427', &[('\u0308',
-        '\u04f4')]), ('\u042b', &[('\u0308', '\u04f8')]), ('\u042d', &[('\u0308', '\u04ec')]),
-        ('\u0430', &[('\u0306', '\u04d1'), ('\u0308', '\u04d3')]), ('\u0433', &[('\u0301',
-        '\u0453')]), ('\u0435', &[('\u0300', '\u0450'), ('\u0306', '\u04d7'), ('\u0308',
-        '\u0451')]), ('\u0436', &[('\u0306', '\u04c2'), ('\u0308', '\u04dd')]), ('\u0437',
-        &[('\u0308', '\u04df')]), ('\u0438', &[('\u0300', '\u045d'), ('\u0304', '\u04e3'),
-        ('\u0306', '\u0439'), ('\u0308', '\u04e5')]), ('\u043a', &[('\u0301', '\u045c')]),
-        ('\u043e', &[('\u0308', '\u04e7')]), ('\u0443', &[('\u0304', '\u04ef'), ('\u0306',
-        '\u045e'), ('\u0308', '\u04f1'), ('\u030b', '\u04f3')]), ('\u0447', &[('\u0308',
-        '\u04f5')]), ('\u044b', &[('\u0308', '\u04f9')]), ('\u044d', &[('\u0308', '\u04ed')]),
-        ('\u0456', &[('\u0308', '\u0457')]), ('\u0474', &[('\u030f', '\u0476')]), ('\u0475',
-        &[('\u030f', '\u0477')]), ('\u04d8', &[('\u0308', '\u04da')]), ('\u04d9', &[('\u0308',
-        '\u04db')]), ('\u04e8', &[('\u0308', '\u04ea')]), ('\u04e9', &[('\u0308', '\u04eb')]),
-        ('\u0627', &[('\u0653', '\u0622'), ('\u0654', '\u0623'), ('\u0655', '\u0625')]), ('\u0648',
-        &[('\u0654', '\u0624')]), ('\u064a', &[('\u0654', '\u0626')]), ('\u06c1', &[('\u0654',
-        '\u06c2')]), ('\u06d2', &[('\u0654', '\u06d3')]), ('\u06d5', &[('\u0654', '\u06c0')]),
-        ('\u0928', &[('\u093c', '\u0929')]), ('\u0930', &[('\u093c', '\u0931')]), ('\u0933',
-        &[('\u093c', '\u0934')]), ('\u09c7', &[('\u09be', '\u09cb'), ('\u09d7', '\u09cc')]),
-        ('\u0b47', &[('\u0b3e', '\u0b4b'), ('\u0b56', '\u0b48'), ('\u0b57', '\u0b4c')]), ('\u0b92',
-        &[('\u0bd7', '\u0b94')]), ('\u0bc6', &[('\u0bbe', '\u0bca'), ('\u0bd7', '\u0bcc')]),
-        ('\u0bc7', &[('\u0bbe', '\u0bcb')]), ('\u0c46', &[('\u0c56', '\u0c48')]), ('\u0cbf',
-        &[('\u0cd5', '\u0cc0')]), ('\u0cc6', &[('\u0cc2', '\u0cca'), ('\u0cd5', '\u0cc7'),
-        ('\u0cd6', '\u0cc8')]), ('\u0cca', &[('\u0cd5', '\u0ccb')]), ('\u0d46', &[('\u0d3e',
-        '\u0d4a'), ('\u0d57', '\u0d4c')]), ('\u0d47', &[('\u0d3e', '\u0d4b')]), ('\u0dd9',
-        &[('\u0dca', '\u0dda'), ('\u0dcf', '\u0ddc'), ('\u0ddf', '\u0dde')]), ('\u0ddc',
-        &[('\u0dca', '\u0ddd')]), ('\u1025', &[('\u102e', '\u1026')]), ('\u1b05', &[('\u1b35',
-        '\u1b06')]), ('\u1b07', &[('\u1b35', '\u1b08')]), ('\u1b09', &[('\u1b35', '\u1b0a')]),
-        ('\u1b0b', &[('\u1b35', '\u1b0c')]), ('\u1b0d', &[('\u1b35', '\u1b0e')]), ('\u1b11',
-        &[('\u1b35', '\u1b12')]), ('\u1b3a', &[('\u1b35', '\u1b3b')]), ('\u1b3c', &[('\u1b35',
-        '\u1b3d')]), ('\u1b3e', &[('\u1b35', '\u1b40')]), ('\u1b3f', &[('\u1b35', '\u1b41')]),
-        ('\u1b42', &[('\u1b35', '\u1b43')]), ('\u1e36', &[('\u0304', '\u1e38')]), ('\u1e37',
-        &[('\u0304', '\u1e39')]), ('\u1e5a', &[('\u0304', '\u1e5c')]), ('\u1e5b', &[('\u0304',
-        '\u1e5d')]), ('\u1e62', &[('\u0307', '\u1e68')]), ('\u1e63', &[('\u0307', '\u1e69')]),
-        ('\u1ea0', &[('\u0302', '\u1eac'), ('\u0306', '\u1eb6')]), ('\u1ea1', &[('\u0302',
-        '\u1ead'), ('\u0306', '\u1eb7')]), ('\u1eb8', &[('\u0302', '\u1ec6')]), ('\u1eb9',
-        &[('\u0302', '\u1ec7')]), ('\u1ecc', &[('\u0302', '\u1ed8')]), ('\u1ecd', &[('\u0302',
-        '\u1ed9')]), ('\u1f00', &[('\u0300', '\u1f02'), ('\u0301', '\u1f04'), ('\u0342', '\u1f06'),
-        ('\u0345', '\u1f80')]), ('\u1f01', &[('\u0300', '\u1f03'), ('\u0301', '\u1f05'), ('\u0342',
-        '\u1f07'), ('\u0345', '\u1f81')]), ('\u1f02', &[('\u0345', '\u1f82')]), ('\u1f03',
-        &[('\u0345', '\u1f83')]), ('\u1f04', &[('\u0345', '\u1f84')]), ('\u1f05', &[('\u0345',
-        '\u1f85')]), ('\u1f06', &[('\u0345', '\u1f86')]), ('\u1f07', &[('\u0345', '\u1f87')]),
-        ('\u1f08', &[('\u0300', '\u1f0a'), ('\u0301', '\u1f0c'), ('\u0342', '\u1f0e'), ('\u0345',
-        '\u1f88')]), ('\u1f09', &[('\u0300', '\u1f0b'), ('\u0301', '\u1f0d'), ('\u0342', '\u1f0f'),
-        ('\u0345', '\u1f89')]), ('\u1f0a', &[('\u0345', '\u1f8a')]), ('\u1f0b', &[('\u0345',
-        '\u1f8b')]), ('\u1f0c', &[('\u0345', '\u1f8c')]), ('\u1f0d', &[('\u0345', '\u1f8d')]),
-        ('\u1f0e', &[('\u0345', '\u1f8e')]), ('\u1f0f', &[('\u0345', '\u1f8f')]), ('\u1f10',
-        &[('\u0300', '\u1f12'), ('\u0301', '\u1f14')]), ('\u1f11', &[('\u0300', '\u1f13'),
-        ('\u0301', '\u1f15')]), ('\u1f18', &[('\u0300', '\u1f1a'), ('\u0301', '\u1f1c')]),
-        ('\u1f19', &[('\u0300', '\u1f1b'), ('\u0301', '\u1f1d')]), ('\u1f20', &[('\u0300',
-        '\u1f22'), ('\u0301', '\u1f24'), ('\u0342', '\u1f26'), ('\u0345', '\u1f90')]), ('\u1f21',
-        &[('\u0300', '\u1f23'), ('\u0301', '\u1f25'), ('\u0342', '\u1f27'), ('\u0345', '\u1f91')]),
-        ('\u1f22', &[('\u0345', '\u1f92')]), ('\u1f23', &[('\u0345', '\u1f93')]), ('\u1f24',
-        &[('\u0345', '\u1f94')]), ('\u1f25', &[('\u0345', '\u1f95')]), ('\u1f26', &[('\u0345',
-        '\u1f96')]), ('\u1f27', &[('\u0345', '\u1f97')]), ('\u1f28', &[('\u0300', '\u1f2a'),
-        ('\u0301', '\u1f2c'), ('\u0342', '\u1f2e'), ('\u0345', '\u1f98')]), ('\u1f29', &[('\u0300',
-        '\u1f2b'), ('\u0301', '\u1f2d'), ('\u0342', '\u1f2f'), ('\u0345', '\u1f99')]), ('\u1f2a',
-        &[('\u0345', '\u1f9a')]), ('\u1f2b', &[('\u0345', '\u1f9b')]), ('\u1f2c', &[('\u0345',
-        '\u1f9c')]), ('\u1f2d', &[('\u0345', '\u1f9d')]), ('\u1f2e', &[('\u0345', '\u1f9e')]),
-        ('\u1f2f', &[('\u0345', '\u1f9f')]), ('\u1f30', &[('\u0300', '\u1f32'), ('\u0301',
-        '\u1f34'), ('\u0342', '\u1f36')]), ('\u1f31', &[('\u0300', '\u1f33'), ('\u0301', '\u1f35'),
-        ('\u0342', '\u1f37')]), ('\u1f38', &[('\u0300', '\u1f3a'), ('\u0301', '\u1f3c'), ('\u0342',
-        '\u1f3e')]), ('\u1f39', &[('\u0300', '\u1f3b'), ('\u0301', '\u1f3d'), ('\u0342',
-        '\u1f3f')]), ('\u1f40', &[('\u0300', '\u1f42'), ('\u0301', '\u1f44')]), ('\u1f41',
-        &[('\u0300', '\u1f43'), ('\u0301', '\u1f45')]), ('\u1f48', &[('\u0300', '\u1f4a'),
-        ('\u0301', '\u1f4c')]), ('\u1f49', &[('\u0300', '\u1f4b'), ('\u0301', '\u1f4d')]),
-        ('\u1f50', &[('\u0300', '\u1f52'), ('\u0301', '\u1f54'), ('\u0342', '\u1f56')]), ('\u1f51',
-        &[('\u0300', '\u1f53'), ('\u0301', '\u1f55'), ('\u0342', '\u1f57')]), ('\u1f59',
-        &[('\u0300', '\u1f5b'), ('\u0301', '\u1f5d'), ('\u0342', '\u1f5f')]), ('\u1f60',
-        &[('\u0300', '\u1f62'), ('\u0301', '\u1f64'), ('\u0342', '\u1f66'), ('\u0345', '\u1fa0')]),
-        ('\u1f61', &[('\u0300', '\u1f63'), ('\u0301', '\u1f65'), ('\u0342', '\u1f67'), ('\u0345',
-        '\u1fa1')]), ('\u1f62', &[('\u0345', '\u1fa2')]), ('\u1f63', &[('\u0345', '\u1fa3')]),
-        ('\u1f64', &[('\u0345', '\u1fa4')]), ('\u1f65', &[('\u0345', '\u1fa5')]), ('\u1f66',
-        &[('\u0345', '\u1fa6')]), ('\u1f67', &[('\u0345', '\u1fa7')]), ('\u1f68', &[('\u0300',
-        '\u1f6a'), ('\u0301', '\u1f6c'), ('\u0342', '\u1f6e'), ('\u0345', '\u1fa8')]), ('\u1f69',
-        &[('\u0300', '\u1f6b'), ('\u0301', '\u1f6d'), ('\u0342', '\u1f6f'), ('\u0345', '\u1fa9')]),
-        ('\u1f6a', &[('\u0345', '\u1faa')]), ('\u1f6b', &[('\u0345', '\u1fab')]), ('\u1f6c',
-        &[('\u0345', '\u1fac')]), ('\u1f6d', &[('\u0345', '\u1fad')]), ('\u1f6e', &[('\u0345',
-        '\u1fae')]), ('\u1f6f', &[('\u0345', '\u1faf')]), ('\u1f70', &[('\u0345', '\u1fb2')]),
-        ('\u1f74', &[('\u0345', '\u1fc2')]), ('\u1f7c', &[('\u0345', '\u1ff2')]), ('\u1fb6',
-        &[('\u0345', '\u1fb7')]), ('\u1fbf', &[('\u0300', '\u1fcd'), ('\u0301', '\u1fce'),
-        ('\u0342', '\u1fcf')]), ('\u1fc6', &[('\u0345', '\u1fc7')]), ('\u1ff6', &[('\u0345',
-        '\u1ff7')]), ('\u1ffe', &[('\u0300', '\u1fdd'), ('\u0301', '\u1fde'), ('\u0342',
-        '\u1fdf')]), ('\u2190', &[('\u0338', '\u219a')]), ('\u2192', &[('\u0338', '\u219b')]),
-        ('\u2194', &[('\u0338', '\u21ae')]), ('\u21d0', &[('\u0338', '\u21cd')]), ('\u21d2',
-        &[('\u0338', '\u21cf')]), ('\u21d4', &[('\u0338', '\u21ce')]), ('\u2203', &[('\u0338',
-        '\u2204')]), ('\u2208', &[('\u0338', '\u2209')]), ('\u220b', &[('\u0338', '\u220c')]),
-        ('\u2223', &[('\u0338', '\u2224')]), ('\u2225', &[('\u0338', '\u2226')]), ('\u223c',
-        &[('\u0338', '\u2241')]), ('\u2243', &[('\u0338', '\u2244')]), ('\u2245', &[('\u0338',
-        '\u2247')]), ('\u2248', &[('\u0338', '\u2249')]), ('\u224d', &[('\u0338', '\u226d')]),
-        ('\u2261', &[('\u0338', '\u2262')]), ('\u2264', &[('\u0338', '\u2270')]), ('\u2265',
-        &[('\u0338', '\u2271')]), ('\u2272', &[('\u0338', '\u2274')]), ('\u2273', &[('\u0338',
-        '\u2275')]), ('\u2276', &[('\u0338', '\u2278')]), ('\u2277', &[('\u0338', '\u2279')]),
-        ('\u227a', &[('\u0338', '\u2280')]), ('\u227b', &[('\u0338', '\u2281')]), ('\u227c',
-        &[('\u0338', '\u22e0')]), ('\u227d', &[('\u0338', '\u22e1')]), ('\u2282', &[('\u0338',
-        '\u2284')]), ('\u2283', &[('\u0338', '\u2285')]), ('\u2286', &[('\u0338', '\u2288')]),
-        ('\u2287', &[('\u0338', '\u2289')]), ('\u2291', &[('\u0338', '\u22e2')]), ('\u2292',
-        &[('\u0338', '\u22e3')]), ('\u22a2', &[('\u0338', '\u22ac')]), ('\u22a8', &[('\u0338',
-        '\u22ad')]), ('\u22a9', &[('\u0338', '\u22ae')]), ('\u22ab', &[('\u0338', '\u22af')]),
-        ('\u22b2', &[('\u0338', '\u22ea')]), ('\u22b3', &[('\u0338', '\u22eb')]), ('\u22b4',
-        &[('\u0338', '\u22ec')]), ('\u22b5', &[('\u0338', '\u22ed')]), ('\u3046', &[('\u3099',
-        '\u3094')]), ('\u304b', &[('\u3099', '\u304c')]), ('\u304d', &[('\u3099', '\u304e')]),
-        ('\u304f', &[('\u3099', '\u3050')]), ('\u3051', &[('\u3099', '\u3052')]), ('\u3053',
-        &[('\u3099', '\u3054')]), ('\u3055', &[('\u3099', '\u3056')]), ('\u3057', &[('\u3099',
-        '\u3058')]), ('\u3059', &[('\u3099', '\u305a')]), ('\u305b', &[('\u3099', '\u305c')]),
-        ('\u305d', &[('\u3099', '\u305e')]), ('\u305f', &[('\u3099', '\u3060')]), ('\u3061',
-        &[('\u3099', '\u3062')]), ('\u3064', &[('\u3099', '\u3065')]), ('\u3066', &[('\u3099',
-        '\u3067')]), ('\u3068', &[('\u3099', '\u3069')]), ('\u306f', &[('\u3099', '\u3070'),
-        ('\u309a', '\u3071')]), ('\u3072', &[('\u3099', '\u3073'), ('\u309a', '\u3074')]),
-        ('\u3075', &[('\u3099', '\u3076'), ('\u309a', '\u3077')]), ('\u3078', &[('\u3099',
-        '\u3079'), ('\u309a', '\u307a')]), ('\u307b', &[('\u3099', '\u307c'), ('\u309a',
-        '\u307d')]), ('\u309d', &[('\u3099', '\u309e')]), ('\u30a6', &[('\u3099', '\u30f4')]),
-        ('\u30ab', &[('\u3099', '\u30ac')]), ('\u30ad', &[('\u3099', '\u30ae')]), ('\u30af',
-        &[('\u3099', '\u30b0')]), ('\u30b1', &[('\u3099', '\u30b2')]), ('\u30b3', &[('\u3099',
-        '\u30b4')]), ('\u30b5', &[('\u3099', '\u30b6')]), ('\u30b7', &[('\u3099', '\u30b8')]),
-        ('\u30b9', &[('\u3099', '\u30ba')]), ('\u30bb', &[('\u3099', '\u30bc')]), ('\u30bd',
-        &[('\u3099', '\u30be')]), ('\u30bf', &[('\u3099', '\u30c0')]), ('\u30c1', &[('\u3099',
-        '\u30c2')]), ('\u30c4', &[('\u3099', '\u30c5')]), ('\u30c6', &[('\u3099', '\u30c7')]),
-        ('\u30c8', &[('\u3099', '\u30c9')]), ('\u30cf', &[('\u3099', '\u30d0'), ('\u309a',
-        '\u30d1')]), ('\u30d2', &[('\u3099', '\u30d3'), ('\u309a', '\u30d4')]), ('\u30d5',
-        &[('\u3099', '\u30d6'), ('\u309a', '\u30d7')]), ('\u30d8', &[('\u3099', '\u30d9'),
-        ('\u309a', '\u30da')]), ('\u30db', &[('\u3099', '\u30dc'), ('\u309a', '\u30dd')]),
-        ('\u30ef', &[('\u3099', '\u30f7')]), ('\u30f0', &[('\u3099', '\u30f8')]), ('\u30f1',
-        &[('\u3099', '\u30f9')]), ('\u30f2', &[('\u3099', '\u30fa')]), ('\u30fd', &[('\u3099',
-        '\u30fe')]), ('\U00011099', &[('\U000110ba', '\U0001109a')]), ('\U0001109b',
-        &[('\U000110ba', '\U0001109c')]), ('\U000110a5', &[('\U000110ba', '\U000110ab')]),
-        ('\U00011131', &[('\U00011127', '\U0001112e')]), ('\U00011132', &[('\U00011127',
-        '\U0001112f')]), ('\U00011347', &[('\U0001133e', '\U0001134b'), ('\U00011357',
-        '\U0001134c')]), ('\U000114b9', &[('\U000114b0', '\U000114bc'), ('\U000114ba',
-        '\U000114bb'), ('\U000114bd', '\U000114be')]), ('\U000115b8', &[('\U000115af',
-        '\U000115ba')]), ('\U000115b9', &[('\U000115af', '\U000115bb')])
+        ('\u{3c}', &[('\u{338}', '\u{226e}')]), ('\u{3d}', &[('\u{338}', '\u{2260}')]), ('\u{3e}',
+        &[('\u{338}', '\u{226f}')]), ('\u{41}', &[('\u{300}', '\u{c0}'), ('\u{301}', '\u{c1}'),
+        ('\u{302}', '\u{c2}'), ('\u{303}', '\u{c3}'), ('\u{304}', '\u{100}'), ('\u{306}',
+        '\u{102}'), ('\u{307}', '\u{226}'), ('\u{308}', '\u{c4}'), ('\u{309}', '\u{1ea2}'),
+        ('\u{30a}', '\u{c5}'), ('\u{30c}', '\u{1cd}'), ('\u{30f}', '\u{200}'), ('\u{311}',
+        '\u{202}'), ('\u{323}', '\u{1ea0}'), ('\u{325}', '\u{1e00}'), ('\u{328}', '\u{104}')]),
+        ('\u{42}', &[('\u{307}', '\u{1e02}'), ('\u{323}', '\u{1e04}'), ('\u{331}', '\u{1e06}')]),
+        ('\u{43}', &[('\u{301}', '\u{106}'), ('\u{302}', '\u{108}'), ('\u{307}', '\u{10a}'),
+        ('\u{30c}', '\u{10c}'), ('\u{327}', '\u{c7}')]), ('\u{44}', &[('\u{307}', '\u{1e0a}'),
+        ('\u{30c}', '\u{10e}'), ('\u{323}', '\u{1e0c}'), ('\u{327}', '\u{1e10}'), ('\u{32d}',
+        '\u{1e12}'), ('\u{331}', '\u{1e0e}')]), ('\u{45}', &[('\u{300}', '\u{c8}'), ('\u{301}',
+        '\u{c9}'), ('\u{302}', '\u{ca}'), ('\u{303}', '\u{1ebc}'), ('\u{304}', '\u{112}'),
+        ('\u{306}', '\u{114}'), ('\u{307}', '\u{116}'), ('\u{308}', '\u{cb}'), ('\u{309}',
+        '\u{1eba}'), ('\u{30c}', '\u{11a}'), ('\u{30f}', '\u{204}'), ('\u{311}', '\u{206}'),
+        ('\u{323}', '\u{1eb8}'), ('\u{327}', '\u{228}'), ('\u{328}', '\u{118}'), ('\u{32d}',
+        '\u{1e18}'), ('\u{330}', '\u{1e1a}')]), ('\u{46}', &[('\u{307}', '\u{1e1e}')]), ('\u{47}',
+        &[('\u{301}', '\u{1f4}'), ('\u{302}', '\u{11c}'), ('\u{304}', '\u{1e20}'), ('\u{306}',
+        '\u{11e}'), ('\u{307}', '\u{120}'), ('\u{30c}', '\u{1e6}'), ('\u{327}', '\u{122}')]),
+        ('\u{48}', &[('\u{302}', '\u{124}'), ('\u{307}', '\u{1e22}'), ('\u{308}', '\u{1e26}'),
+        ('\u{30c}', '\u{21e}'), ('\u{323}', '\u{1e24}'), ('\u{327}', '\u{1e28}'), ('\u{32e}',
+        '\u{1e2a}')]), ('\u{49}', &[('\u{300}', '\u{cc}'), ('\u{301}', '\u{cd}'), ('\u{302}',
+        '\u{ce}'), ('\u{303}', '\u{128}'), ('\u{304}', '\u{12a}'), ('\u{306}', '\u{12c}'),
+        ('\u{307}', '\u{130}'), ('\u{308}', '\u{cf}'), ('\u{309}', '\u{1ec8}'), ('\u{30c}',
+        '\u{1cf}'), ('\u{30f}', '\u{208}'), ('\u{311}', '\u{20a}'), ('\u{323}', '\u{1eca}'),
+        ('\u{328}', '\u{12e}'), ('\u{330}', '\u{1e2c}')]), ('\u{4a}', &[('\u{302}', '\u{134}')]),
+        ('\u{4b}', &[('\u{301}', '\u{1e30}'), ('\u{30c}', '\u{1e8}'), ('\u{323}', '\u{1e32}'),
+        ('\u{327}', '\u{136}'), ('\u{331}', '\u{1e34}')]), ('\u{4c}', &[('\u{301}', '\u{139}'),
+        ('\u{30c}', '\u{13d}'), ('\u{323}', '\u{1e36}'), ('\u{327}', '\u{13b}'), ('\u{32d}',
+        '\u{1e3c}'), ('\u{331}', '\u{1e3a}')]), ('\u{4d}', &[('\u{301}', '\u{1e3e}'), ('\u{307}',
+        '\u{1e40}'), ('\u{323}', '\u{1e42}')]), ('\u{4e}', &[('\u{300}', '\u{1f8}'), ('\u{301}',
+        '\u{143}'), ('\u{303}', '\u{d1}'), ('\u{307}', '\u{1e44}'), ('\u{30c}', '\u{147}'),
+        ('\u{323}', '\u{1e46}'), ('\u{327}', '\u{145}'), ('\u{32d}', '\u{1e4a}'), ('\u{331}',
+        '\u{1e48}')]), ('\u{4f}', &[('\u{300}', '\u{d2}'), ('\u{301}', '\u{d3}'), ('\u{302}',
+        '\u{d4}'), ('\u{303}', '\u{d5}'), ('\u{304}', '\u{14c}'), ('\u{306}', '\u{14e}'),
+        ('\u{307}', '\u{22e}'), ('\u{308}', '\u{d6}'), ('\u{309}', '\u{1ece}'), ('\u{30b}',
+        '\u{150}'), ('\u{30c}', '\u{1d1}'), ('\u{30f}', '\u{20c}'), ('\u{311}', '\u{20e}'),
+        ('\u{31b}', '\u{1a0}'), ('\u{323}', '\u{1ecc}'), ('\u{328}', '\u{1ea}')]), ('\u{50}',
+        &[('\u{301}', '\u{1e54}'), ('\u{307}', '\u{1e56}')]), ('\u{52}', &[('\u{301}', '\u{154}'),
+        ('\u{307}', '\u{1e58}'), ('\u{30c}', '\u{158}'), ('\u{30f}', '\u{210}'), ('\u{311}',
+        '\u{212}'), ('\u{323}', '\u{1e5a}'), ('\u{327}', '\u{156}'), ('\u{331}', '\u{1e5e}')]),
+        ('\u{53}', &[('\u{301}', '\u{15a}'), ('\u{302}', '\u{15c}'), ('\u{307}', '\u{1e60}'),
+        ('\u{30c}', '\u{160}'), ('\u{323}', '\u{1e62}'), ('\u{326}', '\u{218}'), ('\u{327}',
+        '\u{15e}')]), ('\u{54}', &[('\u{307}', '\u{1e6a}'), ('\u{30c}', '\u{164}'), ('\u{323}',
+        '\u{1e6c}'), ('\u{326}', '\u{21a}'), ('\u{327}', '\u{162}'), ('\u{32d}', '\u{1e70}'),
+        ('\u{331}', '\u{1e6e}')]), ('\u{55}', &[('\u{300}', '\u{d9}'), ('\u{301}', '\u{da}'),
+        ('\u{302}', '\u{db}'), ('\u{303}', '\u{168}'), ('\u{304}', '\u{16a}'), ('\u{306}',
+        '\u{16c}'), ('\u{308}', '\u{dc}'), ('\u{309}', '\u{1ee6}'), ('\u{30a}', '\u{16e}'),
+        ('\u{30b}', '\u{170}'), ('\u{30c}', '\u{1d3}'), ('\u{30f}', '\u{214}'), ('\u{311}',
+        '\u{216}'), ('\u{31b}', '\u{1af}'), ('\u{323}', '\u{1ee4}'), ('\u{324}', '\u{1e72}'),
+        ('\u{328}', '\u{172}'), ('\u{32d}', '\u{1e76}'), ('\u{330}', '\u{1e74}')]), ('\u{56}',
+        &[('\u{303}', '\u{1e7c}'), ('\u{323}', '\u{1e7e}')]), ('\u{57}', &[('\u{300}', '\u{1e80}'),
+        ('\u{301}', '\u{1e82}'), ('\u{302}', '\u{174}'), ('\u{307}', '\u{1e86}'), ('\u{308}',
+        '\u{1e84}'), ('\u{323}', '\u{1e88}')]), ('\u{58}', &[('\u{307}', '\u{1e8a}'), ('\u{308}',
+        '\u{1e8c}')]), ('\u{59}', &[('\u{300}', '\u{1ef2}'), ('\u{301}', '\u{dd}'), ('\u{302}',
+        '\u{176}'), ('\u{303}', '\u{1ef8}'), ('\u{304}', '\u{232}'), ('\u{307}', '\u{1e8e}'),
+        ('\u{308}', '\u{178}'), ('\u{309}', '\u{1ef6}'), ('\u{323}', '\u{1ef4}')]), ('\u{5a}',
+        &[('\u{301}', '\u{179}'), ('\u{302}', '\u{1e90}'), ('\u{307}', '\u{17b}'), ('\u{30c}',
+        '\u{17d}'), ('\u{323}', '\u{1e92}'), ('\u{331}', '\u{1e94}')]), ('\u{61}', &[('\u{300}',
+        '\u{e0}'), ('\u{301}', '\u{e1}'), ('\u{302}', '\u{e2}'), ('\u{303}', '\u{e3}'), ('\u{304}',
+        '\u{101}'), ('\u{306}', '\u{103}'), ('\u{307}', '\u{227}'), ('\u{308}', '\u{e4}'),
+        ('\u{309}', '\u{1ea3}'), ('\u{30a}', '\u{e5}'), ('\u{30c}', '\u{1ce}'), ('\u{30f}',
+        '\u{201}'), ('\u{311}', '\u{203}'), ('\u{323}', '\u{1ea1}'), ('\u{325}', '\u{1e01}'),
+        ('\u{328}', '\u{105}')]), ('\u{62}', &[('\u{307}', '\u{1e03}'), ('\u{323}', '\u{1e05}'),
+        ('\u{331}', '\u{1e07}')]), ('\u{63}', &[('\u{301}', '\u{107}'), ('\u{302}', '\u{109}'),
+        ('\u{307}', '\u{10b}'), ('\u{30c}', '\u{10d}'), ('\u{327}', '\u{e7}')]), ('\u{64}',
+        &[('\u{307}', '\u{1e0b}'), ('\u{30c}', '\u{10f}'), ('\u{323}', '\u{1e0d}'), ('\u{327}',
+        '\u{1e11}'), ('\u{32d}', '\u{1e13}'), ('\u{331}', '\u{1e0f}')]), ('\u{65}', &[('\u{300}',
+        '\u{e8}'), ('\u{301}', '\u{e9}'), ('\u{302}', '\u{ea}'), ('\u{303}', '\u{1ebd}'),
+        ('\u{304}', '\u{113}'), ('\u{306}', '\u{115}'), ('\u{307}', '\u{117}'), ('\u{308}',
+        '\u{eb}'), ('\u{309}', '\u{1ebb}'), ('\u{30c}', '\u{11b}'), ('\u{30f}', '\u{205}'),
+        ('\u{311}', '\u{207}'), ('\u{323}', '\u{1eb9}'), ('\u{327}', '\u{229}'), ('\u{328}',
+        '\u{119}'), ('\u{32d}', '\u{1e19}'), ('\u{330}', '\u{1e1b}')]), ('\u{66}', &[('\u{307}',
+        '\u{1e1f}')]), ('\u{67}', &[('\u{301}', '\u{1f5}'), ('\u{302}', '\u{11d}'), ('\u{304}',
+        '\u{1e21}'), ('\u{306}', '\u{11f}'), ('\u{307}', '\u{121}'), ('\u{30c}', '\u{1e7}'),
+        ('\u{327}', '\u{123}')]), ('\u{68}', &[('\u{302}', '\u{125}'), ('\u{307}', '\u{1e23}'),
+        ('\u{308}', '\u{1e27}'), ('\u{30c}', '\u{21f}'), ('\u{323}', '\u{1e25}'), ('\u{327}',
+        '\u{1e29}'), ('\u{32e}', '\u{1e2b}'), ('\u{331}', '\u{1e96}')]), ('\u{69}', &[('\u{300}',
+        '\u{ec}'), ('\u{301}', '\u{ed}'), ('\u{302}', '\u{ee}'), ('\u{303}', '\u{129}'), ('\u{304}',
+        '\u{12b}'), ('\u{306}', '\u{12d}'), ('\u{308}', '\u{ef}'), ('\u{309}', '\u{1ec9}'),
+        ('\u{30c}', '\u{1d0}'), ('\u{30f}', '\u{209}'), ('\u{311}', '\u{20b}'), ('\u{323}',
+        '\u{1ecb}'), ('\u{328}', '\u{12f}'), ('\u{330}', '\u{1e2d}')]), ('\u{6a}', &[('\u{302}',
+        '\u{135}'), ('\u{30c}', '\u{1f0}')]), ('\u{6b}', &[('\u{301}', '\u{1e31}'), ('\u{30c}',
+        '\u{1e9}'), ('\u{323}', '\u{1e33}'), ('\u{327}', '\u{137}'), ('\u{331}', '\u{1e35}')]),
+        ('\u{6c}', &[('\u{301}', '\u{13a}'), ('\u{30c}', '\u{13e}'), ('\u{323}', '\u{1e37}'),
+        ('\u{327}', '\u{13c}'), ('\u{32d}', '\u{1e3d}'), ('\u{331}', '\u{1e3b}')]), ('\u{6d}',
+        &[('\u{301}', '\u{1e3f}'), ('\u{307}', '\u{1e41}'), ('\u{323}', '\u{1e43}')]), ('\u{6e}',
+        &[('\u{300}', '\u{1f9}'), ('\u{301}', '\u{144}'), ('\u{303}', '\u{f1}'), ('\u{307}',
+        '\u{1e45}'), ('\u{30c}', '\u{148}'), ('\u{323}', '\u{1e47}'), ('\u{327}', '\u{146}'),
+        ('\u{32d}', '\u{1e4b}'), ('\u{331}', '\u{1e49}')]), ('\u{6f}', &[('\u{300}', '\u{f2}'),
+        ('\u{301}', '\u{f3}'), ('\u{302}', '\u{f4}'), ('\u{303}', '\u{f5}'), ('\u{304}', '\u{14d}'),
+        ('\u{306}', '\u{14f}'), ('\u{307}', '\u{22f}'), ('\u{308}', '\u{f6}'), ('\u{309}',
+        '\u{1ecf}'), ('\u{30b}', '\u{151}'), ('\u{30c}', '\u{1d2}'), ('\u{30f}', '\u{20d}'),
+        ('\u{311}', '\u{20f}'), ('\u{31b}', '\u{1a1}'), ('\u{323}', '\u{1ecd}'), ('\u{328}',
+        '\u{1eb}')]), ('\u{70}', &[('\u{301}', '\u{1e55}'), ('\u{307}', '\u{1e57}')]), ('\u{72}',
+        &[('\u{301}', '\u{155}'), ('\u{307}', '\u{1e59}'), ('\u{30c}', '\u{159}'), ('\u{30f}',
+        '\u{211}'), ('\u{311}', '\u{213}'), ('\u{323}', '\u{1e5b}'), ('\u{327}', '\u{157}'),
+        ('\u{331}', '\u{1e5f}')]), ('\u{73}', &[('\u{301}', '\u{15b}'), ('\u{302}', '\u{15d}'),
+        ('\u{307}', '\u{1e61}'), ('\u{30c}', '\u{161}'), ('\u{323}', '\u{1e63}'), ('\u{326}',
+        '\u{219}'), ('\u{327}', '\u{15f}')]), ('\u{74}', &[('\u{307}', '\u{1e6b}'), ('\u{308}',
+        '\u{1e97}'), ('\u{30c}', '\u{165}'), ('\u{323}', '\u{1e6d}'), ('\u{326}', '\u{21b}'),
+        ('\u{327}', '\u{163}'), ('\u{32d}', '\u{1e71}'), ('\u{331}', '\u{1e6f}')]), ('\u{75}',
+        &[('\u{300}', '\u{f9}'), ('\u{301}', '\u{fa}'), ('\u{302}', '\u{fb}'), ('\u{303}',
+        '\u{169}'), ('\u{304}', '\u{16b}'), ('\u{306}', '\u{16d}'), ('\u{308}', '\u{fc}'),
+        ('\u{309}', '\u{1ee7}'), ('\u{30a}', '\u{16f}'), ('\u{30b}', '\u{171}'), ('\u{30c}',
+        '\u{1d4}'), ('\u{30f}', '\u{215}'), ('\u{311}', '\u{217}'), ('\u{31b}', '\u{1b0}'),
+        ('\u{323}', '\u{1ee5}'), ('\u{324}', '\u{1e73}'), ('\u{328}', '\u{173}'), ('\u{32d}',
+        '\u{1e77}'), ('\u{330}', '\u{1e75}')]), ('\u{76}', &[('\u{303}', '\u{1e7d}'), ('\u{323}',
+        '\u{1e7f}')]), ('\u{77}', &[('\u{300}', '\u{1e81}'), ('\u{301}', '\u{1e83}'), ('\u{302}',
+        '\u{175}'), ('\u{307}', '\u{1e87}'), ('\u{308}', '\u{1e85}'), ('\u{30a}', '\u{1e98}'),
+        ('\u{323}', '\u{1e89}')]), ('\u{78}', &[('\u{307}', '\u{1e8b}'), ('\u{308}', '\u{1e8d}')]),
+        ('\u{79}', &[('\u{300}', '\u{1ef3}'), ('\u{301}', '\u{fd}'), ('\u{302}', '\u{177}'),
+        ('\u{303}', '\u{1ef9}'), ('\u{304}', '\u{233}'), ('\u{307}', '\u{1e8f}'), ('\u{308}',
+        '\u{ff}'), ('\u{309}', '\u{1ef7}'), ('\u{30a}', '\u{1e99}'), ('\u{323}', '\u{1ef5}')]),
+        ('\u{7a}', &[('\u{301}', '\u{17a}'), ('\u{302}', '\u{1e91}'), ('\u{307}', '\u{17c}'),
+        ('\u{30c}', '\u{17e}'), ('\u{323}', '\u{1e93}'), ('\u{331}', '\u{1e95}')]), ('\u{a8}',
+        &[('\u{300}', '\u{1fed}'), ('\u{301}', '\u{385}'), ('\u{342}', '\u{1fc1}')]), ('\u{c2}',
+        &[('\u{300}', '\u{1ea6}'), ('\u{301}', '\u{1ea4}'), ('\u{303}', '\u{1eaa}'), ('\u{309}',
+        '\u{1ea8}')]), ('\u{c4}', &[('\u{304}', '\u{1de}')]), ('\u{c5}', &[('\u{301}', '\u{1fa}')]),
+        ('\u{c6}', &[('\u{301}', '\u{1fc}'), ('\u{304}', '\u{1e2}')]), ('\u{c7}', &[('\u{301}',
+        '\u{1e08}')]), ('\u{ca}', &[('\u{300}', '\u{1ec0}'), ('\u{301}', '\u{1ebe}'), ('\u{303}',
+        '\u{1ec4}'), ('\u{309}', '\u{1ec2}')]), ('\u{cf}', &[('\u{301}', '\u{1e2e}')]), ('\u{d4}',
+        &[('\u{300}', '\u{1ed2}'), ('\u{301}', '\u{1ed0}'), ('\u{303}', '\u{1ed6}'), ('\u{309}',
+        '\u{1ed4}')]), ('\u{d5}', &[('\u{301}', '\u{1e4c}'), ('\u{304}', '\u{22c}'), ('\u{308}',
+        '\u{1e4e}')]), ('\u{d6}', &[('\u{304}', '\u{22a}')]), ('\u{d8}', &[('\u{301}', '\u{1fe}')]),
+        ('\u{dc}', &[('\u{300}', '\u{1db}'), ('\u{301}', '\u{1d7}'), ('\u{304}', '\u{1d5}'),
+        ('\u{30c}', '\u{1d9}')]), ('\u{e2}', &[('\u{300}', '\u{1ea7}'), ('\u{301}', '\u{1ea5}'),
+        ('\u{303}', '\u{1eab}'), ('\u{309}', '\u{1ea9}')]), ('\u{e4}', &[('\u{304}', '\u{1df}')]),
+        ('\u{e5}', &[('\u{301}', '\u{1fb}')]), ('\u{e6}', &[('\u{301}', '\u{1fd}'), ('\u{304}',
+        '\u{1e3}')]), ('\u{e7}', &[('\u{301}', '\u{1e09}')]), ('\u{ea}', &[('\u{300}', '\u{1ec1}'),
+        ('\u{301}', '\u{1ebf}'), ('\u{303}', '\u{1ec5}'), ('\u{309}', '\u{1ec3}')]), ('\u{ef}',
+        &[('\u{301}', '\u{1e2f}')]), ('\u{f4}', &[('\u{300}', '\u{1ed3}'), ('\u{301}', '\u{1ed1}'),
+        ('\u{303}', '\u{1ed7}'), ('\u{309}', '\u{1ed5}')]), ('\u{f5}', &[('\u{301}', '\u{1e4d}'),
+        ('\u{304}', '\u{22d}'), ('\u{308}', '\u{1e4f}')]), ('\u{f6}', &[('\u{304}', '\u{22b}')]),
+        ('\u{f8}', &[('\u{301}', '\u{1ff}')]), ('\u{fc}', &[('\u{300}', '\u{1dc}'), ('\u{301}',
+        '\u{1d8}'), ('\u{304}', '\u{1d6}'), ('\u{30c}', '\u{1da}')]), ('\u{102}', &[('\u{300}',
+        '\u{1eb0}'), ('\u{301}', '\u{1eae}'), ('\u{303}', '\u{1eb4}'), ('\u{309}', '\u{1eb2}')]),
+        ('\u{103}', &[('\u{300}', '\u{1eb1}'), ('\u{301}', '\u{1eaf}'), ('\u{303}', '\u{1eb5}'),
+        ('\u{309}', '\u{1eb3}')]), ('\u{112}', &[('\u{300}', '\u{1e14}'), ('\u{301}', '\u{1e16}')]),
+        ('\u{113}', &[('\u{300}', '\u{1e15}'), ('\u{301}', '\u{1e17}')]), ('\u{14c}', &[('\u{300}',
+        '\u{1e50}'), ('\u{301}', '\u{1e52}')]), ('\u{14d}', &[('\u{300}', '\u{1e51}'), ('\u{301}',
+        '\u{1e53}')]), ('\u{15a}', &[('\u{307}', '\u{1e64}')]), ('\u{15b}', &[('\u{307}',
+        '\u{1e65}')]), ('\u{160}', &[('\u{307}', '\u{1e66}')]), ('\u{161}', &[('\u{307}',
+        '\u{1e67}')]), ('\u{168}', &[('\u{301}', '\u{1e78}')]), ('\u{169}', &[('\u{301}',
+        '\u{1e79}')]), ('\u{16a}', &[('\u{308}', '\u{1e7a}')]), ('\u{16b}', &[('\u{308}',
+        '\u{1e7b}')]), ('\u{17f}', &[('\u{307}', '\u{1e9b}')]), ('\u{1a0}', &[('\u{300}',
+        '\u{1edc}'), ('\u{301}', '\u{1eda}'), ('\u{303}', '\u{1ee0}'), ('\u{309}', '\u{1ede}'),
+        ('\u{323}', '\u{1ee2}')]), ('\u{1a1}', &[('\u{300}', '\u{1edd}'), ('\u{301}', '\u{1edb}'),
+        ('\u{303}', '\u{1ee1}'), ('\u{309}', '\u{1edf}'), ('\u{323}', '\u{1ee3}')]), ('\u{1af}',
+        &[('\u{300}', '\u{1eea}'), ('\u{301}', '\u{1ee8}'), ('\u{303}', '\u{1eee}'), ('\u{309}',
+        '\u{1eec}'), ('\u{323}', '\u{1ef0}')]), ('\u{1b0}', &[('\u{300}', '\u{1eeb}'), ('\u{301}',
+        '\u{1ee9}'), ('\u{303}', '\u{1eef}'), ('\u{309}', '\u{1eed}'), ('\u{323}', '\u{1ef1}')]),
+        ('\u{1b7}', &[('\u{30c}', '\u{1ee}')]), ('\u{1ea}', &[('\u{304}', '\u{1ec}')]), ('\u{1eb}',
+        &[('\u{304}', '\u{1ed}')]), ('\u{226}', &[('\u{304}', '\u{1e0}')]), ('\u{227}',
+        &[('\u{304}', '\u{1e1}')]), ('\u{228}', &[('\u{306}', '\u{1e1c}')]), ('\u{229}',
+        &[('\u{306}', '\u{1e1d}')]), ('\u{22e}', &[('\u{304}', '\u{230}')]), ('\u{22f}',
+        &[('\u{304}', '\u{231}')]), ('\u{292}', &[('\u{30c}', '\u{1ef}')]), ('\u{391}',
+        &[('\u{300}', '\u{1fba}'), ('\u{301}', '\u{386}'), ('\u{304}', '\u{1fb9}'), ('\u{306}',
+        '\u{1fb8}'), ('\u{313}', '\u{1f08}'), ('\u{314}', '\u{1f09}'), ('\u{345}', '\u{1fbc}')]),
+        ('\u{395}', &[('\u{300}', '\u{1fc8}'), ('\u{301}', '\u{388}'), ('\u{313}', '\u{1f18}'),
+        ('\u{314}', '\u{1f19}')]), ('\u{397}', &[('\u{300}', '\u{1fca}'), ('\u{301}', '\u{389}'),
+        ('\u{313}', '\u{1f28}'), ('\u{314}', '\u{1f29}'), ('\u{345}', '\u{1fcc}')]), ('\u{399}',
+        &[('\u{300}', '\u{1fda}'), ('\u{301}', '\u{38a}'), ('\u{304}', '\u{1fd9}'), ('\u{306}',
+        '\u{1fd8}'), ('\u{308}', '\u{3aa}'), ('\u{313}', '\u{1f38}'), ('\u{314}', '\u{1f39}')]),
+        ('\u{39f}', &[('\u{300}', '\u{1ff8}'), ('\u{301}', '\u{38c}'), ('\u{313}', '\u{1f48}'),
+        ('\u{314}', '\u{1f49}')]), ('\u{3a1}', &[('\u{314}', '\u{1fec}')]), ('\u{3a5}',
+        &[('\u{300}', '\u{1fea}'), ('\u{301}', '\u{38e}'), ('\u{304}', '\u{1fe9}'), ('\u{306}',
+        '\u{1fe8}'), ('\u{308}', '\u{3ab}'), ('\u{314}', '\u{1f59}')]), ('\u{3a9}', &[('\u{300}',
+        '\u{1ffa}'), ('\u{301}', '\u{38f}'), ('\u{313}', '\u{1f68}'), ('\u{314}', '\u{1f69}'),
+        ('\u{345}', '\u{1ffc}')]), ('\u{3ac}', &[('\u{345}', '\u{1fb4}')]), ('\u{3ae}',
+        &[('\u{345}', '\u{1fc4}')]), ('\u{3b1}', &[('\u{300}', '\u{1f70}'), ('\u{301}', '\u{3ac}'),
+        ('\u{304}', '\u{1fb1}'), ('\u{306}', '\u{1fb0}'), ('\u{313}', '\u{1f00}'), ('\u{314}',
+        '\u{1f01}'), ('\u{342}', '\u{1fb6}'), ('\u{345}', '\u{1fb3}')]), ('\u{3b5}', &[('\u{300}',
+        '\u{1f72}'), ('\u{301}', '\u{3ad}'), ('\u{313}', '\u{1f10}'), ('\u{314}', '\u{1f11}')]),
+        ('\u{3b7}', &[('\u{300}', '\u{1f74}'), ('\u{301}', '\u{3ae}'), ('\u{313}', '\u{1f20}'),
+        ('\u{314}', '\u{1f21}'), ('\u{342}', '\u{1fc6}'), ('\u{345}', '\u{1fc3}')]), ('\u{3b9}',
+        &[('\u{300}', '\u{1f76}'), ('\u{301}', '\u{3af}'), ('\u{304}', '\u{1fd1}'), ('\u{306}',
+        '\u{1fd0}'), ('\u{308}', '\u{3ca}'), ('\u{313}', '\u{1f30}'), ('\u{314}', '\u{1f31}'),
+        ('\u{342}', '\u{1fd6}')]), ('\u{3bf}', &[('\u{300}', '\u{1f78}'), ('\u{301}', '\u{3cc}'),
+        ('\u{313}', '\u{1f40}'), ('\u{314}', '\u{1f41}')]), ('\u{3c1}', &[('\u{313}', '\u{1fe4}'),
+        ('\u{314}', '\u{1fe5}')]), ('\u{3c5}', &[('\u{300}', '\u{1f7a}'), ('\u{301}', '\u{3cd}'),
+        ('\u{304}', '\u{1fe1}'), ('\u{306}', '\u{1fe0}'), ('\u{308}', '\u{3cb}'), ('\u{313}',
+        '\u{1f50}'), ('\u{314}', '\u{1f51}'), ('\u{342}', '\u{1fe6}')]), ('\u{3c9}', &[('\u{300}',
+        '\u{1f7c}'), ('\u{301}', '\u{3ce}'), ('\u{313}', '\u{1f60}'), ('\u{314}', '\u{1f61}'),
+        ('\u{342}', '\u{1ff6}'), ('\u{345}', '\u{1ff3}')]), ('\u{3ca}', &[('\u{300}', '\u{1fd2}'),
+        ('\u{301}', '\u{390}'), ('\u{342}', '\u{1fd7}')]), ('\u{3cb}', &[('\u{300}', '\u{1fe2}'),
+        ('\u{301}', '\u{3b0}'), ('\u{342}', '\u{1fe7}')]), ('\u{3ce}', &[('\u{345}', '\u{1ff4}')]),
+        ('\u{3d2}', &[('\u{301}', '\u{3d3}'), ('\u{308}', '\u{3d4}')]), ('\u{406}', &[('\u{308}',
+        '\u{407}')]), ('\u{410}', &[('\u{306}', '\u{4d0}'), ('\u{308}', '\u{4d2}')]), ('\u{413}',
+        &[('\u{301}', '\u{403}')]), ('\u{415}', &[('\u{300}', '\u{400}'), ('\u{306}', '\u{4d6}'),
+        ('\u{308}', '\u{401}')]), ('\u{416}', &[('\u{306}', '\u{4c1}'), ('\u{308}', '\u{4dc}')]),
+        ('\u{417}', &[('\u{308}', '\u{4de}')]), ('\u{418}', &[('\u{300}', '\u{40d}'), ('\u{304}',
+        '\u{4e2}'), ('\u{306}', '\u{419}'), ('\u{308}', '\u{4e4}')]), ('\u{41a}', &[('\u{301}',
+        '\u{40c}')]), ('\u{41e}', &[('\u{308}', '\u{4e6}')]), ('\u{423}', &[('\u{304}', '\u{4ee}'),
+        ('\u{306}', '\u{40e}'), ('\u{308}', '\u{4f0}'), ('\u{30b}', '\u{4f2}')]), ('\u{427}',
+        &[('\u{308}', '\u{4f4}')]), ('\u{42b}', &[('\u{308}', '\u{4f8}')]), ('\u{42d}',
+        &[('\u{308}', '\u{4ec}')]), ('\u{430}', &[('\u{306}', '\u{4d1}'), ('\u{308}', '\u{4d3}')]),
+        ('\u{433}', &[('\u{301}', '\u{453}')]), ('\u{435}', &[('\u{300}', '\u{450}'), ('\u{306}',
+        '\u{4d7}'), ('\u{308}', '\u{451}')]), ('\u{436}', &[('\u{306}', '\u{4c2}'), ('\u{308}',
+        '\u{4dd}')]), ('\u{437}', &[('\u{308}', '\u{4df}')]), ('\u{438}', &[('\u{300}', '\u{45d}'),
+        ('\u{304}', '\u{4e3}'), ('\u{306}', '\u{439}'), ('\u{308}', '\u{4e5}')]), ('\u{43a}',
+        &[('\u{301}', '\u{45c}')]), ('\u{43e}', &[('\u{308}', '\u{4e7}')]), ('\u{443}',
+        &[('\u{304}', '\u{4ef}'), ('\u{306}', '\u{45e}'), ('\u{308}', '\u{4f1}'), ('\u{30b}',
+        '\u{4f3}')]), ('\u{447}', &[('\u{308}', '\u{4f5}')]), ('\u{44b}', &[('\u{308}',
+        '\u{4f9}')]), ('\u{44d}', &[('\u{308}', '\u{4ed}')]), ('\u{456}', &[('\u{308}',
+        '\u{457}')]), ('\u{474}', &[('\u{30f}', '\u{476}')]), ('\u{475}', &[('\u{30f}',
+        '\u{477}')]), ('\u{4d8}', &[('\u{308}', '\u{4da}')]), ('\u{4d9}', &[('\u{308}',
+        '\u{4db}')]), ('\u{4e8}', &[('\u{308}', '\u{4ea}')]), ('\u{4e9}', &[('\u{308}',
+        '\u{4eb}')]), ('\u{627}', &[('\u{653}', '\u{622}'), ('\u{654}', '\u{623}'), ('\u{655}',
+        '\u{625}')]), ('\u{648}', &[('\u{654}', '\u{624}')]), ('\u{64a}', &[('\u{654}',
+        '\u{626}')]), ('\u{6c1}', &[('\u{654}', '\u{6c2}')]), ('\u{6d2}', &[('\u{654}',
+        '\u{6d3}')]), ('\u{6d5}', &[('\u{654}', '\u{6c0}')]), ('\u{928}', &[('\u{93c}',
+        '\u{929}')]), ('\u{930}', &[('\u{93c}', '\u{931}')]), ('\u{933}', &[('\u{93c}',
+        '\u{934}')]), ('\u{9c7}', &[('\u{9be}', '\u{9cb}'), ('\u{9d7}', '\u{9cc}')]), ('\u{b47}',
+        &[('\u{b3e}', '\u{b4b}'), ('\u{b56}', '\u{b48}'), ('\u{b57}', '\u{b4c}')]), ('\u{b92}',
+        &[('\u{bd7}', '\u{b94}')]), ('\u{bc6}', &[('\u{bbe}', '\u{bca}'), ('\u{bd7}', '\u{bcc}')]),
+        ('\u{bc7}', &[('\u{bbe}', '\u{bcb}')]), ('\u{c46}', &[('\u{c56}', '\u{c48}')]), ('\u{cbf}',
+        &[('\u{cd5}', '\u{cc0}')]), ('\u{cc6}', &[('\u{cc2}', '\u{cca}'), ('\u{cd5}', '\u{cc7}'),
+        ('\u{cd6}', '\u{cc8}')]), ('\u{cca}', &[('\u{cd5}', '\u{ccb}')]), ('\u{d46}', &[('\u{d3e}',
+        '\u{d4a}'), ('\u{d57}', '\u{d4c}')]), ('\u{d47}', &[('\u{d3e}', '\u{d4b}')]), ('\u{dd9}',
+        &[('\u{dca}', '\u{dda}'), ('\u{dcf}', '\u{ddc}'), ('\u{ddf}', '\u{dde}')]), ('\u{ddc}',
+        &[('\u{dca}', '\u{ddd}')]), ('\u{1025}', &[('\u{102e}', '\u{1026}')]), ('\u{1b05}',
+        &[('\u{1b35}', '\u{1b06}')]), ('\u{1b07}', &[('\u{1b35}', '\u{1b08}')]), ('\u{1b09}',
+        &[('\u{1b35}', '\u{1b0a}')]), ('\u{1b0b}', &[('\u{1b35}', '\u{1b0c}')]), ('\u{1b0d}',
+        &[('\u{1b35}', '\u{1b0e}')]), ('\u{1b11}', &[('\u{1b35}', '\u{1b12}')]), ('\u{1b3a}',
+        &[('\u{1b35}', '\u{1b3b}')]), ('\u{1b3c}', &[('\u{1b35}', '\u{1b3d}')]), ('\u{1b3e}',
+        &[('\u{1b35}', '\u{1b40}')]), ('\u{1b3f}', &[('\u{1b35}', '\u{1b41}')]), ('\u{1b42}',
+        &[('\u{1b35}', '\u{1b43}')]), ('\u{1e36}', &[('\u{304}', '\u{1e38}')]), ('\u{1e37}',
+        &[('\u{304}', '\u{1e39}')]), ('\u{1e5a}', &[('\u{304}', '\u{1e5c}')]), ('\u{1e5b}',
+        &[('\u{304}', '\u{1e5d}')]), ('\u{1e62}', &[('\u{307}', '\u{1e68}')]), ('\u{1e63}',
+        &[('\u{307}', '\u{1e69}')]), ('\u{1ea0}', &[('\u{302}', '\u{1eac}'), ('\u{306}',
+        '\u{1eb6}')]), ('\u{1ea1}', &[('\u{302}', '\u{1ead}'), ('\u{306}', '\u{1eb7}')]),
+        ('\u{1eb8}', &[('\u{302}', '\u{1ec6}')]), ('\u{1eb9}', &[('\u{302}', '\u{1ec7}')]),
+        ('\u{1ecc}', &[('\u{302}', '\u{1ed8}')]), ('\u{1ecd}', &[('\u{302}', '\u{1ed9}')]),
+        ('\u{1f00}', &[('\u{300}', '\u{1f02}'), ('\u{301}', '\u{1f04}'), ('\u{342}', '\u{1f06}'),
+        ('\u{345}', '\u{1f80}')]), ('\u{1f01}', &[('\u{300}', '\u{1f03}'), ('\u{301}', '\u{1f05}'),
+        ('\u{342}', '\u{1f07}'), ('\u{345}', '\u{1f81}')]), ('\u{1f02}', &[('\u{345}',
+        '\u{1f82}')]), ('\u{1f03}', &[('\u{345}', '\u{1f83}')]), ('\u{1f04}', &[('\u{345}',
+        '\u{1f84}')]), ('\u{1f05}', &[('\u{345}', '\u{1f85}')]), ('\u{1f06}', &[('\u{345}',
+        '\u{1f86}')]), ('\u{1f07}', &[('\u{345}', '\u{1f87}')]), ('\u{1f08}', &[('\u{300}',
+        '\u{1f0a}'), ('\u{301}', '\u{1f0c}'), ('\u{342}', '\u{1f0e}'), ('\u{345}', '\u{1f88}')]),
+        ('\u{1f09}', &[('\u{300}', '\u{1f0b}'), ('\u{301}', '\u{1f0d}'), ('\u{342}', '\u{1f0f}'),
+        ('\u{345}', '\u{1f89}')]), ('\u{1f0a}', &[('\u{345}', '\u{1f8a}')]), ('\u{1f0b}',
+        &[('\u{345}', '\u{1f8b}')]), ('\u{1f0c}', &[('\u{345}', '\u{1f8c}')]), ('\u{1f0d}',
+        &[('\u{345}', '\u{1f8d}')]), ('\u{1f0e}', &[('\u{345}', '\u{1f8e}')]), ('\u{1f0f}',
+        &[('\u{345}', '\u{1f8f}')]), ('\u{1f10}', &[('\u{300}', '\u{1f12}'), ('\u{301}',
+        '\u{1f14}')]), ('\u{1f11}', &[('\u{300}', '\u{1f13}'), ('\u{301}', '\u{1f15}')]),
+        ('\u{1f18}', &[('\u{300}', '\u{1f1a}'), ('\u{301}', '\u{1f1c}')]), ('\u{1f19}',
+        &[('\u{300}', '\u{1f1b}'), ('\u{301}', '\u{1f1d}')]), ('\u{1f20}', &[('\u{300}',
+        '\u{1f22}'), ('\u{301}', '\u{1f24}'), ('\u{342}', '\u{1f26}'), ('\u{345}', '\u{1f90}')]),
+        ('\u{1f21}', &[('\u{300}', '\u{1f23}'), ('\u{301}', '\u{1f25}'), ('\u{342}', '\u{1f27}'),
+        ('\u{345}', '\u{1f91}')]), ('\u{1f22}', &[('\u{345}', '\u{1f92}')]), ('\u{1f23}',
+        &[('\u{345}', '\u{1f93}')]), ('\u{1f24}', &[('\u{345}', '\u{1f94}')]), ('\u{1f25}',
+        &[('\u{345}', '\u{1f95}')]), ('\u{1f26}', &[('\u{345}', '\u{1f96}')]), ('\u{1f27}',
+        &[('\u{345}', '\u{1f97}')]), ('\u{1f28}', &[('\u{300}', '\u{1f2a}'), ('\u{301}',
+        '\u{1f2c}'), ('\u{342}', '\u{1f2e}'), ('\u{345}', '\u{1f98}')]), ('\u{1f29}', &[('\u{300}',
+        '\u{1f2b}'), ('\u{301}', '\u{1f2d}'), ('\u{342}', '\u{1f2f}'), ('\u{345}', '\u{1f99}')]),
+        ('\u{1f2a}', &[('\u{345}', '\u{1f9a}')]), ('\u{1f2b}', &[('\u{345}', '\u{1f9b}')]),
+        ('\u{1f2c}', &[('\u{345}', '\u{1f9c}')]), ('\u{1f2d}', &[('\u{345}', '\u{1f9d}')]),
+        ('\u{1f2e}', &[('\u{345}', '\u{1f9e}')]), ('\u{1f2f}', &[('\u{345}', '\u{1f9f}')]),
+        ('\u{1f30}', &[('\u{300}', '\u{1f32}'), ('\u{301}', '\u{1f34}'), ('\u{342}', '\u{1f36}')]),
+        ('\u{1f31}', &[('\u{300}', '\u{1f33}'), ('\u{301}', '\u{1f35}'), ('\u{342}', '\u{1f37}')]),
+        ('\u{1f38}', &[('\u{300}', '\u{1f3a}'), ('\u{301}', '\u{1f3c}'), ('\u{342}', '\u{1f3e}')]),
+        ('\u{1f39}', &[('\u{300}', '\u{1f3b}'), ('\u{301}', '\u{1f3d}'), ('\u{342}', '\u{1f3f}')]),
+        ('\u{1f40}', &[('\u{300}', '\u{1f42}'), ('\u{301}', '\u{1f44}')]), ('\u{1f41}',
+        &[('\u{300}', '\u{1f43}'), ('\u{301}', '\u{1f45}')]), ('\u{1f48}', &[('\u{300}',
+        '\u{1f4a}'), ('\u{301}', '\u{1f4c}')]), ('\u{1f49}', &[('\u{300}', '\u{1f4b}'), ('\u{301}',
+        '\u{1f4d}')]), ('\u{1f50}', &[('\u{300}', '\u{1f52}'), ('\u{301}', '\u{1f54}'), ('\u{342}',
+        '\u{1f56}')]), ('\u{1f51}', &[('\u{300}', '\u{1f53}'), ('\u{301}', '\u{1f55}'), ('\u{342}',
+        '\u{1f57}')]), ('\u{1f59}', &[('\u{300}', '\u{1f5b}'), ('\u{301}', '\u{1f5d}'), ('\u{342}',
+        '\u{1f5f}')]), ('\u{1f60}', &[('\u{300}', '\u{1f62}'), ('\u{301}', '\u{1f64}'), ('\u{342}',
+        '\u{1f66}'), ('\u{345}', '\u{1fa0}')]), ('\u{1f61}', &[('\u{300}', '\u{1f63}'), ('\u{301}',
+        '\u{1f65}'), ('\u{342}', '\u{1f67}'), ('\u{345}', '\u{1fa1}')]), ('\u{1f62}', &[('\u{345}',
+        '\u{1fa2}')]), ('\u{1f63}', &[('\u{345}', '\u{1fa3}')]), ('\u{1f64}', &[('\u{345}',
+        '\u{1fa4}')]), ('\u{1f65}', &[('\u{345}', '\u{1fa5}')]), ('\u{1f66}', &[('\u{345}',
+        '\u{1fa6}')]), ('\u{1f67}', &[('\u{345}', '\u{1fa7}')]), ('\u{1f68}', &[('\u{300}',
+        '\u{1f6a}'), ('\u{301}', '\u{1f6c}'), ('\u{342}', '\u{1f6e}'), ('\u{345}', '\u{1fa8}')]),
+        ('\u{1f69}', &[('\u{300}', '\u{1f6b}'), ('\u{301}', '\u{1f6d}'), ('\u{342}', '\u{1f6f}'),
+        ('\u{345}', '\u{1fa9}')]), ('\u{1f6a}', &[('\u{345}', '\u{1faa}')]), ('\u{1f6b}',
+        &[('\u{345}', '\u{1fab}')]), ('\u{1f6c}', &[('\u{345}', '\u{1fac}')]), ('\u{1f6d}',
+        &[('\u{345}', '\u{1fad}')]), ('\u{1f6e}', &[('\u{345}', '\u{1fae}')]), ('\u{1f6f}',
+        &[('\u{345}', '\u{1faf}')]), ('\u{1f70}', &[('\u{345}', '\u{1fb2}')]), ('\u{1f74}',
+        &[('\u{345}', '\u{1fc2}')]), ('\u{1f7c}', &[('\u{345}', '\u{1ff2}')]), ('\u{1fb6}',
+        &[('\u{345}', '\u{1fb7}')]), ('\u{1fbf}', &[('\u{300}', '\u{1fcd}'), ('\u{301}',
+        '\u{1fce}'), ('\u{342}', '\u{1fcf}')]), ('\u{1fc6}', &[('\u{345}', '\u{1fc7}')]),
+        ('\u{1ff6}', &[('\u{345}', '\u{1ff7}')]), ('\u{1ffe}', &[('\u{300}', '\u{1fdd}'),
+        ('\u{301}', '\u{1fde}'), ('\u{342}', '\u{1fdf}')]), ('\u{2190}', &[('\u{338}',
+        '\u{219a}')]), ('\u{2192}', &[('\u{338}', '\u{219b}')]), ('\u{2194}', &[('\u{338}',
+        '\u{21ae}')]), ('\u{21d0}', &[('\u{338}', '\u{21cd}')]), ('\u{21d2}', &[('\u{338}',
+        '\u{21cf}')]), ('\u{21d4}', &[('\u{338}', '\u{21ce}')]), ('\u{2203}', &[('\u{338}',
+        '\u{2204}')]), ('\u{2208}', &[('\u{338}', '\u{2209}')]), ('\u{220b}', &[('\u{338}',
+        '\u{220c}')]), ('\u{2223}', &[('\u{338}', '\u{2224}')]), ('\u{2225}', &[('\u{338}',
+        '\u{2226}')]), ('\u{223c}', &[('\u{338}', '\u{2241}')]), ('\u{2243}', &[('\u{338}',
+        '\u{2244}')]), ('\u{2245}', &[('\u{338}', '\u{2247}')]), ('\u{2248}', &[('\u{338}',
+        '\u{2249}')]), ('\u{224d}', &[('\u{338}', '\u{226d}')]), ('\u{2261}', &[('\u{338}',
+        '\u{2262}')]), ('\u{2264}', &[('\u{338}', '\u{2270}')]), ('\u{2265}', &[('\u{338}',
+        '\u{2271}')]), ('\u{2272}', &[('\u{338}', '\u{2274}')]), ('\u{2273}', &[('\u{338}',
+        '\u{2275}')]), ('\u{2276}', &[('\u{338}', '\u{2278}')]), ('\u{2277}', &[('\u{338}',
+        '\u{2279}')]), ('\u{227a}', &[('\u{338}', '\u{2280}')]), ('\u{227b}', &[('\u{338}',
+        '\u{2281}')]), ('\u{227c}', &[('\u{338}', '\u{22e0}')]), ('\u{227d}', &[('\u{338}',
+        '\u{22e1}')]), ('\u{2282}', &[('\u{338}', '\u{2284}')]), ('\u{2283}', &[('\u{338}',
+        '\u{2285}')]), ('\u{2286}', &[('\u{338}', '\u{2288}')]), ('\u{2287}', &[('\u{338}',
+        '\u{2289}')]), ('\u{2291}', &[('\u{338}', '\u{22e2}')]), ('\u{2292}', &[('\u{338}',
+        '\u{22e3}')]), ('\u{22a2}', &[('\u{338}', '\u{22ac}')]), ('\u{22a8}', &[('\u{338}',
+        '\u{22ad}')]), ('\u{22a9}', &[('\u{338}', '\u{22ae}')]), ('\u{22ab}', &[('\u{338}',
+        '\u{22af}')]), ('\u{22b2}', &[('\u{338}', '\u{22ea}')]), ('\u{22b3}', &[('\u{338}',
+        '\u{22eb}')]), ('\u{22b4}', &[('\u{338}', '\u{22ec}')]), ('\u{22b5}', &[('\u{338}',
+        '\u{22ed}')]), ('\u{3046}', &[('\u{3099}', '\u{3094}')]), ('\u{304b}', &[('\u{3099}',
+        '\u{304c}')]), ('\u{304d}', &[('\u{3099}', '\u{304e}')]), ('\u{304f}', &[('\u{3099}',
+        '\u{3050}')]), ('\u{3051}', &[('\u{3099}', '\u{3052}')]), ('\u{3053}', &[('\u{3099}',
+        '\u{3054}')]), ('\u{3055}', &[('\u{3099}', '\u{3056}')]), ('\u{3057}', &[('\u{3099}',
+        '\u{3058}')]), ('\u{3059}', &[('\u{3099}', '\u{305a}')]), ('\u{305b}', &[('\u{3099}',
+        '\u{305c}')]), ('\u{305d}', &[('\u{3099}', '\u{305e}')]), ('\u{305f}', &[('\u{3099}',
+        '\u{3060}')]), ('\u{3061}', &[('\u{3099}', '\u{3062}')]), ('\u{3064}', &[('\u{3099}',
+        '\u{3065}')]), ('\u{3066}', &[('\u{3099}', '\u{3067}')]), ('\u{3068}', &[('\u{3099}',
+        '\u{3069}')]), ('\u{306f}', &[('\u{3099}', '\u{3070}'), ('\u{309a}', '\u{3071}')]),
+        ('\u{3072}', &[('\u{3099}', '\u{3073}'), ('\u{309a}', '\u{3074}')]), ('\u{3075}',
+        &[('\u{3099}', '\u{3076}'), ('\u{309a}', '\u{3077}')]), ('\u{3078}', &[('\u{3099}',
+        '\u{3079}'), ('\u{309a}', '\u{307a}')]), ('\u{307b}', &[('\u{3099}', '\u{307c}'),
+        ('\u{309a}', '\u{307d}')]), ('\u{309d}', &[('\u{3099}', '\u{309e}')]), ('\u{30a6}',
+        &[('\u{3099}', '\u{30f4}')]), ('\u{30ab}', &[('\u{3099}', '\u{30ac}')]), ('\u{30ad}',
+        &[('\u{3099}', '\u{30ae}')]), ('\u{30af}', &[('\u{3099}', '\u{30b0}')]), ('\u{30b1}',
+        &[('\u{3099}', '\u{30b2}')]), ('\u{30b3}', &[('\u{3099}', '\u{30b4}')]), ('\u{30b5}',
+        &[('\u{3099}', '\u{30b6}')]), ('\u{30b7}', &[('\u{3099}', '\u{30b8}')]), ('\u{30b9}',
+        &[('\u{3099}', '\u{30ba}')]), ('\u{30bb}', &[('\u{3099}', '\u{30bc}')]), ('\u{30bd}',
+        &[('\u{3099}', '\u{30be}')]), ('\u{30bf}', &[('\u{3099}', '\u{30c0}')]), ('\u{30c1}',
+        &[('\u{3099}', '\u{30c2}')]), ('\u{30c4}', &[('\u{3099}', '\u{30c5}')]), ('\u{30c6}',
+        &[('\u{3099}', '\u{30c7}')]), ('\u{30c8}', &[('\u{3099}', '\u{30c9}')]), ('\u{30cf}',
+        &[('\u{3099}', '\u{30d0}'), ('\u{309a}', '\u{30d1}')]), ('\u{30d2}', &[('\u{3099}',
+        '\u{30d3}'), ('\u{309a}', '\u{30d4}')]), ('\u{30d5}', &[('\u{3099}', '\u{30d6}'),
+        ('\u{309a}', '\u{30d7}')]), ('\u{30d8}', &[('\u{3099}', '\u{30d9}'), ('\u{309a}',
+        '\u{30da}')]), ('\u{30db}', &[('\u{3099}', '\u{30dc}'), ('\u{309a}', '\u{30dd}')]),
+        ('\u{30ef}', &[('\u{3099}', '\u{30f7}')]), ('\u{30f0}', &[('\u{3099}', '\u{30f8}')]),
+        ('\u{30f1}', &[('\u{3099}', '\u{30f9}')]), ('\u{30f2}', &[('\u{3099}', '\u{30fa}')]),
+        ('\u{30fd}', &[('\u{3099}', '\u{30fe}')]), ('\u{11099}', &[('\u{110ba}', '\u{1109a}')]),
+        ('\u{1109b}', &[('\u{110ba}', '\u{1109c}')]), ('\u{110a5}', &[('\u{110ba}', '\u{110ab}')]),
+        ('\u{11131}', &[('\u{11127}', '\u{1112e}')]), ('\u{11132}', &[('\u{11127}', '\u{1112f}')]),
+        ('\u{11347}', &[('\u{1133e}', '\u{1134b}'), ('\u{11357}', '\u{1134c}')]), ('\u{114b9}',
+        &[('\u{114b0}', '\u{114bc}'), ('\u{114ba}', '\u{114bb}'), ('\u{114bd}', '\u{114be}')]),
+        ('\u{115b8}', &[('\u{115af}', '\u{115ba}')]), ('\u{115b9}', &[('\u{115af}', '\u{115bb}')])
     ];
 
 
@@ -6258,105 +6841,113 @@ fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
     }
 
     static combining_class_table: &'static [(char, char, u8)] = &[
-        ('\u0300', '\u0314', 230), ('\u0315', '\u0315', 232), ('\u0316', '\u0319', 220), ('\u031a',
-        '\u031a', 232), ('\u031b', '\u031b', 216), ('\u031c', '\u0320', 220), ('\u0321', '\u0322',
-        202), ('\u0323', '\u0326', 220), ('\u0327', '\u0328', 202), ('\u0329', '\u0333', 220),
-        ('\u0334', '\u0338', 1), ('\u0339', '\u033c', 220), ('\u033d', '\u0344', 230), ('\u0345',
-        '\u0345', 240), ('\u0346', '\u0346', 230), ('\u0347', '\u0349', 220), ('\u034a', '\u034c',
-        230), ('\u034d', '\u034e', 220), ('\u0350', '\u0352', 230), ('\u0353', '\u0356', 220),
-        ('\u0357', '\u0357', 230), ('\u0358', '\u0358', 232), ('\u0359', '\u035a', 220), ('\u035b',
-        '\u035b', 230), ('\u035c', '\u035c', 233), ('\u035d', '\u035e', 234), ('\u035f', '\u035f',
-        233), ('\u0360', '\u0361', 234), ('\u0362', '\u0362', 233), ('\u0363', '\u036f', 230),
-        ('\u0483', '\u0487', 230), ('\u0591', '\u0591', 220), ('\u0592', '\u0595', 230), ('\u0596',
-        '\u0596', 220), ('\u0597', '\u0599', 230), ('\u059a', '\u059a', 222), ('\u059b', '\u059b',
-        220), ('\u059c', '\u05a1', 230), ('\u05a2', '\u05a7', 220), ('\u05a8', '\u05a9', 230),
-        ('\u05aa', '\u05aa', 220), ('\u05ab', '\u05ac', 230), ('\u05ad', '\u05ad', 222), ('\u05ae',
-        '\u05ae', 228), ('\u05af', '\u05af', 230), ('\u05b0', '\u05b0', 10), ('\u05b1', '\u05b1',
-        11), ('\u05b2', '\u05b2', 12), ('\u05b3', '\u05b3', 13), ('\u05b4', '\u05b4', 14),
-        ('\u05b5', '\u05b5', 15), ('\u05b6', '\u05b6', 16), ('\u05b7', '\u05b7', 17), ('\u05b8',
-        '\u05b8', 18), ('\u05b9', '\u05ba', 19), ('\u05bb', '\u05bb', 20), ('\u05bc', '\u05bc', 21),
-        ('\u05bd', '\u05bd', 22), ('\u05bf', '\u05bf', 23), ('\u05c1', '\u05c1', 24), ('\u05c2',
-        '\u05c2', 25), ('\u05c4', '\u05c4', 230), ('\u05c5', '\u05c5', 220), ('\u05c7', '\u05c7',
-        18), ('\u0610', '\u0617', 230), ('\u0618', '\u0618', 30), ('\u0619', '\u0619', 31),
-        ('\u061a', '\u061a', 32), ('\u064b', '\u064b', 27), ('\u064c', '\u064c', 28), ('\u064d',
-        '\u064d', 29), ('\u064e', '\u064e', 30), ('\u064f', '\u064f', 31), ('\u0650', '\u0650', 32),
-        ('\u0651', '\u0651', 33), ('\u0652', '\u0652', 34), ('\u0653', '\u0654', 230), ('\u0655',
-        '\u0656', 220), ('\u0657', '\u065b', 230), ('\u065c', '\u065c', 220), ('\u065d', '\u065e',
-        230), ('\u065f', '\u065f', 220), ('\u0670', '\u0670', 35), ('\u06d6', '\u06dc', 230),
-        ('\u06df', '\u06e2', 230), ('\u06e3', '\u06e3', 220), ('\u06e4', '\u06e4', 230), ('\u06e7',
-        '\u06e8', 230), ('\u06ea', '\u06ea', 220), ('\u06eb', '\u06ec', 230), ('\u06ed', '\u06ed',
-        220), ('\u0711', '\u0711', 36), ('\u0730', '\u0730', 230), ('\u0731', '\u0731', 220),
-        ('\u0732', '\u0733', 230), ('\u0734', '\u0734', 220), ('\u0735', '\u0736', 230), ('\u0737',
-        '\u0739', 220), ('\u073a', '\u073a', 230), ('\u073b', '\u073c', 220), ('\u073d', '\u073d',
-        230), ('\u073e', '\u073e', 220), ('\u073f', '\u0741', 230), ('\u0742', '\u0742', 220),
-        ('\u0743', '\u0743', 230), ('\u0744', '\u0744', 220), ('\u0745', '\u0745', 230), ('\u0746',
-        '\u0746', 220), ('\u0747', '\u0747', 230), ('\u0748', '\u0748', 220), ('\u0749', '\u074a',
-        230), ('\u07eb', '\u07f1', 230), ('\u07f2', '\u07f2', 220), ('\u07f3', '\u07f3', 230),
-        ('\u0816', '\u0819', 230), ('\u081b', '\u0823', 230), ('\u0825', '\u0827', 230), ('\u0829',
-        '\u082d', 230), ('\u0859', '\u085b', 220), ('\u08e4', '\u08e5', 230), ('\u08e6', '\u08e6',
-        220), ('\u08e7', '\u08e8', 230), ('\u08e9', '\u08e9', 220), ('\u08ea', '\u08ec', 230),
-        ('\u08ed', '\u08ef', 220), ('\u08f0', '\u08f0', 27), ('\u08f1', '\u08f1', 28), ('\u08f2',
-        '\u08f2', 29), ('\u08f3', '\u08f5', 230), ('\u08f6', '\u08f6', 220), ('\u08f7', '\u08f8',
-        230), ('\u08f9', '\u08fa', 220), ('\u08fb', '\u08ff', 230), ('\u093c', '\u093c', 7),
-        ('\u094d', '\u094d', 9), ('\u0951', '\u0951', 230), ('\u0952', '\u0952', 220), ('\u0953',
-        '\u0954', 230), ('\u09bc', '\u09bc', 7), ('\u09cd', '\u09cd', 9), ('\u0a3c', '\u0a3c', 7),
-        ('\u0a4d', '\u0a4d', 9), ('\u0abc', '\u0abc', 7), ('\u0acd', '\u0acd', 9), ('\u0b3c',
-        '\u0b3c', 7), ('\u0b4d', '\u0b4d', 9), ('\u0bcd', '\u0bcd', 9), ('\u0c4d', '\u0c4d', 9),
-        ('\u0c55', '\u0c55', 84), ('\u0c56', '\u0c56', 91), ('\u0cbc', '\u0cbc', 7), ('\u0ccd',
-        '\u0ccd', 9), ('\u0d4d', '\u0d4d', 9), ('\u0dca', '\u0dca', 9), ('\u0e38', '\u0e39', 103),
-        ('\u0e3a', '\u0e3a', 9), ('\u0e48', '\u0e4b', 107), ('\u0eb8', '\u0eb9', 118), ('\u0ec8',
-        '\u0ecb', 122), ('\u0f18', '\u0f19', 220), ('\u0f35', '\u0f35', 220), ('\u0f37', '\u0f37',
-        220), ('\u0f39', '\u0f39', 216), ('\u0f71', '\u0f71', 129), ('\u0f72', '\u0f72', 130),
-        ('\u0f74', '\u0f74', 132), ('\u0f7a', '\u0f7d', 130), ('\u0f80', '\u0f80', 130), ('\u0f82',
-        '\u0f83', 230), ('\u0f84', '\u0f84', 9), ('\u0f86', '\u0f87', 230), ('\u0fc6', '\u0fc6',
-        220), ('\u1037', '\u1037', 7), ('\u1039', '\u103a', 9), ('\u108d', '\u108d', 220),
-        ('\u135d', '\u135f', 230), ('\u1714', '\u1714', 9), ('\u1734', '\u1734', 9), ('\u17d2',
-        '\u17d2', 9), ('\u17dd', '\u17dd', 230), ('\u18a9', '\u18a9', 228), ('\u1939', '\u1939',
-        222), ('\u193a', '\u193a', 230), ('\u193b', '\u193b', 220), ('\u1a17', '\u1a17', 230),
-        ('\u1a18', '\u1a18', 220), ('\u1a60', '\u1a60', 9), ('\u1a75', '\u1a7c', 230), ('\u1a7f',
-        '\u1a7f', 220), ('\u1ab0', '\u1ab4', 230), ('\u1ab5', '\u1aba', 220), ('\u1abb', '\u1abc',
-        230), ('\u1abd', '\u1abd', 220), ('\u1b34', '\u1b34', 7), ('\u1b44', '\u1b44', 9),
-        ('\u1b6b', '\u1b6b', 230), ('\u1b6c', '\u1b6c', 220), ('\u1b6d', '\u1b73', 230), ('\u1baa',
-        '\u1bab', 9), ('\u1be6', '\u1be6', 7), ('\u1bf2', '\u1bf3', 9), ('\u1c37', '\u1c37', 7),
-        ('\u1cd0', '\u1cd2', 230), ('\u1cd4', '\u1cd4', 1), ('\u1cd5', '\u1cd9', 220), ('\u1cda',
-        '\u1cdb', 230), ('\u1cdc', '\u1cdf', 220), ('\u1ce0', '\u1ce0', 230), ('\u1ce2', '\u1ce8',
-        1), ('\u1ced', '\u1ced', 220), ('\u1cf4', '\u1cf4', 230), ('\u1cf8', '\u1cf9', 230),
-        ('\u1dc0', '\u1dc1', 230), ('\u1dc2', '\u1dc2', 220), ('\u1dc3', '\u1dc9', 230), ('\u1dca',
-        '\u1dca', 220), ('\u1dcb', '\u1dcc', 230), ('\u1dcd', '\u1dcd', 234), ('\u1dce', '\u1dce',
-        214), ('\u1dcf', '\u1dcf', 220), ('\u1dd0', '\u1dd0', 202), ('\u1dd1', '\u1df5', 230),
-        ('\u1dfc', '\u1dfc', 233), ('\u1dfd', '\u1dfd', 220), ('\u1dfe', '\u1dfe', 230), ('\u1dff',
-        '\u1dff', 220), ('\u20d0', '\u20d1', 230), ('\u20d2', '\u20d3', 1), ('\u20d4', '\u20d7',
-        230), ('\u20d8', '\u20da', 1), ('\u20db', '\u20dc', 230), ('\u20e1', '\u20e1', 230),
-        ('\u20e5', '\u20e6', 1), ('\u20e7', '\u20e7', 230), ('\u20e8', '\u20e8', 220), ('\u20e9',
-        '\u20e9', 230), ('\u20ea', '\u20eb', 1), ('\u20ec', '\u20ef', 220), ('\u20f0', '\u20f0',
-        230), ('\u2cef', '\u2cf1', 230), ('\u2d7f', '\u2d7f', 9), ('\u2de0', '\u2dff', 230),
-        ('\u302a', '\u302a', 218), ('\u302b', '\u302b', 228), ('\u302c', '\u302c', 232), ('\u302d',
-        '\u302d', 222), ('\u302e', '\u302f', 224), ('\u3099', '\u309a', 8), ('\ua66f', '\ua66f',
-        230), ('\ua674', '\ua67d', 230), ('\ua69f', '\ua69f', 230), ('\ua6f0', '\ua6f1', 230),
-        ('\ua806', '\ua806', 9), ('\ua8c4', '\ua8c4', 9), ('\ua8e0', '\ua8f1', 230), ('\ua92b',
-        '\ua92d', 220), ('\ua953', '\ua953', 9), ('\ua9b3', '\ua9b3', 7), ('\ua9c0', '\ua9c0', 9),
-        ('\uaab0', '\uaab0', 230), ('\uaab2', '\uaab3', 230), ('\uaab4', '\uaab4', 220), ('\uaab7',
-        '\uaab8', 230), ('\uaabe', '\uaabf', 230), ('\uaac1', '\uaac1', 230), ('\uaaf6', '\uaaf6',
-        9), ('\uabed', '\uabed', 9), ('\ufb1e', '\ufb1e', 26), ('\ufe20', '\ufe26', 230), ('\ufe27',
-        '\ufe2d', 220), ('\U000101fd', '\U000101fd', 220), ('\U000102e0', '\U000102e0', 220),
-        ('\U00010376', '\U0001037a', 230), ('\U00010a0d', '\U00010a0d', 220), ('\U00010a0f',
-        '\U00010a0f', 230), ('\U00010a38', '\U00010a38', 230), ('\U00010a39', '\U00010a39', 1),
-        ('\U00010a3a', '\U00010a3a', 220), ('\U00010a3f', '\U00010a3f', 9), ('\U00010ae5',
-        '\U00010ae5', 230), ('\U00010ae6', '\U00010ae6', 220), ('\U00011046', '\U00011046', 9),
-        ('\U0001107f', '\U0001107f', 9), ('\U000110b9', '\U000110b9', 9), ('\U000110ba',
-        '\U000110ba', 7), ('\U00011100', '\U00011102', 230), ('\U00011133', '\U00011134', 9),
-        ('\U00011173', '\U00011173', 7), ('\U000111c0', '\U000111c0', 9), ('\U00011235',
-        '\U00011235', 9), ('\U00011236', '\U00011236', 7), ('\U000112e9', '\U000112e9', 7),
-        ('\U000112ea', '\U000112ea', 9), ('\U0001133c', '\U0001133c', 7), ('\U0001134d',
-        '\U0001134d', 9), ('\U00011366', '\U0001136c', 230), ('\U00011370', '\U00011374', 230),
-        ('\U000114c2', '\U000114c2', 9), ('\U000114c3', '\U000114c3', 7), ('\U000115bf',
-        '\U000115bf', 9), ('\U000115c0', '\U000115c0', 7), ('\U0001163f', '\U0001163f', 9),
-        ('\U000116b6', '\U000116b6', 9), ('\U000116b7', '\U000116b7', 7), ('\U00016af0',
-        '\U00016af4', 1), ('\U00016b30', '\U00016b36', 230), ('\U0001bc9e', '\U0001bc9e', 1),
-        ('\U0001d165', '\U0001d166', 216), ('\U0001d167', '\U0001d169', 1), ('\U0001d16d',
-        '\U0001d16d', 226), ('\U0001d16e', '\U0001d172', 216), ('\U0001d17b', '\U0001d182', 220),
-        ('\U0001d185', '\U0001d189', 230), ('\U0001d18a', '\U0001d18b', 220), ('\U0001d1aa',
-        '\U0001d1ad', 230), ('\U0001d242', '\U0001d244', 230), ('\U0001e8d0', '\U0001e8d6', 220)
+        ('\u{300}', '\u{314}', 230), ('\u{315}', '\u{315}', 232), ('\u{316}', '\u{319}', 220),
+        ('\u{31a}', '\u{31a}', 232), ('\u{31b}', '\u{31b}', 216), ('\u{31c}', '\u{320}', 220),
+        ('\u{321}', '\u{322}', 202), ('\u{323}', '\u{326}', 220), ('\u{327}', '\u{328}', 202),
+        ('\u{329}', '\u{333}', 220), ('\u{334}', '\u{338}', 1), ('\u{339}', '\u{33c}', 220),
+        ('\u{33d}', '\u{344}', 230), ('\u{345}', '\u{345}', 240), ('\u{346}', '\u{346}', 230),
+        ('\u{347}', '\u{349}', 220), ('\u{34a}', '\u{34c}', 230), ('\u{34d}', '\u{34e}', 220),
+        ('\u{350}', '\u{352}', 230), ('\u{353}', '\u{356}', 220), ('\u{357}', '\u{357}', 230),
+        ('\u{358}', '\u{358}', 232), ('\u{359}', '\u{35a}', 220), ('\u{35b}', '\u{35b}', 230),
+        ('\u{35c}', '\u{35c}', 233), ('\u{35d}', '\u{35e}', 234), ('\u{35f}', '\u{35f}', 233),
+        ('\u{360}', '\u{361}', 234), ('\u{362}', '\u{362}', 233), ('\u{363}', '\u{36f}', 230),
+        ('\u{483}', '\u{487}', 230), ('\u{591}', '\u{591}', 220), ('\u{592}', '\u{595}', 230),
+        ('\u{596}', '\u{596}', 220), ('\u{597}', '\u{599}', 230), ('\u{59a}', '\u{59a}', 222),
+        ('\u{59b}', '\u{59b}', 220), ('\u{59c}', '\u{5a1}', 230), ('\u{5a2}', '\u{5a7}', 220),
+        ('\u{5a8}', '\u{5a9}', 230), ('\u{5aa}', '\u{5aa}', 220), ('\u{5ab}', '\u{5ac}', 230),
+        ('\u{5ad}', '\u{5ad}', 222), ('\u{5ae}', '\u{5ae}', 228), ('\u{5af}', '\u{5af}', 230),
+        ('\u{5b0}', '\u{5b0}', 10), ('\u{5b1}', '\u{5b1}', 11), ('\u{5b2}', '\u{5b2}', 12),
+        ('\u{5b3}', '\u{5b3}', 13), ('\u{5b4}', '\u{5b4}', 14), ('\u{5b5}', '\u{5b5}', 15),
+        ('\u{5b6}', '\u{5b6}', 16), ('\u{5b7}', '\u{5b7}', 17), ('\u{5b8}', '\u{5b8}', 18),
+        ('\u{5b9}', '\u{5ba}', 19), ('\u{5bb}', '\u{5bb}', 20), ('\u{5bc}', '\u{5bc}', 21),
+        ('\u{5bd}', '\u{5bd}', 22), ('\u{5bf}', '\u{5bf}', 23), ('\u{5c1}', '\u{5c1}', 24),
+        ('\u{5c2}', '\u{5c2}', 25), ('\u{5c4}', '\u{5c4}', 230), ('\u{5c5}', '\u{5c5}', 220),
+        ('\u{5c7}', '\u{5c7}', 18), ('\u{610}', '\u{617}', 230), ('\u{618}', '\u{618}', 30),
+        ('\u{619}', '\u{619}', 31), ('\u{61a}', '\u{61a}', 32), ('\u{64b}', '\u{64b}', 27),
+        ('\u{64c}', '\u{64c}', 28), ('\u{64d}', '\u{64d}', 29), ('\u{64e}', '\u{64e}', 30),
+        ('\u{64f}', '\u{64f}', 31), ('\u{650}', '\u{650}', 32), ('\u{651}', '\u{651}', 33),
+        ('\u{652}', '\u{652}', 34), ('\u{653}', '\u{654}', 230), ('\u{655}', '\u{656}', 220),
+        ('\u{657}', '\u{65b}', 230), ('\u{65c}', '\u{65c}', 220), ('\u{65d}', '\u{65e}', 230),
+        ('\u{65f}', '\u{65f}', 220), ('\u{670}', '\u{670}', 35), ('\u{6d6}', '\u{6dc}', 230),
+        ('\u{6df}', '\u{6e2}', 230), ('\u{6e3}', '\u{6e3}', 220), ('\u{6e4}', '\u{6e4}', 230),
+        ('\u{6e7}', '\u{6e8}', 230), ('\u{6ea}', '\u{6ea}', 220), ('\u{6eb}', '\u{6ec}', 230),
+        ('\u{6ed}', '\u{6ed}', 220), ('\u{711}', '\u{711}', 36), ('\u{730}', '\u{730}', 230),
+        ('\u{731}', '\u{731}', 220), ('\u{732}', '\u{733}', 230), ('\u{734}', '\u{734}', 220),
+        ('\u{735}', '\u{736}', 230), ('\u{737}', '\u{739}', 220), ('\u{73a}', '\u{73a}', 230),
+        ('\u{73b}', '\u{73c}', 220), ('\u{73d}', '\u{73d}', 230), ('\u{73e}', '\u{73e}', 220),
+        ('\u{73f}', '\u{741}', 230), ('\u{742}', '\u{742}', 220), ('\u{743}', '\u{743}', 230),
+        ('\u{744}', '\u{744}', 220), ('\u{745}', '\u{745}', 230), ('\u{746}', '\u{746}', 220),
+        ('\u{747}', '\u{747}', 230), ('\u{748}', '\u{748}', 220), ('\u{749}', '\u{74a}', 230),
+        ('\u{7eb}', '\u{7f1}', 230), ('\u{7f2}', '\u{7f2}', 220), ('\u{7f3}', '\u{7f3}', 230),
+        ('\u{816}', '\u{819}', 230), ('\u{81b}', '\u{823}', 230), ('\u{825}', '\u{827}', 230),
+        ('\u{829}', '\u{82d}', 230), ('\u{859}', '\u{85b}', 220), ('\u{8e4}', '\u{8e5}', 230),
+        ('\u{8e6}', '\u{8e6}', 220), ('\u{8e7}', '\u{8e8}', 230), ('\u{8e9}', '\u{8e9}', 220),
+        ('\u{8ea}', '\u{8ec}', 230), ('\u{8ed}', '\u{8ef}', 220), ('\u{8f0}', '\u{8f0}', 27),
+        ('\u{8f1}', '\u{8f1}', 28), ('\u{8f2}', '\u{8f2}', 29), ('\u{8f3}', '\u{8f5}', 230),
+        ('\u{8f6}', '\u{8f6}', 220), ('\u{8f7}', '\u{8f8}', 230), ('\u{8f9}', '\u{8fa}', 220),
+        ('\u{8fb}', '\u{8ff}', 230), ('\u{93c}', '\u{93c}', 7), ('\u{94d}', '\u{94d}', 9),
+        ('\u{951}', '\u{951}', 230), ('\u{952}', '\u{952}', 220), ('\u{953}', '\u{954}', 230),
+        ('\u{9bc}', '\u{9bc}', 7), ('\u{9cd}', '\u{9cd}', 9), ('\u{a3c}', '\u{a3c}', 7), ('\u{a4d}',
+        '\u{a4d}', 9), ('\u{abc}', '\u{abc}', 7), ('\u{acd}', '\u{acd}', 9), ('\u{b3c}', '\u{b3c}',
+        7), ('\u{b4d}', '\u{b4d}', 9), ('\u{bcd}', '\u{bcd}', 9), ('\u{c4d}', '\u{c4d}', 9),
+        ('\u{c55}', '\u{c55}', 84), ('\u{c56}', '\u{c56}', 91), ('\u{cbc}', '\u{cbc}', 7),
+        ('\u{ccd}', '\u{ccd}', 9), ('\u{d4d}', '\u{d4d}', 9), ('\u{dca}', '\u{dca}', 9), ('\u{e38}',
+        '\u{e39}', 103), ('\u{e3a}', '\u{e3a}', 9), ('\u{e48}', '\u{e4b}', 107), ('\u{eb8}',
+        '\u{eb9}', 118), ('\u{ec8}', '\u{ecb}', 122), ('\u{f18}', '\u{f19}', 220), ('\u{f35}',
+        '\u{f35}', 220), ('\u{f37}', '\u{f37}', 220), ('\u{f39}', '\u{f39}', 216), ('\u{f71}',
+        '\u{f71}', 129), ('\u{f72}', '\u{f72}', 130), ('\u{f74}', '\u{f74}', 132), ('\u{f7a}',
+        '\u{f7d}', 130), ('\u{f80}', '\u{f80}', 130), ('\u{f82}', '\u{f83}', 230), ('\u{f84}',
+        '\u{f84}', 9), ('\u{f86}', '\u{f87}', 230), ('\u{fc6}', '\u{fc6}', 220), ('\u{1037}',
+        '\u{1037}', 7), ('\u{1039}', '\u{103a}', 9), ('\u{108d}', '\u{108d}', 220), ('\u{135d}',
+        '\u{135f}', 230), ('\u{1714}', '\u{1714}', 9), ('\u{1734}', '\u{1734}', 9), ('\u{17d2}',
+        '\u{17d2}', 9), ('\u{17dd}', '\u{17dd}', 230), ('\u{18a9}', '\u{18a9}', 228), ('\u{1939}',
+        '\u{1939}', 222), ('\u{193a}', '\u{193a}', 230), ('\u{193b}', '\u{193b}', 220), ('\u{1a17}',
+        '\u{1a17}', 230), ('\u{1a18}', '\u{1a18}', 220), ('\u{1a60}', '\u{1a60}', 9), ('\u{1a75}',
+        '\u{1a7c}', 230), ('\u{1a7f}', '\u{1a7f}', 220), ('\u{1ab0}', '\u{1ab4}', 230), ('\u{1ab5}',
+        '\u{1aba}', 220), ('\u{1abb}', '\u{1abc}', 230), ('\u{1abd}', '\u{1abd}', 220), ('\u{1b34}',
+        '\u{1b34}', 7), ('\u{1b44}', '\u{1b44}', 9), ('\u{1b6b}', '\u{1b6b}', 230), ('\u{1b6c}',
+        '\u{1b6c}', 220), ('\u{1b6d}', '\u{1b73}', 230), ('\u{1baa}', '\u{1bab}', 9), ('\u{1be6}',
+        '\u{1be6}', 7), ('\u{1bf2}', '\u{1bf3}', 9), ('\u{1c37}', '\u{1c37}', 7), ('\u{1cd0}',
+        '\u{1cd2}', 230), ('\u{1cd4}', '\u{1cd4}', 1), ('\u{1cd5}', '\u{1cd9}', 220), ('\u{1cda}',
+        '\u{1cdb}', 230), ('\u{1cdc}', '\u{1cdf}', 220), ('\u{1ce0}', '\u{1ce0}', 230), ('\u{1ce2}',
+        '\u{1ce8}', 1), ('\u{1ced}', '\u{1ced}', 220), ('\u{1cf4}', '\u{1cf4}', 230), ('\u{1cf8}',
+        '\u{1cf9}', 230), ('\u{1dc0}', '\u{1dc1}', 230), ('\u{1dc2}', '\u{1dc2}', 220), ('\u{1dc3}',
+        '\u{1dc9}', 230), ('\u{1dca}', '\u{1dca}', 220), ('\u{1dcb}', '\u{1dcc}', 230), ('\u{1dcd}',
+        '\u{1dcd}', 234), ('\u{1dce}', '\u{1dce}', 214), ('\u{1dcf}', '\u{1dcf}', 220), ('\u{1dd0}',
+        '\u{1dd0}', 202), ('\u{1dd1}', '\u{1df5}', 230), ('\u{1dfc}', '\u{1dfc}', 233), ('\u{1dfd}',
+        '\u{1dfd}', 220), ('\u{1dfe}', '\u{1dfe}', 230), ('\u{1dff}', '\u{1dff}', 220), ('\u{20d0}',
+        '\u{20d1}', 230), ('\u{20d2}', '\u{20d3}', 1), ('\u{20d4}', '\u{20d7}', 230), ('\u{20d8}',
+        '\u{20da}', 1), ('\u{20db}', '\u{20dc}', 230), ('\u{20e1}', '\u{20e1}', 230), ('\u{20e5}',
+        '\u{20e6}', 1), ('\u{20e7}', '\u{20e7}', 230), ('\u{20e8}', '\u{20e8}', 220), ('\u{20e9}',
+        '\u{20e9}', 230), ('\u{20ea}', '\u{20eb}', 1), ('\u{20ec}', '\u{20ef}', 220), ('\u{20f0}',
+        '\u{20f0}', 230), ('\u{2cef}', '\u{2cf1}', 230), ('\u{2d7f}', '\u{2d7f}', 9), ('\u{2de0}',
+        '\u{2dff}', 230), ('\u{302a}', '\u{302a}', 218), ('\u{302b}', '\u{302b}', 228), ('\u{302c}',
+        '\u{302c}', 232), ('\u{302d}', '\u{302d}', 222), ('\u{302e}', '\u{302f}', 224), ('\u{3099}',
+        '\u{309a}', 8), ('\u{a66f}', '\u{a66f}', 230), ('\u{a674}', '\u{a67d}', 230), ('\u{a69f}',
+        '\u{a69f}', 230), ('\u{a6f0}', '\u{a6f1}', 230), ('\u{a806}', '\u{a806}', 9), ('\u{a8c4}',
+        '\u{a8c4}', 9), ('\u{a8e0}', '\u{a8f1}', 230), ('\u{a92b}', '\u{a92d}', 220), ('\u{a953}',
+        '\u{a953}', 9), ('\u{a9b3}', '\u{a9b3}', 7), ('\u{a9c0}', '\u{a9c0}', 9), ('\u{aab0}',
+        '\u{aab0}', 230), ('\u{aab2}', '\u{aab3}', 230), ('\u{aab4}', '\u{aab4}', 220), ('\u{aab7}',
+        '\u{aab8}', 230), ('\u{aabe}', '\u{aabf}', 230), ('\u{aac1}', '\u{aac1}', 230), ('\u{aaf6}',
+        '\u{aaf6}', 9), ('\u{abed}', '\u{abed}', 9), ('\u{fb1e}', '\u{fb1e}', 26), ('\u{fe20}',
+        '\u{fe26}', 230), ('\u{fe27}', '\u{fe2d}', 220), ('\u{101fd}', '\u{101fd}', 220),
+        ('\u{102e0}', '\u{102e0}', 220), ('\u{10376}', '\u{1037a}', 230), ('\u{10a0d}', '\u{10a0d}',
+        220), ('\u{10a0f}', '\u{10a0f}', 230), ('\u{10a38}', '\u{10a38}', 230), ('\u{10a39}',
+        '\u{10a39}', 1), ('\u{10a3a}', '\u{10a3a}', 220), ('\u{10a3f}', '\u{10a3f}', 9),
+        ('\u{10ae5}', '\u{10ae5}', 230), ('\u{10ae6}', '\u{10ae6}', 220), ('\u{11046}', '\u{11046}',
+        9), ('\u{1107f}', '\u{1107f}', 9), ('\u{110b9}', '\u{110b9}', 9), ('\u{110ba}', '\u{110ba}',
+        7), ('\u{11100}', '\u{11102}', 230), ('\u{11133}', '\u{11134}', 9), ('\u{11173}',
+        '\u{11173}', 7), ('\u{111c0}', '\u{111c0}', 9), ('\u{11235}', '\u{11235}', 9), ('\u{11236}',
+        '\u{11236}', 7), ('\u{112e9}', '\u{112e9}', 7), ('\u{112ea}', '\u{112ea}', 9), ('\u{1133c}',
+        '\u{1133c}', 7), ('\u{1134d}', '\u{1134d}', 9), ('\u{11366}', '\u{1136c}', 230),
+        ('\u{11370}', '\u{11374}', 230), ('\u{114c2}', '\u{114c2}', 9), ('\u{114c3}', '\u{114c3}',
+        7), ('\u{115bf}', '\u{115bf}', 9), ('\u{115c0}', '\u{115c0}', 7), ('\u{1163f}', '\u{1163f}',
+        9), ('\u{116b6}', '\u{116b6}', 9), ('\u{116b7}', '\u{116b7}', 7), ('\u{16af0}', '\u{16af4}',
+        1), ('\u{16b30}', '\u{16b36}', 230), ('\u{1bc9e}', '\u{1bc9e}', 1), ('\u{1d165}',
+        '\u{1d166}', 216), ('\u{1d167}', '\u{1d169}', 1), ('\u{1d16d}', '\u{1d16d}', 226),
+        ('\u{1d16e}', '\u{1d172}', 216), ('\u{1d17b}', '\u{1d182}', 220), ('\u{1d185}', '\u{1d189}',
+        230), ('\u{1d18a}', '\u{1d18b}', 220), ('\u{1d1aa}', '\u{1d1ad}', 230), ('\u{1d242}',
+        '\u{1d244}', 230), ('\u{1e8d0}', '\u{1e8d6}', 220)
     ];
 
     pub fn canonical_combining_class(c: char) -> u8 {
@@ -6368,7 +6959,6 @@ pub fn canonical_combining_class(c: char) -> u8 {
 pub mod conversions {
     use core::cmp::Ordering::{Equal, Less, Greater};
     use core::slice::SlicePrelude;
-    use core::tuple::Tuple2;
     use core::option::Option;
     use core::option::Option::{Some, None};
     use core::slice;
@@ -6376,14 +6966,14 @@ pub mod conversions {
     pub fn to_lower(c: char) -> char {
         match bsearch_case_table(c, LuLl_table) {
           None        => c,
-          Some(index) => LuLl_table[index].val1()
+          Some(index) => LuLl_table[index].1
         }
     }
 
     pub fn to_upper(c: char) -> char {
         match bsearch_case_table(c, LlLu_table) {
             None        => c,
-            Some(index) => LlLu_table[index].val1()
+            Some(index) => LlLu_table[index].1
         }
     }
 
@@ -6399,537 +6989,605 @@ fn bsearch_case_table(c: char, table: &'static [(char, char)]) -> Option<uint> {
     }
 
     static LuLl_table: &'static [(char, char)] = &[
-        ('\x41', '\x61'), ('\x42', '\x62'), ('\x43', '\x63'), ('\x44', '\x64'), ('\x45', '\x65'),
-        ('\x46', '\x66'), ('\x47', '\x67'), ('\x48', '\x68'), ('\x49', '\x69'), ('\x4a', '\x6a'),
-        ('\x4b', '\x6b'), ('\x4c', '\x6c'), ('\x4d', '\x6d'), ('\x4e', '\x6e'), ('\x4f', '\x6f'),
-        ('\x50', '\x70'), ('\x51', '\x71'), ('\x52', '\x72'), ('\x53', '\x73'), ('\x54', '\x74'),
-        ('\x55', '\x75'), ('\x56', '\x76'), ('\x57', '\x77'), ('\x58', '\x78'), ('\x59', '\x79'),
-        ('\x5a', '\x7a'), ('\u00c0', '\u00e0'), ('\u00c1', '\u00e1'), ('\u00c2', '\u00e2'),
-        ('\u00c3', '\u00e3'), ('\u00c4', '\u00e4'), ('\u00c5', '\u00e5'), ('\u00c6', '\u00e6'),
-        ('\u00c7', '\u00e7'), ('\u00c8', '\u00e8'), ('\u00c9', '\u00e9'), ('\u00ca', '\u00ea'),
-        ('\u00cb', '\u00eb'), ('\u00cc', '\u00ec'), ('\u00cd', '\u00ed'), ('\u00ce', '\u00ee'),
-        ('\u00cf', '\u00ef'), ('\u00d0', '\u00f0'), ('\u00d1', '\u00f1'), ('\u00d2', '\u00f2'),
-        ('\u00d3', '\u00f3'), ('\u00d4', '\u00f4'), ('\u00d5', '\u00f5'), ('\u00d6', '\u00f6'),
-        ('\u00d8', '\u00f8'), ('\u00d9', '\u00f9'), ('\u00da', '\u00fa'), ('\u00db', '\u00fb'),
-        ('\u00dc', '\u00fc'), ('\u00dd', '\u00fd'), ('\u00de', '\u00fe'), ('\u0100', '\u0101'),
-        ('\u0102', '\u0103'), ('\u0104', '\u0105'), ('\u0106', '\u0107'), ('\u0108', '\u0109'),
-        ('\u010a', '\u010b'), ('\u010c', '\u010d'), ('\u010e', '\u010f'), ('\u0110', '\u0111'),
-        ('\u0112', '\u0113'), ('\u0114', '\u0115'), ('\u0116', '\u0117'), ('\u0118', '\u0119'),
-        ('\u011a', '\u011b'), ('\u011c', '\u011d'), ('\u011e', '\u011f'), ('\u0120', '\u0121'),
-        ('\u0122', '\u0123'), ('\u0124', '\u0125'), ('\u0126', '\u0127'), ('\u0128', '\u0129'),
-        ('\u012a', '\u012b'), ('\u012c', '\u012d'), ('\u012e', '\u012f'), ('\u0130', '\x69'),
-        ('\u0132', '\u0133'), ('\u0134', '\u0135'), ('\u0136', '\u0137'), ('\u0139', '\u013a'),
-        ('\u013b', '\u013c'), ('\u013d', '\u013e'), ('\u013f', '\u0140'), ('\u0141', '\u0142'),
-        ('\u0143', '\u0144'), ('\u0145', '\u0146'), ('\u0147', '\u0148'), ('\u014a', '\u014b'),
-        ('\u014c', '\u014d'), ('\u014e', '\u014f'), ('\u0150', '\u0151'), ('\u0152', '\u0153'),
-        ('\u0154', '\u0155'), ('\u0156', '\u0157'), ('\u0158', '\u0159'), ('\u015a', '\u015b'),
-        ('\u015c', '\u015d'), ('\u015e', '\u015f'), ('\u0160', '\u0161'), ('\u0162', '\u0163'),
-        ('\u0164', '\u0165'), ('\u0166', '\u0167'), ('\u0168', '\u0169'), ('\u016a', '\u016b'),
-        ('\u016c', '\u016d'), ('\u016e', '\u016f'), ('\u0170', '\u0171'), ('\u0172', '\u0173'),
-        ('\u0174', '\u0175'), ('\u0176', '\u0177'), ('\u0178', '\u00ff'), ('\u0179', '\u017a'),
-        ('\u017b', '\u017c'), ('\u017d', '\u017e'), ('\u0181', '\u0253'), ('\u0182', '\u0183'),
-        ('\u0184', '\u0185'), ('\u0186', '\u0254'), ('\u0187', '\u0188'), ('\u0189', '\u0256'),
-        ('\u018a', '\u0257'), ('\u018b', '\u018c'), ('\u018e', '\u01dd'), ('\u018f', '\u0259'),
-        ('\u0190', '\u025b'), ('\u0191', '\u0192'), ('\u0193', '\u0260'), ('\u0194', '\u0263'),
-        ('\u0196', '\u0269'), ('\u0197', '\u0268'), ('\u0198', '\u0199'), ('\u019c', '\u026f'),
-        ('\u019d', '\u0272'), ('\u019f', '\u0275'), ('\u01a0', '\u01a1'), ('\u01a2', '\u01a3'),
-        ('\u01a4', '\u01a5'), ('\u01a6', '\u0280'), ('\u01a7', '\u01a8'), ('\u01a9', '\u0283'),
-        ('\u01ac', '\u01ad'), ('\u01ae', '\u0288'), ('\u01af', '\u01b0'), ('\u01b1', '\u028a'),
-        ('\u01b2', '\u028b'), ('\u01b3', '\u01b4'), ('\u01b5', '\u01b6'), ('\u01b7', '\u0292'),
-        ('\u01b8', '\u01b9'), ('\u01bc', '\u01bd'), ('\u01c4', '\u01c6'), ('\u01c7', '\u01c9'),
-        ('\u01ca', '\u01cc'), ('\u01cd', '\u01ce'), ('\u01cf', '\u01d0'), ('\u01d1', '\u01d2'),
-        ('\u01d3', '\u01d4'), ('\u01d5', '\u01d6'), ('\u01d7', '\u01d8'), ('\u01d9', '\u01da'),
-        ('\u01db', '\u01dc'), ('\u01de', '\u01df'), ('\u01e0', '\u01e1'), ('\u01e2', '\u01e3'),
-        ('\u01e4', '\u01e5'), ('\u01e6', '\u01e7'), ('\u01e8', '\u01e9'), ('\u01ea', '\u01eb'),
-        ('\u01ec', '\u01ed'), ('\u01ee', '\u01ef'), ('\u01f1', '\u01f3'), ('\u01f4', '\u01f5'),
-        ('\u01f6', '\u0195'), ('\u01f7', '\u01bf'), ('\u01f8', '\u01f9'), ('\u01fa', '\u01fb'),
-        ('\u01fc', '\u01fd'), ('\u01fe', '\u01ff'), ('\u0200', '\u0201'), ('\u0202', '\u0203'),
-        ('\u0204', '\u0205'), ('\u0206', '\u0207'), ('\u0208', '\u0209'), ('\u020a', '\u020b'),
-        ('\u020c', '\u020d'), ('\u020e', '\u020f'), ('\u0210', '\u0211'), ('\u0212', '\u0213'),
-        ('\u0214', '\u0215'), ('\u0216', '\u0217'), ('\u0218', '\u0219'), ('\u021a', '\u021b'),
-        ('\u021c', '\u021d'), ('\u021e', '\u021f'), ('\u0220', '\u019e'), ('\u0222', '\u0223'),
-        ('\u0224', '\u0225'), ('\u0226', '\u0227'), ('\u0228', '\u0229'), ('\u022a', '\u022b'),
-        ('\u022c', '\u022d'), ('\u022e', '\u022f'), ('\u0230', '\u0231'), ('\u0232', '\u0233'),
-        ('\u023a', '\u2c65'), ('\u023b', '\u023c'), ('\u023d', '\u019a'), ('\u023e', '\u2c66'),
-        ('\u0241', '\u0242'), ('\u0243', '\u0180'), ('\u0244', '\u0289'), ('\u0245', '\u028c'),
-        ('\u0246', '\u0247'), ('\u0248', '\u0249'), ('\u024a', '\u024b'), ('\u024c', '\u024d'),
-        ('\u024e', '\u024f'), ('\u0370', '\u0371'), ('\u0372', '\u0373'), ('\u0376', '\u0377'),
-        ('\u037f', '\u03f3'), ('\u0386', '\u03ac'), ('\u0388', '\u03ad'), ('\u0389', '\u03ae'),
-        ('\u038a', '\u03af'), ('\u038c', '\u03cc'), ('\u038e', '\u03cd'), ('\u038f', '\u03ce'),
-        ('\u0391', '\u03b1'), ('\u0392', '\u03b2'), ('\u0393', '\u03b3'), ('\u0394', '\u03b4'),
-        ('\u0395', '\u03b5'), ('\u0396', '\u03b6'), ('\u0397', '\u03b7'), ('\u0398', '\u03b8'),
-        ('\u0399', '\u03b9'), ('\u039a', '\u03ba'), ('\u039b', '\u03bb'), ('\u039c', '\u03bc'),
-        ('\u039d', '\u03bd'), ('\u039e', '\u03be'), ('\u039f', '\u03bf'), ('\u03a0', '\u03c0'),
-        ('\u03a1', '\u03c1'), ('\u03a3', '\u03c3'), ('\u03a4', '\u03c4'), ('\u03a5', '\u03c5'),
-        ('\u03a6', '\u03c6'), ('\u03a7', '\u03c7'), ('\u03a8', '\u03c8'), ('\u03a9', '\u03c9'),
-        ('\u03aa', '\u03ca'), ('\u03ab', '\u03cb'), ('\u03cf', '\u03d7'), ('\u03d8', '\u03d9'),
-        ('\u03da', '\u03db'), ('\u03dc', '\u03dd'), ('\u03de', '\u03df'), ('\u03e0', '\u03e1'),
-        ('\u03e2', '\u03e3'), ('\u03e4', '\u03e5'), ('\u03e6', '\u03e7'), ('\u03e8', '\u03e9'),
-        ('\u03ea', '\u03eb'), ('\u03ec', '\u03ed'), ('\u03ee', '\u03ef'), ('\u03f4', '\u03b8'),
-        ('\u03f7', '\u03f8'), ('\u03f9', '\u03f2'), ('\u03fa', '\u03fb'), ('\u03fd', '\u037b'),
-        ('\u03fe', '\u037c'), ('\u03ff', '\u037d'), ('\u0400', '\u0450'), ('\u0401', '\u0451'),
-        ('\u0402', '\u0452'), ('\u0403', '\u0453'), ('\u0404', '\u0454'), ('\u0405', '\u0455'),
-        ('\u0406', '\u0456'), ('\u0407', '\u0457'), ('\u0408', '\u0458'), ('\u0409', '\u0459'),
-        ('\u040a', '\u045a'), ('\u040b', '\u045b'), ('\u040c', '\u045c'), ('\u040d', '\u045d'),
-        ('\u040e', '\u045e'), ('\u040f', '\u045f'), ('\u0410', '\u0430'), ('\u0411', '\u0431'),
-        ('\u0412', '\u0432'), ('\u0413', '\u0433'), ('\u0414', '\u0434'), ('\u0415', '\u0435'),
-        ('\u0416', '\u0436'), ('\u0417', '\u0437'), ('\u0418', '\u0438'), ('\u0419', '\u0439'),
-        ('\u041a', '\u043a'), ('\u041b', '\u043b'), ('\u041c', '\u043c'), ('\u041d', '\u043d'),
-        ('\u041e', '\u043e'), ('\u041f', '\u043f'), ('\u0420', '\u0440'), ('\u0421', '\u0441'),
-        ('\u0422', '\u0442'), ('\u0423', '\u0443'), ('\u0424', '\u0444'), ('\u0425', '\u0445'),
-        ('\u0426', '\u0446'), ('\u0427', '\u0447'), ('\u0428', '\u0448'), ('\u0429', '\u0449'),
-        ('\u042a', '\u044a'), ('\u042b', '\u044b'), ('\u042c', '\u044c'), ('\u042d', '\u044d'),
-        ('\u042e', '\u044e'), ('\u042f', '\u044f'), ('\u0460', '\u0461'), ('\u0462', '\u0463'),
-        ('\u0464', '\u0465'), ('\u0466', '\u0467'), ('\u0468', '\u0469'), ('\u046a', '\u046b'),
-        ('\u046c', '\u046d'), ('\u046e', '\u046f'), ('\u0470', '\u0471'), ('\u0472', '\u0473'),
-        ('\u0474', '\u0475'), ('\u0476', '\u0477'), ('\u0478', '\u0479'), ('\u047a', '\u047b'),
-        ('\u047c', '\u047d'), ('\u047e', '\u047f'), ('\u0480', '\u0481'), ('\u048a', '\u048b'),
-        ('\u048c', '\u048d'), ('\u048e', '\u048f'), ('\u0490', '\u0491'), ('\u0492', '\u0493'),
-        ('\u0494', '\u0495'), ('\u0496', '\u0497'), ('\u0498', '\u0499'), ('\u049a', '\u049b'),
-        ('\u049c', '\u049d'), ('\u049e', '\u049f'), ('\u04a0', '\u04a1'), ('\u04a2', '\u04a3'),
-        ('\u04a4', '\u04a5'), ('\u04a6', '\u04a7'), ('\u04a8', '\u04a9'), ('\u04aa', '\u04ab'),
-        ('\u04ac', '\u04ad'), ('\u04ae', '\u04af'), ('\u04b0', '\u04b1'), ('\u04b2', '\u04b3'),
-        ('\u04b4', '\u04b5'), ('\u04b6', '\u04b7'), ('\u04b8', '\u04b9'), ('\u04ba', '\u04bb'),
-        ('\u04bc', '\u04bd'), ('\u04be', '\u04bf'), ('\u04c0', '\u04cf'), ('\u04c1', '\u04c2'),
-        ('\u04c3', '\u04c4'), ('\u04c5', '\u04c6'), ('\u04c7', '\u04c8'), ('\u04c9', '\u04ca'),
-        ('\u04cb', '\u04cc'), ('\u04cd', '\u04ce'), ('\u04d0', '\u04d1'), ('\u04d2', '\u04d3'),
-        ('\u04d4', '\u04d5'), ('\u04d6', '\u04d7'), ('\u04d8', '\u04d9'), ('\u04da', '\u04db'),
-        ('\u04dc', '\u04dd'), ('\u04de', '\u04df'), ('\u04e0', '\u04e1'), ('\u04e2', '\u04e3'),
-        ('\u04e4', '\u04e5'), ('\u04e6', '\u04e7'), ('\u04e8', '\u04e9'), ('\u04ea', '\u04eb'),
-        ('\u04ec', '\u04ed'), ('\u04ee', '\u04ef'), ('\u04f0', '\u04f1'), ('\u04f2', '\u04f3'),
-        ('\u04f4', '\u04f5'), ('\u04f6', '\u04f7'), ('\u04f8', '\u04f9'), ('\u04fa', '\u04fb'),
-        ('\u04fc', '\u04fd'), ('\u04fe', '\u04ff'), ('\u0500', '\u0501'), ('\u0502', '\u0503'),
-        ('\u0504', '\u0505'), ('\u0506', '\u0507'), ('\u0508', '\u0509'), ('\u050a', '\u050b'),
-        ('\u050c', '\u050d'), ('\u050e', '\u050f'), ('\u0510', '\u0511'), ('\u0512', '\u0513'),
-        ('\u0514', '\u0515'), ('\u0516', '\u0517'), ('\u0518', '\u0519'), ('\u051a', '\u051b'),
-        ('\u051c', '\u051d'), ('\u051e', '\u051f'), ('\u0520', '\u0521'), ('\u0522', '\u0523'),
-        ('\u0524', '\u0525'), ('\u0526', '\u0527'), ('\u0528', '\u0529'), ('\u052a', '\u052b'),
-        ('\u052c', '\u052d'), ('\u052e', '\u052f'), ('\u0531', '\u0561'), ('\u0532', '\u0562'),
-        ('\u0533', '\u0563'), ('\u0534', '\u0564'), ('\u0535', '\u0565'), ('\u0536', '\u0566'),
-        ('\u0537', '\u0567'), ('\u0538', '\u0568'), ('\u0539', '\u0569'), ('\u053a', '\u056a'),
-        ('\u053b', '\u056b'), ('\u053c', '\u056c'), ('\u053d', '\u056d'), ('\u053e', '\u056e'),
-        ('\u053f', '\u056f'), ('\u0540', '\u0570'), ('\u0541', '\u0571'), ('\u0542', '\u0572'),
-        ('\u0543', '\u0573'), ('\u0544', '\u0574'), ('\u0545', '\u0575'), ('\u0546', '\u0576'),
-        ('\u0547', '\u0577'), ('\u0548', '\u0578'), ('\u0549', '\u0579'), ('\u054a', '\u057a'),
-        ('\u054b', '\u057b'), ('\u054c', '\u057c'), ('\u054d', '\u057d'), ('\u054e', '\u057e'),
-        ('\u054f', '\u057f'), ('\u0550', '\u0580'), ('\u0551', '\u0581'), ('\u0552', '\u0582'),
-        ('\u0553', '\u0583'), ('\u0554', '\u0584'), ('\u0555', '\u0585'), ('\u0556', '\u0586'),
-        ('\u10a0', '\u2d00'), ('\u10a1', '\u2d01'), ('\u10a2', '\u2d02'), ('\u10a3', '\u2d03'),
-        ('\u10a4', '\u2d04'), ('\u10a5', '\u2d05'), ('\u10a6', '\u2d06'), ('\u10a7', '\u2d07'),
-        ('\u10a8', '\u2d08'), ('\u10a9', '\u2d09'), ('\u10aa', '\u2d0a'), ('\u10ab', '\u2d0b'),
-        ('\u10ac', '\u2d0c'), ('\u10ad', '\u2d0d'), ('\u10ae', '\u2d0e'), ('\u10af', '\u2d0f'),
-        ('\u10b0', '\u2d10'), ('\u10b1', '\u2d11'), ('\u10b2', '\u2d12'), ('\u10b3', '\u2d13'),
-        ('\u10b4', '\u2d14'), ('\u10b5', '\u2d15'), ('\u10b6', '\u2d16'), ('\u10b7', '\u2d17'),
-        ('\u10b8', '\u2d18'), ('\u10b9', '\u2d19'), ('\u10ba', '\u2d1a'), ('\u10bb', '\u2d1b'),
-        ('\u10bc', '\u2d1c'), ('\u10bd', '\u2d1d'), ('\u10be', '\u2d1e'), ('\u10bf', '\u2d1f'),
-        ('\u10c0', '\u2d20'), ('\u10c1', '\u2d21'), ('\u10c2', '\u2d22'), ('\u10c3', '\u2d23'),
-        ('\u10c4', '\u2d24'), ('\u10c5', '\u2d25'), ('\u10c7', '\u2d27'), ('\u10cd', '\u2d2d'),
-        ('\u1e00', '\u1e01'), ('\u1e02', '\u1e03'), ('\u1e04', '\u1e05'), ('\u1e06', '\u1e07'),
-        ('\u1e08', '\u1e09'), ('\u1e0a', '\u1e0b'), ('\u1e0c', '\u1e0d'), ('\u1e0e', '\u1e0f'),
-        ('\u1e10', '\u1e11'), ('\u1e12', '\u1e13'), ('\u1e14', '\u1e15'), ('\u1e16', '\u1e17'),
-        ('\u1e18', '\u1e19'), ('\u1e1a', '\u1e1b'), ('\u1e1c', '\u1e1d'), ('\u1e1e', '\u1e1f'),
-        ('\u1e20', '\u1e21'), ('\u1e22', '\u1e23'), ('\u1e24', '\u1e25'), ('\u1e26', '\u1e27'),
-        ('\u1e28', '\u1e29'), ('\u1e2a', '\u1e2b'), ('\u1e2c', '\u1e2d'), ('\u1e2e', '\u1e2f'),
-        ('\u1e30', '\u1e31'), ('\u1e32', '\u1e33'), ('\u1e34', '\u1e35'), ('\u1e36', '\u1e37'),
-        ('\u1e38', '\u1e39'), ('\u1e3a', '\u1e3b'), ('\u1e3c', '\u1e3d'), ('\u1e3e', '\u1e3f'),
-        ('\u1e40', '\u1e41'), ('\u1e42', '\u1e43'), ('\u1e44', '\u1e45'), ('\u1e46', '\u1e47'),
-        ('\u1e48', '\u1e49'), ('\u1e4a', '\u1e4b'), ('\u1e4c', '\u1e4d'), ('\u1e4e', '\u1e4f'),
-        ('\u1e50', '\u1e51'), ('\u1e52', '\u1e53'), ('\u1e54', '\u1e55'), ('\u1e56', '\u1e57'),
-        ('\u1e58', '\u1e59'), ('\u1e5a', '\u1e5b'), ('\u1e5c', '\u1e5d'), ('\u1e5e', '\u1e5f'),
-        ('\u1e60', '\u1e61'), ('\u1e62', '\u1e63'), ('\u1e64', '\u1e65'), ('\u1e66', '\u1e67'),
-        ('\u1e68', '\u1e69'), ('\u1e6a', '\u1e6b'), ('\u1e6c', '\u1e6d'), ('\u1e6e', '\u1e6f'),
-        ('\u1e70', '\u1e71'), ('\u1e72', '\u1e73'), ('\u1e74', '\u1e75'), ('\u1e76', '\u1e77'),
-        ('\u1e78', '\u1e79'), ('\u1e7a', '\u1e7b'), ('\u1e7c', '\u1e7d'), ('\u1e7e', '\u1e7f'),
-        ('\u1e80', '\u1e81'), ('\u1e82', '\u1e83'), ('\u1e84', '\u1e85'), ('\u1e86', '\u1e87'),
-        ('\u1e88', '\u1e89'), ('\u1e8a', '\u1e8b'), ('\u1e8c', '\u1e8d'), ('\u1e8e', '\u1e8f'),
-        ('\u1e90', '\u1e91'), ('\u1e92', '\u1e93'), ('\u1e94', '\u1e95'), ('\u1e9e', '\u00df'),
-        ('\u1ea0', '\u1ea1'), ('\u1ea2', '\u1ea3'), ('\u1ea4', '\u1ea5'), ('\u1ea6', '\u1ea7'),
-        ('\u1ea8', '\u1ea9'), ('\u1eaa', '\u1eab'), ('\u1eac', '\u1ead'), ('\u1eae', '\u1eaf'),
-        ('\u1eb0', '\u1eb1'), ('\u1eb2', '\u1eb3'), ('\u1eb4', '\u1eb5'), ('\u1eb6', '\u1eb7'),
-        ('\u1eb8', '\u1eb9'), ('\u1eba', '\u1ebb'), ('\u1ebc', '\u1ebd'), ('\u1ebe', '\u1ebf'),
-        ('\u1ec0', '\u1ec1'), ('\u1ec2', '\u1ec3'), ('\u1ec4', '\u1ec5'), ('\u1ec6', '\u1ec7'),
-        ('\u1ec8', '\u1ec9'), ('\u1eca', '\u1ecb'), ('\u1ecc', '\u1ecd'), ('\u1ece', '\u1ecf'),
-        ('\u1ed0', '\u1ed1'), ('\u1ed2', '\u1ed3'), ('\u1ed4', '\u1ed5'), ('\u1ed6', '\u1ed7'),
-        ('\u1ed8', '\u1ed9'), ('\u1eda', '\u1edb'), ('\u1edc', '\u1edd'), ('\u1ede', '\u1edf'),
-        ('\u1ee0', '\u1ee1'), ('\u1ee2', '\u1ee3'), ('\u1ee4', '\u1ee5'), ('\u1ee6', '\u1ee7'),
-        ('\u1ee8', '\u1ee9'), ('\u1eea', '\u1eeb'), ('\u1eec', '\u1eed'), ('\u1eee', '\u1eef'),
-        ('\u1ef0', '\u1ef1'), ('\u1ef2', '\u1ef3'), ('\u1ef4', '\u1ef5'), ('\u1ef6', '\u1ef7'),
-        ('\u1ef8', '\u1ef9'), ('\u1efa', '\u1efb'), ('\u1efc', '\u1efd'), ('\u1efe', '\u1eff'),
-        ('\u1f08', '\u1f00'), ('\u1f09', '\u1f01'), ('\u1f0a', '\u1f02'), ('\u1f0b', '\u1f03'),
-        ('\u1f0c', '\u1f04'), ('\u1f0d', '\u1f05'), ('\u1f0e', '\u1f06'), ('\u1f0f', '\u1f07'),
-        ('\u1f18', '\u1f10'), ('\u1f19', '\u1f11'), ('\u1f1a', '\u1f12'), ('\u1f1b', '\u1f13'),
-        ('\u1f1c', '\u1f14'), ('\u1f1d', '\u1f15'), ('\u1f28', '\u1f20'), ('\u1f29', '\u1f21'),
-        ('\u1f2a', '\u1f22'), ('\u1f2b', '\u1f23'), ('\u1f2c', '\u1f24'), ('\u1f2d', '\u1f25'),
-        ('\u1f2e', '\u1f26'), ('\u1f2f', '\u1f27'), ('\u1f38', '\u1f30'), ('\u1f39', '\u1f31'),
-        ('\u1f3a', '\u1f32'), ('\u1f3b', '\u1f33'), ('\u1f3c', '\u1f34'), ('\u1f3d', '\u1f35'),
-        ('\u1f3e', '\u1f36'), ('\u1f3f', '\u1f37'), ('\u1f48', '\u1f40'), ('\u1f49', '\u1f41'),
-        ('\u1f4a', '\u1f42'), ('\u1f4b', '\u1f43'), ('\u1f4c', '\u1f44'), ('\u1f4d', '\u1f45'),
-        ('\u1f59', '\u1f51'), ('\u1f5b', '\u1f53'), ('\u1f5d', '\u1f55'), ('\u1f5f', '\u1f57'),
-        ('\u1f68', '\u1f60'), ('\u1f69', '\u1f61'), ('\u1f6a', '\u1f62'), ('\u1f6b', '\u1f63'),
-        ('\u1f6c', '\u1f64'), ('\u1f6d', '\u1f65'), ('\u1f6e', '\u1f66'), ('\u1f6f', '\u1f67'),
-        ('\u1fb8', '\u1fb0'), ('\u1fb9', '\u1fb1'), ('\u1fba', '\u1f70'), ('\u1fbb', '\u1f71'),
-        ('\u1fc8', '\u1f72'), ('\u1fc9', '\u1f73'), ('\u1fca', '\u1f74'), ('\u1fcb', '\u1f75'),
-        ('\u1fd8', '\u1fd0'), ('\u1fd9', '\u1fd1'), ('\u1fda', '\u1f76'), ('\u1fdb', '\u1f77'),
-        ('\u1fe8', '\u1fe0'), ('\u1fe9', '\u1fe1'), ('\u1fea', '\u1f7a'), ('\u1feb', '\u1f7b'),
-        ('\u1fec', '\u1fe5'), ('\u1ff8', '\u1f78'), ('\u1ff9', '\u1f79'), ('\u1ffa', '\u1f7c'),
-        ('\u1ffb', '\u1f7d'), ('\u2126', '\u03c9'), ('\u212a', '\x6b'), ('\u212b', '\u00e5'),
-        ('\u2132', '\u214e'), ('\u2183', '\u2184'), ('\u2c00', '\u2c30'), ('\u2c01', '\u2c31'),
-        ('\u2c02', '\u2c32'), ('\u2c03', '\u2c33'), ('\u2c04', '\u2c34'), ('\u2c05', '\u2c35'),
-        ('\u2c06', '\u2c36'), ('\u2c07', '\u2c37'), ('\u2c08', '\u2c38'), ('\u2c09', '\u2c39'),
-        ('\u2c0a', '\u2c3a'), ('\u2c0b', '\u2c3b'), ('\u2c0c', '\u2c3c'), ('\u2c0d', '\u2c3d'),
-        ('\u2c0e', '\u2c3e'), ('\u2c0f', '\u2c3f'), ('\u2c10', '\u2c40'), ('\u2c11', '\u2c41'),
-        ('\u2c12', '\u2c42'), ('\u2c13', '\u2c43'), ('\u2c14', '\u2c44'), ('\u2c15', '\u2c45'),
-        ('\u2c16', '\u2c46'), ('\u2c17', '\u2c47'), ('\u2c18', '\u2c48'), ('\u2c19', '\u2c49'),
-        ('\u2c1a', '\u2c4a'), ('\u2c1b', '\u2c4b'), ('\u2c1c', '\u2c4c'), ('\u2c1d', '\u2c4d'),
-        ('\u2c1e', '\u2c4e'), ('\u2c1f', '\u2c4f'), ('\u2c20', '\u2c50'), ('\u2c21', '\u2c51'),
-        ('\u2c22', '\u2c52'), ('\u2c23', '\u2c53'), ('\u2c24', '\u2c54'), ('\u2c25', '\u2c55'),
-        ('\u2c26', '\u2c56'), ('\u2c27', '\u2c57'), ('\u2c28', '\u2c58'), ('\u2c29', '\u2c59'),
-        ('\u2c2a', '\u2c5a'), ('\u2c2b', '\u2c5b'), ('\u2c2c', '\u2c5c'), ('\u2c2d', '\u2c5d'),
-        ('\u2c2e', '\u2c5e'), ('\u2c60', '\u2c61'), ('\u2c62', '\u026b'), ('\u2c63', '\u1d7d'),
-        ('\u2c64', '\u027d'), ('\u2c67', '\u2c68'), ('\u2c69', '\u2c6a'), ('\u2c6b', '\u2c6c'),
-        ('\u2c6d', '\u0251'), ('\u2c6e', '\u0271'), ('\u2c6f', '\u0250'), ('\u2c70', '\u0252'),
-        ('\u2c72', '\u2c73'), ('\u2c75', '\u2c76'), ('\u2c7e', '\u023f'), ('\u2c7f', '\u0240'),
-        ('\u2c80', '\u2c81'), ('\u2c82', '\u2c83'), ('\u2c84', '\u2c85'), ('\u2c86', '\u2c87'),
-        ('\u2c88', '\u2c89'), ('\u2c8a', '\u2c8b'), ('\u2c8c', '\u2c8d'), ('\u2c8e', '\u2c8f'),
-        ('\u2c90', '\u2c91'), ('\u2c92', '\u2c93'), ('\u2c94', '\u2c95'), ('\u2c96', '\u2c97'),
-        ('\u2c98', '\u2c99'), ('\u2c9a', '\u2c9b'), ('\u2c9c', '\u2c9d'), ('\u2c9e', '\u2c9f'),
-        ('\u2ca0', '\u2ca1'), ('\u2ca2', '\u2ca3'), ('\u2ca4', '\u2ca5'), ('\u2ca6', '\u2ca7'),
-        ('\u2ca8', '\u2ca9'), ('\u2caa', '\u2cab'), ('\u2cac', '\u2cad'), ('\u2cae', '\u2caf'),
-        ('\u2cb0', '\u2cb1'), ('\u2cb2', '\u2cb3'), ('\u2cb4', '\u2cb5'), ('\u2cb6', '\u2cb7'),
-        ('\u2cb8', '\u2cb9'), ('\u2cba', '\u2cbb'), ('\u2cbc', '\u2cbd'), ('\u2cbe', '\u2cbf'),
-        ('\u2cc0', '\u2cc1'), ('\u2cc2', '\u2cc3'), ('\u2cc4', '\u2cc5'), ('\u2cc6', '\u2cc7'),
-        ('\u2cc8', '\u2cc9'), ('\u2cca', '\u2ccb'), ('\u2ccc', '\u2ccd'), ('\u2cce', '\u2ccf'),
-        ('\u2cd0', '\u2cd1'), ('\u2cd2', '\u2cd3'), ('\u2cd4', '\u2cd5'), ('\u2cd6', '\u2cd7'),
-        ('\u2cd8', '\u2cd9'), ('\u2cda', '\u2cdb'), ('\u2cdc', '\u2cdd'), ('\u2cde', '\u2cdf'),
-        ('\u2ce0', '\u2ce1'), ('\u2ce2', '\u2ce3'), ('\u2ceb', '\u2cec'), ('\u2ced', '\u2cee'),
-        ('\u2cf2', '\u2cf3'), ('\ua640', '\ua641'), ('\ua642', '\ua643'), ('\ua644', '\ua645'),
-        ('\ua646', '\ua647'), ('\ua648', '\ua649'), ('\ua64a', '\ua64b'), ('\ua64c', '\ua64d'),
-        ('\ua64e', '\ua64f'), ('\ua650', '\ua651'), ('\ua652', '\ua653'), ('\ua654', '\ua655'),
-        ('\ua656', '\ua657'), ('\ua658', '\ua659'), ('\ua65a', '\ua65b'), ('\ua65c', '\ua65d'),
-        ('\ua65e', '\ua65f'), ('\ua660', '\ua661'), ('\ua662', '\ua663'), ('\ua664', '\ua665'),
-        ('\ua666', '\ua667'), ('\ua668', '\ua669'), ('\ua66a', '\ua66b'), ('\ua66c', '\ua66d'),
-        ('\ua680', '\ua681'), ('\ua682', '\ua683'), ('\ua684', '\ua685'), ('\ua686', '\ua687'),
-        ('\ua688', '\ua689'), ('\ua68a', '\ua68b'), ('\ua68c', '\ua68d'), ('\ua68e', '\ua68f'),
-        ('\ua690', '\ua691'), ('\ua692', '\ua693'), ('\ua694', '\ua695'), ('\ua696', '\ua697'),
-        ('\ua698', '\ua699'), ('\ua69a', '\ua69b'), ('\ua722', '\ua723'), ('\ua724', '\ua725'),
-        ('\ua726', '\ua727'), ('\ua728', '\ua729'), ('\ua72a', '\ua72b'), ('\ua72c', '\ua72d'),
-        ('\ua72e', '\ua72f'), ('\ua732', '\ua733'), ('\ua734', '\ua735'), ('\ua736', '\ua737'),
-        ('\ua738', '\ua739'), ('\ua73a', '\ua73b'), ('\ua73c', '\ua73d'), ('\ua73e', '\ua73f'),
-        ('\ua740', '\ua741'), ('\ua742', '\ua743'), ('\ua744', '\ua745'), ('\ua746', '\ua747'),
-        ('\ua748', '\ua749'), ('\ua74a', '\ua74b'), ('\ua74c', '\ua74d'), ('\ua74e', '\ua74f'),
-        ('\ua750', '\ua751'), ('\ua752', '\ua753'), ('\ua754', '\ua755'), ('\ua756', '\ua757'),
-        ('\ua758', '\ua759'), ('\ua75a', '\ua75b'), ('\ua75c', '\ua75d'), ('\ua75e', '\ua75f'),
-        ('\ua760', '\ua761'), ('\ua762', '\ua763'), ('\ua764', '\ua765'), ('\ua766', '\ua767'),
-        ('\ua768', '\ua769'), ('\ua76a', '\ua76b'), ('\ua76c', '\ua76d'), ('\ua76e', '\ua76f'),
-        ('\ua779', '\ua77a'), ('\ua77b', '\ua77c'), ('\ua77d', '\u1d79'), ('\ua77e', '\ua77f'),
-        ('\ua780', '\ua781'), ('\ua782', '\ua783'), ('\ua784', '\ua785'), ('\ua786', '\ua787'),
-        ('\ua78b', '\ua78c'), ('\ua78d', '\u0265'), ('\ua790', '\ua791'), ('\ua792', '\ua793'),
-        ('\ua796', '\ua797'), ('\ua798', '\ua799'), ('\ua79a', '\ua79b'), ('\ua79c', '\ua79d'),
-        ('\ua79e', '\ua79f'), ('\ua7a0', '\ua7a1'), ('\ua7a2', '\ua7a3'), ('\ua7a4', '\ua7a5'),
-        ('\ua7a6', '\ua7a7'), ('\ua7a8', '\ua7a9'), ('\ua7aa', '\u0266'), ('\ua7ab', '\u025c'),
-        ('\ua7ac', '\u0261'), ('\ua7ad', '\u026c'), ('\ua7b0', '\u029e'), ('\ua7b1', '\u0287'),
-        ('\uff21', '\uff41'), ('\uff22', '\uff42'), ('\uff23', '\uff43'), ('\uff24', '\uff44'),
-        ('\uff25', '\uff45'), ('\uff26', '\uff46'), ('\uff27', '\uff47'), ('\uff28', '\uff48'),
-        ('\uff29', '\uff49'), ('\uff2a', '\uff4a'), ('\uff2b', '\uff4b'), ('\uff2c', '\uff4c'),
-        ('\uff2d', '\uff4d'), ('\uff2e', '\uff4e'), ('\uff2f', '\uff4f'), ('\uff30', '\uff50'),
-        ('\uff31', '\uff51'), ('\uff32', '\uff52'), ('\uff33', '\uff53'), ('\uff34', '\uff54'),
-        ('\uff35', '\uff55'), ('\uff36', '\uff56'), ('\uff37', '\uff57'), ('\uff38', '\uff58'),
-        ('\uff39', '\uff59'), ('\uff3a', '\uff5a'), ('\U00010400', '\U00010428'), ('\U00010401',
-        '\U00010429'), ('\U00010402', '\U0001042a'), ('\U00010403', '\U0001042b'), ('\U00010404',
-        '\U0001042c'), ('\U00010405', '\U0001042d'), ('\U00010406', '\U0001042e'), ('\U00010407',
-        '\U0001042f'), ('\U00010408', '\U00010430'), ('\U00010409', '\U00010431'), ('\U0001040a',
-        '\U00010432'), ('\U0001040b', '\U00010433'), ('\U0001040c', '\U00010434'), ('\U0001040d',
-        '\U00010435'), ('\U0001040e', '\U00010436'), ('\U0001040f', '\U00010437'), ('\U00010410',
-        '\U00010438'), ('\U00010411', '\U00010439'), ('\U00010412', '\U0001043a'), ('\U00010413',
-        '\U0001043b'), ('\U00010414', '\U0001043c'), ('\U00010415', '\U0001043d'), ('\U00010416',
-        '\U0001043e'), ('\U00010417', '\U0001043f'), ('\U00010418', '\U00010440'), ('\U00010419',
-        '\U00010441'), ('\U0001041a', '\U00010442'), ('\U0001041b', '\U00010443'), ('\U0001041c',
-        '\U00010444'), ('\U0001041d', '\U00010445'), ('\U0001041e', '\U00010446'), ('\U0001041f',
-        '\U00010447'), ('\U00010420', '\U00010448'), ('\U00010421', '\U00010449'), ('\U00010422',
-        '\U0001044a'), ('\U00010423', '\U0001044b'), ('\U00010424', '\U0001044c'), ('\U00010425',
-        '\U0001044d'), ('\U00010426', '\U0001044e'), ('\U00010427', '\U0001044f'), ('\U000118a0',
-        '\U000118c0'), ('\U000118a1', '\U000118c1'), ('\U000118a2', '\U000118c2'), ('\U000118a3',
-        '\U000118c3'), ('\U000118a4', '\U000118c4'), ('\U000118a5', '\U000118c5'), ('\U000118a6',
-        '\U000118c6'), ('\U000118a7', '\U000118c7'), ('\U000118a8', '\U000118c8'), ('\U000118a9',
-        '\U000118c9'), ('\U000118aa', '\U000118ca'), ('\U000118ab', '\U000118cb'), ('\U000118ac',
-        '\U000118cc'), ('\U000118ad', '\U000118cd'), ('\U000118ae', '\U000118ce'), ('\U000118af',
-        '\U000118cf'), ('\U000118b0', '\U000118d0'), ('\U000118b1', '\U000118d1'), ('\U000118b2',
-        '\U000118d2'), ('\U000118b3', '\U000118d3'), ('\U000118b4', '\U000118d4'), ('\U000118b5',
-        '\U000118d5'), ('\U000118b6', '\U000118d6'), ('\U000118b7', '\U000118d7'), ('\U000118b8',
-        '\U000118d8'), ('\U000118b9', '\U000118d9'), ('\U000118ba', '\U000118da'), ('\U000118bb',
-        '\U000118db'), ('\U000118bc', '\U000118dc'), ('\U000118bd', '\U000118dd'), ('\U000118be',
-        '\U000118de'), ('\U000118bf', '\U000118df')
+        ('\u{41}', '\u{61}'), ('\u{42}', '\u{62}'), ('\u{43}', '\u{63}'), ('\u{44}', '\u{64}'),
+        ('\u{45}', '\u{65}'), ('\u{46}', '\u{66}'), ('\u{47}', '\u{67}'), ('\u{48}', '\u{68}'),
+        ('\u{49}', '\u{69}'), ('\u{4a}', '\u{6a}'), ('\u{4b}', '\u{6b}'), ('\u{4c}', '\u{6c}'),
+        ('\u{4d}', '\u{6d}'), ('\u{4e}', '\u{6e}'), ('\u{4f}', '\u{6f}'), ('\u{50}', '\u{70}'),
+        ('\u{51}', '\u{71}'), ('\u{52}', '\u{72}'), ('\u{53}', '\u{73}'), ('\u{54}', '\u{74}'),
+        ('\u{55}', '\u{75}'), ('\u{56}', '\u{76}'), ('\u{57}', '\u{77}'), ('\u{58}', '\u{78}'),
+        ('\u{59}', '\u{79}'), ('\u{5a}', '\u{7a}'), ('\u{c0}', '\u{e0}'), ('\u{c1}', '\u{e1}'),
+        ('\u{c2}', '\u{e2}'), ('\u{c3}', '\u{e3}'), ('\u{c4}', '\u{e4}'), ('\u{c5}', '\u{e5}'),
+        ('\u{c6}', '\u{e6}'), ('\u{c7}', '\u{e7}'), ('\u{c8}', '\u{e8}'), ('\u{c9}', '\u{e9}'),
+        ('\u{ca}', '\u{ea}'), ('\u{cb}', '\u{eb}'), ('\u{cc}', '\u{ec}'), ('\u{cd}', '\u{ed}'),
+        ('\u{ce}', '\u{ee}'), ('\u{cf}', '\u{ef}'), ('\u{d0}', '\u{f0}'), ('\u{d1}', '\u{f1}'),
+        ('\u{d2}', '\u{f2}'), ('\u{d3}', '\u{f3}'), ('\u{d4}', '\u{f4}'), ('\u{d5}', '\u{f5}'),
+        ('\u{d6}', '\u{f6}'), ('\u{d8}', '\u{f8}'), ('\u{d9}', '\u{f9}'), ('\u{da}', '\u{fa}'),
+        ('\u{db}', '\u{fb}'), ('\u{dc}', '\u{fc}'), ('\u{dd}', '\u{fd}'), ('\u{de}', '\u{fe}'),
+        ('\u{100}', '\u{101}'), ('\u{102}', '\u{103}'), ('\u{104}', '\u{105}'), ('\u{106}',
+        '\u{107}'), ('\u{108}', '\u{109}'), ('\u{10a}', '\u{10b}'), ('\u{10c}', '\u{10d}'),
+        ('\u{10e}', '\u{10f}'), ('\u{110}', '\u{111}'), ('\u{112}', '\u{113}'), ('\u{114}',
+        '\u{115}'), ('\u{116}', '\u{117}'), ('\u{118}', '\u{119}'), ('\u{11a}', '\u{11b}'),
+        ('\u{11c}', '\u{11d}'), ('\u{11e}', '\u{11f}'), ('\u{120}', '\u{121}'), ('\u{122}',
+        '\u{123}'), ('\u{124}', '\u{125}'), ('\u{126}', '\u{127}'), ('\u{128}', '\u{129}'),
+        ('\u{12a}', '\u{12b}'), ('\u{12c}', '\u{12d}'), ('\u{12e}', '\u{12f}'), ('\u{130}',
+        '\u{69}'), ('\u{132}', '\u{133}'), ('\u{134}', '\u{135}'), ('\u{136}', '\u{137}'),
+        ('\u{139}', '\u{13a}'), ('\u{13b}', '\u{13c}'), ('\u{13d}', '\u{13e}'), ('\u{13f}',
+        '\u{140}'), ('\u{141}', '\u{142}'), ('\u{143}', '\u{144}'), ('\u{145}', '\u{146}'),
+        ('\u{147}', '\u{148}'), ('\u{14a}', '\u{14b}'), ('\u{14c}', '\u{14d}'), ('\u{14e}',
+        '\u{14f}'), ('\u{150}', '\u{151}'), ('\u{152}', '\u{153}'), ('\u{154}', '\u{155}'),
+        ('\u{156}', '\u{157}'), ('\u{158}', '\u{159}'), ('\u{15a}', '\u{15b}'), ('\u{15c}',
+        '\u{15d}'), ('\u{15e}', '\u{15f}'), ('\u{160}', '\u{161}'), ('\u{162}', '\u{163}'),
+        ('\u{164}', '\u{165}'), ('\u{166}', '\u{167}'), ('\u{168}', '\u{169}'), ('\u{16a}',
+        '\u{16b}'), ('\u{16c}', '\u{16d}'), ('\u{16e}', '\u{16f}'), ('\u{170}', '\u{171}'),
+        ('\u{172}', '\u{173}'), ('\u{174}', '\u{175}'), ('\u{176}', '\u{177}'), ('\u{178}',
+        '\u{ff}'), ('\u{179}', '\u{17a}'), ('\u{17b}', '\u{17c}'), ('\u{17d}', '\u{17e}'),
+        ('\u{181}', '\u{253}'), ('\u{182}', '\u{183}'), ('\u{184}', '\u{185}'), ('\u{186}',
+        '\u{254}'), ('\u{187}', '\u{188}'), ('\u{189}', '\u{256}'), ('\u{18a}', '\u{257}'),
+        ('\u{18b}', '\u{18c}'), ('\u{18e}', '\u{1dd}'), ('\u{18f}', '\u{259}'), ('\u{190}',
+        '\u{25b}'), ('\u{191}', '\u{192}'), ('\u{193}', '\u{260}'), ('\u{194}', '\u{263}'),
+        ('\u{196}', '\u{269}'), ('\u{197}', '\u{268}'), ('\u{198}', '\u{199}'), ('\u{19c}',
+        '\u{26f}'), ('\u{19d}', '\u{272}'), ('\u{19f}', '\u{275}'), ('\u{1a0}', '\u{1a1}'),
+        ('\u{1a2}', '\u{1a3}'), ('\u{1a4}', '\u{1a5}'), ('\u{1a6}', '\u{280}'), ('\u{1a7}',
+        '\u{1a8}'), ('\u{1a9}', '\u{283}'), ('\u{1ac}', '\u{1ad}'), ('\u{1ae}', '\u{288}'),
+        ('\u{1af}', '\u{1b0}'), ('\u{1b1}', '\u{28a}'), ('\u{1b2}', '\u{28b}'), ('\u{1b3}',
+        '\u{1b4}'), ('\u{1b5}', '\u{1b6}'), ('\u{1b7}', '\u{292}'), ('\u{1b8}', '\u{1b9}'),
+        ('\u{1bc}', '\u{1bd}'), ('\u{1c4}', '\u{1c6}'), ('\u{1c7}', '\u{1c9}'), ('\u{1ca}',
+        '\u{1cc}'), ('\u{1cd}', '\u{1ce}'), ('\u{1cf}', '\u{1d0}'), ('\u{1d1}', '\u{1d2}'),
+        ('\u{1d3}', '\u{1d4}'), ('\u{1d5}', '\u{1d6}'), ('\u{1d7}', '\u{1d8}'), ('\u{1d9}',
+        '\u{1da}'), ('\u{1db}', '\u{1dc}'), ('\u{1de}', '\u{1df}'), ('\u{1e0}', '\u{1e1}'),
+        ('\u{1e2}', '\u{1e3}'), ('\u{1e4}', '\u{1e5}'), ('\u{1e6}', '\u{1e7}'), ('\u{1e8}',
+        '\u{1e9}'), ('\u{1ea}', '\u{1eb}'), ('\u{1ec}', '\u{1ed}'), ('\u{1ee}', '\u{1ef}'),
+        ('\u{1f1}', '\u{1f3}'), ('\u{1f4}', '\u{1f5}'), ('\u{1f6}', '\u{195}'), ('\u{1f7}',
+        '\u{1bf}'), ('\u{1f8}', '\u{1f9}'), ('\u{1fa}', '\u{1fb}'), ('\u{1fc}', '\u{1fd}'),
+        ('\u{1fe}', '\u{1ff}'), ('\u{200}', '\u{201}'), ('\u{202}', '\u{203}'), ('\u{204}',
+        '\u{205}'), ('\u{206}', '\u{207}'), ('\u{208}', '\u{209}'), ('\u{20a}', '\u{20b}'),
+        ('\u{20c}', '\u{20d}'), ('\u{20e}', '\u{20f}'), ('\u{210}', '\u{211}'), ('\u{212}',
+        '\u{213}'), ('\u{214}', '\u{215}'), ('\u{216}', '\u{217}'), ('\u{218}', '\u{219}'),
+        ('\u{21a}', '\u{21b}'), ('\u{21c}', '\u{21d}'), ('\u{21e}', '\u{21f}'), ('\u{220}',
+        '\u{19e}'), ('\u{222}', '\u{223}'), ('\u{224}', '\u{225}'), ('\u{226}', '\u{227}'),
+        ('\u{228}', '\u{229}'), ('\u{22a}', '\u{22b}'), ('\u{22c}', '\u{22d}'), ('\u{22e}',
+        '\u{22f}'), ('\u{230}', '\u{231}'), ('\u{232}', '\u{233}'), ('\u{23a}', '\u{2c65}'),
+        ('\u{23b}', '\u{23c}'), ('\u{23d}', '\u{19a}'), ('\u{23e}', '\u{2c66}'), ('\u{241}',
+        '\u{242}'), ('\u{243}', '\u{180}'), ('\u{244}', '\u{289}'), ('\u{245}', '\u{28c}'),
+        ('\u{246}', '\u{247}'), ('\u{248}', '\u{249}'), ('\u{24a}', '\u{24b}'), ('\u{24c}',
+        '\u{24d}'), ('\u{24e}', '\u{24f}'), ('\u{370}', '\u{371}'), ('\u{372}', '\u{373}'),
+        ('\u{376}', '\u{377}'), ('\u{37f}', '\u{3f3}'), ('\u{386}', '\u{3ac}'), ('\u{388}',
+        '\u{3ad}'), ('\u{389}', '\u{3ae}'), ('\u{38a}', '\u{3af}'), ('\u{38c}', '\u{3cc}'),
+        ('\u{38e}', '\u{3cd}'), ('\u{38f}', '\u{3ce}'), ('\u{391}', '\u{3b1}'), ('\u{392}',
+        '\u{3b2}'), ('\u{393}', '\u{3b3}'), ('\u{394}', '\u{3b4}'), ('\u{395}', '\u{3b5}'),
+        ('\u{396}', '\u{3b6}'), ('\u{397}', '\u{3b7}'), ('\u{398}', '\u{3b8}'), ('\u{399}',
+        '\u{3b9}'), ('\u{39a}', '\u{3ba}'), ('\u{39b}', '\u{3bb}'), ('\u{39c}', '\u{3bc}'),
+        ('\u{39d}', '\u{3bd}'), ('\u{39e}', '\u{3be}'), ('\u{39f}', '\u{3bf}'), ('\u{3a0}',
+        '\u{3c0}'), ('\u{3a1}', '\u{3c1}'), ('\u{3a3}', '\u{3c3}'), ('\u{3a4}', '\u{3c4}'),
+        ('\u{3a5}', '\u{3c5}'), ('\u{3a6}', '\u{3c6}'), ('\u{3a7}', '\u{3c7}'), ('\u{3a8}',
+        '\u{3c8}'), ('\u{3a9}', '\u{3c9}'), ('\u{3aa}', '\u{3ca}'), ('\u{3ab}', '\u{3cb}'),
+        ('\u{3cf}', '\u{3d7}'), ('\u{3d8}', '\u{3d9}'), ('\u{3da}', '\u{3db}'), ('\u{3dc}',
+        '\u{3dd}'), ('\u{3de}', '\u{3df}'), ('\u{3e0}', '\u{3e1}'), ('\u{3e2}', '\u{3e3}'),
+        ('\u{3e4}', '\u{3e5}'), ('\u{3e6}', '\u{3e7}'), ('\u{3e8}', '\u{3e9}'), ('\u{3ea}',
+        '\u{3eb}'), ('\u{3ec}', '\u{3ed}'), ('\u{3ee}', '\u{3ef}'), ('\u{3f4}', '\u{3b8}'),
+        ('\u{3f7}', '\u{3f8}'), ('\u{3f9}', '\u{3f2}'), ('\u{3fa}', '\u{3fb}'), ('\u{3fd}',
+        '\u{37b}'), ('\u{3fe}', '\u{37c}'), ('\u{3ff}', '\u{37d}'), ('\u{400}', '\u{450}'),
+        ('\u{401}', '\u{451}'), ('\u{402}', '\u{452}'), ('\u{403}', '\u{453}'), ('\u{404}',
+        '\u{454}'), ('\u{405}', '\u{455}'), ('\u{406}', '\u{456}'), ('\u{407}', '\u{457}'),
+        ('\u{408}', '\u{458}'), ('\u{409}', '\u{459}'), ('\u{40a}', '\u{45a}'), ('\u{40b}',
+        '\u{45b}'), ('\u{40c}', '\u{45c}'), ('\u{40d}', '\u{45d}'), ('\u{40e}', '\u{45e}'),
+        ('\u{40f}', '\u{45f}'), ('\u{410}', '\u{430}'), ('\u{411}', '\u{431}'), ('\u{412}',
+        '\u{432}'), ('\u{413}', '\u{433}'), ('\u{414}', '\u{434}'), ('\u{415}', '\u{435}'),
+        ('\u{416}', '\u{436}'), ('\u{417}', '\u{437}'), ('\u{418}', '\u{438}'), ('\u{419}',
+        '\u{439}'), ('\u{41a}', '\u{43a}'), ('\u{41b}', '\u{43b}'), ('\u{41c}', '\u{43c}'),
+        ('\u{41d}', '\u{43d}'), ('\u{41e}', '\u{43e}'), ('\u{41f}', '\u{43f}'), ('\u{420}',
+        '\u{440}'), ('\u{421}', '\u{441}'), ('\u{422}', '\u{442}'), ('\u{423}', '\u{443}'),
+        ('\u{424}', '\u{444}'), ('\u{425}', '\u{445}'), ('\u{426}', '\u{446}'), ('\u{427}',
+        '\u{447}'), ('\u{428}', '\u{448}'), ('\u{429}', '\u{449}'), ('\u{42a}', '\u{44a}'),
+        ('\u{42b}', '\u{44b}'), ('\u{42c}', '\u{44c}'), ('\u{42d}', '\u{44d}'), ('\u{42e}',
+        '\u{44e}'), ('\u{42f}', '\u{44f}'), ('\u{460}', '\u{461}'), ('\u{462}', '\u{463}'),
+        ('\u{464}', '\u{465}'), ('\u{466}', '\u{467}'), ('\u{468}', '\u{469}'), ('\u{46a}',
+        '\u{46b}'), ('\u{46c}', '\u{46d}'), ('\u{46e}', '\u{46f}'), ('\u{470}', '\u{471}'),
+        ('\u{472}', '\u{473}'), ('\u{474}', '\u{475}'), ('\u{476}', '\u{477}'), ('\u{478}',
+        '\u{479}'), ('\u{47a}', '\u{47b}'), ('\u{47c}', '\u{47d}'), ('\u{47e}', '\u{47f}'),
+        ('\u{480}', '\u{481}'), ('\u{48a}', '\u{48b}'), ('\u{48c}', '\u{48d}'), ('\u{48e}',
+        '\u{48f}'), ('\u{490}', '\u{491}'), ('\u{492}', '\u{493}'), ('\u{494}', '\u{495}'),
+        ('\u{496}', '\u{497}'), ('\u{498}', '\u{499}'), ('\u{49a}', '\u{49b}'), ('\u{49c}',
+        '\u{49d}'), ('\u{49e}', '\u{49f}'), ('\u{4a0}', '\u{4a1}'), ('\u{4a2}', '\u{4a3}'),
+        ('\u{4a4}', '\u{4a5}'), ('\u{4a6}', '\u{4a7}'), ('\u{4a8}', '\u{4a9}'), ('\u{4aa}',
+        '\u{4ab}'), ('\u{4ac}', '\u{4ad}'), ('\u{4ae}', '\u{4af}'), ('\u{4b0}', '\u{4b1}'),
+        ('\u{4b2}', '\u{4b3}'), ('\u{4b4}', '\u{4b5}'), ('\u{4b6}', '\u{4b7}'), ('\u{4b8}',
+        '\u{4b9}'), ('\u{4ba}', '\u{4bb}'), ('\u{4bc}', '\u{4bd}'), ('\u{4be}', '\u{4bf}'),
+        ('\u{4c0}', '\u{4cf}'), ('\u{4c1}', '\u{4c2}'), ('\u{4c3}', '\u{4c4}'), ('\u{4c5}',
+        '\u{4c6}'), ('\u{4c7}', '\u{4c8}'), ('\u{4c9}', '\u{4ca}'), ('\u{4cb}', '\u{4cc}'),
+        ('\u{4cd}', '\u{4ce}'), ('\u{4d0}', '\u{4d1}'), ('\u{4d2}', '\u{4d3}'), ('\u{4d4}',
+        '\u{4d5}'), ('\u{4d6}', '\u{4d7}'), ('\u{4d8}', '\u{4d9}'), ('\u{4da}', '\u{4db}'),
+        ('\u{4dc}', '\u{4dd}'), ('\u{4de}', '\u{4df}'), ('\u{4e0}', '\u{4e1}'), ('\u{4e2}',
+        '\u{4e3}'), ('\u{4e4}', '\u{4e5}'), ('\u{4e6}', '\u{4e7}'), ('\u{4e8}', '\u{4e9}'),
+        ('\u{4ea}', '\u{4eb}'), ('\u{4ec}', '\u{4ed}'), ('\u{4ee}', '\u{4ef}'), ('\u{4f0}',
+        '\u{4f1}'), ('\u{4f2}', '\u{4f3}'), ('\u{4f4}', '\u{4f5}'), ('\u{4f6}', '\u{4f7}'),
+        ('\u{4f8}', '\u{4f9}'), ('\u{4fa}', '\u{4fb}'), ('\u{4fc}', '\u{4fd}'), ('\u{4fe}',
+        '\u{4ff}'), ('\u{500}', '\u{501}'), ('\u{502}', '\u{503}'), ('\u{504}', '\u{505}'),
+        ('\u{506}', '\u{507}'), ('\u{508}', '\u{509}'), ('\u{50a}', '\u{50b}'), ('\u{50c}',
+        '\u{50d}'), ('\u{50e}', '\u{50f}'), ('\u{510}', '\u{511}'), ('\u{512}', '\u{513}'),
+        ('\u{514}', '\u{515}'), ('\u{516}', '\u{517}'), ('\u{518}', '\u{519}'), ('\u{51a}',
+        '\u{51b}'), ('\u{51c}', '\u{51d}'), ('\u{51e}', '\u{51f}'), ('\u{520}', '\u{521}'),
+        ('\u{522}', '\u{523}'), ('\u{524}', '\u{525}'), ('\u{526}', '\u{527}'), ('\u{528}',
+        '\u{529}'), ('\u{52a}', '\u{52b}'), ('\u{52c}', '\u{52d}'), ('\u{52e}', '\u{52f}'),
+        ('\u{531}', '\u{561}'), ('\u{532}', '\u{562}'), ('\u{533}', '\u{563}'), ('\u{534}',
+        '\u{564}'), ('\u{535}', '\u{565}'), ('\u{536}', '\u{566}'), ('\u{537}', '\u{567}'),
+        ('\u{538}', '\u{568}'), ('\u{539}', '\u{569}'), ('\u{53a}', '\u{56a}'), ('\u{53b}',
+        '\u{56b}'), ('\u{53c}', '\u{56c}'), ('\u{53d}', '\u{56d}'), ('\u{53e}', '\u{56e}'),
+        ('\u{53f}', '\u{56f}'), ('\u{540}', '\u{570}'), ('\u{541}', '\u{571}'), ('\u{542}',
+        '\u{572}'), ('\u{543}', '\u{573}'), ('\u{544}', '\u{574}'), ('\u{545}', '\u{575}'),
+        ('\u{546}', '\u{576}'), ('\u{547}', '\u{577}'), ('\u{548}', '\u{578}'), ('\u{549}',
+        '\u{579}'), ('\u{54a}', '\u{57a}'), ('\u{54b}', '\u{57b}'), ('\u{54c}', '\u{57c}'),
+        ('\u{54d}', '\u{57d}'), ('\u{54e}', '\u{57e}'), ('\u{54f}', '\u{57f}'), ('\u{550}',
+        '\u{580}'), ('\u{551}', '\u{581}'), ('\u{552}', '\u{582}'), ('\u{553}', '\u{583}'),
+        ('\u{554}', '\u{584}'), ('\u{555}', '\u{585}'), ('\u{556}', '\u{586}'), ('\u{10a0}',
+        '\u{2d00}'), ('\u{10a1}', '\u{2d01}'), ('\u{10a2}', '\u{2d02}'), ('\u{10a3}', '\u{2d03}'),
+        ('\u{10a4}', '\u{2d04}'), ('\u{10a5}', '\u{2d05}'), ('\u{10a6}', '\u{2d06}'), ('\u{10a7}',
+        '\u{2d07}'), ('\u{10a8}', '\u{2d08}'), ('\u{10a9}', '\u{2d09}'), ('\u{10aa}', '\u{2d0a}'),
+        ('\u{10ab}', '\u{2d0b}'), ('\u{10ac}', '\u{2d0c}'), ('\u{10ad}', '\u{2d0d}'), ('\u{10ae}',
+        '\u{2d0e}'), ('\u{10af}', '\u{2d0f}'), ('\u{10b0}', '\u{2d10}'), ('\u{10b1}', '\u{2d11}'),
+        ('\u{10b2}', '\u{2d12}'), ('\u{10b3}', '\u{2d13}'), ('\u{10b4}', '\u{2d14}'), ('\u{10b5}',
+        '\u{2d15}'), ('\u{10b6}', '\u{2d16}'), ('\u{10b7}', '\u{2d17}'), ('\u{10b8}', '\u{2d18}'),
+        ('\u{10b9}', '\u{2d19}'), ('\u{10ba}', '\u{2d1a}'), ('\u{10bb}', '\u{2d1b}'), ('\u{10bc}',
+        '\u{2d1c}'), ('\u{10bd}', '\u{2d1d}'), ('\u{10be}', '\u{2d1e}'), ('\u{10bf}', '\u{2d1f}'),
+        ('\u{10c0}', '\u{2d20}'), ('\u{10c1}', '\u{2d21}'), ('\u{10c2}', '\u{2d22}'), ('\u{10c3}',
+        '\u{2d23}'), ('\u{10c4}', '\u{2d24}'), ('\u{10c5}', '\u{2d25}'), ('\u{10c7}', '\u{2d27}'),
+        ('\u{10cd}', '\u{2d2d}'), ('\u{1e00}', '\u{1e01}'), ('\u{1e02}', '\u{1e03}'), ('\u{1e04}',
+        '\u{1e05}'), ('\u{1e06}', '\u{1e07}'), ('\u{1e08}', '\u{1e09}'), ('\u{1e0a}', '\u{1e0b}'),
+        ('\u{1e0c}', '\u{1e0d}'), ('\u{1e0e}', '\u{1e0f}'), ('\u{1e10}', '\u{1e11}'), ('\u{1e12}',
+        '\u{1e13}'), ('\u{1e14}', '\u{1e15}'), ('\u{1e16}', '\u{1e17}'), ('\u{1e18}', '\u{1e19}'),
+        ('\u{1e1a}', '\u{1e1b}'), ('\u{1e1c}', '\u{1e1d}'), ('\u{1e1e}', '\u{1e1f}'), ('\u{1e20}',
+        '\u{1e21}'), ('\u{1e22}', '\u{1e23}'), ('\u{1e24}', '\u{1e25}'), ('\u{1e26}', '\u{1e27}'),
+        ('\u{1e28}', '\u{1e29}'), ('\u{1e2a}', '\u{1e2b}'), ('\u{1e2c}', '\u{1e2d}'), ('\u{1e2e}',
+        '\u{1e2f}'), ('\u{1e30}', '\u{1e31}'), ('\u{1e32}', '\u{1e33}'), ('\u{1e34}', '\u{1e35}'),
+        ('\u{1e36}', '\u{1e37}'), ('\u{1e38}', '\u{1e39}'), ('\u{1e3a}', '\u{1e3b}'), ('\u{1e3c}',
+        '\u{1e3d}'), ('\u{1e3e}', '\u{1e3f}'), ('\u{1e40}', '\u{1e41}'), ('\u{1e42}', '\u{1e43}'),
+        ('\u{1e44}', '\u{1e45}'), ('\u{1e46}', '\u{1e47}'), ('\u{1e48}', '\u{1e49}'), ('\u{1e4a}',
+        '\u{1e4b}'), ('\u{1e4c}', '\u{1e4d}'), ('\u{1e4e}', '\u{1e4f}'), ('\u{1e50}', '\u{1e51}'),
+        ('\u{1e52}', '\u{1e53}'), ('\u{1e54}', '\u{1e55}'), ('\u{1e56}', '\u{1e57}'), ('\u{1e58}',
+        '\u{1e59}'), ('\u{1e5a}', '\u{1e5b}'), ('\u{1e5c}', '\u{1e5d}'), ('\u{1e5e}', '\u{1e5f}'),
+        ('\u{1e60}', '\u{1e61}'), ('\u{1e62}', '\u{1e63}'), ('\u{1e64}', '\u{1e65}'), ('\u{1e66}',
+        '\u{1e67}'), ('\u{1e68}', '\u{1e69}'), ('\u{1e6a}', '\u{1e6b}'), ('\u{1e6c}', '\u{1e6d}'),
+        ('\u{1e6e}', '\u{1e6f}'), ('\u{1e70}', '\u{1e71}'), ('\u{1e72}', '\u{1e73}'), ('\u{1e74}',
+        '\u{1e75}'), ('\u{1e76}', '\u{1e77}'), ('\u{1e78}', '\u{1e79}'), ('\u{1e7a}', '\u{1e7b}'),
+        ('\u{1e7c}', '\u{1e7d}'), ('\u{1e7e}', '\u{1e7f}'), ('\u{1e80}', '\u{1e81}'), ('\u{1e82}',
+        '\u{1e83}'), ('\u{1e84}', '\u{1e85}'), ('\u{1e86}', '\u{1e87}'), ('\u{1e88}', '\u{1e89}'),
+        ('\u{1e8a}', '\u{1e8b}'), ('\u{1e8c}', '\u{1e8d}'), ('\u{1e8e}', '\u{1e8f}'), ('\u{1e90}',
+        '\u{1e91}'), ('\u{1e92}', '\u{1e93}'), ('\u{1e94}', '\u{1e95}'), ('\u{1e9e}', '\u{df}'),
+        ('\u{1ea0}', '\u{1ea1}'), ('\u{1ea2}', '\u{1ea3}'), ('\u{1ea4}', '\u{1ea5}'), ('\u{1ea6}',
+        '\u{1ea7}'), ('\u{1ea8}', '\u{1ea9}'), ('\u{1eaa}', '\u{1eab}'), ('\u{1eac}', '\u{1ead}'),
+        ('\u{1eae}', '\u{1eaf}'), ('\u{1eb0}', '\u{1eb1}'), ('\u{1eb2}', '\u{1eb3}'), ('\u{1eb4}',
+        '\u{1eb5}'), ('\u{1eb6}', '\u{1eb7}'), ('\u{1eb8}', '\u{1eb9}'), ('\u{1eba}', '\u{1ebb}'),
+        ('\u{1ebc}', '\u{1ebd}'), ('\u{1ebe}', '\u{1ebf}'), ('\u{1ec0}', '\u{1ec1}'), ('\u{1ec2}',
+        '\u{1ec3}'), ('\u{1ec4}', '\u{1ec5}'), ('\u{1ec6}', '\u{1ec7}'), ('\u{1ec8}', '\u{1ec9}'),
+        ('\u{1eca}', '\u{1ecb}'), ('\u{1ecc}', '\u{1ecd}'), ('\u{1ece}', '\u{1ecf}'), ('\u{1ed0}',
+        '\u{1ed1}'), ('\u{1ed2}', '\u{1ed3}'), ('\u{1ed4}', '\u{1ed5}'), ('\u{1ed6}', '\u{1ed7}'),
+        ('\u{1ed8}', '\u{1ed9}'), ('\u{1eda}', '\u{1edb}'), ('\u{1edc}', '\u{1edd}'), ('\u{1ede}',
+        '\u{1edf}'), ('\u{1ee0}', '\u{1ee1}'), ('\u{1ee2}', '\u{1ee3}'), ('\u{1ee4}', '\u{1ee5}'),
+        ('\u{1ee6}', '\u{1ee7}'), ('\u{1ee8}', '\u{1ee9}'), ('\u{1eea}', '\u{1eeb}'), ('\u{1eec}',
+        '\u{1eed}'), ('\u{1eee}', '\u{1eef}'), ('\u{1ef0}', '\u{1ef1}'), ('\u{1ef2}', '\u{1ef3}'),
+        ('\u{1ef4}', '\u{1ef5}'), ('\u{1ef6}', '\u{1ef7}'), ('\u{1ef8}', '\u{1ef9}'), ('\u{1efa}',
+        '\u{1efb}'), ('\u{1efc}', '\u{1efd}'), ('\u{1efe}', '\u{1eff}'), ('\u{1f08}', '\u{1f00}'),
+        ('\u{1f09}', '\u{1f01}'), ('\u{1f0a}', '\u{1f02}'), ('\u{1f0b}', '\u{1f03}'), ('\u{1f0c}',
+        '\u{1f04}'), ('\u{1f0d}', '\u{1f05}'), ('\u{1f0e}', '\u{1f06}'), ('\u{1f0f}', '\u{1f07}'),
+        ('\u{1f18}', '\u{1f10}'), ('\u{1f19}', '\u{1f11}'), ('\u{1f1a}', '\u{1f12}'), ('\u{1f1b}',
+        '\u{1f13}'), ('\u{1f1c}', '\u{1f14}'), ('\u{1f1d}', '\u{1f15}'), ('\u{1f28}', '\u{1f20}'),
+        ('\u{1f29}', '\u{1f21}'), ('\u{1f2a}', '\u{1f22}'), ('\u{1f2b}', '\u{1f23}'), ('\u{1f2c}',
+        '\u{1f24}'), ('\u{1f2d}', '\u{1f25}'), ('\u{1f2e}', '\u{1f26}'), ('\u{1f2f}', '\u{1f27}'),
+        ('\u{1f38}', '\u{1f30}'), ('\u{1f39}', '\u{1f31}'), ('\u{1f3a}', '\u{1f32}'), ('\u{1f3b}',
+        '\u{1f33}'), ('\u{1f3c}', '\u{1f34}'), ('\u{1f3d}', '\u{1f35}'), ('\u{1f3e}', '\u{1f36}'),
+        ('\u{1f3f}', '\u{1f37}'), ('\u{1f48}', '\u{1f40}'), ('\u{1f49}', '\u{1f41}'), ('\u{1f4a}',
+        '\u{1f42}'), ('\u{1f4b}', '\u{1f43}'), ('\u{1f4c}', '\u{1f44}'), ('\u{1f4d}', '\u{1f45}'),
+        ('\u{1f59}', '\u{1f51}'), ('\u{1f5b}', '\u{1f53}'), ('\u{1f5d}', '\u{1f55}'), ('\u{1f5f}',
+        '\u{1f57}'), ('\u{1f68}', '\u{1f60}'), ('\u{1f69}', '\u{1f61}'), ('\u{1f6a}', '\u{1f62}'),
+        ('\u{1f6b}', '\u{1f63}'), ('\u{1f6c}', '\u{1f64}'), ('\u{1f6d}', '\u{1f65}'), ('\u{1f6e}',
+        '\u{1f66}'), ('\u{1f6f}', '\u{1f67}'), ('\u{1fb8}', '\u{1fb0}'), ('\u{1fb9}', '\u{1fb1}'),
+        ('\u{1fba}', '\u{1f70}'), ('\u{1fbb}', '\u{1f71}'), ('\u{1fc8}', '\u{1f72}'), ('\u{1fc9}',
+        '\u{1f73}'), ('\u{1fca}', '\u{1f74}'), ('\u{1fcb}', '\u{1f75}'), ('\u{1fd8}', '\u{1fd0}'),
+        ('\u{1fd9}', '\u{1fd1}'), ('\u{1fda}', '\u{1f76}'), ('\u{1fdb}', '\u{1f77}'), ('\u{1fe8}',
+        '\u{1fe0}'), ('\u{1fe9}', '\u{1fe1}'), ('\u{1fea}', '\u{1f7a}'), ('\u{1feb}', '\u{1f7b}'),
+        ('\u{1fec}', '\u{1fe5}'), ('\u{1ff8}', '\u{1f78}'), ('\u{1ff9}', '\u{1f79}'), ('\u{1ffa}',
+        '\u{1f7c}'), ('\u{1ffb}', '\u{1f7d}'), ('\u{2126}', '\u{3c9}'), ('\u{212a}', '\u{6b}'),
+        ('\u{212b}', '\u{e5}'), ('\u{2132}', '\u{214e}'), ('\u{2183}', '\u{2184}'), ('\u{2c00}',
+        '\u{2c30}'), ('\u{2c01}', '\u{2c31}'), ('\u{2c02}', '\u{2c32}'), ('\u{2c03}', '\u{2c33}'),
+        ('\u{2c04}', '\u{2c34}'), ('\u{2c05}', '\u{2c35}'), ('\u{2c06}', '\u{2c36}'), ('\u{2c07}',
+        '\u{2c37}'), ('\u{2c08}', '\u{2c38}'), ('\u{2c09}', '\u{2c39}'), ('\u{2c0a}', '\u{2c3a}'),
+        ('\u{2c0b}', '\u{2c3b}'), ('\u{2c0c}', '\u{2c3c}'), ('\u{2c0d}', '\u{2c3d}'), ('\u{2c0e}',
+        '\u{2c3e}'), ('\u{2c0f}', '\u{2c3f}'), ('\u{2c10}', '\u{2c40}'), ('\u{2c11}', '\u{2c41}'),
+        ('\u{2c12}', '\u{2c42}'), ('\u{2c13}', '\u{2c43}'), ('\u{2c14}', '\u{2c44}'), ('\u{2c15}',
+        '\u{2c45}'), ('\u{2c16}', '\u{2c46}'), ('\u{2c17}', '\u{2c47}'), ('\u{2c18}', '\u{2c48}'),
+        ('\u{2c19}', '\u{2c49}'), ('\u{2c1a}', '\u{2c4a}'), ('\u{2c1b}', '\u{2c4b}'), ('\u{2c1c}',
+        '\u{2c4c}'), ('\u{2c1d}', '\u{2c4d}'), ('\u{2c1e}', '\u{2c4e}'), ('\u{2c1f}', '\u{2c4f}'),
+        ('\u{2c20}', '\u{2c50}'), ('\u{2c21}', '\u{2c51}'), ('\u{2c22}', '\u{2c52}'), ('\u{2c23}',
+        '\u{2c53}'), ('\u{2c24}', '\u{2c54}'), ('\u{2c25}', '\u{2c55}'), ('\u{2c26}', '\u{2c56}'),
+        ('\u{2c27}', '\u{2c57}'), ('\u{2c28}', '\u{2c58}'), ('\u{2c29}', '\u{2c59}'), ('\u{2c2a}',
+        '\u{2c5a}'), ('\u{2c2b}', '\u{2c5b}'), ('\u{2c2c}', '\u{2c5c}'), ('\u{2c2d}', '\u{2c5d}'),
+        ('\u{2c2e}', '\u{2c5e}'), ('\u{2c60}', '\u{2c61}'), ('\u{2c62}', '\u{26b}'), ('\u{2c63}',
+        '\u{1d7d}'), ('\u{2c64}', '\u{27d}'), ('\u{2c67}', '\u{2c68}'), ('\u{2c69}', '\u{2c6a}'),
+        ('\u{2c6b}', '\u{2c6c}'), ('\u{2c6d}', '\u{251}'), ('\u{2c6e}', '\u{271}'), ('\u{2c6f}',
+        '\u{250}'), ('\u{2c70}', '\u{252}'), ('\u{2c72}', '\u{2c73}'), ('\u{2c75}', '\u{2c76}'),
+        ('\u{2c7e}', '\u{23f}'), ('\u{2c7f}', '\u{240}'), ('\u{2c80}', '\u{2c81}'), ('\u{2c82}',
+        '\u{2c83}'), ('\u{2c84}', '\u{2c85}'), ('\u{2c86}', '\u{2c87}'), ('\u{2c88}', '\u{2c89}'),
+        ('\u{2c8a}', '\u{2c8b}'), ('\u{2c8c}', '\u{2c8d}'), ('\u{2c8e}', '\u{2c8f}'), ('\u{2c90}',
+        '\u{2c91}'), ('\u{2c92}', '\u{2c93}'), ('\u{2c94}', '\u{2c95}'), ('\u{2c96}', '\u{2c97}'),
+        ('\u{2c98}', '\u{2c99}'), ('\u{2c9a}', '\u{2c9b}'), ('\u{2c9c}', '\u{2c9d}'), ('\u{2c9e}',
+        '\u{2c9f}'), ('\u{2ca0}', '\u{2ca1}'), ('\u{2ca2}', '\u{2ca3}'), ('\u{2ca4}', '\u{2ca5}'),
+        ('\u{2ca6}', '\u{2ca7}'), ('\u{2ca8}', '\u{2ca9}'), ('\u{2caa}', '\u{2cab}'), ('\u{2cac}',
+        '\u{2cad}'), ('\u{2cae}', '\u{2caf}'), ('\u{2cb0}', '\u{2cb1}'), ('\u{2cb2}', '\u{2cb3}'),
+        ('\u{2cb4}', '\u{2cb5}'), ('\u{2cb6}', '\u{2cb7}'), ('\u{2cb8}', '\u{2cb9}'), ('\u{2cba}',
+        '\u{2cbb}'), ('\u{2cbc}', '\u{2cbd}'), ('\u{2cbe}', '\u{2cbf}'), ('\u{2cc0}', '\u{2cc1}'),
+        ('\u{2cc2}', '\u{2cc3}'), ('\u{2cc4}', '\u{2cc5}'), ('\u{2cc6}', '\u{2cc7}'), ('\u{2cc8}',
+        '\u{2cc9}'), ('\u{2cca}', '\u{2ccb}'), ('\u{2ccc}', '\u{2ccd}'), ('\u{2cce}', '\u{2ccf}'),
+        ('\u{2cd0}', '\u{2cd1}'), ('\u{2cd2}', '\u{2cd3}'), ('\u{2cd4}', '\u{2cd5}'), ('\u{2cd6}',
+        '\u{2cd7}'), ('\u{2cd8}', '\u{2cd9}'), ('\u{2cda}', '\u{2cdb}'), ('\u{2cdc}', '\u{2cdd}'),
+        ('\u{2cde}', '\u{2cdf}'), ('\u{2ce0}', '\u{2ce1}'), ('\u{2ce2}', '\u{2ce3}'), ('\u{2ceb}',
+        '\u{2cec}'), ('\u{2ced}', '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{a640}', '\u{a641}'),
+        ('\u{a642}', '\u{a643}'), ('\u{a644}', '\u{a645}'), ('\u{a646}', '\u{a647}'), ('\u{a648}',
+        '\u{a649}'), ('\u{a64a}', '\u{a64b}'), ('\u{a64c}', '\u{a64d}'), ('\u{a64e}', '\u{a64f}'),
+        ('\u{a650}', '\u{a651}'), ('\u{a652}', '\u{a653}'), ('\u{a654}', '\u{a655}'), ('\u{a656}',
+        '\u{a657}'), ('\u{a658}', '\u{a659}'), ('\u{a65a}', '\u{a65b}'), ('\u{a65c}', '\u{a65d}'),
+        ('\u{a65e}', '\u{a65f}'), ('\u{a660}', '\u{a661}'), ('\u{a662}', '\u{a663}'), ('\u{a664}',
+        '\u{a665}'), ('\u{a666}', '\u{a667}'), ('\u{a668}', '\u{a669}'), ('\u{a66a}', '\u{a66b}'),
+        ('\u{a66c}', '\u{a66d}'), ('\u{a680}', '\u{a681}'), ('\u{a682}', '\u{a683}'), ('\u{a684}',
+        '\u{a685}'), ('\u{a686}', '\u{a687}'), ('\u{a688}', '\u{a689}'), ('\u{a68a}', '\u{a68b}'),
+        ('\u{a68c}', '\u{a68d}'), ('\u{a68e}', '\u{a68f}'), ('\u{a690}', '\u{a691}'), ('\u{a692}',
+        '\u{a693}'), ('\u{a694}', '\u{a695}'), ('\u{a696}', '\u{a697}'), ('\u{a698}', '\u{a699}'),
+        ('\u{a69a}', '\u{a69b}'), ('\u{a722}', '\u{a723}'), ('\u{a724}', '\u{a725}'), ('\u{a726}',
+        '\u{a727}'), ('\u{a728}', '\u{a729}'), ('\u{a72a}', '\u{a72b}'), ('\u{a72c}', '\u{a72d}'),
+        ('\u{a72e}', '\u{a72f}'), ('\u{a732}', '\u{a733}'), ('\u{a734}', '\u{a735}'), ('\u{a736}',
+        '\u{a737}'), ('\u{a738}', '\u{a739}'), ('\u{a73a}', '\u{a73b}'), ('\u{a73c}', '\u{a73d}'),
+        ('\u{a73e}', '\u{a73f}'), ('\u{a740}', '\u{a741}'), ('\u{a742}', '\u{a743}'), ('\u{a744}',
+        '\u{a745}'), ('\u{a746}', '\u{a747}'), ('\u{a748}', '\u{a749}'), ('\u{a74a}', '\u{a74b}'),
+        ('\u{a74c}', '\u{a74d}'), ('\u{a74e}', '\u{a74f}'), ('\u{a750}', '\u{a751}'), ('\u{a752}',
+        '\u{a753}'), ('\u{a754}', '\u{a755}'), ('\u{a756}', '\u{a757}'), ('\u{a758}', '\u{a759}'),
+        ('\u{a75a}', '\u{a75b}'), ('\u{a75c}', '\u{a75d}'), ('\u{a75e}', '\u{a75f}'), ('\u{a760}',
+        '\u{a761}'), ('\u{a762}', '\u{a763}'), ('\u{a764}', '\u{a765}'), ('\u{a766}', '\u{a767}'),
+        ('\u{a768}', '\u{a769}'), ('\u{a76a}', '\u{a76b}'), ('\u{a76c}', '\u{a76d}'), ('\u{a76e}',
+        '\u{a76f}'), ('\u{a779}', '\u{a77a}'), ('\u{a77b}', '\u{a77c}'), ('\u{a77d}', '\u{1d79}'),
+        ('\u{a77e}', '\u{a77f}'), ('\u{a780}', '\u{a781}'), ('\u{a782}', '\u{a783}'), ('\u{a784}',
+        '\u{a785}'), ('\u{a786}', '\u{a787}'), ('\u{a78b}', '\u{a78c}'), ('\u{a78d}', '\u{265}'),
+        ('\u{a790}', '\u{a791}'), ('\u{a792}', '\u{a793}'), ('\u{a796}', '\u{a797}'), ('\u{a798}',
+        '\u{a799}'), ('\u{a79a}', '\u{a79b}'), ('\u{a79c}', '\u{a79d}'), ('\u{a79e}', '\u{a79f}'),
+        ('\u{a7a0}', '\u{a7a1}'), ('\u{a7a2}', '\u{a7a3}'), ('\u{a7a4}', '\u{a7a5}'), ('\u{a7a6}',
+        '\u{a7a7}'), ('\u{a7a8}', '\u{a7a9}'), ('\u{a7aa}', '\u{266}'), ('\u{a7ab}', '\u{25c}'),
+        ('\u{a7ac}', '\u{261}'), ('\u{a7ad}', '\u{26c}'), ('\u{a7b0}', '\u{29e}'), ('\u{a7b1}',
+        '\u{287}'), ('\u{ff21}', '\u{ff41}'), ('\u{ff22}', '\u{ff42}'), ('\u{ff23}', '\u{ff43}'),
+        ('\u{ff24}', '\u{ff44}'), ('\u{ff25}', '\u{ff45}'), ('\u{ff26}', '\u{ff46}'), ('\u{ff27}',
+        '\u{ff47}'), ('\u{ff28}', '\u{ff48}'), ('\u{ff29}', '\u{ff49}'), ('\u{ff2a}', '\u{ff4a}'),
+        ('\u{ff2b}', '\u{ff4b}'), ('\u{ff2c}', '\u{ff4c}'), ('\u{ff2d}', '\u{ff4d}'), ('\u{ff2e}',
+        '\u{ff4e}'), ('\u{ff2f}', '\u{ff4f}'), ('\u{ff30}', '\u{ff50}'), ('\u{ff31}', '\u{ff51}'),
+        ('\u{ff32}', '\u{ff52}'), ('\u{ff33}', '\u{ff53}'), ('\u{ff34}', '\u{ff54}'), ('\u{ff35}',
+        '\u{ff55}'), ('\u{ff36}', '\u{ff56}'), ('\u{ff37}', '\u{ff57}'), ('\u{ff38}', '\u{ff58}'),
+        ('\u{ff39}', '\u{ff59}'), ('\u{ff3a}', '\u{ff5a}'), ('\u{10400}', '\u{10428}'),
+        ('\u{10401}', '\u{10429}'), ('\u{10402}', '\u{1042a}'), ('\u{10403}', '\u{1042b}'),
+        ('\u{10404}', '\u{1042c}'), ('\u{10405}', '\u{1042d}'), ('\u{10406}', '\u{1042e}'),
+        ('\u{10407}', '\u{1042f}'), ('\u{10408}', '\u{10430}'), ('\u{10409}', '\u{10431}'),
+        ('\u{1040a}', '\u{10432}'), ('\u{1040b}', '\u{10433}'), ('\u{1040c}', '\u{10434}'),
+        ('\u{1040d}', '\u{10435}'), ('\u{1040e}', '\u{10436}'), ('\u{1040f}', '\u{10437}'),
+        ('\u{10410}', '\u{10438}'), ('\u{10411}', '\u{10439}'), ('\u{10412}', '\u{1043a}'),
+        ('\u{10413}', '\u{1043b}'), ('\u{10414}', '\u{1043c}'), ('\u{10415}', '\u{1043d}'),
+        ('\u{10416}', '\u{1043e}'), ('\u{10417}', '\u{1043f}'), ('\u{10418}', '\u{10440}'),
+        ('\u{10419}', '\u{10441}'), ('\u{1041a}', '\u{10442}'), ('\u{1041b}', '\u{10443}'),
+        ('\u{1041c}', '\u{10444}'), ('\u{1041d}', '\u{10445}'), ('\u{1041e}', '\u{10446}'),
+        ('\u{1041f}', '\u{10447}'), ('\u{10420}', '\u{10448}'), ('\u{10421}', '\u{10449}'),
+        ('\u{10422}', '\u{1044a}'), ('\u{10423}', '\u{1044b}'), ('\u{10424}', '\u{1044c}'),
+        ('\u{10425}', '\u{1044d}'), ('\u{10426}', '\u{1044e}'), ('\u{10427}', '\u{1044f}'),
+        ('\u{118a0}', '\u{118c0}'), ('\u{118a1}', '\u{118c1}'), ('\u{118a2}', '\u{118c2}'),
+        ('\u{118a3}', '\u{118c3}'), ('\u{118a4}', '\u{118c4}'), ('\u{118a5}', '\u{118c5}'),
+        ('\u{118a6}', '\u{118c6}'), ('\u{118a7}', '\u{118c7}'), ('\u{118a8}', '\u{118c8}'),
+        ('\u{118a9}', '\u{118c9}'), ('\u{118aa}', '\u{118ca}'), ('\u{118ab}', '\u{118cb}'),
+        ('\u{118ac}', '\u{118cc}'), ('\u{118ad}', '\u{118cd}'), ('\u{118ae}', '\u{118ce}'),
+        ('\u{118af}', '\u{118cf}'), ('\u{118b0}', '\u{118d0}'), ('\u{118b1}', '\u{118d1}'),
+        ('\u{118b2}', '\u{118d2}'), ('\u{118b3}', '\u{118d3}'), ('\u{118b4}', '\u{118d4}'),
+        ('\u{118b5}', '\u{118d5}'), ('\u{118b6}', '\u{118d6}'), ('\u{118b7}', '\u{118d7}'),
+        ('\u{118b8}', '\u{118d8}'), ('\u{118b9}', '\u{118d9}'), ('\u{118ba}', '\u{118da}'),
+        ('\u{118bb}', '\u{118db}'), ('\u{118bc}', '\u{118dc}'), ('\u{118bd}', '\u{118dd}'),
+        ('\u{118be}', '\u{118de}'), ('\u{118bf}', '\u{118df}')
     ];
 
     static LlLu_table: &'static [(char, char)] = &[
-        ('\x61', '\x41'), ('\x62', '\x42'), ('\x63', '\x43'), ('\x64', '\x44'), ('\x65', '\x45'),
-        ('\x66', '\x46'), ('\x67', '\x47'), ('\x68', '\x48'), ('\x69', '\x49'), ('\x6a', '\x4a'),
-        ('\x6b', '\x4b'), ('\x6c', '\x4c'), ('\x6d', '\x4d'), ('\x6e', '\x4e'), ('\x6f', '\x4f'),
-        ('\x70', '\x50'), ('\x71', '\x51'), ('\x72', '\x52'), ('\x73', '\x53'), ('\x74', '\x54'),
-        ('\x75', '\x55'), ('\x76', '\x56'), ('\x77', '\x57'), ('\x78', '\x58'), ('\x79', '\x59'),
-        ('\x7a', '\x5a'), ('\u00b5', '\u039c'), ('\u00e0', '\u00c0'), ('\u00e1', '\u00c1'),
-        ('\u00e2', '\u00c2'), ('\u00e3', '\u00c3'), ('\u00e4', '\u00c4'), ('\u00e5', '\u00c5'),
-        ('\u00e6', '\u00c6'), ('\u00e7', '\u00c7'), ('\u00e8', '\u00c8'), ('\u00e9', '\u00c9'),
-        ('\u00ea', '\u00ca'), ('\u00eb', '\u00cb'), ('\u00ec', '\u00cc'), ('\u00ed', '\u00cd'),
-        ('\u00ee', '\u00ce'), ('\u00ef', '\u00cf'), ('\u00f0', '\u00d0'), ('\u00f1', '\u00d1'),
-        ('\u00f2', '\u00d2'), ('\u00f3', '\u00d3'), ('\u00f4', '\u00d4'), ('\u00f5', '\u00d5'),
-        ('\u00f6', '\u00d6'), ('\u00f8', '\u00d8'), ('\u00f9', '\u00d9'), ('\u00fa', '\u00da'),
-        ('\u00fb', '\u00db'), ('\u00fc', '\u00dc'), ('\u00fd', '\u00dd'), ('\u00fe', '\u00de'),
-        ('\u00ff', '\u0178'), ('\u0101', '\u0100'), ('\u0103', '\u0102'), ('\u0105', '\u0104'),
-        ('\u0107', '\u0106'), ('\u0109', '\u0108'), ('\u010b', '\u010a'), ('\u010d', '\u010c'),
-        ('\u010f', '\u010e'), ('\u0111', '\u0110'), ('\u0113', '\u0112'), ('\u0115', '\u0114'),
-        ('\u0117', '\u0116'), ('\u0119', '\u0118'), ('\u011b', '\u011a'), ('\u011d', '\u011c'),
-        ('\u011f', '\u011e'), ('\u0121', '\u0120'), ('\u0123', '\u0122'), ('\u0125', '\u0124'),
-        ('\u0127', '\u0126'), ('\u0129', '\u0128'), ('\u012b', '\u012a'), ('\u012d', '\u012c'),
-        ('\u012f', '\u012e'), ('\u0131', '\x49'), ('\u0133', '\u0132'), ('\u0135', '\u0134'),
-        ('\u0137', '\u0136'), ('\u013a', '\u0139'), ('\u013c', '\u013b'), ('\u013e', '\u013d'),
-        ('\u0140', '\u013f'), ('\u0142', '\u0141'), ('\u0144', '\u0143'), ('\u0146', '\u0145'),
-        ('\u0148', '\u0147'), ('\u014b', '\u014a'), ('\u014d', '\u014c'), ('\u014f', '\u014e'),
-        ('\u0151', '\u0150'), ('\u0153', '\u0152'), ('\u0155', '\u0154'), ('\u0157', '\u0156'),
-        ('\u0159', '\u0158'), ('\u015b', '\u015a'), ('\u015d', '\u015c'), ('\u015f', '\u015e'),
-        ('\u0161', '\u0160'), ('\u0163', '\u0162'), ('\u0165', '\u0164'), ('\u0167', '\u0166'),
-        ('\u0169', '\u0168'), ('\u016b', '\u016a'), ('\u016d', '\u016c'), ('\u016f', '\u016e'),
-        ('\u0171', '\u0170'), ('\u0173', '\u0172'), ('\u0175', '\u0174'), ('\u0177', '\u0176'),
-        ('\u017a', '\u0179'), ('\u017c', '\u017b'), ('\u017e', '\u017d'), ('\u017f', '\x53'),
-        ('\u0180', '\u0243'), ('\u0183', '\u0182'), ('\u0185', '\u0184'), ('\u0188', '\u0187'),
-        ('\u018c', '\u018b'), ('\u0192', '\u0191'), ('\u0195', '\u01f6'), ('\u0199', '\u0198'),
-        ('\u019a', '\u023d'), ('\u019e', '\u0220'), ('\u01a1', '\u01a0'), ('\u01a3', '\u01a2'),
-        ('\u01a5', '\u01a4'), ('\u01a8', '\u01a7'), ('\u01ad', '\u01ac'), ('\u01b0', '\u01af'),
-        ('\u01b4', '\u01b3'), ('\u01b6', '\u01b5'), ('\u01b9', '\u01b8'), ('\u01bd', '\u01bc'),
-        ('\u01bf', '\u01f7'), ('\u01c6', '\u01c4'), ('\u01c9', '\u01c7'), ('\u01cc', '\u01ca'),
-        ('\u01ce', '\u01cd'), ('\u01d0', '\u01cf'), ('\u01d2', '\u01d1'), ('\u01d4', '\u01d3'),
-        ('\u01d6', '\u01d5'), ('\u01d8', '\u01d7'), ('\u01da', '\u01d9'), ('\u01dc', '\u01db'),
-        ('\u01dd', '\u018e'), ('\u01df', '\u01de'), ('\u01e1', '\u01e0'), ('\u01e3', '\u01e2'),
-        ('\u01e5', '\u01e4'), ('\u01e7', '\u01e6'), ('\u01e9', '\u01e8'), ('\u01eb', '\u01ea'),
-        ('\u01ed', '\u01ec'), ('\u01ef', '\u01ee'), ('\u01f3', '\u01f1'), ('\u01f5', '\u01f4'),
-        ('\u01f9', '\u01f8'), ('\u01fb', '\u01fa'), ('\u01fd', '\u01fc'), ('\u01ff', '\u01fe'),
-        ('\u0201', '\u0200'), ('\u0203', '\u0202'), ('\u0205', '\u0204'), ('\u0207', '\u0206'),
-        ('\u0209', '\u0208'), ('\u020b', '\u020a'), ('\u020d', '\u020c'), ('\u020f', '\u020e'),
-        ('\u0211', '\u0210'), ('\u0213', '\u0212'), ('\u0215', '\u0214'), ('\u0217', '\u0216'),
-        ('\u0219', '\u0218'), ('\u021b', '\u021a'), ('\u021d', '\u021c'), ('\u021f', '\u021e'),
-        ('\u0223', '\u0222'), ('\u0225', '\u0224'), ('\u0227', '\u0226'), ('\u0229', '\u0228'),
-        ('\u022b', '\u022a'), ('\u022d', '\u022c'), ('\u022f', '\u022e'), ('\u0231', '\u0230'),
-        ('\u0233', '\u0232'), ('\u023c', '\u023b'), ('\u023f', '\u2c7e'), ('\u0240', '\u2c7f'),
-        ('\u0242', '\u0241'), ('\u0247', '\u0246'), ('\u0249', '\u0248'), ('\u024b', '\u024a'),
-        ('\u024d', '\u024c'), ('\u024f', '\u024e'), ('\u0250', '\u2c6f'), ('\u0251', '\u2c6d'),
-        ('\u0252', '\u2c70'), ('\u0253', '\u0181'), ('\u0254', '\u0186'), ('\u0256', '\u0189'),
-        ('\u0257', '\u018a'), ('\u0259', '\u018f'), ('\u025b', '\u0190'), ('\u025c', '\ua7ab'),
-        ('\u0260', '\u0193'), ('\u0261', '\ua7ac'), ('\u0263', '\u0194'), ('\u0265', '\ua78d'),
-        ('\u0266', '\ua7aa'), ('\u0268', '\u0197'), ('\u0269', '\u0196'), ('\u026b', '\u2c62'),
-        ('\u026c', '\ua7ad'), ('\u026f', '\u019c'), ('\u0271', '\u2c6e'), ('\u0272', '\u019d'),
-        ('\u0275', '\u019f'), ('\u027d', '\u2c64'), ('\u0280', '\u01a6'), ('\u0283', '\u01a9'),
-        ('\u0287', '\ua7b1'), ('\u0288', '\u01ae'), ('\u0289', '\u0244'), ('\u028a', '\u01b1'),
-        ('\u028b', '\u01b2'), ('\u028c', '\u0245'), ('\u0292', '\u01b7'), ('\u029e', '\ua7b0'),
-        ('\u0371', '\u0370'), ('\u0373', '\u0372'), ('\u0377', '\u0376'), ('\u037b', '\u03fd'),
-        ('\u037c', '\u03fe'), ('\u037d', '\u03ff'), ('\u03ac', '\u0386'), ('\u03ad', '\u0388'),
-        ('\u03ae', '\u0389'), ('\u03af', '\u038a'), ('\u03b1', '\u0391'), ('\u03b2', '\u0392'),
-        ('\u03b3', '\u0393'), ('\u03b4', '\u0394'), ('\u03b5', '\u0395'), ('\u03b6', '\u0396'),
-        ('\u03b7', '\u0397'), ('\u03b8', '\u0398'), ('\u03b9', '\u0399'), ('\u03ba', '\u039a'),
-        ('\u03bb', '\u039b'), ('\u03bc', '\u039c'), ('\u03bd', '\u039d'), ('\u03be', '\u039e'),
-        ('\u03bf', '\u039f'), ('\u03c0', '\u03a0'), ('\u03c1', '\u03a1'), ('\u03c2', '\u03a3'),
-        ('\u03c3', '\u03a3'), ('\u03c4', '\u03a4'), ('\u03c5', '\u03a5'), ('\u03c6', '\u03a6'),
-        ('\u03c7', '\u03a7'), ('\u03c8', '\u03a8'), ('\u03c9', '\u03a9'), ('\u03ca', '\u03aa'),
-        ('\u03cb', '\u03ab'), ('\u03cc', '\u038c'), ('\u03cd', '\u038e'), ('\u03ce', '\u038f'),
-        ('\u03d0', '\u0392'), ('\u03d1', '\u0398'), ('\u03d5', '\u03a6'), ('\u03d6', '\u03a0'),
-        ('\u03d7', '\u03cf'), ('\u03d9', '\u03d8'), ('\u03db', '\u03da'), ('\u03dd', '\u03dc'),
-        ('\u03df', '\u03de'), ('\u03e1', '\u03e0'), ('\u03e3', '\u03e2'), ('\u03e5', '\u03e4'),
-        ('\u03e7', '\u03e6'), ('\u03e9', '\u03e8'), ('\u03eb', '\u03ea'), ('\u03ed', '\u03ec'),
-        ('\u03ef', '\u03ee'), ('\u03f0', '\u039a'), ('\u03f1', '\u03a1'), ('\u03f2', '\u03f9'),
-        ('\u03f3', '\u037f'), ('\u03f5', '\u0395'), ('\u03f8', '\u03f7'), ('\u03fb', '\u03fa'),
-        ('\u0430', '\u0410'), ('\u0431', '\u0411'), ('\u0432', '\u0412'), ('\u0433', '\u0413'),
-        ('\u0434', '\u0414'), ('\u0435', '\u0415'), ('\u0436', '\u0416'), ('\u0437', '\u0417'),
-        ('\u0438', '\u0418'), ('\u0439', '\u0419'), ('\u043a', '\u041a'), ('\u043b', '\u041b'),
-        ('\u043c', '\u041c'), ('\u043d', '\u041d'), ('\u043e', '\u041e'), ('\u043f', '\u041f'),
-        ('\u0440', '\u0420'), ('\u0441', '\u0421'), ('\u0442', '\u0422'), ('\u0443', '\u0423'),
-        ('\u0444', '\u0424'), ('\u0445', '\u0425'), ('\u0446', '\u0426'), ('\u0447', '\u0427'),
-        ('\u0448', '\u0428'), ('\u0449', '\u0429'), ('\u044a', '\u042a'), ('\u044b', '\u042b'),
-        ('\u044c', '\u042c'), ('\u044d', '\u042d'), ('\u044e', '\u042e'), ('\u044f', '\u042f'),
-        ('\u0450', '\u0400'), ('\u0451', '\u0401'), ('\u0452', '\u0402'), ('\u0453', '\u0403'),
-        ('\u0454', '\u0404'), ('\u0455', '\u0405'), ('\u0456', '\u0406'), ('\u0457', '\u0407'),
-        ('\u0458', '\u0408'), ('\u0459', '\u0409'), ('\u045a', '\u040a'), ('\u045b', '\u040b'),
-        ('\u045c', '\u040c'), ('\u045d', '\u040d'), ('\u045e', '\u040e'), ('\u045f', '\u040f'),
-        ('\u0461', '\u0460'), ('\u0463', '\u0462'), ('\u0465', '\u0464'), ('\u0467', '\u0466'),
-        ('\u0469', '\u0468'), ('\u046b', '\u046a'), ('\u046d', '\u046c'), ('\u046f', '\u046e'),
-        ('\u0471', '\u0470'), ('\u0473', '\u0472'), ('\u0475', '\u0474'), ('\u0477', '\u0476'),
-        ('\u0479', '\u0478'), ('\u047b', '\u047a'), ('\u047d', '\u047c'), ('\u047f', '\u047e'),
-        ('\u0481', '\u0480'), ('\u048b', '\u048a'), ('\u048d', '\u048c'), ('\u048f', '\u048e'),
-        ('\u0491', '\u0490'), ('\u0493', '\u0492'), ('\u0495', '\u0494'), ('\u0497', '\u0496'),
-        ('\u0499', '\u0498'), ('\u049b', '\u049a'), ('\u049d', '\u049c'), ('\u049f', '\u049e'),
-        ('\u04a1', '\u04a0'), ('\u04a3', '\u04a2'), ('\u04a5', '\u04a4'), ('\u04a7', '\u04a6'),
-        ('\u04a9', '\u04a8'), ('\u04ab', '\u04aa'), ('\u04ad', '\u04ac'), ('\u04af', '\u04ae'),
-        ('\u04b1', '\u04b0'), ('\u04b3', '\u04b2'), ('\u04b5', '\u04b4'), ('\u04b7', '\u04b6'),
-        ('\u04b9', '\u04b8'), ('\u04bb', '\u04ba'), ('\u04bd', '\u04bc'), ('\u04bf', '\u04be'),
-        ('\u04c2', '\u04c1'), ('\u04c4', '\u04c3'), ('\u04c6', '\u04c5'), ('\u04c8', '\u04c7'),
-        ('\u04ca', '\u04c9'), ('\u04cc', '\u04cb'), ('\u04ce', '\u04cd'), ('\u04cf', '\u04c0'),
-        ('\u04d1', '\u04d0'), ('\u04d3', '\u04d2'), ('\u04d5', '\u04d4'), ('\u04d7', '\u04d6'),
-        ('\u04d9', '\u04d8'), ('\u04db', '\u04da'), ('\u04dd', '\u04dc'), ('\u04df', '\u04de'),
-        ('\u04e1', '\u04e0'), ('\u04e3', '\u04e2'), ('\u04e5', '\u04e4'), ('\u04e7', '\u04e6'),
-        ('\u04e9', '\u04e8'), ('\u04eb', '\u04ea'), ('\u04ed', '\u04ec'), ('\u04ef', '\u04ee'),
-        ('\u04f1', '\u04f0'), ('\u04f3', '\u04f2'), ('\u04f5', '\u04f4'), ('\u04f7', '\u04f6'),
-        ('\u04f9', '\u04f8'), ('\u04fb', '\u04fa'), ('\u04fd', '\u04fc'), ('\u04ff', '\u04fe'),
-        ('\u0501', '\u0500'), ('\u0503', '\u0502'), ('\u0505', '\u0504'), ('\u0507', '\u0506'),
-        ('\u0509', '\u0508'), ('\u050b', '\u050a'), ('\u050d', '\u050c'), ('\u050f', '\u050e'),
-        ('\u0511', '\u0510'), ('\u0513', '\u0512'), ('\u0515', '\u0514'), ('\u0517', '\u0516'),
-        ('\u0519', '\u0518'), ('\u051b', '\u051a'), ('\u051d', '\u051c'), ('\u051f', '\u051e'),
-        ('\u0521', '\u0520'), ('\u0523', '\u0522'), ('\u0525', '\u0524'), ('\u0527', '\u0526'),
-        ('\u0529', '\u0528'), ('\u052b', '\u052a'), ('\u052d', '\u052c'), ('\u052f', '\u052e'),
-        ('\u0561', '\u0531'), ('\u0562', '\u0532'), ('\u0563', '\u0533'), ('\u0564', '\u0534'),
-        ('\u0565', '\u0535'), ('\u0566', '\u0536'), ('\u0567', '\u0537'), ('\u0568', '\u0538'),
-        ('\u0569', '\u0539'), ('\u056a', '\u053a'), ('\u056b', '\u053b'), ('\u056c', '\u053c'),
-        ('\u056d', '\u053d'), ('\u056e', '\u053e'), ('\u056f', '\u053f'), ('\u0570', '\u0540'),
-        ('\u0571', '\u0541'), ('\u0572', '\u0542'), ('\u0573', '\u0543'), ('\u0574', '\u0544'),
-        ('\u0575', '\u0545'), ('\u0576', '\u0546'), ('\u0577', '\u0547'), ('\u0578', '\u0548'),
-        ('\u0579', '\u0549'), ('\u057a', '\u054a'), ('\u057b', '\u054b'), ('\u057c', '\u054c'),
-        ('\u057d', '\u054d'), ('\u057e', '\u054e'), ('\u057f', '\u054f'), ('\u0580', '\u0550'),
-        ('\u0581', '\u0551'), ('\u0582', '\u0552'), ('\u0583', '\u0553'), ('\u0584', '\u0554'),
-        ('\u0585', '\u0555'), ('\u0586', '\u0556'), ('\u1d79', '\ua77d'), ('\u1d7d', '\u2c63'),
-        ('\u1e01', '\u1e00'), ('\u1e03', '\u1e02'), ('\u1e05', '\u1e04'), ('\u1e07', '\u1e06'),
-        ('\u1e09', '\u1e08'), ('\u1e0b', '\u1e0a'), ('\u1e0d', '\u1e0c'), ('\u1e0f', '\u1e0e'),
-        ('\u1e11', '\u1e10'), ('\u1e13', '\u1e12'), ('\u1e15', '\u1e14'), ('\u1e17', '\u1e16'),
-        ('\u1e19', '\u1e18'), ('\u1e1b', '\u1e1a'), ('\u1e1d', '\u1e1c'), ('\u1e1f', '\u1e1e'),
-        ('\u1e21', '\u1e20'), ('\u1e23', '\u1e22'), ('\u1e25', '\u1e24'), ('\u1e27', '\u1e26'),
-        ('\u1e29', '\u1e28'), ('\u1e2b', '\u1e2a'), ('\u1e2d', '\u1e2c'), ('\u1e2f', '\u1e2e'),
-        ('\u1e31', '\u1e30'), ('\u1e33', '\u1e32'), ('\u1e35', '\u1e34'), ('\u1e37', '\u1e36'),
-        ('\u1e39', '\u1e38'), ('\u1e3b', '\u1e3a'), ('\u1e3d', '\u1e3c'), ('\u1e3f', '\u1e3e'),
-        ('\u1e41', '\u1e40'), ('\u1e43', '\u1e42'), ('\u1e45', '\u1e44'), ('\u1e47', '\u1e46'),
-        ('\u1e49', '\u1e48'), ('\u1e4b', '\u1e4a'), ('\u1e4d', '\u1e4c'), ('\u1e4f', '\u1e4e'),
-        ('\u1e51', '\u1e50'), ('\u1e53', '\u1e52'), ('\u1e55', '\u1e54'), ('\u1e57', '\u1e56'),
-        ('\u1e59', '\u1e58'), ('\u1e5b', '\u1e5a'), ('\u1e5d', '\u1e5c'), ('\u1e5f', '\u1e5e'),
-        ('\u1e61', '\u1e60'), ('\u1e63', '\u1e62'), ('\u1e65', '\u1e64'), ('\u1e67', '\u1e66'),
-        ('\u1e69', '\u1e68'), ('\u1e6b', '\u1e6a'), ('\u1e6d', '\u1e6c'), ('\u1e6f', '\u1e6e'),
-        ('\u1e71', '\u1e70'), ('\u1e73', '\u1e72'), ('\u1e75', '\u1e74'), ('\u1e77', '\u1e76'),
-        ('\u1e79', '\u1e78'), ('\u1e7b', '\u1e7a'), ('\u1e7d', '\u1e7c'), ('\u1e7f', '\u1e7e'),
-        ('\u1e81', '\u1e80'), ('\u1e83', '\u1e82'), ('\u1e85', '\u1e84'), ('\u1e87', '\u1e86'),
-        ('\u1e89', '\u1e88'), ('\u1e8b', '\u1e8a'), ('\u1e8d', '\u1e8c'), ('\u1e8f', '\u1e8e'),
-        ('\u1e91', '\u1e90'), ('\u1e93', '\u1e92'), ('\u1e95', '\u1e94'), ('\u1e9b', '\u1e60'),
-        ('\u1ea1', '\u1ea0'), ('\u1ea3', '\u1ea2'), ('\u1ea5', '\u1ea4'), ('\u1ea7', '\u1ea6'),
-        ('\u1ea9', '\u1ea8'), ('\u1eab', '\u1eaa'), ('\u1ead', '\u1eac'), ('\u1eaf', '\u1eae'),
-        ('\u1eb1', '\u1eb0'), ('\u1eb3', '\u1eb2'), ('\u1eb5', '\u1eb4'), ('\u1eb7', '\u1eb6'),
-        ('\u1eb9', '\u1eb8'), ('\u1ebb', '\u1eba'), ('\u1ebd', '\u1ebc'), ('\u1ebf', '\u1ebe'),
-        ('\u1ec1', '\u1ec0'), ('\u1ec3', '\u1ec2'), ('\u1ec5', '\u1ec4'), ('\u1ec7', '\u1ec6'),
-        ('\u1ec9', '\u1ec8'), ('\u1ecb', '\u1eca'), ('\u1ecd', '\u1ecc'), ('\u1ecf', '\u1ece'),
-        ('\u1ed1', '\u1ed0'), ('\u1ed3', '\u1ed2'), ('\u1ed5', '\u1ed4'), ('\u1ed7', '\u1ed6'),
-        ('\u1ed9', '\u1ed8'), ('\u1edb', '\u1eda'), ('\u1edd', '\u1edc'), ('\u1edf', '\u1ede'),
-        ('\u1ee1', '\u1ee0'), ('\u1ee3', '\u1ee2'), ('\u1ee5', '\u1ee4'), ('\u1ee7', '\u1ee6'),
-        ('\u1ee9', '\u1ee8'), ('\u1eeb', '\u1eea'), ('\u1eed', '\u1eec'), ('\u1eef', '\u1eee'),
-        ('\u1ef1', '\u1ef0'), ('\u1ef3', '\u1ef2'), ('\u1ef5', '\u1ef4'), ('\u1ef7', '\u1ef6'),
-        ('\u1ef9', '\u1ef8'), ('\u1efb', '\u1efa'), ('\u1efd', '\u1efc'), ('\u1eff', '\u1efe'),
-        ('\u1f00', '\u1f08'), ('\u1f01', '\u1f09'), ('\u1f02', '\u1f0a'), ('\u1f03', '\u1f0b'),
-        ('\u1f04', '\u1f0c'), ('\u1f05', '\u1f0d'), ('\u1f06', '\u1f0e'), ('\u1f07', '\u1f0f'),
-        ('\u1f10', '\u1f18'), ('\u1f11', '\u1f19'), ('\u1f12', '\u1f1a'), ('\u1f13', '\u1f1b'),
-        ('\u1f14', '\u1f1c'), ('\u1f15', '\u1f1d'), ('\u1f20', '\u1f28'), ('\u1f21', '\u1f29'),
-        ('\u1f22', '\u1f2a'), ('\u1f23', '\u1f2b'), ('\u1f24', '\u1f2c'), ('\u1f25', '\u1f2d'),
-        ('\u1f26', '\u1f2e'), ('\u1f27', '\u1f2f'), ('\u1f30', '\u1f38'), ('\u1f31', '\u1f39'),
-        ('\u1f32', '\u1f3a'), ('\u1f33', '\u1f3b'), ('\u1f34', '\u1f3c'), ('\u1f35', '\u1f3d'),
-        ('\u1f36', '\u1f3e'), ('\u1f37', '\u1f3f'), ('\u1f40', '\u1f48'), ('\u1f41', '\u1f49'),
-        ('\u1f42', '\u1f4a'), ('\u1f43', '\u1f4b'), ('\u1f44', '\u1f4c'), ('\u1f45', '\u1f4d'),
-        ('\u1f51', '\u1f59'), ('\u1f53', '\u1f5b'), ('\u1f55', '\u1f5d'), ('\u1f57', '\u1f5f'),
-        ('\u1f60', '\u1f68'), ('\u1f61', '\u1f69'), ('\u1f62', '\u1f6a'), ('\u1f63', '\u1f6b'),
-        ('\u1f64', '\u1f6c'), ('\u1f65', '\u1f6d'), ('\u1f66', '\u1f6e'), ('\u1f67', '\u1f6f'),
-        ('\u1f70', '\u1fba'), ('\u1f71', '\u1fbb'), ('\u1f72', '\u1fc8'), ('\u1f73', '\u1fc9'),
-        ('\u1f74', '\u1fca'), ('\u1f75', '\u1fcb'), ('\u1f76', '\u1fda'), ('\u1f77', '\u1fdb'),
-        ('\u1f78', '\u1ff8'), ('\u1f79', '\u1ff9'), ('\u1f7a', '\u1fea'), ('\u1f7b', '\u1feb'),
-        ('\u1f7c', '\u1ffa'), ('\u1f7d', '\u1ffb'), ('\u1f80', '\u1f88'), ('\u1f81', '\u1f89'),
-        ('\u1f82', '\u1f8a'), ('\u1f83', '\u1f8b'), ('\u1f84', '\u1f8c'), ('\u1f85', '\u1f8d'),
-        ('\u1f86', '\u1f8e'), ('\u1f87', '\u1f8f'), ('\u1f90', '\u1f98'), ('\u1f91', '\u1f99'),
-        ('\u1f92', '\u1f9a'), ('\u1f93', '\u1f9b'), ('\u1f94', '\u1f9c'), ('\u1f95', '\u1f9d'),
-        ('\u1f96', '\u1f9e'), ('\u1f97', '\u1f9f'), ('\u1fa0', '\u1fa8'), ('\u1fa1', '\u1fa9'),
-        ('\u1fa2', '\u1faa'), ('\u1fa3', '\u1fab'), ('\u1fa4', '\u1fac'), ('\u1fa5', '\u1fad'),
-        ('\u1fa6', '\u1fae'), ('\u1fa7', '\u1faf'), ('\u1fb0', '\u1fb8'), ('\u1fb1', '\u1fb9'),
-        ('\u1fb3', '\u1fbc'), ('\u1fbe', '\u0399'), ('\u1fc3', '\u1fcc'), ('\u1fd0', '\u1fd8'),
-        ('\u1fd1', '\u1fd9'), ('\u1fe0', '\u1fe8'), ('\u1fe1', '\u1fe9'), ('\u1fe5', '\u1fec'),
-        ('\u1ff3', '\u1ffc'), ('\u214e', '\u2132'), ('\u2184', '\u2183'), ('\u2c30', '\u2c00'),
-        ('\u2c31', '\u2c01'), ('\u2c32', '\u2c02'), ('\u2c33', '\u2c03'), ('\u2c34', '\u2c04'),
-        ('\u2c35', '\u2c05'), ('\u2c36', '\u2c06'), ('\u2c37', '\u2c07'), ('\u2c38', '\u2c08'),
-        ('\u2c39', '\u2c09'), ('\u2c3a', '\u2c0a'), ('\u2c3b', '\u2c0b'), ('\u2c3c', '\u2c0c'),
-        ('\u2c3d', '\u2c0d'), ('\u2c3e', '\u2c0e'), ('\u2c3f', '\u2c0f'), ('\u2c40', '\u2c10'),
-        ('\u2c41', '\u2c11'), ('\u2c42', '\u2c12'), ('\u2c43', '\u2c13'), ('\u2c44', '\u2c14'),
-        ('\u2c45', '\u2c15'), ('\u2c46', '\u2c16'), ('\u2c47', '\u2c17'), ('\u2c48', '\u2c18'),
-        ('\u2c49', '\u2c19'), ('\u2c4a', '\u2c1a'), ('\u2c4b', '\u2c1b'), ('\u2c4c', '\u2c1c'),
-        ('\u2c4d', '\u2c1d'), ('\u2c4e', '\u2c1e'), ('\u2c4f', '\u2c1f'), ('\u2c50', '\u2c20'),
-        ('\u2c51', '\u2c21'), ('\u2c52', '\u2c22'), ('\u2c53', '\u2c23'), ('\u2c54', '\u2c24'),
-        ('\u2c55', '\u2c25'), ('\u2c56', '\u2c26'), ('\u2c57', '\u2c27'), ('\u2c58', '\u2c28'),
-        ('\u2c59', '\u2c29'), ('\u2c5a', '\u2c2a'), ('\u2c5b', '\u2c2b'), ('\u2c5c', '\u2c2c'),
-        ('\u2c5d', '\u2c2d'), ('\u2c5e', '\u2c2e'), ('\u2c61', '\u2c60'), ('\u2c65', '\u023a'),
-        ('\u2c66', '\u023e'), ('\u2c68', '\u2c67'), ('\u2c6a', '\u2c69'), ('\u2c6c', '\u2c6b'),
-        ('\u2c73', '\u2c72'), ('\u2c76', '\u2c75'), ('\u2c81', '\u2c80'), ('\u2c83', '\u2c82'),
-        ('\u2c85', '\u2c84'), ('\u2c87', '\u2c86'), ('\u2c89', '\u2c88'), ('\u2c8b', '\u2c8a'),
-        ('\u2c8d', '\u2c8c'), ('\u2c8f', '\u2c8e'), ('\u2c91', '\u2c90'), ('\u2c93', '\u2c92'),
-        ('\u2c95', '\u2c94'), ('\u2c97', '\u2c96'), ('\u2c99', '\u2c98'), ('\u2c9b', '\u2c9a'),
-        ('\u2c9d', '\u2c9c'), ('\u2c9f', '\u2c9e'), ('\u2ca1', '\u2ca0'), ('\u2ca3', '\u2ca2'),
-        ('\u2ca5', '\u2ca4'), ('\u2ca7', '\u2ca6'), ('\u2ca9', '\u2ca8'), ('\u2cab', '\u2caa'),
-        ('\u2cad', '\u2cac'), ('\u2caf', '\u2cae'), ('\u2cb1', '\u2cb0'), ('\u2cb3', '\u2cb2'),
-        ('\u2cb5', '\u2cb4'), ('\u2cb7', '\u2cb6'), ('\u2cb9', '\u2cb8'), ('\u2cbb', '\u2cba'),
-        ('\u2cbd', '\u2cbc'), ('\u2cbf', '\u2cbe'), ('\u2cc1', '\u2cc0'), ('\u2cc3', '\u2cc2'),
-        ('\u2cc5', '\u2cc4'), ('\u2cc7', '\u2cc6'), ('\u2cc9', '\u2cc8'), ('\u2ccb', '\u2cca'),
-        ('\u2ccd', '\u2ccc'), ('\u2ccf', '\u2cce'), ('\u2cd1', '\u2cd0'), ('\u2cd3', '\u2cd2'),
-        ('\u2cd5', '\u2cd4'), ('\u2cd7', '\u2cd6'), ('\u2cd9', '\u2cd8'), ('\u2cdb', '\u2cda'),
-        ('\u2cdd', '\u2cdc'), ('\u2cdf', '\u2cde'), ('\u2ce1', '\u2ce0'), ('\u2ce3', '\u2ce2'),
-        ('\u2cec', '\u2ceb'), ('\u2cee', '\u2ced'), ('\u2cf3', '\u2cf2'), ('\u2d00', '\u10a0'),
-        ('\u2d01', '\u10a1'), ('\u2d02', '\u10a2'), ('\u2d03', '\u10a3'), ('\u2d04', '\u10a4'),
-        ('\u2d05', '\u10a5'), ('\u2d06', '\u10a6'), ('\u2d07', '\u10a7'), ('\u2d08', '\u10a8'),
-        ('\u2d09', '\u10a9'), ('\u2d0a', '\u10aa'), ('\u2d0b', '\u10ab'), ('\u2d0c', '\u10ac'),
-        ('\u2d0d', '\u10ad'), ('\u2d0e', '\u10ae'), ('\u2d0f', '\u10af'), ('\u2d10', '\u10b0'),
-        ('\u2d11', '\u10b1'), ('\u2d12', '\u10b2'), ('\u2d13', '\u10b3'), ('\u2d14', '\u10b4'),
-        ('\u2d15', '\u10b5'), ('\u2d16', '\u10b6'), ('\u2d17', '\u10b7'), ('\u2d18', '\u10b8'),
-        ('\u2d19', '\u10b9'), ('\u2d1a', '\u10ba'), ('\u2d1b', '\u10bb'), ('\u2d1c', '\u10bc'),
-        ('\u2d1d', '\u10bd'), ('\u2d1e', '\u10be'), ('\u2d1f', '\u10bf'), ('\u2d20', '\u10c0'),
-        ('\u2d21', '\u10c1'), ('\u2d22', '\u10c2'), ('\u2d23', '\u10c3'), ('\u2d24', '\u10c4'),
-        ('\u2d25', '\u10c5'), ('\u2d27', '\u10c7'), ('\u2d2d', '\u10cd'), ('\ua641', '\ua640'),
-        ('\ua643', '\ua642'), ('\ua645', '\ua644'), ('\ua647', '\ua646'), ('\ua649', '\ua648'),
-        ('\ua64b', '\ua64a'), ('\ua64d', '\ua64c'), ('\ua64f', '\ua64e'), ('\ua651', '\ua650'),
-        ('\ua653', '\ua652'), ('\ua655', '\ua654'), ('\ua657', '\ua656'), ('\ua659', '\ua658'),
-        ('\ua65b', '\ua65a'), ('\ua65d', '\ua65c'), ('\ua65f', '\ua65e'), ('\ua661', '\ua660'),
-        ('\ua663', '\ua662'), ('\ua665', '\ua664'), ('\ua667', '\ua666'), ('\ua669', '\ua668'),
-        ('\ua66b', '\ua66a'), ('\ua66d', '\ua66c'), ('\ua681', '\ua680'), ('\ua683', '\ua682'),
-        ('\ua685', '\ua684'), ('\ua687', '\ua686'), ('\ua689', '\ua688'), ('\ua68b', '\ua68a'),
-        ('\ua68d', '\ua68c'), ('\ua68f', '\ua68e'), ('\ua691', '\ua690'), ('\ua693', '\ua692'),
-        ('\ua695', '\ua694'), ('\ua697', '\ua696'), ('\ua699', '\ua698'), ('\ua69b', '\ua69a'),
-        ('\ua723', '\ua722'), ('\ua725', '\ua724'), ('\ua727', '\ua726'), ('\ua729', '\ua728'),
-        ('\ua72b', '\ua72a'), ('\ua72d', '\ua72c'), ('\ua72f', '\ua72e'), ('\ua733', '\ua732'),
-        ('\ua735', '\ua734'), ('\ua737', '\ua736'), ('\ua739', '\ua738'), ('\ua73b', '\ua73a'),
-        ('\ua73d', '\ua73c'), ('\ua73f', '\ua73e'), ('\ua741', '\ua740'), ('\ua743', '\ua742'),
-        ('\ua745', '\ua744'), ('\ua747', '\ua746'), ('\ua749', '\ua748'), ('\ua74b', '\ua74a'),
-        ('\ua74d', '\ua74c'), ('\ua74f', '\ua74e'), ('\ua751', '\ua750'), ('\ua753', '\ua752'),
-        ('\ua755', '\ua754'), ('\ua757', '\ua756'), ('\ua759', '\ua758'), ('\ua75b', '\ua75a'),
-        ('\ua75d', '\ua75c'), ('\ua75f', '\ua75e'), ('\ua761', '\ua760'), ('\ua763', '\ua762'),
-        ('\ua765', '\ua764'), ('\ua767', '\ua766'), ('\ua769', '\ua768'), ('\ua76b', '\ua76a'),
-        ('\ua76d', '\ua76c'), ('\ua76f', '\ua76e'), ('\ua77a', '\ua779'), ('\ua77c', '\ua77b'),
-        ('\ua77f', '\ua77e'), ('\ua781', '\ua780'), ('\ua783', '\ua782'), ('\ua785', '\ua784'),
-        ('\ua787', '\ua786'), ('\ua78c', '\ua78b'), ('\ua791', '\ua790'), ('\ua793', '\ua792'),
-        ('\ua797', '\ua796'), ('\ua799', '\ua798'), ('\ua79b', '\ua79a'), ('\ua79d', '\ua79c'),
-        ('\ua79f', '\ua79e'), ('\ua7a1', '\ua7a0'), ('\ua7a3', '\ua7a2'), ('\ua7a5', '\ua7a4'),
-        ('\ua7a7', '\ua7a6'), ('\ua7a9', '\ua7a8'), ('\uff41', '\uff21'), ('\uff42', '\uff22'),
-        ('\uff43', '\uff23'), ('\uff44', '\uff24'), ('\uff45', '\uff25'), ('\uff46', '\uff26'),
-        ('\uff47', '\uff27'), ('\uff48', '\uff28'), ('\uff49', '\uff29'), ('\uff4a', '\uff2a'),
-        ('\uff4b', '\uff2b'), ('\uff4c', '\uff2c'), ('\uff4d', '\uff2d'), ('\uff4e', '\uff2e'),
-        ('\uff4f', '\uff2f'), ('\uff50', '\uff30'), ('\uff51', '\uff31'), ('\uff52', '\uff32'),
-        ('\uff53', '\uff33'), ('\uff54', '\uff34'), ('\uff55', '\uff35'), ('\uff56', '\uff36'),
-        ('\uff57', '\uff37'), ('\uff58', '\uff38'), ('\uff59', '\uff39'), ('\uff5a', '\uff3a'),
-        ('\U00010428', '\U00010400'), ('\U00010429', '\U00010401'), ('\U0001042a', '\U00010402'),
-        ('\U0001042b', '\U00010403'), ('\U0001042c', '\U00010404'), ('\U0001042d', '\U00010405'),
-        ('\U0001042e', '\U00010406'), ('\U0001042f', '\U00010407'), ('\U00010430', '\U00010408'),
-        ('\U00010431', '\U00010409'), ('\U00010432', '\U0001040a'), ('\U00010433', '\U0001040b'),
-        ('\U00010434', '\U0001040c'), ('\U00010435', '\U0001040d'), ('\U00010436', '\U0001040e'),
-        ('\U00010437', '\U0001040f'), ('\U00010438', '\U00010410'), ('\U00010439', '\U00010411'),
-        ('\U0001043a', '\U00010412'), ('\U0001043b', '\U00010413'), ('\U0001043c', '\U00010414'),
-        ('\U0001043d', '\U00010415'), ('\U0001043e', '\U00010416'), ('\U0001043f', '\U00010417'),
-        ('\U00010440', '\U00010418'), ('\U00010441', '\U00010419'), ('\U00010442', '\U0001041a'),
-        ('\U00010443', '\U0001041b'), ('\U00010444', '\U0001041c'), ('\U00010445', '\U0001041d'),
-        ('\U00010446', '\U0001041e'), ('\U00010447', '\U0001041f'), ('\U00010448', '\U00010420'),
-        ('\U00010449', '\U00010421'), ('\U0001044a', '\U00010422'), ('\U0001044b', '\U00010423'),
-        ('\U0001044c', '\U00010424'), ('\U0001044d', '\U00010425'), ('\U0001044e', '\U00010426'),
-        ('\U0001044f', '\U00010427'), ('\U000118c0', '\U000118a0'), ('\U000118c1', '\U000118a1'),
-        ('\U000118c2', '\U000118a2'), ('\U000118c3', '\U000118a3'), ('\U000118c4', '\U000118a4'),
-        ('\U000118c5', '\U000118a5'), ('\U000118c6', '\U000118a6'), ('\U000118c7', '\U000118a7'),
-        ('\U000118c8', '\U000118a8'), ('\U000118c9', '\U000118a9'), ('\U000118ca', '\U000118aa'),
-        ('\U000118cb', '\U000118ab'), ('\U000118cc', '\U000118ac'), ('\U000118cd', '\U000118ad'),
-        ('\U000118ce', '\U000118ae'), ('\U000118cf', '\U000118af'), ('\U000118d0', '\U000118b0'),
-        ('\U000118d1', '\U000118b1'), ('\U000118d2', '\U000118b2'), ('\U000118d3', '\U000118b3'),
-        ('\U000118d4', '\U000118b4'), ('\U000118d5', '\U000118b5'), ('\U000118d6', '\U000118b6'),
-        ('\U000118d7', '\U000118b7'), ('\U000118d8', '\U000118b8'), ('\U000118d9', '\U000118b9'),
-        ('\U000118da', '\U000118ba'), ('\U000118db', '\U000118bb'), ('\U000118dc', '\U000118bc'),
-        ('\U000118dd', '\U000118bd'), ('\U000118de', '\U000118be'), ('\U000118df', '\U000118bf')
+        ('\u{61}', '\u{41}'), ('\u{62}', '\u{42}'), ('\u{63}', '\u{43}'), ('\u{64}', '\u{44}'),
+        ('\u{65}', '\u{45}'), ('\u{66}', '\u{46}'), ('\u{67}', '\u{47}'), ('\u{68}', '\u{48}'),
+        ('\u{69}', '\u{49}'), ('\u{6a}', '\u{4a}'), ('\u{6b}', '\u{4b}'), ('\u{6c}', '\u{4c}'),
+        ('\u{6d}', '\u{4d}'), ('\u{6e}', '\u{4e}'), ('\u{6f}', '\u{4f}'), ('\u{70}', '\u{50}'),
+        ('\u{71}', '\u{51}'), ('\u{72}', '\u{52}'), ('\u{73}', '\u{53}'), ('\u{74}', '\u{54}'),
+        ('\u{75}', '\u{55}'), ('\u{76}', '\u{56}'), ('\u{77}', '\u{57}'), ('\u{78}', '\u{58}'),
+        ('\u{79}', '\u{59}'), ('\u{7a}', '\u{5a}'), ('\u{b5}', '\u{39c}'), ('\u{e0}', '\u{c0}'),
+        ('\u{e1}', '\u{c1}'), ('\u{e2}', '\u{c2}'), ('\u{e3}', '\u{c3}'), ('\u{e4}', '\u{c4}'),
+        ('\u{e5}', '\u{c5}'), ('\u{e6}', '\u{c6}'), ('\u{e7}', '\u{c7}'), ('\u{e8}', '\u{c8}'),
+        ('\u{e9}', '\u{c9}'), ('\u{ea}', '\u{ca}'), ('\u{eb}', '\u{cb}'), ('\u{ec}', '\u{cc}'),
+        ('\u{ed}', '\u{cd}'), ('\u{ee}', '\u{ce}'), ('\u{ef}', '\u{cf}'), ('\u{f0}', '\u{d0}'),
+        ('\u{f1}', '\u{d1}'), ('\u{f2}', '\u{d2}'), ('\u{f3}', '\u{d3}'), ('\u{f4}', '\u{d4}'),
+        ('\u{f5}', '\u{d5}'), ('\u{f6}', '\u{d6}'), ('\u{f8}', '\u{d8}'), ('\u{f9}', '\u{d9}'),
+        ('\u{fa}', '\u{da}'), ('\u{fb}', '\u{db}'), ('\u{fc}', '\u{dc}'), ('\u{fd}', '\u{dd}'),
+        ('\u{fe}', '\u{de}'), ('\u{ff}', '\u{178}'), ('\u{101}', '\u{100}'), ('\u{103}', '\u{102}'),
+        ('\u{105}', '\u{104}'), ('\u{107}', '\u{106}'), ('\u{109}', '\u{108}'), ('\u{10b}',
+        '\u{10a}'), ('\u{10d}', '\u{10c}'), ('\u{10f}', '\u{10e}'), ('\u{111}', '\u{110}'),
+        ('\u{113}', '\u{112}'), ('\u{115}', '\u{114}'), ('\u{117}', '\u{116}'), ('\u{119}',
+        '\u{118}'), ('\u{11b}', '\u{11a}'), ('\u{11d}', '\u{11c}'), ('\u{11f}', '\u{11e}'),
+        ('\u{121}', '\u{120}'), ('\u{123}', '\u{122}'), ('\u{125}', '\u{124}'), ('\u{127}',
+        '\u{126}'), ('\u{129}', '\u{128}'), ('\u{12b}', '\u{12a}'), ('\u{12d}', '\u{12c}'),
+        ('\u{12f}', '\u{12e}'), ('\u{131}', '\u{49}'), ('\u{133}', '\u{132}'), ('\u{135}',
+        '\u{134}'), ('\u{137}', '\u{136}'), ('\u{13a}', '\u{139}'), ('\u{13c}', '\u{13b}'),
+        ('\u{13e}', '\u{13d}'), ('\u{140}', '\u{13f}'), ('\u{142}', '\u{141}'), ('\u{144}',
+        '\u{143}'), ('\u{146}', '\u{145}'), ('\u{148}', '\u{147}'), ('\u{14b}', '\u{14a}'),
+        ('\u{14d}', '\u{14c}'), ('\u{14f}', '\u{14e}'), ('\u{151}', '\u{150}'), ('\u{153}',
+        '\u{152}'), ('\u{155}', '\u{154}'), ('\u{157}', '\u{156}'), ('\u{159}', '\u{158}'),
+        ('\u{15b}', '\u{15a}'), ('\u{15d}', '\u{15c}'), ('\u{15f}', '\u{15e}'), ('\u{161}',
+        '\u{160}'), ('\u{163}', '\u{162}'), ('\u{165}', '\u{164}'), ('\u{167}', '\u{166}'),
+        ('\u{169}', '\u{168}'), ('\u{16b}', '\u{16a}'), ('\u{16d}', '\u{16c}'), ('\u{16f}',
+        '\u{16e}'), ('\u{171}', '\u{170}'), ('\u{173}', '\u{172}'), ('\u{175}', '\u{174}'),
+        ('\u{177}', '\u{176}'), ('\u{17a}', '\u{179}'), ('\u{17c}', '\u{17b}'), ('\u{17e}',
+        '\u{17d}'), ('\u{17f}', '\u{53}'), ('\u{180}', '\u{243}'), ('\u{183}', '\u{182}'),
+        ('\u{185}', '\u{184}'), ('\u{188}', '\u{187}'), ('\u{18c}', '\u{18b}'), ('\u{192}',
+        '\u{191}'), ('\u{195}', '\u{1f6}'), ('\u{199}', '\u{198}'), ('\u{19a}', '\u{23d}'),
+        ('\u{19e}', '\u{220}'), ('\u{1a1}', '\u{1a0}'), ('\u{1a3}', '\u{1a2}'), ('\u{1a5}',
+        '\u{1a4}'), ('\u{1a8}', '\u{1a7}'), ('\u{1ad}', '\u{1ac}'), ('\u{1b0}', '\u{1af}'),
+        ('\u{1b4}', '\u{1b3}'), ('\u{1b6}', '\u{1b5}'), ('\u{1b9}', '\u{1b8}'), ('\u{1bd}',
+        '\u{1bc}'), ('\u{1bf}', '\u{1f7}'), ('\u{1c6}', '\u{1c4}'), ('\u{1c9}', '\u{1c7}'),
+        ('\u{1cc}', '\u{1ca}'), ('\u{1ce}', '\u{1cd}'), ('\u{1d0}', '\u{1cf}'), ('\u{1d2}',
+        '\u{1d1}'), ('\u{1d4}', '\u{1d3}'), ('\u{1d6}', '\u{1d5}'), ('\u{1d8}', '\u{1d7}'),
+        ('\u{1da}', '\u{1d9}'), ('\u{1dc}', '\u{1db}'), ('\u{1dd}', '\u{18e}'), ('\u{1df}',
+        '\u{1de}'), ('\u{1e1}', '\u{1e0}'), ('\u{1e3}', '\u{1e2}'), ('\u{1e5}', '\u{1e4}'),
+        ('\u{1e7}', '\u{1e6}'), ('\u{1e9}', '\u{1e8}'), ('\u{1eb}', '\u{1ea}'), ('\u{1ed}',
+        '\u{1ec}'), ('\u{1ef}', '\u{1ee}'), ('\u{1f3}', '\u{1f1}'), ('\u{1f5}', '\u{1f4}'),
+        ('\u{1f9}', '\u{1f8}'), ('\u{1fb}', '\u{1fa}'), ('\u{1fd}', '\u{1fc}'), ('\u{1ff}',
+        '\u{1fe}'), ('\u{201}', '\u{200}'), ('\u{203}', '\u{202}'), ('\u{205}', '\u{204}'),
+        ('\u{207}', '\u{206}'), ('\u{209}', '\u{208}'), ('\u{20b}', '\u{20a}'), ('\u{20d}',
+        '\u{20c}'), ('\u{20f}', '\u{20e}'), ('\u{211}', '\u{210}'), ('\u{213}', '\u{212}'),
+        ('\u{215}', '\u{214}'), ('\u{217}', '\u{216}'), ('\u{219}', '\u{218}'), ('\u{21b}',
+        '\u{21a}'), ('\u{21d}', '\u{21c}'), ('\u{21f}', '\u{21e}'), ('\u{223}', '\u{222}'),
+        ('\u{225}', '\u{224}'), ('\u{227}', '\u{226}'), ('\u{229}', '\u{228}'), ('\u{22b}',
+        '\u{22a}'), ('\u{22d}', '\u{22c}'), ('\u{22f}', '\u{22e}'), ('\u{231}', '\u{230}'),
+        ('\u{233}', '\u{232}'), ('\u{23c}', '\u{23b}'), ('\u{23f}', '\u{2c7e}'), ('\u{240}',
+        '\u{2c7f}'), ('\u{242}', '\u{241}'), ('\u{247}', '\u{246}'), ('\u{249}', '\u{248}'),
+        ('\u{24b}', '\u{24a}'), ('\u{24d}', '\u{24c}'), ('\u{24f}', '\u{24e}'), ('\u{250}',
+        '\u{2c6f}'), ('\u{251}', '\u{2c6d}'), ('\u{252}', '\u{2c70}'), ('\u{253}', '\u{181}'),
+        ('\u{254}', '\u{186}'), ('\u{256}', '\u{189}'), ('\u{257}', '\u{18a}'), ('\u{259}',
+        '\u{18f}'), ('\u{25b}', '\u{190}'), ('\u{25c}', '\u{a7ab}'), ('\u{260}', '\u{193}'),
+        ('\u{261}', '\u{a7ac}'), ('\u{263}', '\u{194}'), ('\u{265}', '\u{a78d}'), ('\u{266}',
+        '\u{a7aa}'), ('\u{268}', '\u{197}'), ('\u{269}', '\u{196}'), ('\u{26b}', '\u{2c62}'),
+        ('\u{26c}', '\u{a7ad}'), ('\u{26f}', '\u{19c}'), ('\u{271}', '\u{2c6e}'), ('\u{272}',
+        '\u{19d}'), ('\u{275}', '\u{19f}'), ('\u{27d}', '\u{2c64}'), ('\u{280}', '\u{1a6}'),
+        ('\u{283}', '\u{1a9}'), ('\u{287}', '\u{a7b1}'), ('\u{288}', '\u{1ae}'), ('\u{289}',
+        '\u{244}'), ('\u{28a}', '\u{1b1}'), ('\u{28b}', '\u{1b2}'), ('\u{28c}', '\u{245}'),
+        ('\u{292}', '\u{1b7}'), ('\u{29e}', '\u{a7b0}'), ('\u{371}', '\u{370}'), ('\u{373}',
+        '\u{372}'), ('\u{377}', '\u{376}'), ('\u{37b}', '\u{3fd}'), ('\u{37c}', '\u{3fe}'),
+        ('\u{37d}', '\u{3ff}'), ('\u{3ac}', '\u{386}'), ('\u{3ad}', '\u{388}'), ('\u{3ae}',
+        '\u{389}'), ('\u{3af}', '\u{38a}'), ('\u{3b1}', '\u{391}'), ('\u{3b2}', '\u{392}'),
+        ('\u{3b3}', '\u{393}'), ('\u{3b4}', '\u{394}'), ('\u{3b5}', '\u{395}'), ('\u{3b6}',
+        '\u{396}'), ('\u{3b7}', '\u{397}'), ('\u{3b8}', '\u{398}'), ('\u{3b9}', '\u{399}'),
+        ('\u{3ba}', '\u{39a}'), ('\u{3bb}', '\u{39b}'), ('\u{3bc}', '\u{39c}'), ('\u{3bd}',
+        '\u{39d}'), ('\u{3be}', '\u{39e}'), ('\u{3bf}', '\u{39f}'), ('\u{3c0}', '\u{3a0}'),
+        ('\u{3c1}', '\u{3a1}'), ('\u{3c2}', '\u{3a3}'), ('\u{3c3}', '\u{3a3}'), ('\u{3c4}',
+        '\u{3a4}'), ('\u{3c5}', '\u{3a5}'), ('\u{3c6}', '\u{3a6}'), ('\u{3c7}', '\u{3a7}'),
+        ('\u{3c8}', '\u{3a8}'), ('\u{3c9}', '\u{3a9}'), ('\u{3ca}', '\u{3aa}'), ('\u{3cb}',
+        '\u{3ab}'), ('\u{3cc}', '\u{38c}'), ('\u{3cd}', '\u{38e}'), ('\u{3ce}', '\u{38f}'),
+        ('\u{3d0}', '\u{392}'), ('\u{3d1}', '\u{398}'), ('\u{3d5}', '\u{3a6}'), ('\u{3d6}',
+        '\u{3a0}'), ('\u{3d7}', '\u{3cf}'), ('\u{3d9}', '\u{3d8}'), ('\u{3db}', '\u{3da}'),
+        ('\u{3dd}', '\u{3dc}'), ('\u{3df}', '\u{3de}'), ('\u{3e1}', '\u{3e0}'), ('\u{3e3}',
+        '\u{3e2}'), ('\u{3e5}', '\u{3e4}'), ('\u{3e7}', '\u{3e6}'), ('\u{3e9}', '\u{3e8}'),
+        ('\u{3eb}', '\u{3ea}'), ('\u{3ed}', '\u{3ec}'), ('\u{3ef}', '\u{3ee}'), ('\u{3f0}',
+        '\u{39a}'), ('\u{3f1}', '\u{3a1}'), ('\u{3f2}', '\u{3f9}'), ('\u{3f3}', '\u{37f}'),
+        ('\u{3f5}', '\u{395}'), ('\u{3f8}', '\u{3f7}'), ('\u{3fb}', '\u{3fa}'), ('\u{430}',
+        '\u{410}'), ('\u{431}', '\u{411}'), ('\u{432}', '\u{412}'), ('\u{433}', '\u{413}'),
+        ('\u{434}', '\u{414}'), ('\u{435}', '\u{415}'), ('\u{436}', '\u{416}'), ('\u{437}',
+        '\u{417}'), ('\u{438}', '\u{418}'), ('\u{439}', '\u{419}'), ('\u{43a}', '\u{41a}'),
+        ('\u{43b}', '\u{41b}'), ('\u{43c}', '\u{41c}'), ('\u{43d}', '\u{41d}'), ('\u{43e}',
+        '\u{41e}'), ('\u{43f}', '\u{41f}'), ('\u{440}', '\u{420}'), ('\u{441}', '\u{421}'),
+        ('\u{442}', '\u{422}'), ('\u{443}', '\u{423}'), ('\u{444}', '\u{424}'), ('\u{445}',
+        '\u{425}'), ('\u{446}', '\u{426}'), ('\u{447}', '\u{427}'), ('\u{448}', '\u{428}'),
+        ('\u{449}', '\u{429}'), ('\u{44a}', '\u{42a}'), ('\u{44b}', '\u{42b}'), ('\u{44c}',
+        '\u{42c}'), ('\u{44d}', '\u{42d}'), ('\u{44e}', '\u{42e}'), ('\u{44f}', '\u{42f}'),
+        ('\u{450}', '\u{400}'), ('\u{451}', '\u{401}'), ('\u{452}', '\u{402}'), ('\u{453}',
+        '\u{403}'), ('\u{454}', '\u{404}'), ('\u{455}', '\u{405}'), ('\u{456}', '\u{406}'),
+        ('\u{457}', '\u{407}'), ('\u{458}', '\u{408}'), ('\u{459}', '\u{409}'), ('\u{45a}',
+        '\u{40a}'), ('\u{45b}', '\u{40b}'), ('\u{45c}', '\u{40c}'), ('\u{45d}', '\u{40d}'),
+        ('\u{45e}', '\u{40e}'), ('\u{45f}', '\u{40f}'), ('\u{461}', '\u{460}'), ('\u{463}',
+        '\u{462}'), ('\u{465}', '\u{464}'), ('\u{467}', '\u{466}'), ('\u{469}', '\u{468}'),
+        ('\u{46b}', '\u{46a}'), ('\u{46d}', '\u{46c}'), ('\u{46f}', '\u{46e}'), ('\u{471}',
+        '\u{470}'), ('\u{473}', '\u{472}'), ('\u{475}', '\u{474}'), ('\u{477}', '\u{476}'),
+        ('\u{479}', '\u{478}'), ('\u{47b}', '\u{47a}'), ('\u{47d}', '\u{47c}'), ('\u{47f}',
+        '\u{47e}'), ('\u{481}', '\u{480}'), ('\u{48b}', '\u{48a}'), ('\u{48d}', '\u{48c}'),
+        ('\u{48f}', '\u{48e}'), ('\u{491}', '\u{490}'), ('\u{493}', '\u{492}'), ('\u{495}',
+        '\u{494}'), ('\u{497}', '\u{496}'), ('\u{499}', '\u{498}'), ('\u{49b}', '\u{49a}'),
+        ('\u{49d}', '\u{49c}'), ('\u{49f}', '\u{49e}'), ('\u{4a1}', '\u{4a0}'), ('\u{4a3}',
+        '\u{4a2}'), ('\u{4a5}', '\u{4a4}'), ('\u{4a7}', '\u{4a6}'), ('\u{4a9}', '\u{4a8}'),
+        ('\u{4ab}', '\u{4aa}'), ('\u{4ad}', '\u{4ac}'), ('\u{4af}', '\u{4ae}'), ('\u{4b1}',
+        '\u{4b0}'), ('\u{4b3}', '\u{4b2}'), ('\u{4b5}', '\u{4b4}'), ('\u{4b7}', '\u{4b6}'),
+        ('\u{4b9}', '\u{4b8}'), ('\u{4bb}', '\u{4ba}'), ('\u{4bd}', '\u{4bc}'), ('\u{4bf}',
+        '\u{4be}'), ('\u{4c2}', '\u{4c1}'), ('\u{4c4}', '\u{4c3}'), ('\u{4c6}', '\u{4c5}'),
+        ('\u{4c8}', '\u{4c7}'), ('\u{4ca}', '\u{4c9}'), ('\u{4cc}', '\u{4cb}'), ('\u{4ce}',
+        '\u{4cd}'), ('\u{4cf}', '\u{4c0}'), ('\u{4d1}', '\u{4d0}'), ('\u{4d3}', '\u{4d2}'),
+        ('\u{4d5}', '\u{4d4}'), ('\u{4d7}', '\u{4d6}'), ('\u{4d9}', '\u{4d8}'), ('\u{4db}',
+        '\u{4da}'), ('\u{4dd}', '\u{4dc}'), ('\u{4df}', '\u{4de}'), ('\u{4e1}', '\u{4e0}'),
+        ('\u{4e3}', '\u{4e2}'), ('\u{4e5}', '\u{4e4}'), ('\u{4e7}', '\u{4e6}'), ('\u{4e9}',
+        '\u{4e8}'), ('\u{4eb}', '\u{4ea}'), ('\u{4ed}', '\u{4ec}'), ('\u{4ef}', '\u{4ee}'),
+        ('\u{4f1}', '\u{4f0}'), ('\u{4f3}', '\u{4f2}'), ('\u{4f5}', '\u{4f4}'), ('\u{4f7}',
+        '\u{4f6}'), ('\u{4f9}', '\u{4f8}'), ('\u{4fb}', '\u{4fa}'), ('\u{4fd}', '\u{4fc}'),
+        ('\u{4ff}', '\u{4fe}'), ('\u{501}', '\u{500}'), ('\u{503}', '\u{502}'), ('\u{505}',
+        '\u{504}'), ('\u{507}', '\u{506}'), ('\u{509}', '\u{508}'), ('\u{50b}', '\u{50a}'),
+        ('\u{50d}', '\u{50c}'), ('\u{50f}', '\u{50e}'), ('\u{511}', '\u{510}'), ('\u{513}',
+        '\u{512}'), ('\u{515}', '\u{514}'), ('\u{517}', '\u{516}'), ('\u{519}', '\u{518}'),
+        ('\u{51b}', '\u{51a}'), ('\u{51d}', '\u{51c}'), ('\u{51f}', '\u{51e}'), ('\u{521}',
+        '\u{520}'), ('\u{523}', '\u{522}'), ('\u{525}', '\u{524}'), ('\u{527}', '\u{526}'),
+        ('\u{529}', '\u{528}'), ('\u{52b}', '\u{52a}'), ('\u{52d}', '\u{52c}'), ('\u{52f}',
+        '\u{52e}'), ('\u{561}', '\u{531}'), ('\u{562}', '\u{532}'), ('\u{563}', '\u{533}'),
+        ('\u{564}', '\u{534}'), ('\u{565}', '\u{535}'), ('\u{566}', '\u{536}'), ('\u{567}',
+        '\u{537}'), ('\u{568}', '\u{538}'), ('\u{569}', '\u{539}'), ('\u{56a}', '\u{53a}'),
+        ('\u{56b}', '\u{53b}'), ('\u{56c}', '\u{53c}'), ('\u{56d}', '\u{53d}'), ('\u{56e}',
+        '\u{53e}'), ('\u{56f}', '\u{53f}'), ('\u{570}', '\u{540}'), ('\u{571}', '\u{541}'),
+        ('\u{572}', '\u{542}'), ('\u{573}', '\u{543}'), ('\u{574}', '\u{544}'), ('\u{575}',
+        '\u{545}'), ('\u{576}', '\u{546}'), ('\u{577}', '\u{547}'), ('\u{578}', '\u{548}'),
+        ('\u{579}', '\u{549}'), ('\u{57a}', '\u{54a}'), ('\u{57b}', '\u{54b}'), ('\u{57c}',
+        '\u{54c}'), ('\u{57d}', '\u{54d}'), ('\u{57e}', '\u{54e}'), ('\u{57f}', '\u{54f}'),
+        ('\u{580}', '\u{550}'), ('\u{581}', '\u{551}'), ('\u{582}', '\u{552}'), ('\u{583}',
+        '\u{553}'), ('\u{584}', '\u{554}'), ('\u{585}', '\u{555}'), ('\u{586}', '\u{556}'),
+        ('\u{1d79}', '\u{a77d}'), ('\u{1d7d}', '\u{2c63}'), ('\u{1e01}', '\u{1e00}'), ('\u{1e03}',
+        '\u{1e02}'), ('\u{1e05}', '\u{1e04}'), ('\u{1e07}', '\u{1e06}'), ('\u{1e09}', '\u{1e08}'),
+        ('\u{1e0b}', '\u{1e0a}'), ('\u{1e0d}', '\u{1e0c}'), ('\u{1e0f}', '\u{1e0e}'), ('\u{1e11}',
+        '\u{1e10}'), ('\u{1e13}', '\u{1e12}'), ('\u{1e15}', '\u{1e14}'), ('\u{1e17}', '\u{1e16}'),
+        ('\u{1e19}', '\u{1e18}'), ('\u{1e1b}', '\u{1e1a}'), ('\u{1e1d}', '\u{1e1c}'), ('\u{1e1f}',
+        '\u{1e1e}'), ('\u{1e21}', '\u{1e20}'), ('\u{1e23}', '\u{1e22}'), ('\u{1e25}', '\u{1e24}'),
+        ('\u{1e27}', '\u{1e26}'), ('\u{1e29}', '\u{1e28}'), ('\u{1e2b}', '\u{1e2a}'), ('\u{1e2d}',
+        '\u{1e2c}'), ('\u{1e2f}', '\u{1e2e}'), ('\u{1e31}', '\u{1e30}'), ('\u{1e33}', '\u{1e32}'),
+        ('\u{1e35}', '\u{1e34}'), ('\u{1e37}', '\u{1e36}'), ('\u{1e39}', '\u{1e38}'), ('\u{1e3b}',
+        '\u{1e3a}'), ('\u{1e3d}', '\u{1e3c}'), ('\u{1e3f}', '\u{1e3e}'), ('\u{1e41}', '\u{1e40}'),
+        ('\u{1e43}', '\u{1e42}'), ('\u{1e45}', '\u{1e44}'), ('\u{1e47}', '\u{1e46}'), ('\u{1e49}',
+        '\u{1e48}'), ('\u{1e4b}', '\u{1e4a}'), ('\u{1e4d}', '\u{1e4c}'), ('\u{1e4f}', '\u{1e4e}'),
+        ('\u{1e51}', '\u{1e50}'), ('\u{1e53}', '\u{1e52}'), ('\u{1e55}', '\u{1e54}'), ('\u{1e57}',
+        '\u{1e56}'), ('\u{1e59}', '\u{1e58}'), ('\u{1e5b}', '\u{1e5a}'), ('\u{1e5d}', '\u{1e5c}'),
+        ('\u{1e5f}', '\u{1e5e}'), ('\u{1e61}', '\u{1e60}'), ('\u{1e63}', '\u{1e62}'), ('\u{1e65}',
+        '\u{1e64}'), ('\u{1e67}', '\u{1e66}'), ('\u{1e69}', '\u{1e68}'), ('\u{1e6b}', '\u{1e6a}'),
+        ('\u{1e6d}', '\u{1e6c}'), ('\u{1e6f}', '\u{1e6e}'), ('\u{1e71}', '\u{1e70}'), ('\u{1e73}',
+        '\u{1e72}'), ('\u{1e75}', '\u{1e74}'), ('\u{1e77}', '\u{1e76}'), ('\u{1e79}', '\u{1e78}'),
+        ('\u{1e7b}', '\u{1e7a}'), ('\u{1e7d}', '\u{1e7c}'), ('\u{1e7f}', '\u{1e7e}'), ('\u{1e81}',
+        '\u{1e80}'), ('\u{1e83}', '\u{1e82}'), ('\u{1e85}', '\u{1e84}'), ('\u{1e87}', '\u{1e86}'),
+        ('\u{1e89}', '\u{1e88}'), ('\u{1e8b}', '\u{1e8a}'), ('\u{1e8d}', '\u{1e8c}'), ('\u{1e8f}',
+        '\u{1e8e}'), ('\u{1e91}', '\u{1e90}'), ('\u{1e93}', '\u{1e92}'), ('\u{1e95}', '\u{1e94}'),
+        ('\u{1e9b}', '\u{1e60}'), ('\u{1ea1}', '\u{1ea0}'), ('\u{1ea3}', '\u{1ea2}'), ('\u{1ea5}',
+        '\u{1ea4}'), ('\u{1ea7}', '\u{1ea6}'), ('\u{1ea9}', '\u{1ea8}'), ('\u{1eab}', '\u{1eaa}'),
+        ('\u{1ead}', '\u{1eac}'), ('\u{1eaf}', '\u{1eae}'), ('\u{1eb1}', '\u{1eb0}'), ('\u{1eb3}',
+        '\u{1eb2}'), ('\u{1eb5}', '\u{1eb4}'), ('\u{1eb7}', '\u{1eb6}'), ('\u{1eb9}', '\u{1eb8}'),
+        ('\u{1ebb}', '\u{1eba}'), ('\u{1ebd}', '\u{1ebc}'), ('\u{1ebf}', '\u{1ebe}'), ('\u{1ec1}',
+        '\u{1ec0}'), ('\u{1ec3}', '\u{1ec2}'), ('\u{1ec5}', '\u{1ec4}'), ('\u{1ec7}', '\u{1ec6}'),
+        ('\u{1ec9}', '\u{1ec8}'), ('\u{1ecb}', '\u{1eca}'), ('\u{1ecd}', '\u{1ecc}'), ('\u{1ecf}',
+        '\u{1ece}'), ('\u{1ed1}', '\u{1ed0}'), ('\u{1ed3}', '\u{1ed2}'), ('\u{1ed5}', '\u{1ed4}'),
+        ('\u{1ed7}', '\u{1ed6}'), ('\u{1ed9}', '\u{1ed8}'), ('\u{1edb}', '\u{1eda}'), ('\u{1edd}',
+        '\u{1edc}'), ('\u{1edf}', '\u{1ede}'), ('\u{1ee1}', '\u{1ee0}'), ('\u{1ee3}', '\u{1ee2}'),
+        ('\u{1ee5}', '\u{1ee4}'), ('\u{1ee7}', '\u{1ee6}'), ('\u{1ee9}', '\u{1ee8}'), ('\u{1eeb}',
+        '\u{1eea}'), ('\u{1eed}', '\u{1eec}'), ('\u{1eef}', '\u{1eee}'), ('\u{1ef1}', '\u{1ef0}'),
+        ('\u{1ef3}', '\u{1ef2}'), ('\u{1ef5}', '\u{1ef4}'), ('\u{1ef7}', '\u{1ef6}'), ('\u{1ef9}',
+        '\u{1ef8}'), ('\u{1efb}', '\u{1efa}'), ('\u{1efd}', '\u{1efc}'), ('\u{1eff}', '\u{1efe}'),
+        ('\u{1f00}', '\u{1f08}'), ('\u{1f01}', '\u{1f09}'), ('\u{1f02}', '\u{1f0a}'), ('\u{1f03}',
+        '\u{1f0b}'), ('\u{1f04}', '\u{1f0c}'), ('\u{1f05}', '\u{1f0d}'), ('\u{1f06}', '\u{1f0e}'),
+        ('\u{1f07}', '\u{1f0f}'), ('\u{1f10}', '\u{1f18}'), ('\u{1f11}', '\u{1f19}'), ('\u{1f12}',
+        '\u{1f1a}'), ('\u{1f13}', '\u{1f1b}'), ('\u{1f14}', '\u{1f1c}'), ('\u{1f15}', '\u{1f1d}'),
+        ('\u{1f20}', '\u{1f28}'), ('\u{1f21}', '\u{1f29}'), ('\u{1f22}', '\u{1f2a}'), ('\u{1f23}',
+        '\u{1f2b}'), ('\u{1f24}', '\u{1f2c}'), ('\u{1f25}', '\u{1f2d}'), ('\u{1f26}', '\u{1f2e}'),
+        ('\u{1f27}', '\u{1f2f}'), ('\u{1f30}', '\u{1f38}'), ('\u{1f31}', '\u{1f39}'), ('\u{1f32}',
+        '\u{1f3a}'), ('\u{1f33}', '\u{1f3b}'), ('\u{1f34}', '\u{1f3c}'), ('\u{1f35}', '\u{1f3d}'),
+        ('\u{1f36}', '\u{1f3e}'), ('\u{1f37}', '\u{1f3f}'), ('\u{1f40}', '\u{1f48}'), ('\u{1f41}',
+        '\u{1f49}'), ('\u{1f42}', '\u{1f4a}'), ('\u{1f43}', '\u{1f4b}'), ('\u{1f44}', '\u{1f4c}'),
+        ('\u{1f45}', '\u{1f4d}'), ('\u{1f51}', '\u{1f59}'), ('\u{1f53}', '\u{1f5b}'), ('\u{1f55}',
+        '\u{1f5d}'), ('\u{1f57}', '\u{1f5f}'), ('\u{1f60}', '\u{1f68}'), ('\u{1f61}', '\u{1f69}'),
+        ('\u{1f62}', '\u{1f6a}'), ('\u{1f63}', '\u{1f6b}'), ('\u{1f64}', '\u{1f6c}'), ('\u{1f65}',
+        '\u{1f6d}'), ('\u{1f66}', '\u{1f6e}'), ('\u{1f67}', '\u{1f6f}'), ('\u{1f70}', '\u{1fba}'),
+        ('\u{1f71}', '\u{1fbb}'), ('\u{1f72}', '\u{1fc8}'), ('\u{1f73}', '\u{1fc9}'), ('\u{1f74}',
+        '\u{1fca}'), ('\u{1f75}', '\u{1fcb}'), ('\u{1f76}', '\u{1fda}'), ('\u{1f77}', '\u{1fdb}'),
+        ('\u{1f78}', '\u{1ff8}'), ('\u{1f79}', '\u{1ff9}'), ('\u{1f7a}', '\u{1fea}'), ('\u{1f7b}',
+        '\u{1feb}'), ('\u{1f7c}', '\u{1ffa}'), ('\u{1f7d}', '\u{1ffb}'), ('\u{1f80}', '\u{1f88}'),
+        ('\u{1f81}', '\u{1f89}'), ('\u{1f82}', '\u{1f8a}'), ('\u{1f83}', '\u{1f8b}'), ('\u{1f84}',
+        '\u{1f8c}'), ('\u{1f85}', '\u{1f8d}'), ('\u{1f86}', '\u{1f8e}'), ('\u{1f87}', '\u{1f8f}'),
+        ('\u{1f90}', '\u{1f98}'), ('\u{1f91}', '\u{1f99}'), ('\u{1f92}', '\u{1f9a}'), ('\u{1f93}',
+        '\u{1f9b}'), ('\u{1f94}', '\u{1f9c}'), ('\u{1f95}', '\u{1f9d}'), ('\u{1f96}', '\u{1f9e}'),
+        ('\u{1f97}', '\u{1f9f}'), ('\u{1fa0}', '\u{1fa8}'), ('\u{1fa1}', '\u{1fa9}'), ('\u{1fa2}',
+        '\u{1faa}'), ('\u{1fa3}', '\u{1fab}'), ('\u{1fa4}', '\u{1fac}'), ('\u{1fa5}', '\u{1fad}'),
+        ('\u{1fa6}', '\u{1fae}'), ('\u{1fa7}', '\u{1faf}'), ('\u{1fb0}', '\u{1fb8}'), ('\u{1fb1}',
+        '\u{1fb9}'), ('\u{1fb3}', '\u{1fbc}'), ('\u{1fbe}', '\u{399}'), ('\u{1fc3}', '\u{1fcc}'),
+        ('\u{1fd0}', '\u{1fd8}'), ('\u{1fd1}', '\u{1fd9}'), ('\u{1fe0}', '\u{1fe8}'), ('\u{1fe1}',
+        '\u{1fe9}'), ('\u{1fe5}', '\u{1fec}'), ('\u{1ff3}', '\u{1ffc}'), ('\u{214e}', '\u{2132}'),
+        ('\u{2184}', '\u{2183}'), ('\u{2c30}', '\u{2c00}'), ('\u{2c31}', '\u{2c01}'), ('\u{2c32}',
+        '\u{2c02}'), ('\u{2c33}', '\u{2c03}'), ('\u{2c34}', '\u{2c04}'), ('\u{2c35}', '\u{2c05}'),
+        ('\u{2c36}', '\u{2c06}'), ('\u{2c37}', '\u{2c07}'), ('\u{2c38}', '\u{2c08}'), ('\u{2c39}',
+        '\u{2c09}'), ('\u{2c3a}', '\u{2c0a}'), ('\u{2c3b}', '\u{2c0b}'), ('\u{2c3c}', '\u{2c0c}'),
+        ('\u{2c3d}', '\u{2c0d}'), ('\u{2c3e}', '\u{2c0e}'), ('\u{2c3f}', '\u{2c0f}'), ('\u{2c40}',
+        '\u{2c10}'), ('\u{2c41}', '\u{2c11}'), ('\u{2c42}', '\u{2c12}'), ('\u{2c43}', '\u{2c13}'),
+        ('\u{2c44}', '\u{2c14}'), ('\u{2c45}', '\u{2c15}'), ('\u{2c46}', '\u{2c16}'), ('\u{2c47}',
+        '\u{2c17}'), ('\u{2c48}', '\u{2c18}'), ('\u{2c49}', '\u{2c19}'), ('\u{2c4a}', '\u{2c1a}'),
+        ('\u{2c4b}', '\u{2c1b}'), ('\u{2c4c}', '\u{2c1c}'), ('\u{2c4d}', '\u{2c1d}'), ('\u{2c4e}',
+        '\u{2c1e}'), ('\u{2c4f}', '\u{2c1f}'), ('\u{2c50}', '\u{2c20}'), ('\u{2c51}', '\u{2c21}'),
+        ('\u{2c52}', '\u{2c22}'), ('\u{2c53}', '\u{2c23}'), ('\u{2c54}', '\u{2c24}'), ('\u{2c55}',
+        '\u{2c25}'), ('\u{2c56}', '\u{2c26}'), ('\u{2c57}', '\u{2c27}'), ('\u{2c58}', '\u{2c28}'),
+        ('\u{2c59}', '\u{2c29}'), ('\u{2c5a}', '\u{2c2a}'), ('\u{2c5b}', '\u{2c2b}'), ('\u{2c5c}',
+        '\u{2c2c}'), ('\u{2c5d}', '\u{2c2d}'), ('\u{2c5e}', '\u{2c2e}'), ('\u{2c61}', '\u{2c60}'),
+        ('\u{2c65}', '\u{23a}'), ('\u{2c66}', '\u{23e}'), ('\u{2c68}', '\u{2c67}'), ('\u{2c6a}',
+        '\u{2c69}'), ('\u{2c6c}', '\u{2c6b}'), ('\u{2c73}', '\u{2c72}'), ('\u{2c76}', '\u{2c75}'),
+        ('\u{2c81}', '\u{2c80}'), ('\u{2c83}', '\u{2c82}'), ('\u{2c85}', '\u{2c84}'), ('\u{2c87}',
+        '\u{2c86}'), ('\u{2c89}', '\u{2c88}'), ('\u{2c8b}', '\u{2c8a}'), ('\u{2c8d}', '\u{2c8c}'),
+        ('\u{2c8f}', '\u{2c8e}'), ('\u{2c91}', '\u{2c90}'), ('\u{2c93}', '\u{2c92}'), ('\u{2c95}',
+        '\u{2c94}'), ('\u{2c97}', '\u{2c96}'), ('\u{2c99}', '\u{2c98}'), ('\u{2c9b}', '\u{2c9a}'),
+        ('\u{2c9d}', '\u{2c9c}'), ('\u{2c9f}', '\u{2c9e}'), ('\u{2ca1}', '\u{2ca0}'), ('\u{2ca3}',
+        '\u{2ca2}'), ('\u{2ca5}', '\u{2ca4}'), ('\u{2ca7}', '\u{2ca6}'), ('\u{2ca9}', '\u{2ca8}'),
+        ('\u{2cab}', '\u{2caa}'), ('\u{2cad}', '\u{2cac}'), ('\u{2caf}', '\u{2cae}'), ('\u{2cb1}',
+        '\u{2cb0}'), ('\u{2cb3}', '\u{2cb2}'), ('\u{2cb5}', '\u{2cb4}'), ('\u{2cb7}', '\u{2cb6}'),
+        ('\u{2cb9}', '\u{2cb8}'), ('\u{2cbb}', '\u{2cba}'), ('\u{2cbd}', '\u{2cbc}'), ('\u{2cbf}',
+        '\u{2cbe}'), ('\u{2cc1}', '\u{2cc0}'), ('\u{2cc3}', '\u{2cc2}'), ('\u{2cc5}', '\u{2cc4}'),
+        ('\u{2cc7}', '\u{2cc6}'), ('\u{2cc9}', '\u{2cc8}'), ('\u{2ccb}', '\u{2cca}'), ('\u{2ccd}',
+        '\u{2ccc}'), ('\u{2ccf}', '\u{2cce}'), ('\u{2cd1}', '\u{2cd0}'), ('\u{2cd3}', '\u{2cd2}'),
+        ('\u{2cd5}', '\u{2cd4}'), ('\u{2cd7}', '\u{2cd6}'), ('\u{2cd9}', '\u{2cd8}'), ('\u{2cdb}',
+        '\u{2cda}'), ('\u{2cdd}', '\u{2cdc}'), ('\u{2cdf}', '\u{2cde}'), ('\u{2ce1}', '\u{2ce0}'),
+        ('\u{2ce3}', '\u{2ce2}'), ('\u{2cec}', '\u{2ceb}'), ('\u{2cee}', '\u{2ced}'), ('\u{2cf3}',
+        '\u{2cf2}'), ('\u{2d00}', '\u{10a0}'), ('\u{2d01}', '\u{10a1}'), ('\u{2d02}', '\u{10a2}'),
+        ('\u{2d03}', '\u{10a3}'), ('\u{2d04}', '\u{10a4}'), ('\u{2d05}', '\u{10a5}'), ('\u{2d06}',
+        '\u{10a6}'), ('\u{2d07}', '\u{10a7}'), ('\u{2d08}', '\u{10a8}'), ('\u{2d09}', '\u{10a9}'),
+        ('\u{2d0a}', '\u{10aa}'), ('\u{2d0b}', '\u{10ab}'), ('\u{2d0c}', '\u{10ac}'), ('\u{2d0d}',
+        '\u{10ad}'), ('\u{2d0e}', '\u{10ae}'), ('\u{2d0f}', '\u{10af}'), ('\u{2d10}', '\u{10b0}'),
+        ('\u{2d11}', '\u{10b1}'), ('\u{2d12}', '\u{10b2}'), ('\u{2d13}', '\u{10b3}'), ('\u{2d14}',
+        '\u{10b4}'), ('\u{2d15}', '\u{10b5}'), ('\u{2d16}', '\u{10b6}'), ('\u{2d17}', '\u{10b7}'),
+        ('\u{2d18}', '\u{10b8}'), ('\u{2d19}', '\u{10b9}'), ('\u{2d1a}', '\u{10ba}'), ('\u{2d1b}',
+        '\u{10bb}'), ('\u{2d1c}', '\u{10bc}'), ('\u{2d1d}', '\u{10bd}'), ('\u{2d1e}', '\u{10be}'),
+        ('\u{2d1f}', '\u{10bf}'), ('\u{2d20}', '\u{10c0}'), ('\u{2d21}', '\u{10c1}'), ('\u{2d22}',
+        '\u{10c2}'), ('\u{2d23}', '\u{10c3}'), ('\u{2d24}', '\u{10c4}'), ('\u{2d25}', '\u{10c5}'),
+        ('\u{2d27}', '\u{10c7}'), ('\u{2d2d}', '\u{10cd}'), ('\u{a641}', '\u{a640}'), ('\u{a643}',
+        '\u{a642}'), ('\u{a645}', '\u{a644}'), ('\u{a647}', '\u{a646}'), ('\u{a649}', '\u{a648}'),
+        ('\u{a64b}', '\u{a64a}'), ('\u{a64d}', '\u{a64c}'), ('\u{a64f}', '\u{a64e}'), ('\u{a651}',
+        '\u{a650}'), ('\u{a653}', '\u{a652}'), ('\u{a655}', '\u{a654}'), ('\u{a657}', '\u{a656}'),
+        ('\u{a659}', '\u{a658}'), ('\u{a65b}', '\u{a65a}'), ('\u{a65d}', '\u{a65c}'), ('\u{a65f}',
+        '\u{a65e}'), ('\u{a661}', '\u{a660}'), ('\u{a663}', '\u{a662}'), ('\u{a665}', '\u{a664}'),
+        ('\u{a667}', '\u{a666}'), ('\u{a669}', '\u{a668}'), ('\u{a66b}', '\u{a66a}'), ('\u{a66d}',
+        '\u{a66c}'), ('\u{a681}', '\u{a680}'), ('\u{a683}', '\u{a682}'), ('\u{a685}', '\u{a684}'),
+        ('\u{a687}', '\u{a686}'), ('\u{a689}', '\u{a688}'), ('\u{a68b}', '\u{a68a}'), ('\u{a68d}',
+        '\u{a68c}'), ('\u{a68f}', '\u{a68e}'), ('\u{a691}', '\u{a690}'), ('\u{a693}', '\u{a692}'),
+        ('\u{a695}', '\u{a694}'), ('\u{a697}', '\u{a696}'), ('\u{a699}', '\u{a698}'), ('\u{a69b}',
+        '\u{a69a}'), ('\u{a723}', '\u{a722}'), ('\u{a725}', '\u{a724}'), ('\u{a727}', '\u{a726}'),
+        ('\u{a729}', '\u{a728}'), ('\u{a72b}', '\u{a72a}'), ('\u{a72d}', '\u{a72c}'), ('\u{a72f}',
+        '\u{a72e}'), ('\u{a733}', '\u{a732}'), ('\u{a735}', '\u{a734}'), ('\u{a737}', '\u{a736}'),
+        ('\u{a739}', '\u{a738}'), ('\u{a73b}', '\u{a73a}'), ('\u{a73d}', '\u{a73c}'), ('\u{a73f}',
+        '\u{a73e}'), ('\u{a741}', '\u{a740}'), ('\u{a743}', '\u{a742}'), ('\u{a745}', '\u{a744}'),
+        ('\u{a747}', '\u{a746}'), ('\u{a749}', '\u{a748}'), ('\u{a74b}', '\u{a74a}'), ('\u{a74d}',
+        '\u{a74c}'), ('\u{a74f}', '\u{a74e}'), ('\u{a751}', '\u{a750}'), ('\u{a753}', '\u{a752}'),
+        ('\u{a755}', '\u{a754}'), ('\u{a757}', '\u{a756}'), ('\u{a759}', '\u{a758}'), ('\u{a75b}',
+        '\u{a75a}'), ('\u{a75d}', '\u{a75c}'), ('\u{a75f}', '\u{a75e}'), ('\u{a761}', '\u{a760}'),
+        ('\u{a763}', '\u{a762}'), ('\u{a765}', '\u{a764}'), ('\u{a767}', '\u{a766}'), ('\u{a769}',
+        '\u{a768}'), ('\u{a76b}', '\u{a76a}'), ('\u{a76d}', '\u{a76c}'), ('\u{a76f}', '\u{a76e}'),
+        ('\u{a77a}', '\u{a779}'), ('\u{a77c}', '\u{a77b}'), ('\u{a77f}', '\u{a77e}'), ('\u{a781}',
+        '\u{a780}'), ('\u{a783}', '\u{a782}'), ('\u{a785}', '\u{a784}'), ('\u{a787}', '\u{a786}'),
+        ('\u{a78c}', '\u{a78b}'), ('\u{a791}', '\u{a790}'), ('\u{a793}', '\u{a792}'), ('\u{a797}',
+        '\u{a796}'), ('\u{a799}', '\u{a798}'), ('\u{a79b}', '\u{a79a}'), ('\u{a79d}', '\u{a79c}'),
+        ('\u{a79f}', '\u{a79e}'), ('\u{a7a1}', '\u{a7a0}'), ('\u{a7a3}', '\u{a7a2}'), ('\u{a7a5}',
+        '\u{a7a4}'), ('\u{a7a7}', '\u{a7a6}'), ('\u{a7a9}', '\u{a7a8}'), ('\u{ff41}', '\u{ff21}'),
+        ('\u{ff42}', '\u{ff22}'), ('\u{ff43}', '\u{ff23}'), ('\u{ff44}', '\u{ff24}'), ('\u{ff45}',
+        '\u{ff25}'), ('\u{ff46}', '\u{ff26}'), ('\u{ff47}', '\u{ff27}'), ('\u{ff48}', '\u{ff28}'),
+        ('\u{ff49}', '\u{ff29}'), ('\u{ff4a}', '\u{ff2a}'), ('\u{ff4b}', '\u{ff2b}'), ('\u{ff4c}',
+        '\u{ff2c}'), ('\u{ff4d}', '\u{ff2d}'), ('\u{ff4e}', '\u{ff2e}'), ('\u{ff4f}', '\u{ff2f}'),
+        ('\u{ff50}', '\u{ff30}'), ('\u{ff51}', '\u{ff31}'), ('\u{ff52}', '\u{ff32}'), ('\u{ff53}',
+        '\u{ff33}'), ('\u{ff54}', '\u{ff34}'), ('\u{ff55}', '\u{ff35}'), ('\u{ff56}', '\u{ff36}'),
+        ('\u{ff57}', '\u{ff37}'), ('\u{ff58}', '\u{ff38}'), ('\u{ff59}', '\u{ff39}'), ('\u{ff5a}',
+        '\u{ff3a}'), ('\u{10428}', '\u{10400}'), ('\u{10429}', '\u{10401}'), ('\u{1042a}',
+        '\u{10402}'), ('\u{1042b}', '\u{10403}'), ('\u{1042c}', '\u{10404}'), ('\u{1042d}',
+        '\u{10405}'), ('\u{1042e}', '\u{10406}'), ('\u{1042f}', '\u{10407}'), ('\u{10430}',
+        '\u{10408}'), ('\u{10431}', '\u{10409}'), ('\u{10432}', '\u{1040a}'), ('\u{10433}',
+        '\u{1040b}'), ('\u{10434}', '\u{1040c}'), ('\u{10435}', '\u{1040d}'), ('\u{10436}',
+        '\u{1040e}'), ('\u{10437}', '\u{1040f}'), ('\u{10438}', '\u{10410}'), ('\u{10439}',
+        '\u{10411}'), ('\u{1043a}', '\u{10412}'), ('\u{1043b}', '\u{10413}'), ('\u{1043c}',
+        '\u{10414}'), ('\u{1043d}', '\u{10415}'), ('\u{1043e}', '\u{10416}'), ('\u{1043f}',
+        '\u{10417}'), ('\u{10440}', '\u{10418}'), ('\u{10441}', '\u{10419}'), ('\u{10442}',
+        '\u{1041a}'), ('\u{10443}', '\u{1041b}'), ('\u{10444}', '\u{1041c}'), ('\u{10445}',
+        '\u{1041d}'), ('\u{10446}', '\u{1041e}'), ('\u{10447}', '\u{1041f}'), ('\u{10448}',
+        '\u{10420}'), ('\u{10449}', '\u{10421}'), ('\u{1044a}', '\u{10422}'), ('\u{1044b}',
+        '\u{10423}'), ('\u{1044c}', '\u{10424}'), ('\u{1044d}', '\u{10425}'), ('\u{1044e}',
+        '\u{10426}'), ('\u{1044f}', '\u{10427}'), ('\u{118c0}', '\u{118a0}'), ('\u{118c1}',
+        '\u{118a1}'), ('\u{118c2}', '\u{118a2}'), ('\u{118c3}', '\u{118a3}'), ('\u{118c4}',
+        '\u{118a4}'), ('\u{118c5}', '\u{118a5}'), ('\u{118c6}', '\u{118a6}'), ('\u{118c7}',
+        '\u{118a7}'), ('\u{118c8}', '\u{118a8}'), ('\u{118c9}', '\u{118a9}'), ('\u{118ca}',
+        '\u{118aa}'), ('\u{118cb}', '\u{118ab}'), ('\u{118cc}', '\u{118ac}'), ('\u{118cd}',
+        '\u{118ad}'), ('\u{118ce}', '\u{118ae}'), ('\u{118cf}', '\u{118af}'), ('\u{118d0}',
+        '\u{118b0}'), ('\u{118d1}', '\u{118b1}'), ('\u{118d2}', '\u{118b2}'), ('\u{118d3}',
+        '\u{118b3}'), ('\u{118d4}', '\u{118b4}'), ('\u{118d5}', '\u{118b5}'), ('\u{118d6}',
+        '\u{118b6}'), ('\u{118d7}', '\u{118b7}'), ('\u{118d8}', '\u{118b8}'), ('\u{118d9}',
+        '\u{118b9}'), ('\u{118da}', '\u{118ba}'), ('\u{118db}', '\u{118bb}'), ('\u{118dc}',
+        '\u{118bc}'), ('\u{118dd}', '\u{118bd}'), ('\u{118de}', '\u{118be}'), ('\u{118df}',
+        '\u{118bf}')
     ];
 
 }
@@ -6968,177 +7626,184 @@ pub fn width(c: char, is_cjk: bool) -> Option<uint> {
     // character width table. Based on Markus Kuhn's free wcwidth() implementation,
     //     http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
     static charwidth_table: &'static [(char, char, u8, u8)] = &[
-        ('\u00a1', '\u00a1', 1, 2), ('\u00a4', '\u00a4', 1, 2), ('\u00a7', '\u00a8', 1, 2),
-        ('\u00aa', '\u00aa', 1, 2), ('\u00ae', '\u00ae', 1, 2), ('\u00b0', '\u00b4', 1, 2),
-        ('\u00b6', '\u00ba', 1, 2), ('\u00bc', '\u00bf', 1, 2), ('\u00c6', '\u00c6', 1, 2),
-        ('\u00d0', '\u00d0', 1, 2), ('\u00d7', '\u00d8', 1, 2), ('\u00de', '\u00e1', 1, 2),
-        ('\u00e6', '\u00e6', 1, 2), ('\u00e8', '\u00ea', 1, 2), ('\u00ec', '\u00ed', 1, 2),
-        ('\u00f0', '\u00f0', 1, 2), ('\u00f2', '\u00f3', 1, 2), ('\u00f7', '\u00fa', 1, 2),
-        ('\u00fc', '\u00fc', 1, 2), ('\u00fe', '\u00fe', 1, 2), ('\u0101', '\u0101', 1, 2),
-        ('\u0111', '\u0111', 1, 2), ('\u0113', '\u0113', 1, 2), ('\u011b', '\u011b', 1, 2),
-        ('\u0126', '\u0127', 1, 2), ('\u012b', '\u012b', 1, 2), ('\u0131', '\u0133', 1, 2),
-        ('\u0138', '\u0138', 1, 2), ('\u013f', '\u0142', 1, 2), ('\u0144', '\u0144', 1, 2),
-        ('\u0148', '\u014b', 1, 2), ('\u014d', '\u014d', 1, 2), ('\u0152', '\u0153', 1, 2),
-        ('\u0166', '\u0167', 1, 2), ('\u016b', '\u016b', 1, 2), ('\u01ce', '\u01ce', 1, 2),
-        ('\u01d0', '\u01d0', 1, 2), ('\u01d2', '\u01d2', 1, 2), ('\u01d4', '\u01d4', 1, 2),
-        ('\u01d6', '\u01d6', 1, 2), ('\u01d8', '\u01d8', 1, 2), ('\u01da', '\u01da', 1, 2),
-        ('\u01dc', '\u01dc', 1, 2), ('\u0251', '\u0251', 1, 2), ('\u0261', '\u0261', 1, 2),
-        ('\u02c4', '\u02c4', 1, 2), ('\u02c7', '\u02c7', 1, 2), ('\u02c9', '\u02cb', 1, 2),
-        ('\u02cd', '\u02cd', 1, 2), ('\u02d0', '\u02d0', 1, 2), ('\u02d8', '\u02db', 1, 2),
-        ('\u02dd', '\u02dd', 1, 2), ('\u02df', '\u02df', 1, 2), ('\u0300', '\u036f', 0, 0),
-        ('\u0391', '\u03a1', 1, 2), ('\u03a3', '\u03a9', 1, 2), ('\u03b1', '\u03c1', 1, 2),
-        ('\u03c3', '\u03c9', 1, 2), ('\u0401', '\u0401', 1, 2), ('\u0410', '\u044f', 1, 2),
-        ('\u0451', '\u0451', 1, 2), ('\u0483', '\u0489', 0, 0), ('\u0591', '\u05bd', 0, 0),
-        ('\u05bf', '\u05bf', 0, 0), ('\u05c1', '\u05c2', 0, 0), ('\u05c4', '\u05c5', 0, 0),
-        ('\u05c7', '\u05c7', 0, 0), ('\u0600', '\u0605', 0, 0), ('\u0610', '\u061a', 0, 0),
-        ('\u061c', '\u061c', 0, 0), ('\u064b', '\u065f', 0, 0), ('\u0670', '\u0670', 0, 0),
-        ('\u06d6', '\u06dd', 0, 0), ('\u06df', '\u06e4', 0, 0), ('\u06e7', '\u06e8', 0, 0),
-        ('\u06ea', '\u06ed', 0, 0), ('\u070f', '\u070f', 0, 0), ('\u0711', '\u0711', 0, 0),
-        ('\u0730', '\u074a', 0, 0), ('\u07a6', '\u07b0', 0, 0), ('\u07eb', '\u07f3', 0, 0),
-        ('\u0816', '\u0819', 0, 0), ('\u081b', '\u0823', 0, 0), ('\u0825', '\u0827', 0, 0),
-        ('\u0829', '\u082d', 0, 0), ('\u0859', '\u085b', 0, 0), ('\u08e4', '\u0902', 0, 0),
-        ('\u093a', '\u093a', 0, 0), ('\u093c', '\u093c', 0, 0), ('\u0941', '\u0948', 0, 0),
-        ('\u094d', '\u094d', 0, 0), ('\u0951', '\u0957', 0, 0), ('\u0962', '\u0963', 0, 0),
-        ('\u0981', '\u0981', 0, 0), ('\u09bc', '\u09bc', 0, 0), ('\u09c1', '\u09c4', 0, 0),
-        ('\u09cd', '\u09cd', 0, 0), ('\u09e2', '\u09e3', 0, 0), ('\u0a01', '\u0a02', 0, 0),
-        ('\u0a3c', '\u0a3c', 0, 0), ('\u0a41', '\u0a42', 0, 0), ('\u0a47', '\u0a48', 0, 0),
-        ('\u0a4b', '\u0a4d', 0, 0), ('\u0a51', '\u0a51', 0, 0), ('\u0a70', '\u0a71', 0, 0),
-        ('\u0a75', '\u0a75', 0, 0), ('\u0a81', '\u0a82', 0, 0), ('\u0abc', '\u0abc', 0, 0),
-        ('\u0ac1', '\u0ac5', 0, 0), ('\u0ac7', '\u0ac8', 0, 0), ('\u0acd', '\u0acd', 0, 0),
-        ('\u0ae2', '\u0ae3', 0, 0), ('\u0b01', '\u0b01', 0, 0), ('\u0b3c', '\u0b3c', 0, 0),
-        ('\u0b3f', '\u0b3f', 0, 0), ('\u0b41', '\u0b44', 0, 0), ('\u0b4d', '\u0b4d', 0, 0),
-        ('\u0b56', '\u0b56', 0, 0), ('\u0b62', '\u0b63', 0, 0), ('\u0b82', '\u0b82', 0, 0),
-        ('\u0bc0', '\u0bc0', 0, 0), ('\u0bcd', '\u0bcd', 0, 0), ('\u0c00', '\u0c00', 0, 0),
-        ('\u0c3e', '\u0c40', 0, 0), ('\u0c46', '\u0c48', 0, 0), ('\u0c4a', '\u0c4d', 0, 0),
-        ('\u0c55', '\u0c56', 0, 0), ('\u0c62', '\u0c63', 0, 0), ('\u0c81', '\u0c81', 0, 0),
-        ('\u0cbc', '\u0cbc', 0, 0), ('\u0cbf', '\u0cbf', 0, 0), ('\u0cc6', '\u0cc6', 0, 0),
-        ('\u0ccc', '\u0ccd', 0, 0), ('\u0ce2', '\u0ce3', 0, 0), ('\u0d01', '\u0d01', 0, 0),
-        ('\u0d41', '\u0d44', 0, 0), ('\u0d4d', '\u0d4d', 0, 0), ('\u0d62', '\u0d63', 0, 0),
-        ('\u0dca', '\u0dca', 0, 0), ('\u0dd2', '\u0dd4', 0, 0), ('\u0dd6', '\u0dd6', 0, 0),
-        ('\u0e31', '\u0e31', 0, 0), ('\u0e34', '\u0e3a', 0, 0), ('\u0e47', '\u0e4e', 0, 0),
-        ('\u0eb1', '\u0eb1', 0, 0), ('\u0eb4', '\u0eb9', 0, 0), ('\u0ebb', '\u0ebc', 0, 0),
-        ('\u0ec8', '\u0ecd', 0, 0), ('\u0f18', '\u0f19', 0, 0), ('\u0f35', '\u0f35', 0, 0),
-        ('\u0f37', '\u0f37', 0, 0), ('\u0f39', '\u0f39', 0, 0), ('\u0f71', '\u0f7e', 0, 0),
-        ('\u0f80', '\u0f84', 0, 0), ('\u0f86', '\u0f87', 0, 0), ('\u0f8d', '\u0f97', 0, 0),
-        ('\u0f99', '\u0fbc', 0, 0), ('\u0fc6', '\u0fc6', 0, 0), ('\u102d', '\u1030', 0, 0),
-        ('\u1032', '\u1037', 0, 0), ('\u1039', '\u103a', 0, 0), ('\u103d', '\u103e', 0, 0),
-        ('\u1058', '\u1059', 0, 0), ('\u105e', '\u1060', 0, 0), ('\u1071', '\u1074', 0, 0),
-        ('\u1082', '\u1082', 0, 0), ('\u1085', '\u1086', 0, 0), ('\u108d', '\u108d', 0, 0),
-        ('\u109d', '\u109d', 0, 0), ('\u1100', '\u115f', 2, 2), ('\u1160', '\u11ff', 0, 0),
-        ('\u135d', '\u135f', 0, 0), ('\u1712', '\u1714', 0, 0), ('\u1732', '\u1734', 0, 0),
-        ('\u1752', '\u1753', 0, 0), ('\u1772', '\u1773', 0, 0), ('\u17b4', '\u17b5', 0, 0),
-        ('\u17b7', '\u17bd', 0, 0), ('\u17c6', '\u17c6', 0, 0), ('\u17c9', '\u17d3', 0, 0),
-        ('\u17dd', '\u17dd', 0, 0), ('\u180b', '\u180e', 0, 0), ('\u18a9', '\u18a9', 0, 0),
-        ('\u1920', '\u1922', 0, 0), ('\u1927', '\u1928', 0, 0), ('\u1932', '\u1932', 0, 0),
-        ('\u1939', '\u193b', 0, 0), ('\u1a17', '\u1a18', 0, 0), ('\u1a1b', '\u1a1b', 0, 0),
-        ('\u1a56', '\u1a56', 0, 0), ('\u1a58', '\u1a5e', 0, 0), ('\u1a60', '\u1a60', 0, 0),
-        ('\u1a62', '\u1a62', 0, 0), ('\u1a65', '\u1a6c', 0, 0), ('\u1a73', '\u1a7c', 0, 0),
-        ('\u1a7f', '\u1a7f', 0, 0), ('\u1ab0', '\u1abe', 0, 0), ('\u1b00', '\u1b03', 0, 0),
-        ('\u1b34', '\u1b34', 0, 0), ('\u1b36', '\u1b3a', 0, 0), ('\u1b3c', '\u1b3c', 0, 0),
-        ('\u1b42', '\u1b42', 0, 0), ('\u1b6b', '\u1b73', 0, 0), ('\u1b80', '\u1b81', 0, 0),
-        ('\u1ba2', '\u1ba5', 0, 0), ('\u1ba8', '\u1ba9', 0, 0), ('\u1bab', '\u1bad', 0, 0),
-        ('\u1be6', '\u1be6', 0, 0), ('\u1be8', '\u1be9', 0, 0), ('\u1bed', '\u1bed', 0, 0),
-        ('\u1bef', '\u1bf1', 0, 0), ('\u1c2c', '\u1c33', 0, 0), ('\u1c36', '\u1c37', 0, 0),
-        ('\u1cd0', '\u1cd2', 0, 0), ('\u1cd4', '\u1ce0', 0, 0), ('\u1ce2', '\u1ce8', 0, 0),
-        ('\u1ced', '\u1ced', 0, 0), ('\u1cf4', '\u1cf4', 0, 0), ('\u1cf8', '\u1cf9', 0, 0),
-        ('\u1dc0', '\u1df5', 0, 0), ('\u1dfc', '\u1dff', 0, 0), ('\u200b', '\u200f', 0, 0),
-        ('\u2010', '\u2010', 1, 2), ('\u2013', '\u2016', 1, 2), ('\u2018', '\u2019', 1, 2),
-        ('\u201c', '\u201d', 1, 2), ('\u2020', '\u2022', 1, 2), ('\u2024', '\u2027', 1, 2),
-        ('\u202a', '\u202e', 0, 0), ('\u2030', '\u2030', 1, 2), ('\u2032', '\u2033', 1, 2),
-        ('\u2035', '\u2035', 1, 2), ('\u203b', '\u203b', 1, 2), ('\u203e', '\u203e', 1, 2),
-        ('\u2060', '\u2064', 0, 0), ('\u2066', '\u206f', 0, 0), ('\u2074', '\u2074', 1, 2),
-        ('\u207f', '\u207f', 1, 2), ('\u2081', '\u2084', 1, 2), ('\u20ac', '\u20ac', 1, 2),
-        ('\u20d0', '\u20f0', 0, 0), ('\u2103', '\u2103', 1, 2), ('\u2105', '\u2105', 1, 2),
-        ('\u2109', '\u2109', 1, 2), ('\u2113', '\u2113', 1, 2), ('\u2116', '\u2116', 1, 2),
-        ('\u2121', '\u2122', 1, 2), ('\u2126', '\u2126', 1, 2), ('\u212b', '\u212b', 1, 2),
-        ('\u2153', '\u2154', 1, 2), ('\u215b', '\u215e', 1, 2), ('\u2160', '\u216b', 1, 2),
-        ('\u2170', '\u2179', 1, 2), ('\u2189', '\u2189', 1, 2), ('\u2190', '\u2199', 1, 2),
-        ('\u21b8', '\u21b9', 1, 2), ('\u21d2', '\u21d2', 1, 2), ('\u21d4', '\u21d4', 1, 2),
-        ('\u21e7', '\u21e7', 1, 2), ('\u2200', '\u2200', 1, 2), ('\u2202', '\u2203', 1, 2),
-        ('\u2207', '\u2208', 1, 2), ('\u220b', '\u220b', 1, 2), ('\u220f', '\u220f', 1, 2),
-        ('\u2211', '\u2211', 1, 2), ('\u2215', '\u2215', 1, 2), ('\u221a', '\u221a', 1, 2),
-        ('\u221d', '\u2220', 1, 2), ('\u2223', '\u2223', 1, 2), ('\u2225', '\u2225', 1, 2),
-        ('\u2227', '\u222c', 1, 2), ('\u222e', '\u222e', 1, 2), ('\u2234', '\u2237', 1, 2),
-        ('\u223c', '\u223d', 1, 2), ('\u2248', '\u2248', 1, 2), ('\u224c', '\u224c', 1, 2),
-        ('\u2252', '\u2252', 1, 2), ('\u2260', '\u2261', 1, 2), ('\u2264', '\u2267', 1, 2),
-        ('\u226a', '\u226b', 1, 2), ('\u226e', '\u226f', 1, 2), ('\u2282', '\u2283', 1, 2),
-        ('\u2286', '\u2287', 1, 2), ('\u2295', '\u2295', 1, 2), ('\u2299', '\u2299', 1, 2),
-        ('\u22a5', '\u22a5', 1, 2), ('\u22bf', '\u22bf', 1, 2), ('\u2312', '\u2312', 1, 2),
-        ('\u2329', '\u232a', 2, 2), ('\u2460', '\u24e9', 1, 2), ('\u24eb', '\u254b', 1, 2),
-        ('\u2550', '\u2573', 1, 2), ('\u2580', '\u258f', 1, 2), ('\u2592', '\u2595', 1, 2),
-        ('\u25a0', '\u25a1', 1, 2), ('\u25a3', '\u25a9', 1, 2), ('\u25b2', '\u25b3', 1, 2),
-        ('\u25b6', '\u25b7', 1, 2), ('\u25bc', '\u25bd', 1, 2), ('\u25c0', '\u25c1', 1, 2),
-        ('\u25c6', '\u25c8', 1, 2), ('\u25cb', '\u25cb', 1, 2), ('\u25ce', '\u25d1', 1, 2),
-        ('\u25e2', '\u25e5', 1, 2), ('\u25ef', '\u25ef', 1, 2), ('\u2605', '\u2606', 1, 2),
-        ('\u2609', '\u2609', 1, 2), ('\u260e', '\u260f', 1, 2), ('\u2614', '\u2615', 1, 2),
-        ('\u261c', '\u261c', 1, 2), ('\u261e', '\u261e', 1, 2), ('\u2640', '\u2640', 1, 2),
-        ('\u2642', '\u2642', 1, 2), ('\u2660', '\u2661', 1, 2), ('\u2663', '\u2665', 1, 2),
-        ('\u2667', '\u266a', 1, 2), ('\u266c', '\u266d', 1, 2), ('\u266f', '\u266f', 1, 2),
-        ('\u269e', '\u269f', 1, 2), ('\u26be', '\u26bf', 1, 2), ('\u26c4', '\u26cd', 1, 2),
-        ('\u26cf', '\u26e1', 1, 2), ('\u26e3', '\u26e3', 1, 2), ('\u26e8', '\u26ff', 1, 2),
-        ('\u273d', '\u273d', 1, 2), ('\u2757', '\u2757', 1, 2), ('\u2776', '\u277f', 1, 2),
-        ('\u2b55', '\u2b59', 1, 2), ('\u2cef', '\u2cf1', 0, 0), ('\u2d7f', '\u2d7f', 0, 0),
-        ('\u2de0', '\u2dff', 0, 0), ('\u2e80', '\u2e99', 2, 2), ('\u2e9b', '\u2ef3', 2, 2),
-        ('\u2f00', '\u2fd5', 2, 2), ('\u2ff0', '\u2ffb', 2, 2), ('\u3000', '\u3029', 2, 2),
-        ('\u302a', '\u302d', 0, 0), ('\u302e', '\u303e', 2, 2), ('\u3041', '\u3096', 2, 2),
-        ('\u3099', '\u309a', 0, 0), ('\u309b', '\u30ff', 2, 2), ('\u3105', '\u312d', 2, 2),
-        ('\u3131', '\u318e', 2, 2), ('\u3190', '\u31ba', 2, 2), ('\u31c0', '\u31e3', 2, 2),
-        ('\u31f0', '\u321e', 2, 2), ('\u3220', '\u3247', 2, 2), ('\u3248', '\u324f', 1, 2),
-        ('\u3250', '\u32fe', 2, 2), ('\u3300', '\u4dbf', 2, 2), ('\u4e00', '\ua48c', 2, 2),
-        ('\ua490', '\ua4c6', 2, 2), ('\ua66f', '\ua672', 0, 0), ('\ua674', '\ua67d', 0, 0),
-        ('\ua69f', '\ua69f', 0, 0), ('\ua6f0', '\ua6f1', 0, 0), ('\ua802', '\ua802', 0, 0),
-        ('\ua806', '\ua806', 0, 0), ('\ua80b', '\ua80b', 0, 0), ('\ua825', '\ua826', 0, 0),
-        ('\ua8c4', '\ua8c4', 0, 0), ('\ua8e0', '\ua8f1', 0, 0), ('\ua926', '\ua92d', 0, 0),
-        ('\ua947', '\ua951', 0, 0), ('\ua960', '\ua97c', 2, 2), ('\ua980', '\ua982', 0, 0),
-        ('\ua9b3', '\ua9b3', 0, 0), ('\ua9b6', '\ua9b9', 0, 0), ('\ua9bc', '\ua9bc', 0, 0),
-        ('\ua9e5', '\ua9e5', 0, 0), ('\uaa29', '\uaa2e', 0, 0), ('\uaa31', '\uaa32', 0, 0),
-        ('\uaa35', '\uaa36', 0, 0), ('\uaa43', '\uaa43', 0, 0), ('\uaa4c', '\uaa4c', 0, 0),
-        ('\uaa7c', '\uaa7c', 0, 0), ('\uaab0', '\uaab0', 0, 0), ('\uaab2', '\uaab4', 0, 0),
-        ('\uaab7', '\uaab8', 0, 0), ('\uaabe', '\uaabf', 0, 0), ('\uaac1', '\uaac1', 0, 0),
-        ('\uaaec', '\uaaed', 0, 0), ('\uaaf6', '\uaaf6', 0, 0), ('\uabe5', '\uabe5', 0, 0),
-        ('\uabe8', '\uabe8', 0, 0), ('\uabed', '\uabed', 0, 0), ('\uac00', '\ud7a3', 2, 2),
-        ('\ue000', '\uf8ff', 1, 2), ('\uf900', '\ufaff', 2, 2), ('\ufb1e', '\ufb1e', 0, 0),
-        ('\ufe00', '\ufe0f', 0, 0), ('\ufe10', '\ufe19', 2, 2), ('\ufe20', '\ufe2d', 0, 0),
-        ('\ufe30', '\ufe52', 2, 2), ('\ufe54', '\ufe66', 2, 2), ('\ufe68', '\ufe6b', 2, 2),
-        ('\ufeff', '\ufeff', 0, 0), ('\uff01', '\uff60', 2, 2), ('\uffe0', '\uffe6', 2, 2),
-        ('\ufff9', '\ufffb', 0, 0), ('\ufffd', '\ufffd', 1, 2), ('\U000101fd', '\U000101fd', 0, 0),
-        ('\U000102e0', '\U000102e0', 0, 0), ('\U00010376', '\U0001037a', 0, 0), ('\U00010a01',
-        '\U00010a03', 0, 0), ('\U00010a05', '\U00010a06', 0, 0), ('\U00010a0c', '\U00010a0f', 0, 0),
-        ('\U00010a38', '\U00010a3a', 0, 0), ('\U00010a3f', '\U00010a3f', 0, 0), ('\U00010ae5',
-        '\U00010ae6', 0, 0), ('\U00011001', '\U00011001', 0, 0), ('\U00011038', '\U00011046', 0, 0),
-        ('\U0001107f', '\U00011081', 0, 0), ('\U000110b3', '\U000110b6', 0, 0), ('\U000110b9',
-        '\U000110ba', 0, 0), ('\U000110bd', '\U000110bd', 0, 0), ('\U00011100', '\U00011102', 0, 0),
-        ('\U00011127', '\U0001112b', 0, 0), ('\U0001112d', '\U00011134', 0, 0), ('\U00011173',
-        '\U00011173', 0, 0), ('\U00011180', '\U00011181', 0, 0), ('\U000111b6', '\U000111be', 0, 0),
-        ('\U0001122f', '\U00011231', 0, 0), ('\U00011234', '\U00011234', 0, 0), ('\U00011236',
-        '\U00011237', 0, 0), ('\U000112df', '\U000112df', 0, 0), ('\U000112e3', '\U000112ea', 0, 0),
-        ('\U00011301', '\U00011301', 0, 0), ('\U0001133c', '\U0001133c', 0, 0), ('\U00011340',
-        '\U00011340', 0, 0), ('\U00011366', '\U0001136c', 0, 0), ('\U00011370', '\U00011374', 0, 0),
-        ('\U000114b3', '\U000114b8', 0, 0), ('\U000114ba', '\U000114ba', 0, 0), ('\U000114bf',
-        '\U000114c0', 0, 0), ('\U000114c2', '\U000114c3', 0, 0), ('\U000115b2', '\U000115b5', 0, 0),
-        ('\U000115bc', '\U000115bd', 0, 0), ('\U000115bf', '\U000115c0', 0, 0), ('\U00011633',
-        '\U0001163a', 0, 0), ('\U0001163d', '\U0001163d', 0, 0), ('\U0001163f', '\U00011640', 0, 0),
-        ('\U000116ab', '\U000116ab', 0, 0), ('\U000116ad', '\U000116ad', 0, 0), ('\U000116b0',
-        '\U000116b5', 0, 0), ('\U000116b7', '\U000116b7', 0, 0), ('\U00016af0', '\U00016af4', 0, 0),
-        ('\U00016b30', '\U00016b36', 0, 0), ('\U00016f8f', '\U00016f92', 0, 0), ('\U0001b000',
-        '\U0001b001', 2, 2), ('\U0001bc9d', '\U0001bc9e', 0, 0), ('\U0001bca0', '\U0001bca3', 0, 0),
-        ('\U0001d167', '\U0001d169', 0, 0), ('\U0001d173', '\U0001d182', 0, 0), ('\U0001d185',
-        '\U0001d18b', 0, 0), ('\U0001d1aa', '\U0001d1ad', 0, 0), ('\U0001d242', '\U0001d244', 0, 0),
-        ('\U0001e8d0', '\U0001e8d6', 0, 0), ('\U0001f100', '\U0001f10a', 1, 2), ('\U0001f110',
-        '\U0001f12d', 1, 2), ('\U0001f130', '\U0001f169', 1, 2), ('\U0001f170', '\U0001f19a', 1, 2),
-        ('\U0001f200', '\U0001f202', 2, 2), ('\U0001f210', '\U0001f23a', 2, 2), ('\U0001f240',
-        '\U0001f248', 2, 2), ('\U0001f250', '\U0001f251', 2, 2), ('\U00020000', '\U0002fffd', 2, 2),
-        ('\U00030000', '\U0003fffd', 2, 2), ('\U000e0001', '\U000e0001', 0, 0), ('\U000e0020',
-        '\U000e007f', 0, 0), ('\U000e0100', '\U000e01ef', 0, 0), ('\U000f0000', '\U000ffffd', 1, 2),
-        ('\U00100000', '\U0010fffd', 1, 2)
+        ('\u{a1}', '\u{a1}', 1, 2), ('\u{a4}', '\u{a4}', 1, 2), ('\u{a7}', '\u{a8}', 1, 2),
+        ('\u{aa}', '\u{aa}', 1, 2), ('\u{ae}', '\u{ae}', 1, 2), ('\u{b0}', '\u{b4}', 1, 2),
+        ('\u{b6}', '\u{ba}', 1, 2), ('\u{bc}', '\u{bf}', 1, 2), ('\u{c6}', '\u{c6}', 1, 2),
+        ('\u{d0}', '\u{d0}', 1, 2), ('\u{d7}', '\u{d8}', 1, 2), ('\u{de}', '\u{e1}', 1, 2),
+        ('\u{e6}', '\u{e6}', 1, 2), ('\u{e8}', '\u{ea}', 1, 2), ('\u{ec}', '\u{ed}', 1, 2),
+        ('\u{f0}', '\u{f0}', 1, 2), ('\u{f2}', '\u{f3}', 1, 2), ('\u{f7}', '\u{fa}', 1, 2),
+        ('\u{fc}', '\u{fc}', 1, 2), ('\u{fe}', '\u{fe}', 1, 2), ('\u{101}', '\u{101}', 1, 2),
+        ('\u{111}', '\u{111}', 1, 2), ('\u{113}', '\u{113}', 1, 2), ('\u{11b}', '\u{11b}', 1, 2),
+        ('\u{126}', '\u{127}', 1, 2), ('\u{12b}', '\u{12b}', 1, 2), ('\u{131}', '\u{133}', 1, 2),
+        ('\u{138}', '\u{138}', 1, 2), ('\u{13f}', '\u{142}', 1, 2), ('\u{144}', '\u{144}', 1, 2),
+        ('\u{148}', '\u{14b}', 1, 2), ('\u{14d}', '\u{14d}', 1, 2), ('\u{152}', '\u{153}', 1, 2),
+        ('\u{166}', '\u{167}', 1, 2), ('\u{16b}', '\u{16b}', 1, 2), ('\u{1ce}', '\u{1ce}', 1, 2),
+        ('\u{1d0}', '\u{1d0}', 1, 2), ('\u{1d2}', '\u{1d2}', 1, 2), ('\u{1d4}', '\u{1d4}', 1, 2),
+        ('\u{1d6}', '\u{1d6}', 1, 2), ('\u{1d8}', '\u{1d8}', 1, 2), ('\u{1da}', '\u{1da}', 1, 2),
+        ('\u{1dc}', '\u{1dc}', 1, 2), ('\u{251}', '\u{251}', 1, 2), ('\u{261}', '\u{261}', 1, 2),
+        ('\u{2c4}', '\u{2c4}', 1, 2), ('\u{2c7}', '\u{2c7}', 1, 2), ('\u{2c9}', '\u{2cb}', 1, 2),
+        ('\u{2cd}', '\u{2cd}', 1, 2), ('\u{2d0}', '\u{2d0}', 1, 2), ('\u{2d8}', '\u{2db}', 1, 2),
+        ('\u{2dd}', '\u{2dd}', 1, 2), ('\u{2df}', '\u{2df}', 1, 2), ('\u{300}', '\u{36f}', 0, 0),
+        ('\u{391}', '\u{3a1}', 1, 2), ('\u{3a3}', '\u{3a9}', 1, 2), ('\u{3b1}', '\u{3c1}', 1, 2),
+        ('\u{3c3}', '\u{3c9}', 1, 2), ('\u{401}', '\u{401}', 1, 2), ('\u{410}', '\u{44f}', 1, 2),
+        ('\u{451}', '\u{451}', 1, 2), ('\u{483}', '\u{489}', 0, 0), ('\u{591}', '\u{5bd}', 0, 0),
+        ('\u{5bf}', '\u{5bf}', 0, 0), ('\u{5c1}', '\u{5c2}', 0, 0), ('\u{5c4}', '\u{5c5}', 0, 0),
+        ('\u{5c7}', '\u{5c7}', 0, 0), ('\u{600}', '\u{605}', 0, 0), ('\u{610}', '\u{61a}', 0, 0),
+        ('\u{61c}', '\u{61c}', 0, 0), ('\u{64b}', '\u{65f}', 0, 0), ('\u{670}', '\u{670}', 0, 0),
+        ('\u{6d6}', '\u{6dd}', 0, 0), ('\u{6df}', '\u{6e4}', 0, 0), ('\u{6e7}', '\u{6e8}', 0, 0),
+        ('\u{6ea}', '\u{6ed}', 0, 0), ('\u{70f}', '\u{70f}', 0, 0), ('\u{711}', '\u{711}', 0, 0),
+        ('\u{730}', '\u{74a}', 0, 0), ('\u{7a6}', '\u{7b0}', 0, 0), ('\u{7eb}', '\u{7f3}', 0, 0),
+        ('\u{816}', '\u{819}', 0, 0), ('\u{81b}', '\u{823}', 0, 0), ('\u{825}', '\u{827}', 0, 0),
+        ('\u{829}', '\u{82d}', 0, 0), ('\u{859}', '\u{85b}', 0, 0), ('\u{8e4}', '\u{902}', 0, 0),
+        ('\u{93a}', '\u{93a}', 0, 0), ('\u{93c}', '\u{93c}', 0, 0), ('\u{941}', '\u{948}', 0, 0),
+        ('\u{94d}', '\u{94d}', 0, 0), ('\u{951}', '\u{957}', 0, 0), ('\u{962}', '\u{963}', 0, 0),
+        ('\u{981}', '\u{981}', 0, 0), ('\u{9bc}', '\u{9bc}', 0, 0), ('\u{9c1}', '\u{9c4}', 0, 0),
+        ('\u{9cd}', '\u{9cd}', 0, 0), ('\u{9e2}', '\u{9e3}', 0, 0), ('\u{a01}', '\u{a02}', 0, 0),
+        ('\u{a3c}', '\u{a3c}', 0, 0), ('\u{a41}', '\u{a42}', 0, 0), ('\u{a47}', '\u{a48}', 0, 0),
+        ('\u{a4b}', '\u{a4d}', 0, 0), ('\u{a51}', '\u{a51}', 0, 0), ('\u{a70}', '\u{a71}', 0, 0),
+        ('\u{a75}', '\u{a75}', 0, 0), ('\u{a81}', '\u{a82}', 0, 0), ('\u{abc}', '\u{abc}', 0, 0),
+        ('\u{ac1}', '\u{ac5}', 0, 0), ('\u{ac7}', '\u{ac8}', 0, 0), ('\u{acd}', '\u{acd}', 0, 0),
+        ('\u{ae2}', '\u{ae3}', 0, 0), ('\u{b01}', '\u{b01}', 0, 0), ('\u{b3c}', '\u{b3c}', 0, 0),
+        ('\u{b3f}', '\u{b3f}', 0, 0), ('\u{b41}', '\u{b44}', 0, 0), ('\u{b4d}', '\u{b4d}', 0, 0),
+        ('\u{b56}', '\u{b56}', 0, 0), ('\u{b62}', '\u{b63}', 0, 0), ('\u{b82}', '\u{b82}', 0, 0),
+        ('\u{bc0}', '\u{bc0}', 0, 0), ('\u{bcd}', '\u{bcd}', 0, 0), ('\u{c00}', '\u{c00}', 0, 0),
+        ('\u{c3e}', '\u{c40}', 0, 0), ('\u{c46}', '\u{c48}', 0, 0), ('\u{c4a}', '\u{c4d}', 0, 0),
+        ('\u{c55}', '\u{c56}', 0, 0), ('\u{c62}', '\u{c63}', 0, 0), ('\u{c81}', '\u{c81}', 0, 0),
+        ('\u{cbc}', '\u{cbc}', 0, 0), ('\u{cbf}', '\u{cbf}', 0, 0), ('\u{cc6}', '\u{cc6}', 0, 0),
+        ('\u{ccc}', '\u{ccd}', 0, 0), ('\u{ce2}', '\u{ce3}', 0, 0), ('\u{d01}', '\u{d01}', 0, 0),
+        ('\u{d41}', '\u{d44}', 0, 0), ('\u{d4d}', '\u{d4d}', 0, 0), ('\u{d62}', '\u{d63}', 0, 0),
+        ('\u{dca}', '\u{dca}', 0, 0), ('\u{dd2}', '\u{dd4}', 0, 0), ('\u{dd6}', '\u{dd6}', 0, 0),
+        ('\u{e31}', '\u{e31}', 0, 0), ('\u{e34}', '\u{e3a}', 0, 0), ('\u{e47}', '\u{e4e}', 0, 0),
+        ('\u{eb1}', '\u{eb1}', 0, 0), ('\u{eb4}', '\u{eb9}', 0, 0), ('\u{ebb}', '\u{ebc}', 0, 0),
+        ('\u{ec8}', '\u{ecd}', 0, 0), ('\u{f18}', '\u{f19}', 0, 0), ('\u{f35}', '\u{f35}', 0, 0),
+        ('\u{f37}', '\u{f37}', 0, 0), ('\u{f39}', '\u{f39}', 0, 0), ('\u{f71}', '\u{f7e}', 0, 0),
+        ('\u{f80}', '\u{f84}', 0, 0), ('\u{f86}', '\u{f87}', 0, 0), ('\u{f8d}', '\u{f97}', 0, 0),
+        ('\u{f99}', '\u{fbc}', 0, 0), ('\u{fc6}', '\u{fc6}', 0, 0), ('\u{102d}', '\u{1030}', 0, 0),
+        ('\u{1032}', '\u{1037}', 0, 0), ('\u{1039}', '\u{103a}', 0, 0), ('\u{103d}', '\u{103e}', 0,
+        0), ('\u{1058}', '\u{1059}', 0, 0), ('\u{105e}', '\u{1060}', 0, 0), ('\u{1071}', '\u{1074}',
+        0, 0), ('\u{1082}', '\u{1082}', 0, 0), ('\u{1085}', '\u{1086}', 0, 0), ('\u{108d}',
+        '\u{108d}', 0, 0), ('\u{109d}', '\u{109d}', 0, 0), ('\u{1100}', '\u{115f}', 2, 2),
+        ('\u{1160}', '\u{11ff}', 0, 0), ('\u{135d}', '\u{135f}', 0, 0), ('\u{1712}', '\u{1714}', 0,
+        0), ('\u{1732}', '\u{1734}', 0, 0), ('\u{1752}', '\u{1753}', 0, 0), ('\u{1772}', '\u{1773}',
+        0, 0), ('\u{17b4}', '\u{17b5}', 0, 0), ('\u{17b7}', '\u{17bd}', 0, 0), ('\u{17c6}',
+        '\u{17c6}', 0, 0), ('\u{17c9}', '\u{17d3}', 0, 0), ('\u{17dd}', '\u{17dd}', 0, 0),
+        ('\u{180b}', '\u{180e}', 0, 0), ('\u{18a9}', '\u{18a9}', 0, 0), ('\u{1920}', '\u{1922}', 0,
+        0), ('\u{1927}', '\u{1928}', 0, 0), ('\u{1932}', '\u{1932}', 0, 0), ('\u{1939}', '\u{193b}',
+        0, 0), ('\u{1a17}', '\u{1a18}', 0, 0), ('\u{1a1b}', '\u{1a1b}', 0, 0), ('\u{1a56}',
+        '\u{1a56}', 0, 0), ('\u{1a58}', '\u{1a5e}', 0, 0), ('\u{1a60}', '\u{1a60}', 0, 0),
+        ('\u{1a62}', '\u{1a62}', 0, 0), ('\u{1a65}', '\u{1a6c}', 0, 0), ('\u{1a73}', '\u{1a7c}', 0,
+        0), ('\u{1a7f}', '\u{1a7f}', 0, 0), ('\u{1ab0}', '\u{1abe}', 0, 0), ('\u{1b00}', '\u{1b03}',
+        0, 0), ('\u{1b34}', '\u{1b34}', 0, 0), ('\u{1b36}', '\u{1b3a}', 0, 0), ('\u{1b3c}',
+        '\u{1b3c}', 0, 0), ('\u{1b42}', '\u{1b42}', 0, 0), ('\u{1b6b}', '\u{1b73}', 0, 0),
+        ('\u{1b80}', '\u{1b81}', 0, 0), ('\u{1ba2}', '\u{1ba5}', 0, 0), ('\u{1ba8}', '\u{1ba9}', 0,
+        0), ('\u{1bab}', '\u{1bad}', 0, 0), ('\u{1be6}', '\u{1be6}', 0, 0), ('\u{1be8}', '\u{1be9}',
+        0, 0), ('\u{1bed}', '\u{1bed}', 0, 0), ('\u{1bef}', '\u{1bf1}', 0, 0), ('\u{1c2c}',
+        '\u{1c33}', 0, 0), ('\u{1c36}', '\u{1c37}', 0, 0), ('\u{1cd0}', '\u{1cd2}', 0, 0),
+        ('\u{1cd4}', '\u{1ce0}', 0, 0), ('\u{1ce2}', '\u{1ce8}', 0, 0), ('\u{1ced}', '\u{1ced}', 0,
+        0), ('\u{1cf4}', '\u{1cf4}', 0, 0), ('\u{1cf8}', '\u{1cf9}', 0, 0), ('\u{1dc0}', '\u{1df5}',
+        0, 0), ('\u{1dfc}', '\u{1dff}', 0, 0), ('\u{200b}', '\u{200f}', 0, 0), ('\u{2010}',
+        '\u{2010}', 1, 2), ('\u{2013}', '\u{2016}', 1, 2), ('\u{2018}', '\u{2019}', 1, 2),
+        ('\u{201c}', '\u{201d}', 1, 2), ('\u{2020}', '\u{2022}', 1, 2), ('\u{2024}', '\u{2027}', 1,
+        2), ('\u{202a}', '\u{202e}', 0, 0), ('\u{2030}', '\u{2030}', 1, 2), ('\u{2032}', '\u{2033}',
+        1, 2), ('\u{2035}', '\u{2035}', 1, 2), ('\u{203b}', '\u{203b}', 1, 2), ('\u{203e}',
+        '\u{203e}', 1, 2), ('\u{2060}', '\u{2064}', 0, 0), ('\u{2066}', '\u{206f}', 0, 0),
+        ('\u{2074}', '\u{2074}', 1, 2), ('\u{207f}', '\u{207f}', 1, 2), ('\u{2081}', '\u{2084}', 1,
+        2), ('\u{20ac}', '\u{20ac}', 1, 2), ('\u{20d0}', '\u{20f0}', 0, 0), ('\u{2103}', '\u{2103}',
+        1, 2), ('\u{2105}', '\u{2105}', 1, 2), ('\u{2109}', '\u{2109}', 1, 2), ('\u{2113}',
+        '\u{2113}', 1, 2), ('\u{2116}', '\u{2116}', 1, 2), ('\u{2121}', '\u{2122}', 1, 2),
+        ('\u{2126}', '\u{2126}', 1, 2), ('\u{212b}', '\u{212b}', 1, 2), ('\u{2153}', '\u{2154}', 1,
+        2), ('\u{215b}', '\u{215e}', 1, 2), ('\u{2160}', '\u{216b}', 1, 2), ('\u{2170}', '\u{2179}',
+        1, 2), ('\u{2189}', '\u{2189}', 1, 2), ('\u{2190}', '\u{2199}', 1, 2), ('\u{21b8}',
+        '\u{21b9}', 1, 2), ('\u{21d2}', '\u{21d2}', 1, 2), ('\u{21d4}', '\u{21d4}', 1, 2),
+        ('\u{21e7}', '\u{21e7}', 1, 2), ('\u{2200}', '\u{2200}', 1, 2), ('\u{2202}', '\u{2203}', 1,
+        2), ('\u{2207}', '\u{2208}', 1, 2), ('\u{220b}', '\u{220b}', 1, 2), ('\u{220f}', '\u{220f}',
+        1, 2), ('\u{2211}', '\u{2211}', 1, 2), ('\u{2215}', '\u{2215}', 1, 2), ('\u{221a}',
+        '\u{221a}', 1, 2), ('\u{221d}', '\u{2220}', 1, 2), ('\u{2223}', '\u{2223}', 1, 2),
+        ('\u{2225}', '\u{2225}', 1, 2), ('\u{2227}', '\u{222c}', 1, 2), ('\u{222e}', '\u{222e}', 1,
+        2), ('\u{2234}', '\u{2237}', 1, 2), ('\u{223c}', '\u{223d}', 1, 2), ('\u{2248}', '\u{2248}',
+        1, 2), ('\u{224c}', '\u{224c}', 1, 2), ('\u{2252}', '\u{2252}', 1, 2), ('\u{2260}',
+        '\u{2261}', 1, 2), ('\u{2264}', '\u{2267}', 1, 2), ('\u{226a}', '\u{226b}', 1, 2),
+        ('\u{226e}', '\u{226f}', 1, 2), ('\u{2282}', '\u{2283}', 1, 2), ('\u{2286}', '\u{2287}', 1,
+        2), ('\u{2295}', '\u{2295}', 1, 2), ('\u{2299}', '\u{2299}', 1, 2), ('\u{22a5}', '\u{22a5}',
+        1, 2), ('\u{22bf}', '\u{22bf}', 1, 2), ('\u{2312}', '\u{2312}', 1, 2), ('\u{2329}',
+        '\u{232a}', 2, 2), ('\u{2460}', '\u{24e9}', 1, 2), ('\u{24eb}', '\u{254b}', 1, 2),
+        ('\u{2550}', '\u{2573}', 1, 2), ('\u{2580}', '\u{258f}', 1, 2), ('\u{2592}', '\u{2595}', 1,
+        2), ('\u{25a0}', '\u{25a1}', 1, 2), ('\u{25a3}', '\u{25a9}', 1, 2), ('\u{25b2}', '\u{25b3}',
+        1, 2), ('\u{25b6}', '\u{25b7}', 1, 2), ('\u{25bc}', '\u{25bd}', 1, 2), ('\u{25c0}',
+        '\u{25c1}', 1, 2), ('\u{25c6}', '\u{25c8}', 1, 2), ('\u{25cb}', '\u{25cb}', 1, 2),
+        ('\u{25ce}', '\u{25d1}', 1, 2), ('\u{25e2}', '\u{25e5}', 1, 2), ('\u{25ef}', '\u{25ef}', 1,
+        2), ('\u{2605}', '\u{2606}', 1, 2), ('\u{2609}', '\u{2609}', 1, 2), ('\u{260e}', '\u{260f}',
+        1, 2), ('\u{2614}', '\u{2615}', 1, 2), ('\u{261c}', '\u{261c}', 1, 2), ('\u{261e}',
+        '\u{261e}', 1, 2), ('\u{2640}', '\u{2640}', 1, 2), ('\u{2642}', '\u{2642}', 1, 2),
+        ('\u{2660}', '\u{2661}', 1, 2), ('\u{2663}', '\u{2665}', 1, 2), ('\u{2667}', '\u{266a}', 1,
+        2), ('\u{266c}', '\u{266d}', 1, 2), ('\u{266f}', '\u{266f}', 1, 2), ('\u{269e}', '\u{269f}',
+        1, 2), ('\u{26be}', '\u{26bf}', 1, 2), ('\u{26c4}', '\u{26cd}', 1, 2), ('\u{26cf}',
+        '\u{26e1}', 1, 2), ('\u{26e3}', '\u{26e3}', 1, 2), ('\u{26e8}', '\u{26ff}', 1, 2),
+        ('\u{273d}', '\u{273d}', 1, 2), ('\u{2757}', '\u{2757}', 1, 2), ('\u{2776}', '\u{277f}', 1,
+        2), ('\u{2b55}', '\u{2b59}', 1, 2), ('\u{2cef}', '\u{2cf1}', 0, 0), ('\u{2d7f}', '\u{2d7f}',
+        0, 0), ('\u{2de0}', '\u{2dff}', 0, 0), ('\u{2e80}', '\u{2e99}', 2, 2), ('\u{2e9b}',
+        '\u{2ef3}', 2, 2), ('\u{2f00}', '\u{2fd5}', 2, 2), ('\u{2ff0}', '\u{2ffb}', 2, 2),
+        ('\u{3000}', '\u{3029}', 2, 2), ('\u{302a}', '\u{302d}', 0, 0), ('\u{302e}', '\u{303e}', 2,
+        2), ('\u{3041}', '\u{3096}', 2, 2), ('\u{3099}', '\u{309a}', 0, 0), ('\u{309b}', '\u{30ff}',
+        2, 2), ('\u{3105}', '\u{312d}', 2, 2), ('\u{3131}', '\u{318e}', 2, 2), ('\u{3190}',
+        '\u{31ba}', 2, 2), ('\u{31c0}', '\u{31e3}', 2, 2), ('\u{31f0}', '\u{321e}', 2, 2),
+        ('\u{3220}', '\u{3247}', 2, 2), ('\u{3248}', '\u{324f}', 1, 2), ('\u{3250}', '\u{32fe}', 2,
+        2), ('\u{3300}', '\u{4dbf}', 2, 2), ('\u{4e00}', '\u{a48c}', 2, 2), ('\u{a490}', '\u{a4c6}',
+        2, 2), ('\u{a66f}', '\u{a672}', 0, 0), ('\u{a674}', '\u{a67d}', 0, 0), ('\u{a69f}',
+        '\u{a69f}', 0, 0), ('\u{a6f0}', '\u{a6f1}', 0, 0), ('\u{a802}', '\u{a802}', 0, 0),
+        ('\u{a806}', '\u{a806}', 0, 0), ('\u{a80b}', '\u{a80b}', 0, 0), ('\u{a825}', '\u{a826}', 0,
+        0), ('\u{a8c4}', '\u{a8c4}', 0, 0), ('\u{a8e0}', '\u{a8f1}', 0, 0), ('\u{a926}', '\u{a92d}',
+        0, 0), ('\u{a947}', '\u{a951}', 0, 0), ('\u{a960}', '\u{a97c}', 2, 2), ('\u{a980}',
+        '\u{a982}', 0, 0), ('\u{a9b3}', '\u{a9b3}', 0, 0), ('\u{a9b6}', '\u{a9b9}', 0, 0),
+        ('\u{a9bc}', '\u{a9bc}', 0, 0), ('\u{a9e5}', '\u{a9e5}', 0, 0), ('\u{aa29}', '\u{aa2e}', 0,
+        0), ('\u{aa31}', '\u{aa32}', 0, 0), ('\u{aa35}', '\u{aa36}', 0, 0), ('\u{aa43}', '\u{aa43}',
+        0, 0), ('\u{aa4c}', '\u{aa4c}', 0, 0), ('\u{aa7c}', '\u{aa7c}', 0, 0), ('\u{aab0}',
+        '\u{aab0}', 0, 0), ('\u{aab2}', '\u{aab4}', 0, 0), ('\u{aab7}', '\u{aab8}', 0, 0),
+        ('\u{aabe}', '\u{aabf}', 0, 0), ('\u{aac1}', '\u{aac1}', 0, 0), ('\u{aaec}', '\u{aaed}', 0,
+        0), ('\u{aaf6}', '\u{aaf6}', 0, 0), ('\u{abe5}', '\u{abe5}', 0, 0), ('\u{abe8}', '\u{abe8}',
+        0, 0), ('\u{abed}', '\u{abed}', 0, 0), ('\u{ac00}', '\u{d7a3}', 2, 2), ('\u{e000}',
+        '\u{f8ff}', 1, 2), ('\u{f900}', '\u{faff}', 2, 2), ('\u{fb1e}', '\u{fb1e}', 0, 0),
+        ('\u{fe00}', '\u{fe0f}', 0, 0), ('\u{fe10}', '\u{fe19}', 2, 2), ('\u{fe20}', '\u{fe2d}', 0,
+        0), ('\u{fe30}', '\u{fe52}', 2, 2), ('\u{fe54}', '\u{fe66}', 2, 2), ('\u{fe68}', '\u{fe6b}',
+        2, 2), ('\u{feff}', '\u{feff}', 0, 0), ('\u{ff01}', '\u{ff60}', 2, 2), ('\u{ffe0}',
+        '\u{ffe6}', 2, 2), ('\u{fff9}', '\u{fffb}', 0, 0), ('\u{fffd}', '\u{fffd}', 1, 2),
+        ('\u{101fd}', '\u{101fd}', 0, 0), ('\u{102e0}', '\u{102e0}', 0, 0), ('\u{10376}',
+        '\u{1037a}', 0, 0), ('\u{10a01}', '\u{10a03}', 0, 0), ('\u{10a05}', '\u{10a06}', 0, 0),
+        ('\u{10a0c}', '\u{10a0f}', 0, 0), ('\u{10a38}', '\u{10a3a}', 0, 0), ('\u{10a3f}',
+        '\u{10a3f}', 0, 0), ('\u{10ae5}', '\u{10ae6}', 0, 0), ('\u{11001}', '\u{11001}', 0, 0),
+        ('\u{11038}', '\u{11046}', 0, 0), ('\u{1107f}', '\u{11081}', 0, 0), ('\u{110b3}',
+        '\u{110b6}', 0, 0), ('\u{110b9}', '\u{110ba}', 0, 0), ('\u{110bd}', '\u{110bd}', 0, 0),
+        ('\u{11100}', '\u{11102}', 0, 0), ('\u{11127}', '\u{1112b}', 0, 0), ('\u{1112d}',
+        '\u{11134}', 0, 0), ('\u{11173}', '\u{11173}', 0, 0), ('\u{11180}', '\u{11181}', 0, 0),
+        ('\u{111b6}', '\u{111be}', 0, 0), ('\u{1122f}', '\u{11231}', 0, 0), ('\u{11234}',
+        '\u{11234}', 0, 0), ('\u{11236}', '\u{11237}', 0, 0), ('\u{112df}', '\u{112df}', 0, 0),
+        ('\u{112e3}', '\u{112ea}', 0, 0), ('\u{11301}', '\u{11301}', 0, 0), ('\u{1133c}',
+        '\u{1133c}', 0, 0), ('\u{11340}', '\u{11340}', 0, 0), ('\u{11366}', '\u{1136c}', 0, 0),
+        ('\u{11370}', '\u{11374}', 0, 0), ('\u{114b3}', '\u{114b8}', 0, 0), ('\u{114ba}',
+        '\u{114ba}', 0, 0), ('\u{114bf}', '\u{114c0}', 0, 0), ('\u{114c2}', '\u{114c3}', 0, 0),
+        ('\u{115b2}', '\u{115b5}', 0, 0), ('\u{115bc}', '\u{115bd}', 0, 0), ('\u{115bf}',
+        '\u{115c0}', 0, 0), ('\u{11633}', '\u{1163a}', 0, 0), ('\u{1163d}', '\u{1163d}', 0, 0),
+        ('\u{1163f}', '\u{11640}', 0, 0), ('\u{116ab}', '\u{116ab}', 0, 0), ('\u{116ad}',
+        '\u{116ad}', 0, 0), ('\u{116b0}', '\u{116b5}', 0, 0), ('\u{116b7}', '\u{116b7}', 0, 0),
+        ('\u{16af0}', '\u{16af4}', 0, 0), ('\u{16b30}', '\u{16b36}', 0, 0), ('\u{16f8f}',
+        '\u{16f92}', 0, 0), ('\u{1b000}', '\u{1b001}', 2, 2), ('\u{1bc9d}', '\u{1bc9e}', 0, 0),
+        ('\u{1bca0}', '\u{1bca3}', 0, 0), ('\u{1d167}', '\u{1d169}', 0, 0), ('\u{1d173}',
+        '\u{1d182}', 0, 0), ('\u{1d185}', '\u{1d18b}', 0, 0), ('\u{1d1aa}', '\u{1d1ad}', 0, 0),
+        ('\u{1d242}', '\u{1d244}', 0, 0), ('\u{1e8d0}', '\u{1e8d6}', 0, 0), ('\u{1f100}',
+        '\u{1f10a}', 1, 2), ('\u{1f110}', '\u{1f12d}', 1, 2), ('\u{1f130}', '\u{1f169}', 1, 2),
+        ('\u{1f170}', '\u{1f19a}', 1, 2), ('\u{1f200}', '\u{1f202}', 2, 2), ('\u{1f210}',
+        '\u{1f23a}', 2, 2), ('\u{1f240}', '\u{1f248}', 2, 2), ('\u{1f250}', '\u{1f251}', 2, 2),
+        ('\u{20000}', '\u{2fffd}', 2, 2), ('\u{30000}', '\u{3fffd}', 2, 2), ('\u{e0001}',
+        '\u{e0001}', 0, 0), ('\u{e0020}', '\u{e007f}', 0, 0), ('\u{e0100}', '\u{e01ef}', 0, 0),
+        ('\u{f0000}', '\u{ffffd}', 1, 2), ('\u{100000}', '\u{10fffd}', 1, 2)
     ];
 
 }
 
 pub mod grapheme {
-    pub use self::GraphemeCat::*;
     use core::slice::SlicePrelude;
     use core::kinds::Copy;
+    pub use self::GraphemeCat::*;
     use core::slice;
 
     #[allow(non_camel_case_types)]
@@ -7178,461 +7843,504 @@ pub fn grapheme_category(c: char) -> GraphemeCat {
     }
 
     static grapheme_cat_table: &'static [(char, char, GraphemeCat)] = &[
-        ('\x00', '\x1f', GC_Control), ('\x7f', '\u009f', GC_Control), ('\u00ad', '\u00ad',
-        GC_Control), ('\u0300', '\u036f', GC_Extend), ('\u0483', '\u0487', GC_Extend), ('\u0488',
-        '\u0489', GC_Extend), ('\u0591', '\u05bd', GC_Extend), ('\u05bf', '\u05bf', GC_Extend),
-        ('\u05c1', '\u05c2', GC_Extend), ('\u05c4', '\u05c5', GC_Extend), ('\u05c7', '\u05c7',
-        GC_Extend), ('\u0600', '\u0605', GC_Control), ('\u0610', '\u061a', GC_Extend), ('\u061c',
-        '\u061c', GC_Control), ('\u064b', '\u065f', GC_Extend), ('\u0670', '\u0670', GC_Extend),
-        ('\u06d6', '\u06dc', GC_Extend), ('\u06dd', '\u06dd', GC_Control), ('\u06df', '\u06e4',
-        GC_Extend), ('\u06e7', '\u06e8', GC_Extend), ('\u06ea', '\u06ed', GC_Extend), ('\u070f',
-        '\u070f', GC_Control), ('\u0711', '\u0711', GC_Extend), ('\u0730', '\u074a', GC_Extend),
-        ('\u07a6', '\u07b0', GC_Extend), ('\u07eb', '\u07f3', GC_Extend), ('\u0816', '\u0819',
-        GC_Extend), ('\u081b', '\u0823', GC_Extend), ('\u0825', '\u0827', GC_Extend), ('\u0829',
-        '\u082d', GC_Extend), ('\u0859', '\u085b', GC_Extend), ('\u08e4', '\u0902', GC_Extend),
-        ('\u0903', '\u0903', GC_SpacingMark), ('\u093a', '\u093a', GC_Extend), ('\u093b', '\u093b',
-        GC_SpacingMark), ('\u093c', '\u093c', GC_Extend), ('\u093e', '\u0940', GC_SpacingMark),
-        ('\u0941', '\u0948', GC_Extend), ('\u0949', '\u094c', GC_SpacingMark), ('\u094d', '\u094d',
-        GC_Extend), ('\u094e', '\u094f', GC_SpacingMark), ('\u0951', '\u0957', GC_Extend),
-        ('\u0962', '\u0963', GC_Extend), ('\u0981', '\u0981', GC_Extend), ('\u0982', '\u0983',
-        GC_SpacingMark), ('\u09bc', '\u09bc', GC_Extend), ('\u09be', '\u09be', GC_Extend),
-        ('\u09bf', '\u09c0', GC_SpacingMark), ('\u09c1', '\u09c4', GC_Extend), ('\u09c7', '\u09c8',
-        GC_SpacingMark), ('\u09cb', '\u09cc', GC_SpacingMark), ('\u09cd', '\u09cd', GC_Extend),
-        ('\u09d7', '\u09d7', GC_Extend), ('\u09e2', '\u09e3', GC_Extend), ('\u0a01', '\u0a02',
-        GC_Extend), ('\u0a03', '\u0a03', GC_SpacingMark), ('\u0a3c', '\u0a3c', GC_Extend),
-        ('\u0a3e', '\u0a40', GC_SpacingMark), ('\u0a41', '\u0a42', GC_Extend), ('\u0a47', '\u0a48',
-        GC_Extend), ('\u0a4b', '\u0a4d', GC_Extend), ('\u0a51', '\u0a51', GC_Extend), ('\u0a70',
-        '\u0a71', GC_Extend), ('\u0a75', '\u0a75', GC_Extend), ('\u0a81', '\u0a82', GC_Extend),
-        ('\u0a83', '\u0a83', GC_SpacingMark), ('\u0abc', '\u0abc', GC_Extend), ('\u0abe', '\u0ac0',
-        GC_SpacingMark), ('\u0ac1', '\u0ac5', GC_Extend), ('\u0ac7', '\u0ac8', GC_Extend),
-        ('\u0ac9', '\u0ac9', GC_SpacingMark), ('\u0acb', '\u0acc', GC_SpacingMark), ('\u0acd',
-        '\u0acd', GC_Extend), ('\u0ae2', '\u0ae3', GC_Extend), ('\u0b01', '\u0b01', GC_Extend),
-        ('\u0b02', '\u0b03', GC_SpacingMark), ('\u0b3c', '\u0b3c', GC_Extend), ('\u0b3e', '\u0b3e',
-        GC_Extend), ('\u0b3f', '\u0b3f', GC_Extend), ('\u0b40', '\u0b40', GC_SpacingMark),
-        ('\u0b41', '\u0b44', GC_Extend), ('\u0b47', '\u0b48', GC_SpacingMark), ('\u0b4b', '\u0b4c',
-        GC_SpacingMark), ('\u0b4d', '\u0b4d', GC_Extend), ('\u0b56', '\u0b56', GC_Extend),
-        ('\u0b57', '\u0b57', GC_Extend), ('\u0b62', '\u0b63', GC_Extend), ('\u0b82', '\u0b82',
-        GC_Extend), ('\u0bbe', '\u0bbe', GC_Extend), ('\u0bbf', '\u0bbf', GC_SpacingMark),
-        ('\u0bc0', '\u0bc0', GC_Extend), ('\u0bc1', '\u0bc2', GC_SpacingMark), ('\u0bc6', '\u0bc8',
-        GC_SpacingMark), ('\u0bca', '\u0bcc', GC_SpacingMark), ('\u0bcd', '\u0bcd', GC_Extend),
-        ('\u0bd7', '\u0bd7', GC_Extend), ('\u0c00', '\u0c00', GC_Extend), ('\u0c01', '\u0c03',
-        GC_SpacingMark), ('\u0c3e', '\u0c40', GC_Extend), ('\u0c41', '\u0c44', GC_SpacingMark),
-        ('\u0c46', '\u0c48', GC_Extend), ('\u0c4a', '\u0c4d', GC_Extend), ('\u0c55', '\u0c56',
-        GC_Extend), ('\u0c62', '\u0c63', GC_Extend), ('\u0c81', '\u0c81', GC_Extend), ('\u0c82',
-        '\u0c83', GC_SpacingMark), ('\u0cbc', '\u0cbc', GC_Extend), ('\u0cbe', '\u0cbe',
-        GC_SpacingMark), ('\u0cbf', '\u0cbf', GC_Extend), ('\u0cc0', '\u0cc1', GC_SpacingMark),
-        ('\u0cc2', '\u0cc2', GC_Extend), ('\u0cc3', '\u0cc4', GC_SpacingMark), ('\u0cc6', '\u0cc6',
-        GC_Extend), ('\u0cc7', '\u0cc8', GC_SpacingMark), ('\u0cca', '\u0ccb', GC_SpacingMark),
-        ('\u0ccc', '\u0ccd', GC_Extend), ('\u0cd5', '\u0cd6', GC_Extend), ('\u0ce2', '\u0ce3',
-        GC_Extend), ('\u0d01', '\u0d01', GC_Extend), ('\u0d02', '\u0d03', GC_SpacingMark),
-        ('\u0d3e', '\u0d3e', GC_Extend), ('\u0d3f', '\u0d40', GC_SpacingMark), ('\u0d41', '\u0d44',
-        GC_Extend), ('\u0d46', '\u0d48', GC_SpacingMark), ('\u0d4a', '\u0d4c', GC_SpacingMark),
-        ('\u0d4d', '\u0d4d', GC_Extend), ('\u0d57', '\u0d57', GC_Extend), ('\u0d62', '\u0d63',
-        GC_Extend), ('\u0d82', '\u0d83', GC_SpacingMark), ('\u0dca', '\u0dca', GC_Extend),
-        ('\u0dcf', '\u0dcf', GC_Extend), ('\u0dd0', '\u0dd1', GC_SpacingMark), ('\u0dd2', '\u0dd4',
-        GC_Extend), ('\u0dd6', '\u0dd6', GC_Extend), ('\u0dd8', '\u0dde', GC_SpacingMark),
-        ('\u0ddf', '\u0ddf', GC_Extend), ('\u0df2', '\u0df3', GC_SpacingMark), ('\u0e31', '\u0e31',
-        GC_Extend), ('\u0e33', '\u0e33', GC_SpacingMark), ('\u0e34', '\u0e3a', GC_Extend),
-        ('\u0e47', '\u0e4e', GC_Extend), ('\u0eb1', '\u0eb1', GC_Extend), ('\u0eb3', '\u0eb3',
-        GC_SpacingMark), ('\u0eb4', '\u0eb9', GC_Extend), ('\u0ebb', '\u0ebc', GC_Extend),
-        ('\u0ec8', '\u0ecd', GC_Extend), ('\u0f18', '\u0f19', GC_Extend), ('\u0f35', '\u0f35',
-        GC_Extend), ('\u0f37', '\u0f37', GC_Extend), ('\u0f39', '\u0f39', GC_Extend), ('\u0f3e',
-        '\u0f3f', GC_SpacingMark), ('\u0f71', '\u0f7e', GC_Extend), ('\u0f7f', '\u0f7f',
-        GC_SpacingMark), ('\u0f80', '\u0f84', GC_Extend), ('\u0f86', '\u0f87', GC_Extend),
-        ('\u0f8d', '\u0f97', GC_Extend), ('\u0f99', '\u0fbc', GC_Extend), ('\u0fc6', '\u0fc6',
-        GC_Extend), ('\u102b', '\u102c', GC_SpacingMark), ('\u102d', '\u1030', GC_Extend),
-        ('\u1031', '\u1031', GC_SpacingMark), ('\u1032', '\u1037', GC_Extend), ('\u1038', '\u1038',
-        GC_SpacingMark), ('\u1039', '\u103a', GC_Extend), ('\u103b', '\u103c', GC_SpacingMark),
-        ('\u103d', '\u103e', GC_Extend), ('\u1056', '\u1057', GC_SpacingMark), ('\u1058', '\u1059',
-        GC_Extend), ('\u105e', '\u1060', GC_Extend), ('\u1062', '\u1064', GC_SpacingMark),
-        ('\u1067', '\u106d', GC_SpacingMark), ('\u1071', '\u1074', GC_Extend), ('\u1082', '\u1082',
-        GC_Extend), ('\u1083', '\u1084', GC_SpacingMark), ('\u1085', '\u1086', GC_Extend),
-        ('\u1087', '\u108c', GC_SpacingMark), ('\u108d', '\u108d', GC_Extend), ('\u108f', '\u108f',
-        GC_SpacingMark), ('\u109a', '\u109c', GC_SpacingMark), ('\u109d', '\u109d', GC_Extend),
-        ('\u1100', '\u115f', GC_L), ('\u1160', '\u11a7', GC_V), ('\u11a8', '\u11ff', GC_T),
-        ('\u135d', '\u135f', GC_Extend), ('\u1712', '\u1714', GC_Extend), ('\u1732', '\u1734',
-        GC_Extend), ('\u1752', '\u1753', GC_Extend), ('\u1772', '\u1773', GC_Extend), ('\u17b4',
-        '\u17b5', GC_Extend), ('\u17b6', '\u17b6', GC_SpacingMark), ('\u17b7', '\u17bd', GC_Extend),
-        ('\u17be', '\u17c5', GC_SpacingMark), ('\u17c6', '\u17c6', GC_Extend), ('\u17c7', '\u17c8',
-        GC_SpacingMark), ('\u17c9', '\u17d3', GC_Extend), ('\u17dd', '\u17dd', GC_Extend),
-        ('\u180b', '\u180d', GC_Extend), ('\u180e', '\u180e', GC_Control), ('\u18a9', '\u18a9',
-        GC_Extend), ('\u1920', '\u1922', GC_Extend), ('\u1923', '\u1926', GC_SpacingMark),
-        ('\u1927', '\u1928', GC_Extend), ('\u1929', '\u192b', GC_SpacingMark), ('\u1930', '\u1931',
-        GC_SpacingMark), ('\u1932', '\u1932', GC_Extend), ('\u1933', '\u1938', GC_SpacingMark),
-        ('\u1939', '\u193b', GC_Extend), ('\u19b0', '\u19c0', GC_SpacingMark), ('\u19c8', '\u19c9',
-        GC_SpacingMark), ('\u1a17', '\u1a18', GC_Extend), ('\u1a19', '\u1a1a', GC_SpacingMark),
-        ('\u1a1b', '\u1a1b', GC_Extend), ('\u1a55', '\u1a55', GC_SpacingMark), ('\u1a56', '\u1a56',
-        GC_Extend), ('\u1a57', '\u1a57', GC_SpacingMark), ('\u1a58', '\u1a5e', GC_Extend),
-        ('\u1a60', '\u1a60', GC_Extend), ('\u1a61', '\u1a61', GC_SpacingMark), ('\u1a62', '\u1a62',
-        GC_Extend), ('\u1a63', '\u1a64', GC_SpacingMark), ('\u1a65', '\u1a6c', GC_Extend),
-        ('\u1a6d', '\u1a72', GC_SpacingMark), ('\u1a73', '\u1a7c', GC_Extend), ('\u1a7f', '\u1a7f',
-        GC_Extend), ('\u1ab0', '\u1abd', GC_Extend), ('\u1abe', '\u1abe', GC_Extend), ('\u1b00',
-        '\u1b03', GC_Extend), ('\u1b04', '\u1b04', GC_SpacingMark), ('\u1b34', '\u1b34', GC_Extend),
-        ('\u1b35', '\u1b35', GC_SpacingMark), ('\u1b36', '\u1b3a', GC_Extend), ('\u1b3b', '\u1b3b',
-        GC_SpacingMark), ('\u1b3c', '\u1b3c', GC_Extend), ('\u1b3d', '\u1b41', GC_SpacingMark),
-        ('\u1b42', '\u1b42', GC_Extend), ('\u1b43', '\u1b44', GC_SpacingMark), ('\u1b6b', '\u1b73',
-        GC_Extend), ('\u1b80', '\u1b81', GC_Extend), ('\u1b82', '\u1b82', GC_SpacingMark),
-        ('\u1ba1', '\u1ba1', GC_SpacingMark), ('\u1ba2', '\u1ba5', GC_Extend), ('\u1ba6', '\u1ba7',
-        GC_SpacingMark), ('\u1ba8', '\u1ba9', GC_Extend), ('\u1baa', '\u1baa', GC_SpacingMark),
-        ('\u1bab', '\u1bad', GC_Extend), ('\u1be6', '\u1be6', GC_Extend), ('\u1be7', '\u1be7',
-        GC_SpacingMark), ('\u1be8', '\u1be9', GC_Extend), ('\u1bea', '\u1bec', GC_SpacingMark),
-        ('\u1bed', '\u1bed', GC_Extend), ('\u1bee', '\u1bee', GC_SpacingMark), ('\u1bef', '\u1bf1',
-        GC_Extend), ('\u1bf2', '\u1bf3', GC_SpacingMark), ('\u1c24', '\u1c2b', GC_SpacingMark),
-        ('\u1c2c', '\u1c33', GC_Extend), ('\u1c34', '\u1c35', GC_SpacingMark), ('\u1c36', '\u1c37',
-        GC_Extend), ('\u1cd0', '\u1cd2', GC_Extend), ('\u1cd4', '\u1ce0', GC_Extend), ('\u1ce1',
-        '\u1ce1', GC_SpacingMark), ('\u1ce2', '\u1ce8', GC_Extend), ('\u1ced', '\u1ced', GC_Extend),
-        ('\u1cf2', '\u1cf3', GC_SpacingMark), ('\u1cf4', '\u1cf4', GC_Extend), ('\u1cf8', '\u1cf9',
-        GC_Extend), ('\u1dc0', '\u1df5', GC_Extend), ('\u1dfc', '\u1dff', GC_Extend), ('\u200b',
-        '\u200b', GC_Control), ('\u200c', '\u200d', GC_Extend), ('\u200e', '\u200f', GC_Control),
-        ('\u2028', '\u202e', GC_Control), ('\u2060', '\u206f', GC_Control), ('\u20d0', '\u20dc',
-        GC_Extend), ('\u20dd', '\u20e0', GC_Extend), ('\u20e1', '\u20e1', GC_Extend), ('\u20e2',
-        '\u20e4', GC_Extend), ('\u20e5', '\u20f0', GC_Extend), ('\u2cef', '\u2cf1', GC_Extend),
-        ('\u2d7f', '\u2d7f', GC_Extend), ('\u2de0', '\u2dff', GC_Extend), ('\u302a', '\u302d',
-        GC_Extend), ('\u302e', '\u302f', GC_Extend), ('\u3099', '\u309a', GC_Extend), ('\ua66f',
-        '\ua66f', GC_Extend), ('\ua670', '\ua672', GC_Extend), ('\ua674', '\ua67d', GC_Extend),
-        ('\ua69f', '\ua69f', GC_Extend), ('\ua6f0', '\ua6f1', GC_Extend), ('\ua802', '\ua802',
-        GC_Extend), ('\ua806', '\ua806', GC_Extend), ('\ua80b', '\ua80b', GC_Extend), ('\ua823',
-        '\ua824', GC_SpacingMark), ('\ua825', '\ua826', GC_Extend), ('\ua827', '\ua827',
-        GC_SpacingMark), ('\ua880', '\ua881', GC_SpacingMark), ('\ua8b4', '\ua8c3', GC_SpacingMark),
-        ('\ua8c4', '\ua8c4', GC_Extend), ('\ua8e0', '\ua8f1', GC_Extend), ('\ua926', '\ua92d',
-        GC_Extend), ('\ua947', '\ua951', GC_Extend), ('\ua952', '\ua953', GC_SpacingMark),
-        ('\ua960', '\ua97c', GC_L), ('\ua980', '\ua982', GC_Extend), ('\ua983', '\ua983',
-        GC_SpacingMark), ('\ua9b3', '\ua9b3', GC_Extend), ('\ua9b4', '\ua9b5', GC_SpacingMark),
-        ('\ua9b6', '\ua9b9', GC_Extend), ('\ua9ba', '\ua9bb', GC_SpacingMark), ('\ua9bc', '\ua9bc',
-        GC_Extend), ('\ua9bd', '\ua9c0', GC_SpacingMark), ('\ua9e5', '\ua9e5', GC_Extend),
-        ('\uaa29', '\uaa2e', GC_Extend), ('\uaa2f', '\uaa30', GC_SpacingMark), ('\uaa31', '\uaa32',
-        GC_Extend), ('\uaa33', '\uaa34', GC_SpacingMark), ('\uaa35', '\uaa36', GC_Extend),
-        ('\uaa43', '\uaa43', GC_Extend), ('\uaa4c', '\uaa4c', GC_Extend), ('\uaa4d', '\uaa4d',
-        GC_SpacingMark), ('\uaa7b', '\uaa7b', GC_SpacingMark), ('\uaa7c', '\uaa7c', GC_Extend),
-        ('\uaa7d', '\uaa7d', GC_SpacingMark), ('\uaab0', '\uaab0', GC_Extend), ('\uaab2', '\uaab4',
-        GC_Extend), ('\uaab7', '\uaab8', GC_Extend), ('\uaabe', '\uaabf', GC_Extend), ('\uaac1',
-        '\uaac1', GC_Extend), ('\uaaeb', '\uaaeb', GC_SpacingMark), ('\uaaec', '\uaaed', GC_Extend),
-        ('\uaaee', '\uaaef', GC_SpacingMark), ('\uaaf5', '\uaaf5', GC_SpacingMark), ('\uaaf6',
-        '\uaaf6', GC_Extend), ('\uabe3', '\uabe4', GC_SpacingMark), ('\uabe5', '\uabe5', GC_Extend),
-        ('\uabe6', '\uabe7', GC_SpacingMark), ('\uabe8', '\uabe8', GC_Extend), ('\uabe9', '\uabea',
-        GC_SpacingMark), ('\uabec', '\uabec', GC_SpacingMark), ('\uabed', '\uabed', GC_Extend),
-        ('\uac00', '\uac00', GC_LV), ('\uac01', '\uac1b', GC_LVT), ('\uac1c', '\uac1c', GC_LV),
-        ('\uac1d', '\uac37', GC_LVT), ('\uac38', '\uac38', GC_LV), ('\uac39', '\uac53', GC_LVT),
-        ('\uac54', '\uac54', GC_LV), ('\uac55', '\uac6f', GC_LVT), ('\uac70', '\uac70', GC_LV),
-        ('\uac71', '\uac8b', GC_LVT), ('\uac8c', '\uac8c', GC_LV), ('\uac8d', '\uaca7', GC_LVT),
-        ('\uaca8', '\uaca8', GC_LV), ('\uaca9', '\uacc3', GC_LVT), ('\uacc4', '\uacc4', GC_LV),
-        ('\uacc5', '\uacdf', GC_LVT), ('\uace0', '\uace0', GC_LV), ('\uace1', '\uacfb', GC_LVT),
-        ('\uacfc', '\uacfc', GC_LV), ('\uacfd', '\uad17', GC_LVT), ('\uad18', '\uad18', GC_LV),
-        ('\uad19', '\uad33', GC_LVT), ('\uad34', '\uad34', GC_LV), ('\uad35', '\uad4f', GC_LVT),
-        ('\uad50', '\uad50', GC_LV), ('\uad51', '\uad6b', GC_LVT), ('\uad6c', '\uad6c', GC_LV),
-        ('\uad6d', '\uad87', GC_LVT), ('\uad88', '\uad88', GC_LV), ('\uad89', '\uada3', GC_LVT),
-        ('\uada4', '\uada4', GC_LV), ('\uada5', '\uadbf', GC_LVT), ('\uadc0', '\uadc0', GC_LV),
-        ('\uadc1', '\uaddb', GC_LVT), ('\uaddc', '\uaddc', GC_LV), ('\uaddd', '\uadf7', GC_LVT),
-        ('\uadf8', '\uadf8', GC_LV), ('\uadf9', '\uae13', GC_LVT), ('\uae14', '\uae14', GC_LV),
-        ('\uae15', '\uae2f', GC_LVT), ('\uae30', '\uae30', GC_LV), ('\uae31', '\uae4b', GC_LVT),
-        ('\uae4c', '\uae4c', GC_LV), ('\uae4d', '\uae67', GC_LVT), ('\uae68', '\uae68', GC_LV),
-        ('\uae69', '\uae83', GC_LVT), ('\uae84', '\uae84', GC_LV), ('\uae85', '\uae9f', GC_LVT),
-        ('\uaea0', '\uaea0', GC_LV), ('\uaea1', '\uaebb', GC_LVT), ('\uaebc', '\uaebc', GC_LV),
-        ('\uaebd', '\uaed7', GC_LVT), ('\uaed8', '\uaed8', GC_LV), ('\uaed9', '\uaef3', GC_LVT),
-        ('\uaef4', '\uaef4', GC_LV), ('\uaef5', '\uaf0f', GC_LVT), ('\uaf10', '\uaf10', GC_LV),
-        ('\uaf11', '\uaf2b', GC_LVT), ('\uaf2c', '\uaf2c', GC_LV), ('\uaf2d', '\uaf47', GC_LVT),
-        ('\uaf48', '\uaf48', GC_LV), ('\uaf49', '\uaf63', GC_LVT), ('\uaf64', '\uaf64', GC_LV),
-        ('\uaf65', '\uaf7f', GC_LVT), ('\uaf80', '\uaf80', GC_LV), ('\uaf81', '\uaf9b', GC_LVT),
-        ('\uaf9c', '\uaf9c', GC_LV), ('\uaf9d', '\uafb7', GC_LVT), ('\uafb8', '\uafb8', GC_LV),
-        ('\uafb9', '\uafd3', GC_LVT), ('\uafd4', '\uafd4', GC_LV), ('\uafd5', '\uafef', GC_LVT),
-        ('\uaff0', '\uaff0', GC_LV), ('\uaff1', '\ub00b', GC_LVT), ('\ub00c', '\ub00c', GC_LV),
-        ('\ub00d', '\ub027', GC_LVT), ('\ub028', '\ub028', GC_LV), ('\ub029', '\ub043', GC_LVT),
-        ('\ub044', '\ub044', GC_LV), ('\ub045', '\ub05f', GC_LVT), ('\ub060', '\ub060', GC_LV),
-        ('\ub061', '\ub07b', GC_LVT), ('\ub07c', '\ub07c', GC_LV), ('\ub07d', '\ub097', GC_LVT),
-        ('\ub098', '\ub098', GC_LV), ('\ub099', '\ub0b3', GC_LVT), ('\ub0b4', '\ub0b4', GC_LV),
-        ('\ub0b5', '\ub0cf', GC_LVT), ('\ub0d0', '\ub0d0', GC_LV), ('\ub0d1', '\ub0eb', GC_LVT),
-        ('\ub0ec', '\ub0ec', GC_LV), ('\ub0ed', '\ub107', GC_LVT), ('\ub108', '\ub108', GC_LV),
-        ('\ub109', '\ub123', GC_LVT), ('\ub124', '\ub124', GC_LV), ('\ub125', '\ub13f', GC_LVT),
-        ('\ub140', '\ub140', GC_LV), ('\ub141', '\ub15b', GC_LVT), ('\ub15c', '\ub15c', GC_LV),
-        ('\ub15d', '\ub177', GC_LVT), ('\ub178', '\ub178', GC_LV), ('\ub179', '\ub193', GC_LVT),
-        ('\ub194', '\ub194', GC_LV), ('\ub195', '\ub1af', GC_LVT), ('\ub1b0', '\ub1b0', GC_LV),
-        ('\ub1b1', '\ub1cb', GC_LVT), ('\ub1cc', '\ub1cc', GC_LV), ('\ub1cd', '\ub1e7', GC_LVT),
-        ('\ub1e8', '\ub1e8', GC_LV), ('\ub1e9', '\ub203', GC_LVT), ('\ub204', '\ub204', GC_LV),
-        ('\ub205', '\ub21f', GC_LVT), ('\ub220', '\ub220', GC_LV), ('\ub221', '\ub23b', GC_LVT),
-        ('\ub23c', '\ub23c', GC_LV), ('\ub23d', '\ub257', GC_LVT), ('\ub258', '\ub258', GC_LV),
-        ('\ub259', '\ub273', GC_LVT), ('\ub274', '\ub274', GC_LV), ('\ub275', '\ub28f', GC_LVT),
-        ('\ub290', '\ub290', GC_LV), ('\ub291', '\ub2ab', GC_LVT), ('\ub2ac', '\ub2ac', GC_LV),
-        ('\ub2ad', '\ub2c7', GC_LVT), ('\ub2c8', '\ub2c8', GC_LV), ('\ub2c9', '\ub2e3', GC_LVT),
-        ('\ub2e4', '\ub2e4', GC_LV), ('\ub2e5', '\ub2ff', GC_LVT), ('\ub300', '\ub300', GC_LV),
-        ('\ub301', '\ub31b', GC_LVT), ('\ub31c', '\ub31c', GC_LV), ('\ub31d', '\ub337', GC_LVT),
-        ('\ub338', '\ub338', GC_LV), ('\ub339', '\ub353', GC_LVT), ('\ub354', '\ub354', GC_LV),
-        ('\ub355', '\ub36f', GC_LVT), ('\ub370', '\ub370', GC_LV), ('\ub371', '\ub38b', GC_LVT),
-        ('\ub38c', '\ub38c', GC_LV), ('\ub38d', '\ub3a7', GC_LVT), ('\ub3a8', '\ub3a8', GC_LV),
-        ('\ub3a9', '\ub3c3', GC_LVT), ('\ub3c4', '\ub3c4', GC_LV), ('\ub3c5', '\ub3df', GC_LVT),
-        ('\ub3e0', '\ub3e0', GC_LV), ('\ub3e1', '\ub3fb', GC_LVT), ('\ub3fc', '\ub3fc', GC_LV),
-        ('\ub3fd', '\ub417', GC_LVT), ('\ub418', '\ub418', GC_LV), ('\ub419', '\ub433', GC_LVT),
-        ('\ub434', '\ub434', GC_LV), ('\ub435', '\ub44f', GC_LVT), ('\ub450', '\ub450', GC_LV),
-        ('\ub451', '\ub46b', GC_LVT), ('\ub46c', '\ub46c', GC_LV), ('\ub46d', '\ub487', GC_LVT),
-        ('\ub488', '\ub488', GC_LV), ('\ub489', '\ub4a3', GC_LVT), ('\ub4a4', '\ub4a4', GC_LV),
-        ('\ub4a5', '\ub4bf', GC_LVT), ('\ub4c0', '\ub4c0', GC_LV), ('\ub4c1', '\ub4db', GC_LVT),
-        ('\ub4dc', '\ub4dc', GC_LV), ('\ub4dd', '\ub4f7', GC_LVT), ('\ub4f8', '\ub4f8', GC_LV),
-        ('\ub4f9', '\ub513', GC_LVT), ('\ub514', '\ub514', GC_LV), ('\ub515', '\ub52f', GC_LVT),
-        ('\ub530', '\ub530', GC_LV), ('\ub531', '\ub54b', GC_LVT), ('\ub54c', '\ub54c', GC_LV),
-        ('\ub54d', '\ub567', GC_LVT), ('\ub568', '\ub568', GC_LV), ('\ub569', '\ub583', GC_LVT),
-        ('\ub584', '\ub584', GC_LV), ('\ub585', '\ub59f', GC_LVT), ('\ub5a0', '\ub5a0', GC_LV),
-        ('\ub5a1', '\ub5bb', GC_LVT), ('\ub5bc', '\ub5bc', GC_LV), ('\ub5bd', '\ub5d7', GC_LVT),
-        ('\ub5d8', '\ub5d8', GC_LV), ('\ub5d9', '\ub5f3', GC_LVT), ('\ub5f4', '\ub5f4', GC_LV),
-        ('\ub5f5', '\ub60f', GC_LVT), ('\ub610', '\ub610', GC_LV), ('\ub611', '\ub62b', GC_LVT),
-        ('\ub62c', '\ub62c', GC_LV), ('\ub62d', '\ub647', GC_LVT), ('\ub648', '\ub648', GC_LV),
-        ('\ub649', '\ub663', GC_LVT), ('\ub664', '\ub664', GC_LV), ('\ub665', '\ub67f', GC_LVT),
-        ('\ub680', '\ub680', GC_LV), ('\ub681', '\ub69b', GC_LVT), ('\ub69c', '\ub69c', GC_LV),
-        ('\ub69d', '\ub6b7', GC_LVT), ('\ub6b8', '\ub6b8', GC_LV), ('\ub6b9', '\ub6d3', GC_LVT),
-        ('\ub6d4', '\ub6d4', GC_LV), ('\ub6d5', '\ub6ef', GC_LVT), ('\ub6f0', '\ub6f0', GC_LV),
-        ('\ub6f1', '\ub70b', GC_LVT), ('\ub70c', '\ub70c', GC_LV), ('\ub70d', '\ub727', GC_LVT),
-        ('\ub728', '\ub728', GC_LV), ('\ub729', '\ub743', GC_LVT), ('\ub744', '\ub744', GC_LV),
-        ('\ub745', '\ub75f', GC_LVT), ('\ub760', '\ub760', GC_LV), ('\ub761', '\ub77b', GC_LVT),
-        ('\ub77c', '\ub77c', GC_LV), ('\ub77d', '\ub797', GC_LVT), ('\ub798', '\ub798', GC_LV),
-        ('\ub799', '\ub7b3', GC_LVT), ('\ub7b4', '\ub7b4', GC_LV), ('\ub7b5', '\ub7cf', GC_LVT),
-        ('\ub7d0', '\ub7d0', GC_LV), ('\ub7d1', '\ub7eb', GC_LVT), ('\ub7ec', '\ub7ec', GC_LV),
-        ('\ub7ed', '\ub807', GC_LVT), ('\ub808', '\ub808', GC_LV), ('\ub809', '\ub823', GC_LVT),
-        ('\ub824', '\ub824', GC_LV), ('\ub825', '\ub83f', GC_LVT), ('\ub840', '\ub840', GC_LV),
-        ('\ub841', '\ub85b', GC_LVT), ('\ub85c', '\ub85c', GC_LV), ('\ub85d', '\ub877', GC_LVT),
-        ('\ub878', '\ub878', GC_LV), ('\ub879', '\ub893', GC_LVT), ('\ub894', '\ub894', GC_LV),
-        ('\ub895', '\ub8af', GC_LVT), ('\ub8b0', '\ub8b0', GC_LV), ('\ub8b1', '\ub8cb', GC_LVT),
-        ('\ub8cc', '\ub8cc', GC_LV), ('\ub8cd', '\ub8e7', GC_LVT), ('\ub8e8', '\ub8e8', GC_LV),
-        ('\ub8e9', '\ub903', GC_LVT), ('\ub904', '\ub904', GC_LV), ('\ub905', '\ub91f', GC_LVT),
-        ('\ub920', '\ub920', GC_LV), ('\ub921', '\ub93b', GC_LVT), ('\ub93c', '\ub93c', GC_LV),
-        ('\ub93d', '\ub957', GC_LVT), ('\ub958', '\ub958', GC_LV), ('\ub959', '\ub973', GC_LVT),
-        ('\ub974', '\ub974', GC_LV), ('\ub975', '\ub98f', GC_LVT), ('\ub990', '\ub990', GC_LV),
-        ('\ub991', '\ub9ab', GC_LVT), ('\ub9ac', '\ub9ac', GC_LV), ('\ub9ad', '\ub9c7', GC_LVT),
-        ('\ub9c8', '\ub9c8', GC_LV), ('\ub9c9', '\ub9e3', GC_LVT), ('\ub9e4', '\ub9e4', GC_LV),
-        ('\ub9e5', '\ub9ff', GC_LVT), ('\uba00', '\uba00', GC_LV), ('\uba01', '\uba1b', GC_LVT),
-        ('\uba1c', '\uba1c', GC_LV), ('\uba1d', '\uba37', GC_LVT), ('\uba38', '\uba38', GC_LV),
-        ('\uba39', '\uba53', GC_LVT), ('\uba54', '\uba54', GC_LV), ('\uba55', '\uba6f', GC_LVT),
-        ('\uba70', '\uba70', GC_LV), ('\uba71', '\uba8b', GC_LVT), ('\uba8c', '\uba8c', GC_LV),
-        ('\uba8d', '\ubaa7', GC_LVT), ('\ubaa8', '\ubaa8', GC_LV), ('\ubaa9', '\ubac3', GC_LVT),
-        ('\ubac4', '\ubac4', GC_LV), ('\ubac5', '\ubadf', GC_LVT), ('\ubae0', '\ubae0', GC_LV),
-        ('\ubae1', '\ubafb', GC_LVT), ('\ubafc', '\ubafc', GC_LV), ('\ubafd', '\ubb17', GC_LVT),
-        ('\ubb18', '\ubb18', GC_LV), ('\ubb19', '\ubb33', GC_LVT), ('\ubb34', '\ubb34', GC_LV),
-        ('\ubb35', '\ubb4f', GC_LVT), ('\ubb50', '\ubb50', GC_LV), ('\ubb51', '\ubb6b', GC_LVT),
-        ('\ubb6c', '\ubb6c', GC_LV), ('\ubb6d', '\ubb87', GC_LVT), ('\ubb88', '\ubb88', GC_LV),
-        ('\ubb89', '\ubba3', GC_LVT), ('\ubba4', '\ubba4', GC_LV), ('\ubba5', '\ubbbf', GC_LVT),
-        ('\ubbc0', '\ubbc0', GC_LV), ('\ubbc1', '\ubbdb', GC_LVT), ('\ubbdc', '\ubbdc', GC_LV),
-        ('\ubbdd', '\ubbf7', GC_LVT), ('\ubbf8', '\ubbf8', GC_LV), ('\ubbf9', '\ubc13', GC_LVT),
-        ('\ubc14', '\ubc14', GC_LV), ('\ubc15', '\ubc2f', GC_LVT), ('\ubc30', '\ubc30', GC_LV),
-        ('\ubc31', '\ubc4b', GC_LVT), ('\ubc4c', '\ubc4c', GC_LV), ('\ubc4d', '\ubc67', GC_LVT),
-        ('\ubc68', '\ubc68', GC_LV), ('\ubc69', '\ubc83', GC_LVT), ('\ubc84', '\ubc84', GC_LV),
-        ('\ubc85', '\ubc9f', GC_LVT), ('\ubca0', '\ubca0', GC_LV), ('\ubca1', '\ubcbb', GC_LVT),
-        ('\ubcbc', '\ubcbc', GC_LV), ('\ubcbd', '\ubcd7', GC_LVT), ('\ubcd8', '\ubcd8', GC_LV),
-        ('\ubcd9', '\ubcf3', GC_LVT), ('\ubcf4', '\ubcf4', GC_LV), ('\ubcf5', '\ubd0f', GC_LVT),
-        ('\ubd10', '\ubd10', GC_LV), ('\ubd11', '\ubd2b', GC_LVT), ('\ubd2c', '\ubd2c', GC_LV),
-        ('\ubd2d', '\ubd47', GC_LVT), ('\ubd48', '\ubd48', GC_LV), ('\ubd49', '\ubd63', GC_LVT),
-        ('\ubd64', '\ubd64', GC_LV), ('\ubd65', '\ubd7f', GC_LVT), ('\ubd80', '\ubd80', GC_LV),
-        ('\ubd81', '\ubd9b', GC_LVT), ('\ubd9c', '\ubd9c', GC_LV), ('\ubd9d', '\ubdb7', GC_LVT),
-        ('\ubdb8', '\ubdb8', GC_LV), ('\ubdb9', '\ubdd3', GC_LVT), ('\ubdd4', '\ubdd4', GC_LV),
-        ('\ubdd5', '\ubdef', GC_LVT), ('\ubdf0', '\ubdf0', GC_LV), ('\ubdf1', '\ube0b', GC_LVT),
-        ('\ube0c', '\ube0c', GC_LV), ('\ube0d', '\ube27', GC_LVT), ('\ube28', '\ube28', GC_LV),
-        ('\ube29', '\ube43', GC_LVT), ('\ube44', '\ube44', GC_LV), ('\ube45', '\ube5f', GC_LVT),
-        ('\ube60', '\ube60', GC_LV), ('\ube61', '\ube7b', GC_LVT), ('\ube7c', '\ube7c', GC_LV),
-        ('\ube7d', '\ube97', GC_LVT), ('\ube98', '\ube98', GC_LV), ('\ube99', '\ubeb3', GC_LVT),
-        ('\ubeb4', '\ubeb4', GC_LV), ('\ubeb5', '\ubecf', GC_LVT), ('\ubed0', '\ubed0', GC_LV),
-        ('\ubed1', '\ubeeb', GC_LVT), ('\ubeec', '\ubeec', GC_LV), ('\ubeed', '\ubf07', GC_LVT),
-        ('\ubf08', '\ubf08', GC_LV), ('\ubf09', '\ubf23', GC_LVT), ('\ubf24', '\ubf24', GC_LV),
-        ('\ubf25', '\ubf3f', GC_LVT), ('\ubf40', '\ubf40', GC_LV), ('\ubf41', '\ubf5b', GC_LVT),
-        ('\ubf5c', '\ubf5c', GC_LV), ('\ubf5d', '\ubf77', GC_LVT), ('\ubf78', '\ubf78', GC_LV),
-        ('\ubf79', '\ubf93', GC_LVT), ('\ubf94', '\ubf94', GC_LV), ('\ubf95', '\ubfaf', GC_LVT),
-        ('\ubfb0', '\ubfb0', GC_LV), ('\ubfb1', '\ubfcb', GC_LVT), ('\ubfcc', '\ubfcc', GC_LV),
-        ('\ubfcd', '\ubfe7', GC_LVT), ('\ubfe8', '\ubfe8', GC_LV), ('\ubfe9', '\uc003', GC_LVT),
-        ('\uc004', '\uc004', GC_LV), ('\uc005', '\uc01f', GC_LVT), ('\uc020', '\uc020', GC_LV),
-        ('\uc021', '\uc03b', GC_LVT), ('\uc03c', '\uc03c', GC_LV), ('\uc03d', '\uc057', GC_LVT),
-        ('\uc058', '\uc058', GC_LV), ('\uc059', '\uc073', GC_LVT), ('\uc074', '\uc074', GC_LV),
-        ('\uc075', '\uc08f', GC_LVT), ('\uc090', '\uc090', GC_LV), ('\uc091', '\uc0ab', GC_LVT),
-        ('\uc0ac', '\uc0ac', GC_LV), ('\uc0ad', '\uc0c7', GC_LVT), ('\uc0c8', '\uc0c8', GC_LV),
-        ('\uc0c9', '\uc0e3', GC_LVT), ('\uc0e4', '\uc0e4', GC_LV), ('\uc0e5', '\uc0ff', GC_LVT),
-        ('\uc100', '\uc100', GC_LV), ('\uc101', '\uc11b', GC_LVT), ('\uc11c', '\uc11c', GC_LV),
-        ('\uc11d', '\uc137', GC_LVT), ('\uc138', '\uc138', GC_LV), ('\uc139', '\uc153', GC_LVT),
-        ('\uc154', '\uc154', GC_LV), ('\uc155', '\uc16f', GC_LVT), ('\uc170', '\uc170', GC_LV),
-        ('\uc171', '\uc18b', GC_LVT), ('\uc18c', '\uc18c', GC_LV), ('\uc18d', '\uc1a7', GC_LVT),
-        ('\uc1a8', '\uc1a8', GC_LV), ('\uc1a9', '\uc1c3', GC_LVT), ('\uc1c4', '\uc1c4', GC_LV),
-        ('\uc1c5', '\uc1df', GC_LVT), ('\uc1e0', '\uc1e0', GC_LV), ('\uc1e1', '\uc1fb', GC_LVT),
-        ('\uc1fc', '\uc1fc', GC_LV), ('\uc1fd', '\uc217', GC_LVT), ('\uc218', '\uc218', GC_LV),
-        ('\uc219', '\uc233', GC_LVT), ('\uc234', '\uc234', GC_LV), ('\uc235', '\uc24f', GC_LVT),
-        ('\uc250', '\uc250', GC_LV), ('\uc251', '\uc26b', GC_LVT), ('\uc26c', '\uc26c', GC_LV),
-        ('\uc26d', '\uc287', GC_LVT), ('\uc288', '\uc288', GC_LV), ('\uc289', '\uc2a3', GC_LVT),
-        ('\uc2a4', '\uc2a4', GC_LV), ('\uc2a5', '\uc2bf', GC_LVT), ('\uc2c0', '\uc2c0', GC_LV),
-        ('\uc2c1', '\uc2db', GC_LVT), ('\uc2dc', '\uc2dc', GC_LV), ('\uc2dd', '\uc2f7', GC_LVT),
-        ('\uc2f8', '\uc2f8', GC_LV), ('\uc2f9', '\uc313', GC_LVT), ('\uc314', '\uc314', GC_LV),
-        ('\uc315', '\uc32f', GC_LVT), ('\uc330', '\uc330', GC_LV), ('\uc331', '\uc34b', GC_LVT),
-        ('\uc34c', '\uc34c', GC_LV), ('\uc34d', '\uc367', GC_LVT), ('\uc368', '\uc368', GC_LV),
-        ('\uc369', '\uc383', GC_LVT), ('\uc384', '\uc384', GC_LV), ('\uc385', '\uc39f', GC_LVT),
-        ('\uc3a0', '\uc3a0', GC_LV), ('\uc3a1', '\uc3bb', GC_LVT), ('\uc3bc', '\uc3bc', GC_LV),
-        ('\uc3bd', '\uc3d7', GC_LVT), ('\uc3d8', '\uc3d8', GC_LV), ('\uc3d9', '\uc3f3', GC_LVT),
-        ('\uc3f4', '\uc3f4', GC_LV), ('\uc3f5', '\uc40f', GC_LVT), ('\uc410', '\uc410', GC_LV),
-        ('\uc411', '\uc42b', GC_LVT), ('\uc42c', '\uc42c', GC_LV), ('\uc42d', '\uc447', GC_LVT),
-        ('\uc448', '\uc448', GC_LV), ('\uc449', '\uc463', GC_LVT), ('\uc464', '\uc464', GC_LV),
-        ('\uc465', '\uc47f', GC_LVT), ('\uc480', '\uc480', GC_LV), ('\uc481', '\uc49b', GC_LVT),
-        ('\uc49c', '\uc49c', GC_LV), ('\uc49d', '\uc4b7', GC_LVT), ('\uc4b8', '\uc4b8', GC_LV),
-        ('\uc4b9', '\uc4d3', GC_LVT), ('\uc4d4', '\uc4d4', GC_LV), ('\uc4d5', '\uc4ef', GC_LVT),
-        ('\uc4f0', '\uc4f0', GC_LV), ('\uc4f1', '\uc50b', GC_LVT), ('\uc50c', '\uc50c', GC_LV),
-        ('\uc50d', '\uc527', GC_LVT), ('\uc528', '\uc528', GC_LV), ('\uc529', '\uc543', GC_LVT),
-        ('\uc544', '\uc544', GC_LV), ('\uc545', '\uc55f', GC_LVT), ('\uc560', '\uc560', GC_LV),
-        ('\uc561', '\uc57b', GC_LVT), ('\uc57c', '\uc57c', GC_LV), ('\uc57d', '\uc597', GC_LVT),
-        ('\uc598', '\uc598', GC_LV), ('\uc599', '\uc5b3', GC_LVT), ('\uc5b4', '\uc5b4', GC_LV),
-        ('\uc5b5', '\uc5cf', GC_LVT), ('\uc5d0', '\uc5d0', GC_LV), ('\uc5d1', '\uc5eb', GC_LVT),
-        ('\uc5ec', '\uc5ec', GC_LV), ('\uc5ed', '\uc607', GC_LVT), ('\uc608', '\uc608', GC_LV),
-        ('\uc609', '\uc623', GC_LVT), ('\uc624', '\uc624', GC_LV), ('\uc625', '\uc63f', GC_LVT),
-        ('\uc640', '\uc640', GC_LV), ('\uc641', '\uc65b', GC_LVT), ('\uc65c', '\uc65c', GC_LV),
-        ('\uc65d', '\uc677', GC_LVT), ('\uc678', '\uc678', GC_LV), ('\uc679', '\uc693', GC_LVT),
-        ('\uc694', '\uc694', GC_LV), ('\uc695', '\uc6af', GC_LVT), ('\uc6b0', '\uc6b0', GC_LV),
-        ('\uc6b1', '\uc6cb', GC_LVT), ('\uc6cc', '\uc6cc', GC_LV), ('\uc6cd', '\uc6e7', GC_LVT),
-        ('\uc6e8', '\uc6e8', GC_LV), ('\uc6e9', '\uc703', GC_LVT), ('\uc704', '\uc704', GC_LV),
-        ('\uc705', '\uc71f', GC_LVT), ('\uc720', '\uc720', GC_LV), ('\uc721', '\uc73b', GC_LVT),
-        ('\uc73c', '\uc73c', GC_LV), ('\uc73d', '\uc757', GC_LVT), ('\uc758', '\uc758', GC_LV),
-        ('\uc759', '\uc773', GC_LVT), ('\uc774', '\uc774', GC_LV), ('\uc775', '\uc78f', GC_LVT),
-        ('\uc790', '\uc790', GC_LV), ('\uc791', '\uc7ab', GC_LVT), ('\uc7ac', '\uc7ac', GC_LV),
-        ('\uc7ad', '\uc7c7', GC_LVT), ('\uc7c8', '\uc7c8', GC_LV), ('\uc7c9', '\uc7e3', GC_LVT),
-        ('\uc7e4', '\uc7e4', GC_LV), ('\uc7e5', '\uc7ff', GC_LVT), ('\uc800', '\uc800', GC_LV),
-        ('\uc801', '\uc81b', GC_LVT), ('\uc81c', '\uc81c', GC_LV), ('\uc81d', '\uc837', GC_LVT),
-        ('\uc838', '\uc838', GC_LV), ('\uc839', '\uc853', GC_LVT), ('\uc854', '\uc854', GC_LV),
-        ('\uc855', '\uc86f', GC_LVT), ('\uc870', '\uc870', GC_LV), ('\uc871', '\uc88b', GC_LVT),
-        ('\uc88c', '\uc88c', GC_LV), ('\uc88d', '\uc8a7', GC_LVT), ('\uc8a8', '\uc8a8', GC_LV),
-        ('\uc8a9', '\uc8c3', GC_LVT), ('\uc8c4', '\uc8c4', GC_LV), ('\uc8c5', '\uc8df', GC_LVT),
-        ('\uc8e0', '\uc8e0', GC_LV), ('\uc8e1', '\uc8fb', GC_LVT), ('\uc8fc', '\uc8fc', GC_LV),
-        ('\uc8fd', '\uc917', GC_LVT), ('\uc918', '\uc918', GC_LV), ('\uc919', '\uc933', GC_LVT),
-        ('\uc934', '\uc934', GC_LV), ('\uc935', '\uc94f', GC_LVT), ('\uc950', '\uc950', GC_LV),
-        ('\uc951', '\uc96b', GC_LVT), ('\uc96c', '\uc96c', GC_LV), ('\uc96d', '\uc987', GC_LVT),
-        ('\uc988', '\uc988', GC_LV), ('\uc989', '\uc9a3', GC_LVT), ('\uc9a4', '\uc9a4', GC_LV),
-        ('\uc9a5', '\uc9bf', GC_LVT), ('\uc9c0', '\uc9c0', GC_LV), ('\uc9c1', '\uc9db', GC_LVT),
-        ('\uc9dc', '\uc9dc', GC_LV), ('\uc9dd', '\uc9f7', GC_LVT), ('\uc9f8', '\uc9f8', GC_LV),
-        ('\uc9f9', '\uca13', GC_LVT), ('\uca14', '\uca14', GC_LV), ('\uca15', '\uca2f', GC_LVT),
-        ('\uca30', '\uca30', GC_LV), ('\uca31', '\uca4b', GC_LVT), ('\uca4c', '\uca4c', GC_LV),
-        ('\uca4d', '\uca67', GC_LVT), ('\uca68', '\uca68', GC_LV), ('\uca69', '\uca83', GC_LVT),
-        ('\uca84', '\uca84', GC_LV), ('\uca85', '\uca9f', GC_LVT), ('\ucaa0', '\ucaa0', GC_LV),
-        ('\ucaa1', '\ucabb', GC_LVT), ('\ucabc', '\ucabc', GC_LV), ('\ucabd', '\ucad7', GC_LVT),
-        ('\ucad8', '\ucad8', GC_LV), ('\ucad9', '\ucaf3', GC_LVT), ('\ucaf4', '\ucaf4', GC_LV),
-        ('\ucaf5', '\ucb0f', GC_LVT), ('\ucb10', '\ucb10', GC_LV), ('\ucb11', '\ucb2b', GC_LVT),
-        ('\ucb2c', '\ucb2c', GC_LV), ('\ucb2d', '\ucb47', GC_LVT), ('\ucb48', '\ucb48', GC_LV),
-        ('\ucb49', '\ucb63', GC_LVT), ('\ucb64', '\ucb64', GC_LV), ('\ucb65', '\ucb7f', GC_LVT),
-        ('\ucb80', '\ucb80', GC_LV), ('\ucb81', '\ucb9b', GC_LVT), ('\ucb9c', '\ucb9c', GC_LV),
-        ('\ucb9d', '\ucbb7', GC_LVT), ('\ucbb8', '\ucbb8', GC_LV), ('\ucbb9', '\ucbd3', GC_LVT),
-        ('\ucbd4', '\ucbd4', GC_LV), ('\ucbd5', '\ucbef', GC_LVT), ('\ucbf0', '\ucbf0', GC_LV),
-        ('\ucbf1', '\ucc0b', GC_LVT), ('\ucc0c', '\ucc0c', GC_LV), ('\ucc0d', '\ucc27', GC_LVT),
-        ('\ucc28', '\ucc28', GC_LV), ('\ucc29', '\ucc43', GC_LVT), ('\ucc44', '\ucc44', GC_LV),
-        ('\ucc45', '\ucc5f', GC_LVT), ('\ucc60', '\ucc60', GC_LV), ('\ucc61', '\ucc7b', GC_LVT),
-        ('\ucc7c', '\ucc7c', GC_LV), ('\ucc7d', '\ucc97', GC_LVT), ('\ucc98', '\ucc98', GC_LV),
-        ('\ucc99', '\uccb3', GC_LVT), ('\uccb4', '\uccb4', GC_LV), ('\uccb5', '\ucccf', GC_LVT),
-        ('\uccd0', '\uccd0', GC_LV), ('\uccd1', '\ucceb', GC_LVT), ('\uccec', '\uccec', GC_LV),
-        ('\ucced', '\ucd07', GC_LVT), ('\ucd08', '\ucd08', GC_LV), ('\ucd09', '\ucd23', GC_LVT),
-        ('\ucd24', '\ucd24', GC_LV), ('\ucd25', '\ucd3f', GC_LVT), ('\ucd40', '\ucd40', GC_LV),
-        ('\ucd41', '\ucd5b', GC_LVT), ('\ucd5c', '\ucd5c', GC_LV), ('\ucd5d', '\ucd77', GC_LVT),
-        ('\ucd78', '\ucd78', GC_LV), ('\ucd79', '\ucd93', GC_LVT), ('\ucd94', '\ucd94', GC_LV),
-        ('\ucd95', '\ucdaf', GC_LVT), ('\ucdb0', '\ucdb0', GC_LV), ('\ucdb1', '\ucdcb', GC_LVT),
-        ('\ucdcc', '\ucdcc', GC_LV), ('\ucdcd', '\ucde7', GC_LVT), ('\ucde8', '\ucde8', GC_LV),
-        ('\ucde9', '\uce03', GC_LVT), ('\uce04', '\uce04', GC_LV), ('\uce05', '\uce1f', GC_LVT),
-        ('\uce20', '\uce20', GC_LV), ('\uce21', '\uce3b', GC_LVT), ('\uce3c', '\uce3c', GC_LV),
-        ('\uce3d', '\uce57', GC_LVT), ('\uce58', '\uce58', GC_LV), ('\uce59', '\uce73', GC_LVT),
-        ('\uce74', '\uce74', GC_LV), ('\uce75', '\uce8f', GC_LVT), ('\uce90', '\uce90', GC_LV),
-        ('\uce91', '\uceab', GC_LVT), ('\uceac', '\uceac', GC_LV), ('\ucead', '\ucec7', GC_LVT),
-        ('\ucec8', '\ucec8', GC_LV), ('\ucec9', '\ucee3', GC_LVT), ('\ucee4', '\ucee4', GC_LV),
-        ('\ucee5', '\uceff', GC_LVT), ('\ucf00', '\ucf00', GC_LV), ('\ucf01', '\ucf1b', GC_LVT),
-        ('\ucf1c', '\ucf1c', GC_LV), ('\ucf1d', '\ucf37', GC_LVT), ('\ucf38', '\ucf38', GC_LV),
-        ('\ucf39', '\ucf53', GC_LVT), ('\ucf54', '\ucf54', GC_LV), ('\ucf55', '\ucf6f', GC_LVT),
-        ('\ucf70', '\ucf70', GC_LV), ('\ucf71', '\ucf8b', GC_LVT), ('\ucf8c', '\ucf8c', GC_LV),
-        ('\ucf8d', '\ucfa7', GC_LVT), ('\ucfa8', '\ucfa8', GC_LV), ('\ucfa9', '\ucfc3', GC_LVT),
-        ('\ucfc4', '\ucfc4', GC_LV), ('\ucfc5', '\ucfdf', GC_LVT), ('\ucfe0', '\ucfe0', GC_LV),
-        ('\ucfe1', '\ucffb', GC_LVT), ('\ucffc', '\ucffc', GC_LV), ('\ucffd', '\ud017', GC_LVT),
-        ('\ud018', '\ud018', GC_LV), ('\ud019', '\ud033', GC_LVT), ('\ud034', '\ud034', GC_LV),
-        ('\ud035', '\ud04f', GC_LVT), ('\ud050', '\ud050', GC_LV), ('\ud051', '\ud06b', GC_LVT),
-        ('\ud06c', '\ud06c', GC_LV), ('\ud06d', '\ud087', GC_LVT), ('\ud088', '\ud088', GC_LV),
-        ('\ud089', '\ud0a3', GC_LVT), ('\ud0a4', '\ud0a4', GC_LV), ('\ud0a5', '\ud0bf', GC_LVT),
-        ('\ud0c0', '\ud0c0', GC_LV), ('\ud0c1', '\ud0db', GC_LVT), ('\ud0dc', '\ud0dc', GC_LV),
-        ('\ud0dd', '\ud0f7', GC_LVT), ('\ud0f8', '\ud0f8', GC_LV), ('\ud0f9', '\ud113', GC_LVT),
-        ('\ud114', '\ud114', GC_LV), ('\ud115', '\ud12f', GC_LVT), ('\ud130', '\ud130', GC_LV),
-        ('\ud131', '\ud14b', GC_LVT), ('\ud14c', '\ud14c', GC_LV), ('\ud14d', '\ud167', GC_LVT),
-        ('\ud168', '\ud168', GC_LV), ('\ud169', '\ud183', GC_LVT), ('\ud184', '\ud184', GC_LV),
-        ('\ud185', '\ud19f', GC_LVT), ('\ud1a0', '\ud1a0', GC_LV), ('\ud1a1', '\ud1bb', GC_LVT),
-        ('\ud1bc', '\ud1bc', GC_LV), ('\ud1bd', '\ud1d7', GC_LVT), ('\ud1d8', '\ud1d8', GC_LV),
-        ('\ud1d9', '\ud1f3', GC_LVT), ('\ud1f4', '\ud1f4', GC_LV), ('\ud1f5', '\ud20f', GC_LVT),
-        ('\ud210', '\ud210', GC_LV), ('\ud211', '\ud22b', GC_LVT), ('\ud22c', '\ud22c', GC_LV),
-        ('\ud22d', '\ud247', GC_LVT), ('\ud248', '\ud248', GC_LV), ('\ud249', '\ud263', GC_LVT),
-        ('\ud264', '\ud264', GC_LV), ('\ud265', '\ud27f', GC_LVT), ('\ud280', '\ud280', GC_LV),
-        ('\ud281', '\ud29b', GC_LVT), ('\ud29c', '\ud29c', GC_LV), ('\ud29d', '\ud2b7', GC_LVT),
-        ('\ud2b8', '\ud2b8', GC_LV), ('\ud2b9', '\ud2d3', GC_LVT), ('\ud2d4', '\ud2d4', GC_LV),
-        ('\ud2d5', '\ud2ef', GC_LVT), ('\ud2f0', '\ud2f0', GC_LV), ('\ud2f1', '\ud30b', GC_LVT),
-        ('\ud30c', '\ud30c', GC_LV), ('\ud30d', '\ud327', GC_LVT), ('\ud328', '\ud328', GC_LV),
-        ('\ud329', '\ud343', GC_LVT), ('\ud344', '\ud344', GC_LV), ('\ud345', '\ud35f', GC_LVT),
-        ('\ud360', '\ud360', GC_LV), ('\ud361', '\ud37b', GC_LVT), ('\ud37c', '\ud37c', GC_LV),
-        ('\ud37d', '\ud397', GC_LVT), ('\ud398', '\ud398', GC_LV), ('\ud399', '\ud3b3', GC_LVT),
-        ('\ud3b4', '\ud3b4', GC_LV), ('\ud3b5', '\ud3cf', GC_LVT), ('\ud3d0', '\ud3d0', GC_LV),
-        ('\ud3d1', '\ud3eb', GC_LVT), ('\ud3ec', '\ud3ec', GC_LV), ('\ud3ed', '\ud407', GC_LVT),
-        ('\ud408', '\ud408', GC_LV), ('\ud409', '\ud423', GC_LVT), ('\ud424', '\ud424', GC_LV),
-        ('\ud425', '\ud43f', GC_LVT), ('\ud440', '\ud440', GC_LV), ('\ud441', '\ud45b', GC_LVT),
-        ('\ud45c', '\ud45c', GC_LV), ('\ud45d', '\ud477', GC_LVT), ('\ud478', '\ud478', GC_LV),
-        ('\ud479', '\ud493', GC_LVT), ('\ud494', '\ud494', GC_LV), ('\ud495', '\ud4af', GC_LVT),
-        ('\ud4b0', '\ud4b0', GC_LV), ('\ud4b1', '\ud4cb', GC_LVT), ('\ud4cc', '\ud4cc', GC_LV),
-        ('\ud4cd', '\ud4e7', GC_LVT), ('\ud4e8', '\ud4e8', GC_LV), ('\ud4e9', '\ud503', GC_LVT),
-        ('\ud504', '\ud504', GC_LV), ('\ud505', '\ud51f', GC_LVT), ('\ud520', '\ud520', GC_LV),
-        ('\ud521', '\ud53b', GC_LVT), ('\ud53c', '\ud53c', GC_LV), ('\ud53d', '\ud557', GC_LVT),
-        ('\ud558', '\ud558', GC_LV), ('\ud559', '\ud573', GC_LVT), ('\ud574', '\ud574', GC_LV),
-        ('\ud575', '\ud58f', GC_LVT), ('\ud590', '\ud590', GC_LV), ('\ud591', '\ud5ab', GC_LVT),
-        ('\ud5ac', '\ud5ac', GC_LV), ('\ud5ad', '\ud5c7', GC_LVT), ('\ud5c8', '\ud5c8', GC_LV),
-        ('\ud5c9', '\ud5e3', GC_LVT), ('\ud5e4', '\ud5e4', GC_LV), ('\ud5e5', '\ud5ff', GC_LVT),
-        ('\ud600', '\ud600', GC_LV), ('\ud601', '\ud61b', GC_LVT), ('\ud61c', '\ud61c', GC_LV),
-        ('\ud61d', '\ud637', GC_LVT), ('\ud638', '\ud638', GC_LV), ('\ud639', '\ud653', GC_LVT),
-        ('\ud654', '\ud654', GC_LV), ('\ud655', '\ud66f', GC_LVT), ('\ud670', '\ud670', GC_LV),
-        ('\ud671', '\ud68b', GC_LVT), ('\ud68c', '\ud68c', GC_LV), ('\ud68d', '\ud6a7', GC_LVT),
-        ('\ud6a8', '\ud6a8', GC_LV), ('\ud6a9', '\ud6c3', GC_LVT), ('\ud6c4', '\ud6c4', GC_LV),
-        ('\ud6c5', '\ud6df', GC_LVT), ('\ud6e0', '\ud6e0', GC_LV), ('\ud6e1', '\ud6fb', GC_LVT),
-        ('\ud6fc', '\ud6fc', GC_LV), ('\ud6fd', '\ud717', GC_LVT), ('\ud718', '\ud718', GC_LV),
-        ('\ud719', '\ud733', GC_LVT), ('\ud734', '\ud734', GC_LV), ('\ud735', '\ud74f', GC_LVT),
-        ('\ud750', '\ud750', GC_LV), ('\ud751', '\ud76b', GC_LVT), ('\ud76c', '\ud76c', GC_LV),
-        ('\ud76d', '\ud787', GC_LVT), ('\ud788', '\ud788', GC_LV), ('\ud789', '\ud7a3', GC_LVT),
-        ('\ud7b0', '\ud7c6', GC_V), ('\ud7cb', '\ud7fb', GC_T), ('\ufb1e', '\ufb1e', GC_Extend),
-        ('\ufe00', '\ufe0f', GC_Extend), ('\ufe20', '\ufe2d', GC_Extend), ('\ufeff', '\ufeff',
-        GC_Control), ('\uff9e', '\uff9f', GC_Extend), ('\ufff0', '\ufffb', GC_Control),
-        ('\U000101fd', '\U000101fd', GC_Extend), ('\U000102e0', '\U000102e0', GC_Extend),
-        ('\U00010376', '\U0001037a', GC_Extend), ('\U00010a01', '\U00010a03', GC_Extend),
-        ('\U00010a05', '\U00010a06', GC_Extend), ('\U00010a0c', '\U00010a0f', GC_Extend),
-        ('\U00010a38', '\U00010a3a', GC_Extend), ('\U00010a3f', '\U00010a3f', GC_Extend),
-        ('\U00010ae5', '\U00010ae6', GC_Extend), ('\U00011000', '\U00011000', GC_SpacingMark),
-        ('\U00011001', '\U00011001', GC_Extend), ('\U00011002', '\U00011002', GC_SpacingMark),
-        ('\U00011038', '\U00011046', GC_Extend), ('\U0001107f', '\U00011081', GC_Extend),
-        ('\U00011082', '\U00011082', GC_SpacingMark), ('\U000110b0', '\U000110b2', GC_SpacingMark),
-        ('\U000110b3', '\U000110b6', GC_Extend), ('\U000110b7', '\U000110b8', GC_SpacingMark),
-        ('\U000110b9', '\U000110ba', GC_Extend), ('\U000110bd', '\U000110bd', GC_Control),
-        ('\U00011100', '\U00011102', GC_Extend), ('\U00011127', '\U0001112b', GC_Extend),
-        ('\U0001112c', '\U0001112c', GC_SpacingMark), ('\U0001112d', '\U00011134', GC_Extend),
-        ('\U00011173', '\U00011173', GC_Extend), ('\U00011180', '\U00011181', GC_Extend),
-        ('\U00011182', '\U00011182', GC_SpacingMark), ('\U000111b3', '\U000111b5', GC_SpacingMark),
-        ('\U000111b6', '\U000111be', GC_Extend), ('\U000111bf', '\U000111c0', GC_SpacingMark),
-        ('\U0001122c', '\U0001122e', GC_SpacingMark), ('\U0001122f', '\U00011231', GC_Extend),
-        ('\U00011232', '\U00011233', GC_SpacingMark), ('\U00011234', '\U00011234', GC_Extend),
-        ('\U00011235', '\U00011235', GC_SpacingMark), ('\U00011236', '\U00011237', GC_Extend),
-        ('\U000112df', '\U000112df', GC_Extend), ('\U000112e0', '\U000112e2', GC_SpacingMark),
-        ('\U000112e3', '\U000112ea', GC_Extend), ('\U00011301', '\U00011301', GC_Extend),
-        ('\U00011302', '\U00011303', GC_SpacingMark), ('\U0001133c', '\U0001133c', GC_Extend),
-        ('\U0001133e', '\U0001133e', GC_Extend), ('\U0001133f', '\U0001133f', GC_SpacingMark),
-        ('\U00011340', '\U00011340', GC_Extend), ('\U00011341', '\U00011344', GC_SpacingMark),
-        ('\U00011347', '\U00011348', GC_SpacingMark), ('\U0001134b', '\U0001134d', GC_SpacingMark),
-        ('\U00011357', '\U00011357', GC_Extend), ('\U00011362', '\U00011363', GC_SpacingMark),
-        ('\U00011366', '\U0001136c', GC_Extend), ('\U00011370', '\U00011374', GC_Extend),
-        ('\U000114b0', '\U000114b0', GC_Extend), ('\U000114b1', '\U000114b2', GC_SpacingMark),
-        ('\U000114b3', '\U000114b8', GC_Extend), ('\U000114b9', '\U000114b9', GC_SpacingMark),
-        ('\U000114ba', '\U000114ba', GC_Extend), ('\U000114bb', '\U000114bc', GC_SpacingMark),
-        ('\U000114bd', '\U000114bd', GC_Extend), ('\U000114be', '\U000114be', GC_SpacingMark),
-        ('\U000114bf', '\U000114c0', GC_Extend), ('\U000114c1', '\U000114c1', GC_SpacingMark),
-        ('\U000114c2', '\U000114c3', GC_Extend), ('\U000115af', '\U000115af', GC_Extend),
-        ('\U000115b0', '\U000115b1', GC_SpacingMark), ('\U000115b2', '\U000115b5', GC_Extend),
-        ('\U000115b8', '\U000115bb', GC_SpacingMark), ('\U000115bc', '\U000115bd', GC_Extend),
-        ('\U000115be', '\U000115be', GC_SpacingMark), ('\U000115bf', '\U000115c0', GC_Extend),
-        ('\U00011630', '\U00011632', GC_SpacingMark), ('\U00011633', '\U0001163a', GC_Extend),
-        ('\U0001163b', '\U0001163c', GC_SpacingMark), ('\U0001163d', '\U0001163d', GC_Extend),
-        ('\U0001163e', '\U0001163e', GC_SpacingMark), ('\U0001163f', '\U00011640', GC_Extend),
-        ('\U000116ab', '\U000116ab', GC_Extend), ('\U000116ac', '\U000116ac', GC_SpacingMark),
-        ('\U000116ad', '\U000116ad', GC_Extend), ('\U000116ae', '\U000116af', GC_SpacingMark),
-        ('\U000116b0', '\U000116b5', GC_Extend), ('\U000116b6', '\U000116b6', GC_SpacingMark),
-        ('\U000116b7', '\U000116b7', GC_Extend), ('\U00016af0', '\U00016af4', GC_Extend),
-        ('\U00016b30', '\U00016b36', GC_Extend), ('\U00016f51', '\U00016f7e', GC_SpacingMark),
-        ('\U00016f8f', '\U00016f92', GC_Extend), ('\U0001bc9d', '\U0001bc9e', GC_Extend),
-        ('\U0001bca0', '\U0001bca3', GC_Control), ('\U0001d165', '\U0001d165', GC_Extend),
-        ('\U0001d166', '\U0001d166', GC_SpacingMark), ('\U0001d167', '\U0001d169', GC_Extend),
-        ('\U0001d16d', '\U0001d16d', GC_SpacingMark), ('\U0001d16e', '\U0001d172', GC_Extend),
-        ('\U0001d173', '\U0001d17a', GC_Control), ('\U0001d17b', '\U0001d182', GC_Extend),
-        ('\U0001d185', '\U0001d18b', GC_Extend), ('\U0001d1aa', '\U0001d1ad', GC_Extend),
-        ('\U0001d242', '\U0001d244', GC_Extend), ('\U0001e8d0', '\U0001e8d6', GC_Extend),
-        ('\U0001f1e6', '\U0001f1ff', GC_RegionalIndicator), ('\U000e0000', '\U000e00ff',
-        GC_Control), ('\U000e0100', '\U000e01ef', GC_Extend), ('\U000e01f0', '\U000e0fff',
-        GC_Control)
+        ('\u{0}', '\u{1f}', GC_Control), ('\u{7f}', '\u{9f}', GC_Control), ('\u{ad}', '\u{ad}',
+        GC_Control), ('\u{300}', '\u{36f}', GC_Extend), ('\u{483}', '\u{487}', GC_Extend),
+        ('\u{488}', '\u{489}', GC_Extend), ('\u{591}', '\u{5bd}', GC_Extend), ('\u{5bf}', '\u{5bf}',
+        GC_Extend), ('\u{5c1}', '\u{5c2}', GC_Extend), ('\u{5c4}', '\u{5c5}', GC_Extend),
+        ('\u{5c7}', '\u{5c7}', GC_Extend), ('\u{600}', '\u{605}', GC_Control), ('\u{610}',
+        '\u{61a}', GC_Extend), ('\u{61c}', '\u{61c}', GC_Control), ('\u{64b}', '\u{65f}',
+        GC_Extend), ('\u{670}', '\u{670}', GC_Extend), ('\u{6d6}', '\u{6dc}', GC_Extend),
+        ('\u{6dd}', '\u{6dd}', GC_Control), ('\u{6df}', '\u{6e4}', GC_Extend), ('\u{6e7}',
+        '\u{6e8}', GC_Extend), ('\u{6ea}', '\u{6ed}', GC_Extend), ('\u{70f}', '\u{70f}',
+        GC_Control), ('\u{711}', '\u{711}', GC_Extend), ('\u{730}', '\u{74a}', GC_Extend),
+        ('\u{7a6}', '\u{7b0}', GC_Extend), ('\u{7eb}', '\u{7f3}', GC_Extend), ('\u{816}', '\u{819}',
+        GC_Extend), ('\u{81b}', '\u{823}', GC_Extend), ('\u{825}', '\u{827}', GC_Extend),
+        ('\u{829}', '\u{82d}', GC_Extend), ('\u{859}', '\u{85b}', GC_Extend), ('\u{8e4}', '\u{902}',
+        GC_Extend), ('\u{903}', '\u{903}', GC_SpacingMark), ('\u{93a}', '\u{93a}', GC_Extend),
+        ('\u{93b}', '\u{93b}', GC_SpacingMark), ('\u{93c}', '\u{93c}', GC_Extend), ('\u{93e}',
+        '\u{940}', GC_SpacingMark), ('\u{941}', '\u{948}', GC_Extend), ('\u{949}', '\u{94c}',
+        GC_SpacingMark), ('\u{94d}', '\u{94d}', GC_Extend), ('\u{94e}', '\u{94f}', GC_SpacingMark),
+        ('\u{951}', '\u{957}', GC_Extend), ('\u{962}', '\u{963}', GC_Extend), ('\u{981}', '\u{981}',
+        GC_Extend), ('\u{982}', '\u{983}', GC_SpacingMark), ('\u{9bc}', '\u{9bc}', GC_Extend),
+        ('\u{9be}', '\u{9be}', GC_Extend), ('\u{9bf}', '\u{9c0}', GC_SpacingMark), ('\u{9c1}',
+        '\u{9c4}', GC_Extend), ('\u{9c7}', '\u{9c8}', GC_SpacingMark), ('\u{9cb}', '\u{9cc}',
+        GC_SpacingMark), ('\u{9cd}', '\u{9cd}', GC_Extend), ('\u{9d7}', '\u{9d7}', GC_Extend),
+        ('\u{9e2}', '\u{9e3}', GC_Extend), ('\u{a01}', '\u{a02}', GC_Extend), ('\u{a03}', '\u{a03}',
+        GC_SpacingMark), ('\u{a3c}', '\u{a3c}', GC_Extend), ('\u{a3e}', '\u{a40}', GC_SpacingMark),
+        ('\u{a41}', '\u{a42}', GC_Extend), ('\u{a47}', '\u{a48}', GC_Extend), ('\u{a4b}', '\u{a4d}',
+        GC_Extend), ('\u{a51}', '\u{a51}', GC_Extend), ('\u{a70}', '\u{a71}', GC_Extend),
+        ('\u{a75}', '\u{a75}', GC_Extend), ('\u{a81}', '\u{a82}', GC_Extend), ('\u{a83}', '\u{a83}',
+        GC_SpacingMark), ('\u{abc}', '\u{abc}', GC_Extend), ('\u{abe}', '\u{ac0}', GC_SpacingMark),
+        ('\u{ac1}', '\u{ac5}', GC_Extend), ('\u{ac7}', '\u{ac8}', GC_Extend), ('\u{ac9}', '\u{ac9}',
+        GC_SpacingMark), ('\u{acb}', '\u{acc}', GC_SpacingMark), ('\u{acd}', '\u{acd}', GC_Extend),
+        ('\u{ae2}', '\u{ae3}', GC_Extend), ('\u{b01}', '\u{b01}', GC_Extend), ('\u{b02}', '\u{b03}',
+        GC_SpacingMark), ('\u{b3c}', '\u{b3c}', GC_Extend), ('\u{b3e}', '\u{b3e}', GC_Extend),
+        ('\u{b3f}', '\u{b3f}', GC_Extend), ('\u{b40}', '\u{b40}', GC_SpacingMark), ('\u{b41}',
+        '\u{b44}', GC_Extend), ('\u{b47}', '\u{b48}', GC_SpacingMark), ('\u{b4b}', '\u{b4c}',
+        GC_SpacingMark), ('\u{b4d}', '\u{b4d}', GC_Extend), ('\u{b56}', '\u{b56}', GC_Extend),
+        ('\u{b57}', '\u{b57}', GC_Extend), ('\u{b62}', '\u{b63}', GC_Extend), ('\u{b82}', '\u{b82}',
+        GC_Extend), ('\u{bbe}', '\u{bbe}', GC_Extend), ('\u{bbf}', '\u{bbf}', GC_SpacingMark),
+        ('\u{bc0}', '\u{bc0}', GC_Extend), ('\u{bc1}', '\u{bc2}', GC_SpacingMark), ('\u{bc6}',
+        '\u{bc8}', GC_SpacingMark), ('\u{bca}', '\u{bcc}', GC_SpacingMark), ('\u{bcd}', '\u{bcd}',
+        GC_Extend), ('\u{bd7}', '\u{bd7}', GC_Extend), ('\u{c00}', '\u{c00}', GC_Extend),
+        ('\u{c01}', '\u{c03}', GC_SpacingMark), ('\u{c3e}', '\u{c40}', GC_Extend), ('\u{c41}',
+        '\u{c44}', GC_SpacingMark), ('\u{c46}', '\u{c48}', GC_Extend), ('\u{c4a}', '\u{c4d}',
+        GC_Extend), ('\u{c55}', '\u{c56}', GC_Extend), ('\u{c62}', '\u{c63}', GC_Extend),
+        ('\u{c81}', '\u{c81}', GC_Extend), ('\u{c82}', '\u{c83}', GC_SpacingMark), ('\u{cbc}',
+        '\u{cbc}', GC_Extend), ('\u{cbe}', '\u{cbe}', GC_SpacingMark), ('\u{cbf}', '\u{cbf}',
+        GC_Extend), ('\u{cc0}', '\u{cc1}', GC_SpacingMark), ('\u{cc2}', '\u{cc2}', GC_Extend),
+        ('\u{cc3}', '\u{cc4}', GC_SpacingMark), ('\u{cc6}', '\u{cc6}', GC_Extend), ('\u{cc7}',
+        '\u{cc8}', GC_SpacingMark), ('\u{cca}', '\u{ccb}', GC_SpacingMark), ('\u{ccc}', '\u{ccd}',
+        GC_Extend), ('\u{cd5}', '\u{cd6}', GC_Extend), ('\u{ce2}', '\u{ce3}', GC_Extend),
+        ('\u{d01}', '\u{d01}', GC_Extend), ('\u{d02}', '\u{d03}', GC_SpacingMark), ('\u{d3e}',
+        '\u{d3e}', GC_Extend), ('\u{d3f}', '\u{d40}', GC_SpacingMark), ('\u{d41}', '\u{d44}',
+        GC_Extend), ('\u{d46}', '\u{d48}', GC_SpacingMark), ('\u{d4a}', '\u{d4c}', GC_SpacingMark),
+        ('\u{d4d}', '\u{d4d}', GC_Extend), ('\u{d57}', '\u{d57}', GC_Extend), ('\u{d62}', '\u{d63}',
+        GC_Extend), ('\u{d82}', '\u{d83}', GC_SpacingMark), ('\u{dca}', '\u{dca}', GC_Extend),
+        ('\u{dcf}', '\u{dcf}', GC_Extend), ('\u{dd0}', '\u{dd1}', GC_SpacingMark), ('\u{dd2}',
+        '\u{dd4}', GC_Extend), ('\u{dd6}', '\u{dd6}', GC_Extend), ('\u{dd8}', '\u{dde}',
+        GC_SpacingMark), ('\u{ddf}', '\u{ddf}', GC_Extend), ('\u{df2}', '\u{df3}', GC_SpacingMark),
+        ('\u{e31}', '\u{e31}', GC_Extend), ('\u{e33}', '\u{e33}', GC_SpacingMark), ('\u{e34}',
+        '\u{e3a}', GC_Extend), ('\u{e47}', '\u{e4e}', GC_Extend), ('\u{eb1}', '\u{eb1}', GC_Extend),
+        ('\u{eb3}', '\u{eb3}', GC_SpacingMark), ('\u{eb4}', '\u{eb9}', GC_Extend), ('\u{ebb}',
+        '\u{ebc}', GC_Extend), ('\u{ec8}', '\u{ecd}', GC_Extend), ('\u{f18}', '\u{f19}', GC_Extend),
+        ('\u{f35}', '\u{f35}', GC_Extend), ('\u{f37}', '\u{f37}', GC_Extend), ('\u{f39}', '\u{f39}',
+        GC_Extend), ('\u{f3e}', '\u{f3f}', GC_SpacingMark), ('\u{f71}', '\u{f7e}', GC_Extend),
+        ('\u{f7f}', '\u{f7f}', GC_SpacingMark), ('\u{f80}', '\u{f84}', GC_Extend), ('\u{f86}',
+        '\u{f87}', GC_Extend), ('\u{f8d}', '\u{f97}', GC_Extend), ('\u{f99}', '\u{fbc}', GC_Extend),
+        ('\u{fc6}', '\u{fc6}', GC_Extend), ('\u{102b}', '\u{102c}', GC_SpacingMark), ('\u{102d}',
+        '\u{1030}', GC_Extend), ('\u{1031}', '\u{1031}', GC_SpacingMark), ('\u{1032}', '\u{1037}',
+        GC_Extend), ('\u{1038}', '\u{1038}', GC_SpacingMark), ('\u{1039}', '\u{103a}', GC_Extend),
+        ('\u{103b}', '\u{103c}', GC_SpacingMark), ('\u{103d}', '\u{103e}', GC_Extend), ('\u{1056}',
+        '\u{1057}', GC_SpacingMark), ('\u{1058}', '\u{1059}', GC_Extend), ('\u{105e}', '\u{1060}',
+        GC_Extend), ('\u{1062}', '\u{1064}', GC_SpacingMark), ('\u{1067}', '\u{106d}',
+        GC_SpacingMark), ('\u{1071}', '\u{1074}', GC_Extend), ('\u{1082}', '\u{1082}', GC_Extend),
+        ('\u{1083}', '\u{1084}', GC_SpacingMark), ('\u{1085}', '\u{1086}', GC_Extend), ('\u{1087}',
+        '\u{108c}', GC_SpacingMark), ('\u{108d}', '\u{108d}', GC_Extend), ('\u{108f}', '\u{108f}',
+        GC_SpacingMark), ('\u{109a}', '\u{109c}', GC_SpacingMark), ('\u{109d}', '\u{109d}',
+        GC_Extend), ('\u{1100}', '\u{115f}', GC_L), ('\u{1160}', '\u{11a7}', GC_V), ('\u{11a8}',
+        '\u{11ff}', GC_T), ('\u{135d}', '\u{135f}', GC_Extend), ('\u{1712}', '\u{1714}', GC_Extend),
+        ('\u{1732}', '\u{1734}', GC_Extend), ('\u{1752}', '\u{1753}', GC_Extend), ('\u{1772}',
+        '\u{1773}', GC_Extend), ('\u{17b4}', '\u{17b5}', GC_Extend), ('\u{17b6}', '\u{17b6}',
+        GC_SpacingMark), ('\u{17b7}', '\u{17bd}', GC_Extend), ('\u{17be}', '\u{17c5}',
+        GC_SpacingMark), ('\u{17c6}', '\u{17c6}', GC_Extend), ('\u{17c7}', '\u{17c8}',
+        GC_SpacingMark), ('\u{17c9}', '\u{17d3}', GC_Extend), ('\u{17dd}', '\u{17dd}', GC_Extend),
+        ('\u{180b}', '\u{180d}', GC_Extend), ('\u{180e}', '\u{180e}', GC_Control), ('\u{18a9}',
+        '\u{18a9}', GC_Extend), ('\u{1920}', '\u{1922}', GC_Extend), ('\u{1923}', '\u{1926}',
+        GC_SpacingMark), ('\u{1927}', '\u{1928}', GC_Extend), ('\u{1929}', '\u{192b}',
+        GC_SpacingMark), ('\u{1930}', '\u{1931}', GC_SpacingMark), ('\u{1932}', '\u{1932}',
+        GC_Extend), ('\u{1933}', '\u{1938}', GC_SpacingMark), ('\u{1939}', '\u{193b}', GC_Extend),
+        ('\u{19b0}', '\u{19c0}', GC_SpacingMark), ('\u{19c8}', '\u{19c9}', GC_SpacingMark),
+        ('\u{1a17}', '\u{1a18}', GC_Extend), ('\u{1a19}', '\u{1a1a}', GC_SpacingMark), ('\u{1a1b}',
+        '\u{1a1b}', GC_Extend), ('\u{1a55}', '\u{1a55}', GC_SpacingMark), ('\u{1a56}', '\u{1a56}',
+        GC_Extend), ('\u{1a57}', '\u{1a57}', GC_SpacingMark), ('\u{1a58}', '\u{1a5e}', GC_Extend),
+        ('\u{1a60}', '\u{1a60}', GC_Extend), ('\u{1a61}', '\u{1a61}', GC_SpacingMark), ('\u{1a62}',
+        '\u{1a62}', GC_Extend), ('\u{1a63}', '\u{1a64}', GC_SpacingMark), ('\u{1a65}', '\u{1a6c}',
+        GC_Extend), ('\u{1a6d}', '\u{1a72}', GC_SpacingMark), ('\u{1a73}', '\u{1a7c}', GC_Extend),
+        ('\u{1a7f}', '\u{1a7f}', GC_Extend), ('\u{1ab0}', '\u{1abd}', GC_Extend), ('\u{1abe}',
+        '\u{1abe}', GC_Extend), ('\u{1b00}', '\u{1b03}', GC_Extend), ('\u{1b04}', '\u{1b04}',
+        GC_SpacingMark), ('\u{1b34}', '\u{1b34}', GC_Extend), ('\u{1b35}', '\u{1b35}',
+        GC_SpacingMark), ('\u{1b36}', '\u{1b3a}', GC_Extend), ('\u{1b3b}', '\u{1b3b}',
+        GC_SpacingMark), ('\u{1b3c}', '\u{1b3c}', GC_Extend), ('\u{1b3d}', '\u{1b41}',
+        GC_SpacingMark), ('\u{1b42}', '\u{1b42}', GC_Extend), ('\u{1b43}', '\u{1b44}',
+        GC_SpacingMark), ('\u{1b6b}', '\u{1b73}', GC_Extend), ('\u{1b80}', '\u{1b81}', GC_Extend),
+        ('\u{1b82}', '\u{1b82}', GC_SpacingMark), ('\u{1ba1}', '\u{1ba1}', GC_SpacingMark),
+        ('\u{1ba2}', '\u{1ba5}', GC_Extend), ('\u{1ba6}', '\u{1ba7}', GC_SpacingMark), ('\u{1ba8}',
+        '\u{1ba9}', GC_Extend), ('\u{1baa}', '\u{1baa}', GC_SpacingMark), ('\u{1bab}', '\u{1bad}',
+        GC_Extend), ('\u{1be6}', '\u{1be6}', GC_Extend), ('\u{1be7}', '\u{1be7}', GC_SpacingMark),
+        ('\u{1be8}', '\u{1be9}', GC_Extend), ('\u{1bea}', '\u{1bec}', GC_SpacingMark), ('\u{1bed}',
+        '\u{1bed}', GC_Extend), ('\u{1bee}', '\u{1bee}', GC_SpacingMark), ('\u{1bef}', '\u{1bf1}',
+        GC_Extend), ('\u{1bf2}', '\u{1bf3}', GC_SpacingMark), ('\u{1c24}', '\u{1c2b}',
+        GC_SpacingMark), ('\u{1c2c}', '\u{1c33}', GC_Extend), ('\u{1c34}', '\u{1c35}',
+        GC_SpacingMark), ('\u{1c36}', '\u{1c37}', GC_Extend), ('\u{1cd0}', '\u{1cd2}', GC_Extend),
+        ('\u{1cd4}', '\u{1ce0}', GC_Extend), ('\u{1ce1}', '\u{1ce1}', GC_SpacingMark), ('\u{1ce2}',
+        '\u{1ce8}', GC_Extend), ('\u{1ced}', '\u{1ced}', GC_Extend), ('\u{1cf2}', '\u{1cf3}',
+        GC_SpacingMark), ('\u{1cf4}', '\u{1cf4}', GC_Extend), ('\u{1cf8}', '\u{1cf9}', GC_Extend),
+        ('\u{1dc0}', '\u{1df5}', GC_Extend), ('\u{1dfc}', '\u{1dff}', GC_Extend), ('\u{200b}',
+        '\u{200b}', GC_Control), ('\u{200c}', '\u{200d}', GC_Extend), ('\u{200e}', '\u{200f}',
+        GC_Control), ('\u{2028}', '\u{202e}', GC_Control), ('\u{2060}', '\u{206f}', GC_Control),
+        ('\u{20d0}', '\u{20dc}', GC_Extend), ('\u{20dd}', '\u{20e0}', GC_Extend), ('\u{20e1}',
+        '\u{20e1}', GC_Extend), ('\u{20e2}', '\u{20e4}', GC_Extend), ('\u{20e5}', '\u{20f0}',
+        GC_Extend), ('\u{2cef}', '\u{2cf1}', GC_Extend), ('\u{2d7f}', '\u{2d7f}', GC_Extend),
+        ('\u{2de0}', '\u{2dff}', GC_Extend), ('\u{302a}', '\u{302d}', GC_Extend), ('\u{302e}',
+        '\u{302f}', GC_Extend), ('\u{3099}', '\u{309a}', GC_Extend), ('\u{a66f}', '\u{a66f}',
+        GC_Extend), ('\u{a670}', '\u{a672}', GC_Extend), ('\u{a674}', '\u{a67d}', GC_Extend),
+        ('\u{a69f}', '\u{a69f}', GC_Extend), ('\u{a6f0}', '\u{a6f1}', GC_Extend), ('\u{a802}',
+        '\u{a802}', GC_Extend), ('\u{a806}', '\u{a806}', GC_Extend), ('\u{a80b}', '\u{a80b}',
+        GC_Extend), ('\u{a823}', '\u{a824}', GC_SpacingMark), ('\u{a825}', '\u{a826}', GC_Extend),
+        ('\u{a827}', '\u{a827}', GC_SpacingMark), ('\u{a880}', '\u{a881}', GC_SpacingMark),
+        ('\u{a8b4}', '\u{a8c3}', GC_SpacingMark), ('\u{a8c4}', '\u{a8c4}', GC_Extend), ('\u{a8e0}',
+        '\u{a8f1}', GC_Extend), ('\u{a926}', '\u{a92d}', GC_Extend), ('\u{a947}', '\u{a951}',
+        GC_Extend), ('\u{a952}', '\u{a953}', GC_SpacingMark), ('\u{a960}', '\u{a97c}', GC_L),
+        ('\u{a980}', '\u{a982}', GC_Extend), ('\u{a983}', '\u{a983}', GC_SpacingMark), ('\u{a9b3}',
+        '\u{a9b3}', GC_Extend), ('\u{a9b4}', '\u{a9b5}', GC_SpacingMark), ('\u{a9b6}', '\u{a9b9}',
+        GC_Extend), ('\u{a9ba}', '\u{a9bb}', GC_SpacingMark), ('\u{a9bc}', '\u{a9bc}', GC_Extend),
+        ('\u{a9bd}', '\u{a9c0}', GC_SpacingMark), ('\u{a9e5}', '\u{a9e5}', GC_Extend), ('\u{aa29}',
+        '\u{aa2e}', GC_Extend), ('\u{aa2f}', '\u{aa30}', GC_SpacingMark), ('\u{aa31}', '\u{aa32}',
+        GC_Extend), ('\u{aa33}', '\u{aa34}', GC_SpacingMark), ('\u{aa35}', '\u{aa36}', GC_Extend),
+        ('\u{aa43}', '\u{aa43}', GC_Extend), ('\u{aa4c}', '\u{aa4c}', GC_Extend), ('\u{aa4d}',
+        '\u{aa4d}', GC_SpacingMark), ('\u{aa7b}', '\u{aa7b}', GC_SpacingMark), ('\u{aa7c}',
+        '\u{aa7c}', GC_Extend), ('\u{aa7d}', '\u{aa7d}', GC_SpacingMark), ('\u{aab0}', '\u{aab0}',
+        GC_Extend), ('\u{aab2}', '\u{aab4}', GC_Extend), ('\u{aab7}', '\u{aab8}', GC_Extend),
+        ('\u{aabe}', '\u{aabf}', GC_Extend), ('\u{aac1}', '\u{aac1}', GC_Extend), ('\u{aaeb}',
+        '\u{aaeb}', GC_SpacingMark), ('\u{aaec}', '\u{aaed}', GC_Extend), ('\u{aaee}', '\u{aaef}',
+        GC_SpacingMark), ('\u{aaf5}', '\u{aaf5}', GC_SpacingMark), ('\u{aaf6}', '\u{aaf6}',
+        GC_Extend), ('\u{abe3}', '\u{abe4}', GC_SpacingMark), ('\u{abe5}', '\u{abe5}', GC_Extend),
+        ('\u{abe6}', '\u{abe7}', GC_SpacingMark), ('\u{abe8}', '\u{abe8}', GC_Extend), ('\u{abe9}',
+        '\u{abea}', GC_SpacingMark), ('\u{abec}', '\u{abec}', GC_SpacingMark), ('\u{abed}',
+        '\u{abed}', GC_Extend), ('\u{ac00}', '\u{ac00}', GC_LV), ('\u{ac01}', '\u{ac1b}', GC_LVT),
+        ('\u{ac1c}', '\u{ac1c}', GC_LV), ('\u{ac1d}', '\u{ac37}', GC_LVT), ('\u{ac38}', '\u{ac38}',
+        GC_LV), ('\u{ac39}', '\u{ac53}', GC_LVT), ('\u{ac54}', '\u{ac54}', GC_LV), ('\u{ac55}',
+        '\u{ac6f}', GC_LVT), ('\u{ac70}', '\u{ac70}', GC_LV), ('\u{ac71}', '\u{ac8b}', GC_LVT),
+        ('\u{ac8c}', '\u{ac8c}', GC_LV), ('\u{ac8d}', '\u{aca7}', GC_LVT), ('\u{aca8}', '\u{aca8}',
+        GC_LV), ('\u{aca9}', '\u{acc3}', GC_LVT), ('\u{acc4}', '\u{acc4}', GC_LV), ('\u{acc5}',
+        '\u{acdf}', GC_LVT), ('\u{ace0}', '\u{ace0}', GC_LV), ('\u{ace1}', '\u{acfb}', GC_LVT),
+        ('\u{acfc}', '\u{acfc}', GC_LV), ('\u{acfd}', '\u{ad17}', GC_LVT), ('\u{ad18}', '\u{ad18}',
+        GC_LV), ('\u{ad19}', '\u{ad33}', GC_LVT), ('\u{ad34}', '\u{ad34}', GC_LV), ('\u{ad35}',
+        '\u{ad4f}', GC_LVT), ('\u{ad50}', '\u{ad50}', GC_LV), ('\u{ad51}', '\u{ad6b}', GC_LVT),
+        ('\u{ad6c}', '\u{ad6c}', GC_LV), ('\u{ad6d}', '\u{ad87}', GC_LVT), ('\u{ad88}', '\u{ad88}',
+        GC_LV), ('\u{ad89}', '\u{ada3}', GC_LVT), ('\u{ada4}', '\u{ada4}', GC_LV), ('\u{ada5}',
+        '\u{adbf}', GC_LVT), ('\u{adc0}', '\u{adc0}', GC_LV), ('\u{adc1}', '\u{addb}', GC_LVT),
+        ('\u{addc}', '\u{addc}', GC_LV), ('\u{addd}', '\u{adf7}', GC_LVT), ('\u{adf8}', '\u{adf8}',
+        GC_LV), ('\u{adf9}', '\u{ae13}', GC_LVT), ('\u{ae14}', '\u{ae14}', GC_LV), ('\u{ae15}',
+        '\u{ae2f}', GC_LVT), ('\u{ae30}', '\u{ae30}', GC_LV), ('\u{ae31}', '\u{ae4b}', GC_LVT),
+        ('\u{ae4c}', '\u{ae4c}', GC_LV), ('\u{ae4d}', '\u{ae67}', GC_LVT), ('\u{ae68}', '\u{ae68}',
+        GC_LV), ('\u{ae69}', '\u{ae83}', GC_LVT), ('\u{ae84}', '\u{ae84}', GC_LV), ('\u{ae85}',
+        '\u{ae9f}', GC_LVT), ('\u{aea0}', '\u{aea0}', GC_LV), ('\u{aea1}', '\u{aebb}', GC_LVT),
+        ('\u{aebc}', '\u{aebc}', GC_LV), ('\u{aebd}', '\u{aed7}', GC_LVT), ('\u{aed8}', '\u{aed8}',
+        GC_LV), ('\u{aed9}', '\u{aef3}', GC_LVT), ('\u{aef4}', '\u{aef4}', GC_LV), ('\u{aef5}',
+        '\u{af0f}', GC_LVT), ('\u{af10}', '\u{af10}', GC_LV), ('\u{af11}', '\u{af2b}', GC_LVT),
+        ('\u{af2c}', '\u{af2c}', GC_LV), ('\u{af2d}', '\u{af47}', GC_LVT), ('\u{af48}', '\u{af48}',
+        GC_LV), ('\u{af49}', '\u{af63}', GC_LVT), ('\u{af64}', '\u{af64}', GC_LV), ('\u{af65}',
+        '\u{af7f}', GC_LVT), ('\u{af80}', '\u{af80}', GC_LV), ('\u{af81}', '\u{af9b}', GC_LVT),
+        ('\u{af9c}', '\u{af9c}', GC_LV), ('\u{af9d}', '\u{afb7}', GC_LVT), ('\u{afb8}', '\u{afb8}',
+        GC_LV), ('\u{afb9}', '\u{afd3}', GC_LVT), ('\u{afd4}', '\u{afd4}', GC_LV), ('\u{afd5}',
+        '\u{afef}', GC_LVT), ('\u{aff0}', '\u{aff0}', GC_LV), ('\u{aff1}', '\u{b00b}', GC_LVT),
+        ('\u{b00c}', '\u{b00c}', GC_LV), ('\u{b00d}', '\u{b027}', GC_LVT), ('\u{b028}', '\u{b028}',
+        GC_LV), ('\u{b029}', '\u{b043}', GC_LVT), ('\u{b044}', '\u{b044}', GC_LV), ('\u{b045}',
+        '\u{b05f}', GC_LVT), ('\u{b060}', '\u{b060}', GC_LV), ('\u{b061}', '\u{b07b}', GC_LVT),
+        ('\u{b07c}', '\u{b07c}', GC_LV), ('\u{b07d}', '\u{b097}', GC_LVT), ('\u{b098}', '\u{b098}',
+        GC_LV), ('\u{b099}', '\u{b0b3}', GC_LVT), ('\u{b0b4}', '\u{b0b4}', GC_LV), ('\u{b0b5}',
+        '\u{b0cf}', GC_LVT), ('\u{b0d0}', '\u{b0d0}', GC_LV), ('\u{b0d1}', '\u{b0eb}', GC_LVT),
+        ('\u{b0ec}', '\u{b0ec}', GC_LV), ('\u{b0ed}', '\u{b107}', GC_LVT), ('\u{b108}', '\u{b108}',
+        GC_LV), ('\u{b109}', '\u{b123}', GC_LVT), ('\u{b124}', '\u{b124}', GC_LV), ('\u{b125}',
+        '\u{b13f}', GC_LVT), ('\u{b140}', '\u{b140}', GC_LV), ('\u{b141}', '\u{b15b}', GC_LVT),
+        ('\u{b15c}', '\u{b15c}', GC_LV), ('\u{b15d}', '\u{b177}', GC_LVT), ('\u{b178}', '\u{b178}',
+        GC_LV), ('\u{b179}', '\u{b193}', GC_LVT), ('\u{b194}', '\u{b194}', GC_LV), ('\u{b195}',
+        '\u{b1af}', GC_LVT), ('\u{b1b0}', '\u{b1b0}', GC_LV), ('\u{b1b1}', '\u{b1cb}', GC_LVT),
+        ('\u{b1cc}', '\u{b1cc}', GC_LV), ('\u{b1cd}', '\u{b1e7}', GC_LVT), ('\u{b1e8}', '\u{b1e8}',
+        GC_LV), ('\u{b1e9}', '\u{b203}', GC_LVT), ('\u{b204}', '\u{b204}', GC_LV), ('\u{b205}',
+        '\u{b21f}', GC_LVT), ('\u{b220}', '\u{b220}', GC_LV), ('\u{b221}', '\u{b23b}', GC_LVT),
+        ('\u{b23c}', '\u{b23c}', GC_LV), ('\u{b23d}', '\u{b257}', GC_LVT), ('\u{b258}', '\u{b258}',
+        GC_LV), ('\u{b259}', '\u{b273}', GC_LVT), ('\u{b274}', '\u{b274}', GC_LV), ('\u{b275}',
+        '\u{b28f}', GC_LVT), ('\u{b290}', '\u{b290}', GC_LV), ('\u{b291}', '\u{b2ab}', GC_LVT),
+        ('\u{b2ac}', '\u{b2ac}', GC_LV), ('\u{b2ad}', '\u{b2c7}', GC_LVT), ('\u{b2c8}', '\u{b2c8}',
+        GC_LV), ('\u{b2c9}', '\u{b2e3}', GC_LVT), ('\u{b2e4}', '\u{b2e4}', GC_LV), ('\u{b2e5}',
+        '\u{b2ff}', GC_LVT), ('\u{b300}', '\u{b300}', GC_LV), ('\u{b301}', '\u{b31b}', GC_LVT),
+        ('\u{b31c}', '\u{b31c}', GC_LV), ('\u{b31d}', '\u{b337}', GC_LVT), ('\u{b338}', '\u{b338}',
+        GC_LV), ('\u{b339}', '\u{b353}', GC_LVT), ('\u{b354}', '\u{b354}', GC_LV), ('\u{b355}',
+        '\u{b36f}', GC_LVT), ('\u{b370}', '\u{b370}', GC_LV), ('\u{b371}', '\u{b38b}', GC_LVT),
+        ('\u{b38c}', '\u{b38c}', GC_LV), ('\u{b38d}', '\u{b3a7}', GC_LVT), ('\u{b3a8}', '\u{b3a8}',
+        GC_LV), ('\u{b3a9}', '\u{b3c3}', GC_LVT), ('\u{b3c4}', '\u{b3c4}', GC_LV), ('\u{b3c5}',
+        '\u{b3df}', GC_LVT), ('\u{b3e0}', '\u{b3e0}', GC_LV), ('\u{b3e1}', '\u{b3fb}', GC_LVT),
+        ('\u{b3fc}', '\u{b3fc}', GC_LV), ('\u{b3fd}', '\u{b417}', GC_LVT), ('\u{b418}', '\u{b418}',
+        GC_LV), ('\u{b419}', '\u{b433}', GC_LVT), ('\u{b434}', '\u{b434}', GC_LV), ('\u{b435}',
+        '\u{b44f}', GC_LVT), ('\u{b450}', '\u{b450}', GC_LV), ('\u{b451}', '\u{b46b}', GC_LVT),
+        ('\u{b46c}', '\u{b46c}', GC_LV), ('\u{b46d}', '\u{b487}', GC_LVT), ('\u{b488}', '\u{b488}',
+        GC_LV), ('\u{b489}', '\u{b4a3}', GC_LVT), ('\u{b4a4}', '\u{b4a4}', GC_LV), ('\u{b4a5}',
+        '\u{b4bf}', GC_LVT), ('\u{b4c0}', '\u{b4c0}', GC_LV), ('\u{b4c1}', '\u{b4db}', GC_LVT),
+        ('\u{b4dc}', '\u{b4dc}', GC_LV), ('\u{b4dd}', '\u{b4f7}', GC_LVT), ('\u{b4f8}', '\u{b4f8}',
+        GC_LV), ('\u{b4f9}', '\u{b513}', GC_LVT), ('\u{b514}', '\u{b514}', GC_LV), ('\u{b515}',
+        '\u{b52f}', GC_LVT), ('\u{b530}', '\u{b530}', GC_LV), ('\u{b531}', '\u{b54b}', GC_LVT),
+        ('\u{b54c}', '\u{b54c}', GC_LV), ('\u{b54d}', '\u{b567}', GC_LVT), ('\u{b568}', '\u{b568}',
+        GC_LV), ('\u{b569}', '\u{b583}', GC_LVT), ('\u{b584}', '\u{b584}', GC_LV), ('\u{b585}',
+        '\u{b59f}', GC_LVT), ('\u{b5a0}', '\u{b5a0}', GC_LV), ('\u{b5a1}', '\u{b5bb}', GC_LVT),
+        ('\u{b5bc}', '\u{b5bc}', GC_LV), ('\u{b5bd}', '\u{b5d7}', GC_LVT), ('\u{b5d8}', '\u{b5d8}',
+        GC_LV), ('\u{b5d9}', '\u{b5f3}', GC_LVT), ('\u{b5f4}', '\u{b5f4}', GC_LV), ('\u{b5f5}',
+        '\u{b60f}', GC_LVT), ('\u{b610}', '\u{b610}', GC_LV), ('\u{b611}', '\u{b62b}', GC_LVT),
+        ('\u{b62c}', '\u{b62c}', GC_LV), ('\u{b62d}', '\u{b647}', GC_LVT), ('\u{b648}', '\u{b648}',
+        GC_LV), ('\u{b649}', '\u{b663}', GC_LVT), ('\u{b664}', '\u{b664}', GC_LV), ('\u{b665}',
+        '\u{b67f}', GC_LVT), ('\u{b680}', '\u{b680}', GC_LV), ('\u{b681}', '\u{b69b}', GC_LVT),
+        ('\u{b69c}', '\u{b69c}', GC_LV), ('\u{b69d}', '\u{b6b7}', GC_LVT), ('\u{b6b8}', '\u{b6b8}',
+        GC_LV), ('\u{b6b9}', '\u{b6d3}', GC_LVT), ('\u{b6d4}', '\u{b6d4}', GC_LV), ('\u{b6d5}',
+        '\u{b6ef}', GC_LVT), ('\u{b6f0}', '\u{b6f0}', GC_LV), ('\u{b6f1}', '\u{b70b}', GC_LVT),
+        ('\u{b70c}', '\u{b70c}', GC_LV), ('\u{b70d}', '\u{b727}', GC_LVT), ('\u{b728}', '\u{b728}',
+        GC_LV), ('\u{b729}', '\u{b743}', GC_LVT), ('\u{b744}', '\u{b744}', GC_LV), ('\u{b745}',
+        '\u{b75f}', GC_LVT), ('\u{b760}', '\u{b760}', GC_LV), ('\u{b761}', '\u{b77b}', GC_LVT),
+        ('\u{b77c}', '\u{b77c}', GC_LV), ('\u{b77d}', '\u{b797}', GC_LVT), ('\u{b798}', '\u{b798}',
+        GC_LV), ('\u{b799}', '\u{b7b3}', GC_LVT), ('\u{b7b4}', '\u{b7b4}', GC_LV), ('\u{b7b5}',
+        '\u{b7cf}', GC_LVT), ('\u{b7d0}', '\u{b7d0}', GC_LV), ('\u{b7d1}', '\u{b7eb}', GC_LVT),
+        ('\u{b7ec}', '\u{b7ec}', GC_LV), ('\u{b7ed}', '\u{b807}', GC_LVT), ('\u{b808}', '\u{b808}',
+        GC_LV), ('\u{b809}', '\u{b823}', GC_LVT), ('\u{b824}', '\u{b824}', GC_LV), ('\u{b825}',
+        '\u{b83f}', GC_LVT), ('\u{b840}', '\u{b840}', GC_LV), ('\u{b841}', '\u{b85b}', GC_LVT),
+        ('\u{b85c}', '\u{b85c}', GC_LV), ('\u{b85d}', '\u{b877}', GC_LVT), ('\u{b878}', '\u{b878}',
+        GC_LV), ('\u{b879}', '\u{b893}', GC_LVT), ('\u{b894}', '\u{b894}', GC_LV), ('\u{b895}',
+        '\u{b8af}', GC_LVT), ('\u{b8b0}', '\u{b8b0}', GC_LV), ('\u{b8b1}', '\u{b8cb}', GC_LVT),
+        ('\u{b8cc}', '\u{b8cc}', GC_LV), ('\u{b8cd}', '\u{b8e7}', GC_LVT), ('\u{b8e8}', '\u{b8e8}',
+        GC_LV), ('\u{b8e9}', '\u{b903}', GC_LVT), ('\u{b904}', '\u{b904}', GC_LV), ('\u{b905}',
+        '\u{b91f}', GC_LVT), ('\u{b920}', '\u{b920}', GC_LV), ('\u{b921}', '\u{b93b}', GC_LVT),
+        ('\u{b93c}', '\u{b93c}', GC_LV), ('\u{b93d}', '\u{b957}', GC_LVT), ('\u{b958}', '\u{b958}',
+        GC_LV), ('\u{b959}', '\u{b973}', GC_LVT), ('\u{b974}', '\u{b974}', GC_LV), ('\u{b975}',
+        '\u{b98f}', GC_LVT), ('\u{b990}', '\u{b990}', GC_LV), ('\u{b991}', '\u{b9ab}', GC_LVT),
+        ('\u{b9ac}', '\u{b9ac}', GC_LV), ('\u{b9ad}', '\u{b9c7}', GC_LVT), ('\u{b9c8}', '\u{b9c8}',
+        GC_LV), ('\u{b9c9}', '\u{b9e3}', GC_LVT), ('\u{b9e4}', '\u{b9e4}', GC_LV), ('\u{b9e5}',
+        '\u{b9ff}', GC_LVT), ('\u{ba00}', '\u{ba00}', GC_LV), ('\u{ba01}', '\u{ba1b}', GC_LVT),
+        ('\u{ba1c}', '\u{ba1c}', GC_LV), ('\u{ba1d}', '\u{ba37}', GC_LVT), ('\u{ba38}', '\u{ba38}',
+        GC_LV), ('\u{ba39}', '\u{ba53}', GC_LVT), ('\u{ba54}', '\u{ba54}', GC_LV), ('\u{ba55}',
+        '\u{ba6f}', GC_LVT), ('\u{ba70}', '\u{ba70}', GC_LV), ('\u{ba71}', '\u{ba8b}', GC_LVT),
+        ('\u{ba8c}', '\u{ba8c}', GC_LV), ('\u{ba8d}', '\u{baa7}', GC_LVT), ('\u{baa8}', '\u{baa8}',
+        GC_LV), ('\u{baa9}', '\u{bac3}', GC_LVT), ('\u{bac4}', '\u{bac4}', GC_LV), ('\u{bac5}',
+        '\u{badf}', GC_LVT), ('\u{bae0}', '\u{bae0}', GC_LV), ('\u{bae1}', '\u{bafb}', GC_LVT),
+        ('\u{bafc}', '\u{bafc}', GC_LV), ('\u{bafd}', '\u{bb17}', GC_LVT), ('\u{bb18}', '\u{bb18}',
+        GC_LV), ('\u{bb19}', '\u{bb33}', GC_LVT), ('\u{bb34}', '\u{bb34}', GC_LV), ('\u{bb35}',
+        '\u{bb4f}', GC_LVT), ('\u{bb50}', '\u{bb50}', GC_LV), ('\u{bb51}', '\u{bb6b}', GC_LVT),
+        ('\u{bb6c}', '\u{bb6c}', GC_LV), ('\u{bb6d}', '\u{bb87}', GC_LVT), ('\u{bb88}', '\u{bb88}',
+        GC_LV), ('\u{bb89}', '\u{bba3}', GC_LVT), ('\u{bba4}', '\u{bba4}', GC_LV), ('\u{bba5}',
+        '\u{bbbf}', GC_LVT), ('\u{bbc0}', '\u{bbc0}', GC_LV), ('\u{bbc1}', '\u{bbdb}', GC_LVT),
+        ('\u{bbdc}', '\u{bbdc}', GC_LV), ('\u{bbdd}', '\u{bbf7}', GC_LVT), ('\u{bbf8}', '\u{bbf8}',
+        GC_LV), ('\u{bbf9}', '\u{bc13}', GC_LVT), ('\u{bc14}', '\u{bc14}', GC_LV), ('\u{bc15}',
+        '\u{bc2f}', GC_LVT), ('\u{bc30}', '\u{bc30}', GC_LV), ('\u{bc31}', '\u{bc4b}', GC_LVT),
+        ('\u{bc4c}', '\u{bc4c}', GC_LV), ('\u{bc4d}', '\u{bc67}', GC_LVT), ('\u{bc68}', '\u{bc68}',
+        GC_LV), ('\u{bc69}', '\u{bc83}', GC_LVT), ('\u{bc84}', '\u{bc84}', GC_LV), ('\u{bc85}',
+        '\u{bc9f}', GC_LVT), ('\u{bca0}', '\u{bca0}', GC_LV), ('\u{bca1}', '\u{bcbb}', GC_LVT),
+        ('\u{bcbc}', '\u{bcbc}', GC_LV), ('\u{bcbd}', '\u{bcd7}', GC_LVT), ('\u{bcd8}', '\u{bcd8}',
+        GC_LV), ('\u{bcd9}', '\u{bcf3}', GC_LVT), ('\u{bcf4}', '\u{bcf4}', GC_LV), ('\u{bcf5}',
+        '\u{bd0f}', GC_LVT), ('\u{bd10}', '\u{bd10}', GC_LV), ('\u{bd11}', '\u{bd2b}', GC_LVT),
+        ('\u{bd2c}', '\u{bd2c}', GC_LV), ('\u{bd2d}', '\u{bd47}', GC_LVT), ('\u{bd48}', '\u{bd48}',
+        GC_LV), ('\u{bd49}', '\u{bd63}', GC_LVT), ('\u{bd64}', '\u{bd64}', GC_LV), ('\u{bd65}',
+        '\u{bd7f}', GC_LVT), ('\u{bd80}', '\u{bd80}', GC_LV), ('\u{bd81}', '\u{bd9b}', GC_LVT),
+        ('\u{bd9c}', '\u{bd9c}', GC_LV), ('\u{bd9d}', '\u{bdb7}', GC_LVT), ('\u{bdb8}', '\u{bdb8}',
+        GC_LV), ('\u{bdb9}', '\u{bdd3}', GC_LVT), ('\u{bdd4}', '\u{bdd4}', GC_LV), ('\u{bdd5}',
+        '\u{bdef}', GC_LVT), ('\u{bdf0}', '\u{bdf0}', GC_LV), ('\u{bdf1}', '\u{be0b}', GC_LVT),
+        ('\u{be0c}', '\u{be0c}', GC_LV), ('\u{be0d}', '\u{be27}', GC_LVT), ('\u{be28}', '\u{be28}',
+        GC_LV), ('\u{be29}', '\u{be43}', GC_LVT), ('\u{be44}', '\u{be44}', GC_LV), ('\u{be45}',
+        '\u{be5f}', GC_LVT), ('\u{be60}', '\u{be60}', GC_LV), ('\u{be61}', '\u{be7b}', GC_LVT),
+        ('\u{be7c}', '\u{be7c}', GC_LV), ('\u{be7d}', '\u{be97}', GC_LVT), ('\u{be98}', '\u{be98}',
+        GC_LV), ('\u{be99}', '\u{beb3}', GC_LVT), ('\u{beb4}', '\u{beb4}', GC_LV), ('\u{beb5}',
+        '\u{becf}', GC_LVT), ('\u{bed0}', '\u{bed0}', GC_LV), ('\u{bed1}', '\u{beeb}', GC_LVT),
+        ('\u{beec}', '\u{beec}', GC_LV), ('\u{beed}', '\u{bf07}', GC_LVT), ('\u{bf08}', '\u{bf08}',
+        GC_LV), ('\u{bf09}', '\u{bf23}', GC_LVT), ('\u{bf24}', '\u{bf24}', GC_LV), ('\u{bf25}',
+        '\u{bf3f}', GC_LVT), ('\u{bf40}', '\u{bf40}', GC_LV), ('\u{bf41}', '\u{bf5b}', GC_LVT),
+        ('\u{bf5c}', '\u{bf5c}', GC_LV), ('\u{bf5d}', '\u{bf77}', GC_LVT), ('\u{bf78}', '\u{bf78}',
+        GC_LV), ('\u{bf79}', '\u{bf93}', GC_LVT), ('\u{bf94}', '\u{bf94}', GC_LV), ('\u{bf95}',
+        '\u{bfaf}', GC_LVT), ('\u{bfb0}', '\u{bfb0}', GC_LV), ('\u{bfb1}', '\u{bfcb}', GC_LVT),
+        ('\u{bfcc}', '\u{bfcc}', GC_LV), ('\u{bfcd}', '\u{bfe7}', GC_LVT), ('\u{bfe8}', '\u{bfe8}',
+        GC_LV), ('\u{bfe9}', '\u{c003}', GC_LVT), ('\u{c004}', '\u{c004}', GC_LV), ('\u{c005}',
+        '\u{c01f}', GC_LVT), ('\u{c020}', '\u{c020}', GC_LV), ('\u{c021}', '\u{c03b}', GC_LVT),
+        ('\u{c03c}', '\u{c03c}', GC_LV), ('\u{c03d}', '\u{c057}', GC_LVT), ('\u{c058}', '\u{c058}',
+        GC_LV), ('\u{c059}', '\u{c073}', GC_LVT), ('\u{c074}', '\u{c074}', GC_LV), ('\u{c075}',
+        '\u{c08f}', GC_LVT), ('\u{c090}', '\u{c090}', GC_LV), ('\u{c091}', '\u{c0ab}', GC_LVT),
+        ('\u{c0ac}', '\u{c0ac}', GC_LV), ('\u{c0ad}', '\u{c0c7}', GC_LVT), ('\u{c0c8}', '\u{c0c8}',
+        GC_LV), ('\u{c0c9}', '\u{c0e3}', GC_LVT), ('\u{c0e4}', '\u{c0e4}', GC_LV), ('\u{c0e5}',
+        '\u{c0ff}', GC_LVT), ('\u{c100}', '\u{c100}', GC_LV), ('\u{c101}', '\u{c11b}', GC_LVT),
+        ('\u{c11c}', '\u{c11c}', GC_LV), ('\u{c11d}', '\u{c137}', GC_LVT), ('\u{c138}', '\u{c138}',
+        GC_LV), ('\u{c139}', '\u{c153}', GC_LVT), ('\u{c154}', '\u{c154}', GC_LV), ('\u{c155}',
+        '\u{c16f}', GC_LVT), ('\u{c170}', '\u{c170}', GC_LV), ('\u{c171}', '\u{c18b}', GC_LVT),
+        ('\u{c18c}', '\u{c18c}', GC_LV), ('\u{c18d}', '\u{c1a7}', GC_LVT), ('\u{c1a8}', '\u{c1a8}',
+        GC_LV), ('\u{c1a9}', '\u{c1c3}', GC_LVT), ('\u{c1c4}', '\u{c1c4}', GC_LV), ('\u{c1c5}',
+        '\u{c1df}', GC_LVT), ('\u{c1e0}', '\u{c1e0}', GC_LV), ('\u{c1e1}', '\u{c1fb}', GC_LVT),
+        ('\u{c1fc}', '\u{c1fc}', GC_LV), ('\u{c1fd}', '\u{c217}', GC_LVT), ('\u{c218}', '\u{c218}',
+        GC_LV), ('\u{c219}', '\u{c233}', GC_LVT), ('\u{c234}', '\u{c234}', GC_LV), ('\u{c235}',
+        '\u{c24f}', GC_LVT), ('\u{c250}', '\u{c250}', GC_LV), ('\u{c251}', '\u{c26b}', GC_LVT),
+        ('\u{c26c}', '\u{c26c}', GC_LV), ('\u{c26d}', '\u{c287}', GC_LVT), ('\u{c288}', '\u{c288}',
+        GC_LV), ('\u{c289}', '\u{c2a3}', GC_LVT), ('\u{c2a4}', '\u{c2a4}', GC_LV), ('\u{c2a5}',
+        '\u{c2bf}', GC_LVT), ('\u{c2c0}', '\u{c2c0}', GC_LV), ('\u{c2c1}', '\u{c2db}', GC_LVT),
+        ('\u{c2dc}', '\u{c2dc}', GC_LV), ('\u{c2dd}', '\u{c2f7}', GC_LVT), ('\u{c2f8}', '\u{c2f8}',
+        GC_LV), ('\u{c2f9}', '\u{c313}', GC_LVT), ('\u{c314}', '\u{c314}', GC_LV), ('\u{c315}',
+        '\u{c32f}', GC_LVT), ('\u{c330}', '\u{c330}', GC_LV), ('\u{c331}', '\u{c34b}', GC_LVT),
+        ('\u{c34c}', '\u{c34c}', GC_LV), ('\u{c34d}', '\u{c367}', GC_LVT), ('\u{c368}', '\u{c368}',
+        GC_LV), ('\u{c369}', '\u{c383}', GC_LVT), ('\u{c384}', '\u{c384}', GC_LV), ('\u{c385}',
+        '\u{c39f}', GC_LVT), ('\u{c3a0}', '\u{c3a0}', GC_LV), ('\u{c3a1}', '\u{c3bb}', GC_LVT),
+        ('\u{c3bc}', '\u{c3bc}', GC_LV), ('\u{c3bd}', '\u{c3d7}', GC_LVT), ('\u{c3d8}', '\u{c3d8}',
+        GC_LV), ('\u{c3d9}', '\u{c3f3}', GC_LVT), ('\u{c3f4}', '\u{c3f4}', GC_LV), ('\u{c3f5}',
+        '\u{c40f}', GC_LVT), ('\u{c410}', '\u{c410}', GC_LV), ('\u{c411}', '\u{c42b}', GC_LVT),
+        ('\u{c42c}', '\u{c42c}', GC_LV), ('\u{c42d}', '\u{c447}', GC_LVT), ('\u{c448}', '\u{c448}',
+        GC_LV), ('\u{c449}', '\u{c463}', GC_LVT), ('\u{c464}', '\u{c464}', GC_LV), ('\u{c465}',
+        '\u{c47f}', GC_LVT), ('\u{c480}', '\u{c480}', GC_LV), ('\u{c481}', '\u{c49b}', GC_LVT),
+        ('\u{c49c}', '\u{c49c}', GC_LV), ('\u{c49d}', '\u{c4b7}', GC_LVT), ('\u{c4b8}', '\u{c4b8}',
+        GC_LV), ('\u{c4b9}', '\u{c4d3}', GC_LVT), ('\u{c4d4}', '\u{c4d4}', GC_LV), ('\u{c4d5}',
+        '\u{c4ef}', GC_LVT), ('\u{c4f0}', '\u{c4f0}', GC_LV), ('\u{c4f1}', '\u{c50b}', GC_LVT),
+        ('\u{c50c}', '\u{c50c}', GC_LV), ('\u{c50d}', '\u{c527}', GC_LVT), ('\u{c528}', '\u{c528}',
+        GC_LV), ('\u{c529}', '\u{c543}', GC_LVT), ('\u{c544}', '\u{c544}', GC_LV), ('\u{c545}',
+        '\u{c55f}', GC_LVT), ('\u{c560}', '\u{c560}', GC_LV), ('\u{c561}', '\u{c57b}', GC_LVT),
+        ('\u{c57c}', '\u{c57c}', GC_LV), ('\u{c57d}', '\u{c597}', GC_LVT), ('\u{c598}', '\u{c598}',
+        GC_LV), ('\u{c599}', '\u{c5b3}', GC_LVT), ('\u{c5b4}', '\u{c5b4}', GC_LV), ('\u{c5b5}',
+        '\u{c5cf}', GC_LVT), ('\u{c5d0}', '\u{c5d0}', GC_LV), ('\u{c5d1}', '\u{c5eb}', GC_LVT),
+        ('\u{c5ec}', '\u{c5ec}', GC_LV), ('\u{c5ed}', '\u{c607}', GC_LVT), ('\u{c608}', '\u{c608}',
+        GC_LV), ('\u{c609}', '\u{c623}', GC_LVT), ('\u{c624}', '\u{c624}', GC_LV), ('\u{c625}',
+        '\u{c63f}', GC_LVT), ('\u{c640}', '\u{c640}', GC_LV), ('\u{c641}', '\u{c65b}', GC_LVT),
+        ('\u{c65c}', '\u{c65c}', GC_LV), ('\u{c65d}', '\u{c677}', GC_LVT), ('\u{c678}', '\u{c678}',
+        GC_LV), ('\u{c679}', '\u{c693}', GC_LVT), ('\u{c694}', '\u{c694}', GC_LV), ('\u{c695}',
+        '\u{c6af}', GC_LVT), ('\u{c6b0}', '\u{c6b0}', GC_LV), ('\u{c6b1}', '\u{c6cb}', GC_LVT),
+        ('\u{c6cc}', '\u{c6cc}', GC_LV), ('\u{c6cd}', '\u{c6e7}', GC_LVT), ('\u{c6e8}', '\u{c6e8}',
+        GC_LV), ('\u{c6e9}', '\u{c703}', GC_LVT), ('\u{c704}', '\u{c704}', GC_LV), ('\u{c705}',
+        '\u{c71f}', GC_LVT), ('\u{c720}', '\u{c720}', GC_LV), ('\u{c721}', '\u{c73b}', GC_LVT),
+        ('\u{c73c}', '\u{c73c}', GC_LV), ('\u{c73d}', '\u{c757}', GC_LVT), ('\u{c758}', '\u{c758}',
+        GC_LV), ('\u{c759}', '\u{c773}', GC_LVT), ('\u{c774}', '\u{c774}', GC_LV), ('\u{c775}',
+        '\u{c78f}', GC_LVT), ('\u{c790}', '\u{c790}', GC_LV), ('\u{c791}', '\u{c7ab}', GC_LVT),
+        ('\u{c7ac}', '\u{c7ac}', GC_LV), ('\u{c7ad}', '\u{c7c7}', GC_LVT), ('\u{c7c8}', '\u{c7c8}',
+        GC_LV), ('\u{c7c9}', '\u{c7e3}', GC_LVT), ('\u{c7e4}', '\u{c7e4}', GC_LV), ('\u{c7e5}',
+        '\u{c7ff}', GC_LVT), ('\u{c800}', '\u{c800}', GC_LV), ('\u{c801}', '\u{c81b}', GC_LVT),
+        ('\u{c81c}', '\u{c81c}', GC_LV), ('\u{c81d}', '\u{c837}', GC_LVT), ('\u{c838}', '\u{c838}',
+        GC_LV), ('\u{c839}', '\u{c853}', GC_LVT), ('\u{c854}', '\u{c854}', GC_LV), ('\u{c855}',
+        '\u{c86f}', GC_LVT), ('\u{c870}', '\u{c870}', GC_LV), ('\u{c871}', '\u{c88b}', GC_LVT),
+        ('\u{c88c}', '\u{c88c}', GC_LV), ('\u{c88d}', '\u{c8a7}', GC_LVT), ('\u{c8a8}', '\u{c8a8}',
+        GC_LV), ('\u{c8a9}', '\u{c8c3}', GC_LVT), ('\u{c8c4}', '\u{c8c4}', GC_LV), ('\u{c8c5}',
+        '\u{c8df}', GC_LVT), ('\u{c8e0}', '\u{c8e0}', GC_LV), ('\u{c8e1}', '\u{c8fb}', GC_LVT),
+        ('\u{c8fc}', '\u{c8fc}', GC_LV), ('\u{c8fd}', '\u{c917}', GC_LVT), ('\u{c918}', '\u{c918}',
+        GC_LV), ('\u{c919}', '\u{c933}', GC_LVT), ('\u{c934}', '\u{c934}', GC_LV), ('\u{c935}',
+        '\u{c94f}', GC_LVT), ('\u{c950}', '\u{c950}', GC_LV), ('\u{c951}', '\u{c96b}', GC_LVT),
+        ('\u{c96c}', '\u{c96c}', GC_LV), ('\u{c96d}', '\u{c987}', GC_LVT), ('\u{c988}', '\u{c988}',
+        GC_LV), ('\u{c989}', '\u{c9a3}', GC_LVT), ('\u{c9a4}', '\u{c9a4}', GC_LV), ('\u{c9a5}',
+        '\u{c9bf}', GC_LVT), ('\u{c9c0}', '\u{c9c0}', GC_LV), ('\u{c9c1}', '\u{c9db}', GC_LVT),
+        ('\u{c9dc}', '\u{c9dc}', GC_LV), ('\u{c9dd}', '\u{c9f7}', GC_LVT), ('\u{c9f8}', '\u{c9f8}',
+        GC_LV), ('\u{c9f9}', '\u{ca13}', GC_LVT), ('\u{ca14}', '\u{ca14}', GC_LV), ('\u{ca15}',
+        '\u{ca2f}', GC_LVT), ('\u{ca30}', '\u{ca30}', GC_LV), ('\u{ca31}', '\u{ca4b}', GC_LVT),
+        ('\u{ca4c}', '\u{ca4c}', GC_LV), ('\u{ca4d}', '\u{ca67}', GC_LVT), ('\u{ca68}', '\u{ca68}',
+        GC_LV), ('\u{ca69}', '\u{ca83}', GC_LVT), ('\u{ca84}', '\u{ca84}', GC_LV), ('\u{ca85}',
+        '\u{ca9f}', GC_LVT), ('\u{caa0}', '\u{caa0}', GC_LV), ('\u{caa1}', '\u{cabb}', GC_LVT),
+        ('\u{cabc}', '\u{cabc}', GC_LV), ('\u{cabd}', '\u{cad7}', GC_LVT), ('\u{cad8}', '\u{cad8}',
+        GC_LV), ('\u{cad9}', '\u{caf3}', GC_LVT), ('\u{caf4}', '\u{caf4}', GC_LV), ('\u{caf5}',
+        '\u{cb0f}', GC_LVT), ('\u{cb10}', '\u{cb10}', GC_LV), ('\u{cb11}', '\u{cb2b}', GC_LVT),
+        ('\u{cb2c}', '\u{cb2c}', GC_LV), ('\u{cb2d}', '\u{cb47}', GC_LVT), ('\u{cb48}', '\u{cb48}',
+        GC_LV), ('\u{cb49}', '\u{cb63}', GC_LVT), ('\u{cb64}', '\u{cb64}', GC_LV), ('\u{cb65}',
+        '\u{cb7f}', GC_LVT), ('\u{cb80}', '\u{cb80}', GC_LV), ('\u{cb81}', '\u{cb9b}', GC_LVT),
+        ('\u{cb9c}', '\u{cb9c}', GC_LV), ('\u{cb9d}', '\u{cbb7}', GC_LVT), ('\u{cbb8}', '\u{cbb8}',
+        GC_LV), ('\u{cbb9}', '\u{cbd3}', GC_LVT), ('\u{cbd4}', '\u{cbd4}', GC_LV), ('\u{cbd5}',
+        '\u{cbef}', GC_LVT), ('\u{cbf0}', '\u{cbf0}', GC_LV), ('\u{cbf1}', '\u{cc0b}', GC_LVT),
+        ('\u{cc0c}', '\u{cc0c}', GC_LV), ('\u{cc0d}', '\u{cc27}', GC_LVT), ('\u{cc28}', '\u{cc28}',
+        GC_LV), ('\u{cc29}', '\u{cc43}', GC_LVT), ('\u{cc44}', '\u{cc44}', GC_LV), ('\u{cc45}',
+        '\u{cc5f}', GC_LVT), ('\u{cc60}', '\u{cc60}', GC_LV), ('\u{cc61}', '\u{cc7b}', GC_LVT),
+        ('\u{cc7c}', '\u{cc7c}', GC_LV), ('\u{cc7d}', '\u{cc97}', GC_LVT), ('\u{cc98}', '\u{cc98}',
+        GC_LV), ('\u{cc99}', '\u{ccb3}', GC_LVT), ('\u{ccb4}', '\u{ccb4}', GC_LV), ('\u{ccb5}',
+        '\u{cccf}', GC_LVT), ('\u{ccd0}', '\u{ccd0}', GC_LV), ('\u{ccd1}', '\u{cceb}', GC_LVT),
+        ('\u{ccec}', '\u{ccec}', GC_LV), ('\u{cced}', '\u{cd07}', GC_LVT), ('\u{cd08}', '\u{cd08}',
+        GC_LV), ('\u{cd09}', '\u{cd23}', GC_LVT), ('\u{cd24}', '\u{cd24}', GC_LV), ('\u{cd25}',
+        '\u{cd3f}', GC_LVT), ('\u{cd40}', '\u{cd40}', GC_LV), ('\u{cd41}', '\u{cd5b}', GC_LVT),
+        ('\u{cd5c}', '\u{cd5c}', GC_LV), ('\u{cd5d}', '\u{cd77}', GC_LVT), ('\u{cd78}', '\u{cd78}',
+        GC_LV), ('\u{cd79}', '\u{cd93}', GC_LVT), ('\u{cd94}', '\u{cd94}', GC_LV), ('\u{cd95}',
+        '\u{cdaf}', GC_LVT), ('\u{cdb0}', '\u{cdb0}', GC_LV), ('\u{cdb1}', '\u{cdcb}', GC_LVT),
+        ('\u{cdcc}', '\u{cdcc}', GC_LV), ('\u{cdcd}', '\u{cde7}', GC_LVT), ('\u{cde8}', '\u{cde8}',
+        GC_LV), ('\u{cde9}', '\u{ce03}', GC_LVT), ('\u{ce04}', '\u{ce04}', GC_LV), ('\u{ce05}',
+        '\u{ce1f}', GC_LVT), ('\u{ce20}', '\u{ce20}', GC_LV), ('\u{ce21}', '\u{ce3b}', GC_LVT),
+        ('\u{ce3c}', '\u{ce3c}', GC_LV), ('\u{ce3d}', '\u{ce57}', GC_LVT), ('\u{ce58}', '\u{ce58}',
+        GC_LV), ('\u{ce59}', '\u{ce73}', GC_LVT), ('\u{ce74}', '\u{ce74}', GC_LV), ('\u{ce75}',
+        '\u{ce8f}', GC_LVT), ('\u{ce90}', '\u{ce90}', GC_LV), ('\u{ce91}', '\u{ceab}', GC_LVT),
+        ('\u{ceac}', '\u{ceac}', GC_LV), ('\u{cead}', '\u{cec7}', GC_LVT), ('\u{cec8}', '\u{cec8}',
+        GC_LV), ('\u{cec9}', '\u{cee3}', GC_LVT), ('\u{cee4}', '\u{cee4}', GC_LV), ('\u{cee5}',
+        '\u{ceff}', GC_LVT), ('\u{cf00}', '\u{cf00}', GC_LV), ('\u{cf01}', '\u{cf1b}', GC_LVT),
+        ('\u{cf1c}', '\u{cf1c}', GC_LV), ('\u{cf1d}', '\u{cf37}', GC_LVT), ('\u{cf38}', '\u{cf38}',
+        GC_LV), ('\u{cf39}', '\u{cf53}', GC_LVT), ('\u{cf54}', '\u{cf54}', GC_LV), ('\u{cf55}',
+        '\u{cf6f}', GC_LVT), ('\u{cf70}', '\u{cf70}', GC_LV), ('\u{cf71}', '\u{cf8b}', GC_LVT),
+        ('\u{cf8c}', '\u{cf8c}', GC_LV), ('\u{cf8d}', '\u{cfa7}', GC_LVT), ('\u{cfa8}', '\u{cfa8}',
+        GC_LV), ('\u{cfa9}', '\u{cfc3}', GC_LVT), ('\u{cfc4}', '\u{cfc4}', GC_LV), ('\u{cfc5}',
+        '\u{cfdf}', GC_LVT), ('\u{cfe0}', '\u{cfe0}', GC_LV), ('\u{cfe1}', '\u{cffb}', GC_LVT),
+        ('\u{cffc}', '\u{cffc}', GC_LV), ('\u{cffd}', '\u{d017}', GC_LVT), ('\u{d018}', '\u{d018}',
+        GC_LV), ('\u{d019}', '\u{d033}', GC_LVT), ('\u{d034}', '\u{d034}', GC_LV), ('\u{d035}',
+        '\u{d04f}', GC_LVT), ('\u{d050}', '\u{d050}', GC_LV), ('\u{d051}', '\u{d06b}', GC_LVT),
+        ('\u{d06c}', '\u{d06c}', GC_LV), ('\u{d06d}', '\u{d087}', GC_LVT), ('\u{d088}', '\u{d088}',
+        GC_LV), ('\u{d089}', '\u{d0a3}', GC_LVT), ('\u{d0a4}', '\u{d0a4}', GC_LV), ('\u{d0a5}',
+        '\u{d0bf}', GC_LVT), ('\u{d0c0}', '\u{d0c0}', GC_LV), ('\u{d0c1}', '\u{d0db}', GC_LVT),
+        ('\u{d0dc}', '\u{d0dc}', GC_LV), ('\u{d0dd}', '\u{d0f7}', GC_LVT), ('\u{d0f8}', '\u{d0f8}',
+        GC_LV), ('\u{d0f9}', '\u{d113}', GC_LVT), ('\u{d114}', '\u{d114}', GC_LV), ('\u{d115}',
+        '\u{d12f}', GC_LVT), ('\u{d130}', '\u{d130}', GC_LV), ('\u{d131}', '\u{d14b}', GC_LVT),
+        ('\u{d14c}', '\u{d14c}', GC_LV), ('\u{d14d}', '\u{d167}', GC_LVT), ('\u{d168}', '\u{d168}',
+        GC_LV), ('\u{d169}', '\u{d183}', GC_LVT), ('\u{d184}', '\u{d184}', GC_LV), ('\u{d185}',
+        '\u{d19f}', GC_LVT), ('\u{d1a0}', '\u{d1a0}', GC_LV), ('\u{d1a1}', '\u{d1bb}', GC_LVT),
+        ('\u{d1bc}', '\u{d1bc}', GC_LV), ('\u{d1bd}', '\u{d1d7}', GC_LVT), ('\u{d1d8}', '\u{d1d8}',
+        GC_LV), ('\u{d1d9}', '\u{d1f3}', GC_LVT), ('\u{d1f4}', '\u{d1f4}', GC_LV), ('\u{d1f5}',
+        '\u{d20f}', GC_LVT), ('\u{d210}', '\u{d210}', GC_LV), ('\u{d211}', '\u{d22b}', GC_LVT),
+        ('\u{d22c}', '\u{d22c}', GC_LV), ('\u{d22d}', '\u{d247}', GC_LVT), ('\u{d248}', '\u{d248}',
+        GC_LV), ('\u{d249}', '\u{d263}', GC_LVT), ('\u{d264}', '\u{d264}', GC_LV), ('\u{d265}',
+        '\u{d27f}', GC_LVT), ('\u{d280}', '\u{d280}', GC_LV), ('\u{d281}', '\u{d29b}', GC_LVT),
+        ('\u{d29c}', '\u{d29c}', GC_LV), ('\u{d29d}', '\u{d2b7}', GC_LVT), ('\u{d2b8}', '\u{d2b8}',
+        GC_LV), ('\u{d2b9}', '\u{d2d3}', GC_LVT), ('\u{d2d4}', '\u{d2d4}', GC_LV), ('\u{d2d5}',
+        '\u{d2ef}', GC_LVT), ('\u{d2f0}', '\u{d2f0}', GC_LV), ('\u{d2f1}', '\u{d30b}', GC_LVT),
+        ('\u{d30c}', '\u{d30c}', GC_LV), ('\u{d30d}', '\u{d327}', GC_LVT), ('\u{d328}', '\u{d328}',
+        GC_LV), ('\u{d329}', '\u{d343}', GC_LVT), ('\u{d344}', '\u{d344}', GC_LV), ('\u{d345}',
+        '\u{d35f}', GC_LVT), ('\u{d360}', '\u{d360}', GC_LV), ('\u{d361}', '\u{d37b}', GC_LVT),
+        ('\u{d37c}', '\u{d37c}', GC_LV), ('\u{d37d}', '\u{d397}', GC_LVT), ('\u{d398}', '\u{d398}',
+        GC_LV), ('\u{d399}', '\u{d3b3}', GC_LVT), ('\u{d3b4}', '\u{d3b4}', GC_LV), ('\u{d3b5}',
+        '\u{d3cf}', GC_LVT), ('\u{d3d0}', '\u{d3d0}', GC_LV), ('\u{d3d1}', '\u{d3eb}', GC_LVT),
+        ('\u{d3ec}', '\u{d3ec}', GC_LV), ('\u{d3ed}', '\u{d407}', GC_LVT), ('\u{d408}', '\u{d408}',
+        GC_LV), ('\u{d409}', '\u{d423}', GC_LVT), ('\u{d424}', '\u{d424}', GC_LV), ('\u{d425}',
+        '\u{d43f}', GC_LVT), ('\u{d440}', '\u{d440}', GC_LV), ('\u{d441}', '\u{d45b}', GC_LVT),
+        ('\u{d45c}', '\u{d45c}', GC_LV), ('\u{d45d}', '\u{d477}', GC_LVT), ('\u{d478}', '\u{d478}',
+        GC_LV), ('\u{d479}', '\u{d493}', GC_LVT), ('\u{d494}', '\u{d494}', GC_LV), ('\u{d495}',
+        '\u{d4af}', GC_LVT), ('\u{d4b0}', '\u{d4b0}', GC_LV), ('\u{d4b1}', '\u{d4cb}', GC_LVT),
+        ('\u{d4cc}', '\u{d4cc}', GC_LV), ('\u{d4cd}', '\u{d4e7}', GC_LVT), ('\u{d4e8}', '\u{d4e8}',
+        GC_LV), ('\u{d4e9}', '\u{d503}', GC_LVT), ('\u{d504}', '\u{d504}', GC_LV), ('\u{d505}',
+        '\u{d51f}', GC_LVT), ('\u{d520}', '\u{d520}', GC_LV), ('\u{d521}', '\u{d53b}', GC_LVT),
+        ('\u{d53c}', '\u{d53c}', GC_LV), ('\u{d53d}', '\u{d557}', GC_LVT), ('\u{d558}', '\u{d558}',
+        GC_LV), ('\u{d559}', '\u{d573}', GC_LVT), ('\u{d574}', '\u{d574}', GC_LV), ('\u{d575}',
+        '\u{d58f}', GC_LVT), ('\u{d590}', '\u{d590}', GC_LV), ('\u{d591}', '\u{d5ab}', GC_LVT),
+        ('\u{d5ac}', '\u{d5ac}', GC_LV), ('\u{d5ad}', '\u{d5c7}', GC_LVT), ('\u{d5c8}', '\u{d5c8}',
+        GC_LV), ('\u{d5c9}', '\u{d5e3}', GC_LVT), ('\u{d5e4}', '\u{d5e4}', GC_LV), ('\u{d5e5}',
+        '\u{d5ff}', GC_LVT), ('\u{d600}', '\u{d600}', GC_LV), ('\u{d601}', '\u{d61b}', GC_LVT),
+        ('\u{d61c}', '\u{d61c}', GC_LV), ('\u{d61d}', '\u{d637}', GC_LVT), ('\u{d638}', '\u{d638}',
+        GC_LV), ('\u{d639}', '\u{d653}', GC_LVT), ('\u{d654}', '\u{d654}', GC_LV), ('\u{d655}',
+        '\u{d66f}', GC_LVT), ('\u{d670}', '\u{d670}', GC_LV), ('\u{d671}', '\u{d68b}', GC_LVT),
+        ('\u{d68c}', '\u{d68c}', GC_LV), ('\u{d68d}', '\u{d6a7}', GC_LVT), ('\u{d6a8}', '\u{d6a8}',
+        GC_LV), ('\u{d6a9}', '\u{d6c3}', GC_LVT), ('\u{d6c4}', '\u{d6c4}', GC_LV), ('\u{d6c5}',
+        '\u{d6df}', GC_LVT), ('\u{d6e0}', '\u{d6e0}', GC_LV), ('\u{d6e1}', '\u{d6fb}', GC_LVT),
+        ('\u{d6fc}', '\u{d6fc}', GC_LV), ('\u{d6fd}', '\u{d717}', GC_LVT), ('\u{d718}', '\u{d718}',
+        GC_LV), ('\u{d719}', '\u{d733}', GC_LVT), ('\u{d734}', '\u{d734}', GC_LV), ('\u{d735}',
+        '\u{d74f}', GC_LVT), ('\u{d750}', '\u{d750}', GC_LV), ('\u{d751}', '\u{d76b}', GC_LVT),
+        ('\u{d76c}', '\u{d76c}', GC_LV), ('\u{d76d}', '\u{d787}', GC_LVT), ('\u{d788}', '\u{d788}',
+        GC_LV), ('\u{d789}', '\u{d7a3}', GC_LVT), ('\u{d7b0}', '\u{d7c6}', GC_V), ('\u{d7cb}',
+        '\u{d7fb}', GC_T), ('\u{fb1e}', '\u{fb1e}', GC_Extend), ('\u{fe00}', '\u{fe0f}', GC_Extend),
+        ('\u{fe20}', '\u{fe2d}', GC_Extend), ('\u{feff}', '\u{feff}', GC_Control), ('\u{ff9e}',
+        '\u{ff9f}', GC_Extend), ('\u{fff0}', '\u{fffb}', GC_Control), ('\u{101fd}', '\u{101fd}',
+        GC_Extend), ('\u{102e0}', '\u{102e0}', GC_Extend), ('\u{10376}', '\u{1037a}', GC_Extend),
+        ('\u{10a01}', '\u{10a03}', GC_Extend), ('\u{10a05}', '\u{10a06}', GC_Extend), ('\u{10a0c}',
+        '\u{10a0f}', GC_Extend), ('\u{10a38}', '\u{10a3a}', GC_Extend), ('\u{10a3f}', '\u{10a3f}',
+        GC_Extend), ('\u{10ae5}', '\u{10ae6}', GC_Extend), ('\u{11000}', '\u{11000}',
+        GC_SpacingMark), ('\u{11001}', '\u{11001}', GC_Extend), ('\u{11002}', '\u{11002}',
+        GC_SpacingMark), ('\u{11038}', '\u{11046}', GC_Extend), ('\u{1107f}', '\u{11081}',
+        GC_Extend), ('\u{11082}', '\u{11082}', GC_SpacingMark), ('\u{110b0}', '\u{110b2}',
+        GC_SpacingMark), ('\u{110b3}', '\u{110b6}', GC_Extend), ('\u{110b7}', '\u{110b8}',
+        GC_SpacingMark), ('\u{110b9}', '\u{110ba}', GC_Extend), ('\u{110bd}', '\u{110bd}',
+        GC_Control), ('\u{11100}', '\u{11102}', GC_Extend), ('\u{11127}', '\u{1112b}', GC_Extend),
+        ('\u{1112c}', '\u{1112c}', GC_SpacingMark), ('\u{1112d}', '\u{11134}', GC_Extend),
+        ('\u{11173}', '\u{11173}', GC_Extend), ('\u{11180}', '\u{11181}', GC_Extend), ('\u{11182}',
+        '\u{11182}', GC_SpacingMark), ('\u{111b3}', '\u{111b5}', GC_SpacingMark), ('\u{111b6}',
+        '\u{111be}', GC_Extend), ('\u{111bf}', '\u{111c0}', GC_SpacingMark), ('\u{1122c}',
+        '\u{1122e}', GC_SpacingMark), ('\u{1122f}', '\u{11231}', GC_Extend), ('\u{11232}',
+        '\u{11233}', GC_SpacingMark), ('\u{11234}', '\u{11234}', GC_Extend), ('\u{11235}',
+        '\u{11235}', GC_SpacingMark), ('\u{11236}', '\u{11237}', GC_Extend), ('\u{112df}',
+        '\u{112df}', GC_Extend), ('\u{112e0}', '\u{112e2}', GC_SpacingMark), ('\u{112e3}',
+        '\u{112ea}', GC_Extend), ('\u{11301}', '\u{11301}', GC_Extend), ('\u{11302}', '\u{11303}',
+        GC_SpacingMark), ('\u{1133c}', '\u{1133c}', GC_Extend), ('\u{1133e}', '\u{1133e}',
+        GC_Extend), ('\u{1133f}', '\u{1133f}', GC_SpacingMark), ('\u{11340}', '\u{11340}',
+        GC_Extend), ('\u{11341}', '\u{11344}', GC_SpacingMark), ('\u{11347}', '\u{11348}',
+        GC_SpacingMark), ('\u{1134b}', '\u{1134d}', GC_SpacingMark), ('\u{11357}', '\u{11357}',
+        GC_Extend), ('\u{11362}', '\u{11363}', GC_SpacingMark), ('\u{11366}', '\u{1136c}',
+        GC_Extend), ('\u{11370}', '\u{11374}', GC_Extend), ('\u{114b0}', '\u{114b0}', GC_Extend),
+        ('\u{114b1}', '\u{114b2}', GC_SpacingMark), ('\u{114b3}', '\u{114b8}', GC_Extend),
+        ('\u{114b9}', '\u{114b9}', GC_SpacingMark), ('\u{114ba}', '\u{114ba}', GC_Extend),
+        ('\u{114bb}', '\u{114bc}', GC_SpacingMark), ('\u{114bd}', '\u{114bd}', GC_Extend),
+        ('\u{114be}', '\u{114be}', GC_SpacingMark), ('\u{114bf}', '\u{114c0}', GC_Extend),
+        ('\u{114c1}', '\u{114c1}', GC_SpacingMark), ('\u{114c2}', '\u{114c3}', GC_Extend),
+        ('\u{115af}', '\u{115af}', GC_Extend), ('\u{115b0}', '\u{115b1}', GC_SpacingMark),
+        ('\u{115b2}', '\u{115b5}', GC_Extend), ('\u{115b8}', '\u{115bb}', GC_SpacingMark),
+        ('\u{115bc}', '\u{115bd}', GC_Extend), ('\u{115be}', '\u{115be}', GC_SpacingMark),
+        ('\u{115bf}', '\u{115c0}', GC_Extend), ('\u{11630}', '\u{11632}', GC_SpacingMark),
+        ('\u{11633}', '\u{1163a}', GC_Extend), ('\u{1163b}', '\u{1163c}', GC_SpacingMark),
+        ('\u{1163d}', '\u{1163d}', GC_Extend), ('\u{1163e}', '\u{1163e}', GC_SpacingMark),
+        ('\u{1163f}', '\u{11640}', GC_Extend), ('\u{116ab}', '\u{116ab}', GC_Extend), ('\u{116ac}',
+        '\u{116ac}', GC_SpacingMark), ('\u{116ad}', '\u{116ad}', GC_Extend), ('\u{116ae}',
+        '\u{116af}', GC_SpacingMark), ('\u{116b0}', '\u{116b5}', GC_Extend), ('\u{116b6}',
+        '\u{116b6}', GC_SpacingMark), ('\u{116b7}', '\u{116b7}', GC_Extend), ('\u{16af0}',
+        '\u{16af4}', GC_Extend), ('\u{16b30}', '\u{16b36}', GC_Extend), ('\u{16f51}', '\u{16f7e}',
+        GC_SpacingMark), ('\u{16f8f}', '\u{16f92}', GC_Extend), ('\u{1bc9d}', '\u{1bc9e}',
+        GC_Extend), ('\u{1bca0}', '\u{1bca3}', GC_Control), ('\u{1d165}', '\u{1d165}', GC_Extend),
+        ('\u{1d166}', '\u{1d166}', GC_SpacingMark), ('\u{1d167}', '\u{1d169}', GC_Extend),
+        ('\u{1d16d}', '\u{1d16d}', GC_SpacingMark), ('\u{1d16e}', '\u{1d172}', GC_Extend),
+        ('\u{1d173}', '\u{1d17a}', GC_Control), ('\u{1d17b}', '\u{1d182}', GC_Extend), ('\u{1d185}',
+        '\u{1d18b}', GC_Extend), ('\u{1d1aa}', '\u{1d1ad}', GC_Extend), ('\u{1d242}', '\u{1d244}',
+        GC_Extend), ('\u{1e8d0}', '\u{1e8d6}', GC_Extend), ('\u{1f1e6}', '\u{1f1ff}',
+        GC_RegionalIndicator), ('\u{e0000}', '\u{e00ff}', GC_Control), ('\u{e0100}', '\u{e01ef}',
+        GC_Extend), ('\u{e01f0}', '\u{e0fff}', GC_Control)
     ];
 
 }
index e4b2b682b2cffddbe62419edd58436f44d7226a4..80311137b0165ed69bf1138cc7a094a71882beba 100644 (file)
@@ -29,8 +29,7 @@
 
 /// An iterator over the words of a string, separated by a sequence of whitespace
 /// FIXME: This should be opaque
-pub type Words<'a> =
-    Filter<'a, &'a str, CharSplits<'a, |char|:'a -> bool>>;
+pub type Words<'a> = Filter<&'a str, CharSplits<'a, fn(char) -> bool>, fn(&&str) -> bool>;
 
 /// Methods for Unicode string slices
 pub trait UnicodeStrPrelude for Sized? {
@@ -46,8 +45,8 @@ pub trait UnicodeStrPrelude for Sized? {
     /// # Example
     ///
     /// ```rust
-    /// let gr1 = "a\u0310e\u0301o\u0308\u0332".graphemes(true).collect::<Vec<&str>>();
-    /// let b: &[_] = &["a\u0310", "e\u0301", "o\u0308\u0332"];
+    /// let gr1 = "a\u{0310}e\u{0301}o\u{0308}\u{0332}".graphemes(true).collect::<Vec<&str>>();
+    /// let b: &[_] = &["a\u{0310}", "e\u{0301}", "o\u{0308}\u{0332}"];
     /// assert_eq!(gr1.as_slice(), b);
     /// let gr2 = "a\r\nb🇷🇺🇸🇹".graphemes(true).collect::<Vec<&str>>();
     /// let b: &[_] = &["a", "\r\n", "b", "🇷🇺🇸🇹"];
@@ -143,8 +142,10 @@ fn grapheme_indices(&self, is_extended: bool) -> GraphemeIndices {
 
     #[inline]
     fn words(&self) -> Words {
-        let f = |c: char| c.is_whitespace();
-        self.split(f).filter(|s| !s.is_empty())
+        fn is_not_empty(s: &&str) -> bool { !s.is_empty() }
+        fn is_whitespace(c: char) -> bool { c.is_whitespace() }
+
+        self.split(is_whitespace).filter(is_not_empty)
     }
 
     #[inline]
@@ -165,12 +166,12 @@ fn trim(&self) -> &str {
 
     #[inline]
     fn trim_left(&self) -> &str {
-        self.trim_left_chars(|c: char| c.is_whitespace())
+        self.trim_left_chars(|&: c: char| c.is_whitespace())
     }
 
     #[inline]
     fn trim_right(&self) -> &str {
-        self.trim_right_chars(|c: char| c.is_whitespace())
+        self.trim_right_chars(|&: c: char| c.is_whitespace())
     }
 }
 
diff --git a/src/rustllvm/ExecutionEngineWrapper.cpp b/src/rustllvm/ExecutionEngineWrapper.cpp
new file mode 100644 (file)
index 0000000..d37cf9d
--- /dev/null
@@ -0,0 +1,112 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#include "rustllvm.h"
+
+#include "llvm/ExecutionEngine/SectionMemoryManager.h"
+
+using namespace llvm;
+using namespace llvm::sys;
+using namespace llvm::object;
+
+class RustJITMemoryManager : public SectionMemoryManager
+{
+    typedef SectionMemoryManager Base;
+
+    const void *morestack;
+
+    public:
+
+    RustJITMemoryManager(const void *morestack_ptr)
+        : morestack(morestack_ptr)
+        {}
+
+    uint64_t getSymbolAddress(const std::string &Name) override
+    {
+        if (Name == "__morestack" || Name == "___morestack")
+            return reinterpret_cast<uint64_t>(morestack);
+
+        return Base::getSymbolAddress(Name);
+    }
+};
+
+DEFINE_SIMPLE_CONVERSION_FUNCTIONS(RustJITMemoryManager, LLVMRustJITMemoryManagerRef)
+
+extern "C" LLVMRustJITMemoryManagerRef LLVMRustCreateJITMemoryManager(void *morestack)
+{
+    return wrap(new RustJITMemoryManager(morestack));
+}
+
+extern "C" LLVMBool LLVMRustLoadDynamicLibrary(const char *path)
+{
+    std::string err;
+    DynamicLibrary lib = DynamicLibrary::getPermanentLibrary(path, &err);
+
+    if (!lib.isValid())
+        LLVMRustSetLastError(err.c_str());
+
+    return lib.isValid();
+}
+
+// Calls LLVMAddModule;
+// exists for consistency with LLVMExecutionEngineRemoveModule
+extern "C" void LLVMExecutionEngineAddModule(
+    LLVMExecutionEngineRef eeref, LLVMModuleRef mref)
+{
+    LLVMAddModule(eeref, mref);
+}
+
+// LLVMRemoveModule exists in LLVM's C bindings,
+// but it requires pointless parameters
+extern "C" LLVMBool LLVMExecutionEngineRemoveModule(
+    LLVMExecutionEngineRef eeref, LLVMModuleRef mref)
+{
+    ExecutionEngine *ee = unwrap(eeref);
+    Module *m = unwrap(mref);
+
+    return ee->removeModule(m);
+}
+
+extern "C" LLVMExecutionEngineRef LLVMBuildExecutionEngine(
+    LLVMModuleRef mod, LLVMRustJITMemoryManagerRef mref)
+{
+    // These are necessary for code generation to work properly.
+    InitializeNativeTarget();
+    InitializeNativeTargetAsmPrinter();
+    InitializeNativeTargetAsmParser();
+
+    std::unique_ptr<Module> m(unwrap(mod));
+    RustJITMemoryManager *mm = unwrap(mref);
+
+    std::string error_str;
+    TargetOptions options;
+
+    options.JITEmitDebugInfo = true;
+    options.NoFramePointerElim = true;
+
+    ExecutionEngine *ee = EngineBuilder(std::move(m))
+        .setEngineKind(EngineKind::JIT)
+        .setErrorStr(&error_str)
+        .setMCJITMemoryManager(mm)
+        .setTargetOptions(options)
+        .create();
+
+    if (!ee)
+        LLVMRustSetLastError(error_str.c_str());
+
+    return wrap(ee);
+}
+
+extern "C" void LLVMExecutionEngineFinalizeObject(LLVMExecutionEngineRef eeref)
+{
+    ExecutionEngine *ee = unwrap(eeref);
+
+    ee->finalizeObject();
+}
index 2b324a378650fc3b59ce573db561edfd527ee92c..33dec63a728e1d874df2f75efbd18cf10571a5c8 100644 (file)
@@ -72,6 +72,7 @@ typedef struct OpaqueRustString *RustStringRef;
 typedef struct LLVMOpaqueTwine *LLVMTwineRef;
 typedef struct LLVMOpaqueDebugLoc *LLVMDebugLocRef;
 typedef struct LLVMOpaqueSMDiagnostic *LLVMSMDiagnosticRef;
+typedef struct LLVMOpaqueRustJITMemoryManager *LLVMRustJITMemoryManagerRef;
 
 extern "C" void
 rust_llvm_string_write_impl(RustStringRef str, const char *ptr, size_t size);
index 0faf6840f0610f095d68c1b2ac6e393ffbcac82d..9a40c24a8e8c5903e2d3830f9a94b1fcbaadb568 100644 (file)
@@ -1,3 +1,12 @@
+S 2014-12-09 cafe296
+  freebsd-x86_64 f80b943b94747764282d1b54d861b600eadd224f
+  linux-i386 96b390dc7d0c38b7b60f04fc5a6565ecfa9cb977
+  linux-x86_64 3c29c67bc752b30e4bf430a20cf573bd0a4c5e11
+  macos-i386 c5f6b7c4d40d052ccb212e794df7ea0a2941854d
+  macos-x86_64 b522ac305ad777a51429564bab27ea4af432ab87
+  winnt-i386 f6db8b1832022b1e028d5fc038eba41b261d44b1
+  winnt-x86_64 f5b633290669b0ffb70efdc5dd5584814c640181
+
 S 2014-11-21 c9f6d69
   freebsd-x86_64 0ef316e7c369177de043e69e964418bd637cbfc0
   linux-i386 c8342e762a1720be939ed7c6a39bdaa27892f66f
index 88692cf3f5e3c15f339bb2609eae598627859c15..1cccb0f7ccbe66b75a83c6c2ee2bd432fb5e54a3 100644 (file)
@@ -12,7 +12,7 @@
 
 pub fn foo<T:Send + Clone>(x: T) -> Receiver<T> {
     let (tx, rx) = channel();
-    task::spawn(proc() {
+    task::spawn(move|| {
         tx.send(x.clone());
     });
     rx
diff --git a/src/test/auxiliary/issue-19340-1.rs b/src/test/auxiliary/issue-19340-1.rs
new file mode 100644 (file)
index 0000000..fc61b78
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub enum Homura {
+    Madoka { name: String },
+}
diff --git a/src/test/auxiliary/trait-safety-lib.rs b/src/test/auxiliary/trait-safety-lib.rs
new file mode 100644 (file)
index 0000000..d543769
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Simple smoke test that unsafe traits can be compiled etc.
+
+pub unsafe trait Foo {
+    fn foo(&self) -> int;
+}
+
+unsafe impl Foo for int {
+    fn foo(&self) -> int { *self }
+}
index bbbd878e8b8ad8abce3baee001f9ef898ac7dc5e..112d4fd0912d4e3e2aa1f8b478d270e6a05e6fe9 100644 (file)
@@ -8,13 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(unboxed_closures)]
+
 use std::collections::{TrieMap, TreeMap, HashMap, HashSet};
 use std::os;
 use std::rand::{Rng, IsaacRng, SeedableRng};
 use std::time::Duration;
 use std::uint;
 
-fn timed(label: &str, f: ||) {
+fn timed<F>(label: &str, f: F) where F: FnMut() {
     println!("  {}: {}", label, Duration::span(f));
 }
 
index 07300b73c85a7bcae3c1fbbbb2df63053f994528..6ba642cc47b7563d809dbc07a543474183d2b33b 100644 (file)
@@ -10,6 +10,8 @@
 
 // ignore-pretty very bad with line comments
 
+#![feature(unboxed_closures)]
+
 extern crate collections;
 extern crate rand;
 
@@ -31,7 +33,7 @@ struct Results {
     delete_strings: Duration,
 }
 
-fn timed(result: &mut Duration, op: ||) {
+fn timed<F>(result: &mut Duration, op: F) where F: FnOnce() {
     *result = Duration::span(op);
 }
 
index 24bd26b028813d65c446a147c2420f761bbd7d82..6e2cd508291e0305f25c3c53fafbd89ac3650ac7 100644 (file)
@@ -12,6 +12,7 @@
 // Microbenchmarks for various functions in std and extra
 
 #![feature(macro_rules)]
+#![feature(unboxed_closures)]
 
 use std::io::File;
 use std::mem::swap;
@@ -41,7 +42,7 @@ macro_rules! bench (
     bench!(is_utf8_multibyte);
 }
 
-fn maybe_run_test(argv: &[String], name: String, test: ||) {
+fn maybe_run_test<F>(argv: &[String], name: String, test: F) where F: FnOnce() {
     let mut run_test = false;
 
     if os::getenv("RUST_BENCH").is_some() {
index cea03f13a4bbd306c38340ac87c28892eecaec1e..f20fb8d0cd75e3322a0c8980dc17cddbc14bb2f3 100644 (file)
@@ -64,7 +64,7 @@ fn run(args: &[String]) {
         let mut worker_results = Vec::new();
         for _ in range(0u, workers) {
             let to_child = to_child.clone();
-            worker_results.push(task::try_future(proc() {
+            worker_results.push(task::try_future(move|| {
                 for _ in range(0u, size / workers) {
                     //println!("worker {}: sending {} bytes", i, num_bytes);
                     to_child.send(request::bytes(num_bytes));
@@ -72,7 +72,7 @@ fn run(args: &[String]) {
                 //println!("worker {} exiting", i);
             }));
         }
-        task::spawn(proc() {
+        task::spawn(move|| {
             server(&from_parent, &to_parent);
         });
 
index 476e7d42d45bb7cbf693e1c702c1dc1b7f9294e8..179011be8bf4efd8749d79df88dc10b07ca1aa37 100644 (file)
@@ -58,7 +58,7 @@ fn run(args: &[String]) {
         let mut worker_results = Vec::new();
         let from_parent = if workers == 1 {
             let (to_child, from_parent) = channel();
-            worker_results.push(task::try_future(proc() {
+            worker_results.push(task::try_future(move|| {
                 for _ in range(0u, size / workers) {
                     //println!("worker {}: sending {} bytes", i, num_bytes);
                     to_child.send(request::bytes(num_bytes));
@@ -70,7 +70,7 @@ fn run(args: &[String]) {
             let (to_child, from_parent) = channel();
             for _ in range(0u, workers) {
                 let to_child = to_child.clone();
-                worker_results.push(task::try_future(proc() {
+                worker_results.push(task::try_future(move|| {
                     for _ in range(0u, size / workers) {
                         //println!("worker {}: sending {} bytes", i, num_bytes);
                         to_child.send(request::bytes(num_bytes));
@@ -80,7 +80,7 @@ fn run(args: &[String]) {
             }
             from_parent
         };
-        task::spawn(proc() {
+        task::spawn(move|| {
             server(&from_parent, &to_parent);
         });
 
index 863c3c879a7c108009e14604233c2dddfd962168..49f53bf9d3883ec555497d40fd3dc23c6f5be2da 100644 (file)
@@ -89,7 +89,7 @@ fn main() {
             //println!("spawning %?", i);
             let (new_chan, num_port) = init();
             let num_chan_2 = num_chan.clone();
-            let new_future = Future::spawn(proc() {
+            let new_future = Future::spawn(move|| {
                 thread_ring(i, msg_per_task, num_chan_2, num_port)
             });
             futures.push(new_future);
index b00adf4bdb1d4d1321490cc64882b343c36cbe2a..73d54372b274f0aa0330bf89f7e3a2e508360912 100644 (file)
@@ -34,7 +34,7 @@ fn run_pair(n: uint) {
         // Create a stream B->A
         let (btx, brx) = channel::<()>();
 
-        spawn(proc() {
+        spawn(move|| {
             let (tx, rx) = (atx, brx);
             for _ in range(0, n) {
                 tx.send(());
@@ -42,7 +42,7 @@ fn run_pair(n: uint) {
             }
         });
 
-        spawn(proc() {
+        spawn(move|| {
             let (tx, rx) = (btx, arx);
             for _ in range(0, n) {
                 rx.recv();
index 4072dc0064afba5ebe7db90a5a9ba86fd8f7ba22..bdf22cd7395889aa8647f252189a6aeb8674f73c 100644 (file)
@@ -21,7 +21,7 @@ fn parfib(n: uint) -> uint {
     }
 
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         tx.send(parfib(n-1));
     });
     let m2 = parfib(n-2);
index 509cb37b2e6ff0cd7b76ff11980b15bf3eaa364b..0b16e8011e8323975d96ef792b8070b18aff1610 100644 (file)
@@ -95,7 +95,7 @@ fn main() {
     let mut messages = range_step(min_depth, max_depth + 1, 2).map(|depth| {
             use std::num::Int;
             let iterations = 2i.pow((max_depth - depth + min_depth) as uint);
-            Future::spawn(proc() {
+            Future::spawn(move|| {
                 let mut chk = 0;
                 for i in range(1, iterations + 1) {
                     let arena = TypedArena::new();
index e954d0fed5e593e323a1a07757bc97ed7e6d7b4c..dcdb90a11c88ca89f48261efc52dc48d5c60a596 100644 (file)
@@ -188,7 +188,7 @@ fn rendezvous(nn: uint, set: Vec<Color>) {
             let to_rendezvous = to_rendezvous.clone();
             let to_rendezvous_log = to_rendezvous_log.clone();
             let (to_creature, from_rendezvous) = channel();
-            spawn(proc() {
+            spawn(move|| {
                 creature(ii,
                          col,
                          from_rendezvous,
index 4b890bbd8d30e94cf18d4c2daa014e936203ceb2..4849421a3f01eceaebe07fdab4cbed2afadb1ef1 100644 (file)
@@ -168,7 +168,7 @@ fn fannkuch(n: i32) -> (i32, i32) {
     for (i, j) in range(0, N).zip(iter::count(0, k)) {
         let max = cmp::min(j+k, perm.max());
 
-        futures.push(Future::spawn(proc() {
+        futures.push(Future::spawn(move|| {
             work(perm, j as uint, max as uint)
         }))
     }
index f9fafa977acab0e7d41a40c30d169fcf45e90ed1..1f0bed055211dc35778a3f8f1a2bc0f58db606ca 100644 (file)
@@ -78,7 +78,7 @@ impl<'a> Iterator<u8> for AAGen<'a> {
     fn next(&mut self) -> Option<u8> {
         let r = self.rng.gen();
         self.data.iter()
-            .skip_while(|pc| pc.val0() < r)
+            .skip_while(|pc| pc.0 < r)
             .map(|&(_, c)| c)
             .next()
     }
index 45d2cbea8fad985d7f52a8d3bd9b25a788998c9d..8c11c3673d5274ebc4bf2b990fae29a47760c0f0 100644 (file)
@@ -168,7 +168,7 @@ fn main() {
 
         let (to_child, from_parent) = channel();
 
-        spawn(proc() {
+        spawn(move|| {
             make_sequence_processor(sz, &from_parent, &to_parent_);
         });
 
index 847ae2c1c88cc0722ec0275a9109edc0280e97c9..d112fe60674dadc4fec5d379cffbbe2cbd00c145 100644 (file)
@@ -303,11 +303,11 @@ fn main() {
 
     let nb_freqs: Vec<(uint, Future<Table>)> = range(1u, 3).map(|i| {
         let input = input.clone();
-        (i, Future::spawn(proc() generate_frequencies(input.as_slice(), i)))
+        (i, Future::spawn(move|| generate_frequencies(input.as_slice(), i)))
     }).collect();
     let occ_freqs: Vec<Future<Table>> = OCCURRENCES.iter().map(|&occ| {
         let input = input.clone();
-        Future::spawn(proc() generate_frequencies(input.as_slice(), occ.len()))
+        Future::spawn(move|| generate_frequencies(input.as_slice(), occ.len()))
     }).collect();
 
     for (i, freq) in nb_freqs.into_iter() {
index 454b445dea0dc171cefde4ea7165578d738eb992..bb0e09370d8e9e7b3492e6ea4906f20ef2acdddb 100644 (file)
@@ -82,7 +82,7 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
     let mut precalc_i = Vec::with_capacity(h);
 
     let precalc_futures = Vec::from_fn(WORKERS, |i| {
-        Future::spawn(proc () {
+        Future::spawn(move|| {
             let mut rs = Vec::with_capacity(w / WORKERS);
             let mut is = Vec::with_capacity(w / WORKERS);
 
@@ -123,7 +123,7 @@ fn mandelbrot<W: io::Writer>(w: uint, mut out: W) -> io::IoResult<()> {
         let vec_init_r = arc_init_r.clone();
         let vec_init_i = arc_init_i.clone();
 
-        Future::spawn(proc () {
+        Future::spawn(move|| {
             let mut res: Vec<u8> = Vec::with_capacity((chunk_size * w) / 8);
             let init_r_slice = vec_init_r.as_slice();
 
index ca749d47b63bd23b32444f4609fda3d85c983044..9a3b6953062b4464e42effd44e77d84fa87ef300 100644 (file)
@@ -310,7 +310,7 @@ fn par_search(masks: Vec<Vec<Vec<u64>>>) -> Data {
         let masks = masks.clone();
         let tx = tx.clone();
         let m = *m;
-        spawn(proc() {
+        spawn(move|| {
             let mut data = Data::new();
             search(&*masks, m, 1, List::Cons(m, &List::Nil), &mut data);
             tx.send(data);
index 15a5cb0c9bfffcbf01f95c2a2544805443541086..fae6d2cc3aa65c72359f9a5d96f529fd786caed2 100644 (file)
@@ -34,15 +34,15 @@ fn pfib(tx: &Sender<int>, n: int) {
         } else {
             let (tx1, rx) = channel();
             let tx2 = tx1.clone();
-            task::spawn(proc() pfib(&tx2, n - 1));
+            task::spawn(move|| pfib(&tx2, n - 1));
             let tx2 = tx1.clone();
-            task::spawn(proc() pfib(&tx2, n - 2));
+            task::spawn(move|| pfib(&tx2, n - 2));
             tx.send(rx.recv() + rx.recv());
         }
     }
 
     let (tx, rx) = channel();
-    spawn(proc() pfib(&tx, n) );
+    spawn(move|| pfib(&tx, n) );
     rx.recv()
 }
 
@@ -77,7 +77,7 @@ fn stress_task(id: int) {
 fn stress(num_tasks: int) {
     let mut results = Vec::new();
     for i in range(0, num_tasks) {
-        results.push(task::try_future(proc() {
+        results.push(task::try_future(move|| {
             stress_task(i);
         }));
     }
index 81de7a1269067b3d89dfab65ef19ce881532dfd8..9b8fd51c1c5dd8974acd199dfbb650bee9fb28bc 100644 (file)
@@ -72,7 +72,7 @@ fn main() {
     let seq_arc = Arc::new(seq.clone()); // copy before it moves
     let clen = seq.len();
 
-    let mut seqlen = Future::spawn(proc() {
+    let mut seqlen = Future::spawn(move|| {
         let substs = vec![
             (regex!("B"), "(c|g|t)"),
             (regex!("D"), "(a|g|t)"),
@@ -108,7 +108,7 @@ fn main() {
     for variant in variants.into_iter() {
         let seq_arc_copy = seq_arc.clone();
         variant_strs.push(variant.to_string());
-        counts.push(Future::spawn(proc() {
+        counts.push(Future::spawn(move|| {
             count_matches(seq_arc_copy.as_slice(), &variant)
         }));
     }
index ffe5739e0bb5e41f573172b7979b6f474c7a3019..312ee2dd27e4d3c0306d5263ad15047beabb7ec7 100644 (file)
@@ -236,7 +236,7 @@ fn parallel<'a, I, T, F>(mut iter: I, f: F)
         // boundary.
         let f = &f as *const F as *const uint;
         let raw = chunk.repr();
-        spawn(proc() {
+        spawn(move|| {
             let f = f as *const F;
             unsafe { (*f)(mem::transmute(raw)) }
             drop(tx)
index f76391b596bb3855021f9e2c7cd39df7f9a66bfc..647c47b00a0b725e4f679db5a95775755e01ecd4 100644 (file)
@@ -124,7 +124,7 @@ fn parallel<'a, T, F>(v: &'a mut [T], f: F)
         // boundary.
         let f = &f as *const _ as *const uint;
         let raw = chunk.repr();
-        spawn(proc() {
+        spawn(move|| {
             let f = f as *const F;
             unsafe { (*f)(i * size, mem::transmute(raw)) }
             drop(tx)
index cda0feb8b55a312d8eccd92bf576201c78b9daca..111a92b083aa38aa4d74cb2f4af9a9a183981f15 100644 (file)
@@ -43,10 +43,10 @@ fn start(n_tasks: int, token: int) {
     tx.send(token);
     for i in range(2, n_tasks + 1) {
         let (tx, next_rx) = channel();
-        spawn(proc() roundtrip(i, tx, rx));
+        spawn(move|| roundtrip(i, tx, rx));
         rx = next_rx;
     }
-    spawn(proc() roundtrip(1, tx, rx));
+    spawn(move|| roundtrip(1, tx, rx));
 }
 
 fn roundtrip(id: int, tx: Sender<int>, rx: Receiver<int>) {
index b55f471bdb24d40f6f7619b4b592c18dcd6eca8e..ca36d99014cf4b530b8a2805ed9c683da7df13ba 100644 (file)
@@ -10,5 +10,5 @@
 
 // Useful for checking syscall usage of baseline scheduler usage
 fn main() {
-    spawn(proc() {});
+    spawn(move|| {});
 }
index 77078b2c68d390cdfd93e4aa5fd01dde5a44285a..8bcf30b4859ff0852fedc99318f6c12821938229 100644 (file)
@@ -36,7 +36,7 @@ fn main() {
 fn run(repeat: int, depth: int) {
     for _ in range(0, repeat) {
         let dur = Duration::span(|| {
-            task::try(proc() {
+            task::try(move|| {
                 recurse_or_panic(depth, None)
             });
         });
index 3d2822e14597ff4d8400eb88144d19ac367c1d61..789ccb6142a118ee238c47b7e2ab1b2915e8106e 100644 (file)
@@ -26,7 +26,7 @@ fn child_generation(gens_left: uint, tx: comm::Sender<()>) {
     // This used to be O(n^2) in the number of generations that ever existed.
     // With this code, only as many generations are alive at a time as tasks
     // alive at a time,
-    spawn(proc() {
+    spawn(move|| {
         if gens_left & 1 == 1 {
             task::deschedule(); // shake things up a bit
         }
index 0f903be39223d7fae5c92621f581e81e72579ab6..e3b51cb6b5bfd2405967e3c8f983021bf9b75db5 100644 (file)
@@ -21,7 +21,7 @@ fn calc(children: uint, parent_wait_chan: &Sender<Sender<Sender<int>>>) {
 
     let wait_ports: Vec<Reciever<Sender<Sender<int>>>> = vec::from_fn(children, |_| {
         let (wait_port, wait_chan) = stream::<Sender<Sender<int>>>();
-        task::spawn(proc() {
+        task::spawn(move|| {
             calc(children / 2, &wait_chan);
         });
         wait_port
@@ -58,7 +58,7 @@ fn main() {
 
     let children = from_str::<uint>(args[1]).unwrap();
     let (wait_port, wait_chan) = stream();
-    task::spawn(proc() {
+    task::spawn(move|| {
         calc(children, &wait_chan);
     });
 
index 533005b1fb38c0c98d31943e36868a8a1c690bc7..a6852d396d9cf2f3c7bb721e386eb548c9a11863 100644 (file)
@@ -15,7 +15,7 @@
 fn f(n: uint) {
     let mut i = 0u;
     while i < n {
-        task::try(proc() g());
+        task::try(move|| g());
         i += 1u;
     }
 }
@@ -33,5 +33,5 @@ fn main() {
     };
     let n = from_str::<uint>(args[1].as_slice()).unwrap();
     let mut i = 0u;
-    while i < n { task::spawn(proc() f(n) ); i += 1u; }
+    while i < n { task::spawn(move|| f(n) ); i += 1u; }
 }
index 3972d01850e6373ea5d5a7afb2cd01a69620657d..00aeb1c1bae8f71a2163f888637fb1af7c44d8a8 100644 (file)
@@ -19,6 +19,6 @@
 
 fn main() {
     macro_crate_test::foo();
-    //~^ ERROR failed to resolve. Use of undeclared module `macro_crate_test`
+    //~^ ERROR failed to resolve. Use of undeclared type or module `macro_crate_test`
     //~^^ ERROR unresolved name `macro_crate_test::foo`
 }
diff --git a/src/test/compile-fail/assoc-eq-1.rs b/src/test/compile-fail/assoc-eq-1.rs
new file mode 100644 (file)
index 0000000..4fd5315
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test equality constraints on associated types. Check that unsupported syntax
+// does not ICE.
+
+#![feature(associated_types)]
+
+pub trait Foo {
+    type A;
+    fn boo(&self) -> <Self as Foo>::A;
+}
+
+fn foo2<I: Foo>(x: I) {
+    let _: A = x.boo(); //~ERROR use of undeclared
+    let _: I::A = x.boo(); //~ERROR failed to resolve
+    //~^ERROR use of undeclared type name `I::A`
+}
+
+pub fn main() {}
diff --git a/src/test/compile-fail/assoc-eq-2.rs b/src/test/compile-fail/assoc-eq-2.rs
new file mode 100644 (file)
index 0000000..652bf4f
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test equality constraints on associated types. Check we get an error when an
+// equality constraint is used in a qualified path.
+
+#![feature(associated_types)]
+
+pub trait Foo {
+    type A;
+    fn boo(&self) -> <Self as Foo>::A;
+}
+
+struct Bar;
+
+impl Foo for int {
+    type A = uint;
+    fn boo(&self) -> uint { 42 }
+}
+
+fn baz<I: Foo>(x: &<I as Foo<A=Bar>>::A) {} //~ERROR equality constraints are not allowed in this
+
+pub fn main() {}
diff --git a/src/test/compile-fail/assoc-eq-3.rs b/src/test/compile-fail/assoc-eq-3.rs
new file mode 100644 (file)
index 0000000..880b2e9
--- /dev/null
@@ -0,0 +1,48 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test equality constraints on associated types. Check we get type errors
+// where we should.
+
+#![feature(associated_types)]
+
+pub trait Foo {
+    type A;
+    fn boo(&self) -> <Self as Foo>::A;
+}
+
+struct Bar;
+
+impl Foo for int {
+    type A = uint;
+    fn boo(&self) -> uint {
+        42
+    }
+}
+
+fn foo1<I: Foo<A=Bar>>(x: I) {
+    let _: Bar = x.boo();
+}
+
+fn foo2<I: Foo>(x: I) {
+    let _: Bar = x.boo(); //~ERROR mismatched types
+}
+
+
+pub fn baz(x: &Foo<A=Bar>) {
+    let _: Bar = x.boo();
+}
+
+
+pub fn main() {
+    let a = 42i;
+    foo1(a); //~ERROR the trait `Foo` is not implemented for the type `int`
+    baz(&a); //~ERROR the trait `Foo` is not implemented for the type `int`
+}
diff --git a/src/test/compile-fail/assoc-eq-expr-path.rs b/src/test/compile-fail/assoc-eq-expr-path.rs
new file mode 100644 (file)
index 0000000..1a96b0c
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that an associated type cannot be bound in an expression path.
+
+#![feature(associated_types)]
+
+trait Foo {
+    type A;
+    fn bar() -> int;
+}
+
+impl Foo for int {
+    type A = uint;
+    fn bar() -> int { 42 }
+}
+
+pub fn main() {
+    let x: int = Foo::<A=uint>::bar();
+    //~^ERROR unexpected binding of associated item in expression path
+}
diff --git a/src/test/compile-fail/borrowck-call-sendfn.rs b/src/test/compile-fail/borrowck-call-sendfn.rs
deleted file mode 100644 (file)
index eb2ea6b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-struct Foo {
-    f: proc():'static
-}
-
-fn call(x: Foo) {
-    x.f(); //~ ERROR does not implement any method in scope named `f`
-}
-
-fn main() {}
index b6ecb50fac873b8cff5d467b385560042cf2213a..cecb8a09c665ad1486e6a2a4bc02670fe82f7ca2 100644 (file)
@@ -17,7 +17,7 @@ fn borrow(v: &int, f: |x: &int|) {
 fn box_imm() {
     let v = box 3i;
     let _w = &v;
-    task::spawn(proc() {
+    task::spawn(move|| {
         println!("v={}", *v);
         //~^ ERROR cannot move `v` into closure
     });
@@ -26,7 +26,7 @@ fn box_imm() {
 fn box_imm_explicit() {
     let v = box 3i;
     let _w = &v;
-    task::spawn(proc() {
+    task::spawn(move|| {
         println!("v={}", *v);
         //~^ ERROR cannot move
     });
index c52924ebdb789b3408556bb9ecdf424b7ad49b26..aae661e5c537937bbd6849e1385c4b288eafbb32 100644 (file)
@@ -11,6 +11,6 @@
 pub fn main() {
     let bar = box 3;
     let _g = || {
-        let _h: proc() -> int = proc() *bar; //~ ERROR cannot move out of captured outer variable
+        let _h = move|| -> int { *bar }; //~ ERROR cannot move out of captured outer variable
     };
 }
index b385305d74aaabf6eb03e544072fe59625a2b9c7..ca484738cb6c887a2611536469a2cee41307cc1f 100644 (file)
@@ -8,13 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn call_f(f: proc() -> int) -> int {
+fn call_f<F:FnOnce() -> int>(f: F) -> int {
     f()
 }
 
 fn main() {
     let t = box 3;
 
-    call_f(proc() { *t + 1 });
-    call_f(proc() { *t + 1 }); //~ ERROR capture of moved value
+    call_f(move|| { *t + 1 });
+    call_f(move|| { *t + 1 }); //~ ERROR capture of moved value
 }
index 6faa634ad00b842499424ec3b8551e836db281e2..a9c368fb052583331d9ccff96ade666c1ad63394 100644 (file)
@@ -17,7 +17,7 @@ fn different_vars_after_borrows() {
     let p1 = &x1;
     let x2 = box 2i;
     let p2 = &x2;
-    task::spawn(proc() {
+    task::spawn(move|| {
         drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed
         drop(x2); //~ ERROR cannot move `x2` into closure because it is borrowed
     });
@@ -30,7 +30,7 @@ fn different_vars_after_moves() {
     drop(x1);
     let x2 = box 2i;
     drop(x2);
-    task::spawn(proc() {
+    task::spawn(move|| {
         drop(x1); //~ ERROR capture of moved value: `x1`
         drop(x2); //~ ERROR capture of moved value: `x2`
     });
@@ -39,7 +39,7 @@ fn different_vars_after_moves() {
 fn same_var_after_borrow() {
     let x = box 1i;
     let p = &x;
-    task::spawn(proc() {
+    task::spawn(move|| {
         drop(x); //~ ERROR cannot move `x` into closure because it is borrowed
         drop(x); //~ ERROR use of moved value: `x`
     });
@@ -49,7 +49,7 @@ fn same_var_after_borrow() {
 fn same_var_after_move() {
     let x = box 1i;
     drop(x);
-    task::spawn(proc() {
+    task::spawn(move|| {
         drop(x); //~ ERROR capture of moved value: `x`
         drop(x); //~ ERROR use of moved value: `x`
     });
diff --git a/src/test/compile-fail/borrowck-return-variable-on-stack-via-clone.rs b/src/test/compile-fail/borrowck-return-variable-on-stack-via-clone.rs
new file mode 100644 (file)
index 0000000..7529943
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that when we clone a `&T` pointer we properly relate the
+// lifetime of the pointer which results to the pointer being cloned.
+// Bugs in method resolution have sometimes broken this connection.
+// Issue #19261.
+
+fn leak<'a, T>(x: T) -> &'a T {
+    (&x).clone() //~ ERROR `x` does not live long enough
+}
+
+fn main() { }
index 86d3d7e9cbc6cca5e105bf28d5ba805a1ac0e9ea..4c7ff60fbdd0f6440def7a3e0a5a39cad659b0af 100644 (file)
@@ -17,7 +17,6 @@ fn foo(self, mut chan: Sender<Self>) { }
 
 impl <T: Sync> Foo for T { }
 //~^ ERROR the parameter type `T` may not live long enough
-//~^^ ERROR the parameter type `T` may not live long enough
 
 fn main() {
     let (tx, rx) = channel();
index fda83c03a7dce9c8252817d500c035fe709b29d1..2c689f6909b3913463397e9b276e517ad061fa5d 100644 (file)
@@ -14,6 +14,6 @@
 trait Foo : Send { }
 
 impl <'a> Foo for &'a mut () { }
-//~^ ERROR does not fulfill the required lifetime
+//~^ ERROR declared lifetime bound not satisfied
 
 fn main() { }
index daad1afedaaeae10308c5e52b1c4c24956d7c9d3..143e78e5d9f00f7fdc7dcffcbbe69a2bbaf3225b 100644 (file)
 
 fn main() {
     let x = 1i;
-    proc() { x = 2; };
-    //~^ ERROR: cannot assign to immutable captured outer variable in a proc `x`
+    move|:| { x = 2; };
+    //~^ ERROR: cannot assign to immutable captured outer variable
 
     let s = std::io::stdin();
-    proc() { s.read_to_end(); };
-    //~^ ERROR: cannot borrow immutable captured outer variable in a proc `s` as mutable
+    move|:| { s.read_to_end(); };
+    //~^ ERROR: cannot borrow immutable captured outer variable
 }
index 9f258aee746f2312643c467075e59878ccc26feb..27e339180a6cffe2b4f4c26bf088ad7d584fcc61 100644 (file)
@@ -12,10 +12,8 @@ fn foo() {}
 
 fn main() {
     let f = foo;
+
     let f_closure: || = f;
     //~^ ERROR: cannot coerce non-statically resolved bare fn to closure
     //~^^ HELP: consider embedding the function in a closure
-    let f_proc: proc() = f;
-    //~^ ERROR: cannot coerce non-statically resolved bare fn to closure
-    //~^^ HELP: consider embedding the function in a closure
 }
index d9fbc08b3211dd39a9d5ad6bb15100ac2d8603c4..fe7635f065cdc5ee969fe64c792b991de8fe45a6 100644 (file)
@@ -10,5 +10,5 @@
 
 fn main() {
     let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
-    //~^ ERROR: mismatched types
+    //~^ ERROR: is not implemented for the type
 }
diff --git a/src/test/compile-fail/hrtb-debruijn-in-receiver.rs b/src/test/compile-fail/hrtb-debruijn-in-receiver.rs
new file mode 100644 (file)
index 0000000..2dbd161
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test the case where the `Self` type has a bound lifetime that must
+// be adjusted in the fn signature. Issue #19537.
+
+use std::collections::HashMap;
+
+struct Foo<'a> {
+    map: HashMap<uint, &'a str>
+}
+
+impl<'a> Foo<'a> {
+    fn new() -> Foo<'a> { panic!() }
+    fn insert(&'a mut self) { }
+}
+fn main() {
+    let mut foo = Foo::new();
+    foo.insert();
+    foo.insert(); //~ ERROR cannot borrow
+}
index ff3512ad8e72a6e763d9cac9cd2065f19b5c834d..41a0be37add418a09afb8807c5bb6e9dc3c69c03 100644 (file)
@@ -18,17 +18,17 @@ fn dummy(&self) { }
 
 struct Foo<'a> {
     a: &'a Bar+'a,
-        //~^ ERROR E0171
+        //~^ ERROR E0178
         //~^^ NOTE perhaps you meant `&'a (Bar + 'a)`?
 
     b: &'a mut Bar+'a,
-        //~^ ERROR E0171
+        //~^ ERROR E0178
         //~^^ NOTE perhaps you meant `&'a mut (Bar + 'a)`?
 
     c: Box<Bar+'a>, // OK, no paren needed in this context
 
     d: fn() -> Bar+'a,
-        //~^ ERROR E0171
+        //~^ ERROR E0178
         //~^^ NOTE perhaps you forgot parentheses
         //~^^^ WARN deprecated syntax
 }
index 9141ab669bbc22fd06b809eef035f53985d44192..c90f064bf904c7acf6ed1e352a35e3a275cae959 100644 (file)
@@ -10,7 +10,7 @@
 
 fn main() {
     let x = box 1i;
-    let f: proc() = proc() {
+    let f = move|:| {
         let _a = x;
         drop(x);
         //~^ ERROR: use of moved value: `x`
index 82cd38ad5b0438ab349c3bee45aaf70d105827c4..46fcb2ec340f9cafdf017d823802006ca28bc644 100644 (file)
@@ -9,10 +9,10 @@
 // except according to those terms.
 
 struct Test<'s> {
-    func: ||: 's,
+    func: Box<FnMut()+'static>
 }
 
 fn main() {
-    let test = box Test { func: proc() {} };
-    //~^ ERROR: expected `||`, found `proc()`
+    let closure: Box<Fn()+'static> = box || ();
+    let test = box Test { func: closure }; //~ ERROR mismatched types
 }
index 5d62c25ea171b776ad56ef993509a28e90afbbdf..c561f0a696a9f33f7f9c73365b81027589e53646 100644 (file)
@@ -11,7 +11,7 @@
 fn main() {
     let r = {
         let x = box 42i;
-        let f = proc() &x; //~ ERROR: `x` does not live long enough
+        let f = move|:| &x; //~ ERROR: `x` does not live long enough
         f()
     };
 
index f824a06aed1b3912d66c3b00f6f8e736aecba81f..1878b5f5dea8d670c561eeacdf4c1bb59200b66b 100644 (file)
@@ -10,7 +10,7 @@
 
 fn main() {
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         loop {
             let tx = tx;
             //~^ ERROR: use of moved value: `tx`
index 788924257702978d37d2345edb8a9f3a6c5827e6..5f2837d28755de1c5969e9f2ee3bce9108683d9a 100644 (file)
@@ -8,9 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+fn do_it(x: &int) { }
+
 fn main() {
-    let f = proc() {};
-    (proc() {
+    let x = box 22;
+    let f = move|:| do_it(&*x);
+    (move|:| {
         f();
         f();
         //~^ ERROR: use of moved value: `f`
diff --git a/src/test/compile-fail/issue-13599.rs b/src/test/compile-fail/issue-13599.rs
deleted file mode 100644 (file)
index eee23f1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test that a mismatched proc / closure type is correctly reported.
-
-fn expect_closure(_: ||) {}
-
-fn expect_proc(_: proc()) {}
-
-fn main() {
-    expect_closure(proc() {});
-    //~^ ERROR mismatched types: expected `||`, found `proc()` (expected closure, found proc)
-
-    expect_proc(|| {});
-    //~^ ERROR mismatched types: expected `proc()`, found `||` (expected proc, found closure)
-}
index a655d61fa56c16cc9331f9f9136b1cab1eda1a9c..02493b96dc88d5f537d63797e9ced74c37b2a54f 100644 (file)
@@ -13,5 +13,5 @@ enum Foo {
 }
 
 fn main() {
-    let f = Foo::Variant(42u); //~ ERROR expected function, found `Foo`
+    let f = Foo::Variant(42u); //~ ERROR uses it like a function
 }
diff --git a/src/test/compile-fail/issue-19452.rs b/src/test/compile-fail/issue-19452.rs
new file mode 100644 (file)
index 0000000..2270ba5
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Homura {
+    Madoka { age: u32 }
+}
+
+fn main() {
+    let homura = Homura::Madoka; //~ ERROR uses it like a function
+}
diff --git a/src/test/compile-fail/issue-19734.rs b/src/test/compile-fail/issue-19734.rs
new file mode 100644 (file)
index 0000000..cee92ca
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {}
+
+impl Type {
+    undef!() //~ ERROR macro undefined: 'undef!'
+}
index 57bc11379125f440caa1fda9f6d262ffffe15a50..e4f7521c33303cc340faabfacff70c593b767580 100644 (file)
@@ -31,6 +31,6 @@ fn to_string(&self) -> String {
 fn main() {
     let p = Point::new(0.0, 0.0);
     //~^ ERROR unresolved name `Point::new`
-    //~^^ ERROR failed to resolve. Use of undeclared module `Point`
+    //~^^ ERROR failed to resolve. Use of undeclared type or module `Point`
     println!("{}", p.to_string());
 }
index a430fe72333cd783607b25b8ebc559dbbd994580..57ee4cf7cc3b03b7695db104745be532c6103293 100644 (file)
@@ -34,6 +34,7 @@ fn g<T>(val: T) {
 fn foo<'a>() {
     let t: S<&'a int> = S;
     let a = &t as &Gettable<&'a int>;
+    //~^ ERROR declared lifetime bound not satisfied
 }
 
 fn foo2<'a>() {
index d694fd2c79512a6d8c3ddd50e461265eda3d5d61..c96054afc2f311c8ba09f92fb166dcc913adbe5b 100644 (file)
 
 fn foo(_x: Rc<uint>) {}
 
-fn bar() {
-    let x = Rc::new(3u);
-    let _: proc():Send = proc() foo(x); //~ ERROR `core::kinds::Send` is not implemented
-}
+fn bar<F:FnOnce() + Send>(_: F) { }
 
-fn bar2() {
+fn main() {
     let x = Rc::new(3u);
-    let _: proc() = proc() foo(x);
+    bar(move|| foo(x)); //~ ERROR `core::kinds::Send` is not implemented
 }
 
-fn main() { }
diff --git a/src/test/compile-fail/kindck-proc-bounds.rs b/src/test/compile-fail/kindck-proc-bounds.rs
deleted file mode 100644 (file)
index d87d1a3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn is_send<T: Send>() {}
-fn is_freeze<T: Sync>() {}
-
-fn foo<'a>() {
-    is_send::<proc()>();
-    //~^ ERROR: the trait `core::kinds::Send` is not implemented
-
-    is_freeze::<proc()>();
-    //~^ ERROR: the trait `core::kinds::Sync` is not implemented
-}
-
-fn main() { }
index 4fbb3eab8c416234b10de8ef08ff6c2fc036cf35..3b67e98f42ca81d55e51967c243fa74a41952ef5 100644 (file)
@@ -27,10 +27,6 @@ fn box_object_with_no_bound_not_ok<'a>() {
     assert_send::<Box<Dummy>>(); //~ ERROR the trait `core::kinds::Send` is not implemented
 }
 
-fn proc_with_no_bound_not_ok<'a>() {
-    assert_send::<proc()>(); //~ ERROR the trait `core::kinds::Send` is not implemented
-}
-
 fn closure_with_no_bound_not_ok<'a>() {
     assert_send::<||:'static>(); //~ ERROR the trait `core::kinds::Send` is not implemented
 }
@@ -38,7 +34,6 @@ fn closure_with_no_bound_not_ok<'a>() {
 fn object_with_send_bound_ok() {
     assert_send::<&'static (Dummy+Send)>();
     assert_send::<Box<Dummy+Send>>();
-    assert_send::<proc():Send>;
     assert_send::<||:Send>;
 }
 
index a551975364329f7f7bbcf453674ff5ece9e7f5fb..d83a8031c45db51c016cb01553f53f006139d237 100644 (file)
@@ -22,7 +22,7 @@ fn test51<'a>() {
 }
 fn test52<'a>() {
     assert_send::<&'a (Dummy+Send)>();
-    //~^ ERROR does not fulfill the required lifetime
+    //~^ ERROR declared lifetime bound not satisfied
 }
 
 // ...unless they are properly bounded
@@ -35,11 +35,6 @@ fn test61() {
 
 // closure and object types can have lifetime bounds which make
 // them not ok
-fn test_70<'a>() {
-    assert_send::<proc():'a>();
-    //~^ ERROR the trait `core::kinds::Send` is not implemented
-}
-
 fn test_71<'a>() {
     assert_send::<Box<Dummy+'a>>();
     //~^ ERROR the trait `core::kinds::Send` is not implemented
index 0eed05692b9c5ddf505d96966ff68f812d15187a..11148d2846c16aebe9759b4e9a083cf6c1901a78 100644 (file)
@@ -19,7 +19,7 @@ fn assert_send<T:Send>() { }
 
 // but not if they own a bad thing
 fn test40<'a>(_: &'a int) {
-    assert_send::<Box<&'a int>>(); //~ ERROR does not fulfill the required lifetime
+    assert_send::<Box<&'a int>>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn main() { }
index cc46d7f4de9c0ef529ac0b8a9d70eb1edc3d86d7..04172932cfe6fcf88a04008c1a137cbbd153478e 100644 (file)
@@ -22,13 +22,13 @@ fn assert_send<T:Send>() { }
 
 // otherwise lifetime pointers are not ok
 fn test20<'a>(_: &'a int) {
-    assert_send::<&'a int>(); //~ ERROR does not fulfill the required lifetime
+    assert_send::<&'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 fn test21<'a>(_: &'a int) {
-    assert_send::<&'a str>(); //~ ERROR does not fulfill the required lifetime
+    assert_send::<&'a str>(); //~ ERROR declared lifetime bound not satisfied
 }
 fn test22<'a>(_: &'a int) {
-    assert_send::<&'a [int]>(); //~ ERROR does not fulfill the required lifetime
+    assert_send::<&'a [int]>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn main() { }
index a9bbfcfa26263c50fba60f3bcab62077bf7b5e0b..33314149d1fade8cd73284edf230617afb87a32a 100644 (file)
@@ -15,7 +15,7 @@ fn test70() {
     assert_send::<*mut int>();
 }
 fn test71<'a>() {
-    assert_send::<*mut &'a int>(); //~ ERROR does not fulfill the required lifetime
+    assert_send::<*mut &'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn main() {
index 0eaa81bd6ab95cf99c71f800812188ed6e4bf269..fbe03e355eed6e5cba7b267c5e044072aff74b11 100644 (file)
 
 static c: char =
     '\u539_' //~ ERROR: illegal character in numeric character escape
+    //~^ WARNING: \uABCD escapes are deprecated
 ;
 
 static c2: char =
     '\Uffffffff' //~ ERROR: illegal numeric character escape
+    //~^ WARNING: \uABCD escapes are deprecated
 ;
 
 static c3: char =
@@ -22,8 +24,9 @@
 
 static c4: char =
     '\u23q' //~  ERROR: illegal character in numeric character escape
+    //~^ WARNING: \uABCD escapes are deprecated
 ;
-//~^^ ERROR: numeric character escape is too short
+//~^^^ ERROR: numeric character escape is too short
 
 static s: &'static str =
     "\x1" //~ ERROR: numeric character escape is too short
@@ -32,6 +35,7 @@
 static s2: &'static str =
     "\u23q" //~ ERROR: illegal character in numeric character escape
     //~^ ERROR: numeric character escape is too short
+    //~^^ WARNING: \uABCD escapes are deprecated
 ;
 
 static c: char =
index 3e731a2d2fed4b3e32ee83d5f682278d1ec5e5ba..4c4fb5572d614a834392db98d33737b3806678f8 100644 (file)
@@ -25,7 +25,7 @@ pub fn bar() { })
 #[qux]
 fn main() {
     a::bar();
-    //~^ ERROR failed to resolve. Use of undeclared module `a`
+    //~^ ERROR failed to resolve. Use of undeclared type or module `a`
     //~^^ ERROR unresolved name `a::bar`
     b::bar();
 }
index 97287c147d73f2d8f7da88bde0c2a923c23bb46b..458e2aaf451a0483e183b7addfc0b20951d359f0 100644 (file)
@@ -12,7 +12,7 @@
 
 fn main() {
     let x = "Hello world!".to_string();
-    task::spawn(proc() {
+    task::spawn(move|| {
         println!("{}", x);
     });
     println!("{}", x); //~ ERROR use of moved value
index 74e5e6b12027f2e8bc2e1e7e06b62c0b01ca1881..2cf7618d92dbc93f96d063d156fdaafdb3d19cb4 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 
-type Noncopyable = proc():'static;
+type Noncopyable = Box<int>;
 
 struct Foo {
     copied: int,
index a07317176e410e48df90a758147dd5339999c90c..affe979268d21c85d28bc0167b531f7d28d6f981 100644 (file)
@@ -17,7 +17,7 @@ fn main() {
     let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10);
     let arc_v = Arc::new(v);
 
-    task::spawn(proc() {
+    task::spawn(move|| {
         assert_eq!((*arc_v)[3], 4);
     });
 
index 9f33f35838e2794de43214b27caa748e406d1602..60982a84b791e9e48a35474e778c63014b431312 100644 (file)
@@ -15,7 +15,7 @@ fn main() {
     let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10);
     let arc_v = Arc::new(v);
 
-    task::spawn(proc() {
+    task::spawn(move|| {
         assert_eq!((*arc_v)[3], 4);
     });
 
index 83dbd9ac1bf7282687c0575710d36425891508e3..e1ba36de7c0324357766cd392cb559521a59432d 100644 (file)
@@ -35,9 +35,9 @@ fn foo(x: Port<()>) -> foo {
 
     let x = foo(Port(Rc::new(())));
 
-    task::spawn(proc() {
-        let y = x;
+    task::spawn(move|| {
         //~^ ERROR `core::kinds::Send` is not implemented
+        let y = x;
         println!("{}", y);
     });
 }
diff --git a/src/test/compile-fail/obsolete-proc.rs b/src/test/compile-fail/obsolete-proc.rs
new file mode 100644 (file)
index 0000000..5208cdb
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that we generate obsolete syntax errors around usages of `proc`.
+
+fn foo(p: proc()) { } //~ ERROR obsolete syntax: the `proc` type
+
+fn bar() { proc() 1; } //~ ERROR obsolete syntax: `proc` expression
+
+fn main() { }
index 68687773f278fd361121d3c5deeba369b006e2ee..6441f308f29c6f079f4bce6c163f83d856b35bb1 100644 (file)
 #![feature(once_fns)]
 use std::sync::Arc;
 
-fn foo(blk: proc()) {
+fn foo<F:FnOnce()>(blk: F) {
     blk();
     blk(); //~ ERROR use of moved value
 }
 
 fn main() {
     let x = Arc::new(true);
-    foo(proc() {
+    foo(move|| {
         assert!(*x);
         drop(x);
     });
diff --git a/src/test/compile-fail/opt-out-copy-bad.rs b/src/test/compile-fail/opt-out-copy-bad.rs
new file mode 100644 (file)
index 0000000..80f8a15
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(opt_out_copy)]
+
+// Test that when using the `opt-out-copy` feature we still consider
+// destructors to be non-movable
+
+struct CantCopyThis;
+
+impl Drop for CantCopyThis {
+    fn drop(&mut self) { }
+}
+
+struct IWantToCopyThis {
+    but_i_cant: CantCopyThis,
+}
+
+impl Copy for IWantToCopyThis {}
+//~^ ERROR the trait `Copy` may not be implemented for this type
+
+enum CantCopyThisEither {
+    A,
+    B(::std::kinds::marker::NoCopy),
+}
+
+enum IWantToCopyThisToo {
+    ButICant(CantCopyThisEither),
+}
+
+impl Copy for IWantToCopyThisToo {}
+//~^ ERROR the trait `Copy` may not be implemented for this type
+
+fn main() {}
+
index 17afb168a9839a284ba75e4c3e908f5733bcf9e7..1da7f47677a2c89633d07af93d4660089694d0e1 100644 (file)
@@ -44,8 +44,8 @@ fn main() {
     is_send::<A>();
     //~^ ERROR overflow evaluating
     //~^^ NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate
-    //~^^^ NOTE must be implemented
+    //~^^^ NOTE required by `is_send`
     //~^^^^ ERROR overflow evaluating
     //~^^^^^ NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate
-    //~^^^^^^ NOTE must be implemented
+    //~^^^^^^ NOTE required by `is_send`
 }
index dfeba04109281fdf594a2db5d22560a55eea08e8..b2b2d3337c419c7ec53d184e4d1d6dcf980505f3 100644 (file)
@@ -15,12 +15,12 @@ trait Foo {}
 impl<'a> Foo for &'a [u8] {}
 
 fn a(v: &[u8]) -> Box<Foo + 'static> {
-    let x: Box<Foo + 'static> = box v; //~ ERROR does not outlive
+    let x: Box<Foo + 'static> = box v; //~ ERROR declared lifetime bound not satisfied
     x
 }
 
 fn b(v: &[u8]) -> Box<Foo + 'static> {
-    box v //~ ERROR does not outlive
+    box v //~ ERROR declared lifetime bound not satisfied
 }
 
 fn c(v: &[u8]) -> Box<Foo> {
@@ -28,7 +28,7 @@ fn c(v: &[u8]) -> Box<Foo> {
 }
 
 fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
-    box v //~ ERROR does not outlive
+    box v //~ ERROR declared lifetime bound not satisfied
 }
 
 fn e<'a:'b,'b>(v: &'a [u8]) -> Box<Foo+'b> {
index 660a9be4f63c5cd2cbfce201bb83ccb6ebebcfe2..67655f323f06533ca91e12571b3147cfaff4521f 100644 (file)
@@ -29,15 +29,15 @@ fn static_lifime_ok<'a,T,U:Send>(_: &'a int) {
 // otherwise lifetime pointers are not ok
 
 fn param_not_ok<'a>(x: &'a int) {
-    assert_send::<&'a int>(); //~ ERROR does not fulfill
+    assert_send::<&'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn param_not_ok1<'a>(_: &'a int) {
-    assert_send::<&'a str>(); //~ ERROR does not fulfill
+    assert_send::<&'a str>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn param_not_ok2<'a>(_: &'a int) {
-    assert_send::<&'a [int]>(); //~ ERROR does not fulfill
+    assert_send::<&'a [int]>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 // boxes are ok
@@ -51,7 +51,7 @@ fn box_ok() {
 // but not if they own a bad thing
 
 fn box_with_region_not_ok<'a>() {
-    assert_send::<Box<&'a int>>(); //~ ERROR does not fulfill
+    assert_send::<Box<&'a int>>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 // objects with insufficient bounds no ok
@@ -63,12 +63,7 @@ fn object_with_random_bound_not_ok<'a>() {
 
 fn object_with_send_bound_not_ok<'a>() {
     assert_send::<&'a (Dummy+Send)>();
-    //~^ ERROR does not fulfill
-}
-
-fn proc_with_lifetime_not_ok<'a>() {
-    assert_send::<proc():'a>();
-    //~^ ERROR not implemented
+    //~^ ERROR declared lifetime bound not satisfied
 }
 
 fn closure_with_lifetime_not_ok<'a>() {
@@ -84,11 +79,11 @@ fn unsafe_ok1<'a>(_: &'a int) {
 }
 
 fn unsafe_ok2<'a>(_: &'a int) {
-    assert_send::<*const &'a int>(); //~ ERROR does not fulfill
+    assert_send::<*const &'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn unsafe_ok3<'a>(_: &'a int) {
-    assert_send::<*mut &'a int>(); //~ ERROR does not fulfill
+    assert_send::<*mut &'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn main() {
index 04a94b75215a7a9950bb8fc62208eaea4a34558c..e3939a4e39046bfca361f38fec42154409ffb7a6 100644 (file)
@@ -29,15 +29,15 @@ fn static_lifime_ok<'a,T,U:Send>(_: &'a int) {
 // otherwise lifetime pointers are not ok
 
 fn param_not_ok<'a>(x: &'a int) {
-    assert_send::<&'a int>(); //~ ERROR does not fulfill
+    assert_send::<&'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn param_not_ok1<'a>(_: &'a int) {
-    assert_send::<&'a str>(); //~ ERROR does not fulfill
+    assert_send::<&'a str>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn param_not_ok2<'a>(_: &'a int) {
-    assert_send::<&'a [int]>(); //~ ERROR does not fulfill
+    assert_send::<&'a [int]>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 // boxes are ok
@@ -51,7 +51,7 @@ fn box_ok() {
 // but not if they own a bad thing
 
 fn box_with_region_not_ok<'a>() {
-    assert_send::<Box<&'a int>>(); //~ ERROR does not fulfill
+    assert_send::<Box<&'a int>>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 // unsafe pointers are ok unless they point at unsendable things
@@ -62,11 +62,11 @@ fn unsafe_ok1<'a>(_: &'a int) {
 }
 
 fn unsafe_ok2<'a>(_: &'a int) {
-    assert_send::<*const &'a int>(); //~ ERROR does not fulfill
+    assert_send::<*const &'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn unsafe_ok3<'a>(_: &'a int) {
-    assert_send::<*mut &'a int>(); //~ ERROR does not fulfill
+    assert_send::<*mut &'a int>(); //~ ERROR declared lifetime bound not satisfied
 }
 
 fn main() {
index 279139d8de96a0e1520074b1d802027173acc7ea..10484925980a79da53098566d5cd46c3de95026e 100644 (file)
@@ -20,7 +20,7 @@ fn some_method<A:'static>(self) { }
 
 fn caller<'a>(x: &int) {
     Foo.some_method::<&'a int>();
-    //~^ ERROR does not fulfill the required lifetime
+    //~^ ERROR declared lifetime bound not satisfied
 }
 
 fn main() { }
index 7fe85290da0ecf5355f3f2e866de52f07654fdc2..8b2fdfe7cdd1547c1b3abb712cc06fb2bbc6ae54 100644 (file)
 // Test that, when a variable of type `&T` is captured inside a proc,
 // we correctly infer/require that its lifetime is 'static.
 
-fn foo(_p: proc():'static) { }
+fn foo<F:FnOnce()+'static>(_p: F) { }
 
 static i: int = 3;
 
 fn capture_local() {
     let x = 3i;
     let y = &x; //~ ERROR `x` does not live long enough
-    foo(proc() {
+    foo(move|| {
         let _a = *y;
     });
 }
@@ -26,7 +26,7 @@ fn capture_local() {
 fn capture_static() {
     // Legal because &i can have static lifetime:
     let y = &i;
-    foo(proc() {
+    foo(move|| {
         let _a = *y;
     });
 }
diff --git a/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs b/src/test/compile-fail/regions-infer-region-in-fn-but-not-type.rs
deleted file mode 100644 (file)
index 0fa4969..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-// check that the &int here does not cause us to think that `foo`
-// contains region pointers
-struct foo(proc(x: &int):'static);
-
-fn take_foo(x: foo<'static>) {} //~ ERROR wrong number of lifetime parameters
-
-fn main() {
-}
index e32ef2752566bb6c14cfd646e1347b9ccd55c6d7..0841c1852f8830120f7095a5ffab70084e77e434 100644 (file)
@@ -8,19 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn borrowed_proc<'a>(x: &'a int) -> proc():'a -> int {
+fn borrowed_proc<'a>(x: &'a int) -> Box<FnMut()->(int) + 'a> {
     // This is legal, because the region bound on `proc`
     // states that it captures `x`.
-    proc() {
-        *x
-    }
+    box move|| { *x }
 }
 
-fn static_proc<'a>(x: &'a int) -> proc():'static -> int {
+fn static_proc(x: &int) -> Box<FnMut()->(int) + 'static> {
     // This is illegal, because the region bound on `proc` is 'static.
-    proc() { //~ ERROR captured variable `x` outlives the `proc()`
-        *x
-    }
+    box move|| { *x } //~ ERROR cannot infer
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/regions-proc-bounds.rs b/src/test/compile-fail/regions-proc-bounds.rs
deleted file mode 100644 (file)
index db71bc4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn is_static<T: 'static>() {}
-
-fn foo<'a>() {
-    is_static::<proc():'a>();
-    //~^ ERROR does not fulfill the required lifetime
-
-    is_static::<proc():'static>();
-}
-
-fn main() { }
index 3a35d9cc309ab2f653e38b697e33abefce09d687..6cc45090b9024a70b73bb0273e326a1c57838ec2 100644 (file)
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: mismatched types
-
 use std::task;
 
-fn main() { task::spawn(|| -> int { 10 }); }
+fn main() {
+    // We get an error because return type is `->int` and not `->()`.
+    task::spawn(|| -> int { 10 });
+    //~^ ERROR type mismatch
+}
diff --git a/src/test/compile-fail/trait-safety-fn-body.rs b/src/test/compile-fail/trait-safety-fn-body.rs
new file mode 100644 (file)
index 0000000..d174092
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that an unsafe impl does not imply that unsafe actions are
+// legal in the methods.
+
+unsafe trait UnsafeTrait {
+    fn foo(self) { }
+}
+
+unsafe impl UnsafeTrait for *mut int {
+    fn foo(self) {
+        // Unsafe actions are not made legal by taking place in an unsafe trait:
+        *self += 1; //~ ERROR E0133
+    }
+}
+
+fn main() { }
diff --git a/src/test/compile-fail/trait-safety-inherent-impl.rs b/src/test/compile-fail/trait-safety-inherent-impl.rs
new file mode 100644 (file)
index 0000000..285d4c1
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that inherent impls cannot be unsafe.
+
+struct SomeStruct;
+
+unsafe impl SomeStruct { //~ ERROR inherent impls cannot be declared as unsafe
+    fn foo(self) { }
+}
+
+fn main() { }
diff --git a/src/test/compile-fail/trait-safety-trait-impl-cc.rs b/src/test/compile-fail/trait-safety-trait-impl-cc.rs
new file mode 100644 (file)
index 0000000..21dd5a2
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:trait-safety-lib.rs
+
+// Check that unsafe traits require unsafe impls and that inherent
+// impls cannot be unsafe.
+
+extern crate "trait-safety-lib" as lib;
+
+struct Bar;
+impl lib::Foo for Bar { //~ ERROR requires an `unsafe impl` declaration
+    fn foo(&self) -> int {
+        *self as int
+    }
+}
+
+fn main() { }
diff --git a/src/test/compile-fail/trait-safety-trait-impl.rs b/src/test/compile-fail/trait-safety-trait-impl.rs
new file mode 100644 (file)
index 0000000..1bd6d76
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that unsafe traits require unsafe impls and that inherent
+// impls cannot be unsafe.
+
+trait SafeTrait {
+    fn foo(self) { }
+}
+
+unsafe trait UnsafeTrait {
+    fn foo(self) { }
+}
+
+unsafe impl UnsafeTrait for u8 { } // OK
+
+impl UnsafeTrait for u16 { } //~ ERROR requires an `unsafe impl` declaration
+
+unsafe impl SafeTrait for u32 { } //~ ERROR the trait `SafeTrait` is not unsafe
+
+fn main() { }
diff --git a/src/test/compile-fail/unboxed-closure-feature-gate.rs b/src/test/compile-fail/unboxed-closure-feature-gate.rs
new file mode 100644 (file)
index 0000000..9bb8037
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Check that parenthetical notation is feature-gated except with the
+// `Fn` traits.
+
+trait Foo<A,R> {
+}
+
+fn main() {
+    let x: Box<Foo(int)>;
+    //~^ ERROR parenthetical notation is only stable when used with the `Fn` family
+
+    // No errors with these:
+    let x: Box<Fn(int)>;
+    let x: Box<FnMut(int)>;
+    let x: Box<FnOnce(int)>;
+}
diff --git a/src/test/compile-fail/unboxed-closure-sugar-used-on-struct-1.rs b/src/test/compile-fail/unboxed-closure-sugar-used-on-struct-1.rs
new file mode 100644 (file)
index 0000000..a6184ca
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+// Test that parentheses form doesn't work with struct types appearing in local variables.
+
+struct Bar<A,R> {
+    f: A, r: R
+}
+
+fn bar() {
+    let x: Box<Bar()> = panic!();
+    //~^ ERROR parenthesized parameters may only be used with a trait
+}
+
+fn main() { }
+
diff --git a/src/test/compile-fail/unboxed-closure-sugar-used-on-struct-3.rs b/src/test/compile-fail/unboxed-closure-sugar-used-on-struct-3.rs
new file mode 100644 (file)
index 0000000..5e16adc
--- /dev/null
@@ -0,0 +1,29 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that parentheses form doesn't work in expression paths.
+
+struct Bar<A,R> {
+    f: A, r: R
+}
+
+impl<A,B> Bar<A,B> {
+    fn new() -> Bar<A,B> { panic!() }
+}
+
+fn bar() {
+    let b = Box::Bar::<int,uint>::new(); // OK
+
+    let b = Box::Bar::()::new();
+    //~^ ERROR expected ident, found `(`
+}
+
+fn main() { }
+
diff --git a/src/test/compile-fail/unboxed-closure-sugar-used-on-struct.rs b/src/test/compile-fail/unboxed-closure-sugar-used-on-struct.rs
new file mode 100644 (file)
index 0000000..d5fb505
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that parentheses form doesn't work with struct types appearing in argument types.
+
+struct Bar<A,R> {
+    f: A, r: R
+}
+
+fn foo(b: Box<Bar()>) {
+    //~^ ERROR parenthesized parameters may only be used with a trait
+}
+
+fn main() { }
+
index 4fa72b383067d5bca025e40a3492549ce980c8d0..ddd2649a3fee5f52ae7efe51ba880eb026b84d23 100644 (file)
@@ -12,6 +12,6 @@
 
 fn main() {
     let mut_ = |&mut: x| x;
-    mut_.call((0i, )); //~ ERROR type `closure` does not implement
+    mut_.call((0i, )); //~ ERROR does not implement any method in scope named `call`
 }
 
index a3db84b0ac65f671f64e4adb35c8f18f8a146071..2c000e03ce43aaa069dd111f7bc9e6df7d5c4f00 100644 (file)
@@ -13,5 +13,5 @@
 fn main() {
     let mut x = 1i;
     //~^ ERROR: variable does not need to be mutable
-    proc() { println!("{}", x); };
+    move|:| { println!("{}", x); };
 }
index 6ed6a2731257a886c5117151420cdf79fc8e7feb..fa7822495d5f15ede8117880cc1b546583fbd752 100644 (file)
@@ -77,7 +77,7 @@ fn main() {
     zzz(); // #break
     sentinel();
 
-    let unique_closure: proc(int) = proc(x) {
+    let unique_closure = |: x:int| {
         zzz(); // #break
         sentinel();
 
index e7664d1029bd8b47fb8e3950220693553765aa8a..d72b080409e1d43fa4dc942b99ab30a8de397bf1 100644 (file)
 
 
 // CLOSURES
-// gdb-command:whatis some_proc
-// gdb-check:type = struct (once proc(int, u8) -> (int, u8), uint)
-
 // gdb-command:whatis stack_closure1
 // gdb-check:type = struct (&mut|int|, uint)
 
@@ -322,8 +319,6 @@ fn main() {
     // how that maps to rustc's internal representation of these forms.
     // Once closures have reached their 1.0 form, the tests below should
     // probably be expanded.
-    let some_proc = (proc(a:int, b:u8) (a, b), 0u);
-
     let stack_closure1 = (|x:int| {}, 0u);
     let stack_closure2 = (|x:i8, y: f32| { (x as f32) + y }, 0u);
 
index eb20a09477d3cf9d642b841741590dc85c852d6f..328d4245eb61011acc5edbff4e2998a7356c513d 100644 (file)
@@ -13,7 +13,7 @@
 
 // pp-exact
 
-fn call_it(f: proc(String) -> String) { }
+fn call_it(f: Box<FnMut(String) -> String>) { }
 
 fn call_this(f: |&str|: Send) { }
 
index ffa6f03909b023a07eb3fabf491b41c96934b943..1313af2df3d88c742a5b11f7b9658ca6519157e4 100644 (file)
@@ -12,5 +12,4 @@
 
 fn from_foreign_fn(_x: fn()) { }
 fn from_stack_closure(_x: ||) { }
-fn from_unique_closure(_x: proc()) { }
 fn main() { }
diff --git a/src/test/pretty/trait-safety.rs b/src/test/pretty/trait-safety.rs
new file mode 100644 (file)
index 0000000..b96dbbf
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// pp-exact
+
+unsafe trait UnsafeTrait {
+    fn foo(&self);
+}
+
+unsafe impl UnsafeTrait for int {
+    fn foo(&self) { }
+}
+
+pub unsafe trait PubUnsafeTrait {
+    fn foo(&self);
+}
+
+fn main() { }
index 21a332a46cb5976d38ed2ff93ba31ed658af2105..e7c6dcc2df7e7530fad6dfff4ebe7b72d7198a3b 100644 (file)
@@ -42,7 +42,7 @@ fn count(n: uint) -> uint {
 
 fn main() {
     for _ in range(0, 10u) {
-        task::spawn(proc() {
+        task::spawn(move|| {
             let result = count(5u);
             println!("result = %?", result);
             panic!();
index 3f8abc41ff74a472cb3b0a53318be28d2dc38291..b36383859320970a3b30f740110a6f9d9e5cdca1 100644 (file)
@@ -13,7 +13,7 @@
 use std::task;
 
 fn main() {
-    let r: Result<int,_> = task::try(proc() {
+    let r: Result<int,_> = task::try(move|| {
         panic!("test");
         1i
     });
index 0a303475a29ff1705b1aed7bdeb9fa94f43036c2..3c442861a44a3bad32cebe64751ad96c070fae0c 100644 (file)
@@ -14,7 +14,7 @@
 
 fn main() {
     let r: Result<int,_> = TaskBuilder::new().named("owned name".to_string())
-                                             .try(proc() {
+                                             .try(move|| {
         panic!("test");
         1i
     });
index fb4fb5c2f7081a949aa938d828e56de2f9ff237d..92ebb3b4587af6b277a3cfb8f71ecb6c482d8a60 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     let r: Result<int,_> =
         ::std::task::TaskBuilder::new().named("send name".into_cow())
-                                       .try(proc() {
+                                       .try(move|| {
             panic!("test");
             3i
         });
index 21c019e1a7422f00b3a701665427afc8153d75eb..f8dfe9245b4389345a491d62428d84d5e7852509 100644 (file)
@@ -12,7 +12,7 @@
 
 fn main() {
     let r: Result<int,_> =
-        ::std::task::TaskBuilder::new().named("static name").try(proc() {
+        ::std::task::TaskBuilder::new().named("static name").try(move|| {
             panic!("test");
         });
     assert!(r.is_ok());
index 1cfc6c36a6397f844bd5d29cc870f242d637b608..58de34e92a09d3b8885b28c2f818ee1c8de24dcf 100644 (file)
@@ -36,7 +36,7 @@ fn r(x:int) -> r {
 
 fn main() {
     error!("whatever");
-    task::spawn(proc() {
+    task::spawn(move|| {
       let _i = r(5);
     });
     panic!();
index 34d9cc48ffe20385f40a344e1ba85bf36b816b8a..d2fd5393834ebfbd32ae83308bc9af0902448528 100644 (file)
 #![crate_type="dylib"]
 
 use std::rt;
+use std::thunk::Thunk;
 
 #[no_mangle] // this needs to get called from C
 pub extern "C" fn foo(argc: int, argv: *const *const u8) -> int {
-    rt::start(argc, argv, proc() {
-        spawn(proc() {
+    rt::start(argc, argv, Thunk::new(move|| {
+        spawn(move|| {
             println!("hello");
         });
-    })
+    }))
 }
index 9918fbb1ab70186db32aa26ae06df8007c97650c..e2cca4d11f9a93c24858270773804786fbf6a442 100644 (file)
@@ -22,7 +22,7 @@ fn drop(&mut self) {
 }
 
 fn main() {
-    task::try(proc() {
+    task::try(move|| {
         let _a = A;
         lib::callback(|| panic!());
         1i
index f822da4cdcfcfea32474881355dabfe0f23d5f43..f623b7911ce6d3c49673629ae9ed6c23a9f70892 100644 (file)
 // making method calls, but only if there aren't any matches without
 // it.
 
+#![feature(unboxed_closures)]
 
 trait iterable<A> {
-    fn iterate(&self, blk: |x: &A| -> bool) -> bool;
+    fn iterate<F>(&self, blk: F) -> bool where F: FnMut(&A) -> bool;
 }
 
 impl<'a,A> iterable<A> for &'a [A] {
-    fn iterate(&self, f: |x: &A| -> bool) -> bool {
+    fn iterate<F>(&self, f: F) -> bool where F: FnMut(&A) -> bool {
         self.iter().all(f)
     }
 }
 
 impl<A> iterable<A> for Vec<A> {
-    fn iterate(&self, f: |x: &A| -> bool) -> bool {
+    fn iterate<F>(&self, f: F) -> bool where F: FnMut(&A) -> bool {
         self.iter().all(f)
     }
 }
diff --git a/src/test/run-pass/assoc-eq.rs b/src/test/run-pass/assoc-eq.rs
new file mode 100644 (file)
index 0000000..f1ba382
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test equality constraints on associated types.
+
+#![feature(associated_types)]
+
+pub trait Foo {
+    type A;
+    fn boo(&self) -> <Self as Foo>::A;
+}
+
+struct Bar;
+
+impl Foo for int {
+    type A = uint;
+    fn boo(&self) -> uint { 42 }
+}
+impl Foo for Bar {
+    type A = int;
+    fn boo(&self) -> int { 43 }
+}
+impl Foo for char {
+    type A = Bar;
+    fn boo(&self) -> Bar { Bar }
+}
+
+fn foo1<I: Foo<A=Bar>>(x: I) -> Bar {
+    x.boo()
+}
+fn foo2<I: Foo>(x: I) -> <I as Foo>::A {
+    x.boo()
+}
+fn baz(x: &Foo<A=Bar>) -> Bar {
+    x.boo()
+}
+
+pub fn main() {
+    let a = 42i;
+    assert!(foo2(a) == 42u);
+
+    let a = Bar;
+    assert!(foo2(a) == 43i);
+
+    let a = 'a';
+    foo1(a);
+    baz(&a);
+}
index a267b8dcc86d22a83b9be03aeff888bddf53f9a9..da5fa19f816f753771008632a3794a3ae882bf6e 100644 (file)
@@ -10,6 +10,9 @@
 
 // no-pretty-expanded FIXME #15189
 // ignore-windows FIXME #13259
+
+#![feature(unboxed_closures)]
+
 use std::os;
 use std::io::process::Command;
 use std::finally::Finally;
@@ -25,7 +28,7 @@ fn foo() {
 
 #[inline(never)]
 fn double() {
-    (|| {
+    (|&mut:| {
         panic!("once");
     }).finally(|| {
         panic!("twice");
index fd40f0b4b800299111d457e953788160d00a8668..b4e366296517416d9be41076e3c208f8b47cd8dd 100644 (file)
@@ -8,17 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn asSendfn(f: proc() -> uint) -> uint {
-   return f();
-}
-
 fn asBlock(f: || -> uint) -> uint {
    return f();
 }
 
 pub fn main() {
-   let x = asSendfn(proc() 22u);
-   assert_eq!(x, 22u);
    let x = asBlock(|| 22u);
    assert_eq!(x, 22u);
 }
index 4b81654a1d0a2195f54e43b12161ce2cbb0d07e2..d017a0dbf9a3bb65d5e4a262efb5ac3015f4b506 100644 (file)
@@ -8,14 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn inty(fun: proc(int) -> int) -> int {
-    fun(100)
-}
-
-fn booly(fun: proc(bool) -> bool) -> bool {
-    fun(true)
-}
-
 // Check usage and precedence of block arguments in expressions:
 pub fn main() {
     let v = vec!(-1.0f64, 0.0, 1.0, 2.0, 3.0);
index 48ddf927722a37ff0346cba2c88c69d2249a6da1..a6b142bb12654afeb387b0cb92530f291433b187 100644 (file)
@@ -8,8 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(unboxed_closures)]
+
 pub fn main() {
     let bar = box 3;
-    let h: proc() -> int = proc() *bar;
+    let h = |:| -> int *bar;
     assert_eq!(h(), 3);
 }
+
index a6744585e47a3ef240d88abc5c45b3e25110edff..f2df5ef38c382025e99b05302095b45ed58259a3 100644 (file)
@@ -32,7 +32,7 @@ fn log(&mut self, record: &LogRecord) {
 fn main() {
     let (tx, rx) = channel();
     let (mut r, w) = (ChanReader::new(rx), ChanWriter::new(tx));
-    spawn(proc() {
+    spawn(move|| {
         set_logger(box MyWriter(w) as Box<Logger+Send>);
         debug!("debug");
         info!("info");
index 82855729fa882ac69f19344332b27cd7ac7d180a..bdd92919ef05bfb23466daddfe1b9bd7ae42279b 100644 (file)
@@ -15,5 +15,5 @@
 fn child2(_s: String) { }
 
 pub fn main() {
-    let _x = task::spawn(proc() child2("hi".to_string()));
+    let _x = task::spawn(move|| child2("hi".to_string()));
 }
index f676a6f09594ea1c10bb72992bac2c33d75ad166..d3c703b258f73e3ec2978178bb714ff08256dd2d 100644 (file)
@@ -18,10 +18,8 @@ struct Pair {
 pub fn main() {
     let z = box Pair { a : 10, b : 12};
 
-    let f: proc():Send = proc() {
+    spawn(move|| {
         assert_eq!(z.a, 10);
         assert_eq!(z.b, 12);
-    };
-
-    spawn(f);
+    });
 }
index 3c4b7236ad50fd61898b0fa7a275db9d11433214..cdcdad47ea49782a7c5ac98ef013c535409478fb 100644 (file)
@@ -8,15 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(unboxed_closures)]
+
 use std::comm;
 
-fn foo(blk: proc()) {
+fn foo<F:FnOnce()+Send>(blk: F) {
     blk();
 }
 
 pub fn main() {
     let (tx, rx) = channel();
-    foo(proc() {
+    foo(move || {
         tx.send(());
     });
     rx.recv();
index aa4d48e5ae0e1f90de4bbe8ff0884a2b82479448..03d9511b41c78c31f95a897b81c0816154e6c1a8 100644 (file)
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
+#![feature(unboxed_closures)]
+
 use std::mem;
 use std::io::stdio::println;
 
-fn call_it(f: proc(String) -> String) {
+fn call_it<F>(f: F)
+    where F : FnOnce(String) -> String
+{
     println!("{}", f("Fred".to_string()))
 }
 
@@ -49,15 +53,15 @@ pub fn main() {
     // Procs
 
     let greeting = "Hello ".to_string();
-    call_it(proc(s) {
+    call_it(|s| {
         format!("{}{}", greeting, s)
     });
 
     let greeting = "Goodbye ".to_string();
-    call_it(proc(s) format!("{}{}", greeting, s));
+    call_it(|s| format!("{}{}", greeting, s));
 
     let greeting = "How's life, ".to_string();
-    call_it(proc(s: String) -> String {
+    call_it(|s: String| -> String {
         format!("{}{}", greeting, s)
     });
 
index 6716c3468d0f84b67635c4fe94609021ffa2eb38..4caa234ac7ae325688aba6005c35beaa612b7101 100644 (file)
 
 fn foo<T>() {}
 
-trait Bar1 {}
-impl Bar1 for proc():'static {}
-
-trait Bar2 {}
-impl Bar2 for proc():Send {}
-
 trait Bar3 {}
 impl<'b> Bar3 for <'a>|&'a int|: 'b + Send -> &'a int {}
 
-trait Bar4 {}
-impl Bar4 for proc<'a>(&'a int):'static -> &'a int {}
-
 struct Foo<'a> {
     a: ||: 'a,
     b: ||: 'static,
     c: <'b>||: 'a,
     d: ||: 'a + Sync,
     e: <'b>|int|: 'a + Sync -> &'b f32,
-    f: proc():'static,
-    g: proc():'static+Sync,
-    h: proc<'b>(int):'static+Sync -> &'b f32,
 }
 
 fn f<'a>(a: &'a int, f: <'b>|&'b int| -> &'b int) -> &'a int {
     f(a)
 }
 
-fn g<'a>(a: &'a int, f: proc<'b>(&'b int) -> &'b int) -> &'a int {
-    f(a)
+fn g<'a>(a: &'a int) -> &'a int {
+    a
 }
 
 struct A;
@@ -60,11 +48,6 @@ fn bar<'b>() {
     foo::<||:'b + Sync>();
     foo::<||:Sync>();
     foo::< <'a>|int, f32, &'a int|:'b + Sync -> &'a int>();
-    foo::<proc()>();
-    foo::<proc() -> ()>();
-    foo::<proc():'static>();
-    foo::<proc():Sync>();
-    foo::<proc<'a>(int, f32, &'a int):'static + Sync -> &'a int>();
 
     foo::<<'a>||>();
 
@@ -84,7 +67,6 @@ fn bar<'b>() {
 
     // issue #13490
     let _ = || -> ! loop {};
-    let _ = proc() -> ! loop {};
 
     // issue #17021
     let c = box |&:| {};
index 6dbc402e7852cca702d5add501386bd42d436ab9..5a1b401177e01707fc4e51041754347209ad605f 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(unboxed_closures)]
+
 fn id<T>(x: T) -> T {
     x
 }
@@ -24,24 +26,12 @@ pub fn main() {
     let f: |int| -> int = id;
     assert_eq!(f(5), 5);
 
-    let f: proc(int) -> int = id;
-    assert_eq!(f(5), 5);
-
     let f: |int| -> Foo<int> = Foo;
     assert_eq!(f(5), Foo(5));
 
-    let f: proc(int) -> Foo<int> = Foo;
-    assert_eq!(f(5), Foo(5));
-
     let f: |int| -> Bar<int> = Bar::Baz;
     assert_eq!(f(5), Bar::Baz(5));
 
-    let f: proc(int) -> Bar<int> = Bar::Baz;
-    assert_eq!(f(5), Bar::Baz(5));
-
     let f: |int| -> Option<int> = Some;
     assert_eq!(f(5), Some(5));
-
-    let f: proc(int) -> Option<int> = Some;
-    assert_eq!(f(5), Some(5));
 }
index 18cc92f335dff8099b57f996915cd2e86e7a72c2..edd4d5642b5bf9ac7e58d0fde35ad6c13f8ce593 100644 (file)
@@ -12,7 +12,7 @@
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _t = task::spawn(proc() { child(&tx) });
+    let _t = task::spawn(move|| { child(&tx) });
     let y = rx.recv();
     println!("received");
     println!("{}", y);
index d8dfb433e6d4910f36384fd5c8f1ded4330c86d7..4e625ce1d1f96646d305a3d39177070eace1a753 100644 (file)
@@ -84,7 +84,7 @@ pub fn test_destroy_actually_kills(force: bool) {
     let (tx, rx1) = channel();
     let mut t = timer::Timer::new().unwrap();
     let rx2 = t.oneshot(Duration::milliseconds(1000));
-    spawn(proc() {
+    spawn(move|| {
         select! {
             () = rx2.recv() => unsafe { libc::exit(1) },
             () = rx1.recv() => {}
index 15f028e1716f081232e198ce1d2d61b909b9cc06..24915d84e7eb1970d61a4b976b9cde878c9d4cdf 100644 (file)
@@ -65,7 +65,7 @@ pub fn main() {
     assert_eq!(receiver.recv_opt().ok(), None);
 
     let (sender, receiver) = channel();
-    task::spawn(proc() {
+    task::spawn(move|| {
         let v = Foo::FailingVariant { on_drop: SendOnDrop { sender: sender } };
     });
     assert_eq!(receiver.recv(), Message::Dropped);
@@ -73,7 +73,7 @@ pub fn main() {
 
     let (sender, receiver) = channel();
     {
-        task::spawn(proc() {
+        task::spawn(move|| {
             let mut v = Foo::NestedVariant(box 42u, SendOnDrop {
                 sender: sender.clone()
             }, sender.clone());
index 3e22c8331839306de32446ae5827da8fb4910f27..2d4819231fad0a9fb7d1be6e065446e4bcff64a6 100644 (file)
@@ -14,8 +14,7 @@
 trait Trait {}
 
 fn main() {
-    // Closures - || / proc()
-    assert_eq!(size_of::<proc()>(), size_of::<Option<proc()>>());
+    // Closures - ||
     assert_eq!(size_of::<||>(), size_of::<Option<||>>());
 
     // Functions
index eeda299c71fa6105234824ee21325b7765a3408d..87f1adba8ddcf494e24eb01a865591e1970a0fb9 100644 (file)
@@ -8,14 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-/**
- * A function that returns a hash of a value
- *
- * The hash should concentrate entropy in the lower bits.
- */
-type HashFn<K> = proc(K):'static -> uint;
-type EqFn<K> = proc(K, K):'static -> bool;
-
 struct LM { resize_at: uint, size: uint }
 
 impl Copy for LM {}
index bc5ccc30c527c5298c472a046419b371b645b100..aed1392c8b68b9d9739b3c42387b6e365b0c33cc 100644 (file)
@@ -40,7 +40,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 pub fn main() {
     // Make sure we're on a task with small Rust stacks (main currently
     // has a large stack)
-    task::spawn(proc() {
+    task::spawn(move|| {
         let result = count(1000);
         println!("result = {}", result);
         assert_eq!(result, 1000);
index ae9430370d52077900fe61a82adb771bd7f591a8..3f5faabe595983755f3ef090f32c7240625b0585 100644 (file)
@@ -44,7 +44,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 pub fn main() {
     // Make sure we're on a task with small Rust stacks (main currently
     // has a large stack)
-    task::spawn(proc() {
+    task::spawn(move|| {
         let result = count(12);
         println!("result = {}", result);
         assert_eq!(result, 2048);
index 87d96880e4bd340a07fa837b0c03315d1b4c7abe..8b080712b966191230376da7f5b3f80b3c0ef134 100644 (file)
@@ -42,7 +42,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 
 pub fn main() {
     for _ in range(0u, 100) {
-        task::spawn(proc() {
+        task::spawn(move|| {
             assert_eq!(count(5), 16);
         });
     }
index 7fb68e9f8a03863e92a93e70034d3e387229a2ac..1c89d8ae1ce9d2934f977d794b269b76f3b28b5c 100644 (file)
@@ -39,7 +39,7 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 
 pub fn main() {
     for _ in range(0, 10u) {
-        task::spawn(proc() {
+        task::spawn(move|| {
             let result = count(5);
             println!("result = {}", result);
             assert_eq!(result, 16);
index af36387f06c2c9fb46d32ace369c0518507529ad..3f659f1dbfbf7fb93584a2bba9155b61e9b627b0 100644 (file)
@@ -22,7 +22,7 @@ fn rust_dbg_call(cb: extern "C" fn(libc::uintptr_t),
 
 pub fn main() {
     unsafe {
-        Thread::start(proc() {
+        Thread::start(move|| {
             let i = &100i;
             rust_dbg_call(callback, mem::transmute(i));
         }).join();
index 8efd3af4bcedbd5b9ed51231fd3b0a62d4e0dfc8..a92b361dd3355cd95933f941f2aa5048d74e3194 100644 (file)
@@ -37,7 +37,7 @@ fn start_mappers(ctrl: Sender<ctrl_proto>, inputs: Vec<String>) {
         for i in inputs.iter() {
             let ctrl = ctrl.clone();
             let i = i.clone();
-            task::spawn(proc() map_task(ctrl.clone(), i.clone()) );
+            task::spawn(move|| map_task(ctrl.clone(), i.clone()) );
         }
     }
 
index 02d3bc120da8c84a7ca5184678c34fa702dc3034..53749f09f741e86207186f9d84b20e9ee03f541a 100644 (file)
@@ -43,7 +43,5 @@ fn foo23(t: for<'a> unsafe extern "C" fn(int) -> int) { }
 fn foo30(t: for<'a> |int| -> int) { }
 fn foo31(t: for<'a> unsafe |int| -> int) { }
 
-//fn foo40(t: for<'a> proc(int) -> int) { }
-
 fn main() {
 }
index f4de938c66e7d9b0ee2a4d042ad03d13fc402625..e4168ea145212aa9afc0f219171b68c0a959cbb9 100644 (file)
@@ -15,7 +15,7 @@
 // ignore-test
 
 fn loopy(n: int) {
-    if n > 0 { spawn(proc() { loopy(n - 1) }); spawn(proc() { loopy(n - 1) }); }
+    if n > 0 { spawn(move|| { loopy(n - 1) }); spawn(move|| { loopy(n - 1) }); }
     loop { }
 }
 
@@ -23,5 +23,5 @@ pub fn main() {
     // Commenting this out, as this will hang forever otherwise.
     // Even after seeing the comment above, I'm not sure what the
     // intention of this test is.
-    // spawn(proc() { loopy(5) });
+    // spawn(move|| { loopy(5) });
 }
index f2f8b17daa264215d3419ccd3232c1b4a5fae115..fd0ad1ef47ecbf9c782557081cc71c727aba6c0a 100644 (file)
 // Regression test for issue #10682
 // Nested `proc` usage can't use outer owned data
 
-
 fn work(_: Box<int>) {}
-fn foo(_: proc()) {}
+fn foo<F:FnOnce()>(_: F) {}
 
 pub fn main() {
   let a = box 1;
-  foo(proc() { foo(proc() { work(a) }) })
+  foo(move|| { foo(move|| { work(a) }) })
 }
index 34804eda287cd675128475aafceb5caf683105e9..71b4cbe933427fc9175e6c395d85585bf2da4a08 100644 (file)
@@ -8,11 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn f(p: proc()) {
+#![feature(unboxed_closures)]
+
+fn f<F:FnOnce()>(p: F) {
     p();
 }
 
 pub fn main() {
-    let p = proc() ();
+    let p = |:| ();
     f(p);
 }
index 0567a5836abfae4bfd0a9b75db64462aa449dc3a..f9d79567932971a6569347f1f9dd91656ef4ebc8 100644 (file)
 // when this bug was opened. The cases where the compiler
 // panics before the fix have a comment.
 
-struct S {x:()}
+#![feature(default_type_params)]
+
+use std::thunk::Thunk;
 
+struct S {x:()}
 
-fn test(slot: &mut Option<proc() -> proc()>, _: proc()) -> () {
+fn test(slot: &mut Option<Thunk<(),Thunk>>) -> () {
   let a = slot.take();
   let _a = match a {
     // `{let .. a(); }` would break
-    Some(a) => { let _a = a(); },
+    Some(a) => { let _a = a.invoke(()); },
     None => (),
   };
 }
@@ -41,7 +44,7 @@ pub fn main() {
     let _r = {};
     let mut slot = None;
     // `{ test(...); }` would break
-    let _s : S  = S{ x: { test(&mut slot, proc() {}); } };
+    let _s : S  = S{ x: { test(&mut slot); } };
 
     let _b = not(true);
 }
index f4ed7c5d9c87174a20685561cb0ad4f8ab0950d7..13177880c5ab7da2d6c18498406ae2025351d2d1 100644 (file)
@@ -16,7 +16,9 @@
 // We shouldn't need to rebind a moved upvar as mut if it's already
 // marked as mut
 
+use std::thunk::Thunk;
+
 pub fn main() {
     let mut x = 1i;
-    proc() { x = 2; };
+    let _thunk = Thunk::new(move|| { x = 2; });
 }
index c3aba9e8dc954e6f4ac2b60a3aa816b3ff07b870..e24cf5a0f26707d30cd760de1c8a0f793583af3b 100644 (file)
@@ -11,7 +11,7 @@
 use std::time::Duration;
 
 fn main() {
-    std::task::spawn(proc() customtask());
+    std::task::spawn(move|| customtask());
 }
 
 fn customtask() {
index afebcb3cdfc7dae4a97b31ff6a34a0c97fd9d01d..46a81301dc3cf47926fb62f831006eb10fdc4aea 100644 (file)
@@ -10,7 +10,9 @@
 
 extern crate libc;
 
-fn foo(_: proc()) {}
+use std::thunk::Thunk;
+
+fn foo(_: Thunk) {}
 
 fn main() {
     foo(loop {
index 9fe41f7e0243e9796ce56e719f4518df081a9efb..be851ddefc6451e0e8c4426b3d6555697def0fc9 100644 (file)
@@ -19,7 +19,7 @@ fn helper(rx: Receiver<Sender<()>>) {
 
 fn main() {
     let (tx, rx) = channel();
-    spawn(proc() { helper(rx) });
+    spawn(move|| { helper(rx) });
     let (snd, rcv) = channel::<int>();
     for _ in range(1i, 100000i) {
         snd.send(1i);
diff --git a/src/test/run-pass/issue-14039.rs b/src/test/run-pass/issue-14039.rs
deleted file mode 100644 (file)
index c017a9d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn main() {
-    if true {
-        proc(_) {}
-    } else {
-        proc(_: &mut ()) {}
-    };
-}
index 0ef0fc83c94565ca23300abadb44e72cbf69e4a7..03d18cf8c9815ceff651701620f195976f5096f3 100644 (file)
@@ -45,7 +45,7 @@ fn match_on_binding() {
 
 fn match_on_upvar() {
     let mut foo = Some(box 8i);
-    (proc() {
+    let f = move|:| {
         match foo {
             None => {},
             Some(x) => {
@@ -53,7 +53,8 @@ fn match_on_upvar() {
             }
         }
         println!("'{}'", foo.unwrap());
-    })();
+    };
+    f();
 }
 
 fn main() {
index 77eba0245b1c34a294db639b01a1dedab1ba6e91..f329e7eed0d5d5f823046b9db08efa3763118db3 100644 (file)
@@ -19,7 +19,7 @@ fn main() {
     // Check that both closures are capturing by value
     assert_eq!(1, mem::size_of_val(&closure));
 
-    spawn(proc() {
+    spawn(move|| {
         let ok = closure;
     })
 }
index 20bf1b260de686ea8f85f7b09f7f20c817198c71..c695a9e8f9abc9bfb6eb2e8e48e0d12b1124a040 100644 (file)
@@ -20,7 +20,7 @@
 
 pub fn main() {
     let mut stdin = std::io::stdin();
-    spawn(proc() {
+    spawn(move|| {
         let _ = stdin.read_to_end();
     });
 }
index 6dcdc1d1086c3c273e9c4f26f9ed74fd79fc10c6..552ce565f6b173f748544e25d951c274b54dee03 100644 (file)
 #![feature(unboxed_closures)]
 
 // Test that unboxing shim for calling rust-call ABI methods through a
-// trait box works and does not cause an ICE
+// trait box works and does not cause an ICE.
 
 struct Foo { foo: uint }
 
-impl FnOnce<(), uint> for Foo {
-    extern "rust-call" fn call_once(self, _: ()) -> uint { self.foo }
+impl FnMut<(), uint> for Foo {
+    extern "rust-call" fn call_mut(&mut self, _: ()) -> uint { self.foo }
 }
 
-impl FnOnce<(uint,), uint> for Foo {
-    extern "rust-call" fn call_once(self, (x,): (uint,)) -> uint { self.foo + x }
+impl FnMut<(uint,), uint> for Foo {
+    extern "rust-call" fn call_mut(&mut self, (x,): (uint,)) -> uint { self.foo + x }
 }
 
-impl FnOnce<(uint, uint), uint> for Foo {
-    extern "rust-call" fn call_once(self, (x, y): (uint, uint)) -> uint { self.foo + x + y }
+impl FnMut<(uint, uint), uint> for Foo {
+    extern "rust-call" fn call_mut(&mut self, (x, y): (uint, uint)) -> uint { self.foo + x + y }
 }
 
 fn main() {
-    let f = box Foo { foo: 42 } as Box<FnOnce<(), uint>>;
-    assert_eq!(f.call_once(()), 42);
+    let mut f = box Foo { foo: 42 } as Box<FnMut<(), uint>>;
+    assert_eq!(f.call_mut(()), 42);
 
-    let f = box Foo { foo: 40 } as Box<FnOnce<(uint,), uint>>;
-    assert_eq!(f.call_once((2,)), 42);
+    let mut f = box Foo { foo: 40 } as Box<FnMut<(uint,), uint>>;
+    assert_eq!(f.call_mut((2,)), 42);
 
-    let f = box Foo { foo: 40 } as Box<FnOnce<(uint, uint), uint>>;
-    assert_eq!(f.call_once((1, 1)), 42);
+    let mut f = box Foo { foo: 40 } as Box<FnMut<(uint, uint), uint>>;
+    assert_eq!(f.call_mut((1, 1)), 42);
 }
diff --git a/src/test/run-pass/issue-18883.rs b/src/test/run-pass/issue-18883.rs
deleted file mode 100644 (file)
index c54844f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test that we don't ICE due to encountering unsubstituted type
-// parameters when untupling FnOnce parameters during translation of
-// an unboxing shim.
-
-#![feature(unboxed_closures)]
-
-fn main() {
-    let _: Box<FnOnce<(),()>> = box move |&mut:| {};
-}
diff --git a/src/test/run-pass/issue-19340-1.rs b/src/test/run-pass/issue-19340-1.rs
new file mode 100644 (file)
index 0000000..b7a6391
--- /dev/null
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue-19340-1.rs
+
+extern crate "issue-19340-1" as lib;
+
+use lib::Homura;
+
+fn main() {
+    let homura = Homura::Madoka { name: "Kaname".into_string() };
+
+    match homura {
+        Homura::Madoka { name } => (),
+    };
+}
diff --git a/src/test/run-pass/issue-19340-2.rs b/src/test/run-pass/issue-19340-2.rs
new file mode 100644 (file)
index 0000000..5179c1e
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+enum Homura {
+    Madoka {
+        name: String,
+        age: u32,
+    },
+}
+
+fn main() {
+    let homura = Homura::Madoka {
+        name: "Akemi".into_string(),
+        age: 14,
+    };
+
+    match homura {
+        Homura::Madoka {
+            name,
+            age,
+        } => (),
+    };
+}
index 4ff735708b5ab7753936e7408835ce30e9acfb39..3554f2e8f0c315253073189ac178cc88ad7de5b0 100644 (file)
@@ -9,19 +9,20 @@
 // except according to those terms.
 
 use std::task::TaskBuilder;
+use std::thunk::Thunk;
 
 static generations: uint = 1024+256+128+49;
 
-fn spawn(f: proc():Send) {
-    TaskBuilder::new().stack_size(32 * 1024).spawn(f)
+fn spawn(f: Thunk) {
+    TaskBuilder::new().stack_size(32 * 1024).spawn(move|| f.invoke(()))
 }
 
-fn child_no(x: uint) -> proc():Send {
-    proc() {
+fn child_no(x: uint) -> Thunk {
+    Thunk::new(move|| {
         if x < generations {
             spawn(child_no(x+1));
         }
-    }
+    })
 }
 
 pub fn main() {
index 81efacb9bcbadb876ce1d95cb02b84e42ea16800..651315ea6417347bbd1868d0104f64535b3409ab 100644 (file)
 
 // rustc --test ignores2.rs && ./ignores2
 
+#![feature(unboxed_closures)]
+
 use std::path::{Path};
 use std::path;
 use std::result;
+use std::thunk::Thunk;
 
-type rsrc_loader = proc(path: &Path):'static -> result::Result<String, String>;
+type rsrc_loader = Box<FnMut(&Path) -> (result::Result<String, String>) + 'static>;
 
 fn tester()
 {
-    let loader: rsrc_loader = proc(_path) {
+    let mut loader: rsrc_loader = box move|_path| {
         result::Result::Ok("more blah".to_string())
     };
 
     let path = path::Path::new("blah");
-    assert!(loader(&path).is_ok());
+    assert!(loader.call_mut((&path,)).is_ok());
 }
 
 pub fn main() {}
index be5387b23c29c3127f90df9b4146a5c7fda22f95..f17f9411d15e803ab345fdd07b0dea36aad3f89f 100644 (file)
@@ -8,10 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(default_type_params)]
+
 use std::task;
+use std::thunk::Invoke;
 
 type RingBuffer = Vec<f64> ;
-type SamplesFn = proc(samples: &RingBuffer):Send;
+type SamplesFn = Box<FnMut(&RingBuffer) + Send>;
 
 enum Msg
 {
@@ -19,13 +22,16 @@ enum Msg
 }
 
 fn foo(name: String, samples_chan: Sender<Msg>) {
-    task::spawn(proc() {
+    task::spawn(move|| {
         let mut samples_chan = samples_chan;
-        let callback: SamplesFn = proc(buffer) {
+
+        // `box() (...)` syntax is needed to make pretty printer converge in one try:
+        let callback: SamplesFn = box() (move |buffer| {
             for i in range(0u, buffer.len()) {
                 println!("{}: {}", i, buffer[i])
             }
-        };
+        });
+
         samples_chan.send(Msg::GetSamples(name.clone(), callback));
     });
 }
index 2266e62eb77cb6b0669da83c9c58efb96e61850c..daa80aec28c049ec2b668bea0ae90a3f6c04c4c6 100644 (file)
@@ -15,7 +15,7 @@ pub fn main() {
 
     tx.send("hello, world");
 
-    spawn(proc() {
+    spawn(move|| {
         println(rx.recv());
     });
 }
index dda90ef1a0fbd0b8bf7463a60ee5047fc7cd50c7..3ea968c416f454f4643a586e51ecf560cc01e96d 100644 (file)
@@ -13,7 +13,7 @@
 pub fn main() {
     let (tx, rx) = channel::<&'static str>();
 
-    task::spawn(proc() {
+    task::spawn(move|| {
         assert_eq!(rx.recv(), "hello, world");
     });
 
index 762152c92038ff213ba57c7a2c755f30337d2fe7..b9b365e3e660a3a648813b0c5c97e78b28986780 100644 (file)
 use std::task;
 
 fn main() {
-    assert!(task::try(proc() int::MIN / -1).is_err());
-    assert!(task::try(proc() i8::MIN / -1).is_err());
-    assert!(task::try(proc() i16::MIN / -1).is_err());
-    assert!(task::try(proc() i32::MIN / -1).is_err());
-    assert!(task::try(proc() i64::MIN / -1).is_err());
-    assert!(task::try(proc() 1i / 0).is_err());
-    assert!(task::try(proc() 1i8 / 0).is_err());
-    assert!(task::try(proc() 1i16 / 0).is_err());
-    assert!(task::try(proc() 1i32 / 0).is_err());
-    assert!(task::try(proc() 1i64 / 0).is_err());
-    assert!(task::try(proc() int::MIN % -1).is_err());
-    assert!(task::try(proc() i8::MIN % -1).is_err());
-    assert!(task::try(proc() i16::MIN % -1).is_err());
-    assert!(task::try(proc() i32::MIN % -1).is_err());
-    assert!(task::try(proc() i64::MIN % -1).is_err());
-    assert!(task::try(proc() 1i % 0).is_err());
-    assert!(task::try(proc() 1i8 % 0).is_err());
-    assert!(task::try(proc() 1i16 % 0).is_err());
-    assert!(task::try(proc() 1i32 % 0).is_err());
-    assert!(task::try(proc() 1i64 % 0).is_err());
+    assert!(task::try(move|| int::MIN / -1).is_err());
+    assert!(task::try(move|| i8::MIN / -1).is_err());
+    assert!(task::try(move|| i16::MIN / -1).is_err());
+    assert!(task::try(move|| i32::MIN / -1).is_err());
+    assert!(task::try(move|| i64::MIN / -1).is_err());
+    assert!(task::try(move|| 1i / 0).is_err());
+    assert!(task::try(move|| 1i8 / 0).is_err());
+    assert!(task::try(move|| 1i16 / 0).is_err());
+    assert!(task::try(move|| 1i32 / 0).is_err());
+    assert!(task::try(move|| 1i64 / 0).is_err());
+    assert!(task::try(move|| int::MIN % -1).is_err());
+    assert!(task::try(move|| i8::MIN % -1).is_err());
+    assert!(task::try(move|| i16::MIN % -1).is_err());
+    assert!(task::try(move|| i32::MIN % -1).is_err());
+    assert!(task::try(move|| i64::MIN % -1).is_err());
+    assert!(task::try(move|| 1i % 0).is_err());
+    assert!(task::try(move|| 1i8 % 0).is_err());
+    assert!(task::try(move|| 1i16 % 0).is_err());
+    assert!(task::try(move|| 1i32 % 0).is_err());
+    assert!(task::try(move|| 1i64 % 0).is_err());
 }
index 173414d1d41cbee80316fded42add44c27e34644..7397ad744950e5246e2402ea7576c61bef81b3df 100644 (file)
@@ -10,7 +10,7 @@
 
 fn periodical(n: int) -> Receiver<bool> {
     let (chan, port) = channel();
-    spawn(proc() {
+    spawn(move|| {
         loop {
             for _ in range(1, n) {
                 match chan.send_opt(false) {
@@ -29,7 +29,7 @@ fn periodical(n: int) -> Receiver<bool> {
 
 fn integers() -> Receiver<int> {
     let (chan, port) = channel();
-    spawn(proc() {
+    spawn(move|| {
         let mut i = 1;
         loop {
             match chan.send_opt(i) {
index c16319a16f2821e4b1dad17ae4a88cb8908b3b13..588e0c1cf16cf28408369c965ff80e508303cba0 100644 (file)
@@ -14,7 +14,7 @@
 
 pub fn main() {
     let (tx, rx) = channel();
-    spawn(proc (){
+    spawn(move||{
         let mut timer = Timer::new().unwrap();
         timer.sleep(Duration::milliseconds(10));
         tx.send(());
index 81ff6fd7adc9419b85724a7f4770e18760ca44d6..1f7edcf43b887f5f71cc3c679a4d2ccfb2c2ba5f 100644 (file)
@@ -18,7 +18,7 @@ fn producer(tx: &Sender<Vec<u8>>) {
 
 pub fn main() {
     let (tx, rx) = channel::<Vec<u8>>();
-    let _prod = task::spawn(proc() {
+    let _prod = task::spawn(move|| {
         producer(&tx)
     });
 
index 3f45e864da35af1251bf0631f67a453714f49aa0..d745226af44082ab3a271be09c60ed5c8116d799 100644 (file)
@@ -16,7 +16,7 @@ fn foo() {
     // Here, i is *copied* into the proc (heap closure).
     // Requires allocation.  The proc's copy is not mutable.
     let mut i = 0;
-    task::spawn(proc() {
+    task::spawn(move|| {
         user(i);
         println!("spawned {}", i)
     });
@@ -29,7 +29,7 @@ fn bar() {
     // mutable outside of the proc.
     let mut i = 0;
     while i < 10 {
-        task::spawn(proc() {
+        task::spawn(move|| {
             user(i);
         });
         i += 1;
@@ -40,7 +40,7 @@ fn car() {
     // Here, i must be shadowed in the proc to be mutable.
     let mut i = 0;
     while i < 10 {
-        task::spawn(proc() {
+        task::spawn(move|| {
             let mut i = i;
             i += 1;
             user(i);
index c1f7e569feb40d575ff2b4e55520531ade37b1ef..1e05c05cc0dd101b0f5afcfb7a00dbaad48220c0 100644 (file)
@@ -27,7 +27,7 @@ fn fmt(&self, _fmt: &mut fmt::Formatter) -> fmt::Result {
 
 pub fn main() {
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         let mut f = Foo(Cell::new(0));
         println!("{}", f);
         let Foo(ref mut f) = f;
index f9b1b951cf03d24eaa86772d715e3fa563941f2f..8b59f26d86976ab94dd318a6b3c40b26de65d3ff 100644 (file)
@@ -14,7 +14,7 @@ macro_rules! expr (($e: expr) => { $e })
 
 macro_rules! spawn {
     ($($code: tt)*) => {
-        expr!(spawn(proc() {$($code)*}))
+        expr!(spawn(move|| {$($code)*}))
     }
 }
 
diff --git a/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs b/src/test/run-pass/method-mut-self-modifies-mut-slice-lvalue.rs
new file mode 100644 (file)
index 0000000..00319d5
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test that an `&mut self` method, when invoked on an lvalue whose
+// type is `&mut [u8]`, passes in a pointer to the lvalue and not a
+// temporary. Issue #19147.
+
+use std::raw;
+use std::mem;
+use std::slice;
+use std::io::IoResult;
+
+trait MyWriter {
+    fn my_write(&mut self, buf: &[u8]) -> IoResult<()>;
+}
+
+impl<'a> MyWriter for &'a mut [u8] {
+    fn my_write(&mut self, buf: &[u8]) -> IoResult<()> {
+        slice::bytes::copy_memory(*self, buf);
+
+        let write_len = buf.len();
+        unsafe {
+            *self = mem::transmute(raw::Slice {
+                data: self.as_ptr().offset(write_len as int),
+                len: self.len() - write_len,
+            });
+        }
+
+        Ok(())
+    }
+}
+
+fn main() {
+    let mut buf = [0_u8, .. 6];
+
+    {
+        let mut writer = buf.as_mut_slice();
+        writer.my_write(&[0, 1, 2]).unwrap();
+        writer.my_write(&[3, 4, 5]).unwrap();
+    }
+
+    // If `my_write` is not modifying `buf` in place, then we will
+    // wind up with `[3, 4, 5, 0, 0, 0]` because the first call to
+    // `my_write()` doesn't update the starting point for the write.
+
+    assert_eq!(buf, [0, 1, 2, 3, 4, 5]);
+}
index 7fd37969e672116d3bba22b9c58aca682396ab53..e5694aefdf4c34b78ca8002d48543e22cc651f40 100644 (file)
@@ -12,7 +12,7 @@
 
 pub fn main() {
     let x = "Hello world!".to_string();
-    task::spawn(proc() {
+    task::spawn(move|| {
         println!("{}", x);
     });
 }
index f704545af3375c5888cdeb1e91cea437ecf9b022..d74f1349506c1de9fe96f80a5296ed8203519481 100644 (file)
@@ -11,7 +11,7 @@
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
-fn unique() -> proc():'static { return proc() (); }
+fn unique() -> Box<FnMut()+'static> { return box || (); }
 
 pub fn main() {
 }
index 22e51ea9a75836935adb34b3920f0a8558fba071..43a6ac296e9dc366b3ff3e56180c3c6028689d14 100644 (file)
@@ -11,7 +11,7 @@
 // Test that the lambda kind is inferred correctly as a return
 // expression
 
-fn unique() -> proc():'static { proc() () }
+fn unique() -> Box<FnMut()+'static> { box || () }
 
 pub fn main() {
 }
index eda36fad215fed6fac17d19f747770c6209f2325..e8bf366df957db5f73803f9fe9ced4486a5fe521 100644 (file)
@@ -23,7 +23,7 @@ fn drop(&mut self) {
 }
 
 fn main() {
-    task::try::<()>(proc() {
+    task::try(move|| -> () {
         let _a = A;
         panic!();
     });
index e24e809ed018a9416ade45f491318d0c3c34cbeb..8fe57a655aa5334b3400e93bd0042ac74af28c67 100644 (file)
 
 use std::sync::Arc;
 
-fn foo(blk: proc()) {
+fn foo<F:FnOnce()>(blk: F) {
     blk();
 }
 
 pub fn main() {
     let x = Arc::new(true);
-    foo(proc() {
+    foo(move|| {
         assert!(*x);
         drop(x);
     });
index a896d2b06f7bddbf3de1e66e130252892db001d8..49396d800297a7af76abf24eb297dcbd2dffa9e1 100644 (file)
@@ -73,6 +73,7 @@ pub fn main() {
     assert_eq!(q.y, !(p.y));
 
     // Issue #1733
-    let result: proc(int) = proc(_)();
     result(p[true]);
 }
+
+fn result(i: int) { }
index 21847a486d949f574fb87f7781e84abd5adb78c4..419d9b5d824b14ad7406684b56afd988a2cba948 100644 (file)
@@ -37,7 +37,7 @@ fn main() {
     let args = args.as_slice();
     if args.len() > 1 && args[1].as_slice() == "recurse" {
         let (tx, rx) = channel();
-        spawn(proc() {
+        spawn(move|| {
             recurse();
             tx.send(());
         });
index 46924c74a8c46d71eabad6c0591152b1e08d18ba..39252d6b1426818522f7bcda9663d49b9534927c 100644 (file)
@@ -33,7 +33,7 @@ fn drop(&mut self) {
 }
 
 pub fn main() {
-    let ret = task::try(proc() {
+    let ret = task::try(move|| {
         let _a = A { b: B { foo: 3 } };
     });
     assert!(ret.is_err());
index 53d2a47863b9d226b6d65223f64edd0ca638e50f..bcfc39ee7e4e65c947d8247af0adf5eb6b0ce219 100644 (file)
@@ -26,7 +26,7 @@ pub fn main() {
     let (port, chan) = stream();
 
     println!("main started");
-    spawn(proc() {
+    spawn(move|| {
         starve_main(port);
     });
     let mut i: int = 0;
diff --git a/src/test/run-pass/proc-bounds.rs b/src/test/run-pass/proc-bounds.rs
deleted file mode 100644 (file)
index 7241b0b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-fn foo<T>() {}
-fn bar<T>(_: T) {}
-
-fn is_send<T: Send>() {}
-fn is_freeze<T: Sync>() {}
-fn is_static<T: 'static>() {}
-
-pub fn main() {
-    foo::<proc()>();
-    foo::<proc()>();
-    foo::<proc():Send>();
-    foo::<proc():Send + Sync>();
-    foo::<proc():'static + Send + Sync>();
-
-    is_send::<proc():Send>();
-    is_freeze::<proc():Sync>();
-    is_static::<proc():'static>();
-
-
-    let a = 3i;
-    bar::<proc()>(proc() {
-        let b = &a;
-        println!("{}", *b);
-    });
-}
diff --git a/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs b/src/test/run-pass/regions-infer-region-in-fn-but-not-type.rs
new file mode 100644 (file)
index 0000000..9174b53
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+// check that the &int here does not cause us to think that `foo`
+// contains region pointers
+struct foo(Box<FnMut(&int)+'static>);
+
+fn take_foo<T:'static>(x: T) {}
+
+fn have_foo(f: foo) {
+    take_foo(f);
+}
+
+fn main() {}
index 823644ddfb51954bf79dab420014872869042e0c..cb45b8e131d284f2414a565beebebd28efa90d1a 100644 (file)
 // give `x` a very short lifetime).
 
 static i: uint = 3;
-fn foo(_: proc():'static) {}
+fn foo<F:FnOnce()+'static>(_: F) {}
 fn read(_: uint) { }
 pub fn main() {
     let x = &i;
-    foo(proc() {
+    foo(move|| {
         read(*x);
     });
 }
index 2709904fb4cac0c3bc2fd53c2dd3451f30e5caa7..b905ebf52fcb3da1ba9af5b270ca18ffdfa861a2 100644 (file)
@@ -23,8 +23,7 @@ fn surrounding() {
     return_works(10);
     return_works(20);
 
-
-    let return_works_proc = proc(n: int) {
+    let return_works_proc = |: n: int| {
         unsafe { calls += 1 }
 
         if n >= 0 { return; }
index 683f7038ead7ac237be7356fa904e8c7e8d67ce6..36b90a9168f7174eb36e4888e553f7d274c97c4a 100644 (file)
@@ -14,6 +14,7 @@
 use std::os;
 use std::str;
 use std::rt;
+use std::thunk::Thunk;
 
 use rustrt::unwind::try;
 
@@ -26,7 +27,7 @@ fn start(argc: int, argv: *const *const u8) -> int {
                 2 => println!("foo"),
                 3 => assert!(try(|| {}).is_ok()),
                 4 => assert!(try(|| panic!()).is_err()),
-                5 => assert!(try(|| spawn(proc() {})).is_err()),
+                5 => assert!(try(|| spawn(move|| {})).is_err()),
                 6 => assert!(Command::new("test").spawn().is_err()),
                 _ => panic!()
             }
@@ -34,7 +35,7 @@ fn start(argc: int, argv: *const *const u8) -> int {
         return 0
     }
 
-    rt::start(argc, argv, main)
+    rt::start(argc, argv, Thunk::new(main))
 }
 
 fn main() {
index 275a390d5d31799d7a8a2c030375e917d503d233..88d30318f2a99c52ea473a860ac9db2b7a0b46aa 100644 (file)
@@ -34,7 +34,7 @@ fn log(&mut self, record: &log::LogRecord) {
 pub fn main() {
     let (logger, rx) = ChannelLogger::new();
 
-    spawn(proc() {
+    spawn(move|| {
         log::set_logger(logger);
 
         // our regex is "f.o"
index e368116f26c3afcaf32a017478bcfff7c9ce4206..6001c360ab99f64e86255bd881c64668dfc1c695 100644 (file)
@@ -27,7 +27,7 @@ fn test(f: int) -> test {
 pub fn main() {
     let (tx, rx) = channel();
 
-    task::spawn(proc() {
+    task::spawn(move|| {
         let (tx2, rx2) = channel();
         tx.send(tx2);
 
index c03094d4f15815483e0f8c2ecfb8a4b44bea0f3c..838c627040dbcab0fbc543d52c044a61171ad57f 100644 (file)
 
 pub fn main() { test05(); }
 
-fn test05_start(f: proc(int)) {
+fn test05_start<F:FnOnce(int)>(f: F) {
     f(22);
 }
 
 fn test05() {
     let three = box 3;
-    let fn_to_send: proc(int):Send = proc(n) {
+    let fn_to_send = move|: n:int| {
         println!("{}", *three + n); // will copy x into the closure
         assert_eq!(*three, 3);
     };
-    task::spawn(proc() {
+    task::spawn(move|| {
         test05_start(fn_to_send);
     });
 }
index c2c7a48815cc04e3abb07bace9cd0145c3d689a8..ccebfa72384f971736a3e891ff51d81a2c5461a4 100644 (file)
@@ -34,5 +34,5 @@ pub fn g() {
 }
 
 fn main() {
-    std::task::try(proc() { ::b::g() }).unwrap_err();
+    std::task::try(move|| { ::b::g() }).unwrap_err();
 }
index b07cf59596852250647308a68278d173afe3e5f4..b66641affc9100bae6e0f4b1a311b01eebd99a43 100644 (file)
@@ -28,6 +28,6 @@ fn foo() {
 }
 
 fn main() {
-    let _ = task::try(proc() foo());
+    let _ = task::try(move|| foo());
     unsafe { assert!(DTOR_COUNT == 2); }
 }
index 0ac7a2001fc678472f7338d0f4bbd76fca8c08a9..f7e241554c1e8598bb39b23f902d3c0dad83ed3a 100644 (file)
@@ -32,6 +32,6 @@ fn foo() {
 }
 
 fn main() {
-    let _ = task::try(proc() foo());
+    let _ = task::try(move|| foo());
     unsafe { assert!(DTOR_COUNT == 2); }
 }
index dba3fe325fa7d3aece802ea0eafe1ee8d742b828..b632bc77c7582005488bee0b89847b1b43504caf 100644 (file)
@@ -16,9 +16,9 @@ fn x(s: String, n: int) {
 }
 
 pub fn main() {
-    task::spawn(proc() x("hello from first spawned fn".to_string(), 65) );
-    task::spawn(proc() x("hello from second spawned fn".to_string(), 66) );
-    task::spawn(proc() x("hello from third spawned fn".to_string(), 67) );
+    task::spawn(move|| x("hello from first spawned fn".to_string(), 65) );
+    task::spawn(move|| x("hello from second spawned fn".to_string(), 66) );
+    task::spawn(move|| x("hello from third spawned fn".to_string(), 67) );
     let mut i: int = 30;
     while i > 0 {
         i = i - 1;
index 1418ab86174f3f7c2f6b598b8c1b477987fd93ff..9b533c69f32091b1b16a2a72cfde8e3d9612fd5e 100644 (file)
@@ -24,5 +24,5 @@ fn iotask(_tx: &ctx, ip: String) {
 
 pub fn main() {
     let (tx, _rx) = channel::<int>();
-    task::spawn(proc() iotask(&tx, "localhost".to_string()) );
+    task::spawn(move|| iotask(&tx, "localhost".to_string()) );
 }
index 741e20d42db8dc0eab007f8d8c49537c38c3ca95..cfc1967ae24f1f2000c5c140f1944f350f188899 100644 (file)
@@ -11,7 +11,7 @@
 use std::task;
 
 pub fn main() {
-    task::spawn(proc() child(10) );
+    task::spawn(move|| child(10) );
 }
 
 fn child(i: int) { println!("{}", i); assert!((i == 10)); }
index 6bac7f2a06e76264659f6ecfa3c80d68d490480f..72db4de2c8d409283af57419f8c17504cfbb1c7c 100644 (file)
@@ -10,7 +10,7 @@
 
 use std::task;
 
-pub fn main() { task::spawn(proc() child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }
+pub fn main() { task::spawn(move|| child((10, 20, 30, 40, 50, 60, 70, 80, 90)) ); }
 
 fn child(args: (int, int, int, int, int, int, int, int, int)) {
     let (i1, i2, i3, i4, i5, i6, i7, i8, i9) = args;
index 264662d7d8bb2b387d35fa67bf8b9b06a6eddd96..0f12827e60ef4b955fc7d38074180f93af514b7c 100644 (file)
@@ -17,5 +17,5 @@
 
 pub fn main() {
     let mut t = TaskBuilder::new();
-    t.spawn(proc() ());
+    t.spawn(move|| ());
 }
index 06092200a1456e63fbd22a1a913bc3593a7df108..b25b350aa4b72320ae95ae8a75be596b0cbf4056 100644 (file)
@@ -18,7 +18,7 @@ pub fn main() {
             name: TestName::DynTestName("test".to_string()),
             should_fail: false
         },
-        testfn: TestFn::DynTestFn(proc() ()),
+        testfn: TestFn::DynTestFn(22),
     };
     do_swap(&mut test);
 }
@@ -34,8 +34,8 @@ pub enum TestName {
 }
 
 pub enum TestFn {
-    DynTestFn(proc():'static),
-    DynBenchFn(proc(&mut int):'static)
+    DynTestFn(int),
+    DynBenchFn(int),
 }
 
 pub struct TestDesc {
index 469c1b868db91e6417382efa99e6059fc51f93e0..9e3511ba6034f7ddc0592834b0f20074c56ad532 100644 (file)
@@ -24,7 +24,7 @@ fn test05_start(tx : &Sender<int>) {
 
 fn test05() {
     let (tx, rx) = channel();
-    task::spawn(proc() { test05_start(&tx) });
+    task::spawn(move|| { test05_start(&tx) });
     let mut value: int = rx.recv();
     println!("{}", value);
     value = rx.recv();
index 8eaa7f2e31d95a0f3d5f2b8ac45af4c83ced6d94..4117f201547b136b662c08292e9f96d1addf1d07 100644 (file)
@@ -15,6 +15,6 @@
 fn start() { println!("Started / Finished task."); }
 
 fn test00() {
-    task::try(proc() start() );
+    task::try(move|| start() );
     println!("Completing.");
 }
index 8054fb0f43b91d40db1ed368db7ab41ab7810898..dd3c90991f627a5ac9ef887c5da21f04cc0e4a24 100644 (file)
@@ -27,7 +27,7 @@ fn start(tx: &Sender<Sender<String>>) {
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _child = task::spawn(proc() { start(&tx) });
+    let _child = task::spawn(move|| { start(&tx) });
 
     let mut c = rx.recv();
     c.send("A".to_string());
index 719d8e8120e7c0d056a519ca56da01bfc8cc636e..aefc91df4e780281c7bddad238a7a5d5f8d97406 100644 (file)
@@ -18,7 +18,7 @@ fn start(tx: &Sender<Sender<int>>) {
 
 pub fn main() {
     let (tx, rx) = channel();
-    let _child = task::spawn(proc() {
+    let _child = task::spawn(move|| {
         start(&tx)
     });
     let _tx = rx.recv();
index f72c0ef8d7b3c28cead566c80d3a54ffc26ee368..d950eb8aec45048ed27ba15bffb5515a1c674c83 100644 (file)
@@ -16,7 +16,7 @@
 
 fn test00() {
     let i: int = 0;
-    let mut result = task::try_future(proc() {
+    let mut result = task::try_future(move|| {
         start(i)
     });
 
index 3f3d6742971176eb81c2161cff8f6984e7dccdbf..c6c0691b74989874c75f73201a6bdc1b763d9d41 100644 (file)
@@ -19,6 +19,6 @@ fn start(tx: &Sender<int>, start: int, number_of_messages: int) {
 pub fn main() {
     println!("Check that we don't deadlock.");
     let (tx, rx) = channel();
-    task::try(proc() { start(&tx, 0, 10) });
+    task::try(move|| { start(&tx, 0, 10) });
     println!("Joined task");
 }
index 3f20495f6525e37c67ee4fd52921088f0effe97d..0e48381366555fd626dd596be065f39e2e0211a9 100644 (file)
@@ -19,7 +19,7 @@ pub fn main() {
     while (i > 0) {
         println!("{}", i);
         let tx = tx.clone();
-        task::spawn({let i = i; proc() { child(i, &tx) }});
+        task::spawn({let i = i; move|| { child(i, &tx) }});
         i = i - 1;
     }
 
index fe4c233224d45f82584b806cd426e1299f2a9eab..3095c2098ff339a1cb1760564c65aeb657906be0 100644 (file)
@@ -25,7 +25,7 @@ pub fn main() {
     // the child's point of view the receiver may die. We should
     // drop messages on the floor in this case, and not crash!
     let (tx, rx) = channel();
-    task::spawn(proc() {
+    task::spawn(move|| {
         start(&tx, 10)
     });
     rx.recv();
index 4f4d365901e7903cd48969cf48cb42473bcfb0c3..3a591d12864af124381c6bad381c03666dedd5d8 100644 (file)
@@ -18,5 +18,5 @@ fn f() {
 }
 
 pub fn main() {
-    task::spawn(proc() f() );
+    task::spawn(move|| f() );
 }
index 583840ede5f3e4281f26412da91fc1f8bebba39c..2908ec1e561159aada05cc0c686a7027c13b03aa 100644 (file)
@@ -41,7 +41,7 @@ fn test00() {
         let tx = tx.clone();
         results.push(task::try_future({
             let i = i;
-            proc() {
+            move|| {
                 test00_start(&tx, i, number_of_messages)
             }
         }));
index 170e1e8597bfcd25aa70e2f3862d4cf0c151a11c..9d8caa426269b9248989cc0baf4493bff27012cf 100644 (file)
@@ -28,19 +28,19 @@ fn test00() {
     let number_of_messages: int = 10;
 
     let tx2 = tx.clone();
-    task::spawn(proc() {
+    task::spawn(move|| {
         test00_start(&tx2, number_of_messages * 0, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(proc() {
+    task::spawn(move|| {
         test00_start(&tx2, number_of_messages * 1, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(proc() {
+    task::spawn(move|| {
         test00_start(&tx2, number_of_messages * 2, number_of_messages);
     });
     let tx2 = tx.clone();
-    task::spawn(proc() {
+    task::spawn(move|| {
         test00_start(&tx2, number_of_messages * 3, number_of_messages);
     });
 
index cc71ccdfa1960762e295e19bd7ca7f911643a140..1c197e823f2a4620387ff50ba5d60f59deaa1c90 100644 (file)
@@ -23,7 +23,7 @@ fn test00() {
     let (tx, rx) = channel();
     let number_of_messages: int = 10;
 
-    let result = task::try_future(proc() {
+    let result = task::try_future(move|| {
         test00_start(&tx, number_of_messages);
     });
 
index 5e0d184683129ba8a4065cb9c642fde8a8f9cdce..5c73f44f2d66abe61a10d0646a3c5ea868d7601e 100644 (file)
@@ -11,7 +11,7 @@
 use std::task;
 
 pub fn main() {
-    task::spawn(proc() child("Hello".to_string()) );
+    task::spawn(move|| child("Hello".to_string()) );
 }
 
 fn child(_s: String) {
index fafb9412c01e5b279eff37900022012ea4df6d15..8d6b6005a63bad6eb40f551d15a681e2a48469fa 100644 (file)
@@ -16,7 +16,7 @@ pub fn main() {
     let x = box 1;
     let x_in_parent = &(*x) as *const int as uint;
 
-    task::spawn(proc() {
+    task::spawn(move || {
         let x_in_child = &(*x) as *const int as uint;
         tx.send(x_in_child);
     });
index 0dbe74d722bca34605bb8bec4021f7971097ee06..72cf7599f89f97a0013c1f3fe0aae05c0c58a7ad 100644 (file)
@@ -16,7 +16,7 @@ fn main() {
     let mut reader = ChanReader::new(rx);
     let stderr = ChanWriter::new(tx);
 
-    let res = TaskBuilder::new().stderr(box stderr as Box<Writer + Send>).try(proc() -> () {
+    let res = TaskBuilder::new().stderr(box stderr as Box<Writer + Send>).try(move|| -> () {
         panic!("Hello, world!")
     });
     assert!(res.is_err());
index 1ed2efa4b320372b94448b4d8a3be9bab5a3438c..780cf23446639b414fb2550af3008825520e17e4 100644 (file)
@@ -35,7 +35,7 @@ fn test() {
         let a = a.clone();
         let cnt = cnt.clone();
         let srv_tx = srv_tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             let mut a = a;
             loop {
                 match a.accept() {
@@ -54,7 +54,7 @@ fn test() {
 
     for _ in range(0, N) {
         let cli_tx = cli_tx.clone();
-        spawn(proc() {
+        spawn(move|| {
             for _ in range(0, M) {
                 let _s = TcpStream::connect(addr).unwrap();
             }
index 7dcbccdb17af0bd8b7bc5506e38ed4b52bfe727f..2e4b9da691e3941dd37d28b11fc8d0fc5677a871 100644 (file)
@@ -34,7 +34,7 @@ fn eventual_timeout() {
 
     let (tx1, rx1) = channel();
     let (_tx2, rx2) = channel::<()>();
-    std::task::spawn(proc() {
+    std::task::spawn(move|| {
         let _l = TcpListener::bind(addr).unwrap().listen();
         tx1.send(());
         let _ = rx2.recv_opt();
index 34fbe1c9a956b97bab1d365df27a16be220f9e35..4d691dd252656aab3657fde8f74757c99b261747 100644 (file)
@@ -24,7 +24,7 @@
 
 fn main() {
     // This test has a chance to time out, try to not let it time out
-    spawn(proc() {
+    spawn(move|| {
         use std::io::timer;
         timer::sleep(Duration::milliseconds(30 * 1000));
         println!("timed out!");
@@ -32,7 +32,7 @@ fn main() {
     });
 
     let (tx, rx) = channel();
-    spawn(proc() {
+    spawn(move|| {
         let mut listener = TcpListener::bind("127.0.0.1:0").unwrap();
         tx.send(listener.socket_name().unwrap());
         let mut acceptor = listener.listen();
@@ -53,7 +53,7 @@ fn main() {
     let (tx, rx) = channel();
     for _ in range(0u, 1000) {
         let tx = tx.clone();
-        TaskBuilder::new().stack_size(64 * 1024).spawn(proc() {
+        TaskBuilder::new().stack_size(64 * 1024).spawn(move|| {
             match TcpStream::connect(addr) {
                 Ok(stream) => {
                     let mut stream = stream;
index 7400c52a73b4abf4d7d61bf074a63f398b3aa2b0..a866f497b8615ec0e523144bd005ce5b32b544d1 100644 (file)
@@ -36,7 +36,7 @@ fn test_tempdir() {
 
 fn test_rm_tempdir() {
     let (tx, rx) = channel();
-    let f: proc():Send = proc() {
+    let f = move|:| -> () {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
         tx.send(tmp.path().clone());
         panic!("panic to unwind past `tmp`");
@@ -47,7 +47,7 @@ fn test_rm_tempdir() {
 
     let tmp = TempDir::new("test_rm_tempdir").unwrap();
     let path = tmp.path().clone();
-    let f: proc():Send = proc() {
+    let f = move|:| -> () {
         let _tmp = tmp;
         panic!("panic to unwind past `tmp`");
     };
@@ -56,7 +56,7 @@ fn test_rm_tempdir() {
 
     let path;
     {
-        let f = proc() {
+        let f = move|:| {
             TempDir::new("test_rm_tempdir").unwrap()
         };
         let tmp = task::try(f).ok().expect("test_rm_tmdir");
@@ -77,7 +77,7 @@ fn test_rm_tempdir() {
 
 fn test_rm_tempdir_close() {
     let (tx, rx) = channel();
-    let f: proc():Send = proc() {
+    let f = move|:| -> () {
         let tmp = TempDir::new("test_rm_tempdir").unwrap();
         tx.send(tmp.path().clone());
         tmp.close();
@@ -89,7 +89,7 @@ fn test_rm_tempdir_close() {
 
     let tmp = TempDir::new("test_rm_tempdir").unwrap();
     let path = tmp.path().clone();
-    let f: proc():Send = proc() {
+    let f = move|:| -> () {
         let tmp = tmp;
         tmp.close();
         panic!("panic when unwinding past `tmp`");
@@ -99,7 +99,7 @@ fn test_rm_tempdir_close() {
 
     let path;
     {
-        let f = proc() {
+        let f = move|:| {
             TempDir::new("test_rm_tempdir").unwrap()
         };
         let tmp = task::try(f).ok().expect("test_rm_tmdir");
@@ -176,7 +176,7 @@ pub fn test_rmdir_recursive_ok() {
 }
 
 pub fn dont_double_panic() {
-    let r: Result<(), _> = task::try(proc() {
+    let r: Result<(), _> = task::try(move|| {
         let tmpdir = TempDir::new("test").unwrap();
         // Remove the temporary directory so that TempDir sees
         // an error on drop
index 2a71148216d6407452a4b49c8043fa15dc178f98..28bbac1d0871c09feb92b307c8308accf564b0d2 100644 (file)
 
 fn test_panic() {
     fn f() { let _x: Box<int> = panic!(); }
-    task::try(proc() f() );
+    task::try(move|| f() );
 }
 
 fn test_panic_indirect() {
     fn f() -> ! { panic!(); }
     fn g() { let _x: Box<int> = f(); }
-    task::try(proc() g() );
+    task::try(move|| g() );
 }
 
 pub fn main() {
index dc862f201c244850214a508c7358a04072539238..71adf16c0511a0c480654f17b1019ec8ce3d6ec6 100644 (file)
@@ -12,7 +12,7 @@
 
 pub fn main() {
     let mut i = 10;
-    while i > 0 { task::spawn({let i = i; proc() child(i)}); i = i - 1; }
+    while i > 0 { task::spawn({let i = i; move|| child(i)}); i = i - 1; }
     println!("main thread exiting");
 }
 
index 50d3531b632f4589ed5fb0ea2ae6d81c872bda5f..d2c1461d65d0b0b86a925af15e925366e66c5200 100644 (file)
@@ -77,13 +77,13 @@ pub fn main() {
                             box dogge2 as Box<Pet+Sync+Send>));
     let (tx1, rx1) = channel();
     let arc1 = arc.clone();
-    task::spawn(proc() { check_legs(arc1); tx1.send(()); });
+    task::spawn(move|| { check_legs(arc1); tx1.send(()); });
     let (tx2, rx2) = channel();
     let arc2 = arc.clone();
-    task::spawn(proc() { check_names(arc2); tx2.send(()); });
+    task::spawn(move|| { check_names(arc2); tx2.send(()); });
     let (tx3, rx3) = channel();
     let arc3 = arc.clone();
-    task::spawn(proc() { check_pedigree(arc3); tx3.send(()); });
+    task::spawn(move|| { check_pedigree(arc3); tx3.send(()); });
     rx1.recv();
     rx2.recv();
     rx3.recv();
diff --git a/src/test/run-pass/trait-safety-ok-cc.rs b/src/test/run-pass/trait-safety-ok-cc.rs
new file mode 100644 (file)
index 0000000..99203d3
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:trait-safety-lib.rs
+
+// Simple smoke test that unsafe traits can be compiled across crates.
+
+extern crate "trait-safety-lib" as lib;
+
+use lib::Foo;
+
+struct Bar { x: int }
+unsafe impl Foo for Bar {
+    fn foo(&self) -> int { self.x }
+}
+
+fn take_foo<F:Foo>(f: &F) -> int { f.foo() }
+
+fn main() {
+    let x: int = 22;
+    assert_eq!(22, take_foo(&x));
+
+    let x: Bar = Bar { x: 23 };
+    assert_eq!(23, take_foo(&x));
+}
diff --git a/src/test/run-pass/trait-safety-ok.rs b/src/test/run-pass/trait-safety-ok.rs
new file mode 100644 (file)
index 0000000..a24796a
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Simple smoke test that unsafe traits can be compiled etc.
+
+unsafe trait Foo {
+    fn foo(&self) -> int;
+}
+
+unsafe impl Foo for int {
+    fn foo(&self) -> int { *self }
+}
+
+fn take_foo<F:Foo>(f: &F) -> int { f.foo() }
+
+fn main() {
+    let x: int = 22;
+    assert_eq!(22, take_foo(&x));
+}
index cd97fd96fa3bbd963d1dfed4294a5503aeeafb72..dfc234e87cda1853b5b957a22252910c8d4f995c 100644 (file)
 #![feature(unboxed_closures)]
 
 fn main(){
-    fn bar<'a, T:'a> (t: T) -> Box<FnOnce<(),T> + 'a> {
-        box move |:| t
+    fn bar<'a, T:Clone+'a> (t: T) -> Box<FnMut<(),T> + 'a> {
+        box move |&mut:| t.clone()
     }
 
-    let f = bar(42u);
-    assert_eq!(f.call_once(()), 42);
+    let mut f = bar(42u);
+    assert_eq!(f.call_mut(()), 42);
 
-    let f = bar("forty-two");
-    assert_eq!(f.call_once(()), "forty-two");
+    let mut f = bar("forty-two");
+    assert_eq!(f.call_mut(()), "forty-two");
 
     let x = 42u;
-    let f = bar(&x);
-    assert_eq!(f.call_once(()), &x);
+    let mut f = bar(&x);
+    assert_eq!(f.call_mut(()), &x);
 
-    #[deriving(Show, PartialEq)]
+    #[deriving(Clone, Show, PartialEq)]
     struct Foo(uint, &'static str);
 
     impl Copy for Foo {}
 
     let x = Foo(42, "forty-two");
-    let f = bar(x);
-    assert_eq!(f.call_once(()), x);
+    let mut f = bar(x);
+    assert_eq!(f.call_mut(()), x);
 }
index 6f672f2f2828c98fe8bf0182438b64405d11e7ff..e31ef169e16eb2ff5ee5b3e8b83f33605be13f04 100644 (file)
 #![feature(unboxed_closures)]
 
 fn main() {
-    let task: Box<FnOnce(int) -> int> = box |: x| x;
-    task.call_once((0i, ));
+    let task: Box<Fn(int) -> int> = box |&: x| x;
+    task.call((0i, ));
+
+    let mut task: Box<FnMut(int) -> int> = box |&mut: x| x;
+    task.call_mut((0i, ));
+
+    call(|:x| x, 22);
+}
+
+fn call<F:FnOnce(int) -> int>(f: F, x: int) -> int {
+    f.call_once((x,))
 }
 
diff --git a/src/test/run-pass/unboxed-closures-unboxing-shim.rs b/src/test/run-pass/unboxed-closures-unboxing-shim.rs
deleted file mode 100644 (file)
index c41aeaa..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(unboxed_closures)]
-
-use std::ops::FnOnce;
-
-fn main() {
-    let task: Box<FnOnce(int) -> int> = box |: x| x;
-    assert!(task.call_once((1234i,)) == 1234i);
-}
-
index 432a0527adaaed2db9da9471df5d6db8b2e31c36..672cd2d00e8bd4eb97fa3939174724ae3e62d90c 100644 (file)
@@ -20,7 +20,7 @@ pub fn main() {
     let mut expected = 0u;
     for i in range(0u, n) {
         let tx = tx.clone();
-        task::spawn(proc() {
+        task::spawn(move|| {
             child(&tx, i)
         });
         expected += i;
index c12303b009f46c588d128582ce1627d0502cd6fe..e3cd694c0de6b910ac0c0076ef60bff7adf5703c 100644 (file)
@@ -22,7 +22,7 @@ fn drop(&mut self) {
 }
 
 pub fn main() {
-    let x = task::try(proc() {
+    let x = task::try(move|| {
         let _b = Foo;
     });
 
index 60f07663bef0e38ee714fcef07e0213c4d577542..9789deef636490e9425ffe98689d8b856642640f 100644 (file)
@@ -37,7 +37,7 @@ fn f(tx: Sender<bool>) {
 
 pub fn main() {
     let (tx, rx) = channel();
-    task::spawn(proc() f(tx.clone()));
+    task::spawn(move|| f(tx.clone()));
     println!("hiiiiiiiii");
     assert!(rx.recv());
 }
index ce9cc68bd3654f5ba18820e26c3e852739d3535a..c969e66957ccb752d4aa4f2a1c39b2aaa8bfe991 100644 (file)
@@ -77,7 +77,7 @@ pub fn main() {
 
                 let v = main.clone();
 
-                let _ = task::try(proc() {
+                let _ = task::try(move|| {
                         let mut v = v;
                         let mut panic_countdown = panic_countdown;
                         v.as_mut_slice().sort_by(|a, b| {
index d44e25550ef810c744c0b08cad2066eb1919fd87..87226eedfdcbfc2376af564b72634e8f9a56fa0b 100644 (file)
@@ -15,7 +15,7 @@
 use std::task;
 
 fn main() {
-    let _ = task::try(proc() {
+    let _ = task::try(move|| {
         other::foo()
     });
 }