From 6f19484c93b1d3bcbef8a271443742a3db3e8fae Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 20 May 2021 20:40:02 +0200 Subject: Support `#[register_attr]` and `#[register_tool]` --- crates/hir_def/src/nameres/tests/diagnostics.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/hir_def/src/nameres/tests') diff --git a/crates/hir_def/src/nameres/tests/diagnostics.rs b/crates/hir_def/src/nameres/tests/diagnostics.rs index 543975e07..75147d973 100644 --- a/crates/hir_def/src/nameres/tests/diagnostics.rs +++ b/crates/hir_def/src/nameres/tests/diagnostics.rs @@ -237,3 +237,20 @@ fn good_out_dir_diagnostic() { "#, ); } + +#[test] +fn register_attr_and_tool() { + cov_mark::check!(register_attr); + cov_mark::check!(register_tool); + check_no_diagnostics( + r#" +#![register_tool(tool)] +#![register_attr(attr)] + +#[tool::path] +#[attr] +struct S; + "#, + ); + // NB: we don't currently emit diagnostics here +} -- cgit v1.2.3