Commit Graph

233160 Commits

Author SHA1 Message Date
bors
f2568c8316 Auto merge of #3050 - RalfJung:rustup, r=RalfJung
Rustup
2023-09-03 07:35:33 +00:00
Ralf Jung
fb26c21c35 Merge from rustc 2023-09-03 09:28:31 +02:00
Ralf Jung
dc81d6c282 Preparing for merge from rustc 2023-09-03 09:28:30 +02:00
bors
a989e25f1b Auto merge of #115472 - RalfJung:tier-2, r=GuillaumeGomez
make it more clear what 'Tier 2' (without host tools) means

When saying that Rust "builds official binary releases for each tier 2 target", it's not at all clear that this does not mean we build a compiler and cargo for that target.
2023-09-03 05:23:52 +00:00
bors
33e796bbe1 Auto merge of #115441 - catandcoder:master, r=workingjubilee
fix the repetitive word
2023-09-03 03:37:27 +00:00
bors
3ec4b3bc8c Auto merge of #115436 - GuillaumeGomez:fix-type-based-search, r=notriddle
[rustdoc] Fix type based search

Fixes https://github.com/rust-lang/rust/issues/114522.

The problem was a bit more tricky than I originally thought it would be: we only kept type ID and generics in short, but as soon as there was a full path in the user query, the element didn't get an ID anymore because the ID map didn't know about `x::y` (although it knew about `y`). So for this first problem, I instead always pass the element name to get the ID.

Then a new problem occurred: we actually needed to check if paths matched, otherwise whatever the path, as long as the "end types" match, it's all good. meaning, we needed to add path information, but to do so, we needed it to be added into the search index directly as there was no mapping between `"p"` and `"q"`.

I hope this explanation makes sense to someone else than me. ^^'

r? `@notriddle`
2023-09-03 01:52:15 +00:00
bors
b588641208 Auto merge of #115484 - GuillaumeGomez:migrate-gui-test-color-37, r=notriddle
Migrate GUI colors test to original CSS color format

Follow-up of https://github.com/rust-lang/rust/pull/111459.

r? `@notriddle`
2023-09-03 00:02:55 +00:00
Guillaume Gomez
e161fa1a6b Correctly handle paths from foreign items 2023-09-02 23:04:37 +02:00
bors
9f5fc1bd44 Auto merge of #115471 - RalfJung:skipping-sanity, r=onur-ozkan
also skip musl checks when BOOTSTRAP_SKIP_TARGET_SANITY is set

Currently I cannot test musl targets in Miri via x.py; this PR fixes that.
2023-09-02 20:14:37 +00:00
Guillaume Gomez
680b3ac787 Migrate GUI colors test to original CSS color format 2023-09-02 21:00:23 +02:00
bors
c4f25777a0 Auto merge of #115273 - the8472:take-fold, r=cuviper
Optimize Take::{fold, for_each} when wrapping TrustedRandomAccess iterators
2023-09-02 12:40:16 +00:00
The 8472
f93e125828 restrict test to x86-64 2023-09-02 13:42:58 +02:00
bors
9229b1eab4 Auto merge of #115429 - compiler-errors:assoc-ct-lt-fallthrough, r=cjgillot
Fall through when resolving elided assoc const lifetimes

`@QuineDot` makes a good point in https://github.com/rust-lang/rust/issues/115010#issuecomment-1702127634 that we probably should not accept *more* code due to #115011 even though that code will eventually become a forbid-warning in a few versions (https://github.com/rust-lang/rust/issues/115010#issuecomment-1701598067).

Fall through when walking thru the `AnonymousWarnToStatic` (renamed to `AnonymousWarn`) rib so that we can resolve as a fresh lifetime like we did before.
2023-09-02 10:55:49 +00:00
Ralf Jung
89619b8a0e make it more clear what 'Tier 2' (without host tools) means 2023-09-02 10:34:49 +02:00
bors
585bb5e68d Auto merge of #115409 - RalfJung:llvm-merge-reland, r=lqd
bootstrap: use git merge-base for LLVM CI download logic

This re-lands https://github.com/rust-lang/rust/pull/113588, now that the perf issues are hopefully fixed by https://github.com/rust-lang/rustc-perf/pull/1684.
r? `@lqd` `@Mark-Simulacrum`

Fixes https://github.com/rust-lang/rust/issues/101907
2023-09-02 08:25:49 +00:00
Ralf Jung
9cae47ee87 also skip musl checks when BOOTSTRAP_SKIP_TARGET_SANITY is set 2023-09-02 10:25:06 +02:00
bors
ad8f601ca2 Auto merge of #115469 - matthiaskrgr:rollup-25ybx39, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #114349 (rustc_llvm: Link to `zlib` on dragonfly and solaris)
 - #114845 (Add alignment to the NPO guarantee)
 - #115427 (kmc-solid: Fix `is_interrupted`)
 - #115443 (feat(std): Stabilize 'os_str_bytes' feature)
 - #115444 (Create a SMIR visitor)
 - #115449 (Const-stabilize `is_ascii`)
 - #115456 (Add spastorino on vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-02 06:38:58 +00:00
