From 9a60e5d001442f0af8563f40ac7f449c4f579bf4 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Thu, 19 Sep 2024 10:15:42 -0700 Subject: [PATCH] Use .pb.h instead of .proto.h from Rust cc thunks. The .proto.h is not emitted by default from the cc generator in OSS, rather than try to force it to emit we can just use the .pb.h PiperOrigin-RevId: 676464651 --- src/google/protobuf/compiler/rust/naming.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/google/protobuf/compiler/rust/naming.cc b/src/google/protobuf/compiler/rust/naming.cc index e0a492f78e..5ba918c485 100644 --- a/src/google/protobuf/compiler/rust/naming.cc +++ b/src/google/protobuf/compiler/rust/naming.cc @@ -62,7 +62,9 @@ std::string GetThunkCcFile(Context& ctx, const FileDescriptor& file) { std::string GetHeaderFile(Context& ctx, const FileDescriptor& file) { auto basename = StripProto(file.name()); - return absl::StrCat(basename, ".proto.h"); + constexpr absl::string_view kCcGencodeExt = ".pb.h"; + + return absl::StrCat(basename, kCcGencodeExt); } std::string RawMapThunk(Context& ctx, const Descriptor& msg,