Nicholas Nethercote
d070e89230
Reduce some pub
exposure.
2024-06-03 08:44:33 +10:00
Oli Scherer
ceb45d5519
Don't require visit_body
to take a lifetime that must outlive the function call
2024-05-29 10:04:08 +00:00
Alex Macleod
2cb53473d9
Rename {enter,exit}_lint_attrs
to check_attributes{,_post}
2024-03-24 14:57:57 +00:00
Guillaume Gomez
b376f49e30
Rename hir::Local
into hir::LetStmt
2024-03-22 20:36:21 +01:00
DaniPopes
f1b7484160
Remove rustc_lint_defs::lint_array
2023-09-28 23:01:25 +02:00
Alex Macleod
17b1026448
Use absolute paths in rustc_lint::passes macros
...
A cosmetic change, so the callsite doesn't have to import things
2023-09-27 15:06:59 +00:00
Michael Howell
62835c9531
diagnostics: avoid wrong unused_parens
on x as (T) < y
2023-08-31 20:14:49 -07:00
Camille GILLOT
3175d03d3b
Take a LocalDefId in hir::Visitor::visit_fn.
2023-01-28 09:51:50 +00:00
yukang
c67903ef21
fix issues in unused lint
2023-01-14 17:11:04 +08:00
Nicholas Nethercote
3c53781800
Reinstate {Early,Late}LintPassObjects
.
...
I removed these in #105291 , and subsequently learned they are necessary
for performance.
This commit reinstates them with the new and more descriptive names
`RuntimeCombined{Early,Late}LintPass`, similar to the existing passes
like `BuiltinCombinedEarlyLintPass`. It also adds some comments,
particularly emphasising how we have ways to combine passes at both
compile-time and runtime. And it moves some comments around.
2022-12-12 08:59:27 +11:00
Nicholas Nethercote
ec117c0ebd
Rename $passes
as $pass
in several macros.
...
Because it makes more sense that way.
2022-12-07 19:29:31 +11:00
Nicholas Nethercote
ac1e69c903
Add some useful comments.
2022-12-07 19:29:31 +11:00
Nicholas Nethercote
0c844730d3
Remove $hir
argument from late_lint_methods!
.
...
Because it's always `'tcx`.
2022-12-07 19:29:26 +11:00
bors
e960b5e774
Auto merge of #104863 - nnethercote:reduce-lint-macros, r=cjgillot
...
Reduce macro usage for lints
r? `@cjgillot`
2022-12-02 15:31:15 +00:00
Nicholas Nethercote
44cb4f70a8
Remove some unnecessary Send
bounds.
...
Required to get the parallel compiler building again.
2022-12-02 13:59:28 +11:00
Nicholas Nethercote
33faf01690
Eliminate four unnecessary lint macros.
...
The lint definitions use macros heavily. This commit merges some of them
that are split unnecessarily. I find the reduced indirection makes it
easier to imagine what the generated code will look like.
2022-12-02 13:59:28 +11:00
Vadim Petrochenkov
6cd4dd3091
rustc_hir: Relax lifetime requirements on Visitor::visit_path
2022-12-01 17:04:02 +03:00
Nicholas Nethercote
b8ed1c5745
Remove unused argument from check_mac_def
.
2022-09-12 14:05:54 +10:00
Nicholas Nethercote
7e3fd33a66
Remove unused argument from visit_poly_trait_ref
.
2022-09-12 13:51:10 +10:00
Nicholas Nethercote
eff1106d56
Remove unused span argument from check_mod
and process_mod
.
2022-09-12 13:44:27 +10:00
Jason Newcomb
0126f7f3a9
Allow lint passes to be bound by TyCtxt
2022-09-06 14:23:03 -04:00
Jason Newcomb
74f2d582d2
Remove Sync
requirement from lint pass objects as they are created on demand
2022-08-29 10:00:22 -04:00
Nicholas Nethercote
232bd80130
Simplify rustc_ast::visit::Visitor::visit_poly_trait_ref
.
...
It is passed an argument that is never used.
2022-08-11 11:10:01 +10:00
Nicholas Nethercote
74e9a29f6e
Remove some late check_*
functions.
...
They're not used by rustc or clippy.
2022-07-29 15:30:12 +10:00
Nicholas Nethercote
ab44b5a408
Remove some early check_*
functions.
...
They're not used by rustc or clippy.
2022-07-29 15:27:16 +10:00
Camille GILLOT
faa7d4221b
Do not pass hir::Crate to lints.
2021-09-30 17:39:54 +02:00
kadmin
3605675bb1
Add inferred args to typeck
2021-07-25 07:28:51 +00:00
Vadim Petrochenkov
b25d3ba781
ast/hir: Rename field-related structures
...
StructField -> FieldDef ("field definition")
Field -> ExprField ("expression field", not "field expression")
FieldPat -> PatField ("pattern field", not "field pattern")
Also rename visiting and other methods working on them.
2021-03-16 11:41:24 +03:00
Vadim Petrochenkov
eb65f15c78
ast: Stop using Mod
in Crate
...
Crate root is sufficiently different from `mod` items, at least at syntactic level.
Also remove customization point for "`mod` item or crate root" from AST visitors.
2021-02-18 13:07:49 +03:00
Santiago Pastorino
03defb627c
Add check_generic_arg early pass
2020-10-16 17:14:36 -03:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00