[rust][fidl] Add Result to the reserved identifiers list
This allows FIDL types named Result to compile.
In the future, we may remove it from this list
and instead use fully-qualified paths in the generated
code and require developers to use alias these types
manually.
Change-Id: I68fee50724bc5bc09c0dc9215caaae65901e111b
diff --git a/garnet/go/src/fidl/compiler/backend/rust/ir/ir.go b/garnet/go/src/fidl/compiler/backend/rust/ir/ir.go
index 55e6e6e..b27ac8b 100644
--- a/garnet/go/src/fidl/compiler/backend/rust/ir/ir.go
+++ b/garnet/go/src/fidl/compiler/backend/rust/ir/ir.go
@@ -301,6 +301,7 @@
//"union": true,
// Things that are not keywords, but for which collisions would be very unpleasant
+ "Result": true,
"Ok": true,
"Err": true,
"Vec": true,
diff --git a/garnet/public/lib/fidl/rust/fidl/compilation.test.fidl b/garnet/public/lib/fidl/rust/fidl/compilation.test.fidl
index 5a205b0..316a3d7 100644
--- a/garnet/public/lib/fidl/rust/fidl/compilation.test.fidl
+++ b/garnet/public/lib/fidl/rust/fidl/compilation.test.fidl
@@ -19,3 +19,7 @@
HasBigArray variant;
uint8 variant2;
};
+
+struct Result {
+ string ensure_that_type_named_result_compiles;
+};