Commit Graph

80038 Commits

Author SHA1 Message Date
Pietro Albini
f91b02b769
Rollup merge of #51979 - oli-obk:lowering_cleanups4, r=nikomatsakis
Get rid of `TyImplTraitExistential`

cc @eddyb

r? @nikomatsakis
2018-07-03 11:31:07 +02:00
Pietro Albini
5195132a35
Rollup merge of #51978 - estebank:issue-48364, r=oli-obk
Do not suggest changes to str literal if it isn't one

Fix #48364.
2018-07-03 11:31:06 +02:00
Pietro Albini
47eee2497a
Rollup merge of #51977 - mnd:fix-bootstrap-test-with-local-stage0, r=simulacrum
bootstrap: tests should use rustc from config.toml

Tests should always use "rustc" and "cargo" from config.toml instead of assuming that stage0 binaries was downloaded to build directory.

Without this change `./x.py test src/bootstrap` will always try to use `build/ARCH/stage0/bin/rustc` file as compiler, but when we use local compiler to bootstrap this file does not exist.
2018-07-03 11:31:04 +02:00
Pietro Albini
0ceeb1be31
Rollup merge of #51973 - estk:master, r=abonander
Make Stdio handle UnwindSafe

Closes  #51863

This is my first compiler PR. Thanks Niko for the mentor help!

r? @nikomatsakis
2018-07-03 11:31:03 +02:00
Pietro Albini
bd0fe736be
Rollup merge of #51958 - euclio:attr-refactor, r=petrochenkov
Show known meta items in unknown meta items error

This PR adds a label to E0541. It also factors built-in attribute parsing into a submodule of `attr` for ease of future refactoring.

Fixes #51469.
2018-07-03 11:31:01 +02:00
Pietro Albini
451560e96c
Rollup merge of #51914 - nikomatsakis:nll-fix-issue-issue-btreemap-annotations, r=gankro
add outlives annotations to `BTreeMap`

NLL requires these annotations, I believe because of <https://github.com/rust-lang/rust/issues/29149>.

Fixes #48224

r? @Gankro
cc @lqd
2018-07-03 11:31:00 +02:00
Pietro Albini
a3fc979b6b
Rollup merge of #51809 - drrlvn:rw_exact_all_at, r=alexcrichton
Add read_exact_at and write_all_at methods to FileExt on unix

This PR adds `FileExt::read_exact_at()` and `FileExt::write_all_at()`, which are to `read_at()` and `write_at()` as `read_exact()` and `write_all()` are to `read()` and `write()`. This allows the user to not have to deal with `ErrorKind::Interrupted` and calling the functions in a loop.

I was unsure as to how to mark these new methods so I marked them `unstable`, please let me know if I should have done it differently.

I asked in Discord and was told that as this change is small it does not require an RFC.
2018-07-03 11:30:59 +02:00
Pietro Albini
7fa03fb511
Rollup merge of #51548 - DiamondLovesYou:amdgpu-target-machine, r=alexcrichton
Initialize LLVM's AMDGPU target machine, if available.

Note this isn't useful, yet. More changes will be necessary to be able to
actually codegen for this machine. As such, it is not enabled by default.

This patch is on its own for the benefit of the reviewers.
2018-07-03 11:30:57 +02:00
bors
8fa9bfeb15 Auto merge of #51695 - est31:stdsimd_update, r=alexcrichton
Update stdsimd

Closes #51691
2018-07-03 07:06:46 +00:00
bors
0fb6e3994f Auto merge of #51564 - SimonSapin:try-int, r=alexcrichton
Implement always-fallible TryFrom for usize/isize conversions that are infallible on some platforms

This reverts commit 837d6c7023 "Remove TryFrom impls that might become conditionally-infallible with a portability lint".

This fixes #49415 by adding (restoring) missing `TryFrom` impls for integer conversions to or from `usize` or `isize`, by making them always fallible at the type system level (that is, with `Error=TryFromIntError`) even though they happen to be infallible on some platforms (for some values of `size_of::<usize>()`).

