]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRollup merge of #49858 - dmizuk:unique-doc-hidden, r=steveklabnik
kennytm [Fri, 27 Apr 2018 19:32:11 +0000 (03:32 +0800)]
Rollup merge of #49858 - dmizuk:unique-doc-hidden, r=steveklabnik

std: Mark `ptr::Unique` with `#[doc(hidden)]`

`Unique` is now perma-unstable, so let's hide its docs.

6 years agoAuto merge of #50102 - Zoxc:query-nomacro, r=michaelwoerister
bors [Fri, 27 Apr 2018 16:42:31 +0000 (16:42 +0000)]
Auto merge of #50102 - Zoxc:query-nomacro, r=michaelwoerister

Move query code outside macros and store query jobs separately from query results

Based on https://github.com/rust-lang/rust/pull/50067

r? @michaelwoerister

6 years agoAuto merge of #50097 - glandium:box_free, r=nikomatsakis
bors [Fri, 27 Apr 2018 12:24:17 +0000 (12:24 +0000)]
Auto merge of #50097 - glandium:box_free, r=nikomatsakis

Partial future-proofing for Box<T, A>

In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise).

The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.

6 years agoAddress comments
John Kåre Alsaker [Fri, 27 Apr 2018 10:08:54 +0000 (12:08 +0200)]
Address comments

6 years agoStore query jobs and query results in separate maps to reduce memory usage
John Kåre Alsaker [Fri, 20 Apr 2018 07:47:26 +0000 (09:47 +0200)]
Store query jobs and query results in separate maps to reduce memory usage

6 years agoMove query functions out from the define_maps! macro
John Kåre Alsaker [Thu, 19 Apr 2018 00:33:24 +0000 (02:33 +0200)]
Move query functions out from the define_maps! macro

6 years agoCreate a job immediately when looking in the query map and start it later
John Kåre Alsaker [Wed, 18 Apr 2018 02:35:40 +0000 (04:35 +0200)]
Create a job immediately when looking in the query map and start it later

6 years agoAuto merge of #50275 - kennytm:rollup, r=kennytm
bors [Fri, 27 Apr 2018 09:59:12 +0000 (09:59 +0000)]
Auto merge of #50275 - kennytm:rollup, r=kennytm

Rollup of 7 pull requests

Successful merges:

 - #49707 (Add "the Rustc book")
 - #50222 (Bump bootstrap compiler to 2018-04-24)
 - #50227 (Fix ICE with erroneous `impl Trait` in a trait impl)
 - #50229 (Add setting to go to item if there is only one result)
 - #50231 (Add more doc aliases)
 - #50246 (Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.)
 - #49894 (Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString)

Failed merges:

6 years agoRollup merge of #49894 - Zoxc:sync-internedstring, r=michaelwoerister
kennytm [Fri, 27 Apr 2018 08:25:23 +0000 (16:25 +0800)]
Rollup merge of #49894 - Zoxc:sync-internedstring, r=michaelwoerister

Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString

This is an allocation-free alternative to https://github.com/rust-lang/rust/pull/46972.

6 years agoRollup merge of #50246 - nnethercote:no-dump_allocs, r=Mark-Simulacrum
kennytm [Fri, 27 Apr 2018 06:16:49 +0000 (14:16 +0800)]
Rollup merge of #50246 - nnethercote:no-dump_allocs, r=Mark-Simulacrum

Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.

This is a big win for the Debug and Opt runs of coercions, tuple-stress, html5ever, and encoding.
```
coercions-opt
        avg: -7.8%      min: -14.8%     max: 0.1%
coercions
        avg: -8.0%      min: -12.8%     max: 0.1%
tuple-stress
        avg: -7.2%      min: -10.8%     max: -0.7%
tuple-stress-opt
        avg: -6.9%      min: -10.7%     max: 0.6%
html5ever
        avg: -4.6%      min: -7.3%      max: -0.3%
encoding
        avg: -2.4%      min: -4.5%      max: 0.1%
html5ever-opt
        avg: -2.7%      min: -4.2%      max: -0.2%
encoding-opt
        avg: -1.4%      min: -2.4%      max: 0.0%
```

6 years agoRollup merge of #50231 - GuillaumeGomez:doc-aliases, r=QuietMisdreavus
kennytm [Fri, 27 Apr 2018 06:16:48 +0000 (14:16 +0800)]
Rollup merge of #50231 - GuillaumeGomez:doc-aliases, r=QuietMisdreavus

Add more doc aliases

r? @QuietMisdreavus

6 years agoRollup merge of #50229 - GuillaumeGomez:search-one-result, r=QuietMisdreavus
kennytm [Fri, 27 Apr 2018 06:16:46 +0000 (14:16 +0800)]
Rollup merge of #50229 - GuillaumeGomez:search-one-result, r=QuietMisdreavus

Add setting to go to item if there is only one result

Fixes #50216.

r? @QuietMisdreavus

6 years agoRollup merge of #50227 - sinkuu:ice_non_local_trait, r=estebank
kennytm [Fri, 27 Apr 2018 06:16:45 +0000 (14:16 +0800)]
Rollup merge of #50227 - sinkuu:ice_non_local_trait, r=estebank

Fix ICE with erroneous `impl Trait` in a trait impl

Fixes #49841.

6 years agoRollup merge of #50222 - michaelwoerister:bump-stage0-compiler-to-2018-04-24, r=alexc...
kennytm [Fri, 27 Apr 2018 06:16:44 +0000 (14:16 +0800)]
Rollup merge of #50222 - michaelwoerister:bump-stage0-compiler-to-2018-04-24, r=alexcrichton

Bump bootstrap compiler to 2018-04-24

r? @alexcrichton

6 years agoAuto merge of #49891 - cuviper:compiletest-crash, r=alexcrichton
bors [Fri, 27 Apr 2018 07:43:46 +0000 (07:43 +0000)]
Auto merge of #49891 - cuviper:compiletest-crash, r=alexcrichton

compiletest: detect non-ICE compiler panics

Fixes #49888, but will be blocked by revealing #49889.

6 years agoRollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavus
kennytm [Fri, 27 Apr 2018 06:16:42 +0000 (14:16 +0800)]
Rollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavus

Add "the Rustc book"

This PR introduces a new book into the documentation, "The rustc book". We already have books for Cargo, and for Rustdoc, rustc should have some too. This book is focused on *users* of rustc, and provides a nice place to write documentation for users.

I haven't put content here, but plan on scaffolding it out very soon, and wanted this PR open for a few discussions first. One of those is "what exactly should said TOC be?" I plan on having a proposed one up tomorrow, but figured I'd let people know to start thinking about it now.

The big one is that we also will want to put https://github.com/rust-lang-nursery/rustc-guide in-tree as well, and the naming is... tough. I'm proposing:

* doc.rust-lang.org/rustc is "The Rustc book", to mirror the other tools' books.
* doc.rust-lang.org/rustc-contribution is "The Rustc contribution guide", and contains that book

@nikomatsakis et al, any thoughts on this? I'm not attached to it in particular, but had to put something together to get this discussion going. I think mirroring the other tools is a good idea for this work, but am not sure where exactly that leaves yours.

Fixes https://github.com/rust-docs/team/issues/11

6 years agoAuto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakis
bors [Fri, 27 Apr 2018 03:53:39 +0000 (03:53 +0000)]
Auto merge of #48995 - aravind-pg:canonical-query, r=nikomatsakis

Create a canonical trait query for `evaluate_obligation`

This builds on the canonical query machinery introduced in #48411 to introduce a new canonical trait query for `evaluate_obligation` in the trait selector. Also ports most callers of the original `evaluate_obligation` to the new system (except in coherence, which requires support for intercrate mode). Closes #48537.

r? @nikomatsakis

6 years agoRename InternedString to LocalInternedString and introduce a new thread-safe Interned...
John Kåre Alsaker [Wed, 11 Apr 2018 21:02:41 +0000 (23:02 +0200)]
Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString

6 years agoAuto merge of #49420 - nox:enum-scalarpair, r=eddyb
bors [Fri, 27 Apr 2018 01:30:10 +0000 (01:30 +0000)]
Auto merge of #49420 - nox:enum-scalarpair, r=eddyb

Use ScalarPair for tagged enums

6 years agoUpdate a compile-fail test
Aravind Gollakota [Sun, 22 Apr 2018 21:48:38 +0000 (16:48 -0500)]
Update a compile-fail test

6 years agoRetry canonical trait query in standard mode if overflow occurs
Aravind Gollakota [Thu, 19 Apr 2018 08:15:36 +0000 (03:15 -0500)]
Retry canonical trait query in standard mode if overflow occurs

