Commit Graph

269751 Commits

Author SHA1 Message Date
León Orell Valerian Liehr
fbe33e35af
Rollup merge of #132066 - tifv:ptr-docs-typo, r=Amanieu
Fix a typo in documentation of `pointer::sub_ptr()`

Just a typo in docs.
2024-10-23 22:11:06 +02:00
León Orell Valerian Liehr
b0a8e4e030
Rollup merge of #132065 - tifv:dangling-docs, r=Noratrieb
Clarify documentation of `ptr::dangling()` function

Also fixes the safety comment in `NonNull::dangling()` function.

Fixes #132004.
2024-10-23 22:11:06 +02:00
León Orell Valerian Liehr
8b1141a5c3
Rollup merge of #132060 - joshtriplett:innermost-outermost, r=jieyouxu
"innermost", "outermost", "leftmost", and "rightmost" don't need hyphens

These are all standard dictionary words and don't require hyphenation.

-----

Encountered an instance of this in error messages and it bugged me, so I
figured I'd fix it across the entire codebase.
2024-10-23 22:11:05 +02:00
León Orell Valerian Liehr
28aacb3d03
Rollup merge of #132039 - a1phyr:vecdeque_read_exact, r=Noratrieb
Specialize `read_exact` and `read_buf_exact` for `VecDeque`
2024-10-23 22:11:05 +02:00
León Orell Valerian Liehr
f3d4887a4a
Rollup merge of #132036 - DianQK:test-131164, r=jieyouxu
Add a test case for #131164

The upstream has already been fixed, but it won't be backported to LLVM 19.

r? jieyouxu or compiler

try-job: x86_64-gnu-stable
2024-10-23 22:11:04 +02:00
León Orell Valerian Liehr
6b70ff44bc
Rollup merge of #131979 - compiler-errors:compare-pred-entail, r=fmease
Minor tweaks to `compare_impl_item.rs`

1. Stop using the `InstantiatedPredicates` struct for `hybrid_preds` in `compare_impl_item.rs`, since we never actually push anything into the `spans` part of it.
2. Remove redundant impl args and don't do useless identity substitution, prefer calling `instantiate_identity`.
2024-10-23 22:11:04 +02:00
León Orell Valerian Liehr
a144561608
Rollup merge of #131955 - SpriteOvO:riscv-int-arg-attr, r=workingjubilee
Set `signext` or `zeroext` for integer arguments on RISC-V and LoongArch64

This PR contains 3 commits:

- the first one introduces a new function `adjust_for_rust_abi` in `rustc_target`, and moves the x86 specific adjustment code into it;
- the second one adds RISC-V specific adjustment code into it, which sets `signext` or `zeroext` attribute for integer arguments.
- **UPDATE**: added the 3rd commit to apply the same adjustment for LoongArch64.
2024-10-23 22:11:03 +02:00
León Orell Valerian Liehr
8af1851b0a
Rollup merge of #131928 - aDotInTheVoid:wait-we-support-this, r=GuillaumeGomez
rustdoc: Document `markdown` module.

Rustdoc markdown handling is currently split between:

- html::markdown, which contains all the meaty login
- markdown, which is only used for when rustdoc renders a standalone markdown file

Adds module-level doc-comment to markdown, and rename the function so it's clear that it's doing IO (instead of just rendering to a string).
2024-10-23 22:11:03 +02:00
León Orell Valerian Liehr
af2c7dffda
Rollup merge of #130991 - LaihoE:vectorized_slice_contains, r=Noratrieb
Vectorized SliceContains

Godbolt for the u32 case: https://rust.godbolt.org/z/exT9xYWGs

Unsure about:
- Should align_to be used? It didn't seem to matter in my benchmark but maybe I was lucky with alignment?
- Should u8/i8 also be implemented? Currently uses memchr (SWAR)

Some benchmarks on x86 (contains called on an array with no matches, worst case may be slightly worse):

