Skip to content

Commit 028bd72

Browse files
paulmenageUrgau
authored andcommitted
Add an explicit dependency on rustc-std-workspace-core
When built as a proc-macro dependency with the `rustc-dep-of-std` feature, we add an explicit `std` dependency but not one on `core`. This means that any macros defined in `core` (such as panic-related macros) that refer to `::core::` will fail to compile when used in `literal-escaper`. Work around this by adding an explicit dependency on `rustc-std-workspace-core` when the `rustc-dep-of-std` feature is enabled.
1 parent 1889c21 commit 028bd72

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ repository = "https://github.com/rust-lang/literal-escaper"
88

99
[dependencies]
1010
std = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-std' }
11+
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
1112

1213
[features]
13-
rustc-dep-of-std = ["dep:std"]
14+
rustc-dep-of-std = ["dep:std", "dep:core"]

0 commit comments

Comments
 (0)