]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoSeparate alloc::heap::Alloc trait for stage0 #[global_allocator]
Simon Sapin [Tue, 3 Apr 2018 18:58:50 +0000 (20:58 +0200)]
Separate alloc::heap::Alloc trait for stage0 #[global_allocator]

6 years agoActually deprecate the Heap type
Simon Sapin [Tue, 3 Apr 2018 19:15:06 +0000 (21:15 +0200)]
Actually deprecate the Heap type

6 years agoRename the Heap type to Global
Simon Sapin [Tue, 3 Apr 2018 12:43:34 +0000 (14:43 +0200)]
Rename the Heap type to Global

… since it is the entry point for what’s registered with `#[global_allocator]`

6 years agoActually deprecate heap modules.
Simon Sapin [Tue, 3 Apr 2018 19:05:10 +0000 (21:05 +0200)]
Actually deprecate heap modules.

6 years agoRename `heap` modules in the core, alloc, and std crates to `alloc`
Simon Sapin [Tue, 3 Apr 2018 12:41:15 +0000 (14:41 +0200)]
Rename `heap` modules in the core, alloc, and std crates to `alloc`

6 years agoImport the `alloc` crate as `alloc_crate` in std
Simon Sapin [Tue, 3 Apr 2018 12:36:57 +0000 (14:36 +0200)]
Import the `alloc` crate as `alloc_crate` in std

… to make the name `alloc` available.

6 years agoAdd a GlobalAlloc trait
Simon Sapin [Tue, 3 Apr 2018 12:07:06 +0000 (14:07 +0200)]
Add a GlobalAlloc trait

6 years agoAdd a core::heap::Void extern type.
Simon Sapin [Mon, 2 Apr 2018 09:26:16 +0000 (11:26 +0200)]
Add a core::heap::Void extern type.

6 years agoInline docs for the heap module’s reexports
Simon Sapin [Mon, 2 Apr 2018 08:38:07 +0000 (10:38 +0200)]
Inline docs for the heap module’s reexports

6 years agoadd test for using target features in doctests
QuietMisdreavus [Wed, 11 Apr 2018 01:51:34 +0000 (20:51 -0500)]
add test for using target features in doctests

6 years agoimprove Atomic*::fetch_update docs
Andre Bogus [Thu, 12 Apr 2018 20:48:48 +0000 (22:48 +0200)]
improve Atomic*::fetch_update docs

6 years agoAdd some new tests + Fix failing tests
Vadim Petrochenkov [Sat, 7 Apr 2018 16:18:44 +0000 (19:18 +0300)]
Add some new tests + Fix failing tests

6 years agoMove hygiene tests to UI
Vadim Petrochenkov [Sat, 7 Apr 2018 14:28:31 +0000 (17:28 +0300)]
Move hygiene tests to UI

6 years agoAvoid comparing fields by name when possible
Vadim Petrochenkov [Thu, 5 Apr 2018 00:20:21 +0000 (03:20 +0300)]
Avoid comparing fields by name when possible

Resolve them into field indices once and then use those resolutions

+ Fix rebase

6 years agoAST/HIR: Merge field access expressions for named and numeric fields
Vadim Petrochenkov [Sun, 1 Apr 2018 18:48:39 +0000 (21:48 +0300)]
AST/HIR: Merge field access expressions for named and numeric fields

6 years agoMake OnDiskCache thread-safer
John Kåre Alsaker [Thu, 15 Feb 2018 09:52:26 +0000 (10:52 +0100)]
Make OnDiskCache thread-safer

6 years agoImplement inferring outlives requirements for references, structs, enum, union, and...
toidiu [Sun, 15 Oct 2017 05:13:56 +0000 (01:13 -0400)]
Implement inferring outlives requirements for references, structs, enum, union, and projection types. added a feature gate and tests for these scenarios.

6 years agoAdd check builder for Windows to Travis
Mark Simulacrum [Wed, 11 Apr 2018 15:46:58 +0000 (09:46 -0600)]
Add check builder for Windows to Travis

6 years agoAuto merge of #49558 - Zoxc:sync-misc, r=michaelwoerister
bors [Thu, 12 Apr 2018 16:22:36 +0000 (16:22 +0000)]
Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoerister

Even more thread-safety changes

r? @michaelwoerister

