]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoAuto merge of #51461 - estebank:e0423-doc, r=petrochenkov
bors [Mon, 11 Jun 2018 00:32:22 +0000 (00:32 +0000)]
Auto merge of #51461 - estebank:e0423-doc, r=petrochenkov

Update E0423 description

E0423 doesn't apply only to structs, update the error index description
to make this clear.

Fix #42077.

6 years agoAuto merge of #51475 - GuillaumeGomez:fix-error-codes, r=Manishearth
bors [Sun, 10 Jun 2018 22:30:14 +0000 (22:30 +0000)]
Auto merge of #51475 - GuillaumeGomez:fix-error-codes, r=Manishearth

Fix error codes

6 years agoAuto merge of #50205 - topecongiro:include-parens-to-type-parameter, r=petrochenkov
bors [Sun, 10 Jun 2018 20:09:22 +0000 (20:09 +0000)]
Auto merge of #50205 - topecongiro:include-parens-to-type-parameter, r=petrochenkov

Include parens to type parameter

The motivation of this PR is to fix a bug in rustfmt (cc https://github.com/rust-lang-nursery/rustfmt/issues/2630).

6 years agoAuto merge of #51474 - llogiq:from-docs, r=TimNN
bors [Sun, 10 Jun 2018 18:00:12 +0000 (18:00 +0000)]
Auto merge of #51474 - llogiq:from-docs, r=TimNN

add some docs to `From` conversions

This adds a helpful document to the bool → int* conversions as well as to the lossless integer conversions.

One of #51430 down, some more to go.

6 years agoAuto merge of #51200 - tmccombs:stable-iter-repeat-with, r=Centril,kennytm
bors [Sun, 10 Jun 2018 15:48:14 +0000 (15:48 +0000)]
Auto merge of #51200 - tmccombs:stable-iter-repeat-with, r=Centril,kennytm

Stabilize iterator_repeat_with

Fixes #48169

6 years agoAuto merge of #51079 - GuillaumeGomez:stabilize-entry-or-default, r=SimonSapin
bors [Sun, 10 Jun 2018 12:46:14 +0000 (12:46 +0000)]
Auto merge of #51079 - GuillaumeGomez:stabilize-entry-or-default, r=SimonSapin

Stabilize entry-or-default

Fixes #44324.

cc @SimonSapin

6 years agoFix error codes
Guillaume Gomez [Sun, 10 Jun 2018 12:04:48 +0000 (14:04 +0200)]
Fix error codes

6 years agoadd some docs to conversions
Andre Bogus [Sun, 10 Jun 2018 11:16:34 +0000 (13:16 +0200)]
add some docs to  conversions

6 years agoStabilize entry-or-default
Guillaume Gomez [Sat, 26 May 2018 09:11:17 +0000 (11:11 +0200)]
Stabilize entry-or-default

6 years agoAuto merge of #51196 - Havvy:remove-keywords, r=petrochenkov
bors [Sun, 10 Jun 2018 08:26:10 +0000 (08:26 +0000)]
Auto merge of #51196 - Havvy:remove-keywords, r=petrochenkov

Implement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof)

On my local machine I was getting failures in `test/ui-fulldeps`, but I was also getting them again after reverting the change, so I'm hoping that this works.

I removed the test because that's what the other PR that unreserved a keyword did and I feel that it doesn't make sense/keep value to keep a test for something removed years ago.

6 years agoAuto merge of #51320 - tmccombs:step-by, r=SimonSapin
bors [Sun, 10 Jun 2018 01:45:42 +0000 (01:45 +0000)]
Auto merge of #51320 - tmccombs:step-by, r=SimonSapin

Stabilize Iterator::step_by

Fixes #27741

6 years agoUpdate tests
Seiichi Uchida [Sat, 9 Jun 2018 08:37:07 +0000 (17:37 +0900)]
Update tests

6 years agoSimplify an error handling in the parser
Seiichi Uchida [Sat, 9 Jun 2018 08:36:44 +0000 (17:36 +0900)]
Simplify an error handling in the parser

6 years agoInclude parens to type parameter
Seiichi Uchida [Fri, 27 Apr 2018 08:32:54 +0000 (17:32 +0900)]
Include parens to type parameter

6 years agoAuto merge of #51265 - Mark-Simulacrum:cleanup-syntax-parse, r=petrochenkov
bors [Sat, 9 Jun 2018 23:32:01 +0000 (23:32 +0000)]
Auto merge of #51265 - Mark-Simulacrum:cleanup-syntax-parse, r=petrochenkov

crate-ify and delete unused code from syntax::parse

This is intended primarily to ensure the compiler catches dead code for us in
more cases.

6 years agoCrate-ify and delete unused code in syntax::parse
Mark Simulacrum [Thu, 31 May 2018 22:53:30 +0000 (16:53 -0600)]
Crate-ify and delete unused code in syntax::parse

