210646 Commits

Author SHA1 Message Date
bors
83356b78c4 Auto merge of #104361 - vladimir-ea:watchos_fix_linking, r=oli-obk
[watchos] Dynamic linking is not allowed for watchos targets

Dynamic linking of all apple targets was (re-) enabled in PR #100636. However, dynamic linking is not allowed on WatchOS so this broke the build of standard library for WatchOS.

This change disables dynamic linking for WatchOS non-simulator targets.
2022-11-17 17:15:31 +00:00
Yiming Lei
867582eb97 detect () to avoid redundant <> suggestion for type
fix #104379
2022-11-17 09:01:27 -08:00
bors
cf4da2d8aa Auto merge of #2677 - RalfJung:badge, r=RalfJung
remove CI badge

We don't actually run CI on the `master` branch (because bors checks things before they can even be on master), so this doesn't really show anything. rustc doesn't have a badge either. I think we can live without it. :D
2022-11-17 15:51:00 +00:00
Ralf Jung
8ec2149070 remove CI badge 2022-11-17 16:49:14 +01:00
Guillaume Gomez
11d0c97de9 Extend codeblock GUI test to include tooltips 2022-11-17 16:35:04 +01:00
Guillaume Gomez
16b55903ee Migrate tooltip style to CSS variables 2022-11-17 16:35:04 +01:00
bors
db0a48cc4d Auto merge of #2676 - RalfJung:empty, r=RalfJung
empty commit to go through bors

Go through bors once to clean up after the force push, have CI run, all the usual.
2022-11-17 15:18:23 +00:00
Ralf Jung
a00a094af2 empty commit to go through bors 2022-11-17 16:17:26 +01:00
bors
b6097f2e1b Auto merge of #104219 - bryangarza:async-track-caller-dup, r=eholk
Support `#[track_caller]` on async fns

Adds `#[track_caller]` to the generator that is created when we desugar the async fn.

Fixes #78840

Open questions:
- What is the performance impact of adding `#[track_caller]` to every `GenFuture`'s `poll(...)` function, even if it's unused (i.e., the parent span does not set `#[track_caller]`)? We might need to set it only conditionally, if the indirection causes overhead we don't want.
2022-11-17 13:47:03 +00:00
Deadbeef
d1c6b797de Move a ui test to make space for new folder 2022-11-17 12:46:43 +00:00
Deadbeef
0537d301c5 Add feature gate 2022-11-17 12:46:43 +00:00
Deadbeef
b2cb42d6a7 Minimal implementation of implicit deref patterns 2022-11-17 12:46:43 +00:00
Ralf Jung
955439508f update rust-version 2022-11-17 12:12:39 +01:00
Ralf Jung
da4eb351bd update josh scripts
- support pulling specific commit
- make rust-version update a separate commit to avoid confusing josh
- after pushing, check that we have a clear round-trip
2022-11-17 12:12:39 +01:00
Maybe Waffle
57e726108a Properly link {Once,Lazy}{Cell,Lock} in docs 2022-11-17 11:05:56 +00:00
Ralf Jung
3de7c2834f Auto merge of #2671 - klensy:shell_escape, r=RalfJung
recreated by hand
2022-11-17 11:59:07 +01:00
klensy
d0a7ae1a7a remove unused shell_escape dep 2022-11-17 11:59:02 +01:00
Ralf Jung
331b93a00b Auto merge of #2670 - RalfJung:retag, r=RalfJung
recreated by hand
2022-11-17 11:58:24 +01:00
Ralf Jung
f1a8701482 clean up retagging recursive traversal a bit 2022-11-17 11:58:14 +01:00
bors
36db030a7c Auto merge of #104205 - clubby789:grow-rc, r=thomcc
Attempt to reuse `Vec<T>` backing storage for `Rc/Arc<[T]>`

If a `Vec<T>` has sufficient capacity to store the inner `RcBox<[T]>`, we can just reuse the existing allocation and shift the elements up, instead of making a new allocation.
2022-11-17 10:48:22 +00:00
Ayush Singh
2436dff772
Use custom entry name in cranelift
This is a continuation of 9f0a8620bd7d325e6d42417b08daff3e55cb88f6 for
cranelift.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-11-17 15:28:47 +05:30
Pietro Albini
00ec6797a3
fmt 2022-11-17 09:56:59 +01:00
Pietro Albini
6bfbd113e2
run tests on the remote device even when the default address is used
When running tests inside the Android emulator, bootstrap doesn't set
the TEST_DEVICE_ADDR environment variable, as the default address
(127.0.0.1:12345) is used.