6 years agoFix test failure in src/tools/rustdoc-themes when rust.rpath = false
Chris Coulson [Thu, 12 Apr 2018 14:01:49 +0000 (15:01 +0100)]
Fix test failure in src/tools/rustdoc-themes when rust.rpath = false

6 years agoAuto merge of #49551 - scottmcm:deprecate-offset_to, r=KodrAus
bors [Thu, 12 Apr 2018 08:29:10 +0000 (08:29 +0000)]
Auto merge of #49551 - scottmcm:deprecate-offset_to, r=KodrAus

Deprecate offset_to; switch core&alloc to using offset_from instead

Bonus: might make code than uses `.len()` on slice iterators faster

cc https://github.com/rust-lang/rust/issues/41079

6 years agoRun rustfmt on build_helper
Seiichi Uchida [Sun, 25 Mar 2018 14:20:56 +0000 (23:20 +0900)]
Run rustfmt on build_helper

6 years agoAuto merge of #49371 - scottmcm:catch-wrapping, r=nikomatsakis
bors [Thu, 12 Apr 2018 05:38:49 +0000 (05:38 +0000)]
Auto merge of #49371 - scottmcm:catch-wrapping, r=nikomatsakis

Add ok-wrapping to catch blocks, per RFC

Updates the `catch{}` lowering to wrap the result in `Try::from_ok`.

r? @nikomatsakis

Fixes #41414
Fixes #43818

6 years agotraits: Implement interning for Goal and Clause
Tatsuyuki Ishi [Mon, 9 Apr 2018 07:38:00 +0000 (16:38 +0900)]
traits: Implement interning for Goal and Clause

6 years agoAuto merge of #48528 - bitshifter:repr_packed, r=eddyb
bors [Thu, 12 Apr 2018 03:08:14 +0000 (03:08 +0000)]
Auto merge of #48528 - bitshifter:repr_packed, r=eddyb

Implementation of `#[repr(packed(n))]` RFC 1399.

Tracking issue https://github.com/rust-lang/rust/issues/33158.

6 years agoAbstract cs_eq for partial_eq
varkor [Thu, 12 Apr 2018 00:35:14 +0000 (01:35 +0100)]
Abstract cs_eq for partial_eq

6 years agoAuto merge of #49698 - SimonSapin:unicode-for-everyone, r=alexcrichton
bors [Thu, 12 Apr 2018 00:35:33 +0000 (00:35 +0000)]
Auto merge of #49698 - SimonSapin:unicode-for-everyone, r=alexcrichton

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.

6 years agoImprove the comment for cs_fold1
varkor [Thu, 12 Apr 2018 00:33:52 +0000 (01:33 +0100)]
Improve the comment for cs_fold1

6 years agoUpdate partial_ord codegen summary
varkor [Wed, 11 Apr 2018 23:51:08 +0000 (00:51 +0100)]
Update partial_ord codegen summary

6 years agoFix unsoundness bug in functions input references
Santiago Pastorino [Wed, 11 Apr 2018 18:11:51 +0000 (15:11 -0300)]
Fix unsoundness bug in functions input references

Check that function input references are well formed

6 years agoMake prove_predicates take an Iterator
Santiago Pastorino [Wed, 11 Apr 2018 22:11:31 +0000 (19:11 -0300)]
Make prove_predicates take an Iterator

6 years agoRun rustfmt over type_check/mod.rs
Santiago Pastorino [Wed, 11 Apr 2018 22:07:36 +0000 (19:07 -0300)]
Run rustfmt over type_check/mod.rs

6 years agoMark the rest of the `unicode` feature flag as perma-unstable.
Simon Sapin [Fri, 6 Apr 2018 12:23:00 +0000 (14:23 +0200)]
Mark the rest of the `unicode` feature flag as perma-unstable.

6 years agoDedicated tracking issue for UnicodeVersion and UNICODE_VERSION.
Simon Sapin [Fri, 6 Apr 2018 12:18:28 +0000 (14:18 +0200)]
Dedicated tracking issue for UnicodeVersion and UNICODE_VERSION.

6 years agoMove core::char::printable to core::unicode::printable
Simon Sapin [Fri, 6 Apr 2018 08:26:57 +0000 (10:26 +0200)]
Move core::char::printable to core::unicode::printable

