Commit Graph

162014 Commits

Author SHA1 Message Date
Vadim Petrochenkov
245d559a90 rustc_lint: Reuse the set of registered tools from resolver 2022-01-23 18:51:51 +08:00
Vadim Petrochenkov
51b2338611 rustc_lint: Reuse the set of registered tools from resolver 2022-01-23 18:51:51 +08:00
Vadim Petrochenkov
452aa81770 rustc_lint: Remove some redundant fields from EarlyContext
Use consistent function parameter order for early context construction and early linting
Rename some functions to make it clear that they do not necessarily work on the whole crate
2022-01-23 18:51:51 +08:00
Conrad Ludgate
a0748d9436 tweak all sidebar colours 2022-01-23 10:43:06 +00:00
bors
16c1a9dd7c Auto merge of #93220 - matthiaskrgr:rollup-9bkrlk0, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #90666 (Stabilize arc_new_cyclic)
 - #91122 (impl Not for !)
 - #93068 (Fix spacing for `·` between stability and source)
 - #93103 (Tweak `expr.await` desugaring `Span`)
 - #93113 (Unify search input and buttons size)
 - #93168 (update uclibc instructions for new toolchain, add link from platforms doc)
 - #93185 (rustdoc: Make some `pub` items crate-private)
 - #93196 (Remove dead code from build_helper)

Failed merges:

 - #93188 (rustdoc: fix bump down typing search on Safari)

r? `@ghost`
`@rustbot` modify labels: rollup
2022-01-23 09:16:32 +00:00
Conrad Ludgate
9c3ffd7681 adjust sidebar link brightness 2022-01-23 09:06:44 +00:00
woppopo
aa6795e2d4 Add intrinsics::const_deallocate 2022-01-23 15:13:44 +09:00
mark
cf382de0cc Remove DiagnosticBuilder.quiet 2022-01-23 00:11:13 -06:00
William D. Jones
19809ed76d Add preliminary support for inline assembly for msp430. 2022-01-22 23:42:46 -05:00
pierwill
4f89224f7f Use an indexmap to avoid sorting LocalDefIds
Update `indexmap` to 1.8.0.

Bless test
2022-01-22 22:34:16 -06:00
Michael Goulet
4ff7e6e3e3 Normalize field access types during borrowck 2022-01-22 20:05:05 -08:00
bors
788a8bc740 Auto merge of #8217 - Jarcho:needless_borrow_8191, r=camsteffen
Fix `needless_borrow` causing mutable borrows to be moved

fixes #8191

changelog: Fix `needless_borrow` causing mutable borrows to be moved
changelog: Rename `ref_in_deref` to `needless_borrow`
changelog: Suggest removing the borrow on method call receivers in `needless_borrow`
2022-01-23 03:01:39 +00:00
Jason Newcomb
c61514086d Subsume ref_in_deref into needless_borrow 2022-01-22 21:22:33 -05:00
bors
d13e8dd41d Auto merge of #93165 - eholk:disable-generator-drop-tracking, r=nikomatsakis
Disable drop range tracking in generators

Generator drop tracking caused an ICE for generators involving the Never type (Issue #93161). Since this breaks a test case with miri, we temporarily disable drop tracking so miri is unblocked while we properly fix the issue.
2022-01-23 02:20:50 +00:00
Jason Newcomb
9e9110e4f3 Remove final reference on fields and method calls in needless_borrow 2022-01-22 20:35:32 -05:00
Rune Tynan
92206318bc Add has tests for blanket_with_local trait methods 2022-01-22 19:55:25 -05:00
Matthias Krüger
1a935a52be
Rollup merge of #93196 - mati865:remove-build_helper-dead-code, r=Mark-Simulacrum
Remove dead code from build_helper

Tested with `./x.py check` ran on x86_64 Linux.
2022-01-23 01:09:47 +01:00
Matthias Krüger
d4c9c5ad66
Rollup merge of #93185 - camelid:crate-private, r=GuillaumeGomez
rustdoc: Make some `pub` items crate-private

They don't need to be `pub`. Making them crate-private improves code
clarity and `dead_code` linting.
2022-01-23 01:09:46 +01:00
Matthias Krüger
389e712a46
Rollup merge of #93168 - skrap:master, r=Amanieu
update uclibc instructions for new toolchain, add link from platforms doc

2 quick things:
1) `libc` was updated to make use of features in a uclibc version more recent than the recommended toolchain in the target document, so I updated the link.
2) As has been done with other platforms, link directly from the platform support doc to the target-specific document.
2022-01-23 01:09:45 +01:00
Matthias Krüger
74b05ce746
Rollup merge of #93113 - GuillaumeGomez:unify-sizes, r=jsha
Unify search input and buttons size

