Philipp Krones
14af404672
Merge remote-tracking branch 'upstream/master' into rustup
2024-12-26 14:46:57 +01:00
Oli Scherer
acf9177431
Add some convenience helper methods on hir::Safety
2024-12-14 20:31:07 +00:00
Samuel Moelius
92badb3d19
typing_env_env_for_derived_eq -> typing_env_for_derived_eq
2024-12-01 11:07:56 -05:00
Philipp Krones
d58b911e01
Merge commit ' ff4a26d442' into clippy-subtree-update
2024-11-28 19:38:59 +01:00
Philipp Krones
b24360aa87
Merge remote-tracking branch 'upstream/master' into rustup
2024-11-28 18:56:49 +01:00
lcnr
78fa111a48
no more Reveal :(
2024-11-23 13:52:54 +01:00
lcnr
d8e5f7ad8a
remove TypingMode::from_param_env in clippy
2024-11-19 19:31:02 +01:00
Philipp Krones
1ceaa90413
Merge commit ' 786fbd6d68' into clippy-subtree-update
2024-11-14 19:35:26 +01:00
Jacherr
89210d7c5a
new lint unnecessary_map_or
2024-11-12 23:00:26 +00:00
Philipp Krones
6ced8c33c0
Merge commit ' f712eb5cdc' into clippy-subtree-update
2024-11-07 22:37:01 +01:00
Philipp Krones
b816d4ee4f
Merge remote-tracking branch 'upstream/master' into rustup
2024-11-07 17:22:32 +01:00
GnomedDev
44c2a82972
Swap Visitors to early exit, instead of storing poison flag
2024-11-04 23:49:25 +00:00
Samuel Tardieu
0c1ef98454
Use match ergonomics compatible with editions 2021 and 2024
2024-10-30 11:22:17 +01:00
Deadbeef
350d1c4aee
Effects cleanup
...
- removed extra bits from predicates queries that are no longer needed in the new system
- removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
2024-10-26 10:19:07 +08:00
Philipp Krones
277c4e4baf
Merge commit ' aa0d551351' into clippy-subtree-update
2024-10-03 16:32:51 +02:00
Philipp Krones
d300cdfcda
Merge remote-tracking branch 'upstream/master' into rustup
2024-10-03 14:47:50 +02:00
bors
52b31180b2
Auto merge of #130778 - flip1995:clippy-subtree-update, r=Manishearth
...
Clippy subtree update
r? `@Manishearth`
Really delayed sync (2 1/2 weeks), because of a `debug_assertion` we hit, and I didn't have the time to investigate earlier.
It would be nice to merge this PR with some priority, as it includes a lot of formatting changes due to the rustfmt bump.
Include Cargo.lock update due to Clippy version bump and ui_test bump in Clippy.
2024-09-25 11:40:41 +00:00
Michael Goulet
f8969853eb
Fix tools
2024-09-24 10:12:05 -04:00
Philipp Krones
b61fcbee76
Merge commit ' 7901289135' into clippy-subtree-update
2024-09-24 11:58:04 +02:00
Philipp Krones
3ab1da8bab
Formatting
2024-09-22 20:52:15 +02:00
Philipp Krones
f67f72695a
Merge commit ' c9139bd546' into clippy-subtree-update
2024-05-30 10:49:05 +02:00
bors
37dfd973b7
Auto merge of #125077 - spastorino:add-new-fnsafety-enum2, r=jackh726
...
Rename Unsafe to Safety
Alternative to #124455 , which is to just have one Safety enum to use everywhere, this opens the posibility of adding `ast::Safety::Safe` that's useful for unsafe extern blocks.
This leaves us today with:
```rust
enum ast::Safety {
Unsafe(Span),
Default,
// Safe (going to be added for unsafe extern blocks)
}
enum hir::Safety {
Unsafe,
Safe,
}
```
We would convert from `ast::Safety::Default` into the right Safety level according the context.
2024-05-18 19:35:24 +00:00
Santiago Pastorino
0590d71ce2
Rename Unsafe to Safety
2024-05-17 18:33:37 -03:00
Michael Goulet
6b371469bf
Fix tools
2024-05-16 14:24:23 -04:00
Michael Goulet
9523b3fbf0
Rename Generics::params to Generics::own_params
2024-05-09 20:58:46 -04:00
Philipp Krones
a5aaf33422
Merge commit ' ca3b393750' into clippy-subtree-update
2024-04-18 17:48:52 +02:00
Philipp Krones
0ae4a048c6
Merge commit ' 9725c4a162' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Michael Goulet
6b04fc24fc
Fix clippy
2024-03-22 11:16:57 -04:00
Philipp Krones
7e83df4068
Merge commit ' 93f0a9a91f' into clippy-subtree-update
2024-03-07 17:19:29 +01:00
Philipp Krones
798865c593
Merge commit ' 66c29b973b' into clippy-subtree-update
2024-01-25 19:17:36 +01:00
Guillaume Gomez
8b0931a2ba
Rollup merge of #120000 - smoelius:fix-clippy, r=fee1-dead
...
Ensure `callee_id`s are body owners
This PR makes the `callee_id` argument of Clippy's `implements_trait_with_env` optional, and when it is passed, ensures it is a body owner.
#118661 added the `callee_id` parameter to alleviate an ICE. Specifically, the `callee_id` is used to determine an "effect arg" in certain situations.
Frankly, I [do not completely understand](https://github.com/rust-lang/rust/pull/118661#discussion_r1449013176 ) what an "effect arg" is. But the code that determines it seems to require that `callee_id` is a body owner:
- 1ead4761e9/src/tools/clippy/clippy_utils/src/ty.rs (L286-L288)
- 1ead4761e9/compiler/rustc_middle/src/ty/util.rs (L834)
- 1ead4761e9/compiler/rustc_middle/src/hir/map/mod.rs (L372)
In the current head, some def ids passed as `callee_id`s are not body owners. This PR fixes that.
cc ``@rust-lang/clippy``
r? ``@fee1-dead``
2024-01-20 20:06:34 +01:00
Oli Scherer
4488653ec6
Fix clippy
2024-01-17 10:02:32 +00:00
Samuel Moelius
ad2a2ba94d
Ensure callee_ids are body owners
2024-01-15 12:26:45 -05:00
Deadbeef
782520088f
fix clippy
2023-12-10 13:10:46 +00:00
Philipp Krones
c9a43b18f1
Merge commit ' f0cdee4a3f' into clippy-subtree-sync
2023-12-01 18:21:58 +01:00
Vadim Petrochenkov
bf86fe130c
rustc: hir().local_def_id_to_hir_id() -> tcx.local_def_id_to_hir_id() cleanup
2023-11-26 12:41:21 +03:00
Philipp Krones
6246f0446a
Merge commit ' edb720b199' into clippyup
2023-11-16 19:13:24 +01:00
bors
2d9af160af
Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb
...
`rustc_span` cleanups
Just some things I found while looking over this crate.
r? `@oli-obk`
2023-11-03 14:57:40 +00:00
Philipp Krones
77c1e3aaa1
Merge commit ' 09ac14c901' into clippyup
2023-11-02 17:35:56 +01:00
Nicholas Nethercote
e1ec2d5cc9
Minimize pub usage in source_map.rs.
...
Most notably, this commit changes the `pub use crate::*;` in that file
to `use crate::*;`. This requires a lot of `use` items in other crates
to be adjusted, because everything defined within `rustc_span::*` was
also available via `rustc_span::source_map::*`, which is bizarre.
The commit also removes `SourceMap::span_to_relative_line_string`, which
is unused.
2023-11-02 19:35:00 +11:00
Deadbeef
272df70b50
treat host effect params as erased generics in codegen
...
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
2023-09-14 07:34:35 +00:00
Philipp Krones
f730a2655a
Merge commit ' 1e8fdf4928' into clippyup
2023-08-11 14:05:13 +02:00
Deadbeef
b07de24a58
Remove constness from TraitPredicate
2023-08-02 15:38:00 +00:00
Philipp Krones
b0e64a9c09
Merge commit ' 5436dba826' into clippyup
2023-07-31 23:53:53 +02:00
Deadbeef
be0b4d5a9b
Remove constness from ParamEnv
2023-07-27 15:50:42 +00:00
Philipp Krones
d6d530fd0b
Merge commit ' d9c24d1b1e' into clippyup
2023-07-17 10:22:32 +02:00
Mahdi Dibaiee
fdb2e363d3
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Philipp Krones
cb3ecf7b79
Merge commit ' 37f4c1725d' into clippyup
2023-07-02 14:59:02 +02:00
Michael Goulet
716c552632
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Michael Goulet
b2c7ce8908
s/Clause/ClauseKind
2023-06-19 14:57:42 +00:00