1
Fork 0
Commit graph

287064 commits

Author SHA1 Message Date
Tshepang Mbambo
07b7f00a9e fix broken link 2025-04-19 16:04:22 +02:00
Chris Denton
9ebc73e2b6
Rollup merge of #140025 - Sky9x:re-remove-adtflags-anon, r=compiler-errors
Re-remove `AdtFlags::IS_ANONYMOUS`

Removed in #138296.
I accidentally re-added it in #137043 while resolving merge conflicts. This PR re-removes it.

r? ``@compiler-errors`` (sorry)
2025-04-19 14:01:40 +00:00
Chris Denton
995114908d
Rollup merge of #140016 - pfmooney:illumos-fstatat, r=jhpratt
std: Use fstatat() on illumos
2025-04-19 14:01:40 +00:00
Chris Denton
67a97bad94
Rollup merge of #140007 - roblabla:fix-win7, r=ChrisDenton
Disable has_thread_local on i686-win7-windows-msvc

On Windows 7 32-bit, the alignment characteristic of the TLS Directory don't appear to be respected by the PE Loader, leading to crashes. As a result, let's disable has_thread_local to make sure TLS goes through the emulation layer.

Fixes #138903
2025-04-19 14:01:39 +00:00
Chris Denton
3c5aef3625
Rollup merge of #139922 - jnqnfe:cstr_doc_fix, r=jhpratt
fix incorrect type in cstr `to_string_lossy()` docs

Restoring what it said prior to commit 67065fe in which it was changed incorrectly with no supporting explanation.

Closes #139835.
2025-04-19 14:01:39 +00:00
Chris Denton
d49361a798
Rollup merge of #139919 - GuillaumeGomez:rustdoc-json-1-indexed, r=aDotInTheVoid
Make rustdoc JSON Span column 1-based, just like line numbers

Fixes https://github.com/rust-lang/rust/issues/139906.

This PR does two things:
 1. It makes column 1-indexed as well, just like lines.
 2. It updates documentation about them to mention that they are 1-indexed.

I think it's better for coherency to have them both 1-indexed instead of the weird mix we used to have. Docs for `line` and `col` fields can be found [here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Loc.html#structfield.line).

And finally: it adds a regression test to ensure they are indeed 1-indexed.

r? `@aDotInTheVoid`
2025-04-19 14:01:38 +00:00
Chris Denton
dff14f0634
Rollup merge of #139535 - ChrisDenton:default-ptr, r=tgross35
Implement `Default` for raw pointers

ACP: https://github.com/rust-lang/libs-team/issues/571

This is instantly stable so we will need an FCP here.

Closes https://github.com/rust-lang/rfcs/issues/2464
2025-04-19 14:01:37 +00:00
Chris Denton
103be60afe
Rollup merge of #139297 - RossSmyth:NixClean, r=WaffleLapkin
Deduplicate & clean up Nix shell

1. Deduplicate the flake and shell files
2. Remove flake-utils
3. Remove `with` statements
They are considered bad practice nowadays because the slow down the evalulator and have weird shadowing rules.
4. Use `env`
:3
5. use `callPackage`
It's the recommended way for derivations like these.
6. Use `packages` in the shell
There is no reason to use `buildInputs` for a mkShell (except in funny cases that will not be seen here), so the  `packages` attr is recommended now days.

r? WaffleLapkin
2025-04-19 14:01:37 +00:00
Chris Denton
db98b72e34
Rollup merge of #137454 - mu001999-contrib:fix-137414, r=wesleywiser
not lint break with label and unsafe block

fixes #137414

