Commit Graph

277252 Commits

Author SHA1 Message Date
Matthias Krüger
c5c05c2528
Rollup merge of #135150 - lcnr:unconstrained-lts-comment, r=oli-obk
move footnote to ordinary comment

cc #135057
2025-01-06 08:09:07 +01:00
Matthias Krüger
ee6914a45b
Rollup merge of #135147 - compiler-errors:borrowck-tweaks, r=chenyukang
A few borrowck tweaks to improve 2024 edition migration lints

See first two commits' changes to test outputs. Test coverage in this area is kinda weak, but I think it affects more cases than this (like the craters that will begin to trigger the `tail_expr_drop_order` tests in #134523).

Third commit is a drive-by change that removes a deref hack from `UseSpans` which doesn't really improve diagnostics much.
2025-01-06 08:09:06 +01:00
Matthias Krüger
b561659e43
Rollup merge of #135145 - kpreid:unnameable, r=compiler-errors
Mention `unnameable_types` in `unreachable_pub` documentation.

This link makes sense because someone who wishes to avoid unusable `pub` is likely, but not guaranteed, to be interested in avoiding unnameable types.

Also fixed some grammar problems I noticed in the area.

Fixes #116604.

r? Urgau
2025-01-06 08:09:05 +01:00
Matthias Krüger
69e7b12b6b
Rollup merge of #135132 - BoxyUwU:rdg_ping_group, r=jieyouxu
dev guide ping group and set adhoc reviewers to compiler

r? ``@jieyouxu`` ``@Kobzol``

I added you both to the `cc` list since you're both also on the list of owners for `src/doc/rustc-dev-guide`
2025-01-06 08:09:05 +01:00
Matthias Krüger
bb2c4ad331
Rollup merge of #135129 - jieyouxu:tag-r-d-g, r=BoxyUwU
triagebot: label `src/doc/rustc-dev-guide` changes with `A-rustc-dev-guide`

Probably should also create a dev-guide reviewer pool for this repo 🤔

r? ``@Kobzol``
2025-01-06 08:09:04 +01:00
Matthias Krüger
b36962db55
Rollup merge of #135111 - tgross35:float-doc-aliases, r=Noratrieb
Add doc aliases for `libm` and IEEE names

Searching "fma" in the Rust documentation returns results for `intrinsics::fma*`, but does not point to the user-facing `mul_add`. Add aliases for `fma*` and the IEEE operation name `fusedMultiplyAdd`. Add the IEEE name to `sqrt` as well, `squareRoot`.
2025-01-06 08:09:04 +01:00
lcnr
ae6a3313cf footnote to ordinary comment 2025-01-06 07:37:52 +01:00
Michael Goulet
339902908e Remove CallKind::Deref hack from UseSpans
It's not really necessary
2025-01-06 03:55:19 +00:00
Michael Goulet
cd65cd27db Improve find_self_call with reborrowed receiver 2025-01-06 03:17:04 +00:00
Michael Goulet
3560a2b399 Improve span when temporary receiver is dropped in edition 2024 2025-01-06 03:14:04 +00:00
bors
56f9e6f935 Auto merge of #135140 - jhpratt:rollup-pn2gi84, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 - #135115 (cg_llvm: Use constants for DWARF opcodes, instead of FFI calls)
 - #135118 (Clarified the documentation on `core::iter::from_fn` and `core::iter::successors`)
 - #135121 (Mark `slice::reverse` unstably const)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-06 02:30:55 +00:00
Kevin Reid
2a96478dd8 Mention unnameable_types in unreachable_pub documentation.
This link makes sense because someone who wishes to avoid unusable `pub`
is likely, but not guaranteed, to be interested in avoiding unnameable
types.

Also fixed some grammar problems I noticed in the area.

Fixes #116604.
2025-01-05 17:13:33 -08:00
Jacob Pratt
0f9f91cccf
Rollup merge of #135121 - okaneco:const_slice_reverse, r=jhpratt
Mark `slice::reverse` unstably const

Tracking issue #135120

This is unblocked by the stabilization of `const_swap`
2025-01-05 18:35:05 -05:00
Jacob Pratt
af9293f507
Rollup merge of #135118 - ranger-ross:better-docs-on-iter-fns, r=jhpratt
Clarified the documentation on `core::iter::from_fn` and `core::iter::successors`

This PR clarifies the closure requirements for `core::iter::from_fn` and `core::iter::successors`.