## Large N
![large_n_contains](https://github.com/user-attachments/assets/5be79072-970b-44be-a56c-16dc677dee46)

## Small N
![small_n_contains](https://github.com/user-attachments/assets/b8a33790-c176-459f-84f4-05feee893cd0)
2024-10-23 22:11:02 +02:00
Lukas Wirth
a7ea9c0fd1
Merge pull request #18391 from davidbarsky/david/log-syntax-on-panic
internal: log original syntax on panic
2024-10-23 20:10:50 +00:00
David Barsky
4d541f7cf3 internal: log original syntax on panic 2024-10-23 12:56:00 -07:00
Shoyu Vanilla
eee4037ddf fix: Prevent public reexport of private item 2024-10-24 04:26:17 +09:00
bors
4f2f477fde Auto merge of #132070 - fmease:rollup-4i4k587, r=fmease
Rollup of 5 pull requests

Successful merges:

 - #131043 (Refactor change detection for rustdoc and download-rustc)
 - #131181 (Compiletest: Custom differ)
 - #131487 (Add wasm32v1-none target (compiler-team/#791))
 - #132054 (do not remove `.cargo` directory)
 - #132058 (CI: rfl: use rust-next temporary commit)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-23 19:26:00 +00:00
Zachary S
aa493d0b60 const fn str::split_at* 2024-10-23 14:22:56 -05:00
Zachary S
8ee548fcf0 const fn str::is_char_boundary 2024-10-23 14:22:32 -05:00
Eric Huss
df8551b60a Update rustbook to support new test linking in reference 2024-10-23 11:44:23 -07:00
Eric Huss
87fb4eaa9d Update reference 2024-10-23 11:44:23 -07:00
Eric Huss
66ebb47b04 Update Cargo.lock due to mdbook extension changes 2024-10-23 11:44:23 -07:00
rustbot
ed02421bad Update books 2024-10-23 11:44:17 -07:00
Laurențiu Nicola
6f8e75a559
Merge pull request #18388 from jaboatman/master
Fix checking for `false` `labelDetailsSupport` value.
2024-10-23 18:33:04 +00:00
Jason Boatman
bc6b2ec10e Rewrite label_details_support condition to be consistent with other parts of the codebase. 2024-10-23 13:19:53 -05:00
Laiho
c11bfd828e vectorized SliceContains 2024-10-23 20:14:17 +02:00
Ding Xiang Fei
fd36b3a4a8
s/SmartPointer/CoerceReferent/g
move derive_smart_pointer into removed set
2024-10-24 02:14:09 +08:00
clubby789
2e3091d66c Don't allow test revisions that conflict with built in cfgs 2024-10-23 18:05:27 +00:00
Jason Boatman
d7f137ea7a Fix checking for false labelDetailsSupport value. 2024-10-23 12:57:11 -05:00
Ding Xiang Fei
0689b2139f
stabilize shorter-tail-lifetimes 2024-10-24 01:56:08 +08:00
Ralf Jung
03048096f6 stop hashing compile-time constant 2024-10-23 19:46:52 +02:00
Laurențiu Nicola
7dad963782
Merge pull request #18386 from Wilfred/missing_offset
fix: Handle missing time offsets gracefully
2024-10-23 17:15:23 +00:00
Wilfred Hughes
33f27d135e fix: Handle missing time offsets gracefully
The tracing_subscribe docs state that missing offsets likely mean
that we're in a multithreaded context:
https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/time/struct.OffsetTime.html#method.local_rfc_3339

We're not in a multithreaded context at this point, but some platforms
(e.g. OpenBSD) still don't have time offsets available.

Since this is only a rust-analyzer debugging convenience, just use
system time logging in this situation.

Fixes #18384
2024-10-23 09:57:57 -07:00
León Orell Valerian Liehr
5f0626cdb1
Rollup merge of #132058 - adetaylor:use-rust-next-in-ci, r=lqd
CI: rfl: use rust-next temporary commit

Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next contains some changes required to be compatible with upcoming arbitraty self types work. Roll RFL CI forward to the latest rust-next to include that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874

r? ``@ojeda``

try-job: x86_64-rust-for-linux
2024-10-23 17:24:32 +02:00
León Orell Valerian Liehr
bb65499b61
Rollup merge of #132054 - onur-ozkan:cargo-config, r=Kobzol
do not remove `.cargo` directory

If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](345eb14f6c)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
03cb7de189
Rollup merge of #131487 - graydon:wasm32v1-none, r=alexcrichton
Add wasm32v1-none target (compiler-team/#791)

This is a preliminary implementation of the MCP discussed in [compiler-team#791](https://github.com/rust-lang/compiler-team/issues/791). It's not especially "major" but you know, process! Anyway it adds a new wasm32v1-none target which just pins down a set of wasm features. I think this is close to the consensus that emerged when discussing it on Zulip so I figured I'd sketch to see how hard it is. Turns out not very.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
f2675002a0
Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxu
Compiletest: Custom differ

This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail.

I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it.

This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182)
`COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser`
![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23 17:24:30 +02:00
León Orell Valerian Liehr
4caa60c032
Rollup merge of #131043 - liwagu:unify, r=albertlarsan68,onur-ozkan
Refactor change detection for rustdoc and download-rustc

This pull request refactors the change detection logic in the build process by consolidating redundant code into a new helper method. The key changes include the removal of duplicate logic for checking changes in directories and the addition of a new method to handle this functionality.

Refactoring and code simplification:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL588-R593): Removed redundant change detection logic and replaced it with a call to the new `check_for_changes` method.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2R2837-R2872): Added a new method `check_for_changes` to centralize the logic for detecting changes in specified directories since a given commit.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2L2728-R2740): Updated the existing change detection code to use the new `check_for_changes` method.

Cleanup:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL13-R13): Removed the unused import `git` from the helpers module.

   r? ``@AlbertLarsan68``
2024-10-23 17:24:30 +02:00
Michael Goulet
21d95fb7b2 More compare_impl_item simplifications 2024-10-23 14:33:44 +00:00
July Tikhonov
b515bbfb85 fix a typo in documentation of pointer::sub_ptr() 2024-10-23 19:37:51 +06:00
July Tikhonov
f4c8ff33de fix documentation of ptr::dangling() function 2024-10-23 19:17:36 +06:00
Lukas Wirth
1fbaccd893
Merge pull request #18264 from ChayimFriedman2/semi-transparent
fix: Implement mixed site hygiene
2024-10-23 12:33:50 +00:00
bors
be01dabfef Auto merge of #132027 - RalfJung:lang-feature-bool-fields, r=nnethercote
nightly feature tracking: get rid of the per-feature bool fields

The `struct Features` that tracks which features are enabled has a ton of public `bool`-typed fields that are basically caching the result of looking up the corresponding feature in `enabled_lang_features`. Having public fields with an invariant is not great, so at least they should be made private. However, it turns out caching these lookups is actually [not worth it](https://github.com/rust-lang/rust/pull/131321#issuecomment-2402068336), so this PR just entirely gets rid of these fields. (The alternative would be to make them private and have a method for each of them to expose them in a read-only way. Most of the diff of this PR would be the same in that case.)

r? `@nnethercote`
2024-10-23 12:16:41 +00:00
DianQK
6570a6fe92
Add a test case for #131164 2024-10-23 19:01:38 +08:00
Lukas Wirth
c8a04e3a21
Merge pull request #18379 from usamoi/master
fix dyn incompatible hint message
2024-10-23 10:25:43 +00:00
usamoi
ac3db41b39 fix dyn incompatible hint message 2024-10-23 18:10:14 +08:00
Josh Triplett
ecdc2441b6 "innermost", "outermost", "leftmost", and "rightmost" don't need hyphens
These are all standard dictionary words and don't require hyphenation.
2024-10-23 02:45:24 -07:00
Adrian Taylor
2eb7e0d370 CI: rfl: use rust-next temporary commit
Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next
contains some changes required to be compatible with upcoming arbitraty
self types work. Roll RFL CI forward to the latest rust-next to include
that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874
2024-10-23 09:31:43 +00:00
guliwa
1b5921641a
Refactor change detection for rustdoc and download-rustc 2024-10-23 09:30:00 +00:00
bors
ffd978b7bf Auto merge of #132044 - lcnr:no-relate-abi, r=compiler-errors
do not implement `Relate`  for "boring" types

and update some macros while we're at it. This means we don't have to implement `TypeVisitable` for them.

r? `@compiler-errors`
2024-10-23 08:41:24 +00:00
Lukas Wirth
bde2000a98
Merge pull request #18376 from Veykril/veykril/push-ptmnsoqzsmqk
feat: Add text edits to more inlay hints
2024-10-23 08:39:25 +00:00
Lukas Wirth
4fdc63ce38 Don't emit edits for postfix adjustment hints 2024-10-23 10:24:58 +02:00
Ralf Jung
44638853f5 rename lang feature lists to include LANG 2024-10-23 09:14:43 +01:00
Ralf Jung
e82bca6f32 remove no longer needd UnstableFeature type 2024-10-23 09:14:43 +01:00