Commit graph

247636 commits

Author SHA1 Message Date
Amanieu d'Antras 5674f0662f Promote OpenHarmony targets to tier 2
MCP: rust-lang/compiler-team#719
2024-03-02 18:11:25 +00:00
bors 6db96de66c Auto merge of #120264 - weihanglo:split-dward-kind-lto, r=michaelwoerister
test: enable `unpacked-lto` tests

This enables the correct `unpacked-lto` tests.

Not sure whether `.o` should be removed.
They are bitcode for linker-plugin-lto, though there might be some `.o` for `#[no_builtins]`?
2024-03-01 13:45:10 +00:00
bors b0696a5160 Auto merge of #121462 - compiler-errors:eq-and-sub, r=lcnr
Combine `Sub` and `Equate`

Combine `Sub` and `Equate` into a new relation called `TypeRelating` (that name sounds familiar...)

Tracks the difference between `Sub` and `Equate` via `ambient_variance: ty::Variance` much like the `NllTypeRelating` relation, but implemented slightly jankier because it's a more general purpose relation.

r? lcnr
2024-03-01 10:30:42 +00:00
bors 6cbf0926d5 Auto merge of #121728 - tgross35:f16-f128-step1-ty-updates, r=compiler-errors
Add stubs in IR and ABI for `f16` and `f128`

This is the very first step toward the changes in https://github.com/rust-lang/rust/pull/114607 and the [`f16` and `f128` RFC](https://rust-lang.github.io/rfcs/3453-f16-and-f128.html). It adds the types to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`, and just propagates those out as `unimplemented!` stubs where necessary.

These types do not parse yet so there is no feature gate, and it should be okay to use `unimplemented!`.

The next steps will probably be AST support with parsing and the feature gate.

r? `@compiler-errors`
cc `@Nilstrieb` suggested breaking the PR up in https://github.com/rust-lang/rust/pull/120645#issuecomment-1925900572
2024-03-01 03:36:11 +00:00
Michael Goulet 5072b659ff Rebase fallout from TypeRelating::binders, inline higher_ranked_sub 2024-03-01 01:20:50 +00:00
Michael Goulet b1536568db Fallout from removing a_is_expected 2024-03-01 01:20:50 +00:00
Michael Goulet 04e22627f5 Remove a_is_expected from combine relations 2024-03-01 01:20:50 +00:00
Michael Goulet 61daee66a8 Get rid of some sub_exp and eq_exp 2024-03-01 01:20:49 +00:00
Michael Goulet 801dd1d061 Remove cause 2024-03-01 01:20:49 +00:00
Michael Goulet c87b727a23 Combine sub and eq 2024-03-01 01:20:49 +00:00
Michael Goulet 3cb36317cd Preserve variance on error in generalizer 2024-03-01 01:20:49 +00:00
bors 6f435eb0eb Auto merge of #114016 - krtab:delete_sys_memchr, r=workingjubilee
Delete architecture-specific memchr code in std::sys

Currently all architecture-specific memchr code is only used in `std::io`. Most of the actual `memchr` capacity exposed to the user through the slice API is instead implemented in `core::slice::memchr`.

Hence this commit deletes `memchr` from `std::sys[_common]` and replace calls to it by calls to `core::slice::memchr` functions. This deletes `(r)memchr` from the list of symbols linked to libc.

The interest of putting architecture specific code back in core is linked to the discussion to be had in #113654
2024-03-01 00:45:47 +00:00
bors 77be7a3e0d Auto merge of #121810 - matthiaskrgr:rollup-mawij2g, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #121326 (Detect empty leading where clauses on type aliases)
 - #121464 (rustc: Fix wasm64 metadata object files)
 - #121681 (Safe Transmute: Revise safety analysis)
 - #121753 (Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths)
 - #121782 (allow statics pointing to mutable statics)
 - #121798 (Fix links in rustc doc)
 - #121806 (add const test for ptr::metadata)
 - #121809 (Remove doc aliases to PATH)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-29 21:47:54 +00:00
Matthias Krüger b961f25c21
Rollup merge of #121809 - tgross35:suggest-path-split-fixup, r=Amanieu
Remove doc aliases to PATH

Remove aliases for `split_paths` and `join_paths` as should have been done in <https://github.com/rust-lang/rust/pull/119748> (Bors merged the wrong commit).
2024-02-29 20:50:06 +01:00
Matthias Krüger b07419b6d9
Rollup merge of #121806 - RalfJung:const-metadata, r=oli-obk
add const test for ptr::metadata

