]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agofmt: remove misleading comment fragment
Tamir Duberstein [Sat, 7 Oct 2017 09:48:58 +0000 (05:48 -0400)]
fmt: remove misleading comment fragment

6 years agofmt: DRY
Tamir Duberstein [Sat, 7 Oct 2017 09:31:21 +0000 (05:31 -0400)]
fmt: DRY

6 years agofmt: remove unnecessary lint suppression
Tamir Duberstein [Sat, 7 Oct 2017 09:32:31 +0000 (05:32 -0400)]
fmt: remove unnecessary lint suppression

6 years agoAuto merge of #44515 - tamird:clean-shims, r=alexcrichton
bors [Sat, 7 Oct 2017 05:32:49 +0000 (05:32 +0000)]
Auto merge of #44515 - tamird:clean-shims, r=alexcrichton

{compiler-builtins,libc} shim cleanup

~~Depends on https://github.com/rust-lang/libc/pull/764; opening early for feedback.~~ r? @alexcrichton

6 years agoTrim and document compiler-builtins shim
Tamir Duberstein [Tue, 12 Sep 2017 00:15:10 +0000 (20:15 -0400)]
Trim and document compiler-builtins shim

6 years agoAuto merge of #44614 - tschottdorf:pat_adjustments, r=nikomatsakis
bors [Sat, 7 Oct 2017 00:28:42 +0000 (00:28 +0000)]
Auto merge of #44614 - tschottdorf:pat_adjustments, r=nikomatsakis

implement pattern-binding-modes RFC

See the [RFC] and [tracking issue].

