From c3008e32537c3e215ac88a2a59b8476d7d709400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=AD=90=EF=B8=8FNINIKA=E2=AD=90=EF=B8=8F?= Date: Mon, 9 Sep 2024 16:37:36 +0300 Subject: [PATCH] feat(schema): use the type names passed to schema's `types!` macro in type position (#5046) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gives the IDE a hint that it's a type name and allows one to navigate to the type definition and see name resolution errors Signed-off-by: ⭐️NINIKA⭐️ --- schema/gen/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/schema/gen/src/lib.rs b/schema/gen/src/lib.rs index df7edf9e3ac..f64beb14af4 100644 --- a/schema/gen/src/lib.rs +++ b/schema/gen/src/lib.rs @@ -10,6 +10,14 @@ use iroha_schema::prelude::*; macro_rules! types { ($($t:ty),+ $(,)?) => { + // use all the types in a type position, so that IDE can resolve them + const _: () = { + use complete_data_model::*; + $( + let _resolve_my_type_pls: $t; + )+ + }; + /// Apply `callback` to all types in the schema. #[macro_export] macro_rules! map_all_schema_types {