Completions,
};
+mod cfg;
mod derive;
mod lint;
mod repr;
lint::complete_lint(acc, ctx, token_tree.clone(), DEFAULT_LINTS);
lint::complete_lint(acc, ctx, token_tree, CLIPPY_LINTS);
}
+ "cfg" => {
+ cfg::complete_cfg(acc, ctx);
+ }
_ => (),
},
(None, Some(_)) => (),
at target_feature = "…"
at test
at track_caller
- kw return
"#]],
);
}
#[test]
fn complete_attribute_on_expr() {
+ cov_mark::check!(no_keyword_completion_in_attr_of_expr);
check(
r#"fn main() { #[$0] foo() }"#,
expect![[r#"
at deny(…)
at forbid(…)
at warn(…)
- kw return
"#]],
);
}
"#]],
);
}
+
+ #[test]
+ fn test_cfg() {
+ check(
+ r#"#[cfg(target_endian = $0"#,
+ expect![[r#"
+ at little
+ at big
+"#]],
+ );
+ }
}