1
Fork 0
Commit graph

278879 commits

Author SHA1 Message Date
Zalathar
93f69b2300 Don't skip argument parsing when running rustc with no arguments
Setting up the argument parser to parse no arguments is a tiny bit of wasted
work, but avoids an otherwise-unnecessary special case.

In particular, this lets us avoid having to deal with multiple different APIs
to determine whether the compiler is nightly or not.
2025-01-19 13:40:37 +11:00
Michael Sloan
3a6eea0c6a Rewrap following accepting review suggestions from @ibraheemdev 2025-01-18 18:40:16 -07:00
Michael Sloan
fd89cf9b8f
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:35:41 -07:00
Michael Sloan
6ac44fa5fa
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:35:22 -07:00
Michael Sloan
c0aa7b5cf0
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:35:12 -07:00
Michael Sloan
de7f1b670b
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:34:29 -07:00
Michael Sloan
a3c65805ad
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:34:21 -07:00
Michael Sloan
2eef440c22
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:33:42 -07:00
Michael Sloan
a506f9d210
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:33:33 -07:00
Michael Sloan
305bd856b2
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:33:23 -07:00
Michael Sloan
d39d0ecd57
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:33:02 -07:00
Michael Sloan
ecf68f3cd0
Update library/core/src/slice/mod.rs
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-01-18 18:32:47 -07:00
Matthias Krüger
c87dd96cf5
Rollup merge of #135708 - compiler-errors:compiler-nits, r=lqd
Some random compiler nits

The only "observable" change here is using `par_body_owners` for coroutine witnesses/coroutine obligation checking.

r? lqd (or reassign, you just seem to like to approve prs :3 )
2025-01-19 01:22:39 +01:00
Matthias Krüger
e28e2b801e
Rollup merge of #135705 - compiler-errors:lint, r=estebank
Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints

It feels much cleaner to do all MIR-related things using the pass manager.
2025-01-19 01:22:38 +01:00
Matthias Krüger
7e1ce54b22
Rollup merge of #135703 - estebank:empty-dfv, r=compiler-errors
Disallow `A { .. }` if `A` has no fields

```
error: `A` has no fields, `..` needs at least one default field in the struct definition
  --> $DIR/empty-struct.rs:16:17
   |
LL |     let _ = A { .. };
   |             -   ^^
   |             |
   |             this type has no fields
```
2025-01-19 01:22:37 +01:00
Matthias Krüger
85b69bf753
Rollup merge of #135641 - GuillaumeGomez:items-list, r=notriddle
[rustdoc] Replace module list items `ul`/`li` with `dl`/`dd`/`dt` elements

`@hywan` suggested that rustdoc should use `dl`,`dt` and `dd` HTML tags for listing items on module pages as it matches better what this is (an item and optionally its description). This is a very good idea so here is the implementation.

Also nice side-effect of this change: it reduces a bit the generated HTML since we go from:

This PR shouldn't impact page appearance.

```html
<ul class="item-table">
  <li>
    <div class="item-name">NAME</div>
    <div class="desc docblock-short">THE DOC</div>
  </li>
</ul>
```

to:

```html
<dl class="item-table">
  <dt>NAME</dt>
  <dd>THE DOC</dd>
</dl>
```

