]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoUpdate the tools CI to use --no-fail-fast and --save-toolstates.
kennytm [Thu, 30 Nov 2017 10:21:11 +0000 (18:21 +0800)]
Update the tools CI to use --no-fail-fast and --save-toolstates.

6 years agoRecord build and test result of extended tools into toolstates.json.
kennytm [Thu, 30 Nov 2017 10:18:47 +0000 (18:18 +0800)]
Record build and test result of extended tools into toolstates.json.

6 years agoMove the swap the tools test and cargotest within check-aux.
kennytm [Tue, 28 Nov 2017 15:19:54 +0000 (23:19 +0800)]
Move the swap the tools test and cargotest within check-aux.

The cargotest job is renamed to tools for clarification.

6 years agoAuto merge of #46290 - scottmcm:i128-from-compiler-builtins, r=nagisa
bors [Sun, 3 Dec 2017 07:42:31 +0000 (07:42 +0000)]
Auto merge of #46290 - scottmcm:i128-from-compiler-builtins, r=nagisa

Update compiler-builtins and use it in the 128-bit lowering MIR test

This picks up the lang item implementations from https://github.com/rust-lang-nursery/compiler-builtins/pull/210

cc #45676 @est31 @nagisa

6 years agoAdd ignore-emscripten too
Scott McMurray [Sun, 3 Dec 2017 07:24:11 +0000 (23:24 -0800)]
Add ignore-emscripten too

6 years agoAuto merge of #46428 - eddyb:scalar-pair-unpacking, r=arielb1
bors [Sun, 3 Dec 2017 05:14:24 +0000 (05:14 +0000)]
Auto merge of #46428 - eddyb:scalar-pair-unpacking, r=arielb1

rustc: don't unpack newtypes of scalar-pairs with mismatched alignment.

This PR fixes a potential problem where a packed newtype of a pair was also considered a pair, even though it didn't have the required alignment of the pair.
cc @oli-obk It's possible miri hit something like this, with an unstable feature, but it's more general.

6 years agoIgnore the lower_128bit tests on asmjs
Scott McMurray [Sun, 3 Dec 2017 04:21:50 +0000 (20:21 -0800)]
Ignore the lower_128bit tests on asmjs

6 years agoRemove the unneeded #![feature(lang_items)]s
Scott McMurray [Mon, 27 Nov 2017 03:30:20 +0000 (19:30 -0800)]
Remove the unneeded #![feature(lang_items)]s

6 years agoUpdate compiler-builtins and use it the 128-bit lowering MIR test
Scott McMurray [Sat, 25 Nov 2017 15:20:33 +0000 (07:20 -0800)]
Update compiler-builtins and use it the 128-bit lowering MIR test

6 years agoAuto merge of #46384 - ollie27:rustdoc_inline_assoc, r=QuietMisdreavus
bors [Sun, 3 Dec 2017 00:54:52 +0000 (00:54 +0000)]
Auto merge of #46384 - ollie27:rustdoc_inline_assoc, r=QuietMisdreavus

rustdoc: Fix issues with cross-crate inlined associated items

* Visibility was missing from impl items.
* Attributes and docs were missing from consts and types in impls.
* Const default values were missing from traits.

This unifies the code that handles associated items from impls and traits.

6 years agoAuto merge of #46382 - alexcrichton:thinlto-default, r=michaelwoerister
bors [Sat, 2 Dec 2017 22:27:24 +0000 (22:27 +0000)]
Auto merge of #46382 - alexcrichton:thinlto-default, r=michaelwoerister

rustc: Prepare to enable ThinLTO by default

This commit *almost* enables ThinLTO and multiple codegen units in release mode by
default but is blocked on #46346 now before pulling the trigger.

6 years agoAuto merge of #46381 - estebank:expected-span, r=nikomatsakis
bors [Sat, 2 Dec 2017 20:06:42 +0000 (20:06 +0000)]
Auto merge of #46381 - estebank:expected-span, r=nikomatsakis

Point to next token when it is in the expected line

r? @nikomatsakis

