Commit Graph

281206 Commits

Author SHA1 Message Date
Scott McMurray
0cc14b688d transmute should also assume non-null pointers
Previously it only did integer-ABI things, but this way it does data pointers too.  That gives more information in general to the backend, and allows slightly simplifying one of the helpers in slice iterators.
2025-02-12 23:01:27 -08:00
bors
9fcc9cf4a2 Auto merge of #136954 - jhpratt:rollup-koefsot, r=jhpratt
Rollup of 12 pull requests

Successful merges:

 - #134090 (Stabilize target_feature_11)
 - #135025 (Cast allocas to default address space)
 - #135841 (Reject `?Trait` bounds in various places where we unconditionally warned since 1.0)
 - #136217 (Mark condition/carry bit as clobbered in C-SKY inline assembly)
 - #136699 (std: replace the `FromInner` implementation for addresses with private conversion functions)
 - #136806 (Fix cycle when debug-printing opaque types from RPITIT)
 - #136807 (compiler: internally merge `PtxKernel` into `GpuKernel`)
 - #136818 (Implement `read*_exact` for `std:io::repeat`)
 - #136927 (Correctly escape hashtags when running `invalid_rust_codeblocks` lint)
 - #136937 (Update books)
 - #136945 (Add diagnostic item for `std::io::BufRead`)
 - #136947 (Reinstate nnethercote in the review rotation.)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-13 02:13:24 +00:00
Jacob Pratt
d16b067f8c
Rollup merge of #136947 - nnethercote:reinstate-nnethercote, r=nnethercote
Reinstate nnethercote in the review rotation.

I'm back from vacation.

r? ``@nnethercote``
2025-02-12 20:10:03 -05:00
Jacob Pratt
9a26bb1892
Rollup merge of #136945 - samueltardieu:push-rsqlyknnvyqm, r=fmease
Add diagnostic item for `std::io::BufRead`

This will be used in Clippy to detect unbuffered calls to `Read::bytes()`.
2025-02-12 20:10:03 -05:00
Jacob Pratt
89e01355eb
Rollup merge of #136937 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in e2fa4316c5a7c0d2499c5d6b799adcfad6ef7a45..d4d2c18cbd20876b2130a546e790446a8444cb32
2025-02-12 16:22:54 UTC to 2025-02-12 16:22:54 UTC

