Commit Graph

303456 Commits

Author SHA1 Message Date
Jakub Beránek
029304e4a6 Add codegen check tests 2025-07-02 09:13:44 +02:00
Jakub Beránek
a7c625146e Add compiletest check tests 2025-07-02 09:12:37 +02:00
Jakub Beránek
4dfa59dcfb Add snapshot tests for checking compiler, library and rustc tools 2025-07-02 09:10:39 +02:00
Jakub Beránek
3c391a6394 Automatically derive stage in step metadata where possible 2025-07-02 09:02:48 +02:00
Ralf Jung
0d43e2fe2b Merge pull request #4406 from Stypox/tracing
Add tracing_chrome under "tracing" feature
2025-07-02 06:55:58 +00:00
Ralf Jung
0234984e27 Merge pull request #4436 from rust-lang/rustup-2025-07-02
Automatic Rustup
2025-07-02 06:37:56 +00:00
Ralf Jung
d2f2271ccd rename show_error -> fatal_error 2025-07-02 08:31:21 +02:00
Stypox
28900b0ee2 Add tracing feature to enable tracing_chrome support 2025-07-02 08:29:13 +02:00
Trevor Gross
be35d37d8b Use the compiler to determine whether or not to enable f16 and f128
Currently we whether or not to build and test `f16` and `f128` support
mostly based on the target triple. This isn't always accurate, however,
since support also varies by backend and the backend version.

Since recently, `rustc` is aware of this with the unstable config option
`target_has_reliable_{f16,f128}`, which better represents when the types
are actually expected to be available and usable. Switch our
compiler-builtins and libm configuration to use this by probing `rustc`
for the target's settings.

A few small `cfg` fixes are needed with this.
2025-07-02 01:18:54 -05:00
Laurențiu Nicola
42e9a9f418 Merge pull request #20137 from Hmikihiro/migrate-wrap_unwrap_cfg_attr-assist-to-syntaxeditor
Migrate `wrap_unwrap_cfg_attr` Assist to use `SyntaxEditor`
2025-07-02 05:24:36 +00:00
The Miri Cronjob Bot
af5f4be160 Merge from rustc 2025-07-02 05:05:02 +00:00
The Miri Cronjob Bot
9d9f0e0455 Preparing for merge from rustc 2025-07-02 04:57:05 +00:00
Jieyou Xu
0346895e26 Rename {HeadersCache, iter_header} -> {DirectivesCache, iter_directives} for self-consistency 2025-07-02 12:08:00 +08:00
Jieyou Xu
475f447f12 Update compiletest to use "directive" terminology consistently 2025-07-02 12:08:00 +08:00
Jieyou Xu
cf5788d30d Rename header -> directives
compiletest has confusingly two terminology to refer to the same concept
-- "headers" and "directives". To make this more self-consistent and
less confusing, stick with "directives" only.

This commit **intentionally** tries to be limited to move-only (modulo
some key usage reference renames) to help git history.
2025-07-02 12:07:57 +08:00
Karan Janthe
5773d38c7a fix: Fix TypePrintFn flag passing for autodiff codegen
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-07-02 02:55:21 +00:00
bors
f51c9870ba Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum
Update stage0 to 1.89.0-beta.1

- Update version placeholders
- Update stage0 to 1.89.0-beta.1
- Update `STAGE0_MISSING_TARGETS`
- Update `cfg(bootstrap)`

r? `@Mark-Simulacrum`

