Commit Graph

86654 Commits

Author SHA1 Message Date
Adrian Heine né Lang
37f719e0d3
std::str Adapt documentation to reality 2018-11-22 15:26:16 +01:00
bors
dae6c93641 Auto merge of #56136 - matthiaskrgr:clippy, r=oli-obk
submodules: update clippy from f5d868c9 to 2f6881c6

Changes:

````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````

fixes clippy toolstate
2018-11-22 13:07:30 +00:00
Matthias Krüger
8e814ae608 submodules: update clippy from f5d868c9 to 2f6881c6
````
missed another one in the README
run "util/dev update_lints"
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Address 'clippy::single-match' dogfood lint
Fix nit
Address travis CI lint failure
Update trivially_copy_pass_by_ref with Trait stderr output
issue#3318 run trivially_copy_pass_by_ref for traits
Update trivially_copy_pass_by_ref with Trait examples
Fix awkward wording
Document how to lint local Clippy changes with locally built Clippy
Enable rustup clippy to refer to the correct documentation
rustup https://github.com/rust-lang/rust/pull/52591
remove unused allow() attributes, NFC
Add regression test
Don't emit suggestion when inside of a macro
````
2018-11-22 11:15:15 +01:00
Eduard-Mihai Burtescu
7c166f54b2 Move Cargo.{toml,lock} to the repository root directory. 2018-11-22 12:10:04 +02:00
bors
93fa2d76bd Auto merge of #56155 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 11 pull requests

Successful merges:

 - #55367 (lint if a private item has doctests)
 - #55485 (Return &T / &mut T in ManuallyDrop Deref(Mut) impl)
 - #55784 (Clarifying documentation for collections::hash_map::Entry::or_insert)
 - #55961 (Fix VecDeque pretty-printer)
 - #55980 (Suggest on closure args count mismatching with pipe span)
 - #56002 (fix #55972: Erroneous self arguments on bare functions emit subpar compilation error)
 - #56063 (Update any.rs documentation using keyword dyn)
 - #56067 (Add SGX target to rustc)
 - #56078 (Fix error message for `-C panic=xxx`.)
 - #56106 (Remove some incorrect doc comments)
 - #56126 (core/benches/num: Add `from_str/from_str_radix()` benchmarks)

Failed merges:

r? @ghost
2018-11-22 10:04:41 +00:00
Guillaume Gomez
61d7b3e9b0
Rollup merge of #56126 - Turbo87:bench-parse, r=alexcrichton
core/benches/num: Add `from_str/from_str_radix()` benchmarks

This was extracted from #55973

/cc @alexcrichton
2018-11-22 10:37:56 +01:00
Guillaume Gomez
6afecfd785
Rollup merge of #56106 - bjorn3:patch-1, r=alexcrichton
Remove some incorrect doc comments
2018-11-22 10:37:55 +01:00
Guillaume Gomez
1bc97081a5
Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichton
Fix error message for `-C panic=xxx`.

Fixes rust-lang/cargo#6334
2018-11-22 10:37:54 +01:00
Guillaume Gomez
b473157293
Rollup merge of #56067 - jethrogb:jb/sgx-target-spec, r=alexcrichton
Add SGX target to rustc

This adds the `x86_64-fortanix-unknown-sgx` target specification to the Rust compiler. See #56066 for more details about this target.
2018-11-22 10:37:53 +01:00
Guillaume Gomez
1646fc907e
Rollup merge of #56063 - 0xrgb:patch-1, r=joshtriplett
Update any.rs documentation using keyword dyn

This will fix #56062.
2018-11-22 10:37:51 +01:00
Guillaume Gomez
75d226ed76
Rollup merge of #56002 - Axary:master, r=estebank
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error

#55972

r? @estebank
2018-11-22 10:37:50 +01:00
Guillaume Gomez
636f0a9a1d
Rollup merge of #55980 - csmoe:issue-55891, r=estebank
Suggest on closure args count mismatching with pipe span

