Commit graph

127053 commits

Author SHA1 Message Date
Matthias Krüger
de195f2d3d print the unit type () in related lint messages. 2020-09-09 17:59:13 +02:00
Tomasz Miąsko
0016405073 Remove unused PlaceContext::NonUse(NonUseContext::Coverage) 2020-09-09 17:02:19 +02:00
Matthias Krüger
4db10297c1 link to the Box docs in related lint documentation. 2020-09-09 16:54:24 +02:00
Matthias Krüger
be28b6235e remove redundant clones
(clippy::redundant_clone)
2020-09-09 16:32:55 +02:00
bors
b4bdc07ff5 Auto merge of #76445 - jyn514:doctests, r=Mark-Simulacrum,ollie27
Make rustdoc output deterministic for UI tests

Closes https://github.com/rust-lang/rust/issues/76442 (hopefully, since it's non-deterministic I don't have a way to test).

r? `@Mark-Simulacrum`
cc `@GuillaumeGomez`
2020-09-09 13:33:01 +00:00
Stein Somers
8158d5623e BTreeMap: avoid aliasing by avoiding slices 2020-09-09 08:58:02 -04:00
Ralf Jung
7889373730 make as_leaf return a raw pointer, to reduce aliasing assumptions 2020-09-09 08:38:34 -04:00
Hameer Abbasi
5d7e7c25e4 Add revisions to const generic issue UI tests. 2020-09-09 13:28:41 +02:00
bors
683d1bcd40 Auto merge of #76513 - rust-lang:rust-analyzer-2020-09-09, r=jonas-schievink
⬆️ rust-analyzer

r? `@ghost`
2020-09-09 11:28:17 +00:00
jumbatm
8b392505ae Fix non-determinism in generated format string. 2020-09-09 21:23:25 +10:00
Jonas Schievink
e215e7901e ⬆️ rust-analyzer 2020-09-09 12:41:32 +02:00
bors
3f5e617e36 Auto merge of #76406 - GuillaumeGomez:create-e0774, r=pickfire,jyn514
Create E0774
2020-09-09 08:23:33 +00:00
Victor Ding
c81b43d8ac Add -Z combine_cgu flag
Introduce a compiler option to let rustc combines all regular CGUs into
a single one at the end of compilation.

Part of Issue #64191
2020-09-09 17:32:23 +10:00
bors
0855263dcd Auto merge of #76463 - camelid:improve-E0607-explanation, r=jyn514
Improve wording of E0607 explanation

`@rustbot` modify labels: A-diagnostics C-enhancement
2020-09-09 06:33:03 +00:00
bors
780ca140a0 Auto merge of #76453 - camelid:fix-css-crate-list, r=GuillaumeGomez,ollie27
rustdoc: Fix font CSS for crate lists

I had put it in the wrong file in #76126. This should fix it now. Thank
you to `@ollie27` for pointing this out!

---

`@rustbot` modify labels: T-rustdoc C-bug
2020-09-09 04:35:40 +00:00
bors
78f4cbb1ef Auto merge of #76418 - jyn514:readme, r=Dylan-DPC
Move sections about contributing closer together in the README

This makes it easier to find what to do if you're interested in contributing.
2020-09-09 02:40:27 +00:00
Flying-Toast
2799aec6ab Capitalize safety comments 2020-09-08 22:37:18 -04:00
Flying-Toast
c66789d572 Capitalize safety comments 2020-09-08 22:26:44 -04:00
Camelid
d24026bb6d Fix broken link
`write` is ambiguous because there's also a macro called `write`.

Also removed unnecessary and potentially confusing link to a function in
its own docs.
2020-09-08 19:24:57 -07:00
Matt Brubeck
fb1fab5a67 Tests for HashMap/HashSet::drain_filter 2020-09-08 17:24:28 -07:00
Matt Brubeck
49aef963d3 Add HashMap::drain_filter and HashSet::drain_filter
Implements #59618.
2020-09-08 17:24:28 -07:00
Matt Brubeck
ebd15e790a Implement HashSet in terms of hashbrown::HashSet 2020-09-08 17:24:23 -07:00
Matt Brubeck
15ccdeb224 Update to hashbrown 0.9 2020-09-08 17:23:26 -07:00
Rich Kadel
c19b2370e4 Add -Zgraphviz_dark_mode
Many developers use a dark theme with editors and IDEs, but this
typically doesn't extend to graphviz output.

When I bring up a MIR graphviz document, the white background is
strikingly bright. This new option changes the colors used for graphviz
output to work better in dark-themed UIs.
2020-09-08 17:19:38 -07:00
bors
90782cb50b Auto merge of #76502 - Dylan-DPC:rollup-2c4zz0t, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #76162 (Make duration_since documentation more clear)
 - #76355 (remove public visibility previously needed for rustfmt)
 - #76374 (Improve ayu doc source line number contrast)
 - #76379 (rustbuild: Remove `Mode::Codegen`)
 - #76389 (Fix HashMap visualizers in Visual Studio (Code))
 - #76396 (Fix typo in tracking issue template)
 - #76401 (Add help note to unconstrained const parameter)
 - #76402 (Update linker-plugin-lto.md to contain up to rust 1.46)
 - #76403 (Fix documentation for TyCtxt::all_impls)
 - #76498 (Update cargo)