try-job: dist-i586-gnu-i586-i686-musl
2025-07-02 01:41:18 +00:00
Michael Goulet
91c53c97a9 Consider polarity in sizedness fast path 2025-07-02 00:37:40 +00:00
Michael Goulet
d3c0ef0c9f Use is_trivially_wf for ProvePredicate fast path 2025-07-02 00:33:06 +00:00
Michael Goulet
ae0bef778a Remove fast path from codegen_select, since Sized has no methods 2025-07-02 00:33:06 +00:00
Antoni Boucher
3021598bdf Specify the linker when building the test project in m68k CI 2025-07-01 19:51:59 -04:00
Antoni Boucher
fec79b86a2 Add missing space before --target-triple 2025-07-01 19:35:39 -04:00
Antoni Boucher
cf509d87d9 Add missing --target-triple flags in m68k CI 2025-07-01 19:29:07 -04:00
Antoni Boucher
89f0cb3bfc Specify linker in m68k CI 2025-07-01 19:10:45 -04:00
Antoni Boucher
1bbe5946f2 Fix installation of libgccjit for m68k 2025-07-01 18:50:39 -04:00
Samuel Tardieu
ebdbd7cfc0 doc_nested_refdefs: do not falsely report checkboxes as refdefs (#15146)
changelog: [`doc_nested_refdefs`]: fix false positive where [task
lists](http://pulldown-cmark.github.io/pulldown-cmark/third_party/gfm_tasklist.html)
are reported as refdefs
2025-07-01 22:31:15 +00:00
Antoni Boucher
1d2b874b84 Remove OVERWRITE_TARGET_TRIPLE env var now that config.sh is gone 2025-07-01 18:29:17 -04:00
Samuel Tardieu
fc3d5e6827 Remove unneeded .as_bytes()
`&str` already implements `AsRef<[u8]>`
2025-07-02 00:25:37 +02:00
bors
a51c494d20 Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk
Remove support for `dyn*` from the compiler

This PR removes support for `dyn*` (https://github.com/rust-lang/rust/issues/102425), which are a currently un-RFC'd experiment that was opened a few years ago to explore a component that we thought was necessary for AFIDT (async fn in dyn trait).

It doesn't seem like we are going to need `dyn*` types -- even in an not-exposed-to-the-user way[^1] -- for us to implement AFIDT. Given that AFIDT was the original motivating purpose of `dyn*` types, I don't really see a compelling reason to have to maintain their implementation in the compiler.

[^1]: Compared to, e.g., generators whih are an unstable building block we use to implement stable syntax like `async {}`.

We've learned quite a lot from `dyn*`, but I think at this point its current behavior leads to more questions than answers. For example, `dyn*` support today remains somewhat fragile; it ICEs in many cases where the current "normal" `dyn Trait` types rely on their unsizedness for their vtable-based implementation to be sound I wouldn't be surprised if it's unsound in other ways, though I didn't play around with it too much. See the examples below.

```rust
#![feature(dyn_star)]

trait Foo {
    fn hello(self);
}

impl Foo for usize {
    fn hello(self) {
        println!("hello, world");
    }
}

fn main() {
    let x: dyn* Foo = 1usize;
    x.hello();
}
```

And:

```rust
#![feature(dyn_star)]

trait Trait {
    type Out where Self: Sized;
}

fn main() {
    let x: <dyn* Trait as Trait>::Out;
}
```

...and probably many more problems having to do with the intersection of dyn-compatibility and `Self: Sized` bounds that I was too lazy to look into like:
* GATs
* Methods with invalid signatures
* Associated consts

Generally, `dyn*` types also end up getting in the way of working with [normal `dyn` types](https://github.com/rust-lang/rust/issues/102425#issuecomment-1712604409) to an extent that IMO outweighs the benefit of experimentation.

I recognize that there are probably other, more creative usages of `dyn*` that are orthogonal to AFIDT. However, I think any work along those lines should first have to think through some of the more fundamental interactions between `dyn*` and dyn-compatibility before we think about reimplementing them in the type system.

---

I'm planning on removing the `DynKind` enum and the `PointerLike` built-in trait from the compiler after this PR lands.

Closes rust-lang/rust#102425.

cc `@eholk` `@rust-lang/lang` `@rust-lang/types`

Closes rust-lang/rust#116979.
Closes rust-lang/rust#119694.
Closes rust-lang/rust#134591.
Closes rust-lang/rust#104800.
2025-07-01 21:50:21 +00:00
bors
085c24790e Auto merge of #143036 - compiler-errors:no-dyn-star, r=oli-obk
Remove support for `dyn*` from the compiler

This PR removes support for `dyn*` (https://github.com/rust-lang/rust/issues/102425), which are a currently un-RFC'd experiment that was opened a few years ago to explore a component that we thought was necessary for AFIDT (async fn in dyn trait).

It doesn't seem like we are going to need `dyn*` types -- even in an not-exposed-to-the-user way[^1] -- for us to implement AFIDT. Given that AFIDT was the original motivating purpose of `dyn*` types, I don't really see a compelling reason to have to maintain their implementation in the compiler.

[^1]: Compared to, e.g., generators whih are an unstable building block we use to implement stable syntax like `async {}`.

We've learned quite a lot from `dyn*`, but I think at this point its current behavior leads to more questions than answers. For example, `dyn*` support today remains somewhat fragile; it ICEs in many cases where the current "normal" `dyn Trait` types rely on their unsizedness for their vtable-based implementation to be sound I wouldn't be surprised if it's unsound in other ways, though I didn't play around with it too much. See the examples below.

```rust
#![feature(dyn_star)]

trait Foo {
    fn hello(self);
}

impl Foo for usize {
    fn hello(self) {
        println!("hello, world");
    }
}

fn main() {
    let x: dyn* Foo = 1usize;
    x.hello();
}
```

And:

```rust
#![feature(dyn_star)]

trait Trait {
    type Out where Self: Sized;
}

fn main() {
    let x: <dyn* Trait as Trait>::Out;
}
```

...and probably many more problems having to do with the intersection of dyn-compatibility and `Self: Sized` bounds that I was too lazy to look into like:
* GATs
* Methods with invalid signatures
* Associated consts

Generally, `dyn*` types also end up getting in the way of working with [normal `dyn` types](https://github.com/rust-lang/rust/issues/102425#issuecomment-1712604409) to an extent that IMO outweighs the benefit of experimentation.

I recognize that there are probably other, more creative usages of `dyn*` that are orthogonal to AFIDT. However, I think any work along those lines should first have to think through some of the more fundamental interactions between `dyn*` and dyn-compatibility before we think about reimplementing them in the type system.

---

I'm planning on removing the `DynKind` enum and the `PointerLike` built-in trait from the compiler after this PR lands.

Closes rust-lang/rust#102425.

cc `@eholk` `@rust-lang/lang` `@rust-lang/types`

Closes rust-lang/rust#116979.
Closes rust-lang/rust#119694.
Closes rust-lang/rust#134591.
Closes rust-lang/rust#104800.
2025-07-01 21:50:21 +00:00
Esteban Küber
bb74f47327 Do not suggest borrow that is already there in fully-qualified call
When encountering `&str::from("value")` do not suggest `&&str::from("value")`.

Fix #132041.
2025-07-01 21:49:56 +00:00
Pavel Grigorenko
8bb7fdb236 NoArgsAttributeParser: use an assoc const instead 2025-07-02 00:21:12 +03:00
Chris Denton
62949cd2d6 Rename mingw-* CI jobs to pr-* 2025-07-01 20:25:56 +00:00
Samuel Tardieu
ad15b60022 Fix std-instead-of-core FP when not all items come from the new crate (#15165)
Closes rust-lang/rust-clippy#15143

Covering edge cases missed in rust-lang/rust-clippy#15016

changelog: [`std-instead-of-core`] fix FP when not all items come from
the new crate
2025-07-01 19:06:03 +00:00
Michael Goulet
eeaa63f39a Remove support for dyn* 2025-07-01 19:00:21 +00:00
Michael Goulet
2516c33982 Remove support for dyn* 2025-07-01 19:00:21 +00:00
Kivooeo
1fb5e0149f moved tests 2025-07-01 23:33:59 +05:00
Nurzhan Saken
79ed7c1f41 Test upper overflow in strict_sub_signed
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2025-07-01 22:32:19 +04:00
bors
71e4c005ca Auto merge of #143287 - GuillaumeGomez:rollup-fdjcti9, r=GuillaumeGomez
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#136801 (Implement `Random` for tuple)
 - rust-lang/rust#141867 (Describe Future invariants more precisely)
 - rust-lang/rust#142760 (docs(fs): Touch up grammar on lock api)
 - rust-lang/rust#143181 (Improve testing and error messages for malformed attributes)
 - rust-lang/rust#143210 (`tests/ui`: A New Order [19/N] )
 - rust-lang/rust#143212 (`tests/ui`: A New Order [20/N])
 - rust-lang/rust#143230 ([COMPILETEST-UNTANGLE 2/N] Make some compiletest errors/warnings/help more visually obvious)
 - rust-lang/rust#143240 (Port `#[rustc_object_lifetime_default]` to the new attribute parsing …)
 - rust-lang/rust#143255 (Do not enable LLD by default in the dist profile)
 - rust-lang/rust#143262 (mir: Mark `Statement` and `BasicBlockData` as `#[non_exhaustive]`)
 - rust-lang/rust#143269 (bootstrap: make comment more clear)
 - rust-lang/rust#143279 (Remove `ItemKind::descr` method)

Failed merges:

 - rust-lang/rust#143237 (Port `#[no_implicit_prelude]` to the new attribute parsing infrastructure)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-01 18:09:52 +00:00
Josh Stone
5b073e5ba6 Ignore float_minimum_maximum doctests on i586 2025-07-01 10:55:49 -07:00
Josh Stone
e851e3e16e Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
Ralf Jung
8797d54812 make Box::into_raw compatible with Stacked Borrows again 2025-07-01 19:54:38 +02:00
Josh Stone
a58050b753 Update STAGE0_MISSING_TARGETS 2025-07-01 10:54:33 -07:00
Josh Stone
47a3bf36bc Update stage0 to 1.89.0-beta.1 2025-07-01 10:54:33 -07:00
Josh Stone
9ce8930da6 Update version placeholders 2025-07-01 10:54:33 -07:00
Kivooeo
e9191ec57e moved tests 2025-07-01 21:42:20 +05:00
Amanieu d'Antras
15bd619d5f Change {Box,Arc,Rc,Weak}::into_raw to only work with A = Global
Also applies to `Vec::into_raw_parts`.

The expectation is that you can round-trip these methods with
`from_raw`, but this is only true when using the global allocator. With
custom allocators you should instead be using
`into_raw_with_allocator` and `from_raw_in`.

The implementation of `Box::leak` is changed to use
`Box::into_raw_with_allocator` and explicitly leak the allocator (which
was already the existing behavior). This is because, for `leak` to be
safe, the allocator must not free its underlying backing store. The
`Allocator` trait only guarantees that allocated memory remains valid
until the allocator is dropped.
2025-07-01 18:25:30 +02:00
Hayashi Mikihiro
6f1369b771 Migrate wrap_unwrap_cfg_attr assist to use SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-02 01:18:22 +09:00
Eric Huss
cda9bfef6f Fix x clean with a fifo
`x clean` was failing when it encountered a special file like a fifo
because it thought it was a directory.
2025-07-01 09:14:18 -07:00
Guillaume Gomez
189bfc1e63 Rollup merge of #143279 - GuillaumeGomez:rm-itemkind-descr, r=oli-obk
Remove `ItemKind::descr` method

Follow-up of rust-lang/rust#143234.

After this PR is merged, it will remain two `descr` methods:

 * `hir::GenericArg::descr`
 * `hir::AssocItemConstraintKind::descr`

For both these enums, I don't think there is the right equivalent in `hir::DefKind` so unless I missed something, we can't remove these two methods because we can't convert these enums into `hir::DefKind`.

r? `@oli-obk`
2025-07-01 17:47:06 +02:00