Matthias Krüger
6fca6a3282
Rollup merge of #115456 - spastorino:spastorino-vacation, r=spastorino
Add spastorino on vacation
2023-09-02 07:48:24 +02:00
Matthias Krüger
1bbd307349
Rollup merge of #115449 - scottmcm:stable-const-is-ascii, r=ChrisDenton
Const-stabilize `is_ascii`

Resolves #111090

FCP completed in https://github.com/rust-lang/rust/issues/111090#issuecomment-1688490049
2023-09-02 07:48:23 +02:00
Matthias Krüger
cdc8aa3843
Rollup merge of #115444 - oli-obk:smir_visitor, r=spastorino
Create a SMIR visitor

r? ``@spastorino``

Doesn't have tests or examples yet, but I think we could land it and implement it for the rest of the types.
2023-09-02 07:48:23 +02:00
Matthias Krüger
43e15613d1
Rollup merge of #115443 - epage:os_str, r=cuviper
feat(std): Stabilize 'os_str_bytes' feature

Closes #111544
2023-09-02 07:48:22 +02:00
Matthias Krüger
b44bf0d117
Rollup merge of #115427 - solid-rs:patch/kmc-solid/is-interrupted, r=cuviper
kmc-solid: Fix `is_interrupted`

Follow-up to #115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.

