Commit Graph

86988 Commits

Author SHA1 Message Date
Thomas de Zeeuw
380dd7d47b Add rc::Weak.ptr_eq 2018-12-03 10:49:27 +01:00
bors
7139e1c3ab Auto merge of #56305 - RalfJung:miri, r=oli-obk
update miri

This should make miri green again :)
(Includes https://github.com/solson/miri/pull/553)

r? @oli-obk
2018-12-03 09:36:10 +00:00
ljedrz
2043d30c2e codegen_llvm_back: improve allocations 2018-12-03 10:33:02 +01:00
Ralf Jung
27b9a94b8a update miri 2018-12-03 08:19:38 +01:00
Ralf Jung
44b0fd6202 update miri 2018-12-03 08:19:38 +01: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
Ariel Ben-Yehuda
59e9a1e75a pass the parameter environment to traits::find_associated_item
dropping the param-env on the floor is obviously the wrong thing to do.

The ICE was probably exposed by #54490 adding the problem-exposing use of
`traits::find_associated_item`.

Fixes #55380.
2018-12-03 00:53:17 +02: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
Guillaume Gomez
23abd182d8 Fix invalid line number match 2018-12-02 19:12:37 +01: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
Oliver Middleton
3b705a0ece rustbuild: Fix issues with compiler docs
* Create output directories for crates beforehand so rustdoc uses relative links
* Readd rustc_codegen_ssa
* Don't build out of tree dependencies for rustdoc like we don't for rustc
2018-12-02 17:00:21 +00:00
yui-knk
96bf06baf3 Remove not used DotEq token
Currently libproc_macro does not use `DotEq` token.
https://github.com/rust-lang/rust/pull/49545 changed libproc_macro
to not generate `DotEq` token.
2018-12-02 23:11:08 +09: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
bd20718c8f make the C part of compiler-builtins opt-out 2018-12-02 13:56:10 +01:00
Vadim Petrochenkov
eb1d2e637e Address review comments 2018-12-02 15:54:30 +03:00
Vadim Petrochenkov
2d4b633be3 Delay gensym creation for "underscore items" until name resolution
Prohibit `static _`
Fis unused import warnings for `use foo as _`
Add more tests for `use foo as _`
2018-12-02 15:42:30 +03:00
Vadim Petrochenkov
c658d73401 resolve: Avoid "self-confirming" resolutions in import validation 2018-12-02 15:42:30 +03:00
Ralf Jung
d605e1d055 explicitly control compiler_builts/c feature from libstd 2018-12-02 13:27:12 +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
yui-knk
172ec724af Fix "line longer than 100 chars" 2018-12-02 18:33:12 +09: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
yui-knk
70371fde17 Add description about crate for parse_visibility's comment
This rule was introduced by https://github.com/rust-lang/rust/pull/45401.
2018-12-02 17:01:44 +09:00
ljedrz
95f32f1ebd arena: improve common patterns 2018-12-02 08:18:46 +01:00
Hidehito Yabuuchi
1e18cc916f Update issue number of shrink_to methods to point the tracking issue 2018-12-02 16:08:08 +09: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
Mark Mansi
e7e96921c2 remove some uses of try! 2018-12-01 15:48:55 -06:00
Vadim Petrochenkov
12c9b79b68 Fix failing tidy (line endings on Windows) 2018-12-02 00:19:06 +03: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
Matthew Jasper
6000c2e0e1 Use visit_local to find 2PB activations 2018-11-30 21:49:43 +00:00
Matthew Jasper
4f5b8eace1 Remove the region_map field from BorrowSet 2018-11-30 21:48:31 +00:00
Matthew Jasper
d92287a4e9 Fix some rustc doc links 2018-11-30 21:22:04 +00:00