]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRollup merge of #51788 - berkus:fix-typo, r=varkor
Pietro Albini [Tue, 26 Jun 2018 09:35:43 +0000 (11:35 +0200)]
Rollup merge of #51788 - berkus:fix-typo, r=varkor

Fix typo

6 years agoRollup merge of #51786 - cuviper:stat64-pointers, r=Mark-Simulacrum
Pietro Albini [Tue, 26 Jun 2018 09:35:41 +0000 (11:35 +0200)]
Rollup merge of #51786 - cuviper:stat64-pointers, r=Mark-Simulacrum

Remove unnecessary stat64 pointer casts

In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`.  That
will be fixed by #51785, but let's remove the unnecessary casts here
too.

6 years agoRollup merge of #51769 - alexcameron89:update_rustc_guide_links, r=frewsxcv
Pietro Albini [Tue, 26 Jun 2018 09:35:40 +0000 (11:35 +0200)]
Rollup merge of #51769 - alexcameron89:update_rustc_guide_links, r=frewsxcv

Update broken rustc-guide links

Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.

6 years agoRollup merge of #51747 - varkor:export_name-null-character, r=estebank
Pietro Albini [Tue, 26 Jun 2018 09:35:39 +0000 (11:35 +0200)]
Rollup merge of #51747 - varkor:export_name-null-character, r=estebank

Add error for using null characters in #[export_name]

Fixes #51741.

6 years agoRollup merge of #51731 - varkor:closure-array-break-length, r=estebank
Pietro Albini [Tue, 26 Jun 2018 09:35:38 +0000 (11:35 +0200)]
Rollup merge of #51731 - varkor:closure-array-break-length, r=estebank

Fix ICEs when using continue as an array length inside closures (inside loop conditions)

Fixes #51707.
Fixes #51708.

r? @estebank

6 years agoRollup merge of #51730 - MajorBreakfast:pin-get-mut-unchecked, r=withoutboats
Pietro Albini [Tue, 26 Jun 2018 09:35:37 +0000 (11:35 +0200)]
Rollup merge of #51730 - MajorBreakfast:pin-get-mut-unchecked, r=withoutboats

New safe associated functions for PinMut

- Add safe `get_mut` and `map`
- Rename unsafe equivalents to `get_mut_unchecked` and `map_unchecked`

The discussion about this starts [in this comment](https://github.com/rust-lang/rust/issues/49150#issuecomment-399604573) on the tracking issue.

6 years agoRollup merge of #51642 - GuillaumeGomez:fix-unknown-windows-build, r=oli-obk
Pietro Albini [Tue, 26 Jun 2018 09:35:35 +0000 (11:35 +0200)]
Rollup merge of #51642 - GuillaumeGomez:fix-unknown-windows-build, r=oli-obk

Fix unknown windows build

Fixes #51618.

6 years agoRollup merge of #51153 - ogham:panic-and-compile_error-docs, r=GuillaumeGomez
Pietro Albini [Tue, 26 Jun 2018 09:35:34 +0000 (11:35 +0200)]
Rollup merge of #51153 - ogham:panic-and-compile_error-docs, r=GuillaumeGomez

Link panic and compile_error docs

This adds documentation links between `panic!()` and `compile_error!()` as per #47275, which points out that they’re similar. It also adds a sentence to the `compile_error()` docs I thought could be added.

6 years agoRollup merge of #51104 - zackmdavis:dynamo, r=nikomatsakis
Pietro Albini [Tue, 26 Jun 2018 09:35:33 +0000 (11:35 +0200)]
Rollup merge of #51104 - zackmdavis:dynamo, r=nikomatsakis

add `dyn ` to display of dynamic (trait) types

~~I'm not sure we want the `dyn` in the E0277 "trait bound [...] is not satisfied" messages ("bound" sounds like a different thing in contrast to the names of specific trait-object types like `Box<dyn Trait>`), but I'm finding the code I would need to change that hard to follow—the [display object seems to](https://github.com/rust-lang/rust/blob/f0805a4421449bd6fe3096d63820fbebe2bfcd1d/src/librustc/traits/error_reporting.rs#L600) be a [`Predicate::Trait`](https://github.com/rust-lang/rust/blob/f0805a4421449bd6fe3096d63820fbebe2bfcd1d/src/librustc/ty/mod.rs#L962) variant, whose [`Display` implementation](https://github.com/rust-lang/rust/blob/f0805a4421449bd6fe3096d63820fbebe2bfcd1d/src/librustc/util/ppaux.rs#L1309) calls `.print` on its `PolyTraitPredicate` member, [which is a type alias](https://github.com/rust-lang/rust/blob/f0805a4421449bd6fe3096d63820fbebe2bfcd1d/src/librustc/ty/mod.rs#L1112) for `ty::Binder<TraitPredicate<'tcx>>`, whose [`Display` implementation](https://github.com/rust-lang/rust/blob/f0805a4421449bd6fe3096d63820fbebe2bfcd1d/src/librustc/util/ppaux.rs#L975-L985) ... _&c._— so maybe it's time to pull-request this and see what reviewers think.~~

 Resolves #49277 (?).

