Commit Graph

252317 Commits

Author SHA1 Message Date
JeanCASPAR
e4f4e58dc3 Port build_reduce_graph 2024-04-13 14:50:25 +01:00
bors
7106800e16 Auto merge of #123656 - lqd:linker-features, r=petrochenkov
Linker flavors next steps: linker features

This is my understanding of the first step towards `@petrochenkov's` vision for the future of linker flavors, described in https://github.com/rust-lang/rust/pull/119906#issuecomment-1895693162 and the discussion that followed.

To summarize: having `Cc` and `Lld` embedded in linker flavors creates tension about naming, and a combinatorial explosion of flavors for each new linker feature we'd want to use. Linker features are an extension mechanism that is complementary to principal flavors, with benefits described in #119906.

The most immediate use of this flag would be to turn self-contained linking on and off via features instead of flavors. For example, `-Clinker-features=+/-lld` would toggle using lld instead of selecting a precise flavor, and would be "generic" and work cross-platform (whereas linker flavors are currently more tied to targets). Under this scheme, MCP510 is expected to be `-Clink-self-contained=+linker -Zlinker-features=+lld -Zunstable-options` (though for the time being, the original flags using lld-cc flavors still work).

I purposefully didn't add or document CLI support for `+/-cc`, as it would be a noop right now. I only expect that we'd initially want to stabilize `+/-lld` to begin with.

r? `@petrochenkov`

You had requested that minimal churn would be done to the 230 target specs and this does none yet: the linker features are inferred from the flavor since they're currently isomorphic. We of course expect this to change sooner rather than later.

In the future, we can allow targets to define linker features independently from their flavor, and remove the cc and lld components from the flavors to use the features instead, this actually doesn't need to block stabilization, as we discussed.

(Best reviewed per commit)
2024-04-13 11:10:01 +00:00
bors
6eaa7fb576 Auto merge of #122603 - estebank:clone-o-rama, r=lcnr
Detect borrow checker errors where `.clone()` would be an appropriate user action

When a value is moved twice, suggest cloning the earlier move:

```
error[E0509]: cannot move out of type `U2`, which implements the `Drop` trait
  --> $DIR/union-move.rs:49:18
   |
LL |         move_out(x.f1_nocopy);
   |                  ^^^^^^^^^^^
   |                  |
   |                  cannot move out of here
   |                  move occurs because `x.f1_nocopy` has type `ManuallyDrop<RefCell<i32>>`, which does not implement the `Copy` trait
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL |         move_out(x.f1_nocopy.clone());
   |                             ++++++++
```

When a value is borrowed by an `fn` call, consider if cloning the result of the call would be reasonable, and suggest cloning that, instead of the argument:

```
error[E0505]: cannot move out of `a` because it is borrowed
  --> $DIR/variance-issue-20533.rs:53:14
   |
LL |         let a = AffineU32(1);
   |             - binding `a` declared here
LL |         let x = bat(&a);
   |                     -- borrow of `a` occurs here
LL |         drop(a);
   |              ^ move out of `a` occurs here
LL |         drop(x);
   |              - borrow later used here
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL |         let x = bat(&a).clone();
   |                        ++++++++
```

otherwise, suggest cloning the argument:

```
error[E0505]: cannot move out of `a` because it is borrowed
  --> $DIR/variance-issue-20533.rs:59:14
   |
LL |         let a = ClonableAffineU32(1);
   |             - binding `a` declared here
LL |         let x = foo(&a);
   |                     -- borrow of `a` occurs here
LL |         drop(a);
   |              ^ move out of `a` occurs here
LL |         drop(x);
   |              - borrow later used here
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL -         let x = foo(&a);
LL +         let x = foo(a.clone());
   |
```

This suggestion doesn't attempt to square out the types between what's cloned and what the `fn` expects, to allow the user to make a determination on whether to change the `fn` call or `fn` definition themselves.

Special case move errors caused by `FnOnce`:

