diff --git a/tools/fidl/fidlgen_rust/codegen/service.tmpl b/tools/fidl/fidlgen_rust/codegen/service.tmpl index 59026a20eb6..8d815697dd5 100644 --- a/tools/fidl/fidlgen_rust/codegen/service.tmpl +++ b/tools/fidl/fidlgen_rust/codegen/service.tmpl @@ -58,7 +58,7 @@ impl fidl::endpoints::ServiceRequest for {{ .Name }}Request { ///{{ . }} {{- end }} #[cfg(target_os = "fuchsia")] -pub struct {{ .Name }}Proxy(Box); +pub struct {{ .Name }}Proxy({{ if not .Members }}#[allow(dead_code)] {{ end }}Box); #[cfg(target_os = "fuchsia")] impl fidl::endpoints::ServiceProxy for {{ .Name }}Proxy { diff --git a/tools/fidl/fidlgen_rust/goldens/service.rs.golden b/tools/fidl/fidlgen_rust/goldens/service.rs.golden index 7ceec2b7068..793aa1291a6 100644 --- a/tools/fidl/fidlgen_rust/goldens/service.rs.golden +++ b/tools/fidl/fidlgen_rust/goldens/service.rs.golden @@ -656,7 +656,7 @@ impl fidl::endpoints::ServiceRequest for EmptyServiceRequest { } } #[cfg(target_os = "fuchsia")] -pub struct EmptyServiceProxy(Box); +pub struct EmptyServiceProxy(#[allow(dead_code)] Box); #[cfg(target_os = "fuchsia")] impl fidl::endpoints::ServiceProxy for EmptyServiceProxy {