Commit 03a1781
committed
fix:
`use alloc::vec::{self, Vec};` relies on the `self` import also
bringing the `vec!` macro into scope alongside the `vec` module.
On some rustc versions this only resolves the module (type
namespace), so unqualified `vec![...]` calls in this file fail
with "cannot find macro `vec` in this scope".
Import `Drain` by name instead of the `vec` module, and fully
qualify the two `vec!` invocations (`alloc::vec!` / `$crate::alloc::vec!`)
so macro resolution no longer depends on the `self`-import quirk.
Signed-off-by: Ravi Chamarthy <ravi@ciroos.ai>vec! macro resolution via alloc::vec self-import1 parent 5f4240f commit 03a1781
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
| 710 | + | |
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
1311 | | - | |
| 1311 | + | |
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
| |||
0 commit comments