Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/guest-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ extern crate std;
/// # // ...
/// # }
/// #
/// export!(MyComponent with_types_in self);
/// export!(MyComponent, with_types_in self);
/// #
/// # fn main() {}
/// ```
Expand Down Expand Up @@ -607,7 +607,7 @@ extern crate std;
/// # // ...
/// # }
/// #
/// bindings::export!(MyComponent with_types_in bindings);
/// bindings::export!(MyComponent, with_types_in bindings);
/// #
/// # fn main() {}
/// ```
Expand Down
2 changes: 1 addition & 1 deletion crates/rust/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ fn _resource_rep(handle: u32) -> *mut u8
#[doc(hidden)]
{macro_export}
macro_rules! {macro_name} {{
($ty:ident with_types_in $($path_to_types:tt)*) => (const _: () = {{
($ty:path, with_types_in $($path_to_types:tt)*) => (const _: () = {{
"
);

Expand Down
6 changes: 3 additions & 3 deletions crates/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,16 +875,16 @@ impl As{upcase} for {to_convert} {{
#[doc(hidden)]
{macro_export}
macro_rules! __export_{world_name}_impl {{
($ty:ident) => ({default_bindings_module}::{export_macro_name}!($ty with_types_in {default_bindings_module}););
($ty:ident with_types_in $($path_to_types_root:tt)*) => ("#
($ty:path) => ({default_bindings_module}::{export_macro_name}!($ty, with_types_in {default_bindings_module}););
($ty:path, with_types_in $($path_to_types_root:tt)*) => ("#
);
for (name, path_to_types) in self.export_macros.iter() {
let mut path = "$($path_to_types_root)*".to_string();
if !path_to_types.is_empty() {
path.push_str("::");
path.push_str(path_to_types)
}
uwriteln!(self.src, "{path}::{name}!($ty with_types_in {path});");
uwriteln!(self.src, "{path}::{name}!($ty, with_types_in {path});");
}

// See comments in `finish` for why this conditionally happens here.
Expand Down
Loading