]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRollup merge of #48206 - michaelwoerister:colors-array, r=nikomatsakis
Manish Goregaokar [Sat, 24 Feb 2018 16:55:43 +0000 (08:55 -0800)]
Rollup merge of #48206 - michaelwoerister:colors-array, r=nikomatsakis

incr.comp.: Store DepNode colors in a dense array instead of a hashmap.

Implements half of https://github.com/rust-lang/rust/issues/47293.

r? @nikomatsakis

6 years agoRollup merge of #48185 - michaelwoerister:recursive-cache-decoding, r=nikomatsakis
Manish Goregaokar [Sat, 24 Feb 2018 16:55:42 +0000 (08:55 -0800)]
Rollup merge of #48185 - michaelwoerister:recursive-cache-decoding, r=nikomatsakis

incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations.

Fixes #47972.

r? @nikomatsakis

6 years agoRollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=eddyb
Manish Goregaokar [Sat, 24 Feb 2018 16:55:41 +0000 (08:55 -0800)]
Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=eddyb

Termination trait in tests

Support the `Termination` trait in unit tests (cc https://github.com/rust-lang/rust/issues/43301)

Also, a drive-by fix for #47075.

This is joint work with @bkchr.

6 years agoRollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis
Manish Goregaokar [Sat, 24 Feb 2018 16:55:39 +0000 (08:55 -0800)]
Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis

Error on nested impl Trait and path projections from impl Trait

cc #34511

r? @nikomatsakis

6 years agoRollup merge of #47987 - Zoxc:rm-recursion-checking, r=eddyb
Manish Goregaokar [Sat, 24 Feb 2018 16:55:36 +0000 (08:55 -0800)]
Rollup merge of #47987 - Zoxc:rm-recursion-checking, r=eddyb

Remove "static item recursion checking" in favor of relying on cycle checks in the query engine

Tests are changed to use the cycle check error message instead. Some duplicate tests are removed.

r? @eddyb

6 years agoAuto merge of #48476 - Manishearth:rollup, r=Manishearth
bors [Sat, 24 Feb 2018 07:55:34 +0000 (07:55 +0000)]
Auto merge of #48476 - Manishearth:rollup, r=Manishearth

Rollup of 12 pull requests

- Successful merges: #47933, #48072, #48083, #48123, #48157, #48219, #48221, #48245, #48429, #48436, #48438, #48472
- Failed merges:

6 years agoAuto merge of #48487 - Mark-Simulacrum:appveyor-split, r=Mark-Simulacrum
bors [Sat, 24 Feb 2018 00:54:15 +0000 (00:54 +0000)]
Auto merge of #48487 - Mark-Simulacrum:appveyor-split, r=Mark-Simulacrum

Split MinGW tests into two builders on AppVeyor

Run-pass and compile-fail tests appear to take the most significant chunk of time, so split them into their own builder.

Should help with https://github.com/rust-lang/rust/issues/46903.

r? @kennytm
cc @alexcrichton

6 years agoSplit MinGW tests into two builders on AppVeyor
Mark Simulacrum [Fri, 23 Feb 2018 23:19:17 +0000 (16:19 -0700)]
Split MinGW tests into two builders on AppVeyor

Run-pass and compile-fail tests appear to take the most significant
chunk of time, so split them into their own builder.

6 years agoRollup merge of #48472 - Manishearth:clippyup, r=oli-obk
Manish Goregaokar [Fri, 23 Feb 2018 18:24:57 +0000 (10:24 -0800)]
Rollup merge of #48472 - Manishearth:clippyup, r=oli-obk

Update clippy

r? @oli-obk

6 years agoRollup merge of #48438 - mbrubeck:docs, r=TimNN
Manish Goregaokar [Fri, 23 Feb 2018 18:24:56 +0000 (10:24 -0800)]
Rollup merge of #48438 - mbrubeck:docs, r=TimNN

[docs] Minor wording changes to drain_filter docs

The docs currently say, "If the closure returns false, it will try again, and call the closure on the next element."  But this happens regardless of whether the closure returns true or false.

6 years agoRollup merge of #48436 - adeschamps:string-doc-fix, r=estebank
Manish Goregaokar [Fri, 23 Feb 2018 18:24:55 +0000 (10:24 -0800)]
Rollup merge of #48436 - adeschamps:string-doc-fix, r=estebank

Small grammar fix to docs for String::new()

6 years agoRollup merge of #48429 - toidiu:patch-1, r=nikomatsakis
Manish Goregaokar [Fri, 23 Feb 2018 18:24:54 +0000 (10:24 -0800)]
Rollup merge of #48429 - toidiu:patch-1, r=nikomatsakis

update tracking issue for nll

Point to the new tracing issue for nll

For reference https://github.com/rust-lang/rust/issues/44928

6 years agoRollup merge of #48245 - spastorino:sparse_bitsets, r=nikomatsakis
Manish Goregaokar [Fri, 23 Feb 2018 18:24:53 +0000 (10:24 -0800)]
Rollup merge of #48245 - spastorino:sparse_bitsets, r=nikomatsakis

Use sparse bitsets instead of dense ones for NLL results

This is for https://github.com/rust-lang/rust/issues/48170.

r? @nikomatsakis

6 years agoRollup merge of #48221 - rkruppe:improve-ctypes-lint, r=estebank
Manish Goregaokar [Fri, 23 Feb 2018 18:24:52 +0000 (10:24 -0800)]
Rollup merge of #48221 - rkruppe:improve-ctypes-lint, r=estebank

Overhaul improper_ctypes output

This snowballed into a rather big set of improvements to the diagnostics of the improper_ctypes lint. See commits for details, including effects of each change on the `compile-fail/improper-ctypes.rs` test (now a UI test), which is pretty gnarly and hopefully not representative of real code, but covers a lot of different error cases.

Fixes #42050

6 years agoRollup merge of #48219 - andjo403:export_symbol, r=michaelwoerister
Manish Goregaokar [Fri, 23 Feb 2018 18:24:51 +0000 (10:24 -0800)]
Rollup merge of #48219 - andjo403:export_symbol, r=michaelwoerister

lookup exported symbols only when needed.

reduces the time to compile small file with no optimization by half.

6 years agoRollup merge of #48157 - scottmcm:try-for-each, r=dtolnay
Manish Goregaokar [Fri, 23 Feb 2018 18:24:49 +0000 (10:24 -0800)]
Rollup merge of #48157 - scottmcm:try-for-each, r=dtolnay

Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in https://github.com/rust-lang/rust/pull/45379#issuecomment-338370020 as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`.

Like `for_each`, no need for an `r` version thanks to overrides in `Rev`.

`iterator_try_fold` tracking issue: https://github.com/rust-lang/rust/issues/45594

6 years agoRollup merge of #48123 - nikomatsakis:issue-47244-expected-num-args, r=estebank
Manish Goregaokar [Fri, 23 Feb 2018 18:24:48 +0000 (10:24 -0800)]
Rollup merge of #48123 - nikomatsakis:issue-47244-expected-num-args, r=estebank

detect wrong number of args when type-checking a closure

Instead of creating inference variables for those argument types, use
the trait error-reporting code to give a nicer error. This also
improves some other spans for existing tests.

Fixes #47244

r? @estebank

6 years agoRollup merge of #48083 - jseyfried:improve_tuple_struct_field_access_hygiene, r=petro...
Manish Goregaokar [Fri, 23 Feb 2018 18:24:47 +0000 (10:24 -0800)]
Rollup merge of #48083 - jseyfried:improve_tuple_struct_field_access_hygiene, r=petrochenkov

Improve tuple struct field access hygiene

Fixes #47312 by fixing a span bug.
r? @nrc

6 years agoRollup merge of #48072 - cramertj:impl-trait-lifetime-res, r=nikomatsakis
Manish Goregaokar [Fri, 23 Feb 2018 18:24:46 +0000 (10:24 -0800)]
Rollup merge of #48072 - cramertj:impl-trait-lifetime-res, r=nikomatsakis

Fix nested impl trait lifetimes

Fixes #46464
cc https://github.com/rust-lang/rust/issues/34511

r? @nikomatsakis

6 years agoRollup merge of #47933 - Zoxc:plugin-panics, r=nikomatsakis
Manish Goregaokar [Fri, 23 Feb 2018 18:24:45 +0000 (10:24 -0800)]
Rollup merge of #47933 - Zoxc:plugin-panics, r=nikomatsakis

Do not run the default panic hook inside procedural macros.

Fixes #47812

r? @nikomatsakis

6 years agoUpdate Clippy
Manish Goregaokar [Fri, 23 Feb 2018 16:59:52 +0000 (08:59 -0800)]
Update Clippy

6 years agore-export `assert_test_result` for use when testing libtest itself
Niko Matsakis [Fri, 23 Feb 2018 15:11:06 +0000 (10:11 -0500)]
re-export `assert_test_result` for use when testing libtest itself

6 years agoupdate test -- we now give a slightly different error
Niko Matsakis [Fri, 23 Feb 2018 12:34:00 +0000 (07:34 -0500)]
update test -- we now give a slightly different error

6 years agoAuto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkov
bors [Fri, 23 Feb 2018 11:21:29 +0000 (11:21 +0000)]
Auto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkov

Fix span of visibility

This PR

1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`.
2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`.

This PR is motivated by the bug found in rustfmt (https://github.com/rust-lang-nursery/rustfmt/issues/2398).

The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.

6 years agoAuto merge of #48052 - eddyb:deggregate, r=nikomatsakis
bors [Fri, 23 Feb 2018 02:21:06 +0000 (02:21 +0000)]
Auto merge of #48052 - eddyb:deggregate, r=nikomatsakis

 rustc_mir: handle all aggregate kinds in, and always run, the deaggregator.

This helps with removing`Rvalue::Aggregate` from the MIR, and with enabling more optimizations.
r? @nikomatsakis

6 years agomove test to the proper directory and test #[bench]
Niko Matsakis [Fri, 23 Feb 2018 01:16:30 +0000 (20:16 -0500)]
move test to the proper directory and test #[bench]

6 years agodelete this test file: it also appears as
Niko Matsakis [Fri, 23 Feb 2018 01:16:06 +0000 (20:16 -0500)]
delete this test file: it also appears as

src/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs

6 years agoadd test for `fn main() -> !`
Niko Matsakis [Fri, 23 Feb 2018 01:10:36 +0000 (20:10 -0500)]
add test for `fn main() -> !`

6 years agohandle `#[bench]` functions better
Niko Matsakis [Fri, 23 Feb 2018 01:09:10 +0000 (20:09 -0500)]
handle `#[bench]` functions better

6 years agoRun rustfmt over bitvec.rs and region_infer/values.rs
Santiago Pastorino [Thu, 22 Feb 2018 18:53:54 +0000 (15:53 -0300)]
Run rustfmt over bitvec.rs and region_infer/values.rs

6 years agoFix typo otherwies -> otherwise
Santiago Pastorino [Thu, 15 Feb 2018 22:35:11 +0000 (19:35 -0300)]
Fix typo otherwies -> otherwise

6 years agoUse Sparse bitsets instead of dense ones for NLL results
Santiago Pastorino [Thu, 15 Feb 2018 18:47:40 +0000 (15:47 -0300)]
Use Sparse bitsets instead of dense ones for NLL results

Fixes #48170

6 years agoremove tokenstream
Niko Matsakis [Thu, 22 Feb 2018 23:26:01 +0000 (18:26 -0500)]
remove tokenstream

6 years agoAuto merge of #48343 - Mark-Simulacrum:release-step, r=kennytm
bors [Thu, 22 Feb 2018 23:25:39 +0000 (23:25 +0000)]
Auto merge of #48343 - Mark-Simulacrum:release-step, r=kennytm

Update nightly to 1.26.0 and bootstrap from beta.

6 years agoMove word type and word size usage to constants & make it of 128 bits
Santiago Pastorino [Wed, 14 Feb 2018 23:30:49 +0000 (20:30 -0300)]
Move word type and word size usage to constants & make it of 128 bits

6 years agomove Termination trait to std::process
Niko Matsakis [Thu, 22 Feb 2018 22:36:55 +0000 (17:36 -0500)]
move Termination trait to std::process

6 years agoput the "unit test" logic into libtest
Niko Matsakis [Wed, 14 Feb 2018 15:06:12 +0000 (10:06 -0500)]
put the "unit test" logic into libtest

Also make `std::termination` module public and rename feature.

The lib feature needs a different name from the language feature.

6 years agobegin crate-relative paths with `crate`
Niko Matsakis [Sun, 11 Feb 2018 14:28:47 +0000 (09:28 -0500)]
begin crate-relative paths with `crate`

6 years agosupport unit tests with return values that implement `Terminaton`
Niko Matsakis [Thu, 8 Feb 2018 22:16:39 +0000 (17:16 -0500)]
support unit tests with return values that implement `Terminaton`

Extend `Termination` trait with a method to determine what happens
with a unit test.

This commit incorporates work by Bastian Köcher <git@kchr.de>.

6 years ago[docs] Minor wording changes to drain_filter docs
Matt Brubeck [Thu, 22 Feb 2018 20:05:30 +0000 (12:05 -0800)]
[docs] Minor wording changes to drain_filter docs

The docs currently say, "If the closure returns false, it will try
again, and call the closure on the next element."  But this happens
regardless of whether the closure returns true or false.

6 years agoSmall grammar fix to docs for String::new().
Anthony Deschamps [Thu, 22 Feb 2018 19:21:54 +0000 (14:21 -0500)]
Small grammar fix to docs for String::new().

6 years agoupdate tracking issue for nll
toidiu [Thu, 22 Feb 2018 14:13:44 +0000 (09:13 -0500)]
update tracking issue for nll

Point to the new tracing issue for nll

6 years agoAuto merge of #48399 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Thu, 22 Feb 2018 11:25:16 +0000 (11:25 +0000)]
Auto merge of #48399 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 12 pull requests

- Successful merges: #47379, #47833, #48106, #48198, #48314, #48325, #48335, #48352, #48354, #48360, #48382, #48397
- Failed merges:

6 years agoRollup merge of #48397 - ordovicia:pow_doc, r=GuillaumeGomez
Guillaume Gomez [Wed, 21 Feb 2018 15:29:57 +0000 (16:29 +0100)]
Rollup merge of #48397 - ordovicia:pow_doc, r=GuillaumeGomez

Take 2^5 as examples in document of pow()

Fixes #48396 by taking 2^5 as examples.

6 years agoRollup merge of #48382 - GuillaumeGomez:fix-rustdoc-test-panic, r=estebank
Guillaume Gomez [Wed, 21 Feb 2018 15:29:56 +0000 (16:29 +0100)]
Rollup merge of #48382 - GuillaumeGomez:fix-rustdoc-test-panic, r=estebank

Fix rustdoc test ICE

Fixes #48377.

r? @QuietMisdreavus

6 years agoRollup merge of #48360 - redcape:redcape-count-doc-fix, r=cramertj
Guillaume Gomez [Wed, 21 Feb 2018 15:29:55 +0000 (16:29 +0100)]
Rollup merge of #48360 - redcape:redcape-count-doc-fix, r=cramertj

Fix count usize link typo in docs

The docs point to isize when the link should be going to usize instead. Fix the doc.

6 years agoRollup merge of #48354 - m0ppers:add-read-until-link, r=aidanhs
Guillaume Gomez [Wed, 21 Feb 2018 15:29:54 +0000 (16:29 +0100)]
Rollup merge of #48354 - m0ppers:add-read-until-link, r=aidanhs

Add missing link for read_line

Seems I found a missing link 🔗

https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#errors-2

6 years agoRollup merge of #48352 - JakubAdamWieczorek:mailmap, r=petrochenkov
Guillaume Gomez [Wed, 21 Feb 2018 15:29:53 +0000 (16:29 +0100)]
Rollup merge of #48352 - JakubAdamWieczorek:mailmap, r=petrochenkov

Update .mailmap with my real name

Good morning, the Rust team!

Once upon a time I was a modest-scale contributor. Sadly, various turbulences made me step away from my participation in the project. It's great to see how far it's gone.

I would appreciate it if you accepted this small change to the .mailmap file so that it shows my real name as back then I was using an alias. If doubts arise if I am the same person, I will be happy to provide further evidence. :)

Kind regards.

6 years agoRollup merge of #48335 - Manishearth:shortcut-links, r=QuietMisdreavus
Guillaume Gomez [Wed, 21 Feb 2018 15:29:52 +0000 (16:29 +0100)]
Rollup merge of #48335 - Manishearth:shortcut-links, r=QuietMisdreavus

Implement implied shortcut links for intra-rustdoc-links

cc https://github.com/rust-lang/rust/issues/43466

Needs https://github.com/google/pulldown-cmark/pull/126

r? @QuietMisdreavus

6 years agoRollup merge of #48325 - frewsxcv:frewxcv-ignore, r=steveklabnik
Guillaume Gomez [Wed, 21 Feb 2018 15:29:51 +0000 (16:29 +0100)]
Rollup merge of #48325 - frewsxcv:frewxcv-ignore, r=steveklabnik

Mark doc examples w/ `extern` blocks as `ignore`.

Fixes https://github.com/rust-lang/rust/issues/48218.

6 years agoRollup merge of #48314 - frewsxcv:frewsxcv-broken-link, r=GuillaumeGomez
Guillaume Gomez [Wed, 21 Feb 2018 15:29:50 +0000 (16:29 +0100)]
Rollup merge of #48314 - frewsxcv:frewsxcv-broken-link, r=GuillaumeGomez

Fix broken documentation link.

None

6 years agoRollup merge of #48198 - csmoe:inform_type_annotations, r=estebank
Guillaume Gomez [Wed, 21 Feb 2018 15:29:48 +0000 (16:29 +0100)]
Rollup merge of #48198 - csmoe:inform_type_annotations, r=estebank

inform user where to give a type annotation

should resolve #47777
previous pull request https://github.com/rust-lang/rust/pull/47982 was closed because of a mistaken rebase.
r? @estebank

6 years agoRollup merge of #48106 - QuietMisdreavus:teleporting-crates, r=GuillaumeGomez
Guillaume Gomez [Wed, 21 Feb 2018 15:29:47 +0000 (16:29 +0100)]
Rollup merge of #48106 - QuietMisdreavus:teleporting-crates, r=GuillaumeGomez

rustdoc: move manual "extern crate" statements outside automatic "fn main"s in doctests

Gated on https://github.com/rust-lang/rust/pull/48095 - I based the branch atop that so i could show off the change in one of its tests, the actual change in this PR is just the last commit

There are a handful of unfortunate assumptions in the way rustdoc processes `extern crate` statements in doctests:

1. In the absence of an `extern crate` statement in the test, if the test also uses the local crate name, it will automatically insert an `extern crate cratename;` statement into the test.
2. If the doctest *does* include an `extern crate` statement, rustdoc will not automatically insert one, on the assumption that doing so would introduce a duplicate import.
3. If a doctest does not have the substring `fn main` outside a comment, rustdoc will wrap the whole doctest in a generated `fn main` so it can be compiled.

In short, whenever you write a doctest like this...

```rust
//! extern crate my_crate;
//! my_crate::some_cool_thing();
```

...rustdoc will turn it into (something like) this:

```rust
fn main() {
extern crate my_crate;
my_crate::some_cool_thing();
}
```

This creates issues when compiled, because now `my_crate` isn't even properly in scope! This forces people who want to have multiple crates in their doctests (or an explicit `extern crate` statement) to also manually include their own `fn main`, so rustdoc doesn't put their imports in the wrong place.

This PR just taps into another processing step rustdoc does to doctests: Whenever you add an `#![inner_attribute]` to the beginning of a doctest, rustdoc will actually splice those out and put it before the generated `fn main`. Now, we can just do the same with `extern crate`s at the beginning, too, and get a much nicer experience.

Now, the above example will be converted into this:

```rust
extern crate my_crate;
fn main() {
my_crate::some_cool_thing();
}
```

6 years agoRollup merge of #47833 - Aaron1011:final_auto_trait, r=GuillaumeGomez
Guillaume Gomez [Wed, 21 Feb 2018 15:29:46 +0000 (16:29 +0100)]
Rollup merge of #47833 - Aaron1011:final_auto_trait, r=GuillaumeGomez

Generate documentation for auto-trait impls

A new section is added to both both struct and trait doc pages.

On struct/enum pages, a new 'Auto Trait Implementations' section displays any synthetic implementations for auto traits. Currently, this is only done for Send and Sync.

![Auto trait implementations for Cloned](https://i.imgur.com/XtTV6IJ.png)

On trait pages, a new 'Auto Implementors' section displays all types which automatically implement the trait. Effectively, this is a list of all public types in the standard library.

![Auto trait implementors for Send](https://i.imgur.com/3GRBpTy.png)

Synthesized impls for a particular auto trait ('synthetic impls') take generic bounds into account. For example, a type
```rust
struct Foo<T>(T)
```
 will have 'impl<T> Send for Foo<T> where T: Send' generated for it.

Manual implementations of auto traits are also taken into account. If we have
the following types:

```rust
struct Foo<T>(T)
struct Wrapper<T>(Foo<T>)
unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes this sound somehow
```

Then Wrapper will have the following impl generated:
```rust
impl<T> Send for Wrapper<T>
```
reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send' to hold

Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are taken into account by synthetic impls:

![A ridiculous demonstration type](https://i.imgur.com/TkZMWuN.png)

However, if a type can *never* implement a particular auto trait (e.g. `struct MyStruct<T>(*const T)`), then a negative impl will be generated (in this case, `impl<T> !Send for MyStruct<T>`)

All of this means that a user should be able to copy-paste a syntheticimpl into their code, without any observable changes in behavior (assuming the rest of the program remains unchanged).

6 years agoRollup merge of #47379 - da-x:master, r=sfackler
Guillaume Gomez [Wed, 21 Feb 2018 15:29:45 +0000 (16:29 +0100)]
Rollup merge of #47379 - da-x:master, r=sfackler

Derive std::cmp::Reverse as Copy or Clone

If the type parameter is Copy or Clone, then `Reverse` should be too.

6 years agoTake 2^5 as examples in document of pow() (fixes #48396)
Hidehito Yabuuchi [Wed, 21 Feb 2018 13:30:40 +0000 (22:30 +0900)]
Take 2^5 as examples in document of pow() (fixes #48396)

Current document takes 2^4, which is equal to 4^2.
This example is not very helpful for those unfamiliar with math words in English and thus rely on example codes.

6 years agoFix rustdoc test ICE
Guillaume Gomez [Tue, 20 Feb 2018 19:30:29 +0000 (20:30 +0100)]
Fix rustdoc test ICE

6 years agoDo not run the default panic hook inside procedural macros. Fixes #47812
John Kåre Alsaker [Thu, 1 Feb 2018 17:10:56 +0000 (18:10 +0100)]
Do not run the default panic hook inside procedural macros. Fixes #47812

6 years agostage0 cfg cleanup
Mark Simulacrum [Sun, 18 Feb 2018 23:57:21 +0000 (16:57 -0700)]
stage0 cfg cleanup

6 years agoBootstrap from the 1.25 beta
Mark Simulacrum [Sun, 18 Feb 2018 23:50:53 +0000 (16:50 -0700)]
Bootstrap from the 1.25 beta

6 years agoSort synthetic impls bounds before rendering
Aaron Hill [Tue, 20 Feb 2018 01:27:28 +0000 (20:27 -0500)]
Sort synthetic impls bounds before rendering

This removes the implicit dependency on the iteration
order of FxHashMap

6 years agorustc_mir: optimize the deaggregator's expansion of statements.
Eduard-Mihai Burtescu [Fri, 16 Feb 2018 17:20:18 +0000 (19:20 +0200)]
rustc_mir: optimize the deaggregator's expansion of statements.

6 years agorustc_mir: don't run the deaggregator on arrays for now.
Eduard-Mihai Burtescu [Wed, 14 Feb 2018 14:10:25 +0000 (16:10 +0200)]
rustc_mir: don't run the deaggregator on arrays for now.

6 years agotest: use the right amount of CGUs in sepcomp-cci-copies to ensure deterministic...
Eduard-Mihai Burtescu [Wed, 7 Feb 2018 19:27:37 +0000 (21:27 +0200)]
test: use the right amount of CGUs in sepcomp-cci-copies to ensure deterministic splitting.

6 years agorustc_mir: always run the deaggregator.
Eduard-Mihai Burtescu [Wed, 7 Feb 2018 15:28:32 +0000 (17:28 +0200)]
rustc_mir: always run the deaggregator.

6 years agorustc_mir: do not remove dead user variables if debuginfo needs them.
Eduard-Mihai Burtescu [Wed, 7 Feb 2018 15:28:07 +0000 (17:28 +0200)]
rustc_mir: do not remove dead user variables if debuginfo needs them.

6 years agorustc_mir: handle all aggregate kinds in the deaggregator.
Eduard-Mihai Burtescu [Wed, 7 Feb 2018 13:27:00 +0000 (15:27 +0200)]
rustc_mir: handle all aggregate kinds in the deaggregator.

6 years agorustc_mir: use the "idiomatic" optimization gating in the deaggregator.
Eduard-Mihai Burtescu [Wed, 7 Feb 2018 12:36:03 +0000 (14:36 +0200)]
rustc_mir: use the "idiomatic" optimization gating in the deaggregator.

6 years agoFix count usize link typo in docs
Gil Cottle [Mon, 19 Feb 2018 20:51:48 +0000 (20:51 +0000)]
Fix count usize link typo in docs

6 years agoAdd missing link
Andreas Streichardt [Mon, 19 Feb 2018 16:19:30 +0000 (17:19 +0100)]
Add missing link

6 years agoUpdate .mailmap with my real name
Jakub Adam Wieczorek [Mon, 19 Feb 2018 13:21:47 +0000 (13:21 +0000)]
Update .mailmap with my real name

6 years agoFilter out non-macros in resolve_macro
Manish Goregaokar [Sun, 18 Feb 2018 23:44:24 +0000 (15:44 -0800)]
Filter out non-macros in resolve_macro

Fixes https://github.com/rust-lang/rust/issues/48341

6 years agoAdd test
Manish Goregaokar [Sun, 18 Feb 2018 22:55:48 +0000 (14:55 -0800)]
Add test

6 years agoGenerate shortcut links
Manish Goregaokar [Sun, 18 Feb 2018 22:32:34 +0000 (14:32 -0800)]
Generate shortcut links

6 years agoInclude shortcut links in markdown_links
Manish Goregaokar [Sun, 18 Feb 2018 21:37:52 +0000 (13:37 -0800)]
Include shortcut links in markdown_links

6 years agobump pulldown
Manish Goregaokar [Sun, 18 Feb 2018 21:33:56 +0000 (13:33 -0800)]
bump pulldown

6 years agoFix submodule ref
Aaron Hill [Mon, 19 Feb 2018 00:40:13 +0000 (19:40 -0500)]
Fix submodule ref

6 years agoRemove extra space in test
Aaron Hill [Sun, 18 Feb 2018 06:23:06 +0000 (01:23 -0500)]
Remove extra space in test

6 years agoDon't generate auto trait impls for type aliases
Aaron Hill [Sat, 17 Feb 2018 03:35:36 +0000 (22:35 -0500)]
Don't generate auto trait impls for type aliases

6 years agoRemove extra whitespace
Aaron Hill [Fri, 16 Feb 2018 16:24:29 +0000 (11:24 -0500)]
Remove extra whitespace

6 years agoFix inlining
Aaron Hill [Thu, 15 Feb 2018 23:45:52 +0000 (18:45 -0500)]
Fix inlining

6 years agoMore formatting fixups
Aaron Hill [Thu, 15 Feb 2018 22:21:26 +0000 (17:21 -0500)]
More formatting fixups

6 years agoMore formatting fixes
Aaron Hill [Sat, 10 Feb 2018 19:53:08 +0000 (14:53 -0500)]
More formatting fixes

6 years agoCleanup formatting
Aaron Hill [Sat, 10 Feb 2018 19:34:46 +0000 (14:34 -0500)]
Cleanup formatting

6 years agoFix merge conflicts
Aaron Hill [Thu, 1 Feb 2018 22:23:48 +0000 (17:23 -0500)]
Fix merge conflicts

6 years agoGenerate documentation for auto-trait impls
Aaron Hill [Wed, 22 Nov 2017 21:16:55 +0000 (16:16 -0500)]
Generate documentation for auto-trait impls

A new section is added to both both struct and trait doc pages.

On struct/enum pages, a new 'Auto Trait Implementations' section displays any
synthetic implementations for auto traits. Currently, this is only done
for Send and Sync.

On trait pages, a new 'Auto Implementors' section displays all types
which automatically implement the trait. Effectively, this is a list of
all public types in the standard library.

Synthesized impls for a particular auto trait ('synthetic impls') take
into account generic bounds. For example, a type 'struct Foo<T>(T)' will
have 'impl<T> Send for Foo<T> where T: Send' generated for it.

Manual implementations of auto traits are also taken into account. If we have
the following types:

'struct Foo<T>(T)'
'struct Wrapper<T>(Foo<T>)'
'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes
this sound somehow

Then Wrapper will have the following impl generated:
'impl<T> Send for Wrapper<T>'
reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send'
to hold

Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are
taken into account by synthetic impls

However, if a type can *never* implement a particular auto trait
(e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be
generated (in this case, 'impl<T> !Send for MyStruct<T>')

All of this means that a user should be able to copy-paste a synthetic
impl into their code, without any observable changes in behavior
(assuming the rest of the program remains unchanged).

6 years agoAuto merge of #48322 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sun, 18 Feb 2018 17:50:21 +0000 (17:50 +0000)]
Auto merge of #48322 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 6 pull requests

- Successful merges: #48194, #48273, #48274, #48275, #48282, #48312
- Failed merges:

6 years agoMark doc examples w/ `extern` blocks as `ignore`.
Corey Farwell [Sun, 18 Feb 2018 14:30:10 +0000 (09:30 -0500)]
Mark doc examples w/ `extern` blocks as `ignore`.

Fixes https://github.com/rust-lang/rust/issues/48218.

6 years agoRollup merge of #48312 - frewsxcv:frewsxcv-section-headings, r=QuietMisdreavus
Guillaume Gomez [Sun, 18 Feb 2018 12:21:03 +0000 (13:21 +0100)]
Rollup merge of #48312 - frewsxcv:frewsxcv-section-headings, r=QuietMisdreavus

Unify 'Platform-specific behavior' documentation headings.

None

6 years agoRollup merge of #48282 - Centril:spelling-fix/iter-repeat-with, r=kennytm
Guillaume Gomez [Sun, 18 Feb 2018 12:21:02 +0000 (13:21 +0100)]
Rollup merge of #48282 - Centril:spelling-fix/iter-repeat-with, r=kennytm

Fix spelling in core::iter::repeat_with: s/not/note

Fixes spelling error in https://github.com/rust-lang/rust/pull/48156#discussion_r168718452.
Tracking issue: https://github.com/rust-lang/rust/issues/48169

6 years agoRollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkor
Guillaume Gomez [Sun, 18 Feb 2018 12:21:01 +0000 (13:21 +0100)]
Rollup merge of #48275 - matthiaskrgr:codespell, r=kennytm,varkor

fix more typos found by codespell.

6 years agoRollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavus
Guillaume Gomez [Sun, 18 Feb 2018 12:20:59 +0000 (13:20 +0100)]
Rollup merge of #48274 - GuillaumeGomez:remove-hoedown, r=QuietMisdreavus

Remove hoedown from rustdoc

Finally the time has come!

r? @QuietMisdreavus

6 years agoRollup merge of #48273 - alercah:file-warning, r=joshtriplett
Guillaume Gomez [Sun, 18 Feb 2018 12:20:58 +0000 (13:20 +0100)]
Rollup merge of #48273 - alercah:file-warning, r=joshtriplett

Add a warning to File about mutability.

Fixes #47708.

6 years agoRollup merge of #48194 - GuillaumeGomez:doc-test-command, r=Mark-Simulacrum
Guillaume Gomez [Sun, 18 Feb 2018 12:20:57 +0000 (13:20 +0100)]
Rollup merge of #48194 - GuillaumeGomez:doc-test-command, r=Mark-Simulacrum

Doc test command

r? @Mark-Simulacrum

6 years agoAuto merge of #47687 - SimonSapin:panic-impl, r=sfackler
bors [Sun, 18 Feb 2018 06:02:35 +0000 (06:02 +0000)]
Auto merge of #47687 - SimonSapin:panic-impl, r=sfackler

RFC 2070 part 1: PanicInfo and Location API changes

This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html
Tracking issue: https://github.com/rust-lang/rust/issues/44489

* Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`.
* Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`.
* Implement `Display` for `PanicInfo` and `Location`

6 years agoAuto merge of #47544 - U007D:master, r=nikomatsakis
bors [Sun, 18 Feb 2018 03:12:14 +0000 (03:12 +0000)]
Auto merge of #47544 - U007D:master, r=nikomatsakis

Relax termination_trait's error bound

As per [this conversation](https://github.com/withoutboats/failure/issues/130#issuecomment-358572413) with @withoutboats and @bkchr

6 years agofix tyvar_behind_raw_pointer error code
csmoe [Sun, 18 Feb 2018 03:07:52 +0000 (11:07 +0800)]
fix tyvar_behind_raw_pointer error code

6 years agoFix broken documentation link.
Corey Farwell [Sun, 18 Feb 2018 01:57:00 +0000 (20:57 -0500)]
Fix broken documentation link.

6 years agoUnify 'Platform-specific behavior' documentation headings.
Corey Farwell [Sun, 18 Feb 2018 01:54:26 +0000 (20:54 -0500)]
Unify 'Platform-specific behavior' documentation headings.

6 years agofix E0260 error index doctest
QuietMisdreavus [Mon, 12 Feb 2018 16:32:04 +0000 (10:32 -0600)]
fix E0260 error index doctest