You can test it [here](https://rustdoc.crud.net/imperio/items-list/std/index.html).

r? `@notriddle`
2025-01-19 01:22:36 +01:00
github-actions
715c3d4fcf cargo update
compiler & tools dependencies:
     Locking 13 packages to latest compatible versions
    Updating anstyle-wincon v3.0.6 -> v3.0.7
    Updating bitflags v2.7.0 -> v2.8.0
    Updating chrono-tz v0.10.0 -> v0.10.1
    Updating js-sys v0.3.76 -> v0.3.77
    Updating log v0.4.22 -> v0.4.25
    Updating miniz_oxide v0.8.2 -> v0.8.3
    Updating uuid v1.11.1 -> v1.12.0
    Updating valuable v0.1.0 -> v0.1.1
    Updating wasm-bindgen v0.2.99 -> v0.2.100
    Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
    Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
    Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
    Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
note: pass `--verbose` to see 41 unchanged dependencies behind latest

library dependencies:
     Locking 1 package to latest compatible version
    Updating miniz_oxide v0.8.2 -> v0.8.3
note: pass `--verbose` to see 4 unchanged dependencies behind latest

rustbook dependencies:
     Locking 12 packages to latest compatible versions
    Updating anstyle-wincon v3.0.6 -> v3.0.7
    Updating bitflags v2.7.0 -> v2.8.0
    Updating cc v1.2.8 -> v1.2.10
    Updating js-sys v0.3.76 -> v0.3.77
    Updating log v0.4.22 -> v0.4.25
    Updating miniz_oxide v0.8.2 -> v0.8.3
      Adding rustversion v1.0.19
    Updating wasm-bindgen v0.2.99 -> v0.2.100
    Updating wasm-bindgen-backend v0.2.99 -> v0.2.100
    Updating wasm-bindgen-macro v0.2.99 -> v0.2.100
    Updating wasm-bindgen-macro-support v0.2.99 -> v0.2.100
    Updating wasm-bindgen-shared v0.2.99 -> v0.2.100
2025-01-19 00:21:55 +00:00
bors
01706e1a34 Auto merge of #135713 - matthiaskrgr:rollup-c04uupz, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #135616 (CI: split i686-msvc job to two free runners)
 - #135623 (ci: use ghcr ubuntu image for mingw-check-tidy)
 - #135640 (Drop MIPS glibc 2.23 patches that reside in crosstool-ng now)
 - #135663 (Fix ICE in resolving associated items as non-bindings)
 - #135680 (coverage: Clean up a few things after the counters overhaul)
 - #135697 (Get rid of `ToPolyTraitRef`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-19 00:21:10 +00:00
Matthias Krüger
d810c13b92
Rollup merge of #135697 - compiler-errors:poly-trait-ref, r=lqd
Get rid of `ToPolyTraitRef`

It's generally a footgun, since it throws away `PredicatePolarity`.

This PR doesn't attempt to fix any related bugs having to do with binders or polarity; it just tries to pass through `TraitPredicate`s around instead of `TraitRef`s. There should be basically no functional changes.
2025-01-19 01:18:57 +01:00
Matthias Krüger
6b2c745182
Rollup merge of #135680 - Zalathar:counters-cleanup, r=compiler-errors
coverage: Clean up a few things after the counters overhaul

Follow-up to #135481. No functional change; this is mostly just deleting or moving code.
2025-01-19 01:18:56 +01:00
Matthias Krüger
dd13d6fd1a
Rollup merge of #135663 - frank-king:fix/135614, r=compiler-errors
Fix ICE in resolving associated items as non-bindings

Fixes #135614 so that imported associated functions of traits can be shadowed by local bindings and associated constants of traits can be used in patterns.
2025-01-19 01:18:55 +01:00
Matthias Krüger
03c4462222
Rollup merge of #135640 - Gelbpunkt:drop-mips-glibc-patches, r=Kobzol
Drop MIPS glibc 2.23 patches that reside in crosstool-ng now

These patches were added to crosstool-ng in b88d338516 and are therefore duplicate and fail to apply, breaking builds of `dist-mips*-linux`.

I have compile tested `dist-mipsel-linux`, I assume the other targets will work just as fine now.
2025-01-19 01:18:55 +01:00
Matthias Krüger
81a464f8a5
Rollup merge of #135623 - marcoieni:mingw-check-tidy-dockerfile, r=Kobzol
ci: use ghcr ubuntu image for mingw-check-tidy
2025-01-19 01:18:54 +01:00
Matthias Krüger
8825073dcc
Rollup merge of #135616 - marcoieni:split-i686-msvc-job, r=Kobzol
CI: split i686-msvc job to two free runners

try-job: i686-msvc-1
try-job: i686-msvc-2
2025-01-19 01:18:53 +01:00
Rémy Rakic
c69dea90d7 add tests for issue 135671 2025-01-18 22:09:35 +00:00
Rémy Rakic
122a55bb44 Revert "Auto merge of #133734 - scottmcm:lower-indexing-to-ptrmetadata, r=davidtwco,RalfJung"
This reverts commit b57d93d8b9, reversing
changes made to 0aeaa5eb22.
2025-01-18 22:09:35 +00:00
Rémy Rakic
9acb9fa57b Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commit e108481f74, reversing
changes made to 303e8bd768.
2025-01-18 22:09:34 +00:00
Rémy Rakic
0bb4880581 Revert "Rollup merge of #134371 - scottmcm:fix-134352, r=oli-obk"
This reverts commit 7c301ecdf5, reversing
changes made to dffaad8332.
2025-01-18 22:09:34 +00:00
Rémy Rakic
ca1c17c88d Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"
This reverts commit e108481f74, reversing
changes made to 303e8bd768.
2025-01-18 22:09:34 +00:00
Michael Goulet
0e98d9a3f7 Fix comment 2025-01-18 22:03:04 +00:00
Michael Goulet
f3bd95d43c Use par_body_owners in coroutine check 2025-01-18 22:03:04 +00:00
Michael Goulet
bd5f0178bc Rename typeck_with_fallback 2025-01-18 22:03:04 +00:00
Michael Sloan
0257cfb974 then be -> be based on feedback from @ibraheemdev 2025-01-18 14:52:16 -07:00
bors
1d55f7270d Auto merge of #135633 - marcoieni:ci-free-arm-linux, r=Kobzol
ci: switch to linux free arm runners

try-job: aarch64-gnu
try-job: aarch64-gnu-debug
try-job: dist-aarch64-linux
2025-01-18 21:27:25 +00:00
Michael Goulet
b08f3d5bdb Consolidate ad-hoc MIR lints into real pass-manager-based MIR lints 2025-01-18 21:25:47 +00:00
Esteban Küber
e68a8ce035 Provide suggestion for #![feature(default_field_values)]
```
error[E0797]: base expression required after `..`
  --> $DIR/feature-gate-default-field-values.rs:62:21
   |
LL |     let x = Foo { .. };
   |                     ^
   |
help: add `#![feature(default_field_values)]` to the crate attributes to enable default values on `struct` fields
   |
LL + #![feature(default_field_values)]
   |
help: add a base expression here
   |
LL |     let x = Foo { ../* expr */ };
   |                     ++++++++++
```
2025-01-18 21:15:42 +00:00
Esteban Küber
e7ac2eabd0 Deduplicate logic 2025-01-18 21:15:42 +00:00
Esteban Küber
7175da59d3 Structured suggestion for "missing feature intrinsic"
```
error: `size_of_val` is not yet stable as a const intrinsic
  --> $DIR/const-unstable-intrinsic.rs:17:9
   |
LL |         unstable_intrinsic::size_of_val(&x);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add `#![feature(unstable)]` to the crate attributes to enable
help: add `#![feature(unstable)]` to the crate attributes to enable
   |
LL + #![feature("unstable")]
   |
```
2025-01-18 21:15:37 +00:00
Esteban Küber
a47fee50bd Structured suggestion for "missing feature in unstable fn call"
When encountering a call corresponding to an item marked as unstable behind a feature flag, provide a structured suggestion pointing at where in the crate the `#![feature(..)]` needs to be written.

```
error: `foobar` is not yet stable as a const fn
  --> $DIR/const-stability-attribute-implies-no-feature.rs:12:5
   |
LL |     foobar();
   |     ^^^^^^^^
   |
help: add `#![feature(const_foobar)]` to the crate attributes to enable
   |
LL + #![feature(const_foobar)]
   |
```

Fix #81370.
2025-01-18 21:13:27 +00:00
Esteban Küber
27f079ae24 Disallow A { .. } if A has no fields
```
error: `A` has no fields, `..` needs at least one default field in the struct definition
  --> $DIR/empty-struct.rs:16:17
   |
LL |     let _ = A { .. };
   |             -   ^^
   |             |
   |             this type has no fields
```
2025-01-18 21:05:09 +00:00
Esteban Küber
deef3ebaec Emit a single privacy error for multiple fields on the same struct expression
Collect all unreachable fields in a single struct literal struct and emit a single error, instead of one error per private field.

```
error[E0451]: fields `beta` and `gamma` of struct `Alpha` are private
  --> $DIR/visibility.rs:18:13
   |
LL |     let _x = Alpha {
   |              ----- in this type
LL |         beta: 0,
   |         ^^^^^^^ private field
LL |         ..
   |         ^^ field `gamma` is private
```
2025-01-18 20:33:15 +00:00
Guillaume Gomez
b3865d1832 Remove more CSS classes 2025-01-18 20:29:55 +01:00
Michael Goulet
2a180a93a1 Get rid of ToPolyTraitRef 2025-01-18 18:47:17 +00:00
bors
0493557083 Auto merge of #135682 - matthiaskrgr:rollup-cl7zlt1, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133700 (const-eval: detect more pointers as definitely not-null)
 - #135290 (Encode constraints that hold at all points as logical edges in location-sensitive polonius)
 - #135478 (Run clippy for rustc_codegen_gcc on CI)
 - #135583 (Move `std::pipe::*` into `std::io`)
 - #135612 (Include x scripts in tarballs)
 - #135624 (ci: mirror buildkit image to ghcr)
 - #135661 (Stabilize `float_next_up_down`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-18 18:40:20 +00:00
Piotr Osiewicz
06f6d8bcbc lsp-server: Drop outgoing messages on background thread
Closes #18961
2025-01-18 17:47:27 +01:00
Laurențiu Nicola
61af2cc09a
Merge pull request #18966 from lnicola/bump-windows-sys
minor: Bump `windows-sys`
2025-01-18 15:59:53 +00:00
Laurențiu Nicola
b8eec1a35e
Merge pull request #18957 from markmurphydev/docs_vscode_syntax_tree
Update syntax tree viewer docs
2025-01-18 15:59:22 +00:00
bors
efc25761e5 Auto merge of #135667 - weihanglo:update-cargo, r=weihanglo
Update cargo

13 commits in 088d496082726091024f1689c124a0c3dccbd775..045bf21b36a2e1f3ed85e38278d1c3cc4305e134
2025-01-10 20:10:21 +0000 to 2025-01-17 14:59:36 +0000
- created a function for user defined aliases (rust-lang/cargo#15076)
- took the functionality of the third party subcommand from the list_commands function (rust-lang/cargo#15075)
- fix: wrong concat and field name (rust-lang/cargo#15074)
- fix(publish): Report all unpublishable packages  (rust-lang/cargo#15070)
- docs(cargo-clippy): correct typo (rust-lang/cargo#15072)
- docs(cargo-package): alwasy include the lockfile (rust-lang/cargo#15067)
- docs(ref): Deprecate 'package.authors'  (rust-lang/cargo#15068)
- fix(build-std): parse as comma-separated list (rust-lang/cargo#15065)
- Fix benchsuite issue with newer versions of git (rust-lang/cargo#15069)
- Document that cargo automatically registers variables used in env! macro to trigger rebuilds (rust-lang/cargo#15062)
- perf(cargo-package): match certain path prefix with pathspec (rust-lang/cargo#14997)
- Clarify note in example (rust-lang/cargo#15054)
- chore(deps): update msrv (3 versions) to v1.82 (rust-lang/cargo#15050)
2025-01-18 15:42:37 +00:00
Matthias Krüger
23fb4f22b3
Rollup merge of #135661 - tgross35:stabilize-float_next_up_down, r=scottmcm
Stabilize `float_next_up_down`

FCP completed at [1].

For `f16` and `f128`, this just removes the gates in comments and doctests.

Closes https://github.com/rust-lang/rust/issues/91399

[1]: https://github.com/rust-lang/rust/issues/91399#issuecomment-2598734570
2025-01-18 13:58:06 +01:00
Matthias Krüger
055368163d
Rollup merge of #135624 - marcoieni:mirror-buildkit-image, r=Kobzol
ci: mirror buildkit image to ghcr
2025-01-18 13:58:05 +01:00