6 years agoUpdate E0423 description
Esteban Küber [Sat, 9 Jun 2018 21:21:07 +0000 (14:21 -0700)]
Update E0423 description

E0423 doesn't apply only to structs, update the error index description
to make this clear.

6 years agoAuto merge of #51459 - kennytm:dist-at-stage-0, r=Mark-Simulacrum
bors [Sat, 9 Jun 2018 21:22:36 +0000 (21:22 +0000)]
Auto merge of #51459 - kennytm:dist-at-stage-0, r=Mark-Simulacrum

Miscellaneous changes to rustbuild and CI.

1. Don't build LLVM when running rust-installer.
2. If toolstate is unchanged, don't push a commit to the toolstate repo.
3. Allow `./x.py build src/librustc_codegen_llvm`
4. Added log to track #50887.

6 years agoTest keyword unreservations
Havvy [Fri, 1 Jun 2018 16:01:16 +0000 (09:01 -0700)]
Test keyword unreservations

6 years agoImplement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof)'
Havvy [Wed, 30 May 2018 00:08:29 +0000 (17:08 -0700)]
Implement RFC 2421, 'Keyword unreservations (pure, sizeof, alignof, offsetof)'

6 years agoAdded comment to explain why only RustIstaller has `llvm_tools = false`.
kennytm [Sat, 9 Jun 2018 20:50:42 +0000 (04:50 +0800)]
Added comment to explain why only RustIstaller has `llvm_tools = false`.

6 years agoLog the clang_rt.asan-dynamic-i386.vers on failure to track #50887
kennytm [Sat, 9 Jun 2018 17:31:55 +0000 (01:31 +0800)]
Log the clang_rt.asan-dynamic-i386.vers on failure to track #50887

6 years agoAllowing building the codegen backend specifically.
kennytm [Sat, 9 Jun 2018 17:27:24 +0000 (01:27 +0800)]
Allowing building the codegen backend specifically.

Use `./x.py build src/librustc_codegen_llvm` to build the codegen backend.

6 years agoDo not push a commit if the toolstate is unchanged.
kennytm [Sat, 9 Jun 2018 14:49:02 +0000 (22:49 +0800)]
Do not push a commit if the toolstate is unchanged.

This should greatly reduce the commits on the rust-toolstate repository.

`publish_toolstate.py` defaults to keep the old status if a new one is not
found, so nothing needs to be changed to that file.

6 years agoAllow some tools to be run without first building LLVM.
kennytm [Sat, 9 Jun 2018 07:48:44 +0000 (15:48 +0800)]
Allow some tools to be run without first building LLVM.

Conservatively only disable LLVM for rust-installer. This should shave
5 minutes from the x86_64-gnu-distcheck job by not building LLVM twice.

6 years agoAuto merge of #51068 - Crazycolorz5:pluseqsplitting, r=petrochenkov
bors [Sat, 9 Jun 2018 17:46:36 +0000 (17:46 +0000)]
Auto merge of #51068 - Crazycolorz5:pluseqsplitting, r=petrochenkov

parser: Split `+=` into `+` and `=` where `+` is explicitly requested (such as generics)

Added functions in tokens to check whether a token leads with `+`. Used them when parsing to allow for token splitting of `+=` into `+` and `=`.
Fixes https://github.com/rust-lang/rust/issues/47856

6 years agoAuto merge of #51441 - bstrie:sizeof128, r=dtolnay
bors [Sat, 9 Jun 2018 15:41:44 +0000 (15:41 +0000)]
Auto merge of #51441 - bstrie:sizeof128, r=dtolnay

Document size_of for 128-bit integers

We might want to consider separately documenting the alignment of
primitives, rather than just their size, since 128-bit integers, unlike
all other primitives, have an alignment that is not identical to their
size (size_of is 16, align_of is 8)

6 years agoAuto merge of #51439 - Voultapher:feature/fix-contributing-spelling-error, r=kennytm
bors [Sat, 9 Jun 2018 12:35:21 +0000 (12:35 +0000)]
Auto merge of #51439 - Voultapher:feature/fix-contributing-spelling-error, r=kennytm

Fix spelling error in CONTRIBUTING.md

Thought I'd start with something small.

6 years agoAuto merge of #51400 - xfix:patch-6, r=kennytm
bors [Sat, 9 Jun 2018 10:22:59 +0000 (10:22 +0000)]
Auto merge of #51400 - xfix:patch-6, r=kennytm

Increase number of usages of `u8` in weird expressions u8 test

6 years agoAuto merge of #51359 - cramertj:fdio_spawn, r=sfackler
bors [Sat, 9 Jun 2018 03:41:31 +0000 (03:41 +0000)]
Auto merge of #51359 - cramertj:fdio_spawn, r=sfackler

[fuchsia] Migrate from launchpad to fdio_spawn_etc

fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.

cc @abarth

6 years agoAuto merge of #51042 - matthewjasper:reenable-trivial-bounds, r=nikomatsakis
bors [Sat, 9 Jun 2018 01:32:48 +0000 (01:32 +0000)]
Auto merge of #51042 - matthewjasper:reenable-trivial-bounds, r=nikomatsakis

Re-enable trivial bounds

cc #50825

Remove implementations from global bounds in winnowing when there is ambiguity.

This results in the reverse of #24066 happening sometimes. I'm not sure if anything can be done about that though.

cc #48214

r? @nikomatsakis

6 years agoAuto merge of #51448 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Fri, 8 Jun 2018 23:22:33 +0000 (23:22 +0000)]
Auto merge of #51448 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 13 pull requests

Successful merges:

 - #50143 (Add deprecation lint for duplicated `macro_export`s)
 - #51099 (Fix Issue 38777)
 - #51276 (Dedup auto traits in trait objects.)
 - #51298 (Stabilize unit tests with non-`()` return type)
 - #51360 (Suggest parentheses when a struct literal needs them)
 - #51391 (Use spans pointing at the inside of a rustdoc attribute)
 - #51394 (Use scope tree depths to speed up `nearest_common_ancestor`.)
 - #51396 (Make the size of Option<NonZero*> a documented guarantee.)
 - #51401 (Warn on `repr` without hints)
 - #51412 (Avoid useless Vec clones in pending_obligations().)
 - #51427 (compiletest: autoremove duplicate .nll.* files (#51204))
 - #51436 (Do not require stage 2 compiler for rustdoc)
 - #51437 (rustbuild: generate full list of dependencies for metadata)

Failed merges:

6 years agoRollup merge of #51437 - est31:rustbuild_metadata, r=Mark-Simulacrum
Mark Rousskov [Fri, 8 Jun 2018 23:21:10 +0000 (17:21 -0600)]
Rollup merge of #51437 - est31:rustbuild_metadata, r=Mark-Simulacrum

rustbuild: generate full list of dependencies for metadata

Previously, we didn't send --features to our cargo metadata invocations,
and thus missed some dependencies that we enable through the --features
mechanism.

6 years agoRollup merge of #51436 - Mark-Simulacrum:doc-stage1, r=QuietMisdreavus
Mark Rousskov [Fri, 8 Jun 2018 23:21:09 +0000 (17:21 -0600)]
Rollup merge of #51436 - Mark-Simulacrum:doc-stage1, r=QuietMisdreavus

Do not require stage 2 compiler for rustdoc

r? @QuietMisdreavus

Fixes https://github.com/rust-lang/rust/issues/51424

I *think* this is correct; though I'm not certain. If it passes CI though I expect that to be good enough...

6 years agoRollup merge of #51427 - FelixMcFelix:nll-stderr-remover, r=oli-obk
Mark Rousskov [Fri, 8 Jun 2018 23:21:08 +0000 (17:21 -0600)]
Rollup merge of #51427 - FelixMcFelix:nll-stderr-remover, r=oli-obk

compiletest: autoremove duplicate .nll.* files (#51204)

UI tests in bless mode should now check to see if `.nll.*` files have a
matching `.*` file. If a match is found, it will be deleted.
This should be extensible to other modes (i.e., Polonius).
On running with `--bless`, the two files removed in #51186 are, in turn,
removed automatically.

fixes #51204

6 years agoRollup merge of #51412 - nnethercote:pending_obligations, r=estebank
Mark Rousskov [Fri, 8 Jun 2018 23:21:07 +0000 (17:21 -0600)]
Rollup merge of #51412 - nnethercote:pending_obligations, r=estebank

Avoid useless Vec clones in pending_obligations().

The only instance of `ObligationForest` in use has an obligation type of
`PendingPredicateObligation`, which contains a `PredicateObligation` and a
`Vec<Ty>`.

`FulfillmentContext::pending_obligations()` calls
`ObligationForest::pending_obligations()`, which clones all the
`PendingPredicateObligation`s. But the `Vec<Ty>` field of those cloned
obligations is never touched.

This patch changes `ObligationForest::pending_obligations()` to
`map_pending_obligations` -- which gives callers control about which part
of the obligation to clone -- and takes advantage of the change to avoid
cloning the `Vec<Ty>`. The change speeds up runs of a few rustc-perf
benchmarks, the best by 1%.

6 years agoRollup merge of #51401 - estebank:warn-repr, r=cramertj
Mark Rousskov [Fri, 8 Jun 2018 23:21:05 +0000 (17:21 -0600)]
Rollup merge of #51401 - estebank:warn-repr, r=cramertj

Warn on `repr` without hints

Fix #51376.

6 years agoRollup merge of #51396 - SimonSapin:option-nonzero-layout, r=SimonSapin
Mark Rousskov [Fri, 8 Jun 2018 23:21:04 +0000 (17:21 -0600)]
Rollup merge of #51396 - SimonSapin:option-nonzero-layout, r=SimonSapin

Make the size of Option<NonZero*> a documented guarantee.

Closes #49137, the tracking issue for `NonZero*`, as this was the last remaining open question.

Note that `ptr::NonNull<T>` already documents a similar guarantee.

6 years agoRollup merge of #51394 - nnethercote:NCA-depths, r=nikomatsakis
Mark Rousskov [Fri, 8 Jun 2018 23:21:03 +0000 (17:21 -0600)]
Rollup merge of #51394 - nnethercote:NCA-depths, r=nikomatsakis

Use scope tree depths to speed up `nearest_common_ancestor`.

This patch adds depth markings to all entries in the `ScopeTree`'s
`parent_map`. This change increases memory usage somewhat, but permits a
much faster algorithm to be used:

- If one scope has a greater depth than the other, the deeper scope is
  moved upward until they are at equal depths.

- Then we move the two scopes upward in lockstep until they match.

This avoids the need to keep track of which scopes have already been
seen, which was the major part of the cost of the old algorithm. It also
reduces the number of child-to-parent moves (which are hash table
lookups) when the scopes start at different levels, because it never
goes past the nearest common ancestor the way the old algorithm did.

Finally, the case where one of the scopes is the root is now handled in
advance, because that is moderately common and lets us skip everything.

This change speeds up runs of several rust-perf benchmarks, the best by
6%.

A selection of the bigger improvements:
```
clap-rs-check
        avg: -2.6%      min: -6.6%      max: 0.0%
syn-check
        avg: -2.2%      min: -5.0%      max: 0.0%
style-servo-check
        avg: -2.9%?     min: -4.8%?     max: 0.0%?
cargo-check
        avg: -1.3%      min: -2.8%      max: 0.0%
sentry-cli-check
        avg: -1.0%      min: -2.1%      max: 0.0%
webrender-check
        avg: -0.9%      min: -2.0%      max: 0.0%
style-servo
        avg: -0.9%?     min: -1.8%?     max: -0.0%?
ripgrep-check
        avg: -0.7%      min: -1.8%      max: 0.1%
clap-rs
        avg: -0.9%      min: -1.6%      max: -0.2%
regex-check
        avg: -0.2%      min: -1.3%      max: 0.1%
syn
        avg: -0.6%      min: -1.3%      max: 0.1%
hyper-check
        avg: -0.5%      min: -1.1%      max: 0.0%
```
The idea came from multiple commenters on my blog and on Reddit. Thank you!

r? @nikomatsakis

6 years agoRollup merge of #51391 - estebank:docspan, r=GuillaumeGomez
Mark Rousskov [Fri, 8 Jun 2018 23:21:02 +0000 (17:21 -0600)]
Rollup merge of #51391 - estebank:docspan, r=GuillaumeGomez

Use spans pointing at the inside of a rustdoc attribute

Follow up to #51111.

Point to the link in a rustdoc attribute where intralink resolution failed, instead of the full rustdoc attribute's span.

r? @GuillaumeGomez cc @kennytm

6 years agoRollup merge of #51360 - estebank:braces-around-literal-structs, r=nikomatsakis
Mark Rousskov [Fri, 8 Jun 2018 23:21:00 +0000 (17:21 -0600)]
Rollup merge of #51360 - estebank:braces-around-literal-structs, r=nikomatsakis

Suggest parentheses when a struct literal needs them

When writing a struct literal in an expression that expects a block to
be started afterwards (like an `if` statement), do not suggest using the
same struct literal:

```
did you mean `S { /* fields * /}`?
```

Instead, suggest surrounding the expression with parentheses:

```
did you mean `(S { /* fields * /})`?
```

Fix #47360, #50090. Leaving #42982 open to come back to this problem with a better solution.

6 years agoRollup merge of #51298 - Dylan-DPC:stabilise/termination-test, r=nikomatsakis
Mark Rousskov [Fri, 8 Jun 2018 23:20:59 +0000 (17:20 -0600)]
Rollup merge of #51298 - Dylan-DPC:stabilise/termination-test, r=nikomatsakis

Stabilize unit tests with non-`()` return type

References #48854

6 years agoRollup merge of #51276 - Havvy:dyn-trait-send-send, r=nikomatsakis
Mark Rousskov [Fri, 8 Jun 2018 23:20:58 +0000 (17:20 -0600)]
Rollup merge of #51276 - Havvy:dyn-trait-send-send, r=nikomatsakis

Dedup auto traits in trait objects.

Fixes #47010

Note that the test file `run-pass/trait-object-auto-dedup.rs` passes before and after this change. It's the `ui` test that changed from compiling to not compiling. Which does make this a breaking change, but I cannot imagine anybody actually being broken by it.

6 years agoRollup merge of #51099 - Crazycolorz5:expectedcloseparen, r=estebank
Mark Rousskov [Fri, 8 Jun 2018 23:20:57 +0000 (17:20 -0600)]
Rollup merge of #51099 - Crazycolorz5:expectedcloseparen, r=estebank

Fix Issue 38777

When looking through for a closing bracket in the loop condition, adds them to expecteds.
https://github.com/rust-lang/rust/issues/38777

6 years agoRollup merge of #50143 - petrochenkov:mexuniq, r=nikomatsakis
Mark Rousskov [Fri, 8 Jun 2018 23:20:55 +0000 (17:20 -0600)]
Rollup merge of #50143 - petrochenkov:mexuniq, r=nikomatsakis

Add deprecation lint for duplicated `macro_export`s

cc https://github.com/rust-lang/rust/issues/35896#issuecomment-381370556

6 years agoBuilt, corrected, and run tests. Added expected stderr files.
Crazycolorz5 [Fri, 8 Jun 2018 21:25:53 +0000 (17:25 -0400)]
Built, corrected, and run tests. Added expected stderr files.

6 years agoAuto merge of #51247 - pnkfelix:issue-51190-report-type-moved-from-behind-borrow...
bors [Fri, 8 Jun 2018 20:41:20 +0000 (20:41 +0000)]
Auto merge of #51247 - pnkfelix:issue-51190-report-type-moved-from-behind-borrow, r=nikomatsakis

NLL: report type moved from behind borrow of array/slice

When NLL has illegal move due to borrowed content in an array or slice, provide feedback about why the move wasn't a copy.

Drive by: While comparing the resulting `.nll.stderr` files to their old borrowck variants, I noticed that the test for borrowck-vec-pattern-nesting.rs was not signaling some errors under NLL due to the test assuming lexical lifetimes. So I fixed that too.

Fix #51190

6 years agoDocument size_of for 128-bit integers
bstrie [Fri, 8 Jun 2018 19:20:28 +0000 (19:20 +0000)]
Document size_of for 128-bit integers

We might want to consider separately documenting the alignment of
primitives, rather than just their size, since 128-bit integers, unlike
all other primitives, have an alignment that is not identical to their
size (size_of is 16, align_of is 8)

6 years agoFix spelling error in CONTRIBUTING.md
Lukas Bergdoll [Fri, 8 Jun 2018 17:44:04 +0000 (19:44 +0200)]
Fix spelling error in CONTRIBUTING.md

6 years agoAuto merge of #51410 - oli-obk:cargo_bump, r=nikomatsakis
bors [Fri, 8 Jun 2018 17:04:14 +0000 (17:04 +0000)]
Auto merge of #51410 - oli-obk:cargo_bump, r=nikomatsakis

Update the cargo submodule

This allows the next nightly to publish crates that are on the 2018 edition (in an unstable way)

6 years agoNormalize associated types when checking global bounds
Matthew Jasper [Fri, 8 Jun 2018 16:00:56 +0000 (17:00 +0100)]
Normalize associated types when checking global bounds

6 years agoFix a typo
Matthew Jasper [Fri, 8 Jun 2018 16:00:49 +0000 (17:00 +0100)]
Fix a typo

6 years ago Test that object bounds are preferred over global where clause bounds
Matthew Jasper [Fri, 8 Jun 2018 16:00:36 +0000 (17:00 +0100)]
 Test that object bounds are preferred over global where clause bounds

6 years agoAdd tests for associated types and inconsistent bounds
Matthew Jasper [Fri, 8 Jun 2018 16:00:26 +0000 (17:00 +0100)]
Add tests for associated types and inconsistent bounds

6 years agoReenable trivial bounds
Matthew Jasper [Fri, 8 Jun 2018 16:00:03 +0000 (17:00 +0100)]
Reenable trivial bounds

Removes extra global bounds at the winnowing stage rather than when
normalizing the param_env. This avoids breaking inference when there is
a global bound.

6 years agorustbuild: generate full list of dependencies for metadata
est31 [Fri, 8 Jun 2018 14:47:16 +0000 (16:47 +0200)]
rustbuild: generate full list of dependencies for metadata

Previously, we didn't send --features to our cargo metadata invocations,
and thus missed some dependencies that we enable through the --features
mechanism.

6 years agoDo not require stage 2 compiler for rustdoc
Mark Simulacrum [Fri, 8 Jun 2018 14:29:15 +0000 (08:29 -0600)]
Do not require stage 2 compiler for rustdoc

6 years agocompiletest: autoremove duplicate .nll.* files (#51204)
Kyle Simpson [Thu, 7 Jun 2018 15:13:25 +0000 (16:13 +0100)]
compiletest: autoremove duplicate .nll.* files (#51204)

UI tests in bless mode should now check to see if `.nll.*` files have a
matching `.*` file. If a match is found, it will be deleted.
This should be extensible to other modes (i.e., Polonius).
On running with `--bless`, the two files removed in #51186 are, in turn,
removed automatically.

6 years agoAuto merge of #51426 - kennytm:rollup, r=kennytm
bors [Thu, 7 Jun 2018 23:06:39 +0000 (23:06 +0000)]
Auto merge of #51426 - kennytm:rollup, r=kennytm

Rollup of 9 pull requests

Successful merges:

 - #51186 (Remove two redundant .nll.stderr files)
 - #51283 (Deny #[cfg] and #[cfg_attr] on generic parameters.)
 - #51368 (Fix the use of closures within #[panic_implementation])
 - #51380 (Remove dependency on fmt_macros from typeck)
 - #51389 (rustdoc: Fix missing stability and src links for inlined external macros)
 - #51399 (NLL performance boost)
 - #51407 (Update RLS and Rustfmt)
 - #51417 (Revert #49719)
 - #51420 (Tries to address the recent network issues)

Failed merges:

6 years agoRollup merge of #51420 - kennytm:some-network-issues, r=Mark-Simulacrum
kennytm [Thu, 7 Jun 2018 23:05:48 +0000 (07:05 +0800)]
Rollup merge of #51420 - kennytm:some-network-issues, r=Mark-Simulacrum

Tries to address the recent network issues

1. Set the DNS server to 8.8.8.8/8.8.4.4/1.1.1.1/1.0.0.1 to workaround the daily "Cannot resolve host" error these two weeks.
2. Remove the unnecessary command `gem update --system` (originally added as experiment of the "Could not find a valid gem" error, which turns out to be useless).

6 years agoRollup merge of #51417 - pietroalbini:revert-49719, r=nikomatsakis
kennytm [Thu, 7 Jun 2018 23:05:47 +0000 (07:05 +0800)]
Rollup merge of #51417 - pietroalbini:revert-49719, r=nikomatsakis

Revert #49719

This also needs to be backported into beta.

Fixes #51416.
r? @nikomatsakis

6 years agoRollup merge of #51407 - nrc:update, r=Mark-Simulacrum
kennytm [Thu, 7 Jun 2018 23:05:45 +0000 (07:05 +0800)]
Rollup merge of #51407 - nrc:update, r=Mark-Simulacrum

Update RLS and Rustfmt

r? @Mark-Simulacrum

Fixes tests

6 years agoRollup merge of #51399 - ngg:nll-performance, r=nikomatsakis
kennytm [Thu, 7 Jun 2018 23:05:44 +0000 (07:05 +0800)]
Rollup merge of #51399 - ngg:nll-performance, r=nikomatsakis

NLL performance boost

This makes compilation of the [inflate](https://github.com/rust-lang-nursery/rustc-perf/tree/master/collector/benchmarks/inflate) benchmark compile 2 times faster on my computer when NLL is enabled.
This does not fix the #51377 perfectly, it's still 4-5 times slower than without NLL, but it's a start.

6 years agoRollup merge of #51389 - ollie27:rustdoc_cross_macro_src_stab, r=QuietMisdreavus
kennytm [Thu, 7 Jun 2018 23:05:43 +0000 (07:05 +0800)]
Rollup merge of #51389 - ollie27:rustdoc_cross_macro_src_stab, r=QuietMisdreavus

rustdoc: Fix missing stability and src links for inlined external macros

Fixes #38951

r? @QuietMisdreavus

6 years agoRollup merge of #51380 - Mark-Simulacrum:remove-fmt-macros, r=oli-obk
kennytm [Thu, 7 Jun 2018 23:05:42 +0000 (07:05 +0800)]
Rollup merge of #51380 - Mark-Simulacrum:remove-fmt-macros, r=oli-obk

Remove dependency on fmt_macros from typeck

None

6 years agoRollup merge of #51368 - varkor:panic_implementation-closures, r=eddyb
kennytm [Thu, 7 Jun 2018 23:05:41 +0000 (07:05 +0800)]
Rollup merge of #51368 - varkor:panic_implementation-closures, r=eddyb

Fix the use of closures within #[panic_implementation]

Fixes #51365.

6 years agoRollup merge of #51283 - kennytm:fix-51279-preempt-the-warning-song-and-dance, r...
kennytm [Thu, 7 Jun 2018 23:05:39 +0000 (07:05 +0800)]
Rollup merge of #51283 - kennytm:fix-51279-preempt-the-warning-song-and-dance, r=nikomatsakis

Deny #[cfg] and #[cfg_attr] on generic parameters.

Fix #51279.

Attributes on generic parameters are not expanded, meaning `#[cfg]`, `#[cfg_attr]` and attribute proc macros are entirely ignored on them.

This PR makes using the first two attributes an error, because if they are correctly expanded will affect the AST and change code behavior.

I'm beta-nominating this, because generic parameter attributes are stabilizing in 1.27, and if we did not reserve their usage, we may never be able to repurpose the meaning of these attributes in the Rust 2015 edition.

6 years agoRollup merge of #51186 - pnkfelix:remove-unneccessary-nll-stderr-files, r=oli-obk
kennytm [Thu, 7 Jun 2018 23:05:38 +0000 (07:05 +0800)]
Rollup merge of #51186 - pnkfelix:remove-unneccessary-nll-stderr-files, r=oli-obk

Remove two redundant .nll.stderr files

It turns out that the diagnostics generated from NLL for these cases are now exactly the same as that produced by AST borrowck, and thus we can just fallback on those `.stderr` files that already exist for AST-borrowck.

Bravo!

(it is a good idea to remove these files, because it slightly reduces the amount of time humans will spend reviewing the .nll.stderr fileset...)

((it *might* be worthwhile trying to change the `compiletest` code to even issue a warning when two such files have equivalent contents... but I am not going so far as to try to implement that right now...))

6 years agoAvoid useless Vec clones in pending_obligations().
Nicholas Nethercote [Thu, 19 Apr 2018 05:13:20 +0000 (15:13 +1000)]
Avoid useless Vec clones in pending_obligations().

The only instance of `ObligationForest` in use has an obligation type of
`PendingPredicateObligation`, which contains a `PredicateObligation` and a
`Vec<Ty>`.

`FulfillmentContext::pending_obligations()` calls
`ObligationForest::pending_obligations()`, which clones all the
`PendingPredicateObligation`s. But the `Vec<Ty>` field of those cloned
obligations is never touched.

This patch changes `ObligationForest::pending_obligations()` to
`map_pending_obligations` -- which gives callers control about which part
of the obligation to clone -- and takes advantage of the change to avoid
cloning the `Vec<Ty>`. The change speeds up runs of a few rustc-perf
benchmarks, the best by 1%.

6 years agoUse public DNS server instead of 169.254.169.254 on CI.
kennytm [Thu, 7 Jun 2018 20:33:46 +0000 (04:33 +0800)]
Use public DNS server instead of 169.254.169.254 on CI.

Tries to workaround travis-ci/travis-ci#9696.

6 years agoRemove the `gem update` from `.travis.yml`
kennytm [Thu, 7 Jun 2018 20:31:30 +0000 (04:31 +0800)]
Remove the `gem update` from `.travis.yml`

It has no effect on deployment error and may cause further network issues.

6 years agoUse `from_inner_byte_pos` for cleaner code
Esteban Küber [Thu, 7 Jun 2018 16:47:09 +0000 (09:47 -0700)]
Use `from_inner_byte_pos` for cleaner code

6 years ago[fuchsia] Migrate from launchpad to fdio_spawn_etc
Adam Barth [Fri, 1 Jun 2018 19:58:30 +0000 (12:58 -0700)]
[fuchsia] Migrate from launchpad to fdio_spawn_etc

fdio_spawn_etc is the preferred way of creating processes on Fuchsia
now.

6 years agoRevert "Auto merge of #49719 - mark-i-m:no_sep, r=petrochenkov"
Pietro Albini [Thu, 7 Jun 2018 15:07:05 +0000 (17:07 +0200)]
Revert "Auto merge of #49719 - mark-i-m:no_sep, r=petrochenkov"

This reverts commit d6ba1b9b021c408fcad60ee52acf8af5e1b2eb00, reversing
changes made to 8de5353f75dcde04abe947e0560dc5edd861cf3a.

6 years agoUpdate the cargo submodule
Oliver Schneider [Thu, 7 Jun 2018 09:51:43 +0000 (11:51 +0200)]
Update the cargo submodule

6 years agoUse Ord::cmp for auto traits since stable sort not needed
Havvy [Thu, 7 Jun 2018 05:11:37 +0000 (22:11 -0700)]
Use Ord::cmp for auto traits since stable sort not needed

6 years agoUpdate RLS and Rustfmt
Nick Cameron [Thu, 7 Jun 2018 03:14:49 +0000 (15:14 +1200)]
Update RLS and Rustfmt

6 years agoDo not account for inner/outer attr
Esteban Küber [Thu, 7 Jun 2018 00:39:58 +0000 (17:39 -0700)]
Do not account for inner/outer attr

6 years agoUse consistent span for repr attr suggestion
Esteban Küber [Wed, 6 Jun 2018 22:48:08 +0000 (15:48 -0700)]
Use consistent span for repr attr suggestion

6 years agoAuto merge of #50699 - Zoxc:blocking-queries, r=mw
bors [Wed, 6 Jun 2018 22:24:07 +0000 (22:24 +0000)]
Auto merge of #50699 - Zoxc:blocking-queries, r=mw

Blocking Rayon queries

r? @michaelwoerister

6 years agoAdd i/u size
Esteban Küber [Wed, 6 Jun 2018 21:34:07 +0000 (14:34 -0700)]
Add i/u size

6 years agoChange repr documentation link
Esteban Küber [Wed, 6 Jun 2018 21:33:07 +0000 (14:33 -0700)]
Change repr documentation link

6 years agoExpand (fix) u* and i* `repr` hints
Esteban Küber [Wed, 6 Jun 2018 21:25:57 +0000 (14:25 -0700)]
Expand (fix) u* and i* `repr` hints

6 years agoAdd `transparent` as valid `repr` hint
Esteban Küber [Wed, 6 Jun 2018 21:18:13 +0000 (14:18 -0700)]
Add `transparent` as valid `repr` hint

6 years agoTurn warning into lint
Esteban Küber [Wed, 6 Jun 2018 21:11:48 +0000 (14:11 -0700)]
Turn warning into lint

6 years agoUpdate the expected error output to reflect changes in this PR.
Felix S. Klock II [Thu, 31 May 2018 10:58:34 +0000 (12:58 +0200)]
Update the expected error output to reflect changes in this PR.

6 years agoDrive-by: Make assignment conflict tests in borrowck-vec-pattern-nesting.rs robust...
Felix S. Klock II [Thu, 31 May 2018 10:58:10 +0000 (12:58 +0200)]
Drive-by: Make assignment conflict tests in borrowck-vec-pattern-nesting.rs robust for NLL.
6 years agoWhen NLL has illegal move due to borrowed content, provide feedback about why the...
Felix S. Klock II [Thu, 31 May 2018 10:46:43 +0000 (12:46 +0200)]
When NLL has illegal move due to borrowed content, provide feedback about why the move wasn't a copy.

This should address #51190.

6 years agoIt turns out that the diagnostics generated from NLL for these cases are now exactly...
Felix S. Klock II [Tue, 29 May 2018 21:25:53 +0000 (23:25 +0200)]
It turns out that the diagnostics generated from NLL for these cases are now exactly the same as that produced by AST borrowck. Bravo!

6 years agoAuto merge of #51263 - cramertj:futures-in-core, r=aturon
bors [Wed, 6 Jun 2018 19:42:19 +0000 (19:42 +0000)]
Auto merge of #51263 - cramertj:futures-in-core, r=aturon

Add Future and task system to the standard library

This adds preliminary versions of the `std::future` and `std::task` modules in order to unblock development of async/await (https://github.com/rust-lang/rust/issues/50547). These shouldn't be considered as final forms of these libraries-- design questions about the libraries should be left on https://github.com/rust-lang/rfcs/pull/2418. Once that RFC (or a successor) is merged, these APIs will be adjusted as necessary.

r? @aturon

6 years agoExpand output and suggestions, fix tests
Esteban Küber [Wed, 6 Jun 2018 19:31:43 +0000 (12:31 -0700)]
Expand output and suggestions, fix tests

6 years agoAdd Future and task system to the standard library
Taylor Cramer [Thu, 31 May 2018 01:23:10 +0000 (18:23 -0700)]
Add Future and task system to the standard library

6 years agoWarn on `repr` without hints
Esteban Küber [Wed, 6 Jun 2018 17:02:09 +0000 (10:02 -0700)]
Warn on `repr` without hints

6 years agoAuto merge of #51333 - GuillaumeGomez:reexport-fmt-alignment, r=SimonSapin
bors [Wed, 6 Jun 2018 17:01:56 +0000 (17:01 +0000)]
Auto merge of #51333 - GuillaumeGomez:reexport-fmt-alignment, r=SimonSapin

Reexport fmt::Alignment into std

Follow-up of #51078.

6 years agoIncrease number of usages of `u8` in weird expressions u8 test
Konrad Borowski [Wed, 6 Jun 2018 16:42:34 +0000 (18:42 +0200)]
Increase number of usages of `u8` in weird expressions u8 test

6 years agoWhen unable to sinthesize link span, fallback to previous behavior
Esteban Küber [Wed, 6 Jun 2018 16:14:09 +0000 (09:14 -0700)]
When unable to sinthesize link span, fallback to previous behavior

6 years agoUse spans pointing at the inside of a rustdoc attribute
Esteban Küber [Wed, 6 Jun 2018 07:30:25 +0000 (00:30 -0700)]
Use spans pointing at the inside of a rustdoc attribute

6 years agoNLL performance boost
Gergely Nagy [Wed, 6 Jun 2018 15:31:22 +0000 (17:31 +0200)]
NLL performance boost

6 years agofix stderrs
dylan_DPC [Wed, 6 Jun 2018 15:21:57 +0000 (20:51 +0530)]
fix stderrs

6 years agoAuto merge of #51201 - estebank:dotdot, r=petrochenkov
bors [Wed, 6 Jun 2018 14:04:06 +0000 (14:04 +0000)]
Auto merge of #51201 - estebank:dotdot, r=petrochenkov

Accept `..` in incorrect position to avoid further errors

We currently give a specific message when encountering a `..` anywhere
other than the end of a pattern. Modify the parser to accept it (while
still emitting the error) so that we don't also trigger "missing fields
in pattern" errors afterwards.

Add suggestions to either remove trailing `,` or moving the `..` to the
end.

Follow up to #49268.