1
Fork 0
Commit graph

278879 commits

Author SHA1 Message Date
Matthias Krüger
b0d0ec4ca6
Rollup merge of #135612 - onur-ozkan:include-x-scripts-in-tarballs, r=clubby789
Include x scripts in tarballs

Helps to provide 1:1 build experience between git-managed and tarball sources.
2025-01-18 13:58:04 +01:00
Matthias Krüger
508c72b81e
Rollup merge of #135583 - NobodyXu:move-pipe-to-io, r=joshtriplett
Move `std::pipe::*` into `std::io`

Resolve concern from final comment period https://github.com/rust-lang/rust/issues/127154#issuecomment-2590419895
2025-01-18 13:58:03 +01:00
Matthias Krüger
86947bb18a
Rollup merge of #135478 - Kobzol:gcc-clippy, r=onur-ozkan
Run clippy for rustc_codegen_gcc on CI

Requested on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Run.20clippy.20for.20rustc_codegen_gcc.20in.20the.20Rust.20CI).

Opening as a draft, since it's not clear which rules should be applied to it.

r? `@ghost`
2025-01-18 13:58:02 +01:00
Matthias Krüger
56447d738b
Rollup merge of #135290 - lqd:polonius-next-episode-8, r=jackh726
Encode constraints that hold at all points as logical edges in location-sensitive polonius

Currently, with the full setup in #134980 (but is from #134268), the polonius location-sensitive analysis converts `Locations::All` typeck constraints as edges at all points in the CFG. This was temporary.

There's a FIXME about that already, and this PR implements it: we now use the constraints that hold at all points during traversal instead of eagerly materializing them as physical edges.

Another easy one `@jackh726.`

This fixes the slowness that was happening on the big CFG from the `saturating-float-casts` test (because of its 12M materialized edges) without, AFAICT, simply moving this overhead to traversal: materializing the logical edges is done on-demand.

r? `@jackh726` (no rush either)
2025-01-18 13:58:01 +01:00
Matthias Krüger
b78edd7957
Rollup merge of #133700 - RalfJung:const-non-null, r=lcnr
const-eval: detect more pointers as definitely not-null

This fixes https://github.com/rust-lang/rust/issues/133523 by making the `scalar_may_be_null` check smarter: for instance, an odd offset in any 2-aligned allocation can never be null, even if it is out-of-bounds.

More generally, if an allocation with unknown base address B is aligned to alignment N, and a pointer is at offset X inside that allocation, then we know that `(B + X) mod N = B mod N + X mod N = X mod N`. Since `0 mod N` is definitely 0, if we learn that `X mod N` is *not* 0 we can deduce that `B + X` is not 0.

This is immediately visible on stable, via `ptr.is_null()` (and, more subtly, by not raising a UB error when such a pointer is used somewhere that a non-null pointer is required). Therefore nominating for `@rust-lang/lang.`
2025-01-18 13:58:00 +01:00
bors
8321f00bf4 Auto merge of #135678 - matthiaskrgr:rollup-psuyzpn, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #134455 (cleanup promoteds move check)
 - #135421 (Make tidy warn on unrecognized directives)
 - #135611 (Remove unnecessary assertion for reference error)
 - #135620 (ci: improve github action name)
 - #135639 (new solver: prefer trivial builtin impls)
 - #135654 (add src/librustdoc and src/rustdoc-json-types to RUSTC_IF_UNCHANGED_ALLOWED_PATHS)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-18 12:57:05 +00:00
Lukas Wirth
013130c22c
Merge pull request #18968 from Veykril/push-szvltqqttsyy
fix: `cargo rustc --print` needs `unstable-options`
2025-01-18 11:21:03 +00:00
Zalathar
ea0c86c434 coverage: Add a few more comments to counter creation 2025-01-18 22:14:16 +11:00
Zalathar
6000d5c462 coverage: Remove BcbCounter and BcbExpression
Making these separate types from `CovTerm` and `Expression` was historically
very helpful, but now that most of the counter-creation work is handled by
`node_flow` they are no longer needed.
2025-01-18 22:14:16 +11:00
Zalathar
4170b93cdc coverage: Flatten top-level counter creation into plain functions
- Move `make_bcb_counters` out of `CoverageCounters`
- Split out `make_node_counter_priority_list`
- Flatten `Transcriber` into the function `transcribe_counters`
2025-01-18 22:12:47 +11:00
Lukas Wirth
5f117b4591 fix: cargo rustc --print needs unstable-options 2025-01-18 12:04:57 +01:00
bors
bd62a452f4 Auto merge of #135675 - erickt:fix-fuchsia-sha, r=lqd
Bump Fuchsia integration commit

