Skip to content

Commit c6ed2ad

Browse files
committed
Make macro_call a ref
1 parent 7c8690c commit c6ed2ad

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ path = "src/main.rs"
2020
name = "clippy-driver"
2121
path = "src/driver.rs"
2222

23+
[target.'cfg(NOT_A_PLATFORM)'.dependencies]
24+
rustc_driver = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_driver" }
25+
rustc_interface = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_interface" }
26+
rustc_session = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_session" }
27+
rustc_span = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_span" }
28+
2329
[dependencies]
2430
clippy_config = { path = "clippy_config" }
2531
clippy_lints = { path = "clippy_lints" }

clippy_lints/Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,31 @@ license = "MIT OR Apache-2.0"
88
keywords = ["clippy", "lint", "plugin"]
99
edition = "2021"
1010

11+
[target.'cfg(NOT_A_PLATFORM)'.dependencies]
12+
rustc_abi = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_abi" }
13+
rustc_arena = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_arena" }
14+
rustc_ast = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_ast" }
15+
rustc_ast_pretty = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_ast_pretty" }
16+
rustc_attr = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_attr" }
17+
rustc_data_structures = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_data_structures" }
18+
rustc_driver = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_driver" }
19+
rustc_errors = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_errors" }
20+
rustc_hir = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir" }
21+
rustc_hir_analysis = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir_analysis" }
22+
rustc_hir_pretty = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir_pretty" }
23+
rustc_hir_typeck = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir_typeck" }
24+
rustc_index = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_index" }
25+
rustc_infer = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_infer" }
26+
rustc_lexer = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_lexer" }
27+
rustc_lint = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_lint" }
28+
rustc_middle = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_middle" }
29+
rustc_parse = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_parse" }
30+
rustc_resolve = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_resolve" }
31+
rustc_session = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_session" }
32+
rustc_span = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_span" }
33+
rustc_target = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_target" }
34+
rustc_trait_selection = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_trait_selection" }
35+
1136
[dependencies]
1237
arrayvec = { version = "0.7", default-features = false }
1338
cargo_metadata = "0.18"

clippy_lints/src/format_args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl<'tcx> LateLintPass<'tcx> for FormatArgs {
191191
let linter = FormatArgsExpr {
192192
cx,
193193
expr,
194-
macro_call,
194+
macro_call: &macro_call,
195195
format_args: &format_args,
196196
ignore_mixed: self.ignore_mixed,
197197
};
@@ -210,7 +210,7 @@ impl<'tcx> LateLintPass<'tcx> for FormatArgs {
210210
struct FormatArgsExpr<'a, 'tcx> {
211211
cx: &'a LateContext<'tcx>,
212212
expr: &'tcx Expr<'tcx>,
213-
macro_call: MacroCall,
213+
macro_call: &'a MacroCall,
214214
format_args: &'a rustc_ast::FormatArgs,
215215
ignore_mixed: bool,
216216
}

clippy_utils/Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ version = "0.1.78"
44
edition = "2021"
55
publish = false
66

7+
[target.'cfg(NOT_A_PLATFORM)'.dependencies]
8+
rustc_ast = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_ast" }
9+
rustc_ast_pretty = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_ast_pretty" }
10+
rustc_attr = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_attr" }
11+
rustc_const_eval = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_const_eval" }
12+
rustc_data_structures = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_data_structures" }
13+
rustc_driver = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_driver" }
14+
rustc_errors = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_errors" }
15+
rustc_hir = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir" }
16+
rustc_hir_typeck = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_hir_typeck" }
17+
rustc_index = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_index" }
18+
rustc_infer = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_infer" }
19+
rustc_lexer = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_lexer" }
20+
rustc_lint = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_lint" }
21+
rustc_middle = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_middle" }
22+
rustc_mir_dataflow = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_mir_dataflow" }
23+
rustc_session = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_session" }
24+
rustc_span = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_span" }
25+
rustc_target = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_target" }
26+
rustc_trait_selection = { path = "/home/nyurik/dev/rust/rust/compiler/rustc_trait_selection" }
27+
728
[dependencies]
829
clippy_config = { path = "../clippy_config" }
930
arrayvec = { version = "0.7", default-features = false }

0 commit comments

Comments
 (0)