```
error[E0382]: use of moved value: `blk`
  --> $DIR/once-cant-call-twice-on-heap.rs:8:5
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |                    --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait
LL |     blk();
   |     ----- `blk` moved due to this call
LL |     blk();
   |     ^^^ value used here after move
   |
note: `FnOnce` closures can only be called once
  --> $DIR/once-cant-call-twice-on-heap.rs:6:10
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |          ^^^^^^^^ `F` is made to be an `FnOnce` closure here
LL |     blk();
   |     ----- this value implements `FnOnce`, which causes it to be moved when called
```

Account for redundant `.clone()` calls in resulting suggestions:

```
error[E0507]: cannot move out of dereference of `S`
  --> $DIR/needs-clone-through-deref.rs:15:18
   |
LL |         for _ in self.clone().into_iter() {}
   |                  ^^^^^^^^^^^^ ----------- value moved due to this method call
   |                  |
   |                  move occurs because value has type `Vec<usize>`, which does not implement the `Copy` trait
   |
note: `into_iter` takes ownership of the receiver `self`, which moves value
  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
   |
LL |         for _ in <Vec<usize> as Clone>::clone(&self).into_iter() {}
   |                  ++++++++++++++++++++++++++++++    ~
```

We use the presence of `&mut` values in a move error as a proxy for the user caring about side effects, so we don't emit a clone suggestion in that case:

```
error[E0505]: cannot move out of `s` because it is borrowed
  --> $DIR/borrowck-overloaded-index-move-index.rs:53:7
   |
LL |     let mut s = "hello".to_string();
   |         ----- binding `s` declared here
LL |     let rs = &mut s;
   |              ------ borrow of `s` occurs here
...
LL |     f[s] = 10;
   |       ^ move out of `s` occurs here
...
LL |     use_mut(rs);
   |             -- borrow later used here
```

We properly account for `foo += foo;` errors where we *don't* suggest `foo.clone() += foo;`, instead suggesting `foo += foo.clone();`.

---

Each commit can be reviewed in isolation. There are some "cleanup" commits, but kept them separate in order to show *why* specific changes were being made, and their effect on tests' output.

Fix #49693, CC #64167.
2024-04-13 09:07:26 +00:00
bors
f96442b448 Auto merge of #123257 - ChrisDenton:enable-tls, r=fmease
Re-enable `has_thread_local` for i686-msvc

A few years back, `has_thread_local` was disabled as a workaround for a compiler issue. While the exact cause was never tracked down, it was suspected to be caused by the compiler inlining a thread local access across a dylib boundary. This should be fixed now so let's try again.
2024-04-13 07:03:01 +00:00
bors
59c38c0604 Auto merge of #123884 - jhpratt:rollup-1kwk0jz, r=jhpratt
Rollup of 4 pull requests

Successful merges:

 - #123835 (Avoid more NonNull-raw-NonNull roundtrips in Vec)
 - #123868 (Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull)
 - #123872 (Fix Pietro's entry in the mailmap)
 - #123873 (Merge cuviper in the mailmap)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-13 05:00:13 +00:00
Jacob Pratt
1a75ce07f4
Rollup merge of #123873 - cuviper:mailmap, r=lqd
Merge cuviper in the mailmap

These emails are associated with my GitHub account already, but I might as well
combine my activity for stuff like the Thanks page too.
2024-04-13 00:18:47 -04:00
Jacob Pratt
79df0cfe72
Rollup merge of #123872 - tgross35:fix-mailmap, r=lqd
Fix Pietro's entry in the mailmap

Mailmap only allows one remapping per line, so `@pietroalbini` wasn't getting grouped correctly. Fix this.
2024-04-13 00:18:47 -04:00
Jacob Pratt
0518ecc700
Rollup merge of #123868 - eduardosm:stabilize-slice_ptr_len, r=jhpratt
Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull

Stabilized API:

```rust
impl<T> *mut [T] {
    pub const fn len(self) -> usize;
    pub const fn is_empty(self) -> bool;
}

impl<T> *const [T] {
    pub const fn len(self) -> usize;
    pub const fn is_empty(self) -> bool;
}

impl<T> NonNull<[T]> {
    pub const fn is_empty(self) -> bool;
}
```