Instead, REMOTE_TEST_CLIENT is set all the times when remote testing is
needed, and in no other cases. To ensure Android tests are executed in
the emulator, change the check.
2022-11-17 09:37:41 +01:00
Pietro Albini
6d8160261f
set correct default value for cc and cxx on android 2022-11-17 09:37:39 +01:00
Pietro Albini
09340e3c57
install the target g++ in armhf-gnu 2022-11-17 09:37:37 +01:00
Pietro Albini
c80af320bb
issue-36710 test can now run on cross-compiled targets 2022-11-17 09:37:34 +01:00
Pietro Albini
ecaa342702
Revert "test: run-make: skip when cross-compiling"
This reverts commit 0567fec8e47f83ddda623f93deccddddd3f6744f.
2022-11-17 09:37:32 +01:00
Pietro Albini
b2c74ab82b
add support for running binaries with remote-test-client on run-make 2022-11-17 09:37:30 +01:00
Ralf Jung
99f7e9494e try_normalize_after_erasing_regions: promote an assertion to always run 2022-11-17 09:06:15 +01:00
bors
7c75fe4c85 Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead
Record `LocalDefId` in HIR nodes instead of a side table

This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR.
This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840), by controlling how `def_id` information is accessed.

This first part adds the information to HIR nodes themselves instead of a table.
The second part is https://github.com/rust-lang/rust/pull/103902
The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter.
The fourth part will be to completely remove the side table.
2022-11-17 07:42:27 +00:00
Michael Howell
ebee589bc0 rustdoc: clean up sidebar width CSS
This commit takes advantage of the ability to set [flex-basis] to a specific
length instead of setting it to `auto` and changing min-/max-width, and
setting flex-grow/-shrink both to 0.

