File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ extern crate std;
574574/// # // ...
575575/// # }
576576/// #
577- /// export!(MyComponent, with_types_in self);
577+ /// export!({ ty: MyComponent, with_types_in: self } );
578578/// #
579579/// # fn main() {}
580580/// ```
@@ -607,7 +607,7 @@ extern crate std;
607607/// # // ...
608608/// # }
609609/// #
610- /// bindings::export!(MyComponent, with_types_in bindings);
610+ /// bindings::export!({ ty: MyComponent, with_types_in: bindings } );
611611/// #
612612/// # fn main() {}
613613/// ```
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ fn _resource_rep(handle: u32) -> *mut u8
277277 #[doc(hidden)]
278278{macro_export}
279279macro_rules! {macro_name} {{
280- ($ty:path, with_types_in $($ path_to_types:tt)* ) => (const _: () = {{
280+ ({{ ty: $ty:path, with_types_in: $ path_to_types:path $(,)? }} ) => (const _: () = {{
281281"
282282 ) ;
283283
Original file line number Diff line number Diff line change @@ -875,16 +875,16 @@ impl As{upcase} for {to_convert} {{
875875#[doc(hidden)]
876876{macro_export}
877877macro_rules! __export_{world_name}_impl {{
878- ($ty:path) => ({default_bindings_module}::{export_macro_name}!($ty, with_types_in {default_bindings_module}););
879- ($ty:path, with_types_in $($path_to_types_root:tt)* ) => ("#
878+ ($ty:path) => ({default_bindings_module}::{export_macro_name}!({{ ty: $ty, with_types_in: {default_bindings_module} } }););
879+ ({{ $ty:path $(, $( with_types_in: $path_to_types:path $(,)?)?)? }} ) => ("#
880880 ) ;
881881 for ( name, path_to_types) in self . export_macros . iter ( ) {
882882 let mut path = "$($path_to_types_root)*" . to_string ( ) ;
883883 if !path_to_types. is_empty ( ) {
884884 path. push_str ( "::" ) ;
885885 path. push_str ( path_to_types)
886886 }
887- uwriteln ! ( self . src, "{path}::{name}!($ty, with_types_in {path});" ) ;
887+ uwriteln ! ( self . src, "{path}::{name}!({{ ty: $ty, with_types_in: {path} } });" ) ;
888888 }
889889
890890 // See comments in `finish` for why this conditionally happens here.
You can’t perform that action at this time.
0 commit comments