Commit d3a8244
authored
fix(macros-core): update unstable proc_macro APIs for recent nightly (#4227)
The unstable proc_macro tracking APIs were restructured in
rust-lang/rust#149400:
- modules `tracked_env` and `tracked_path` were merged into a
single module `tracked`
- `proc_macro::tracked_env::var` -> `proc_macro::tracked::env_var`
- `proc_macro::tracked_path::path` -> `proc_macro::tracked::path`
- features `track_path` -> `proc_macro_tracked_path` (+
`proc_macro_tracked_env`)
Building with --cfg=sqlx_macros_unstable on recent nightly fails
because of the renames and because `extern crate proc_macro;` was
only declared in `migrate.rs`, leaving `lib.rs` and
`query/cache.rs` without the crate in scope.
Move the gated `extern crate proc_macro;` to the crate root, drop
the duplicate from migrate.rs, and update the API call sites and
the clippy.toml reason field.
Fixes #41501 parent 05d4974 commit d3a8244
File tree
4 files changed
+8
-8
lines changed- sqlx-macros-core
- src
- query
4 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
| 132 | + | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments