]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoAuto merge of #48735 - 1011X:master, r=alexcrichton
bors [Tue, 13 Mar 2018 19:50:13 +0000 (19:50 +0000)]
Auto merge of #48735 - 1011X:master, r=alexcrichton

Move ascii::escape_default to libcore

As requested in #46409, the `ascii::escape_default` method has been added to the core library. All I did was copy over the `std::ascii` module file, remove the (redundant) `AsciiExt` trait, and change some of the documentation to match. None of the tests were changed.

I wasn't sure how to handle the annotations. For `EscapeDefault` and `escape_default()`, I changed them to `#[unstable(feature = "core_ascii", issue = "46409")]`. Is that alright? Or should I leave them as they were?

6 years agoAuto merge of #48411 - nikomatsakis:chalkify-canonical-query-mir, r=eddyb
bors [Tue, 13 Mar 2018 15:24:45 +0000 (15:24 +0000)]
Auto merge of #48411 - nikomatsakis:chalkify-canonical-query-mir, r=eddyb

introduce canonical queries, use for normalization and dropck-outlives

This branch adds in the concept of a **canonicalized trait query** and uses it for three specific operations:

- `infcx.at(cause, param_env).normalize(type_foldable)`
    - normalizes all associated types in `type_foldable`
- `tcx.normalize_erasing_regions(param_env, type_foldable)`
    - like normalize, but erases regions first and in the result; this leads to better caching
- `infcx.at(cause, param_env).dropck_outlives(ty)`
    - produces the set of types that must be live when a value of type `ty` is dropped
    - used from dropck but also NLL outlives

This is a kind of "first step" towards a more Chalk-ified approach. It leads to a **big** speedup for NLL, which is basically dominated by the dropck-outlives computation. Here are some timing measurements for the `syn` crate (pre-branch measurements coming soon):

| Commit | NLL disabled | NLL enabled |
| ------- | --- | --- |
| Before my branch | 5.43s | 8.99s |
| After my branch | 5.36s | 7.25s |

(Note that NLL enabled still does *all the work* that NLL disabled does, so this is not really a way to compare the performance of NLL versus the AST-based borrow checker directly.) Since this affects all codepaths, I'd like to do a full perf run before we land anything.

Also, this is not the "final point" for canonicalization etc. I think canonicalization can be made substantially faster, for one thing. But it seems like a reasonable starting point for a branch that's gotten a bit larger than I would have liked.

**Commit convention:** First of all, this entire branch ought to be a "pure refactoring", I believe, not changing anything about external behavior. Second, I've tagged the most important commits with `[VIC]` (very important commit), so you can scan for those. =)

r? @eddyb

6 years agoadd "text" sections for things that seem likely to be a problem
Niko Matsakis [Sun, 11 Mar 2018 11:13:14 +0000 (07:13 -0400)]
add "text" sections for things that seem likely to be a problem

6 years agoremove dead code
Niko Matsakis [Sun, 11 Mar 2018 11:09:06 +0000 (07:09 -0400)]
remove dead code

6 years agoreplace inline docs with references to rustc-guide
Niko Matsakis [Sun, 11 Mar 2018 11:08:52 +0000 (07:08 -0400)]
replace inline docs with references to rustc-guide

6 years agoadd a debug assertion that only outlives-oblig. result from norm.
Niko Matsakis [Fri, 9 Mar 2018 21:44:20 +0000 (16:44 -0500)]
add a debug assertion that only outlives-oblig. result from norm.

6 years ago`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`
Niko Matsakis [Fri, 9 Mar 2018 17:53:17 +0000 (12:53 -0500)]
`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`

Consolidate `trans_apply_param_substs` and
`trans_apply_param_substs_env`. Also remove `trans_impl_self_ty`

6 years agoshort-circuit work when instantiating query responses
Niko Matsakis [Wed, 7 Mar 2018 19:08:21 +0000 (14:08 -0500)]
short-circuit work when instantiating query responses

Also, perform substitution in smaller parts.

6 years agoshort-circuit `dropck_outlives` for simple cases
Niko Matsakis [Wed, 7 Mar 2018 18:34:48 +0000 (13:34 -0500)]
short-circuit `dropck_outlives` for simple cases

6 years agoadd regression tests for various MIR bugs that get fixed
Niko Matsakis [Tue, 27 Feb 2018 21:14:41 +0000 (16:14 -0500)]
add regression tests for various MIR bugs that get fixed

Fixes #31567
Fixes #47470
Fixes #48132
Fixes #48179

6 years agoadd some debug output
Niko Matsakis [Mon, 26 Feb 2018 16:14:16 +0000 (11:14 -0500)]
add some debug output

6 years agomove `drain_fulfillment_cx_or_panic` to be private to traits::trans
Niko Matsakis [Tue, 13 Feb 2018 14:15:01 +0000 (09:15 -0500)]
move `drain_fulfillment_cx_or_panic` to be private to traits::trans

6 years agotransition various normalization functions to the new methods
Niko Matsakis [Sat, 3 Mar 2018 13:23:28 +0000 (08:23 -0500)]
transition various normalization functions to the new methods

In particular:

- `fully_normalize_monormophic_ty` => `normalize_erasing_regions`
- `normalize_associated_type_in_env` => `normalize_erasing_regions`
- `fully_normalize_associated_types_in` => `normalize_erasing_regions`
- `erase_late_bound_regions_and_normalize` => `normalize_erasing_late_bound_regions`

6 years agointroduce `tcx.normalize_erasing_regions(..)` operaton [VIC]
Niko Matsakis [Wed, 21 Feb 2018 16:24:13 +0000 (11:24 -0500)]
introduce `tcx.normalize_erasing_regions(..)` operaton [VIC]

6 years agointroduce `infcx.at(..).dropck_outlives(..)` operaton [VIC]
Niko Matsakis [Wed, 21 Feb 2018 15:55:16 +0000 (10:55 -0500)]
introduce `infcx.at(..).dropck_outlives(..)` operaton [VIC]

Backed by a canonicalized query. This computes all the types/regions that need
to be live when the destructor runs (i.e., that the dtor may access).

6 years agointroduce `infcx.at(..).normalize(..)` operation [VIC]
Niko Matsakis [Sun, 25 Feb 2018 15:58:54 +0000 (10:58 -0500)]
introduce `infcx.at(..).normalize(..)` operation [VIC]

It is backed by the new `normalize_projection_ty` query, which uses
canonicalization.

6 years agoin `Foo(X)` dep-nodes, allow X to be a `ty` not a `tt`
Niko Matsakis [Fri, 23 Feb 2018 20:30:27 +0000 (15:30 -0500)]
in `Foo(X)` dep-nodes, allow X to be a `ty` not a `tt`

Before, the identifier `X` was also used when generating a pattern
to match against the dep-node. So `Foo(DefId)` would generate a match
pattern like:

    match foo {
        Foo(DefId) => ...
    }

This does not scale to more general types like `&'tcx
Ty<'tcx>`. Therefore, we now require *exactly one* argument (the macro
was internally tupling anyway, and no actual nodes use more than one
argument), and then we can generate a fixed pattern like:

    match foo {
        Foo(arg) => ...
    }

Huzzah. (Also, hygiene is nice.)

6 years agoadd `canonicalize` method to `InferCtxt` [VIC]
Niko Matsakis [Fri, 9 Feb 2018 15:39:36 +0000 (10:39 -0500)]
add `canonicalize` method to `InferCtxt` [VIC]

6 years agochange `ParamEnv::and` to sometimes keep the environment [VIC]
Niko Matsakis [Tue, 20 Feb 2018 15:37:35 +0000 (10:37 -0500)]
change `ParamEnv::and` to sometimes keep the environment [VIC]

In general, we've been moving towards a semantics where you can have
contradictory where-clauses, and we try to honor them.  There are
already existing run-pass tests where we take that philosophy as
well (e.g., `compile-fail/issue-36839.rs`). The current behavior of
`and`, where it strips the environment, breaks that code.

6 years agomove ParamEnv methods from `ty/util` to `ty/mod`
Niko Matsakis [Wed, 14 Feb 2018 10:08:02 +0000 (05:08 -0500)]
move ParamEnv methods from `ty/util` to `ty/mod`

6 years agorefactor `ParamEnv::empty(Reveal)` into two distinct methods
Niko Matsakis [Sat, 10 Feb 2018 18:18:02 +0000 (13:18 -0500)]
refactor `ParamEnv::empty(Reveal)` into two distinct methods

- `ParamEnv::empty()` -- does not reveal all, good for typeck
- `ParamEnv::reveal_all()` -- does, good for trans
- `param_env.with_reveal_all()` -- converts an existing parameter environment

6 years agoadd handy helper for Cell<usize>, used for perf stats
Niko Matsakis [Tue, 20 Feb 2018 15:36:29 +0000 (10:36 -0500)]
add handy helper for Cell<usize>, used for perf stats

6 years agorandom reformatting
Niko Matsakis [Wed, 21 Feb 2018 09:16:25 +0000 (04:16 -0500)]
random reformatting

6 years agocomment the purpose of `TransNormalize`
Niko Matsakis [Fri, 9 Feb 2018 15:43:36 +0000 (10:43 -0500)]
comment the purpose of `TransNormalize`

6 years agomake regions "traceable" so you can do `infcx.at(..).eq(r1, r2)`
Niko Matsakis [Fri, 9 Feb 2018 15:43:15 +0000 (10:43 -0500)]
make regions "traceable" so you can do `infcx.at(..).eq(r1, r2)`

