aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs14
-rw-r--r--crates/ra_hir/src/ty/tests.rs6
2 files changed, 13 insertions, 7 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
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 25dad81eb..b16b48258 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -62,7 +62,11 @@ impl S {
62"#, 62"#,
63 ); 63 );
64 db.set_crate_graph_from_fixture(crate_graph! { 64 db.set_crate_graph_from_fixture(crate_graph! {
65 "main": ("/main.rs", ["foo"], CfgOptions::default().atom("test".into())), 65 "main": ("/main.rs", ["foo"], {
66 let mut opts = CfgOptions::default();
67 opts.insert_atom("test".into());
68 opts
69 }),
66 "foo": ("/foo.rs", []), 70 "foo": ("/foo.rs", []),
67 }); 71 });
68 assert_eq!("(i32, {unknown}, i32, {unknown})", type_at_pos(&db, pos)); 72 assert_eq!("(i32, {unknown}, i32, {unknown})", type_at_pos(&db, pos));