Commit Graph

86785 Commits

Author SHA1 Message Date
kennytm
17f6fc78c5
Rollup merge of #56416 - GuillaumeGomez:css-body, r=QuietMisdreavus
Remove unneeded body class selector

r? @QuietMisdreavus
2018-12-03 18:07:13 +08:00
kennytm
81752fd85d
Rollup merge of #56412 - petrochenkov:extself, r=Centril
Update tracking issue for `extern_crate_self`
2018-12-03 18:07:11 +08:00
kennytm
65e67025c8
Rollup merge of #56402 - scottmcm:better-marker-trait-example, r=Centril
Improve the unstable book example for #[marker] trait

The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.
2018-12-03 18:07:10 +08:00
kennytm
2cbcd36ca9
Rollup merge of #56401 - scottmcm:vecdeque-resize-with, r=dtolnay
Move VecDeque::resize_with out of the impl<T:Clone> block

I put this in the wrong `impl` block in https://github.com/rust-lang/rust/pull/56016, so fixing.

Tracking issue for the unstable method: https://github.com/rust-lang/rust/issues/41758#issuecomment-443077953
2018-12-03 18:07:09 +08:00
kennytm
441aaf8110
Rollup merge of #56395 - Centril:stabilize-dbg-macro, r=SimonSapin
Stabilize dbg!(...)

Per FCP in https://github.com/rust-lang/rust/issues/54306 (which is ~1 day from completion).

r? @SimonSapin

The PR is fairly isolated so a rollup should probably work.
2018-12-03 18:07:08 +08:00
kennytm
bf96a7bbed
Rollup merge of #56366 - alexreg:stabilise-self_in_typedefs, r=Centril
Stabilize self_in_typedefs feature

[**Tracking Issue**](https://github.com/rust-lang/rust/issues/49303)

r? @centril
2018-12-03 18:07:07 +08:00
kennytm
e9a805522c
Rollup merge of #56141 - jnqnfe:osstr_len_clarity, r=nagisa
[std] Osstr len clarity
2018-12-03 18:07:06 +08:00
bors
25c375413a Auto merge of #56394 - cuviper:interrupted-timeout, r=sfackler
Deal with EINTR in net timeout tests

We've seen sporadic QE failures in the timeout tests on this assertion:

    assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);

So there's an error, but not either of the expected kinds.  Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).

For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption.  For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
2018-12-03 07:10:15 +00:00
bors
a563ceb3b9 Auto merge of #56358 - nikic:mergefunc-aliases, r=rkruppe
Enable -mergefunc-use-aliases

If the Rust LLVM fork is used, enable the -mergefunc-use-aliases
flag, which will create aliases for merged functions, rather than
inserting a call from one to the other.

A number of codegen tests needed to be adjusted, because functions
that previously fell below the thunk limit are now being merged.
Merging is prevented in various ways now.

I expect that this is going to break something, somewhere, because
it isn't able to deal with aliases properly, but we won't find out
until we try :)

This fixes #52651.

r? @rkruppe
2018-12-03 02:27:15 +00:00
bors
b817d0b651 Auto merge of #56110 - varkor:inhabitedness-union-enum, r=cramertj
Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks

It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types.

This will also be more important in light of the changes at https://github.com/rust-lang/rust/pull/54125.

cc @RalfJung
2018-12-02 22:22:12 +00:00
bors
21f2684950 Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
Refactor rustc_codegen_ssa

cc #56108 (not all things are done yet)

This removes an unsafe method from cg_ssa.

r? @eddyb
cc @sunfishcode
2018-12-02 18:02:20 +00:00
bors
8660eba2b9 Auto merge of #56275 - RalfJung:win-mutex, r=SimonSapin
use MaybeUninit instead of mem::uninitialized for Windows Mutex

I hope this builds, I do not have a Windows machine to test...
2018-12-02 13:45:22 +00:00
Nikita Popov
850d2f1af0 Run name-anon-globals after all other passes
name-anon-globals should always be run at the very end of the pass
pipeline, as optimization passes (in particular mergefunc) may
introduce new anonymous globals.

I believe we did not run into this earlier because it requires the
rather specific combination of a) mergefunc merging two weak functions
b) compilation not using thinlto.
2018-12-02 14:41:39 +01:00
Ralf Jung
ebe69c06b3 avoid MaybeUninit::get_mut where it is not needed 2018-12-02 12:34:39 +01:00
Ralf Jung
f4f8b211a8 let FIXME refer to tracking issue 2018-12-02 12:29:54 +01:00
Ralf Jung
f9fb8d6435 no reason to use mutable references here at all 2018-12-02 12:16:43 +01:00
bors
9abc231212 Auto merge of #56378 - ljedrz:arena_tweaks, r=nagisa
arena: speed up TypedArena::clear and improve common patterns

- speed up `TypedArena::clear`: improves its performance by up to **33%** (in case of a single entry)
- simplify `DroplessArena::in_arena`
2018-12-02 11:14:14 +00:00
bors
0765eb95b5 Auto merge of #56406 - nrc:update, r=kennytm
Update RLS and Rustfmt

Closes #56261
2018-12-02 08:36:14 +00:00
ljedrz
95f32f1ebd arena: improve common patterns 2018-12-02 08:18:46 +01:00
bors
af7554d3a2 Auto merge of #56396 - dlrobertson:fix_va_list_tests, r=nikic
tests: Simplify VaList run-make test

The va_list tests were too complex and were causing some spurious
test failures on Windows.

Example: https://github.com/rust-lang/rust/pull/55011#issuecomment-443211097
2018-12-02 00:08:58 +00:00
Guillaume Gomez
08a6cf30f0 Remove unneeded body class selector 2018-12-01 18:20:43 +01:00
Vadim Petrochenkov
df0ab06073 Update tracking issue for extern_crate_self 2018-12-01 18:58:43 +03:00
bors
d311571906 Auto merge of #55275 - petrochenkov:extself, r=eddyb
experiment: Support aliasing local crate root in extern prelude

This PR provides some minimally invasive solution for the 2018 edition migration issue described in https://github.com/rust-lang/rust/issues/54647 and affecting proc macro crates.

`extern crate NAME as RENAME;` now accepts `NAME`=`self` and interprets it as referring to the local crate.
As with other `extern crate` items, `RENAME` in this case gets into extern prelude in accordance with https://github.com/rust-lang/rust/pull/54658, thus resolving https://github.com/rust-lang/rust/issues/54647.
```rust
extern crate self as serde; // Adds local crate to extern prelude as `serde`
```
This solution doesn't introduce any new syntax and has minimal maintenance cost, so it can be easily deprecated if something better is found in the future.

Closes https://github.com/rust-lang/rust/issues/54647
2018-12-01 12:45:52 +00:00
Vadim Petrochenkov
549bd45e9e resolve: Support aliasing local crate root in extern prelude 2018-12-01 14:38:47 +03:00
Nick Cameron
7a7445bdfd Update RLS and Rustfmt
Closes #56261
2018-12-02 00:33:23 +13:00
Scott McMurray
a3b7a21268 Improve the unstable book example for #[marker]
The previous one didn't actually use the Display&Debug bounds in any way, so I think this one is a bit more meaningful.
2018-12-01 02:07:50 -08:00
Scott McMurray
4c2c523a05 Move VecDeque::resize_with out of the impl<T:Clone> block 2018-11-30 23:54:27 -08:00
bors
d3ed34824c Auto merge of #56165 - RalfJung:drop-glue-type, r=eddyb,nikomatsakis
drop glue takes in mutable references, it should reflect that in its type

When drop glue begins, it should retag, like all functions taking references do. But to do that, it needs to take the reference at a proper type: `&mut T`, not `*mut T`.

Failing to retag can mean that the memory the reference points to remains frozen, and `EscapeToRaw` on a frozen location is a NOP, meaning later mutations cause a Stacked Borrows violation.