6 years agoAuto merge of #46368 - michaelwoerister:incr-comp-type-debuginfo-spans, r=eddyb
bors [Sat, 2 Dec 2017 17:37:56 +0000 (17:37 +0000)]
Auto merge of #46368 - michaelwoerister:incr-comp-type-debuginfo-spans, r=eddyb

incr.comp.: Remove an unnecessary HIR access which enables hashing spans for type definitions.

r? @nikomatsakis

6 years agoAuto merge of #46349 - estebank:highlight-ref, r=arielb1
bors [Sat, 2 Dec 2017 15:08:08 +0000 (15:08 +0000)]
Auto merge of #46349 - estebank:highlight-ref, r=arielb1

On type mismatch error highlight `&` when type matches

When the only difference between the two types in a type error is that
one is a reference to the other type (`T` vs `&T`) or both are
references differing only in their mutability (`&T` vs `&mut T`), don't
highlight the type (`T`).

6 years agoAuto merge of #46347 - raventid:did-you-mean-increase-accuracy, r=estebank
bors [Sat, 2 Dec 2017 12:42:54 +0000 (12:42 +0000)]
Auto merge of #46347 - raventid:did-you-mean-increase-accuracy, r=estebank

Add case insensitive comparison, besides Levenstein for DYM

Closes #46332

Draft version. The idea is that Levenstein does not work for some cases when we have multiple equal weights for strings. I didn't understand the case with `if found != name => Some(found)` so it means that new code does not work correctly yet.

At least now I think that we might return all maximal weights from levenstein and think about next cases in priority order:

1) There is exact match -> None
2) There is exact match, but case insensitive -> Some(match)
3) There is some match from levenstein -> Some(matches.take_any)
4) There is no match -> None

@estebank WDYT?

6 years agoAuto merge of #46343 - jseyfried:fix_hygiene_bug, r=nrc
bors [Sat, 2 Dec 2017 10:15:21 +0000 (10:15 +0000)]
Auto merge of #46343 - jseyfried:fix_hygiene_bug, r=nrc

Fix hygiene bug.

Fixes #42708.
r? @nrc

6 years agoAuto merge of #46326 - GuillaumeGomez:sidebar-text, r=QuietMisdreavus
bors [Sat, 2 Dec 2017 07:49:32 +0000 (07:49 +0000)]
Auto merge of #46326 - GuillaumeGomez:sidebar-text, r=QuietMisdreavus

Fix invalid HTML escape

Fixes #46289.

r? @QuietMisdreavus

6 years agoAuto merge of #46288 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
bors [Sat, 2 Dec 2017 05:21:58 +0000 (05:21 +0000)]
Auto merge of #46288 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum

Bump to 1.24.0

* Update the in-tree version number
* Update the bootstrap compiler
* Remove `cfg(stage0)` annotations
* Update crate dependencies
* Update Cargo itself

6 years agoAuto merge of #46256 - estebank:suggest-deref, r=arielb1
bors [Sat, 2 Dec 2017 02:56:16 +0000 (02:56 +0000)]
Auto merge of #46256 - estebank:suggest-deref, r=arielb1

Use suggestions instead of notes ref mismatches

On type mismatch errors, use a suggestion when encountering minimal
differences in type differences due to refs, instead of a note.

6 years agoAuto merge of #45904 - sunjay:gat-parser, r=nikomatsakis
bors [Sat, 2 Dec 2017 00:15:19 +0000 (00:15 +0000)]
Auto merge of #45904 - sunjay:gat-parser, r=nikomatsakis

Generic Associated Types Parsing & Name Resolution

Hi!
This PR adds parsing for generic associated types! :tada: :tada: :tada:

Tracking Issue: #44265