[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
2022-11-16 22:57:08 -07:00
bors
9340e5c1b9 Auto merge of #103779 - the8472:simd-str-contains, r=thomcc
x86_64 SSE2 fast-path for str.contains(&str) and short needles

Based on Wojciech Muła's [SIMD-friendly algorithms for substring searching](http://0x80.pl/articles/simd-strfind.html#sse-avx2)

The two-way algorithm is Big-O efficient but it needs to preprocess the needle
to find a "critical factorization" of it. This additional work is significant
for short needles. Additionally it mostly advances needle.len() bytes at a time.

The SIMD-based approach used here on the other hand can advance based on its
vector width, which can exceed the needle length. Except for pathological cases,
but due to being limited to small needles the worst case blowup is also small.

benchmarks taken on a Zen2, compiled with `-Ccodegen-units=1`:

```
OLD:
test str::bench_contains_16b_in_long                     ... bench:         504 ns/iter (+/- 14) = 5061 MB/s
test str::bench_contains_2b_repeated_long                ... bench:         948 ns/iter (+/- 175) = 2690 MB/s
test str::bench_contains_32b_in_long                     ... bench:         445 ns/iter (+/- 6) = 5732 MB/s
test str::bench_contains_bad_naive                       ... bench:         130 ns/iter (+/- 1) = 569 MB/s
test str::bench_contains_bad_simd                        ... bench:          84 ns/iter (+/- 8) = 880 MB/s
test str::bench_contains_equal                           ... bench:         142 ns/iter (+/- 7) = 394 MB/s
test str::bench_contains_short_long                      ... bench:         677 ns/iter (+/- 25) = 3768 MB/s
test str::bench_contains_short_short                     ... bench:          27 ns/iter (+/- 2) = 2074 MB/s

NEW:
test str::bench_contains_16b_in_long                     ... bench:          82 ns/iter (+/- 0) = 31109 MB/s
test str::bench_contains_2b_repeated_long                ... bench:          73 ns/iter (+/- 0) = 34945 MB/s
test str::bench_contains_32b_in_long                     ... bench:          71 ns/iter (+/- 1) = 35929 MB/s
test str::bench_contains_bad_naive                       ... bench:           7 ns/iter (+/- 0) = 10571 MB/s
test str::bench_contains_bad_simd                        ... bench:          97 ns/iter (+/- 41) = 762 MB/s
test str::bench_contains_equal                           ... bench:           4 ns/iter (+/- 0) = 14000 MB/s
test str::bench_contains_short_long                      ... bench:          73 ns/iter (+/- 0) = 34945 MB/s
test str::bench_contains_short_short                     ... bench:          12 ns/iter (+/- 0) = 4666 MB/s
```
2022-11-17 04:47:11 +00:00
Nicholas Nethercote
67d5cc0462 Use ThinVec in ast::Path. 2022-11-17 13:56:38 +11:00
Nicholas Nethercote
6b7ca2fcf2 Box ExprKind::{Closure,MethodCall}, and QSelf in expressions, types, and patterns. 2022-11-17 13:45:59 +11:00
bors
251831ece9 Auto merge of #103138 - nnethercote:merge-BBs, r=bjorn3
Merge basic blocks where possible when generating LLVM IR.

r? `@ghost`
2022-11-17 01:56:24 +00:00
Scott McMurray
9d4b1f98e6 Ignore the unchecked-shifts codegen test in debug-assertions builds 2022-11-16 15:58:43 -08:00
bors
bebd57a960 Auto merge of #102944 - nnethercote:ast-Lit-third-time-lucky, r=petrochenkov
Use `token::Lit` in `ast::ExprKind::Lit`.

Instead of `ast::Lit`.

Literal lowering now happens at two different times. Expression literals are lowered when HIR is crated. Attribute literals are lowered during parsing.

r? `@petrochenkov`
2022-11-16 23:03:14 +00:00
Michael Goulet
75afb22331 Check dyn* return type correctly 2022-11-16 22:21:41 +00:00
Michael Howell
893bd781be rustdoc: remove redundant font-color CSS on .where
Before 7f6ce7dddd49f453da15bb4d586a5990985814d8, light-theme where clauses
had color `#4E4C4C` while the main color was `#000`. One of that commit's
simplifications made it so that everything used the same black.
2022-11-16 13:28:51 -07:00
bors
e9493d63c2 Auto merge of #104456 - RalfJung:miri, r=RalfJung
update Miri

Not a huge sync, but there was a conflict and [josh](https://github.com/josh-project/josh/) seems to prefer those to be merged back ASAP.
2022-11-16 19:52:45 +00:00
Martin Nordholts
8b5bfaf662 rustdoc JSON: Use Function everywhere and remove Method 2022-11-16 20:24:03 +01:00
David Koloski
b44d808e4a Don't attempt to normalize compiler backtraces
Backtraces can very significantly depending on environment and cause
test suite failures spuriously. Ensuring a proper failure-status should
be sufficient to keep a crash properly documented.
2022-11-16 12:35:30 -05:00
bors
e69336efe0 Auto merge of #104492 - matthiaskrgr:rollup-3xyjynz, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #103750 (Fix some misleading target feature aliases)
 - #104137 (Issue error when -C link-self-contained option is used on unsupported platforms)
 - #104317 (cleanup and dedupe CTFE and Miri error reporting)
 - #104335 (Only do parser recovery on retried macro matching)
 - #104394 (various cleanups to try to reduce the use of spans inside method resolution)
 - #104459 (rustdoc: remove unused JS IIFE from main.js)
 - #104462 (rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`)
 - #104466 (rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-16 15:55:30 +00:00
Ralf Jung
157b2d5436 ensure rand has its default features enabled 2022-11-16 16:13:55 +01:00
Matthias Krüger
972ad00094
Rollup merge of #104466 - notriddle:notriddle/crate-search-div-display, r=GuillaumeGomez
rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`

`#crate-search-div` is nested directly below `.search-results-title`, which has `display: inline-flex`. This makes the crate-search-div a [flex item], which makes its display property irrelevant, because flex items have their display [blockified] in any case.

[flex item]: https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item
[blockified]: https://www.w3.org/TR/css-flexbox-1/#flex-items
2022-11-16 15:39:48 +01:00
Matthias Krüger
938948ea80
Rollup merge of #104462 - notriddle:notriddle/rightside-padding-right, r=GuillaumeGomez
rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`

This CSS was added in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9, as `.since { padding-right: 2px }`, to prevent it from uncomfortably touching the srclink, which were separate floated elements. It was carried forward with 962c0a4ee59e3c1a2413e785694c9433ffd0a9e1 to the new `.rightside`, but its role was replaced with adding " &bull; " between them. All it does now is pushes the element 2px away from the page's right margin.

Removing this rule changes the page layout, but you have to look for it to notice it.
2022-11-16 15:39:47 +01:00
Matthias Krüger
baf1cbb70d
Rollup merge of #104459 - notriddle:notriddle/main-js-iife, r=GuillaumeGomez
rustdoc: remove unused JS IIFE from main.js

This [IIFE] made sense when it was added in f0683f98fa114cc4f9e795031f44be3eebb65790 and there was a local variable scoped to it, but now it only sets two globals, so it does nothing.

[IIFE]: https://developer.mozilla.org/en-US/docs/Glossary/IIFE "immediately invoked function expression"
2022-11-16 15:39:47 +01:00
Matthias Krüger
163a7090b8
Rollup merge of #104394 - oli-obk:suggest_method_call, r=lcnr
various cleanups to try to reduce the use of spans inside method resolution

definitely review commit by commit.
2022-11-16 15:39:46 +01:00
Matthias Krüger
e033a389e1
Rollup merge of #104335 - Nilstrieb:macrowo, r=compiler-errors
Only do parser recovery on retried macro matching

Eager parser recovery can break macros, so we don't do it at first. But when we already know that the macro failed, we can retry it with recovery enabled to still emit useful diagnostics.

Helps with #103534
2022-11-16 15:39:46 +01:00
Matthias Krüger
353b915fec
Rollup merge of #104317 - RalfJung:ctfe-error-reporting, r=oli-obk
cleanup and dedupe CTFE and Miri error reporting

It looks like most of the time, this error raised from const_prop_lint is just redundant -- it duplicates the error reported when evaluating the const-eval query. This lets us make `ConstEvalErr` private to the const_eval module which I think is a good step.

The Miri change mostly replaces a `match` by `if let`, and dedupes the "this error is impossible in Miri" checks.

r? ``@oli-obk``
Fixes https://github.com/rust-lang/rust/issues/75461
2022-11-16 15:39:45 +01:00