FCP completed in tracking issue: https://github.com/rust-lang/rust/issues/71146
2024-04-13 00:18:46 -04:00
Jacob Pratt
8533144f97
Rollup merge of #123835 - saethlin:vec-from-nonnull, r=the8472
Avoid more NonNull-raw-NonNull roundtrips in Vec

r? the8472

The standard library in general has a lot of these round-trips from niched types to their raw innards and back. Such round-trips have overhead in debug builds since https://github.com/rust-lang/rust/pull/120594. I removed some such round-trips in that initial PR and I've been meaning to come back and hunt down more such examples (this is the last item on https://github.com/rust-lang/rust/issues/120848).
2024-04-13 00:18:46 -04:00
bors
6cfd80942e Auto merge of #123874 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in 74fd5bc730b828dbc956335b229ac34ba47f7ef7..48eca1b164695022295ce466b64b44e4e0228b08
2024-04-10 18:40:49 +0000 to 2024-04-12 21:16:36 +0000
- test: Remove add/remove death tests (rust-lang/cargo#13750)
- feat(resolve): Fallback to 'rustc -V' for MSRV resolving (rust-lang/cargo#13743)
- feat(cli): Add --ignore-rust-version to update/generate-lockfile (rust-lang/cargo#13742)
- `cargo package -p no-exist` emitt  error when the -p `package` not found (rust-lang/cargo#13735)
- fix(help): Generalize --ignore-rust-version (rust-lang/cargo#13741)
- test: don't compress test registry crates (rust-lang/cargo#13744)
- feat(reslve): Respect '--ignore-rust-version' (rust-lang/cargo#13738)
- refactor: Remove `rust_2024_compatibility` lint group (rust-lang/cargo#13740)

r? ghost
2024-04-13 02:56:34 +00:00
Weihang Lo
62e98555fb
Update cargo 2024-04-12 18:32:40 -04:00
bors
9782770a81 Auto merge of #121430 - madsmtm:mac-catalyst-iOSSupport, r=wesleywiser
Add `/System/iOSSupport` to the library search path on Mac Catalyst

On macOS, `/System/iOSSupport` contains iOS frameworks like UIKit, which is the whole idea of Mac Catalyst.

To link to these, we need to explicitly tell the linker about the support library stubs provided in the macOS SDK under the same path.

Concretely, when building a binary for Mac Catalyst, Xcode passes the following flags to the linker:
```
-iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/iOSSupport/System/Library/Frameworks
-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/iOSSupport/usr/lib
```

This is not something that can be disabled (it's enabled as soon as you enable `SUPPORTS_MACCATALYST`), so I think it's pretty safe to say that we don't need an option to turn these off.

I've chosen to slightly deviate from what Xcode does and use `-F` instead of `-iframework`, since we don't need to change the header search path, and this way the flags nicely match on all the linkers. From what I could tell by reading Clang sources, there shouldn't be a difference when just running the linker.

CC `@BlackHoleFox,` `@shepmaster` (I accidentally let rustbot choose the reviewer).
2024-04-12 22:27:33 +00:00
Ben Kimock
f7d54fa6cb Avoid more NonNull-raw-NonNull roundtrips in Vec 2024-04-12 18:14:29 -04:00
Josh Stone
a7201db04b
Merge cuviper in the mailmap 2024-04-12 14:55:36 -07:00
Trevor Gross
ca0939db04 Fix Pietro's entry in the mailmap
Mailmap only allows one remapping per line, so @pietroalbini wasn't
getting grouped correctly. Fix this.
2024-04-12 17:36:00 -04:00
Esteban Küber
4c7213c888 review comments
Added comments and reworded messages
2024-04-12 20:57:07 +00:00
bors
79424056b0 Auto merge of #123869 - matthiaskrgr:rollup-9kif9c9, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #123654 (typeck: fix `?` suggestion span)
 - #123807 (Remove `sys_common::thread`)
 - #123834 (Don't do coroutine-closure-specific upvar analysis if tainted by errors)
 - #123847 (Suppress `let else` suggestion for uninitialized refutable `let`s)
 - #123857 (std::net: TcpListener shrinks the backlog argument to 32 for Haiku.)
 - #123858 (zkvm: fix path to cmath in zkvm module)
 - #123867 (Add `unsafe` to two functions with safety invariants)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-12 20:23:30 +00:00
Matthias Krüger
3026204e84
Rollup merge of #123867 - eduardosm:unsafe-fns, r=ChrisDenton
Add `unsafe` to two functions with safety invariants
2024-04-12 21:47:00 +02:00
Matthias Krüger
b5c3db162e
Rollup merge of #123858 - marijanp:fix-zkvm-cmath-path, r=joboet
zkvm: fix path to cmath in zkvm module

I don't know why the original author decided to use relative paths.

I think it would be better to use `use crate::sys::cmath;`

The according issue can be found here https://github.com/risc0/risc0/issues/1647
2024-04-12 21:47:00 +02:00
Matthias Krüger
fa4c219d91
Rollup merge of #123857 - devnexen:tcp_listener_update_backlog, r=ChrisDenton
std::net: TcpListener shrinks the backlog argument to 32 for Haiku.
2024-04-12 21:46:59 +02:00
Matthias Krüger
e4c8672571
Rollup merge of #123847 - eggyal:issue-123844, r=fmease
Suppress `let else` suggestion for uninitialized refutable `let`s

Fixes #123844

r? `@CAD97`
2024-04-12 21:46:59 +02:00
Matthias Krüger
1524fe04ad
Rollup merge of #123834 - compiler-errors:async-closure-with-tainted-body, r=oli-obk
Don't do coroutine-closure-specific upvar analysis if tainted by errors

See the comment

Fixes #123821
Fixes #123818
2024-04-12 21:46:58 +02:00
Matthias Krüger
595a284872
Rollup merge of #123807 - joboet:sys_common_thread, r=jhpratt
Remove `sys_common::thread`

Part of #117276.

The stack size calculation isn't system-specific at all and can just live together with the rest of the spawn logic.
2024-04-12 21:46:58 +02:00
Matthias Krüger
ca28e9554f
Rollup merge of #123654 - jieyouxu:question-mark-span, r=Nadrieril
typeck: fix `?` suggestion span

Noticed in <https://github.com/rust-lang/rust/pull/112043#issuecomment-2043565292>, if the

```
use the `?` operator to extract the `Result<(), std::fmt::Error>` value, propagating a `Result::Err` value to the caller
```

suggestion is applied to a macro that comes from a non-local crate (e.g. the stdlib), the suggestion span can become non-local, which will cause newer rustfix versions to fail.

This PR tries to remedy the problem by recursively probing ancestors of the expression span, trying to identify the most ancestor span that is (1) still local, and (2) still shares the same syntax context as the expression.

This is the same strategy used in https://github.com/rust-lang/rust/pull/112043.

The test unfortunately cannot `//@ run-rustfix` because there are two conflicting MaybeIncorrect suggestions that when collectively applied, cause the fixed source file to become non-compilable.

Also avoid running `//@ run-rustfix` for `tests/ui/typeck/issue-112007-leaked-writeln-macro-internals.rs` because that also contains conflicting suggestions.

cc `@ehuss` who noticed this. This question mark span fix + not running rustfix on the tests containing conflicting MaybeIncorrect suggestions should hopefully unblock rustfix from updating.
2024-04-12 21:46:57 +02:00
Eduardo Sánchez Muñoz
fb9e1f73b3 Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull 2024-04-12 21:23:20 +02:00
Eduardo Sánchez Muñoz
a6ed319e1b Add unsafe to two functions with safety invariants 2024-04-12 21:13:44 +02:00
bors
22a2425c10 Auto merge of #121426 - madsmtm:remove-cc-syslibroot, r=pnkfelix
Remove redundant `-Wl,-syslibroot`

Since `-isysroot` is set, [Clang already passes this when invoking the linker](https://github.com/llvm/llvm-project/blob/llvmorg-17.0.6/clang/lib/Driver/ToolChains/Darwin.cpp#L439-L442).

See https://github.com/rust-lang/rust/pull/56833 for when the `-isysroot` was originally added, but didn't remove the unnecessary linker flag.

CC `@BlackHoleFox`
r? shepmaster
2024-04-12 18:16:47 +00:00
Alan Egerton
ddcfb94b84
Suppress erroneous suggestion
The suggestion to use `let else` with an uninitialized refutable `let`
statement was erroneous: `let else` cannot be used with deferred
initialization.
2024-04-12 17:45:15 +01:00
Marijan Petričević
861e213f87
zkvm: remove cmath
- Remove cmath from zkvm module since cmath was moved to sys and is
shared by all platforms (see #120109)
2024-04-12 11:30:12 -05:00
bors
322e92bdae Auto merge of #123856 - matthiaskrgr:rollup-4v8rkfj, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #123204 (rustdoc: point at span in `include_str!`-ed md file)
 - #123223 (Fix invalid silencing of parsing error)
 - #123249 (do not add prolog for variadic naked functions)
 - #123825 (Call the panic hook for non-unwind panics in proc-macros)
 - #123833 (Update stdarch submodule)
 - #123841 (Improve diagnostic by suggesting to remove visibility qualifier)
 - #123849 (Update E0384.md)
 - #123852 (fix typo in library/std/src/lib.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-12 16:14:41 +00:00
Michael Goulet
49e73c3e01 Don't do coroutine-closure-specific upvar analysis if tainted by errors 2024-04-12 12:14:29 -04:00
David Carlier
1ce559b690
std::net: TcpListener shrinks the backlog argument to 32 for Haiku. 2024-04-12 16:55:10 +01:00
Matthias Krüger
4393eab9ea
Rollup merge of #123852 - kamaboko123:fix_typo_in_std_lib_rs, r=lqd
fix typo in library/std/src/lib.rs

I found typo in literal.
I got an error by this typo when build std.

```
salacia@Vega:~/fat12rs$ cargo build -Zbuild-std
   Compiling compiler_builtins v0.1.108
   Compiling core v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.153
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
   Compiling rustc-std-workspace-core v1.99.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
   Compiling cfg-if v1.0.0
   Compiling unwind v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind)
   Compiling adler v1.0.2
   Compiling rustc-demangle v0.1.23
   Compiling rustc-std-workspace-alloc v1.99.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
   Compiling gimli v0.28.1
   Compiling object v0.32.2
   Compiling addr2line v0.21.0
   Compiling miniz_oxide v0.7.2
   Compiling std_detect v0.1.5 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.14.3
   Compiling panic_abort v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)
   Compiling panic_unwind v0.0.0 (/home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_unwind)
error: expected `,`, found `.`
   --> /home/salacia/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs:224:78
    |
224 |             `#![no_std]` or overriding this warning by enabling this feature".
    |                                                                              ^ expected `,`

error: could not compile `std` (lib) due to 1 previous error
:224:78
    |
224 |             `#![no_std]` or overriding this warning by enabling this feature".
    |                                                                              ^ expected `,`

error: could not compile `std` (lib) due to 1 previous error
```
2024-04-12 17:41:36 +02:00
Matthias Krüger
38283bc295
Rollup merge of #123849 - JimmyOhn:first_contribution, r=pnkfelix
Update E0384.md

Add an example for the shadowing usage.
2024-04-12 17:41:35 +02:00
Matthias Krüger
15a8b490ea
Rollup merge of #123841 - Kohei316:remove_qualifier_sugg, r=wesleywiser
Improve diagnostic by suggesting to remove visibility qualifier

Resolves #123529
This PR improve diagnostic by suggesting to remove visibility qualifier.
2024-04-12 17:41:35 +02:00
Matthias Krüger
be3ea1dfb0
Rollup merge of #123833 - dpaoliello:stdarch, r=Amanieu
Update stdarch submodule

`asm_experimental_arch` is required in `core` as we're now using unstable inline assembly when building Arm64EC.

Brings in the fix for <https://github.com/rust-lang/stdarch/issues/1555> (cc `@tslnc04).`

r? `@Amanieu`
2024-04-12 17:41:34 +02:00
Matthias Krüger
8c8692014b
Rollup merge of #123825 - saethlin:report-nounwind-panics, r=petrochenkov
Call the panic hook for non-unwind panics in proc-macros

As I suggested in https://github.com/rust-lang/rust/issues/123286#issuecomment-2030344815.

If a proc macro causes a non-unwinding panic, `proc_macro` isn't able to catch the unwind and report the panic as a compile error by passing control back to the compiler. Our only chance to produce any diagnostic is the panic hook, so we should call it.

This scenario has already existed, but has become a lot more interesting now that we're adding more UB-detecting panics to the standard library, and such panics do not unwind.
2024-04-12 17:41:34 +02:00
Matthias Krüger
4a0e9e0deb
Rollup merge of #123249 - goolmoos:naked_variadics, r=pnkfelix
do not add prolog for variadic naked functions

fixes #99858
2024-04-12 17:41:33 +02:00
Matthias Krüger
68359e2284
Rollup merge of #123223 - estebank:issue-123079, r=pnkfelix
Fix invalid silencing of parsing error

Given

```rust
macro_rules! a {
    ( ) => {
        impl<'b> c for d {
            e::<f'g>
        }
    };
}
```

ensure an error is emitted.

Fix #123079.
2024-04-12 17:41:33 +02:00
Matthias Krüger
ffea7e2a9b
Rollup merge of #123204 - notriddle:notriddle/include-str-span, r=pnkfelix
rustdoc: point at span in `include_str!`-ed md file

Fixes #118549
2024-04-12 17:41:32 +02:00
Jimmy Ohn
0b5653f098 Update compiler/rustc_error_codes/src/error_codes/E0384.md
Add an example for the shadowing usage.
2024-04-12 22:43:38 +09:00
bors
bd71213cf0 Auto merge of #123846 - matthiaskrgr:rollup-85y28av, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #123796 (Remove unused cargo-platform dependency from tidy)
 - #123830 (Remove `From` impls for unstable types that break inference)
 - #123842 (fix typo in pin.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-12 13:13:50 +00:00
kamaboko123
47c3ffa5d4 fix typo in library/std/src/lib.rs 2024-04-12 22:02:08 +09:00
Guy Shefy
9139d7252d do not add prolog for variadic naked functions
fixes #99858
2024-04-12 15:29:39 +03:00
Matthias Krüger
e256d5f2ee
Rollup merge of #123842 - ShockYoungCHN:master, r=scottmcm
fix typo in pin.rs

correct "implemts" to "implements".
2024-04-12 13:35:31 +02:00
Matthias Krüger
bcf24d6467
Rollup merge of #123830 - tgross35:f16-f128-from-inference-fix, r=Nilstrieb
Remove `From` impls for unstable types that break inference

Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now.

I added a test to make sure this doesn't quietly change in the future, even though the behavior is not technically guaranteed https://github.com/rust-lang/rust/issues/123824#issuecomment-2050628184

Fixes: <https://github.com/rust-lang/rust/issues/123824>
2024-04-12 13:35:30 +02:00
Matthias Krüger
b467eddf64
Rollup merge of #123796 - bjorn3:remove_cargo_platform, r=clubby789
Remove unused cargo-platform dependency from tidy

Noticed in https://github.com/rust-lang/rust/pull/123788#issuecomment-2049806519
2024-04-12 13:35:30 +02:00
bors
7bdae134cb Auto merge of #123783 - tgross35:f16-f128-debug-impl, r=Amanieu
Add a `Debug` impl and some basic functions to `f16` and `f128`

`compiler_builtins` uses some convenience functions like `is_nan` and `is_sign_positive`. Add these, as well as a temporary implementation for `Debug` that prints the bit representation.
2024-04-12 11:11:50 +00:00
Rémy Rakic
dee834b8a6 test duplicate features, that the last +/-lld on the CLI wins 2024-04-12 09:46:38 +00:00
Rémy Rakic
317d0bdd63 document -Zlinker-features in the unstable book 2024-04-12 09:46:38 +00:00