6 years agofix typo in comment
Niko Matsakis [Fri, 9 Feb 2018 16:24:18 +0000 (11:24 -0500)]
fix typo in comment

6 years agoadd `TypeRelation` and `Lift` impls for `Kind`
Niko Matsakis [Fri, 9 Feb 2018 15:39:46 +0000 (10:39 -0500)]
add `TypeRelation` and `Lift` impls for `Kind`

6 years agoimprove TypeFoldable/Lift macros and make a bunch of stuff use them
Niko Matsakis [Fri, 9 Feb 2018 15:34:23 +0000 (10:34 -0500)]
improve TypeFoldable/Lift macros and make a bunch of stuff use them

Improvements:

- Use Clone not Copy for the "simple cases"
- Separate TypeFoldable and Lift for the "simple cases"
- Support generics type parameters
- Support named fields in enum variants
- etc

6 years agorequire `Lifted` types to outlive `'tcx`
Niko Matsakis [Wed, 14 Feb 2018 21:00:07 +0000 (16:00 -0500)]
require `Lifted` types to outlive `'tcx`

6 years agoAuto merge of #48958 - alexcrichton:update-rls-rustc, r=sfackler
bors [Tue, 13 Mar 2018 09:18:12 +0000 (09:18 +0000)]
Auto merge of #48958 - alexcrichton:update-rls-rustc, r=sfackler

Update the rls-rustc package

Should hopefully fix compiling the rls!

6 years agoAuto merge of #48955 - kennytm:rollup, r=kennytm
bors [Mon, 12 Mar 2018 23:47:10 +0000 (23:47 +0000)]
Auto merge of #48955 - kennytm:rollup, r=kennytm

Rollup of 13 pull requests

- Successful merges: #48201, #48705, #48725, #48824, #48877, #48880, #48887, #48928, #48934, #48480, #48631, #48898, #48954
- Failed merges:

6 years agoRollup merge of #48954 - GuillaumeGomez:missing-links-fmt, r=QuietMisdreavus
kennytm [Mon, 12 Mar 2018 21:02:03 +0000 (05:02 +0800)]
Rollup merge of #48954 - GuillaumeGomez:missing-links-fmt, r=QuietMisdreavus

Add missing links

6 years agoRollup merge of #48898 - GuillaumeGomez:remove-empty-section, r=QuietMisdreavus
kennytm [Mon, 12 Mar 2018 21:01:37 +0000 (05:01 +0800)]
Rollup merge of #48898 - GuillaumeGomez:remove-empty-section, r=QuietMisdreavus

Remove auto trait implementation section when empty

Fixes #48882.

6 years agoRollup merge of #48631 - focusaurus:remember-collapse-setting, r=QuietMisdreavus
kennytm [Mon, 12 Mar 2018 21:01:15 +0000 (05:01 +0800)]
Rollup merge of #48631 - focusaurus:remember-collapse-setting, r=QuietMisdreavus

Remember state of top-level collapse toggle widget

This change allows the big top-right expand/collapse toggle to remember its setting across navigation or page reloads. Prior to this change, there was this annoyance:

- browse to some docs
- Click the minus button to collapse them
- browse to other docs (or reload the page)
- Everything is expanded again

The solution is based on storing a simple boolean flag in localStorage. I think it's a good improvement, but it does introduce the following potentially surprising behavior:

- browse to some docs
- click the minus button to collapse them
- click to expand a particular item (not the main top-right big one)
- reload the page, everything is collapsed

Paired with @debugsteven on this.

6 years agoRollup merge of #48480 - jethrogb:patch-5, r=alexcrichton
kennytm [Mon, 12 Mar 2018 21:00:26 +0000 (05:00 +0800)]
Rollup merge of #48480 - jethrogb:patch-5, r=alexcrichton

Clarify interfaction between File::set_len and file cursor

6 years agoUpdate the rls-rustc package
Alex Crichton [Mon, 12 Mar 2018 20:02:49 +0000 (13:02 -0700)]
Update the rls-rustc package

Should hopefully fix compiling the rls!

6 years agoAdd missing links
Guillaume Gomez [Mon, 12 Mar 2018 15:01:28 +0000 (16:01 +0100)]
Add missing links

6 years agoRollup merge of #48934 - Phlosioneer:42453-debug-hygene, r=petrochenkov
kennytm [Mon, 12 Mar 2018 16:54:33 +0000 (00:54 +0800)]
Rollup merge of #48934 - Phlosioneer:42453-debug-hygene, r=petrochenkov

Fix hygene issue when deriving Debug

The code for several of the core traits doesn't use hygenic macros.
This isn't a problem, except for the Debug trait, which is the only
one that uses a variable, named "builder".

Variables can't share names with unit structs, so attempting to
[derive(Debug)] on any type while a unit struct with the name
"builder" was in scope would result in an error.