6 years agoMerge unstable Utf16Encoder into EncodeUtf16
Simon Sapin [Fri, 6 Apr 2018 08:24:01 +0000 (10:24 +0200)]
Merge unstable Utf16Encoder into EncodeUtf16

6 years agoMerge core::unicode::str into core::str
Simon Sapin [Thu, 5 Apr 2018 17:00:48 +0000 (19:00 +0200)]
Merge core::unicode::str into core::str

And the UnicodeStr trait into StrExt

6 years agoRemove the CharExt trait, now that libcore has inherent methods for char
Simon Sapin [Thu, 5 Apr 2018 16:46:16 +0000 (18:46 +0200)]
Remove the CharExt trait, now that libcore has inherent methods for char

6 years agoMove the rest of core::unicode::char to core::unicode
Simon Sapin [Thu, 5 Apr 2018 16:36:02 +0000 (18:36 +0200)]
Move the rest of core::unicode::char to core::unicode

6 years agoMove char conversions into a separate private module.
Simon Sapin [Thu, 5 Apr 2018 16:26:58 +0000 (18:26 +0200)]
Move char conversions into a separate private module.

6 years agoMove char decoding iterators into a separate private module.
Simon Sapin [Thu, 5 Apr 2018 16:02:52 +0000 (18:02 +0200)]
Move char decoding iterators into a separate private module.

6 years agoReexport from core::unicode::char in core::char rather than vice versa
Simon Sapin [Thu, 5 Apr 2018 15:56:46 +0000 (17:56 +0200)]
Reexport from core::unicode::char in core::char rather than vice versa

6 years agoMove the core::char module to its own directory
Simon Sapin [Thu, 5 Apr 2018 15:35:13 +0000 (17:35 +0200)]
Move the core::char module to its own directory

6 years agoDeprecate the std_unicode crate
Simon Sapin [Thu, 5 Apr 2018 15:20:08 +0000 (17:20 +0200)]
Deprecate the std_unicode crate

6 years agoMove contents of libstd_unicode into libcore
Simon Sapin [Thu, 5 Apr 2018 15:09:28 +0000 (17:09 +0200)]
Move contents of libstd_unicode into libcore

6 years agoMove Utf8Lossy decoder to libcore
Simon Sapin [Thu, 5 Apr 2018 13:55:28 +0000 (15:55 +0200)]
Move Utf8Lossy decoder to libcore

6 years agoMove char::REPLACEMENT_CHARACTER to libcore
Simon Sapin [Thu, 5 Apr 2018 13:45:33 +0000 (15:45 +0200)]
Move char::REPLACEMENT_CHARACTER to libcore

6 years agoAuto merge of #49875 - kennytm:rollup, r=kennytm
bors [Wed, 11 Apr 2018 21:42:32 +0000 (21:42 +0000)]
Auto merge of #49875 - kennytm:rollup, r=kennytm

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:

6 years agoUpdate compile-fail tests
varkor [Wed, 11 Apr 2018 17:16:32 +0000 (18:16 +0100)]
Update compile-fail tests

These now spit out errors for `<=` and `>=` as well.

6 years agoRollup merge of #48270 - leodasvacas:refactor-casts, r=nikomatsakis
kennytm [Wed, 11 Apr 2018 19:41:36 +0000 (03:41 +0800)]
Rollup merge of #48270 - leodasvacas:refactor-casts, r=nikomatsakis

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.

6 years agoRollup merge of #49730 - sinkuu:fix_ice_49556, r=cramertj
kennytm [Wed, 11 Apr 2018 19:38:16 +0000 (03:38 +0800)]
Rollup merge of #49730 - sinkuu:fix_ice_49556, r=cramertj

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.

6 years agoRollup merge of #49734 - alexcrichton:generalize-token-stream, r=nikomatsakis
kennytm [Wed, 11 Apr 2018 19:37:12 +0000 (03:37 +0800)]
Rollup merge of #49734 - alexcrichton:generalize-token-stream, r=nikomatsakis

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

6 years agoRollup merge of #49849 - alecmocatta:master, r=alexcrichton
kennytm [Wed, 11 Apr 2018 19:25:11 +0000 (03:25 +0800)]
Rollup merge of #49849 - alecmocatta:master, r=alexcrichton

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.

6 years agoRollup merge of #49857 - Amanieu:aarch64_fp, r=alexcrichton
kennytm [Wed, 11 Apr 2018 17:00:56 +0000 (01:00 +0800)]
Rollup merge of #49857 - Amanieu:aarch64_fp, r=alexcrichton

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

6 years agoRollup merge of #49863 - memoryleak47:andorid, r=oli-obk
kennytm [Wed, 11 Apr 2018 11:56:54 +0000 (19:56 +0800)]
Rollup merge of #49863 - memoryleak47:andorid, r=oli-obk

fixed typo

6 years agoRollup merge of #49856 - varkor:no_mangle-statics-unlinted, r=michaelwoerister
kennytm [Wed, 11 Apr 2018 11:56:53 +0000 (19:56 +0800)]
Rollup merge of #49856 - varkor:no_mangle-statics-unlinted, r=michaelwoerister

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.

6 years agoAuto merge of #49872 - oli-obk:clippy, r=Manishearth
bors [Wed, 11 Apr 2018 18:58:17 +0000 (18:58 +0000)]
Auto merge of #49872 - oli-obk:clippy, r=Manishearth

Update clippy and rls

r? @Manishearth

6 years agoIgnore copyright year when generating deriving span tests
varkor [Wed, 11 Apr 2018 18:54:48 +0000 (19:54 +0100)]
Ignore copyright year when generating deriving span tests

Previously, generate-deriving-span-tests.py would regenerate all the tests anew, even if they hadn't changed. This creates unnecessary diffs that only change the copyright year. Now we check to see if any of the content of the test has changed before generating the new one.

6 years agoAdd test for derive(PartialOrd) correctness
varkor [Wed, 11 Apr 2018 15:25:34 +0000 (16:25 +0100)]
Add test for derive(PartialOrd) correctness

6 years agoRemove redundant operation in derive[PartialEq]
varkor [Wed, 11 Apr 2018 15:06:56 +0000 (16:06 +0100)]
Remove redundant operation in derive[PartialEq]

6 years agoOptimise the last field operations in derive[PartialOrd]
varkor [Wed, 11 Apr 2018 14:54:27 +0000 (15:54 +0100)]
Optimise the last field operations in derive[PartialOrd]

6 years agoAdd cs_fold1 for better derives
varkor [Wed, 11 Apr 2018 14:16:54 +0000 (15:16 +0100)]
Add cs_fold1 for better derives

6 years agoAuto merge of #49861 - pnkfelix:compare-mode-nll-followup-2, r=nikomatsakis
bors [Wed, 11 Apr 2018 14:37:39 +0000 (14:37 +0000)]
Auto merge of #49861 - pnkfelix:compare-mode-nll-followup-2, r=nikomatsakis

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.

6 years agoDon't inject clippy into rls on stable/beta
Oliver Schneider [Wed, 11 Apr 2018 12:56:59 +0000 (14:56 +0200)]
Don't inject clippy into rls on stable/beta

6 years agoFix derive(PartialOrd) implementation
varkor [Wed, 11 Apr 2018 12:19:10 +0000 (13:19 +0100)]
Fix derive(PartialOrd) implementation

6 years agoImplementation of `#[repr(packed(n))]` RFC 1399.
Cameron Hart [Sun, 4 Feb 2018 11:10:28 +0000 (22:10 +1100)]
Implementation of `#[repr(packed(n))]` RFC 1399.

6 years agoRollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichton
kennytm [Wed, 11 Apr 2018 11:56:48 +0000 (19:56 +0800)]
Rollup merge of #49809 - Mark-Simulacrum:no-color-for-dumb, r=alexcrichton

Stop emitting color codes on TERM=dumb

These terminals generally don't support color.

Fixes #49191

cc @nikomatsakis

r? @alexcrichton

6 years agoRollup merge of #49795 - nox:niche-with-uninhabited-fields, r=eddyb
kennytm [Wed, 11 Apr 2018 11:56:47 +0000 (19:56 +0800)]
Rollup merge of #49795 - nox:niche-with-uninhabited-fields, r=eddyb

Properly look for uninhabitedness of variants in niche-filling check

