diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-20 19:41:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-20 19:41:26 +0100 |
commit | 8d713b3e462ce1ff5bdeebc5f2bb6f90310c69ac (patch) | |
tree | 024719fdb69de56eadad477026a2df230cf66a1f /crates/hir_def/src/nameres/tests | |
parent | 9b94a2781357e1965e33e7ca48bdbcd35e9b8dff (diff) | |
parent | 6f19484c93b1d3bcbef8a271443742a3db3e8fae (diff) |
Merge #8900
8900: internal: support `#[register_attr]` and `#[register_tool]` r=jonas-schievink a=jonas-schievink
Relatively straightforward since these are crate-local.
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r-- | crates/hir_def/src/nameres/tests/diagnostics.rs | 17 |
1 files changed, 17 insertions, 0 deletions
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() { | |||
237 | "#, | 237 | "#, |
238 | ); | 238 | ); |
239 | } | 239 | } |
240 | |||
241 | #[test] | ||
242 | fn register_attr_and_tool() { | ||
243 | cov_mark::check!(register_attr); | ||
244 | cov_mark::check!(register_tool); | ||
245 | check_no_diagnostics( | ||
246 | r#" | ||
247 | #![register_tool(tool)] | ||
248 | #![register_attr(attr)] | ||
249 | |||
250 | #[tool::path] | ||
251 | #[attr] | ||
252 | struct S; | ||
253 | "#, | ||
254 | ); | ||
255 | // NB: we don't currently emit diagnostics here | ||
256 | } | ||