This commit just changes the name of the variable to
"__debug_trait_builder", because I couldn't figure out how to get a
list of all unit structs in-scope from within the derive expansion
function. If someone wants to have a unit struct with
the exact name "__debug_trait_builder", they'll just have to do it
without a [derive(Debug)].

I also checked the implementations of the other built-in derives to
ensure they didn't declare any variables.

6 years agoRollup merge of #48928 - zackmdavis:span_suggestion_field_day, r=estebank
kennytm [Mon, 12 Mar 2018 16:54:32 +0000 (00:54 +0800)]
Rollup merge of #48928 - zackmdavis:span_suggestion_field_day, r=estebank

in which some labels and notes are upgraded to structured suggestions

(Meanwhile, a couple of parse-fail tests are moved to UI tests so that
the reader can see the new output, and an existing UI test is given a
more evocative name.)

r? @estebank

6 years agoRollup merge of #48887 - alexcrichton:update-stdsimd, r=kennytm
kennytm [Mon, 12 Mar 2018 16:54:31 +0000 (00:54 +0800)]
Rollup merge of #48887 - alexcrichton:update-stdsimd, r=kennytm

Update stdsimd module

Pulls in a redesigned `std::simd` module as well as a replacement for the
`is_target_feature_detected!` macro

6 years agoRollup merge of #48880 - petrochenkov:badstderr, r=kennytm
kennytm [Mon, 12 Mar 2018 16:54:30 +0000 (00:54 +0800)]
Rollup merge of #48880 - petrochenkov:badstderr, r=kennytm

tidy: Add a check for stray `.stderr` and `.stdout` files in UI test directories

6 years agoRollup merge of #48877 - GuillaumeGomez:vec-missing-links, r=QuietMisdreavus
kennytm [Mon, 12 Mar 2018 16:54:28 +0000 (00:54 +0800)]
Rollup merge of #48877 - GuillaumeGomez:vec-missing-links, r=QuietMisdreavus

Add missing urls

r? @QuietMisdreavus

6 years agoRollup merge of #48824 - davidalber:update-conduct, r=steveklabnik
kennytm [Mon, 12 Mar 2018 16:54:27 +0000 (00:54 +0800)]
Rollup merge of #48824 - davidalber:update-conduct, r=steveklabnik

Propagating upstream code of conduct changes

