Commit Graph

92618 Commits

Author SHA1 Message Date
Vadim Petrochenkov
fbbec76701 resolve: Consider erroneous imports used to avoid duplicate diagnostics 2019-04-28 22:36:57 +03:00
bors
bdfdbcd44d Auto merge of #60352 - Centril:const-incomplete-features, r=oli-obk
Float 'incomplete_features' out to a const for visibility

Float `let incomplete_features` out to a `const INCOMPLETE_FEATURES` and colocate near `active` features so that it is easier to find and edit.

r? @oli-obk

(use rollup)
2019-04-28 15:40:00 +00:00
Mazdak Farrokhzad
3f30082625 Float 'incomplete_features' out to a const for visibility. 2019-04-28 15:13:35 +02:00
bors
012c300706 Auto merge of #60351 - Centril:rollup-5xv3tka, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #60022 (Document `Item` type in `std::env::SplitPaths` iterator.)
 - #60270 (rustc: Flag metadata compatible with multiple CGUs)
 - #60325 (Document ast::ExprKind::Type)
 - #60347 (Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`)

Failed merges:

r? @ghost
2019-04-28 12:50:06 +00:00
Mazdak Farrokhzad
fe52f8e377
Rollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper
Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`

fixes #60331
2019-04-28 14:17:12 +02:00
Mazdak Farrokhzad
634e2daaa5
Rollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk
Document ast::ExprKind::Type

r? @oli-obk
2019-04-28 14:17:11 +02:00
Mazdak Farrokhzad
4711051b83
Rollup merge of #60270 - alexcrichton:metadata-multi-cgu, r=oli-obk
rustc: Flag metadata compatible with multiple CGUs

It looks like the `OutputType::Metadata` kind in the compiler was
misclassified in #38571 long ago by accident as incompatible with
codegen units and a single output file. This means that if you emit both
a linkable artifact and metadata it silently turns off multiple codegen
units unintentionally!

This commit corrects the situation to ensure that if `--emit metadata`
is used it doesn't implicitly disable multiple codegen units. This will
ensure we don't accidentally regress compiler performance when striving
to implement pipelined compilation!
2019-04-28 14:17:10 +02:00
Mazdak Farrokhzad
95abeb0705
Rollup merge of #60022 - nathankleyn:fix-issue-59543, r=Centril
Document `Item` type in `std::env::SplitPaths` iterator.

Previously there wasn't any documentation to show what the type of
`Item` was inside `std::env::SplitPaths`. Now, in the same format as
other examples of docs in `std` for `Iterator#Item`, we mention the
type.

This fixes #59543.

r? @steveklabnik
2019-04-28 14:17:08 +02:00
Yuki OKUSHI
3a487ea977 Remove unnecessary function 2019-04-28 19:31:54 +09:00
bors
3418d2f508 Auto merge of #60346 - dima74:patch-1, r=GuillaumeGomez
Fix default value for setting "Auto-hide item methods' documentation"

