]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoUse flex more consistently.
Tor Hovland [Thu, 22 Apr 2021 20:33:54 +0000 (22:33 +0200)]
Use flex more consistently.

3 years agoAuto merge of #84440 - Dylan-DPC:rollup-0xjb8oi, r=Dylan-DPC
bors [Thu, 22 Apr 2021 18:17:23 +0000 (18:17 +0000)]
Auto merge of #84440 - Dylan-DPC:rollup-0xjb8oi, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #84343 (Remove `ScopeTree::closure_tree`)
 - #84376 (Uses flex to fix formatting of h1 at any width)
 - #84377 (Followup to #83944)
 - #84396 (Update LLVM submodule)
 - #84402 (Move `sys_common::rwlock::StaticRWLock` etc. to `sys::unix::rwlock`)
 - #84404 (Check for intrinsics before coercing to a function pointer)
 - #84413 (Remove `sys::args::Args::inner_debug` and use `Debug` instead)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #84413 - CDirkx:args_inner_debug, r=m-ou-se
Dylan DPC [Thu, 22 Apr 2021 16:14:43 +0000 (18:14 +0200)]
Rollup merge of #84413 - CDirkx:args_inner_debug, r=m-ou-se

Remove `sys::args::Args::inner_debug` and use `Debug` instead

This removes the method `sys::args::Args::inner_debug` on all platforms and implements `Debug` for `Args` instead.

I believe this creates a more natural API for the different platforms under `sys`: export a type `Args: Debug + Iterator + ...` vs. `Args: Iterator + ...` and with a method `inner_debug`.

3 years agoRollup merge of #84404 - tmiasko:intrinsics-in-coercion-lub, r=Mark-Simulacrum
Dylan DPC [Thu, 22 Apr 2021 16:14:42 +0000 (18:14 +0200)]
Rollup merge of #84404 - tmiasko:intrinsics-in-coercion-lub, r=Mark-Simulacrum

Check for intrinsics before coercing to a function pointer

Return an error if coercing function items / non-capturing closures
to a common function pointer type would require reifying an intrinsic.

Turns ICE reported in #84297 into a proper error.

3 years agoRollup merge of #84402 - CDirkx:rwlock, r=dtolnay
Dylan DPC [Thu, 22 Apr 2021 16:14:41 +0000 (18:14 +0200)]
Rollup merge of #84402 - CDirkx:rwlock, r=dtolnay

Move `sys_common::rwlock::StaticRWLock` etc. to `sys::unix::rwlock`

This moves `sys_common::rwlock::StaticRwLock`, `RWLockReadGuard` and `RWLockWriteGuard` to `sys::unix::rwlock`. They are already `#[cfg(unix)]` and don't need to be in `sys_common`.

3 years agoRollup merge of #84396 - Amanieu:fix_compiler_builtins_llvm, r=cuviper
Dylan DPC [Thu, 22 Apr 2021 16:14:40 +0000 (18:14 +0200)]
Rollup merge of #84396 - Amanieu:fix_compiler_builtins_llvm, r=cuviper

Update LLVM submodule

Fixes #83467

3 years agoRollup merge of #84377 - jackh726:binder-refactor-fix, r=nikomatsakis
Dylan DPC [Thu, 22 Apr 2021 16:14:39 +0000 (18:14 +0200)]
Rollup merge of #84377 - jackh726:binder-refactor-fix, r=nikomatsakis

Followup to #83944

Some cleanups requested by ``@nikomatsakis``

r? ``@nikomatsakis``

3 years agoRollup merge of #84376 - torhovland:issue-84534, r=GuillaumeGomez
Dylan DPC [Thu, 22 Apr 2021 16:14:37 +0000 (18:14 +0200)]
Rollup merge of #84376 - torhovland:issue-84534, r=GuillaumeGomez

Uses flex to fix formatting of h1 at any width

Fixes #84354.

3 years agoRollup merge of #84343 - camsteffen:closure-tree, r=varkor
Dylan DPC [Thu, 22 Apr 2021 16:14:32 +0000 (18:14 +0200)]
Rollup merge of #84343 - camsteffen:closure-tree, r=varkor

Remove `ScopeTree::closure_tree`

Seems to be dead code since #50649.

3 years agoAuto merge of #77704 - AnthonyMikh:slice_index_with_ops_bound_pair, r=m-ou-se
bors [Thu, 22 Apr 2021 15:36:27 +0000 (15:36 +0000)]
Auto merge of #77704 - AnthonyMikh:slice_index_with_ops_bound_pair, r=m-ou-se

Implement indexing slices with pairs of core::ops::Bound<usize>

Closes #49976.

I am not sure about code duplication between `check_range` and `into_maybe_range`. Should be former implemented in terms of the latter? Also this PR doesn't address code duplication between `impl SliceIndex for Range*`.

3 years agoAuto merge of #71511 - hi-rustin:rustin-patch-rename-assoc, r=eddyb,varkor
bors [Thu, 22 Apr 2021 11:32:50 +0000 (11:32 +0000)]
Auto merge of #71511 - hi-rustin:rustin-patch-rename-assoc, r=eddyb,varkor

Rename AssociatedItems to AssocItems

Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
Part of https://github.com/rust-lang/rust/issues/60163#issuecomment-605308641

3 years agoRemove `sys::args::Args::inner_debug` and use `Debug` instead
Christiaan Dirkx [Wed, 21 Apr 2021 21:51:28 +0000 (23:51 +0200)]
Remove `sys::args::Args::inner_debug` and use `Debug` instead

3 years agoAuto merge of #84289 - andersk:bootstrap-bulk-dir, r=Mark-Simulacrum
bors [Thu, 22 Apr 2021 07:47:06 +0000 (07:47 +0000)]
Auto merge of #84289 - andersk:bootstrap-bulk-dir, r=Mark-Simulacrum

bootstrap: Restore missing --bulk-dirs for rust-docs, rustc-docs