This is slightly hacky and hopefully only a somewhat temporary solution.

6 years agoRemove the stored obligation in OverflowError to simplify things
Aravind Gollakota [Thu, 19 Apr 2018 07:49:21 +0000 (02:49 -0500)]
Remove the stored obligation in OverflowError to simplify things

We will shortly refactor things so that it is no longer needed

6 years agoIntroduce trait query mode and use it to set overflow error handling policy in traits...
Aravind Gollakota [Thu, 19 Apr 2018 07:28:03 +0000 (02:28 -0500)]
Introduce trait query mode and use it to set overflow error handling policy in traits::select

6 years agoSimplify trait selector's evaluation API slightly
Aravind Gollakota [Sun, 8 Apr 2018 07:04:46 +0000 (02:04 -0500)]
Simplify trait selector's evaluation API slightly

6 years agoPort existing callers of `evaluate_obligation` to the new canonical trait query
Aravind Gollakota [Sun, 8 Apr 2018 06:56:27 +0000 (01:56 -0500)]
Port existing callers of `evaluate_obligation` to the new canonical trait query

Except the one in coherence, which needs support for intercrate mode.

6 years agoCreate a canonical trait query for `evaluate_obligation`
Aravind Gollakota [Fri, 9 Mar 2018 00:30:37 +0000 (18:30 -0600)]
Create a canonical trait query for `evaluate_obligation`

6 years agoRefactor overflow handling in traits::select to propagate overflow instead of abortin...
Aravind Gollakota [Thu, 5 Apr 2018 17:29:18 +0000 (12:29 -0500)]
Refactor overflow handling in traits::select to propagate overflow instead of aborting eagerly

We store the obligation that caused the overflow as part of the OverflowError, and report it at the public API endpoints (rather than in the implementation internals).

6 years agoAuto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddyb
bors [Thu, 26 Apr 2018 23:11:39 +0000 (23:11 +0000)]
Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddyb

drop elaboration should reveal all

This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising.

cc #49685

r? @eddyb

6 years agoAuto merge of #49513 - nox:univariant-fieldless-enum-as-zst, r=eddyb
bors [Thu, 26 Apr 2018 18:26:03 +0000 (18:26 +0000)]
Auto merge of #49513 - nox:univariant-fieldless-enum-as-zst, r=eddyb

Treat repr(Rust) univariant fieldless enums as ZSTs

This makes all those enums be represented the same way:

```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```

Related to #15747.

Cc @rust-lang/wg-codegen @rust-lang/lang

6 years agoAdd setting to go to item if there is only one result
Guillaume Gomez [Wed, 25 Apr 2018 17:50:32 +0000 (19:50 +0200)]
Add setting to go to item if there is only one result

6 years agoadd regression test
Niko Matsakis [Thu, 26 Apr 2018 17:42:22 +0000 (13:42 -0400)]
add regression test

Fixes #49685

6 years agouse `reveal_all` during drop elaboration
Niko Matsakis [Thu, 26 Apr 2018 17:31:31 +0000 (13:31 -0400)]
use `reveal_all` during drop elaboration

This used to happen by default as part of the normalization routine
that was being used.

6 years agoimproved debug output
Niko Matsakis [Thu, 26 Apr 2018 17:31:24 +0000 (13:31 -0400)]
improved debug output

6 years agoAuto merge of #50228 - irinagpopa:backstory-v2, r=nikomatsakis
bors [Thu, 26 Apr 2018 16:00:48 +0000 (16:00 +0000)]
Auto merge of #50228 - irinagpopa:backstory-v2, r=nikomatsakis

Rename rustc_back to rustc_target and move ABI code to it.

Fixes #45226.

6 years agoFixed tidy errors.
Irina Popa [Thu, 26 Apr 2018 13:07:26 +0000 (16:07 +0300)]
Fixed tidy errors.

6 years agorustc_target: move in syntax::abi and flip dependency.
Irina Popa [Wed, 25 Apr 2018 16:30:39 +0000 (19:30 +0300)]
rustc_target: move in syntax::abi and flip dependency.

6 years agoMark SingleVariant as repr(u8) in c-style-enum
Anthony Ramine [Wed, 25 Apr 2018 08:33:02 +0000 (10:33 +0200)]
Mark SingleVariant as repr(u8) in c-style-enum

I should rather properly fix debuginfo but I have no clue how to do that.

6 years agoTreat repr(Rust) univariant fieldless enums as a ZST (fixes #15747)
Anthony Ramine [Fri, 30 Mar 2018 13:49:56 +0000 (15:49 +0200)]
Treat repr(Rust) univariant fieldless enums as a ZST (fixes #15747)

This makes all those enums be represented the same way:

```rust
enum A1 { B1 }
enum A2 { B2 = 0 }
enum A3 { B3, C3(!) }
```

6 years agorustc_target: move in cabi_* from rustc_trans.
Irina Popa [Wed, 25 Apr 2018 13:45:29 +0000 (16:45 +0300)]
rustc_target: move in cabi_* from rustc_trans.

6 years agorustc_trans: generalize cabi_* to any context type.
Irina Popa [Wed, 18 Apr 2018 13:01:26 +0000 (16:01 +0300)]
rustc_trans: generalize cabi_* to any context type.

6 years agorustc_target: move for_variant and field TyLayout methods to a trait.
Irina Popa [Wed, 7 Feb 2018 17:27:43 +0000 (19:27 +0200)]
rustc_target: move for_variant and field TyLayout methods to a trait.

6 years agorustc_target: move LayoutOf's type parameter to an associated type.
Irina Popa [Mon, 5 Feb 2018 19:07:20 +0000 (21:07 +0200)]
rustc_target: move LayoutOf's type parameter to an associated type.

6 years agorustc_target: move in type definitions from rustc_trans::abi.
Irina Popa [Thu, 28 Dec 2017 17:07:02 +0000 (19:07 +0200)]
rustc_target: move in type definitions from rustc_trans::abi.

6 years agorustc_target: move in type definitions from ty::layout.
Irina Popa [Mon, 18 Dec 2017 14:18:36 +0000 (16:18 +0200)]
rustc_target: move in type definitions from ty::layout.

6 years agoRename rustc_back::target to rustc_target::spec.
Irina Popa [Fri, 8 Dec 2017 19:18:21 +0000 (21:18 +0200)]
Rename rustc_back::target to rustc_target::spec.

6 years agorustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.
Irina Popa [Fri, 8 Dec 2017 15:07:47 +0000 (17:07 +0200)]
rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.

6 years agoAdd a test for casts of univariant C-like enums
Anthony Ramine [Thu, 12 Apr 2018 13:11:14 +0000 (15:11 +0200)]
Add a test for casts of univariant C-like enums

6 years agoProperly evaluate zst enum
Oliver Schneider [Sat, 31 Mar 2018 21:06:26 +0000 (23:06 +0200)]
Properly evaluate zst enum

6 years agoConsistently use C_uint_big for discriminants
Anthony Ramine [Wed, 11 Apr 2018 15:30:49 +0000 (17:30 +0200)]
Consistently use C_uint_big for discriminants

6 years agoProperly look for uninhabitedness when handling discriminants
Anthony Ramine [Wed, 11 Apr 2018 15:25:18 +0000 (17:25 +0200)]
Properly look for uninhabitedness when handling discriminants

6 years agoDo not ICE on generics mismatch with non-local traits
Shotaro Yamada [Mon, 23 Apr 2018 04:54:09 +0000 (13:54 +0900)]
Do not ICE on generics mismatch with non-local traits

Fixes #49841

6 years agoAuto merge of #50245 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Thu, 26 Apr 2018 11:07:14 +0000 (11:07 +0000)]
Auto merge of #50245 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 4 pull requests

Successful merges:

 - #50177 (mark std::str::replace(,n) as #[must_use])
 - #50207 (Hash EntryKind::AssociatedConst const data)
 - #50214 (Js improvements)
 - #50219 (Added missing `.` in docs.)

Failed merges:

 - #50229 (Add setting to go to item if there is only one result)

6 years agoAdd more doc aliases
Guillaume Gomez [Wed, 25 Apr 2018 18:10:58 +0000 (20:10 +0200)]
Add more doc aliases

6 years agoMake dump_{alloc,allocs,local}() no-ops when tracing is disabled.
Nicholas Nethercote [Thu, 26 Apr 2018 05:35:24 +0000 (15:35 +1000)]
Make dump_{alloc,allocs,local}() no-ops when tracing is disabled.

Because they traverse data structures and build up strings, which is
wasted effort if those strings aren't printed.

The patch also removes some now-unnecessary log_enabled! tests at call
sites.

6 years agoAuto merge of #50072 - oli-obk:discriminants, r=eddyb
bors [Thu, 26 Apr 2018 08:51:39 +0000 (08:51 +0000)]
Auto merge of #50072 - oli-obk:discriminants, r=eddyb

Allow variant discriminant initializers to refer to other initializer…

…s of the same enum

r? @eddyb

fixes the 2.4 failure of https://github.com/rust-lang/rust/issues/49765

cc @durka @retep998

6 years agoRollup merge of #50219 - ralfbiedert:master, r=frewsxcv
Guillaume Gomez [Thu, 26 Apr 2018 08:11:16 +0000 (10:11 +0200)]
Rollup merge of #50219 - ralfbiedert:master, r=frewsxcv

Added missing `.` in docs.

6 years agoRollup merge of #50214 - GuillaumeGomez:JS-improvements, r=QuietMisdreavus
Guillaume Gomez [Thu, 26 Apr 2018 08:11:15 +0000 (10:11 +0200)]
Rollup merge of #50214 - GuillaumeGomez:JS-improvements, r=QuietMisdreavus

Js improvements

r? @QuietMisdreavus

6 years agoRollup merge of #50207 - wesleywiser:hash_const_data, r=eddyb
Guillaume Gomez [Thu, 26 Apr 2018 08:11:14 +0000 (10:11 +0200)]
Rollup merge of #50207 - wesleywiser:hash_const_data, r=eddyb

Hash EntryKind::AssociatedConst const data

Related to #49991
r? @michaelwoerister
cc @eddyb

6 years agoRollup merge of #50177 - matthiaskrgr:std_std_replacen__must_use, r=oli-obk
Guillaume Gomez [Thu, 26 Apr 2018 08:11:11 +0000 (10:11 +0200)]
Rollup merge of #50177 - matthiaskrgr:std_std_replacen__must_use, r=oli-obk

mark std::str::replace(,n) as #[must_use]

let x = "a b c c";
x.replacen("c", "d", 2");
might not do what people might think it does.

6 years agoUse ScalarPair for tagged enums
Anthony Ramine [Tue, 27 Mar 2018 14:44:03 +0000 (16:44 +0200)]
Use ScalarPair for tagged enums

6 years agoAllow variant discriminant initializers to refer to other initializers of the same...
Oliver Schneider [Thu, 19 Apr 2018 11:17:09 +0000 (13:17 +0200)]
Allow variant discriminant initializers to refer to other initializers of the same enum

6 years agoAuto merge of #49732 - Zoxc:sync-dep-graph, r=michaelwoerister
bors [Thu, 26 Apr 2018 06:38:14 +0000 (06:38 +0000)]
Auto merge of #49732 - Zoxc:sync-dep-graph, r=michaelwoerister

Make incremental compilation thread-safe

r? @michaelwoerister

6 years agoAuto merge of #50236 - nrc:update, r=alexcrichton
bors [Thu, 26 Apr 2018 03:36:22 +0000 (03:36 +0000)]
Auto merge of #50236 - nrc:update, r=alexcrichton

Update rustfmt and rls

r? @alexcrichton

6 years agohandle license check
Nick Cameron [Thu, 26 Apr 2018 03:10:11 +0000 (15:10 +1200)]
handle license check

6 years agoAuto merge of #50131 - Manishearth:crate-in-local, r=petrochenkov
bors [Wed, 25 Apr 2018 23:25:47 +0000 (23:25 +0000)]
Auto merge of #50131 - Manishearth:crate-in-local, r=petrochenkov

Allow crate:: in local paths

Currently if you want to use `crate` locally you have to do `::crate::`. This shouldn't be necessary

(will fix up tests later)

r? @petrochenkov

6 years agoUpdate rustfmt and rls
Nick Cameron [Wed, 25 Apr 2018 22:11:28 +0000 (10:11 +1200)]
Update rustfmt and rls

6 years agoAuto merge of #50016 - tmandry:cleanup-binder, r=nikomatsakis
bors [Wed, 25 Apr 2018 20:58:53 +0000 (20:58 +0000)]
Auto merge of #50016 - tmandry:cleanup-binder, r=nikomatsakis

Make Binder's field private and clean up its usage

AKA "tour de rustc"

Closes #49814.

6 years agoFix crate:: in local paths
Manish Goregaokar [Sat, 21 Apr 2018 00:04:29 +0000 (17:04 -0700)]
Fix crate:: in local paths

6 years agoAuto merge of #49321 - ishitatsuyuki:compile-pass, r=alexcrichton
bors [Wed, 25 Apr 2018 14:52:30 +0000 (14:52 +0000)]
Auto merge of #49321 - ishitatsuyuki:compile-pass, r=alexcrichton

Introduce compile-pass

r? @alexcrichton

The plan is to move things that cannot fail (no assert, unwrap, etc) out so we don't have to run them, and in the long term we can also stop running LLVM for them.

Out of 3215 tests...

```
Language            Files        Lines         Code     Comments       Blanks
Rust                 3215       119254        64688        35135        19431
```

16% of them has an empty main (which is already moved in this PR).

```
grep -rnPzl 'fn main\(\)\s*{\s*}' | xargs rg --files-without-match cfg | wc -l
547
```

And only 50% of the tests contains assertions:

```
rg -e assert -e unwrap -e expect -e panic -l | wc -l
1600
```

The remainder is likely able to get moved, but they need check by a human so I didn't touch them in PR.

cc @rust-lang/compiler

* [ ] Update documentation

6 years agoBump bootstrap compiler to 2018-04-24
Michael Woerister [Wed, 25 Apr 2018 13:57:33 +0000 (15:57 +0200)]
Bump bootstrap compiler to 2018-04-24

6 years agoAdded missing `.` in docs.
Ralf Biedert [Wed, 25 Apr 2018 12:14:43 +0000 (14:14 +0200)]
Added missing `.` in docs.

6 years agoAuto merge of #50134 - andjo403:jobserver, r=michaelwoerister
bors [Wed, 25 Apr 2018 11:40:18 +0000 (11:40 +0000)]
Auto merge of #50134 - andjo403:jobserver, r=michaelwoerister

make rustdoc test follow the jobserver limit of threads

fix that to many threads is executing at the same time
when rustdoc test is executed.

6 years agoMove the Lock into OpenTask
John Kåre Alsaker [Wed, 25 Apr 2018 09:55:12 +0000 (11:55 +0200)]
Move the Lock into OpenTask

6 years agoAddress comments
John Kåre Alsaker [Wed, 25 Apr 2018 00:30:18 +0000 (02:30 +0200)]
Address comments

6 years agoMake DepGraph thread-safe
John Kåre Alsaker [Fri, 6 Apr 2018 12:52:36 +0000 (14:52 +0200)]
Make DepGraph thread-safe

6 years agoAuto merge of #50110 - oli-obk:warn_all_the_constants, r=estebank
bors [Wed, 25 Apr 2018 09:19:07 +0000 (09:19 +0000)]
Auto merge of #50110 - oli-obk:warn_all_the_constants, r=estebank

Warn on all erroneous constants

fixes #49791
fixes #47054

@Zoxc this PR triggers the nondeterministic errors of https://github.com/rust-lang/rust/pull/49950#issuecomment-383074959 really often (at least on stage1).

6 years agocompiletest: introduce skip-trans
Tatsuyuki Ishi [Wed, 25 Apr 2018 09:05:47 +0000 (18:05 +0900)]
compiletest: introduce skip-trans

6 years agoSome JS improvements
Guillaume Gomez [Tue, 24 Apr 2018 18:23:57 +0000 (20:23 +0200)]
Some JS improvements

6 years agoAuto merge of #50106 - nnethercote:nearest_common_ancestor, r=nikomatsakis
bors [Wed, 25 Apr 2018 06:48:40 +0000 (06:48 +0000)]
Auto merge of #50106 - nnethercote:nearest_common_ancestor, r=nikomatsakis

Speed up `nearest_common_ancestor`.

`nearest_common_ancestor` can be made faster.

Here are all the benchmarks where one of the measurements improved by at least 1%.
```
clap-rs-check
avg: -4.5% min: -8.8% max: -0.3%
clap-rs
avg: -2.6% min: -4.5% max: 0.5%
script-servo
avg: -1.7% min: -3.6% max: 0.0%
regression-31157
avg: -1.5% min: -2.6% max: -0.4%
hyper
avg: -1.2% min: -2.5% max: -0.0%
piston-image
avg: -1.6% min: -2.5% max: 0.1%
regex
avg: -1.2% min: -2.2% max: 0.0%
issue-46449
avg: -1.8% min: -2.1% max: -0.7%
crates.io
avg: -1.2% min: -2.1% max: 0.0%
hyper-check
avg: -1.0% min: -2.1% max: -0.1%
clap-rs-opt
avg: -1.4% min: -2.0% max: -0.3%
piston-image-check
avg: -1.2% min: -1.9% max: -0.1%
regex-check
avg: -0.5% min: -1.8% max: -0.1%
syn
avg: -1.1% min: -1.7% max: -0.1%
tokio-webpush-simple-check
avg: -1.1% min: -1.6% max: -0.3%
tokio-webpush-simple
avg: -1.2% min: -1.6% max: -0.0%
helloworld-check
avg: -1.4% min: -1.6% max: -1.2%
deeply-nested
avg: -1.2% min: -1.4% max: -0.8%
encoding-check
avg: -0.8% min: -1.3% max: -0.3%
unify-linearly-check
avg: -1.0% min: -1.3% max: -0.8%
script-servo-check
avg: -0.6% min: -1.3% max: 0.0%
regression-31157-check
avg: -0.9% min: -1.2% max: -0.7%
script-servo-opt
avg: -0.5% min: -1.2% max: 0.1%
deeply-nested-check
avg: -0.8% min: -1.2% max: -0.7%
encoding
avg: -0.7% min: -1.1% max: -0.3%
issue-46449-check
avg: -0.9% min: -1.1% max: -0.6%
parser-check
avg: -0.9% min: -1.1% max: -0.8%
html5ever
avg: -0.5% min: -1.0% max: -0.0%
```

6 years agoAuto merge of #50100 - Manishearth:edition-path-lint, r=nikomatsakis
bors [Wed, 25 Apr 2018 04:19:06 +0000 (04:19 +0000)]
Auto merge of #50100 - Manishearth:edition-path-lint, r=nikomatsakis

Edition breakage lint for absolute paths starting with modules

We plan to enable `extern_absolute_paths` in the 2018 edition. To allow for that, folks must transition their paths in a previous edition to the new one. This makes paths which import module contents via `use module::` or `::module::` obsolete, and we must edition-lint these.

https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/205?u=manishearth is the current plan for paths.

r? @nikomatsakis

Fixes #48722

6 years agoHash EntryKind::AssociatedConst const data
Wesley Wiser [Wed, 25 Apr 2018 03:18:58 +0000 (23:18 -0400)]
Hash EntryKind::AssociatedConst const data

Related to #49991

6 years agoRemove methods with implicit Binder::skip_bound
Tyler Mandry [Fri, 20 Apr 2018 16:46:18 +0000 (11:46 -0500)]
Remove methods with implicit Binder::skip_bound

Fixes #20664.

6 years agoMake Binder's field private and clean up its usage
Tyler Mandry [Wed, 25 Apr 2018 02:45:49 +0000 (21:45 -0500)]
Make Binder's field private and clean up its usage

6 years agoSwitch box_free to take the destructured contents of Box
Mike Hommey [Fri, 20 Apr 2018 01:24:53 +0000 (10:24 +0900)]
Switch box_free to take the destructured contents of Box

As of now, Box only contains a Unique pointer, so this is the sole
argument to box_free. Consequently, we remove the code supporting
the previous box_free signature. We however keep the old definition
for bootstrapping purpose.

6 years agoAuto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearth
bors [Wed, 25 Apr 2018 01:50:56 +0000 (01:50 +0000)]
Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearth

Provide better names for builtin deriving-generated attributes

First attempt at fixing #49967

Not in love with any choices here, don't be shy if you aren't happy with anything :)

I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable)

In all cases I took the names from the methods as declared in the relevant trait.

In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used?

Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)

