Breaking change: Remove deprecated syntax APIs
PiperOrigin-RevId: 588848125
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h
index 97cd9bc..c9bd246 100644
--- a/src/google/protobuf/descriptor.h
+++ b/src/google/protobuf/descriptor.h
@@ -1036,17 +1036,10 @@
friend class Reflection;
friend class FieldDescriptorLegacy;
-
- public:
- ABSL_DEPRECATED(
- "Syntax is deprecated in favor of editions, please use "
- "FieldDescriptor::has_presence instead.")
// Returns true if this field was syntactically written with "optional" in the
// .proto file. Excludes singular proto3 fields that do not have a label.
bool has_optional_keyword() const;
- private:
-
// Get the merged features that apply to this field. These are specified in
// the .proto file through the feature options in the message definition.
// Allowed features are defined by Features in descriptor.proto, along with
@@ -1219,17 +1212,10 @@
friend class compiler::cpp::Formatter;
friend class OneofDescriptorLegacy;
-
- public:
- ABSL_DEPRECATED(
- "Syntax is deprecated in favor of editions, please use "
- "real_oneof_decl_count for now instead of is_synthetic.")
// Returns whether this oneof was inserted by the compiler to wrap a proto3
// optional field. If this returns true, code generators should *not* emit it.
bool is_synthetic() const;
- private:
-
// Get the merged features that apply to this oneof. These are specified in
// the .proto file through the feature options in the oneof definition.
// Allowed features are defined by Features in descriptor.proto, along with
@@ -1869,18 +1855,12 @@
// descriptor.proto, and any available extensions of that message.
const FileOptions& options() const;
-
private:
// With the upcoming release of editions, syntax should not be used for
// business logic. Instead, the various feature helpers defined in this file
// should be used to query more targeted behaviors. For example:
// has_presence, is_closed, requires_utf8_validation.
- enum
- ABSL_DEPRECATED(
- "Syntax is deprecated in favor of editions. Please use targeted "
- "feature helpers instead (e.g. has_presence, is_packed, "
- "requires_utf8_validation, etc).")
- Syntax
+ enum Syntax
#ifndef SWIG
: int
#endif // !SWIG
@@ -1891,10 +1871,6 @@
SYNTAX_EDITIONS = 99,
};
PROTOBUF_IGNORE_DEPRECATION_START
- ABSL_DEPRECATED(
- "Syntax is deprecated in favor of editions. Please use targeted "
- "feature helpers instead (e.g. has_presence, is_packed, "
- "requires_utf8_validation, etc).")
Syntax syntax() const;
PROTOBUF_IGNORE_DEPRECATION_STOP
@@ -1903,7 +1879,6 @@
friend class FileDescriptorLegacy;
PROTOBUF_IGNORE_DEPRECATION_START
- ABSL_DEPRECATED("Syntax is deprecated in favor of editions")
static const char* SyntaxName(Syntax syntax);
PROTOBUF_IGNORE_DEPRECATION_STOP