Commit Graph

76285 Commits

Author SHA1 Message Date
kennytm
e2b89221f1
Rollup merge of #49194 - Zoxc:unsafe-generator, r=cramertj
Make resuming generators unsafe instead of the creation of immovable generators

cc @withoutboats

Fixes #47787
2018-03-25 01:26:34 +08:00
kennytm
311814a1a9
Rollup merge of #49193 - davidtwco:issue-29893, r=alexcrichton
Host compiler documentation

Fixes #29893. Rust Central Station PR: rust-lang/rust-central-station#40

r? @alexcrichton
2018-03-25 01:26:33 +08:00
kennytm
8d57071cbb
Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakis
Stabilize termination_trait, split out termination_trait_test

For #48453.

First time contribution, so I'd really appreciate any feedback on how this PR can be better.

Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-25 01:26:32 +08:00
kennytm
c892e68387
Rollup merge of #49122 - scottmcm:z-align-attr, r=cramertj
Add a -Z flag for LLVM align attributes on arguments

LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.

For example, this makes `mem::swap::<u64x8>` be 8x `vmovaps	ymm` instead of 16x `vmovups	xmm`, on my cpu.
2018-03-25 01:26:30 +08:00
kennytm
adb7984f10
Rollup merge of #49121 - varkor:stabilise-from_utf8_error_as_bytes, r=bluss
Stabilise FromUtf8Error::as_bytes

Closes #40895.
2018-03-25 01:26:29 +08:00
kennytm
c5264a5932
Rollup merge of #49120 - Zoxc:parallel-ci, r=alexcrichton
Add a CI job for parallel rustc using x.py check

r? @alexcrichton
2018-03-25 01:26:28 +08:00
kennytm
23b4bf924f
Rollup merge of #49089 - alexcrichton:fix-timings, r=Mark-Simulacrum
rustbuild: Tweak where timing information goes

This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-25 01:26:27 +08:00
kennytm
17d39ed8d5
Rollup merge of #49076 - bobdavelisafrank:filetype-metadata-docfix, r=bluss
Fix Issue #48345, is_file, is_dir, and is_symlink note mutual exclusion

The methods on the structures `fs::FileType` and `fs::Metadata` of (respectively) `is_file`, `is_dir`, and `is_symlink` had some ambiguity in documentation, where it was not noted whether files will pass those tests exclusively or not. It is now written that the tests are mutually exclusive.

Fixes #48345.
2018-03-25 01:26:25 +08:00
kennytm
9c5f372a9a
Rollup merge of #49046 - Zoxc:error-summary, r=michaelwoerister
Always print `aborting due to n previous error(s)`

r? @michaelwoerister
2018-03-25 01:26:24 +08:00
Michal 'vorner' Vaner
433a03e6ff
fixup! Some comments and documentation for name resolution crate 2018-03-24 17:07:58 +01:00
Guillaume Gomez
4083bdff0b Fix impl assoc constant link not working 2018-03-24 16:38:16 +01:00
steveklabnik
36322d00df update books for next release 2018-03-24 15:31:02 +01:00
Jimmy Brush
7cae6fef71
don't pass -no-pie to gnu ld
fixes #48884
2018-03-24 10:01:46 -04:00
bors
b4aa80dd73 Auto merge of #49251 - nikomatsakis:issue-15872-elision-impl-header, r=cramertj
support elision in impl headers

You can now do things like:

```
impl MyTrait<'_> for &u32 { ... }
```

