1
Fork 0
Commit graph

277252 commits

Author SHA1 Message Date
Stuart Cook
ea2851b24b
Rollup merge of #134869 - clubby789:cc-bump, r=jieyouxu
Bump compiler cc

Fixes #134657
Pulls in https://github.com/rust-lang/cc-rs/pull/1330

try-job: x86_64-msvc
2024-12-29 22:45:38 +11:00
Stuart Cook
8f4bf86740
Rollup merge of #134851 - lukas-code:alloc-ffi, r=tgross35
docs: inline `alloc::ffi::c_str` types to `alloc::ffi`

like https://github.com/rust-lang/rust/pull/134791 but for `alloc`

r? ``@tgross35`` ``@notriddle``
2024-12-29 22:45:37 +11:00
Stuart Cook
42a372fd7f
Rollup merge of #134799 - poliorcetics:ab/push-xuxotrnrtysz, r=GuillaumeGomez
nits: Cleanups in `librustdoc::clean`

r? ````@GuillaumeGomez````
2024-12-29 22:45:36 +11:00
Ralf Jung
62bb35ab5d make -Csoft-float have an effect on all ARM targets 2024-12-29 11:10:36 +01:00
bors
e7738afb70 Auto merge of #134650 - onur-ozkan:clean-up-fixmes, r=Kobzol
Clean up some FIXME notes on bootstrap

Fixing and removing some FIXME notes.
2024-12-29 10:04:55 +00:00
Zalathar
4192293b4d Fix ./x check bootstrap by moving shared_helpers::tests 2024-12-29 20:49:03 +11:00
bors
fd19773d2f Auto merge of #134627 - estebank:issue-133252, r=jackh726
Avoid ICE in borrowck

Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro.

Fix #133252.
2024-12-29 07:23:59 +00:00
Zalathar
1e37bbe2de Allow macro-declared test steps to have docstrings and attributes 2024-12-29 15:50:47 +11:00
Zalathar
7b7f634cac Consolidate the macros for declaring compiletest suites 2024-12-29 15:50:47 +11:00
clubby789
71e3ea35b1 Add codegen test for issue 63646 2024-12-29 03:31:37 +00:00
Geoffrey Thomas
0c2f4359fd
Fix sentence fragment in pin module docs
Looks like this was inadvertently dropped in 8241ca60. Restore the words from before that commit.
2024-12-28 22:21:04 -05:00
bors
480eec0692 Auto merge of #134867 - rust-lang:cargo_update, r=clubby789
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt

compiler & tools dependencies:
     Locking 8 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating glob v0.3.1 -> v0.3.2
    Updating quote v1.0.37 -> v1.0.38
    Updating rustversion v1.0.18 -> v1.0.19
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest

rustbook dependencies:
     Locking 7 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating cc v1.2.5 -> v1.2.6
    Updating quote v1.0.37 -> v1.0.38
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
```
2024-12-29 03:16:29 +00:00
bors
0b63477350 Auto merge of #134864 - Zalathar:rollup-suc8ay9, r=Zalathar
Rollup of 3 pull requests

Successful merges:

 - #134849 (compiletest: Slightly simplify the handling of debugger directive prefixes)
 - #134850 (Document virality of `feature(rustc_private)`)
 - #134852 (Added a codegen test for optimization with const arrays)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-29 00:38:26 +00:00
clubby789
8c8fed7ea9 Bump compiler cc 2024-12-29 00:30:32 +00:00
github-actions
519c233cbb cargo update
compiler & tools dependencies:
     Locking 8 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating glob v0.3.1 -> v0.3.2
    Updating quote v1.0.37 -> v1.0.38
    Updating rustversion v1.0.18 -> v1.0.19
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest

library dependencies:
     Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest

rustbook dependencies:
     Locking 7 packages to latest compatible versions
    Updating anyhow v1.0.94 -> v1.0.95
    Updating cc v1.2.5 -> v1.2.6
    Updating quote v1.0.37 -> v1.0.38
    Updating serde v1.0.216 -> v1.0.217
    Updating serde_derive v1.0.216 -> v1.0.217
    Updating syn v2.0.90 -> v2.0.93
    Updating unicase v2.8.0 -> v2.8.1
2024-12-29 00:22:58 +00:00
Piotr Osiewicz
563920ce14 rustc_codegen_ssa: Buffer file writes in link_rlib
This makes this step take ~25ms on my machine (M3 Max 64GB) for Zed repo instead of ~150ms. Additionally it takes down the time needed for a clean cargo build of ripgrep from ~6.1s to 5.9s.
This change is mostly relevant for crates with multiple large CGUs.
2024-12-29 01:17:18 +01:00
Martin Liška
e19542f0a9 Start using mdbook-linkcheck2 (#2103) 2024-12-28 15:00:32 -08:00
Stuart Cook
0a52407d43
Rollup merge of #134852 - alex:patch-1, r=durin42
Added a codegen test for optimization with const arrays

Closes #107208
2024-12-29 10:00:19 +11:00
Stuart Cook
8060f58150
Rollup merge of #134850 - tamird:rustc-private-book-update, r=bjorn3
Document virality of `feature(rustc_private)`

Closes #134825.

r? `@bjorn3`
2024-12-29 10:00:18 +11:00
Stuart Cook
a8a10110e0
Rollup merge of #134849 - Zalathar:debuginfo-prefixes, r=lqd,clubby789,jieyouxu
compiletest: Slightly simplify the handling of debugger directive prefixes

The `cdbg-` prefix is not used by any tests in `tests/debuginfo`, and perhaps there never were any tests that used it.

Getting rid of it also lets us get rid of the code for parsing multiple prefixes at the same time, since every debugger now has exactly one prefix.
2024-12-29 10:00:18 +11:00
Alexis (Poliorcetics) Bourget
f5c497529c
nits: librustdoc::clean
- librustdoc::clean::clean_lifetime doesn't need a mut doc context
- librustdoc::clean::normalize doesn't need a mut doc context
- move Some() wrapping up into `clean_predicate()`
- simplify nested if in librustdoc::clean::record_extern_fqn()
2024-12-28 23:53:18 +01:00
bors
b76036c88c Auto merge of #134848 - Zalathar:check-compiletest, r=jieyouxu
bootstrap: Allow `./x check compiletest`

Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does!

Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
2024-12-28 22:00:11 +00:00
bjorn3
4cc1c9036d Use -ffunction-sections by default again
Cranelift now uses the same section name for all subsections which
reduces the size overhead of -ffunction-sections.
2024-12-28 21:42:01 +00:00
bjorn3
7f98f34420 Update to Cranelift 0.115 2024-12-28 20:06:43 +00:00
Guillaume Gomez
00bf8717e3 Add GUI test for item info elements color 2024-12-28 20:54:00 +01:00
Alex Gaynor
d6c73ebbf3 Added a codegen test for optimization with const arrays
Closes #107208
2024-12-28 13:28:35 -06:00
bors
8742e0556d Auto merge of #134845 - jieyouxu:temp-drop-warning, r=onur-ozkan
bootstrap: drop warning for top-level test suite path check due to false positives

The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic.

This retains the fix for the Windows path handling (unlike #134843).

r? `@onur-ozkan`
2024-12-28 19:20:22 +00:00
Tamir Duberstein
35e5c7d438
Document virality of feature(rustc_private)
Since 9cb1998ea1 this feature is viral.
2024-12-28 11:45:25 -05:00
bors
ceb0441e82 Auto merge of #134790 - onur-ozkan:cfg-test, r=clubby789
replace bootstrap-self-test feature flag with cfg(test)

This makes it in more rusty way.
2024-12-28 16:37:13 +00:00
bjorn3
1723075aff Fix rustc test suite 2024-12-28 16:30:39 +00:00
bjorn3
a177ed55a7 Rustup to rustc 1.85.0-nightly (dd84b7d5e 2024-12-27) 2024-12-28 14:45:45 +00:00
Lukas Markeffsky
11ad6ff3cb docs: inline alloc::ffi::c_str types to alloc::ffi 2024-12-28 15:42:39 +01:00
bors
3c1e750364 Auto merge of #134547 - SUPERCILEX:unify-copy, r=thomcc
Unify fs::copy and io::copy on Linux

Currently, `fs::copy` first tries a regular file copy (via copy_file_range) and then falls back to userspace read/write copying. We should use `io::copy` instead as it tries copy_file_range, sendfile, and splice before falling back to userspace copying. This was discovered here: https://github.com/SUPERCILEX/fuc/issues/40

Perf impact: `fs::copy` will now have two additional statx calls to decide which syscall to use. I wonder if we should get rid of the statx calls and only continue down the next fallback when the relevant syscalls say the FD isn't supported.
2024-12-28 13:49:45 +00:00
bjorn3
446c582ce0 Sync from rust dd84b7d5ee 2024-12-28 13:32:14 +00:00
Zalathar
2f8824a477 Simplify DebuggerCommands::parse_from to only take one prefix 2024-12-29 00:09:25 +11:00
Zalathar
a625ddd1ed Remove the unused cdbg-* debugger directive prefix
There are no tests in `tests/debuginfo` that use this prefix.
2024-12-29 00:09:25 +11:00
Zalathar
c1c2d85cc9 bootstrap: Allow ./x check compiletest 2024-12-28 23:23:41 +11:00
clubby789
1a99d3bafa Document x test --no-capture (#2174) 2024-12-28 19:55:20 +08:00
bors
4e0bc490c6 Auto merge of #131244 - clubby789:match-branches-unreachable, r=DianQK
Consider empty-unreachable otherwise branches in MatchBranchSimplification

Fixes #131219
2024-12-28 11:09:28 +00:00
许杰友 Jieyou Xu (Joe)
c393811a48 bootstrap: drop warning for top-level test suite path check
This doesn't quite handle the more exotic path suffix matches that test
filters seem to accept (e.g. `library/test` can be matched with
`--exclude test`), so avoid warning on non-existent top-level test
suites for now. A proper fix will need to possibly query test `Step`s
for their exclude logic.
2024-12-28 17:55:05 +08:00
Stuart Cook
dec978fb3b Remove the -test suffix from normalize directives (#2172) 2024-12-28 17:32:43 +08:00
onur-ozkan
eedafbc92f remove deprecated option parallel-compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:35:29 +03:00
onur-ozkan
47cd3e7c61 read to String directly without extra conversion
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:34:00 +03:00
onur-ozkan
ec9502d803 remove an invalid FIXME note
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:33:57 +03:00
bors
8b3f7ac526 Auto merge of #134844 - Zalathar:rollup-1225wh9, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - #134737 (Implement `default_overrides_default_fields` lint)
 - #134760 (Migrate `branch-protection-check-IBT` to rmake.rs)
 - #134829 (Migrate `libs-through-symlink` to rmake.rs)
 - #134832 (Update `compiler-builtins` to 0.1.140)
 - #134840 (compiletest: Only pass the post-colon value to `parse_normalize_rule`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-28 08:26:48 +00:00
Stuart Cook
41c74f4fb6
Rollup merge of #134840 - Zalathar:normalize, r=jieyouxu
compiletest: Only pass the post-colon value to `parse_normalize_rule`

Addresses one of the FIXMEs noted in #134759.

I started working on the other FIXME, but it became complex enough that I wanted to split it off from this PR.

r? jieyouxu
2024-12-28 16:50:39 +11:00
Stuart Cook
d21cdf78f9
Rollup merge of #134832 - tgross35:update-builtins, r=tgross35
Update `compiler-builtins` to 0.1.140

Nothing significant here, just syncing the following small changes:

- https://github.com/rust-lang/compiler-builtins/pull/727
- https://github.com/rust-lang/compiler-builtins/pull/730
- https://github.com/rust-lang/compiler-builtins/pull/736
- https://github.com/rust-lang/compiler-builtins/pull/737
2024-12-28 16:50:38 +11:00
Stuart Cook
3048c4adfc
Rollup merge of #134829 - jieyouxu:migrate-libs-through-symlinks, r=lqd
Migrate `libs-through-symlink` to rmake.rs

Part of https://github.com/rust-lang/rust/issues/121876.

This PR migrates `tests/run-make/libs-through-symlink/` to use rmake.rs.

- Regression test for #13890.
- Original fix PR is #13903.
- Document test intent, backlink to #13890 and fix PR #13903.
- Fix the test logic: the `Makefile` version seems to not actually be exercising the "library search traverses symlink" logic, because the actual symlinked-to-library is present under the `$(TMPDIR)` directory tree when `bar.rs` is compiled, because the `$(RUSTC)` invocation has an implicit `-L $(TMPDIR)`. The symlink itself was actually broken, i.e. it should've been `ln -nsf $(TMPDIR)/outdir/$(NAME) $(TMPDIR)` but it used `ln -nsf outdir/$(NAME) $(TMPDIR)`. The rmake.rs version now explicitly separates the two directory trees and sets the CWD of the `bar.rs` rustc invocation so that the actual library is *not* present under its CWD tree.

I.e. it is now

```
$test_output/           # rustc foo.rs -o actual_lib_dir/libfoo.rlib
    actual_lib_dir/
        libfoo.rlib
    symlink_lib_dir/    # CWD set; rustc -L . bar.rs
        libfoo.rlib --> $test_output/actual_lib_dir/libfoo.rlib
