Skip to content

Commit 3e3be20

Browse files
committed
Auto merge of #3423 - RalfJung:proc-macro-2, r=RalfJung
test-cargo-miri: add proc-macro2 This is already in the dependency tree of `serde_derive`, but I guess there is is a host dependency, here it is a target dependency. The logic is presumably the same as in anyhow, so we don't need both; let's test the one that is more widely used.
2 parents aa67565 + c6f8a7a commit 3e3be20

File tree

7 files changed

+37
-67
lines changed

7 files changed

+37
-67
lines changed

test-cargo-miri/Cargo.lock

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

test-cargo-miri/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ edition = "2018"
1212
byteorder = "1.0"
1313
cdylib = { path = "cdylib" }
1414
exported_symbol = { path = "exported-symbol" }
15+
proc_macro_crate = { path = "proc-macro-crate" }
1516
issue_1567 = { path = "issue-1567" }
1617
issue_1691 = { path = "issue-1691" }
1718
issue_1705 = { path = "issue-1705" }
18-
issue_1760 = { path = "issue-1760" }
1919
issue_rust_86261 = { path = "issue-rust-86261" }
2020

2121
[dev-dependencies]
2222
byteorder_2 = { package = "byteorder", version = "0.5" } # to test dev-dependencies behave as expected, with renaming
23-
# Not actually used, but exercises some unique code path (`--extern` .so file).
24-
serde_derive = "1.0.185"
25-
# Not actually used, but uses a custom build probe so let's make sure that works.
23+
## More dependencies that we don't actually use, but add just for extra test coverage.
24+
# These use custom build probes, let's make sure they don't explode.
2625
# (Ideally we'd check if the probe was successful, but that's not easily possible.)
27-
anyhow = "1.0"
28-
# Same as anyhow.
26+
# proc-macro2 is extra exciting because it is both a host-dependency (of proc_macro_crate above)
27+
# and a target-dependency.
28+
proc-macro2 = "1.0"
2929
eyre = "0.6"
3030

3131
[build-dependencies]

test-cargo-miri/issue-1760/Cargo.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
# regression test for issue 1760
3+
name = "proc_macro_crate"
4+
version = "0.1.0"
5+
authors = ["Miri Team"]
6+
edition = "2018"
7+
8+
[lib]
9+
proc-macro = true
10+
11+
[dependencies]
12+
# A common dependency of proc macros, let's make sure that works.
13+
proc-macro2 = "1.0"

test-cargo-miri/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
/// ```
2929
#[no_mangle]
3030
pub fn make_true() -> bool {
31+
proc_macro_crate::use_the_dependency!();
3132
issue_1567::use_the_dependency();
3233
issue_1705::use_the_dependency();
33-
issue_1760::use_the_dependency!();
3434
issue_1691::use_me()
3535
}
3636

0 commit comments

Comments
 (0)