Commit Graph

79314 Commits

Author SHA1 Message Date
Tobias Stolzmann
65d119cbf6
Stabilize std::path::Path:ancestors 2018-06-18 19:49:45 +02:00
bors
862703e05e Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelix
Add existential type definitions

Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items.

r? @nikomatsakis
2018-06-18 14:34:52 +00:00
bors
c45ae9ea3a Auto merge of #51605 - ericfindlay:master, r=kennytm
Fixed minor error in Compiler Error Index, E0603.
2018-06-18 00:27:58 +00:00
bors
4f2936393e Auto merge of #51404 - clarcharr:never_hash, r=KodrAus
impl Hash for !

This was missing in some generic code I was writing and I figured that it would be worthwhile to add this. Blanket-requiring these traits to allow usage of errors in `HashSet`s and `HashMap`s isn't too unreasonable of a use case, and a prerequisite for allowing `!` as an error in such situations is this impl.
2018-06-17 22:25:34 +00:00
bors
86a8f1a637 Auto merge of #51529 - nodakai:improve-sys_common-mutex, r=oli-obk
libstd: add an RAII utility for sys_common::mutex::Mutex

It is indeed debatable whether or not we should introduce more sophistication like this to the lowest layer of a system library. In fact, `Drop::drop()` cannot be `unsafe` (IIRC there was a discussion on introducing an unsafe variant of `Drop` whose entire scope must be within `unsafe`)
2018-06-17 20:11:35 +00:00
bors
2b973e6532 Auto merge of #51555 - ccesare:remove_unused_variables_redox_os, r=kennytm
Removed two unused variables in os.rs

Issue #51419 suggested removing two unused variables in `libstd/sys/redox/os.rs`. This PR implements that change.

It compiles for me locally, but I haven't run any other tests.
2018-06-17 18:06:31 +00:00
bors
85a6cd9ab5 Auto merge of #51552 - ccesare:patch-1, r=kennytm
Minor language change to CONTRIBUTING.md

In the `#building` section, the doc read that a default configuration "shall use around 3.5 GB of disk space." Changed "shall use" to "requires," as I don't think it's meant to sound so prescriptive.
2018-06-17 16:07:29 +00:00
bors
9181741ede Auto merge of #51549 - PSeitz:patch-1, r=kennytm
Follow up to #51508, make parse_block public instead parse_block_expr

This is an follow up to #51508

I mistakenly made parse_block_expr public instead of parse_block.
This fixes this.
2018-06-17 14:05:43 +00:00
bors
499583aa92 Auto merge of #51392 - glaubitz:powerpc-tests, r=petrochenkov
test: Ignore some problematic tests on powerpc and powerpc64*

This updates the list of tests which can be safely ignored on powerpc and powerpc64*.
2018-06-17 11:53:56 +00:00
John Paul Adrian Glaubitz
d63aabcb36 test: Ignore some problematic tests on powerpc and powerpc64* 2018-06-17 12:00:47 +02:00
bors
594b05dd97 Auto merge of #51425 - QuietMisdreavus:thats-def-a-namespace-there, r=petrochenkov
refactor: create multiple HIR items for imports

When lowering `use` statements into HIR, they get a `Def` of the thing they're pointing at. This is great for things that need to know what was just pulled into scope. However, this is a bit misleading, because a `use` statement can pull things from multiple namespaces if their names collide. This is a problem for rustdoc, because if there are a module and a function with the same name (for example) then it will only document the module import, because that's that the lowered `use` statement points to.

The current version of this PR does the following:

* Whenever the resolver comes across a `use` statement, it loads the definitions into a new `import_map` instead of the existing `def_map`. This keeps the resolutions per-namespace so that all the target definitions are available.
* When lowering `use` statements, it looks up the resolutions in the `import_map` and creates multiple `Item`s if there is more than one resolution.
* To ensure the `NodeId`s are properly tracked in the lowered module, they need to be created in the AST, and pulled out as needed if multiple resolutions are available.

Fixes https://github.com/rust-lang/rust/issues/34843
2018-06-17 09:48:10 +00:00
bors
aec00f97e1 Auto merge of #51466 - joshlf:ref-split, r=dtolnay
Add Ref/RefMut map_split method

As proposed [here](https://internals.rust-lang.org/t/make-refcell-support-slice-splitting/7707).

TLDR: Add a `map_split` method that allows multiple `RefMut`s to exist simultaneously so long as they refer to non-overlapping regions of the original `RefCell`. This is useful for things like the slice `split_at_mut` method.
2018-06-17 07:49:25 +00:00
NODA, Kai
b81da27862 libstd: add an RAII utility for sys_common::mutex::Mutex
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-06-17 15:18:32 +08:00
bors
0f8f4903f7 Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavus
Add lint for intra link resolution failure

This PR is almost done, just remains this note:

```
note: requested on the command line with `-W intra-link-resolution-failure`
```

I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful!

cc @QuietMisdreavus
2018-06-17 02:57:40 +00:00
Eric Findlay
1eff1d414f Fixed minor error in Compiler Error Index, E0603. 2018-06-17 11:35:53 +09:00
bors
68da15eae9 Auto merge of #51596 - Mark-Simulacrum:bootstrap-racy-tests, r=petrochenkov
Prevent Windows filesystem races in bootstrap tests

Fixes #51595.

This also makes bootstrap tests run near last in `./x.py test` invocations
since they are unlikely to fail.

r? @petrochenkov
2018-06-16 23:48:16 +00:00
bors
ae46aefd5b Auto merge of #51594 - eddyb:issue-51582, r=nagisa
rustc_codegen_llvm: don't treat i1 as signed, even for #[repr(i8)] enums.

Fixes #51582. r? @nagisa cc @nox @oli-obk
2018-06-16 21:48:31 +00:00
bors
b7e94a148d Auto merge of #51558 - Manishearth:manish-is-stupid, r=oli-obk
Fix my comment on editions

me = idiot

r? @oli-obk
2018-06-16 19:49:33 +00:00
bors
b2bbb5a9b7 Auto merge of #51584 - QuietMisdreavus:globs-and-crosses, r=ollie27
rustdoc: process cross-crate glob re-exports

Turns out, we were deliberately ignoring glob re-exports when they were occurring across crates, even though we were fully processing them for local re-exports. This will at least bring the two into parity.

Fixes https://github.com/rust-lang/rust/issues/51252
2018-06-16 17:43:24 +00:00
Mark Simulacrum
b436dca9e6 Prevent Windows filesystem races in bootstrap tests 2018-06-16 11:12:15 -06:00
Mark Simulacrum
18bb86e5e1 Move bootstrap tests to the end of the default test run
Since they are unlikely to fail and are almost never going to fail
except with bootstrap changes (which would be tested locally anyway) it
makes sense to run these tests close to last.
2018-06-16 11:11:06 -06:00
bors
253205658e Auto merge of #51591 - pietroalbini:release-notes-fix, r=Mark-Simulacrum
Remove `?` macro separator compatibility note from 1.27 release notes

The implementation has been reverted in https://github.com/rust-lang/rust/pull/51417, so this no longer applies to 1.27.0.

r? @Mark-Simulacrum
2018-06-16 13:08:16 +00:00
Eduard-Mihai Burtescu
25c47a4885 rustc_codegen_llvm: don't treat i1 as signed, even for #[repr(i8)] enums. 2018-06-16 16:00:53 +03:00
Pietro Albini
b676b37988
Remove ? macro separator compatibility note from 1.27 release notes
The implementation has been reverted.
2018-06-16 13:39:35 +02:00
bors
61ba018093 Auto merge of #51562 - SimonSapin:transparent, r=cramertj
Stabilize #[repr(transparent)]

Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318
Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-16 10:59:40 +00:00
bors
a385095f9a Auto merge of #51550 - eddyb:queries-not-maps, r=nikomatsakis
rustc: rename ty::maps to ty::query.

Should've never been `maps` but "query system/engine" didn't fully settle from the start.

r? @michaelwoerister or @nikomatsakis
2018-06-16 08:48:46 +00:00
bors
01fb32b25f Auto merge of #51581 - GuillaumeGomez:keyword-doc, r=QuietMisdreavus
Keyword doc

Part of #51451.

r? @QuietMisdreavus
2018-06-16 06:38:16 +00:00
PSeitz
b1c0857f62 Follow up on https://github.com/rust-lang/rust/pull/51508, make parse_block public instead parse_block_expr
This is an follow up to #51508

I mistakenly made parse_block_expr public instead of parse_block.
This fixes this.
2018-06-16 08:00:14 +02:00
bors
68cee8bb36 Auto merge of #51411 - nnethercote:process_predicate, r=nikomatsakis
Speed up obligation forest code

Here are the rustc-perf benchmarks that get at least a 1% speedup on one or more of their runs with these patches applied:
```
inflate-check
        avg: -8.7%      min: -12.1%     max: 0.0%
inflate
        avg: -5.9%      min: -8.6%      max: 1.1%
inflate-opt
        avg: -1.5%      min: -2.0%      max: -0.3%
clap-rs-check
        avg: -0.6%      min: -1.9%      max: 0.5%
coercions
        avg: -0.2%?     min: -1.3%?     max: 0.6%?
serde-opt
        avg: -0.6%      min: -1.0%      max: 0.1%
coercions-check
        avg: -0.4%?     min: -1.0%?     max: -0.0%?
```
2018-06-16 03:06:10 +00:00
QuietMisdreavus
042f1df198 process cross-crate glob re-exports 2018-06-15 18:18:14 -05:00
bors
c6103160dd Auto merge of #51462 - Havvy:refactor-cmp, r=nikomatsakis
Refactor: Rename ExistentialPredicate::cmp to ExistentialPredicate::stable_cmp

See https://github.com/rust-lang/rust/pull/51276#discussion_r193549404 for
rationale.

Because stable_cmp takes three arguments and Ord::cmp takes two, I am confident that there is no shadowing happening here.

r? @nikomatsakis
2018-06-15 23:16:09 +00:00
Guillaume Gomez
1fcce48451 Add rustdoc-js tester should-fail option 2018-06-16 00:13:28 +02:00
Guillaume Gomez
e28502edca Fix search fn keyword 2018-06-15 23:23:25 +02:00
Guillaume Gomez
1dd1f95af8 Add doc for fn keyword 2018-06-15 23:23:11 +02:00
QuietMisdreavus
903e2c8afe turn expect_full_def_from_use into an iterator 2018-06-15 14:47:07 -05:00
bors
967c1f3be1 Auto merge of #50296 - cmdd:master, r=nikomatsakis
Add error message for using >= 65535 hashes for raw string literal escapes

Fixes #50111.
2018-06-15 19:05:25 +00:00
bors
24edc416ab Auto merge of #51565 - kennytm:fix-toolstate-on-appveyor, r=Mark-Simulacrum
Fix the recent spurious breakage on AppVeyor.

Fixed the spurious error introduced by d2b5b7603b due to a wrongly resolved relative path on AppVeyor.

This only starts to happen today because we just entered the last week of the 6-week cycle.
2018-06-15 16:38:08 +00:00
Guillaume Gomez
6a03884ce9 Fix issue on unix 2018-06-15 10:00:57 +02:00
Clar Charr
570590f727 impl Hash for ! 2018-06-14 23:26:38 -04:00
QuietMisdreavus
02121f36e8 add test for issue 34843 2018-06-14 17:47:35 -05:00
QuietMisdreavus
16cfa5c2ef rustdoc: discard struct ctors from imports 2018-06-14 17:47:35 -05:00
QuietMisdreavus
122b5b47c2 create multiple HIR items for a use statement 2018-06-14 17:47:28 -05:00
kennytm
770e45c9c9
Fix checkregression breakage of toolstate builder on AppVeyor. 2018-06-15 06:27:28 +08:00
Manish Goregaokar
dc943349bd Fix comment on editions 2018-06-14 11:21:48 -07:00
Chris Cesare
8f0909c979 Removed two unused variables 2018-06-14 11:39:28 -04:00
Eduard-Mihai Burtescu
5a5c7ded0d rustc: rename ty::maps to ty::query. 2018-06-14 18:05:12 +03:00
ccesare
3a76b876b8
Minor language change to CONTRIBUTING.md
In the `#building` section, the doc read that a default configuration "shall use around 3.5 GB of disk space." Changed "shall use" to "requires," as I don't think it's meant to sound so prescriptive.
2018-06-14 09:23:28 -04:00
bors
5205ae8bdc Auto merge of #51542 - ccesare:remove_update-reference, r=oli-obk
Removed various update-reference and update-all-references scripts

A PR that addresses #50853 changes that made `update-reference` and `update-all-references` scripts obsolete.
2018-06-13 23:29:51 +00:00
Chris Cesare
28872499bc Removed various update-reference and update-all-references scripts 2018-06-13 18:15:50 -04:00
Guillaume Gomez
231c61a76b Add missing allow_missing_docs 2018-06-13 23:30:35 +02:00