servo: Merge #16852 - Fix illegal_floating_point_literal_pattern again and rustup… (from servo:illegal_floating_point_literal_pattern); r=jdm+SimonSapin
authorSimon Sapin <simon.sapin@exyr.org>
Sat, 13 May 2017 11:25:07 -0500
changeset 577441 0af7634266fa0b415c2b2e4bf59193a59fae1328
parent 577440 eb52bae91633e62a94968238f9f4d41d8ed4be06
child 577442 102a57a4fe5c85efabaf67e450c1242a24ae8159
child 577493 0e799351a9964c5bfcddee56094044217f850f38
push id58683
push userbmo:emilio+bugs@crisal.io
push dateSat, 13 May 2017 20:30:53 +0000
reviewersjdm
milestone55.0a1
servo: Merge #16852 - Fix illegal_floating_point_literal_pattern again and rustup… (from servo:illegal_floating_point_literal_pattern); r=jdm+SimonSapin … to compiler that has it, to avoid regressing again. Upgrade to (rustc 1.19.0-nightly (e17a1227a 2017-05-12) Source-Repo: https://github.com/servo/servo Source-Revision: 5e5d3559d90a9a0b69ec8147eedf12025ec3e0ce
servo/components/style/properties/gecko.mako.rs
servo/components/style/properties/longhand/font.mako.rs
servo/python/servo/bootstrap_commands.py
servo/rust-commit-hash
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -1655,21 +1655,17 @@ fn static_assert() {
     }
 
     pub fn copy_font_size_adjust_from(&mut self, other: &Self) {
         self.gecko.mFont.sizeAdjust = other.gecko.mFont.sizeAdjust;
     }
 
     pub fn clone_font_size_adjust(&self) -> longhands::font_size_adjust::computed_value::T {
         use properties::longhands::font_size_adjust::computed_value::T;
-
-        match self.gecko.mFont.sizeAdjust {
-            -1.0 => T::None,
-            _ => T::Number(self.gecko.mFont.sizeAdjust),
-        }
+        T::from_gecko_adjust(self.gecko.mFont.sizeAdjust)
     }
 
     #[allow(non_snake_case)]
     pub fn set__x_lang(&mut self, v: longhands::_x_lang::computed_value::T) {
         let ptr = v.0.as_ptr();
         forget(v);
         unsafe {
             Gecko_nsStyleFont_SetLang(&mut self.gecko, ptr);
--- a/servo/components/style/properties/longhand/font.mako.rs
+++ b/servo/components/style/properties/longhand/font.mako.rs
@@ -1059,19 +1059,20 @@
                     T::None => dest.write_str("none"),
                     T::Number(number) => number.to_css(dest),
                 }
             }
         }
 
         impl T {
             pub fn from_gecko_adjust(gecko: f32) -> Self {
-                match gecko {
-                    -1.0 => T::None,
-                    _ => T::Number(gecko),
+                if gecko == -1.0 {
+                    T::None
+                } else {
+                    T::Number(gecko)
                 }
             }
         }
 
         impl Animatable for T {
             fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
                 match (*self, *other) {
                     (T::Number(ref number), T::Number(ref other)) =>
--- a/servo/python/servo/bootstrap_commands.py
+++ b/servo/python/servo/bootstrap_commands.py
@@ -316,17 +316,17 @@ class MachCommands(CommandBase):
                 for version_file in version_files:
                     cmd = subprocess.Popen(
                         ['git', 'log', '--oneline', '--no-color', '-n', keep, '--patch', version_file],
                         stdout=subprocess.PIPE,
                         universal_newlines=True
                     )
                     stdout, _ = cmd.communicate()
                     for line in stdout.splitlines():
-                        if line.startswith("+") and not line.startswith("+++"):
+                        if line.startswith(b"+") and not line.startswith(b"+++"):
                             to_keep[tool].add(line[1:])
 
         removing_anything = False
         for tool in ["rust", "cargo"]:
             base = path.join(self.context.sharedir, tool)
             if not path.isdir(base):
                 continue
             for name in os.listdir(base):
--- a/servo/rust-commit-hash
+++ b/servo/rust-commit-hash
@@ -1,1 +1,1 @@
-ced823e267c132fab172b1890b24073995e79ffa
+e17a1227ac779a181b2839998e26a7e4e434c2a0