Commit Graph

135617 Commits

Author SHA1 Message Date
Yuki Okushi
3812909919
Rollup merge of #80487 - matthiaskrgr:field_names, r=jyn514
don't redundantly repeat field names

r? `@Dylan-DPC`
2020-12-30 18:15:29 +09:00
Yuki Okushi
039b62e888
Rollup merge of #80482 - matthiaskrgr:cl0ne_on_copy, r=jyn514
don't clone copy types

r? `@Dylan-DPC`
2020-12-30 18:15:27 +09:00
Yuki Okushi
9576ee97d1
Rollup merge of #80477 - tmiasko:safe-forget, r=oli-obk
Make forget intrinsic safe
2020-12-30 18:15:25 +09:00
Yuki Okushi
bdc215a8b9
Rollup merge of #80472 - GuillaumeGomez:sans-serif-for-all-items-page, r=Nemo157
Use sans-serif font for the "all items" page links

The "all items" pages' links aren't using a sans-serif font unlike the rest of equivalent items in the other module pages. ``@Nemo157`` reported me this issue so here is the fix!

r? ``@Nemo157``
2020-12-30 18:15:23 +09:00
Yuki Okushi
c50800b772
Rollup merge of #80469 - BlackHoleFox:fix-time-typo, r=jonas-schievink
Fix small typo in time comment

I was reading through [this PR](https://github.com/rust-lang/rust/pull/77727/files) and noticed a [small typo](https://github.com/rust-lang/rust/pull/77727/files#diff-3183738c82f747fd92bb573712073aa384b16e14d154bf2df18f41077edc31cbR240) smuggled though. This just fixes that.
2020-12-30 18:15:21 +09:00
Yuki Okushi
231727d6e7
Rollup merge of #80467 - LingMan:more_matches, r=oli-obk
More uses of the matches! macro

`@rustbot` modify labels +C-cleanup +T-compiler
2020-12-30 18:15:20 +09:00
Yuki Okushi
b050261a1a
Rollup merge of #80465 - eltociear:patch-3, r=jyn514
Fix typo in ffi-pure.md

accesing -> accessing
2020-12-30 18:15:18 +09:00
Yuki Okushi
30ddc91d41
Rollup merge of #80464 - LingMan:map_or, r=oli-obk
Use Option::map_or instead of open coding it

``@rustbot`` modify labels +C-cleanup +T-compiler
2020-12-30 18:15:16 +09:00
Yuki Okushi
7c57d51a9f
Rollup merge of #80461 - rust-lang:tmandry-patch-1, r=Mark-Simulacrum
Add llvm-libunwind change to bootstrap CHANGELOG

From #77703.

This doesn't need a `changelog-seen` version bump because the old values aren't accepted anymore, meaning anyone who was using this had to change it already.

r? ``@Mark-Simulacrum``
2020-12-30 18:15:14 +09:00
Yuki Okushi
d8cabe1855
Rollup merge of #80457 - camelid:pretty-docs-commas, r=jonas-schievink
Add missing commas to `rustc_ast_pretty::pp` docs
2020-12-30 18:15:13 +09:00
Yuki Okushi
6064be7ced
Rollup merge of #80358 - pierwill:edit_rustc_span, r=lcnr
Edit rustc_span documentation

Various changes to the `rustc_span` docs, including the following:

- Additions to top-level docs
- Edits to the source_map module docs
- Edits to documentation for `Span` and `SpanData`
- Added intra-docs links
- Documentation for Levenshtein distances
- Fixed missing punctuation
2020-12-30 18:15:11 +09:00
Yuki Okushi
a309468a8c
Rollup merge of #80348 - matthiaskrgr:less_clones, r=Dylan-DPC
remove redundant clones (clippy::redundant_clone)
2020-12-30 18:15:04 +09:00
Yuki Okushi
3fe423663b
Rollup merge of #79812 - Aaron1011:lint-item-trailing-semi, r=oli-obk
Lint on redundant trailing semicolon after item

We now lint on code like this:

```rust
fn main() {
    fn foo() {};
    struct Bar {};
}
```

Previously, this caused warnings in Cargo, so it was disabled.
2020-12-30 18:15:03 +09:00
bors
f3eead1c69 Auto merge of #80453 - petrochenkov:nocfail, r=Mark-Simulacrum
Remove `compile-fail` test suite

By moving all of its tests to `ui` test suite.
Now we have directives like `// dont-check-compiler-stderr` that allow to disable `.stderr` comparison for platform-dependent tests without introducing a whole new test suite.
2020-12-29 23:20:46 +00:00
Aaron Hill
6bef37c841
Remove unnecessary semicolon from Clippy test 2020-12-29 17:16:04 -05:00
Aaron Hill
4c4700d9e5
Remove unnecessary semicolon from Rustdoc-generated code 2020-12-29 16:30:02 -05:00
Aaron Hill
21ed141b94
Remove trailing semicolon in librustdoc 2020-12-29 16:30:02 -05:00
Aaron Hill
c857cbeb06
Lint on redundant trailing semicolon after item
We now lint on code like this:

```rust
fn main() {
    fn foo() {};
    struct Bar {};
}
```

Previously, this caused warnings in Cargo, so it was disabled.
2020-12-29 16:30:02 -05:00
Matthias Krüger
0c3af22e08 don't redundantly repeat field names 2020-12-29 22:26:58 +01:00
Vadim Petrochenkov
4d2d0bad4e Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
Matthias Krüger
17a8c1017f don't clone copy types 2020-12-29 19:40:03 +01:00
LingMan
7a41532ef9 More uses of the matches! macro 2020-12-29 17:18:52 +01:00
Guillaume Gomez
893c626d06 Use sans-serif font for the "all items" page links 2020-12-29 15:56:52 +01:00
bors
158f8d034b Auto merge of #80014 - jyn514:box-item-kind, r=nnethercote
[rustdoc] Box ItemKind to reduce the size of `Item`

This brings the size of `Item` from

```
[src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 536
```

to

```
[src/librustdoc/lib.rs:103] std::mem::size_of::<Item>() = 136
```

This is an alternative to https://github.com/rust-lang/rust/pull/79967; I don't think it makes sense to make both changes.

Helps with #79103.
2020-12-29 10:41:01 +00:00
BlackHoleFox
5449a42a1c Fix small typo in time comment 2020-12-29 02:10:29 -06:00
bors
e2a2592885 Auto merge of #79084 - simonvandel:instcombine-perf, r=oli-obk
Small perf changes for InstCombine
2020-12-29 06:21:18 +00:00
Joshua Nelson
5fce0dd787 Add static assertion for the size of ItemKind 2020-12-29 00:43:25 -05:00
Ikko Ashimine
02db77c2d1
Fix typo in ffi-pure.md
accesing -> accessing
2020-12-29 13:37:21 +09:00
LingMan
3dae414cb6 Use Option::map_or instead of open coding it 2020-12-29 04:27:37 +01:00
bors
d75f48e04d Auto merge of #80449 - m-ou-se:rollup-kp2e5n8, r=m-ou-se
Rollup of 11 pull requests

Successful merges:

 - #80383 (clarify wrapping ptr arithmetic docs)
 - #80390 (BTreeMap: rename the area access methods)
 - #80393 (Add links to the source for the rustc and rustdoc books.)
 - #80398 (Use raw version of align_of in rc data_offset)
 - #80402 (Document `InferTy` & co.)
 - #80403 (fix: small typo error in chalk/mod.rs)
 - #80410 (rustdoc book: fix example)
 - #80419 (Add regression test for #80375)
 - #80430 (Add "length" as doc alias to len methods)
 - #80431 (Add "chr" as doc alias to char::from_u32)
 - #80448 (Fix stabilization version of deque_range feature.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2020-12-29 00:16:54 +00:00
Tomasz Miąsko
5718cc2f9b Make forget intrinsic safe 2020-12-29 00:00:00 +00:00
Tyler Mandry
8041ccff2c
Add llvm-libunwind change to bootstrap CHANGELOG
From #77703.
2020-12-28 15:57:53 -08:00
Camelid
8d5dc8c2f0
Add missing commas to rustc_ast_pretty::pp docs 2020-12-28 14:23:20 -08:00
Simon Vandel Sillesen
0010fc8fec use exhaustive pattern match to prevent future bugs 2020-12-28 23:19:35 +01:00
Mara Bos
e3d26e007c
Rollup merge of #80448 - m-ou-se:deque-range-version, r=m-ou-se
Fix stabilization version of deque_range feature.

See https://github.com/rust-lang/rust/pull/79022#issuecomment-751315315
2020-12-28 19:09:35 +00:00
Mara Bos
5a081620b0
Rollup merge of #80431 - xfix:add-chr-as-doc-alias, r=steveklabnik
Add "chr" as doc alias to char::from_u32

Many programming languages provide a function called `chr` - Perl, Python, PHP, Visual Basic, SQL. This change makes `char::from_u32` easier to discover in the documentation.

`ord` is not added as its name conflicts with `Ord` trait, and it's not exactly clear what it could point to (`<u32 as From<char>>::from`?). I don't think it's exactly necessary, as `char::from_u32` documentation page says you can do reverse conversion with `as` operator anyway.
2020-12-28 19:09:34 +00:00
Mara Bos
e351a3b2ec
Rollup merge of #80430 - xfix:add-length-as-doc-alias, r=steveklabnik
Add "length" as doc alias to len methods

Currently when searching for `length` there are no results: https://doc.rust-lang.org/std/?search=length. This makes `len` methods appear when searching for `length`.
2020-12-28 19:09:32 +00:00
Mara Bos
a570928902
Rollup merge of #80419 - LeSeulArtichaut:80375-test-case, r=lcnr
Add regression test for #80375

This will also make sure that #80375 is handled if #79135 has to be reverted (which won't happen 🤞).

Closes #80375.
r? `@lcnr`
2020-12-28 19:09:31 +00:00
Mara Bos
7800c70fab
Rollup merge of #80410 - MarcoIeni:patch-1, r=jonas-schievink
rustdoc book: fix example

`lib.rs` file is created only if `--lib` flag is specified
2020-12-28 19:09:29 +00:00
Mara Bos
8b43932ae2
Rollup merge of #80403 - 0xflotus:patch-1, r=jyn514
fix: small typo error in chalk/mod.rs
2020-12-28 19:09:27 +00:00
Mara Bos
803b37597e
Rollup merge of #80402 - camelid:inferty-docs, r=matthewjasper
Document `InferTy` & co.

I finally figured out what `TyVid` means! The name is quite opaque, so I
decided to document it and related types.

I don't know that much about `InferTy` & co., but I was able to *infer*
( :) ) from the names and what I know generally about type inference to
add some basic documentation.
2020-12-28 19:09:25 +00:00
Mara Bos
7003537df6
Rollup merge of #80398 - CAD97:fix-80365, r=dtolnay
Use raw version of align_of in rc data_offset

This was missed in #73845 when switching to use the raw operators.
Fixes #80365
2020-12-28 19:09:24 +00:00
Mara Bos
bae6475443
Rollup merge of #80393 - ehuss:doc-git-link, r=jyn514
Add links to the source for the rustc and rustdoc books.

This adds a little icon in the upper-right corner of the books so that readers can find the source if they want to make changes or file issues. This is already included in several of the other books.
2020-12-28 19:09:22 +00:00
Mara Bos
255fde3f46
Rollup merge of #80390 - ssomers:btree_cleanup_slices_2, r=Mark-Simulacrum
BTreeMap: rename the area access methods

r? `@Mark-Simulacrum`
2020-12-28 19:09:20 +00:00
Mara Bos
9fdd95ff7c
Rollup merge of #80383 - RalfJung:wrapping-ptr-arithmetic, r=dtolnay
clarify wrapping ptr arithmetic docs

Fixes https://github.com/rust-lang/rust/issues/80306

`@steffahn` please let me know if this helps avoid the misunderstanding. :)
2020-12-28 19:09:18 +00:00
Mara Bos
10d6ff71e8 Fix stabilization version of deque_range feature. 2020-12-28 20:04:27 +01:00
bors
2987785df3 Auto merge of #80439 - Dylan-DPC:rollup-rdxcvon, r=Dylan-DPC
Rollup of 11 pull requests

Successful merges:

 - #79662 (Move some more code out of CodegenBackend::{codegen_crate,link})
 - #79815 (Update RELEASES.md for 1.49.0)
 - #80284 (Suggest fn ptr rather than fn item and suggest to use `Fn` trait bounds rather than the unique closure type in E0121)
 - #80331 (Add more comments to trait queries)
 - #80344 (use matches!() macro in more places)
 - #80353 (BTreeMap: test split_off (and append) more thoroughly)
 - #80362 (Document rustc_macros on nightly-rustc)
 - #80399 (Remove FIXME in rustc_privacy)
 - #80408 (Sync rustc_codegen_cranelift)
 - #80411 (rustc_span: Remove `Symbol::with`)
 - #80434 (bootstrap: put the component name in the tarball temp dir path)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2020-12-28 15:57:50 +00:00
Dylan DPC
a4a59a0f17
Rollup merge of #80434 - pietroalbini:tarball-temp-dir, r=Mark-Simulacrum
bootstrap: put the component name in the tarball temp dir path

This should not matter right now, but if we ever parallelize rustbuild this will avoid tarball contents being merged together.

r? `@Mark-Simulacrum`
2020-12-28 14:13:23 +01:00
Dylan DPC
80934aba15
Rollup merge of #80411 - petrochenkov:nosymwith, r=matthewjasper
rustc_span: Remove `Symbol::with`

A subset of https://github.com/rust-lang/rust/pull/79425 that is a pure refactoring.
2020-12-28 14:13:21 +01:00
Dylan DPC
55b52ee339
Rollup merge of #80408 - bjorn3:sync_cg_clif-2020-12-27, r=bjorn3
Sync rustc_codegen_cranelift

The highlight of this sync are two JIT mode improvements. The first is that it is now possible to use JIT mode when using `-Zcodegen-backend` instead of the custom driver using `-Cllvm-args=mode=jit`. The second one is a new JIT mode that lazily compiles functions when they are called the first time: https://github.com/bjorn3/rustc_codegen_cranelift/pull/1120

In addition this includes a few small runtime performance improvements and various fixes for rustc changes that didn't cause compilation to fail.

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler
2020-12-28 14:13:19 +01:00