Fixes #93060.

Here what it looks like:

![Screenshot from 2022-01-20 21-38-19](https://user-images.githubusercontent.com/3050060/150418571-fefd6538-b3ee-4dd2-b77b-77e96bcfa0ed.png)
![Screenshot from 2022-01-20 21-38-22](https://user-images.githubusercontent.com/3050060/150418570-53ba259b-9bd4-4084-8b43-d74a5752d712.png)

You can test it [here](https://rustdoc.crud.net/imperio/unify-sizes/std/index.html).

r? ``@jsha``
2022-01-23 01:09:44 +01:00
Matthias Krüger
a15252817a
Rollup merge of #93103 - estebank:await-span, r=nagisa
Tweak `expr.await` desugaring `Span`

Fix #93074
2022-01-23 01:09:43 +01:00
Matthias Krüger
24ac541de6
Rollup merge of #93068 - jsha:dot-spacing, r=GuillaumeGomez
Fix spacing for `·` between stability and source

This puts in an actual space (by adjusting the space-eating operators in our templates), updates the test, and remove the now-unnecessary CSS rule.

r? ``@GuillaumeGomez``
2022-01-23 01:09:42 +01:00
Matthias Krüger
55a1f8b955
Rollup merge of #91122 - dtolnay:not, r=m-ou-se
impl Not for !

The lack of this impl caused trouble for me in some degenerate cases of macro-generated code of the form `if !$cond {...}`, even without `feature(never_type)` on a stable compiler. Namely if `$cond` contains a `return` or `break` or similar diverging expression, which would otherwise be perfectly legal in boolean position, the code previously failed to compile with:

```console
error[E0600]: cannot apply unary operator `!` to type `!`
   --> library/core/tests/ops.rs:239:8
    |
239 |     if !return () {}
    |        ^^^^^^^^^^ cannot apply unary operator `!`
```
2022-01-23 01:09:41 +01:00
Matthias Krüger
59d9ad98b6
Rollup merge of #90666 - bdbai:arc_new_cyclic, r=m-ou-se
Stabilize arc_new_cyclic

This stabilizes feature `arc_new_cyclic` as the implementation has been merged for one year and there is no unresolved questions. The FCP is not started yet.

Closes #75861 .

``@rustbot`` label +T-libs-api
2022-01-23 01:09:40 +01:00
bors
10c4c4afec Auto merge of #92998 - Amanieu:hashbrown12, r=Mark-Simulacrum
Update hashbrown to 0.12.0

[Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md#v0120---2022-01-17)
2022-01-22 23:39:21 +00:00
Santiago Pastorino
e5f2fdb539
Restructure the code leveraging in abilities more than modes 2022-01-22 18:16:11 -03:00
Caio
cbb0fffe59 Fix let_chains and if_let_guard feature flags 2022-01-22 17:45:45 -03:00
bors
bfe1564676 Auto merge of #93202 - matthiaskrgr:rollup-rki39xg, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #85967 (add support for the l4-bender linker on the x86_64-unknown-l4re-uclibc tier 3 target)
 - #92828 (Print a helpful message if unwinding aborts when it reaches a nounwind function)
 - #93012 (Update pulldown-cmark version to fix markdown list issue)
 - #93116 (Simplify use of `map_or`)
 - #93132 (Increase the format version of rustdoc-json-types)
 - #93147 (Interner cleanups)
 - #93153 (Reject unsupported naked functions)
 - #93170 (Add missing GUI test explanations)
 - #93172 (rustdoc: remove dashed underline under main heading)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-01-22 19:26:42 +00:00
Jonah Petri
ab5437e861 update uclibc instructions for new toolchain, add link from platforms doc 2022-01-22 14:16:52 -05:00
Guillaume Gomez
9f30dd9cbc Remove unneeded cursor pointer rule on mobile sidebar 2022-01-22 19:43:25 +01:00
Mara Bos
465c405418 Add test for thread::Scope invariance. 2022-01-22 17:15:08 +01:00
Mara Bos
00e191c72d
Update stabilization version of arc_new_cyclic 2022-01-22 15:48:42 +00:00
Mara Bos
12cc7d9e15 Add tracking issue number for scoped_threads. 2022-01-22 16:03:23 +01:00
Mara Bos
e572c5a3d5 Simplify Send/Sync of std:🧵:Packet. 2022-01-22 16:02:18 +01:00
Matthias Krüger
19e414a9dc
Rollup merge of #93172 - jsha:re-remove-line, r=camelid
rustdoc: remove dashed underline under main heading

This was removed in #92797 but accidentally re-introduced by a bad merge in #92861.

r? ```@camelid```
2022-01-22 15:32:57 +01:00
Matthias Krüger
86c096e243
Rollup merge of #93170 - GuillaumeGomez:gui-tests-explanations, r=jsha
Add missing GUI test explanations

Some GUI tests didn't have a global explanation about what they were testing. This fixes it.

r? ```@jsha```
2022-01-22 15:32:55 +01:00
Matthias Krüger
a8f64c0415
Rollup merge of #93153 - tmiasko:reject-unsupported-naked-functions, r=Amanieu
Reject unsupported naked functions

Transition unsupported naked functions future incompatibility lint into an error:

* Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 #79653. Change into an error fixes a soundness issue described in #32489.

* Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 #87652.

Closes #32490.
Closes #32489.

r? ```@Amanieu``` ```@npmccallum``` ```@joshtriplett```
2022-01-22 15:32:54 +01:00
Matthias Krüger
5fd9c059ef
Rollup merge of #93147 - nnethercote:interner-cleanups, r=lcnr
Interner cleanups

Improve some code that I have found confusing.

r? ```@lcnr```
2022-01-22 15:32:53 +01:00
Matthias Krüger
45f5f34293
Rollup merge of #93132 - Urgau:fix-rustdoc-json-format-version, r=oli-obk
Increase the format version of rustdoc-json-types

PR https://github.com/rust-lang/rust/pull/87648 changed `rustdoc-json-types` without increasing the format version.
e7529d6a38 (diff-ede26372490522288745c5b3df2b6b2a1cc913dcd09b29af3a49935afe00c7e6)

This PR increase the format version by +1 and move the `FORMAT_VERSION` constant to the start of the file to hopefully make it more clear that `rustdoc-json-types` is versioned.
2022-01-22 15:32:52 +01:00
Matthias Krüger
2ecbc4b49d
Rollup merge of #93116 - rust-lang:oli-obk-patch-1, r=jackh726
Simplify use of `map_or`
2022-01-22 15:32:51 +01:00
Matthias Krüger
f8335d96fa
Rollup merge of #93012 - GuillaumeGomez:pulldown-list, r=camelid
Update pulldown-cmark version to fix markdown list issue

Fixes #92971.

r? ```@camelid```
2022-01-22 15:32:50 +01:00
Matthias Krüger
9d7c8edd6c
Rollup merge of #92828 - Amanieu:unwind-abort, r=dtolnay
Print a helpful message if unwinding aborts when it reaches a nounwind function

This is implemented by routing `TerminatorKind::Abort` back through the panic handler, but with a special flag in the `PanicInfo` which indicates that the panic handler should *not* attempt to unwind the stack and should instead abort immediately.

This is useful for the planned change in https://github.com/rust-lang/lang-team/issues/97 which would make `Drop` impls `nounwind` by default.

### Code

```rust
#![feature(c_unwind)]

fn panic() {
    panic!()
}

extern "C" fn nounwind() {
    panic();
}

fn main() {
    nounwind();
}
```

### Before

```
$ ./test
thread 'main' panicked at 'explicit panic', test.rs:4:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Illegal instruction (core dumped)
```

### After

```
$ ./test
thread 'main' panicked at 'explicit panic', test.rs:4:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'panic in a function that cannot unwind', test.rs:7:1
stack backtrace:
   0:     0x556f8f86ec9b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdccefe11a6ac4396
   1:     0x556f8f88ac6c - core::fmt::write::he152b28c41466ebb
   2:     0x556f8f85d6e2 - std::io::Write::write_fmt::h0c261480ab86f3d3
   3:     0x556f8f8654fa - std::panicking::default_hook::{{closure}}::h5d7346f3ff7f6c1b
   4:     0x556f8f86512b - std::panicking::default_hook::hd85803a1376cac7f
   5:     0x556f8f865a91 - std::panicking::rust_panic_with_hook::h4dc1c5a3036257ac
   6:     0x556f8f86f079 - std::panicking::begin_panic_handler::{{closure}}::hdda1d83c7a9d34d2
   7:     0x556f8f86edc4 - std::sys_common::backtrace::__rust_end_short_backtrace::h5b70ed0cce71e95f
   8:     0x556f8f865592 - rust_begin_unwind
   9:     0x556f8f85a764 - core::panicking::panic_no_unwind::h2606ab3d78c87899
  10:     0x556f8f85b910 - test::nounwind::hade6c7ee65050347
  11:     0x556f8f85b936 - test::main::hdc6e02cb36343525
  12:     0x556f8f85b7e3 - core::ops::function::FnOnce::call_once::h4d02663acfc7597f
  13:     0x556f8f85b739 - std::sys_common::backtrace::__rust_begin_short_backtrace::h071d40135adb0101
  14:     0x556f8f85c149 - std::rt::lang_start::{{closure}}::h70dbfbf38b685e93
  15:     0x556f8f85c791 - std::rt::lang_start_internal::h798f1c0268d525aa
  16:     0x556f8f85c131 - std::rt::lang_start::h476a7ee0a0bb663f
  17:     0x556f8f85b963 - main
  18:     0x7f64c0822b25 - __libc_start_main
  19:     0x556f8f85ae8e - _start
  20:                0x0 - <unknown>
thread panicked while panicking. aborting.
Aborted (core dumped)
```
2022-01-22 15:32:49 +01:00
Matthias Krüger
ffd199d768
Rollup merge of #85967 - atopia:update-l4re-target, r=petrochenkov
add support for the l4-bender linker on the x86_64-unknown-l4re-uclibc tier 3 target

This PR contains the work by ```@humenda``` to update support for the `x86_64-unknown-l4re-uclibc` tier 3 target (published at [humenda/rust](https://github.com/humenda/rust)), rebased and adapted to current rust in follow up commits by myself. The publishing of the rebased changes is authorized and preferred by the original author. As the goal was to distort the original work as little as possible, individual commits introduce changes that are incompatible to the newer code base that the changes were rebased on. These incompatibilities have been remedied in follow up commits, so that the PR as a whole should result in a clean update of the target.
If you prefer another strategy to mainline these changes while preserving attribution, please let me know.
2022-01-22 15:32:48 +01:00
Amanieu d'Antras
537439c177 Disable test_try_reserve on Android 2022-01-22 13:51:57 +00:00
bors
1e546c5d79 Auto merge of #8278 - Alexendoo:needless-lifetime-explicit-self-ty, r=xFrednet
`needless_lifetimes`: ignore lifetimes in explicit self types

changelog: false positive fix: [`needless_lifetimes`] no longer lints lifetimes in explicit self types

They're not currently elidable (https://github.com/rust-lang/rust/issues/69064)

Fixes #7296
2022-01-22 13:00:39 +00:00
Alex Macleod
9ef6e2199c needless_lifetimes: ignore lifetimes in explicit self types 2022-01-22 12:27:57 +00:00
Mateusz Mikuła
bc8cef194b rustc_mir_itertools: Avoid needless collect with itertools 2022-01-22 12:14:42 +01:00
Mateusz Mikuła
9427ccbecd Remove dead code from build_helper 2022-01-22 12:06:44 +01:00
bors
acfc161fa6 Auto merge of #8332 - Jarcho:clear_test_results, r=camsteffen
Don't bless outdated files on windows

changelog: None
2022-01-22 04:49:41 +00:00
Jason Newcomb
7ed29c0051 Don't bless outdated files on windows 2022-01-21 23:13:09 -05:00