[This repository's code of conduct](https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md) is out of sync with the [rust-www code of conduct](https://github.com/rust-lang/rust-www/blob/master/en-US/conduct.md) due changes from rust-lang/rust-www#1062. This PR propagates those changes and brings the files back into sync.

r? @steveklabnik

6 years agoRollup merge of #48725 - humenda:master, r=nikomatsakis
kennytm [Mon, 12 Mar 2018 16:54:26 +0000 (00:54 +0800)]
Rollup merge of #48725 - humenda:master, r=nikomatsakis

Update L4Re target specification

Due to the dynamically generated linker arguments of the L4Re build system, it is not a good idea to hard-code them in Rust. This PR undoes this step. It also adds an empty implementation to retrieve the number of CPUs.

6 years agoRollup merge of #48705 - klnusbaum:update_rfc_process, r=aturon
kennytm [Mon, 12 Mar 2018 16:54:25 +0000 (00:54 +0800)]
Rollup merge of #48705 - klnusbaum:update_rfc_process, r=aturon

Update Feature Request instructions

As noted in #48393 the contribution instructions for submitting a Feature Request are a little hasty, suggesting that the user immediately create an issue in the RFC repository. For users that want to submit a feature request, let's instead point them directly to the README file for the RFC repository, which contains detailed instructions on how to submit a Feature Request.

6 years agoRollup merge of #48201 - NovemberZulu:master, r=steveklabnik
kennytm [Mon, 12 Mar 2018 16:54:24 +0000 (00:54 +0800)]
Rollup merge of #48201 - NovemberZulu:master, r=steveklabnik

rephrase UnsafeCell doc

As shown by discussions on users.rust-lang.org [[1]], [[2]], UnsafeCell doc is not totally clear. I tried to made the doc univocal regarding what is allowed and what is not. The edits are based on my understanding following [[1]].

[1]: https://users.rust-lang.org/t/unsafecell-behavior-details/1560
[2]: https://users.rust-lang.org/t/is-there-a-better-way-to-overload-index-indexmut-for-a-rc-refcell/15591/12

6 years agoAuto merge of #48770 - bobtwinkles:two_phase_borrows_rewrite, r=pnkfelix
bors [Mon, 12 Mar 2018 12:58:09 +0000 (12:58 +0000)]
Auto merge of #48770 - bobtwinkles:two_phase_borrows_rewrite, r=pnkfelix

Two phase borrows rewrite

This definitely needs a careful review. Both @pnkfelix and @nikomatsakis  were involved with the design of this so they're natural choices here. I'm r?'ing @pnkfelix since they wrote the original two-phase borrow implementation. Also ping @KiChjang who expressed interest in working on this. I'm going to leave a few comments below pointing out some of the more dangerous changes I made (i.e. what I would like reviewers to pay special attention too.)

r? @pnkfelix

6 years agoAuto merge of #48295 - Keruspe:master, r=alexcrichton
bors [Mon, 12 Mar 2018 08:11:19 +0000 (08:11 +0000)]
Auto merge of #48295 - Keruspe:master, r=alexcrichton

rustbuild: pass datadir to rust-installer

This fixes zsh completion install when $datadir != $prefix/share

6 years agoadded ascii_ctypes feature to libcore tests module
1011X [Mon, 12 Mar 2018 07:29:06 +0000 (03:29 -0400)]
added ascii_ctypes feature to libcore tests module

6 years agoAuto merge of #48938 - alexcrichton:no-leak-makeflags, r=kennytm
bors [Mon, 12 Mar 2018 05:28:13 +0000 (05:28 +0000)]
Auto merge of #48938 - alexcrichton:no-leak-makeflags, r=kennytm

test: Forcibly remove MAKEFLAGS in compiletest

When executing run-make tests we run a risk of leaking the `MAKEFLAGS`
environment variable if `./x.py` itself was called from `make` (aka `make check
-j3` as the OSX bots do). We may then leak accidentally fds into the child
process and trick it into thinking it's got a jobserver!

Hopefully addresses [this] spurious failure

[this]: https://github.com/rust-lang/rust/pull/48295#issuecomment-372134717

6 years agoinclude AsciiExt in tests
1011X [Mon, 12 Mar 2018 05:04:51 +0000 (01:04 -0400)]
include AsciiExt in tests

6 years agoAuto merge of #48549 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Sun, 11 Mar 2018 20:28:34 +0000 (20:28 +0000)]
Auto merge of #48549 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update Cargo submodule

Hopefully a routine update...

6 years agotest: Forcibly remove MAKEFLAGS in compiletest
Alex Crichton [Sun, 11 Mar 2018 20:15:46 +0000 (13:15 -0700)]
test: Forcibly remove MAKEFLAGS in compiletest

When executing run-make tests we run a risk of leaking the `MAKEFLAGS`
environment variable if `./x.py` itself was called from `make` (aka `make check
-j3` as the OSX bots do). We may then leak accidentally fds into the child
process and trick it into thinking it's got a jobserver!

Hopefully addresses [this] spurious failure

[this]: https://github.com/rust-lang/rust/pull/48295#issuecomment-372134717

6 years agoUpdate Cargo submodule
Alex Crichton [Mon, 26 Feb 2018 17:07:16 +0000 (09:07 -0800)]
Update Cargo submodule

Required moving all fulldeps tests depending on `rand` to different locations as
now there's multiple `rand` crates that can't be implicitly linked against.

6 years agoUpdate stdsimd module
Alex Crichton [Fri, 9 Mar 2018 19:31:04 +0000 (11:31 -0800)]
Update stdsimd module

Pulls in a redesigned `std::simd` module as well as a replacement for the
`is_target_feature_detected!` macro

6 years agoAuto merge of #48599 - Mark-Simulacrum:rustbuild-updates-step-1, r=alexcrichton
bors [Sun, 11 Mar 2018 17:54:18 +0000 (17:54 +0000)]
Auto merge of #48599 - Mark-Simulacrum:rustbuild-updates-step-1, r=alexcrichton

Remove ONLY_BUILD and ONLY_BUILD_TARGETS

Primarily removes `ONLY_BUILD` and `ONLY_BUILD_TARGETS`. These aren't actually needed in the new system since we can simply not take the relevant `host` and `target` fields if we don't want to run with them in `Step::make_run`.

This PR also includes a few other commits which generally clean up the state of rustbuild, but are not related to the `Step` changes.

6 years agoFix hygene issue when deriving Debug
Phlosioneer [Sun, 11 Mar 2018 14:03:23 +0000 (10:03 -0400)]
Fix hygene issue when deriving Debug

The code for several of the core traits doesn't use hygenic macros.
This isn't a problem, except for the Debug trait, which is the only
one that uses a variable, named "builder".

Variables can't share names with unit structs, so attempting to
[derive(Debug)] on any type while a unit struct with the name
"builder" was in scope would result in an error.

This commit just changes the name of the variable to
"__debug_trait_builder", because I couldn't figure out how to get a
list of all unit structs in-scope from within the derive expansion
function. If someone wants to have a unit struct with
the exact name "__debug_trait_builder", they'll just have to do it
without a [derive(Debug)].

6 years agoAuto merge of #48907 - kennytm:minor-ci-stuff, r=alexcrichton
bors [Sun, 11 Mar 2018 13:40:13 +0000 (13:40 +0000)]
Auto merge of #48907 - kennytm:minor-ci-stuff, r=alexcrichton

Some minor CI changes

1. On macOS, ensure crash log printing won't error, and only real crash logs are printed. This may avoid the `find` process exiting abnormally and truncated the Travis log (I guess).

2. Print `/proc/cpuinfo` and `/proc/meminfo`. To determine if there's any variation in the reported clock rate between jobs.

6 years agoAuto merge of #48799 - alexcrichton:more-osx-cores, r=Mark-Simulacrum
bors [Sun, 11 Mar 2018 09:43:50 +0000 (09:43 +0000)]
Auto merge of #48799 - alexcrichton:more-osx-cores, r=Mark-Simulacrum

travis: Upgrade OSX builders

This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as
opposed to the 2 that our builders currently have. Should help make those OSX
builds a bit speedier!

6 years agoin which some labels and notes are upgraded to structured suggestions
Zack M. Davis [Sun, 11 Mar 2018 08:04:15 +0000 (00:04 -0800)]
in which some labels and notes are upgraded to structured suggestions

(Meanwhile, a couple of parse-fail tests are moved to UI tests so that
the reader can see the new output, and an existing UI test is given a
more evocative name.)

6 years agoAuto merge of #48908 - varkor:bss-undefined-globals, r=alexcrichton
bors [Sun, 11 Mar 2018 07:05:00 +0000 (07:05 +0000)]
Auto merge of #48908 - varkor:bss-undefined-globals, r=alexcrichton

Merge LLVM fix for undefined bss globals

This fixes #41315.

r? @japaric

6 years agoAuto merge of #48691 - Zoxc:profq-chan, r=michaelwoerister
bors [Sun, 11 Mar 2018 04:34:07 +0000 (04:34 +0000)]
Auto merge of #48691 - Zoxc:profq-chan, r=michaelwoerister

Move PROFQ_CHAN to a Session field

r? @michaelwoerister

6 years agoAuto merge of #48419 - bobtwinkles:fix_late_bound_reg_self, r=nikomatsakis
bors [Sat, 10 Mar 2018 23:34:11 +0000 (23:34 +0000)]
Auto merge of #48419 - bobtwinkles:fix_late_bound_reg_self, r=nikomatsakis

Use free regions when determining self type in `compare_impl_method`

The ExplicitSelf::determine function expects to be able to compare regions. However, when the compare_self_type error reporting code runs we haven't resolved bound regions yet. Thus we replace them with free regions first. Fixes #48276

6 years agoadd stub for retrieving number of CPUs
Sebastian Humenda [Sat, 10 Mar 2018 14:01:51 +0000 (15:01 +0100)]
add stub for retrieving number of CPUs

6 years agoremove linker arguments from L4Re target
Sebastian Humenda [Sat, 10 Mar 2018 14:00:26 +0000 (15:00 +0100)]
remove linker arguments from L4Re target

These change from release to release and are impossible to get right,
since they are generated by Make magic.

6 years agoAuto merge of #48388 - kyrias:relro-level-cg, r=alexcrichton
bors [Sat, 10 Mar 2018 13:31:06 +0000 (13:31 +0000)]
Auto merge of #48388 - kyrias:relro-level-cg, r=alexcrichton

Add relro-level tests

The `relro-level` debugging flag was added in #43170 which was merged in July 2017.  This PR moves this flag to be a proper codegen flag.

6 years agoMerge LLVM fix for undefined bss globals
varkor [Sat, 10 Mar 2018 12:38:41 +0000 (12:38 +0000)]
Merge LLVM fix for undefined bss globals

This fixes #41315.

6 years agoPrint /proc/cpuinfo and /proc/meminfo before starting to build.
kennytm [Sat, 10 Mar 2018 11:55:04 +0000 (19:55 +0800)]
Print /proc/cpuinfo and /proc/meminfo before starting to build.

6 years agoPrevents the crash log printer on macOS from crashing the entire job.
kennytm [Sat, 10 Mar 2018 10:38:27 +0000 (18:38 +0800)]
Prevents the crash log printer on macOS from crashing the entire job.

6 years agoAuto merge of #47574 - zilbuz:issue-14844, r=nikomatsakis
bors [Sat, 10 Mar 2018 10:52:07 +0000 (10:52 +0000)]
Auto merge of #47574 - zilbuz:issue-14844, r=nikomatsakis

Show the used type variable when issuing a "can't use type parameters from outer function" error message

Fix #14844

r? @estebank

6 years agoAuto merge of #48755 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
bors [Sat, 10 Mar 2018 08:24:08 +0000 (08:24 +0000)]
Auto merge of #48755 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus

Multiple rustdoc fixes

Fixes #48733.

r? @QuietMisdreavus

6 years agoAuto merge of #48901 - alexcrichton:j1-install, r=Mark-Simulacrum
bors [Sat, 10 Mar 2018 03:38:19 +0000 (03:38 +0000)]
Auto merge of #48901 - alexcrichton:j1-install, r=Mark-Simulacrum

rustbuild: Pass `-j1` to OpenSSL `make install`

We explicitly do this when compiling OpenSSL itself due to weird racy issues in
its build system, and now we've started seeing issues in the `make install` step
so let's try and see what ratcheting down the parallelism does here...

6 years agorustbuild: Pass `-j1` to OpenSSL `make install`
Alex Crichton [Sat, 10 Mar 2018 02:49:28 +0000 (18:49 -0800)]
rustbuild: Pass `-j1` to OpenSSL `make install`

We explicitly do this when compiling OpenSSL itself due to weird racy issues in
its build system, and now we've started seeing issues in the `make install` step
so let's try and see what ratcheting down the parallelism does here...

6 years agoRemove some commented out code
bobtwinkles [Sat, 10 Mar 2018 00:02:22 +0000 (19:02 -0500)]
Remove some commented out code

Left over from prior experimentation, no longer required.

6 years agoRemove added two-phase-borrows flag
bobtwinkles [Sat, 10 Mar 2018 00:00:18 +0000 (19:00 -0500)]
Remove added two-phase-borrows flag

It seems whatever was causing problems has been fixed.

6 years agoAuto merge of #48891 - alexcrichton:dist-osx-9.3, r=kennytm
bors [Fri, 9 Mar 2018 21:46:58 +0000 (21:46 +0000)]
Auto merge of #48891 - alexcrichton:dist-osx-9.3, r=kennytm

travis: Upgrade dist builders for OSX

This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248

6 years agoRemove auto trait implementation section when empty
Guillaume Gomez [Fri, 9 Mar 2018 21:18:08 +0000 (22:18 +0100)]
Remove auto trait implementation section when empty

6 years agotravis: Upgrade dist builders for OSX
Alex Crichton [Thu, 8 Mar 2018 18:57:03 +0000 (10:57 -0800)]
travis: Upgrade dist builders for OSX

This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248

6 years agoAuto merge of #48757 - alexcrichton:fix-msbuild-build, r=Mark-Simulacrum
bors [Fri, 9 Mar 2018 19:02:13 +0000 (19:02 +0000)]
Auto merge of #48757 - alexcrichton:fix-msbuild-build, r=Mark-Simulacrum

rustbuild: Fix MSBuild location of `llvm-config.exe`

For LLD integration the path to `llvm-config` needed to change to inside the
build directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on `ninja` for MSVC builds, so the path to
`llvm-config.exe` was actually wrong and not working!

This commit removes the `Build::llvm_config` function in favor of the source of
truth, the `Llvm` build step itself. The build step was then updated to find the
right build directory for MSBuild as well as `ninja` for where `llvm-config.exe`
is located.

Closes #48749

6 years agoCheck for two_phase_borrows in the right place
bobtwinkles [Tue, 6 Mar 2018 09:19:41 +0000 (04:19 -0500)]
Check for two_phase_borrows in the right place

Fix a small compilation issue after I missed a critical change after rebasing
yesterday (ref c933440)

6 years agoFix tests after two-phase borrow rewrite
bobtwinkles [Tue, 6 Mar 2018 08:37:21 +0000 (03:37 -0500)]
Fix tests after two-phase borrow rewrite

6 years agoRemove unused field on BorrowData
bobtwinkles [Tue, 6 Mar 2018 05:13:29 +0000 (00:13 -0500)]
Remove unused field on BorrowData

6 years agoComplete re-implementation of 2-phase borrows
bobtwinkles [Tue, 6 Mar 2018 03:43:43 +0000 (22:43 -0500)]
Complete re-implementation of 2-phase borrows

See #48431 for discussion as to why this was necessary and what we hoped to
accomplish. A brief summary:
   - the first implementation of 2-phase borrows was hard to limit in the way we
   wanted. That is, it was too good at accepting all 2-phase borrows rather than
   just autorefs =)
   - Numerous diagnostic regressions were introduced by 2-phase borrow support
   which were difficult to fix