Failed merges:

 - #76458 (Add drain_filter method to HashMap and HashSet)

r? `@ghost`
2020-09-09 00:08:13 +00:00
Dylan DPC
389321a41e
Rollup merge of #76498 - ehuss:update-cargo, r=ehuss
Update cargo

8 commits in 126907a7cfccbe93778530e6a6bbaa3adb6c515c..875e0123259b0b6299903fe4aea0a12ecde9324f
2020-08-31 20:42:11 +0000 to 2020-09-08 20:17:21 +0000
- Lowercase and remove periods in error messages for consistency (rust-lang/cargo#8655)
- Allow running build-man.sh from any directory (rust-lang/cargo#8682)
- docs: add details for cargo check pass where cargo build fail (rust-lang/cargo#8677)
- Fix nightly exported_priv_warning test. (rust-lang/cargo#8678)
- fix mdbook test with ```ignore/text/sh/console (rust-lang/cargo#8674)
- End CACHEDIR.TAG with newline (rust-lang/cargo#8672)
- Fixed the fossil repo initialization actually run commands (rust-lang/cargo#8671)
- Remove asciidoc attribute in cargo-metadata man page. (rust-lang/cargo#8670)
2020-09-09 01:35:26 +02:00
Dylan DPC
12707346cf
Rollup merge of #76403 - scileo:doc-all-impls, r=lcnr
Fix documentation for TyCtxt::all_impls

`TyCtxt::all_impls` documentation was wrong about the return type.
2020-09-09 01:35:23 +02:00
Dylan DPC
1aef86c858
Rollup merge of #76402 - elichai:patch-2, r=wesleywiser
Update linker-plugin-lto.md to contain up to rust 1.46

Hi,
this is the same as https://github.com/rust-lang/rust/pull/72290, if anyone has suggestions on how to automate this please say :)
otherwise, you can check the versions I've added via:

```sh
$ rustup install 1.44.0
$ rustc +1.44.0 -Vv
rustc 1.44.0 (49cae5576 2020-06-01)
binary: rustc
commit-hash: 49cae55760da0a43428eba73abcb659bb70cf2e4
commit-date: 2020-06-01
host: x86_64-unknown-linux-gnu
release: 1.44.0
LLVM version: 9.0

$ rustup install 1.45.0
$ rustc +1.45.0 -Vv
rustc 1.45.0 (5c1f21c3b 2020-07-13)
binary: rustc
commit-hash: 5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2
commit-date: 2020-07-13
host: x86_64-unknown-linux-gnu
release: 1.45.0
LLVM version: 10.0

$ rustup install 1.46.0
$ rustc +stable -Vv
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0
```
2020-09-09 01:35:22 +02:00
Dylan DPC
1083833b3e
Rollup merge of #76401 - JulianKnodt:i68366, r=lcnr
Add help note to unconstrained const parameter

Resolves #68366, since it is currently intended behaviour.
If demonstrating `T -> U` is injective, there should be an additional word that it is not **yet** supported.

r? @lcnr
2020-09-09 01:35:20 +02:00
Dylan DPC
d45faff0bf
Rollup merge of #76396 - dylni:fix-typo-in-tracking-issue-template, r=jonas-schievink
Fix typo in tracking issue template
2020-09-09 01:35:18 +02:00
Dylan DPC
222b88501d
Rollup merge of #76389 - MaulingMonkey:pr-natvis-hashmap-vsc, r=petrochenkov
Fix HashMap visualizers in Visual Studio (Code)

CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (`u8*` to `tuple<$T1, $T2>*`).
Visual Studio & Visual Studio Code care.  These should've been reinterpret_cast or C casts.

Credit to @petrochenkov per https://github.com/rust-lang/rust/issues/76352 for helping catch this.

### Testing

```cmd
x.py test --stage 1 src/tools/tidy
x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo
```
2020-09-09 01:35:17 +02:00
Dylan DPC
b2ca5131ed
Rollup merge of #76379 - petrochenkov:nodegen, r=Mark-Simulacrum
rustbuild: Remove `Mode::Codegen`

It's no longer used.
2020-09-09 01:35:15 +02:00
Dylan DPC
3cec71e9b4
Rollup merge of #76374 - pickfire:patch-4, r=Cldfire
Improve ayu doc source line number contrast

Improve contrast of foreground line number.

Before

![image](https://user-images.githubusercontent.com/4687791/92305696-1bf2ab80-efbc-11ea-8b5c-a24c4f6261e0.png)

After

![image](https://user-images.githubusercontent.com/4687791/92305700-2a40c780-efbc-11ea-9061-dbfcb1e71980.png)

r? @Cldfire

I think we should add the line for light and dark theme too, it looks better and clearer that way.
2020-09-09 01:35:13 +02:00
Dylan DPC
4ac88c01c3
Rollup merge of #76355 - calebcartwright:reduce-rustfmt-visibility, r=nikomatsakis
remove public visibility previously needed for rustfmt

`submod_path_from_attr` in rustc_expand::module was previously public because it was also consumed by rustfmt. However, we've done a bit of refactoring in rustfmt and no longer need to use this function.

This changes the visibility to the parent mod as was originally going to be done before the rustfmt dependency was realized (c189565edc (diff-cd1b379893bae95f7991d5a3f3c6d337R201))
2020-09-09 01:35:11 +02:00
Dylan DPC
87302a297c
Rollup merge of #76162 - abrausch:documentation-fix-duration_since, r=jyn514
Make duration_since documentation more clear
2020-09-09 01:35:10 +02:00
Eric Huss
8b2106f77a Update cargo 2020-09-08 15:10:21 -07:00
Aaron Hill
f23670ed68 Adjust Clippy for CONST_ITEM_MUTATION lint
We no longer lint assignments to const item fields in the
`temporary_assignment` lint, since this is now covered by the
`CONST_ITEM_MUTATION` lint.

Additionally, we `#![allow(const_item_mutation)]` in the
`borrow_interior_mutable_const.rs` test. Clippy UI tests are run with
`-D warnings`, which seems to cause builtin lints to prevent Clippy
lints from running.
2020-09-08 17:59:56 -04:00
Aaron Hill
4434e8cefb
Adjust Clippy for CONST_ITEM_MUTATION lint
We no longer lint assignments to const item fields in the
`temporary_assignment` lint, since this is now covered by the
`CONST_ITEM_MUTATION` lint.

Additionally, we `#![allow(const_item_mutation)]` in the
`borrow_interior_mutable_const.rs` test. Clippy UI tests are run with
`-D warnings`, which seems to cause builtin lints to prevent Clippy
lints from running.
2020-09-08 17:59:56 -04:00
Camelid
325acefee4 Use intra-doc links in core::ptr
The only link that I did not change is a link to a function on the
`pointer` primitive because intra-doc links for the `pointer` primitive
don't work yet (see #63351).
2020-09-08 14:36:36 -07:00
bors
8b54f1e2d9 Auto merge of #6016 - giraffate:restrict_same_item_push, r=ebroto
Restrict `same_item_push` to suppress false positives

It only emits a lint when the pushed item is a literal, a constant and an immutable binding that are initialized with those, as discussed in https://github.com/rust-lang/rust-clippy/pull/5997#pullrequestreview-483005186.

Fix https://github.com/rust-lang/rust-clippy/issues/5985

changelog: Restrict `same_item_push` to literals, constants and immutable bindings that are initialized with those.

r? `@ebroto`
2020-09-08 21:34:55 +00:00
Alexander Brausch
98231bfb95 Make duration_since documentation more clear 2020-09-08 23:27:24 +02:00
bors
8d6cf3a824 Auto merge of #6018 - ebroto:rustup, r=ebroto
Rustup

r? `@ghost`

changelog: none
2020-09-08 20:43:02 +00:00
Eduardo Broto
e83190bdd4 Merge remote-tracking branch 'upstream/master' into rustup 2020-09-08 22:26:31 +02:00
moonheart08
0aaf56f5fc Remove a stray ignore-tidy-undocumented-unsafe
There were no undocumented unsafe blocks in the file.
2020-09-08 15:00:47 -05:00
Guillaume Gomez
1d02f4fdcc Update tests 2020-09-08 21:32:03 +02:00
Guillaume Gomez
e0df2f87b6 Create new E0774 code error 2020-09-08 21:32:03 +02:00
Vadim Petrochenkov
75a2c68fb6 Update comment in config.toml.example 2020-09-08 22:08:25 +03:00
Braden Nelson
e02952c0cc
Update library/alloc/src/collections/vec_deque.rs
Replace lshift with multiply

Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2020-09-08 13:11:08 -05:00
bors
5099914a16 Auto merge of #76332 - Mark-Simulacrum:bootstrap-llvm, r=pietroalbini
Add rust-dev component to support rustc development

This is preparatory work for permitting rustc developers to use CI-built LLVM rather than building it locally. Unlike distro-built LLVM, CI built LLVM is essentially guaranteed to behave perfectly for local development -- it is fully up to date, and carries all necessary patches.

This is a separate PR from #76349 because it needs to land before that one, since we want a master build with the full CI LLVM to be available for easier testing.
2020-09-08 16:01:26 +00:00
moonheart08
c3c84ad027 Convert MAXIMUM_ZST_CAPACITY to be calculated in a
const instead of multiple target_pointer_width checks.
2020-09-08 10:35:35 -05:00