Skip to content

Commit e9123d6

Browse files
authored
Merge pull request #568 from Thomasdezeeuw/remove-rustversion-dep
Remove rustversion dev-dependency
2 parents 84ddc30 + c175ad4 commit e9123d6

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,16 @@ sval_ref = { version = "2.1", optional = true, default-features = false }
5959
value-bag = { version = "1.4", optional = true, default-features = false }
6060

6161
[dev-dependencies]
62-
rustversion = "1.0"
6362
serde = { version = "1.0", features = ["derive"] }
6463
serde_test = "1.0"
6564
sval = { version = "2.1" }
6665
sval_derive = { version = "2.1" }
6766
value-bag = { version = "1.4", features = ["test"] }
67+
68+
# NOTE: log doesn't actually depent on this crate. However our dependencies,
69+
# serde and sval, dependent on version 1.0 of the crate, which has problem fixed
70+
# in 1.0.60, specifically in the following commit
71+
# https://github.com/dtolnay/proc-macro2/commit/e31d61910049e097afdd3d27c37786309082bdcb.
72+
# By defining the crate as direct dependency we can increase it's minimal
73+
# version making the minimal (crate) version CI happy.
74+
proc-macro2 = { version = "1.0.63", default-features = false }

tests/macros.rs

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -157,49 +157,45 @@ fn kv_expr_context() {
157157

158158
#[test]
159159
fn implicit_named_args() {
160-
#[rustversion::since(1.58)]
161-
fn _check() {
162-
let world = "world";
160+
let world = "world";
163161

164-
for lvl in log::Level::iter() {
165-
log!(lvl, "hello {world}");
166-
log!(lvl, "hello {world}",);
162+
for lvl in log::Level::iter() {
163+
log!(lvl, "hello {world}");
164+
log!(lvl, "hello {world}",);
167165

168-
log!(target: "my_target", lvl, "hello {world}");
169-
log!(target: "my_target", lvl, "hello {world}",);
166+
log!(target: "my_target", lvl, "hello {world}");
167+
log!(target: "my_target", lvl, "hello {world}",);
170168

171-
log!(lvl, "hello {world}");
172-
log!(lvl, "hello {world}",);
173-
}
169+
log!(lvl, "hello {world}");
170+
log!(lvl, "hello {world}",);
171+
}
174172

175-
all_log_macros!("hello {world}");
176-
all_log_macros!("hello {world}",);
173+
all_log_macros!("hello {world}");
174+
all_log_macros!("hello {world}",);
177175

178-
all_log_macros!(target: "my_target", "hello {world}");
179-
all_log_macros!(target: "my_target", "hello {world}",);
176+
all_log_macros!(target: "my_target", "hello {world}");
177+
all_log_macros!(target: "my_target", "hello {world}",);
180178

181-
all_log_macros!(target = "my_target"; "hello {world}");
182-
all_log_macros!(target = "my_target"; "hello {world}",);
183-
}
179+
#[cfg(feature = "kv_unstable")]
180+
all_log_macros!(target = "my_target"; "hello {world}");
181+
#[cfg(feature = "kv_unstable")]
182+
all_log_macros!(target = "my_target"; "hello {world}",);
184183
}
185184

186185
#[test]
187186
#[cfg(feature = "kv_unstable")]
188187
fn kv_implicit_named_args() {
189-
#[rustversion::since(1.58)]
190-
fn _check() {
191-
let world = "world";
188+
let world = "world";
192189

193-
for lvl in log::Level::iter() {
194-
log!(target: "my_target", lvl, cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
195-
196-
log!(lvl, cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
197-
}
190+
for lvl in log::Level::iter() {
191+
log!(target: "my_target", lvl, cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
198192

199-
all_log_macros!(target: "my_target", cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
200-
all_log_macros!(target = "my_target", cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
201-
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
193+
log!(lvl, cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
202194
}
195+
196+
all_log_macros!(target: "my_target", cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
197+
all_log_macros!(target = "my_target", cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
198+
all_log_macros!(cat_1 = "chashu", cat_2 = "nori", cat_count = 2; "hello {world}");
203199
}
204200

205201
#[test]

0 commit comments

Comments
 (0)