rust/src/librustc_mir
Mazdak Farrokhzad a8d4e4f435
Rollup merge of #62848 - matklad:xid-unicode, r=petrochenkov
Use unicode-xid crate instead of libcore

This PR proposes to remove `char::is_xid_start` and `char::is_xid_continue` functions from `libcore` and use `unicode_xid` crate from crates.io (note that this crate is already present in rust-lang/rust's Cargo.lock).

Reasons to do this:

* removing rustc-binary-specific stuff from libcore
* making sure that, across the ecosystem, there's a single definition of what rust identifier is (`unicode-xid` has almost 10 million downs, as a `proc_macro2` dependency)
* making it easier to share `rustc_lexer` crate with rust-analyzer: no need to `#[cfg]` if we are building as a part of the compiler

Reasons not to do this:

* increased maintenance burden: we'll need to upgrade unicode version both in libcore and in unicode-xid. However, this shouldn't be a too heavy burden: just running `./unicode.py` after new unicode version. I (@matklad) am ready to be a t-compiler side maintainer of unicode-xid. Moreover, given that xid-unicode is an important dependency of syn, *someone* needs to maintain it anyway.
* xid-unicode implementation is significantly slower. It uses a more compact table with binary search, instead of a trie. However, this shouldn't matter in practice, because we have fast-path for ascii anyway, and code size savings is a plus. Moreover, in #59706 not using libcore turned out to be *faster*, presumably beacause checking for whitespace with match is even faster.

<details>

<summary>old description</summary>

Followup to #59706

r? @eddyb

Note that this doesn't actually remove tables from libcore, to avoid conflict with https://github.com/rust-lang/rust/pull/62641.

cc https://github.com/unicode-rs/unicode-xid/pull/11

</details>
2019-09-05 12:11:04 +02:00
..
borrow_check Rollup merge of #62848 - matklad:xid-unicode, r=petrochenkov 2019-09-05 12:11:04 +02:00
build Rollup merge of #63961 - JohnTitor:improve-require-lang-item, r=estebank 2019-08-29 05:32:51 +02:00
dataflow Rollup merge of #64005 - ecstatic-morse:is-indirect, r=oli-obk 2019-09-05 03:59:37 +02:00
hair Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
interpret Auto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obk 2019-09-02 22:07:40 +00:00
monomorphize Rollup merge of #64141 - nnethercote:minimize-LocalInternedString, r=petrochenkov 2019-09-05 03:59:49 +02:00
transform Rollup merge of #63961 - JohnTitor:improve-require-lang-item, r=estebank 2019-08-29 05:32:51 +02:00
util Apply review comments 2019-08-28 07:11:12 +09:00
Cargo.toml remove XID and Pattern_White_Space unicode tables from libcore 2019-09-04 13:11:11 +03:00
const_eval.rs const_prop: only call error_to_const_error if we are actually showing something 2019-08-27 22:18:25 +02:00
error_codes.rs Remove unnecessary features from compiler error code list 2019-08-06 10:49:45 -07:00
lib.rs Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
lints.rs rename hir::map::get_by_hir_id to get 2019-06-20 12:50:06 +02:00
shim.rs Resolve PR comments 2019-08-22 06:36:31 -04:00