Commit Graph

206826 Commits

Author SHA1 Message Date
Scott McMurray
f0dc35927b Put back one of the uses for intra-doc mentions 2022-09-23 21:47:23 -07:00
bors
06968954f7 Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
Use internal iteration in `Iterator` comparison methods

Updates the `Iterator` methods `cmp_by`, `partial_cmp_by`, and `eq_by` to use internal iteration on `self`. I've also extracted their shared logic into a private helper function `iter_compare`, which will either short-circuit once the comparison result is known or return the comparison of the lengths of the iterators.

This change also indirectly benefits calls to `cmp`, `partial_cmp`, `eq`, `lt`, `le`, `gt`, and `ge`.

Unsurprising benchmark results: iterators that benefit from internal iteration (like `Chain`) see a speedup, while other iterators are unaffected.
```
 name                           before ns/iter  after ns/iter  diff ns/iter   diff %  speedup
 iter::bench_chain_partial_cmp  208,301         54,978             -153,323  -73.61%   x 3.79
 iter::bench_partial_cmp        55,527          55,702                  175    0.32%   x 1.00
 iter::bench_lt                 55,502          55,322                 -180   -0.32%   x 1.00
```
2022-09-24 04:04:46 +00:00
Eric Huss
f5f69bc0bb Document some missing command-line arguments 2022-09-23 19:02:59 -07:00
bors
e1c28e0c85 Auto merge of #102068 - cjgillot:erased-lifetime-print, r=eholk
Always print '_, even for erased lifetimes.

Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021.  This PR applies this discipline to rustc itself.
2022-09-24 01:23:17 +00:00
Eric Huss
3d01d43d48 rustdoc: Stabilize --diagnostic-width 2022-09-23 18:04:15 -07:00
inquisitivecrystal
ad05b32fee Add regression test for issue #100878 2022-09-23 16:54:34 -07:00
Chris Wailes
7ad0ac75c9 Respond to document review feedback 2022-09-23 16:14:17 -07:00
Camille GILLOT
eb1ddd2573 Bless miri. 2022-09-24 00:10:28 +02:00
Christian Poveda
14fc9b29a3 add flag to specify the number of cpus 2022-09-23 16:28:59 -05:00
Michael Howell
ac06d9cca3 diagnostics: avoid syntactically invalid suggestion in if conditionals
Fixes #101065
2022-09-23 14:27:44 -07:00
León Orell Valerian Liehr
28e0c5aec8 Allow more !Copy impls 2022-09-23 21:51:40 +02:00
Nilstrieb
66484c0a21 Fix clippy's const fn stability check for CURRENT_RUSTC_VERSION
Since clippy can use a projects MSRV for its lints, it might not want
to consider functions as const stable if they have been added lately.

Functions that have been stabilized this version use
CURRENT_RUSTC_VERSION as their version, which gets then turned into the
current version, which might be something like `1.66.0-dev`. The version
parser cannot deal with this version, so it has to be stripped off.
2022-09-23 21:04:54 +02:00
Nilstrieb
aa35ab81ea Stabilize const BTree{Map,Set}::new
Since `len` and `is_empty` are not const stable yet, this also
creates a new feature for them since they previously used the same
`const_btree_new` feature.
2022-09-23 20:55:37 +02:00
onestacked
84666afb36 Constify Residual behind const_try 2022-09-23 20:17:31 +02:00
Deadbeef
a74eba4ad5 Make ManuallyDrop satisfy ~const Destruct 2022-09-23 18:07:36 +00:00
onestacked
d78bc41785 Remove unused ConstFn(Once)Closure structs. 2022-09-23 19:55:51 +02:00
Michael Howell
f570d310b7 rustdoc: remove no-op CSS rule #source-sidebar { z-index: 1 }
This rule became redundant in 07e3f998b1.
When `#source-sidebar` became nested below `.sidebar`, it went from being
`position: fixed` to `position: static`, and according to MDN's [z-index]
documentation, this means it has no effect.

[z-index]: https://developer.mozilla.org/en-US/docs/Web/CSS/z-index
2022-09-23 10:48:24 -07:00
Michael Howell
8b0feb8622 rustdoc: remove no-op mobile CSS #source-sidebar { z-index: 11 }
This rule became redundant in 07e3f998b1.
When `#source-sidebar` became nested below `.sidebar`, it went from being
`position: fixed` to `position: static`, and according to MDN's [z-index]
documentation, this means it has no effect.

[z-index]: https://developer.mozilla.org/en-US/docs/Web/CSS/z-index
2022-09-23 10:45:26 -07:00
bors
4a14677239 Auto merge of #102192 - matthiaskrgr:rollup-0ctjzco, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #102094 (Add missing documentation for `bool::from_str`)
 - #102115 (Add examples to `bool::then` and `bool::then_some`)
 - #102134 (Detect panic strategy using `rustc --print cfg`)
 - #102137 (Don't convert valtree to constvalue during normalization)
 - #102148 (add regression test for miri issue 2433)
 - #102158 (rustdoc: clean up CSS/DOM for deprecation warnings)
 - #102177 (Fix a typo in `std`'s root docs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-23 16:44:06 +00:00
Camille GILLOT
9b83e316c8 Bless clippy. 2022-09-23 18:42:14 +02:00
Camille GILLOT
8077d03b3f Bless 32bit ui. 2022-09-23 18:42:14 +02:00
Camille GILLOT
8de8115262 Bless pretty tests. 2022-09-23 18:42:14 +02:00
Camille GILLOT
f11499189e Bless cgu test. 2022-09-23 18:42:14 +02:00
Camille GILLOT
aac2c7ddd8 Always print '_, even for erased lifetimes. 2022-09-23 18:42:14 +02:00
onestacked
6267c60f6a Added some spacing in const closure 2022-09-23 18:20:57 +02:00
Michael Howell
cd481542df rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
Guillaume Gomez
d30cb5b663 Improve GUI tests by using variables 2022-09-23 18:12:37 +02:00
Guillaume Gomez
a4046e93e2 Update browser-ui-test version to 0.11.0 2022-09-23 18:12:23 +02:00
onestacked
449326aaad Added const Default impls for Arrays and Tuples. 2022-09-23 17:53:59 +02:00
bors
0d5748e8e9 Auto merge of #2559 - RalfJung:gc-refactor, r=saethlin
GC: factor out visiting all machine values

`@saethlin` that is roughly what I had in mind.

I think some parts of the state are skipped by the visitor. I listed the ones that I found in FIXMEs but I am not sure if that list is complete.
2022-09-23 15:37:21 +00:00
Michael Howell
e3cb0a84c2 rustdoc: add regression test for sidebar width jank 2022-09-23 08:35:14 -07:00
Michael Howell
ee8e0bda34 rustdoc: CSS prevent sidebar width change jank
This commit makes the `width` and `min-width` of the sidebar the same. They
originally were when cad0fce205 added the
`min-width` rule, but 6a5f8b1aef changed the
width without changing the `min-width`, causing it to sometimes oscilate
between 200 and 250 pixels depending on the main content.
2022-09-23 08:35:14 -07:00
Wesley Wiser
99adba6702 Update the LLVM license mentioned in COPYRIGHT
LLVM has relicensed their codebase. Remove the old UIUC license text
from the LLVM section and include the licensing text used by LLVM
itself.
2022-09-23 11:12:38 -04:00
Wesley Wiser
4e790a8732 Remove mentions of libbacktrace from COPYRIGHT
Use of libbacktrace was removed in
06d565c967 where we switched to using the
gimili library instead. Note: the backtrace submodule located at
library/backtrace points to backtrace-rs which removed support for using
libbacktrace in https://github.com/rust-lang/backtrace-rs/pull/423.
2022-09-23 11:12:33 -04:00
Wesley Wiser
557b700fbd Remove mention of "compiler-rt" from COPYRIGHT file
The compiler-rt dependency was removed in
7e6c9f3635 in favor of a vendored
dependency on rust-lang/compiler-builtins (dual UIUC and MIT licensed).
That vendored dependency was converted to a regular Cargo dependency in
4c21a3bc2a.
2022-09-23 11:12:25 -04:00
Pietro Albini
20638eba80 add changelog lines for the remote-test-server changes 2022-09-23 15:43:01 +02:00
Matthias Krüger
dfe045ad71 Rollup merge of #102177 - inquisitivecrystal:std-doc-typo, r=Dylan-DPC
Fix a typo in `std`'s root docs

Remarkably, this typo has been present for *seven years.* I was so surprised that I reread the text five times and then asked people on the rust Zulip to double-check. :)
2022-09-23 15:40:23 +02:00
Matthias Krüger
6d6d89b08b Rollup merge of #102158 - notriddle:notriddle/stab-p, r=GuillaumeGomez
rustdoc: clean up CSS/DOM for deprecation warnings

Preview: https://notriddle.com/notriddle-rustdoc-test/stab-p/std/macro.try.html
2022-09-23 15:40:23 +02:00
Matthias Krüger
0d0186939b Rollup merge of #102148 - RalfJung:miri-test, r=oli-obk
add regression test for miri issue 2433

Adding this here because the test needs to be run with debug assertions enabled to be sure so I had to run it in the rustc workspace.

Cc https://github.com/rust-lang/miri/issues/2433
r? ``@oli-obk``
2022-09-23 15:40:22 +02:00
Matthias Krüger
3a8bad98d7 Rollup merge of #102137 - b-naber:lazy-const-val-conversion, r=lcnr
Don't convert valtree to constvalue during normalization

r? ``@lcnr``
2022-09-23 15:40:22 +02:00
Matthias Krüger
3de0d678f8 Rollup merge of #102134 - flba-eb:master, r=bjorn3
Detect panic strategy using `rustc --print cfg`

Instead of relying on a command line parameter, detect if a target is able to unwind or not.
Ignore tests that require unwinding on targets that don't support it.

I did not find any place where the removed parameter has been used, but it feels a bit risky as
I'm new to this test framework.

r? bjorn3
2022-09-23 15:40:21 +02:00
Matthias Krüger
6b001f3d68 Rollup merge of #102115 - Alfriadox:master, r=thomcc
Add examples to `bool::then` and `bool::then_some`

Added examples to `bool::then` and `bool::then_some` to show the distinction between the eager evaluation of `bool::then_some` and the lazy evaluation of `bool::then`.
2022-09-23 15:40:20 +02:00
Matthias Krüger
986fc4b5d2 Rollup merge of #102094 - GuillaumeGomez:bool-from-str-missing-docs, r=scottmcm
Add missing documentation for `bool::from_str`

Fixes #101870.
2022-09-23 15:40:20 +02:00
onestacked
53049f7dcd Fixed Doc-Tests 2022-09-23 15:39:13 +02:00
bors
9a963e3bad Auto merge of #102056 - b-naber:unevaluated, r=lcnr
Introduce mir::Unevaluated

Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that.

r? `@lcnr`
2022-09-23 13:39:11 +00:00
Pietro Albini
db14a52713 add the --sequential flag to compiletest 2022-09-23 15:36:24 +02:00
Pietro Albini
02869e3041 replace --remote with the --bind flag in remote-test-server 2022-09-23 15:36:23 +02:00
Pietro Albini
c057d04b92 make remote-test-server cli parsing more consistent 2022-09-23 15:36:21 +02:00
b-naber
a705e65605 rename Unevaluated to UnevaluatedConst 2022-09-23 14:27:34 +02:00
b-naber
ded3edac9a fix test 2022-09-23 14:25:30 +02:00