Each `'_` or elided lifetime is a fresh parameter. `'_` and elision are still not permitted in associated type values. (Plausibly we could support that if there is a single input lifetime.) The original lifetime elision RFC was a bit unclear on this point: [as documented here, I think this is the correct interpretation, both because it fits existing impls and it's most analogous to the behavior in fns](https://github.com/rust-lang/rust/issues/15872#issuecomment-338700138).

We do not support elision with deprecated forms:

```
impl MyTrait for std::cell::Ref<u32> { } // ERROR
```

Builds on the in-band lifetime stuff.

r? @cramertj

Fixes #15872
2018-03-24 13:23:17 +00:00
Scott McMurray
d6926ca12d Add a codegen test for exact_div intrinsic 2018-03-23 23:47:22 -07:00
Shotaro Yamada
4800afa5f5 Cleanup 2018-03-24 14:18:06 +09:00
Shotaro Yamada
dc7eb0eae6 Add test for impl Trait in argument position 2018-03-24 14:18:06 +09:00
Shotaro Yamada
287b29b608 Resolve impl Trait in argument position 2018-03-24 14:18:06 +09:00
Shotaro Yamada
5dfa5f048e Hide synthesized type parameters 2018-03-24 14:14:21 +09:00
bors
a0b0f5fba5 Auto merge of #48552 - kennytm:lower-unstable-priority, r=nikomatsakis
Lower the priority of unstable methods when picking a candidate.

Previously, when searching for the impl of a method, we do not consider the stability of the impl. This leads to lots of insta-inference-regressions due to method ambiguity when a popular name is chosen. This has happened multiple times in Rust's history e.g.

* `f64::from_bits` #40470
* `Ord::{min, max}` #42496
* `Ord::clamp` #44095 (eventually got reverted due to these breakages)
* `Iterator::flatten` #48115 (recently added)

This PR changes the probing order so that unstable items are considered last. If a stable item is found, the unstable items will not be considered (but a future-incompatible warning will still be emitted), thus allowing stable code continue to function without using qualified names.

Once the unstable feature is stabilized, the ambiguity error will still be emitted, but the user can also use newly stable std methods, while the current situation is that downstream user is forced to update the code without any immediate benefit.

(I hope that we could bring back `Ord::clamp` if this PR is merged.)
2018-03-24 04:43:24 +00:00
bors
ab0ef145ac Auto merge of #48482 - davidtwco:issue-47184, r=nikomatsakis
NLL should identify and respect the lifetime annotations that the user wrote

Part of #47184.

r? @nikomatsakis
2018-03-24 02:08:22 +00:00
Hidehito Yabuuchi
3d0ccb2a22 Fix test for PR #49268 2018-03-24 08:10:51 +09:00
bors
4be5d360cd Auto merge of #49311 - SimonSapin:bootstrap-vs-rustflags-the-return, r=Mark-Simulacrum
Use the same RUSTFLAGS for building and testing `bootstrap`

This avoids recompiling the whole dependency graph twice for every `./x.py test` run.

Fixes #49215
2018-03-23 23:08:13 +00:00
kennytm
17cc3d77d1
Track IsSuggestion in ProbeContext. Don't warn stability for suggestions. 2018-03-24 07:02:36 +08:00
kennytm
db4f3f93bc
Filed a proper tracking issue. 2018-03-24 07:02:35 +08:00
kennytm
28b2bba585
Specialize future-incompatibility warning for UNSTABLE_NAME_COLLISION. 2018-03-24 07:00:48 +08:00
kennytm
023274483e
Changed check_stability to take an Option<NodeId> instead of NodeId.
This clarifies the intent of whether to emit deprecated lint or not.
2018-03-24 06:58:02 +08:00
kennytm
abf4d8babf
When picking a candidate, consider the unstable ones last.
If there is potential ambiguity after stabilizing those candidates, a
warning will be emitted.
2018-03-24 06:58:01 +08:00
kennytm
1731bf8049
Provide a proper span when demanding for the return type of box x. 2018-03-24 06:55:06 +08:00
Hidehito Yabuuchi
f8fc5c0523 Fix error annotations in test 2018-03-24 07:54:20 +09:00
Hidehito Yabuuchi
3bfed9e43f Better diagnostics for '..' pattern fragment not in the last position 2018-03-24 07:54:20 +09:00
Sean Griffin
dd60beae47 Fix rustdoc 2018-03-23 15:57:49 -06:00
Mark Simulacrum
700fd5acd0 Remove getopts leftover from tree
This was attempted but left incomplete in PR #42664, where only the toml
file was removed.
2018-03-23 15:02:59 -06:00
Daniel Kolsoi
fdde09c70c Reduce scope of unsafe block in sun_path_offset 2018-03-23 17:01:34 -04:00
Sean Griffin
555f718c42 Fix failures after rebase 2018-03-23 14:35:14 -06:00
Guillaume Gomez
90588a9086 Fix IE11 search 2018-03-23 21:27:15 +01:00
Sean Griffin
c6935e57f1 Revert "add universes to type inference variables"
This reverts commit 13efaf0481.
2018-03-23 13:19:24 -06:00
Sean Griffin
1171ebf6f1 Revert "introduce UniverseIndex into ParamEnv"
This reverts commit d4df52cacb.
2018-03-23 13:18:50 -06:00
Sean Griffin
26cebda208 Revert "change skolemizations to use universe index"
This reverts commit 35e78b5cdd.
2018-03-23 13:18:50 -06:00
Sean Griffin
5ecefc55c1 Revert "fix tidy error"
This reverts commit a985634fc0.
2018-03-23 13:18:50 -06:00
Sean Griffin
8128ae3d39 Revert "fix tests in librustc_driver"
This reverts commit 17df455c2e.
2018-03-23 13:18:50 -06:00
Sean Griffin
3e971ebbdb Revert "change skolemizations to use universe index"
This reverts commit 755bdaa190.
2018-03-23 13:18:50 -06:00
Simon Sapin
e993e62341 Use the same RUSTFLAGS for building and testing bootstrap
Fixes #49215
2018-03-23 19:55:41 +01:00
bors
c08480fce0 Auto merge of #49308 - alexcrichton:rollup, r=alexcrichton
Rollup of 15 pull requests

- Successful merges: #48265, #48528, #48552, #48624, #48883, #48909, #49028, #49030, #49102, #49160, #49169, #49203, #49262, #49272, #49295
- Failed merges: #48942, #49035
2018-03-23 18:38:16 +00:00
Alex Crichton
0e6cd8b61a Test fixes 2018-03-23 11:37:42 -07:00
Simon Sapin
1efe0b3481 Rename variables in rustc’s SelectionContext::copy_clone_conditions 2018-03-23 19:02:14 +01:00
David Wood
4161ae7477
Improved comments for UserAssertTy statement. 2018-03-23 17:50:33 +00:00
Alex Crichton
3ebe12eb3e Merge branch '49001_epoch' of https://github.com/klnusbaum/rust into rollup 2018-03-23 10:16:42 -07:00
Alex Crichton
82bb41bdab Merge branch 'master' of https://github.com/Lymia/rust into rollup 2018-03-23 10:16:40 -07:00
Alex Crichton
d58abe75bb Rollup merge of #49295 - csmoe:nll_test_48238, r=alexcrichton
Add test for issue-48238

Fixes #48238
test case made from comments in #48238
2018-03-23 10:16:11 -07:00