Cc @nikomatsakis @Gankro because Stacked Borrows
Cc @eddyb for the changes to miri argument passing (the intention is to allow passing `*mut [u8]` when `&mut [u8]` is expected and vice versa)
2018-12-01 07:06:17 +00:00
bors
aef4dbfaa7 Auto merge of #56391 - alexcrichton:less-compare-mode, r=Mark-Simulacrum
ci: Only run compare-mode tests on one builder

The run-pass test suite currently takes 30 minutes on Windows, and
that appears to be roughly split between two 15 minute runs of the test
suite: one without NLL and one with NLL. In discussion on Discord the
platform coverage of the NLL compare mode may not necessarily be worth
it, so this commit removes the NLL compare mode from tests by default,
and then reenables it on only one builder.
2018-12-01 03:04:12 +00:00
Mazdak Farrokhzad
f4cde5bc4e stabilize std::dbg!(...) 2018-12-01 02:54:09 +01:00
Josh Stone
f107514aef Deal with EINTR in net timeout tests
We've seen sporadic QE failures in the timeout tests on this assertion:

    assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);

So there's an error, but not either of the expected kinds.  Adding a
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).

For the cases that were using `read`, we can just use `read_exact` to
keep trying after interruption.  For those using `recv_from`, we have to
manually loop until we get a non-interrupted result.
2018-11-30 15:33:40 -08:00
Alex Crichton
8ee62bb239 ci: Only run compare-mode tests on one builder
The run-pass test suite currently takes 30 minutes on Windows, and
that appears to be roughly split between two 15 minute runs of the test
suite: one without NLL and one with NLL. In discussion on Discord the
platform coverage of the NLL compare mode may not necessarily be worth
it, so this commit removes the NLL compare mode from tests by default,
and then reenables it on only one builder.
2018-11-30 14:31:04 -08:00
Alexander Regueiro
d609fdf775 Updated ui tests. 2018-11-30 22:12:39 +00:00
Alexander Regueiro
7bc1255955 Removed chapter from Unstable Book. 2018-11-30 22:12:39 +00:00
Alexander Regueiro
aa5a4ef59d Removed feature gate. 2018-11-30 22:12:39 +00:00
Dan Robertson
28ca35fd13
tests: Simplify VaList run-make test
The va_list tests were too complex and were causing some spurious
test failures on Windows
2018-11-30 20:39:32 +00:00
bors
d09466ceb1 Auto merge of #56381 - kennytm:rollup, r=kennytm
Rollup of 19 pull requests

Successful merges:

 - #55011 (Add libstd Cargo feature "panic_immediate_abort")
 - #55821 (Use sort_by_cached_key when the key function is not trivial/free)
 - #56014 (add test for issue #21335)
 - #56131 (Assorted tweaks)
 - #56214 (Implement chalk unification routines)
 - #56216 (Add TryFrom<&[T]> for [T; $N] where T: Copy)
 - #56268 (Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`.)
 - #56324 (Use raw_entry for more efficient interning)
 - #56336 (Clean up and streamline the pretty-printer)
 - #56337 (Fix const_fn ICE with non-const function pointer)
 - #56339 (Remove not used option)
 - #56341 (Rename conversion util; remove duplicate util in librustc_codegen_llvm.)
 - #56349 (rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker)
 - #56355 (Add inline attributes and add unit to CommonTypes)
 - #56360 (Optimize local linkchecker program)
 - #56364 (Fix panic with outlives in existential type)
 - #56365 (Stabilize self_struct_ctor feature.)
 - #56367 (Moved some feature gate tests to correct location)
 - #56373 (Update books)
2018-11-30 19:24:17 +00:00
kennytm
a6c4771520
Rollup merge of #56214 - scalexm:unification, r=nikomatsakis
Implement chalk unification routines

`ResolventOps` and `AggregateOps` are mostly straightforwardly translated from chalk. I had caught a few bugs already in my `chalk` branch and backported fixes to this branch, but there may be other ones left. EDIT: I hope there are none left now :)

