Commit Graph

285822 Commits

Author SHA1 Message Date
onur-ozkan
64dd484f48 bless bootstrap tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 14:28:05 +03:00
Jakub Beránek
3dbf3dc1e1 Increase the max. custom try jobs requested to 20 2025-03-05 12:27:10 +01:00
Jakub Beránek
6c2c5dcb6e Apply review remarks 2025-03-05 12:13:29 +01:00
Jakub Beránek
6166f3d212 Remove Python metric upload script and package.json 2025-03-05 12:13:29 +01:00
Jakub Beránek
6130b3da18 Upload Datadog average CPU usage metric in citool 2025-03-05 12:13:29 +01:00
Jakub Beránek
26e42de17c Make citool compilation faster 2025-03-05 12:11:15 +01:00
Rémy Rakic
36efaf8437 normalize away -Wlinker-messages wrappers from rust-lld rmake test 2025-03-05 11:54:53 +01:00
onur-ozkan
0acc0c874b Revert "avoid compiler_for for dist tools and force the current compiler"
This reverts commit 50f84129e6.
2025-03-05 13:29:51 +03:00
onur-ozkan
9e4b3d6bc4 handle forced compiler in get_tool_rustc_compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 13:29:41 +03:00
onur-ozkan
b885407c0c add new field forced_compiler to Compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 13:28:32 +03:00
Arthur Baars
049f4dbd2b Add warning and debug information when cargo metadata fails
The errors are silently dropped elsewhere, which make it really hard to debug issues due to dependency download failures.
2025-03-05 10:40:11 +01:00
klensy
aa72de9330 fix triagebot.toml 2025-03-05 12:30:03 +03:00
klensy
8edf528eb4 tidy: add check to verify paths in triagebot.toml 2025-03-05 12:30:03 +03:00
Tongjun Gao
5421fba746 add test cases for 'letm' keyword completion 2025-03-05 17:26:30 +08:00
lcnr
18809a2b12 keep inductive cycles as ambig in coherence 2025-03-05 10:06:43 +01:00
lcnr
01795b14f0 change definitely non-productive cycles to error 2025-03-05 10:06:43 +01:00
onur-ozkan
056ec72efe trim channel value in get_closest_merge_commit
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 12:05:19 +03:00
Lukas Wirth
5ad05fb9e9 Merge pull request #19288 from thaliaarchi/use-prelude-size-of
Use `size_of` from the prelude instead of imported
2025-03-05 09:04:04 +00:00
Thalia Archibald
653801b854 Use size_of from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.
2025-03-05 00:48:44 -08:00
Thalia Archibald
e8cd3d4752 Use size_of from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.

These functions were added to all preludes in Rust 1.80.
2025-03-05 00:37:40 -08:00
Thalia Archibald
0ffef9b5d1 minicore: Add size_of to prelude and add rust_2024 prelude 2025-03-05 00:30:38 -08:00
xizheyin
d7ed32b0c0 Suggest struct or union to add generic that impls trait
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-05 16:03:56 +08:00
Rémy Rakic
e0b75776c3 linux x64: default to -znostart-stop-gc
This will help stabilization of lld.
2025-03-05 08:50:08 +01:00
Ralf Jung
14cfc3ade4 Merge pull request #4219 from thaliaarchi/use-prelude-size-of
Use `size_of` from the prelude instead of imported
2025-03-05 07:35:46 +00:00
Thalia Archibald
2ff1050440 Use size_of from the prelude instead of imported
It was added to all preludes in Rust 1.80.
2025-03-04 23:09:47 -08:00
bors
4559163ccb Auto merge of #138031 - workingjubilee:rollup-5bsotpz, r=workingjubilee
Rollup of 15 pull requests

Successful merges:

 - #137829 (Stabilize [T]::split_off... methods)
 - #137850 (Stabilize `box_uninit_write`)
 - #137912 (Do not recover missing lifetime with random in-scope lifetime)
 - #137913 (Allow struct field default values to reference struct's generics)
 - #137923 (Simplify `<Postorder as Iterator>::size_hint`)
 - #137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK)
 - #137963 (Add ``dyn`` keyword to `E0373` examples)
 - #137975 (Remove unused `PpMode::needs_hir`)
 - #137981 (rustdoc search: increase strictness of typechecking)
 - #137986 (Fix some typos)
 - #137991 (Add `avr-none` to SUMMARY.md and platform-support.md)
 - #137993 (Remove obsolete comment from DeduceReadOnly)
 - #137996 (Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"")
 - #138019 (Pretty-print `#[deprecated]` attribute in HIR.)
 - #138026 (Make CrateItem::body() function return an option)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-05 06:59:11 +00:00