## Notes For Reviewers
* [x] I still need to add the stdout and stderr files to my ui tests. It takes me a *long* time to compile the compiler locally, so I'm going to add this as soon as possible in the next day or so.
* [ ] My current ui tests aren't very good or very thorough. I'm reusing the `parse_generics` and `parse_where_clause` methods from elsewhere in the parser, so my changes work without being particularly complex. I'm not sure if I should duplicate all of the generics test cases for generic associated types. It might actually be appropriate to duplicate everything here, since we don't want to rely on an implementation detail in case it changes in the future. If you think so too, I'll adapt all of the generics test cases into the generic associated types test cases.
* [ ] There is still more work required to make the run-pass tests pass here. In particular, we need to make the following errors disappear:
```
error[E0110]: lifetime parameters are not allowed on this type
  --> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:23:41
   |
23 |     bar: <T as StreamingIterator>::Item<'static>,
   |                                         ^^^^^^^ lifetime parameter not allowed on this type
```
```
error[E0261]: use of undeclared lifetime name `'a`
  --> ./src/test/run-pass/rfc1598-generic-associated-types/iterable.rs:15:47
   |
15 |     type Iter<'a>: Iterator<Item = Self::Item<'a>>;
   |                                               ^^ undeclared lifetime
```
There is a FIXME comment in streaming_iterator. If you uncomment that line, you get the following:
```
error: expected one of `!`, `+`, `,`, `::`, or `>`, found `=`
  --> ./src/test/run-pass/rfc1598-generic-associated-types/streaming_iterator.rs:29:45
   |
29 | fn foo<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(iter: T) { /* ... */ }
   |                                             ^ expected one of `!`, `+`, `,`, `::`, or `>` here
