1
Fork 0
Commit graph

286833 commits

Author SHA1 Message Date
Antoni Boucher
4b5940ad77 Fix overflow operations 2025-04-17 08:50:06 -04:00
Antoni Boucher
0d773175cc Add support for simd_insert_dyn and simd_extract_dyn 2025-04-17 08:50:02 -04:00
Antoni Boucher
bb1e6a3193 Fix tests 2025-04-17 08:49:55 -04:00
Antoni Boucher
6504f4c09c Format 2025-04-17 08:49:52 -04:00
Antoni Boucher
bc0bc8d5e1 Fix int_to_float_cast for f128 2025-04-17 08:49:49 -04:00
Antoni Boucher
ec44cfdfb4 Fix tests 2025-04-17 08:49:44 -04:00
Antoni Boucher
ecf0a1eea3 Update GCC version 2025-04-17 08:49:41 -04:00
Antoni Boucher
5cf2bbc4e2 Fix clippy warnings 2025-04-17 08:49:37 -04:00
Antoni Boucher
f9822772e8 Fix libcore tests 2025-04-17 08:49:33 -04:00
Antoni Boucher
9a453d46f4 Update other patches 2025-04-17 08:49:30 -04:00
Antoni Boucher
e1fa74b4a9 Implement copysignf128 2025-04-17 08:49:24 -04:00
Antoni Boucher
5c832e5ece Remove most of builtins hack since it's not necessary anymore 2025-04-17 08:49:21 -04:00
Antoni Boucher
be75a58538 Fix compilation 2025-04-17 08:49:15 -04:00
Antoni Boucher
cc81c706e4 Fix patches 2025-04-17 08:49:08 -04:00
Antoni Boucher
c1d21003bb Update to nightly-2025-04-17 2025-04-17 08:34:54 -04:00
Antoni Boucher
90c6c9f6a9 Merge branch 'master' into sync_from_rust_2025_04_17 2025-04-17 08:34:28 -04:00
Jieyou Xu
6c5a481f93
tests: remove unused auxiliaries under tests/ui/directory_ownership/ 2025-04-17 19:45:28 +08:00
Jieyou Xu
89cac55bb8
tests: use //@ ignore-auxiliary with backlinked primary test file 2025-04-17 19:45:28 +08:00
petr sumbera - Sun Microsystems - Prague Czech Republic
35a4140723 update libc 2025-04-17 13:39:46 +02:00
bors
883f9f72e8 Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #138632 (Stabilize `cfg_boolean_literals`)
 - #139416 (unstable book; document `macro_metavar_expr_concat`)
 - #139782 (Consistent with treating Ctor Call as Struct in liveness analysis)
 - #139885 (document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book)
 - #139904 (Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests)
 - #139932 (transmutability: Refactor tests for simplicity)
 - #139944 (Move eager translation to a method on Diag)
 - #139948 (git: ignore `60600a6fa4` for blame purposes)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-17 11:21:54 +00:00
Jieyou Xu
6bbee334fd
rustc-dev-guide: document //@ ignore-auxiliary 2025-04-17 18:52:57 +08:00
Jieyou Xu
d1178faa93
tests: refine disable reason for tests/debuginfo/drop-locations.rs 2025-04-17 18:52:57 +08:00
Jieyou Xu
d20f848478
compiletest: add specific //@ ignore-auxiliary for test support files
This is for files that *participate* in actual tests but should not be
built by `compiletest` (i.e. these files are involved through `mod xxx;`
or `include!()` or `#[path = "xxx"]`, etc.).

A specialized directive like `//@ ignore-auxiliary` makes it way easier
to audit disabled tests via `//@ ignore-test`.
2025-04-17 18:52:56 +08:00
lcnr
c85b5fcd07 check OpaqueCast tests with next-solver 2025-04-17 12:41:20 +02:00
lcnr
289a23e0e2 do not emit OpaqueCast projections with -Znext-solver 2025-04-17 12:15:04 +02:00
Maksim Bondarenkov
62a104d99e opt-dist: add a flag for running tests
when using `opt-dist local` user probably won't need to run tests (for
various reasons). currently the only way to disable them is to set
`TRY_DIST_BUILD=1`, which is not obvious and can be bad for non-CI
envronments (as I guess)
2025-04-17 13:01:22 +03:00
Maksim Bondarenkov
bf2696311b bootstrap: enable zlib for LLVM when we compile it for profiling
when compiling target LLVM with `opt-dist local` on Windows/MinGW,
profraw files are being compressed with zlib, so compiling without it
will make `llvm-profdata` complain about lacking of zlib support. this
error is shown:

`profile uses zlib compression but the profile reader was built without
zlib support`

example from llvm test suite: 76b5fcbf97/llvm/test/tools/llvm-profdata/nocompress.test (L15)
2025-04-17 12:53:17 +03:00
bors
94015d3cd4 Auto merge of #139926 - weihanglo:update-cargo, r=weihanglo
Update cargo

4 commits in 864f74d4eadcaea3eeda37a2e7f4d34de233d51e..d811228b14ae2707323f37346aee3f4147e247e6
2025-04-11 20:37:27 +0000 to 2025-04-15 15:18:42 +0000
- use `zlib-rs` for gzip compression in rust code (rust-lang/cargo#15417)
- test(rustfix): Use `snapbox` for snapshot testing (rust-lang/cargo#15429)
- chore(deps): update rust crate gix to 0.71.0 [security] (rust-lang/cargo#15391)
- Make sure search paths inside OUT_DIR precede external paths (rust-lang/cargo#15221)

Also,

* The license exception of sha1_smol with BSD-3-Clause is no longer needed, as `gix-*` doesn't depend on it.
* Cargo depends on zlib-rs, which is distributed under Zlib license

r? ghost
2025-04-17 08:07:28 +00:00
León Orell Valerian Liehr
82ff0a0e6a
rustdoc: Properly clean fn params in all contexts 2025-04-17 08:55:53 +02:00
León Orell Valerian Liehr
62146748d8
rustdoc/clean: Change terminology of items pertaining to (formal) fn params from "argument" to "parameter" 2025-04-17 08:55:50 +02:00
bors
15c4ccef03 Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #135340 (Add `explicit_extern_abis` Feature and Enforce Explicit ABIs)
 - #139440 (rustc_target: RISC-V: feature addition batch 2)
 - #139667 (cfi: Remove #[no_sanitize(cfi)] for extern weak functions)
 - #139828 (Don't require rigid alias's trait to hold)
 - #139854 (Improve parse errors for stray lifetimes in type position)
 - #139889 (Clean UI tests 3 of n)
 - #139894 (Fix `opt-dist` CLI flag and make it work without LLD)
 - #139900 (stepping into impls for normalization is unproductive)
 - #139915 (replace some #[rustc_intrinsic] usage with use of the libcore declarations)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-17 04:52:34 +00:00
Matthias Krüger
7650fe95b1
Rollup merge of #139948 - jieyouxu:ignore-breakup-commit, r=onur-ozkan
git: ignore `60600a6fa4` for blame purposes

60600a6fa4 was simply breaking up compiletest's `runtest.rs` and isn't very useful in git blame.

r? `@onur-ozkan`
2025-04-17 06:25:18 +02:00
Matthias Krüger
059b7d07ef
Rollup merge of #139944 - shepmaster:eager-diagnostics, r=nnethercote
Move eager translation to a method on Diag

This will allow us to eagerly translate messages on a top-level diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the awkward closure passed into Subdiagnostic and make better use of `Into`.

r? `@nnethercote`
2025-04-17 06:25:18 +02:00
Matthias Krüger
a7af610058
Rollup merge of #139932 - joshlf:transmute-simplify-tests, r=jswrenn
transmutability: Refactor tests for simplicity

r? `@jswrenn`
2025-04-17 06:25:18 +02:00
Matthias Krüger
4a83f43e63
Rollup merge of #139904 - ferrocene:lw-wkumpwrytvtp, r=nnethercote,jieyouxu
Explicitly annotate edition for `unpretty=expanded` and `unpretty=hir` tests

These emit prelude imports which means they are always edition dependent and so running them with a different `--edition` will fail.
2025-04-17 06:25:17 +02:00
Matthias Krüger
4e2fc09570
Rollup merge of #139885 - jyn514:doc-rustc-bootstrap, r=Nadrieril
document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book

[rendered](https://github.com/jyn514/rust/blob/doc-rustc-bootstrap/src/doc/unstable-book/src/compiler-flags/rustc-bootstrap.md)
mcp: https://github.com/rust-lang/compiler-team/issues/863
2025-04-17 06:25:17 +02:00
Matthias Krüger
0757d24f71
Rollup merge of #139782 - xizheyin:issue-139627, r=wesleywiser
Consistent with treating Ctor Call as Struct in liveness analysis

Fixes #139627

When `ExprKind::Call` is a `Ctor`, skips the checking of `expr` and only checks the arguments, thus being consistent with `ExprKind::Struct`.

r? compiler
2025-04-17 06:25:16 +02:00
Matthias Krüger
6426050b68
Rollup merge of #139416 - mejrs:metavar, r=tgross35
unstable book; document `macro_metavar_expr_concat`

Rendered:

![image](https://github.com/user-attachments/assets/25c6d1fa-dac4-4c28-869f-e053b9384e59)
![image](https://github.com/user-attachments/assets/caa11e61-6321-4646-bf53-a1d31fca39f4)
![image](https://github.com/user-attachments/assets/52dc788f-1764-4a75-9fc3-e0fdefd30642)
![image](https://github.com/user-attachments/assets/2fd2ba06-b8e3-4341-83ec-0ea686efdde2)

cc `@c410-f3r`
2025-04-17 06:25:15 +02:00
Matthias Krüger
0de803c38d
Rollup merge of #138632 - clubby789:stabilize-cfg-boolean-lit, r=davidtwco,Urgau,traviscross
Stabilize `cfg_boolean_literals`

Closes #131204
`@rustbot` labels +T-lang +I-lang-nominated
This will end up conflicting with the test in #138293 so whichever doesn't land first will need updating

--

# Stabilization Report

## General design

### What is the RFC for this feature and what changes have occurred to the user-facing design since the RFC was finalized?

[RFC 3695](https://github.com/rust-lang/rfcs/pull/3695), none.

### What behavior are we committing to that has been controversial? Summarize the major arguments pro/con.

None

### Are there extensions to this feature that remain unstable? How do we know that we are not accidentally committing to those?

None

## Has a call-for-testing period been conducted? If so, what feedback was received?

Yes; only positive feedback was received.

## Implementation quality

### Summarize the major parts of the implementation and provide links into the code (or to PRs)

Implemented in [#131034](https://github.com/rust-lang/rust/pull/131034).

### Summarize existing test coverage of this feature

- [Basic usage, including `#[cfg()]`, `cfg!()` and `#[cfg_attr()]`](6d71251cf9/tests/ui/cfg/true-false.rs)
- [`--cfg=true/false` on the command line being accessible via `r#true/r#false`](6d71251cf9/tests/ui/cfg/raw-true-false.rs)
- [Interaction with the unstable `#[doc(cfg(..))]` feature](6d71251/tests/rustdoc-ui/cfg-boolean-literal.rs)
- [Denying `--check-cfg=cfg(true/false)`](6d71251/tests/ui/check-cfg/invalid-arguments.rs)
- Ensuring `--cfg false` on the command line doesn't change the meaning of `cfg(false)`: `tests/ui/cfg/cmdline-false.rs`
- Ensuring both `cfg(true)` and `cfg(false)` on the same item result in it being disabled: `tests/ui/cfg/both-true-false.rs`

### What outstanding bugs in the issue tracker involve this feature? Are they stabilization-blocking?

The above mentioned issue; it should not block as it interacts with another unstable feature.

### What FIXMEs are still in the code for that feature and why is it ok to leave them there?

None

### Summarize contributors to the feature by name for recognition and assuredness that people involved in the feature agree with stabilization
- `@clubby789` (RFC)
- `@Urgau` (Implementation in rustc)

### Which tools need to be adjusted to support this feature. Has this work been done?

`rustdoc`'s  unstable`#[doc(cfg(..)]` has been updated to respect it. `cargo` has been updated with a forward compatibility lint to enable supporting it in cargo once stabilized.

## Type system and execution rules

### What updates are needed to the reference/specification? (link to PRs when they exist)

A few lines to be added to the reference for configuration predicates, specified in the RFC.
2025-04-17 06:25:15 +02:00
Jieyou Xu
5636312c71
git: ignore 60600a6fa4 for blame purposes
It was simply breaking up compiletest's `runtest.rs` and isn't very
useful in git blame.
2025-04-17 11:50:24 +08:00
Nicholas Nethercote
99a60eb97f intern_with_temp_alloc is for DummyMachine only. 2025-04-17 13:08:31 +10:00
Nicholas Nethercote
675360ae4e Remove some unnecessary lifetimes.
`FlowSensitiveAnalysis` is only instantiated with the first two
lifetimes being the same.
2025-04-17 13:07:40 +10:00
Jake Goulding
0117884917 Move eager translation to a method on Diag
This will allow us to eagerly translate messages on a top-level
diagnostic, such as a `LintDiagnostic`. As a bonus, we can remove the
awkward closure passed into Subdiagnostic and make better use of
`Into`.
2025-04-16 21:38:59 -04:00
bors
79a272c640 Auto merge of #139938 - matthiaskrgr:rollup-19ddpus, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #139084 (hygiene: Rename semi-transparent to semi-opaque)
 - #139236 (Use a session counter to make anon dep nodes unique)
 - #139650 (Fix `register_group_alias` for tools)
 - #139770 (Rename `LifetimeName` as `LifetimeKind`.)
 - #139846 (Remove `kw::Empty` uses in rustdoc)
 - #139891 (Include optional dso_local marker for functions in `enum-match.rs`)
 - #139908 (parser: Remove old diagnostic notes for type ascription syntax)
 - #139917 (fix for multiple `#[repr(align(N))]` on functions)

Failed merges:

 - #139615 (Remove `name_or_empty`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-17 01:38:17 +00:00
León Orell Valerian Liehr
9f548e298d
Support inlined cross-crate re-exported trait aliases 2025-04-17 02:35:05 +02:00
jyn
a114bcffe7 document RUSTC_BOOTSTRAP, RUSTC_OVERRIDE_VERSION_STRING, and -Z allow-features in the unstable book 2025-04-16 20:17:16 -04:00
Nicholas Nethercote
846c10fecf Avoid an unwrap in RustcMirAttrs::set_field. 2025-04-17 09:51:32 +10:00
Nicholas Nethercote
2fef0a30ae Replace infallible name_or_empty methods with fallible name methods.
I'm removing empty identifiers everywhere, because in practice they
always mean "no identifier" rather than "empty identifier". (An empty
identifier is impossible.) It's better to use `Option` to mean "no
identifier" because you then can't forget about the "no identifier"
possibility.

Some specifics:
- When testing an attribute for a single name, the commit uses the
  `has_name` method.
- When testing an attribute for multiple names, the commit uses the new
  `has_any_name` method.
- When using `match` on an attribute, the match arms now have `Some` on
  them.

In the tests, we now avoid printing empty identifiers by not printing
the identifier in the `error:` line at all, instead letting the carets
point out the problem.
2025-04-17 09:50:52 +10:00
Nicholas Nethercote
7e1f2f9c54 Augment some tests involving attributes.
This shows places where the use of `name_or_empty` causes problems, i.e.
we print empty identifiers in error messages:
```
error: unrecognized field name ``
error: `` isn't a valid `#[macro_export]` argument
`#[no_sanitize()]` should be applied to a function
```
(The last one is about an attribute `#[no_sanitize("address")]`.)

The next commit will fix these.
2025-04-17 09:50:52 +10:00
Nicholas Nethercote
400e8e5dc8 Fix attribute printing in an error.
The current code assumes that the attribute is just an identifier, and
so misprints paths.
2025-04-17 09:50:52 +10:00