]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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.

6 years agoAuto merge of #44897 - Havvy:doc-size_of, r=steveklabnik
bors [Sun, 1 Oct 2017 17:32:34 +0000 (17:32 +0000)]
Auto merge of #44897 - Havvy:doc-size_of, r=steveklabnik

Docs for size_of::<#[repr(C)]> items.

Most of this info comes from camlorn's blog post on optimizing struct layout and the Rustonomicon.

I don't really like my wording in the first paragraph.

I also cannot find a definition of what `#[repr(C)]` does for enums that have variants with fields. They're allowed, unlike `#[repr(C)] enum`s with no variants.

6 years agoResolves #36284 - vec.rs documentation
Sean Prashad [Sun, 1 Oct 2017 16:15:05 +0000 (12:15 -0400)]
Resolves #36284 - vec.rs documentation

6 years agohandle nested generics in Generics::type_param/region_param
Ariel Ben-Yehuda [Sun, 1 Oct 2017 15:15:15 +0000 (17:15 +0200)]
handle nested generics in Generics::type_param/region_param

Fixes #44952.

6 years agostray comma
Douglas Campos [Sun, 1 Oct 2017 15:14:47 +0000 (11:14 -0400)]
stray comma

6 years agoFix typo: geneartor -> generator
Thomas Jespersen [Sun, 1 Oct 2017 13:40:00 +0000 (15:40 +0200)]
Fix typo: geneartor -> generator

6 years agoAuto merge of #44945 - petrochenkov:fixtyrec, r=arielb1
bors [Sun, 1 Oct 2017 13:26:15 +0000 (13:26 +0000)]
Auto merge of #44945 - petrochenkov:fixtyrec, r=arielb1

Do not require semantic types for all syntactic types when there are errors

Fixes https://github.com/rust-lang/rust/issues/44814
Fixes https://github.com/rust-lang/rust/issues/44858
Fixes https://github.com/rust-lang/rust/issues/44946
r? @nikomatsakis

6 years agorustdoc: Style of [src] link for trait implementors
Vitaly _Vi Shukela [Sun, 1 Oct 2017 12:54:50 +0000 (15:54 +0300)]
rustdoc: Style of [src] link for trait implementors

A change suggested by @GuillaumeGomez and @QuietMisdreavus.

Also slight reindenting of the appropriate CSS section.

6 years agoAuto merge of #44906 - dkl:main-signature, r=nagisa
bors [Sun, 1 Oct 2017 09:14:53 +0000 (09:14 +0000)]
Auto merge of #44906 - dkl:main-signature, r=nagisa

Fix native main() signature on 64bit

Hello,

in LLVM-IR produced by rustc on x86_64-linux-gnu, the native main() function had incorrect types for the function result and argc parameter: i64, while it should be i32 (really c_int). See also #20064, #29633.

So I've attempted a fix here. I tested it by checking the LLVM IR produced with --target x86_64-unknown-linux-gnu and i686-unknown-linux-gnu. Also I tried running the tests (`./x.py test`), however I'm getting two failures with and without the patch, which I'm guessing is unrelated.

6 years agoAuto merge of #44921 - est31:master, r=alexcrichton
bors [Sun, 1 Oct 2017 01:41:42 +0000 (01:41 +0000)]
Auto merge of #44921 - est31:master, r=alexcrichton

Update the libcompiler_builtins submodule

Pulls in the latest changes from libcompiler_builtins.

It should work, but it would be best if this wouldn't get put into a rollup so that bisecting is possible if there is a regression.

r? @alexcrichton

6 years agotest: Update target specs test for new target-c-int-width field
Daniel Klauer [Sat, 30 Sep 2017 21:45:36 +0000 (23:45 +0200)]
test: Update target specs test for new target-c-int-width field

6 years agoAuto merge of #44944 - dbrgn:trace-macros-docs, r=QuietMisdreavus
bors [Sat, 30 Sep 2017 20:46:57 +0000 (20:46 +0000)]
Auto merge of #44944 - dbrgn:trace-macros-docs, r=QuietMisdreavus

Docs: Add trace_macros! to unstable book

As TIL'd at Rustfest :)

Note: This is unfortunately untested, since I'm on my laptop battery, and compiling LLVM would probably eat at least 50% of it on my dual core CPU. (Is there a way to build docs without compiling LLVM?)