```

r? @nikomatsakis

6 years agorustc: don't unpack newtypes of scalar-pairs with mismatched alignment.
Eduard-Mihai Burtescu [Fri, 1 Dec 2017 16:36:58 +0000 (18:36 +0200)]
rustc: don't unpack newtypes of scalar-pairs with mismatched alignment.

6 years agoAuto merge of #46430 - kennytm:rollup, r=kennytm
bors [Fri, 1 Dec 2017 21:29:27 +0000 (21:29 +0000)]
Auto merge of #46430 - kennytm:rollup, r=kennytm

Rollup of 13 pull requests

- Successful merges: #45880, #46280, #46373, #46376, #46385, #46386, #46387, #46392, #46400, #46401, #46405, #46412, #46421
- Failed merges:

6 years agoAuto merge of #46425 - eddyb:mir-place, r=nikomatsakis
bors [Fri, 1 Dec 2017 18:48:20 +0000 (18:48 +0000)]
Auto merge of #46425 - eddyb:mir-place, r=nikomatsakis

MIR: change "lvalue" terminology to "place".

As pointed out elsewhere, "lvalue" vs "rvalue" is a misleading/obscure distinction and several other choices have been proposed, the one I prefer being "place" vs "value".

This PR only touches the "lvalue" side, and only in MIR-related code, as it's already a lot and could rot.

6 years agoUse suggestions instead of notes ref mismatches
Esteban Küber [Sat, 25 Nov 2017 14:00:26 +0000 (06:00 -0800)]
Use suggestions instead of notes ref mismatches

On type mismatch errors, use a suggestion when encountering minimal
differences in type differences due to refs, instead of a note.

6 years agoRollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton
kennytm [Fri, 1 Dec 2017 17:39:04 +0000 (01:39 +0800)]
Rollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton

build_helper: destination file can't be up to date when not exists

Function "up_to_date" return incorrect result if mtime for all fetched sources is set to epoch time. Add existence check to function.

This fix required for a [Guix](https://www.gnu.org/software/guix/) package because a Nix builder set mtime of all sources to epoch time.

6 years agoRollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:39:03 +0000 (01:39 +0800)]
Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus

Hide private trait type params and show hidden items with document-private

As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc.

The second commit removes the trait implementation from the docs if the trait's parameter is private.

6 years agoRollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank
kennytm [Fri, 1 Dec 2017 17:39:02 +0000 (01:39 +0800)]
Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank

rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271

6 years agoRollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1
kennytm [Fri, 1 Dec 2017 17:39:01 +0000 (01:39 +0800)]
Rollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1

wasm: Update LLVM to fix a test

This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.

Closes #46298

6 years agoRollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb
kennytm [Fri, 1 Dec 2017 17:39:00 +0000 (01:39 +0800)]
Rollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb

incr.comp.: Make traits::VTable encodable and decodable.

Make vtables encodable so we can cache the `trans_fulfill_obligation` query at some point.

r? @eddyb

6 years agoRollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:38:59 +0000 (01:38 +0800)]
Rollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus

Invert colors in important traits tooltip

Part of #46352.

r? @QuietMisdreavus

6 years agoRollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:38:58 +0000 (01:38 +0800)]
Rollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus

Fix rustdoc item summaries that are headers

Rustoc item summaries that are headers were not displayed at all because
they started with whitespace.

This PR fixes this and now removes the whitespace and then displays the
block.

I'm not sure if the rustdoc test is written correctly, if there's anything to improve, just let me know. :)

This fixes #46377.

This is how it looks when rendered out now:
![Rendered](https://i.imgur.com/7u8jUAM.png)

6 years agoRollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum
kennytm [Fri, 1 Dec 2017 17:38:57 +0000 (01:38 +0800)]
Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum

Remove librustdoc dependency on env_logger

We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383

6 years agoRollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum
kennytm [Fri, 1 Dec 2017 17:38:56 +0000 (01:38 +0800)]
Rollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum

rustbuild: Fix a typo with the Cargo book

The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
working by accident!

Closes #46195

6 years agoRollup merge of #46376 - SimonSapin:cargoup, r=kennytm
kennytm [Fri, 1 Dec 2017 17:38:55 +0000 (01:38 +0800)]
Rollup merge of #46376 - SimonSapin:cargoup, r=kennytm

Update Cargo to Wed Nov 29 15:19:05 2017 +0000

https://github.com/rust-lang/cargo/commit/5bb478a518bcf75537409e8b71f6b7cc4af362df

Pick up `workspace.default-members` support: https://github.com/rust-lang/cargo/pull/4743

6 years agoRollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm
kennytm [Fri, 1 Dec 2017 17:38:54 +0000 (01:38 +0800)]
Rollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm

NetBSD: add sysctl backend for std::env::current_exe

Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.

Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.

6 years agoRollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton
kennytm [Fri, 1 Dec 2017 17:38:53 +0000 (01:38 +0800)]
Rollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton

rustc_llvm: remove stale references

...that were removed in 77c3bfa7429abf87b76ba84108df018d9e9d90e2.

r? @alexcrichton

6 years agoRollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis
kennytm [Fri, 1 Dec 2017 17:38:52 +0000 (01:38 +0800)]
Rollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis

make coercions to `!` in unreachable code a hard error

This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.

6 years agoMIR: s/lv(al(ue)?)?/place in function/variable/module names.
Eduard-Mihai Burtescu [Fri, 1 Dec 2017 12:39:51 +0000 (14:39 +0200)]
MIR: s/lv(al(ue)?)?/place in function/variable/module names.

6 years agoMIR: s/Lvalue/Place in type names.
Eduard-Mihai Burtescu [Fri, 1 Dec 2017 12:31:47 +0000 (14:31 +0200)]
MIR: s/Lvalue/Place in type names.

6 years agoAuto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis
bors [Fri, 1 Dec 2017 16:01:22 +0000 (16:01 +0000)]
Auto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis

incr.comp.: Load cached diagnostics lazily and allow more things in the cache.

This PR implements makes two changes:
1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.

~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~

r? @nikomatsakis

6 years agoincr.comp.: Fix merge fallout.
Michael Woerister [Fri, 1 Dec 2017 13:29:20 +0000 (14:29 +0100)]
incr.comp.: Fix merge fallout.

6 years agoAuto merge of #46236 - davidtwco:issue-46023, r=arielb1
bors [Fri, 1 Dec 2017 13:26:10 +0000 (13:26 +0000)]
Auto merge of #46236 - davidtwco:issue-46023, r=arielb1

MIR-borrowck: immutable unique closure upvars can be mutated

Fixes #46023 and #46160 (see [this comment](https://github.com/rust-lang/rust/pull/46236#issuecomment-347204874)).

6 years agoincr.comp.: Use the awesome new '_ in a few places.
Michael Woerister [Wed, 29 Nov 2017 11:42:59 +0000 (12:42 +0100)]
incr.comp.: Use the awesome new '_ in a few places.

6 years agoincr.comp.: Allow for recovering from missing on-disk cache entries.
Michael Woerister [Tue, 28 Nov 2017 16:32:28 +0000 (17:32 +0100)]
incr.comp.: Allow for recovering from missing on-disk cache entries.

6 years agoincr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache...
Michael Woerister [Tue, 28 Nov 2017 15:58:02 +0000 (16:58 +0100)]
incr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache persistence code.

6 years agoincr.comp.: Add a newtype for byte positions within the incr. comp. cache.
Michael Woerister [Tue, 28 Nov 2017 13:19:44 +0000 (14:19 +0100)]
incr.comp.: Add a newtype for byte positions within the incr. comp. cache.

6 years agoincr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.
Michael Woerister [Fri, 24 Nov 2017 13:00:33 +0000 (14:00 +0100)]
incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.

The previous method ran into problems because ICH would treat Spans
as (file,line,col) but the cache contained byte offsets and its
possible for the latter to change while the former stayed stable.

6 years agoincr.comp.: Properly hash and encode macro expansion information.
Michael Woerister [Wed, 22 Nov 2017 12:41:27 +0000 (13:41 +0100)]
incr.comp.: Properly hash and encode macro expansion information.

6 years agobuild_helper: destination file can't be up to date when not exists
Nikolay Merinov [Fri, 1 Dec 2017 09:28:14 +0000 (14:28 +0500)]
build_helper: destination file can't be up to date when not exists

Function "up_to_date" return incorrect result if mtime for all fetched
sources is set to epoch time. Add existence check to function.

6 years agoAuto merge of #46211 - snipsco:master, r=pnkfelix
bors [Fri, 1 Dec 2017 08:44:42 +0000 (08:44 +0000)]
Auto merge of #46211 - snipsco:master, r=pnkfelix

disable jemalloc on executables for ios targets

This is a (temporary ?) workaround for issue #45262

6 years agoadd magic comment for ui test, remove newline
Julian Kulesh [Fri, 1 Dec 2017 08:38:30 +0000 (11:38 +0300)]
add magic comment for ui test, remove newline

6 years agoUpdated generic-associated-types-where stderr
Sunjay Varma [Thu, 30 Nov 2017 21:19:04 +0000 (16:19 -0500)]
Updated generic-associated-types-where stderr

6 years agoAdded case for when impl generic associated type has a where clause
Sunjay Varma [Wed, 29 Nov 2017 19:11:41 +0000 (14:11 -0500)]
Added case for when impl generic associated type has a where clause

6 years agoMoved all of the tests over to ui and annotated why they are failing with appropriate...
Sunjay Varma [Wed, 29 Nov 2017 04:39:46 +0000 (23:39 -0500)]
Moved all of the tests over to ui and annotated why they are failing with appropriate fixme comments

6 years agoRemoved FIXME on a line that actually works for some reason...
Sunjay Varma [Sun, 26 Nov 2017 04:23:04 +0000 (23:23 -0500)]
Removed FIXME on a line that actually works for some reason...

6 years agoAdding error line so that test passes
Sunjay Varma [Sun, 26 Nov 2017 04:02:15 +0000 (23:02 -0500)]
Adding error line so that test passes

6 years agoadded must-compile-successfully
Sunjay Varma [Sun, 26 Nov 2017 03:47:00 +0000 (22:47 -0500)]
added must-compile-successfully

6 years agoTesting and fixes
Sunjay Varma [Sat, 25 Nov 2017 19:42:55 +0000 (14:42 -0500)]
Testing and fixes

6 years agoRenaming MethodRibKind to TraitOrImplItemRibKind and removing its field which was...
Sunjay Varma [Wed, 22 Nov 2017 18:15:05 +0000 (13:15 -0500)]
Renaming MethodRibKind to TraitOrImplItemRibKind and removing its field which was never used. Lifting the HasTypeParameters rib to all trait item kinds and all impl item kinds

6 years agoAdding type paramter ribs for generic associated types
Sunjay Varma [Tue, 21 Nov 2017 06:46:55 +0000 (01:46 -0500)]
Adding type paramter ribs for generic associated types

6 years agoPreventing moving out of the trait item kind
Sunjay Varma [Tue, 21 Nov 2017 07:30:39 +0000 (02:30 -0500)]
Preventing moving out of the trait item kind

6 years agoParsing where clauses correctly and documenting the grammar being parsed
Sunjay Varma [Sun, 19 Nov 2017 05:18:43 +0000 (00:18 -0500)]
Parsing where clauses correctly and documenting the grammar being parsed

6 years agoSpecifically gating generic_associated_types feature on associated Type declarations
Sunjay Varma [Sun, 19 Nov 2017 05:00:15 +0000 (00:00 -0500)]
Specifically gating generic_associated_types feature on associated Type declarations

6 years agodemonstrate how we can write "successful parse" tests quite easily
Niko Matsakis [Tue, 14 Nov 2017 17:17:28 +0000 (12:17 -0500)]
demonstrate how we can write "successful parse" tests quite easily

6 years agoAdded stderr files for ui tests
Sunjay Varma [Fri, 10 Nov 2017 04:52:44 +0000 (23:52 -0500)]
Added stderr files for ui tests

6 years agoMore testing for generic associated types parsing
Sunjay Varma [Fri, 10 Nov 2017 03:42:29 +0000 (22:42 -0500)]
More testing for generic associated types parsing

6 years agoFixed tidy errors
Sunjay Varma [Fri, 10 Nov 2017 03:21:53 +0000 (22:21 -0500)]
Fixed tidy errors

6 years agoAdding feature gate
Sunjay Varma [Fri, 10 Nov 2017 02:40:14 +0000 (21:40 -0500)]
Adding feature gate

6 years agoAdded run-pass tests for associated generic types
Sunjay Varma [Thu, 9 Nov 2017 23:15:02 +0000 (18:15 -0500)]
Added run-pass tests for associated generic types

6 years agoParsing generics in both trait items and impl items
Sunjay Varma [Sun, 5 Nov 2017 21:14:22 +0000 (16:14 -0500)]
Parsing generics in both trait items and impl items

6 years agoAuto merge of #45997 - estebank:pub-ident, r=nikomatsakis
bors [Fri, 1 Dec 2017 06:06:06 +0000 (06:06 +0000)]
Auto merge of #45997 - estebank:pub-ident, r=nikomatsakis

Account for missing keyword in fn/struct definition

Fix #38911.

6 years agoAuto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkov
bors [Fri, 1 Dec 2017 03:25:54 +0000 (03:25 +0000)]
Auto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkov

Add nested groups in imports

This PR adds support for nested groups in imports (rust-lang/rfcs#2128, tracking issue #44494).

r? @petrochenkov

6 years agoAuto merge of #46370 - michaelwoerister:rm-metadata-hashing, r=eddyb
bors [Fri, 1 Dec 2017 00:46:08 +0000 (00:46 +0000)]
Auto merge of #46370 - michaelwoerister:rm-metadata-hashing, r=eddyb

incr.comp.: Remove ability to produce incr. comp. hashes during metadata export.

This functionality has been superseded by on-import hashing, which can be less conservative and does not require extra infrastructure.

r? @nikomatsakis

6 years agoFixed spurious cannot borrow immutable item error with a closure.
David Wood [Thu, 30 Nov 2017 23:19:06 +0000 (23:19 +0000)]
Fixed spurious cannot borrow immutable item error with a closure.

6 years agoImmutable unique closure upvars cannot be mutated.
David Wood [Thu, 30 Nov 2017 23:18:38 +0000 (23:18 +0000)]
Immutable unique closure upvars cannot be mutated.

6 years agoAdded test for spurious cannot borrow immutable item error with a closure
David Wood [Thu, 30 Nov 2017 23:16:17 +0000 (23:16 +0000)]
Added test for spurious cannot borrow immutable item error with a closure

6 years agoAdded test for immutable unique closure upvar mutation.
David Wood [Thu, 30 Nov 2017 23:15:10 +0000 (23:15 +0000)]
Added test for immutable unique closure upvar mutation.

6 years agoexplanatory note for the workaround
Mathieu Poumeyrol [Thu, 30 Nov 2017 22:14:29 +0000 (23:14 +0100)]
explanatory note for the workaround

6 years agomove comparator into +find_best_match_name+ function
Julian Kulesh [Thu, 30 Nov 2017 21:39:47 +0000 (00:39 +0300)]
move comparator into +find_best_match_name+ function

6 years agoFix htmldocck naming
Christian Duerr [Thu, 30 Nov 2017 20:43:21 +0000 (21:43 +0100)]
Fix htmldocck naming

After renaming the structs and enums the htmldocck strings still
contained the old names. This lead to test failure.

These htmldocck tests have been updated to use the proper names of the
rust structs and traits.

6 years agoHide trait impl with private trait type parameter
Christian Duerr [Thu, 30 Nov 2017 20:18:36 +0000 (21:18 +0100)]
Hide trait impl with private trait type parameter

Trait's implementations with private type parameters were displayed in
the implementing struct's documentation until now.

With this change any trait implementation that uses a private type
parameter is now hidden in the docs.

6 years agoShow hidden items with rustdoc's document-private
Christian Duerr [Thu, 30 Nov 2017 20:18:00 +0000 (21:18 +0100)]
Show hidden items with rustdoc's document-private

When using `#[doc(hidden)]` elements are hidden from docs even when the
rustdoc flag `--document-private-items` is set.

