Skip to content

Commit

Permalink
Use .pb.h instead of .proto.h from Rust cc thunks.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Sep 19, 2024
1 parent f57a2c0 commit 9a60e5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/google/protobuf/compiler/rust/naming.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9a60e5d

Please sign in to comment.