6 years agoDisable two-phase-reservation-sharing-interference[nll_beyond]
Josh Stone [Tue, 24 Apr 2018 23:17:31 +0000 (16:17 -0700)]
Disable two-phase-reservation-sharing-interference[nll_beyond]

A comment already stated that this test should be disabled, but its
`should_fail` is not enough to excuse it from a compiler panic.  Remove
it from the `revisions` list to disable it harder.

6 years agoAdd a stopgap for #49889
Josh Stone [Fri, 20 Apr 2018 18:37:41 +0000 (11:37 -0700)]
Add a stopgap for #49889

6 years agocompiletest: detect non-ICE compiler panics
Josh Stone [Wed, 11 Apr 2018 22:41:22 +0000 (15:41 -0700)]
compiletest: detect non-ICE compiler panics

6 years agoTest format hygiene
James Sanderson [Tue, 24 Apr 2018 21:15:00 +0000 (22:15 +0100)]
Test format hygiene

6 years agoAuto merge of #50096 - alexcrichton:less-simd-warnings, r=michaelwoerister
bors [Tue, 24 Apr 2018 20:59:15 +0000 (20:59 +0000)]
Auto merge of #50096 - alexcrichton:less-simd-warnings, r=michaelwoerister

Tweak some warnings around #[target_feature]