This behavior has been changed to display all hidden items when the flag
is active.

6 years agoAuto merge of #46402 - oli-obk:clippy, r=kennytm
bors [Thu, 30 Nov 2017 19:18:14 +0000 (19:18 +0000)]
Auto merge of #46402 - oli-obk:clippy, r=kennytm

Reenable clippy

6 years agoNetBSD: add sysctl backend for std::env::current_exe
Jonathan A. Kollasch [Wed, 29 Nov 2017 17:31:09 +0000 (11:31 -0600)]
NetBSD: add sysctl backend for std::env::current_exe

Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.

Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.

6 years agorustc: Filter out bogus extern crate warnings
Alex Crichton [Thu, 30 Nov 2017 15:59:35 +0000 (07:59 -0800)]
rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271

6 years agorustc: Prepare to enable ThinLTO by default
Alex Crichton [Sat, 25 Nov 2017 19:13:58 +0000 (11:13 -0800)]
rustc: Prepare to enable ThinLTO by default

This commit prepares to enable ThinLTO and multiple codegen units in release
mode by default. We've still got a debuginfo bug or two to sort out before
actually turning it on by default.

6 years agoRename long test names to be a bit shorter
Alex Crichton [Wed, 29 Nov 2017 21:47:36 +0000 (13:47 -0800)]
Rename long test names to be a bit shorter

Helps to avoid hitting path limits on Windows

6 years agorustc: Tweak the `isExported` callback for ThinLTO
Alex Crichton [Wed, 29 Nov 2017 20:00:10 +0000 (12:00 -0800)]
rustc: Tweak the `isExported` callback for ThinLTO

Previously we were too eagerly exporting almost all symbols used in ThinLTO
which can cause a whole host of problems downstream! This commit instead fixes
this error by aligning more closely with `lib/LTO/LTO.cpp` in LLVM's codebase
which is to only change the linkage of summaries which are computed as dead.

Closes #46374

6 years agoReenable clippy
Oliver Schneider [Thu, 30 Nov 2017 14:20:40 +0000 (15:20 +0100)]
Reenable clippy

6 years agoincr.comp.: Make traits::VTable encodable and decodable.
Michael Woerister [Thu, 30 Nov 2017 13:34:09 +0000 (14:34 +0100)]
incr.comp.: Make traits::VTable encodable and decodable.

6 years agowasm: Update LLVM to fix a test
Alex Crichton [Wed, 29 Nov 2017 00:07:12 +0000 (16:07 -0800)]
wasm: Update LLVM to fix a test

This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.

Closes #46298

6 years agomake coercions to `!` in unreachable code a hard error
Ariel Ben-Yehuda [Wed, 8 Nov 2017 22:46:15 +0000 (00:46 +0200)]
make coercions to `!` in unreachable code a hard error

