about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2018-04-12Change the hashcounts in raw `Lit` variants from usize to u16.Nicholas Nethercote-14/+19
This reduces the size of `Token` from 32 bytes to 24 bytes on 64-bit platforms.
2018-04-12Auto merge of #49698 - SimonSapin:unicode-for-everyone, r=alexcrichtonbors-1537/+1398
Merge the std_unicode crate into the core crate [The standard library facade](https://github.com/rust-lang/rust/issues/27783) has historically contained a number of crates with different roles, but that number has decreased over time. `rand` and `libc` have moved to crates.io, and [`collections` was merged into `alloc`](https://github.com/rust-lang/rust/pull/42648). Today we have `core` that applies everywhere, `std` that expects a full operating system, and `alloc` in-between that only requires a memory allocator (which can be provided by users)… and `std_unicode`, which doesn’t really have a reason to be separate anymore. It contains functionality based on Unicode data tables that can be large, but as long as relevant functions are not called the tables should be removed from binaries by linkers. This deprecates the unstable `std_unicode` crate and moves all of its contents into `core`, replacing them with `pub use` reexports. The crate can be removed later. This also removes the `CharExt` trait (replaced with inherent methods in libcore) and `UnicodeStr` trait (merged into `StrExt`). There traits were both unstable and not intended to be used or named directly. A number of new items are newly-available in libcore and instantly stable there, but only if they were already stable in libstd. Fixes #49319.
2018-04-12Mark the rest of the `unicode` feature flag as perma-unstable.Simon Sapin-7/+4
2018-04-12Dedicated tracking issue for UnicodeVersion and UNICODE_VERSION.Simon Sapin-6/+7
2018-04-12Move core::char::printable to core::unicode::printableSimon Sapin-4/+4
2018-04-12Merge unstable Utf16Encoder into EncodeUtf16Simon Sapin-65/+23
2018-04-12Merge core::unicode::str into core::strSimon Sapin-198/+182
And the UnicodeStr trait into StrExt
2018-04-12Remove the CharExt trait, now that libcore has inherent methods for charSimon Sapin-190/+107
2018-04-12Move the rest of core::unicode::char to core::unicodeSimon Sapin-274/+266
2018-04-12Move char conversions into a separate private module.Simon Sapin-290/+315
2018-04-12Move char decoding iterators into a separate private module.Simon Sapin-249/+265
2018-04-12Reexport from core::unicode::char in core::char rather than vice versaSimon Sapin-26/+19
2018-04-12Move the core::char module to its own directorySimon Sapin-4/+5
2018-04-12Deprecate the std_unicode crateSimon Sapin-20/+13
2018-04-12Move contents of libstd_unicode into libcoreSimon Sapin-59/+56
2018-04-12Move Utf8Lossy decoder to libcoreSimon Sapin-31/+16
2018-04-12Move char::REPLACEMENT_CHARACTER to libcoreSimon Sapin-8/+10
2018-04-11Auto merge of #49875 - kennytm:rollup, r=kennytmbors-64/+243
Rollup of 14 pull requests Successful merges: - #49525 (Use sort_by_cached_key where appropriate) - #49575 (Stabilize `Option::filter`.) - #49614 (in which the non-shorthand patterns lint keeps its own counsel in macros) - #49665 (Small nits to make couple of tests pass on mips targets.) - #49781 (add regression test for #16223 (NLL): use of collaterally moved value) - #49795 (Properly look for uninhabitedness of variants in niche-filling check) - #49809 (Stop emitting color codes on TERM=dumb) - #49856 (Do not uppercase-lint #[no_mangle] statics) - #49863 (fixed typo) - #49857 (Fix "fp" target feature for AArch64) - #49849 (Add --enable-debug flag to musl CI build script) - #49734 (proc_macro: Generalize `FromIterator` impl) - #49730 (Fix ICE with impl Trait) - #48270 (Replace `structurally_resolved_type` in casts check.) Failed merges:
2018-04-12Rollup merge of #48270 - leodasvacas:refactor-casts, r=nikomatsakiskennytm-7/+38
Replace `structurally_resolved_type` in casts check. The behaviour of `resolve_type_vars_if_possible` is simpler and infallible. Other minor refactorings. I'm not sure if this is backwards compatible, in theory resolving obligations between two cast checks could solve a dependency between them, but I don't know if that's actually possible and it doesn't sound like something we'd want to support.
2018-04-12Rollup merge of #49730 - sinkuu:fix_ice_49556, r=cramertjkennytm-3/+29
Fix ICE with impl Trait Fixes https://github.com/rust-lang/rust/issues/49556#issuecomment-379154713. May or may not fix 49556 itself. Closures like `|x: &'a _| x` has `ClosureSubsts` of `fn(&'a _) -> &'(ReScope) _`, so `tcx.note_and_explain_free_region` (called [here](https://github.com/rust-lang/rust/blob/a143462783cec88b7b733e8aa09990bfeb59f754/src/librustc/infer/anon_types/mod.rs#L572)) panics.
2018-04-12Rollup merge of #49734 - alexcrichton:generalize-token-stream, r=nikomatsakiskennytm-2/+9
proc_macro: Generalize `FromIterator` impl While never intended to be stable we forgot that trait impls are insta-stable! This construction of `FromIterator` wasn't our first choice of how to stabilize the impl but our hands are tied at this point, so revert back to the original definition of `FromIterator` before #49597 Closes #49725
2018-04-12Rollup merge of #49849 - alecmocatta:master, r=alexcrichtonkennytm-1/+1
Add --enable-debug flag to musl CI build script Building for x86_64-unknown-linux-musl currently results in an executable lacking debug information for musl libc itself. If you request a backtrace in GDB while control flow is within musl – including sycalls made by musl – the result looks like: ``` #0 0x0000000000434b46 in __cp_end () #1 0x0000000000432dbd in __syscall_cp_c () #2 0x0000000000000000 in ?? () ``` i.e. not very helpful. Adding --enable-debug resolves this, and --enable-optimize re-enables optimisations which default to off given the previous flag.
2018-04-12Rollup merge of #49857 - Amanieu:aarch64_fp, r=alexcrichtonkennytm-0/+1
Fix "fp" target feature for AArch64 This fixes the following warning on AArch64: ``` '+fp' is not a recognized feature for this target (ignoring feature) ``` Fixes #49782
2018-04-12Rollup merge of #49863 - memoryleak47:andorid, r=oli-obkkennytm-1/+1
fixed typo
2018-04-12Rollup merge of #49856 - varkor:no_mangle-statics-unlinted, r=michaelwoeristerkennytm-0/+6
Do not uppercase-lint #[no_mangle] statics The reasoning being that `#[no_mangle]` expresses enough intention that there's likely a good reason for the name. Fixes #36258.
2018-04-11Auto merge of #49872 - oli-obk:clippy, r=Manishearthbors-18/+18
Update clippy and rls r? @Manishearth
2018-04-11Auto merge of #49861 - pnkfelix:compare-mode-nll-followup-2, r=nikomatsakisbors-56/+3626
Blindly checkpoint status of NLL mode ui tests This takes the next (and potentially final?) step with #48879. Namely, this PR got things to the point where I can successfully run `compiletest` on `src/test/ui` with `--compile-mode=nll`. Here are the main pieces of it: 1. To figure out how to even run `compiletest` normally on the ui directory, I ran `x.py test -vv`, and then looked for the `compiletest` invocation that mentioned `src/test/ui`. 2. I took the aforementioned `compiletest` invocation and used it, adding `--compile-mode=nll` to the end. It had 170 failing cases. 3. Due to #49855, I had to edit some of the tests so that they fail even under NLL, via `#[rustc_error]`. That's the first commit. (Then goto 2 to double-check no such tests remain.) 4. I took the generated `build/target/test/foo.stderr` file for every case that failed, and blindly copied it to `src/test/foo.nll.stderr`. That's the second commit. 5. Goto 2 until there were no failing cases. 6. Remove any stamp files, and re-run `x.py test` to make sure that the edits and new `.nll.stderr` files haven't broken the pre-existing test suite.
2018-04-11Rollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichtonkennytm-1/+3
Stop emitting color codes on TERM=dumb These terminals generally don't support color. Fixes #49191 cc @nikomatsakis r? @alexcrichton
2018-04-11Rollup merge of #49795 - nox:niche-with-uninhabited-fields, r=eddybkennytm-3/+10
Properly look for uninhabitedness of variants in niche-filling check
2018-04-11Rollup merge of #49781 - Robbepop:master, r=nikomatsakiskennytm-0/+63
add regression test for #16223 (NLL): use of collaterally moved value Adds regression test for https://github.com/rust-lang/rust/issues/16223 which NLL fixes. The current downside of this test is that it uses the `#![feature(box_patterns)]` and I haven't come up with a proper test that only uses the `#![feature(nll)]` - however, I don't know if this is even possible to test without `#![feature(box_syntax)]` or `#![feature(box_patterns)]`.
2018-04-11Rollup merge of #49665 - draganmladjenovic:mips_tests, r=nikomatsakiskennytm-8/+18
Small nits to make couple of tests pass on mips targets.
2018-04-11Rollup merge of #49614 - zackmdavis:the_phantom_menace, r=petrochenkovkennytm-0/+30
in which the non-shorthand patterns lint keeps its own counsel in macros In issue #49588, Michael Lamparski pointed out a scenario in which the non-shorthand-field-patterns lint could be triggered by a macro-expanded pattern, in a way which was direly unwieldy for the macro author to guard against and unreasonable to expect the macro user to take into account. We can avoid this by not linting patterns that come from macro-expansions. Although this entails accepting "false negatives" where the lint could genuinely improve macro-templated code, avoiding the reported "true-but-super-annoying positive" may be worth the trade? (Some precedent for these relative priorities exists as no. 47775 (5985b0b0).) Resolves #49588.
2018-04-11Rollup merge of #49575 - tmccombs:option-filter-stabilize, r=withoutboatskennytm-4/+1
Stabilize `Option::filter`. Fixes #45860
2018-04-11Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcmkennytm-34/+33
Use sort_by_cached_key where appropriate A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
2018-04-11Update clippy and rlsOliver Schneider-18/+18
2018-04-11Auto merge of #49681 - tmccombs:take-set-limit-stable, r=sfacklerbors-2/+1
Stabilize take_set_limit Fixes #42781
2018-04-11Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichtonbors-63/+26
Move deny(warnings) into rustbuild This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-10Allow incorrectly reported unused attribute warningMark Simulacrum-0/+3
2018-04-11Auto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakisbors-35/+52
Use InternedString instead of Symbol for type parameter types (2) Reduced alternative to #49266. Let's see if this causes a performance regression.
2018-04-11fixed typomemoryleak47-1/+1
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+3543
2018-04-11Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, ↵Felix S. Klock II-54/+54
including NLL. NOTE: I was careful to make each change in a manner that preserves the existing diagnostic output (usually by ensuring that no lines were added or removed). This means that the resulting source files are not as nice to read as they were at the start. But we will have to review these cases by hand anyway as follow-up work, so cleanup could reasonably happen then (or not at all).
2018-04-10Fix "fp" feature for AArch64Amanieu d'Antras-0/+1
2018-04-10Do not uppercase-lint no_mangle staticsvarkor-0/+6
2018-04-10Auto merge of #48914 - gaurikholkar:e0389, r=nikomatsakisbors-24/+182
Modify compile-fail/E0389 error message WIP This fixes #47388 cc @nikomatsakis @estebank r? @nikomatsakis Certain ui tests were failing locally. I'll check if the same happens here too.
2018-04-10Add --enable-debug flag to musl CI build scriptAlec Mocatta-1/+1
Building for x86_64-unknown-linux-musl currently results in an executable lacking debug information for musl libc itself. If you request a backtrace in GDB while control flow is within musl – including sycalls made by musl – the result looks like: #0 0x0000000000434b46 in __cp_end () #1 0x0000000000432dbd in __syscall_cp_c () #2 0x0000000000000000 in ?? () i.e. not very helpful. Adding --enable-debug resolves this, and --enable-optimize re-enables optimisations which default to off given the previous flag.
2018-04-10Auto merge of #49386 - GuillaumeGomez:fix-path-attribute, r=eddybbors-4/+7
Add tcx in item_body_nested_bodies Fixes #47391. r? @eddyb
2018-04-10Add ignores for powerpc and s390x to target-feature-wrong.rs and update ↵dragan.mladjenovic-7/+9
references.
2018-04-10Auto merge of #49390 - Zoxc:sync-syntax, r=michaelwoeristerbors-89/+101
More thread-safety changes r? @michaelwoerister
2018-04-10Update ui test references.dragan.mladjenovic-7/+7