6 years agomir dataflow: change graphviz output
bobtwinkles [Sat, 3 Mar 2018 22:44:06 +0000 (17:44 -0500)]
mir dataflow: change graphviz output

The new output format is perhaps a little more readable. As a bonus, we get
labels on the outgoing edges to more easily corroborate the dataflow with the
plain MIR graphviz output.

6 years agoFinally start down the right path
bobtwinkles [Mon, 5 Mar 2018 07:44:10 +0000 (02:44 -0500)]
Finally start down the right path

6 years agoRename BorrowData::location to BorrowData::reserve_location
bobtwinkles [Mon, 5 Mar 2018 02:47:39 +0000 (21:47 -0500)]
Rename BorrowData::location to BorrowData::reserve_location

in preparation for rewritting two phase borrow support

6 years agoFix anchor not always being put at the right place
Guillaume Gomez [Tue, 6 Mar 2018 21:05:41 +0000 (22:05 +0100)]
Fix anchor not always being put at the right place

6 years agoFix escape not working when searchbar selected
Guillaume Gomez [Mon, 5 Mar 2018 22:37:33 +0000 (23:37 +0100)]
Fix escape not working when searchbar selected

6 years agoAdd missing items in the sidebar for functions
Guillaume Gomez [Mon, 5 Mar 2018 21:40:43 +0000 (22:40 +0100)]
Add missing items in the sidebar for functions

