Commit ba58b1e
authored
Fix feature ref diagnostic to include plain dep enablements (#355)
Resolves #354
The "used in feature" diagnostic now includes plain dep enablements,
like "foo" instead of "dep:foo".
```
shear/unused_optional_dependency
⚠ unused optional dependency `smol`
╭─[sqlx-macros-core/Cargo.toml:64:1]
63 │ async-std = { workspace = true, optional = true }
64 │ smol = { workspace = true, optional = true }
· ──┬─
· ╰── not used in code
65 │ tokio = { workspace = true, optional = true }
╰────
Advice:
☞ removing an optional dependency may be a breaking change
Advice:
☞ used in feature `_rt-smol`
╭─[sqlx-macros-core/Cargo.toml:17:13]
16 │ _rt-async-std = ["async-std", "sqlx-core/_rt-async-std"]
17 │ _rt-smol = ["smol", "sqlx-core/_rt-smol"]
· ───┬──
· ╰── enabled here
18 │ _rt-tokio = ["tokio", "sqlx-core/_rt-tokio"]
╰────
```1 parent 6d29872 commit ba58b1e
1 file changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
90 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| |||
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
288 | | - | |
289 | | - | |
290 | | - | |
| 292 | + | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
0 commit comments