They had been removed to allow the possibility to conditionally having some of them be infallible `From` impls instead, depending on the platforms, and have the [portability lint](https://github.com/rust-lang/rfcs/pull/1868) warn when they are used in code that is not already opting into non-portability. For example `#[allow(some_lint)] usize::from(x: u64)` would be valid on code that only targets 64-bit platforms.

This PR gives up on this possiblity for two reasons:

* Based on discussion with @aturon, it seems that the portability lint is not happening any time soon. It’s better to have the conversions be available *at all* than keep blocking them for so long. Portability-lint-gated platform-specific APIs can always be added separately later.

* For code that is fine with fallibility, the alternative would force it to opt into "non-portability" even though there would be no real portability issue.
2018-07-03 04:08:02 +00:00
bors
81d5c3e783 Auto merge of #51428 - alexreg:uninitialized-statics-simplification, r=oli-obk
Removed `uninitialized_statics` field from `Memory` struct in miri

based on #51110

r? @oli-obk

CC @eddyb
2018-07-03 02:01:49 +00:00
bors
9078d3cdbc Auto merge of #51991 - oli-obk:clippy, r=kennytm
Update the clippy submodule

nth time is the charm? `x.py test src/tools/clippy` passes locally

r? @kennytm
2018-07-02 23:50:13 +00:00
bors
c8df60a146 Auto merge of #51944 - MajorBreakfast:generic-future-obj, r=cramertj
Make custom trait object for `Future` generic

- `TaskObj` -> `FutureObj<'static, ()>`
- The `impl From<...> for FutureObj<'a, T>` impls are impossible because of the type parameter `T`. The impl has to live in libstd, but `FutureObj<'a, T>` is from libcore. Therefore `Into<FutureObj<'a, T>>` was implemented instead. Edit: This didn‘t compile without warnings. I am now using non-generic Form impls.

See https://github.com/rust-lang-nursery/futures-rs/issues/1058

r? @cramertj

Edit: Added lifetime
2018-07-02 20:12:00 +00:00
Evan Simmons
9797665b28 Make Stdio handle UnwindSafe 2018-07-02 12:54:30 -07:00
bors
9363342be9 Auto merge of #51896 - nikomatsakis:nll-liveness-dirty-list, r=Zoxc
introduce dirty list to liveness, eliminate `ins` vector

At least in my measurements, this seems to knock much of the liveness computation off the profile.

r? @Zoxc
cc @nnethercote
2018-07-02 18:09:20 +00:00
Josef Reinhard Brandl
e666c2bd07 Implemented UnsafeFutureObj on Box 2018-07-02 19:21:32 +02:00
Josef Reinhard Brandl
ae408947de Implement UnsafeFutureObj for &mut Future 2018-07-02 19:07:59 +02:00
Oliver Schneider
239a0ffeee Update the clippy submodule 2018-07-02 19:07:35 +02:00
Josef Reinhard Brandl
5fde8b9237 Remove unnecessary PhantomData field 2018-07-02 18:57:58 +02:00
Josef Reinhard Brandl
cb2c7570db Add explanation for custom trait object 2018-07-02 18:55:42 +02:00
Nikolai Merinov
ddc1d29442 bootstrap: tests should use rustc from config.toml
Tests should always use "rustc" and "cargo" from config.toml instead
of assuming that stage0 binaries was downloaded to build directory.
2018-07-02 21:28:58 +05:00
est31
56e46255b3 Add some more additional functions to the shim
They are all needed now due to the stdsimd update.
2018-07-02 18:23:57 +02:00
Alexander Regueiro
6660c25045 Updated miri submodule. 2018-07-02 17:18:38 +01:00
Josef Reinhard Brandl
9eee0d2288 Fix naming convention issue 2018-07-02 18:16:36 +02:00
bors
b58b721921 Auto merge of #51321 - zackmdavis:hiridification_generations, r=eddyb
HirId-ification, continued

Another incremental step towards the vision of #50928 (previously: #50929).

r? @michaelwoerister
2018-07-02 16:04:54 +00:00
Niko Matsakis
59f2edbf1a add outlives annotations to BTreeMap
nll requires these annotations, I believe because of
https://github.com/rust-lang/rust/issues/29149
2018-07-02 11:49:33 -04:00
Niko Matsakis
78ea95258d improve comments 2018-07-02 11:40:49 -04:00
Dror Levin
73166f751b Fill in tracking issue number for read_exact_at/write_all_at 2018-07-02 17:38:15 +03:00
Alexander Regueiro
ea806e7815 Removed uninitialized_statics field from Memory struct in miri.
Refactored code accordingly.
2018-07-02 15:18:36 +01:00
bors
4faaf7e335 Auto merge of #51122 - oli-obk:clippy, r=Mark-Simulacrum
Did you mean to block nightlies on clippy?

Discussion: https://gitter.im/rust-lang/WG-clippy?at=5b073b6597a0361fb760cdc2

r? @alexcrichton

did I forget anything?

cc @nrc @Manishearth
2018-07-02 14:04:26 +00:00
Josef Reinhard Brandl
4e617291c2 Make drop method for PinMut's UnsafeFutureObj impl empty 2018-07-02 13:59:40 +02:00
Josef Reinhard Brandl
dd3b0337ff Improve doc comments for FutureObj 2018-07-02 13:59:40 +02:00
Josef Reinhard Brandl
042928f0f5 UnsafeFutureObj impl for PinMut 2018-07-02 13:59:40 +02:00
Josef Reinhard Brandl
d8bf222367 Add lifetime to FutureObj 2018-07-02 13:59:40 +02:00
Josef Reinhard Brandl
9f70e7fe3c Use From impls for FutureObj<()> 2018-07-02 13:59:39 +02:00
Josef Reinhard Brandl
3d43f828f5 Make custom trait object for Future generic 2018-07-02 13:59:39 +02:00
bors
e75e78256f Auto merge of #51645 - marco-c:error_when_incremental_and_profile, r=michaelwoerister
Raise an error if gcov profiling and incremental compilation are both enabled

Fixes #50203.
2018-07-02 11:58:45 +00:00
Oliver Schneider
78adefd15d Clippy tool also has only a single LICENSE file 2018-07-02 13:57:29 +02:00
est31
563dacd648 Update stdsimd 2018-07-02 12:53:46 +02:00
Oliver Schneider
75a6fde6a4 Update rustdoc 2018-07-02 10:37:49 +02:00
Oliver Schneider
6d114399f8 Make sure clippy does not duplicate depenencies 2018-07-02 10:36:07 +02:00
bors
a96c88e80f Auto merge of #51893 - nnethercote:BTreeMap-clone-noalloc, r=nnethercote
Make `BTreeMap::clone()` not allocate when cloning an empty tree.

r? @Gankro

CC @porglezomp
2018-07-02 08:28:12 +00:00
Oliver Schneider
6e5b9c1472 Get rid of TyImplTraitExistential 2018-07-02 09:17:38 +02:00
bors
a53bd20fae Auto merge of #51931 - cramertj:rm-libbacktrace, r=alexcrichton
Use in-tree libbacktrace on Fuchsia

cc @abarth

r? @alexcrichton
(welcome back! 😄 )
2018-07-02 06:32:16 +00:00
Zack M. Davis
f23d90a147 add FIXMEs pleading for post-@ edit of commentary on mem_categorization
(The present author fears not being knowledgeable enough to rewrite the
comments unilaterally; merely calling it out is a lazy half-measure, but
at least doesn't actively make things worse the way an ill-informed
rewrite would.)
2018-07-01 22:27:29 -07:00
Zack M. Davis
735d1bd5e6 use HirId in middle::mem_categorization::cmt_, and consequences of that
For the HirIdification initiative #50928.
2018-07-01 22:27:29 -07:00
bors
45935640f0 Auto merge of #51866 - zackmdavis:hir_making_each_day_of_the_year, r=petrochenkov
add modifier keyword spans to hir::Visibility; improve unreachable-pub, private-no-mangle lint suggestions

#50455 pointed out that the unreachable-pub suggestion for brace-grouped `use`s was bogus; #50476 partially ameliorated this by marking the suggestion as `Applicability::MaybeIncorrect`, but this is the actual fix.

Meanwhile, another application of having spans available in `hir::Visibility` is found in the private-no-mangle lints, where we can now issue a suggestion to use `pub` if the item has a more restricted visibility marker (this seems much less likely to come up in practice than not having any visibility keyword at all, but thoroughness is a virtue). While we're there, we can also add a helpful note if the item does have a `pub` (but triggered the lint presumably because enclosing modules were private).

![hir_vis](https://user-images.githubusercontent.com/1076988/42018064-ca830290-7a65-11e8-9c4c-48bc846f861f.png)

r? @nrc
cc @Manishearth
2018-07-02 03:18:49 +00:00
Esteban Küber
e89db3030d Do not suggest changes to str literal if it isn't one 2018-07-01 20:03:35 -07:00
Nicholas Nethercote
f46f05bae8 Make BTreeMap::clone() not allocate when cloning an empty tree. 2018-07-02 13:03:31 +10:00
bors
5df43114bc Auto merge of #51864 - est31:libc_update, r=alexcrichton
Update liblibc

This updates the libc submodule
2018-07-02 01:16:13 +00:00