Closes #55891
r? @estebank
2018-11-22 10:37:49 +01:00
Guillaume Gomez
fa3941cb99
Rollup merge of #55961 - tromey:Bug-55944-vecdeque, r=nikomatsakis
Fix VecDeque pretty-printer

This fixes the VecDeque pretty-printer to handle cases where
head < tail.
Closes #55944
2018-11-22 10:37:48 +01:00
Guillaume Gomez
89e0fcee40
Rollup merge of #55784 - meltinglava:master, r=KodrAus
Clarifying documentation for collections::hash_map::Entry::or_insert

Previous version does not show that or_insert does not insert the passed value, as the passed value was the same value as what was already in the map.
2018-11-22 10:37:46 +01:00
Guillaume Gomez
1c57f0ab9c
Rollup merge of #55485 - petertodd:2018-10-manuallydrop-deref, r=TimNN
Return &T / &mut T in ManuallyDrop Deref(Mut) impl

Without this change the generated documentation looks like this:

    fn deref(&self) -> &<ManuallyDrop<T> as Deref>::Target

Returning the actual type directly makes the generated docs more clear:

    fn deref(&self) -> &T

Basically, compare how the impl for `Box<T>` and `ManuallyDrop<T>` looks in this screenshot:

![rust docs for ManuallyDrop as Deref](https://user-images.githubusercontent.com/7042/47673083-fc9dc280-db89-11e8-89b0-c6bde663feef.png)
2018-11-22 10:37:45 +01:00
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
Alex Crichton
d1cd4e8d0d Move a flaky process test out of libstd
This test ensures that everything in `env::vars()` is inherited but
that's not actually true because other tests may add env vars after we
spawn the process, causing the test to be flaky! This commit moves the
test to a run-pass test where it can execute in isolation.

Along the way this removes a lot of the platform specificity of the
test, using iteslf to print the environment instead of a foreign process.
2018-11-21 21:56:23 -08: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
ariasuni
ec3ac112e1 Make std::os::unix/linux::fs::MetadataExt::a/m/ctime* documentation clearer 2018-11-22 02:36:11 +01: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
Tom Tromey
d4ee1c93ff Fix BTreeSet and BTreeMap gdb pretty-printers
The BTreeSet and BTreeMap gdb pretty-printers did not take the node
structure into account, and consequently only worked for shallow sets.
This fixes the problem by iterating over child nodes when needed.

This patch avoids the current approach of implementing some of the
value manipulations in debugger-indepdendent code.  This was done for
convenience: a type lookup was needed for the first time, and there
currently are no lldb formatters for these types.

Closes #55771
2018-11-21 14:07:22 -07: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
Dan Aloni
b8ae7b801b macro_literal_matcher: fixes per petrochenkov's review 2018-11-21 21:31:47 +02:00
Dan Aloni
fc284c1eee Stabilize macro_literal_matcher 2018-11-21 21:31:46 +02: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
varkor
f039872766 Enclose type in backticks for "reached the recursion limit while auto-dereferencing" error 2018-11-21 16:06:24 +00: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
Masaki Hara
c6a803a286 Modify doc to reflect the unsized-locals improvement. 2018-11-21 22:20:22 +09:00
Masaki Hara
2ff6ffc872 Add tests for unsized-locals functions stability. 2018-11-21 22:20:22 +09:00
Masaki Hara
8ab5be13a3 Add tests verifying #50940. 2018-11-21 22:20:22 +09:00
Masaki Hara
8b426232ee Check arg/ret sizedness at ExprKind::Path. 2018-11-21 22:20:22 +09:00
Masaki Hara
682b33a110 Add require_type_is_sized_deferred. 2018-11-21 22:20:22 +09: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
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
925274ab70
Update as_temp.rs 2018-11-21 13:10:10 +01:00
Steve Klabnik
d7b3f5c6ae update various stdlib docs 2018-11-21 06:50:17 -05:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
5a2a251b9c
Update as_temp.rs 2018-11-21 12:40:53 +01:00