r? @nikomatsakis

6 years agoAuto merge of #51613 - nnethercote:ob-forest-cleanup, r=nikomatsakis
bors [Tue, 26 Jun 2018 07:06:18 +0000 (07:06 +0000)]
Auto merge of #51613 - nnethercote:ob-forest-cleanup, r=nikomatsakis

Obligation forest cleanup

While looking at this code I was scratching my head about whether a node could appear in both `parent` and `dependents`. Turns out it can, but it's not useful to do so, so this PR cleans things up so it's no longer possible.

6 years agoAuto merge of #50630 - sharkdp:fix-50619, r=sfackler
bors [Tue, 26 Jun 2018 03:49:37 +0000 (03:49 +0000)]
Auto merge of #50630 - sharkdp:fix-50619, r=sfackler

Fix possibly endless loop in ReadDir iterator

Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream.

This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`.

fixes #50619

6 years agoAuto merge of #50966 - leodasvacas:self-in-where-clauses-is-not-object-safe, r=nikoma...
bors [Tue, 26 Jun 2018 01:42:14 +0000 (01:42 +0000)]
Auto merge of #50966 - leodasvacas:self-in-where-clauses-is-not-object-safe, r=nikomatsakis

`Self` in where clauses may not be object safe

Needs crater, virtually certain to cause regressions.

In #50781 it was discovered that our object safety rules are not sound because we allow `Self` in where clauses without restrain. This PR is a direct fix to the rules so that we disallow methods with unsound where clauses.

This currently uses hard error to measure impact, but we will want to downgrade it to a future compat error.

Part of #50781.

r? @nikomatsakis

6 years agoFix typo
Berkus Karchebnyy [Mon, 25 Jun 2018 20:44:48 +0000 (23:44 +0300)]
Fix typo

6 years agoAuto merge of #51785 - cuviper:fstatat64, r=Mark-Simulacrum
bors [Mon, 25 Jun 2018 19:40:56 +0000 (19:40 +0000)]
Auto merge of #51785 - cuviper:fstatat64, r=Mark-Simulacrum

Use fstatat64 where available

None

6 years agoRemove unnecessary stat64 pointer casts
Josh Stone [Mon, 25 Jun 2018 19:34:33 +0000 (12:34 -0700)]
Remove unnecessary stat64 pointer casts

In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`.  That
will be fixed by #51785, but let's remove the unnecessary casts here
too.

6 years agoUse fstatat64 where available
Josh Stone [Mon, 25 Jun 2018 18:42:27 +0000 (11:42 -0700)]
Use fstatat64 where available

6 years agoAdd missing \[allow(missing_docs)\]
Guillaume Gomez [Mon, 25 Jun 2018 18:38:29 +0000 (20:38 +0200)]
Add missing \[allow(missing_docs)\]

6 years agoAuto merge of #51728 - bradjc:llvm-tools2, r=kennytm
bors [Mon, 25 Jun 2018 17:22:12 +0000 (17:22 +0000)]
Auto merge of #51728 - bradjc:llvm-tools2, r=kennytm

build: add llvm-tools to manifest

This commit expands on a previous commit to build llvm-tools as a rustup component. It causes the llvm-tools component to be built if the extended step is active. It also adds llvm-tools to the build manifest so rustup can find it.

I tested this as far as I could, but had to hack `build-manifest/src/main.rs` a bit as it is not supported on MacOS. The main change I am not sure about is this line:

```rust
self.package("llvm-tools", &mut manifest.pkg, TARGETS);
```

There are numerous calls to `self.package()`, and I'm not sure if `TARGETS`, `HOSTS`, or `["*"]` is appropriate for llvm-tools.

Otherwise I mostly copied the example set by `rustfmt-preview`.

6 years agoMake find_breakable_scope non-mutable
varkor [Mon, 25 Jun 2018 14:27:37 +0000 (15:27 +0100)]
Make find_breakable_scope non-mutable

6 years agoAuto merge of #51750 - zackmdavis:superstructure, r=oli-obk
bors [Mon, 25 Jun 2018 13:43:22 +0000 (13:43 +0000)]
Auto merge of #51750 - zackmdavis:superstructure, r=oli-obk

three diagnostics upgrades

 * reword `...` expression syntax error to not imply that you should use it in patterns either (#51043) and make it a structured suggestion
 * shorten the top-line message for the trivial-casts lint by tucking the advisory sentence into a help note
 * structured suggestion for pattern-named-the-same-as-variant warning

r? @oli-obk

6 years agoAuto merge of #51733 - varkor:ice-match-slice, r=oli-obk
bors [Mon, 25 Jun 2018 11:36:13 +0000 (11:36 +0000)]
Auto merge of #51733 - varkor:ice-match-slice, r=oli-obk

Fix an ICE when matching over const slices

Fixes #51655. I'm not super familiar with this code, so tell me if this is the wrong approach 😅

r? @oli-obk

6 years agoFill in tracking issue for WHERE_CLAUSES_OBJECT_SAFETY future compat lint
leonardo.yvens [Fri, 8 Jun 2018 21:26:37 +0000 (18:26 -0300)]
Fill in tracking issue for WHERE_CLAUSES_OBJECT_SAFETY future compat lint

6 years agoMake where clause object safety be a warn-by-default lint
leonardo.yvens [Wed, 30 May 2018 12:06:08 +0000 (09:06 -0300)]
Make where clause object safety be a warn-by-default lint

6 years ago`Self` in where clauses may not be object safe
leonardo.yvens [Tue, 22 May 2018 15:09:35 +0000 (12:09 -0300)]
`Self` in where clauses may not be object safe

This is virtually certain to cause regressions, needs crater.

In #50781 it was discovered that our object safety rules are not sound because we allow `Self` in where clauses without restrain. This PR is a direct fix to the rules so that we disallow methods with unsound where clauses.

This currently uses hard error to measure impact, but we will want to downgrade it to a future compat error.

Fixes #50781.

r? @nikomatsakis

6 years agoAuto merge of #51335 - mark-i-m:allocator, r=oli-obk
bors [Mon, 25 Jun 2018 08:54:16 +0000 (08:54 +0000)]
Auto merge of #51335 - mark-i-m:allocator, r=oli-obk

Prohibit `global_allocator` in submodules

Background: #44113 is caused by weird interactions with hygiene. Hygiene is hard. After a lot of playing around, we decided that the best path forward would be to prohibit `global_allocator`s from being in submodules for now. When somebody gets it working, we can re-enable it.

This PR contains the following
- Some hygiene "fixes" -- things I suspect are the correct thing to do that will make life easier in the future. This includes using call_site hygiene for the generated module and passing the correct crate name to the expansion config.
- Comments and minor formatting fixes
- Some debugging code
- Code to prohibit `global_allocator` in submodules
- Test checking that the proper error occurs.

cc #44113 #49320 #51241

r? @alexcrichton

6 years agoAdd sentence to compile_error!() docs
Benjamin Sago [Tue, 29 May 2018 08:07:14 +0000 (10:07 +0200)]
Add sentence to compile_error!() docs

It now details why using compile_error!() is different from just not having the final macro_rules!() branch.

6 years agoLink the docs of panic!() and compile_error!()
Benjamin Sago [Tue, 29 May 2018 08:06:13 +0000 (10:06 +0200)]
Link the docs of panic!() and compile_error!()

Fixes #47275. These two macros are similar, but different, and could do with documentation links to each other.

6 years agoAuto merge of #51688 - spastorino:error-note-field-after-move, r=nikomatsakis
bors [Mon, 25 Jun 2018 06:44:08 +0000 (06:44 +0000)]
Auto merge of #51688 - spastorino:error-note-field-after-move, r=nikomatsakis

Fix erroneous error note when using field after move

Closes #51512

r? @nikomatsakis

6 years agoUpdate broken rustc-guide links
Alex Kitchens [Mon, 25 Jun 2018 03:00:39 +0000 (22:00 -0500)]
Update broken rustc-guide links

Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.

6 years agoused debug, not info
mark [Sat, 23 Jun 2018 00:59:29 +0000 (19:59 -0500)]
used debug, not info

6 years agoactually fix test
mark [Tue, 19 Jun 2018 02:59:32 +0000 (21:59 -0500)]
actually fix test

6 years agofix test
mark [Tue, 19 Jun 2018 02:11:59 +0000 (21:11 -0500)]
fix test

6 years agoenable fold_mac
Mark Mansi [Wed, 6 Jun 2018 00:24:10 +0000 (19:24 -0500)]
enable fold_mac

6 years agoProhibit global_allocator in submodules for now
Mark Mansi [Sun, 20 May 2018 22:04:00 +0000 (17:04 -0500)]
Prohibit global_allocator in submodules for now

- we need to figure out hygiene first
- change the test to check that the prohibition works with a good error
  msg
- leaves some comments and debugging code
- leaves some of our supposed fixes

6 years agoAttempt to fix hygiene for global_allocator
Mark Mansi [Fri, 13 Apr 2018 20:58:16 +0000 (15:58 -0500)]
Attempt to fix hygiene for global_allocator

6 years agoAdd item after attribute
varkor [Sun, 24 Jun 2018 17:20:25 +0000 (18:20 +0100)]
Add item after attribute

6 years agoAuto merge of #51740 - GuillaumeGomez:fix-error-code-numbers, r=cramertj
bors [Sun, 24 Jun 2018 15:08:48 +0000 (15:08 +0000)]
Auto merge of #51740 - GuillaumeGomez:fix-error-code-numbers, r=cramertj

Fix error code numbers

Fixes issue created by #51580.

r? @cramertj

6 years agoin which the trivial-casts word to the wise is tucked into a help note
Zack M. Davis [Sat, 23 Jun 2018 23:57:23 +0000 (16:57 -0700)]
in which the trivial-casts word to the wise is tucked into a help note

The top level message shouldn't be too long; the
replaced-by-coercion/temporary-variable advice can live in a note. Also,
don't mention type ascription when it's not actually available as a real
thing. (The current state of discussion on the type ascription tracking
issue #23416 makes one rather suspect it will never be a stable thing in
its current form, but that's not for us to adjudicate in this commit.)

While we're here, yank out the differentiating parts of the
numeric/other conditional and only have one codepath emitting the
diagnostic.

6 years agostructured suggestion and rewording for `...` expression syntax error
Zack M. Davis [Sat, 23 Jun 2018 23:49:09 +0000 (16:49 -0700)]
structured suggestion and rewording for `...` expression syntax error

Now that `..=` inclusive ranges are stabilized, people probably
shouldn't be using `...` even in patterns, even if it's still legal
there (see #51043). To avoid drawing attention to `...` being a real
thing, let's reword this message to just say "unexpected token" rather
"cannot be used in expressions".

6 years agouse structured suggestion for pattern-named-the-same-as-variant warning
Zack M. Davis [Sat, 23 Jun 2018 23:46:41 +0000 (16:46 -0700)]
use structured suggestion for pattern-named-the-same-as-variant warning

6 years agoadd `dyn` to display of dynamic (trait) type names
Zack M. Davis [Sun, 27 May 2018 03:51:50 +0000 (20:51 -0700)]
add `dyn` to display of dynamic (trait) type names

The `dyn Trait` syntax was stabilized in 199ee327. Resolves #49277.

6 years agoAuto merge of #51726 - petrochenkov:hygclean, r=oli-obk
bors [Sun, 24 Jun 2018 01:06:21 +0000 (01:06 +0000)]
Auto merge of #51726 - petrochenkov:hygclean, r=oli-obk

expansion/hygiene: Some renaming, refactoring and comments

Pure refactoring, no functional changes.
Commits are isolated and self-descriptive.

6 years agoAdd backticks to E0558
varkor [Sat, 23 Jun 2018 21:33:36 +0000 (22:33 +0100)]
Add backticks to E0558

6 years agoAuto merge of #51739 - Amanieu:update_rustfmt, r=Mark-Simulacrum
bors [Sat, 23 Jun 2018 22:27:30 +0000 (22:27 +0000)]
Auto merge of #51739 - Amanieu:update_rustfmt, r=Mark-Simulacrum

Update rustfmt submodule

The version of rustfmt currently shipped with nightly breaks code that uses `break 'label`. This PR updates the submodule to include the fix (https://github.com/rust-lang-nursery/rustfmt/pull/2774).

6 years agobuild: llvm-tools: replace compiler.host
Brad Campbell [Sat, 23 Jun 2018 21:32:25 +0000 (17:32 -0400)]
build: llvm-tools: replace compiler.host

Use `target` instead.

6 years agoAdd error for using null characters in export_name
varkor [Sat, 23 Jun 2018 21:31:31 +0000 (22:31 +0100)]
Add error for using null characters in export_name

6 years agoAuto merge of #51653 - mglagla:option-unreachable, r=dtolnay
bors [Sat, 23 Jun 2018 20:10:35 +0000 (20:10 +0000)]
Auto merge of #51653 - mglagla:option-unreachable, r=dtolnay

Option::get_or_insert(_with): Replace unreachable! with unreachable_unchecked

Optimize codegen for both functions as the None branch is trivially not reachable.

6 years agoFix error code numbers
Guillaume Gomez [Sat, 23 Jun 2018 18:14:04 +0000 (20:14 +0200)]
Fix error code numbers

6 years agohygiene: Merge `NameAndSpan` into `ExpnInfo`
Vadim Petrochenkov [Sat, 23 Jun 2018 18:41:39 +0000 (21:41 +0300)]
hygiene: Merge `NameAndSpan` into `ExpnInfo`

6 years agoUpdate Cargo.lock
Amanieu d'Antras [Sat, 23 Jun 2018 18:15:34 +0000 (19:15 +0100)]
Update Cargo.lock

6 years agoUpdate rustfmt submodule
Amanieu d'Antras [Sat, 23 Jun 2018 17:54:42 +0000 (18:54 +0100)]
Update rustfmt submodule

6 years agohygiene: Make sure transparency of `Mark::root()` is an implementation detail and...
Vadim Petrochenkov [Sat, 23 Jun 2018 17:42:25 +0000 (20:42 +0300)]
hygiene: Make sure transparency of `Mark::root()` is an implementation detail and cannot be inspected outside of `hygiene.rs`

6 years agohygiene: Do not reset expansion info for `quote!`
Vadim Petrochenkov [Sat, 23 Jun 2018 17:09:11 +0000 (20:09 +0300)]
hygiene: Do not reset expansion info for `quote!`

6 years agohygiene: More descriptive names for things involved in late hygienic name resolution
Vadim Petrochenkov [Sat, 23 Jun 2018 16:27:28 +0000 (19:27 +0300)]
hygiene: More descriptive names for things involved in late hygienic name resolution

6 years agoexpansion: Add some comments
Vadim Petrochenkov [Sat, 23 Jun 2018 16:27:01 +0000 (19:27 +0300)]
expansion: Add some comments

6 years agoexpansion: Improve searchability for `AstFragments` methods
Vadim Petrochenkov [Fri, 22 Jun 2018 22:05:07 +0000 (01:05 +0300)]
expansion: Improve searchability for `AstFragments` methods

6 years agoexpansion: Rename `Expansion` to `AstFragment`
Vadim Petrochenkov [Tue, 19 Jun 2018 23:08:08 +0000 (02:08 +0300)]
expansion: Rename `Expansion` to `AstFragment`

6 years agohygiene: Rename `MarkKind` to `Transparency`
Vadim Petrochenkov [Tue, 19 Jun 2018 21:54:17 +0000 (00:54 +0300)]
hygiene: Rename `MarkKind` to `Transparency`

Move `is_builtin` for `Mark` to a separate flag

6 years agohygiene: Make sure expansion info is set at most once for a given `Mark`
Vadim Petrochenkov [Tue, 19 Jun 2018 21:13:11 +0000 (00:13 +0300)]
hygiene: Make sure expansion info is set at most once for a given `Mark`

6 years agoexpansion: Remove unnecessary override from `impl Folder for Marker`
Vadim Petrochenkov [Tue, 19 Jun 2018 21:09:56 +0000 (00:09 +0300)]
expansion: Remove unnecessary override from `impl Folder for Marker`

6 years agohygiene: Give `Debug` impls to hygiene structures
Vadim Petrochenkov [Tue, 19 Jun 2018 21:08:14 +0000 (00:08 +0300)]
hygiene: Give `Debug` impls to hygiene structures

6 years agoFix codegen tests
varkor [Sat, 23 Jun 2018 15:32:32 +0000 (16:32 +0100)]
Fix codegen tests

6 years agoAdd a test for break
varkor [Sat, 23 Jun 2018 12:21:09 +0000 (13:21 +0100)]
Add a test for break

6 years agoFix an ICE with continue inside a closure inside a loop condition
varkor [Sat, 23 Jun 2018 12:12:15 +0000 (13:12 +0100)]
Fix an ICE with continue inside a closure inside a loop condition

6 years agoFix an ICE with `continue` as an array length
varkor [Sat, 23 Jun 2018 10:52:45 +0000 (11:52 +0100)]
Fix an ICE with `continue` as an array length

6 years agobuild: llvm_tools tidy
Brad Campbell [Sat, 23 Jun 2018 16:34:18 +0000 (12:34 -0400)]
build: llvm_tools tidy

6 years ago`PinMut`: Add safe `get_mut` and rename unsafe fns to `get_mut_unchecked` and `map_un...
Josef Reinhard Brandl [Sat, 23 Jun 2018 11:32:53 +0000 (13:32 +0200)]
`PinMut`: Add safe `get_mut` and rename unsafe fns to `get_mut_unchecked` and `map_unchecked`

6 years agoAuto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkov
bors [Sat, 23 Jun 2018 14:33:10 +0000 (14:33 +0000)]
Auto merge of #51727 - varkor:expragain-to-exprcontinue, r=petrochenkov

Rename hir::ExprAgain to hir::ExprContinue

The current name is confusing and historical.

I also used this PR to clean up the annoying indentation in `check/mod.rs`. If that's viewed as too tangential a change, I'll split it up, but it seemed reasonable to slip it in to reduce @bors's work. It's easy to compare for the two commits individually.

r? @petrochenkov

6 years agoFix an ICE when matching over const slices
varkor [Sat, 23 Jun 2018 13:41:01 +0000 (14:41 +0100)]
Fix an ICE when matching over const slices

6 years agoAuto merge of #51723 - estebank:abolish-ice, r=oli-obk
bors [Sat, 23 Jun 2018 11:00:43 +0000 (11:00 +0000)]
Auto merge of #51723 - estebank:abolish-ice, r=oli-obk

Accept `TyError` in `analyze_closure` to avoid ICE

Fix #51714.

6 years agoReindent check/mod.rs
varkor [Sat, 23 Jun 2018 10:00:02 +0000 (11:00 +0100)]
Reindent check/mod.rs

6 years agobuild: add llvm-tools to manifest
Brad Campbell [Sat, 23 Jun 2018 09:49:02 +0000 (05:49 -0400)]
build: add llvm-tools to manifest

This commit expands on a previous commit to build llvm-tools as a rustup
component. It causes the llvm-tools component to be built if the
extended step is active. It also adds llvm-tools to the build manifest
so rustup can find it.

6 years agoRename ExprAgain to ExprContinue
varkor [Sat, 23 Jun 2018 09:51:01 +0000 (10:51 +0100)]
Rename ExprAgain to ExprContinue

6 years agoAuto merge of #51580 - cramertj:async-await, r=eddyb
bors [Sat, 23 Jun 2018 09:02:45 +0000 (09:02 +0000)]
Auto merge of #51580 - cramertj:async-await, r=eddyb

async/await

This PR implements `async`/`await` syntax for `async fn` in Rust 2015 and `async` closures and `async` blocks in Rust 2018 (tracking issue: https://github.com/rust-lang/rust/issues/50547). Limitations: non-`move` async closures with arguments are currently not supported, nor are `async fn` with multiple different input lifetimes. These limitations are not fundamental and will be removed in the future, however I'd like to go ahead and get this PR merged so we can start experimenting with this in combination with futures 0.3.

Based on https://github.com/rust-lang/rust/pull/51414.
cc @petrochenkov for parsing changes.
r? @eddyb

6 years agoAuto merge of #51696 - estebank:fuzzy-ice-ice, r=oli-obk
bors [Sat, 23 Jun 2018 06:56:12 +0000 (06:56 +0000)]
Auto merge of #51696 - estebank:fuzzy-ice-ice, r=oli-obk

Accept `TyError` in patterns to avoid ICE on bad input

Fix #50585.

6 years agoAuto merge of #51724 - tikue:master, r=Mark-Simulacrum
bors [Sat, 23 Jun 2018 04:19:51 +0000 (04:19 +0000)]
Auto merge of #51724 - tikue:master, r=Mark-Simulacrum

Re-pub some items whose visibilities were recently reduced.

Reasons described in the most recent comments of https://github.com/rust-lang/rust/pull/51265.

tarpc can't move off of plugins until proc macros can be reexported from other crates.

Fixes https://github.com/google/tarpc/issues/191

6 years agoUpdate libsyntax test
Taylor Cramer [Sat, 23 Jun 2018 02:50:56 +0000 (19:50 -0700)]
Update libsyntax test

6 years agoAuto merge of #51712 - SLaabsDev:master, r=Mark-Simulacrum
bors [Sat, 23 Jun 2018 02:21:04 +0000 (02:21 +0000)]
Auto merge of #51712 - SLaabsDev:master, r=Mark-Simulacrum

Add support for current directory prefixes (#51071)

Fixes #51071

6 years agoFix rustdoc and remove default impl for FnHeader
Taylor Cramer [Sat, 23 Jun 2018 00:27:58 +0000 (17:27 -0700)]
Fix rustdoc and remove default impl for FnHeader

6 years agoAuto merge of #51697 - estebank:once-used-lifetime-label, r=oli-obk
bors [Sat, 23 Jun 2018 00:06:54 +0000 (00:06 +0000)]
Auto merge of #51697 - estebank:once-used-lifetime-label, r=oli-obk

Add label to lint for lifetimes used once

```
error: lifetime parameter `'a` only used once
  --> $DIR/fn-types.rs:19:10
   |
LL |   a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once
   |          ^^      -- ...is used only here
   |          |
   |          this lifetime...
```

6 years agoRe-reexport some items that were recently made crate-private.
Tim Kuehn [Fri, 22 Jun 2018 23:23:25 +0000 (16:23 -0700)]
Re-reexport some items that were recently made crate-private.

6 years agoRemove impl trait names and move bits of await into a function
Taylor Cramer [Fri, 22 Jun 2018 23:08:07 +0000 (16:08 -0700)]
Remove impl trait names and move bits of await into a function

6 years agoAccept `TyError` in `analyze_closure` to avoid ICE
Esteban Küber [Fri, 22 Jun 2018 22:35:52 +0000 (15:35 -0700)]
Accept `TyError` in `analyze_closure` to avoid ICE

6 years agoAuto merge of #51482 - GuillaumeGomez:table-display, r=QuietMisdreavus
bors [Fri, 22 Jun 2018 22:02:10 +0000 (22:02 +0000)]
Auto merge of #51482 - GuillaumeGomez:table-display, r=QuietMisdreavus

Greatly improve tables display in docs

Fixes #51454.

r? @QuietMisdreavus

Before:

<img width="1440" alt="screen shot 2018-06-10 at 22 43 52" src="https://user-images.githubusercontent.com/3050060/41206138-cc61b2b4-6cff-11e8-9b6f-0b1e435d4b1b.png">

After:

<img width="1440" alt="screen shot 2018-06-10 at 23 33 16" src="https://user-images.githubusercontent.com/3050060/41207049-d455c03c-6d0e-11e8-968f-d4fccaeb4265.png">

6 years agoRun rustfmt
Santiago Pastorino [Fri, 22 Jun 2018 03:10:52 +0000 (00:10 -0300)]
Run rustfmt

6 years agoFix erroneous error note when using field after move
Santiago Pastorino [Thu, 21 Jun 2018 02:51:18 +0000 (23:51 -0300)]
Fix erroneous error note when using field after move

6 years agoAuto merge of #51681 - varkor:rustc_deprecated-future-deprecation, r=petrochenkov
bors [Fri, 22 Jun 2018 19:55:30 +0000 (19:55 +0000)]
Auto merge of #51681 - varkor:rustc_deprecated-future-deprecation, r=petrochenkov

Support future deprecation for rustc_deprecated

Follow-up to #49179 to allow `since` parameters to be set to future versions of Rust and correspondingly to not be treated as deprecated until that version. This is required for #30459 to be completed (though we'll need to wait until this hits beta).

6 years agoRemove unused map_slice
Taylor Cramer [Fri, 22 Jun 2018 19:12:53 +0000 (12:12 -0700)]
Remove unused map_slice

6 years agoReview nits and updates
Taylor Cramer [Fri, 22 Jun 2018 18:36:01 +0000 (11:36 -0700)]
Review nits and updates

Move future_from_generator out of raw
Update await to use $crate
Renumber errors

6 years agoAuto merge of #51670 - estebank:issue-51634, r=oli-obk
bors [Fri, 22 Jun 2018 17:51:02 +0000 (17:51 +0000)]
Auto merge of #51670 - estebank:issue-51634, r=oli-obk

Don't suggest incorrect syntax

Fix #51634.

6 years agoAuto merge of #51704 - kennytm:rollup, r=kennytm
bors [Fri, 22 Jun 2018 15:26:52 +0000 (15:26 +0000)]
Auto merge of #51704 - kennytm:rollup, r=kennytm

Rollup of 6 pull requests

Successful merges:

 - #51158 (Mention spec and indented blocks in doctest docs)
 - #51629 (Do not consume semicolon twice while parsing local statement)
 - #51637 (Update zx_cprng_draw_new on Fuchsia)
 - #51664 (make more libsyntax methods public)
 - #51666 (Disable probestack when GCOV profiling is being used)
 - #51703 (Recognize the extra "LLVM tools versions" argument to build-manifest.)

Failed merges:

r? @ghost

6 years agoHandle current directory prefix for parsing command arguments in bootstrap test command.
Steven Laabs [Fri, 22 Jun 2018 04:57:06 +0000 (23:57 -0500)]
Handle current directory prefix for parsing command arguments in bootstrap test command.

6 years agoAdded stripping current directory prefixes when comparing suite path names
Steven Laabs [Thu, 21 Jun 2018 22:48:24 +0000 (17:48 -0500)]
Added stripping current directory prefixes when comparing suite path names

6 years agoAuto merge of #51184 - lambtowolf:master, r=nikomatsakis
bors [Fri, 22 Jun 2018 11:10:20 +0000 (11:10 +0000)]
Auto merge of #51184 - lambtowolf:master, r=nikomatsakis

Issue #50974 : Suboptimal error in case of duplicate `,` in struct constructor

Fixes #50974

6 years agoadd an explanatory comment for recovery behavior
Niko Matsakis [Tue, 5 Jun 2018 17:04:15 +0000 (13:04 -0400)]
add an explanatory comment for recovery behavior

6 years agoIssue #50974: Fix compilation error and test
Lamb [Wed, 30 May 2018 11:06:05 +0000 (13:06 +0200)]
Issue #50974: Fix compilation error and test

6 years agoFix when the help message is displayed
Maerten [Wed, 30 May 2018 07:16:18 +0000 (09:16 +0200)]
Fix when the help message is displayed

Only display the "remove this comma" suggestion when followed by an identifier

6 years agoIssue #50974: Adding issue number in the test
Lamb [Tue, 29 May 2018 19:44:55 +0000 (21:44 +0200)]
Issue #50974: Adding issue number in the test

6 years agoIssue #50974: Adding tests
Lamb [Tue, 29 May 2018 18:15:59 +0000 (20:15 +0200)]
Issue #50974: Adding tests

6 years agoIssue #50974: Change text of suggestion to be more direct
Lamb [Tue, 29 May 2018 18:15:47 +0000 (20:15 +0200)]
Issue #50974: Change text of suggestion to be more direct