Commit Graph

76517 Commits

Author SHA1 Message Date
Simon Sapin
3542ff8e39 Hide the Bound type in docs at its deprecated location in std::collections 2018-03-29 13:12:50 +02:00
Simon Sapin
6960a960f1 Hide the deprecated std::collections::range module from docs 2018-03-29 13:12:50 +02:00
Simon Sapin
124453e6fe impl RangeBounds<T> for Range{,From,To,Inclusive,ToInclusive}<&T> 2018-03-29 13:12:49 +02:00
Simon Sapin
16d3ba1b23 Move RangeArguments to {core::std}::ops and rename to RangeBounds
These unstable items are deprecated:

* The `std::collections::range::RangeArgument` reexport
* The `std::collections::range` module.
2018-03-29 13:12:49 +02:00
Simon Sapin
c3a63970de Move alloc::Bound to {core,std}::ops
The stable reexport `std::collections::Bound` is now deprecated.

Another deprecated reexport could be added in `alloc`,
but that crate is unstable.
2018-03-29 13:12:49 +02:00
bors
409744bcb9 Auto merge of #49471 - matklad:cargo-rustdoc, r=alexcrichton
Update Cargo

This includes https://github.com/rust-lang/cargo/pull/5255 which fixed regression in `cargo rustdoc` command.

If beta branches before this is merged, we'll need to backport as well
2018-03-29 08:17:52 +00:00
Josh Triplett
39fe29bf0c src/libcore/ptr.rs: Fix documentation for size of Option<NonNull<T>>
Seems more useful to say that it has the same size as `*mut T`.
2018-03-29 09:46:16 +02:00
Niko Matsakis
1ef1b92379 add #[inline(never)] annotations 2018-03-29 03:44:00 -04:00
Aleksey Kladov
850156aa27 Update Cargo
This includes rust-lang/cargo#5255 which fixed regression in
`cargo rustdoc` command.
2018-03-29 10:35:15 +03:00
QuietMisdreavus
97aead0c6c tidy 2018-03-29 09:12:24 +02:00
Manish Goregaokar
195c6b4789 Fix test 2018-03-29 08:45:14 +02:00
Manish Goregaokar
b70cc53804 Add easy edition feature flag 2018-03-29 08:44:21 +02:00
Chris Manchester
bd8154784e Take the original extra-filename passed to a crate into account when
resolving it as a dependency.

Fixes #46816
2018-03-28 23:24:41 -07:00
bors
dca14701a5 Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakis
Remove universes from `ty::ParamEnv`

This change was never meant to land. #48407 takes an alternate approach. However, that PR is now blocked on some issues with canonicalization, and rebasing these reverts gets harder each time, so let's just get this bit out of the way now.

r? @nikomatsakis
2018-03-29 05:44:40 +00:00
bors
361509320c Auto merge of #49291 - tejom:check-for-known-but-incorrect-attributes, r=petrochenkov
Check for known but incorrect attributes

fixes #43988

- Change nested_visit_map so it will recursively check functions

- Add visit_stmt and visit_expr for impl Visitor for CheckAttrVisitor and check for incorrect
inline and repr attributes on staements and expressions

- Add regression test for issue #43988
2018-03-29 03:13:11 +00:00
Mike Hommey
6462c0bd7f Remove unnecessary use core::hash in liballoc/boxed.rs
It' only used for hash::Hasher, but Hasher is also imported.
2018-03-29 11:51:52 +09:00
bors
1e652bda20 Auto merge of #49458 - cramertj:stable-underscore-lt, r=nikomatsakis
Stabilize underscore lifetimes

r? @nikomatsakis
2018-03-29 00:41:15 +00:00
Mike Hommey
262be13643 Use f{32,64}::to_bits for is_zero test in vec::SpecFromElem
vec::SpecFromElem provides an optimization to use calloc to fill a Vec
when the element given to fill the Vec is represented by 0.

For floats, the test for that currently used is `x == 0. &&
x.is_sign_positive()`. When compiled in a standalone function, rustc
generates the following assembly:

```
  xorps xmm1, xmm1
  ucomisd xmm0, xmm1
  setnp al
  sete cl
  and cl, al
  movq rax, xmm0
  test rax, rax
  setns al
  and al, cl
  ret
```

A simpler test telling us whether the value is represented by 0, is
`x.to_bits() == 0`, which rustc compiles to:

```
  movq rax, xmm0
  test rax, rax
  sete al
  ret
```

Not that the test is hot in any way, but it also makes it clearer what
the intent in the rust code is.
2018-03-29 09:40:55 +09:00
Taylor Cramer
e6e6bd27d5 Stabilize underscore lifetimes 2018-03-29 00:27:50 +02:00
bors
d52c44ea8d Auto merge of #49460 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

- Successful merges: #49243, #49329, #49364, #49400, #49405, #49427, #49428, #49429, #49439, #49442, #49444, #49452
- Failed merges:
2018-03-28 22:18:13 +00:00
tinaun
97e0dc330f added test 2018-03-28 17:51:57 -04:00
tinaun
d2b9a77bdf check impl trait first 2018-03-28 17:51:57 -04:00
Oliver Middleton
77c70a8c47 rustbuild: Don't leak file handles when creating junctions on Windows
This fixes building the compiler docs because stage1-rustc\x86_64-pc-windows-msvc\doc is used twice which
doesn't work if we still have a handle from the first time.
2018-03-28 22:43:23 +01:00
tinaun
082e50d986
Don't mention unstable constructors in release notes 2018-03-28 17:39:27 -04:00
Guillaume Gomez
93f96be7d9 Fix tooltip position 2018-03-28 23:26:25 +02:00
bobtwinkles
d8352af934 Fix up tidy errors 2018-03-28 14:43:05 -04:00
Chris Manchester
9942012f41 Run make tests for file resolution 2018-03-28 11:38:32 -07:00
bors
e5277c1457 Auto merge of #49357 - frewsxcv:frewsxcv-termination-doc-examples, r=GuillaumeGomez
Remove hidden `foo` functions from doc examples; use `Termination` trait.

Fixes https://github.com/rust-lang/rust/issues/49233.

Easier to review with the white-space ignoring `?w=1` feature: https://github.com/rust-lang/rust/pull/49357/files?w=1
2018-03-28 18:11:44 +00:00
kennytm
30560bb99a
Rollup merge of #49452 - frewsxcv:frewsxcv-vec-cap-len, r=dtolnay
Clarify "length" wording in `Vec::with_capacity`.

Fixes https://github.com/rust-lang/rust/issues/49448.
2018-03-28 17:55:20 +02:00
kennytm
03de75e7c6
Rollup merge of #49444 - rust-lang:oli-obk-patch-1, r=Mark-Simulacrum
Delete leftover librustc_const_eval

Probably accidentally reintroduced in a rebase/merge

fixes #49440

r? @Mark-Simulacrum
2018-03-28 17:55:19 +02:00
kennytm
5dc80dc31f
Rollup merge of #49442 - GuillaumeGomez:text-overlap, r=QuietMisdreavus
Fix text overlap

Fixes #49006.

r? @QuietMisdreavus
2018-03-28 17:55:17 +02:00
kennytm
1a89250356
Rollup merge of #49439 - GuillaumeGomez:trait-impl-collapse, r=QuietMisdreavus
Fix trait implementation not collapsing docs

r? @QuietMisdreavus
2018-03-28 17:55:16 +02:00
kennytm
611ceef28d
Rollup merge of #49429 - GuillaumeGomez:fix-collapse-toggle-insertion, r=QuietMisdreavus
Fix collapse toggle insertions on impl with docs

Just went through this one randomly... When an impl has docs, the collapse toggle isn't generated. This fixes it.

r? @QuietMisdreavus
2018-03-28 17:55:14 +02:00
kennytm
294f041f13
Rollup merge of #49428 - cuviper:llvm6-target_feature, r=alexcrichton
Enable target_feature on any LLVM 6+

In `LLVMRustHasFeature()`, rather than using `MCInfo->getFeatureTable()`
that is specific to Rust's LLVM fork, we can use this in LLVM 6:

    /// Check whether the subtarget features are enabled/disabled as per
    /// the provided string, ignoring all other features.
    bool checkFeatures(StringRef FS) const;

Now rustc using external LLVM can also have `target_feature`.

r? @alexcrichton
2018-03-28 17:55:13 +02:00
kennytm
6ca14660af
Rollup merge of #49427 - Manishearth:rustdoc-impl-trait-extern, r=GuillaumeGomez
Correctly handle impl trait in external items in rustdoc

