Commit Graph

73892 Commits

Author SHA1 Message Date
Guillaume Gomez
0f84ab4a41 Rollup merge of #47535 - Manishearth:ignore-target, r=kennytm
add target/ to ignored tidy dirs

Sometimes you get a target directory from running cargo in the rust repo (the root is `src/`), and it contains generated files. Just whitelist it since it causes tidy to spew warnings uncontrollably.
2018-01-20 22:32:46 +01:00
Guillaume Gomez
b21499e768 Rollup merge of #47532 - tbu-:pr_path_oddities, r=TimNN
Add some edge cases to the documentation of `Path`

Affected methods are `starts_with` and `strip_prefix`.
2018-01-20 22:32:45 +01:00
Guillaume Gomez
5381dfb7d9 Rollup merge of #47510 - sfackler:deprecate-dns, r=alexcrichton
Deprecate std::net::lookup_host

We intended to do this quite a while ago but it snuck through.

r? @alexcrichton
2018-01-20 22:32:44 +01:00
Guillaume Gomez
d3176efa78 Rollup merge of #47508 - QuietMisdreavus:rbe-bookshelf, r=steveklabnik
add Rust By Example to the bookshelf

cc #46194

With #46196 freshly merged, we should add a link to the main docs distribution so people can find it! We discussed this at the docs team meeting today and decided to go ahead with adding it to the bookshelf.
2018-01-20 22:32:43 +01:00
Guillaume Gomez
0e270fc842 Rollup merge of #47193 - cramertj:result-opts, r=TimNN
Add transpose conversions for nested Option and Result

These impls are useful when working with combinator
methods that expect an option or a result, but you
have a `Result<Option<T>, E>` instead of an `Option<Result<T, E>>`
or vice versa.
2018-01-20 22:32:42 +01:00
Guillaume Gomez
fe811eb328 Rollup merge of #46938 - hellow554:rustdoc-kbd-style, r=GuillaumeGomez
add kbd style tag to main.css in rustdoc

Added css style for kbd tags so they actually look like keys.
Result preview and discussion was going on in #46900 .
2018-01-20 22:32:41 +01:00
Ed Schouten
e47cc69697 Add testing coverage for assigning to immutable thread-locals.
It is currently allowed to perform such assignments when not making use
of NLL. NLL already does this right, but let's add a test in place to
ensure it never regresses.
2018-01-20 21:48:55 +01:00
Esteban Küber
067405044c Fix tests by keepeing needed suggestions 2018-01-20 12:02:40 -08:00
bjorn3
a30232f9fd Remove the 'extern "C"' in the right place 2018-01-20 17:27:15 +01:00
bors
15a1e2844d Auto merge of #46980 - zackmdavis:and_the_case_of_the_needlessly_parenthesized_arguments, r=petrochenkov
in which the unused-parens lint comes to cover function and method args

Resolves #46137.
2018-01-20 15:06:41 +00:00
bors
bdda8d6115 Auto merge of #46952 - SimonSapin:nonnull, r=alexcrichton
Rename std::ptr::Shared to NonNull and stabilize it

This implements the changes proposed at https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629:

> * Rename `Shared<T>` to `NonNull<T>` and stabilize it. (Being in the `ptr` module is enough to say that it’s a pointer. I’m not very attached to this specific name though.)
> * Rename `Box<T>` methods ~~`from_unique`~~/`into_unique` to ~~`from_nonnull`~~/`into_nonnull` (or whatever names are deemed appropriate), replace `Unique<T>` with `NonNull<T>` in their signatures, and stabilize them.
> *  Replace `Unique<T>` with `NonNull<T>` in the signatures of methods of the `Alloc` trait.
> * Mark `Unique` “permanently-unstable” by replacing remaining occurrences of `#[unstable(feature = "unique", issue = "27730")]` with:
>
>   ```rust
>   #[unstable(feature = "ptr_internals", issue = "0", reason = "\
>       use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), \
>       Send, and/or Sync")]
>   ```
>
>   (Maybe the `reason` string is only useful on the struct definition.) Ideally it would be made private to some crate instead, but it needs to be used in both liballoc and libstd.
> * (Leave `NonZero` and `Zeroable` unstable for now, and subject to future bikeshedding.)
2018-01-20 12:28:13 +00:00
bjorn3
a4854e84f2 Fix ICE 2018-01-20 11:55:55 +01:00
Simon Sapin
602a445b92 Assign its own tracking issue to Box::into_raw_non_null
https://github.com/rust-lang/rust/issues/47336
2018-01-20 11:09:23 +01:00
Simon Sapin
76b686f78d Rename NonNull::empty to dangling. 2018-01-20 11:09:23 +01:00
Simon Sapin
5aeeafff49 Revert Box::into_raw_non_null to unstable 2018-01-20 11:09:23 +01:00
Simon Sapin
a1db237cd4 Preserve formatting options in Debug for NonNull/Unique 2018-01-20 11:09:23 +01:00
Simon Sapin
943a9e707c Fix some doc-comment examples for earlier API refactor
https://github.com/rust-lang/rust/pull/41064
2018-01-20 11:09:23 +01:00
Simon Sapin
12b3630f62 Rename Box::into_non_null_raw to Box::into_raw_non_null 2018-01-20 11:09:23 +01:00
Simon Sapin
8ef5e549c3 Remove Box::from_non_null_raw
Per https://github.com/rust-lang/rust/pull/46952#issuecomment-353956225
2018-01-20 11:09:23 +01:00
Simon Sapin
1772fa2aa1 Rename Box::*_nonnull_raw to *_non_null_raw 2018-01-20 11:09:23 +01:00
Simon Sapin
55c50cd8ac Stabilize std::ptr::NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin
2d51e74580 Remove a deprecated (renamed) and unstable method of NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin
c97c1f7dc3 Mark Unique as perma-unstable, with the feature renamed to ptr_internals. 2018-01-20 11:09:23 +01:00
Simon Sapin
a2f878a084 Replace Box::{from,into}_unique with {from,into}_nonnull_raw
Thew `_raw` prefix is included because the fact that `Box`’s ownership
semantics are "dissolved" or recreated seem more important than the exact
parameter type or return type.
2018-01-20 11:09:22 +01:00
Simon Sapin
fb03a49c25 Replace Unique<T> with NonZero<T> in Alloc trait 2018-01-20 10:55:16 +01:00
Simon Sapin
f19baf0977 Rename std::ptr::Shared to NonNull
`Shared` is now a deprecated `type` alias.

CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-20 10:55:16 +01:00
Corey Farwell
ba5d7a66e8 Implement Debug for ptr::Shared and ptr::Unique.
Fixes https://github.com/rust-lang/rust/issues/46755.
2018-01-20 10:55:16 +01:00
Esteban Küber
7ed00caacc Closure argument mismatch tweaks
- use consistent phrasing for expected and found arguments
 - suggest changing arugments to tuple if possible
 - suggest changing single tuple argument to arguments if possible
2018-01-20 01:36:01 -08:00
ritiek
dbb6519937 NLL test for mutating &mut references 2018-01-20 11:14:03 +05:30
Josh Stone
e2f6b280ea Update DW_OP_plus to DW_OP_plus_uconst
LLVM <= 4.0 used a non-standard interpretation of `DW_OP_plus`.  In the
DWARF standard, this adds two items on the expressions stack.  LLVM's
behavior was more like DWARF's `DW_OP_plus_uconst` -- adding a constant
that follows the op.  The patch series starting with [D33892] switched
to the standard DWARF interpretation, so we need to follow.

[D33892]: https://reviews.llvm.org/D33892
2018-01-19 21:43:53 -08:00
Santiago Pastorino
8f2cc02bc3 Run yield-subtype test on nll mode too as a regression check 2018-01-19 21:32:43 -05:00
Santiago Pastorino
fcb9e928b7 Integrate generators to universal region setup 2018-01-19 21:32:43 -05:00
Niko Matsakis
5d259b23a4 change MIR dump format to include yield type 2018-01-19 21:31:35 -05:00
bors
816d765716 Auto merge of #46919 - michaelwoerister:new-leb128, r=sfackler
Speed up leb128 encoding and decoding for unsigned values.

Make the implementation for some leb128 functions potentially faster.

@Mark-Simulacrum, could you please trigger a perf.rlo run?
2018-01-20 02:00:13 +00:00
Niko Matsakis
67f922bfcc
fix line 2018-01-19 16:46:07 -05:00
Niko Matsakis
9d629c641e
add ERROR annotation 2018-01-19 16:45:54 -05:00
Esteban Küber
6f9ecaa7cf Tweak wording and spans of closure lifetime errors 2018-01-19 13:28:43 -08:00
varkor
c4d0bb398b Fix tidy error 2018-01-19 21:00:35 +00:00
varkor
768cbbcd9e Fix type inhabitedness check for arrays
Arrays of uninhabited types were considered to also be uninhabited if
their length had not been evaluated, causing unsoundness.
2018-01-19 19:58:46 +00:00
bjorn3
82ac9f7532 Hopefully fix the 32bit SEGV 2018-01-19 20:27:52 +01:00
bjorn3
cc4deb2767 Just forget the DynamicLibrary after getting a hot plugged backend 2018-01-19 20:27:52 +01:00
bjorn3
a09aebee21 Remove accidential libloading dependency 2018-01-19 20:27:51 +01:00
bjorn3
c0444242ef Fix ICE 2018-01-19 20:27:36 +01:00
bjorn3
77dec3b03a Remove use of RUSTC_COMPILETEST env var 2018-01-19 20:27:36 +01:00
bjorn3
d2c53f8b4d Add missing licenses 2018-01-19 20:27:36 +01:00
bjorn3
4ef16d7466 Fix hotplug backend and add test 2018-01-19 20:27:36 +01:00
bjorn3
ace502a107 Fix review comments 2018-01-19 20:27:35 +01:00
bjorn3
2d241f66fe Cleanup hot plug codegen backend code 2018-01-19 20:27:35 +01:00
bjorn3
9315ed45c5 Hot plug rustc_trans 2018-01-19 20:27:33 +01:00
bjorn3
6dffaa9175 Hide even more of rustc_trans 2018-01-19 20:27:12 +01:00