Commit graph

142512 commits

Author SHA1 Message Date
Jason Newcomb
b6581636bd
Improve redundant_pattern_matching
Add a note when the drop order change may result in different behaviour.
2021-04-15 20:37:15 -04:00
klensy
f5229916e3 added default for StyledChar 2021-04-16 03:20:07 +03:00
klensy
756be4a052 refactored StyledBuffer parts into StyledChar 2021-04-16 03:14:05 +03:00
bors
e87c4dd334 Auto merge of #84226 - Aaron1011:track-link-dead-code, r=Mark-Simulacrum
Track `-C link-dead-code` during incremental compilation

This option influences monomorphization, which participates in
incremental compilation.
2021-04-16 00:01:49 +00:00
bors
586a99348c Auto merge of #7049 - Jarcho:remove_match_path, r=camsteffen
Remove `match_path` and `match_qpath`

The only remaining usage is the `author` lint, so the functions are left in for now. The test result for `repl_uninit` changed, the lint was broken before.

The `collapsible_span_lint_calls` and `match_type_on_diag_item` tests have been changed. Both lints were broken when utils was extracted into it's own crate. `match_type_on_diag_item` isn't quite fixed, but it's at least less broken.

changelog: None
2021-04-15 23:54:41 +00:00
Jason Newcomb
f6c5d8d599
Remove all usages of match_path, match_qpath and match_path_ast except the author lint.
Add note to fix `MATCH_TYPE_ON_DIAG_ITEM`
Add false negative test for `uninit_assumed_init`
2021-04-15 19:27:25 -04:00
Josh Stone
3a961407c8 Update to LLVM 12.0.0 final 2021-04-15 15:22:24 -07:00
Giacomo Stevanato
791e8001d1 Add regression test 2021-04-15 23:59:29 +02:00
Giacomo Stevanato
2899b58832 Add suggestion to borrow when casting T to *const/mut T 2021-04-15 23:49:42 +02:00
Vojtech Kral
44be1c2aa0 VecDeque: Improve doc comments in binary search fns
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2021-04-15 23:23:46 +02:00
Vojtech Kral
e68680d30d VecDeque: Add partition_point() #78021 2021-04-15 23:23:23 +02:00
Vojtech Kral
bccbf9db1c VecDeque: binary_search_by(): return right away if hit found at back.first() #78021 2021-04-15 23:23:22 +02:00
bors
7af1f55ae3 Auto merge of #84205 - workingjubilee:more-simd-intrin, r=bjorn3
Add simd_{round,trunc} intrinsics

LLVM supports many functions from math.h in its IR. Many of these
have SIMD instructions on various platforms. So, let's add round and
trunc so std::arch can use them.

Yes, exact comparison is intentional: rounding must always return a
valid integer-equal value, except for inf/NAN.
2021-04-15 21:00:11 +00:00
bors
52c8c9c520 Auto merge of #7090 - camsteffen:pre-expansion-note, r=Manishearth
Add a note for pre-expansion passes

changelog: none

Just had to turn away a PR for using pre-expansion. I don't think that was the first time. So hopefully this will inform people sooner.

r? flip1995
2021-04-15 19:43:58 +00:00
Camille GILLOT
a54d5759b6 Add test. 2021-04-15 21:41:45 +02:00
Aaron Hill
1ce1cda02f
Track -C link-dead-code during incremental compilation
This option influences monomorphization, which participates in
incremental compilation.
2021-04-15 15:05:26 -04:00
bors
60158f4a7c Auto merge of #84222 - Aaron1011:fix/anon-const-lint, r=lcnr
Run buffered lints attached to anon consts

Fixes #84195
2021-04-15 18:08:17 +00:00
Cameron Steffen
014bf4390c Add note for pre-expansion passes 2021-04-15 12:57:31 -05:00
Simon Sapin
4d683c0292 Allow use of deprecated std::raw in a test for that feature 2021-04-15 19:16:18 +02:00
bors
2962e7c008 Auto merge of #84209 - pickfire:patch-3, r=jyn514
Merge same condition branch in vec spec_extend

Follow up of https://github.com/rust-lang/rust/pull/83726#discussion_r613438246
2021-04-15 15:18:16 +00:00
Aaron Hill
19c9d93ab5
Run buffered lints attached to anon consts
Fixes #84195
2021-04-15 11:11:44 -04:00
Jason Newcomb
779d98f6cc
Don't allow adjustments for manual_map 2021-04-15 10:37:42 -04:00
MarRue
288bd49528 Correct outdated rc::Weak::default documentation 2021-04-15 14:54:39 +02:00
bors
f1ca558db1 Auto merge of #84088 - m-ou-se:stabilize-option-insert, r=m-ou-se
Stabilize option_insert.

FCP finished here: https://github.com/rust-lang/rust/issues/78271#issuecomment-817201319
2021-04-15 12:37:19 +00:00
Jason Newcomb
bcf3488007
Minor cleanup of map_entry and a few additional tests. 2021-04-15 08:25:24 -04:00
Jason Newcomb
3323ff7145
map_entry improvements
Suggest using `or_insert_with` when possible
2021-04-15 08:22:40 -04:00
Jason Newcomb
b63a5b56d6
map_entry improvements
Lint `if _.[!]contains_key(&_) { .. } else { .. }` so long as one of the branches contains an insertion.
2021-04-15 08:19:59 -04:00
Jason Newcomb
ce5e927713
Improve map_entry lint
Fix false positives where the map is used before inserting into the map.
Fix false positives where two insertions happen.
Suggest using `if let Entry::Vacant(e) = _.entry(_)` when `or_insert` might be a semantic change
2021-04-15 08:19:40 -04:00
bors
8aa11816f3 Auto merge of #84215 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/84202
2021-04-15 09:36:48 +00:00
Ralf Jung
a10a02bf5f update Miri 2021-04-15 11:06:06 +02:00
bors
0894d1e906 Auto merge of #84193 - ehuss:unsafe_op_in_unsafe_fn-docs, r=RalfJung
Update docs for unsafe_op_in_unsafe_fn stability.

The unsafe_op_in_unsafe_fn lint was stabilized in #79208, but the bottom of this documentation wasn't updated.

I'm just guessing at the reason here, hopefully it is close to correct. The only discussion I found is https://github.com/rust-lang/rust/issues/71668#issuecomment-730399862 which didn't really explain the thought process behind the decision.
2021-04-15 07:11:18 +00:00
bors
043d916076 Auto merge of #84198 - mlodato517:patch-1, r=jyn514
Fix small typo in Drop documentation
2021-04-15 04:08:33 +00:00
Ivan Tham
eeac70c567
Merge same condition branch in vec spec_extend 2021-04-15 11:58:02 +08:00
David Tolnay
e9bd80f961
Requires deprecated *and* deprecated_in_future, depending on what stage is building 2021-04-14 19:28:39 -07:00
David Tolnay
28efb22745
s/deprecated_in_future/deprecated/ 2021-04-14 18:44:22 -07:00
Simon Sapin
b80a96c286 Deprecate the core::raw / std::raw module
It only contains the `TraitObject` struct which exposes components
of wide pointer. Pointer metadata APIs are designed to replace this:
https://github.com/rust-lang/rust/issues/81513
2021-04-15 02:32:33 +02:00
bors
9c3b66cff7 Auto merge of #84206 - Dylan-DPC:rollup-knl2jgq, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #82492 (Move `std::sys_common::alloc` to new module `std::sys::common`)
 - #84177 (Fix join_paths error display.)
 - #84185 (add more pat2021 tests)
 - #84191 (Update books)
 - #84192 (Fix typos in rustc_codegen_ssa/src/back/write.rs.)
 - #84196 (⬆️ rust-analyzer)
 - #84201 (rustdoc: Note that forbidding anchors in links to primitives is a bug)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-04-14 23:51:33 +00:00
Dylan DPC
f4549d2ee0
Rollup merge of #84201 - jyn514:primitive-warnings, r=cuviper
rustdoc: Note that forbidding anchors in links to primitives is a bug

cc https://github.com/rust-lang/rust/issues/83083, https://github.com/rust-lang/rust/pull/84147#discussion_r613518820

r? `@cuviper`
2021-04-15 01:27:58 +02:00
Dylan DPC
f53d1a27ae
Rollup merge of #84196 - lnicola:rust-analyzer-2021-04-12, r=jonas-schievink
⬆️ rust-analyzer
2021-04-15 01:27:57 +02:00
Dylan DPC
fd105db772
Rollup merge of #84192 - vext01:backend-write-typos, r=wesleywiser
Fix typos in rustc_codegen_ssa/src/back/write.rs.

Just a couple of typos I spotted when reading this comment about the job server.
2021-04-15 01:27:56 +02:00
Dylan DPC
ef6704529a
Rollup merge of #84191 - ehuss:update-books, r=ehuss
Update books

## nomicon

1 commits in 6fe476943afd53a9a6e91f38a6ea7bb48811d8ff..8551afbb2ca6f5ea37fe58380318b209785e4e02
2021-03-10 07:28:57 +0900 to 2021-04-01 21:58:50 +0900
- Add example of thinking about Send/Sync's soundness (rust-lang-nursery/nomicon#259)

## reference

10 commits in fd97729e2d82f8b08d68a31c9bfdf0c37a7fd542..e1abb17cd94cd5a8a374b48e1bc8134a2208ed48
2021-03-28 14:29:19 -0700 to 2021-04-07 08:09:48 -0700
- Update introduction.md (rust-lang-nursery/reference#1004)
- clarify UB for raw ptr deref (rust-lang-nursery/reference#1000)
- Update lint level documentation. (rust-lang-nursery/reference#998)
- Add rustdoc to tool lints. (rust-lang-nursery/reference#997)
- Link to ptr::addr_of on raw pointer docs (rust-lang-nursery/reference#993)
- apply rust-lang-nursery/reference#950 to STYLE.md (rust-lang-nursery/reference#980)
- Tuple Passover rust-lang-nursery/reference#2 (rust-lang-nursery/reference#990)
- Fix typo in macros-by-example.md (rust-lang-nursery/reference#996)
- Clarify object safety rules for methods striked from the vtable (rust-lang-nursery/reference#965)
- Add const generic args to const contexts. (rust-lang-nursery/reference#995)

## rust-by-example

1 commits in 29d91f591c90dd18fdca6d23f1a9caf9c139d0d7..c80f0b09fc15b9251825343be910c08531938ab2
2021-03-23 09:03:39 -0300 to 2021-04-08 10:28:17 -0300
- fix compile bug with panic! (rust-lang/rust-by-example#1433)

## rustc-dev-guide

11 commits in 0687daac28939c476df51778f5a1d1aff1a3fddf..a9bd2bbf31e4f92b5d3d8e80b22839d0cc7a2022
2021-03-28 13:33:56 -0400 to 2021-04-09 18:12:21 -0400
- Improve formatting and update info in "method lookup" section
- Change wording a bit: `module` =&gt; `crate`
- fix typo (rust-lang/rustc-dev-guide#1107)
- fix typo
- Mention CI build of LLVM in build instruction
- Fix rustdocs test command typo (rust-lang/rustc-dev-guide#1103)
- Update the "LLVM updates" section
- Fix a link about Rustdoc internals
- Add quickstart for adding a new optimization (rust-lang/rustc-dev-guide#1094)
- Add back example of {{cwd}} (rust-lang/rustc-dev-guide#1099)
- Document test input normalization

## embedded-book

1 commits in d3f2ace94d51610cf3e3c265705bb8416d37f8e4..569c3391f5c0cc43433bc77831d17f8ff4d76602
2021-03-17 07:53:09 +0000 to 2021-04-07 08:32:11 +0000
- Make it easier to copy and paste example commands.  (rust-embedded/book#289)
2021-04-15 01:27:55 +02:00
Dylan DPC
13effcb282
Rollup merge of #84185 - hi-rustin:rustin-patch-macro, r=nikomatsakis
add more pat2021 tests

close https://github.com/rust-lang/rust/issues/84138

r? ```@nikomatsakis```
2021-04-15 01:27:54 +02:00
Dylan DPC
d783f399e5
Rollup merge of #84177 - ehuss:join_paths-err, r=kennytm
Fix join_paths error display.

On unix, the error from `join_paths` looked like this:

```
path segment contains separator `58`
```

This PR changes it to look like this:

```
path segment contains separator `:`
```
2021-04-15 01:27:53 +02:00
Dylan DPC
80ee7cbb37
Rollup merge of #82492 - CDirkx:sys_common_alloc, r=m-ou-se
Move `std::sys_common::alloc` to new module `std::sys::common`

6b56603e35/library/std/src/sys_common/mod.rs (L7-L13)

It was my impression that the goal for `std::sys` has changed from extracting it into a separate crate to making std work with features. However the fact remains that there is a lot of interdependence between `sys` and `sys_common`, this is because `sys_common` contains two types of code:

- abstractions over the different platform implementations in `std::sys` (for example [`std::sys_common::mutex`](https://github.com/rust-lang/rust/blob/master/library/std/src/sys_common/mutex.rs))
- code shared between platforms (for example [`std::sys_common::alloc`](https://github.com/rust-lang/rust/blob/master/library/std/src/sys_common/alloc.rs))

This PR attempts to address this by adding a new module `common` to `std::sys` which will contain code shared between platforms, `alloc.rs` in this case but more can be moved over in the future.
2021-04-15 01:27:52 +02:00
Jubilee Young
003b8eadd7 Add more SIMD math.h intrinsics
LLVM supports many functions from math.h in its IR. Many of these have
single-instruction variants on various platforms. So, let's add them so
std::arch can use them.

Yes, exact comparison is intentional: rounding must always return a
valid integer-equal value, except for inf/NAN.
2021-04-14 15:25:06 -07:00
bors
16bf626a31 Auto merge of #84130 - Aaron1011:fix/none-delim-lookahead, r=petrochenkov
Fix lookahead with None-delimited group

Fixes https://github.com/rust-lang/rust/issues/84162, a regression introduced by https://github.com/rust-lang/rust/pull/82608.
2021-04-14 20:45:23 +00:00
Joshua Nelson
a19e1034d4 rustdoc: Note that forbidding anchors in links to primitives is a bug 2021-04-14 16:39:58 -04:00
Mark Lodato
46d2a96fac
Fix small typo in Drop documentation 2021-04-14 16:05:56 -04:00
Jacob Hoffman-Andrews
6f1f3eb516 Update comment on search.js static file. 2021-04-14 12:17:24 -07:00
Jacob Hoffman-Andrews
a245642cab
Change root_path to static_root_path
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-04-14 11:56:53 -07:00