This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.

6 years agoMark rustfmt and rls as broken
Pietro Albini [Thu, 30 Nov 2017 12:18:18 +0000 (13:18 +0100)]
Mark rustfmt and rls as broken

6 years agoImplement RFC 2128 (use_nested_groups)
Pietro Albini [Tue, 26 Sep 2017 21:04:00 +0000 (23:04 +0200)]
Implement RFC 2128 (use_nested_groups)

This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.

6 years agoAuto merge of #46299 - michaelwoerister:incr-comp-krimskrams, r=nikomatsakis
bors [Thu, 30 Nov 2017 10:57:21 +0000 (10:57 +0000)]
Auto merge of #46299 - michaelwoerister:incr-comp-krimskrams, r=nikomatsakis

incr.comp.: Some preparatory work for caching more query results.

This PR
* adds and updates some encoding/decoding routines for various query result types so they can be cached later, and
* adds missing `[input]` annotations for a few `DepNode` variants.

The situation around having to explicitly mark dep-nodes/queries as inputs is not really satisfactory. I hope we can find a way of making this more fool-proof in the future.

r? @nikomatsakis

6 years agoUpdate Cargo to Wed Nov 29 15:19:05 2017 +0000
Simon Sapin [Wed, 29 Nov 2017 18:51:16 +0000 (19:51 +0100)]
Update Cargo to Wed Nov 29 15:19:05 2017 +0000

