Commit graph

298901 commits

Author SHA1 Message Date
Orson Peters
aff29df28e Remove unneeded feature 2025-05-29 02:48:57 +02:00
Orson Peters
22c5e1d686 Add test 2025-05-29 02:47:23 +02:00
bors
ebe9b00602 Auto merge of #141693 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-05-28 23:05:24 +00:00
antoyo
706905ba01
Merge pull request #669 from FractalFir/y_cargo_tests
modifed y.sh to allow for running cargo tests.
2025-05-28 18:42:51 -04:00
antoyo
967fc294ca
Merge pull request #688 from FractalFir/fuzz_support
Add support for easily fuzzing `cg_gcc` with rustlantis
2025-05-28 18:41:07 -04:00
michal kostrubiec
ea03697899 Removed some env vars from the CI 2025-05-29 00:20:23 +02:00
michal kostrubiec
22ca124575 Added support for easy fuzzing with rustlantis 2025-05-29 00:18:13 +02:00
michal kostrubiec
d098c8a2be modifed y.sh to allow for running cargo tests. 2025-05-28 23:45:53 +02:00
Alona Enraght-Moony
2c9fb22f04 jsondoclint: Extract Command/CommandKind into its own file 2025-05-28 21:16:15 +00:00
Trevor Gross
5978b8b875 aarch64: Add a note saying why we use frintx rather than frintn 2025-05-28 21:10:28 +00:00
许杰友 Jieyou Xu (Joe)
f3cca6a281
Merge pull request #2420 from rust-lang/aDotInTheVoid-patch-1
directives.md: Fix `//@ build_aux_docs` -> `//@ build-aux-docs`
2025-05-29 05:04:46 +08:00
许杰友 Jieyou Xu (Joe)
c3dc77f4d1
Merge pull request #2421 from aDotInTheVoid/slashslashat
Fix some old `// <directive>` to `//@ <directive>`
2025-05-29 05:03:49 +08:00
Ralf Jung
99e783d4e9 atomic_load intrinsic: use const generic parameter for ordering 2025-05-28 22:57:55 +02:00
Ralf Jung
dbbfb6e08b get rid of rustc_codegen_ssa::common::AtomicOrdering 2025-05-28 22:57:55 +02:00
Ralf Jung
a387c86a92 get rid of rustc_codegen_ssa::common::AtomicOrdering 2025-05-28 22:57:55 +02:00
Ralf Jung
4794ea176b atomic_load intrinsic: use const generic parameter for ordering 2025-05-28 22:57:55 +02:00
bjorn3
0c6f946b82 Remove unused arg_memory_ty method 2025-05-28 20:55:00 +00:00
bjorn3
865c7b9c78 Remove unused arg_memory_ty method 2025-05-28 20:55:00 +00:00
bjorn3
244ea125f1 Mark all optimize methods and the codegen method as safe
There is no safety contract and I don't think any of them can actually
cause UB in more ways than passing malicious source code to rustc can.
While LtoModuleCodegen::optimize says that the returned ModuleCodegen
points into the LTO module, the LTO module has already been dropped by
the time this function returns, so if the returned ModuleCodegen indeed
points into the LTO module, we would have seen crashes on every LTO
compilation, which we don't. As such the comment is outdated.
2025-05-28 20:55:00 +00:00
bjorn3
f0707fad31 Mark all optimize methods and the codegen method as safe
There is no safety contract and I don't think any of them can actually
cause UB in more ways than passing malicious source code to rustc can.
While LtoModuleCodegen::optimize says that the returned ModuleCodegen
points into the LTO module, the LTO module has already been dropped by
the time this function returns, so if the returned ModuleCodegen indeed
points into the LTO module, we would have seen crashes on every LTO
compilation, which we don't. As such the comment is outdated.
2025-05-28 20:55:00 +00:00
bjorn3
96be6effa4 Remove methods from StaticCodegenMethods that are not called in cg_ssa itself 2025-05-28 20:55:00 +00:00
bjorn3
d7c0bde0c1 Remove methods from StaticCodegenMethods that are not called in cg_ssa itself 2025-05-28 20:55:00 +00:00
bjorn3
f297400574 Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
bjorn3
669e2ea848 Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
bjorn3
4d47f6d72d Remove a couple of uses of interior mutability around statics 2025-05-28 20:55:00 +00:00
bjorn3
0809b41cd9 Move supports_parallel from CodegenBackend to ExtraBackendMethods
It is only relevant when using cg_ssa for driving compilation.
2025-05-28 20:55:00 +00:00
bjorn3
f6489c325f Remove codegen_unit from MiscCodegenMethods 2025-05-28 20:55:00 +00:00
bjorn3
0fd257d66c Remove a couple of uses of interior mutability around statics 2025-05-28 20:55:00 +00:00
bjorn3
a4cb1c72c5 Reduce amount of types that need to be PartialEq 2025-05-28 20:55:00 +00:00
bjorn3
5b0ab2cbdd The personality function is a Function, not a Value 2025-05-28 20:55:00 +00:00
bjorn3
c593c01703 Remove codegen_unit from MiscCodegenMethods 2025-05-28 20:55:00 +00:00
Guillaume Gomez
9e5dd51166 Remove checks that are run with tidy 2025-05-28 22:37:08 +02:00
Guillaume Gomez
0527f027e8 Add eslint as part of tidy run 2025-05-28 22:37:08 +02:00
Dario Damiani
c04f133858 Typo in README.md
Link to Apache License changed from htps:// to https://
2025-05-28 15:51:49 -04:00
Alona Enraght-Moony
ea6238e1d0 Fix some old // <directive> to //@ <directive> 2025-05-28 20:32:56 +01:00
Alona Enraght-Moony
084e8d9db1
directives.md: Fix //@ build_aux_docs -> //@ build-aux-docs 2025-05-28 20:18:56 +01:00
Samuel Tardieu
3c8bfd144b
zombie_processes: do not complain about early early returns
If an early return is found under the HIR local declaration node but
before the child process is created, it should not trigger the lint
because the child process has not yet been created.
2025-05-28 20:40:05 +02:00
Eric Holk
9f2ee0f4fb
Add eholk to compiler reviewer rotation
Now that we have work queue limits on triagebot, I'm happy to share some
of the review load.
2025-05-28 11:30:18 -07:00
bors
6f69710780 Auto merge of #141696 - tgross35:rollup-fhpj180, r=tgross35
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#140369 (Add data_ptr method to Mutex and RwLock)
 - rust-lang/rust#140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`)
 - rust-lang/rust#141404 (Improve intrinsic handling in cg_ssa)
 - rust-lang/rust#141411 (rustdoc: linking to a local proc macro no longer warns)
 - rust-lang/rust#141548 (consider glob imports in cfg suggestion)
 - rust-lang/rust#141627 (Drop-build cleanups)
 - rust-lang/rust#141670 (Fix ICE in tokenstream with contracts from parser recovery)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-28 17:32:45 +00:00
Ralf Jung
5a38c32c6d
Merge pull request #4354 from RalfJung/before_stack_pop
fix comment in before_stack_pop
2025-05-28 16:46:10 +00:00
Lukas Lueg
200d742984 Clarify &mut-methods' docs on sync::OnceLock 2025-05-28 18:31:28 +02:00
Jason Newcomb
beaf15532a
while_let_loop: Include let assignment in suggestion (#14756)
Placeholders are still given for the content of the whole block.
However, if the result of the original `if let` or `match` expression
was assigned, the assignment is reflected in the suggestion.

No-op assignments (`let x = x;`) are skipped though, unless they contain
an explicit type which might help the compiler (`let x: u32 = x;` is
kept).

Closes rust-lang/rust-clippy#362

changelog: [`while_let_loop`]: include `let` assignment in suggestion
2025-05-28 16:26:14 +00:00
Ralf Jung
6b8a92201e fix comment in before_stack_pop 2025-05-28 18:18:39 +02:00
Samuel Tardieu
b90880d408
Optimize unit_return_expecting_ord (#14905)
This lint was previously written very clumsily, not short-circuiting and
doing a lot of unnecessary work.

Now it makes sure to do the cheaper functions earlier and in general, is
just smarter.
(I specifically focused on minimizing binder instantiation

Sadly, I'm not finding any relevant result in a benchmark. Still with
the LLVM coverage instruments, the expensive bits are called lots of
less times (The binder instantiation that I care about is reduced from
95k to 10k throughout our test suite).

changelog:[`unit_return_expecting_ord`]: Optimize the lint
2025-05-28 16:05:48 +00:00
blyxyas
7e590de435 Optimize unit_return_expecting_ord
This lint was previously written very clumsily, not
shortcircuiting and doing a lot of unnecessary work.

Now it makes sure to do the cheaper functions earlier
and in general, just be smarter.
(I specifically focused on minimizing binder instantiation)

Also, avoid allocating unnecessarily
2025-05-28 18:00:16 +02:00
Orson Peters
9ffbc62cb6 When replacing an old value we may not drop it in place 2025-05-28 17:53:14 +02:00
Alejandra González
3a1159ed9f
needless_return: look inside else if parts as well (#14798)
`if` expressions don't necessarily contain a block in the `else` part in
the presence of an `else if`. The `else` part, if present, must be
handled as a regular expression, not necessarily as a block expression.

Found while applying Clippy to triagebot and looking at the result. This
also found an issue in Clippy itself.

changelog: [`needless_return`]: look inside `else if` parts as well
2025-05-28 15:42:03 +00:00
Philipp Krones
291b8fd3be
[book] fix the trait checking example code (#14908)
Fix the argument in the example for "Trait Checking".

changelog: none
2025-05-28 15:41:03 +00:00
Alejandra González
a31d3b0fc4
Mark myself as on vacation until June 30 (#14909)
https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/Outside.20rotation.20until.20June.2030/with/520912074

changelog: none
2025-05-28 15:27:29 +00:00
Alex Macleod
4f3d529c88 Remove incremental test, disable incremental for cargo tests 2025-05-28 15:17:32 +00:00