This commit fixes up some issues discovered when getting the `stdsimd` crate's CI compiling again.

6 years agoGensym arguments for format macro
James Sanderson [Tue, 24 Apr 2018 20:30:13 +0000 (21:30 +0100)]
Gensym arguments for format macro

6 years agoTest deriving hygiene
James Sanderson [Thu, 19 Apr 2018 20:11:43 +0000 (21:11 +0100)]
Test deriving hygiene

6 years agoAuto merge of #49933 - oli-obk:miri_rustup, r=eddyb
bors [Tue, 24 Apr 2018 18:04:51 +0000 (18:04 +0000)]
Auto merge of #49933 - oli-obk:miri_rustup, r=eddyb

Fix the miri tool

r? @eddyb

cc @bjorn3

fixes #49777

6 years agomore nits
steveklabnik [Tue, 24 Apr 2018 16:21:08 +0000 (12:21 -0400)]
more nits

6 years agoAuto merge of #50079 - NickAtAccuPS:android_abstract_socket, r=sfackler
bors [Tue, 24 Apr 2018 14:15:56 +0000 (14:15 +0000)]
Auto merge of #50079 - NickAtAccuPS:android_abstract_socket, r=sfackler

Android abstract unix domain sockets AddressKind correction

The prior check causes abstract unix domain sockets to return AddressKind::Unnamed instead of AddressKind::Abstract on Android.

