diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-09-10 19:16:57 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-09-18 21:20:15 -0500 |
| commit | 3ae3a5fc3c3edcc1a59273ed8caf7e42465b2daf (patch) | |
| tree | 9b94a6376047026d92a7baebe6e90c2818e11e0d /src/libsyntax | |
| parent | fb5de8ce57a36e504af2dd6626365d94b5f4262d (diff) | |
| download | rust-3ae3a5fc3c3edcc1a59273ed8caf7e42465b2daf.tar.gz rust-3ae3a5fc3c3edcc1a59273ed8caf7e42465b2daf.zip | |
Overloaded augmented assignments
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 989977a6917..1e9b244c57c 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -194,6 +194,9 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status // allow empty structs/enum variants with braces ("braced_empty_structs", "1.5.0", None, Active), + + // allow overloading augmented assignment operations like `a += b` + ("augmented_assignments", "1.5.0", None, Active), ]; // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -457,6 +460,7 @@ pub struct Features { pub default_type_parameter_fallback: bool, pub type_macros: bool, pub cfg_target_feature: bool, + pub augmented_assignments: bool, } impl Features { @@ -485,6 +489,7 @@ impl Features { default_type_parameter_fallback: false, type_macros: false, cfg_target_feature: false, + augmented_assignments: false, } } } @@ -1053,6 +1058,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, default_type_parameter_fallback: cx.has_feature("default_type_parameter_fallback"), type_macros: cx.has_feature("type_macros"), cfg_target_feature: cx.has_feature("cfg_target_feature"), + augmented_assignments: cx.has_feature("augmented_assignments"), } } |
