]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agodebuginfo: Remove some outdated stuff from LLVM DIBuilder binding.
Michael Woerister [Fri, 14 Oct 2016 18:53:17 +0000 (14:53 -0400)]
debuginfo: Remove some outdated stuff from LLVM DIBuilder binding.

7 years agoAuto merge of #37118 - alexcrichton:rollup, r=alexcrichton
bors [Wed, 12 Oct 2016 21:42:12 +0000 (14:42 -0700)]
Auto merge of #37118 - alexcrichton:rollup, r=alexcrichton

Rollup of 17 pull requests

- Successful merges: #36762, #36831, #36973, #36991, #36995, #37023, #37049, #37050, #37056, #37064, #37066, #37067, #37084, #37089, #37091, #37092, #37110
- Failed merges:

7 years agoRollup merge of #37110 - TimNN:fix-37109, r=eddyb
Alex Crichton [Wed, 12 Oct 2016 17:15:29 +0000 (10:15 -0700)]
Rollup merge of #37110 - TimNN:fix-37109, r=eddyb

normalize tuple pair types in trans

Fixes #37109.

Note that #37109 is a regression from stable to stable, beta and nightly.

7 years agoRollup merge of #37092 - alexcrichton:update-libc, r=japaric
Alex Crichton [Wed, 12 Oct 2016 17:15:29 +0000 (10:15 -0700)]
Rollup merge of #37092 - alexcrichton:update-libc, r=japaric

std: Update liblibc submodule

This fixes compilation on the s390x target

7 years agoRollup merge of #37091 - alexcrichton:configure, r=brson
Alex Crichton [Wed, 12 Oct 2016 17:15:28 +0000 (10:15 -0700)]
Rollup merge of #37091 - alexcrichton:configure, r=brson

configure: Fix gcc detection for LLVM

We have a case where 32-bit compilation accidentally requested clang when gcc
was the only one available.

7 years agoRollup merge of #37089 - GuillaumeGomez:io_urls, r=frewsxcv
Alex Crichton [Wed, 12 Oct 2016 17:15:28 +0000 (10:15 -0700)]
Rollup merge of #37089 - GuillaumeGomez:io_urls, r=frewsxcv

Add missing urls in io module

r? @steveklabnik

7 years agoRollup merge of #37084 - jseyfried:cleanup_expanded_macro_use_scopes, r=nrc
Alex Crichton [Wed, 12 Oct 2016 17:15:28 +0000 (10:15 -0700)]
Rollup merge of #37084 - jseyfried:cleanup_expanded_macro_use_scopes, r=nrc

macros: clean up scopes of expanded `#[macro_use]` imports

This PR changes the scope of macro-expanded `#[macro_use]` imports to match that of unexpanded `#[macro_use]` imports. For example, this would be allowed:
```rust
example!();
macro_rules! m { () => { #[macro_use(example)] extern crate example_crate; } }
m!();
```

This PR also enforces the full shadowing restrictions from RFC 1560 on `#[macro_use]` imports (currently, we only enforce the weakened restrictions from #36767).

This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice.
r? @nrc

7 years agoRollup merge of #37067 - jseyfried:expand_derives_last, r=alexcrichton
Alex Crichton [Wed, 12 Oct 2016 17:15:28 +0000 (10:15 -0700)]
Rollup merge of #37067 - jseyfried:expand_derives_last, r=alexcrichton

macros: expand `#[derive]`s after other attribute macros and improve intra-`#[derive]` ordering

Fixes https://github.com/serde-rs/serde/issues/577.
cc #35900
r? @alexcrichton

7 years agoRollup merge of #37066 - nrc:stderr, r=alexcrichton
Alex Crichton [Wed, 12 Oct 2016 17:15:28 +0000 (10:15 -0700)]
Rollup merge of #37066 - nrc:stderr, r=alexcrichton

Error monitor should emit error to stderr instead of stdout

We are pretty consistent about emitting to stderr, except for when there is actually an error, in which case we emit to stdout. This seems a bit backwards. This PR just changes that exception to emit to stderr. This is useful for the RLS since the LS protocol uses stdout (grrr).

r? @alexcrichton

7 years agoRollup merge of #37064 - nnethercote:read_str, r=eddyb
Alex Crichton [Wed, 12 Oct 2016 17:15:27 +0000 (10:15 -0700)]
Rollup merge of #37064 - nnethercote:read_str, r=eddyb

Avoid allocations in `Decoder::read_str`.

`opaque::Decoder::read_str` is very hot within `rustc` due to its use in
the reading of crate metadata, and it currently returns a `String`. This
commit changes it to instead return a `Cow<str>`, which avoids a heap
allocation.

This change reduces the number of calls to `malloc` by almost 10% in
some benchmarks.

This is a [breaking-change] to libserialize.

7 years agoRollup merge of #37056 - Mark-Simulacrum:fix-bool-comparison, r=bluss
Alex Crichton [Wed, 12 Oct 2016 17:15:27 +0000 (10:15 -0700)]
Rollup merge of #37056 - Mark-Simulacrum:fix-bool-comparison, r=bluss

Add comparison operators to boolean const eval.

I think it might be worth adding tests here, but since I don't know how or where to do that, I have not done so yet. Willing to do so if asked and given an explanation as to how.

Fixes #37047.

7 years agoRollup merge of #37050 - frewsxcv:librustdoc, r=alexcrichton
Alex Crichton [Wed, 12 Oct 2016 17:15:27 +0000 (10:15 -0700)]
Rollup merge of #37050 - frewsxcv:librustdoc, r=alexcrichton

librustdoc refactoring and cleanup.

7 years agoRollup merge of #37049 - srinivasreddy:librustc_lint, r=nrc
Alex Crichton [Wed, 12 Oct 2016 17:15:27 +0000 (10:15 -0700)]
Rollup merge of #37049 - srinivasreddy:librustc_lint, r=nrc

run rustfmt on librustc_lint folder

7 years agoRollup merge of #37023 - jseyfried:fix_extern_crate_back_compat, r=nrc
Alex Crichton [Wed, 12 Oct 2016 17:15:26 +0000 (10:15 -0700)]
Rollup merge of #37023 - jseyfried:fix_extern_crate_back_compat, r=nrc

Fix importing inaccessible `extern crate`s (with a warning)

Fixes #36747, fixes #37020, and fixes #37021.
r? @nrc

7 years agoRollup merge of #36995 - nrc:stable, r=@nikomatsakis
Alex Crichton [Wed, 12 Oct 2016 17:15:26 +0000 (10:15 -0700)]
Rollup merge of #36995 - nrc:stable, r=@nikomatsakis

stabilise ?, attributes on stmts, deprecate Reflect

r? @nikomatsakis

7 years agoRollup merge of #36991 - wesleywiser:fixme_1, r=arielb1
Alex Crichton [Wed, 12 Oct 2016 17:15:26 +0000 (10:15 -0700)]
Rollup merge of #36991 - wesleywiser:fixme_1, r=arielb1

Move IdxSetBuf and BitSlice to rustc_data_structures

Resolves a FIXME

7 years agoAuto merge of #36762 - achanda:sockaddr_type, r=alexcrichton
bors [Wed, 12 Oct 2016 18:28:53 +0000 (11:28 -0700)]
Auto merge of #36762 - achanda:sockaddr_type, r=alexcrichton

Add two functions to check type of SockAddr

These can be used to determine the type of the underlying IP
address

r? @alexcrichton

7 years agoRollup merge of #36831 - michaelwoerister:ich-updates, r=nikomatsakis
Alex Crichton [Wed, 12 Oct 2016 17:15:26 +0000 (10:15 -0700)]
Rollup merge of #36831 - michaelwoerister:ich-updates, r=nikomatsakis

incr.comp.: Minor refactoring and update to struct ICH test case

r? @nikomatsakis

7 years agoRollup merge of #36762 - achanda:sockaddr_type, r=alexcrichton
Alex Crichton [Wed, 12 Oct 2016 17:15:25 +0000 (10:15 -0700)]
Rollup merge of #36762 - achanda:sockaddr_type, r=alexcrichton

Add two functions to check type of SockAddr

These can be used to determine the type of the underlying IP
address

r? @alexcrichton

7 years agoAuto merge of #36737 - srinivasreddy:check, r=nrc
bors [Wed, 12 Oct 2016 12:29:09 +0000 (05:29 -0700)]
Auto merge of #36737 - srinivasreddy:check, r=nrc

Run rustfmt on librustc_typeck/check/ folder

7 years agonormalize tuple pair types
Tim Neumann [Wed, 12 Oct 2016 10:10:39 +0000 (12:10 +0200)]
normalize tuple pair types

7 years agoAuto merge of #37095 - petrochenkov:metactor, r=alexcrichton
bors [Wed, 12 Oct 2016 06:36:29 +0000 (23:36 -0700)]
Auto merge of #37095 - petrochenkov:metactor, r=alexcrichton

Temporary fix for metadata decoding for struct constructors

Same as https://github.com/rust-lang/rust/pull/37078, but for nightly.
Ideally, metadata lookup functions should "just work" for constructor ids, but this fixes the issue as well.

Fixes https://github.com/rust-lang/rust/issues/37026
r? @alexcrichton

7 years agoAuto merge of #37090 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 11 Oct 2016 20:29:02 +0000 (13:29 -0700)]
Auto merge of #37090 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 9 pull requests

- Successful merges: #36679, #36699, #36997, #37040, #37060, #37065, #37072, #37073, #37081
- Failed merges:

7 years agoTemporary fix for metadata decoding for struct constructors
Vadim Petrochenkov [Tue, 11 Oct 2016 20:04:29 +0000 (23:04 +0300)]
Temporary fix for metadata decoding for struct constructors

7 years agoReview changes
Nick Cameron [Thu, 6 Oct 2016 19:18:17 +0000 (08:18 +1300)]
Review changes

7 years agoDeprecate `Reflect`
Nick Cameron [Thu, 6 Oct 2016 05:28:27 +0000 (18:28 +1300)]
Deprecate `Reflect`

[tracking issue](https://github.com/rust-lang/rust/issues/27749)

7 years agoStabilise attributes on statements.
Nick Cameron [Thu, 6 Oct 2016 03:44:59 +0000 (16:44 +1300)]
Stabilise attributes on statements.

Note that attributes on expressions are still unstable and are behind the `stmt_expr_attributes` flag.

cc [Tracking issue](https://github.com/rust-lang/rust/issues/15701)

7 years agoStabilise `?`
Nick Cameron [Wed, 5 Oct 2016 22:36:36 +0000 (11:36 +1300)]
Stabilise `?`

cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)

7 years agostd: Update liblibc submodule
Alex Crichton [Tue, 11 Oct 2016 17:10:10 +0000 (10:10 -0700)]
std: Update liblibc submodule

This fixes compilation on the s390x target

7 years agoconfigure: Fix gcc detection for LLVM
Alex Crichton [Tue, 11 Oct 2016 17:08:07 +0000 (10:08 -0700)]
configure: Fix gcc detection for LLVM

We have a case where 32-bit compilation accidentally requested clang when gcc
was the only one available.

7 years agoRollup merge of #37081 - p512:master, r=sfackler
Guillaume Gomez [Tue, 11 Oct 2016 15:51:27 +0000 (17:51 +0200)]
Rollup merge of #37081 - p512:master, r=sfackler

Changed 0 into '0'

Right now `0` is an undefined production rule.
[Documentation following the grammar specification](https://doc.rust-lang.org/nightly/std/fmt/#sign0) strongly suggests `'0'` is meant as it is used as a character literal.

r? @steveklabnik

7 years agoRollup merge of #37073 - GuillaumeGomez:string_url, r=steveklabnik
Guillaume Gomez [Tue, 11 Oct 2016 15:51:27 +0000 (17:51 +0200)]
Rollup merge of #37073 - GuillaumeGomez:string_url, r=steveklabnik

Add missing urls on String module

r? @steveklabnik

7 years agoRollup merge of #37072 - michaelwoerister:enable-trait-ich-tests, r=nikomatsakis
Guillaume Gomez [Tue, 11 Oct 2016 15:51:27 +0000 (17:51 +0200)]
Rollup merge of #37072 - michaelwoerister:enable-trait-ich-tests, r=nikomatsakis

ICH: Enable some cases in trait definition hashing.

Enable some test cases originally written by @eulerdisk. The tests can be enabled now because @MathieuBordere has fixed the underlying problem in #36974.

r? @nikomatsakis

7 years agoRollup merge of #37065 - nnethercote:opt-mk_printer, r=nikomatsakis
Guillaume Gomez [Tue, 11 Oct 2016 15:51:26 +0000 (17:51 +0200)]
Rollup merge of #37065 - nnethercote:opt-mk_printer, r=nikomatsakis

Merge `Printer::token` and `Printer::size`.

Logically, it's a vector of pairs, so might as well represent it that
way.

The commit also changes `scan_stack` so that it is initialized with the
default size, instead of the excessive `55 * linewidth` size, which it
usually doesn't get even close to reaching.

7 years agoRollup merge of #37060 - jfirebaugh:E0303, r=jonathandturner
Guillaume Gomez [Tue, 11 Oct 2016 15:51:26 +0000 (17:51 +0200)]
Rollup merge of #37060 - jfirebaugh:E0303, r=jonathandturner

Update E0303 to new error format

Fixes #35790

r? @jonathandturner

7 years agoRollup merge of #37040 - flodiebold:hash-tests, r=michaelwoerister
Guillaume Gomez [Tue, 11 Oct 2016 15:51:26 +0000 (17:51 +0200)]
Rollup merge of #37040 - flodiebold:hash-tests, r=michaelwoerister

Incr. comp. hash tests for consts and statics

Hi,

These two commits fix #37000 and #37001.

r? @michaelwoerister

7 years agoRollup merge of #36997 - KillTheMule:patch-1, r=steveklabnik
Guillaume Gomez [Tue, 11 Oct 2016 15:51:26 +0000 (17:51 +0200)]
Rollup merge of #36997 - KillTheMule:patch-1, r=steveklabnik

Book: Be very explicit of lifetimes being descriptive

... not prescriptive. Pointed out in https://users.rust-lang.org/t/what-if-i-get-lifetimes-wrong/7535/4, which was a revelation to me and made me think this should be more clear in the book. I'm not sure if I got this entirely right or if the wording is good, but I figured a PR is more helpful than a simple issue.

r? @steveklabnik

Small Note: There's also https://github.com/rust-lang/book, should I have sent the PR there? It doesn't coincide with the online book though, so I figured it's better of here.

7 years agoRollup merge of #36699 - bluss:repeat-str, r=alexcrichton
Guillaume Gomez [Tue, 11 Oct 2016 15:51:26 +0000 (17:51 +0200)]
Rollup merge of #36699 - bluss:repeat-str, r=alexcrichton

Add method str::repeat(self, usize) -> String

It is relatively simple to repeat a string n times:
`(0..n).map(|_| s).collect::<String>()`. It becomes slightly more
complicated to do it “right” (sizing the allocation up front), which
warrants a method that does it for us.

This method is useful in writing testcases, or when generating text.
`format!()` can be used to repeat single characters, but not repeating
strings like this.

7 years agoRollup merge of #36679 - QuietMisdreavus:rustdoc-line-breaks, r=steveklabnik
Guillaume Gomez [Tue, 11 Oct 2016 15:51:25 +0000 (17:51 +0200)]
Rollup merge of #36679 - QuietMisdreavus:rustdoc-line-breaks, r=steveklabnik

rustdoc: print non-self arguments of bare functions and struct methods on their own line

This change alters the formatting rustdoc uses when it creates function and struct method documentation. For bare functions, each argument is printed on its own line. For struct methods, non-self arguments are printed on their own line. In both cases, no line breaks are introduced if there are no arguments, and for struct methods, no line breaks are introduced if there is only a single self argument. This should aid readability of long function signatures and allow for greater comprehension of these functions.

I've run rustdoc with these changes on my crate egg-mode and its set of dependencies and put the result [on my server](https://shiva.icesoldier.me/doc-custom/egg_mode/). Of note, here are a few shortcut links that highlight the changes:

* [Bare function with a long signature](https://shiva.icesoldier.me/doc-custom/egg_mode/place/fn.reverse_geocode.html)
* [Struct methods, with single self argument and with self and non-self arguments](https://shiva.icesoldier.me/doc-custom/egg_mode/tweet/struct.Timeline.html#method.reset)
* [Bare functions with no arguments](https://shiva.icesoldier.me/doc-custom/rand/fn.thread_rng.html) and [struct methods with no arguments](https://shiva.icesoldier.me/doc-custom/hyper/client/struct.Client.html#method.new) are left unchanged.

This PR consists of two commits: one for bare functions and one for struct methods.

7 years agoAdd missing urls in io module
Guillaume Gomez [Tue, 11 Oct 2016 15:48:14 +0000 (17:48 +0200)]
Add missing urls in io module

7 years agoAuto merge of #36871 - petrochenkov:pdderr, r=nikomatsakis
bors [Tue, 11 Oct 2016 14:39:09 +0000 (07:39 -0700)]
Auto merge of #36871 - petrochenkov:pdderr, r=nikomatsakis

Turn compatibility lint `match_of_unit_variant_via_paren_dotdot` into a hard error

The lint was introduced 10 months ago and made deny-by-default 7 months ago.
In case someone is still using it, https://github.com/rust-lang/rust/pull/36868 contains a stable replacement.

r? @nikomatsakis

7 years agoAuto merge of #36983 - alexcrichton:configure-multiple-musl, r=brson
bors [Tue, 11 Oct 2016 11:26:56 +0000 (04:26 -0700)]
Auto merge of #36983 - alexcrichton:configure-multiple-musl, r=brson

configure: Add options for separate musl roots

This allows using the `./configure` script to enable rustbuild to compile
multiple musl targets at once. We'll hopefully use this soon on our bots to
produce a bunch of targets.

7 years agoAuto merge of #36825 - sbwtw:master, r=alexcrichton
bors [Tue, 11 Oct 2016 08:17:03 +0000 (01:17 -0700)]
Auto merge of #36825 - sbwtw:master, r=alexcrichton

add println!() macro with out any arguments

lets add println!() to write "\n".
like java https://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html#println()

7 years agoAdd test.
Jeffrey Seyfried [Tue, 11 Oct 2016 05:13:40 +0000 (05:13 +0000)]
Add test.

7 years agoRemove `LegacyBindingKind::MacroUse`.
Jeffrey Seyfried [Tue, 11 Oct 2016 03:48:54 +0000 (03:48 +0000)]
Remove `LegacyBindingKind::MacroUse`.

7 years agoClean up the scopes of expanded `#[macro_use]` imports.
Jeffrey Seyfried [Tue, 11 Oct 2016 03:42:06 +0000 (03:42 +0000)]
Clean up the scopes of expanded `#[macro_use]` imports.

7 years agoAdd support for undetermined macro invocations.
Jeffrey Seyfried [Tue, 11 Oct 2016 03:41:48 +0000 (03:41 +0000)]
Add support for undetermined macro invocations.

7 years agoMerge branch 'persistent_macro_scopes' into cleanup_expanded_macro_use_scopes
Jeffrey Seyfried [Tue, 11 Oct 2016 03:41:18 +0000 (03:41 +0000)]
Merge branch 'persistent_macro_scopes' into cleanup_expanded_macro_use_scopes

7 years agoCheck for shadowing errors after all invocations have been expanded.
Jeffrey Seyfried [Tue, 11 Oct 2016 03:21:40 +0000 (03:21 +0000)]
Check for shadowing errors after all invocations have been expanded.

7 years agoMove IdxSetBuf and BitSlice to rustc_data_structures
Wesley Wiser [Thu, 6 Oct 2016 02:43:27 +0000 (22:43 -0400)]
Move IdxSetBuf and BitSlice to rustc_data_structures

Resolves a FIXME

7 years agoAuto merge of #36707 - achanda:ip_type, r=alexcrichton
bors [Tue, 11 Oct 2016 00:18:01 +0000 (17:18 -0700)]
Auto merge of #36707 - achanda:ip_type, r=alexcrichton

Add two functions to check type of given address

The is_v4 function returns true if the given IP is v4. The is_v6
function returns true if the IP is v6.

7 years agoChanged 0 into '0'
p512 [Mon, 10 Oct 2016 23:21:44 +0000 (01:21 +0200)]
Changed 0 into '0'

0 is not a production rule but a literal

7 years agoAdd method str::repeat(self, usize) -> String
Ulrik Sverdrup [Sat, 24 Sep 2016 17:35:24 +0000 (19:35 +0200)]
Add method str::repeat(self, usize) -> String

It is relatively simple to repeat a string n times:
`(0..n).map(|_| s).collect::<String>()`. It becomes slightly more
complicated to do it “right” (sizing the allocation up front), which
warrants a method that does it for us.

This method is useful in writing testcases, or when generating text.
`format!()` can be used to repeat single characters, but not repeating
strings like this.

7 years agoTest derive expansion ordering.
Jeffrey Seyfried [Mon, 10 Oct 2016 09:01:57 +0000 (09:01 +0000)]
Test derive expansion ordering.

7 years agoExpand `#[derive]` attribute macro invocations last.
Jeffrey Seyfried [Mon, 10 Oct 2016 08:47:54 +0000 (08:47 +0000)]
Expand `#[derive]` attribute macro invocations last.

7 years agoAuto merge of #37030 - michaelwoerister:live-debug-values-fix, r=alexcrichton
bors [Mon, 10 Oct 2016 19:15:14 +0000 (12:15 -0700)]
Auto merge of #37030 - michaelwoerister:live-debug-values-fix, r=alexcrichton

llvm: Update LLVM to include fix for pathologic case in its LiveDebugValues pass.

See #36926.
r? @alexcrichton

7 years agoAdd missing urls on String module
Guillaume Gomez [Mon, 10 Oct 2016 16:15:55 +0000 (18:15 +0200)]
Add missing urls on String module

7 years agoAdd comparison operators to boolean const eval.
Mark-Simulacrum [Sun, 9 Oct 2016 14:43:23 +0000 (08:43 -0600)]
Add comparison operators to boolean const eval.

7 years agoICH: Enable some cases in trait definition hashing.
Michael Woerister [Mon, 10 Oct 2016 15:57:49 +0000 (11:57 -0400)]
ICH: Enable some cases in trait definition hashing.

7 years agoLLVM: Backport "[SimplifyCFG] Correctly test for unconditional branches in GetCaseRes...
Michael Woerister [Mon, 10 Oct 2016 15:12:29 +0000 (11:12 -0400)]
LLVM: Backport "[SimplifyCFG] Correctly test for unconditional branches in GetCaseResults"

7 years agoUpdate LLVM to fix bug in SimplifyCFG pass.
Michael Woerister [Mon, 10 Oct 2016 13:53:14 +0000 (09:53 -0400)]
Update LLVM to fix bug in SimplifyCFG pass.

7 years agoAuto merge of #36341 - sagebind:thread_id, r=alexcrichton
bors [Mon, 10 Oct 2016 11:04:51 +0000 (04:04 -0700)]
Auto merge of #36341 - sagebind:thread_id, r=alexcrichton

Add ThreadId for comparing threads

This adds the capability to store and compare threads with the current calling thread via a new struct, `std::thread::ThreadId`. Addresses the need outlined in issue #21507.

This avoids the need to add any special checks to the existing thread structs and does not rely on the system to provide an identifier for a thread, since it seems that this approach is unreliable and undesirable. Instead, this simply uses a lazily-created, thread-local `usize` whose value is copied from a global atomic counter. The code should be simple enough that it should be as much reliable as the `#[thread_local]` attribute it uses (however much that is).

`ThreadId`s can be compared directly for equality and have copy semantics.

Also see these other attempts:
- rust-lang/rust#29457
- rust-lang/rust#29448
- rust-lang/rust#29447

And this in the RFC repo: rust-lang/rfcs#1435

7 years agoAvoid quadratic complexity.
Jeffrey Seyfried [Sat, 8 Oct 2016 00:30:24 +0000 (00:30 +0000)]
Avoid quadratic complexity.

7 years agoMerge `Printer::token` and `Printer::size`.
Nicholas Nethercote [Fri, 7 Oct 2016 03:46:47 +0000 (14:46 +1100)]
Merge `Printer::token` and `Printer::size`.

Logically, it's a vector of pairs, so might as well represent it that
way.

The commit also changes `scan_stack` so that it is initialized with the
default size, instead of the excessive `55 * linewidth` size, which it
usually doesn't get even close to reaching.

7 years agoError monitor should emit error to stderr instead of stdout
Nick Cameron [Mon, 10 Oct 2016 05:14:45 +0000 (18:14 +1300)]
Error monitor should emit error to stderr instead of stdout

7 years agoAvoid allocations in `Decoder::read_str`.
Nicholas Nethercote [Sun, 9 Oct 2016 22:07:18 +0000 (09:07 +1100)]
Avoid allocations in `Decoder::read_str`.

`opaque::Decoder::read_str` is very hot within `rustc` due to its use in
the reading of crate metadata, and it currently returns a `String`. This
commit changes it to instead return a `Cow<str>`, which avoids a heap
allocation.

This change reduces the number of calls to `malloc` by almost 10% in
some benchmarks.

This is a [breaking-change] to libserialize.

7 years agoUpdate E0303 to new error format
John Firebaugh [Sun, 9 Oct 2016 17:12:26 +0000 (10:12 -0700)]
Update E0303 to new error format

7 years agoAuto merge of #37055 - kali:master, r=alexcrichton
bors [Sun, 9 Oct 2016 17:07:39 +0000 (10:07 -0700)]
Auto merge of #37055 - kali:master, r=alexcrichton

use MSG_NOSIGNAL on all relevant platforms

followup #36824

7 years agouse MSG_NOSIGNAL on all relevant platforms
Mathieu Poumeyrol [Sun, 9 Oct 2016 11:01:29 +0000 (13:01 +0200)]
use MSG_NOSIGNAL on all relevant platforms

7 years agoAuto merge of #36982 - GuillaumeGomez:slice_urls, r=frewsxcv
bors [Sun, 9 Oct 2016 07:35:56 +0000 (00:35 -0700)]
Auto merge of #36982 - GuillaumeGomez:slice_urls, r=frewsxcv

Add missing urls in slice doc module

r? @steveklabnik

7 years agoRemove unnecessary `pub` function classifier.
Corey Farwell [Sun, 9 Oct 2016 04:15:42 +0000 (00:15 -0400)]
Remove unnecessary `pub` function classifier.

7 years agoMake `ExternalHtml::load` short-circuited.
Corey Farwell [Sun, 9 Oct 2016 03:53:57 +0000 (23:53 -0400)]
Make `ExternalHtml::load` short-circuited.

7 years agoRefactor away `load_or_return` macro.
Corey Farwell [Sun, 9 Oct 2016 02:55:40 +0000 (22:55 -0400)]
Refactor away `load_or_return` macro.

7 years agorun rustfmt on librustc_lint folder
Srinivas Reddy Thatiparthy [Sun, 9 Oct 2016 04:08:07 +0000 (09:38 +0530)]
run rustfmt on librustc_lint folder

7 years agoAdd doc comments describing fields on `externalfiles::ExternalHtml`.
Corey Farwell [Sat, 8 Oct 2016 21:34:13 +0000 (17:34 -0400)]
Add doc comments describing fields on `externalfiles::ExternalHtml`.

7 years agoAuto merge of #36637 - GuillaumeGomez:fix_run_button, r=bluss
bors [Sun, 9 Oct 2016 02:42:55 +0000 (19:42 -0700)]
Auto merge of #36637 - GuillaumeGomez:fix_run_button, r=bluss

Fixes run button appearing when it shouldn't

Fixes #36621.

r? @steveklabnik

7 years agoDon't construct `PathBuf` ownership if we don't need it.
Corey Farwell [Sat, 8 Oct 2016 20:29:10 +0000 (16:29 -0400)]
Don't construct `PathBuf` ownership if we don't need it.

7 years agoAuto merge of #37041 - tbu-:pr_less_sizet_casts, r=alexcrichton
bors [Sat, 8 Oct 2016 22:59:49 +0000 (15:59 -0700)]
Auto merge of #37041 - tbu-:pr_less_sizet_casts, r=alexcrichton

Use less `size_t` casts in libstd since it's now defined as `usize`

7 years agoAuto merge of #37027 - alexcrichton:less-deps-in-bootstrap, r=japaric
bors [Sat, 8 Oct 2016 19:36:11 +0000 (12:36 -0700)]
Auto merge of #37027 - alexcrichton:less-deps-in-bootstrap, r=japaric

rustbuild: Optimize build times slightly

As the entry point for building the Rust compiler, a good user experience hinges
on this compiling quickly to get to the meat of the problem. To that end use
`#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop
the `regex` crate for now which was easily replacable with some string
searching.

7 years agorustbuild: Optimize build times slightly
Alex Crichton [Fri, 7 Oct 2016 19:26:45 +0000 (12:26 -0700)]
rustbuild: Optimize build times slightly

As the entry point for building the Rust compiler, a good user experience hinges
on this compiling quickly to get to the meat of the problem. To that end use
`#[cfg]`-specific dependencies to avoid building Windows crates on Unix and drop
the `regex` crate for now which was easily replacable with some string
searching.

7 years agoAdd missing urls in slice doc module
Guillaume Gomez [Wed, 5 Oct 2016 17:58:59 +0000 (19:58 +0200)]
Add missing urls in slice doc module

7 years agoUse less `size_t` casts in libstd since it's now defined as `usize`
Tobias Bucher [Sat, 8 Oct 2016 13:48:28 +0000 (15:48 +0200)]
Use less `size_t` casts in libstd since it's now defined as `usize`

7 years agoAuto merge of #37039 - Manishearth:rollup, r=Manishearth
bors [Sat, 8 Oct 2016 12:55:27 +0000 (05:55 -0700)]
Auto merge of #37039 - Manishearth:rollup, r=Manishearth

Rollup of 6 pull requests

- Successful merges: #36937, #37016, #37028, #37029, #37031, #37034
- Failed merges: #37027

7 years agoAdd ICH test case for consts
Florian Diebold [Sat, 8 Oct 2016 12:44:51 +0000 (14:44 +0200)]
Add ICH test case for consts

Fixes #37000.

7 years agoAdd ICH test case for statics
Florian Diebold [Sat, 8 Oct 2016 12:43:50 +0000 (14:43 +0200)]
Add ICH test case for statics

Fixes #37001.

7 years agoRollup merge of #37034 - nox:empty-trait-list, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:44 +0000 (16:52 +0530)]
Rollup merge of #37034 - nox:empty-trait-list, r=alexcrichton

Do not add an empty #[derive()] list in expand_derive (fixes #37033)

7 years agoRollup merge of #37031 - fitzgen:typo-in-gcc-rs-comment, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37031 - fitzgen:typo-in-gcc-rs-comment, r=alexcrichton

Fix a typo in a comment describing gcc.rs's eh_frame_registry module

s/reigster/register/

r? @alexcrichton

7 years agoRollup merge of #37029 - japaric:no-panics-in-checked-ops, r=alexcrichton
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37029 - japaric:no-panics-in-checked-ops, r=alexcrichton

rewrite checked_{div,rem} to no contain any reference to panics

even without optimizations

r? @alexcrichton

7 years agoRollup merge of #37028 - alexcrichton:fix-deps, r=japaric
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37028 - alexcrichton:fix-deps, r=japaric

rustbuild: Fix dependencies of check-docs step

Some of the doc tests depend on `extern crate test`, so depend on libtest
instead of libstd here.

7 years agoRollup merge of #37016 - alexcrichton:workspaces, r=japaric
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #37016 - alexcrichton:workspaces, r=japaric

Leverage Cargo workspaces in rustbuild

This is a continuation of https://github.com/rust-lang/rust/pull/36032 which implements the change to use `cargo metadata` to learn about the crate graph.

7 years agoRollup merge of #36937 - wesleywiser:patch-3, r=frewsxcv
Manish Goregaokar [Sat, 8 Oct 2016 11:22:43 +0000 (16:52 +0530)]
Rollup merge of #36937 - wesleywiser:patch-3, r=frewsxcv

Fix documentation for `write!` on `std::fmt` page

Fixes #36906

7 years agoAuto merge of #37015 - ahmedcharles:sudo, r=alexcrichton
bors [Sat, 8 Oct 2016 09:23:47 +0000 (02:23 -0700)]
Auto merge of #37015 - ahmedcharles:sudo, r=alexcrichton

Prevent accidentally running 'make install' as sudo.

r? @alexcrichton

I missed this in the previous PR, but this seems to work. It should probably go in a rollup, but I don't know how to do those. :/

7 years agoAuto merge of #37014 - nnethercote:avoid-pat_to_string, r=arielb1
bors [Sat, 8 Oct 2016 05:51:04 +0000 (22:51 -0700)]
Auto merge of #37014 - nnethercote:avoid-pat_to_string, r=arielb1

Avoid some `pat_to_string` calls.

`ty_of_method_or_bare_fn` currently calls `pat_to_string` even when it
doesn't need to. Fixing this avoids hundreds of large allocations (e.g.
171,600 bytes, in `mk_printer`) in several of rustc-benchmarks.

7 years agoPersistent macro scopes.
Jeffrey Seyfried [Thu, 6 Oct 2016 08:04:30 +0000 (08:04 +0000)]
Persistent macro scopes.

7 years agoAuto merge of #37006 - brson:jsbackend, r=alexcrichton
bors [Sat, 8 Oct 2016 01:17:54 +0000 (18:17 -0700)]
Auto merge of #37006 - brson:jsbackend, r=alexcrichton

Turn on JSBackend in the makefiles

This should make the nightlies work with emscripten. r? @alexcrichton

Closes #37004

7 years agorustbuild: Use `cargo metadata` to learn about DAG
Alex Crichton [Fri, 7 Oct 2016 06:30:38 +0000 (23:30 -0700)]
rustbuild: Use `cargo metadata` to learn about DAG

This updates the commit to use workspaces to use `cargo metadata` instead of
hardcoded lists about what to test. This should help us be resilient to updates
in the future on behalf of the crate DAG and minimize the amount of files that
need to be touched.

7 years agoDo not add an empty #[derive()] list in expand_derive (fixes #37033)
Anthony Ramine [Fri, 7 Oct 2016 23:42:58 +0000 (01:42 +0200)]
Do not add an empty #[derive()] list in expand_derive (fixes #37033)

7 years agoUnlock guard before overflow panic
Stephen M. Coakley [Fri, 7 Oct 2016 22:45:04 +0000 (17:45 -0500)]
Unlock guard before overflow panic

7 years agoFix a typo in a comment describing gcc.rs's eh_frame_registry module
Nick Fitzgerald [Fri, 7 Oct 2016 22:00:48 +0000 (15:00 -0700)]
Fix a typo in a comment describing gcc.rs's eh_frame_registry module

s/reigster/register/

7 years agoRename `resolve::macros::{ExpansionData -> InvocationData}`.
Jeffrey Seyfried [Mon, 3 Oct 2016 23:48:19 +0000 (23:48 +0000)]
Rename `resolve::macros::{ExpansionData -> InvocationData}`.