6 years agorustbuild: Fix MSBuild location of `llvm-config.exe`
Alex Crichton [Mon, 5 Mar 2018 17:47:54 +0000 (09:47 -0800)]
rustbuild: Fix MSBuild location of `llvm-config.exe`

For LLD integration the path to `llvm-config` needed to change to inside the
build directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on `ninja` for MSVC builds, so the path to
`llvm-config.exe` was actually wrong and not working!

This commit removes the `Build::llvm_config` function in favor of the source of
truth, the `Llvm` build step itself. The build step was then updated to find the
right build directory for MSBuild as well as `ninja` for where `llvm-config.exe`
is located.

Closes #48749

6 years agotidy: Add a check for stray `.stderr` and `.stdout` files in UI test directories
Vadim Petrochenkov [Fri, 9 Mar 2018 14:11:06 +0000 (17:11 +0300)]
tidy: Add a check for stray `.stderr` and `.stdout` files in UI test directories

6 years agoMake the default relro level be doing nothing at all
Johannes Löthberg [Fri, 9 Mar 2018 13:53:15 +0000 (14:53 +0100)]
Make the default relro level be doing nothing at all

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
6 years agoAdd missing urls
Guillaume Gomez [Fri, 9 Mar 2018 13:08:59 +0000 (14:08 +0100)]
Add missing urls