https://github.com/rust-lang/rust/pull/121199 uncovered this as a gap in our test suite.

r? `@oli-obk`
2024-02-29 20:50:05 +01:00
Matthias Krüger 50e738bc1c
Rollup merge of #121798 - AaronChen0:master, r=Nilstrieb
Fix links in rustc doc
2024-02-29 20:50:05 +01:00
Matthias Krüger 255fdcc858
Rollup merge of #121782 - RalfJung:mutable-ref-in-static, r=oli-obk
allow statics pointing to mutable statics

Fixes https://github.com/rust-lang/rust/issues/120450 for good. We can even simplify our checks: no need to specifically go looking for mutable references in const, we can just reject any reference that points to something mutable.

r? `@oli-obk`
2024-02-29 20:50:04 +01:00
Matthias Krüger 2fdcdd9025
Rollup merge of #121753 - mu001999:core/add_cfg, r=cuviper
Add proper cfg to keep only one AlignmentEnum definition for different target_pointer_widths

Detected by #121752

Only one AlignmentEnum would be used with a specified target_pointer_width
2024-02-29 20:50:03 +01:00
Matthias Krüger 419f7aeed6
Rollup merge of #121681 - jswrenn:nix-visibility-analysis, r=compiler-errors
Safe Transmute: Revise safety analysis