Other than the immediately proceeding comment "macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses" the check as-implemented does not seem to have alternative explanation. I couldn't find an alternative explanation while stepping though git blame. I suspect the AddressKind::Unnamed nonzero check should instead be if macos, length 16, and zeroed array. @sfackler could you comment on this, the code as-is is the same from your initial addition of abstract uds support.

6 years agoWarn on all erroneous constants
Oliver Schneider [Fri, 20 Apr 2018 12:18:29 +0000 (14:18 +0200)]
Warn on all erroneous constants

6 years agoAuto merge of #49911 - rcoh:master, r=nikomatsakis
bors [Tue, 24 Apr 2018 10:44:22 +0000 (10:44 +0000)]
Auto merge of #49911 - rcoh:master, r=nikomatsakis

Don't allow #[should_panic] with non-() tests

Adds (removes) support for `#[should_panic]` when the test is non-`()`

6 years agoAuto merge of #49837 - nikomatsakis:chalkify-engine, r=scalexm
bors [Tue, 24 Apr 2018 08:32:52 +0000 (08:32 +0000)]
Auto merge of #49837 - nikomatsakis:chalkify-engine, r=scalexm

work towards chalkify-ing the engine

This work towards creating a "all program clauses needed for this goal" query

r? @scalexm

6 years agoAuto merge of #50191 - kennytm:rollup, r=kennytm
bors [Tue, 24 Apr 2018 05:43:32 +0000 (05:43 +0000)]
Auto merge of #50191 - kennytm:rollup, r=kennytm

Rollup of 11 pull requests

Successful merges:

 - #49461 (std: Child::kill() returns error if process has already exited)
 - #49727 (Add Cell::update)
 - #49812 (Fix revision support for UI tests.)
 - #49829 (Add doc links to `std::os` extension traits)
 - #49906 (Stabilize `std::hint::unreachable_unchecked`.)
 - #49970 (Deprecate Read::chars and char::decode_utf8)
 - #49985 (don't see issue #0)
 - #50118 (fix search bar bug)
 - #50139 (encourage descriptive issue titles)
 - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.)
 - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`)

Failed merges:

6 years agoRollup merge of #50185 - dmizuk:mod_euc-fix-overflow, r=kennytm
kennytm [Tue, 24 Apr 2018 03:57:11 +0000 (11:57 +0800)]
Rollup merge of #50185 - dmizuk:mod_euc-fix-overflow, r=kennytm

core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`

This commit removes usage of `abs`, which overflows when `self == MIN`.