Commit graph

166656 commits

Author SHA1 Message Date
Keita Nonaka 3f2f4a35ed test: add try_insert() test cases for BTreeSet 2022-04-15 01:12:00 -07:00
Keita Nonaka e1626020d3 test: add get_key_value() test cases for BTreeSet 2022-04-15 00:04:03 -07:00
Takayuki Maeda f9188ccef6 use format-args-capture and remove unnecessary nested block 2022-04-15 15:56:32 +09:00
Keita Nonaka 4117e8c2d3 test: add pop_first() pop_last() test cases for BTreeSet 2022-04-14 23:40:05 -07:00
Ralf Jung 1a6c2ff4fd make unaligned_reference warning visible in future compat report 2022-04-14 22:15:56 -04:00
Ralf Jung e30d6d9096 make unaligned_references lint deny-by-default 2022-04-14 21:16:42 -04:00
Andy Russell 753d567989
clarify doc(cfg) wording
The current "This is supported" wording implies that it's possible to
still use the item on other configurations, but in an unsupported way.
Changing this to "Available" removes this ambiguity.
2022-04-14 21:12:13 -04:00
Joshua Nelson dd0ad7375e Don't build the library and standard library before documenting them
Rustdoc doesn't require the build artifacts to generate the docs, and
especially in the case of rustc, it greatly increases the time needed to
run the build.

- Statically ensure that only the top_stage of a tool is documented

If another part of rustbuild tried to document a different stage, it
would run into errors because `check::Rustc` unconditionally uses the
top stage.

- Try building rustc instead of checking to avoid duplicate artifacts

Tries to workaround the following error:
```
error[E0464]: multiple matching crates for `rustc_ast`
  --> src/librustdoc/lib.rs:40:1
   |
40 | extern crate rustc_ast;
   | ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: candidates:
           crate `rustc_ast`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-6d7c193782263d89.rlib
           crate `rustc_ast`: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-e5d09eda5beb759c.rmeta
```
2022-04-14 19:18:46 -05:00
Eric Huss 5459e6637a docs: Update tests chapter for Termination stabilization 2022-04-14 16:44:43 -07:00
Andy Russell 219d81f19b
separate flock implementations into separate modules 2022-04-14 18:30:53 -04:00
ouz-a c20bb1d59f Update issue-92893.stderr 2022-04-14 23:42:15 +03:00
Keita Nonaka 9d319f3701 update: actions/checkout@v2 to actions/checkout@v3
update: actions/checkout@v2 to actions/checkout@v3 for all yaml files

Revert "update: actions/checkout@v2 to actions/checkout@v3 for all yaml files"

This reverts commit 7445e582b900f0f56f5f2bd9036aacab97ef28e9.

change GitHub Actions version v2 to v3

change GitHub Actions
2022-04-14 13:20:39 -07:00
b-naber d8205cd3fe handle arrays and slices uniformly in valtree creation 2022-04-14 22:01:40 +02:00
Vadim Petrochenkov 6eaec56ef7 library: Remove definitions and reexports of strlen from libstd 2022-04-14 21:57:01 +03:00
Vadim Petrochenkov afa2e6f2ff Fix targets not supporting target_has_atomic = "ptr" 2022-04-14 21:53:11 +03:00
Vadim Petrochenkov 7f3cc2fbbf library: Use type aliases to make CStr(ing) in libcore/liballoc unstable 2022-04-14 21:53:11 +03:00
Vadim Petrochenkov 5bee741a08 library: Move CStr to libcore, and CString to liballoc 2022-04-14 21:53:11 +03:00
Eduardo Sánchez Muñoz 7ba0292c45 Update *.natvis files (CDB?) files to take into account Unique<T> changes 2022-04-14 19:37:39 +02:00
Eduardo Sánchez Muñoz b232b11ba5 Fix debugger tests 2022-04-14 19:37:39 +02:00
Eduardo Sánchez Muñoz 176a618242 Update inline-into-box-place test output 2022-04-14 19:35:44 +02:00
Eduardo Sánchez Muñoz 1308c73b13 Update output of cycle-cache-err-60010 test 2022-04-14 19:35:44 +02:00
Eduardo Sánchez Muñoz 399c0dcc10 Unique<T> is now considered FFI-safe 2022-04-14 19:35:40 +02:00
Eduardo Sánchez Muñoz c58af72a03 Add additional extract_field / project_field to take into account extra level of struct nesting. 2022-04-14 19:35:40 +02:00
Eduardo Sánchez Muñoz 2a91eeac1a Implement core::ptr::Unique on top of NonNull
Removes the use `rustc_layout_scalar_valid_range_start` and some `unsafe` blocks.
2022-04-14 19:35:40 +02:00
bors e7575f9670 Auto merge of #95315 - compiler-errors:pointee-fix, r=pnkfelix
when checking pointee metadata, canonicalize the `Sized` check

Use `infcx.predicate_must_hold_modulo_regions` with a `Sized` obligation instead of just calling `ty.is_sized`, because the latter does not canonicalize region and type vars (and in the test case I added in this PR, there's a region var in the `ParamEnv`).

Fixes #95311
2022-04-14 14:37:34 +00:00
Amanieu d'Antras dc345d8bff Reimplement lowering of sym operands for asm! so that it also works with global_asm! 2022-04-14 15:32:03 +01:00
Oli Scherer 48029aba2c Remove some now-dead code that was only relevant before deaggregation.
The code was broken anyway, if the deaggregator is disabled, it would have ICE on any non-enum Adt
2022-04-14 13:31:21 +00:00
Laurențiu Nicola 1e78a47fae ⬆️ rust-analyzer 2022-04-14 15:42:13 +03:00
rainy-me 1b7008dc77 refactor: change to use peekable 2022-04-14 21:18:27 +09:00
bors e371eeb778 Auto merge of #96031 - ehuss:update-cargo, r=ehuss
Update cargo

11 commits in e2e2dddebe66dfc1403a312653557e332445308b..dba5baf4345858c591517b24801902a062c399f8
2022-04-05 17:04:53 +0000 to 2022-04-13 21:58:27 +0000
- Part 6 of RFC2906 - Switch the inheritance source from `workspace` to… (rust-lang/cargo#10564)
- Part 5 of RFC2906 - Add support for inheriting `rust-version` (rust-lang/cargo#10563)
- Add support for rustc --check-cfg well known names and values (rust-lang/cargo#10486)
- Reserve filename `Cargo.toml.orig` in `cargo package` (rust-lang/cargo#10551)
- Retry command invocation with argfile (rust-lang/cargo#10546)
- Add a progress indicator for `cargo clean` (rust-lang/cargo#10236)
- Ensure host units don't depend on Docscrape units, fixes rust-lang/cargo#10545 (rust-lang/cargo#10549)
- Fix docs: Bindeps env vars are passed to build script at runtime (rust-lang/cargo#10550)
- Part 4 of RFC2906 - Add support for inheriting `readme` (rust-lang/cargo#10548)
- Part 3 of RFC2906 - Add support for inheriting `license-path`, and `depednency.path` (rust-lang/cargo#10538)
- Bump to 0.63.0, update changelog (rust-lang/cargo#10544)
2022-04-14 11:04:26 +00:00
Matthias Krüger 6511976515 remove redundant function param in check_for_self_assign_helper() 2022-04-14 11:55:37 +02:00
Matthias Krüger 15abc81967 remove reudndant function param in check_matcher_core() 2022-04-14 11:55:35 +02:00
Matthias Krüger 75287dd73d remove function param that is only used in recursive of fn inner() 2022-04-14 11:54:28 +02:00
Mara Bos 7a35c0f52d Use u32 instead of i32 for futexes. 2022-04-14 11:44:12 +02:00
Boyd Kane d73e32867f
Remove trailing whitespace
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2022-04-14 11:19:49 +02:00
Boyd Kane f6d957701f
docs: add link from zip to unzip
The docs for `Iterator::unzip` explain that it is kind of an inverse operation to `Iterator::zip` and guide the reader to the `zip` docs, but the `zip` docs don't let the user know that they can undo the `zip` operation with `unzip`. This change modifies the docs to help the user find `unzip`.
2022-04-14 09:51:47 +02:00
bors f9d4d12b6a Auto merge of #95928 - nnethercote:rm-TokenTree-Clone, r=petrochenkov
Remove `<mbe::TokenTree as Clone>`

`mbe::TokenTree` doesn't really need to implement `Clone`, and getting rid of that impl leads to some speed-ups.

r? `@petrochenkov`
2022-04-14 06:36:04 +00:00
Keita Nonaka 50c339e8f5 test: add remove() test cases for BTreeSet 2022-04-13 22:19:08 -07:00
Keita Nonaka 21d3f8444a test: add is_superset test cases for BTreeSet 2022-04-13 22:09:03 -07:00
Eric Huss 849ede1cee Update books 2022-04-13 18:28:57 -07:00
Eric Huss 4b4a514b7a Update cargo 2022-04-13 18:02:32 -07:00
bors f387c930ee Auto merge of #95981 - martingms:invert-line-offset-parsing, r=nnethercote
Optimize `<SourceFile as Decodable>::decode`

It showed up as a hot-ish function in a callgrind profile of the `await-call-tree` benchmark crate.

Provides some moderate speedups to compilation of some of the smaller benchmarks:

#### Primary benchmarks

Benchmark | Profile | Scenario | % Change | Significance Factor?
-- | -- | -- | -- | --
helloworld | check | full | -1.81% | 9.03x
helloworld | check | incr-unchanged | -1.80% | 8.99x
helloworld | check | incr-full | -1.59% | 7.97x
helloworld | check | incr-patched: println | -1.57% | 7.86x

#### Secondary benchmarks
<div class="category-title"></div>

Benchmark | Profile | Scenario | % Change | Significance Factor?
-- | -- | -- | -- | --
unify-linearly | check | incr-unchanged | -1.55% | 7.74x
unify-linearly | check | incr-patched: dummy fn | -1.42% | 7.08x
await-call-tree | check | incr-unchanged | -1.27% | 6.35x
await-call-tree | debug | incr-unchanged | -1.19% | 5.95x
await-call-tree | opt | incr-unchanged | -1.19% | 5.94x
issue-46449 | check | incr-unchanged | -1.08% | 5.39x
issue-46449 | check | incr-patched: u8 3072 | -1.00% | 5.00x
structopt-0.3.26 | check | incr-unchanged | -0.94% | 4.72x
structopt-0.3.26 | opt | incr-unchanged | -0.92% | 4.60x
structopt-0.3.26 | debug | incr-unchanged | -0.92% | 4.59x
issue-46449 | check | full | -0.89% | 4.46x
structopt-0.3.26 | check | full | -0.83% | 4.17x
structopt-0.3.26 | debug | full | -0.78% | 3.88x
structopt-0.3.26 | opt | full | -0.76% | 3.81x
unify-linearly | check | full | -0.75% | 3.74x
projection-caching | check | incr-unchanged | -0.74% | 3.70x
issue-46449 | check | incr-patched: u32 3072 | -0.70% | 3.50x
issue-46449 | check | incr-patched: empty 3072 | -0.68% | 3.41x
structopt-0.3.26 | check | incr-full | -0.68% | 3.40x
wf-projection-stress-65510 | check | incr-unchanged | -0.68% | 3.39x
issue-46449 | check | incr-patched: static str 6144 | -0.67% | 3.37x
wf-projection-stress-65510 | debug | incr-unchanged | -0.67% | 3.33x
wf-projection-stress-65510 | opt | incr-unchanged | -0.66% | 3.31x
issue-46449 | check | incr-patched: io error 6144 | -0.66% | 3.29x
unify-linearly | check | incr-full | -0.65% | 3.26x
issue-46449 | check | incr-full | -0.65% | 3.25x
structopt-0.3.26 | debug | incr-full | -0.64% | 3.18x
structopt-0.3.26 | opt | incr-full | -0.63% | 3.17x
issue-46449 | debug | incr-unchanged | -0.61% | 3.06x
issue-46449 | opt | incr-unchanged | -0.61% | 3.03x
await-call-tree | check | full | -0.60% | 2.99x
issue-88862 | check | incr-unchanged | -0.58% | 2.91x
deep-vector | debug | full | 0.57% | 2.83x
await-call-tree | check | incr-full | -0.52% | 2.59x
tt-muncher | opt | full | -0.52% | 2.58x
issue-58319 | check | incr-unchanged | -0.50% | 2.52x
await-call-tree | debug | full | -0.50% | 2.49x
await-call-tree | opt | full | -0.49% | 2.45x
deep-vector | debug | incr-patched: println | 0.47% | 2.37x
await-call-tree | debug | incr-full | -0.45% | 2.26x
await-call-tree | opt | incr-full | -0.44% | 2.18x
issue-88862 | check | full | -0.41% | 2.06x
mockall-0.11.0 | check | incr-unchanged | -0.38% | 1.90x
regression-31157 | check | incr-unchanged | -0.37% | 1.86x
wf-projection-stress-65510 | opt | full | -0.36% | 1.80x
deunicode-1.3.1 | check | incr-unchanged | -0.35% | 1.76x
unify-linearly | debug | incr-patched: dummy fn | -0.35% | 1.74x
mockall-0.11.0 | check | full | -0.35% | 1.73x
unify-linearly | debug | incr-unchanged | -0.34% | 1.69x
deunicode-1.3.1 | check | full | -0.33% | 1.63x
token-stream-stress | check | full | -0.32% | 1.62x
token-stream-stress | check | incr-full | -0.32% | 1.59x
token-stream-stress | check | incr-unchanged | -0.32% | 1.59x
regression-31157 | check | incr-patched: println | -0.31% | 1.57x
wf-projection-stress-65510 | check | full | -0.31% | 1.54x
deeply-nested-multi | check | incr-unchanged | -0.31% | 1.53x
mockall-0.11.0 | opt | incr-unchanged | -0.30% | 1.50x

r? `@nnethercote`
2022-04-13 23:18:33 +00:00
Nicholas Nethercote dd9028a8c4 mbe::TokenTree: remove Lrc around Delimited and SequenceRepetition. 2022-04-14 09:01:27 +10:00
Nicholas Nethercote 75fd391aaa Introduce TtHandle and use it in TokenSet.
This removes the last use of `<mbe::TokenTree as Clone>`. It also
removes two trivial methods on `Delimited`.
2022-04-14 09:01:23 +10:00
bors 34a6c9f26e Auto merge of #95968 - davidtwco:translation-lazy-fallback, r=oli-obk
errors: lazily load fallback fluent bundle

Addresses (hopefully) https://github.com/rust-lang/rust/pull/95667#issuecomment-1094794087.

Loading the fallback bundle in compilation sessions that won't go on to emit any errors unnecessarily degrades compile time performance, so lazily create the Fluent bundle when it is first required.

r? `@ghost` (just for perf initially)
2022-04-13 21:04:19 +00:00
Matthias Krüger 7c2d57e0fa couple of clippy::complexity fixes 2022-04-13 22:51:34 +02:00
The 8472 693589619b Add codegen tests for additional cases where noop iterators get optimized away
Optimization have improved over time and now LLVM manages to optimize more
in-place-collect noop-iterators to O(1) functions. This updates the codegen test to match.
2022-04-13 22:47:03 +02:00
Matthias Krüger bbd7ce6904 couple of clippy::perf fixes 2022-04-13 22:18:28 +02:00
bors dc4bfcbdff Auto merge of #95958 - jhpratt:bump-stdarch, r=Dylan-DPC
Update stdarch

library/stdarch bcbe0106...d215afe9 (7):
  - Add the rdm target feature to the sqrdmlsh intrinsic. (rust-lang/stdarch#1285)
  - Remove use of `#[rustc_deprecated]`
  - Remove feature gates for stabilized features
  - Change remaining _undefined_ functions to zero-init
  - Use SPDX license format and update packed_simd crate link (rust-lang/stdarch#1297)
  - Fix broken links (rust-lang/stdarch#1294)
  - Import the asm macro in std_detect (rust-lang/stdarch#1290)
2022-04-13 18:44:35 +00:00
rainy-me 4a0f8d5175 improve diagnostics for unterminated nested block comment 2022-04-14 03:22:02 +09:00