This advances Fuchsia to a checkout from 2025-01-13, which corresponds to a recent Rust roll, and hopefully avoids #135667, where a repository used by the older version of Rust was accidentally archived and broke checking out the prior version.

try-job: x86_64-fuchsia

cc `@ehuss`
2025-01-18 10:10:37 +00:00
Lukas Wirth
b53b2990cd Extract variable assist triggers less eagerly 2025-01-18 09:52:56 +01:00
Matthias Krüger
e8736955d1
Rollup merge of #135654 - lolbinarycat:bootstrap-135650, r=onur-ozkan
add src/librustdoc and src/rustdoc-json-types to RUSTC_IF_UNCHANGED_ALLOWED_PATHS

fixes https://github.com/rust-lang/rust/issues/135650

r? ``@onur-ozkan``
2025-01-18 09:11:07 +01:00
Matthias Krüger
862a17cd17
Rollup merge of #135639 - lqd:trivial-builtin-impls, r=lcnr
new solver: prefer trivial builtin impls

As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/needs_help.3A.20trivial.20builtin.20impls), this PR:
- adds a new `BuiltinImplSource::Trivial` source, and marks the `Sized` builtin impls as trivial
- prefers these trivial builtin impls in `merge_trait_candidates`

The comments can likely be wordsmithed a bit better, and I ~stole~ was inspired by the old solver ones. Let me know how you want them improved.

When enabling the new solver for tests, 3 UI tests now pass:
- `regions/issue-26448-1.rs` and its sibling `regions/issue-26448-2.rs` were rejected by the new solver but accepted by the old one
- and `issues/issue-42796.rs` where the old solver emitted some overflow errors in addition to the expected error

(For some reason one of these tests is run-pass, but I can take care of that another day)

r? lcnr
2025-01-18 09:11:06 +01:00
Matthias Krüger
80fcf159c9
Rollup merge of #135620 - marcoieni:edit-ghcr-action-name, r=Kobzol
ci: improve github action name
2025-01-18 09:11:06 +01:00
Matthias Krüger
233fd55e6e
Rollup merge of #135611 - chenyukang:yukang-fix-135341-ice-crash, r=oli-obk
Remove unnecessary assertion for reference error

Fixes #135341

From comment: https://github.com/rust-lang/rust/issues/135341#issuecomment-2594430504

r? ``@oli-obk``
2025-01-18 09:11:05 +01:00
Matthias Krüger
8fec08b988
Rollup merge of #135421 - cod10129:warn-tidy-ignore, r=onur-ozkan
Make tidy warn on unrecognized directives

This PR makes it so tidy warns on unrecognized directives, as recommended on [the discussion of #130984](https://github.com/rust-lang/rust/issues/130984#issuecomment-2589284620). This is edited from the previous version of this PR, which only warned on "tidy-ignore" and no other tidy directive typos.

Fixes #130984.

``@rustbot`` label A-tidy C-enhancement
2025-01-18 09:11:04 +01:00
Matthias Krüger
dbc27cac27
Rollup merge of #134455 - lcnr:move-errors-in-promoteds, r=compiler-errors
cleanup promoteds move check

r? types
2025-01-18 09:11:03 +01:00
Ralf Jung
e1dda10057 const-eval: detect more pointers as definitely not-null 2025-01-18 08:51:28 +01:00
Zalathar
48399442d4 coverage: Move phys_counter_for_node into CoverageCounters 2025-01-18 18:51:22 +11:00
Erick Tryzelaar
37a88ba320 Bump Fuchsia integration commit
This advances Fuchsia to a checkout from 2025-01-13, which corresponds
to a recent Rust roll, and hopefully avoids #135667, where a repository
used by the older version of Rust was accidentally archived and broke
checking out the prior version.

try-job: x86_64-fuchsia
2025-01-18 06:13:00 +00:00
Zalathar
a14c35c507 coverage: Remove the Site enum now that we only instrument nodes 2025-01-18 17:12:18 +11:00
Scott McMurray
6fe82006a4 Update our range assumes to the format that LLVM prefers 2025-01-17 20:39:38 -08:00
Weihang Lo
deb35b000e
Update cargo 2025-01-17 22:37:03 -05:00
Esteban Küber
bbcf26fc33 Add context on private fields that are not on the same line as the struct name
```
error[E0451]: field `x` of struct `S` is private
  --> $DIR/visibility.rs:24:9
   |
LL |     let a = baz::S {
   |             ------ in this type
LL |         ..
   |         ^^ field `x` is private
```
2025-01-18 01:56:22 +00:00
Frank King
067cac91f9 Fix ICE in resolving associated items as non-bindings 2025-01-18 08:38:50 +08:00
Esteban Küber
3e99055c40 Add test for construction of struct with private field with default value
```
error[E0451]: field `beta` of struct `Alpha` is private
  --> $DIR/visibility.rs:11:37
   |
LL |         let x = crate::foo::Alpha { .. };
   |                                     ^^ field `beta` is private
```
2025-01-18 00:30:50 +00:00
bors
8e59cf95d5 Auto merge of #135618 - lcnr:coherence-unknown, r=compiler-errors
add cache to `AmbiguityCausesVisitor`

fixes #135457, alternative to #135524.

cc https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/new-solver.20hang.20.23135457

r? `@compiler-errors`
2025-01-18 00:06:27 +00:00
Trevor Gross
809f61a783 Add references to the IEEE functions for float_next_up_down
Mention the IEEE function by name and create a doc alias of the same.
2025-01-17 23:01:23 +00:00
Trevor Gross
366cecacdd Stabilize float_next_up_down
FCP completed at [1].

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

[1]: https://github.com/rust-lang/rust/issues/91399#issuecomment-2598734570
2025-01-17 23:01:10 +00:00
Jakub Beránek
f854f34a50 Do not include GCC source code in source tarballs
The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet).
2025-01-17 23:01:48 +01:00
Guillaume Gomez
3c62ccdff5 Update rustdoc tests 2025-01-17 22:36:49 +01:00
Guillaume Gomez
42f9c79776 Handle reexports items list a bit differently since they cannot have documentation 2025-01-17 22:36:48 +01:00
Guillaume Gomez
b6ad420a20 Replace ul/li list with dl/dd/dt elements 2025-01-17 22:36:48 +01:00
Mark Murphy
2406225266 Update syntax tree viewer docs 2025-01-17 15:55:38 -05:00
bors
6067b36314 Auto merge of #135329 - oli-obk:push-sytltwnzxlrq, r=Noratrieb
Stable Hash: Ignore all HirIds that just identify the node itself