If I open any documentation page in incognito mode (for example [for `Option` enum](https://doc.rust-lang.org/nightly/std/option/enum.Option.html)), then methods will be collapsed, though [on the settings page](https://doc.rust-lang.org/nightly/settings.html) there will be displayed that "Auto-hide item methods' documentation" option is disabled.

If I understand correctly, property "Auto-hide item methods' documentation" [should be disabled by default](938d4ffe16/src/librustdoc/html/render.rs (L1969)), so correct check would be `property === "true"`. This is consistent with other options:

Options which are enabled by default are compared to `"false"`

938d4ffe16/src/librustdoc/html/render.rs (L1965-L1968)

938d4ffe16/src/librustdoc/html/static/main.js (L2238)
938d4ffe16/src/librustdoc/html/static/main.js (L2321)
938d4ffe16/src/librustdoc/html/static/main.js (L2070)

Options which are disabled by default are compared to `"true"`

938d4ffe16/src/librustdoc/html/render.rs (L1970-L1972)

938d4ffe16/src/librustdoc/html/static/main.js (L1389)
938d4ffe16/src/librustdoc/html/static/main.js (L2334)
2019-04-28 09:58:59 +00:00
Yuki OKUSHI
542357f52a Remove two-phase-beyond-autoref 2019-04-28 12:51:04 +09:00
Yuki OKUSHI
4eda15174e Remove two-phase-borrows 2019-04-28 12:22:47 +09:00
bors
5f0dc0e1ff Auto merge of #60333 - Centril:stabilize-iterator-copied, r=varkor
Stabilize Iterator::copied in 1.36.0

Per https://github.com/rust-lang/rust/issues/57127#issuecomment-487289429.

Closes https://github.com/rust-lang/rust/issues/57127.

r? @varkor
2019-04-28 01:46:11 +00:00
Dmitry Murzin
b6cfcd363b
Fix default value for setting "Auto-hide item methods' documentation" 2019-04-28 04:25:22 +03:00
bors
938d4ffe16 Auto merge of #60313 - cuviper:thinlto-import, r=alexcrichton
Limit internalization in LLVM 8 ThinLTO

Fixes #60184.
r? @alexcrichton
2019-04-27 19:53:00 +00:00
bors
a9c8c08ecb Auto merge of #60288 - Zoxc:update-rayon, r=nikomatsakis
Update rustc-rayon version

r? @nikomatsakis
2019-04-27 17:08:11 +00:00
Mazdak Farrokhzad
b71f8d4e1b Stabilize Iterator::copied in 1.36.0. 2019-04-27 16:45:30 +02:00
bors
c751c7a4f4 Auto merge of #60329 - Centril:rollup-wv8g1ex, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #60292 (Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>`)
 - #60307 (Make "Implementations on Foreign Types" items in sidebar link to specific impls)
 - #60309 (Add 1.34.1 release notes)
 - #60315 (bootstrap: use correct version numbers for llvm-tools and lldb)
 - #60316 (Use "capacity" as parameter name in with_capacity() methods)

Failed merges:

r? @ghost
2019-04-27 14:06:39 +00:00
Mazdak Farrokhzad
fa66b8a154
Rollup merge of #60316 - mgeier:rename-capacity-parameter, r=joshtriplett
Use "capacity" as parameter name in with_capacity() methods

See #60271.

The only place where I didn't change the parameter name is `RawVec`. The problem is that it has a `.cap()` method instead of the usual `.capacity()`:

597f432489/src/liballoc/raw_vec.rs (L200-L210)

Changing this would be a breaking change, and I guess that's not worth it.

But since I didn't change `.cap()` there, I didn't change the `cap` parameter name to `capacity`, either.
2019-04-27 14:12:42 +02:00
Mazdak Farrokhzad
7475db5cfa
Rollup merge of #60315 - pietroalbini:fix-tools-version, r=Mark-Simulacrum
bootstrap: use correct version numbers for llvm-tools and lldb

The current URLs for the `llvm-tools` and `lldb` components are a bit broken right now:

```
https://static.rust-lang.org/dist/2019-04-25/llvm-tools-1.34.1 (fc50f328b 2019-04-24)-aarch64-unknown-linux-gnu.tar.gz
```

This PR uses proper version numbers for those. Tested a dist build locally and everything works.

r? @Mark-Simulacrum
2019-04-27 14:12:41 +02:00
Mazdak Farrokhzad
7f685740ec
Rollup merge of #60309 - pietroalbini:relnotes-1.34.1, r=pietroalbini
Add 1.34.1 release notes

This is a backport of the release notes from the 1.34.1 release.

r? @ghost
2019-04-27 14:12:40 +02:00
Mazdak Farrokhzad
356a981455
Rollup merge of #60307 - dima74:fix/56018, r=GuillaumeGomez
Make "Implementations on Foreign Types" items in sidebar link to specific impls

This solves #56018 for most cases (though not work for foreign impls with same names)
2019-04-27 14:12:38 +02:00
Mazdak Farrokhzad
35dbc5ec47
Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakis
Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>`

Part of the suggested refactoring for https://github.com/rust-lang/rust/issues/42340. As expected, this is a little messy, because there are many places that the components of tuples are expected to be types, rather than arbitrary kinds. However, it should open up the way for a refactoring of `TyS` itself.

r? @nikomatsakis
2019-04-27 14:12:37 +02:00
Mazdak Farrokhzad
dfe802b929 Document ast::ExprKind::Type. 2019-04-27 12:06:02 +02:00
bors
d4a32d504a Auto merge of #59887 - eddyb:safer-metadata, r=Zoxc
rustc_metadata: more safely read/write the index positions.

This is a small part of a larger refactor, that I want to benchmark independently.
The final code would be even cleaner than this, so this is sort of an "worst case" test.
2019-04-27 08:13:23 +00:00
bors
cfeb9171b1 Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoerister
Use arenas to avoid Lrc in queries #1

Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-27 05:24:11 +00:00
bors
ab9c016395 Auto merge of #60306 - RalfJung:xargo, r=alexcrichton
include rustc-std-workspace-alloc in rust-src

This is needed to fix https://github.com/japaric/xargo/issues/240
2019-04-26 21:46:17 +00:00
varkor
a3470c6189 Update handling of Tuple 2019-04-26 21:09:32 +01:00
varkor
283ca7616c Replace &'tcx List<Ty<'tcx>> in Tuple with SubstsRef<'tcx> 2019-04-26 20:57:13 +01:00
varkor
728a2db35e Add expect_ty method to Kind 2019-04-26 20:57:13 +01:00
Dmitry Murzin
d2b4f4d452 Make "Implementations on Foreign Types" items in sidebar link to specific impls 2019-04-26 22:39:00 +03:00
John Kåre Alsaker
0e05a9bb85 Update rustc-rayon version 2019-04-26 19:08:36 +02:00
Matthias Geier
be12ab070d Use "capacity" as parameter name in with_capacity() methods
Closes #60271.
2019-04-26 18:43:24 +02:00
Pietro Albini
c1a45889ce
bootstrap: use correct version numbers for llvm-tools and lldb 2019-04-26 18:25:31 +02:00
Josh Stone
b4131e297e Limit internalization in LLVM 8 ThinLTO 2019-04-26 08:58:14 -07:00
Pietro Albini
01334eab17
update release notes for 1.34.1 2019-04-26 16:52:46 +02:00
Ralf Jung
3280b72bf6 include rustc-std-workspace-alloc in rust-src 2019-04-26 16:19:53 +02:00
bors
597f432489 Auto merge of #60303 - CryZe:patch-6, r=Centril
Stabilize pointer::align_offset

Closes #44488
2019-04-26 12:49:11 +00:00
Christopher Serr
cf9d6672b7 Remove feature gates from std and tests 2019-04-26 12:33:42 +02:00
Christopher Serr
3b1f1a6446
Stabilize pointer::align_offset
Closes #44488
2019-04-26 12:15:12 +02:00
bors
3ee9363786 Auto merge of #60240 - mati865:musl_toolchain, r=alexcrichton
Bootstrap x86_64 musl by itself

It should slightly reduce build time and prepares ground for musl native tests.

NOTE: I haven't tested artifacts yet (only the build).

Can I have double try?

r? @alexcrichton
2019-04-26 07:32:34 +00:00
bors
e8310a7714 Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasper
Add a tidy check for files with over 3,000 lines

Files with a large number of lines can cause issues in GitHub (e.g. https://github.com/rust-lang/rust/issues/60015) and also tend to be indicative of opportunities to refactor into less monolithic structures.

This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`.

Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in https://github.com/rust-lang/rust/issues/60015).
2019-04-26 04:42:10 +00:00
bors
180edc21ee Auto merge of #60296 - Centril:rollup-qh9la7k, r=Centril
Rollup of 12 pull requests

Successful merges:

 - #59734 (Prevent failure in case no space left on device in rustdoc)
 - #59940 (Set cfg(test) when rustdoc is running with --test option)
 - #60134 (Fix index-page generation)
 - #60165 (Add Pin::{into_inner,into_inner_unchecked})
 - #60183 (Chalkify: Add builtin Copy/Clone)
 - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.)
 - #60247 (Implement Debug for Place using Place::iterate)
 - #60259 (Derive Default instead of new in applicable lint)
 - #60267 (Add feature-gate for f16c target feature)
 - #60284 (Do not allow const generics to depend on type parameters)
 - #60285 (Do not ICE when checking types against foreign fn)
 - #60289 (Make `-Z allow-features` work for stdlib features)

Failed merges:

r? @ghost
2019-04-26 01:51:05 +00:00
Mazdak Farrokhzad
a133caab36
Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertj
Make `-Z allow-features` work for stdlib features

r? @cramertj
2019-04-26 03:50:26 +02:00
Mazdak Farrokhzad
66645340ed
Rollup merge of #60285 - estebank:icent, r=varkor
Do not ICE when checking types against foreign fn

Fix #60275.
2019-04-26 03:50:25 +02:00
Mazdak Farrokhzad
3a907cee97
Rollup merge of #60284 - varkor:const-param-of-type-param, r=cramertj
Do not allow const generics to depend on type parameters

Fixes https://github.com/rust-lang/rust/issues/60264. In b534cf992d (diff-aeb0880081a991f34aef2ab889e1fb7a), it was suggested that there might be a better place for this error, but as this bug already affects stable, it's probably worth merging this now, and refactoring afterwards (I can open an issue for this).
2019-04-26 03:50:24 +02:00
Mazdak Farrokhzad
4387f99fc5
Rollup merge of #60267 - gnzlbg:f16c_target_feature, r=alexcrichton
Add feature-gate for f16c target feature

r? @alexcrichton
2019-04-26 03:50:22 +02:00
Mazdak Farrokhzad
1738273ac3
Rollup merge of #60259 - sd234678:60181-derive-default-lints, r=Centril
Derive Default instead of new in applicable lint

Closes #60181

As far as I can see, at least within the `src/librustc_lint` directory this is the only place this is applicable.
2019-04-26 03:50:21 +02:00
Mazdak Farrokhzad
4d9d84999e
Rollup merge of #60247 - spastorino:place2_3, r=oli-obk
Implement Debug for Place using Place::iterate

r? @oli-obk
2019-04-26 03:50:20 +02:00
Mazdak Farrokhzad
7560c158f6
Rollup merge of #60225 - Centril:hir-exprkind-use-in-for-loops, r=oli-obk
Introduce hir::ExprKind::Use and employ in for loop desugaring.

In the `for $pat in $expr $block` desugaring we end with a `{ let _result = $match_expr; _result }` construct which makes `for` loops into a terminating scope and affects drop order. The construct was introduced in year 2015 by @pnkfelix in https://github.com/rust-lang/rust/pull/21984.

This PR replaces the construct with `hir::ExprKind::Use(P<hir::Expr>)` which is equivalent semantically but should hopefully be less costly in terms of compile time performance (to be determined).

This is extracted out of 91b0abdfb2 from https://github.com/rust-lang/rust/pull/59288 for easier review and so that the perf implications wrt. `for`-loops can be measured.

r? @oli-obk
2019-04-26 03:50:18 +02:00