`std::iter::successors` in particular is a bit difficult to understand if you are not already familiar with the signature of [`checked_mul`](https://docs.rs/num/latest/num/trait.CheckedMul.html) used in the example.

See https://github.com/rust-lang/rust/issues/135087
2025-01-05 18:35:04 -05:00
Jacob Pratt
b9f971a52c
Rollup merge of #135115 - Zalathar:dwarf-const, r=workingjubilee
cg_llvm: Use constants for DWARF opcodes, instead of FFI calls

Split off from #134009 to incorporate feedback from https://github.com/rust-lang/rust/pull/134009#discussion_r1903133906.

Most of the constant values now come from gimli, which is already a compiler dependency.

I noticed that `DW_OP_LLVM_fragment` is an LLVM detail that is not defined by DWARF and could hypothetically change, so I added a static assertion on the C++ side to detect that if it ever happens.

r? workingjubilee
2025-01-05 18:35:04 -05:00
bors
feb32c6546 Auto merge of #134794 - RalfJung:abi-required-target-features, r=workingjubilee
Add a notion of "some ABIs require certain target features"

I think I finally found the right shape for the data and checks that I recently added in https://github.com/rust-lang/rust/pull/133099, https://github.com/rust-lang/rust/pull/133417, https://github.com/rust-lang/rust/pull/134337: we have a notion of "this ABI requires the following list of target features, and it is incompatible with the following list of target features". Both `-Ctarget-feature` and `#[target_feature]` are updated to ensure we follow the rules of the ABI.  This removes all the "toggleability" stuff introduced before, though we do keep the notion of a fully "forbidden" target feature -- this is needed to deal with target features that are actual ABI switches, and hence are needed to even compute the list of required target features.

We always explicitly (un)set all required and in-conflict features, just to avoid potential trouble caused by the default features of whatever the base CPU is. We do this *before* applying `-Ctarget-feature` to maintain backward compatibility; this poses a slight risk of missing some implicit feature dependencies in LLVM but has the advantage of not breaking users that deliberately toggle ABI-relevant target features. They get a warning but the feature does get toggled the way they requested.

For now, our logic supports x86, ARM, and RISC-V (just like the previous logic did). Unsurprisingly, RISC-V is the nicest. ;)

As a side-effect this also (unstably) allows *enabling* `x87` when that is harmless. I used the opportunity to mark SSE2 as required on x86-64, to better match the actual logic in LLVM and because all x86-64 chips do have SSE2. This infrastructure also prepares us for requiring SSE on x86-32 when we want to use that for our ABI (and for float semantics sanity), see https://github.com/rust-lang/rust/issues/133611, but no such change is happening in this PR.

r? `@workingjubilee`
2025-01-05 23:21:06 +00:00
bors
b3b368a183 Auto merge of #135127 - Kobzol:rustc-dev-guide-sync, r=BoxyUwU
rustc-dev-guide subtree update

This PR performs the first update of rustc-dev-guide code from its repository.

r? `@BoxyUwU`
2025-01-05 19:35:30 +00:00
Boxy
2cc114c6da rustc-dev-guide changes ping group 2025-01-05 18:40:08 +00:00
许杰友 Jieyou Xu (Joe)
5871867808 triagebot: label src/doc/rustc-dev-guide changes with A-rustc-dev-guide 2025-01-06 01:27:47 +08:00
Jakub Beránek
515d7eb33f Preparing for merge from rustc 2025-01-05 18:12:52 +01:00
bors
3323bbec7e Auto merge of #135125 - bjorn3:sync_cg_clif-2025-01-05, r=bjorn3
Subtree sync for rustc_codegen_cranelift

