diff options
author | Aleksey Kladov <[email protected]> | 2019-10-08 12:22:49 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-08 12:22:49 +0100 |
commit | 355419d4044704d13a902641d86ad5501af8714d (patch) | |
tree | f5803e2159d56145f83e4d08170f4e475a75ebb2 /crates/ra_hir/src/nameres | |
parent | 93199002af05f3a3dfd274fe10633372f2471b73 (diff) |
use slightly more idiomatic api for cfg
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index 34dd79574..208c2f16f 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -561,12 +561,14 @@ fn cfg_test() { | |||
561 | "#, | 561 | "#, |
562 | crate_graph! { | 562 | crate_graph! { |
563 | "main": ("/main.rs", ["std"]), | 563 | "main": ("/main.rs", ["std"]), |
564 | "std": ("/lib.rs", [], CfgOptions::default() | 564 | "std": ("/lib.rs", [], { |
565 | .atom("test".into()) | 565 | let mut opts = CfgOptions::default(); |
566 | .key_value("feature".into(), "foo".into()) | 566 | opts.insert_atom("test".into()); |
567 | .key_value("feature".into(), "bar".into()) | 567 | opts.insert_key_value("feature".into(), "foo".into()); |
568 | .key_value("opt".into(), "42".into()) | 568 | opts.insert_key_value("feature".into(), "bar".into()); |
569 | ), | 569 | opts.insert_key_value("opt".into(), "42".into()); |
570 | opts | ||
571 | }), | ||
570 | }, | 572 | }, |
571 | ); | 573 | ); |
572 | 574 | ||