Trevor Gross
75485a2c09 Update compiler-builtins to 0.1.151
This enables `f16` builtins for loongarch [1] and adds support for
Cygwin [2].

[1]: https://github.com/rust-lang/compiler-builtins/pull/770
[2]: https://github.com/rust-lang/compiler-builtins/pull/774
2025-03-05 01:35:02 -05:00
Trevor Gross
7923031e7e Update compiler-builtins to 0.1.151
This enables `f16` builtins for loongarch [1] and adds support for
Cygwin [2].

[1]: https://github.com/rust-lang/compiler-builtins/pull/770
[2]: https://github.com/rust-lang/compiler-builtins/pull/774
2025-03-05 01:35:02 -05:00
Laurențiu Nicola
e260467cfd Merge pull request #19286 from lnicola/twiddle-ci
Twiddle with the `rustup` invocation on CI
2025-03-05 06:11:37 +00:00
Laurențiu Nicola
9a8968fa6c Merge pull request #19265 from Shourya742/2025-03-01-add-dangling-dyn-diagnostic
feat: Add diagnostic for dangling dyn and impl
2025-03-05 05:58:31 +00:00
Laurențiu Nicola
b9d157c67a Twiddle with the rustup invocation on CI 2025-03-05 07:56:17 +02:00
llogiq
9538e5bcd0 Walk back to the root context to compute the span (#14349)
Since the error kind (`io::ErrorKind::other`) is in the root context,
the error message must be found in the root context as well to compute
the correct span to remove.

Fix #14346

changelog: [`io_error_other`]: fix non-applicable suggestion

r? @llogiq
2025-03-05 05:52:19 +00:00
onur-ozkan
9646c2f642 replace rust.description with build.description
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:56 +03:00
onur-ozkan
853e34dbe1 pass CFG_VER_DESCRIPTION to tool builds
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:53 +03:00
onur-ozkan
92956e8cd6 add change-entry
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:39:42 +03:00
onur-ozkan
31e612bd7b move rust.description to build.description
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-05 08:38:40 +03:00
Predrag Gruevski
e07d9a8200 rustdoc: Add attribute-related tests for rustdoc JSON. 2025-03-05 04:46:14 +00:00
Jubilee Young
8a689878ce compiler: use is_rustic_abi in ty_utils
expands some conditionals to include different "rustic" ABIs, so that we
actually handle passing args through all "rustic" ABIs
2025-03-04 19:57:51 -08:00
Jubilee
3065925c7e Rollup merge of #138026 - celinval:chores-item-has-body, r=compiler-errors
Make CrateItem::body() function return an option

When we initially created `CrateItem`, it would only represent items that contain a body.

That is no longer the case, for now, make this explicit by expanding the APIs to retrieve the item body.

This is related to https://github.com/rust-lang/project-stable-mir/issues/34

r? `@oli-obk`
2025-03-04 19:37:08 -08:00
Jubilee
a69982e00a Rollup merge of #138019 - obi1kenobi:pg/pretty-print-more-attrs, r=compiler-errors
Pretty-print `#[deprecated]` attribute in HIR.

Pretty-print `#[deprecated]` attribute in a form closer to how it might appear in Rust source code, rather than using a `Debug`-like representation.

Consider the following Rust code:
```rust
#[deprecated]
pub struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
pub struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated")]
pub struct SinceAndNote;
```

Here's the previous output:
```
#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
suggestion: }span: }")]
struct PlainDeprecated;

#[attr="Deprecation{deprecation: Deprecation{since: Unspecifiednote:
here's why this is deprecatedsuggestion: }span: }")]
struct DirectNote;

#[attr="Deprecation{deprecation: Deprecation{since: NonStandard(1.2.3)note:
here's why this is deprecatedsuggestion: }span: }")]
struct SinceAndNote;
```

Here's the new output:
```rust
#[deprecated]
struct PlainDeprecated;

#[deprecated = "here's why this is deprecated"]
struct DirectNote;

#[deprecated(since = "1.2.3", note = "here's why this is deprecated"]
struct SinceAndNote;
```

Also includes a test for `#[diagnostic::(..)]` attributes, though their behavior is not changed here. I already wrote the test, so I figured it probably won't hurt to have it.

Related to discussion in #137645.

r? `@jdonszelmann`
2025-03-04 19:37:07 -08:00
Jubilee
f32ba6b6ca Rollup merge of #137996 - safinaskar:2025-03-04-revert-parallel, r=compiler-errors
Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""

Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync""

This reverts commit 02406903b0.

See https://github.com/rust-lang/rust/pull/136858#discussion_r1977482593

cc "Parallel Rustc Front-end" https://github.com/rust-lang/rust/issues/113349

r? SparrowLii

``@rustbot`` label: +WG-compiler-parallel
``@rustbot`` label: +C-cleanup
2025-03-04 19:37:06 -08:00
Jubilee
7f6ad7f96e Rollup merge of #137993 - tmiasko:deduce-comment, r=compiler-errors
Remove obsolete comment from DeduceReadOnly

The situation described in the comment does arise in practice now and described panic is long gone.
2025-03-04 19:37:06 -08:00
Jubilee
349f6af4e9 Rollup merge of #137991 - tgross35:avr-book-links, r=jieyouxu
Add `avr-none` to SUMMARY.md and platform-support.md

This was missed this in the implementation PR, so update the links here.
2025-03-04 19:37:05 -08:00
Jubilee
131867b68b Rollup merge of #137986 - fuyangpengqi:master, r=Amanieu
Fix some typos

Fix some typos
2025-03-04 19:37:04 -08:00
Jubilee
c32124fac0 Rollup merge of #137981 - lolbinarycat:rustdoc-js-less-expect-error, r=notriddle
rustdoc search: increase strictness of typechecking

r? `@notriddle`

The signature of `makePrimitiveElement` is now more accurate.

I believe the intent of the code is that `name` cannot be null if `bindingName.name` is null, and I believe typescript is expressive enough to encode this, but I'm not quite sure how, or if this would be desirable.

I'm also introducing mapped types into `rustdoc.d.ts`, but I think it's worth it in order to avoid keeping two interfaces in sync.

I may add more commits onto this to remove more ``@ts-expect-error`` instances.
2025-03-04 19:37:04 -08:00
Jubilee
dfbd9b2d81 Rollup merge of #137975 - Zalathar:needs-hir, r=compiler-errors
Remove unused `PpMode::needs_hir`

This method was added in #99360 to avoid an overzealous `span_delayed_bug` ICE in specific circumstances, but the only caller was subsequently removed in #136603, which presumably avoids the problem in a more principled way.
2025-03-04 19:37:03 -08:00
Jubilee
48a0d5217f Rollup merge of #137963 - Eclips4:fix-E0373, r=compiler-errors
Add ``dyn`` keyword to `E0373` examples

Closes #137962
2025-03-04 19:37:03 -08:00
Jubilee
a3b271d5fb Rollup merge of #137949 - jieyouxu:update-install, r=ChrisDenton
Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK

This is generally iffy because we don't consistently [document the exact minimum versions of build tools required to build a given Rust toolchain](https://github.com/rust-lang/rust/issues/129307).

cc #129307, *maybe* rustup docs are outdated?

Anyway, I updated this because I was on a slightly older VS toolchain and I couldn't `./x build library` on MSVC (even though maybe a month ago I could) due to CI `rustc_llvm` using stuff from newer Windows 11 SDK maybe. I updated the VS toolchain + Windows 11 SDK, and then I could build.

I'm not 100% sure the requirements here are accurate. It might be too high?

r? ````@ChrisDenton````
2025-03-04 19:37:02 -08:00
Jubilee
81a4349e73 Rollup merge of #137923 - scottmcm:fix-postorder-size-hint, r=tmiasko
Simplify `<Postorder as Iterator>::size_hint`

The current version is sometimes malformed (cc #137919); let's see if we can get away with a loose but trivially-correct one.
2025-03-04 19:37:01 -08:00
Jubilee
b3d7c1483d Rollup merge of #137913 - compiler-errors:struct-field-default-generic, r=BoxyUwU
Allow struct field default values to reference struct's generics

Right now, the default field value feature (https://github.com/rust-lang/rust/issues/132162) lowers anon consts whose types may reference ADT params that the const doesn't inherit.

This PR fixes this, so that these defaults can reference ADTs' generics, and sets the `generics_of` parenting up correctly.

There doesn't seem to be a good reason not to support this, since the anon const has a well-defined type from the field, and the anon const doesn't interact with the type system like generic parameter defaults do.

r? `````@boxyuwu````` or reassign

I could also make this into an error if this seems problematic (https://github.com/rust-lang/rust/compare/master...compiler-errors:rust:default-field-value-implicit-param?expand=1)...... but I'd rather make this work and register an open question on the tracking issue about validating that this is well-vetted.

Fixes #137896
2025-03-04 19:37:01 -08:00