This should provide better incremental caching, but it seems there is more to it.

These IDs also serve no purpose being in the stable hash of the item they refer to, only when referring to *another* item is it important that we hash the `HirId`. So we can at least avoid the cost during stable hashing, even if we don't benefit from it by avoiding some queries' caches from being invalidated

Unsure how to make sure we do this right by construction. Would be nice to do something type based
2025-01-17 20:53:15 +00:00
binarycat
d58540df44 add src/librustdoc and src/rustdoc-json-types to RUSTC_IF_UNCHANGED_ALLOWED_PATHS
fixes https://github.com/rust-lang/rust/issues/135650
2025-01-17 14:31:24 -06:00
Laurențiu Nicola
577a96a71f Bump windows-sys 2025-01-17 21:28:11 +02:00
Laurențiu Nicola
6c1b1a1414
Merge pull request #18963 from gvozdvmozgu/Win32_Foundation
add missing `Win32_Foundation` feature
2025-01-17 18:54:57 +00:00
Rémy Rakic
00844be421 new solver: prefer trivial builtin impls over where-clauses
for now, only builtin `Sized` impls are tracked as being `Trivial`
2025-01-17 18:50:29 +00:00
Jens Reidel
dfb816208a
Drop MIPS glibc 2.23 patches that reside in crosstool-ng now
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-01-17 18:34:45 +01:00
gvozdvmozgu
3ce55e949e add missing Win32_Foundation feature 2025-01-17 08:44:50 -08:00
MarcoIeni
0e80d78709
ci: switch to linux free arm runners 2025-01-17 16:38:10 +01:00
bors
bcd0683e5d Auto merge of #135534 - folkertdev:fix-wasm-i128-f128, r=tgross35
use indirect return for `i128` and `f128` on wasm32

fixes #135532

Based on https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md we now use an indirect return for  `i128`, `u128` and `f128`. That is what LLVM ended up doing anyway.

r? `@bjorn3`
2025-01-17 15:07:28 +00:00
Jiahao XU
2af4197f42
Fix use of pipe in tests/run-make/broken-pipe-no-ice/rmake.rs
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2025-01-18 01:39:01 +11:00
Jiahao XU
81d70f92ab
Fix import of pipe in kernel_copy.rs
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2025-01-18 00:44:44 +11:00
Lukas Wirth
ff5c32f542
Merge pull request #18908 from jnyfah/error-braces
Fix: Detect missing errors for } braces before else in let...else statements
2025-01-17 13:29:56 +00:00
clubby789
f7c2d1194d doc: Point to methods on Command as alternatives to set/remove_var 2025-01-17 12:53:58 +00:00
lcnr
0910173b35 add test 2025-01-17 13:23:25 +01:00