fixes #49373

r? @QuietMisdreavus
2018-03-28 17:55:12 +02:00
kennytm
c17ab378e9
Rollup merge of #49405 - GuillaumeGomez:search-appearance, r=QuietMisdreavus
Fix search appearance

Fixes #49377.

r? @QuietMisdreavus

And a screenshot:

<img width="1016" alt="screen shot 2018-03-27 at 10 33 01" src="https://user-images.githubusercontent.com/3050060/37956373-7b522852-31ab-11e8-8915-7e20064b5edd.png">
2018-03-28 17:55:10 +02:00
kennytm
010fb40b44
Rollup merge of #49400 - Diggsey:shrink-to, r=joshtriplett
Implement `shrink_to` method on collections

Fixes #49385
2018-03-28 17:55:09 +02:00
kennytm
0214304b5a
Rollup merge of #49364 - wesleywiser:incr_handle_load_failure, r=michaelwoerister
[incremental] Don't panic if decoding the cache fails

If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.

In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls and continuing without the cached data.

Fixes #48847
2018-03-28 17:55:08 +02:00
kennytm
4285e1cad4
Rollup merge of #49329 - canarysnort01:fix-no-pie, r=pnkfelix
don't pass -no-pie to gnu ld

fixes #48884
2018-03-28 17:55:07 +02:00
kennytm
43f56ce131
Rollup merge of #49243 - murarth:stabilize-retain, r=BurntSushi
Stabilize method `String::retain`

Closes #43874
2018-03-28 17:55:05 +02:00
bors
1169541e17 Auto merge of #49394 - cramertj:stable-match-bindings, r=nikomatsakis
Stabilize match_default_bindings

This includes a submodule update to rustfmt
in order to allow a stable feature declaration.

r? @nikomatsakis

cc https://github.com/rust-lang/rust/issues/42640

Many of the tests this PR touches are merely testing the current lack of desired future behavior around https://github.com/rust-lang/rust/issues/44849 and https://github.com/rust-lang/rust/issues/44848 (cc @tschottdorf). I noticed the bullets for those items were checked on the tracking issue-- I've unchecked them, as they don't appear to have been completed and I don't see any comments indicating that we don't want to pursue them further. Still, I think it's fine to stabilize the current behavior, as I think expanding it in the future should be backwards-compatible.
2018-03-28 15:31:29 +00:00
Matt Brubeck
0600d0f38d Stabilize fs::read and fs::write 2018-03-28 07:43:11 -07:00
bors
d87c19db6d Auto merge of #49019 - phil-opp:target-spec, r=pnkfelix
Introduce a TargetTriple enum to support absolute target paths

This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used.

The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension).

For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
2018-03-28 12:56:09 +00:00
Wesley Wiser
49fd71bea7 [incremental] Don't panic if decoding the cache fails
If the cached data can't be loaded from disk, just issue a warning to
the user so they know why compilation is taking longer than usual but
don't fail the entire compilation since we can recover by ignorning the
on disk cache.

In the same way, if the disk cache can't be deserialized (because it has
been corrupted for some reason), report the issue as a warning and
continue without failing the compilation. `Decodable::decode()` tends to
panic with various errors like "entered unreachable code" or "index out
of range" if the input data is corrupted. Work around this by catching
panics from the `decode()` calls when joining the thread and continuing
without the cached data.

Fixes #48847
2018-03-28 08:30:09 -04:00
Corey Farwell
0d15a3ee54 Clarify "length" wording in Vec::with_capacity. 2018-03-28 14:10:18 +02:00
QuietMisdreavus
d9bf37a5ae use --edition for doctests, rather than just the crate 2018-03-28 13:54:05 +02:00
Guillaume Gomez
51f26acaea Fix text overlap 2018-03-28 13:25:43 +02:00
Corey Farwell
b89fb71441 Clarify network byte order conversions for integer / IP address conversions.
Opened primarily to address https://github.com/rust-lang/rust/issues/48819.
2018-03-28 13:17:12 +02:00
Corey Farwell
e9dcec070d Remove hidden foo functions from doc examples; use Termination trait.
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-03-28 13:15:05 +02:00
Corey Farwell
1f143bc46f Explicitly mention Option in ? error message.
Save users the time/effort of having to lookup what types implement
the `Try` trait.
2018-03-28 13:04:44 +02:00