Aside from a Cranelift update, nothing major this time.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
2025-01-05 16:53:02 +00:00
Boxy
1a75c30604 Split stuff out of representing types, and rewrite early/late bound chapter (#2192) 2025-01-05 17:51:45 +01:00
Stuart Cook
a483d98993 Describe how to use rust-analyzer with rmake.rs (#2191) 2025-01-05 17:51:45 +01:00
Tshepang Mbambo
f46e4aa3a9 fix comment 2025-01-05 17:51:45 +01:00
Tshepang Mbambo
a5207d30d3 make paragraph more readable 2025-01-05 17:51:45 +01:00
Tshepang Mbambo
2e6c7b4cc1 repetition not needed 2025-01-05 17:51:45 +01:00
Jakub Beránek
047e26bcad Document josh subtrees and update subtree repository list (#2182) 2025-01-05 17:51:45 +01:00
Jakub Beránek
1c4ad64a44 Add tooling for performing Josh synces (#2183) 2025-01-05 17:51:45 +01:00
Onur Özkan
6c43e06e11 comment out FIXMEs to not display them on UI (#2186) 2025-01-05 17:51:45 +01:00
bjorn3
8e51a89420 Update tidy 2025-01-05 15:54:55 +00:00
bjorn3
a94e2d513b Merge commit '918acafef682d0d0ca30b47de4768210417ff362' into sync_cg_clif-2025-01-05 2025-01-05 15:44:46 +00:00
bjorn3
918acafef6 Fix rustc test suite 2025-01-05 15:28:26 +00:00
bjorn3
62d3654327 Rustup to rustc 1.86.0-nightly (1891c2866 2025-01-04) 2025-01-05 15:11:06 +00:00
bjorn3
36376f5572 Sync from rust 1891c28669 2025-01-05 15:00:29 +00:00
okaneco
03c2ac248f Mark slice::reverse unstably const 2025-01-05 08:01:50 -05:00
Zalathar
f50721ebad Explain why the DW_TAG_* constants remain as-is for now 2025-01-05 22:16:49 +11:00
Zalathar
1b62645418 Use constants for DWARF opcodes, instead of FFI calls 2025-01-05 22:16:25 +11:00
Zalathar
e267106104 Use gimli to get the values of DWARF constants needed by codegen
The `gimli` crate is already a dependency of `thorin-dwp`, which is already a
dependency of `rustc_codegen_ssa`.
2025-01-05 22:07:48 +11:00
ranger-ross
6243c0f818
Clarified the documentation on core::iter::from_fn and core::iter::successors 2025-01-05 19:25:24 +09:00
bors
dcfa38fe23 Auto merge of #135109 - rust-lang:cargo_update, r=tgross35
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt

compiler & tools dependencies:
     Locking 4 packages to latest compatible versions
    Updating bstr v1.11.1 -> v1.11.3
    Updating spdx v0.10.7 -> v0.10.8
    Updating syn v2.0.93 -> v2.0.94
    Updating tempfile v3.14.0 -> v3.15.0
note: pass `--verbose` to see 35 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 3 unchanged dependencies behind latest

rustbook dependencies:
     Locking 5 packages to latest compatible versions
    Updating bstr v1.11.1 -> v1.11.3
    Updating cc v1.2.6 -> v1.2.7
    Updating syn v2.0.93 -> v2.0.94
    Updating tempfile v3.14.0 -> v3.15.0
    Updating winnow v0.6.20 -> v0.6.22
```
2025-01-05 09:49:57 +00:00
Ralf Jung
2e64b5352b add dedicated type for ABI target feature constraints 2025-01-05 10:46:30 +01:00
bors
7270e73b62 Auto merge of #135074 - wzssyqa:mips-mti, r=oli-obk
Target: Add mips mti baremetal support

Do the same thing as gcc, which use the vendor `mti` to mark the toolchain as MIPS32r2 default.

We support both big endian and little endian flavor:
  mips-mti-none-elf
  mipsel-mti-none-elf
2025-01-05 07:01:38 +00:00
YunQiang Su
1a82287070
Update src/doc/rustc/src/platform-support/mips-mti-none-elf.md
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2025-01-05 14:46:54 +08:00
YunQiang Su
51dc350178 fix tests 2025-01-05 13:00:26 +08:00
bors
8417f8311f Auto merge of #135113 - workingjubilee:rollup-yy6nxel, r=workingjubilee
Rollup of 4 pull requests

Successful merges:

 - #134925 (deny usage of special FileCheck prefixes as revision names)
 - #134996 (Add UWP (msvc) target support page)
 - #135104 (do not in-place-iterate over flatmap/flatten)
 - #135110 (library: fix adler{ -> 2}.debug)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-05 03:40:44 +00:00
Jubilee
bfd7ac17f9
Rollup merge of #135110 - matthiaskrgr:adler, r=workingjubilee
library: fix adler{ -> 2}.debug

Fixes
```
Checking stage0 library artifacts {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} (x86_64-unknown-linux-gnu)
warning: profile package spec `adler` in profile `release` did not match any packages

	Did you mean `adler2`?
```
r? `@bjorn3`
2025-01-04 17:23:17 -08:00
Jubilee
5be6c9bc12
Rollup merge of #135104 - the8472:disable-in-place-iter-for-flatten, r=Mark-Simulacrum
do not in-place-iterate over flatmap/flatten

The implementation is unsound when a partially consumed iterator has some elements buffered in the front/back parts and cloning the Iterator removes the capacity from the backing vec::IntoIter.

This is a fix for #135103 that removes the specialization trait impls without removing some supporting parts. I've kept it small so it can be easily backported. I'll either remove the remaining parts or think of a way to recover the optimization in a separate PR.
2025-01-04 17:23:16 -08:00
Jubilee
dcb8be8934
Rollup merge of #134996 - bdbai:uwp-support, r=jieyouxu,ChrisDenton
Add UWP (msvc) target support page

- Added Platform Support page for `x86_64-uwp-windows-msvc`, `i686-uwp-windows-msvc`, `thumbv7a-uwp-windows-msvc` and `aarch64-uwp-windows-msvc`
  - Adding myself as a maintainer
  - Removing the ticks for `thumbv7a-pc-windows-msvc` and `thumbv7a-uwp-windows-msvc` as they do not currently build due to #134565 and https://github.com/rust-lang/backtrace-rs/pull/685
- Fixed a few minor issues to let most of the UWP targets compile
- Happy new year to all!

r? jieyouxu
2025-01-04 17:23:16 -08:00
Jubilee
78e681ac74
Rollup merge of #134925 - DavisRayM:130982-deny-special-filecheck-prefixes, r=jieyouxu
deny usage of special FileCheck prefixes as revision names

Adds a check that ensures special FileCheck prefixes are not used as revision names.

Fix #130982
2025-01-04 17:23:15 -08:00
Trevor Gross
37f2875588 Add doc aliases for libm and IEEE names
Searching "fma" in the Rust documentation returns results for
`intrinsics::fma*`, but does not point to the user-facing `mul_add`. Add
aliases for `fma*` and the IEEE operation name `fusedMultiplyAdd`. Add
the IEEE name to `sqrt` as well, `squareRoot`.
2025-01-05 01:03:32 +00:00