https://github.com/rust-lang/cargo/commit/5bb478a518bcf75537409e8b71f6b7cc4af362df

Pick up `workspace.default-members` support:
https://github.com/rust-lang/cargo/pull/4743

6 years agoAuto merge of #46226 - arielb1:special-region-obligation, r=nikomatsakis
bors [Thu, 30 Nov 2017 08:00:27 +0000 (08:00 +0000)]
Auto merge of #46226 - arielb1:special-region-obligation, r=nikomatsakis

avoid type-live-for-region obligations on dummy nodes

Type-live-for-region obligations on DUMMY_NODE_ID cause an ICE, and it
turns out that in the few cases they are needed, these obligations are not
needed anyway because they are verified elsewhere.

Fixes #46069.

Beta-nominating because this is a regression for our new beta.
r? @nikomatsakis

6 years agoAuto merge of #46041 - zilbuz:issue-44837, r=arielb1
bors [Thu, 30 Nov 2017 05:26:28 +0000 (05:26 +0000)]
Auto merge of #46041 - zilbuz:issue-44837, r=arielb1

MIR borrowck: finalize `check_access_permissions()`

Fix #44837 (hopefully for good)

r? @arielb1

6 years agoUpdate bootstrap compiler
Alex Crichton [Wed, 29 Nov 2017 20:14:03 +0000 (12:14 -0800)]
Update bootstrap compiler

Also remove a number of `stage0` annotations and such

6 years agoAuto merge of #46366 - kennytm:revert-46360, r=kennytm
bors [Thu, 30 Nov 2017 01:28:44 +0000 (01:28 +0000)]
Auto merge of #46366 - kennytm:revert-46360, r=kennytm

Revert #46360, re-enable macOS dist images.

This PR reverts #46360, which disabled all macOS dist images to workaround travis-ci/travis-ci#8821.

This PR should be merged as soon as the Travis bug has been fixed.

Closes #46357.

cc @rust-lang/infra