6 years agoRollup merge of #49781 - Robbepop:master, r=nikomatsakis
kennytm [Wed, 11 Apr 2018 11:56:46 +0000 (19:56 +0800)]
Rollup merge of #49781 - Robbepop:master, r=nikomatsakis

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)]`.

6 years agoRollup merge of #49665 - draganmladjenovic:mips_tests, r=nikomatsakis
kennytm [Wed, 11 Apr 2018 11:56:44 +0000 (19:56 +0800)]
Rollup merge of #49665 - draganmladjenovic:mips_tests, r=nikomatsakis

Small nits to make couple of tests pass on mips targets.

6 years agoRollup merge of #49614 - zackmdavis:the_phantom_menace, r=petrochenkov
kennytm [Wed, 11 Apr 2018 11:56:43 +0000 (19:56 +0800)]
Rollup merge of #49614 - zackmdavis:the_phantom_menace, r=petrochenkov

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.

6 years agoRollup merge of #49575 - tmccombs:option-filter-stabilize, r=withoutboats
kennytm [Wed, 11 Apr 2018 11:56:42 +0000 (19:56 +0800)]
Rollup merge of #49575 - tmccombs:option-filter-stabilize, r=withoutboats

Stabilize `Option::filter`.

Fixes #45860

6 years agoRollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcm
kennytm [Wed, 11 Apr 2018 11:56:41 +0000 (19:56 +0800)]
Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcm

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.

6 years agoUpdate clippy and rls
Oliver Schneider [Wed, 11 Apr 2018 11:36:31 +0000 (13:36 +0200)]
Update clippy and rls

6 years agoPrevent EPIPE causing ICEs in rustc and rustdoc
varkor [Tue, 10 Apr 2018 22:55:41 +0000 (23:55 +0100)]
Prevent EPIPE causing ICEs in rustc and rustdoc

6 years agoAuto merge of #49681 - tmccombs:take-set-limit-stable, r=sfackler
bors [Wed, 11 Apr 2018 06:03:46 +0000 (06:03 +0000)]
Auto merge of #49681 - tmccombs:take-set-limit-stable, r=sfackler

Stabilize take_set_limit

Fixes #42781

6 years agoAuto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton
bors [Wed, 11 Apr 2018 03:30:04 +0000 (03:30 +0000)]
Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichton

Move deny(warnings) into rustbuild

This permits easier iteration without having to worry about warnings
being denied.

Fixes #49517

6 years agoTweak span for ok-wrapping in no-tail block
Scott McMurray [Tue, 10 Apr 2018 07:45:57 +0000 (00:45 -0700)]
Tweak span for ok-wrapping in no-tail block

6 years agoFix the unstable book to account for ok-wrapping
Scott McMurray [Tue, 3 Apr 2018 16:20:24 +0000 (09:20 -0700)]
Fix the unstable book to account for ok-wrapping

6 years agoAdd a UI test that the span for the catch type error is in the right place
Scott McMurray [Tue, 3 Apr 2018 07:04:23 +0000 (00:04 -0700)]
Add a UI test that the span for the catch type error is in the right place

6 years agoAdd ok-wrapping to catch blocks, per RFC
Scott McMurray [Sun, 25 Mar 2018 07:16:16 +0000 (00:16 -0700)]
Add ok-wrapping to catch blocks, per RFC

6 years agoAllow incorrectly reported unused attribute warning
Mark Simulacrum [Mon, 9 Apr 2018 17:21:43 +0000 (11:21 -0600)]
Allow incorrectly reported unused attribute warning

6 years agoAuto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakis
bors [Wed, 11 Apr 2018 00:51:38 +0000 (00:51 +0000)]
Auto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakis

Use InternedString instead of Symbol for type parameter types (2)

Reduced alternative to #49266. Let's see if this causes a performance regression.

6 years agoadd target features when extracting and running doctests
QuietMisdreavus [Wed, 11 Apr 2018 00:22:11 +0000 (19:22 -0500)]
add target features when extracting and running doctests

6 years agofixed typo
memoryleak47 [Tue, 10 Apr 2018 23:34:10 +0000 (01:34 +0200)]
fixed typo

6 years agoCheckpoint the current status of NLL on `ui` tests via compare-mode=nll.
Felix S. Klock II [Tue, 10 Apr 2018 22:38:35 +0000 (00:38 +0200)]
Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.

6 years agoWorkaround rust-lang/rust#49855 by forcing rustc_error in any mode, including NLL.
Felix S. Klock II [Tue, 10 Apr 2018 22:20:05 +0000 (00:20 +0200)]
Workaround rust-lang/rust#49855 by forcing rustc_error in any mode, 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).

6 years agoFix "fp" feature for AArch64
Amanieu d'Antras [Tue, 10 Apr 2018 21:34:15 +0000 (22:34 +0100)]
Fix "fp" feature for AArch64

6 years agoDo not uppercase-lint no_mangle statics
varkor [Tue, 10 Apr 2018 21:30:23 +0000 (22:30 +0100)]
Do not uppercase-lint no_mangle statics

6 years agoproc_macro: Avoid cached TokenStream more often
Alex Crichton [Tue, 10 Apr 2018 19:52:47 +0000 (12:52 -0700)]
proc_macro: Avoid cached TokenStream more often

This commit adds even more pessimization to use the cached `TokenStream` inside
of an AST node. As a reminder the `proc_macro` API requires taking an arbitrary
AST node and transforming it back into a `TokenStream` to hand off to a
procedural macro. Such functionality isn't actually implemented in rustc today,
so the way `proc_macro` works today is that it stringifies an AST node and then
reparses for a list of tokens.

This strategy unfortunately loses all span information, so we try to avoid it
whenever possible. Implemented in #43230 some AST nodes have a `TokenStream`
cache representing the tokens they were originally parsed from. This
`TokenStream` cache, however, has turned out to not always reflect the current
state of the item when it's being tokenized. For example `#[cfg]` processing or
macro expansion could modify the state of an item. Consequently we've seen a
number of bugs (#48644 and #49846) related to using this stale cache.

This commit tweaks the usage of the cached `TokenStream` to compare it to our
lossy stringification of the token stream. If the tokens that make up the cache
and the stringified token stream are the same then we return the cached version
(which has correct span information). If they differ, however, then we will
return the stringified version as the cache has been invalidated and we just
haven't figured that out.

Closes #48644
Closes #49846

6 years agoAuto merge of #48914 - gaurikholkar:e0389, r=nikomatsakis
bors [Tue, 10 Apr 2018 19:00:19 +0000 (19:00 +0000)]
Auto merge of #48914 - gaurikholkar:e0389, r=nikomatsakis

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.

6 years agoAdd --enable-debug flag to musl CI build script
Alec Mocatta [Tue, 10 Apr 2018 17:44:47 +0000 (18:44 +0100)]
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.

6 years agoAdd test
Shotaro Yamada [Tue, 10 Apr 2018 14:40:34 +0000 (23:40 +0900)]
Add test

6 years agoExtend `ExternCrate` to cover externs inferred from `use` or paths
Shotaro Yamada [Tue, 10 Apr 2018 14:01:24 +0000 (23:01 +0900)]
Extend `ExternCrate` to cover externs inferred from `use` or paths

6 years agoAuto merge of #49386 - GuillaumeGomez:fix-path-attribute, r=eddyb
bors [Tue, 10 Apr 2018 12:58:27 +0000 (12:58 +0000)]
Auto merge of #49386 - GuillaumeGomez:fix-path-attribute, r=eddyb

Add tcx in item_body_nested_bodies

Fixes #47391.

r? @eddyb

6 years agoMake Session.injected_panic_runtime thread-safe
John Kåre Alsaker [Sun, 1 Apr 2018 06:27:46 +0000 (08:27 +0200)]
Make Session.injected_panic_runtime thread-safe

6 years agoMake Session.injected_allocator and Session.allocator_kind thread-safe
John Kåre Alsaker [Sun, 1 Apr 2018 06:27:09 +0000 (08:27 +0200)]
Make Session.injected_allocator and Session.allocator_kind thread-safe

6 years agoMake Session.dependency_formats thread-safe
John Kåre Alsaker [Sun, 1 Apr 2018 06:26:22 +0000 (08:26 +0200)]
Make Session.dependency_formats thread-safe

6 years agoMake Session.crate_types thread-safe
John Kåre Alsaker [Sun, 1 Apr 2018 06:26:05 +0000 (08:26 +0200)]
Make Session.crate_types thread-safe

6 years agoMake sure Session.plugin_attributes is only used on one thread
John Kåre Alsaker [Sun, 1 Apr 2018 06:25:43 +0000 (08:25 +0200)]
Make sure Session.plugin_attributes is only used on one thread