```

Partially supersedes #129011.
This PR is co-authored with `@Oneirical.`

r? compiler
2024-12-28 16:50:38 +11:00
Stuart Cook
dd03fba6dd
Rollup merge of #134760 - jieyouxu:enable-branch-protection-check-IBT, r=lqd
Migrate `branch-protection-check-IBT` to rmake.rs

- The Makefile version *never* ran because of Makefile syntax confusion because `ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86_64)` [compares `x86` to `x86_64`, which always evaluates to false](https://github.com/rust-lang/rust/pull/126720#discussion_r1646808973).
- The test would've always failed because precompiled std is not built with `-Z cf-protection=branch`, but linkers require all input object files to indicate IBT support in order to enable IBT for the executable, which is not the case for std.
- Thus, the test input file is instead changed to a `no_std` program.
- The test is currently limited to only `x86_64-unknown-linux-gnu` host, there are various other problems when the test is cross-compiled that I didn't want to fix atm, and is left as an exercise for the `-Z cf-protection` implementers.

The GNU property note was added by #110304 in order to address #103001.

Partially supersedes #129156.
The rmake.rs port was initially authored by `@Rejyr` in #126720.
This PR is co-authored with `@Oneirical` and `@Rejyr.`

r? `@bjorn3` or reroll

try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: x86_64-msvc
try-job: x86_64-apple-1
try-job: x86_64-apple-2
2024-12-28 16:50:37 +11:00
Stuart Cook
3e3db73c9b
Rollup merge of #134737 - estebank:deive-lint-default-fields-base, r=compiler-errors
Implement `default_overrides_default_fields` lint

Detect when a manual `Default` implementation isn't using the existing default field values and suggest using `..` instead:

```
error: `Default` impl doesn't use the declared default field values
  --> $DIR/manual-default-impl-could-be-derived.rs:14:1
   |
LL | / impl Default for A {
LL | |     fn default() -> Self {
LL | |         A {
LL | |             y: 0,
   | |                - this field has a default value
...  |
LL | | }
   | |_^
   |
   = help: use the default values in the `impl` with `Struct { mandatory_field, .. }` to avoid them diverging over time
note: the lint level is defined here
  --> $DIR/manual-default-impl-could-be-derived.rs:5:9
   |
LL | #![deny(default_overrides_default_fields)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

r? `@compiler-errors`

This is a simpler version of #134441, detecting the simpler case when a field with a default should have not been specified in the manual `Default::default()`, instead using `..` for it. It doesn't provide any suggestions, nor the checks for "equivalences" nor whether the value used in the imp being used would be suitable as a default field value.
2024-12-28 16:50:36 +11:00