Commit Graph

86381 Commits

Author SHA1 Message Date
Guillaume Gomez
9aedfd5a3b
Rollup merge of #55367 - GuillaumeGomez:private-item-doc-test-lint, r=QuietMisdreavus
lint if a private item has doctests

Fixes #55333.

r? @QuietMisdreavus
2018-11-22 10:37:43 +01:00
Petr Hosek
f41423c75f Pass additional linker flags when targeting Fuchsia
This is a follow up to 8aa9267 which changed the driver to use lld
directly rather than invoking it through Clang. This change ensures
we pass all the necessary flags to lld.
2018-11-22 00:59:37 -08:00
bors
f3adec65dd Auto merge of #53918 - Havvy:doc-sort-by, r=GuillaumeGomez
Doc total order requirement of sort(_unstable)_by

I took the definition of what a total order is from the Ord trait
docs. I specifically put "elements of the slice" because if you
have a slice of f64s, but know none are NaN, then sorting by
partial ord is total in this case. I'm not sure if I should give
such an example in the docs or not.

r? @GuillaumeGomez
2018-11-22 06:50:18 +00:00
Eduard-Mihai Burtescu
5b4747ded7 rustc_target: avoid using AbiAndPrefAlign where possible. 2018-11-22 05:01:49 +02:00
bors
4bec59c93b Auto merge of #56147 - petrochenkov:impice, r=nikomatsakis
resolve: Fix some asserts in import validation

The asserts are not actually correct in presence of ambiguity errors.

Fixes https://github.com/rust-lang/rust/issues/56125
2018-11-22 02:40:44 +00:00
Eduard-Mihai Burtescu
3ce8d444af rustc_target: separate out an individual Align from AbiAndPrefAlign. 2018-11-22 04:38:00 +02:00
Eduard-Mihai Burtescu
d56e892085 rustc_target: rename abi::Align to AbiAndPrefAlign. 2018-11-22 04:12:59 +02:00
Niko Matsakis
ebf3c8d8e9 add compile-pass annotation 2018-11-21 18:50:10 -05:00
bors
6612100de5 Auto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwco
Replace the ICEing on const fn loops with an error

fixes #56035
2018-11-21 23:24:15 +00:00
Vadim Petrochenkov
1dc1124979 resolve: Fix some asserts in import validation 2018-11-22 01:13:09 +03:00
Niko Matsakis
9cdf4911db hack: ignore list-stems for pub lint 2018-11-21 16:09:17 -05:00
Niko Matsakis
4c7ce7c897 pass vis by shared reference
We are not mutating it now.
2018-11-21 15:34:28 -05:00
Niko Matsakis
2bd2fc9418 add regression test 2018-11-21 15:34:28 -05:00
Niko Matsakis
4687eebc28 preserve the original visibility for the "list stem" node
Without this, the `vis` does not wind up in the tree anywhere, and
then we get ICEs because the node-ids it refers to are not present.
The motivation seemed to be documentation, but `ListStem` HIR nodes
are ignored in rustdoc, from what I can tell.
2018-11-21 15:34:11 -05:00
bors
0b9f19dff1 Auto merge of #56134 - oli-obk:clippy_documentation, r=nrc
Forward rust version number to tools

Clippy uses it to identify the correct documentation to point to

cc @Manishearth @nrc

sibling PR in clippy: https://github.com/rust-lang-nursery/rust-clippy/pull/3442
2018-11-21 20:26:15 +00:00
Niko Matsakis
a0a47904d6 renumber segment ids for visibilities whenever we clone them 2018-11-21 13:41:44 -05:00
Niko Matsakis
40f8094003 add some debug! into lowering 2018-11-21 13:41:44 -05:00
Niko Matsakis
d0a174d41b track the span for each id so that we can give a nice ICE 2018-11-21 13:41:44 -05:00
bors
910ec6d97f Auto merge of #56118 - steveklabnik:update-books, r=alexcrichton
Update books for Rust 2018

This PR:

1. updates all of the books
    * I don't know if @Gankro has further plans for the nomicon or not
2. updates the build process because TRPL is only distributing one edition now
3. fixes up the stdlib links

I think that this passes but it's 3:20 am and so I'm sending it in and will fix up anything i missed in the morning.

/cc @alexcrichton for the big beta backport
2018-11-21 15:56:32 +00:00
Oliver Scherer
33efce1c2f Forward rust version number to tools
Clippy uses it to identify the correct documentation to point to
2018-11-21 14:53:10 +01:00
bors
ee7bb94044 Auto merge of #56117 - petrochenkov:iempty, r=eddyb
resolve: Make "empty import canaries" invisible from other crates

Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc.
This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym).