```
error[E0603]: function `is_interrupted` is private
  --> library\std\src\sys\solid\mod.rs:77:12
   |
77 |     error::is_interrupted(code)
   |            ^^^^^^^^^^^^^^ private function
   |
note: the function `is_interrupted` is defined here
  --> library\std\src\sys\solid\error.rs:35:1
   |
35 | fn is_interrupted(er: abi::ER) -> bool {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
2023-09-02 07:48:22 +02:00
Matthias Krüger
1df0c21af1
Rollup merge of #114845 - scottmcm:npo-align, r=WaffleLapkin
Add alignment to the NPO guarantee

This PR [changes](https://github.com/rust-lang/rust/pull/114845#discussion_r1294363357) "same size" to "same size and alignment" in the option module's null pointer optimization docs in <https://doc.rust-lang.org/std/option/#representation>.

As far as I know, this has been true for a long time in the actual rustc implementation, but it's not in the text of those docs, so I figured I'd bring this up to FCP it.

I also see no particular reason that we'd ever *want* to have higher alignment on these.  In many of the cases it's impossible, as the minimum alignment is already the size of the type, but even if we *could* do things like on 32-bit we could say that `NonZeroU64` is 4-align but `Option<NonZeroU64>` is 8-align, I just don't see any value in doing that, so feel completely fine closing this door for the few things on which the NPO is already guaranteed.  These are basically all primitives, and should end up with the same size & alignment as those primitives.

(There's no layout guarantee for something like `Option<[u8; 3]>`, where it'd be at least plausible to consider raising the alignment from 1 to 4 on, say, some hypothetical target that doesn't have efficient unaligned 4-byte load/stores.  And even if we ever did start to offer some kind of guarantee around such a type, I doubt we'd put it under the "null pointer" optimization header.)

Screenshots for the new examples:
![image](https://github.com/rust-lang/rust/assets/18526288/a7dbff42-50b4-462e-9e27-00d511b58763)
![image](https://github.com/rust-lang/rust/assets/18526288/dfd55288-80fb-419a-bc11-26198c27f9f9)
2023-09-02 07:48:21 +02:00
Matthias Krüger
4e2231803b
Rollup merge of #114349 - inferiorhumanorgans:dragonfly-link-libz, r=cuviper
rustc_llvm: Link to `zlib` on dragonfly and solaris

On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.

Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.

This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
2023-09-02 07:48:21 +02:00
bors
1fb6947abc Auto merge of #115286 - saethlin:detangler, r=petrochenkov
Skip rendering metadata strings from include_str!/include_bytes!

The const rendering code in rustdoc completely ignores consts from expansions, but the compiler was rendering all consts. So some consts (namely those from `include_bytes!`) were rendered then ignored.

Most of the diff here is from moving `print_const_expr` from rustdoc into `rustc_hir_pretty` so that it can be used in rustdoc and when building rmeta files.
2023-09-02 04:53:19 +00:00
bors
9dc11a13fa Auto merge of #115422 - Zoxc:cache-once-lock, r=cjgillot
Use `OnceLock` for `SingleCache`

This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free.

r? `@cjgillot`
2023-09-02 03:06:11 +00:00
bors
d2f5dc9745 Auto merge of #3049 - RalfJung:rustup, r=RalfJung
Rustup
2023-09-02 01:09:07 +00:00
Ralf Jung
97ee83068d Merge from rustc 2023-09-02 03:07:21 +02:00
Ralf Jung
d2923a4438 Preparing for merge from rustc 2023-09-02 03:02:47 +02:00
Ed Page
30292bb68e fix(std): Rename os_str_bytes to encoded_bytes 2023-09-01 19:33:16 -05:00
bors
f9ba43ce14 Auto merge of #113295 - clarfonthey:ascii-step, r=cuviper
Implement Step for ascii::Char

This allows iterating over ranges of `ascii::Char`, similarly to ranges of `char`.

Note that `ascii::Char` is still unstable, tracked in #110998.
2023-09-02 00:02:50 +00:00
cui fliter
42e550781c Signed-off-by: cui fliter <imcusg@gmail.com>
remove the repetitive word

Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-02 07:40:44 +08:00
bors
35e416303e Auto merge of #115276 - fmease:rustdoc-obj-lt-defs-handle-self-ty-params, r=GuillaumeGomez
rustdoc: correctly deal with self ty params when eliding default object lifetimes

Fixes #115179.
2023-09-01 22:11:22 +00:00
Santiago Pastorino
8198c59c77
Add spastorino on vacation 2023-09-01 18:35:43 -03:00
Ben Kimock
159ad5fb0d Reuse const rendering from rustdoc in rmeta encoding 2023-09-01 17:22:48 -04:00
bors
270eb58631 Auto merge of #115452 - matthiaskrgr:rollup-he30fhv, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #115411 (miri ABI check: fix handling of 1-ZST; don't accept sign differences)
 - #115424 (diagnostics: avoid wrong `unused_parens` on `x as (T) < y`)
 - #115425 (remove unnecessary heap allocation)
 - #115446 (fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta)
 - #115447 (Add comment so pub items are not removed)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-01 20:22:37 +00:00
Matthias Krüger
ead5f80deb
Rollup merge of #115447 - LegNeato:patch-2, r=oli-obk
Add comment so pub items are not removed

As suggested in https://github.com/rust-lang/rust/pull/115393, add a comment so someone doesn't clean these up.
2023-09-01 21:41:41 +02:00
Matthias Krüger
db450d2981
Rollup merge of #115446 - klensy:fixup-stable-version, r=cuviper
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta

See:

https://github.com/rust-lang/rust/pull/114562#issuecomment-1669424749
https://github.com/rust-lang/rust/pull/115056#issuecomment-1686316608
https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E72.2E0/near/387695644

Should be backported to beta too.
2023-09-01 21:41:40 +02:00
Matthias Krüger
cf24a9fdf6
Rollup merge of #115425 - thechampagne:master, r=oli-obk
remove unnecessary heap allocation
2023-09-01 21:41:40 +02:00
Matthias Krüger
888dc2e3b0
Rollup merge of #115424 - notriddle:notriddle/issue-106413, r=oli-obk
diagnostics: avoid wrong `unused_parens` on `x as (T) < y`

Fixes #106413
Fixes #80636
2023-09-01 21:41:39 +02:00
Matthias Krüger
db6ae0721b
Rollup merge of #115411 - RalfJung:miri-abi, r=oli-obk
miri ABI check: fix handling of 1-ZST; don't accept sign differences

r? `@oli-obk`
2023-09-01 21:41:39 +02:00
Scott McMurray
570c312bc5 Const-stabilize is_ascii 2023-09-01 11:02:09 -07:00
Christian Legnitto
6e6031e094
Add comment so pub items are not removed
As suggested in https://github.com/rust-lang/rust/pull/115393, add a comment so someone doesn't clean these up.
2023-09-01 13:22:03 -04:00
klensy
355ba433ee fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized 2023-09-01 19:46:09 +03:00
Oli Scherer
85a1679df9 Create a SMIR visitor 2023-09-01 16:32:22 +00:00
Ed Page
9aee1de612 feat(std): Stabilize 'os_str_bytes' feature
Closes #111544
2023-09-01 11:13:45 -05:00
bors
361f8ba847 Auto merge of #114065 - lukas-code:u16_from_char, r=dtolnay
`impl TryFrom<char> for u16`

This PR implements the final missing `char` -> unsigned integer conversion.

ACP: https://github.com/rust-lang/libs-team/issues/146

r? libs-api
`@rustbot` label +T-libs-api +needs-fcp -T-libs
2023-09-01 16:01:06 +00:00
León Orell Valerian Liehr
f5a68f63aa
rustdoc: correctly deal with self ty params when eliding default object lifetimes 2023-09-01 16:17:53 +02:00
Guillaume Gomez
36fa557a5e Merge all loops into one when generating search index 2023-09-01 15:16:11 +02:00
Guillaume Gomez
05eda41658 Add tests for type-based search 2023-09-01 15:16:11 +02:00