[tracking issue]: #42640
[RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md

6 years agoimplement pattern-binding-modes RFC
Tobias Schottdorf [Fri, 6 Oct 2017 20:30:23 +0000 (16:30 -0400)]
implement pattern-binding-modes RFC

See the [RFC] and [tracking issue].

[tracking issue]: https://github.com/rust-lang/rust/issues/42640
[RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md

6 years agoAuto merge of #43604 - abonander:proc_macro_span_api, r=jseyfried
bors [Fri, 6 Oct 2017 18:52:30 +0000 (18:52 +0000)]
Auto merge of #43604 - abonander:proc_macro_span_api, r=jseyfried

Improvements to `proc_macro::Span` API

Motivation: https://internals.rust-lang.org/t/better-panic-location-reporting-for-unwrap-and-friends/5042/12?u=logician

TODO:
- [x] Bikeshedding/complete API
- [x] Implement tests/verify return values

cc @jseyfried @nrc

6 years agoAuto merge of #45065 - arielb1:not-correct, r=nikomatsakis
bors [Fri, 6 Oct 2017 15:30:32 +0000 (15:30 +0000)]
Auto merge of #45065 - arielb1:not-correct, r=nikomatsakis

fix logic error in #44269's `prune_cache_value_obligations`

We want to retain obligations that *contain* inference variables, not
obligations that *don't contain* them, in order to fix #43132. Because
of surrounding changes to inference, the ICE doesn't occur in its
original case, but I believe it could still be made to occur on master.

Maybe I should try to write a new test case? Certainly not right now
(I'm mainly trying to get us a beta that we can ship) but maybe before
we land this PR on nightly?

This seems to cause a 10% performance regression in my imprecise
attempt to benchmark item-body checking for #43613, but it's better to
be slow and right than fast and wrong. If we want to recover that, I
think we can change the constrained-type-parameter code to actually
give a list of projections that are important for resolving inference
variables and filter everything else out.

6 years agofix logic error in #44269's `prune_cache_value_obligations`
Ariel Ben-Yehuda [Fri, 6 Oct 2017 14:12:24 +0000 (17:12 +0300)]
fix logic error in #44269's `prune_cache_value_obligations`

We want to retain obligations that *contain* inference variables, not
obligations that *don't contain* them, in order to fix #43132. Because
of surrounding changes to inference, the ICE doesn't occur in its
original case, but I believe it could still be made to occur on master.

Maybe I should try to write a new test case? Certainly not right now
(I'm mainly trying to get us a beta that we can ship) but maybe before
we land this PR on nightly?

This seems to cause a 10% performance regression in my imprecise
attempt to benchmark item-body checking for #43613, but it's better to
be slow and right than fast and wrong. If we want to recover that, I
think we can change the constrained-type-parameter code to actually
give a list of projections that are important for resolving inference
variables and filter everything else out.

6 years agoAuto merge of #44734 - mchlrhw:wip/hashmap-entry-and-then, r=BurntSushi
bors [Fri, 6 Oct 2017 12:51:11 +0000 (12:51 +0000)]
Auto merge of #44734 - mchlrhw:wip/hashmap-entry-and-then, r=BurntSushi

Implement `and_modify` on `Entry`

## Motivation

`Entry`s are useful for allowing access to existing values in a map while also allowing default values to be inserted for absent keys. The existing API is similar to that of `Option`, where `or` and `or_with` can be used if the option variant is `None`.

The `Entry` API is, however, missing an equivalent of `Option`'s `and_then` method. If it were present it would be possible to modify an existing entry before calling `or_insert` without resorting to matching on the entry variant.

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

6 years agoAuto merge of #44965 - oconnor663:res_init_glibc, r=dtolnay
bors [Fri, 6 Oct 2017 10:20:14 +0000 (10:20 +0000)]
Auto merge of #44965 - oconnor663:res_init_glibc, r=dtolnay

replace libc::res_init with res_init_if_glibc_before_2_26

The previous workaround for gibc's res_init bug is not thread-safe on
other implementations of libc, and it can cause crashes. Use a runtime
check to make sure we only call res_init when we need to, which is also
when it's safe. See https://github.com/rust-lang/rust/issues/43592.

~This PR is returning an InvalidData IO error if the glibc version string fails to parse. We could also have treated that case as "not glibc", and gotten rid of the idea that these functions could return an error. (Though I'm not a huge fan of ignoring error returns from `res_init` in any case.) Do other folks agree with these design choices?~

I'm pretty new to hacking on libstd. Is there an easy way to build a toy rust program against my changes to test this, other than doing an entire `sudo make install` on my system? What's the usual workflow?

6 years agoImplement `entry_and_modify`
mchlrhw [Wed, 20 Sep 2017 15:02:10 +0000 (16:02 +0100)]
Implement `entry_and_modify`

6 years agoAuto merge of #44818 - petrochenkov:astymac2, r=jseyfried
bors [Fri, 6 Oct 2017 05:37:43 +0000 (05:37 +0000)]
Auto merge of #44818 - petrochenkov:astymac2, r=jseyfried

Improve resolution of associated types in declarative macros 2.0

Make various identifier comparisons for associated types (and sometimes other associated items) hygienic.
Now declarative macros 2.0 can use `Self::AssocTy`, `TyParam::AssocTy`, `Trait<AssocTy = u8>` where `AssocTy` is an associated type of a trait `Trait` visible from the macro. Also, `Trait` can now be implemented inside the macro and specialization should work properly (fixes https://github.com/rust-lang/rust/pull/40847#issuecomment-310867299).

r? @jseyfried or @eddyb

6 years agoAuto merge of #44951 - vitiral:incr_struct_defs, r=michaelwoerister
bors [Fri, 6 Oct 2017 03:16:13 +0000 (03:16 +0000)]
Auto merge of #44951 - vitiral:incr_struct_defs, r=michaelwoerister

incr compilation struct_defs.rs

I am prematurely openeing this as I need mentoring help from @michaelwoerister (also pinged @nikomatsakis)

First, is this the right approach for these changes?

Second, I'm a bit confused by the results so far.

- Changing `TupleStructFieldType(i32)` -> `...(u32)` changes only Hir and HirBody, not TypeOfItem
- Chaning `TupleStructAddField(i32)` -> `...(i32, u32)` *does* change TypeOfItem

This seems wrong. I feel like it should change TypeOfItem in both cases. Is this a bug in incr compilation or is it expected?

6 years ago`proc_macro::Span` API improvements
Austin Bonander [Wed, 2 Aug 2017 01:05:08 +0000 (18:05 -0700)]
`proc_macro::Span` API improvements

6 years agoAuto merge of #45054 - andjo403:master, r=alexcrichton
bors [Thu, 5 Oct 2017 22:20:23 +0000 (22:20 +0000)]
Auto merge of #45054 - andjo403:master, r=alexcrichton

Faster compile times for release builds with llvm fix

Run global optimizations after the inliner to avoid spending time on optimizing dead code.

fixes #44655

6 years agoreplace libc::res_init with res_init_if_glibc_before_2_26
Jack O'Connor [Sun, 1 Oct 2017 21:42:18 +0000 (17:42 -0400)]
replace libc::res_init with res_init_if_glibc_before_2_26

The previous workaround for gibc's res_init bug is not thread-safe on
other implementations of libc, and it can cause crashes. Use a runtime
check to make sure we only call res_init when we need to, which is also
when it's safe. See https://github.com/rust-lang/rust/issues/43592.

6 years agoImprove resolution of associated types in macros 2.0
Vadim Petrochenkov [Mon, 25 Sep 2017 23:49:34 +0000 (02:49 +0300)]
Improve resolution of associated types in macros 2.0

6 years agoAuto merge of #44943 - nivkner:fixme_fixup, r=dtolnay
bors [Thu, 5 Oct 2017 19:52:00 +0000 (19:52 +0000)]
Auto merge of #44943 - nivkner:fixme_fixup, r=dtolnay

address some FIXME whose associated issues were marked as closed

part of #44366

6 years agoFaster compile times for release builds with llvm fix
Andreas Jonson [Thu, 5 Oct 2017 18:56:23 +0000 (18:56 +0000)]
Faster compile times for release builds with llvm fix

6 years agoAuto merge of #44878 - Nashenas88:master, r=nikomatsakis
bors [Thu, 5 Oct 2017 17:14:12 +0000 (17:14 +0000)]
Auto merge of #44878 - Nashenas88:master, r=nikomatsakis

Store a new Region value every time we create a new region variable

Paired with @spastorino to walk through this and implement #44870.

6 years agoAuto merge of #45046 - kennytm:rollup, r=kennytm
bors [Thu, 5 Oct 2017 13:25:55 +0000 (13:25 +0000)]
Auto merge of #45046 - kennytm:rollup, r=kennytm

Rollup of 9 pull requests

- Successful merges: #44664, #44935, #44972, #44980, #44987, #44997, #45006, #45017, #45024
- Failed merges:

6 years agoRollup merge of #45024 - QuietMisdreavus:doc-masked-issue-num, r=pnkfelix
kennytm [Thu, 5 Oct 2017 12:22:37 +0000 (20:22 +0800)]
Rollup merge of #45024 - QuietMisdreavus:doc-masked-issue-num, r=pnkfelix

add the issue number to doc_masked's feature gate

Whoops, missed this in the original `#[doc(masked)]` PR.

6 years agoRollup merge of #45017 - GuillaumeGomez:mutex-links, r=estebank
kennytm [Thu, 5 Oct 2017 12:22:36 +0000 (20:22 +0800)]
Rollup merge of #45017 - GuillaumeGomez:mutex-links, r=estebank

Add missing urls for Mutex

r? @rust-lang/docs

6 years agoRollup merge of #45006 - MaikKlein:patch-2, r=nikomatsakis
kennytm [Thu, 5 Oct 2017 12:22:36 +0000 (20:22 +0800)]
Rollup merge of #45006 - MaikKlein:patch-2, r=nikomatsakis

Typo in `librustc/README.md`

6 years agoRollup merge of #44997 - SuriyaaKudoIsc:patch-1, r=steveklabnik
kennytm [Thu, 5 Oct 2017 12:22:35 +0000 (20:22 +0800)]
Rollup merge of #44997 - SuriyaaKudoIsc:patch-1, r=steveklabnik

Use HTTPS protocol for "chat.mibbit.com"

I changed the `http://` protocol to `https://` for the `chat.mibbit.com` website. :pencil:

--[**Suriyaa**](https://mozillians.org/de/u/suriyaakudo/) 🦊

(*PS: Is somebody interested to vouch me at https://mozillians.org/de/u/suriyaakudo/?*)

6 years agoRollup merge of #44987 - pnkfelix:mir-borrowck-fix-borrowindexes-ice, r=arielb1
kennytm [Thu, 5 Oct 2017 12:22:34 +0000 (20:22 +0800)]
Rollup merge of #44987 - pnkfelix:mir-borrowck-fix-borrowindexes-ice, r=arielb1

`EndRegion` do not always correspond to borrow-data entries

Remove assertion that the argument to every `EndRegion` correspond to some dataflow-tracked borrow-data entry.

Fix #44828

(The comment thread on the aforementioned issue discusses why its best to just remove this assertion.)

6 years agoRollup merge of #44980 - steveklabnik:update-books, r=estebank
kennytm [Thu, 5 Oct 2017 12:22:33 +0000 (20:22 +0800)]
Rollup merge of #44980 - steveklabnik:update-books, r=estebank

update books for next release

Also fixes some stdlib links to the reference which have changed.

First step in https://forge.rust-lang.org/release-process.html, doing it a few days early 😄

6 years agoRollup merge of #44972 - durka:patch-44, r=arielb1
kennytm [Thu, 5 Oct 2017 12:22:31 +0000 (20:22 +0800)]
Rollup merge of #44972 - durka:patch-44, r=arielb1

fix ItemKind::DefaultImpl doc comment

Upgrade comment to doc comment.

...Is this actually used? If so, why does the `Impl` variant right below have a `Defaultness`?

6 years agoRollup merge of #44935 - vitiral:dependencies, r=steveklabnik
kennytm [Thu, 5 Oct 2017 12:22:30 +0000 (20:22 +0800)]
Rollup merge of #44935 - vitiral:dependencies, r=steveklabnik

Add links to headers in README and CONTRIBUTING

this also adds dependencies to CONTRIBUTING

I'm just getting started building the rust compiler and noticed this information/ability was missing.

It was also missing the gdb dependency for running tests. I pulled the information out of `appveyor.yml` and recommended later than 7.1 because that is what [apt ships](https://packages.ubuntu.com/search?suite=trusty&keywords=gdb). Feel free to tell me something different!

6 years agoRollup merge of #44664 - budziq:contributing_external, r=steveklabnik
kennytm [Thu, 5 Oct 2017 12:22:29 +0000 (20:22 +0800)]
Rollup merge of #44664 - budziq:contributing_external, r=steveklabnik

Corrected the CONTRIBUTING.md "External Dependencies" section

The "External Dependencies" section is a little outdated.
Please see following comments https://github.com/rust-lang/rust/pull/44567#issuecomment-329797331 https://github.com/rust-lang/rust/pull/44567#issuecomment-329799655 for rationale.

6 years agoAuto merge of #45019 - aidanhs:aphs-no-trans-worker-panic, r=alexcrichton
bors [Thu, 5 Oct 2017 10:50:11 +0000 (10:50 +0000)]
Auto merge of #45019 - aidanhs:aphs-no-trans-worker-panic, r=alexcrichton

Don't unwrap work item results as the panic trace is useless

Fixes #43402 now there's no multithreaded panic printouts

Also update a comment

--------

Likely regressed in #43506, where the code was changed to panic in worker threads on error.

Unwrapping gives zero extra information since the stack trace is so short, so we may as well just surface that there was an error and exit the thread properly. Because there are then no multithreaded printouts, I think it should mean the output of the test for #26199 is deterministic and not interleaved (thanks to @philipc https://github.com/rust-lang/rust/issues/43402#issuecomment-333835271 for a hint).

Sadly the output is now:
```
thread '<unnamed>' panicked at 'aborting due to worker thread panic', src/librustc_trans/back/write.rs:1643:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: could not write output to : No such file or directory

error: aborting due to previous error
```
but it's an improvement over the multi-panic situation before.

r? @alexcrichton

6 years agoAuto merge of #44940 - philipc:remap-path, r=michaelwoerister
bors [Thu, 5 Oct 2017 05:16:41 +0000 (05:16 +0000)]
Auto merge of #44940 - philipc:remap-path, r=michaelwoerister

Don't use remapped path when loading modules and include files

Fixes bug reported in https://github.com/rust-lang/rust/issues/41555#issuecomment-327866056.

cc @michaelwoerister

6 years agoAuto merge of #44481 - Aaronepower:master, r=alexcrichton
bors [Thu, 5 Oct 2017 02:53:43 +0000 (02:53 +0000)]
Auto merge of #44481 - Aaronepower:master, r=alexcrichton

Updated RELEASES.md for 1.21.0

[Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)

6 years agoGenerate ScopeId using newtype_index macro
Santiago Pastorino [Thu, 28 Sep 2017 20:08:28 +0000 (17:08 -0300)]
Generate ScopeId using newtype_index macro

6 years agoGenerate SerializedDepNodeIndex using newtype_index macro
Santiago Pastorino [Thu, 28 Sep 2017 19:11:06 +0000 (16:11 -0300)]
Generate SerializedDepNodeIndex using newtype_index macro

6 years agoGenerate DepNodeIndexNew using newtype_index macro
Santiago Pastorino [Thu, 28 Sep 2017 18:56:28 +0000 (15:56 -0300)]
Generate DepNodeIndexNew using newtype_index macro

6 years agoMake newtype_index get debug_name using reflection
Santiago Pastorino [Tue, 3 Oct 2017 17:19:56 +0000 (14:19 -0300)]
Make newtype_index get debug_name using reflection

6 years agoMake newtype_index macro use full path to resolve constants
Santiago Pastorino [Thu, 28 Sep 2017 15:30:13 +0000 (12:30 -0300)]
Make newtype_index macro use full path to resolve constants

6 years agoGenerate Idx in nll using newtype_index!
Santiago Pastorino [Thu, 28 Sep 2017 01:18:38 +0000 (22:18 -0300)]
Generate Idx in nll using newtype_index!

6 years agoMove newtype_index to rustc_data_structures
Santiago Pastorino [Wed, 27 Sep 2017 22:47:41 +0000 (19:47 -0300)]
Move newtype_index to rustc_data_structures

6 years agoConvert regions to IndexVec
Santiago Pastorino [Wed, 27 Sep 2017 17:29:11 +0000 (14:29 -0300)]
Convert regions to IndexVec

6 years agoStore a new Region value every time we create a new region variable
Paul Faria [Wed, 27 Sep 2017 02:24:19 +0000 (22:24 -0400)]
Store a new Region value every time we create a new region variable

6 years agoAuto merge of #44901 - michaelwoerister:on-demand-eval, r=nikomatsakis
bors [Wed, 4 Oct 2017 19:14:41 +0000 (19:14 +0000)]
Auto merge of #44901 - michaelwoerister:on-demand-eval, r=nikomatsakis

incr.comp.: Switch to red/green change tracking, remove legacy system.

This PR finally switches incremental compilation to [red/green tracking](https://github.com/rust-lang/rust/issues/42293) and completely removes the legacy dependency graph implementation -- which includes a few quite costly passes that are simply not needed with the new system anymore.

There's still some documentation to be done and there's certainly still lots of optimizing and tuning ahead -- but the foundation for red/green is in place with this PR. This has been in the making for a long time `:)`

r? @nikomatsakis
cc @alexcrichton, @rust-lang/compiler

6 years agoavoid using match keyword as module name
Niv Kaminer [Wed, 4 Oct 2017 16:17:25 +0000 (16:17 +0000)]
avoid using match keyword as module name

6 years agoadd the issue number to doc_masked's feature gate
QuietMisdreavus [Wed, 4 Oct 2017 15:47:45 +0000 (10:47 -0500)]
add the issue number to doc_masked's feature gate

6 years agoAuto merge of #44890 - nvzqz:str-box-transmute, r=alexcrichton
bors [Wed, 4 Oct 2017 15:14:15 +0000 (15:14 +0000)]
Auto merge of #44890 - nvzqz:str-box-transmute, r=alexcrichton

Remove mem::transmute used in Box<str> conversions

Given that https://github.com/rust-lang/rust/pull/44877 is failing, I decided to make a separate PR. This is done with the same motivation: to avoid `mem::transmute`-ing non `#[repr(C)]` types.

6 years agoseperate and move miscellaneous benchmarks to librustc
Niv Kaminer [Wed, 4 Oct 2017 12:21:15 +0000 (12:21 +0000)]
seperate and move miscellaneous benchmarks to librustc

6 years agoAdd missing urls for Mutex
Guillaume Gomez [Wed, 4 Oct 2017 12:03:23 +0000 (14:03 +0200)]
Add missing urls for Mutex

6 years agoDon't unwrap work item results as the panic trace is useless
Aidan Hobson Sayers [Wed, 4 Oct 2017 11:45:14 +0000 (12:45 +0100)]
Don't unwrap work item results as the panic trace is useless

Fixes #43402 now there's no multithreaded panic printouts

Also update a comment

6 years agoAuto merge of #44882 - mikhail-m1:master, r=pnkfelix
bors [Wed, 4 Oct 2017 11:26:12 +0000 (11:26 +0000)]
Auto merge of #44882 - mikhail-m1:master, r=pnkfelix

add notes to report_conflicting_borrow MIR borrowck

part of #44596

6 years agoincr.comp.: Address review comments.
Michael Woerister [Wed, 4 Oct 2017 10:35:56 +0000 (12:35 +0200)]
incr.comp.: Address review comments.

6 years agoadd notes to report_conflicting_borrow MIR borrowck
Mikhail Modin [Wed, 27 Sep 2017 07:01:42 +0000 (10:01 +0300)]
add notes to report_conflicting_borrow MIR borrowck

6 years agoAuto merge of #44905 - Pirh:process_abort_docs, r=steveklabnik
bors [Wed, 4 Oct 2017 05:43:00 +0000 (05:43 +0000)]
Auto merge of #44905 - Pirh:process_abort_docs, r=steveklabnik

Update docs for process::abort

Remove a typo and explain the relationship to `panic!`.

Part of #29370

r? @steveklabnik

6 years agoAuto merge of #44999 - pnkfelix:mir-borrowck-fix-assert-left-right, r=nikomatsakis
bors [Wed, 4 Oct 2017 03:28:24 +0000 (03:28 +0000)]
Auto merge of #44999 - pnkfelix:mir-borrowck-fix-assert-left-right, r=nikomatsakis

Overlapping borrows can point to different lvalues.

Overlapping borrows can point to different lvalues.

There's always a basis for the overlap, so instead of removing the assert entirely, I instead pass in the prefix that we found and check that it actually is a prefix of both lvalues.

Fix #44829

6 years agoAuto merge of #44979 - hinaria:master, r=dtolnay
bors [Wed, 4 Oct 2017 00:57:30 +0000 (00:57 +0000)]
Auto merge of #44979 - hinaria:master, r=dtolnay

make `backtrace = false` compile for windows targets.

when building for windows with `backtrace = false`, `libstd` fails to compile because some modules that use items from `sys_common::backtrace::*` are still included, even though those modules aren't used or referenced by anything.

`sys_common::backtrace` doesn't exist when the backtrace feature is turned off.

--

i've also added `#[cfg(feature = "backtrace")]` to various items that exist exclusively to support `mod backtrace` since the compilation would fail since they would be unused in a configuration with backtraces turned off.

6 years agoAuto merge of #44895 - stephaneyfx:master, r=dtolnay
bors [Tue, 3 Oct 2017 22:19:40 +0000 (22:19 +0000)]
Auto merge of #44895 - stephaneyfx:master, r=dtolnay

Made `fs::copy` return the length of the main stream

On Windows with the NTFS filesystem, `fs::copy` would return the sum of the
lengths of all streams, which can be different from the length reported by
`metadata` and thus confusing for users unaware of this NTFS peculiarity.

This makes `fs::copy` return the same length `metadata` reports which is the
value it used to return before PR #26751. Note that alternate streams are still
copied; their length is just not included in the returned value.

This change relies on the assumption that the stream with index 1 is always the
main stream in the `CopyFileEx` callback. I could not find any official
document confirming this but empirical testing has shown this to be true,
regardless of whether the alternate stream is created before or after the main
stream.

Resolves #44532

6 years agoAuto merge of #44949 - QuietMisdreavus:rustdoctest-dirs, r=nikomatsakis
bors [Tue, 3 Oct 2017 19:38:33 +0000 (19:38 +0000)]
Auto merge of #44949 - QuietMisdreavus:rustdoctest-dirs, r=nikomatsakis

let htmldocck.py check for directories

Since i messed this up during https://github.com/rust-lang/rust/pull/44613, i wanted to codify this into the rustdoc tests to make sure that doesn't happen again.

6 years agorelated to #44924: update incr compilation for struct_defs.rs
Garrett Berg [Sat, 30 Sep 2017 22:26:12 +0000 (16:26 -0600)]
related to #44924: update incr compilation for struct_defs.rs

6 years agoTypo in `librustc/README.md`
Maik Klein [Tue, 3 Oct 2017 16:57:52 +0000 (18:57 +0200)]
Typo in `librustc/README.md`

6 years agoAuto merge of #44922 - zilbuz:issue-44596/E0594, r=pnkfelix
bors [Tue, 3 Oct 2017 16:42:26 +0000 (16:42 +0000)]
Auto merge of #44922 - zilbuz:issue-44596/E0594, r=pnkfelix

MIR borrowck: move span_label to `borrowck_errors.rs`

The calls to `span_label` are moved and factorized for:
* E0503 (`cannot_use_when_mutably_borrowed()`)
* E0506 (`cannot_assign_to_borrowed()`)

Additionnally, the error E0594 (`cannot_assign_static()`) has been factorized between `check_loan.rs` and `borrowc_check.rs`.

Part of #44596

6 years agoAuto merge of #44896 - qmx:move-resolve-to-librustc, r=arielb1
bors [Tue, 3 Oct 2017 12:18:13 +0000 (12:18 +0000)]
Auto merge of #44896 - qmx:move-resolve-to-librustc, r=arielb1

Move monomorphize::resolve() to librustc

this moves `monomorphize::resolve(..)` to librustc, and re-enables inlining for some trait methods, fixing #44389

@nikomatsakis I've kept the calls to the new `ty::Instance::resolve(....)` always `.unwrap()`-ing for the moment, how/do you want to add more debugging info via `.unwrap_or()` or something like this?

we still have some related `resolve_*` functions on monomorphize, but I wasn't sure moving them was into the scope for this PR too.

@eddyb mind to take a look too?

6 years agoOverlapping borrows can point to different lvalues.
Felix S. Klock II [Tue, 3 Oct 2017 12:00:38 +0000 (14:00 +0200)]
Overlapping borrows can point to different lvalues.

There's always a basis for the overlap, so instead of removing the
assert entirely, I instead pass in the prefix that we found and check
that it actually is a prefix of both lvalues.

Fix #44829

6 years agoincr.comp.: Fix some merge fallout.
Michael Woerister [Fri, 29 Sep 2017 09:13:18 +0000 (11:13 +0200)]
incr.comp.: Fix some merge fallout.

6 years agoAdd fixme regarding remapping paths for doctests
Philip Craig [Tue, 3 Oct 2017 10:35:55 +0000 (20:35 +1000)]
Add fixme regarding remapping paths for doctests

6 years agoUse HTTPS protocol for `chat.mibbit.com`
Suriyaa ✌️️ [Tue, 3 Oct 2017 10:36:16 +0000 (12:36 +0200)]
Use HTTPS protocol for `chat.mibbit.com`

6 years agoRename FileMap::path and change to an Option
Philip Craig [Tue, 3 Oct 2017 09:44:58 +0000 (19:44 +1000)]
Rename FileMap::path and change to an Option

6 years agoAuto merge of #44920 - vi:rustdoc_implementors_src_link, r=GuillaumeGomez
bors [Tue, 3 Oct 2017 08:04:33 +0000 (08:04 +0000)]
Auto merge of #44920 - vi:rustdoc_implementors_src_link, r=GuillaumeGomez

 rustdoc: Render [src] links for trait implementors

Should close #43893.

<s>No tests [yet].</s>

r? @QuietMisdreavus

6 years agoAuto merge of #44966 - zackmdavis:no_mangle_no_snake, r=aturon
bors [Tue, 3 Oct 2017 02:26:27 +0000 (02:26 +0000)]
Auto merge of #44966 - zackmdavis:no_mangle_no_snake, r=aturon

make non_snake_case lint allow extern no-mangle functions

Resolves #31924.

r? @sfackler

6 years agoAuto merge of #44977 - steveklabnik:update-mdbook, r=alexcrichton
bors [Mon, 2 Oct 2017 22:39:51 +0000 (22:39 +0000)]
Auto merge of #44977 - steveklabnik:update-mdbook, r=alexcrichton

update mdbook

Fixes #44704

6 years agoRemove assertion that the argument to every `EndRegion` correspond to
Felix S. Klock II [Mon, 2 Oct 2017 20:40:51 +0000 (22:40 +0200)]
Remove assertion that the argument to every `EndRegion` correspond to
some dataflow-tracked borrow-data entry.

Fix #44828

(The comment thread on the aforementioned issue discusses why its best
to just remove this assertion.)

6 years agoDocument that process::abort will not call the panic hook
Pirh [Mon, 2 Oct 2017 18:59:50 +0000 (19:59 +0100)]
Document that process::abort will not call the panic hook

6 years agoAuto merge of #44885 - lu-zero:master, r=alexcrichton
bors [Mon, 2 Oct 2017 17:18:20 +0000 (17:18 +0000)]
Auto merge of #44885 - lu-zero:master, r=alexcrichton

More Altivec Intrinsics

Float-specific intrinsics

6 years agoupdate books for next release
steveklabnik [Mon, 2 Oct 2017 14:21:54 +0000 (10:21 -0400)]
update books for next release

Also fixes some stdlib links to the reference which have changed.

6 years agowindows: make `backtrace = false` compile
hinaria [Mon, 2 Oct 2017 15:48:17 +0000 (02:48 +1100)]
windows: make `backtrace = false` compile

6 years agoupdate mdbook
steveklabnik [Mon, 2 Oct 2017 14:16:32 +0000 (10:16 -0400)]
update mdbook

Fixes #44704

6 years agoincr.comp.: Do some cleanup.
Michael Woerister [Thu, 28 Sep 2017 15:07:22 +0000 (17:07 +0200)]
incr.comp.: Do some cleanup.

6 years agoincr.comp.: Remove legacy dep-graph runtime.
Michael Woerister [Thu, 28 Sep 2017 14:19:10 +0000 (16:19 +0200)]
incr.comp.: Remove legacy dep-graph runtime.

6 years agorustdoc: Remove cruft from the test
Vitaly _Vi Shukela [Mon, 2 Oct 2017 13:54:35 +0000 (16:54 +0300)]
rustdoc: Remove cruft from the test

per @GuillaumeGomez's sample, but with one change.

6 years agoincr.comp.: Remove saving and loading of legacy dep-graph.
Michael Woerister [Thu, 28 Sep 2017 13:26:11 +0000 (15:26 +0200)]
incr.comp.: Remove saving and loading of legacy dep-graph.

6 years agoincr.comp.: Build DepGraphQuery from new dep-graph impl.
Michael Woerister [Thu, 28 Sep 2017 11:26:15 +0000 (13:26 +0200)]
incr.comp.: Build DepGraphQuery from new dep-graph impl.

6 years agoincr.comp.: Use red/green tracking for CGU re-use.
Michael Woerister [Thu, 28 Sep 2017 09:58:45 +0000 (11:58 +0200)]
incr.comp.: Use red/green tracking for CGU re-use.

6 years agoincr.comp.: Add some logging to DepGraph::try_mark_green().
Michael Woerister [Wed, 27 Sep 2017 16:42:31 +0000 (18:42 +0200)]
incr.comp.: Add some logging to DepGraph::try_mark_green().

6 years agoincr.comp.: Make some DepNodes non-anonymous.
Michael Woerister [Wed, 27 Sep 2017 16:30:26 +0000 (18:30 +0200)]
incr.comp.: Make some DepNodes non-anonymous.

6 years agoincr.comp.: Re-execute queries during red/green marking in order to find out their...
Michael Woerister [Tue, 26 Sep 2017 17:43:17 +0000 (19:43 +0200)]
incr.comp.: Re-execute queries during red/green marking in order to find out their color.

6 years agoincr.comp.: Add minimal version of try_mark_green procedure.
Michael Woerister [Mon, 25 Sep 2017 11:51:49 +0000 (13:51 +0200)]
incr.comp.: Add minimal version of try_mark_green procedure.

6 years agoincr.comp.: Determine red/green state of every new node.
Michael Woerister [Mon, 25 Sep 2017 10:25:41 +0000 (12:25 +0200)]
incr.comp.: Determine red/green state of every new node.

6 years agofix comment on DefaultImpl
Alex Burka [Mon, 2 Oct 2017 11:30:09 +0000 (07:30 -0400)]
fix comment on DefaultImpl

6 years agoAuto merge of #44959 - arielb1:generic-errors, r=eddyb
bors [Mon, 2 Oct 2017 10:06:32 +0000 (10:06 +0000)]
Auto merge of #44959 - arielb1:generic-errors, r=eddyb

handle nested generics in Generics::type_param/region_param

Fixes #44952.

r? @eddyb

6 years agofix ItemKind::DefaultImpl doc comment
Alex Burka [Mon, 2 Oct 2017 09:59:56 +0000 (05:59 -0400)]
fix ItemKind::DefaultImpl doc comment

Upgrade comment to doc comment.

6 years agofix handling of `Self`
Ariel Ben-Yehuda [Mon, 2 Oct 2017 08:43:36 +0000 (10:43 +0200)]
fix handling of `Self`

6 years agoAuto merge of #44942 - zackmdavis:lint_suggestions, r=estebank
bors [Mon, 2 Oct 2017 07:03:26 +0000 (07:03 +0000)]
Auto merge of #44942 - zackmdavis:lint_suggestions, r=estebank

code suggestions for unused-mut, while-true, deprecated-attribute, and unused-parens lints

![lint_suggestions](https://user-images.githubusercontent.com/1076988/31044068-b2074de8-a57c-11e7-9319-6668508b6d1f.png)

r? @estebank

6 years agocorrect unused-parens lint suggestion to strip exact pair
Zack M. Davis [Sat, 30 Sep 2017 07:53:26 +0000 (00:53 -0700)]
correct unused-parens lint suggestion to strip exact pair

6 years agoAuto merge of #44960 - SeanPrashad:master, r=steveklabnik
bors [Mon, 2 Oct 2017 02:17:14 +0000 (02:17 +0000)]
Auto merge of #44960 - SeanPrashad:master, r=steveklabnik

Resolves #36284 - vec.rs documentation

Removed comments associated with `[into_vec]` being equivalent to `[shrink_to_fit]` as requested.

6 years agomake non_snake_case lint allow extern no-mangle functions
Zack M. Davis [Sun, 1 Oct 2017 23:44:33 +0000 (16:44 -0700)]
make non_snake_case lint allow extern no-mangle functions

Resolves #31924.

6 years agoCorrected the CONTRIBUTING.md "External Dependencies" section
Michal Budzynski [Sun, 17 Sep 2017 23:24:29 +0000 (01:24 +0200)]
Corrected the CONTRIBUTING.md "External Dependencies" section

6 years agoAuto merge of #44955 - laumann:small-typo-fix, r=steveklabnik
bors [Sun, 1 Oct 2017 22:16:04 +0000 (22:16 +0000)]
Auto merge of #44955 - laumann:small-typo-fix, r=steveklabnik

Fix typo: geneartor -> generator

6 years agofix handling of Self
Ariel Ben-Yehuda [Sun, 1 Oct 2017 21:03:48 +0000 (23:03 +0200)]
fix handling of Self

6 years agoAuto merge of #44919 - diwic:79-pretty-mir, r=arielb1
bors [Sun, 1 Oct 2017 19:57:01 +0000 (19:57 +0000)]
Auto merge of #44919 - diwic:79-pretty-mir, r=arielb1

Mir pretty print: Add cleanup comment

I found it useful to add a comment indicating whether or not a
BasicBlock is a cleanup block or not. Hopefully you'll find it
useful too.