Fixes https://github.com/rust-lang/rust/issues/55811
2018-11-21 12:54:10 +00:00
Steve Klabnik
d7b3f5c6ae update various stdlib docs 2018-11-21 06:50:17 -05:00
Tobias Bieniek
e538a4a7de core/benches/num: Add from_str/from_str_radix() benchmarks 2018-11-21 11:48:15 +01:00
Jethro Beekman
9e2e57511f Add x86_64-fortanix-unknown-sgx target to the compiler 2018-11-21 14:20:32 +05:30
bors
289ad6e992 Auto merge of #52591 - eddyb:functional-snakes, r=oli-obk
rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.

These are cruft left over from a time when `Foo::default()` didn't "just work".
2018-11-21 08:08:13 +00:00
Eduard-Mihai Burtescu
7683180be5 rustc: implement and use Default on more types. 2018-11-21 08:11:50 +02:00
Eduard-Mihai Burtescu
da622a3796 rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns. 2018-11-21 07:27:02 +02:00
Sergio Benitez
09e7051b7e Add unstable Literal::subspan(). 2018-11-20 21:17:20 -08:00
bors
780658a464 Auto merge of #56032 - petrochenkov:stabecip, r=nikomatsakis
Stabilize `extern_crate_item_prelude`

Closes https://github.com/rust-lang/rust/issues/55599
2018-11-21 02:30:35 +00:00
Steve Klabnik
57b7d55591 fix more links 2018-11-20 21:25:48 -05:00
Steve Klabnik
0579ef0166 fix rustbuild to build all the books 2018-11-20 21:25:48 -05:00
Steve Klabnik
240a55ce50 update books 2018-11-20 21:22:31 -05:00
Vadim Petrochenkov
1e4cf740cf resolve: Make "empty import canaries" invisible from other crates 2018-11-21 03:59:25 +03:00
Alex Crichton
25d0418bd7 ci: Download clang/lldb from tarballs
Hopefully will speed up CI slightly!
2018-11-20 15:56:58 -08:00
Vadim Petrochenkov
d4934c748f Add a couple more tests 2018-11-21 01:28:07 +03:00
Vadim Petrochenkov
1af682a557 Stabilize extern_crate_item_prelude 2018-11-21 01:27:23 +03:00
bors
f1e2fa8f04 Auto merge of #56111 - nrc:update, r=kennytm
Update RLS and Rustfmt

Re-opening https://github.com/rust-lang/rust/pull/56061

@bors: r=kennytm p=2
2018-11-20 21:06:55 +00:00
Nick Cameron
595bea6b33 Update RLS and Rustfmt 2018-11-21 08:30:47 +13:00
bors
c4cf115056 Auto merge of #55720 - RalfJung:const-eval-raw, r=oli-obk
Make const_eval_raw query return just an AllocId

r? @oli-obk
2018-11-20 18:08:12 +00:00
Simon Sapin
a4279a07e2 Capitalize 2018-11-20 18:22:40 +01:00
Simon Sapin
8a5bbd9a4e Add tracking issue for unfold and successors 2018-11-20 18:22:40 +01:00
Simon Sapin
641c4909e4 Add std::iter::successors 2018-11-20 18:22:40 +01:00
Simon Sapin
22228186c0 Copy is best avoided on iterators 2018-11-20 18:22:40 +01:00
Simon Sapin
544ad37753 Unfold<St, F>: Debug without F: Debug 2018-11-20 18:22:40 +01:00
Simon Sapin
48aae09e9f Add std::iter::unfold 2018-11-20 18:22:40 +01:00
bjorn3
9ce7b11e7c
Remove incorrect doc comment in rustc_mir::monomorphize::item 2018-11-20 17:32:46 +01:00
bjorn3
8a0909df79
Remove incorrect doc comment 2018-11-20 17:30:29 +01:00
bors
3991bfbbc2 Auto merge of #55663 - varkor:must_use-traits, r=estebank
Allow #[must_use] on traits

Addresses https://github.com/rust-lang/rust/issues/55506, but we'll probably want to add it to some library traits like `Iterator` before the issue is considered fixed. Fixes https://github.com/rust-lang/rust/issues/51560.

`#[must_use]` is already permitted on traits, with no effect, so this seems like a bug fix, but I might be overlooking something. This currently warns for `impl Trait` or `dyn Trait` when the `Trait` is `#[must_use]` (although I don't think the latter is currently possible, so it's simply future-proofed).
2018-11-20 15:15:53 +00:00
Axary
88d60941da improve error note 2018-11-20 14:43:16 +01:00
Olivier Goffart
4c21f66c1d Add comments and rename a local variable 2018-11-20 13:24:41 +01:00