You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
considering the protobuf message possesses a field async, the generated grpc rust code will irritate compiler under 2018 edition.
here's a simple demonstration, add two lines in greeting example repo:
greeter $ git diff
diff --git a/grpc-examples/greeter/Cargo.toml b/grpc-examples/greeter/Cargo.toml
index 4477fde..4a5bc33 100644
--- a/grpc-examples/greeter/Cargo.toml
+++ b/grpc-examples/greeter/Cargo.toml
@@ -3,6 +3,7 @@ name = "grpc_examples_greeter"
version = "0.0.0"
authors = ["Stepan Koltsov <stepan.koltsov@gmail.com>"]
publish = false
+edition = "2018"
[lib]
doctest = false
diff --git a/grpc-examples/greeter/helloworld.proto b/grpc-examples/greeter/helloworld.proto
index 0bee1fc..dc3f75d 100644
--- a/grpc-examples/greeter/helloworld.proto
+++ b/grpc-examples/greeter/helloworld.proto
@@ -45,6 +45,7 @@ service Greeter {
// The request message containing the user's name.
message HelloRequest {
string name = 1;
+ bool async = 2;
}
// The response message containing the greetings
and rustc would complain
error: expected identifier, found reserved keyword `async`
--> grpc-examples/greeter/src/helloworld.rs:216:14
|
216 | self.async = false;
| ^^^^^ expected identifier, found reserved keyword
help: you can escape reserved keywords to use them as identifiers
|
216 | self.r#async = false;
| ^^^^^^^
error: aborting due to 11 previous errors
error: Could not compile `grpc_examples_greeter`.
The text was updated successfully, but these errors were encountered:
considering the protobuf message possesses a field
async
, the generated grpc rust code will irritate compiler under 2018 edition.here's a simple demonstration, add two lines in greeting example repo:
and rustc would complain
The text was updated successfully, but these errors were encountered: