Commit graph

158231 commits

Author SHA1 Message Date
Nicholas Nethercote
580d357b5a Change the assert in is_useful to a debug_assert.
It's hot in the `match-stress-enum` benchmark.
2021-11-09 16:13:44 +11:00
Caleb Zulawski
0ecf9871fc
Merge pull request #181 from rust-lang/rotate_lanes
rotate_{left,right} -> rotate_lanes_{left,right}
2021-11-08 23:01:05 -05:00
bors
c57704f3eb Auto merge of #90695 - GuillaumeGomez:rollup-kxvvw4o, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #90494 (ARMv6K Horizon OS panic change)
 - #90652 (use filter(|x| matches!(..)) instead of filter_map(|x| match x ... => Some(xy)))
 - #90657 (Fix bug with `#[doc]` string single-character last lines)
 - #90689 (⬆️ rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-09 01:30:23 +00:00
Proloy Mishra
d2e87281fc
add Simd::from_slice (#177)
* add `Simd::from_slice`

uses a zeroed initial array and loops so that it can be const.
unfortunately, parameterizing the assert with slice length
needs `#![feature(const_fn_fn_ptr_basics)]` to work.
2021-11-08 17:28:43 -08:00
Yuki Okushi
ebd401bc36
Add some GATs-related regression tests 2021-11-09 08:04:39 +09:00
Gus Wynn
958de5a938 warn on must_use use on async fn's 2021-11-08 14:38:41 -08:00
Jacob Pratt
6d2f8af1db
Permit const assertions in stdlib 2021-11-08 17:06:00 -05:00
bors
515472757d Auto merge of #90443 - camelid:rustdoc-subst, r=GuillaumeGomez
Merge `DocContext.{ty,lt,ct}_substs` into one map

It should be impossible to have more than one entry with a particular
key across the three maps, so they should be one map. In addition to
making it impossible for multiple entries to exist, this should improve
memory usage since now only one map is allocated on the stack and heap.

r? `@GuillaumeGomez`
2021-11-08 21:37:59 +00:00
bstrie
61b1394ac7 Attempt to address perf regressions with #[inline] 2021-11-08 15:51:56 -05:00
Jakub Kądziołka
048e1c942d
Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message 2021-11-08 19:49:41 +01:00
bstrie
3024efff59 Update Copy/Clone documentation WRT arrays 2021-11-08 13:11:59 -05:00
bstrie
ce1143e94d impl Copy/Clone for arrays in std, not in compiler 2021-11-08 13:11:58 -05:00
bstrie
86c0ef8adc Add comments regarding superfluous !Sync impls 2021-11-08 13:07:20 -05:00
Michael Woerister
fefe1e9192 Record more artifact sizes during self-profiling. 2021-11-08 17:02:40 +01:00
Deadbeef
d863021521
fmt 2021-11-08 23:55:51 +08:00
Deadbeef
f1126f1272
Make select_* methods return Vec for TraitEngine 2021-11-08 23:35:23 +08:00
Guillaume Gomez
27095246fb
Rollup merge of #90689 - lnicola:rust-analyzer-2021-11-08, r=lnicola
⬆️ rust-analyzer

r? ``@ghost``
2021-11-08 15:15:25 +01:00
Guillaume Gomez
d9fc7d1041
Rollup merge of #90657 - GuillaumeGomez:one-char-last-line-removed, r=jyn514
Fix bug with `#[doc]` string single-character last lines

Fixes #90618.

This is because `.iter().all(|c| c == '*')` returns `true` if there is no character checked. And in case the last line has only one character, it simply returns `true`, making the last line behind removed.
2021-11-08 15:15:24 +01:00
Guillaume Gomez
931881070a
Rollup merge of #90652 - matthiaskrgr:unnnec_filter_map, r=jyn514
use filter(|x| matches!(..)) instead of filter_map(|x| match x ... => Some(xy))
2021-11-08 15:15:23 +01:00
Guillaume Gomez
f07f800364
Rollup merge of #90494 - Meziu:armv6k-3ds-target, r=sanxiyn
ARMv6K Horizon OS panic change

After a small change to `backtrace-rs` ([#448](https://github.com/rust-lang/backtrace-rs/pull/448)), `PanicStrategy::Unwind` is now fully supported.
2021-11-08 15:15:22 +01:00
bors
495322d776 Auto merge of #90361 - Mark-Simulacrum:always-verify, r=michaelwoerister
Enable verification for 1/32th of queries loaded from disk

This is a limited enabling of incremental verification for query results loaded from disk, which previously did not run without -Zincremental-verify-ich. If enabled for all queries, we see a probably unacceptable hit of ~50% in the worst case, so this pairs back the verification to a more limited set based on the hash key.

Per collected [perf results](https://github.com/rust-lang/rust/pull/84227#issuecomment-953350582), this is a regression of at most 7% on coercions opt incr-unchanged, and typically less than 0.5% on other benchmarks (largely limited to incr-unchanged). I believe this is acceptable performance to land, and we can either ratchet it up or down fairly easily.

We have no real sense of whether this will lead to a large amount of assertions in the wild, but since those assertions may lead to miscompilations today, it seems potentially warranted. We have a good bit of lead time until the next stable release, though the holiday season will also start soon; we may wish to discuss the timing of enabling this and weigh the desire to prevent (possible) miscompilations against assertions.

cc `@rust-lang/wg-incr-comp`
2021-11-08 13:38:08 +00:00
Tomoaki Kawada
f17077002b kmc-solid: Avoid the use of asm_const 2021-11-08 19:13:31 +09:00
Laurențiu Nicola
1e56dd4aef ⬆️ rust-analyzer 2021-11-08 12:07:03 +02:00
SparrowLii
03f4fe6a66 enable dotprod target feature in arm 2021-11-08 16:24:50 +08:00
bors
3e3890c9d4 Auto merge of #90675 - camelid:cleanup-impl, r=jyn514
rustdoc: Cleanup `clean::Impl` and other parts of `clean`

This PR cleans up and reduces the size of `clean::Impl`, makes some other small performance improvements, and removes some Clean impls that are either unnecessary or potentially confusing.

r? `@jyn514`
2021-11-08 08:21:51 +00:00
bors
b3074819f6 Auto merge of #90680 - calebcartwright:rustfmt-sync, r=calebcartwright
sync rustfmt subtree
2021-11-08 05:13:41 +00:00
Joshua Nelson
6192246e39 x.py: remove fixme by deleting code
As far as I can tell, this parameter was never used, so just delete it
as unnecessary.
2021-11-08 04:45:15 +00:00
Joshua Nelson
5bf3a5dfc7 Make compiler-docs only control the default instead of being a hard off-switch
This also fixes `x doc src/tools/clippy` when compiler-docs is disabled.
2021-11-08 04:28:25 +00:00
Caleb Cartwright
30fb1246b4 Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync 2021-11-07 20:37:34 -06:00
Joshua Nelson
51345a83aa Go back to loading all external crates unconditionally
This *continues* to cause regressions. This code will be unnecessary
once access to the resolver happens fully before creating the tyctxt
(#83761), so load all crates unconditionally for now.
2021-11-08 02:27:21 +00:00
Joshua Nelson
cdafe99539 Add more missing methods to IntraLinkCrateLoader
This helps with (but does not fix)
https://github.com/rust-lang/rust/issues/84738. I tested on
edcee7b812
and still hit ICEs.
2021-11-08 02:27:21 +00:00
Noah Lev
b5817fada2 rustdoc: Remove top-level wrappers for ImplKind methods
The `ImplKind` methods can just be used directly instead.
2021-11-07 18:26:37 -08:00
bors
43192ca3d7 Auto merge of #89488 - c410-f3r:testsssssss, r=petrochenkov
Move some tests to more reasonable directories - 8

cc #73494
r? `@petrochenkov`
2021-11-08 02:04:31 +00:00
Caleb Cartwright
ea199bacef
Merge pull request #5070 from calebcartwright/rustup-2021-11-s1
subtree sync
2021-11-07 19:40:15 -06:00
Joshua Nelson
ebf8966156 Use has_errors_or_lint_errors in rustdoc instead of abort_if_errors()
Rustdoc is special as usual and doesn't go through RunCompiler, so it
needs its own explicit checks. The rest of the tools go through
RunCompiler, so they should be fine.
2021-11-08 01:22:28 +00:00
Joshua Nelson
c008bb0012 Don't proceed to codegen if there are lint errors 2021-11-08 01:22:28 +00:00
Joshua Nelson
0ac13bd430 Don't abort compilation after giving a lint error
The only reason to use `abort_if_errors` is when the program is so broken that either:
1. later passes get confused and ICE
2. any diagnostics from later passes would be noise

This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints.
So it can continue to lint and compile even if there are lint errors.
2021-11-08 01:22:28 +00:00
Caleb Cartwright
31bc54a9a8 chore: bump toolchain 2021-11-07 19:14:34 -06:00
bors
5fa94f3c57 Auto merge of #88368 - jyn514:metadata-error, r=petrochenkov
Improve error when an .rlib can't be parsed

This usually describes either an error in the compiler itself or some
sort of IO error. Either way, we should report it to the user rather
than just saying "crate not found".

This only gives an error if the crate couldn't be loaded at all - if the
compiler finds another .rlib or .rmeta file which was valid, it will
continue to compile the crate.

Example output:
```
error[E0785]: found invalid metadata files for crate `foo`
 --> bar.rs:3:24
  |
3 |         println!("{}", foo::FOO_11_49[0]);
  |                        ^^^
  |
  = warning: failed to parse rlib '/home/joshua/test-rustdoc/libfoo.rlib': Invalid archive extended name offset
```

cc `@ehuss`
2021-11-07 23:03:55 +00:00
Caleb Cartwright
4621915d25 Merge remote-tracking branch 'upstream/master' into rustup-2021-11-s1 2021-11-07 14:44:33 -06:00
bors
46b8e7488e Auto merge of #90668 - matthiaskrgr:clippy_nov7, r=jyn514
more clippy fixes
2021-11-07 20:04:54 +00:00
Tor Hovland
13dbdc6ad3 There is a -Clinker='arm-none-eabi-gcc' that seems to be causing trouble. 2021-11-07 20:08:42 +01:00
Tor Hovland
27464fa501 Almost all the other tests use '-include', so we'll do too. 2021-11-07 20:06:22 +01:00
Noah Lev
7c7bf451eb Remove Clean impl for &T 2021-11-07 09:23:33 -08:00
Noah Lev
d07997702f Remove unused Clean impl for Rc<T> 2021-11-07 09:20:35 -08:00
Noah Lev
72b0a57244 Remove Clean impl for Vec<T> 2021-11-07 09:19:58 -08:00
Noah Lev
efe4d7ca7e Remove Clean impl for IndexVec<T> 2021-11-07 09:19:54 -08:00
Noah Lev
750568d49c Remove Clean impl for Option<T> 2021-11-07 09:06:50 -08:00
Noah Lev
120ef36307 rustdoc: Use ty::ImplPolarity instead of custom enum 2021-11-07 08:57:33 -08:00
Noah Lev
543aea6c03 Use an enum to record polarity in clean::Impl 2021-11-07 08:52:28 -08:00