- Fix example for `cargo fix` (rust-lang/book#4226)

## rust-lang/reference

3 commits in de2d5289e45506b11dd652bef4f99de64be70e1c..6195dbd70fc6f0980c314b4d23875ac570d8253a
2025-02-12 15:40:30 UTC to 2025-02-11 20:35:17 UTC

- Revert "Update function-pointer.md for stabilization of `extended_varargs_abi_support`" (rust-lang/reference#1734)
- Rework error handling in mdbook-spec (rust-lang/reference#1733)
- `as` cast improvements (rust-lang/reference#1732)
2025-02-12 20:10:02 -05:00
Jacob Pratt
9fe0d25fcb
Rollup merge of #136927 - GuillaumeGomez:add-missing-hashtag-escape, r=notriddle
Correctly escape hashtags when running `invalid_rust_codeblocks` lint

Fixes #136899.

We forgot to use `map_line` when we wrote this lint.

r? ``@notriddle``
2025-02-12 20:10:01 -05:00
Jacob Pratt
de712f9e0a
Rollup merge of #136818 - a1phyr:io_repeat_exact, r=jhpratt
Implement `read*_exact` for `std:io::repeat`

cc #136756
2025-02-12 20:10:01 -05:00
Jacob Pratt
33c186baf7
Rollup merge of #136807 - workingjubilee:merge-gpus-to-get-the-arcradeongeforce, r=bjorn3
compiler: internally merge `PtxKernel` into `GpuKernel`

r? ``@bjorn3`` for review
2025-02-12 20:10:00 -05:00
Jacob Pratt
03e2d7ebc5
Rollup merge of #136806 - adwinwhite:cycle-in-pretty-print-rpitit, r=compiler-errors
Fix cycle when debug-printing opaque types from RPITIT

Extend #66594 to opaque types from RPITIT.

Before this PR, enabling debug logging like `RUSTC_LOG="[check_type_bounds]"` for code containing RPITIT produces a query cycle of `explicit_item_bounds`, as pretty printing for opaque type calls [it](d9a4a47b8b/compiler/rustc_middle/src/ty/print/pretty.rs (L1001)).
2025-02-12 20:09:59 -05:00
Jacob Pratt
4ce473ccba
Rollup merge of #136699 - joboet:netaddr_from_inner, r=cuviper
std: replace the `FromInner` implementation for addresses with private conversion functions

Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed.

I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside  `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
2025-02-12 20:09:59 -05:00
Jacob Pratt
0de2341fef
Rollup merge of #136217 - taiki-e:csky-asm-flags, r=Amanieu
Mark condition/carry bit as clobbered in C-SKY inline assembly

C-SKY's compare and some arithmetic/logical instructions modify condition/carry bit (C) in PSR, but there is currently no way to mark it as clobbered in `asm!`.

This PR marks it as clobbered except when [`options(preserves_flags)`](https://doc.rust-lang.org/reference/inline-assembly.html#r-asm.options.supported-options.preserves_flags) is used.

Refs:
- Section 1.3 "Programming model" and Section 1.3.5 "Condition/carry bit" in CSKY Architecture user_guide:
  9f7121f7d4/CSKY%20Architecture%20user_guide.pdf

  > Under user mode, condition/carry bit (C) is located in the lowest bit of PSR, and it can be
accessed and changed by common user instructions. It is the only data bit that can be visited
under user mode in PSR.

  > Condition or carry bit represents the result after one operation. Condition/carry bit can be
clearly set according to the results of compare instructions or unclearly set as some
high-precision arithmetic or logical instructions. In addition, special instructions such as
DEC[GT,LT,NE] and XTRB[0-3] will influence the value of condition/carry bit.

- Register definition in LLVM:
  https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/CSKY/CSKYRegisterInfo.td#L88

cc ```@Dirreke``` ([target maintainer](aa6f5ab18e/src/doc/rustc/src/platform-support/csky-unknown-linux-gnuabiv2.md (target-maintainers)))

r? ```@Amanieu```

```@rustbot``` label +O-csky +A-inline-assembly
2025-02-12 20:09:58 -05:00
Jacob Pratt
6b9b0a0ce8
Rollup merge of #135841 - oli-obk:push-qxlnokwrkkym, r=compiler-errors
Reject `?Trait` bounds in various places where we unconditionally warned since 1.0

fixes #135730
fixes #135809

Also a breaking change, so let's see what crater says.

This has been an unconditional warning since *before* 1.0
2025-02-12 20:09:57 -05:00
Jacob Pratt
a53cd3c979
Rollup merge of #135025 - Flakebi:alloca-addrspace, r=nikic
Cast allocas to default address space

Pointers for variables all need to be in the same address space for correct compilation. Therefore ensure that even if an `alloca` is created in a different address space, it is casted to the default address space before its value is used.

This is necessary for the amdgpu target and others where the default address space for `alloca`s is not 0.

For example the following code compiles incorrectly when not casting the address space to the default one:

```rust
fn f(p: *const i8 /* addrspace(0) */) -> *const i8 /* addrspace(0) */ {
    let local = 0i8; /* addrspace(5) */
    let res = if cond { p } else { &raw const local };
    res
}
```

results in

```llvm
    %local = alloca addrspace(5) i8
    %res = alloca addrspace(5) ptr

if:
    ; Store 64-bit flat pointer
    store ptr %p, ptr addrspace(5) %res

else:
    ; Store 32-bit scratch pointer
    store ptr addrspace(5) %local, ptr addrspace(5) %res

ret:
    ; Load and return 64-bit flat pointer
    %res.load = load ptr, ptr addrspace(5) %res
    ret ptr %res.load
```

For amdgpu, `addrspace(0)` are 64-bit pointers, `addrspace(5)` are 32-bit pointers.
The above code may store a 32-bit pointer and read it back as a 64-bit pointer, which is obviously wrong and cannot work. Instead, we need to `addrspacecast %local to ptr addrspace(0)`, then we store and load the correct type.

Tracking issue: #135024
2025-02-12 20:09:56 -05:00
Jacob Pratt
575405161f
Rollup merge of #134090 - veluca93:stable-tf11, r=oli-obk
Stabilize target_feature_11

# Stabilization report

This is an updated version of https://github.com/rust-lang/rust/pull/116114, which is itself a redo of https://github.com/rust-lang/rust/pull/99767. Most of this commit and report were copied from those PRs. Thanks ```@LeSeulArtichaut``` and ```@calebzulawski!```

## Summary
Allows for safe functions to be marked with `#[target_feature]` attributes.

Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot *generally* be assigned to safe function pointers, and don't implement the `Fn*` traits.

However, calling them from other `#[target_feature]` functions with a superset of features is safe.

```rust
// Demonstration function
#[target_feature(enable = "avx2")]
fn avx2() {}

fn foo() {
    // Calling `avx2` here is unsafe, as we must ensure
    // that AVX is available first.
    unsafe {
        avx2();
    }
}

#[target_feature(enable = "avx2")]
fn bar() {
    // Calling `avx2` here is safe.
    avx2();
}
```

Moreover, once https://github.com/rust-lang/rust/pull/135504 is merged, they can be converted to safe function pointers in a context in which calling them is safe:

```rust
// Demonstration function
#[target_feature(enable = "avx2")]
fn avx2() {}

fn foo() -> fn() {
    // Converting `avx2` to fn() is a compilation error here.
    avx2
}

#[target_feature(enable = "avx2")]
fn bar() -> fn() {
    // `avx2` coerces to fn() here
    avx2
}
```

See the section "Closures" below for justification of this behaviour.

## Test cases
Tests for this feature can be found in [`tests/ui/target_feature/`](f6cb952dc1/tests/ui/target-feature).

## Edge cases
### Closures
 * [target-feature 1.1: should closures inherit target-feature annotations? #73631](https://github.com/rust-lang/rust/issues/73631)

Closures defined inside functions marked with #[target_feature] inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits.

```rust
#[target_feature(enable = "avx2")]
fn qux() {
    let my_closure = || avx2(); // this call to `avx2` is safe
    let f: fn() = my_closure;
}
```
This means that in order to call a function with #[target_feature], you must guarantee that the target-feature is available while the function, any closures defined inside it, as well as any safe function pointers obtained from target-feature functions inside it, execute.

This is usually ensured because target features are assumed to never disappear, and:
- on any unsafe call to a `#[target_feature]` function, presence of the target feature is guaranteed by the programmer through the safety requirements of the unsafe call.
- on any safe call, this is guaranteed recursively by the caller.

If you work in an environment where target features can be disabled, it is your responsibility to ensure that no code inside a target feature function (including inside a closure) runs after this (until the feature is enabled again).

**Note:** this has an effect on existing code, as nowadays closures do not inherit features from the enclosing function, and thus this strengthens a safety requirement. It was originally proposed in #73631 to solve this by adding a new type of UB: “taking a target feature away from your process after having run code that uses that target feature is UB” .
This was motivated by userspace code already assuming in a few places that CPU features never disappear from a program during execution (see i.e. 2e29bdf908/crates/std_detect/src/detect/arch/x86.rs); however, concerns were raised in the context of the Linux kernel; thus, we propose to relax that requirement to "causing the set of usable features to be reduced is unsafe; when doing so, the programmer is required to ensure that no closures or safe fn pointers that use removed features are still in scope".

* [Fix #[inline(always)] on closures with target feature 1.1 #111836](https://github.com/rust-lang/rust/pull/111836)

Closures accept `#[inline(always)]`, even within functions marked with `#[target_feature]`. Since these attributes conflict, `#[inline(always)]` wins out to maintain compatibility.

### ABI concerns
* [The extern "C" ABI of SIMD vector types depends on target features #116558](https://github.com/rust-lang/rust/issues/116558)

The ABI of some types can change when compiling a function with different target features. This could have introduced unsoundness with target_feature_11, but recent fixes (#133102, #132173) either make those situations invalid or make the ABI no longer dependent on features. Thus, those issues should no longer occur.

### Special functions
The `#[target_feature]` attribute is forbidden from a variety of special functions, such as main, current and future lang items (e.g. `#[start]`, `#[panic_handler]`), safe default trait implementations and safe trait methods.

This was not disallowed at the time of the first stabilization PR for target_features_11, and resulted in the following issues/PRs:
* [`#[target_feature]` is allowed on `main` #108645](https://github.com/rust-lang/rust/issues/108645)
* [`#[target_feature]` is allowed on default implementations #108646](https://github.com/rust-lang/rust/issues/108646)
* [#[target_feature] is allowed on #[panic_handler] with target_feature 1.1 #109411](https://github.com/rust-lang/rust/issues/109411)
* [Prevent using `#[target_feature]` on lang item functions #115910](https://github.com/rust-lang/rust/pull/115910)

## Documentation
 * Reference: [Document the `target_feature_11` feature reference#1181](https://github.com/rust-lang/reference/pull/1181)
---

cc tracking issue https://github.com/rust-lang/rust/issues/69098
cc ```@workingjubilee```
cc ```@RalfJung```
r? ```@rust-lang/lang```
2025-02-12 20:09:56 -05:00
bors
6dce9f8c2d Auto merge of #135994 - 1c3t3a:rename-unsafe-ptr, r=oli-obk
Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr

The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method.
This came up during the review of
https://github.com/rust-lang/rust/pull/134424.

r? `@Noratrieb`
2025-02-12 23:18:14 +00:00
Nicholas Nethercote
8ccc33f181 Reinstate nnethercote in the review rotation.
I'm back from vacation.
2025-02-13 08:42:36 +11:00
Samuel Tardieu
f8930b44a5 Add diagnostic item for std::io::BufRead
This will be used in Clippy to detect unbuffered calls to
`Read::bytes()`.
2025-02-12 22:22:15 +01:00
bors
ef148cd7eb Auto merge of #136943 - GuillaumeGomez:rollup-amtd3mq, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests)
 - #136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests)
 - #136784 (Nuke `Buffer` abstraction from `librustdoc`, take 2 💣)
 - #136838 (Check whole `Unsize` predicate for escaping bound vars)
 - #136848 (add docs and ut for bootstrap util cache)
 - #136871 (dev-guide: Link to `t-lang` procedures for new features)
 - #136890 (Change swap_nonoverlapping from lang to library UB)
 - #136901 (compiler: give `ExternAbi` truly stable `Hash` and `Ord`)
 - #136907 (compiler: Make middle errors `pub(crate)` and bury the dead code)
 - #136916 (use cc archiver as default in `cc2ar`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-12 20:26:35 +00:00
Guillaume Gomez
8567fbb4b5
Rollup merge of #136916 - onur-ozkan:fix-cc2ar, r=jieyouxu
use cc archiver as default in `cc2ar`

We should remove entire `cc2ar` but `cc` doesn't seem to cover all the conditions that `cc2ar` handles. For now, I replaced the `else` logic only, which is a bit hacky and unstable.

Fixes #136759
2025-02-12 20:30:56 +01:00
Guillaume Gomez
54b4b1c902
Rollup merge of #136907 - workingjubilee:middle-errors-cleanup, r=compiler-errors
compiler: Make middle errors `pub(crate)` and bury the dead code
2025-02-12 20:30:55 +01:00
Guillaume Gomez
27dc222fb4
Rollup merge of #136901 - workingjubilee:stabilize-externabi-hashing-forever, r=compiler-errors
compiler: give `ExternAbi` truly stable `Hash` and `Ord`

Currently, `ExternAbi` has a bunch of code to handle the reality that, as an enum, adding more variants to it will risk it hashing differently. It forces all of those variants to be added in a fixed order, except this means that the order of the variants doesn't correspond to any logical order except "historical accident". This is all to avoid having to rebless two tests. Perhaps there were more, once upon a time? But then we invented normalization in our test suite to handle exactly this sort of issue in a more general way.

There are two options here:
- Get rid of all the logical overhead and shrug, embracing blessing a couple of tests sometimes
- Change `ExternAbi` to have an ordering and hash that doesn't depend on the number of variants

As `ExternAbi` is essentially a strongly-typed string, and thus no two strings can be identical, this implements the second of the two by hand-implementing `Ord` and `Hash` to make the hashing and comparison based on the string! This will diff the current hashes, but they will diff no more after this.
2025-02-12 20:30:55 +01:00
Guillaume Gomez
269d784dd5
Rollup merge of #136890 - saethlin:swap_nonoverlapping, r=RalfJung
Change swap_nonoverlapping from lang to library UB

The implementation of ptr::swap_nonoverlapping does not always escalate its safety contract to language UB, so it should be `check_library_ub`.

Fixes https://github.com/rust-lang/miri/issues/4188
2025-02-12 20:30:54 +01:00
Guillaume Gomez
428baf5fcc
Rollup merge of #136871 - madsmtm:link-to-lang-procedures, r=scottmcm
dev-guide: Link to `t-lang` procedures for new features

I was confused in https://github.com/rust-lang/rust/pull/136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
2025-02-12 20:30:53 +01:00
Guillaume Gomez
24949058ab
Rollup merge of #136848 - Shourya742:2025-02-11-add-docs-and-ut-for-util-cache, r=clubby789
add docs and ut for bootstrap util cache

This PR adds doc and unit test for bootstrap utils/cache module
2025-02-12 20:30:52 +01:00
Guillaume Gomez
993eb34d84
Rollup merge of #136838 - compiler-errors:escaping-unsize, r=fmease
Check whole `Unsize` predicate for escaping bound vars

Fixes #136799
2025-02-12 20:30:52 +01:00
Guillaume Gomez
10b5596deb
Rollup merge of #136784 - yotamofek:pr/rustdoc-remove-buffer-take2, r=GuillaumeGomez
Nuke `Buffer` abstraction from `librustdoc`, take 2 💣

In https://github.com/rust-lang/rust/pull/136656 I found out that the for_html field in the Buffer struct was never read, and pondered if Buffer had any utility at all. `@GuillaumeGomez` said he agrees that it can be just removed. So this PR is me removing it. So, r? `@aDotInTheVoid` , maybe?

Supersedes #136748
2025-02-12 20:30:51 +01:00
Guillaume Gomez
f0af030ee4
Rollup merge of #136761 - workingjubilee:specify-opt-level-for-codegen-tests, r=saethlin
tests: `-Copt-level=3` instead of `-O` in codegen tests

An effective blocker for redefining the meaning of `-O` is to stop reusing this somewhat ambiguous alias in our own codegen test suite. The choice between `-Copt-level=2` and `-Copt-level=3` is arbitrary for most of our tests. In most cases it makes no difference, so I set most of them to `-Copt-level=3`, as it will lead to slightly more "normalized" codegen.

try-job: test-various
try-job: arm-android
try-job: armhf-gnu
try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-mingw
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: aarch64-apple
try-job: aarch64-gnu
2025-02-12 20:30:50 +01:00
Guillaume Gomez
a3f76adb81
Rollup merge of #136758 - workingjubilee:specify-opt-level-for-tests, r=saethlin
tests: `-Copt-level=3` instead of `-O` in assembly tests

An effective blocker for redefining the meaning of `-O` is to stop reusing this somewhat ambiguous alias in our own assembly test suite. The choice between `-Copt-level=2` and `-Copt-level=3` is arbitrary for most of our tests. In most cases it makes no difference, so I set most of them to `-Copt-level=3`, as it will lead to slightly more "normalized" assembly.
2025-02-12 20:30:50 +01:00
Guillaume Gomez
17cf100f11 Add regression test for #136899 2025-02-12 19:46:07 +01:00
Guillaume Gomez
54f59c6dda Correctly escape hashtags when running invalid_rust_codeblocks lint 2025-02-12 19:46:07 +01:00
rustbot
d3e0d5cc8a Update books 2025-02-12 19:24:48 +01:00
Ben Kimock
21bb8cb946 Change swap_nonoverlapping from lang to library UB 2025-02-12 12:20:14 -05:00
Yotam Ofek
d99d8c249d Nuke Buffer abstraction from librustdoc 💣 2025-02-12 15:50:06 +00:00
bors
ced8e650cd Auto merge of #135336 - tshepang:patch-5, r=jieyouxu
clarify and document needs-dynamic-linking

try-job: test-various
2025-02-12 15:39:48 +00:00
joboet
80c60fe783
std: replace the FromInner implementation for addresses with private conversion functions
Having these implementation available crate-wide means that platforms not using sockets for their networking code have to stub out the libc definitions required to support them. This PR moves the conversions to private helper functions that are only available where actually needed.

I also fixed the signature of the function converting from a C socket address to a Rust one: taking a reference to a `sockaddr_storage` resulted in unsound usage inside  `LookupHost::next`, which could create a reference to a structure smaller than `sockaddr_storage`. Thus I've replaced the argument type with a pointer and made the function `unsafe`.
2025-02-12 14:13:35 +01:00
bors
552a959051 Auto merge of #136918 - GuillaumeGomez:rollup-f6h21gg, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #134981 ( Explain that in paths generics can't be set on both the enum and the variant)
 - #136698 (Replace i686-unknown-redox target with i586-unknown-redox)
 - #136767 (improve host/cross target checking)
 - #136829 ([rustdoc] Move line numbers into the `<code>` directly)
 - #136875 (Rustc dev guide subtree update)
 - #136900 (compiler: replace `ExternAbi::name` calls with formatters)
 - #136913 (Put kobzol back on review rotation)
 - #136915 (documentation fix: `f16` and `f128` are not double-precision)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-12 12:42:25 +00:00
Guillaume Gomez
40f04999f5
Rollup merge of #136915 - eyelash:float-precision, r=workingjubilee
documentation fix: `f16` and `f128` are not double-precision
2025-02-12 10:46:42 +01:00
Guillaume Gomez
29c61d31aa
Rollup merge of #136913 - Kobzol:kobzol-rotation, r=Kobzol
Put kobzol back on review rotation

r? ``@ghost``
2025-02-12 10:46:41 +01:00
Guillaume Gomez
30bd1b53b3
Rollup merge of #136900 - workingjubilee:format-externabi-directly, r=oli-obk
compiler: replace `ExternAbi::name` calls with formatters

Most of these just format the ABI string, so... just format ExternAbi? This makes it more consistent and less jank when we can do it.
2025-02-12 10:46:40 +01:00
Guillaume Gomez
9fa2557d8e
Rollup merge of #136875 - BoxyUwU:rdg-push, r=jieyouxu
Rustc dev guide subtree update

r? ``@ghost``
2025-02-12 10:46:39 +01:00
Guillaume Gomez
ba32d8bdee
Rollup merge of #136829 - GuillaumeGomez:move-line-numbers-into-code, r=notriddle
[rustdoc] Move line numbers into the `<code>` directly

Fixes #84242.

This is the first for adding support for https://github.com/rust-lang/rust/issues/127334 and also for another feature I'm working on.

A side-effect of this change is that it also fixes source code pages display in lynx since they're not directly in the source code.

To allow having code wrapping, the grid approach doesn't work as the line numbers are in their own container, so we need to move them into the code. Now with this, it becomes much simpler to do what we want (with CSS mostly). One downside: the highlighting became more complex and slow as we need to generate some extra HTML tags directly into the highlighting process. However that also allows to not have a huge HTML size increase.

You can test the result [here](https://rustdoc.crud.net/imperio/move-line-numbers-into-code/scrape_examples/fn.test_many.html) and [here](https://rustdoc.crud.net/imperio/move-line-numbers-into-code/src/scrape_examples/lib.rs.html#10).

The appearance should have close to no changes.

r? ``@notriddle``
2025-02-12 10:46:39 +01:00
Guillaume Gomez
1073aea8d3
Rollup merge of #136767 - onur-ozkan:is-host-target, r=albertlarsan68,jieyouxu
improve host/cross target checking

Using an invalid equality operator on `builder.config.build !=/==` can be hard to detect in reviews (which is quite dangerous). Replaced them with `is_host_target`, which is much clearer as it explicitly states what it does.
2025-02-12 10:46:38 +01:00
Guillaume Gomez
c43a59f597
Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJung
Replace i686-unknown-redox target with i586-unknown-redox

This change is related to https://github.com/rust-lang/rust/issues/136495
2025-02-12 10:46:37 +01:00
Guillaume Gomez
262079b52a
Rollup merge of #134981 - estebank:issue-93993, r=BoxyUwU
Explain that in paths generics can't be set on both the enum and the variant

```
error[E0109]: type arguments are not allowed on tuple variant `TSVariant`
  --> $DIR/enum-variant-generic-args.rs:54:29
   |
LL |     Enum::<()>::TSVariant::<()>(());
   |                 ---------   ^^ type argument not allowed
   |                 |
   |                 not allowed on tuple variant `TSVariant`
   |
   = note: generic arguments are not allowed on both an enum and its variant's path segments simultaneously; they are only valid in one place or the other
help: remove the generics arguments from one of the path segments
   |
LL -     Enum::<()>::TSVariant::<()>(());
LL +     Enum::TSVariant::<()>(());
   |
LL -     Enum::<()>::TSVariant::<()>(());
LL +     Enum::<()>::TSVariant(());
   |
```

Fix #93993.
2025-02-12 10:46:36 +01:00
bors
021fb9c09a Auto merge of #136897 - workingjubilee:revert-unfcped-stab, r=WaffleLapkin
Revert "Stabilize `extended_varargs_abi_support`"

I cannot find an FCP for this, despite it being a stabilization PR which normally means we do an FCP of some kind? It would seem reasonable for _either_ compiler or lang to have FCPed it? I am thus opening a revert PR, which mostly-cleanly applies, so that we can later actually land this properly with a stability report and FCP.

- https://github.com/rust-lang/rust/issues/136896
- https://github.com/rust-lang/rust/pull/116161
- https://github.com/rust-lang/rust/issues/100189
2025-02-12 09:44:30 +00:00
onur-ozkan
8a70219a38 use cc archiver as default in cc2ar
We should remove entire `cc2ar` but `cc` doesn't seem to cover all the conditions that `cc2ar` handles.
For now, I replaced the `else` logic only, which is a bit hacky and unstable.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-12 09:24:21 +00:00
eyelash
4f37b458fc
f128 is quadruple-precision 2025-02-12 09:55:45 +01:00
eyelash
0ca8353651
f16 is half-precision 2025-02-12 09:54:33 +01:00
Jakub Beránek
2e2afff50c
Put kobzol back to review rotation 2025-02-12 09:51:14 +01:00
bors
33d92df3e6 Auto merge of #136905 - matthiaskrgr:rollup-8zwcgta, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #135549 (Document some safety constraints and use more safe wrappers)
 - #135965 (In "specify type" suggestion, skip type params that are already known)
 - #136193 (Implement pattern type ffi checks)
 - #136646 (Add a TyPat in the AST to reuse the generic arg lowering logic)
 - #136874 (Change the issue number for `likely_unlikely` and `cold_path`)
 - #136884 (Lower fn items as ZST valtrees and delay a bug)
 - #136885 (i686-linux-android: increase CPU baseline to Pentium 4 (without an actual change)
 - #136891 (Check sig for errors before checking for unconstrained anonymous lifetime)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-12 06:54:18 +00:00