6 years agoAuto merge of #48326 - RalfJung:generic-bounds, r=petrochenkov
bors [Fri, 9 Mar 2018 10:45:29 +0000 (10:45 +0000)]
Auto merge of #48326 - RalfJung:generic-bounds, r=petrochenkov

Warn about ignored generic bounds in `for`

This adds a new lint to fix #42181. For consistency and to avoid code duplication, I also moved the existing "bounds in type aliases are ignored" here.

Questions to the reviewer:
* Is it okay to just remove a diagnostic error code like this? Should I instead keep the warning about type aliases where it is? The old code provided a detailed explanation of what's going on when asked, that information is now lost. On the other hand, `span_warn!` seems deprecated (after this patch, it has exactly one user left!).
* Did I miss any syntactic construct that can appear as `for` in the surface syntax? I covered function types (`for<'a> fn(...)`), generic traits (`for <'a> Fn(...)`, can appear both as bounds as as trait objects) and bounds (`for<'a> F: ...`).
* For the sake of backwards compatibility, this adds a warning, not an error. @nikomatsakis suggested an error in https://github.com/rust-lang/rust/issues/42181#issuecomment-306924389, but I feel that can only happen in a new epoch -- right?

Cc @eddyb

6 years agoMove PROFQ_CHAN to a Session field
John Kåre Alsaker [Sun, 3 Dec 2017 13:21:23 +0000 (14:21 +0100)]
Move PROFQ_CHAN to a Session field

6 years agoAuto merge of #48860 - Manishearth:rollup, r=Manishearth
bors [Fri, 9 Mar 2018 03:59:42 +0000 (03:59 +0000)]
Auto merge of #48860 - Manishearth:rollup, r=Manishearth

Rollup of 5 pull requests

- Successful merges: #48527, #48588, #48801, #48856, #48857
- Failed merges:

6 years agoMerge branch 'master' of github.com:1011X/rust
1011X [Fri, 9 Mar 2018 03:57:54 +0000 (22:57 -0500)]
Merge branch 'master' of github.com:1011X/rust

6 years agodeclare ascii test module in core
1011X [Fri, 9 Mar 2018 03:55:54 +0000 (22:55 -0500)]
declare ascii test module in core

6 years agoRefactor run_host_only to have the proper effect.
Mark Simulacrum [Sun, 11 Feb 2018 22:42:05 +0000 (15:42 -0700)]
Refactor run_host_only to have the proper effect.

Previously it was set to true when we didn't run HOSTS steps.

6 years agoDeny warnings
Mark Simulacrum [Fri, 16 Feb 2018 01:31:17 +0000 (18:31 -0700)]
Deny warnings