we can't label unsafe blocks, so that we can do not lint them
2025-04-19 14:01:36 +00:00
The rustc-dev-guide Cronjob Bot
3b2302ec0d Merge from rustc 2025-04-19 13:53:12 +00:00
The rustc-dev-guide Cronjob Bot
a0c64dce0d Preparing for merge from rustc 2025-04-19 13:53:05 +00:00
Tshepang Mbambo
52616fa902
Merge pull request #2344 from rust-lang/tshepang-patch-1
readme: be copy-paste friendly
2025-04-19 13:09:15 +02:00
Tshepang Mbambo
311ef44dca
readme: be copy-paste friendly 2025-04-19 13:08:43 +02:00
Jieyou Xu
b47fe51610
tests: adjust tests/ui/auto-instantiate.rs
- Reformat the test.
- Document test intention.
- Move test under `tests/ui/inference/`.
2025-04-19 18:42:24 +08:00
Jieyou Xu
40b73322b9
tests: adjust some augmented-assignment* tests
- `tests/ui/augmented-assignment-feature-gate-cross.rs`:
  - This was *originally* to feature-gate overloaded OpAssign
    cross-crate, but now let's keep it as a smoke test.
  - Renamed as `augmented-assignment-cross-crate.rs`.
  - Relocated under `tests/ui/binop/`.
-  `tests/ui/augmented-assignments.rs`:
  - Documented test intent.
  - Moved under `tests/ui/borrowck/`.
- `tests/ui/augmented-assignment-rpass.rs`:
  - Renamed to drop the `-rpass` suffix, since this was leftover from
    when `run-pass` test suite was a thing.
  - Moved under `tests/ui/binop/`.
2025-04-19 18:42:24 +08:00
Jieyou Xu
a86df238d3
tests: rework amdgpu-require-explicit-cpu.rs
- Reworked the test as a *centralized* version of checking that certain
  targets correctly require `-C target-cpu` being specified.
- Document test intention.
- Move `amdgpu-require-explicit-cpu.rs` under new dir
  `tests/ui/target-cpu/`
  - No other ui subdir really fits this "requires `-Ctarget-cpu`" check.
2025-04-19 18:42:23 +08:00
Jonathan Gruner
f121c7c360 added test for Enumerate::next_index on empty iterator 2025-04-19 12:29:47 +02:00
Jonathan Gruner
5a71fabe29 added doctest for Enumerate::next_index 2025-04-19 12:29:47 +02:00
Jonathan Gruner
1f491dccba add next_index to Enumerate 2025-04-19 12:29:47 +02:00
bors
a7c39b6861 Auto merge of #139114 - m-ou-se:super-let-pin, r=davidtwco
Implement `pin!()` using `super let`

Tracking issue for super let: https://github.com/rust-lang/rust/issues/139076

This uses `super let` to implement `pin!()`.

This means we can remove [the hack](https://github.com/rust-lang/rust/pull/138717) we had to put in to fix https://github.com/rust-lang/rust/issues/138596.

It also means we can remove the original hack to make `pin!()` work, which used a questionable public-but-unstable field rather than a proper private field.

While `super let` is still unstable and subject to change, it seems safe to assume that future Rust will always have a way to express `pin!()` in a compatible way, considering `pin!()` is already stable.

It'd help [the experiment](https://github.com/rust-lang/rust/issues/139076) to have `pin!()` use `super let`, so we can get some more experience with it.
2025-04-19 08:01:53 +00:00
Manuel Drehwald
b3739f3c0e Only consider MonoItem::Fn when preventing inlining for autodiff source functions 2025-04-19 03:36:02 -04:00
Spencer
3eaa4b9368 Cleaned up 4 tests in tests/ui/issues 2025-04-19 01:10:26 -06:00
Thalia Archibald
93fa96cfba Use struct update syntax for some TargetOptions 2025-04-18 19:49:23 -07:00
Thalia Archibald
670ff84d1c Handle unsupported fallback 2025-04-18 19:49:23 -07:00
Thalia Archibald
37712cc016 Combine env consts into std::sys::env_consts 2025-04-18 19:17:08 -07:00
Sky
d863f81671
Re-remove AdtFlags::IS_ANONYMOUS 2025-04-18 21:40:53 -04:00
bors
2ef7858652 Auto merge of #140015 - GuillaumeGomez:subtree-update_cg_gcc_2025-04-18, r=antoyo
Subtree update GCC backend

cc `@antoyo`
2025-04-19 01:12:39 +00:00
Thalia Archibald
e0d9244472 Sort Unix env constants alphabetically by target_os
They were roughly grouped into Linux, Apple, BSD, and everything else,
roughly in alphabetical order. Alphabetically order them to make it
easier to maintain and discard the Unix-specific groups to generalize it
to all platforms.
2025-04-18 16:35:26 -07:00
Camille GILLOT
bd5c43835a Remove early exits from JumpThreading. 2025-04-18 23:34:37 +00:00
Guillaume Gomez
cc359b8bb6 Fix import 2025-04-19 00:08:03 +02:00
Folkert de Vries
41ddf86722
Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
Guillaume Gomez
84f582665e Fix compilation error in GCC backend 2025-04-18 22:46:43 +02:00
Patrick Mooney
fb3cae08ab std: Use fstatat() on illumos 2025-04-18 14:44:19 -05:00
Guillaume Gomez
c123dc63ea Fix rustc_codegen_gcc/tests/run/return-tuple.rs test 2025-04-18 21:21:15 +02:00
Guillaume Gomez
e4ea67b3d7 Merge commit 'db1a31c243' into subtree-update_cg_gcc_2025-04-18 2025-04-18 21:20:11 +02:00
Guillaume Gomez
076016d55a Update rustdoc-json-types FORMAT_VERSION to 45 2025-04-18 20:34:56 +02:00
Guillaume Gomez
ba9a008d90 Add regression test for span 1-indexed check 2025-04-18 20:32:40 +02:00
Guillaume Gomez
59477a8ab2 Make rustdoc JSON Span column 1-based, just like line numbers 2025-04-18 20:32:40 +02:00
antoyo
db1a31c243
Merge pull request #650 from rust-lang/sync_from_rust_2025_04_17
Sync from rust 2025/04/17
2025-04-18 12:43:27 -04:00
Antoni Boucher
52b06872fe Simplify handling of some SIMD intrinsics 2025-04-18 12:07:10 -04:00
Antoni Boucher
98dd5a30b3 Fix for libgccjit 12 2025-04-18 11:45:30 -04:00
Tamir Duberstein
87072c1d2e
Remove errant doc comment lines 2025-04-18 11:25:36 -04:00
Antoni Boucher
65b87aae21 Support new target builtins 2025-04-18 11:21:32 -04:00
Tamir Duberstein
9058bab9a9
Move <CStr as Debug> test to coretests 2025-04-18 10:31:55 -04:00
Tamir Duberstein
f727b3622b
Invert <CString as Deref>::deref and CString::as_c_str
This is consistent with the style of `ByteString`.
2025-04-18 10:31:12 -04:00
est31
162daaa2fa Remove let_chains feature gate from even more tests 2025-04-18 15:57:29 +02:00
est31
d75f8cde2f Also allow let chains in match guards 2025-04-18 15:57:29 +02:00
est31
eb1639bd33 Add tests to check the situation with heterogenous spans
The edition gate is a bit stricter than the drop behaviour,
which is fine. The cases we want to avoid are the opposite:
not gated but 2021 drop behaviour.
2025-04-18 15:57:29 +02:00
est31
0e91190b05 Remove let_chains feature gate from some places in the testsuite 2025-04-18 15:57:29 +02:00
bors
191df20fca Auto merge of #139996 - matthiaskrgr:rollup-0nka2hw, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #138528 (deref patterns: implement implicit deref patterns)
 - #139393 (rustdoc-json: Output target feature information)
 - #139553 (sync::mpsc: prevent double free on `Drop`)
 - #139615 (Remove `name_or_empty`)
 - #139853 (Disable combining LLD with external llvm-config)
 - #139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions))
 - #139942 (Ignore aix for tests/ui/erros/pic-linker.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-18 13:49:17 +00:00