This PR migrates `BikeshedIntrinsicFrom` to a simplified safety analysis (described [here](https://github.com/rust-lang/project-safe-transmute/issues/15)) that does not rely on analyzing the visibility of types and fields.

The revised analysis treats primitive types as safe, and user-defined types as potentially carrying safety invariants. If Rust gains explicit (un)safe fields, this PR is structured so that it will be fairly easy to thread support for those annotations into the analysis.

Notably, this PR removes the `Context` type parameter from `BikeshedIntrinsicFrom`. Most of the files changed by this PR are just UI tests tweaked to accommodate the removed parameter.

r? `@compiler-errors`
2024-02-29 20:50:03 +01:00
Matthias Krüger 509972089b
Rollup merge of #121464 - alexcrichton:fix-wasm64, r=wesleywiser
rustc: Fix wasm64 metadata object files

It looks like LLD will detect object files being either 32 or 64-bit depending on any memory present. LLD will additionally reject 32-bit objects during a 64-bit link. Previously metadata objects did not have any memories in them which led LLD to conclude they were 32-bit objects which broke 64-bit targets for wasm.

This commit fixes this by ensuring that for 64-bit targets there's a memory object present to get LLD to detect it's a 64-bit target. Additionally this commit moves away from a hand-crafted wasm encoder to the `wasm-encoder` crate on crates.io as the complexity grows for the generated object file.

Closes #121460
2024-02-29 20:50:03 +01:00
Matthias Krüger dd4ecd1cf4
Rollup merge of #121326 - fmease:detect-empty-leading-where-clauses-on-ty-aliases, r=compiler-errors
Detect empty leading where clauses on type aliases

1. commit: refactor the AST of type alias where clauses
   * I could no longer bear the look of `.0.1` and `.1.0`
   * Arguably moving `split` out of `TyAlias` into a substruct might not make that much sense from a semantic standpoint since it reprs an index into `TyAlias.predicates` but it's alright and it cleans up the usage sites of `TyAlias`
2. commit: fix an oversight: An empty leading where clause is still a leading where clause
   * semantically reject empty leading where clauses on lazy type aliases
     * e.g., on `#![feature(lazy_type_alias)] type X where = ();`
   * make empty leading where clauses on assoc types trigger lint `deprecated_where_clause_location`
     * e.g., `impl Trait for () { type X where = (); }`
2024-02-29 20:50:02 +01:00
Trevor Gross 582ad492cd Remove doc aliases to PATH
Remove aliases for `split_paths` and `join_paths` as should have been
done in <https://github.com/rust-lang/rust/pull/119748> (Bors merged the
wrong commit).
2024-02-29 14:28:47 -05:00
bors 878c8a2a62 Auto merge of #118247 - spastorino:type-equality-subtyping, r=lcnr
change equate for binders to not rely on subtyping

*summary by `@spastorino` and `@lcnr*`

### Context

The following code:

```rust
type One = for<'a> fn(&'a (), &'a ());
type Two = for<'a, 'b> fn(&'a (), &'b ());

mod my_api {
    use std::any::Any;
    use std::marker::PhantomData;

    pub struct Foo<T: 'static> {
        a: &'static dyn Any,
        _p: PhantomData<*mut T>, // invariant, the type of the `dyn Any`
    }

    impl<T: 'static> Foo<T> {
        pub fn deref(&self) -> &'static T {
            match self.a.downcast_ref::<T>() {
                None => unsafe { std::hint::unreachable_unchecked() },
                Some(a) => a,
            }
        }

        pub fn new(a: T) -> Foo<T> {
           Foo::<T> {
                a: Box::leak(Box::new(a)),
                _p: PhantomData,
            }
        }
    }
}

use my_api::*;

fn main() {
    let foo = Foo::<One>::new((|_, _| ()) as One);
    foo.deref();
    let foo: Foo<Two> = foo;
    foo.deref();
}
```

has UB from hitting the `unreachable_unchecked`. This happens because `TypeId::of::<One>()` is not the same as `TypeId::of::<Two>()` despite them being considered the same types by the type checker.

Currently the type checker considers binders to be equal if subtyping succeeds in both directions: `for<'a> T<'a> eq for<'b> U<'b>` holds if `for<'a> exists<'b> T<'b> <: T'<a> AND for<'b> exists<'a> T<'a> <: T<'b>` holds. This results in `for<'a> fn(&'a (), &'a ())` and `for<'a, 'b> fn(&'a (), &'b ())` being equal in the type system.

`TypeId` is computed by looking at the *structure* of a type. Even though these types are semantically equal, they have a different *structure* resulting in them having different `TypeId`. This can break invariants of unsafe code at runtime and is unsound when happening at compile time, e.g. when using const generics.

So as seen in `main`, we can assign a value of type `Foo::<One>` to a binding of type `Foo<Two>` given those are considered the same type but then when we call `deref`, it calls `downcast_ref` that relies on `TypeId` and we would hit the `None` arm as these have different `TypeId`s.

As stated in https://github.com/rust-lang/rust/issues/97156#issuecomment-1879030033, this causes the API of existing crates to be unsound.

## What should we do about this

The same type resulting in different `TypeId`s  is a significant footgun, breaking a very reasonable assumptions by authors of unsafe code. It will also be unsound by itself once they are usable in generic contexts with const generics.

There are two options going forward here:
- change how the *structure* of a type is computed before relying on it. i.e. continue considering `for<'a> fn(&'a (), &'a ())` and `for<'a, 'b> fn(&'a (), &'b ())` to be equal, but normalize them to a common representation so that their `TypeId` are also the same.
- change how the semantic equality of binders to match the way we compute the structure of types. i.e. `for<'a> fn(&'a (), &'a ())` and `for<'a, 'b> fn(&'a (), &'b ())` still have different `TypeId`s but are now also considered to not be semantically equal.

---

Advantages of the first approach:
- with the second approach some higher ranked types stop being equal, even though they are subtypes of each other

General thoughts:
- changing the approach in the future will be breaking
    - going from first to second may break ordinary type checking, as types which were previously equal are now distinct
    - going from second to first may break coherence, because previously disjoint impls overlap as the used types are now equal
    - both of these are quite unlikely. This PR did not result in any crater failures, so this should not matter too much

Advantages of the second approach:
- the soundness of the first approach requires more non-local reasoning. We have to make sure that changes to subtyping do not cause the representative computation to diverge from semantic equality
    - e.g. we intend to consider higher ranked implied bounds when subtyping to [fix] https://github.com/rust-lang/rust/issues/25860, I don't know how this will interact and don't feel confident making any prediction here.
- computing a representative type is non-trivial and soundness critical, therefore adding complexity to the "core type system"

---

This PR goes with the second approach. A crater run did not result in any regressions. I am personally very hesitant about trying the first approach due to the above reasons. It feels like there are more unknowns when going that route.

### Changing the way we equate binders

Relating bound variables from different depths already results in a universe error in equate. We therefore only need to make sure that there is 1-to-1 correspondence between bound variables when relating binders. This results in concrete types being structurally equal after anonymizing their bound variables.

We implement this by instantiating one of the binder with placeholders and the other with inference variables and then equating the instantiated types. We do so in both directions.

More formally, we change the typing rules as follows:

```
for<'r0, .., 'rn> exists<'l0, .., 'ln> LHS<'l0, .., 'ln> <: RHS<'r0, .., 'rn>
for<'l0, .., 'ln> exists<'r0, .., 'rn> RHS<'r0, .., 'rn> <: LHS<'l0, .., 'ln>
--------------------------------------------------------------------------
for<'l0, .., 'ln> LHS<'l0, .., 'ln> eq for<'r0, .., 'rn> RHS<'r0, .., 'rn>
```

to
```
for<'r0, .., 'rn> exists<'l0, .., 'ln> LHS<'l0, .., 'ln> eq RHS<'r0, .., 'rn>
for<'l0, .., 'ln> exists<'r0, .., 'rn> RHS<'r0, .., 'rn> eq LHS<'l0, .., 'ln>
--------------------------------------------------------------------------
for<'l0, .., 'ln> LHS<'l0, .., 'ln> eq for<'r0, .., 'rn> RHS<'r0, .., 'rn>
```

---

Fixes #97156

r? `@lcnr`
2024-02-29 19:18:41 +00:00
Santiago Pastorino 4a2e3bc2b0
Change condition in binders to one that is more readable 2024-02-29 15:27:59 -03:00
Santiago Pastorino 0479287a38
Make nll higher ranked equate use bidirectional subtyping in invariant context 2024-02-29 15:27:59 -03:00
Santiago Pastorino 23ae3dbb31
Make infer higher ranked equate use bidirectional subtyping in invariant context 2024-02-29 15:27:56 -03:00
Ralf Jung 3ed175cc54 add const test for ptr::metadata 2024-02-29 18:48:04 +01:00
León Orell Valerian Liehr cce81289e6
Detect empty leading where-clauses on type aliases 2024-02-29 17:20:04 +01:00
León Orell Valerian Liehr 2b8060578a
AST: Refactor type alias where clauses 2024-02-29 17:18:40 +01:00
bors 1a1876c979 Auto merge of #121804 - GuillaumeGomez:rollup-jh0v3ex, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #119748 (Increase visibility of `join_path` and `split_paths`)
 - #120820 (Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics (in nightly) in Windows x64)
 - #121000 (pattern_analysis: rework how we hide empty private fields)
 - #121376 (Skip unnecessary comparison with half-open range patterns)
 - #121596 (Use volatile access instead of `#[used]` for `on_tls_callback`)
 - #121669 (Count stashed errors again)
 - #121783 (Emitter cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-29 16:10:05 +00:00
Guillaume Gomez 0e9f02d6fa
Rollup merge of #121783 - nnethercote:emitter-cleanups, r=oli-obk
Emitter cleanups

Some cleanups I made when reading emitter code. In particular, `HumanEmitter` and `JsonEmitter` have gone from three constructors to one.

r? `@oli-obk`
2024-02-29 17:08:38 +01:00
Guillaume Gomez a5945b5d8d
Rollup merge of #121669 - nnethercote:count-stashed-errs-again, r=estebank
Count stashed errors again

Stashed diagnostics are such a pain. Their "might be emitted, might not" semantics messes with lots of things.

#120828 and #121206 made some big changes to how they work, improving some things, but still leaving some problems, as seen by the issues caused by #121206. This PR aims to fix all of them by restricting them in a way that eliminates the "might be emitted, might not" semantics while still allowing 98% of their benefit. Details in the individual commit logs.

r? `@oli-obk`
2024-02-29 17:08:38 +01:00
Guillaume Gomez eea8ceed54
Rollup merge of #121596 - ChrisDenton:tls, r=joboet
Use volatile access instead of `#[used]` for `on_tls_callback`

The first commit adds a volatile load of `p_thread_callback` when registering a dtor so that the compiler knows if the callback is used or not. I don't believe the added volatile instruction is otherwise significant in the context. In my testing using the volatile load allowed the compiler to correctly reason about whether `on_tls_callback` is used or not, allowing it to be omitted entirely in some cases. Admittedly it usually is used due to `Thread` but that can be avoided (e.g. in DLLs or with custom entry points that avoid the offending APIs). Ideally this would be something the compiler could help a bit more with so we didn't have to use tricks like `#[used]` or volatile. But alas.

I also used this as an opportunity to clean up the `unused` lints which I don't think serve a purpose any more.

The second commit removes the volatile load of `_tls_used` with `#cfg[target_thread_local]` because `#[thread_local]` already implies it. And if it ever didn't then `#[thread_local]` would be broken when there aren't any dtors.
2024-02-29 17:08:37 +01:00
Guillaume Gomez 2e0a26a32a
Rollup merge of #121376 - Nadrieril:mir-half-ranges, r=pnkfelix
Skip unnecessary comparison with half-open range patterns

This is the last remaining detail in the implementation of half-open range patterns. Until now, a half-open range pattern like `10..` was converted to `10..T::MAX` before lowering to MIR, which generated an extra pointless comparison. With this PR we don't generate it.
2024-02-29 17:08:37 +01:00
Guillaume Gomez 9df7f26b1b
Rollup merge of #121000 - Nadrieril:keep_all_fields, r=compiler-errors
pattern_analysis: rework how we hide empty private fields

Consider this:
```rust
mod foo {
  pub struct Bar {
    pub a: bool,
    b: !,
  }
}

fn match_a_bar(bar: foo::Bar) -> bool {
  match bar {
    Bar { a, .. } => a,
  }
}
```

Because the field `b` is private, matches outside the module are not allowed to observe the fact that `Bar` is empty. In particular `match bar {}` is valid within the module `foo` but an error outside (assuming `exhaustive_patterns`).

We currently handle this by hiding the field `b` when it's both private and empty. This means that the pattern `Bar { a, .. }` is lowered to `Bar(a, _)` if we're inside of `foo` and to `Bar(a)` outside. This involves a bit of a dance to keep field indices straight. But most importantly this makes pattern lowering depend on the module.

In this PR, I instead do nothing special when lowering. Only during analysis do we track whether a place must be skipped.

r? `@compiler-errors`
2024-02-29 17:08:37 +01:00
Guillaume Gomez 36bd9ef5a8
Rollup merge of #120820 - CKingX:cpu-base-minimum, r=petrochenkov,ChrisDenton
Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics (in nightly) in Windows x64

As Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature. Windows 10 requires CMPXCHG16B, LAHF/SAHF, and PrefetchW as stated in the requirements [here](https://download.microsoft.com/download/c/1/5/c150e1ca-4a55-4a7e-94c5-bfc8c2e785c5/Windows%2010%20Minimum%20Hardware%20Requirements.pdf). Furthermore, CPUs that meet these requirements also have SSE3 ([see](https://walbourn.github.io/directxmath-sse3-and-ssse3/))
2024-02-29 17:08:36 +01:00
bors 384d26fc7e Auto merge of #121800 - GuillaumeGomez:rollup-wob2qcz, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #118217 (Document which methods on `f64` are precise)
 - #119748 (Increase visibility of `join_path` and `split_paths`)
 - #121412 (platform docs: clarify hexagon-unknown-none-elf example, add hexagon-unknown-linux-musl)
 - #121654 (Fix `async Fn` confirmation for `FnDef`/`FnPtr`/`Closure` types)
 - #121700 (CFI: Don't compress user-defined builtin types)
 - #121765 (add platform-specific function to get the error number for HermitOS)
 - #121781 (bootstrap/format: send larger batches to rustfmt)
 - #121788 (bootstrap: fix clap deprecated warnings)
 - #121792 (Improve renaming suggestion when item starts with underscore)
 - #121793 (Document which methods on `f32` are precise)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-29 13:35:16 +00:00
Guillaume Gomez bc23b84386
Rollup merge of #121793 - tbu-:pr_floating_point_32, r=Amanieu
Document which methods on `f32` are precise

Same as #118217 but for `f32`.
2024-02-29 14:33:53 +01:00
Guillaume Gomez 8a74df9c22
Rollup merge of #121792 - GuillaumeGomez:improve-suggestion, r=michaelwoerister
Improve renaming suggestion when item starts with underscore

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

It goes from:

```terminal
error[E0433]: failed to resolve: use of undeclared type `Foo`
 --> src/foo.rs:6:13
  |
6 |     let _ = Foo::Bar;
  |             ^^^ use of undeclared type `Foo`
  |
help: an enum with a similar name exists, consider changing it
  |
1 | enum Foo {
  |      ~~~
```

to:

```terminal
error[E0433]: failed to resolve: use of undeclared type `Foo`
 --> foo.rs:6:13
  |
6 |     let _ = Foo::Bar;
  |             ^^^ use of undeclared type `Foo`
  |
help: an enum with a similar name exists, consider renaming `_Foo` into `Foo`
  |
1 | enum Foo {
  |      ~~~

error: aborting due to 1 previous error
```
2024-02-29 14:33:53 +01:00
Guillaume Gomez 7147112c8c
Rollup merge of #121788 - klensy:clap-deprecated-fix, r=clubby789
bootstrap: fix clap deprecated warnings

Run 'cargo check --features clap/deprecated' and fix warnings
2024-02-29 14:33:52 +01:00
Guillaume Gomez b52b6997a3
Rollup merge of #121781 - RalfJung:bootstrap-fmt, r=clubby789
bootstrap/format: send larger batches to rustfmt

This helps on systems with low core counts. To benchmark this I made a lot of files be modified:
```
for FILE in $(find compiler/ -name "*.rs"); do echo "// end of the file" >>$FILE; done
```
Then I ran
```
hyperfine "./x.py fmt -j1" -w 1 -r 4
```
Before this patch:
```
Benchmark 1: ./x.py fmt -j1
  Time (mean ± σ):      3.426 s ±  0.032 s    [User: 4.681 s, System: 1.376 s]
  Range (min … max):    3.389 s …  3.462 s    4 runs
```
With this patch:
```
Benchmark 1: ./x.py fmt -j1
  Time (mean ± σ):      2.530 s ±  0.054 s    [User: 4.042 s, System: 0.467 s]
  Range (min … max):    2.452 s …  2.576 s    4 runs
```
2024-02-29 14:33:52 +01:00
Guillaume Gomez ad74598dbc
Rollup merge of #121765 - hermit-os:errno, r=ChrisDenton
add platform-specific function to get the error number for HermitOS

Extending `std` to get the last error number for HermitOS.

HermitOS is a tier 3 platform and this PR changes only files, wich are related to the tier 3 platform.
2024-02-29 14:33:51 +01:00
Guillaume Gomez b2c3279984
Rollup merge of #121700 - rcvalle:rust-cfi-dont-compress-user-defined-builtin-types, r=compiler-errors
CFI: Don't compress user-defined builtin types

Doesn't compress user-defined builtin types (see https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-builtin and https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-compression).
2024-02-29 14:33:51 +01:00
Guillaume Gomez 5978b6ff83
Rollup merge of #121654 - compiler-errors:async-fn-for-fn-def, r=oli-obk
Fix `async Fn` confirmation for `FnDef`/`FnPtr`/`Closure` types

Fixes three issues:
1. The code in `extract_tupled_inputs_and_output_from_async_callable` was accidentally getting the *future* type and the *output* type (returned by the future) messed up for fnptr/fndef/closure types. :/
2. We have a (class of) bug(s) in the old solver where we don't really support higher ranked built-in `Future` goals for generators. This is not possible to hit on stable code, but [can be hit with `unboxed_closures`](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=e935de7181e37e13515ad01720bcb899) (#121653).
    * I'm opting not to fix that in this PR. Instead, I just instantiate placeholders when confirming `async Fn` goals.
4. Fixed a bug when generating `FnPtr` shims for `async Fn` trait goals.

r? oli-obk
2024-02-29 14:33:50 +01:00
Guillaume Gomez 1ee54538a3
Rollup merge of #121412 - androm3da:bcain/update_hex_docs_03, r=Amanieu
platform docs: clarify hexagon-unknown-none-elf example, add hexagon-unknown-linux-musl
2024-02-29 14:33:50 +01:00
Guillaume Gomez 0c2cb39f95
Rollup merge of #118217 - tbu-:pr_floating_point, r=Amanieu
Document which methods on `f64` are precise
2024-02-29 14:33:49 +01:00
Aaron Chen fb81ee8bd7
Fix links in rustc doc 2024-02-29 21:03:49 +08:00
Tobias Bucher 7400f22d92 Document which methods on f32 are precise
Same as #118217 but for `f32`.
2024-02-29 12:38:21 +01:00
Guillaume Gomez 451fd98153 Update UI test checking suggestion message to rename type starting with underscore 2024-02-29 12:08:03 +01:00
Guillaume Gomez 3770cf7abf Improve suggestion to rename type starting with underscore to make it more obvious what is actually suggested 2024-02-29 12:07:41 +01:00