J W created THRIFT-4661:
---------------------------
Summary: Rust enum name wrong case in generated structs
Key: THRIFT-4661
URL: https://issues.apache.org/jira/browse/THRIFT-4661
Project: Thrift
Issue Type: Bug
Components: Rust - Compiler
Affects Versions: 0.11.0
Reporter: J W
*For this thrift (note lowercase "e" at beginning of enum name):*
enum ePlatform {
None = 0
}
struct SettingItem {
1: ePlatform platform
}
*Generated Rust fails to compile:*
error[E0412]: cannot find type `ePlatform` in this scope
--> src\enum_lowercase_prefix.rs:71:24
|
71 | pub platform: Option<ePlatform>,
| ^^^^^^^^^ did you mean `EPlatform`?
*In t_rs_generator.cc line 3025:*
return rust_namespace(ttype) + ttype->get_name();
*To match behavior in generate_enum(), probably needs to be:*
return rust_namespace(ttype) + rust_camel_case(ttype->get_name());
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)