Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

bindgen: use fully-qualified paths for prelude types (#14543)

Scott Andrews500a7f061659
diff --git a/crates/component-macro/tests/codegen.rs b/crates/component-macro/tests/codegen.rs
index 7cdd400bfc..878d1383d1 100644
--- a/crates/component-macro/tests/codegen.rs
+++ b/crates/component-macro/tests/codegen.rs
@@ -244,6 +244,26 @@ mod interface_name_with_rust_keyword {
});
}
+mod interface_types_with_rust_types {
+ wasmtime::component::bindgen!({
+ inline: "
+ package foo:foo;
+
+ interface a {
+ type %result = bool;
+ type %option = bool;
+
+ r: func() -> %result;
+ o: func() -> %option;
+ }
+
+ world foo {
+ export a;
+ }
+ "
+ });
+}
+
mod with_works_with_hierarchy {
mod bindings {
wasmtime::component::bindgen!({
diff --git a/crates/component-macro/tests/expanded/conventions.rs b/crates/component-macro/tests/expanded/conventions.rs
index dd4ce7d70f..60e37c18ce 100644
--- a/crates/component-macro/tests/expanded/conventions.rs
+++ b/crates/component-macro/tests/expanded/conventions.rs
@@ -202,8 +202,11 @@ pub mod foo {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LudicrousSpeed {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field("how-fast-are-you-going", &self.how_fast_are_you_going)
.field(
@@ -435,11 +438,11 @@ pub mod exports {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
+ impl ::core::fmt::Debug for LudicrousSpeed {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field(
"how-fast-are-you-going",
diff --git a/crates/component-macro/tests/expanded/conventions_async.rs b/crates/component-macro/tests/expanded/conventions_async.rs
index 3d4ecc125a..2d4a816a04 100644
--- a/crates/component-macro/tests/expanded/conventions_async.rs
+++ b/crates/component-macro/tests/expanded/conventions_async.rs
@@ -202,8 +202,11 @@ pub mod foo {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LudicrousSpeed {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field("how-fast-are-you-going", &self.how_fast_are_you_going)
.field(
@@ -493,11 +496,11 @@ pub mod exports {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
+ impl ::core::fmt::Debug for LudicrousSpeed {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field(
"how-fast-are-you-going",
diff --git a/crates/component-macro/tests/expanded/conventions_concurrent.rs b/crates/component-macro/tests/expanded/conventions_concurrent.rs
index be733fe5d1..5ebb73740e 100644
--- a/crates/component-macro/tests/expanded/conventions_concurrent.rs
+++ b/crates/component-macro/tests/expanded/conventions_concurrent.rs
@@ -202,8 +202,11 @@ pub mod foo {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LudicrousSpeed {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field("how-fast-are-you-going", &self.how_fast_are_you_going)
.field(
@@ -514,11 +517,11 @@ pub mod exports {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
+ impl ::core::fmt::Debug for LudicrousSpeed {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field(
"how-fast-are-you-going",
diff --git a/crates/component-macro/tests/expanded/conventions_tracing_async.rs b/crates/component-macro/tests/expanded/conventions_tracing_async.rs
index a7bcb17881..26efe2fd47 100644
--- a/crates/component-macro/tests/expanded/conventions_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/conventions_tracing_async.rs
@@ -202,8 +202,11 @@ pub mod foo {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LudicrousSpeed {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field("how-fast-are-you-going", &self.how_fast_are_you_going)
.field(
@@ -653,11 +656,11 @@ pub mod exports {
#[component(name = "i-am-going-extremely-slow")]
pub i_am_going_extremely_slow: u64,
}
- impl core::fmt::Debug for LudicrousSpeed {
+ impl ::core::fmt::Debug for LudicrousSpeed {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LudicrousSpeed")
.field(
"how-fast-are-you-going",
diff --git a/crates/component-macro/tests/expanded/dead-code.rs b/crates/component-macro/tests/expanded/dead-code.rs
index 0482e045e4..88fc0d464f 100644
--- a/crates/component-macro/tests/expanded/dead-code.rs
+++ b/crates/component-macro/tests/expanded/dead-code.rs
@@ -194,8 +194,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for LiveType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LiveType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LiveType").field("a", &self.a).finish()
}
}
@@ -270,8 +273,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DeadType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DeadType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DeadType").field("a", &self.a).finish()
}
}
@@ -292,8 +298,11 @@ pub mod a {
#[component(name = "b")]
B(DeadType),
}
- impl core::fmt::Debug for V {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V::A(e) => f.debug_tuple("V::A").field(e).finish(),
V::B(e) => f.debug_tuple("V::B").field(e).finish(),
diff --git a/crates/component-macro/tests/expanded/dead-code_async.rs b/crates/component-macro/tests/expanded/dead-code_async.rs
index 53c1794777..5e2fc41aca 100644
--- a/crates/component-macro/tests/expanded/dead-code_async.rs
+++ b/crates/component-macro/tests/expanded/dead-code_async.rs
@@ -194,8 +194,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for LiveType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LiveType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LiveType").field("a", &self.a).finish()
}
}
@@ -274,8 +277,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DeadType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DeadType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DeadType").field("a", &self.a).finish()
}
}
@@ -296,8 +302,11 @@ pub mod a {
#[component(name = "b")]
B(DeadType),
}
- impl core::fmt::Debug for V {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V::A(e) => f.debug_tuple("V::A").field(e).finish(),
V::B(e) => f.debug_tuple("V::B").field(e).finish(),
diff --git a/crates/component-macro/tests/expanded/dead-code_concurrent.rs b/crates/component-macro/tests/expanded/dead-code_concurrent.rs
index 6ddd1c2207..aed338dae5 100644
--- a/crates/component-macro/tests/expanded/dead-code_concurrent.rs
+++ b/crates/component-macro/tests/expanded/dead-code_concurrent.rs
@@ -194,8 +194,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for LiveType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LiveType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LiveType").field("a", &self.a).finish()
}
}
@@ -272,8 +275,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DeadType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DeadType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DeadType").field("a", &self.a).finish()
}
}
@@ -294,8 +300,11 @@ pub mod a {
#[component(name = "b")]
B(DeadType),
}
- impl core::fmt::Debug for V {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V::A(e) => f.debug_tuple("V::A").field(e).finish(),
V::B(e) => f.debug_tuple("V::B").field(e).finish(),
diff --git a/crates/component-macro/tests/expanded/dead-code_tracing_async.rs b/crates/component-macro/tests/expanded/dead-code_tracing_async.rs
index 51beeb97c7..15fc0d4d83 100644
--- a/crates/component-macro/tests/expanded/dead-code_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/dead-code_tracing_async.rs
@@ -194,8 +194,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for LiveType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for LiveType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("LiveType").field("a", &self.a).finish()
}
}
@@ -287,8 +290,11 @@ pub mod a {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DeadType {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DeadType {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DeadType").field("a", &self.a).finish()
}
}
@@ -309,8 +315,11 @@ pub mod a {
#[component(name = "b")]
B(DeadType),
}
- impl core::fmt::Debug for V {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V::A(e) => f.debug_tuple("V::A").field(e).finish(),
V::B(e) => f.debug_tuple("V::B").field(e).finish(),
diff --git a/crates/component-macro/tests/expanded/lists.rs b/crates/component-macro/tests/expanded/lists.rs
index 39be10815f..1677a9b814 100644
--- a/crates/component-macro/tests/expanded/lists.rs
+++ b/crates/component-macro/tests/expanded/lists.rs
@@ -208,8 +208,11 @@ pub mod foo {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -249,8 +252,11 @@ pub mod foo {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -283,8 +289,11 @@ pub mod foo {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -319,8 +328,11 @@ pub mod foo {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
@@ -986,11 +998,11 @@ pub mod exports {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
+ impl ::core::fmt::Debug for OtherRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -1032,11 +1044,11 @@ pub mod exports {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
+ impl ::core::fmt::Debug for SomeRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -1071,11 +1083,11 @@ pub mod exports {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
+ impl ::core::fmt::Debug for OtherVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -1112,11 +1124,11 @@ pub mod exports {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
+ impl ::core::fmt::Debug for SomeVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
diff --git a/crates/component-macro/tests/expanded/lists_async.rs b/crates/component-macro/tests/expanded/lists_async.rs
index dd456d9043..8f5d4c465b 100644
--- a/crates/component-macro/tests/expanded/lists_async.rs
+++ b/crates/component-macro/tests/expanded/lists_async.rs
@@ -208,8 +208,11 @@ pub mod foo {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -249,8 +252,11 @@ pub mod foo {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -283,8 +289,11 @@ pub mod foo {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -319,8 +328,11 @@ pub mod foo {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
@@ -1152,11 +1164,11 @@ pub mod exports {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
+ impl ::core::fmt::Debug for OtherRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -1198,11 +1210,11 @@ pub mod exports {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
+ impl ::core::fmt::Debug for SomeRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -1237,11 +1249,11 @@ pub mod exports {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
+ impl ::core::fmt::Debug for OtherVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -1278,11 +1290,11 @@ pub mod exports {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
+ impl ::core::fmt::Debug for SomeVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
diff --git a/crates/component-macro/tests/expanded/lists_concurrent.rs b/crates/component-macro/tests/expanded/lists_concurrent.rs
index 44e7a6488a..865756c1e2 100644
--- a/crates/component-macro/tests/expanded/lists_concurrent.rs
+++ b/crates/component-macro/tests/expanded/lists_concurrent.rs
@@ -208,8 +208,11 @@ pub mod foo {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -249,8 +252,11 @@ pub mod foo {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -283,8 +289,11 @@ pub mod foo {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -319,8 +328,11 @@ pub mod foo {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
@@ -1136,11 +1148,11 @@ pub mod exports {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
+ impl ::core::fmt::Debug for OtherRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -1182,11 +1194,11 @@ pub mod exports {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
+ impl ::core::fmt::Debug for SomeRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -1221,11 +1233,11 @@ pub mod exports {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
+ impl ::core::fmt::Debug for OtherVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -1262,11 +1274,11 @@ pub mod exports {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
+ impl ::core::fmt::Debug for SomeVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
diff --git a/crates/component-macro/tests/expanded/lists_tracing_async.rs b/crates/component-macro/tests/expanded/lists_tracing_async.rs
index b069b165f4..2b4eb44825 100644
--- a/crates/component-macro/tests/expanded/lists_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/lists_tracing_async.rs
@@ -208,8 +208,11 @@ pub mod foo {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -249,8 +252,11 @@ pub mod foo {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeRecord {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -283,8 +289,11 @@ pub mod foo {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for OtherVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -319,8 +328,11 @@ pub mod foo {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for SomeVariant {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
@@ -1583,11 +1595,11 @@ pub mod exports {
#[component(name = "c")]
pub c: wasmtime::component::__internal::Vec<u8>,
}
- impl core::fmt::Debug for OtherRecord {
+ impl ::core::fmt::Debug for OtherRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("OtherRecord")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -1629,11 +1641,11 @@ pub mod exports {
#[component(name = "c4")]
pub c4: i64,
}
- impl core::fmt::Debug for SomeRecord {
+ impl ::core::fmt::Debug for SomeRecord {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("SomeRecord")
.field("x", &self.x)
.field("y", &self.y)
@@ -1668,11 +1680,11 @@ pub mod exports {
#[component(name = "c")]
C(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for OtherVariant {
+ impl ::core::fmt::Debug for OtherVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
OtherVariant::A => f.debug_tuple("OtherVariant::A").finish(),
OtherVariant::B(e) => {
@@ -1709,11 +1721,11 @@ pub mod exports {
#[component(name = "d")]
D(wasmtime::component::__internal::Vec<OtherVariant>),
}
- impl core::fmt::Debug for SomeVariant {
+ impl ::core::fmt::Debug for SomeVariant {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
SomeVariant::A(e) => {
f.debug_tuple("SomeVariant::A").field(e).finish()
diff --git a/crates/component-macro/tests/expanded/many-arguments.rs b/crates/component-macro/tests/expanded/many-arguments.rs
index e3ffcc1a08..d90891aa31 100644
--- a/crates/component-macro/tests/expanded/many-arguments.rs
+++ b/crates/component-macro/tests/expanded/many-arguments.rs
@@ -238,8 +238,11 @@ pub mod foo {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for BigStruct {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -497,11 +500,11 @@ pub mod exports {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
+ impl ::core::fmt::Debug for BigStruct {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
diff --git a/crates/component-macro/tests/expanded/many-arguments_async.rs b/crates/component-macro/tests/expanded/many-arguments_async.rs
index b52ac42448..1d8bdbe301 100644
--- a/crates/component-macro/tests/expanded/many-arguments_async.rs
+++ b/crates/component-macro/tests/expanded/many-arguments_async.rs
@@ -238,8 +238,11 @@ pub mod foo {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for BigStruct {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -511,11 +514,11 @@ pub mod exports {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
+ impl ::core::fmt::Debug for BigStruct {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
diff --git a/crates/component-macro/tests/expanded/many-arguments_concurrent.rs b/crates/component-macro/tests/expanded/many-arguments_concurrent.rs
index 1cc0d09ba9..0b780cc551 100644
--- a/crates/component-macro/tests/expanded/many-arguments_concurrent.rs
+++ b/crates/component-macro/tests/expanded/many-arguments_concurrent.rs
@@ -238,8 +238,11 @@ pub mod foo {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for BigStruct {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -473,11 +476,11 @@ pub mod exports {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
+ impl ::core::fmt::Debug for BigStruct {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
diff --git a/crates/component-macro/tests/expanded/many-arguments_tracing_async.rs b/crates/component-macro/tests/expanded/many-arguments_tracing_async.rs
index c0e476cedc..c1abe456ea 100644
--- a/crates/component-macro/tests/expanded/many-arguments_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/many-arguments_tracing_async.rs
@@ -238,8 +238,11 @@ pub mod foo {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for BigStruct {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
@@ -554,11 +557,11 @@ pub mod exports {
#[component(name = "a20")]
pub a20: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for BigStruct {
+ impl ::core::fmt::Debug for BigStruct {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("BigStruct")
.field("a1", &self.a1)
.field("a2", &self.a2)
diff --git a/crates/component-macro/tests/expanded/records.rs b/crates/component-macro/tests/expanded/records.rs
index db8bfe8d48..fe3e31b41a 100644
--- a/crates/component-macro/tests/expanded/records.rs
+++ b/crates/component-macro/tests/expanded/records.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -224,8 +227,11 @@ pub mod foo {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Scalars {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -263,8 +269,11 @@ pub mod foo {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for ReallyFlags {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -303,8 +312,11 @@ pub mod foo {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Aggregates {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -371,8 +383,11 @@ pub mod foo {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for FuturesAndStreams {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
@@ -592,11 +607,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -623,11 +638,11 @@ pub mod exports {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
+ impl ::core::fmt::Debug for Scalars {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -669,11 +684,11 @@ pub mod exports {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
+ impl ::core::fmt::Debug for ReallyFlags {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -714,11 +729,11 @@ pub mod exports {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
+ impl ::core::fmt::Debug for Aggregates {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -792,11 +807,11 @@ pub mod exports {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
+ impl ::core::fmt::Debug for FuturesAndStreams {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
diff --git a/crates/component-macro/tests/expanded/records_async.rs b/crates/component-macro/tests/expanded/records_async.rs
index 56b074faa4..c78b50d2d2 100644
--- a/crates/component-macro/tests/expanded/records_async.rs
+++ b/crates/component-macro/tests/expanded/records_async.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -224,8 +227,11 @@ pub mod foo {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Scalars {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -263,8 +269,11 @@ pub mod foo {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for ReallyFlags {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -303,8 +312,11 @@ pub mod foo {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Aggregates {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -371,8 +383,11 @@ pub mod foo {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for FuturesAndStreams {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
@@ -670,11 +685,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -701,11 +716,11 @@ pub mod exports {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
+ impl ::core::fmt::Debug for Scalars {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -747,11 +762,11 @@ pub mod exports {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
+ impl ::core::fmt::Debug for ReallyFlags {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -792,11 +807,11 @@ pub mod exports {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
+ impl ::core::fmt::Debug for Aggregates {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -870,11 +885,11 @@ pub mod exports {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
+ impl ::core::fmt::Debug for FuturesAndStreams {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
diff --git a/crates/component-macro/tests/expanded/records_concurrent.rs b/crates/component-macro/tests/expanded/records_concurrent.rs
index b86d12829d..2809ae94cc 100644
--- a/crates/component-macro/tests/expanded/records_concurrent.rs
+++ b/crates/component-macro/tests/expanded/records_concurrent.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -224,8 +227,11 @@ pub mod foo {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Scalars {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -263,8 +269,11 @@ pub mod foo {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for ReallyFlags {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -303,8 +312,11 @@ pub mod foo {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Aggregates {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -371,8 +383,11 @@ pub mod foo {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for FuturesAndStreams {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
@@ -674,11 +689,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -705,11 +720,11 @@ pub mod exports {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
+ impl ::core::fmt::Debug for Scalars {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -751,11 +766,11 @@ pub mod exports {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
+ impl ::core::fmt::Debug for ReallyFlags {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -796,11 +811,11 @@ pub mod exports {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
+ impl ::core::fmt::Debug for Aggregates {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -874,11 +889,11 @@ pub mod exports {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
+ impl ::core::fmt::Debug for FuturesAndStreams {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
diff --git a/crates/component-macro/tests/expanded/records_tracing_async.rs b/crates/component-macro/tests/expanded/records_tracing_async.rs
index 7309ef907a..abb3ab2bf1 100644
--- a/crates/component-macro/tests/expanded/records_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/records_tracing_async.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -224,8 +227,11 @@ pub mod foo {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Scalars {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -263,8 +269,11 @@ pub mod foo {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for ReallyFlags {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -303,8 +312,11 @@ pub mod foo {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Aggregates {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -371,8 +383,11 @@ pub mod foo {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for FuturesAndStreams {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
@@ -831,11 +846,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -862,11 +877,11 @@ pub mod exports {
#[component(name = "b")]
pub b: u32,
}
- impl core::fmt::Debug for Scalars {
+ impl ::core::fmt::Debug for Scalars {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Scalars")
.field("a", &self.a)
.field("b", &self.b)
@@ -908,11 +923,11 @@ pub mod exports {
#[component(name = "i")]
pub i: bool,
}
- impl core::fmt::Debug for ReallyFlags {
+ impl ::core::fmt::Debug for ReallyFlags {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("ReallyFlags")
.field("a", &self.a)
.field("b", &self.b)
@@ -953,11 +968,11 @@ pub mod exports {
#[component(name = "e")]
pub e: ReallyFlags,
}
- impl core::fmt::Debug for Aggregates {
+ impl ::core::fmt::Debug for Aggregates {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Aggregates")
.field("a", &self.a)
.field("b", &self.b)
@@ -1031,11 +1046,11 @@ pub mod exports {
>,
>,
}
- impl core::fmt::Debug for FuturesAndStreams {
+ impl ::core::fmt::Debug for FuturesAndStreams {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("FuturesAndStreams")
.field("a", &self.a)
.field("b", &self.b)
diff --git a/crates/component-macro/tests/expanded/resources-import.rs b/crates/component-macro/tests/expanded/resources-import.rs
index 1e7fcd4690..f86fd4ba48 100644
--- a/crates/component-macro/tests/expanded/resources-import.rs
+++ b/crates/component-macro/tests/expanded/resources-import.rs
@@ -430,8 +430,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedOwn {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedOwn {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedOwn")
.field("nested-bar", &self.nested_bar)
.finish()
@@ -453,8 +456,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedBorrow {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedBorrow {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedBorrow")
.field("nested-bar", &self.nested_bar)
.finish()
diff --git a/crates/component-macro/tests/expanded/resources-import_async.rs b/crates/component-macro/tests/expanded/resources-import_async.rs
index cd47a31c0b..7eeceae675 100644
--- a/crates/component-macro/tests/expanded/resources-import_async.rs
+++ b/crates/component-macro/tests/expanded/resources-import_async.rs
@@ -481,8 +481,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedOwn {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedOwn {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedOwn")
.field("nested-bar", &self.nested_bar)
.finish()
@@ -504,8 +507,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedBorrow {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedBorrow {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedBorrow")
.field("nested-bar", &self.nested_bar)
.finish()
diff --git a/crates/component-macro/tests/expanded/resources-import_concurrent.rs b/crates/component-macro/tests/expanded/resources-import_concurrent.rs
index 03ba6bf80a..a8656ff3f7 100644
--- a/crates/component-macro/tests/expanded/resources-import_concurrent.rs
+++ b/crates/component-macro/tests/expanded/resources-import_concurrent.rs
@@ -455,8 +455,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedOwn {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedOwn {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedOwn")
.field("nested-bar", &self.nested_bar)
.finish()
@@ -478,8 +481,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedBorrow {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedBorrow {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedBorrow")
.field("nested-bar", &self.nested_bar)
.finish()
diff --git a/crates/component-macro/tests/expanded/resources-import_tracing_async.rs b/crates/component-macro/tests/expanded/resources-import_tracing_async.rs
index 9357c33488..15a658b9e6 100644
--- a/crates/component-macro/tests/expanded/resources-import_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/resources-import_tracing_async.rs
@@ -544,8 +544,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedOwn {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedOwn {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedOwn")
.field("nested-bar", &self.nested_bar)
.finish()
@@ -567,8 +570,11 @@ pub mod foo {
#[component(name = "nested-bar")]
pub nested_bar: wasmtime::component::Resource<Bar>,
}
- impl core::fmt::Debug for NestedBorrow {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for NestedBorrow {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("NestedBorrow")
.field("nested-bar", &self.nested_bar)
.finish()
diff --git a/crates/component-macro/tests/expanded/share-types.rs b/crates/component-macro/tests/expanded/share-types.rs
index f20d758cb6..a864b3c82e 100644
--- a/crates/component-macro/tests/expanded/share-types.rs
+++ b/crates/component-macro/tests/expanded/share-types.rs
@@ -199,8 +199,11 @@ pub mod foo {
#[component(name = "method")]
pub method: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Request {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Request {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Request").field("method", &self.method).finish()
}
}
@@ -217,8 +220,11 @@ pub mod foo {
#[component(name = "body")]
pub body: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Response {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Response {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Response").field("body", &self.body).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/share-types_async.rs b/crates/component-macro/tests/expanded/share-types_async.rs
index 5460f42426..1c97c2788d 100644
--- a/crates/component-macro/tests/expanded/share-types_async.rs
+++ b/crates/component-macro/tests/expanded/share-types_async.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "method")]
pub method: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Request {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Request {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Request").field("method", &self.method).finish()
}
}
@@ -218,8 +221,11 @@ pub mod foo {
#[component(name = "body")]
pub body: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Response {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Response {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Response").field("body", &self.body).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/share-types_concurrent.rs b/crates/component-macro/tests/expanded/share-types_concurrent.rs
index 46e347dbbb..93a941ac6d 100644
--- a/crates/component-macro/tests/expanded/share-types_concurrent.rs
+++ b/crates/component-macro/tests/expanded/share-types_concurrent.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "method")]
pub method: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Request {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Request {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Request").field("method", &self.method).finish()
}
}
@@ -218,8 +221,11 @@ pub mod foo {
#[component(name = "body")]
pub body: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Response {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Response {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Response").field("body", &self.body).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/share-types_tracing_async.rs b/crates/component-macro/tests/expanded/share-types_tracing_async.rs
index 4bedd85c2d..5024520d5a 100644
--- a/crates/component-macro/tests/expanded/share-types_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/share-types_tracing_async.rs
@@ -200,8 +200,11 @@ pub mod foo {
#[component(name = "method")]
pub method: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Request {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Request {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Request").field("method", &self.method).finish()
}
}
@@ -218,8 +221,11 @@ pub mod foo {
#[component(name = "body")]
pub body: wasmtime::component::__internal::String,
}
- impl core::fmt::Debug for Response {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Response {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Response").field("body", &self.body).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/simple-wasi.rs b/crates/component-macro/tests/expanded/simple-wasi.rs
index ebc0d0cd71..be0de89ab8 100644
--- a/crates/component-macro/tests/expanded/simple-wasi.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi.rs
@@ -193,8 +193,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DescriptorStat {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DescriptorStat {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DescriptorStat").field("a", &self.a).finish()
}
}
@@ -229,8 +232,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Errno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -238,12 +244,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Errno {}
+ impl ::core::error::Error for Errno {}
const _: () = {
assert!(1 == < Errno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Errno as wasmtime::component::ComponentType >::ALIGN32);
@@ -318,8 +327,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for WallClock {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for WallClock {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("WallClock").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/simple-wasi_async.rs b/crates/component-macro/tests/expanded/simple-wasi_async.rs
index 9b6c19c9fd..80c0f0ab1d 100644
--- a/crates/component-macro/tests/expanded/simple-wasi_async.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi_async.rs
@@ -193,8 +193,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DescriptorStat {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DescriptorStat {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DescriptorStat").field("a", &self.a).finish()
}
}
@@ -229,8 +232,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Errno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -238,12 +244,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Errno {}
+ impl ::core::error::Error for Errno {}
const _: () = {
assert!(1 == < Errno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Errno as wasmtime::component::ComponentType >::ALIGN32);
@@ -334,8 +343,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for WallClock {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for WallClock {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("WallClock").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/simple-wasi_concurrent.rs b/crates/component-macro/tests/expanded/simple-wasi_concurrent.rs
index 5b076cf023..1dd8097dd3 100644
--- a/crates/component-macro/tests/expanded/simple-wasi_concurrent.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi_concurrent.rs
@@ -193,8 +193,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DescriptorStat {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DescriptorStat {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DescriptorStat").field("a", &self.a).finish()
}
}
@@ -229,8 +232,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Errno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -238,12 +244,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Errno {}
+ impl ::core::error::Error for Errno {}
const _: () = {
assert!(1 == < Errno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Errno as wasmtime::component::ComponentType >::ALIGN32);
@@ -330,8 +339,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for WallClock {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for WallClock {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("WallClock").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/simple-wasi_tracing_async.rs b/crates/component-macro/tests/expanded/simple-wasi_tracing_async.rs
index f78e8a013f..ac32b0d5cd 100644
--- a/crates/component-macro/tests/expanded/simple-wasi_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/simple-wasi_tracing_async.rs
@@ -193,8 +193,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for DescriptorStat {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for DescriptorStat {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("DescriptorStat").field("a", &self.a).finish()
}
}
@@ -229,8 +232,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Errno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -238,12 +244,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Errno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Errno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Errno {}
+ impl ::core::error::Error for Errno {}
const _: () = {
assert!(1 == < Errno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Errno as wasmtime::component::ComponentType >::ALIGN32);
@@ -360,8 +369,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for WallClock {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for WallClock {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("WallClock").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/small-anonymous.rs b/crates/component-macro/tests/expanded/small-anonymous.rs
index bd4d5ed23b..c97d90a4a7 100644
--- a/crates/component-macro/tests/expanded/small-anonymous.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous.rs
@@ -215,8 +215,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -224,12 +227,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(1 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Error as wasmtime::component::ComponentType >::ALIGN32);
@@ -318,11 +324,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for Error {
+ impl ::core::fmt::Debug for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -330,15 +336,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for Error {
+ impl ::core::fmt::Display for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(
1 == < Error as wasmtime::component::ComponentType >::SIZE32
diff --git a/crates/component-macro/tests/expanded/small-anonymous_async.rs b/crates/component-macro/tests/expanded/small-anonymous_async.rs
index 36cc9c289a..63d1fccf38 100644
--- a/crates/component-macro/tests/expanded/small-anonymous_async.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous_async.rs
@@ -215,8 +215,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -224,12 +227,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(1 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Error as wasmtime::component::ComponentType >::ALIGN32);
@@ -330,11 +336,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for Error {
+ impl ::core::fmt::Debug for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -342,15 +348,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for Error {
+ impl ::core::fmt::Display for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(
1 == < Error as wasmtime::component::ComponentType >::SIZE32
diff --git a/crates/component-macro/tests/expanded/small-anonymous_concurrent.rs b/crates/component-macro/tests/expanded/small-anonymous_concurrent.rs
index 120d68387b..a907f85ea0 100644
--- a/crates/component-macro/tests/expanded/small-anonymous_concurrent.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous_concurrent.rs
@@ -215,8 +215,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -224,12 +227,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(1 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Error as wasmtime::component::ComponentType >::ALIGN32);
@@ -321,11 +327,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for Error {
+ impl ::core::fmt::Debug for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -333,15 +339,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for Error {
+ impl ::core::fmt::Display for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(
1 == < Error as wasmtime::component::ComponentType >::SIZE32
diff --git a/crates/component-macro/tests/expanded/small-anonymous_tracing_async.rs b/crates/component-macro/tests/expanded/small-anonymous_tracing_async.rs
index c032353643..c2398c9cec 100644
--- a/crates/component-macro/tests/expanded/small-anonymous_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/small-anonymous_tracing_async.rs
@@ -215,8 +215,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -224,12 +227,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(1 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < Error as wasmtime::component::ComponentType >::ALIGN32);
@@ -343,11 +349,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for Error {
+ impl ::core::fmt::Debug for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Error")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -355,15 +361,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for Error {
+ impl ::core::fmt::Display for Error {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(
1 == < Error as wasmtime::component::ComponentType >::SIZE32
diff --git a/crates/component-macro/tests/expanded/unstable-features.rs b/crates/component-macro/tests/expanded/unstable-features.rs
index a7567d2810..be5e60a302 100644
--- a/crates/component-macro/tests/expanded/unstable-features.rs
+++ b/crates/component-macro/tests/expanded/unstable-features.rs
@@ -61,12 +61,12 @@ impl LinkOptions {
self
}
}
-impl core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: LinkOptions) -> Self {
(&src).into()
}
}
-impl core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: &LinkOptions) -> Self {
let mut dest = Self::default();
dest.experimental_interface(src.experimental_interface);
diff --git a/crates/component-macro/tests/expanded/unstable-features_async.rs b/crates/component-macro/tests/expanded/unstable-features_async.rs
index 4b36db8956..b758facf5c 100644
--- a/crates/component-macro/tests/expanded/unstable-features_async.rs
+++ b/crates/component-macro/tests/expanded/unstable-features_async.rs
@@ -61,12 +61,12 @@ impl LinkOptions {
self
}
}
-impl core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: LinkOptions) -> Self {
(&src).into()
}
}
-impl core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: &LinkOptions) -> Self {
let mut dest = Self::default();
dest.experimental_interface(src.experimental_interface);
diff --git a/crates/component-macro/tests/expanded/unstable-features_concurrent.rs b/crates/component-macro/tests/expanded/unstable-features_concurrent.rs
index c0f6d32e22..5b862210cf 100644
--- a/crates/component-macro/tests/expanded/unstable-features_concurrent.rs
+++ b/crates/component-macro/tests/expanded/unstable-features_concurrent.rs
@@ -61,12 +61,12 @@ impl LinkOptions {
self
}
}
-impl core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: LinkOptions) -> Self {
(&src).into()
}
}
-impl core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: &LinkOptions) -> Self {
let mut dest = Self::default();
dest.experimental_interface(src.experimental_interface);
diff --git a/crates/component-macro/tests/expanded/unstable-features_tracing_async.rs b/crates/component-macro/tests/expanded/unstable-features_tracing_async.rs
index 95675ade6c..63c5af0683 100644
--- a/crates/component-macro/tests/expanded/unstable-features_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/unstable-features_tracing_async.rs
@@ -61,12 +61,12 @@ impl LinkOptions {
self
}
}
-impl core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: LinkOptions) -> Self {
(&src).into()
}
}
-impl core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
+impl ::core::convert::From<&LinkOptions> for foo::foo::the_interface::LinkOptions {
fn from(src: &LinkOptions) -> Self {
let mut dest = Self::default();
dest.experimental_interface(src.experimental_interface);
diff --git a/crates/component-macro/tests/expanded/unversioned-foo.rs b/crates/component-macro/tests/expanded/unversioned-foo.rs
index 56d9c677e6..e0dec17c84 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo.rs
@@ -189,8 +189,11 @@ pub mod foo {
#[component(name = "other")]
Other(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Error::Other(e) => {
f.debug_tuple("Error::Other").field(e).finish()
@@ -198,12 +201,15 @@ pub mod foo {
}
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{:?}", self)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(12 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(4 == < Error as wasmtime::component::ComponentType >::ALIGN32);
diff --git a/crates/component-macro/tests/expanded/unversioned-foo_async.rs b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
index dcdca9e8d0..6d2c0f1f93 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo_async.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo_async.rs
@@ -189,8 +189,11 @@ pub mod foo {
#[component(name = "other")]
Other(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Error::Other(e) => {
f.debug_tuple("Error::Other").field(e).finish()
@@ -198,12 +201,15 @@ pub mod foo {
}
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{:?}", self)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(12 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(4 == < Error as wasmtime::component::ComponentType >::ALIGN32);
diff --git a/crates/component-macro/tests/expanded/unversioned-foo_concurrent.rs b/crates/component-macro/tests/expanded/unversioned-foo_concurrent.rs
index 0d02215efd..2f372ca460 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo_concurrent.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo_concurrent.rs
@@ -189,8 +189,11 @@ pub mod foo {
#[component(name = "other")]
Other(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Error::Other(e) => {
f.debug_tuple("Error::Other").field(e).finish()
@@ -198,12 +201,15 @@ pub mod foo {
}
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{:?}", self)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(12 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(4 == < Error as wasmtime::component::ComponentType >::ALIGN32);
diff --git a/crates/component-macro/tests/expanded/unversioned-foo_tracing_async.rs b/crates/component-macro/tests/expanded/unversioned-foo_tracing_async.rs
index dafea0c8c1..9adb94cc02 100644
--- a/crates/component-macro/tests/expanded/unversioned-foo_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/unversioned-foo_tracing_async.rs
@@ -189,8 +189,11 @@ pub mod foo {
#[component(name = "other")]
Other(wasmtime::component::__internal::String),
}
- impl core::fmt::Debug for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Error::Other(e) => {
f.debug_tuple("Error::Other").field(e).finish()
@@ -198,12 +201,15 @@ pub mod foo {
}
}
}
- impl core::fmt::Display for Error {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for Error {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{:?}", self)
}
}
- impl core::error::Error for Error {}
+ impl ::core::error::Error for Error {}
const _: () = {
assert!(12 == < Error as wasmtime::component::ComponentType >::SIZE32);
assert!(4 == < Error as wasmtime::component::ComponentType >::ALIGN32);
diff --git a/crates/component-macro/tests/expanded/use-paths.rs b/crates/component-macro/tests/expanded/use-paths.rs
index b4d104fa08..e7d25a513a 100644
--- a/crates/component-macro/tests/expanded/use-paths.rs
+++ b/crates/component-macro/tests/expanded/use-paths.rs
@@ -195,8 +195,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Foo {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Foo {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Foo").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/use-paths_async.rs b/crates/component-macro/tests/expanded/use-paths_async.rs
index e166e27981..bd46ae056d 100644
--- a/crates/component-macro/tests/expanded/use-paths_async.rs
+++ b/crates/component-macro/tests/expanded/use-paths_async.rs
@@ -196,8 +196,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Foo {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Foo {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Foo").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/use-paths_concurrent.rs b/crates/component-macro/tests/expanded/use-paths_concurrent.rs
index 2609456075..29cd0bbf79 100644
--- a/crates/component-macro/tests/expanded/use-paths_concurrent.rs
+++ b/crates/component-macro/tests/expanded/use-paths_concurrent.rs
@@ -196,8 +196,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Foo {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Foo {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Foo").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/use-paths_tracing_async.rs b/crates/component-macro/tests/expanded/use-paths_tracing_async.rs
index 9ec9a39c27..0530c23ca5 100644
--- a/crates/component-macro/tests/expanded/use-paths_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/use-paths_tracing_async.rs
@@ -196,8 +196,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Foo {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Foo {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Foo").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/variants.rs b/crates/component-macro/tests/expanded/variants.rs
index ca7226ddfe..3925640c6e 100644
--- a/crates/component-macro/tests/expanded/variants.rs
+++ b/crates/component-macro/tests/expanded/variants.rs
@@ -201,8 +201,11 @@ pub mod foo {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for E1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -221,8 +224,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -249,8 +255,11 @@ pub mod foo {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -276,8 +285,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -299,8 +311,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts2 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -322,8 +337,11 @@ pub mod foo {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts3 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -345,8 +363,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts4 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -368,8 +389,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts5 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -391,8 +415,11 @@ pub mod foo {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts6 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -429,8 +456,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -438,12 +468,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::ALIGN32);
@@ -457,8 +490,11 @@ pub mod foo {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for IsClone {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
@@ -923,11 +959,11 @@ pub mod exports {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
+ impl ::core::fmt::Debug for E1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -946,11 +982,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -981,11 +1017,11 @@ pub mod exports {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
+ impl ::core::fmt::Debug for V1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -1011,11 +1047,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
+ impl ::core::fmt::Debug for Casts1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -1041,11 +1077,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
+ impl ::core::fmt::Debug for Casts2 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -1071,11 +1107,11 @@ pub mod exports {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
+ impl ::core::fmt::Debug for Casts3 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -1101,11 +1137,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
+ impl ::core::fmt::Debug for Casts4 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -1131,11 +1167,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
+ impl ::core::fmt::Debug for Casts5 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -1161,11 +1197,11 @@ pub mod exports {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
+ impl ::core::fmt::Debug for Casts6 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -1206,11 +1242,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for MyErrno {
+ impl ::core::fmt::Debug for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -1218,15 +1254,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
+ impl ::core::fmt::Display for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(
1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32
@@ -1244,11 +1280,11 @@ pub mod exports {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
+ impl ::core::fmt::Debug for IsClone {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/variants_async.rs b/crates/component-macro/tests/expanded/variants_async.rs
index 6dce801777..d9a0cd928a 100644
--- a/crates/component-macro/tests/expanded/variants_async.rs
+++ b/crates/component-macro/tests/expanded/variants_async.rs
@@ -201,8 +201,11 @@ pub mod foo {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for E1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -221,8 +224,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -249,8 +255,11 @@ pub mod foo {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -276,8 +285,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -299,8 +311,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts2 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -322,8 +337,11 @@ pub mod foo {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts3 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -345,8 +363,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts4 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -368,8 +389,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts5 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -391,8 +415,11 @@ pub mod foo {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts6 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -429,8 +456,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -438,12 +468,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::ALIGN32);
@@ -457,8 +490,11 @@ pub mod foo {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for IsClone {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
@@ -1054,11 +1090,11 @@ pub mod exports {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
+ impl ::core::fmt::Debug for E1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -1077,11 +1113,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -1112,11 +1148,11 @@ pub mod exports {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
+ impl ::core::fmt::Debug for V1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -1142,11 +1178,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
+ impl ::core::fmt::Debug for Casts1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -1172,11 +1208,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
+ impl ::core::fmt::Debug for Casts2 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -1202,11 +1238,11 @@ pub mod exports {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
+ impl ::core::fmt::Debug for Casts3 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -1232,11 +1268,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
+ impl ::core::fmt::Debug for Casts4 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -1262,11 +1298,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
+ impl ::core::fmt::Debug for Casts5 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -1292,11 +1328,11 @@ pub mod exports {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
+ impl ::core::fmt::Debug for Casts6 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -1337,11 +1373,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for MyErrno {
+ impl ::core::fmt::Debug for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -1349,15 +1385,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
+ impl ::core::fmt::Display for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(
1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32
@@ -1375,11 +1411,11 @@ pub mod exports {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
+ impl ::core::fmt::Debug for IsClone {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/variants_concurrent.rs b/crates/component-macro/tests/expanded/variants_concurrent.rs
index fab3de16b9..ceaa7b1531 100644
--- a/crates/component-macro/tests/expanded/variants_concurrent.rs
+++ b/crates/component-macro/tests/expanded/variants_concurrent.rs
@@ -201,8 +201,11 @@ pub mod foo {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for E1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -221,8 +224,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -249,8 +255,11 @@ pub mod foo {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -276,8 +285,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -299,8 +311,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts2 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -322,8 +337,11 @@ pub mod foo {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts3 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -345,8 +363,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts4 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -368,8 +389,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts5 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -391,8 +415,11 @@ pub mod foo {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts6 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -429,8 +456,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -438,12 +468,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::ALIGN32);
@@ -457,8 +490,11 @@ pub mod foo {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for IsClone {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
@@ -1014,11 +1050,11 @@ pub mod exports {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
+ impl ::core::fmt::Debug for E1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -1037,11 +1073,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -1072,11 +1108,11 @@ pub mod exports {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
+ impl ::core::fmt::Debug for V1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -1102,11 +1138,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
+ impl ::core::fmt::Debug for Casts1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -1132,11 +1168,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
+ impl ::core::fmt::Debug for Casts2 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -1162,11 +1198,11 @@ pub mod exports {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
+ impl ::core::fmt::Debug for Casts3 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -1192,11 +1228,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
+ impl ::core::fmt::Debug for Casts4 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -1222,11 +1258,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
+ impl ::core::fmt::Debug for Casts5 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -1252,11 +1288,11 @@ pub mod exports {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
+ impl ::core::fmt::Debug for Casts6 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -1297,11 +1333,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for MyErrno {
+ impl ::core::fmt::Debug for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -1309,15 +1345,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
+ impl ::core::fmt::Display for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(
1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32
@@ -1335,11 +1371,11 @@ pub mod exports {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
+ impl ::core::fmt::Debug for IsClone {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/variants_tracing_async.rs b/crates/component-macro/tests/expanded/variants_tracing_async.rs
index 5b23fda0d2..14c2cf0047 100644
--- a/crates/component-macro/tests/expanded/variants_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/variants_tracing_async.rs
@@ -201,8 +201,11 @@ pub mod foo {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for E1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -221,8 +224,11 @@ pub mod foo {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Empty {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -249,8 +255,11 @@ pub mod foo {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for V1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -276,8 +285,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts1 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -299,8 +311,11 @@ pub mod foo {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts2 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -322,8 +337,11 @@ pub mod foo {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts3 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -345,8 +363,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts4 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -368,8 +389,11 @@ pub mod foo {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts5 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -391,8 +415,11 @@ pub mod foo {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for Casts6 {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -429,8 +456,11 @@ pub mod foo {
}
}
}
- impl core::fmt::Debug for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -438,12 +468,15 @@ pub mod foo {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Display for MyErrno {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32);
assert!(1 == < MyErrno as wasmtime::component::ComponentType >::ALIGN32);
@@ -457,8 +490,11 @@ pub mod foo {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+ impl ::core::fmt::Debug for IsClone {
+ fn fmt(
+ &self,
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
@@ -1352,11 +1388,11 @@ pub mod exports {
#[component(name = "a")]
A,
}
- impl core::fmt::Debug for E1 {
+ impl ::core::fmt::Debug for E1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
E1::A => f.debug_tuple("E1::A").finish(),
}
@@ -1375,11 +1411,11 @@ pub mod exports {
#[component(name = "a")]
pub a: u32,
}
- impl core::fmt::Debug for Empty {
+ impl ::core::fmt::Debug for Empty {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("Empty").field("a", &self.a).finish()
}
}
@@ -1410,11 +1446,11 @@ pub mod exports {
#[component(name = "g")]
G(u32),
}
- impl core::fmt::Debug for V1 {
+ impl ::core::fmt::Debug for V1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
V1::A => f.debug_tuple("V1::A").finish(),
V1::C(e) => f.debug_tuple("V1::C").field(e).finish(),
@@ -1440,11 +1476,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts1 {
+ impl ::core::fmt::Debug for Casts1 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts1::A(e) => f.debug_tuple("Casts1::A").field(e).finish(),
Casts1::B(e) => f.debug_tuple("Casts1::B").field(e).finish(),
@@ -1470,11 +1506,11 @@ pub mod exports {
#[component(name = "b")]
B(f32),
}
- impl core::fmt::Debug for Casts2 {
+ impl ::core::fmt::Debug for Casts2 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts2::A(e) => f.debug_tuple("Casts2::A").field(e).finish(),
Casts2::B(e) => f.debug_tuple("Casts2::B").field(e).finish(),
@@ -1500,11 +1536,11 @@ pub mod exports {
#[component(name = "b")]
B(u64),
}
- impl core::fmt::Debug for Casts3 {
+ impl ::core::fmt::Debug for Casts3 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts3::A(e) => f.debug_tuple("Casts3::A").field(e).finish(),
Casts3::B(e) => f.debug_tuple("Casts3::B").field(e).finish(),
@@ -1530,11 +1566,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts4 {
+ impl ::core::fmt::Debug for Casts4 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts4::A(e) => f.debug_tuple("Casts4::A").field(e).finish(),
Casts4::B(e) => f.debug_tuple("Casts4::B").field(e).finish(),
@@ -1560,11 +1596,11 @@ pub mod exports {
#[component(name = "b")]
B(i64),
}
- impl core::fmt::Debug for Casts5 {
+ impl ::core::fmt::Debug for Casts5 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts5::A(e) => f.debug_tuple("Casts5::A").field(e).finish(),
Casts5::B(e) => f.debug_tuple("Casts5::B").field(e).finish(),
@@ -1590,11 +1626,11 @@ pub mod exports {
#[component(name = "b")]
B((u32, u32)),
}
- impl core::fmt::Debug for Casts6 {
+ impl ::core::fmt::Debug for Casts6 {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
match self {
Casts6::A(e) => f.debug_tuple("Casts6::A").field(e).finish(),
Casts6::B(e) => f.debug_tuple("Casts6::B").field(e).finish(),
@@ -1635,11 +1671,11 @@ pub mod exports {
}
}
}
- impl core::fmt::Debug for MyErrno {
+ impl ::core::fmt::Debug for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("MyErrno")
.field("code", &(*self as i32))
.field("name", &self.name())
@@ -1647,15 +1683,15 @@ pub mod exports {
.finish()
}
}
- impl core::fmt::Display for MyErrno {
+ impl ::core::fmt::Display for MyErrno {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
write!(f, "{} (error {})", self.name(), * self as i32)
}
}
- impl core::error::Error for MyErrno {}
+ impl ::core::error::Error for MyErrno {}
const _: () = {
assert!(
1 == < MyErrno as wasmtime::component::ComponentType >::SIZE32
@@ -1673,11 +1709,11 @@ pub mod exports {
#[component(name = "v1")]
pub v1: V1,
}
- impl core::fmt::Debug for IsClone {
+ impl ::core::fmt::Debug for IsClone {
fn fmt(
&self,
- f: &mut core::fmt::Formatter<'_>,
- ) -> core::fmt::Result {
+ f: &mut ::core::fmt::Formatter<'_>,
+ ) -> ::core::fmt::Result {
f.debug_struct("IsClone").field("v1", &self.v1).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/worlds-with-types.rs b/crates/component-macro/tests/expanded/worlds-with-types.rs
index 347e6be384..5851980207 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types.rs
@@ -17,8 +17,8 @@ pub struct R {
#[component(name = "a")]
pub a: u32,
}
-impl core::fmt::Debug for R {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl ::core::fmt::Debug for R {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("R").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/worlds-with-types_async.rs b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
index 72df0a8114..a974aaeac0 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types_async.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types_async.rs
@@ -17,8 +17,8 @@ pub struct R {
#[component(name = "a")]
pub a: u32,
}
-impl core::fmt::Debug for R {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl ::core::fmt::Debug for R {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("R").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/worlds-with-types_concurrent.rs b/crates/component-macro/tests/expanded/worlds-with-types_concurrent.rs
index cbf3358b4d..5daa9dc784 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types_concurrent.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types_concurrent.rs
@@ -17,8 +17,8 @@ pub struct R {
#[component(name = "a")]
pub a: u32,
}
-impl core::fmt::Debug for R {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl ::core::fmt::Debug for R {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("R").field("a", &self.a).finish()
}
}
diff --git a/crates/component-macro/tests/expanded/worlds-with-types_tracing_async.rs b/crates/component-macro/tests/expanded/worlds-with-types_tracing_async.rs
index bfd2609a10..536bf9c0fe 100644
--- a/crates/component-macro/tests/expanded/worlds-with-types_tracing_async.rs
+++ b/crates/component-macro/tests/expanded/worlds-with-types_tracing_async.rs
@@ -17,8 +17,8 @@ pub struct R {
#[component(name = "a")]
pub a: u32,
}
-impl core::fmt::Debug for R {
- fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl ::core::fmt::Debug for R {
+ fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_struct("R").field("a", &self.a).finish()
}
}
diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs
index d0c666a51e..584b0c8856 100644
--- a/crates/wit-bindgen/src/lib.rs
+++ b/crates/wit-bindgen/src/lib.rs
@@ -1973,12 +1973,12 @@ impl<'a> InterfaceGenerator<'a> {
self.push_str("impl");
self.print_generics(lt);
- self.push_str(" core::fmt::Debug for ");
+ self.push_str(" ::core::fmt::Debug for ");
self.push_str(&name);
self.print_generics(lt);
self.push_str(" {\n");
self.push_str(
- "fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n",
+ "fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
);
self.push_str(&format!("f.debug_struct(\"{name}\")"));
for field in record.fields.iter() {
@@ -1995,18 +1995,18 @@ impl<'a> InterfaceGenerator<'a> {
if info.error {
self.push_str("impl");
self.print_generics(lt);
- self.push_str(" core::fmt::Display for ");
+ self.push_str(" ::core::fmt::Display for ");
self.push_str(&name);
self.print_generics(lt);
self.push_str(" {\n");
self.push_str(
- "fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n",
+ "fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
);
self.push_str("write!(f, \"{:?}\", self)\n");
self.push_str("}\n");
self.push_str("}\n");
- self.push_str("impl core::error::Error for ");
+ self.push_str("impl ::core::error::Error for ");
self.push_str(&name);
self.push_str("{}\n");
}
@@ -2098,7 +2098,7 @@ impl<'a> InterfaceGenerator<'a> {
let lt = self.lifetime_for(&info, mode);
self.push_str(&format!("pub type {name}"));
self.print_generics(lt);
- self.push_str("= Option<");
+ self.push_str("= ::core::option::Option<");
self.print_ty(payload, mode);
self.push_str(">;\n");
self.assert_type(id, &name);
@@ -2203,12 +2203,12 @@ impl<'a> InterfaceGenerator<'a> {
if info.error {
self.push_str("impl");
self.print_generics(lt);
- self.push_str(" core::fmt::Display for ");
+ self.push_str(" ::core::fmt::Display for ");
self.push_str(&name);
self.print_generics(lt);
self.push_str(" {\n");
self.push_str(
- "fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n",
+ "fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
);
self.push_str("write!(f, \"{:?}\", self)\n");
self.push_str("}\n");
@@ -2216,7 +2216,7 @@ impl<'a> InterfaceGenerator<'a> {
self.push_str("impl");
self.print_generics(lt);
- self.push_str(" core::error::Error for ");
+ self.push_str(" ::core::error::Error for ");
self.push_str(&name);
self.print_generics(lt);
self.push_str(" {}\n");
@@ -2239,11 +2239,13 @@ impl<'a> InterfaceGenerator<'a> {
let lt = self.lifetime_for(&info, mode);
self.push_str("impl");
self.print_generics(lt);
- self.push_str(" core::fmt::Debug for ");
+ self.push_str(" ::core::fmt::Debug for ");
self.push_str(name);
self.print_generics(lt);
self.push_str(" {\n");
- self.push_str("fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n");
+ self.push_str(
+ "fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
+ );
self.push_str("match self {\n");
for (case_name, payload) in cases {
self.push_str(name);
@@ -2273,7 +2275,7 @@ impl<'a> InterfaceGenerator<'a> {
let lt = self.lifetime_for(&info, mode);
self.push_str(&format!("pub type {name}"));
self.print_generics(lt);
- self.push_str("= Result<");
+ self.push_str("= ::core::result::Result<");
self.print_optional_ty(result.ok.as_ref(), mode);
self.push_str(",");
self.print_optional_ty(result.err.as_ref(), mode);
@@ -2368,10 +2370,10 @@ impl<'a> InterfaceGenerator<'a> {
self.push_str("}\n");
- self.push_str("impl core::fmt::Debug for ");
+ self.push_str("impl ::core::fmt::Debug for ");
self.push_str(&name);
self.push_str(
- "{\nfn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n",
+ "{\nfn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
);
self.push_str("f.debug_struct(\"");
self.push_str(&name);
@@ -2383,16 +2385,16 @@ impl<'a> InterfaceGenerator<'a> {
self.push_str("}\n");
self.push_str("}\n");
- self.push_str("impl core::fmt::Display for ");
+ self.push_str("impl ::core::fmt::Display for ");
self.push_str(&name);
self.push_str(
- "{\nfn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {\n",
+ "{\nfn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {\n",
);
self.push_str("write!(f, \"{} (error {})\", self.name(), *self as i32)");
self.push_str("}\n");
self.push_str("}\n");
self.push_str("\n");
- self.push_str("impl core::error::Error for ");
+ self.push_str("impl ::core::error::Error for ");
self.push_str(&name);
self.push_str("{}\n");
} else {
@@ -3118,7 +3120,7 @@ pub fn add_to_linker<T, D>(
// Functions which have a single result `result<ok,err>` get special
// cased to use the host_wasmtime_rust::Error<err>, making it possible
// for them to trap or use `?` to propagate their errors
- self.push_str("Result<");
+ self.push_str("::core::result::Result<");
if let Some(ok) = r.ok {
self.print_ty(&ok, TypeMode::Owned);
} else {
@@ -3796,13 +3798,13 @@ impl LinkOptionsBuilder {
uwriteln!(
src,
"
- impl core::convert::From<LinkOptions> for {path}::LinkOptions {{
+ impl ::core::convert::From<LinkOptions> for {path}::LinkOptions {{
fn from(src: LinkOptions) -> Self {{
(&src).into()
}}
}}
- impl core::convert::From<&LinkOptions> for {path}::LinkOptions {{
+ impl ::core::convert::From<&LinkOptions> for {path}::LinkOptions {{
fn from(src: &LinkOptions) -> Self {{
let mut dest = Self::default();
"