6 years agocode suggestions for unused-mut, while-true lints; UI test
Zack M. Davis [Sat, 30 Sep 2017 06:52:51 +0000 (23:52 -0700)]
code suggestions for unused-mut, while-true lints; UI test

6 years agocode suggestion for unused-parentheses lint
Zack M. Davis [Sat, 30 Sep 2017 06:50:34 +0000 (23:50 -0700)]
code suggestion for unused-parentheses lint

Resolves #42892.

6 years agocode suggestion for deprecated-attribute lint
Zack M. Davis [Sat, 30 Sep 2017 06:44:41 +0000 (23:44 -0700)]
code suggestion for deprecated-attribute lint

Also, fix the deprecation message for the late no-debug feature.

6 years agolet htmldocck.py check for directories
QuietMisdreavus [Mon, 25 Sep 2017 17:50:27 +0000 (12:50 -0500)]
let htmldocck.py check for directories

6 years agoweird formatting
Douglas Campos [Sat, 30 Sep 2017 15:08:08 +0000 (11:08 -0400)]
weird formatting

6 years agoAuto merge of #44783 - alexcrichton:lto-codegen-units, r=michaelwoerister
bors [Sat, 30 Sep 2017 15:01:35 +0000 (15:01 +0000)]
Auto merge of #44783 - alexcrichton:lto-codegen-units, r=michaelwoerister

rustc: Enable LTO and multiple codegen units

This commit is a refactoring of the LTO backend in Rust to support compilations
with multiple codegen units. The immediate result of this PR is to remove the
artificial error emitted by rustc about `-C lto -C codegen-units-8`, but longer
term this is intended to lay the groundwork for LTO with incremental compilation
and ultimately be the underpinning of ThinLTO support.

The problem here that needed solving is that when rustc is producing multiple
codegen units in one compilation LTO needs to merge them all together.
Previously only upstream dependencies were merged and it was inherently relied
on that there was only one local codegen unit. Supporting this involved
refactoring the optimization backend architecture for rustc, namely splitting
the `optimize_and_codegen` function into `optimize` and `codegen`. After an LLVM
module has been optimized it may be blocked and queued up for LTO, and only
after LTO are modules code generated.

Non-LTO compilations should look the same as they do today backend-wise, we'll
spin up a thread for each codegen unit and optimize/codegen in that thread. LTO
compilations will, however, send the LLVM module back to the coordinator thread
once optimizations have finished. When all LLVM modules have finished optimizing
the coordinator will invoke the LTO backend, producing a further list of LLVM
modules. Currently this is always a list of one LLVM module. The coordinator
then spawns further work to run LTO and code generation passes over each module.

In the course of this refactoring a number of other pieces were refactored:

* Management of the bytecode encoding in rlibs was centralized into one module
  instead of being scattered across LTO and linking.
* Some internal refactorings on the link stage of the compiler was done to work
  directly from `CompiledModule` structures instead of lists of paths.
* The trans time-graph output was tweaked a little to include a name on each
  bar and inflate the size of the bars a little

6 years agoDo not require semantic types for all syntactic types when there are type errors
petrochenkov [Sat, 30 Sep 2017 13:42:22 +0000 (16:42 +0300)]
Do not require semantic types for all syntactic types when there are type errors

6 years agorustc: Use 16bit c_int for msp430
Daniel Klauer [Sat, 30 Sep 2017 11:48:12 +0000 (13:48 +0200)]
rustc: Use 16bit c_int for msp430

Fix regression from c2fe69b9, where main() signature was changed from
using 16bit isize to 32bit c_int for argc parameter/result.

6 years agoCast inner type in OsStr::bytes
Nikolai Vazquez [Sat, 30 Sep 2017 14:01:41 +0000 (10:01 -0400)]
Cast inner type in OsStr::bytes

The innermost type is not [u8] on all platforms but is assumed to have
the same memory layout as [u8] since this conversion was done via
mem::transmute before.

6 years agorustc: Specify c_int width for each target
Daniel Klauer [Sat, 30 Sep 2017 11:47:49 +0000 (13:47 +0200)]
rustc: Specify c_int width for each target

(all i32 for now, as in liblibc)