Fixes #54935.
2018-12-01 02:31:12 +08:00
kennytm
f3be931ab7
Rollup merge of #56337 - phansch:fix_const_ice, r=oli-obk
Fix const_fn ICE with non-const function pointer

Fixes #56164
2018-12-01 02:30:30 +08:00
kennytm
ecfe721620
Rollup merge of #56324 - Zoxc:int-ext, r=nikomatsakis
Use raw_entry for more efficient interning

Fixes https://github.com/rust-lang/rust/issues/56308#issuecomment-442492744
2018-12-01 02:29:45 +08:00
kennytm
2584d9216d
Rollup merge of #55011 - vi:panic_immediate_abort, r=alexcrichton
Add libstd Cargo feature "panic_immediate_abort"

It stop asserts and panics from libstd to automatically
include string output and formatting code.

Use case: developing static executables smaller than 50 kilobytes,
where usual formatting code is excessive while keeping debuggability
in debug mode.

May resolve #54981.
2018-12-01 02:25:46 +08:00
kennytm
440bda4dc8
Rollup merge of #56365 - alexreg:stabilise-self_struct_ctor, r=Centril
Stabilize self_struct_ctor feature.

[**Tracking Issue**](https://github.com/rust-lang/rust/issues/51994)
2018-12-01 02:03:59 +08:00
kennytm
8641b8d1e2
Rollup merge of #56373 - steveklabnik:update-books, r=Mark-Simulacrum
Update books

This pulls in @Gankro 's final nomicon changes, and adds the edition guide as a submodule.

This is the final doc backport to beta for 1.31, as well.
2018-12-01 02:03:58 +08:00
kennytm
fb2b2f5582
Rollup merge of #56367 - alexreg:move-feature-gate-tests-1, r=Centril
Moved some feature gate tests to correct location

I evidently need to create some sort of GitHub monitor tool that yells at people when they do this in their PRs. ;-)

r? @centril
2018-12-01 02:03:56 +08:00
kennytm
42bac05d72
Rollup merge of #56364 - dlrobertson:fix_55903, r=oli-obk
Fix panic with outlives in existential type

Don't panic in determining the privacy of a type if a lifetime outlives
generic exists in an existential type.

r? @oli-obk

Fixes: #55903
2018-12-01 02:03:54 +08:00
kennytm
ddc7ef2d07
Rollup merge of #56360 - alexcrichton:linkchecker-omg, r=pietroalbini
Optimize local linkchecker program

I noticed on a [recent build][1] that the linkchecker stage of CI took a
whopping 15 minutes of CI time for something that should be near
instantaneous. Some local profiling showed some very hot functions and
clones which were pretty easy to remove, and now instead of running in
minutes locally it runs in seconds.

[1]: https://ci.appveyor.com/project/rust-lang/rust/build/job/kptifw1kb1nm4xuu
2018-12-01 02:03:52 +08:00
kennytm
45aaaa70bb
Rollup merge of #56355 - Zoxc:inline-things, r=michaelwoerister
Add inline attributes and add unit to CommonTypes
2018-12-01 02:03:51 +08:00
kennytm
cb9add6303
Rollup merge of #56349 - davidtwco:issue-55396-inference-extension, r=nagisa
rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker

Part of #55396.

This commit modifies linker flavor inference to only remove the extension
to the linker when performing inference if that extension is a 'exe'.

r? @nagisa
cc @alexcrichton @japaric
2018-12-01 02:03:49 +08:00
kennytm
540f4cfa71
Rollup merge of #56341 - frewsxcv:frewsxcv-util-cstr, r=Mark-Simulacrum
Rename conversion util; remove duplicate util in librustc_codegen_llvm.
2018-12-01 02:03:47 +08:00
kennytm
78c598a7a2
Rollup merge of #56339 - yui-knk:remove_mir_stats_flag, r=alexcrichton
Remove not used option

`mir_stats` has not been used since 2b32cb90c7.
2018-12-01 02:03:45 +08:00