The `--bulk-dirs` argument was removed for rust-docs in commit c768ce138427b1844c1f6594daba9c0e33928032 and rustc-docs in commit 8ca46fc7a83734c9622f11f25d16b82316f44bcc (#79788), presumably by mistake; that slowed down installation of rust-docs from under a second to some twenty *minutes*.  Restoring `--bulk-dirs` reverses this slowdown.

Fixes #80684.

Cc `@pietroalbini.`

3 years agoAuto merge of #84411 - m-ou-se:rollup-9btsp2t, r=m-ou-se
bors [Thu, 22 Apr 2021 05:01:30 +0000 (05:01 +0000)]
Auto merge of #84411 - m-ou-se:rollup-9btsp2t, r=m-ou-se

Rollup of 12 pull requests

Successful merges:

 - #84013 (Replace all `fmt.pad` with `debug_struct`)
 - #84119 (Move `sys::vxworks` code to `sys::unix`)
 - #84212 (Replace `Void` in `sys` with never type)
 - #84251 (fix 'const-stable since' for NonZeroU*::new_unchecked)
 - #84301 (Document that `index` and `index_mut` can panic)
 - #84365 (Improve the docstrings of the `Lto` struct.)
 - #84378 (Fix broken doc link)
 - #84379 (Add GAT related tests)
 - #84380 (Write Rustdoc titles like "x in crate::mod - Rust")
 - #84390 (Format `Struct { .. }` on one line even with `{:#?}`.)
 - #84393 (Support `x.py doc std --open`)
 - #84406 (Remove `delete` alias from `mem::drop`.)

Failed merges:

 - #84387 (Move `sys_common::poison` to `sync::poison`)

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoAuto merge of #84407 - the8472:update-jobserver, r=Mark-Simulacrum
bors [Thu, 22 Apr 2021 02:20:29 +0000 (02:20 +0000)]
Auto merge of #84407 - the8472:update-jobserver, r=Mark-Simulacrum

bump jobserver dependency

the newest jobserver version should slightly reduce context switches
in highly parallel build environments on linux kernels >= 5.6

3 years agoRollup merge of #84406 - m-ou-se:drop-delete-alias, r=dtolnay
Mara Bos [Wed, 21 Apr 2021 21:06:24 +0000 (23:06 +0200)]
Rollup merge of #84406 - m-ou-se:drop-delete-alias, r=dtolnay

Remove `delete` alias from `mem::drop`.

See https://github.com/rust-lang/rust/pull/81988#issuecomment-824168459 and https://github.com/rust-lang/rust/pull/81988#issuecomment-824213843

3 years agoRollup merge of #84393 - GuillaumeGomez:better-open-handling, r=jyn514
Mara Bos [Wed, 21 Apr 2021 21:06:23 +0000 (23:06 +0200)]
Rollup merge of #84393 - GuillaumeGomez:better-open-handling, r=jyn514

Support `x.py doc std --open`

I usually run this command:

```
./x.py doc std --stage 1 --jobs 8
```

Then I gave a try to `--open` and realized it wasn't working. I finally realized it was simply because it was only handling paths starting with `library`. This PR allows to handle both kinds of paths.

cc ``@jyn514``
r? ``@Mark-Simulacrum``

3 years agoRollup merge of #84390 - m-ou-se:make-debug-non-exhaustive-without-fields-a-little...
Mara Bos [Wed, 21 Apr 2021 21:06:21 +0000 (23:06 +0200)]
Rollup merge of #84390 - m-ou-se:make-debug-non-exhaustive-without-fields-a-little-bit-less-verbose, r=kennytm

Format `Struct { .. }` on one line even with `{:#?}`.

The result of `debug_struct("A").finish_non_exhaustive()` before this change:
```
A {
    ..
}
```
And after this change:
```
A { .. }
```

If there's any fields, the result stays unchanged:
```
A {
    field: value,
    ..
}

3 years agoRollup merge of #84380 - Smittyvb:rdoc-title-order, r=jsha
Mara Bos [Wed, 21 Apr 2021 21:06:20 +0000 (23:06 +0200)]
Rollup merge of #84380 - Smittyvb:rdoc-title-order, r=jsha

Write Rustdoc titles like "x in crate::mod - Rust"

This makes Rustdoc titles for items be like "Widget in cratename::blah::foo - Rust". Titles for modules and other non-items are unchanged, and still read like "cratename::blah::foo - Rust". This makes managing several open Rustdoc tabs easier.

![A screenshot of several open Rustdoc tabs](https://user-images.githubusercontent.com/10530973/115457675-d608f180-a1f2-11eb-87a8-838a32b4e3f7.png)

This also adds some tests for the new title behavior.

Closes #84371.

3 years agoRollup merge of #84379 - marmeladema:test-for-issue-79949, r=jackh726
Mara Bos [Wed, 21 Apr 2021 21:06:19 +0000 (23:06 +0200)]
Rollup merge of #84379 - marmeladema:test-for-issue-79949, r=jackh726

Add GAT related tests

Closes #79949
Closes #79636
Closes #78671
Closes #70303
Closes #70304
Closes #71176

3 years agoRollup merge of #84378 - starthal:patch-1, r=jyn514
Mara Bos [Wed, 21 Apr 2021 21:06:18 +0000 (23:06 +0200)]
Rollup merge of #84378 - starthal:patch-1, r=jyn514

Fix broken doc link

3 years agoRollup merge of #84365 - vext01:improve-lto-docstrings, r=petrochenkov
Mara Bos [Wed, 21 Apr 2021 21:06:17 +0000 (23:06 +0200)]
Rollup merge of #84365 - vext01:improve-lto-docstrings, r=petrochenkov

Improve the docstrings of the `Lto` struct.

This change is the result of [this zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Making.20sense.20of.20LTO.20modes.20in.20rustc).

Hopefully it makes things a little clearer. What do you think?

3 years agoRollup merge of #84301 - r00ster91:patch-1, r=kennytm
Mara Bos [Wed, 21 Apr 2021 21:06:16 +0000 (23:06 +0200)]
Rollup merge of #84301 - r00ster91:patch-1, r=kennytm

Document that `index` and `index_mut` can panic

I thought this was noteworthy and I think a bit more explicitness does no harm.

3 years agoRollup merge of #84251 - RalfJung:non-zero-const-since, r=kennytm
Mara Bos [Wed, 21 Apr 2021 21:06:15 +0000 (23:06 +0200)]
Rollup merge of #84251 - RalfJung:non-zero-const-since, r=kennytm

fix 'const-stable since' for NonZeroU*::new_unchecked

For the unsigned `NonZero` types, `new_unchecked` was const-stable from the start with https://github.com/rust-lang/rust/pull/50808. Fix the docs to accurately reflect that.

I think this `since` is also incorrect:
```rust
            #[stable(feature = "from_nonzero", since = "1.31.0")]
            impl From<$Ty> for $Int {
```
The signed nonzero types were only stabilized in 1.34, so that `From` impl certainly didn't exist before. But I had enough of digging through git histories after I figured out when `new_unchecked` became const-stable...^^

3 years agoRollup merge of #84212 - CDirkx:void, r=m-ou-se
Mara Bos [Wed, 21 Apr 2021 21:06:14 +0000 (23:06 +0200)]
Rollup merge of #84212 - CDirkx:void, r=m-ou-se

Replace `Void` in `sys` with never type

This PR replaces several occurrences in `sys` of the type `enum Void {}` with the Rust never type (`!`).
The name `Void` is unfortunate because in other languages (C etc.) it refers to a unit type, not an uninhabited type.

Note that the previous stabilization of the never type was reverted, however all uses here are implementation details and not publicly visible.

3 years agoRollup merge of #84119 - CDirkx:vxworks, r=m-ou-se
Mara Bos [Wed, 21 Apr 2021 21:06:12 +0000 (23:06 +0200)]
Rollup merge of #84119 - CDirkx:vxworks, r=m-ou-se

Move `sys::vxworks` code to `sys::unix`

Follow-up to #77666, `sys::vxworks` is almost identical to `sys::unix`, the only differences are the `rand`, `thread_local_dtor`, and `process` implementation. Since `vxworks` is `target_family = unix` anyway, there is no reason for the code not to live inside of `sys::unix` like all the other unix-OSes.

https://github.com/rust-lang/rust/blob/e41f378f825488a537b024fc3ed599d9c12fda96/compiler/rustc_target/src/spec/vxworks_base.rs#L12

``@rustbot`` label: +T-libs-impl

3 years agoRollup merge of #84013 - CDirkx:fmt, r=m-ou-se
Mara Bos [Wed, 21 Apr 2021 21:06:11 +0000 (23:06 +0200)]
Rollup merge of #84013 - CDirkx:fmt, r=m-ou-se

Replace all `fmt.pad` with `debug_struct`

This replaces any occurrence of:
- `f.pad("X")` with `f.debug_struct("X").finish()`
- `f.pad("X { .. }")` with `f.debug_struct("X").finish_non_exhaustive()`

This is in line with existing formatting code such as
https://github.com/rust-lang/rust/blob/125505306744a0a5bb01d62337260a95d9ff8d57/library/std/src/sync/mpsc/mod.rs#L1470-L1475

3 years agoBump slice_index_with_ops_bound_pair to 1.53.0
Mara Bos [Wed, 21 Apr 2021 20:40:19 +0000 (22:40 +0200)]
Bump slice_index_with_ops_bound_pair to 1.53.0

3 years agobump jobserver dependency
The8472 [Wed, 21 Apr 2021 20:02:54 +0000 (22:02 +0200)]
bump jobserver dependency

the newest jobserver version should slightly reduce context switches
in highly parallel build environments on linux kernels >= 5.6

3 years agoRemove `delete` alias from `mem::drop`.
Mara Bos [Wed, 21 Apr 2021 19:54:39 +0000 (21:54 +0200)]
Remove `delete` alias from `mem::drop`.

3 years agoReplaced flex gap with margin, for compatibility with older browsers.
Tor Hovland [Wed, 21 Apr 2021 19:33:48 +0000 (21:33 +0200)]
Replaced flex gap with margin, for compatibility with older browsers.

3 years agoAuto merge of #84394 - m-ou-se:upgrade-ci-dep-expat, r=Mark-Simulacrum
bors [Wed, 21 Apr 2021 17:07:45 +0000 (17:07 +0000)]
Auto merge of #84394 - m-ou-se:upgrade-ci-dep-expat, r=Mark-Simulacrum

Upgrade `expat` dependency in riscv64 to newer version.

The old version was renamed to `expat-2.2.6-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD`. :)

r? `@Mark-Simulacrum`

3 years agoMore review changes
Jack Huey [Wed, 21 Apr 2021 16:26:19 +0000 (12:26 -0400)]
More review changes

3 years agoMove `sys_common::rwlock::StaticRWLock` etc. to `sys::unix::rwlock`
Christiaan Dirkx [Wed, 21 Apr 2021 11:24:24 +0000 (13:24 +0200)]
Move `sys_common::rwlock::StaticRWLock` etc. to `sys::unix::rwlock`

3 years agoReview comments
Jack Huey [Wed, 21 Apr 2021 15:49:59 +0000 (11:49 -0400)]
Review comments

3 years agoUpdate LLVM submodule
Amanieu d'Antras [Wed, 21 Apr 2021 14:22:46 +0000 (15:22 +0100)]
Update LLVM submodule

Fixes #83467

3 years agoApply suggestions from code review
Christiaan Dirkx [Wed, 21 Apr 2021 14:06:32 +0000 (16:06 +0200)]
Apply suggestions from code review

3 years agoUpgrade `expat` dependency in riscv64 to newer version.
Mara Bos [Wed, 21 Apr 2021 13:54:57 +0000 (15:54 +0200)]
Upgrade `expat` dependency in riscv64 to newer version.

The old version was renamed to
`expat-2.2.6-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD`. :)

3 years agoFix `alloc::test::test_show`
Christiaan Dirkx [Wed, 21 Apr 2021 13:45:41 +0000 (15:45 +0200)]
Fix `alloc::test::test_show`

3 years agoChange the `Debug` impl of `Any` and `UnsafeCell` to use `finish_non_exhaustive`
Christiaan Dirkx [Wed, 21 Apr 2021 12:51:04 +0000 (14:51 +0200)]
Change the `Debug` impl of `Any` and `UnsafeCell` to use `finish_non_exhaustive`

3 years agoReplace all `fmt.pad` with `debug_struct`
Christiaan Dirkx [Mon, 5 Apr 2021 11:31:11 +0000 (13:31 +0200)]
Replace all `fmt.pad` with `debug_struct`

3 years agoCorrectly handle --open argument on doc command
Guillaume Gomez [Wed, 21 Apr 2021 12:20:56 +0000 (14:20 +0200)]
Correctly handle --open argument on doc command

3 years agoFormat `Struct { .. }` on one line even with `{:#?}`.
Mara Bos [Wed, 21 Apr 2021 11:50:56 +0000 (13:50 +0200)]
Format `Struct { .. }` on one line even with `{:#?}`.

3 years agoMove nested quantification check to ast_validation
Jack Huey [Wed, 21 Apr 2021 07:12:04 +0000 (03:12 -0400)]
Move nested quantification check to ast_validation

3 years agoCheck for intrinsics before coercing to a function pointer
Tomasz Miąsko [Wed, 21 Apr 2021 00:00:00 +0000 (00:00 +0000)]
Check for intrinsics before coercing to a function pointer

Return an error if coercing function items / non-capturing closures
to a common function pointer type would require reifying an intrinsic.

3 years agoJust merge all of the <title> tests into one
Smitty [Tue, 20 Apr 2021 23:56:28 +0000 (19:56 -0400)]
Just merge all of the <title> tests into one

3 years agoAdd test for title of root page in item-title.rs
Smitty [Tue, 20 Apr 2021 23:53:44 +0000 (19:53 -0400)]
Add test for title of root page in item-title.rs

3 years agoAdd test for issue #71176
marmeladema [Tue, 20 Apr 2021 23:07:42 +0000 (00:07 +0100)]
Add test for issue #71176

3 years agoAdd test for issue #70304
marmeladema [Tue, 20 Apr 2021 22:59:05 +0000 (23:59 +0100)]
Add test for issue #70304

3 years agofix is_module check
Smitty [Tue, 20 Apr 2021 23:10:00 +0000 (19:10 -0400)]
fix is_module check

3 years agoMerge mod-title and item-title tests
Smitty [Tue, 20 Apr 2021 22:57:26 +0000 (18:57 -0400)]
Merge mod-title and item-title tests

3 years agoRename pushname to is_module
Smitty [Tue, 20 Apr 2021 22:53:15 +0000 (18:53 -0400)]
Rename pushname to is_module

3 years agoAdd test for issue #70303
marmeladema [Tue, 20 Apr 2021 22:49:04 +0000 (23:49 +0100)]
Add test for issue #70303

3 years agoAdd test for issue #78671
marmeladema [Tue, 20 Apr 2021 22:41:40 +0000 (23:41 +0100)]
Add test for issue #78671

3 years agoAdd test for issue #79636
marmeladema [Tue, 20 Apr 2021 22:33:13 +0000 (23:33 +0100)]
Add test for issue #79636

3 years agoAdd test for issue #79949
marmeladema [Tue, 20 Apr 2021 21:40:09 +0000 (22:40 +0100)]
Add test for issue #79949

3 years agoWrite Rustdoc titles like "x in crate::mod - Rust"
Smitty [Tue, 20 Apr 2021 21:31:18 +0000 (17:31 -0400)]
Write Rustdoc titles like "x in crate::mod - Rust"

This makes Rustdoc titles for items read like
"x in cratename::blah::foo - Rust". Title for modules and other
non-items are unchanged, and still read like
"doccratenameconst::blah::foo - Rust". This makes managing several open
Rustdoc tabs easier.

Closes #84371.

3 years agoFix broken doc link
Stephen Albert-Moore [Tue, 20 Apr 2021 21:10:20 +0000 (17:10 -0400)]
Fix broken doc link

3 years agoRemove TraitRefHackInner and use the concatenating functionality instead of trait_ref...
Jack Huey [Tue, 20 Apr 2021 20:39:41 +0000 (16:39 -0400)]
Remove TraitRefHackInner and use the concatenating functionality instead of trait_ref_hack

3 years agoAdd BinderScopeType to replace binder_depth and from_poly_trait_ref
Jack Huey [Tue, 13 Apr 2021 20:58:00 +0000 (16:58 -0400)]
Add BinderScopeType to replace binder_depth and from_poly_trait_ref

3 years agoA non-minimal set of TraitRefBoundarys to work on removing from_poly_trait_ref
Jack Huey [Mon, 12 Apr 2021 13:26:39 +0000 (09:26 -0400)]
A non-minimal set of TraitRefBoundarys to work on removing from_poly_trait_ref

3 years agoPrecompute inverse binder depth
Jack Huey [Mon, 12 Apr 2021 13:12:10 +0000 (09:12 -0400)]
Precompute inverse binder depth

3 years agoUses flex to fix formatting of h1 at any width.
Tor Hovland [Tue, 20 Apr 2021 20:31:48 +0000 (22:31 +0200)]
Uses flex to fix formatting of h1 at any width.

3 years agoChange uses of never type
Christiaan Dirkx [Wed, 14 Apr 2021 01:19:01 +0000 (03:19 +0200)]
Change uses of never type

3 years agoReplace `Void` with never type
Christiaan Dirkx [Wed, 14 Apr 2021 00:37:36 +0000 (02:37 +0200)]
Replace `Void` with never type

3 years agoAuto merge of #84353 - estebank:as-ref-mir, r=davidtwco
bors [Tue, 20 Apr 2021 14:05:12 +0000 (14:05 +0000)]
Auto merge of #84353 - estebank:as-ref-mir, r=davidtwco

Suggest `.as_ref()` on borrow error involving `Option`/`Result`

When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.

Fix #84165.

3 years agoAuto merge of #84363 - Dylan-DPC:rollup-ink2wyq, r=Dylan-DPC
bors [Tue, 20 Apr 2021 11:19:31 +0000 (11:19 +0000)]
Auto merge of #84363 - Dylan-DPC:rollup-ink2wyq, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #84337 (Clarify the difference between insert and get_or_insert)
 - #84340 (rustdoc: Show nag box on IE11)
 - #84345 (Remove comment about doc hack.)
 - #84347 (rustdoc: Simplify some document functions)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoImprove the docstrings of the `Lto` struct.
Edd Barrett [Tue, 20 Apr 2021 09:19:25 +0000 (10:19 +0100)]
Improve the docstrings of the `Lto` struct.

3 years agoRollup merge of #84347 - Swatinem:simplify-document-fns, r=jyn514
Dylan DPC [Tue, 20 Apr 2021 09:08:30 +0000 (11:08 +0200)]
Rollup merge of #84347 - Swatinem:simplify-document-fns, r=jyn514

rustdoc: Simplify some document functions

* Remove `prefix` param of `document_short/full`, `render_markdown`, as its always an empty string.
* Remove `Option` wrapping of `document_short` `parent`, as its always `Some`.

3 years agoRollup merge of #84345 - ehuss:remove-core-core-comment, r=Mark-Simulacrum
Dylan DPC [Tue, 20 Apr 2021 09:08:29 +0000 (11:08 +0200)]
Rollup merge of #84345 - ehuss:remove-core-core-comment, r=Mark-Simulacrum

Remove comment about doc hack.

I neglected to remove this comment in #83955.

3 years agoRollup merge of #84340 - notriddle:patch-4, r=GuillaumeGomez
Dylan DPC [Tue, 20 Apr 2021 09:08:28 +0000 (11:08 +0200)]
Rollup merge of #84340 - notriddle:patch-4, r=GuillaumeGomez

rustdoc: Show nag box on IE11

Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported by the [tiered browser support list], it's even more severely broken on other Rust websites, and IE11 doesn't support the `<details>` tag that we want to use.

In the interest of honesty, let's give an actual error message for anyone on IE11.

[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md

3 years agoRollup merge of #84337 - matklad:insert_or_insert, r=jyn514
Dylan DPC [Tue, 20 Apr 2021 09:08:27 +0000 (11:08 +0200)]
Rollup merge of #84337 - matklad:insert_or_insert, r=jyn514

Clarify the difference between insert and get_or_insert

Took me a while to realize that the two are actually different.

3 years agoAuto merge of #84323 - richkadel:uncovered-functions, r=tmandry
bors [Tue, 20 Apr 2021 08:33:51 +0000 (08:33 +0000)]
Auto merge of #84323 - richkadel:uncovered-functions, r=tmandry

coverage of async function bodies should match non-async

This fixes some missing coverage within async function bodies.

Commit 1 demonstrates the problem in the fixed issue, and commit 2 corrects it.

Fixes: #83985
3 years agoAuto merge of #83900 - torhovland:issue-83832, r=jyn514
bors [Tue, 20 Apr 2021 06:03:15 +0000 (06:03 +0000)]
Auto merge of #83900 - torhovland:issue-83832, r=jyn514

Add stability tags to ImportItem.

Fixes #83832.

3 years agoAuto merge of #84295 - richkadel:continue-coverage, r=tmandry
bors [Tue, 20 Apr 2021 03:08:24 +0000 (03:08 +0000)]
Auto merge of #84295 - richkadel:continue-coverage, r=tmandry

Add coverage to continue statements

`continue` statements were missing coverage. This was particularly
noticeable in a match pattern that contained only a `continue`
statement, leaving the branch appear uncounted. This PR addresses the
problem and adds tests to prove it.

r? `@tmandry`
cc: `@wesleywiser`

3 years agoAuto merge of #84334 - klensy:typo-compiler, r=jyn514
bors [Tue, 20 Apr 2021 00:16:45 +0000 (00:16 +0000)]
Auto merge of #84334 - klensy:typo-compiler, r=jyn514

fix few typos in comments

3 years agoSuggest `.as_ref()` on borrow error involving `Option`/`Result`
Esteban Küber [Sun, 18 Apr 2021 16:37:47 +0000 (09:37 -0700)]
Suggest `.as_ref()` on borrow error involving `Option`/`Result`

When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.

Fix #84165.

3 years agorustdoc: Simplify some document functions
Arpad Borsos [Mon, 19 Apr 2021 21:31:11 +0000 (23:31 +0200)]
rustdoc: Simplify some document functions

* Remove `prefix` param of `document_short/full`, `render_markdown`, as its always an empty string.
* Remove `Option` wrapping of `document_short` `parent`, as its always `Some`.

3 years agoUse onEachLazy to iterate DOMTokenList
Michael Howell [Mon, 19 Apr 2021 21:12:40 +0000 (14:12 -0700)]
Use onEachLazy to iterate DOMTokenList

3 years agoRemove comment about doc hack.
Eric Huss [Mon, 19 Apr 2021 21:06:36 +0000 (14:06 -0700)]
Remove comment about doc hack.

3 years agoAuto merge of #84342 - Dylan-DPC:rollup-5b40142, r=Dylan-DPC
bors [Mon, 19 Apr 2021 20:49:27 +0000 (20:49 +0000)]
Auto merge of #84342 - Dylan-DPC:rollup-5b40142, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #84123 (Introduce CompileMonoItem DepNode)
 - #84126 (Enable sanitizers for x86_64-unknown-linux-musl)
 - #84168 (Lower async fn in traits.)
 - #84256 (doc: use U+2212 for minus sign in floating-point -0.0 remarks)
 - #84291 (fix aliasing violations in thread_local_const_init)
 - #84313 (fix suggestion for unsized function parameters)
 - #84330 (Remove unused footer section)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoSmall refactor
Cameron Steffen [Mon, 19 Apr 2021 20:40:05 +0000 (15:40 -0500)]
Small refactor

3 years agoRemove closure_tree
Cameron Steffen [Mon, 19 Apr 2021 20:39:19 +0000 (15:39 -0500)]
Remove closure_tree

3 years agorustdoc: Show nag box on IE10
Michael Howell [Mon, 19 Apr 2021 18:40:25 +0000 (11:40 -0700)]
rustdoc: Show nag box on IE10

Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported
by the [tiered browser support list], it's even more severely broken on other
Rust websites, and IE11 doesn't support the `<details>` tag that we want
to use.

In the interest of honesty, let's give an actual error message for anyone
on IE11.

[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md

3 years agoRollup merge of #84330 - GuillaumeGomez:remove-footer, r=jyn514
Dylan DPC [Mon, 19 Apr 2021 20:00:11 +0000 (22:00 +0200)]
Rollup merge of #84330 - GuillaumeGomez:remove-footer, r=jyn514

Remove unused footer section

I realized yesterday while working on docs.rs that rustdoc was generating a "footer"section that it doesn't use. No need to keep it then.

r? `@jyn514`

3 years agoRollup merge of #84313 - lcnr:sized-err-msg, r=petrochenkov
Dylan DPC [Mon, 19 Apr 2021 20:00:10 +0000 (22:00 +0200)]
Rollup merge of #84313 - lcnr:sized-err-msg, r=petrochenkov

fix suggestion for unsized function parameters

taken from `@fasterthanlime's` article https://fasterthanli.me/articles/whats-in-the-box

3 years agoRollup merge of #84291 - RalfJung:thread-local-const-init, r=alexcrichton
Dylan DPC [Mon, 19 Apr 2021 20:00:09 +0000 (22:00 +0200)]
Rollup merge of #84291 - RalfJung:thread-local-const-init, r=alexcrichton

fix aliasing violations in thread_local_const_init

Fixes https://github.com/rust-lang/rust/pull/83416#discussion_r615364774

r? `@alexcrichton` `@sfackler`

3 years agoRollup merge of #84256 - tspiteri:pretty-minus-zero, r=workingjubilee
Dylan DPC [Mon, 19 Apr 2021 20:00:08 +0000 (22:00 +0200)]
Rollup merge of #84256 - tspiteri:pretty-minus-zero, r=workingjubilee

doc: use U+2212 for minus sign in floating-point -0.0 remarks

Also remove plus sign in `-0.0 == +0.0` to make it a valid expression.

3 years agoRollup merge of #84168 - cjgillot:asi, r=davidtwco
Dylan DPC [Mon, 19 Apr 2021 20:00:06 +0000 (22:00 +0200)]
Rollup merge of #84168 - cjgillot:asi, r=davidtwco

Lower async fn in traits.

An error is already created by AST validation.

Fixes #84149

3 years agoRollup merge of #84126 - 12101111:musl-sanitizer, r=davidtwco
Dylan DPC [Mon, 19 Apr 2021 20:00:04 +0000 (22:00 +0200)]
Rollup merge of #84126 - 12101111:musl-sanitizer, r=davidtwco

Enable sanitizers for x86_64-unknown-linux-musl

Those 4 sanitizers get musl target support in LLVM 12 release.

3 years agoRollup merge of #84123 - bjorn3:compile_mono_item_dep_node, r=wesleywiser
Dylan DPC [Mon, 19 Apr 2021 20:00:01 +0000 (22:00 +0200)]
Rollup merge of #84123 - bjorn3:compile_mono_item_dep_node, r=wesleywiser

Introduce CompileMonoItem DepNode

This is likely required for allowing efficient hot code swap support in cg_clif's jit mode. My prototype currently requires re-compiling all functions, which is both slow and uses a lot of memory as there is not support for freeing the memory used by replaced functions yet.

cc https://github.com/bjorn3/rustc_codegen_cranelift/issues/1087

3 years agocompute fn_sig span from body call_site, and use body ctxt, not root
Rich Kadel [Mon, 19 Apr 2021 19:30:55 +0000 (12:30 -0700)]
compute fn_sig span from body call_site, and use body ctxt, not root

3 years agoNo longer need to add attrs to ImportSource.
Tor Hovland [Mon, 19 Apr 2021 18:39:04 +0000 (20:39 +0200)]
No longer need to add attrs to ImportSource.

3 years agofix suggestion for unsized function parameters
lcnr [Sun, 18 Apr 2021 17:35:23 +0000 (19:35 +0200)]
fix suggestion for unsized function parameters

3 years agoAuto merge of #84091 - tmiasko:check-attrs-sym, r=davidtwco
bors [Mon, 19 Apr 2021 18:05:44 +0000 (18:05 +0000)]
Auto merge of #84091 - tmiasko:check-attrs-sym, r=davidtwco

Match against attribute name when validating attributes

Extract attribute name once and match it against symbols that are being
validated, instead of using `Session::check_name` for each symbol
individually.

Assume that all validated attributes are used, instead of marking them
as such, since the attribute check should be exhaustive.

3 years agoClarify the difference between insert and get_or_insert
Aleksey Kladov [Mon, 19 Apr 2021 14:48:51 +0000 (17:48 +0300)]
Clarify the difference between insert and get_or_insert

3 years agofix few typos
klensy [Mon, 19 Apr 2021 12:57:08 +0000 (15:57 +0300)]
fix few typos

3 years agoAuto merge of #84294 - WaffleLapkin:patch-2, r=jonas-schievink
bors [Mon, 19 Apr 2021 11:55:52 +0000 (11:55 +0000)]
Auto merge of #84294 - WaffleLapkin:patch-2, r=jonas-schievink

Slightly change wording in doc comment and fix typo in vec/mod.rs

Suggested by `@pickfire` in https://github.com/rust-lang/rust/pull/82760

3 years agoFix `vxworks` compilation errors
Christiaan Dirkx [Wed, 14 Apr 2021 18:35:20 +0000 (20:35 +0200)]
Fix `vxworks` compilation errors

3 years agoMove `sys::vxworks` code to `sys::unix`
Christiaan Dirkx [Mon, 12 Apr 2021 03:58:30 +0000 (05:58 +0200)]
Move `sys::vxworks` code to `sys::unix`